From 8cb7a2d12793610354b767bf8c86492859120046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Pa=C4=91en?= <49401914+ipadjen@users.noreply.github.com> Date: Mon, 15 Jan 2024 21:20:41 +0100 Subject: [PATCH 1/4] Update with new AW3 CGAL developments --- .../CGAL/AABB_face_graph_triangle_primitive.h | 15 +- .../AABB_halfedge_graph_segment_primitive.h | 25 +- .../include/CGAL/AABB_polyhedral_oracle.h | 10 +- .../CGAL/AABB_polyhedron_segment_primitive.h | 15 +- .../CGAL/AABB_polyhedron_triangle_primitive.h | 15 +- thirdparty/CGAL/include/CGAL/AABB_primitive.h | 10 +- .../include/CGAL/AABB_segment_primitive.h | 6 +- thirdparty/CGAL/include/CGAL/AABB_traits.h | 31 +- thirdparty/CGAL/include/CGAL/AABB_tree.h | 29 +- .../AABB_tree/internal/AABB_drawing_traits.h | 4 +- .../CGAL/AABB_tree/internal/AABB_node.h | 4 +- .../internal/AABB_ray_intersection.h | 37 +- .../AABB_tree/internal/AABB_search_tree.h | 4 +- .../internal/AABB_traversal_traits.h | 16 +- .../internal/Has_nested_type_Shared_data.h | 4 +- .../internal/Is_ray_intersection_geomtraits.h | 14 +- .../AABB_tree/internal/Primitive_helper.h | 4 +- .../internal/triangle_datum_covering.h | 14 +- .../include/CGAL/AABB_triangle_primitive.h | 6 +- .../AABB_triangulation_3_cell_primitive.h | 4 +- .../AABB_triangulation_3_triangle_primitive.h | 15 +- .../Advancing_front_surface_reconstruction.h | 176 +- .../internal/Surface_face_base_2.h | 4 +- .../internal/Surface_vertex_base_2.h | 4 +- .../internal/construct_polyhedron.h | 4 +- .../internal/construct_surface_2.h | 4 +- .../internal/write_triple_indices.h | 4 +- ...front_surface_reconstruction_cell_base_3.h | 4 +- ...ont_surface_reconstruction_vertex_base_3.h | 6 +- .../CGAL/include/CGAL/Aff_transformation_2.h | 4 +- .../CGAL/include/CGAL/Aff_transformation_3.h | 4 +- .../include/CGAL/Algebraic_extension_traits.h | 4 +- .../include/CGAL/Algebraic_kernel_converter.h | 4 +- .../Algebraic_curve_kernel_2.h | 46 +- .../Algebraic_kernel_d/Algebraic_real_d_1.h | 12 +- ...ebraic_real_quadratic_refinement_rep_bfi.h | 50 +- .../Algebraic_kernel_d/Algebraic_real_rep.h | 12 +- .../Algebraic_real_rep_bfi.h | 6 +- .../Bitstream_coefficient_kernel.h | 4 +- .../Bitstream_coefficient_kernel_at_alpha.h | 4 +- .../Algebraic_kernel_d/Bitstream_descartes.h | 6 +- .../Bitstream_descartes_E08_tree.h | 8 +- .../Bitstream_descartes_rndl_tree.h | 12 +- .../Bitstream_descartes_rndl_tree_traits.h | 4 +- .../Algebraic_kernel_d/Curve_analysis_2.h | 82 +- .../Curve_pair_analysis_2.h | 108 +- .../CGAL/Algebraic_kernel_d/Descartes.h | 8 +- .../Algebraic_kernel_d/Event_line_builder.h | 8 +- .../CGAL/Algebraic_kernel_d/Float_traits.h | 6 +- .../Algebraic_kernel_d/Interval_evaluate_1.h | 4 +- .../Algebraic_kernel_d/Interval_evaluate_2.h | 4 +- .../CGAL/Algebraic_kernel_d/LRU_hashed_map.h | 4 +- .../Real_embeddable_extension.h | 6 +- .../CGAL/Algebraic_kernel_d/Real_roots.h | 4 +- .../Algebraic_kernel_d/Shear_controller.h | 4 +- .../Algebraic_kernel_d/Shear_transformation.h | 4 +- .../Algebraic_kernel_d/Status_line_CA_1.h | 14 +- .../Algebraic_kernel_d/Status_line_CPA_1.h | 8 +- .../CGAL/Algebraic_kernel_d/Xy_coordinate_2.h | 14 +- .../algebraic_curve_kernel_2_tools.h | 18 +- .../CGAL/Algebraic_kernel_d/bound_between_1.h | 4 +- .../Algebraic_kernel_d/construct_binary.h | 4 +- .../include/CGAL/Algebraic_kernel_d/enums.h | 4 +- .../CGAL/Algebraic_kernel_d/exceptions.h | 4 +- .../include/CGAL/Algebraic_kernel_d/flags.h | 10 +- .../include/CGAL/Algebraic_kernel_d/macros.h | 4 +- .../Algebraic_kernel_d/refine_zero_against.h | 6 +- .../include/CGAL/Algebraic_kernel_d/shear.h | 4 +- .../univariate_polynomial_utils.h | 4 +- .../CGAL/include/CGAL/Algebraic_kernel_d_1.h | 6 +- .../CGAL/include/CGAL/Algebraic_kernel_d_2.h | 4 +- ...ion_objects_on_roots_and_polynomials_2_2.h | 4 +- ...unctions_comparison_root_for_circles_2_2.h | 4 +- ...ions_on_roots_and_polynomial_1_2_and_2_2.h | 4 +- ...l_functions_on_roots_and_polynomials_2_2.h | 4 +- .../CGAL/Algebraic_kernel_for_circles_2_2.h | 4 +- ...ion_objects_on_roots_and_polynomials_2_3.h | 4 +- ...unctions_comparison_root_for_spheres_2_3.h | 4 +- ...ions_on_roots_and_polynomial_1_3_and_2_3.h | 4 +- ...l_functions_on_roots_and_polynomials_1_3.h | 4 +- ...l_functions_on_roots_and_polynomials_2_3.h | 6 +- .../CGAL/Algebraic_kernel_for_spheres_2_3.h | 4 +- .../CGAL/Algebraic_kernel_rs_gmpq_d_1.h | 4 +- .../CGAL/Algebraic_kernel_rs_gmpz_d_1.h | 4 +- .../include/CGAL/Algebraic_structure_traits.h | 7 +- thirdparty/CGAL/include/CGAL/Alpha_shape_2.h | 107 +- thirdparty/CGAL/include/CGAL/Alpha_shape_3.h | 41 +- .../include/CGAL/Alpha_shape_cell_base_3.h | 4 +- .../include/CGAL/Alpha_shape_face_base_2.h | 4 +- .../include/CGAL/Alpha_shape_vertex_base_2.h | 5 +- .../include/CGAL/Alpha_shape_vertex_base_3.h | 4 +- .../Alpha_shapes_2/internal/Lazy_alpha_nt_2.h | 20 +- .../internal/Classification_type.h | 4 +- .../Alpha_shapes_3/internal/Lazy_alpha_nt_3.h | 22 +- .../CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h | 1164 +++-- .../internal/Alpha_wrap_AABB_geom_traits.h | 298 ++ .../Alpha_wrap_triangulation_cell_base_3.h | 131 + .../Alpha_wrap_triangulation_vertex_base_3.h | 71 + .../CGAL/Alpha_wrap_3/internal/Oracle_base.h | 9 +- .../Alpha_wrap_3/internal/Point_set_oracle.h | 43 +- .../internal/Segment_soup_oracle.h | 61 +- .../internal/Triangle_mesh_oracle.h | 30 +- .../internal/Triangle_soup_oracle.h | 42 +- .../internal/gate_priority_queue.h | 91 +- .../Alpha_wrap_3/internal/geometry_utils.h | 173 +- .../internal/offset_intersection.h | 4 +- .../CGAL/Alpha_wrap_3/internal/oracles.h | 6 +- .../Alpha_wrap_3/internal/splitting_helper.h | 18 +- .../CGAL/Alpha_wrap_3/internal/validation.h | 385 ++ .../CGAL/include/CGAL/Apollonius_graph_2.h | 4 +- .../Apollonius_graph_2_impl.h | 58 +- .../Apollonius_graph_hierarchy_2_impl.h | 10 +- .../Bounded_side_of_ccw_circle_C2.h | 4 +- .../Apollonius_graph_2/Compare_weight_2.h | 4 +- .../CGAL/Apollonius_graph_2/Compare_x_2.h | 4 +- .../CGAL/Apollonius_graph_2/Compare_y_2.h | 4 +- .../Apollonius_graph_2/Constructions_C2.h | 4 +- .../Apollonius_graph_2/Constructions_ftC2.h | 4 +- .../Apollonius_graph_2/Constructions_rtH2.h | 4 +- .../Apollonius_graph_2/Finite_edge_test8_C2.h | 4 +- .../Apollonius_graph_2/Finite_edge_test_C2.h | 4 +- .../CGAL/Apollonius_graph_2/Incircle8_C2.h | 4 +- .../CGAL/Apollonius_graph_2/Incircle_C2.h | 4 +- .../Infinite_edge_test_C2.h | 4 +- .../Is_degenerate_edge_C2.h | 4 +- .../CGAL/Apollonius_graph_2/Is_hidden_C2.h | 4 +- .../Apollonius_graph_2/Kernel_wrapper_2.h | 4 +- .../CGAL/Apollonius_graph_2/Orientation8_C2.h | 4 +- .../CGAL/Apollonius_graph_2/Orientation_2.h | 4 +- .../Oriented_side_of_bisector_C2.h | 4 +- .../Predicate_constructions_C2.h | 4 +- .../CGAL/Apollonius_graph_2/Predicates_C2.h | 4 +- .../Apollonius_graph_2/Traits_wrapper_2.h | 4 +- .../include/CGAL/Apollonius_graph_2/basic.h | 4 +- .../Apollonius_graph_2/comparator_profiler.h | 4 +- .../Apollonius_graph_2/compare_quadratic.h | 4 +- .../Apollonius_graph_2/predicate_profiler.h | 4 +- .../uncertain/Uncertain_is_hidden_C2.h | 4 +- .../Uncertain_oriented_side_of_bisector_C2.h | 4 +- .../uncertain/Uncertain_vertex_conflict_2.h | 18 +- .../uncertain/uncertain_functions_on_signs.h | 4 +- .../Apollonius_graph_adaptation_policies_2.h | 4 +- .../Apollonius_graph_adaptation_traits_2.h | 4 +- .../CGAL/Apollonius_graph_data_structure_2.h | 4 +- .../CGAL/Apollonius_graph_filtered_traits_2.h | 4 +- .../CGAL/Apollonius_graph_hierarchy_2.h | 4 +- ...Apollonius_graph_hierarchy_vertex_base_2.h | 4 +- .../include/CGAL/Apollonius_graph_traits_2.h | 4 +- .../CGAL/Apollonius_graph_vertex_base_2.h | 5 +- .../CGAL/include/CGAL/Apollonius_site_2.h | 4 +- .../CGAL/Approximate_min_ellipsoid_d.h | 8 +- .../Approximate_min_ellipsoid_d_configure.h | 4 +- .../Approximate_min_ellipsoid_d_debug.h | 12 +- .../Approximate_min_ellipsoid_d_impl.h | 14 +- .../Khachiyan_approximation.h | 20 +- .../Khachiyan_approximation_impl.h | 19 +- .../Approximate_min_ellipsoid_d_traits_2.h | 4 +- .../Approximate_min_ellipsoid_d_traits_3.h | 4 +- .../Approximate_min_ellipsoid_d_traits_d.h | 4 +- .../CGAL/include/CGAL/Arithmetic_kernel.h | 4 +- .../Arithmetic_kernel_base.h | 4 +- .../include/CGAL/Arr_Bezier_curve_traits_2.h | 10 +- thirdparty/CGAL/include/CGAL/Arr_accessor.h | 20 +- .../CGAL/Arr_algebraic_segment_traits_2.h | 85 +- .../include/CGAL/Arr_batched_point_location.h | 11 +- .../Arr_bounded_planar_topology_traits_2.h | 26 +- .../CGAL/Arr_circle_segment_traits_2.h | 291 +- .../include/CGAL/Arr_circular_arc_traits_2.h | 12 +- .../CGAL/Arr_circular_line_arc_traits_2.h | 126 +- .../CGAL/include/CGAL/Arr_conic_traits_2.h | 4636 ++++++++++++++--- .../Arr_consolidated_curve_data_traits_2.h | 4 +- .../CGAL/include/CGAL/Arr_counting_traits_2.h | 19 +- .../include/CGAL/Arr_curve_data_traits_2.h | 85 +- thirdparty/CGAL/include/CGAL/Arr_dcel_base.h | 6 +- .../CGAL/include/CGAL/Arr_default_dcel.h | 4 +- .../include/CGAL/Arr_default_overlay_traits.h | 4 +- ...ional_non_caching_segment_basic_traits_2.h | 4 +- thirdparty/CGAL/include/CGAL/Arr_enums.h | 4 +- .../CGAL/include/CGAL/Arr_extended_dcel.h | 6 +- .../CGAL/include/CGAL/Arr_face_index_map.h | 4 +- thirdparty/CGAL/include/CGAL/Arr_face_map.h | 4 +- ...eodesic_arc_on_sphere_partition_traits_2.h | 20 +- .../Arr_geodesic_arc_on_sphere_traits_2.h | 825 +-- .../CGAL/Arr_geometry_traits/Arr_plane_3.h | 10 +- .../Bezier_bounding_rational_traits.h | 22 +- .../CGAL/Arr_geometry_traits/Bezier_cache.h | 6 +- .../CGAL/Arr_geometry_traits/Bezier_curve_2.h | 10 +- .../CGAL/Arr_geometry_traits/Bezier_point_2.h | 12 +- .../Arr_geometry_traits/Bezier_x_monotone_2.h | 30 +- .../Arr_geometry_traits/Circle_segment_2.h | 17 +- .../CGAL/Arr_geometry_traits/Conic_arc_2.h | 2342 ++++----- .../Conic_intersections_2.h | 189 +- .../CGAL/Arr_geometry_traits/Conic_point_2.h | 123 +- .../Conic_x_monotone_arc_2.h | 2103 +++----- .../Consolidated_curve_data_aux.h | 4 +- .../CGAL/Arr_geometry_traits/Curve_data_aux.h | 4 +- .../IO/Polycurve_2_iostream.h | 4 +- .../Arr_geometry_traits/One_root_number.h | 8 +- .../CGAL/Arr_geometry_traits/Polycurve_2.h | 16 +- .../CGAL/Arr_geometry_traits/Polyline_2.h | 4 +- .../CGAL/Arr_geometry_traits/Rational_arc_2.h | 18 +- .../Arr_geometry_traits/Segment_assertions.h | 4 +- .../CGAL/Arr_geometry_traits/de_Casteljau_2.h | 4 +- .../CGAL/Arr_landmarks_point_location.h | 6 +- .../CGAL/include/CGAL/Arr_line_arc_traits_2.h | 6 +- .../CGAL/include/CGAL/Arr_linear_traits_2.h | 20 +- .../include/CGAL/Arr_naive_point_location.h | 4 +- .../Arr_non_caching_segment_basic_traits_2.h | 65 +- .../CGAL/Arr_non_caching_segment_traits_2.h | 28 +- thirdparty/CGAL/include/CGAL/Arr_observer.h | 14 +- thirdparty/CGAL/include/CGAL/Arr_overlay.h | 4 +- thirdparty/CGAL/include/CGAL/Arr_overlay_2.h | 29 +- .../Arr_batched_point_location_traits_2.h | 6 +- .../Arr_landmarks_pl_impl.h | 14 +- .../Arr_lm_generator_base.h | 4 +- .../Arr_lm_grid_generator.h | 4 +- .../Arr_lm_halton_generator.h | 6 +- .../Arr_lm_middle_edges_generator.h | 4 +- .../Arr_lm_nearest_neighbor.h | 8 +- .../Arr_lm_random_generator.h | 6 +- .../Arr_lm_specified_points_generator.h | 4 +- .../Arr_lm_vertices_generator.h | 4 +- .../Arr_naive_point_location_impl.h | 6 +- .../Arr_simple_point_location_impl.h | 10 +- .../Arr_trapezoid_ric_pl_impl.h | 78 +- .../Arr_triangulation_pl_functions.h | 10 +- .../Arr_triangulation_pl_impl.h | 10 +- .../Arr_walk_along_line_pl_impl.h | 18 +- .../CGAL/Arr_point_location/Td_X_trapezoid.h | 93 +- .../CGAL/Arr_point_location/Td_active_edge.h | 24 +- .../Td_active_fictitious_vertex.h | 10 +- .../Arr_point_location/Td_active_trapezoid.h | 69 +- .../Arr_point_location/Td_active_vertex.h | 10 +- .../include/CGAL/Arr_point_location/Td_dag.h | 4 +- .../CGAL/Arr_point_location/Td_dag_node.h | 12 +- .../Arr_point_location/Td_inactive_edge.h | 10 +- .../Td_inactive_fictitious_vertex.h | 10 +- .../Td_inactive_trapezoid.h | 8 +- .../Arr_point_location/Td_inactive_vertex.h | 10 +- .../CGAL/Arr_point_location/Td_ninetuple.h | 4 +- .../CGAL/Arr_point_location/Td_predicates.h | 4 +- .../CGAL/Arr_point_location/Td_traits.h | 41 +- .../Trapezoidal_decomposition_2.h | 172 +- .../Trapezoidal_decomposition_2_impl.h | 380 +- .../Trapezoidal_decomposition_2_iostream.h | 16 +- .../Trapezoidal_decomposition_2_misc.h | 4 +- .../include/CGAL/Arr_point_location_result.h | 72 +- .../CGAL/Arr_polycurve_basic_traits_2.h | 115 +- .../include/CGAL/Arr_polycurve_traits_2.h | 71 +- .../CGAL/include/CGAL/Arr_polyline_traits_2.h | 76 +- .../CGAL/Arr_rat_arc/Algebraic_point_2.h | 4 +- .../CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h | 13 +- .../CGAL/include/CGAL/Arr_rat_arc/Cache.h | 4 +- .../CGAL/Arr_rat_arc/Rational_arc_d_1.h | 36 +- .../CGAL/Arr_rat_arc/Rational_function.h | 4 +- .../Rational_function_canonicalized_pair.h | 4 +- .../Rational_function_ordered_pair.h | 4 +- .../CGAL/Arr_rat_arc/Rational_function_pair.h | 4 +- .../CGAL/include/CGAL/Arr_rat_arc/Singleton.h | 4 +- .../CGAL/Arr_rational_function_traits_2.h | 6 +- .../CGAL/include/CGAL/Arr_segment_traits_2.h | 72 +- .../include/CGAL/Arr_simple_point_location.h | 23 +- .../Arr_on_sphere_transformation.h | 4 +- .../Arr_polyhedral_sgm.h | 16 +- .../Arr_polyhedral_sgm_arr_dcel.h | 4 +- .../Arr_polyhedral_sgm_initializer_visitor.h | 4 +- .../Arr_polyhedral_sgm_overlay.h | 4 +- .../Arr_polyhedral_sgm_polyhedron_3.h | 13 +- .../Arr_polyhedral_sgm_traits.h | 4 +- .../Arr_polyhedral_sgm_transformation.h | 4 +- .../Arr_spherical_gaussian_map_3.h | 46 +- .../Arr_transform_on_sphere.h | 14 +- .../CGAL/Arr_spherical_topology_traits_2.h | 44 +- thirdparty/CGAL/include/CGAL/Arr_tags.h | 154 +- .../Arr_bounded_planar_batched_pl_helper.h | 4 +- .../Arr_bounded_planar_construction_helper.h | 4 +- .../Arr_bounded_planar_insertion_helper.h | 4 +- .../Arr_bounded_planar_overlay_helper.h | 4 +- ...rr_bounded_planar_topology_traits_2_impl.h | 4 +- .../Arr_bounded_planar_vert_decomp_helper.h | 8 +- .../Arr_inc_insertion_zone_visitor.h | 8 +- .../Arr_planar_topology_traits_base_2.h | 8 +- .../Arr_spherical_batched_pl_helper.h | 4 +- .../Arr_spherical_construction_helper.h | 8 +- .../Arr_spherical_insertion_helper.h | 6 +- .../Arr_spherical_overlay_helper.h | 4 +- .../Arr_spherical_topology_traits_2_impl.h | 55 +- .../Arr_spherical_vert_decomp_helper.h | 12 +- .../Arr_unb_planar_batched_pl_helper.h | 4 +- .../Arr_unb_planar_construction_helper.h | 21 +- .../Arr_unb_planar_insertion_helper.h | 4 +- .../Arr_unb_planar_overlay_helper.h | 4 +- .../Arr_unb_planar_topology_traits_2_impl.h | 24 +- .../Arr_unb_planar_vert_decomp_helper.h | 8 +- .../CGAL/include/CGAL/Arr_tracing_traits_2.h | 71 +- .../CGAL/Arr_trapezoid_ric_point_location.h | 4 +- .../CGAL/Arr_triangulation_point_location.h | 4 +- .../CGAL/Arr_unb_planar_topology_traits_2.h | 40 +- .../CGAL/include/CGAL/Arr_vertex_index_map.h | 4 +- thirdparty/CGAL/include/CGAL/Arr_vertex_map.h | 4 +- .../CGAL/Arr_vertical_decomposition_2.h | 13 +- .../CGAL/Arr_walk_along_line_point_location.h | 6 +- thirdparty/CGAL/include/CGAL/Arrangement_2.h | 4 +- .../Arrangement_2/Arr_compute_zone_visitor.h | 20 +- .../Arr_default_planar_topology.h | 4 +- .../Arr_do_intersect_zone_visitor.h | 8 +- .../Arr_on_surface_with_history_2_impl.h | 4 +- .../CGAL/Arrangement_2/Arr_traits_adaptor_2.h | 387 +- .../Arr_traits_adaptor_2_dispatching.h | 28 +- .../Arrangement_2/Arr_with_history_accessor.h | 6 +- .../Arrangement_2/Arrangement_2_iterators.h | 4 +- .../Arrangement_on_surface_2_global.h | 108 +- .../Arrangement_on_surface_2_impl.h | 36 +- .../Arrangement_2/Arrangement_zone_2_impl.h | 263 +- .../Arrangement_2/arrangement_type_traits.h | 14 +- .../CGAL/Arrangement_2/graph_traits_dual.h | 16 +- .../include/CGAL/Arrangement_on_surface_2.h | 75 +- .../Arrangement_on_surface_with_history_2.h | 4 +- .../include/CGAL/Arrangement_with_history_2.h | 4 +- .../CGAL/include/CGAL/Arrangement_zone_2.h | 140 +- .../include/CGAL/BOOST_MP_arithmetic_kernel.h | 4 +- .../include/CGAL/Barycentric_coordinates_2.h | 4 +- .../Delaunay_domain_2.h | 6 +- .../Discrete_harmonic_2.h | 38 +- .../Discrete_harmonic_coordinates_2.h | 4 +- .../Generalized_barycentric_coordinates_2.h | 82 +- .../Harmonic_coordinates_2.h | 4 +- .../Barycentric_coordinates_2/Mean_value_2.h | 38 +- .../Mean_value_coordinates_2.h | 4 +- .../Barycentric_coordinates_2/Wachspress_2.h | 38 +- .../Wachspress_coordinates_2.h | 4 +- .../barycentric_enum_2.h | 4 +- .../boundary_coordinates_2.h | 4 +- .../internal/utils_2.h | 20 +- .../segment_coordinates_2.h | 12 +- .../triangle_coordinates_2.h | 12 +- .../CGAL/include/CGAL/Base_with_time_stamp.h | 41 + thirdparty/CGAL/include/CGAL/Basic_shaders.h | 4 +- thirdparty/CGAL/include/CGAL/Bbox_2.h | 4 +- thirdparty/CGAL/include/CGAL/Bbox_3.h | 4 +- .../include/CGAL/Bigfloat_interval_traits.h | 4 +- .../include/CGAL/Boolean_set_operations_2.h | 4 +- .../Bso_internal_functions.h | 4 +- .../Ccb_curve_iterator.h | 4 +- .../Curve_with_halfedge.h | 4 +- .../Gps_agg_meta_traits.h | 42 +- .../Boolean_set_operations_2/Gps_agg_op.h | 6 +- .../Gps_agg_op_surface_sweep_2.h | 8 +- .../Gps_agg_op_visitor.h | 4 +- .../Gps_base_functor.h | 4 +- .../Gps_bfs_base_visitor.h | 6 +- .../Gps_bfs_intersection_visitor.h | 4 +- .../Gps_bfs_join_visitor.h | 4 +- .../Gps_bfs_scanner.h | 4 +- .../Gps_bfs_xor_visitor.h | 6 +- .../Gps_default_dcel.h | 6 +- .../Gps_default_traits.h | 4 +- .../Gps_difference_functor.h | 4 +- .../Gps_do_intersect_functor.h | 4 +- .../Gps_insertion_meta_traits.h | 4 +- .../Gps_intersection_functor.h | 4 +- .../Gps_join_functor.h | 4 +- .../CGAL/Boolean_set_operations_2/Gps_merge.h | 4 +- .../Gps_on_surface_base_2.h | 16 +- .../Gps_on_surface_base_2_impl.h | 6 +- .../Gps_polygon_simplifier.h | 4 +- .../Gps_polygon_validation.h | 10 +- .../Gps_simplifier_traits.h | 17 +- .../Gps_sym_diff_functor.h | 4 +- .../Gps_traits_adaptor.h | 6 +- .../Gps_traits_decorator.h | 41 +- .../Boolean_set_operations_2/Indexed_event.h | 4 +- .../Point_with_vertex.h | 4 +- .../Polygon_2_curve_iterator.h | 4 +- .../Polygon_conversions.h | 8 +- .../Boolean_set_operations_2/complement.h | 8 +- .../Boolean_set_operations_2/difference.h | 8 +- .../Boolean_set_operations_2/do_intersect.h | 8 +- .../Boolean_set_operations_2/intersection.h | 8 +- .../CGAL/Boolean_set_operations_2/join.h | 8 +- .../Boolean_set_operations_2/oriented_side.h | 8 +- .../symmetric_difference.h | 8 +- thirdparty/CGAL/include/CGAL/Bounded_kernel.h | 4 +- .../include/CGAL/Box_intersection_d/Box_d.h | 4 +- .../CGAL/Box_intersection_d/Box_traits_d.h | 4 +- .../Box_intersection_d/Box_with_handle_d.h | 4 +- .../CGAL/Box_intersection_d/Box_with_info_d.h | 4 +- .../CGAL/Box_intersection_d/box_limits.h | 4 +- .../CGAL/Box_intersection_d/segment_tree.h | 14 +- thirdparty/CGAL/include/CGAL/Buffer_for_vao.h | 45 +- thirdparty/CGAL/include/CGAL/CC_safe_handle.h | 4 +- .../CGAL/include/CGAL/CGAL_Ipelet_base.h | 4 +- .../CGAL/include/CGAL/CGAL_Ipelet_base_v6.h | 35 +- .../CGAL/include/CGAL/CGAL_Ipelet_base_v7.h | 56 +- .../CGAL/CMap_linear_cell_complex_storages.h | 226 +- ..._linear_cell_complex_storages_with_index.h | 557 ++ thirdparty/CGAL/include/CGAL/CORE/BigFloat.h | 6 +- .../CGAL/include/CGAL/CORE/BigFloatRep.h | 10 +- .../CGAL/include/CGAL/CORE/BigFloat_impl.h | 14 +- thirdparty/CGAL/include/CGAL/CORE/BigInt.h | 8 +- thirdparty/CGAL/include/CGAL/CORE/BigRat.h | 8 +- thirdparty/CGAL/include/CGAL/CORE/CORE.h | 6 +- thirdparty/CGAL/include/CGAL/CORE/Config.h | 4 +- thirdparty/CGAL/include/CGAL/CORE/CoreAux.h | 8 +- .../CGAL/include/CGAL/CORE/CoreAux_impl.h | 6 +- thirdparty/CGAL/include/CGAL/CORE/CoreDefs.h | 6 +- .../CGAL/include/CGAL/CORE/CoreDefs_impl.h | 8 +- .../CGAL/include/CGAL/CORE/CoreIO_impl.h | 10 +- thirdparty/CGAL/include/CGAL/CORE/Expr.h | 10 +- thirdparty/CGAL/include/CGAL/CORE/ExprRep.h | 12 +- thirdparty/CGAL/include/CGAL/CORE/Expr_impl.h | 12 +- thirdparty/CGAL/include/CGAL/CORE/Filter.h | 6 +- thirdparty/CGAL/include/CGAL/CORE/Gmp.h | 4 +- thirdparty/CGAL/include/CGAL/CORE/Gmp_impl.h | 4 +- thirdparty/CGAL/include/CGAL/CORE/Impl.h | 4 +- .../CGAL/include/CGAL/CORE/MemoryPool.h | 6 +- thirdparty/CGAL/include/CGAL/CORE/Promote.h | 6 +- thirdparty/CGAL/include/CGAL/CORE/Real.h | 10 +- thirdparty/CGAL/include/CGAL/CORE/RealRep.h | 8 +- thirdparty/CGAL/include/CGAL/CORE/Real_impl.h | 12 +- thirdparty/CGAL/include/CGAL/CORE/RefCount.h | 6 +- thirdparty/CGAL/include/CGAL/CORE/Timer.h | 6 +- thirdparty/CGAL/include/CGAL/CORE/extLong.h | 6 +- .../CGAL/include/CGAL/CORE/extLong_impl.h | 8 +- .../CGAL/include/CGAL/CORE/linearAlgebra.h | 8 +- .../CGAL/include/CGAL/CORE/poly/Curves.h | 10 +- .../CGAL/include/CGAL/CORE/poly/Curves.tcc | 6 +- thirdparty/CGAL/include/CGAL/CORE/poly/Poly.h | 6 +- .../CGAL/include/CGAL/CORE/poly/Poly.tcc | 2 +- .../CGAL/include/CGAL/CORE/poly/Sturm.h | 8 +- thirdparty/CGAL/include/CGAL/CORE_BigFloat.h | 4 +- thirdparty/CGAL/include/CGAL/CORE_BigInt.h | 4 +- thirdparty/CGAL/include/CGAL/CORE_BigRat.h | 4 +- thirdparty/CGAL/include/CGAL/CORE_Expr.h | 10 +- .../CGAL/CORE_algebraic_number_traits.h | 6 +- .../include/CGAL/CORE_arithmetic_kernel.h | 6 +- .../CGAL/include/CGAL/CORE_coercion_traits.h | 6 +- thirdparty/CGAL/include/CGAL/Cache.h | 4 +- thirdparty/CGAL/include/CGAL/Cartesian.h | 4 +- .../CGAL/Cartesian/Aff_transformation_2.h | 4 +- .../CGAL/Cartesian/Aff_transformation_3.h | 4 +- .../CGAL/Cartesian/Aff_transformation_rep_2.h | 4 +- .../CGAL/Cartesian/Aff_transformation_rep_3.h | 4 +- .../include/CGAL/Cartesian/Cartesian_base.h | 4 +- .../CGAL/include/CGAL/Cartesian/Circle_2.h | 4 +- .../CGAL/include/CGAL/Cartesian/Circle_3.h | 4 +- .../CGAL/include/CGAL/Cartesian/ConicCPA2.h | 4 +- .../include/CGAL/Cartesian/Data_accessor_2.h | 4 +- .../CGAL/include/CGAL/Cartesian/Direction_2.h | 4 +- .../CGAL/include/CGAL/Cartesian/Direction_3.h | 4 +- .../CGAL/Cartesian/Is_trivial_construction.h | 466 ++ .../include/CGAL/Cartesian/Iso_cuboid_3.h | 4 +- .../include/CGAL/Cartesian/Iso_rectangle_2.h | 4 +- .../CGAL/include/CGAL/Cartesian/Line_2.h | 4 +- .../CGAL/include/CGAL/Cartesian/Line_3.h | 4 +- .../CGAL/include/CGAL/Cartesian/MatrixC33.h | 17 +- .../CGAL/include/CGAL/Cartesian/Plane_3.h | 4 +- .../CGAL/include/CGAL/Cartesian/Point_2.h | 4 +- .../CGAL/include/CGAL/Cartesian/Point_3.h | 4 +- .../CGAL/include/CGAL/Cartesian/Ray_2.h | 4 +- .../CGAL/include/CGAL/Cartesian/Ray_3.h | 4 +- .../include/CGAL/Cartesian/Reflection_rep_2.h | 4 +- .../include/CGAL/Cartesian/Rotation_rep_2.h | 4 +- .../include/CGAL/Cartesian/Scaling_rep_2.h | 4 +- .../include/CGAL/Cartesian/Scaling_rep_3.h | 4 +- .../CGAL/include/CGAL/Cartesian/Segment_2.h | 4 +- .../CGAL/include/CGAL/Cartesian/Segment_3.h | 4 +- .../CGAL/include/CGAL/Cartesian/Sphere_3.h | 4 +- .../include/CGAL/Cartesian/Tetrahedron_3.h | 4 +- .../CGAL/Cartesian/Translation_rep_2.h | 4 +- .../CGAL/Cartesian/Translation_rep_3.h | 4 +- .../CGAL/include/CGAL/Cartesian/Triangle_2.h | 4 +- .../CGAL/include/CGAL/Cartesian/Triangle_3.h | 4 +- .../CGAL/include/CGAL/Cartesian/Vector_2.h | 4 +- .../CGAL/include/CGAL/Cartesian/Vector_3.h | 4 +- .../include/CGAL/Cartesian/Weighted_point_2.h | 4 +- .../include/CGAL/Cartesian/Weighted_point_3.h | 4 +- .../CGAL/Cartesian/basic_constructions_2.h | 4 +- .../CGAL/Cartesian/basic_constructions_3.h | 4 +- .../CGAL/Cartesian/ft_constructions_2.h | 4 +- .../CGAL/Cartesian/ft_constructions_3.h | 4 +- .../include/CGAL/Cartesian/function_objects.h | 88 +- .../CGAL/Cartesian/line_constructions_2.h | 4 +- .../CGAL/Cartesian/plane_constructions_3.h | 23 +- .../CGAL/Cartesian/point_constructions_2.h | 4 +- .../CGAL/Cartesian/point_constructions_3.h | 4 +- .../Cartesian/predicates_on_directions_2.h | 4 +- .../CGAL/Cartesian/predicates_on_planes_3.h | 4 +- .../CGAL/Cartesian/predicates_on_points_2.h | 4 +- .../CGAL/Cartesian/predicates_on_points_3.h | 4 +- .../CGAL/include/CGAL/Cartesian/solve_3.h | 4 +- .../CGAL/include/CGAL/Cartesian_converter.h | 35 +- .../include/CGAL/Cartesian_converter_fwd.h | 4 +- thirdparty/CGAL/include/CGAL/Cartesian_d.h | 8 +- .../CGAL/include/CGAL/Cartesian_matrix.h | 14 +- thirdparty/CGAL/include/CGAL/Cell_attribute.h | 293 +- .../include/CGAL/Cell_attribute_with_id.h | 10 +- .../include/CGAL/Cell_attribute_with_point.h | 69 +- .../CGAL/Cell_attribute_with_point_and_id.h | 14 +- .../CGAL/include/CGAL/Cell_const_iterators.h | 16 +- thirdparty/CGAL/include/CGAL/Cell_iterators.h | 40 +- .../include/CGAL/Chinese_remainder_traits.h | 4 +- thirdparty/CGAL/include/CGAL/Circle_2.h | 7 +- thirdparty/CGAL/include/CGAL/Circle_3.h | 7 +- thirdparty/CGAL/include/CGAL/Circle_type.h | 4 +- thirdparty/CGAL/include/CGAL/Circular_arc_2.h | 4 +- thirdparty/CGAL/include/CGAL/Circular_arc_3.h | 4 +- .../CGAL/include/CGAL/Circular_arc_point_2.h | 4 +- .../CGAL/include/CGAL/Circular_arc_point_3.h | 4 +- .../CGAL/include/CGAL/Circular_kernel_2.h | 4 +- .../CGAL/Circular_kernel_2/Circular_arc_2.h | 6 +- .../Circular_kernel_2/Circular_arc_point_2.h | 6 +- .../Circular_kernel_2/Intersection_traits.h | 33 +- .../CGAL/Circular_kernel_2/Line_arc_2.h | 4 +- .../function_objects_on_circle_2.h | 4 +- .../function_objects_on_line_2.h | 4 +- .../function_objects_polynomial_circular.h | 6 +- .../CGAL/Circular_kernel_2/interface_macros.h | 8 +- .../internal_functions_on_circle_2.h | 12 +- .../internal_functions_on_circular_arc_2.h | 234 +- .../internal_functions_on_line_2.h | 4 +- .../internal_functions_on_line_arc_2.h | 87 +- .../intersection_line_2_circle_2_map.h | 4 +- .../CGAL/Circular_kernel_3/Circular_arc_3.h | 14 +- .../Circular_kernel_3/Circular_arc_point_3.h | 28 +- .../Circular_kernel_3/Intersection_traits.h | 50 +- .../CGAL/Circular_kernel_3/Line_arc_3.h | 16 +- .../function_objects_polynomial_sphere.h | 6 +- .../get_equation_object_on_curved_kernel_3.h | 4 +- .../CGAL/Circular_kernel_3/interface_macros.h | 8 +- ...ternal_function_compare_spherical_kernel.h | 4 +- ...nction_compare_to_right_spherical_kernel.h | 4 +- ...nternal_function_has_on_spherical_kernel.h | 4 +- .../internal_functions_on_circle_3.h | 4 +- .../internal_functions_on_circular_arc_3.h | 56 +- ...ternal_functions_on_circular_arc_point_3.h | 4 +- .../internal_functions_on_line_3.h | 4 +- .../internal_functions_on_line_arc_3.h | 37 +- .../internal_functions_on_plane_3.h | 4 +- .../internal_functions_on_sphere_3.h | 83 +- .../include/CGAL/Circular_kernel_converter.h | 4 +- .../CGAL/Circular_kernel_intersections.h | 4 +- .../Circular_kernel_type_equality_wrapper.h | 4 +- .../CGAL/Circulator/Circulator_adapters.h | 4 +- .../CGAL/Circulator/Circulator_concepts.h | 4 +- .../Safe_circulator_from_iterator.h | 12 +- .../CGAL/include/CGAL/Circulator_identity.h | 4 +- .../CGAL/include/CGAL/Circulator_on_node.h | 4 +- .../CGAL/include/CGAL/Circulator_project.h | 4 +- thirdparty/CGAL/include/CGAL/Classification.h | 4 +- .../include/CGAL/Classification/Cluster.h | 4 +- .../ETHZ/Random_forest_classifier.h | 6 +- .../Classification/ETHZ/internal/dataview.h | 4 +- .../random-forest/common-libraries.hpp | 19 +- .../ETHZ/internal/random-forest/forest.hpp | 6 +- .../ETHZ/internal/random-forest/node-gini.hpp | 4 +- .../ETHZ/internal/random-forest/node.hpp | 4 +- .../ETHZ/internal/random-forest/tree.hpp | 4 +- .../include/CGAL/Classification/Evaluation.h | 4 +- .../Feature/Cluster_mean_of_feature.h | 4 +- .../Classification/Feature/Cluster_size.h | 4 +- .../Feature/Cluster_variance_of_feature.h | 4 +- .../Feature/Cluster_vertical_extent.h | 4 +- .../Classification/Feature/Color_channel.h | 4 +- .../Feature/Distance_to_plane.h | 4 +- .../Classification/Feature/Echo_scatter.h | 4 +- .../CGAL/Classification/Feature/Eigenvalue.h | 4 +- .../CGAL/Classification/Feature/Elevation.h | 4 +- .../Feature/Gradient_of_feature.h | 6 +- .../Classification/Feature/Height_above.h | 4 +- .../Classification/Feature/Height_below.h | 4 +- .../Classification/Feature/Simple_feature.h | 4 +- .../Feature/Vertical_dispersion.h | 4 +- .../Classification/Feature/Vertical_range.h | 4 +- .../CGAL/Classification/Feature/Verticality.h | 4 +- .../CGAL/Classification/Feature_base.h | 6 +- .../include/CGAL/Classification/Feature_set.h | 4 +- .../CGAL/include/CGAL/Classification/Image.h | 14 +- .../CGAL/include/CGAL/Classification/Label.h | 6 +- .../include/CGAL/Classification/Label_set.h | 4 +- .../Classification/Local_eigen_analysis.h | 10 +- .../Classification/Mesh_feature_generator.h | 4 +- .../CGAL/Classification/Mesh_neighborhood.h | 8 +- .../OpenCV/Random_forest_classifier.h | 6 +- .../CGAL/Classification/Planimetric_grid.h | 4 +- .../Point_set_feature_generator.h | 4 +- .../Classification/Point_set_neighborhood.h | 10 +- .../Sum_of_weighted_features_classifier.h | 8 +- .../include/CGAL/Classification/classify.h | 4 +- .../CGAL/Classification/compressed_float.h | 4 +- .../CGAL/Classification/internal/verbosity.h | 4 +- .../CGAL/Classification/property_maps.h | 8 +- .../CGAL/include/CGAL/Coercion_traits.h | 12 +- .../include/CGAL/Combination_enumerator.h | 4 +- .../CGAL/include/CGAL/Combinatorial_map.h | 1096 ++-- .../Combinatorial_map_copy_functors.h | 160 +- .../Combinatorial_map_group_functors.h | 464 +- .../Combinatorial_map_internal_functors.h | 275 +- .../internal/Combinatorial_map_sewable.h | 52 +- .../internal/Combinatorial_map_utility.h | 124 +- .../CGAL/Combinatorial_map_basic_operations.h | 82 +- .../include/CGAL/Combinatorial_map_functors.h | 20 +- .../CGAL/include/CGAL/Combinatorial_map_fwd.h | 60 +- .../CGAL/Combinatorial_map_iterators_base.h | 227 +- .../CGAL/Combinatorial_map_operations.h | 150 +- .../CGAL/Combinatorial_map_save_load.h | 77 +- .../include/CGAL/Combinatorial_map_storages.h | 206 +- .../Combinatorial_map_storages_with_index.h | 522 ++ .../CGAL/include/CGAL/Compact_container.h | 41 +- .../CGAL/Compact_container_with_index.h | 1030 ++++ .../include/CGAL/Compact_mesh_cell_base_3.h | 99 +- .../Compact_simplicial_mesh_cell_base_3.h | 391 ++ ...mpare_handles_with_or_without_timestamps.h | 4 +- .../CGAL/Complex_2_in_triangulation_3.h | 6 +- .../Complex_2_in_triangulation_cell_base_3.h | 4 +- ...Complex_2_in_triangulation_vertex_base_3.h | 4 +- .../CGAL/include/CGAL/Complexity_tags.h | 4 +- .../CGAL/include/CGAL/Compute_anchor_3.h | 4 +- .../include/CGAL/Compute_cone_boundaries_2.h | 4 +- .../CGAL/include/CGAL/Concatenate_iterator.h | 4 +- .../CGAL/Concurrent_compact_container.h | 15 +- .../Cone_spanners_2/Less_by_direction_2.h | 4 +- .../CGAL/Cone_spanners_2/Plane_scan_tree.h | 4 +- .../Cone_spanners_2/Plane_scan_tree_impl.h | 8 +- .../CGAL/include/CGAL/Cone_spanners_enum_2.h | 4 +- thirdparty/CGAL/include/CGAL/Conic_2.h | 4 +- .../Constrained_Delaunay_triangulation_2.h | 61 +- ...ained_Delaunay_triangulation_face_base_2.h | 6 +- .../CGAL/Constrained_triangulation_2.h | 122 +- .../Constrained_triangulation_face_base_2.h | 8 +- .../CGAL/Constrained_triangulation_plus_2.h | 90 +- .../CGAL/Constrained_voronoi_diagram_2.h | 15 +- .../include/CGAL/Construct_theta_graph_2.h | 6 +- .../CGAL/include/CGAL/Construct_yao_graph_2.h | 6 +- .../CGAL/include/CGAL/Container_helper.h | 24 +- .../include/CGAL/Converting_construction.h | 64 + .../CGAL/Convex_decomposition_3/Edge_sorter.h | 4 +- .../External_structure_builder.h | 5 +- .../Insert_vertex_into_edge.h | 4 +- .../Ray_hit_generator.h | 5 +- .../Ray_hit_generator2.h | 4 +- .../Reflex_edge_searcher.h | 4 +- .../Reflex_vertex_searcher.h | 4 +- .../Convex_decomposition_3/SFace_separator.h | 7 +- .../CGAL/Convex_decomposition_3/SM_walls.h | 6 +- .../Single_wall_creator.h | 4 +- .../Single_wall_creator2.h | 8 +- .../Single_wall_creator3.h | 8 +- .../YVertical_wall_builder.h | 9 +- .../Convex_decomposition_3/is_reflex_sedge.h | 6 +- .../Convex_hull_2/ch_akl_toussaint_impl.h | 16 +- .../CGAL/Convex_hull_2/ch_bykat_impl.h | 97 +- .../include/CGAL/Convex_hull_2/ch_eddy_impl.h | 46 +- .../Convex_hull_2/ch_graham_andrew_impl.h | 32 +- .../CGAL/Convex_hull_2/ch_jarvis_impl.h | 28 +- .../CGAL/Convex_hull_2/ch_melkman_impl.h | 30 +- .../ch_selected_extreme_points_2_impl.h | 4 +- .../Convex_hull_2/convexity_check_2_impl.h | 6 +- .../dual/Convex_hull_traits_dual_2.h | 22 +- .../dual/Convex_hull_traits_dual_3.h | 4 +- .../dual/halfspace_intersection_3.h | 32 +- .../halfspace_intersection_interior_point_3.h | 14 +- ...fspace_intersection_with_constructions_3.h | 20 +- .../CGAL/Convex_hull_3/dual/predicates.h | 4 +- .../internal/Indexed_triangle_set.h | 4 +- thirdparty/CGAL/include/CGAL/Convex_hull_d.h | 10 +- .../CGAL/Convex_hull_d_to_polyhedron_3.h | 6 +- .../include/CGAL/Convex_hull_d_traits_3.h | 4 +- .../include/CGAL/Convex_hull_face_base_2.h | 4 +- .../CGAL/include/CGAL/Convex_hull_traits_3.h | 6 +- .../CGAL/Convex_hull_traits_adapter_2.h | 23 +- .../include/CGAL/Convex_hull_vertex_base_2.h | 7 +- thirdparty/CGAL/include/CGAL/Counted_number.h | 4 +- .../CGAL/include/CGAL/Counting_iterator.h | 4 +- .../CGAL/Curved_kernel_via_analysis_2/Arc_2.h | 41 +- .../Curve_interval_arcno_cache.h | 11 +- .../Curve_renderer_facade.h | 22 +- .../Curved_kernel_via_analysis_2_functors.h | 25 +- .../Curved_kernel_via_analysis_2_impl.h | 11 +- .../Fig_stream_Curve_renderer_2.h | 6 +- ...ltered_curved_kernel_via_analysis_2_impl.h | 11 +- .../Generic_arc_2.h | 15 +- .../Generic_point_2.h | 15 +- .../Make_x_monotone_2.h | 19 +- .../Non_x_monotone_arc_2.h | 9 +- .../Curved_kernel_via_analysis_2/Point_2.h | 48 +- .../Sweep_curves_adapter_2.h | 19 +- .../gfx/Curve_renderer_2.h | 48 +- .../gfx/Curve_renderer_internals.h | 21 +- .../gfx/Curve_renderer_traits.h | 11 +- .../gfx/Subdivision_1.h | 11 +- .../gfx/Subdivision_2.h | 15 +- .../test/simple_models.h | 15 +- .../include/CGAL/Curves_on_surface_topology.h | 16 +- thirdparty/CGAL/include/CGAL/Dart.h | 191 +- .../CGAL/include/CGAL/Dart_const_iterators.h | 50 +- thirdparty/CGAL/include/CGAL/Dart_iterators.h | 434 +- thirdparty/CGAL/include/CGAL/Default.h | 4 +- .../include/CGAL/Default_diagonalize_traits.h | 6 +- ...ormation_Eigen_closest_rotation_traits_3.h | 8 +- ...on_Eigen_polar_closest_rotation_traits_3.h | 8 +- thirdparty/CGAL/include/CGAL/Delaunay_d.h | 6 +- .../CGAL/Delaunay_mesh_area_criteria_2.h | 4 +- .../include/CGAL/Delaunay_mesh_criteria_2.h | 4 +- .../include/CGAL/Delaunay_mesh_face_base_2.h | 7 +- .../Delaunay_mesh_local_size_criteria_2.h | 4 +- .../CGAL/Delaunay_mesh_size_criteria_2.h | 4 +- .../CGAL/Delaunay_mesh_vertex_base_2.h | 4 +- .../CGAL/include/CGAL/Delaunay_mesher_2.h | 75 +- .../Delaunay_mesher_no_edge_refinement_2.h | 18 +- .../include/CGAL/Delaunay_triangulation.h | 14 +- .../include/CGAL/Delaunay_triangulation_2.h | 88 +- .../include/CGAL/Delaunay_triangulation_3.h | 120 +- ...unay_triangulation_adaptation_policies_2.h | 4 +- ...launay_triangulation_adaptation_traits_2.h | 4 +- .../CGAL/Delaunay_triangulation_cell_base_3.h | 7 +- ...angulation_cell_base_with_circumcenter_3.h | 6 +- .../CGAL/Delaunay_triangulation_on_sphere_2.h | 75 +- ...gulation_on_sphere_adaptation_policies_2.h | 4 +- ...angulation_on_sphere_adaptation_traits_2.h | 4 +- ...elaunay_triangulation_on_sphere_traits_2.h | 10 +- .../CGAL/include/CGAL/Diagonalize_traits.h | 6 +- thirdparty/CGAL/include/CGAL/Dimension.h | 4 +- thirdparty/CGAL/include/CGAL/Direction_2.h | 7 +- thirdparty/CGAL/include/CGAL/Direction_3.h | 7 +- .../include/CGAL/Distance_2/Line_2_Line_2.h | 4 +- .../CGAL/Distance_2/Line_2_Triangle_2.h | 4 +- .../include/CGAL/Distance_2/Point_2_Line_2.h | 4 +- .../include/CGAL/Distance_2/Point_2_Point_2.h | 4 +- .../include/CGAL/Distance_2/Point_2_Ray_2.h | 4 +- .../CGAL/Distance_2/Point_2_Segment_2.h | 4 +- .../CGAL/Distance_2/Point_2_Triangle_2.h | 4 +- .../include/CGAL/Distance_2/Ray_2_Line_2.h | 4 +- .../include/CGAL/Distance_2/Ray_2_Ray_2.h | 4 +- .../CGAL/Distance_2/Ray_2_Triangle_2.h | 4 +- .../CGAL/Distance_2/Segment_2_Line_2.h | 4 +- .../include/CGAL/Distance_2/Segment_2_Ray_2.h | 4 +- .../CGAL/Distance_2/Segment_2_Segment_2.h | 4 +- .../CGAL/Distance_2/Segment_2_Triangle_2.h | 4 +- .../CGAL/Distance_2/Triangle_2_Triangle_2.h | 4 +- .../internal/squared_distance_utils_2.h | 4 +- .../include/CGAL/Distance_3/Line_3_Line_3.h | 4 +- .../include/CGAL/Distance_3/Line_3_Plane_3.h | 4 +- .../include/CGAL/Distance_3/Plane_3_Plane_3.h | 4 +- .../include/CGAL/Distance_3/Point_3_Line_3.h | 4 +- .../include/CGAL/Distance_3/Point_3_Plane_3.h | 4 +- .../include/CGAL/Distance_3/Point_3_Point_3.h | 4 +- .../include/CGAL/Distance_3/Point_3_Ray_3.h | 4 +- .../CGAL/Distance_3/Point_3_Segment_3.h | 4 +- .../CGAL/Distance_3/Point_3_Tetrahedron_3.h | 4 +- .../CGAL/Distance_3/Point_3_Triangle_3.h | 4 +- .../Distance_3/Point_3_Weighted_point_3.h | 4 +- .../include/CGAL/Distance_3/Ray_3_Line_3.h | 4 +- .../include/CGAL/Distance_3/Ray_3_Plane_3.h | 4 +- .../include/CGAL/Distance_3/Ray_3_Ray_3.h | 4 +- .../CGAL/Distance_3/Segment_3_Line_3.h | 4 +- .../CGAL/Distance_3/Segment_3_Plane_3.h | 4 +- .../include/CGAL/Distance_3/Segment_3_Ray_3.h | 4 +- .../CGAL/Distance_3/Segment_3_Segment_3.h | 4 +- .../CGAL/Distance_3/Triangle_3_Triangle_3.h | 4 +- .../Weighted_point_3_Weighted_point_3.h | 4 +- .../internal/squared_distance_utils_3.h | 4 +- thirdparty/CGAL/include/CGAL/Double_map.h | 4 +- thirdparty/CGAL/include/CGAL/Dummy_tds_2.h | 4 +- thirdparty/CGAL/include/CGAL/Dynamic_matrix.h | 18 +- .../CGAL/include/CGAL/Dynamic_property_map.h | 12 +- .../include/CGAL/Eigen_diagonalize_traits.h | 8 +- thirdparty/CGAL/include/CGAL/Eigen_matrix.h | 8 +- .../CGAL/include/CGAL/Eigen_solver_traits.h | 13 +- .../CGAL/include/CGAL/Eigen_sparse_matrix.h | 18 +- thirdparty/CGAL/include/CGAL/Eigen_svd.h | 6 +- thirdparty/CGAL/include/CGAL/Eigen_vector.h | 9 +- thirdparty/CGAL/include/CGAL/Enum_converter.h | 4 +- .../CGAL/include/CGAL/Env_default_diagram_1.h | 4 +- .../CGAL/include/CGAL/Env_plane_traits_3.h | 92 +- .../CGAL/include/CGAL/Env_sphere_traits_3.h | 741 ++- .../include/CGAL/Env_surface_data_traits_3.h | 10 +- .../CGAL/include/CGAL/Env_tracing_traits_3.h | 20 +- .../CGAL/include/CGAL/Env_triangle_traits_3.h | 290 +- .../Envelope_2/Env_divide_and_conquer_2.h | 16 +- .../Env_divide_and_conquer_2_impl.h | 127 +- .../Envelope_3/Env_plane_traits_3_functions.h | 142 +- .../include/CGAL/Envelope_3/Envelope_base.h | 4 +- .../Envelope_diagram_on_surface_2.h | 8 +- .../Envelope_divide_and_conquer_3.h | 41 +- .../Envelope_3/Envelope_element_visitor_3.h | 115 +- .../CGAL/Envelope_3/Envelope_overlay_2.h | 4 +- .../Envelope_3/Envelope_overlay_functor.h | 4 +- .../CGAL/Envelope_3/Envelope_pm_dcel.h | 4 +- .../include/CGAL/Envelope_3/set_dividors.h | 6 +- .../CGAL/include/CGAL/Envelope_diagram_1.h | 4 +- thirdparty/CGAL/include/CGAL/Epeck_d.h | 4 +- thirdparty/CGAL/include/CGAL/Epic_converter.h | 4 +- thirdparty/CGAL/include/CGAL/Epick_d.h | 4 +- .../CGAL/include/CGAL/Euclidean_distance.h | 4 +- .../CGAL/Euclidean_distance_sphere_point.h | 4 +- .../CGAL/include/CGAL/Euler_integrator_2.h | 4 +- .../CGAL/include/CGAL/Exact_algebraic.h | 9 +- .../include/CGAL/Exact_circular_kernel_2.h | 4 +- thirdparty/CGAL/include/CGAL/Exact_integer.h | 51 +- .../CGAL/include/CGAL/Exact_kernel_selector.h | 4 +- ...ct_predicates_exact_constructions_kernel.h | 4 +- ...exact_constructions_kernel_with_kth_root.h | 4 +- ..._exact_constructions_kernel_with_root_of.h | 4 +- ...tes_exact_constructions_kernel_with_sqrt.h | 4 +- ..._predicates_inexact_constructions_kernel.h | 65 +- thirdparty/CGAL/include/CGAL/Exact_rational.h | 16 +- .../include/CGAL/Exact_spherical_kernel_3.h | 4 +- .../CGAL/include/CGAL/Exponent_vector.h | 8 +- .../CGAL/include/CGAL/Extended_cartesian.h | 4 +- .../CGAL/include/CGAL/Extended_homogeneous.h | 4 +- .../include/CGAL/Extremal_polygon_traits_2.h | 14 +- .../CGAL/Extreme_points_traits_adapter_3.h | 10 +- thirdparty/CGAL/include/CGAL/FPU.h | 20 +- thirdparty/CGAL/include/CGAL/FPU_extension.h | 4 +- thirdparty/CGAL/include/CGAL/FPU_gcc_i386.h | 4 +- .../CGAL/include/CGAL/FPU_gcc_i386_sse2.h | 4 +- thirdparty/CGAL/include/CGAL/FPU_msvc.h | 4 +- .../CGAL/include/CGAL/Face_graph_wrapper.h | 156 +- .../CGAL/include/CGAL/Filter_circulator.h | 4 +- .../CGAL/Filtered_bbox_circular_kernel_2.h | 4 +- .../bbox_filtered_predicates.h | 4 +- .../interface_macros.h | 8 +- .../CGAL/include/CGAL/Filtered_construction.h | 4 +- .../CGAL/Filtered_extended_homogeneous.h | 4 +- .../CGAL/include/CGAL/Filtered_kernel.h | 21 +- .../Cartesian_coordinate_iterator_2.h | 14 +- .../Cartesian_coordinate_iterator_3.h | 14 +- .../internal/Static_filters/Angle_3.h | 6 +- .../internal/Static_filters/Collinear_3.h | 4 +- .../Static_filters/Compare_distance_3.h | 4 +- .../Static_filters/Compare_squared_radius_3.h | 4 +- .../Compare_weighted_squared_radius_3.h | 4 +- .../internal/Static_filters/Compare_x_2.h | 4 +- .../internal/Static_filters/Compare_y_2.h | 4 +- .../Static_filters/Compare_y_at_x_2.h | 4 +- .../internal/Static_filters/Coplanar_3.h | 4 +- .../Static_filters/Coplanar_orientation_3.h | 4 +- .../Coplanar_side_of_bounded_circle_3.h | 4 +- .../internal/Static_filters/Do_intersect_2.h | 4 +- .../internal/Static_filters/Do_intersect_3.h | 6 +- .../internal/Static_filters/Equal_2.h | 4 +- .../internal/Static_filters/Equal_3.h | 4 +- .../internal/Static_filters/Is_degenerate_3.h | 4 +- .../internal/Static_filters/Orientation_2.h | 4 +- .../internal/Static_filters/Orientation_3.h | 4 +- .../Power_side_of_oriented_power_circle_2.h | 329 ++ .../Power_side_of_oriented_power_sphere_3.h | 241 +- .../Side_of_oriented_circle_2.h | 4 +- .../Side_of_oriented_sphere_3.h | 4 +- .../Static_filters/Static_filter_error.h | 6 +- .../internal/Static_filters/Static_filters.h | 10 +- .../internal/Static_filters/tools.h | 4 +- .../CGAL/include/CGAL/Filtered_kernel_d.h | 4 +- .../CGAL/include/CGAL/Filtered_kernel_fwd.h | 4 +- .../CGAL/include/CGAL/Filtered_predicate.h | 87 +- .../CGAL/Filtered_predicate_with_state.h | 8 +- .../CGAL/include/CGAL/Fixed_alpha_shape_3.h | 13 +- .../CGAL/Fixed_alpha_shape_cell_base_3.h | 4 +- .../CGAL/Fixed_alpha_shape_vertex_base_3.h | 4 +- .../CGAL/include/CGAL/Flattening_iterator.h | 4 +- thirdparty/CGAL/include/CGAL/Fourtuple.h | 4 +- .../CGAL/include/CGAL/Fraction_traits.h | 4 +- thirdparty/CGAL/include/CGAL/Fuzzy_iso_box.h | 24 +- thirdparty/CGAL/include/CGAL/Fuzzy_sphere.h | 12 +- .../CGAL/GLPK_mixed_integer_program_traits.h | 6 +- thirdparty/CGAL/include/CGAL/GMP/Gmpfi_type.h | 8 +- .../CGAL/include/CGAL/GMP/Gmpfi_type_static.h | 4 +- thirdparty/CGAL/include/CGAL/GMP/Gmpfr_type.h | 10 +- .../CGAL/include/CGAL/GMP/Gmpfr_type_static.h | 4 +- thirdparty/CGAL/include/CGAL/GMP/Gmpq_type.h | 4 +- thirdparty/CGAL/include/CGAL/GMP/Gmpz_type.h | 8 +- thirdparty/CGAL/include/CGAL/GMP/Gmpzf_type.h | 12 +- .../include/CGAL/GMPXX_arithmetic_kernel.h | 4 +- .../CGAL/include/CGAL/GMP_arithmetic_kernel.h | 4 +- .../include/CGAL/GMap_cell_const_iterators.h | 16 +- .../CGAL/include/CGAL/GMap_cell_iterators.h | 32 +- .../include/CGAL/GMap_dart_const_iterators.h | 40 +- .../CGAL/include/CGAL/GMap_dart_iterators.h | 216 +- .../CGAL/GMap_linear_cell_complex_storages.h | 215 +- ..._linear_cell_complex_storages_with_index.h | 500 ++ .../CGAL/include/CGAL/General_polygon_2.h | 5 +- .../CGAL/include/CGAL/General_polygon_set_2.h | 6 +- .../CGAL/General_polygon_set_on_surface_2.h | 6 +- .../CGAL/General_polygon_with_holes_2.h | 37 +- .../CGAL/include/CGAL/Generalized_map.h | 945 ++-- .../internal/Generalized_map_group_functors.h | 186 +- .../Generalized_map_internal_functors.h | 50 +- .../internal/Generalized_map_sewable.h | 12 +- .../CGAL/include/CGAL/Generalized_map_fwd.h | 60 +- .../CGAL/Generalized_map_iterators_base.h | 29 +- .../include/CGAL/Generalized_map_operations.h | 70 +- .../include/CGAL/Generalized_map_save_load.h | 12 +- .../include/CGAL/Generalized_map_storages.h | 197 +- .../Generalized_map_storages_with_index.h | 467 ++ .../internal/Generic_random_point_generator.h | 8 +- .../CGAL/include/CGAL/Generic_map_min_items.h | 4 +- .../CGAL/Geographical_coordinates_traits_2.h | 6 +- .../CGAL/include/CGAL/Get_arithmetic_kernel.h | 4 +- .../CGAL/include/CGAL/Gmp_coercion_traits.h | 4 +- thirdparty/CGAL/include/CGAL/Gmpfi.h | 4 +- thirdparty/CGAL/include/CGAL/Gmpfr.h | 4 +- thirdparty/CGAL/include/CGAL/Gmpq.h | 4 +- thirdparty/CGAL/include/CGAL/Gmpz.h | 4 +- thirdparty/CGAL/include/CGAL/Gmpzf.h | 4 +- .../CGAL/Gps_circle_segment_traits_2.h | 4 +- .../CGAL/include/CGAL/Gps_segment_traits_2.h | 4 +- thirdparty/CGAL/include/CGAL/Gps_traits_2.h | 4 +- .../CGAL/include/CGAL/Gray_level_image_3.h | 4 +- .../include/CGAL/HalfedgeDS_const_decorator.h | 4 +- .../CGAL/include/CGAL/HalfedgeDS_decorator.h | 13 +- .../CGAL/include/CGAL/HalfedgeDS_default.h | 4 +- .../CGAL/include/CGAL/HalfedgeDS_face_base.h | 4 +- .../CGAL/HalfedgeDS_face_max_base_with_id.h | 4 +- .../include/CGAL/HalfedgeDS_face_min_base.h | 4 +- .../include/CGAL/HalfedgeDS_halfedge_base.h | 4 +- .../HalfedgeDS_halfedge_max_base_with_id.h | 4 +- .../CGAL/HalfedgeDS_halfedge_min_base.h | 4 +- .../CGAL/include/CGAL/HalfedgeDS_items_2.h | 4 +- .../include/CGAL/HalfedgeDS_items_decorator.h | 4 +- .../CGAL/include/CGAL/HalfedgeDS_iterator.h | 4 +- .../CGAL/HalfedgeDS_iterator_adaptor.h | 8 +- .../CGAL/include/CGAL/HalfedgeDS_list.h | 4 +- .../CGAL/include/CGAL/HalfedgeDS_min_items.h | 4 +- .../CGAL/include/CGAL/HalfedgeDS_vector.h | 8 +- .../include/CGAL/HalfedgeDS_vertex_base.h | 4 +- .../CGAL/HalfedgeDS_vertex_max_base_with_id.h | 4 +- .../include/CGAL/HalfedgeDS_vertex_min_base.h | 4 +- thirdparty/CGAL/include/CGAL/Handle.h | 7 +- thirdparty/CGAL/include/CGAL/Handle_for.h | 6 +- .../CGAL/include/CGAL/Handle_for_virtual.h | 4 +- .../CGAL/include/CGAL/Handle_hash_function.h | 4 +- .../CGAL/include/CGAL/Handle_with_policy.h | 34 +- thirdparty/CGAL/include/CGAL/Has_conversion.h | 16 +- thirdparty/CGAL/include/CGAL/Has_member.h | 4 +- thirdparty/CGAL/include/CGAL/Has_timestamp.h | 4 +- .../CGAL/Hash_map/internal/chained_map.h | 4 +- .../Surface_mesh_geodesic_distances_3.h | 76 +- .../Intrinsic_Delaunay_triangulation_3.h | 77 +- .../include/CGAL/Heat_method_3/internal/V2V.h | 4 +- .../include/CGAL/Hidden_point_memory_policy.h | 4 +- .../CGAL/include/CGAL/Hilbert_policy_tags.h | 4 +- thirdparty/CGAL/include/CGAL/Hilbert_sort_2.h | 4 +- thirdparty/CGAL/include/CGAL/Hilbert_sort_3.h | 4 +- .../CGAL/include/CGAL/Hilbert_sort_base.h | 4 +- thirdparty/CGAL/include/CGAL/Hilbert_sort_d.h | 4 +- .../CGAL/include/CGAL/Hilbert_sort_median_2.h | 10 +- .../CGAL/include/CGAL/Hilbert_sort_median_3.h | 10 +- .../CGAL/include/CGAL/Hilbert_sort_median_d.h | 4 +- .../CGAL/include/CGAL/Hilbert_sort_middle_2.h | 4 +- .../CGAL/include/CGAL/Hilbert_sort_middle_3.h | 4 +- .../include/CGAL/Hilbert_sort_middle_base.h | 4 +- .../CGAL/include/CGAL/Hilbert_sort_middle_d.h | 4 +- .../include/CGAL/Hilbert_sort_on_sphere_3.h | 4 +- thirdparty/CGAL/include/CGAL/Homogeneous.h | 4 +- .../CGAL/Homogeneous/Aff_transformationH2.h | 4 +- .../CGAL/Homogeneous/Aff_transformationH3.h | 4 +- .../CGAL/include/CGAL/Homogeneous/CircleH2.h | 4 +- .../CGAL/include/CGAL/Homogeneous/ConicHPA2.h | 4 +- .../CGAL/Homogeneous/Data_accessorH2.h | 4 +- .../include/CGAL/Homogeneous/DirectionH2.h | 4 +- .../include/CGAL/Homogeneous/DirectionH3.h | 4 +- .../CGAL/Homogeneous/Homogeneous_base.h | 4 +- .../include/CGAL/Homogeneous/Iso_cuboidH3.h | 4 +- .../CGAL/Homogeneous/Iso_rectangleH2.h | 4 +- .../CGAL/include/CGAL/Homogeneous/LineH2.h | 4 +- .../CGAL/include/CGAL/Homogeneous/PlaneH3.h | 33 +- .../CGAL/include/CGAL/Homogeneous/PointH2.h | 12 +- .../CGAL/include/CGAL/Homogeneous/PointH3.h | 13 +- .../CGAL/include/CGAL/Homogeneous/RayH3.h | 4 +- .../CGAL/include/CGAL/Homogeneous/SphereH3.h | 4 +- .../CGAL/include/CGAL/Homogeneous/VectorH2.h | 14 +- .../CGAL/include/CGAL/Homogeneous/VectorH3.h | 16 +- .../CGAL/Homogeneous/Weighted_point_2.h | 4 +- .../CGAL/Homogeneous/Weighted_point_3.h | 4 +- .../CGAL/Homogeneous/basic_constructionsH2.h | 4 +- .../CGAL/Homogeneous/basic_constructionsH3.h | 4 +- .../CGAL/Homogeneous/distance_predicatesH2.h | 4 +- .../CGAL/Homogeneous/distance_predicatesH3.h | 4 +- .../CGAL/Homogeneous/function_objects.h | 6 +- .../Homogeneous/predicates_on_directionsH2.h | 4 +- .../CGAL/Homogeneous/predicates_on_pointsH2.h | 4 +- .../CGAL/Homogeneous/predicates_on_pointsH3.h | 4 +- .../CGAL/include/CGAL/Homogeneous_converter.h | 6 +- thirdparty/CGAL/include/CGAL/Homogeneous_d.h | 24 +- thirdparty/CGAL/include/CGAL/Hyperbola_2.h | 4 +- .../CGAL/include/CGAL/Hyperbola_ray_2.h | 4 +- .../CGAL/include/CGAL/Hyperbola_segment_2.h | 4 +- .../Hyperbolic_Delaunay_triangulation_2.h | 548 +- ...bolic_Delaunay_triangulation_CK_traits_2.h | 56 +- ...perbolic_Delaunay_triangulation_traits_2.h | 46 +- .../CGAL/Hyperbolic_octagon_translation.h | 4 +- .../internal/Exact_complex.h | 4 +- ...elaunay_triangulation_traits_2_functions.h | 49 +- .../Hyperbolic_triangulation_face_base_2.h | 45 +- .../CGAL/include/CGAL/IEEE_754_unions.h | 4 +- thirdparty/CGAL/include/CGAL/IO/3MF.h | 10 +- .../CGAL/include/CGAL/IO/3MF/read_3mf.h | 4 +- .../CGAL/include/CGAL/IO/3MF/write_3mf.h | 4 +- .../CGAL/include/CGAL/IO/Arr_iostream.h | 4 +- .../CGAL/include/CGAL/IO/Arr_text_formatter.h | 60 +- .../CGAL/IO/Arr_with_history_2_reader.h | 4 +- .../CGAL/IO/Arr_with_history_2_writer.h | 4 +- .../CGAL/IO/Arr_with_history_iostream.h | 4 +- .../CGAL/IO/Arr_with_history_text_formatter.h | 4 +- .../include/CGAL/IO/Arrangement_2_reader.h | 8 +- .../include/CGAL/IO/Arrangement_2_writer.h | 8 +- thirdparty/CGAL/include/CGAL/IO/Color.h | 28 +- ...Complex_2_in_triangulation_3_file_writer.h | 4 +- ..._2_in_triangulation_3_polyhedron_builder.h | 4 +- .../Complex_2_in_triangulation_3_to_medit.h | 4 +- .../IO/Complex_2_in_triangulation_3_to_vtk.h | 4 +- .../IO/Complex_3_in_triangulation_3_to_vtk.h | 4 +- .../CGAL/include/CGAL/IO/Dxf_bsop_reader.h | 38 +- thirdparty/CGAL/include/CGAL/IO/Dxf_reader.h | 6 +- .../CGAL/include/CGAL/IO/Dxf_reader_doubles.h | 7 +- .../CGAL/include/CGAL/IO/Dxf_variant_reader.h | 10 +- thirdparty/CGAL/include/CGAL/IO/Fig_stream.h | 14 +- .../include/CGAL/IO/Fig_stream_Conic_arc_2.h | 4 +- thirdparty/CGAL/include/CGAL/IO/File_avizo.h | 398 +- .../CGAL/include/CGAL/IO/File_binary_mesh_3.h | 38 +- thirdparty/CGAL/include/CGAL/IO/File_maya.h | 6 +- thirdparty/CGAL/include/CGAL/IO/File_medit.h | 403 +- thirdparty/CGAL/include/CGAL/IO/File_poly.h | 6 +- thirdparty/CGAL/include/CGAL/IO/File_tetgen.h | 30 +- thirdparty/CGAL/include/CGAL/IO/GOCAD.h | 14 +- .../CGAL/include/CGAL/IO/Generic_writer.h | 4 +- .../CGAL/include/CGAL/IO/Gps_iostream.h | 61 +- .../CGAL/include/CGAL/IO/Istream_iterator.h | 6 +- .../CGAL/IO/Nef_polyhedron_2_PS_stream.h | 4 +- .../CGAL/IO/Nef_polyhedron_iostream_3.h | 4 +- thirdparty/CGAL/include/CGAL/IO/OBJ.h | 51 +- .../CGAL/IO/OBJ/File_writer_wavefront.h | 4 +- thirdparty/CGAL/include/CGAL/IO/OFF.h | 14 +- .../include/CGAL/IO/OFF/File_header_OFF.h | 10 +- .../CGAL/IO/OFF/File_header_OFF_impl.h | 6 +- .../CGAL/IO/OFF/File_header_extended_OFF.h | 4 +- .../IO/OFF/File_header_extended_OFF_impl.h | 4 +- .../include/CGAL/IO/OFF/File_scanner_OFF.h | 14 +- .../include/CGAL/IO/OFF/File_writer_OFF.h | 8 +- .../CGAL/include/CGAL/IO/OFF/Scanner_OFF.h | 4 +- .../include/CGAL/IO/OFF/generic_copy_OFF.h | 4 +- thirdparty/CGAL/include/CGAL/IO/OI.h | 4 +- .../include/CGAL/IO/OI/File_writer_inventor.h | 4 +- .../include/CGAL/IO/OI/Inventor_ostream.h | 6 +- .../CGAL/include/CGAL/IO/Ostream_iterator.h | 6 +- thirdparty/CGAL/include/CGAL/IO/PLY.h | 52 +- .../CGAL/include/CGAL/IO/PLY/PLY_reader.h | 72 +- .../CGAL/include/CGAL/IO/PLY/PLY_writer.h | 34 +- .../include/CGAL/IO/Polyhedron_OFF_iostream.h | 4 +- .../CGAL/IO/Polyhedron_VRML_1_ostream.h | 4 +- .../CGAL/IO/Polyhedron_VRML_2_ostream.h | 4 +- .../CGAL/IO/Polyhedron_inventor_ostream.h | 4 +- .../include/CGAL/IO/Polyhedron_iostream.h | 4 +- .../include/CGAL/IO/Polyhedron_scan_OFF.h | 4 +- .../CGAL/include/CGAL/IO/Progress_bar.h | 85 + thirdparty/CGAL/include/CGAL/IO/STL.h | 16 +- .../CGAL/include/CGAL/IO/STL/STL_reader.h | 8 +- .../include/CGAL/IO/Tee_for_output_iterator.h | 4 +- .../CGAL/IO/Triangulation_off_ostream.h | 9 +- .../CGAL/IO/Triangulation_off_ostream_2.h | 9 +- .../CGAL/IO/Triangulation_off_ostream_3.h | 9 +- .../include/CGAL/IO/Triangulation_ps_stream.h | 4 +- thirdparty/CGAL/include/CGAL/IO/VRML.h | 4 +- .../include/CGAL/IO/VRML/File_writer_VRML_2.h | 4 +- .../include/CGAL/IO/VRML/VRML_1_ostream.h | 4 +- .../include/CGAL/IO/VRML/VRML_2_ostream.h | 6 +- thirdparty/CGAL/include/CGAL/IO/VTK.h | 76 +- .../CGAL/include/CGAL/IO/VTK/VTK_reader.h | 4 +- .../CGAL/include/CGAL/IO/VTK/VTK_writer.h | 4 +- .../CGAL/include/CGAL/IO/Verbose_ostream.h | 4 +- thirdparty/CGAL/include/CGAL/IO/WKT.h | 4 +- .../include/CGAL/IO/WKT/traits_linestring.h | 4 +- .../CGAL/IO/WKT/traits_multilinestring.h | 4 +- .../include/CGAL/IO/WKT/traits_multipoint.h | 4 +- .../include/CGAL/IO/WKT/traits_multipolygon.h | 4 +- .../CGAL/include/CGAL/IO/WKT/traits_point.h | 4 +- .../CGAL/include/CGAL/IO/WKT/traits_point_3.h | 4 +- .../CGAL/include/CGAL/IO/WKT/traits_polygon.h | 4 +- .../CGAL/include/CGAL/IO/binary_file_io.h | 4 +- .../IO/facets_in_complex_2_to_triangle_mesh.h | 4 +- .../IO/facets_in_complex_3_to_triangle_mesh.h | 6 +- thirdparty/CGAL/include/CGAL/IO/helpers.h | 27 +- thirdparty/CGAL/include/CGAL/IO/io.h | 70 +- thirdparty/CGAL/include/CGAL/IO/io_tags.h | 4 +- .../IO/output_surface_facets_to_polyhedron.h | 4 +- .../output_surface_facets_to_triangle_soup.h | 4 +- .../CGAL/include/CGAL/IO/output_to_vtu.h | 44 +- .../CGAL/include/CGAL/IO/polygon_mesh_io.h | 264 + .../CGAL/include/CGAL/IO/polygon_soup_io.h | 6 +- thirdparty/CGAL/include/CGAL/IO/print_OFF.h | 4 +- .../CGAL/include/CGAL/IO/read_las_points.h | 9 +- .../CGAL/include/CGAL/IO/read_off_points.h | 15 +- .../CGAL/include/CGAL/IO/read_ply_points.h | 13 +- thirdparty/CGAL/include/CGAL/IO/read_points.h | 4 +- .../include/CGAL/IO/read_vtk_image_data.h | 53 +- .../CGAL/include/CGAL/IO/read_xyz_points.h | 15 +- thirdparty/CGAL/include/CGAL/IO/scan_OFF.h | 4 +- thirdparty/CGAL/include/CGAL/IO/trace.h | 4 +- thirdparty/CGAL/include/CGAL/IO/write_VTU.h | 51 +- .../CGAL/include/CGAL/IO/write_las_points.h | 16 +- .../CGAL/include/CGAL/IO/write_off_points.h | 15 +- .../CGAL/include/CGAL/IO/write_ply_points.h | 14 +- .../CGAL/include/CGAL/IO/write_points.h | 6 +- .../CGAL/include/CGAL/IO/write_xyz_points.h | 15 +- .../CGAL/include/CGAL/Identity_policy_2.h | 4 +- thirdparty/CGAL/include/CGAL/ImageIO.h | 42 +- .../CGAL/include/CGAL/ImageIO/analyze.h | 4 +- .../CGAL/include/CGAL/ImageIO/analyze_impl.h | 95 +- thirdparty/CGAL/include/CGAL/ImageIO/bmp.h | 6 +- .../CGAL/include/CGAL/ImageIO/bmp_impl.h | 6 +- .../CGAL/include/CGAL/ImageIO/bmpendian.h | 4 +- .../include/CGAL/ImageIO/bmpendian_impl.h | 4 +- .../CGAL/include/CGAL/ImageIO/bmpread.h | 4 +- .../CGAL/include/CGAL/ImageIO/bmpread_impl.h | 6 +- .../CGAL/include/CGAL/ImageIO/bmptypes.h | 10 +- .../CGAL/include/CGAL/ImageIO/convert.h | 8 +- .../CGAL/include/CGAL/ImageIO/convert_impl.h | 6 +- thirdparty/CGAL/include/CGAL/ImageIO/fgetns.h | 4 +- .../CGAL/include/CGAL/ImageIO/fgetns_impl.h | 4 +- thirdparty/CGAL/include/CGAL/ImageIO/gif.h | 4 +- .../CGAL/include/CGAL/ImageIO/gif_impl.h | 6 +- thirdparty/CGAL/include/CGAL/ImageIO/gis.h | 6 +- .../CGAL/include/CGAL/ImageIO/gis_impl.h | 30 +- thirdparty/CGAL/include/CGAL/ImageIO/inr.h | 4 +- .../CGAL/include/CGAL/ImageIO/inr_impl.h | 20 +- thirdparty/CGAL/include/CGAL/ImageIO/iris.h | 4 +- .../CGAL/include/CGAL/ImageIO/iris_impl.h | 4 +- thirdparty/CGAL/include/CGAL/ImageIO/mincio.h | 4 +- .../CGAL/include/CGAL/ImageIO/mincio_impl.h | 6 +- thirdparty/CGAL/include/CGAL/ImageIO/pnm.h | 4 +- .../CGAL/include/CGAL/ImageIO/pnm_impl.h | 29 +- .../CGAL/include/CGAL/ImageIO/recbuffer.h | 8 +- .../include/CGAL/ImageIO/recbuffer_impl.h | 6 +- .../CGAL/include/CGAL/ImageIO/recline.h | 8 +- .../CGAL/include/CGAL/ImageIO/recline_impl.h | 6 +- .../CGAL/include/CGAL/ImageIO/reech4x4.h | 6 +- .../CGAL/include/CGAL/ImageIO/reech4x4_impl.h | 6 +- .../CGAL/include/CGAL/ImageIO/typedefs.h | 12 +- thirdparty/CGAL/include/CGAL/ImageIO_impl.h | 12 +- thirdparty/CGAL/include/CGAL/Image_3.h | 10 +- thirdparty/CGAL/include/CGAL/Image_3_impl.h | 4 +- .../CGAL/include/CGAL/Image_3_vtk_interface.h | 14 +- .../CGAL/include/CGAL/Implicit_surface_3.h | 4 +- ...t_to_labeled_subdomains_function_wrapper.h | 11 +- .../Implicit_to_labeling_function_wrapper.h | 107 +- thirdparty/CGAL/include/CGAL/In_place_list.h | 20 +- .../CGAL/Incremental_neighbor_search.h | 73 +- .../CGAL/include/CGAL/Index_property_map.h | 4 +- .../include/CGAL/Info_for_cell_attribute.h | 45 + .../internal/deprecation_warning.h | 6 +- .../disable_deprecation_warnings_and_errors.h | 8 +- .../internal/enable_third_party_libraries.h | 6 +- .../CGAL/Interpolation/internal/helpers.h | 4 +- .../Interpolation_gradient_fitting_traits_2.h | 4 +- .../include/CGAL/Interpolation_traits_2.h | 4 +- .../CGAL/include/CGAL/Intersection_traits.h | 49 +- .../CGAL/include/CGAL/Intersection_traits_2.h | 40 +- .../CGAL/include/CGAL/Intersection_traits_3.h | 148 +- .../CGAL/Intersections_2/Bbox_2_Bbox_2.h | 10 +- .../CGAL/Intersections_2/Bbox_2_Circle_2.h | 29 +- .../Intersections_2/Bbox_2_Iso_rectangle_2.h | 16 +- .../CGAL/Intersections_2/Bbox_2_Line_2.h | 26 +- .../CGAL/Intersections_2/Bbox_2_Point_2.h | 30 +- .../CGAL/Intersections_2/Bbox_2_Ray_2.h | 26 +- .../CGAL/Intersections_2/Bbox_2_Segment_2.h | 28 +- .../CGAL/Intersections_2/Bbox_2_Triangle_2.h | 28 +- .../CGAL/Intersections_2/Circle_2_Circle_2.h | 10 +- .../Circle_2_Iso_rectangle_2.h | 23 +- .../CGAL/Intersections_2/Circle_2_Line_2.h | 14 +- .../CGAL/Intersections_2/Circle_2_Point_2.h | 28 +- .../CGAL/Intersections_2/Circle_2_Ray_2.h | 13 +- .../CGAL/Intersections_2/Circle_2_Segment_2.h | 13 +- .../Intersections_2/Circle_2_Triangle_2.h | 11 +- .../Iso_rectangle_2_Iso_rectangle_2.h | 18 +- .../Intersections_2/Iso_rectangle_2_Line_2.h | 32 +- .../Intersections_2/Iso_rectangle_2_Point_2.h | 24 +- .../Intersections_2/Iso_rectangle_2_Ray_2.h | 33 +- .../Iso_rectangle_2_Segment_2.h | 46 +- .../Iso_rectangle_2_Triangle_2.h | 29 +- .../CGAL/Intersections_2/Line_2_Line_2.h | 26 +- .../CGAL/Intersections_2/Line_2_Point_2.h | 26 +- .../CGAL/Intersections_2/Line_2_Ray_2.h | 43 +- .../CGAL/Intersections_2/Line_2_Segment_2.h | 45 +- .../CGAL/Intersections_2/Line_2_Triangle_2.h | 28 +- .../CGAL/Intersections_2/Point_2_Point_2.h | 39 +- .../CGAL/Intersections_2/Point_2_Ray_2.h | 27 +- .../CGAL/Intersections_2/Point_2_Segment_2.h | 13 +- .../CGAL/Intersections_2/Point_2_Triangle_2.h | 24 +- .../CGAL/Intersections_2/Ray_2_Ray_2.h | 24 +- .../CGAL/Intersections_2/Ray_2_Segment_2.h | 32 +- .../CGAL/Intersections_2/Ray_2_Triangle_2.h | 37 +- .../Intersections_2/Segment_2_Segment_2.h | 11 +- .../Intersections_2/Segment_2_Triangle_2.h | 47 +- .../Intersections_2/Triangle_2_Triangle_2.h | 8 +- .../Intersections_2/internal/Straight_2.h | 9 +- .../Triangle_2_Triangle_2_do_intersect_impl.h | 55 +- .../Triangle_2_Triangle_2_intersection_impl.h | 4 +- .../CGAL/Intersections_3/Bbox_3_Bbox_3.h | 16 +- .../Intersections_3/Bbox_3_Iso_cuboid_3.h | 14 +- .../CGAL/Intersections_3/Bbox_3_Line_3.h | 14 +- .../CGAL/Intersections_3/Bbox_3_Plane_3.h | 14 +- .../CGAL/Intersections_3/Bbox_3_Point_3.h | 14 +- .../CGAL/Intersections_3/Bbox_3_Ray_3.h | 14 +- .../CGAL/Intersections_3/Bbox_3_Segment_3.h | 14 +- .../CGAL/Intersections_3/Bbox_3_Sphere_3.h | 14 +- .../Intersections_3/Bbox_3_Tetrahedron_3.h | 14 +- .../CGAL/Intersections_3/Bbox_3_Triangle_3.h | 14 +- .../Iso_cuboid_3_Iso_cuboid_3.h | 4 +- .../Intersections_3/Iso_cuboid_3_Line_3.h | 4 +- .../Intersections_3/Iso_cuboid_3_Plane_3.h | 4 +- .../Intersections_3/Iso_cuboid_3_Point_3.h | 4 +- .../CGAL/Intersections_3/Iso_cuboid_3_Ray_3.h | 4 +- .../Intersections_3/Iso_cuboid_3_Segment_3.h | 4 +- .../Intersections_3/Iso_cuboid_3_Sphere_3.h | 4 +- .../Iso_cuboid_3_Tetrahedron_3.h | 4 +- .../Intersections_3/Iso_cuboid_3_Triangle_3.h | 6 +- .../CGAL/Intersections_3/Line_3_Line_3.h | 4 +- .../CGAL/Intersections_3/Line_3_Plane_3.h | 10 +- .../CGAL/Intersections_3/Line_3_Point_3.h | 4 +- .../CGAL/Intersections_3/Line_3_Ray_3.h | 4 +- .../CGAL/Intersections_3/Line_3_Segment_3.h | 4 +- .../CGAL/Intersections_3/Line_3_Sphere_3.h | 4 +- .../Intersections_3/Line_3_Tetrahedron_3.h | 4 +- .../CGAL/Intersections_3/Line_3_Triangle_3.h | 4 +- .../CGAL/Intersections_3/Plane_3_Plane_3.h | 4 +- .../Intersections_3/Plane_3_Plane_3_Plane_3.h | 9 +- .../CGAL/Intersections_3/Plane_3_Point_3.h | 4 +- .../CGAL/Intersections_3/Plane_3_Ray_3.h | 4 +- .../CGAL/Intersections_3/Plane_3_Segment_3.h | 4 +- .../CGAL/Intersections_3/Plane_3_Sphere_3.h | 4 +- .../Intersections_3/Plane_3_Tetrahedron_3.h | 4 +- .../CGAL/Intersections_3/Plane_3_Triangle_3.h | 4 +- .../CGAL/Intersections_3/Point_3_Point_3.h | 4 +- .../CGAL/Intersections_3/Point_3_Ray_3.h | 4 +- .../CGAL/Intersections_3/Point_3_Segment_3.h | 4 +- .../CGAL/Intersections_3/Point_3_Sphere_3.h | 4 +- .../Intersections_3/Point_3_Tetrahedron_3.h | 4 +- .../CGAL/Intersections_3/Point_3_Triangle_3.h | 4 +- .../CGAL/Intersections_3/Ray_3_Ray_3.h | 4 +- .../CGAL/Intersections_3/Ray_3_Segment_3.h | 4 +- .../CGAL/Intersections_3/Ray_3_Sphere_3.h | 4 +- .../Intersections_3/Ray_3_Tetrahedron_3.h | 4 +- .../CGAL/Intersections_3/Ray_3_Triangle_3.h | 4 +- .../Intersections_3/Segment_3_Segment_3.h | 4 +- .../CGAL/Intersections_3/Segment_3_Sphere_3.h | 4 +- .../Intersections_3/Segment_3_Tetrahedron_3.h | 4 +- .../Intersections_3/Segment_3_Triangle_3.h | 4 +- .../CGAL/Intersections_3/Sphere_3_Sphere_3.h | 4 +- .../Intersections_3/Sphere_3_Tetrahedron_3.h | 4 +- .../Intersections_3/Sphere_3_Triangle_3.h | 4 +- .../Tetrahedron_3_Tetrahedron_3.h | 4 +- .../Tetrahedron_3_Triangle_3.h | 4 +- .../Intersections_3/Triangle_3_Triangle_3.h | 4 +- .../Bbox_3_Iso_cuboid_3_do_intersect.h | 18 +- .../Bbox_3_Iso_cuboid_3_intersection.h | 4 +- .../internal/Bbox_3_Line_3_do_intersect.h | 32 +- .../internal/Bbox_3_Line_3_intersection.h | 4 +- .../internal/Bbox_3_Plane_3_do_intersect.h | 18 +- .../internal/Bbox_3_Ray_3_do_intersect.h | 20 +- .../internal/Bbox_3_Ray_3_intersection.h | 4 +- .../internal/Bbox_3_Segment_3_do_intersect.h | 40 +- .../internal/Bbox_3_Segment_3_intersection.h | 12 +- .../internal/Bbox_3_Sphere_3_do_intersect.h | 18 +- .../Bbox_3_Tetrahedron_3_do_intersect.h | 20 +- .../internal/Bbox_3_Triangle_3_do_intersect.h | 26 +- .../Iso_cuboid_3_Iso_cuboid_3_do_intersect.h | 7 +- .../Iso_cuboid_3_Iso_cuboid_3_intersection.h | 4 +- .../Iso_cuboid_3_Line_3_do_intersect.h | 18 +- .../Iso_cuboid_3_Line_3_intersection.h | 4 +- .../Iso_cuboid_3_Plane_3_do_intersect.h | 27 +- .../Iso_cuboid_3_Plane_3_intersection.h | 6 +- .../Iso_cuboid_3_Point_3_do_intersect.h | 8 +- .../Iso_cuboid_3_Point_3_intersection.h | 4 +- .../Iso_cuboid_3_Ray_3_do_intersect.h | 21 +- .../Iso_cuboid_3_Ray_3_intersection.h | 4 +- .../Iso_cuboid_3_Segment_3_do_intersect.h | 20 +- .../Iso_cuboid_3_Segment_3_intersection.h | 4 +- .../Iso_cuboid_3_Sphere_3_do_intersect.h | 27 +- .../Iso_cuboid_3_Tetrahedron_3_do_intersect.h | 4 +- .../Iso_cuboid_3_Triangle_3_do_intersect.h | 21 +- .../Iso_cuboid_3_Triangle_3_intersection.h | 8 +- .../internal/Line_3_Line_3_do_intersect.h | 6 +- .../internal/Line_3_Line_3_intersection.h | 4 +- .../internal/Line_3_Plane_3_do_intersect.h | 8 +- .../internal/Line_3_Plane_3_intersection.h | 10 +- .../internal/Line_3_Point_3_do_intersect.h | 8 +- .../internal/Line_3_Point_3_intersection.h | 4 +- .../internal/Line_3_Ray_3_do_intersect.h | 8 +- .../internal/Line_3_Ray_3_intersection.h | 4 +- .../internal/Line_3_Segment_3_do_intersect.h | 8 +- .../internal/Line_3_Segment_3_intersection.h | 4 +- .../internal/Line_3_Sphere_3_do_intersect.h | 4 +- .../Line_3_Tetrahedron_3_do_intersect.h | 4 +- .../Line_3_Tetrahedron_3_intersection.h | 4 +- .../internal/Line_3_Triangle_3_do_intersect.h | 18 +- .../internal/Line_3_Triangle_3_intersection.h | 4 +- .../Plane_3_Plane_3_Plane_3_do_intersect.h | 6 +- .../Plane_3_Plane_3_Plane_3_intersection.h | 44 +- .../internal/Plane_3_Plane_3_do_intersect.h | 6 +- .../internal/Plane_3_Plane_3_intersection.h | 4 +- .../internal/Plane_3_Point_3_do_intersect.h | 8 +- .../internal/Plane_3_Point_3_intersection.h | 4 +- .../internal/Plane_3_Ray_3_do_intersect.h | 8 +- .../internal/Plane_3_Ray_3_intersection.h | 4 +- .../internal/Plane_3_Segment_3_do_intersect.h | 8 +- .../internal/Plane_3_Segment_3_intersection.h | 4 +- .../internal/Plane_3_Sphere_3_do_intersect.h | 8 +- .../internal/Plane_3_Sphere_3_intersection.h | 4 +- .../Plane_3_Tetrahedron_3_do_intersect.h | 4 +- .../Plane_3_Tetrahedron_3_intersection.h | 6 +- .../Plane_3_Triangle_3_do_intersect.h | 18 +- .../Plane_3_Triangle_3_intersection.h | 7 +- .../internal/Point_3_Point_3_do_intersect.h | 4 +- .../internal/Point_3_Point_3_intersection.h | 4 +- .../internal/Point_3_Ray_3_do_intersect.h | 10 +- .../internal/Point_3_Ray_3_intersection.h | 4 +- .../internal/Point_3_Segment_3_do_intersect.h | 8 +- .../internal/Point_3_Segment_3_intersection.h | 4 +- .../internal/Point_3_Sphere_3_do_intersect.h | 8 +- .../internal/Point_3_Sphere_3_intersection.h | 4 +- .../Point_3_Tetrahedron_3_do_intersect.h | 8 +- .../Point_3_Tetrahedron_3_intersection.h | 4 +- .../Point_3_Triangle_3_do_intersect.h | 18 +- .../Point_3_Triangle_3_intersection.h | 4 +- .../internal/Ray_3_Ray_3_do_intersect.h | 6 +- .../internal/Ray_3_Ray_3_intersection.h | 4 +- .../internal/Ray_3_Segment_3_do_intersect.h | 8 +- .../internal/Ray_3_Segment_3_intersection.h | 4 +- .../internal/Ray_3_Sphere_3_do_intersect.h | 4 +- .../Ray_3_Tetrahedron_3_do_intersect.h | 4 +- .../Ray_3_Tetrahedron_3_intersection.h | 4 +- .../internal/Ray_3_Triangle_3_do_intersect.h | 20 +- .../internal/Ray_3_Triangle_3_intersection.h | 22 +- .../Segment_3_Segment_3_do_intersect.h | 6 +- .../Segment_3_Segment_3_intersection.h | 8 +- .../Segment_3_Sphere_3_do_intersect.h | 4 +- .../Segment_3_Tetrahedron_3_do_intersect.h | 4 +- .../Segment_3_Tetrahedron_3_intersection.h | 4 +- .../Segment_3_Triangle_3_do_intersect.h | 21 +- .../Segment_3_Triangle_3_intersection.h | 4 +- .../internal/Sphere_3_Sphere_3_do_intersect.h | 6 +- .../internal/Sphere_3_Sphere_3_intersection.h | 4 +- .../Sphere_3_Tetrahedron_3_do_intersect.h | 4 +- .../Sphere_3_Triangle_3_do_intersect.h | 4 +- .../Tetrahedron_3_Bounded_3_do_intersect.h | 4 +- ...Tetrahedron_3_Tetrahedron_3_do_intersect.h | 4 +- .../Tetrahedron_3_Triangle_3_do_intersect.h | 4 +- .../Tetrahedron_3_Triangle_3_intersection.h | 6 +- .../Tetrahedron_3_Unbounded_3_do_intersect.h | 4 +- .../Triangle_3_Triangle_3_do_intersect.h | 41 +- .../Triangle_3_Triangle_3_intersection.h | 428 +- .../tetrahedron_lines_intersections_3.h | 8 +- .../CGAL/include/CGAL/Interval_arithmetic.h | 4 +- .../include/CGAL/Interval_arithmetic_impl.h | 4 +- thirdparty/CGAL/include/CGAL/Interval_nt.h | 5 +- .../CGAL/include/CGAL/Interval_skip_list.h | 4 +- .../CGAL/Interval_skip_list_interval.h | 4 +- .../CGAL/include/CGAL/Interval_traits.h | 23 +- thirdparty/CGAL/include/CGAL/Inverse_index.h | 4 +- thirdparty/CGAL/include/CGAL/Is_a_predicate.h | 4 +- .../CGAL/include/CGAL/Is_extended_kernel.h | 4 +- thirdparty/CGAL/include/CGAL/Iso_cuboid_3.h | 15 +- .../CGAL/include/CGAL/Iso_rectangle_2.h | 11 +- .../CGAL/include/CGAL/Iso_rectangle_d.h | 4 +- .../CGAL/include/CGAL/Iterator_project.h | 4 +- thirdparty/CGAL/include/CGAL/Iterator_range.h | 11 +- .../CGAL/include/CGAL/Iterator_transform.h | 4 +- .../CGAL/include/CGAL/Join_input_iterator.h | 4 +- .../CGAL/include/CGAL/K_neighbor_search.h | 4 +- thirdparty/CGAL/include/CGAL/Kd_tree.h | 34 +- thirdparty/CGAL/include/CGAL/Kd_tree_node.h | 30 +- .../CGAL/include/CGAL/Kd_tree_rectangle.h | 8 +- .../CGAL/include/CGAL/Kernel/Conic_misc.h | 4 +- .../include/CGAL/Kernel/Dimension_utils.h | 4 +- .../include/CGAL/Kernel/Return_base_tag.h | 4 +- .../include/CGAL/Kernel/Same_uncertainty.h | 4 +- .../CGAL/Kernel/Type_equality_wrapper.h | 4 +- .../CGAL/include/CGAL/Kernel/Type_mapper.h | 35 +- thirdparty/CGAL/include/CGAL/Kernel/Wutils.h | 4 +- .../include/CGAL/Kernel/function_objects.h | 312 +- .../include/CGAL/Kernel/global_functions.h | 4 +- .../include/CGAL/Kernel/global_functions_2.h | 4 +- .../include/CGAL/Kernel/global_functions_3.h | 13 +- .../CGAL/Kernel/global_functions_internal_2.h | 17 +- .../CGAL/Kernel/global_functions_internal_3.h | 27 +- .../CGAL/include/CGAL/Kernel/hash_functions.h | 4 +- .../include/CGAL/Kernel/interface_macros.h | 87 +- thirdparty/CGAL/include/CGAL/Kernel/mpl.h | 6 +- thirdparty/CGAL/include/CGAL/Kernel/solve.h | 4 +- .../internal/Filtered_projection_traits_3.h | 4 +- .../Kernel_23/internal/Has_boolean_tags.h | 4 +- .../Kernel_23/internal/Projection_traits_3.h | 70 +- .../internal/Projection_traits_base_3.h | 52 +- thirdparty/CGAL/include/CGAL/Kernel_checker.h | 4 +- .../CGAL/Kernel_d/Aff_transformationCd.h | 4 +- .../CGAL/Kernel_d/Aff_transformationHd.h | 4 +- .../CGAL/Kernel_d/Aff_transformation_d.h | 4 +- .../Kernel_d/Cartesian_const_iterator_d.h | 4 +- .../CGAL/Kernel_d/Cartesian_converter_d.h | 6 +- .../CGAL/include/CGAL/Kernel_d/DirectionCd.h | 4 +- .../include/CGAL/Kernel_d/DirectionCd_impl.h | 4 +- .../CGAL/include/CGAL/Kernel_d/DirectionHd.h | 4 +- .../include/CGAL/Kernel_d/DirectionHd_impl.h | 4 +- .../CGAL/include/CGAL/Kernel_d/Direction_d.h | 4 +- .../CGAL/include/CGAL/Kernel_d/HyperplaneCd.h | 4 +- .../include/CGAL/Kernel_d/HyperplaneCd_impl.h | 4 +- .../CGAL/include/CGAL/Kernel_d/HyperplaneHd.h | 4 +- .../include/CGAL/Kernel_d/HyperplaneHd_impl.h | 4 +- .../CGAL/include/CGAL/Kernel_d/Hyperplane_d.h | 4 +- .../include/CGAL/Kernel_d/Interface_classes.h | 4 +- .../CGAL/Kernel_d/Interval_linear_algebra.h | 4 +- .../CGAL/include/CGAL/Kernel_d/Iso_box_d.h | 4 +- .../include/CGAL/Kernel_d/Kernel_classesCd.h | 4 +- .../include/CGAL/Kernel_d/Kernel_classesHd.h | 4 +- .../CGAL/include/CGAL/Kernel_d/Line_d.h | 6 +- .../CGAL/include/CGAL/Kernel_d/Line_d_impl.h | 4 +- .../CGAL/Kernel_d/Linear_algebraCd_impl.h | 4 +- .../CGAL/Kernel_d/Linear_algebraHd_impl.h | 4 +- .../CGAL/include/CGAL/Kernel_d/Matrix__.h | 4 +- .../CGAL/include/CGAL/Kernel_d/Pair_d.h | 4 +- .../CGAL/include/CGAL/Kernel_d/PointCd.h | 4 +- .../CGAL/include/CGAL/Kernel_d/PointCd_impl.h | 4 +- .../CGAL/include/CGAL/Kernel_d/PointHd.h | 4 +- .../CGAL/include/CGAL/Kernel_d/PointHd_impl.h | 4 +- .../CGAL/include/CGAL/Kernel_d/Point_d.h | 4 +- thirdparty/CGAL/include/CGAL/Kernel_d/Ray_d.h | 6 +- .../CGAL/include/CGAL/Kernel_d/Segment_d.h | 6 +- .../CGAL/include/CGAL/Kernel_d/Sphere_d.h | 10 +- .../CGAL/include/CGAL/Kernel_d/Tuple_d.h | 4 +- .../CGAL/include/CGAL/Kernel_d/VectorCd.h | 4 +- .../include/CGAL/Kernel_d/VectorCd_impl.h | 4 +- .../CGAL/include/CGAL/Kernel_d/VectorHd.h | 4 +- .../include/CGAL/Kernel_d/VectorHd_impl.h | 4 +- .../CGAL/include/CGAL/Kernel_d/Vector__.h | 4 +- .../CGAL/include/CGAL/Kernel_d/Vector_d.h | 4 +- thirdparty/CGAL/include/CGAL/Kernel_d/debug.h | 4 +- .../include/CGAL/Kernel_d/function_objects.h | 22 +- .../CGAL/Kernel_d/function_objectsCd.h | 6 +- .../CGAL/Kernel_d/function_objectsHd.h | 4 +- .../CGAL/Kernel_d/interface_macros_d.h | 6 +- .../CGAL/Kernel_d/intersection_objectsCd.h | 4 +- .../CGAL/Kernel_d/intersection_objectsHd.h | 4 +- .../CGAL/Kernel_d/intersection_objects_d.h | 4 +- .../include/CGAL/Kernel_d/simple_objects.h | 4 +- .../CGAL/include/CGAL/Kernel_profiler.h | 4 +- thirdparty/CGAL/include/CGAL/Kernel_traits.h | 5 +- .../CGAL/include/CGAL/Kernel_traits_fwd.h | 4 +- .../include/CGAL/LEDA_arithmetic_kernel.h | 4 +- thirdparty/CGAL/include/CGAL/LEDA_basic.h | 4 +- .../CGAL/include/CGAL/Labeled_mesh_domain_3.h | 1081 ++-- .../CGAL/Largest_empty_iso_rectangle_2.h | 12 +- thirdparty/CGAL/include/CGAL/Lazy.h | 214 +- thirdparty/CGAL/include/CGAL/Lazy_exact_nt.h | 62 +- thirdparty/CGAL/include/CGAL/Lazy_kernel.h | 36 +- thirdparty/CGAL/include/CGAL/Level_interval.h | 4 +- .../CGAL/include/CGAL/Lightweight_vector_3.h | 6 +- thirdparty/CGAL/include/CGAL/Line_2.h | 16 +- thirdparty/CGAL/include/CGAL/Line_3.h | 9 +- thirdparty/CGAL/include/CGAL/Line_arc_2.h | 4 +- thirdparty/CGAL/include/CGAL/Line_arc_3.h | 4 +- .../CGAL/include/CGAL/Linear_algebraCd.h | 4 +- .../CGAL/include/CGAL/Linear_algebraHd.h | 6 +- .../include/CGAL/Linear_cell_complex_base.h | 182 +- .../CGAL/Linear_cell_complex_bgl_min_items.h | 4 +- .../CGAL/Linear_cell_complex_constructors.h | 64 +- ...complex_for_bgl_combinatorial_map_helper.h | 4 +- ...inear_cell_complex_for_combinatorial_map.h | 177 +- .../Linear_cell_complex_for_generalized_map.h | 163 +- .../include/CGAL/Linear_cell_complex_fwd.h | 129 +- ...inear_cell_complex_incremental_builder_3.h | 408 ++ .../CGAL/Linear_cell_complex_min_items.h | 4 +- .../CGAL/Linear_cell_complex_operations.h | 36 +- .../include/CGAL/Linear_cell_complex_traits.h | 4 +- .../CGAL/include/CGAL/Location_policy.h | 4 +- thirdparty/CGAL/include/CGAL/MP_Float.h | 8 +- .../include/CGAL/MP_Float_arithmetic_kernel.h | 4 +- thirdparty/CGAL/include/CGAL/MP_Float_impl.h | 6 +- .../CGAL/Manhattan_distance_iso_box_point.h | 4 +- .../Marching_tetrahedra_observer_default_3.h | 4 +- ...arching_tetrahedra_traits_skin_surface_3.h | 4 +- .../Mean_curvature_flow_skeletonization.h | 61 +- thirdparty/CGAL/include/CGAL/Memory_sizer.h | 6 +- .../CGAL/include/CGAL/Mesh_2/Clusters.h | 26 +- .../include/CGAL/Mesh_2/Do_not_refine_edges.h | 6 +- .../CGAL/include/CGAL/Mesh_2/Face_badness.h | 4 +- .../CGAL/Mesh_2/Lipschitz_sizing_field_2.h | 11 +- .../CGAL/include/CGAL/Mesh_2/Lloyd_move_2.h | 4 +- .../CGAL/Mesh_2/Mesh_global_optimizer_2.h | 32 +- .../include/CGAL/Mesh_2/Mesh_sizing_field.h | 16 +- .../CGAL/include/CGAL/Mesh_2/Output_stream.h | 4 +- .../CGAL/include/CGAL/Mesh_2/Refine_edges.h | 34 +- .../CGAL/Mesh_2/Refine_edges_visitor.h | 10 +- .../CGAL/Mesh_2/Refine_edges_with_clusters.h | 12 +- .../CGAL/include/CGAL/Mesh_2/Refine_faces.h | 12 +- .../CGAL/include/CGAL/Mesh_2/Sizing_field_2.h | 4 +- .../CGAL/Mesh_2/Uniform_sizing_field_2.h | 4 +- .../CGAL/include/CGAL/Mesh_3/C3T3_helpers.h | 422 +- .../Mesh_3/Cell_criteria_visitor_with_balls.h | 12 +- .../CGAL/Mesh_3/Concurrent_mesher_config.h | 4 +- .../CGAL/Mesh_3/Detect_features_in_image.h | 327 ++ .../Mesh_3/Detect_features_on_image_bbox.h | 128 + .../CGAL/include/CGAL/Mesh_3/Dump_c3t3.h | 132 +- .../Facet_criteria_visitor_with_balls.h | 16 +- .../Mesh_3/Facet_on_same_surface_criterion.h | 4 +- ...plus_weights_to_labeled_function_wrapper.h | 14 +- .../Image_to_labeled_function_wrapper.h | 9 +- .../Mesh_3/Implicit_surface_mesher_visitor.h | 4 +- .../CGAL/Mesh_3/Is_mesh_domain_field_3.h | 4 +- .../CGAL/include/CGAL/Mesh_3/Lloyd_move.h | 70 +- .../Mesh_complex_3_in_triangulation_3_fwd.h | 4 +- .../CGAL/Mesh_3/Mesh_global_optimizer.h | 80 +- .../include/CGAL/Mesh_3/Mesh_sizing_field.h | 34 +- .../CGAL/Mesh_3/Mesh_surface_cell_base_3.h | 34 +- .../CGAL/include/CGAL/Mesh_3/Mesher_3.h | 23 +- .../CGAL/include/CGAL/Mesh_3/Mesher_level.h | 46 +- .../Mesher_level_default_implementations.h | 4 +- .../include/CGAL/Mesh_3/Null_exuder_visitor.h | 4 +- .../Mesh_3/Null_global_optimizer_visitor.h | 4 +- .../CGAL/Mesh_3/Null_perturber_visitor.h | 4 +- .../CGAL/Mesh_3/Null_subdomain_index.h | 29 + .../CGAL/include/CGAL/Mesh_3/Odt_move.h | 32 +- .../CGAL/Mesh_3/Poisson_refine_cells_3.h | 10 +- .../CGAL/Mesh_3/Polyline_with_context.h | 4 +- .../include/CGAL/Mesh_3/Profile_counter.h | 4 +- .../include/CGAL/Mesh_3/Profiling_tools.h | 4 +- .../CGAL/Mesh_3/Protect_edges_sizing_field.h | 297 +- .../CGAL/include/CGAL/Mesh_3/Refine_cells_3.h | 39 +- .../include/CGAL/Mesh_3/Refine_facets_3.h | 130 +- .../CGAL/Mesh_3/Refine_facets_manifold_base.h | 98 +- .../include/CGAL/Mesh_3/Refine_tets_visitor.h | 4 +- .../CGAL/Mesh_3/Robust_intersection_kernel.h | 4 +- .../Mesh_3/Robust_intersection_traits_3.h | 37 +- .../CGAL/include/CGAL/Mesh_3/Sizing_grid.h | 18 +- .../include/CGAL/Mesh_3/Sliver_perturber.h | 43 +- .../CGAL/include/CGAL/Mesh_3/Slivers_exuder.h | 89 +- .../Slivers_exuder_cell_attributes_traits.h | 4 +- .../CGAL/Mesh_3/Triangle_accessor_primitive.h | 20 +- .../CGAL/Mesh_3/Triangulation_helpers.h | 63 +- .../CGAL/Mesh_3/Triangulation_sizing_field.h | 38 +- .../CGAL/Mesh_3/Uniform_sizing_field.h | 8 +- .../CGAL/Mesh_3/Worksharing_data_structures.h | 4 +- thirdparty/CGAL/include/CGAL/Mesh_3/config.h | 15 +- .../include/CGAL/Mesh_3/dihedral_angle_3.h | 4 +- .../AABB_filtered_projection_traits.h | 50 +- .../Mesh_3/experimental/Facet_patch_id_map.h | 6 +- ...cet_topological_criterion_with_adjacency.h | 4 +- .../Mesh_3/experimental/Get_curve_index.h | 8 +- .../Mesh_3/experimental/Get_facet_patch_id.h | 4 +- .../Lipschitz_sizing_experimental.h | 4 +- .../Lipschitz_sizing_parameters.h | 4 +- .../Lipschitz_sizing_polyhedron.h | 4 +- .../experimental/Sizing_field_minimum.h | 13 +- .../Mesh_3/features_detection/cases_table.h | 4204 +++++++++++++++ .../Mesh_3/features_detection/combinations.h | 235 + .../Mesh_3/features_detection/coordinates.h | 62 + .../features_detection/cube_isometries.h | 89 + .../features_detection/features_detection.h | 4017 ++++++++++++++ .../features_detection_helpers.h | 72 + .../features_detection/postprocess_weights.h | 165 + .../CGAL/Mesh_3/generate_label_weights.h | 17 +- ...initialize_triangulation_from_gray_image.h | 4 +- ...tialize_triangulation_from_labeled_image.h | 22 +- .../Mesh_3/internal/Graph_manipulations.h | 4 +- .../CGAL/Mesh_3/internal/check_weights.h | 8 +- .../include/CGAL/Mesh_3/internal/helpers.h | 4 +- .../CGAL/include/CGAL/Mesh_3/io_signature.h | 351 +- .../CGAL/Mesh_3/mesh_standard_cell_criteria.h | 118 +- .../CGAL/Mesh_3/mesh_standard_criteria.h | 10 +- .../Mesh_3/mesh_standard_facet_criteria.h | 156 +- .../include/CGAL/Mesh_3/min_dihedral_angle.h | 4 +- .../CGAL/include/CGAL/Mesh_3/parameters.h | 34 + .../include/CGAL/Mesh_3/parameters_defaults.h | 21 +- .../polyhedral_to_labeled_function_wrapper.h | 4 +- .../CGAL/Mesh_3/polylines_to_protect.h | 117 +- .../CGAL/include/CGAL/Mesh_3/radius_ratio.h | 7 +- ...or_connected_components_in_labeled_image.h | 10 +- .../include/CGAL/Mesh_3/sliver_criteria.h | 12 +- .../squared_distance_Point_3_Triangle_3.h | 4 +- .../include/CGAL/Mesh_3/vertex_perturbation.h | 130 +- .../CGAL/include/CGAL/Mesh_cell_base_3.h | 65 +- .../CGAL/include/CGAL/Mesh_cell_criteria_3.h | 108 +- .../CGAL/Mesh_complex_3_in_triangulation_3.h | 1543 +++++- .../CGAL/Mesh_constant_domain_field_3.h | 80 +- .../CGAL/include/CGAL/Mesh_criteria_3.h | 253 +- .../Mesh_domain_with_polyline_features_3.h | 217 +- .../CGAL/include/CGAL/Mesh_edge_criteria_3.h | 100 +- .../CGAL/include/CGAL/Mesh_error_code.h | 12 +- .../CGAL/include/CGAL/Mesh_facet_criteria_3.h | 137 +- .../CGAL/include/CGAL/Mesh_facet_topology.h | 34 +- .../CGAL/Mesh_optimization_return_code.h | 4 +- .../CGAL/include/CGAL/Mesh_polyhedron_3.h | 40 +- .../CGAL/include/CGAL/Mesh_triangulation_3.h | 87 +- .../CGAL/include/CGAL/Mesh_vertex_base_3.h | 44 +- thirdparty/CGAL/include/CGAL/Mesher_level.h | 6 +- .../Mesher_level_default_implementations.h | 4 +- .../CGAL/include/CGAL/Mesher_level_visitors.h | 4 +- .../CGAL/Meshes/Double_map_container.h | 6 +- .../CGAL/Meshes/Filtered_deque_container.h | 6 +- .../CGAL/Meshes/Filtered_multimap_container.h | 6 +- .../CGAL/Meshes/Filtered_queue_container.h | 6 +- .../CGAL/Meshes/Simple_map_container.h | 6 +- .../CGAL/Meshes/Simple_queue_container.h | 6 +- .../CGAL/Meshes/Simple_set_container.h | 6 +- .../Triangulation_mesher_level_traits_2.h | 4 +- .../Triangulation_mesher_level_traits_3.h | 6 +- thirdparty/CGAL/include/CGAL/Min_annulus_d.h | 36 +- thirdparty/CGAL/include/CGAL/Min_circle_2.h | 12 +- .../Min_circle_2/Min_circle_2_adapterC2.h | 8 +- .../Min_circle_2/Min_circle_2_adapterH2.h | 8 +- .../CGAL/Min_circle_2/Min_circle_2_impl.h | 15 +- .../CGAL/Min_circle_2/Optimisation_circle_2.h | 4 +- .../Min_circle_2/Optimisation_circle_2_impl.h | 17 +- .../CGAL/include/CGAL/Min_circle_2_traits_2.h | 4 +- thirdparty/CGAL/include/CGAL/Min_ellipse_2.h | 16 +- .../Min_ellipse_2/Min_ellipse_2_adapterC2.h | 14 +- .../Min_ellipse_2/Min_ellipse_2_adapterH2.h | 14 +- .../CGAL/Min_ellipse_2/Min_ellipse_2_impl.h | 15 +- .../Min_ellipse_2/Optimisation_ellipse_2.h | 42 +- .../Optimisation_ellipse_2_impl.h | 15 +- .../include/CGAL/Min_ellipse_2_traits_2.h | 4 +- .../include/CGAL/Min_quadrilateral_traits_2.h | 22 +- .../CGAL/Min_sphere_annulus_d_traits_2.h | 9 +- .../CGAL/Min_sphere_annulus_d_traits_3.h | 9 +- .../CGAL/Min_sphere_annulus_d_traits_d.h | 9 +- thirdparty/CGAL/include/CGAL/Min_sphere_d.h | 26 +- .../CGAL/Min_sphere_d/Min_sphere_d_impl.h | 15 +- .../CGAL/Min_sphere_d/Optimisation_sphere_d.h | 12 +- .../CGAL/Min_sphere_of_points_d_traits_2.h | 4 +- .../CGAL/Min_sphere_of_points_d_traits_3.h | 4 +- .../CGAL/Min_sphere_of_points_d_traits_d.h | 4 +- .../include/CGAL/Min_sphere_of_spheres_d.h | 6 +- .../Min_sphere_of_spheres_d_configure.h | 4 +- .../Min_sphere_of_spheres_d_impl.h | 4 +- .../Min_sphere_of_spheres_d_pair.h | 14 +- .../Min_sphere_of_spheres_d_pivot_impl.h | 4 +- .../Min_sphere_of_spheres_d_support_set.h | 6 +- ...Min_sphere_of_spheres_d_support_set_impl.h | 6 +- .../CGAL/Min_sphere_of_spheres_d_traits_2.h | 4 +- .../CGAL/Min_sphere_of_spheres_d_traits_3.h | 4 +- .../CGAL/Min_sphere_of_spheres_d_traits_d.h | 4 +- ...Minimum_enclosing_quadrilateral_traits_2.h | 4 +- .../AABB_collision_detector_2.h | 4 +- .../Minkowski_sum_2/AABB_node_with_join.h | 4 +- .../AABB_segment_2_primitive.h | 4 +- .../CGAL/Minkowski_sum_2/AABB_traits_2.h | 4 +- .../AABB_traversal_traits_with_join.h | 16 +- .../Minkowski_sum_2/AABB_tree_with_join.h | 16 +- .../Minkowski_sum_2/Approx_offset_base_2.h | 30 +- .../Minkowski_sum_2/Arr_labeled_traits_2.h | 27 +- .../Decomposition_strategy_adapter.h | 6 +- .../Minkowski_sum_2/Exact_offset_base_2.h | 199 +- .../CGAL/Minkowski_sum_2/Hole_filter_2.h | 50 +- .../include/CGAL/Minkowski_sum_2/Labels.h | 6 +- .../Minkowski_sum_by_reduced_convolution_2.h | 303 +- .../Minkowski_sum_2/Minkowski_sum_conv_2.h | 10 +- .../Minkowski_sum_2/Minkowski_sum_decomp_2.h | 12 +- .../CGAL/Minkowski_sum_2/Offset_conv_2.h | 4 +- .../CGAL/Minkowski_sum_2/Offset_decomp_2.h | 4 +- .../Polygon_convex_decomposition.h | 4 +- .../Minkowski_sum_2/Union_of_curve_cycles_2.h | 4 +- .../CGAL/Minkowski_sum_2/Union_of_cycles_2.h | 4 +- .../Union_of_segment_cycles_2.h | 4 +- .../CGAL/Minkowski_sum_3/Gaussian_map.h | 6 +- .../Minkowski_sum_3/Gaussian_map_to_nef_3.h | 4 +- .../include/CGAL/Minkowski_sum_3/PointMark.h | 4 +- .../bipartite_nary_union_sorted_combined.h | 4 +- .../CGAL/Mixed_integer_program_traits.h | 12 +- .../include/CGAL/Modifiable_priority_queue.h | 18 +- thirdparty/CGAL/include/CGAL/Modifier_base.h | 4 +- .../CGAL/Modular_arithmetic/Residue_type.h | 6 +- thirdparty/CGAL/include/CGAL/Modular_traits.h | 4 +- .../CGAL/include/CGAL/Monge_via_jet_fitting.h | 8 +- thirdparty/CGAL/include/CGAL/Mpzf.h | 21 +- .../CGAL/include/CGAL/Multi_surface_3.h | 4 +- .../CGAL/include/CGAL/Multiscale_sort.h | 4 +- thirdparty/CGAL/include/CGAL/Multiset.h | 303 +- thirdparty/CGAL/include/CGAL/NT_converter.h | 4 +- thirdparty/CGAL/include/CGAL/N_step_adaptor.h | 4 +- .../include/CGAL/N_step_adaptor_derived.h | 4 +- .../include/CGAL/Named_function_parameters.h | 327 +- .../include/CGAL/Needs_parens_as_product.h | 8 +- .../CGAL/include/CGAL/Nef_2/Bounding_box_2.h | 4 +- .../CGAL/Nef_2/Constrained_triang_traits.h | 4 +- .../CGAL/include/CGAL/Nef_2/HDS_items.h | 22 +- .../CGAL/include/CGAL/Nef_2/Line_to_epoint.h | 4 +- .../CGAL/include/CGAL/Nef_2/Object_handle.h | 4 +- .../CGAL/include/CGAL/Nef_2/Object_index.h | 4 +- .../CGAL/include/CGAL/Nef_2/PM_checker.h | 18 +- .../include/CGAL/Nef_2/PM_const_decorator.h | 21 +- .../CGAL/include/CGAL/Nef_2/PM_decorator.h | 35 +- .../CGAL/include/CGAL/Nef_2/PM_explorer.h | 4 +- .../CGAL/include/CGAL/Nef_2/PM_io_parser.h | 4 +- .../CGAL/include/CGAL/Nef_2/PM_overlayer.h | 99 +- .../include/CGAL/Nef_2/PM_persistent_PL.h | 19 +- .../include/CGAL/Nef_2/PM_point_locator.h | 57 +- .../CGAL/include/CGAL/Nef_2/Polynomial.h | 15 +- .../CGAL/include/CGAL/Nef_2/Polynomial_impl.h | 13 +- .../CGAL/Nef_2/Segment_overlay_traits.h | 22 +- thirdparty/CGAL/include/CGAL/Nef_2/debug.h | 9 +- .../include/CGAL/Nef_2/gen_point_location.h | 22 +- thirdparty/CGAL/include/CGAL/Nef_2/geninfo.h | 6 +- .../CGAL/include/CGAL/Nef_2/iterator_tools.h | 4 +- .../include/CGAL/Nef_3/Binary_operation.h | 35 +- .../CGAL/include/CGAL/Nef_3/Bounding_box_3.h | 4 +- .../CGAL/Nef_3/Combine_with_halfspace.h | 4 +- .../CGAL/include/CGAL/Nef_3/Default_items.h | 4 +- .../include/CGAL/Nef_3/Edge_edge_overlay.h | 6 +- ...xact_triangulation_euclidean_traits_xy_3.h | 32 +- ...xact_triangulation_euclidean_traits_xz_3.h | 32 +- ...xact_triangulation_euclidean_traits_yz_3.h | 32 +- thirdparty/CGAL/include/CGAL/Nef_3/Halfedge.h | 9 +- .../CGAL/include/CGAL/Nef_3/Halffacet.h | 4 +- .../include/CGAL/Nef_3/ID_support_handler.h | 4 +- .../CGAL/include/CGAL/Nef_3/Infimaximal_box.h | 7 +- thirdparty/CGAL/include/CGAL/Nef_3/K3_tree.h | 19 +- .../include/CGAL/Nef_3/Mark_bounded_volumes.h | 8 +- thirdparty/CGAL/include/CGAL/Nef_3/Nef_box.h | 8 +- .../CGAL/include/CGAL/Nef_3/OGL_helper.h | 6 +- .../CGAL/include/CGAL/Nef_3/Pluecker_line_3.h | 4 +- thirdparty/CGAL/include/CGAL/Nef_3/SFace.h | 8 +- .../CGAL/include/CGAL/Nef_3/SHalfedge.h | 9 +- .../CGAL/include/CGAL/Nef_3/SHalfloop.h | 5 +- .../CGAL/include/CGAL/Nef_3/SM_visualizor.h | 4 +- .../include/CGAL/Nef_3/SNC_FM_decorator.h | 10 +- .../CGAL/include/CGAL/Nef_3/SNC_SM_explorer.h | 4 +- .../include/CGAL/Nef_3/SNC_SM_overlayer.h | 6 +- .../include/CGAL/Nef_3/SNC_SM_visualizor.h | 4 +- .../include/CGAL/Nef_3/SNC_const_decorator.h | 16 +- .../CGAL/include/CGAL/Nef_3/SNC_constructor.h | 9 +- .../CGAL/include/CGAL/Nef_3/SNC_decorator.h | 8 +- .../include/CGAL/Nef_3/SNC_decorator_traits.h | 4 +- .../CGAL/Nef_3/SNC_external_structure.h | 84 +- .../include/CGAL/Nef_3/SNC_halfedge_key.h | 95 + .../include/CGAL/Nef_3/SNC_indexed_items.h | 4 +- .../include/CGAL/Nef_3/SNC_intersection.h | 8 +- .../CGAL/include/CGAL/Nef_3/SNC_io_parser.h | 9 +- .../CGAL/include/CGAL/Nef_3/SNC_items.h | 4 +- .../CGAL/include/CGAL/Nef_3/SNC_iteration.h | 4 +- .../include/CGAL/Nef_3/SNC_k3_tree_traits.h | 12 +- thirdparty/CGAL/include/CGAL/Nef_3/SNC_list.h | 4 +- .../include/CGAL/Nef_3/SNC_point_locator.h | 69 +- .../CGAL/include/CGAL/Nef_3/SNC_simplify.h | 12 +- .../CGAL/include/CGAL/Nef_3/SNC_sphere_map.h | 5 +- .../CGAL/include/CGAL/Nef_3/SNC_structure.h | 39 +- thirdparty/CGAL/include/CGAL/Nef_3/Vertex.h | 10 +- thirdparty/CGAL/include/CGAL/Nef_3/Volume.h | 4 +- .../CGAL/Nef_3/binop_intersection_tests.h | 76 +- .../CGAL/include/CGAL/Nef_3/bounded_side_3.h | 4 +- .../CGAL/Nef_3/polygon_mesh_to_nef_3.h | 9 +- ...uotient_coordinates_to_homogeneous_point.h | 4 +- .../CGAL/include/CGAL/Nef_3/shell_to_nef_3.h | 4 +- .../CGAL/Nef_3/vertex_cycle_to_nef_3.h | 9 +- .../include/CGAL/Nef_S2/Generic_handle_map.h | 4 +- .../include/CGAL/Nef_S2/ID_support_handler.h | 4 +- .../CGAL/include/CGAL/Nef_S2/Normalizing.h | 4 +- .../include/CGAL/Nef_S2/OGL_base_object.h | 9 +- .../CGAL/include/CGAL/Nef_S2/SM_checker.h | 4 +- .../include/CGAL/Nef_S2/SM_const_decorator.h | 18 +- .../Nef_S2/SM_constrained_triang_traits.h | 4 +- .../CGAL/include/CGAL/Nef_S2/SM_decorator.h | 12 +- .../include/CGAL/Nef_S2/SM_decorator_traits.h | 4 +- .../CGAL/include/CGAL/Nef_S2/SM_io_parser.h | 6 +- .../CGAL/include/CGAL/Nef_S2/SM_items.h | 14 +- .../CGAL/include/CGAL/Nef_S2/SM_iteration.h | 4 +- thirdparty/CGAL/include/CGAL/Nef_S2/SM_list.h | 4 +- .../CGAL/include/CGAL/Nef_S2/SM_overlayer.h | 28 +- .../include/CGAL/Nef_S2/SM_point_locator.h | 8 +- .../include/CGAL/Nef_S2/SM_triangulator.h | 18 +- .../CGAL/include/CGAL/Nef_S2/SM_visualizor.h | 4 +- .../CGAL/include/CGAL/Nef_S2/Sphere_circle.h | 10 +- .../include/CGAL/Nef_S2/Sphere_direction.h | 32 +- .../include/CGAL/Nef_S2/Sphere_geometry.h | 4 +- .../include/CGAL/Nef_S2/Sphere_geometry_OGL.h | 4 +- .../CGAL/include/CGAL/Nef_S2/Sphere_map.h | 20 +- .../CGAL/include/CGAL/Nef_S2/Sphere_point.h | 4 +- .../CGAL/include/CGAL/Nef_S2/Sphere_segment.h | 11 +- .../include/CGAL/Nef_S2/Sphere_triangle.h | 4 +- .../include/CGAL/Nef_S2/leda_sphere_map.h | 6 +- .../include/CGAL/Nef_S2/sphere_predicates.h | 6 +- .../include/CGAL/Nef_nary_intersection_3.h | 4 +- .../CGAL/include/CGAL/Nef_nary_union_3.h | 4 +- .../CGAL/include/CGAL/Nef_polyhedron_2.h | 6 +- .../CGAL/include/CGAL/Nef_polyhedron_3.h | 23 +- .../CGAL/include/CGAL/Nef_polyhedron_S2.h | 4 +- thirdparty/CGAL/include/CGAL/Nef_polynomial.h | 4 +- .../CGAL/include/CGAL/Nef_polynomial_fwd.h | 9 +- .../CGAL/include/CGAL/Nested_iterator.h | 4 +- .../CGAL/NewKernel_d/Cartesian_LA_base.h | 26 +- .../CGAL/NewKernel_d/Cartesian_LA_functors.h | 32 +- .../include/CGAL/NewKernel_d/Cartesian_base.h | 4 +- .../CGAL/NewKernel_d/Cartesian_change_FT.h | 4 +- .../CGAL/NewKernel_d/Cartesian_complete.h | 4 +- .../CGAL/NewKernel_d/Cartesian_filter_K.h | 13 +- .../CGAL/NewKernel_d/Cartesian_filter_NT.h | 4 +- .../NewKernel_d/Cartesian_per_dimension.h | 4 +- .../NewKernel_d/Cartesian_static_filters.h | 11 +- .../CGAL/include/CGAL/NewKernel_d/Coaffine.h | 4 +- .../CGAL/NewKernel_d/Define_kernel_types.h | 4 +- .../include/CGAL/NewKernel_d/Dimension_base.h | 4 +- .../CGAL/NewKernel_d/Filtered_predicate2.h | 4 +- .../CGAL/NewKernel_d/KernelD_converter.h | 23 +- .../CGAL/NewKernel_d/Kernel_2_interface.h | 4 +- .../CGAL/NewKernel_d/Kernel_3_interface.h | 4 +- .../CGAL/NewKernel_d/Kernel_d_interface.h | 8 +- .../NewKernel_d/Kernel_object_converter.h | 4 +- .../include/CGAL/NewKernel_d/LA_eigen/LA.h | 13 +- .../CGAL/NewKernel_d/LA_eigen/constructors.h | 5 +- .../include/CGAL/NewKernel_d/Lazy_cartesian.h | 11 +- .../NewKernel_d/Types/Aff_transformation.h | 4 +- .../CGAL/NewKernel_d/Types/Hyperplane.h | 4 +- .../include/CGAL/NewKernel_d/Types/Iso_box.h | 4 +- .../include/CGAL/NewKernel_d/Types/Line.h | 4 +- .../CGAL/include/CGAL/NewKernel_d/Types/Ray.h | 4 +- .../include/CGAL/NewKernel_d/Types/Segment.h | 6 +- .../include/CGAL/NewKernel_d/Types/Sphere.h | 4 +- .../CGAL/NewKernel_d/Types/Weighted_point.h | 4 +- .../include/CGAL/NewKernel_d/Vector/array.h | 9 +- .../include/CGAL/NewKernel_d/Vector/avx4.h | 16 +- ...rator_to_points_from_iterator_to_vectors.h | 6 +- ...minant_of_iterator_to_points_from_points.h | 14 +- ...nant_of_iterator_to_vectors_from_vectors.h | 14 +- .../determinant_of_points_from_vectors.h | 14 +- .../Vector/determinant_of_vectors_small_dim.h | 4 +- ...eterminant_of_vectors_small_dim_internal.h | 14 +- .../include/CGAL/NewKernel_d/Vector/mix.h | 4 +- .../include/CGAL/NewKernel_d/Vector/sse2.h | 14 +- .../include/CGAL/NewKernel_d/Vector/v2int.h | 12 +- .../include/CGAL/NewKernel_d/Vector/vector.h | 7 +- .../CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h | 26 +- .../CGAL/NewKernel_d/Wrapper/Hyperplane_d.h | 8 +- .../CGAL/NewKernel_d/Wrapper/Point_d.h | 8 +- .../CGAL/NewKernel_d/Wrapper/Ref_count_obj.h | 8 +- .../CGAL/NewKernel_d/Wrapper/Segment_d.h | 8 +- .../CGAL/NewKernel_d/Wrapper/Sphere_d.h | 8 +- .../CGAL/NewKernel_d/Wrapper/Vector_d.h | 8 +- .../NewKernel_d/Wrapper/Weighted_point_d.h | 9 +- .../NewKernel_d/function_objects_cartesian.h | 22 +- .../CGAL/NewKernel_d/functor_properties.h | 6 +- .../include/CGAL/NewKernel_d/functor_tags.h | 41 +- .../include/CGAL/NewKernel_d/static_int.h | 4 +- .../include/CGAL/NewKernel_d/store_kernel.h | 4 +- .../CGAL/include/CGAL/NewKernel_d/utils.h | 25 +- .../CGAL/No_intersection_surface_sweep_2.h | 17 +- thirdparty/CGAL/include/CGAL/Null_matrix.h | 4 +- .../CGAL/include/CGAL/Number_type_checker.h | 6 +- .../internal/Exact_type_selector.h | 228 +- .../internal_functions_comparison_root_of_2.h | 4 +- thirdparty/CGAL/include/CGAL/OFF_to_nef_3.h | 4 +- .../CGAL/OSQP_quadratic_program_traits.h | 132 +- thirdparty/CGAL/include/CGAL/OTR_2/Cost.h | 4 +- .../CGAL/OTR_2/Reconstruction_edge_2.h | 4 +- .../CGAL/OTR_2/Reconstruction_face_base_2.h | 4 +- .../OTR_2/Reconstruction_triangulation_2.h | 40 +- .../CGAL/OTR_2/Reconstruction_vertex_base_2.h | 4 +- thirdparty/CGAL/include/CGAL/OTR_2/Sample.h | 4 +- thirdparty/CGAL/include/CGAL/Object.h | 28 +- thirdparty/CGAL/include/CGAL/Octree.h | 4 +- .../compute_registration_transformation.h | 17 +- .../include/CGAL/OpenGR/register_point_sets.h | 18 +- .../Oriented_bounding_box_traits_3.h | 6 +- .../Optimal_bounding_box/internal/evolution.h | 8 +- .../internal/fitness_function.h | 16 +- .../Optimal_bounding_box/internal/helper.h | 4 +- .../internal/nelder_mead_functions.h | 4 +- .../internal/optimize_2.h | 16 +- .../internal/population.h | 8 +- .../oriented_bounding_box.h | 35 +- .../Optimal_transportation_reconstruction_2.h | 15 +- .../Optimisation/Access_coordinates_begin_2.h | 4 +- .../Optimisation/Access_coordinates_begin_3.h | 4 +- .../Optimisation/Access_coordinates_begin_d.h | 4 +- .../CGAL/Optimisation/Access_dimension_2.h | 4 +- .../CGAL/Optimisation/Access_dimension_3.h | 4 +- .../CGAL/Optimisation/Access_dimension_d.h | 4 +- .../CGAL/Optimisation/Construct_point_2.h | 4 +- .../CGAL/Optimisation/Construct_point_3.h | 4 +- .../CGAL/Optimisation/Construct_point_d.h | 4 +- .../CGAL/include/CGAL/Optimisation/basic.h | 5 +- .../CGAL/include/CGAL/Optimisation/debug.h | 4 +- .../include/CGAL/Optimisation_d_traits_2.h | 4 +- .../include/CGAL/Optimisation_d_traits_3.h | 4 +- .../include/CGAL/Optimisation_d_traits_d.h | 4 +- .../CGAL/include/CGAL/Orientation_Linf_2.h | 4 +- thirdparty/CGAL/include/CGAL/Origin.h | 4 +- thirdparty/CGAL/include/CGAL/Origin_impl.h | 4 +- .../Orthogonal_incremental_neighbor_search.h | 92 +- .../CGAL/Orthogonal_k_neighbor_search.h | 4 +- thirdparty/CGAL/include/CGAL/Orthtree.h | 6 +- .../include/CGAL/Orthtree/Cartesian_ranges.h | 4 +- thirdparty/CGAL/include/CGAL/Orthtree/IO.h | 4 +- thirdparty/CGAL/include/CGAL/Orthtree/Node.h | 26 +- .../include/CGAL/Orthtree/Split_predicates.h | 4 +- .../CGAL/Orthtree/Traversal_iterator.h | 4 +- .../CGAL/include/CGAL/Orthtree/Traversals.h | 12 +- .../CGAL/include/CGAL/Orthtree_traits_2.h | 6 +- .../CGAL/include/CGAL/Orthtree_traits_3.h | 6 +- .../CGAL/include/CGAL/Orthtree_traits_d.h | 6 +- thirdparty/CGAL/include/CGAL/PCA_util.h | 14 +- thirdparty/CGAL/include/CGAL/PCA_util_Eigen.h | 14 +- thirdparty/CGAL/include/CGAL/Parabola_2.h | 4 +- .../CGAL/include/CGAL/Parabola_segment_2.h | 4 +- .../CGAL/Partition_2/Circulator_pair.h | 4 +- .../CGAL/Partition_2/Indirect_edge_compare.h | 4 +- .../CGAL/Partition_2/Indirect_less_xy_2.h | 4 +- .../CGAL/Partition_2/Indirect_not_less_yx_2.h | 4 +- .../include/CGAL/Partition_2/Iterator_list.h | 4 +- .../CGAL/include/CGAL/Partition_2/Matrix.h | 4 +- .../Partition_opt_cvx_diagonal_list.h | 4 +- .../CGAL/Partition_2/Partition_opt_cvx_edge.h | 4 +- .../Partition_2/Partition_opt_cvx_vertex.h | 4 +- .../Partition_2/Partition_traits_2_base.h | 4 +- .../CGAL/Partition_2/Partition_vertex_map.h | 6 +- .../CGAL/Partition_2/Partitioned_polygon_2.h | 4 +- .../CGAL/Partition_2/Point_pair_less_xy_2.h | 4 +- .../CGAL/Partition_2/Rotation_tree_2.h | 6 +- .../CGAL/Partition_2/Rotation_tree_2_impl.h | 11 +- .../CGAL/Partition_2/Rotation_tree_node_2.h | 4 +- .../CGAL/Partition_2/Segment_less_yx_2.h | 4 +- .../Triangulation_indirect_traits_2.h | 4 +- .../include/CGAL/Partition_2/Turn_reverser.h | 4 +- .../Partition_2/Vertex_visibility_graph_2.h | 4 +- .../Vertex_visibility_graph_2_impl.h | 11 +- .../Partition_2/is_degenerate_polygon_2.h | 4 +- .../Partition_2/partition_approx_convex_2.h | 10 +- .../partition_greene_approx_convex_2.h | 16 +- .../Partition_2/partition_optimal_convex_2.h | 10 +- .../CGAL/Partition_2/partition_y_monotone_2.h | 12 +- .../CGAL/Partition_is_valid_traits_2.h | 4 +- .../CGAL/include/CGAL/Partition_traits_2.h | 4 +- .../include/CGAL/Partition_traits_adapter_2.h | 4 +- .../CGAL/include/CGAL/Path_on_surface.h | 112 +- .../Periodic_2_Delaunay_triangulation_2.h | 57 +- ...riodic_2_Delaunay_triangulation_traits_2.h | 4 +- .../CGAL/include/CGAL/Periodic_2_offset_2.h | 10 +- .../include/CGAL/Periodic_2_triangulation_2.h | 481 +- .../Functor_with_offset_points_adaptor_2.h | 4 +- ...Delaunay_triangulation_filtered_traits_2.h | 4 +- ...iangulation_statically_filtered_traits_2.h | 4 +- .../internal/Periodic_2_construct_point_2.h | 4 +- ...riodic_2_triangulation_filtered_traits_2.h | 4 +- ...iangulation_statically_filtered_traits_2.h | 4 +- .../Static_filters/Periodic_2_orientation_2.h | 4 +- .../Periodic_2_side_of_oriented_circle_2.h | 4 +- .../CGAL/Periodic_2_triangulation_dummy_12.h | 6 +- .../Periodic_2_triangulation_face_base_2.h | 8 +- .../Periodic_2_triangulation_hierarchy_2.h | 14 +- .../Periodic_2_triangulation_iterators_2.h | 386 +- .../CGAL/Periodic_2_triangulation_traits_2.h | 5 +- .../Periodic_2_triangulation_vertex_base_2.h | 4 +- .../Periodic_3_Delaunay_triangulation_3.h | 84 +- ...riodic_3_Delaunay_triangulation_traits_3.h | 4 +- .../CGAL/Periodic_3_function_wrapper.h | 11 +- .../CGAL/Periodic_3_mesh_3/IO/File_medit.h | 137 +- .../Protect_edges_sizing_field.h | 167 +- .../include/CGAL/Periodic_3_mesh_3/config.h | 8 +- .../CGAL/Periodic_3_mesh_triangulation_3.h | 436 +- .../CGAL/include/CGAL/Periodic_3_offset_3.h | 26 +- .../CGAL/Periodic_3_regular_triangulation_3.h | 124 +- ...eriodic_3_regular_triangulation_traits_3.h | 12 +- .../include/CGAL/Periodic_3_triangulation_3.h | 891 ++-- .../Functor_with_offset_points_adaptor_3.h | 4 +- ...or_with_offset_weighted_points_adaptor_3.h | 4 +- ...Delaunay_triangulation_filtered_traits_3.h | 4 +- ...3_Delaunay_triangulation_remove_traits_3.h | 5 +- ...iangulation_statically_filtered_traits_3.h | 4 +- .../internal/Periodic_3_construct_point_3.h | 4 +- .../Periodic_3_construct_weighted_point_3.h | 4 +- ...riodic_3_regular_triangulation_dummy_288.h | 8 +- ..._regular_triangulation_filtered_traits_3.h | 4 +- ..._3_regular_triangulation_remove_traits_3.h | 4 +- ...iangulation_statically_filtered_traits_3.h | 4 +- .../Periodic_3_triangulation_dummy_36.h | 6 +- ...Periodic_3_triangulation_dummy_generator.h | 638 +++ ...riodic_3_triangulation_filtered_traits_3.h | 4 +- .../Periodic_3_triangulation_iterators_3.h | 425 +- ...iangulation_statically_filtered_traits_3.h | 4 +- ..._periodic_weighted_circumcenter_traits_3.h | 123 +- .../Static_filters/Periodic_3_orientation_3.h | 4 +- ..._3_power_side_of_oriented_power_sphere_3.h | 9 +- .../Periodic_3_side_of_oriented_sphere_3.h | 4 +- .../internal/canonicalize_helper.h | 245 +- .../Periodic_3_triangulation_ds_cell_base_3.h | 29 +- ...eriodic_3_triangulation_ds_vertex_base_3.h | 4 +- .../Periodic_3_triangulation_hierarchy_3.h | 10 +- .../CGAL/Periodic_3_triangulation_traits_3.h | 20 +- ...ic_4_hyperbolic_Delaunay_triangulation_2.h | 24 +- ...perbolic_Delaunay_triangulation_traits_2.h | 28 +- .../Periodic_4_hyperbolic_triangulation_2.h | 42 +- ...Dehn_hyperbolic_octagon_translation_word.h | 4 +- .../Hyperbolic_octagon_translation_matrix.h | 4 +- .../Hyperbolic_octagon_translation_word.h | 4 +- ...odic_4_hyperbolic_triangulation_dummy_14.h | 7 +- ...c_4_hyperbolic_triangulation_face_base_2.h | 9 +- ...4_hyperbolic_triangulation_vertex_base_2.h | 4 +- thirdparty/CGAL/include/CGAL/Plane_3.h | 12 +- .../CGAL/include/CGAL/Plane_separator.h | 4 +- thirdparty/CGAL/include/CGAL/Point_2.h | 9 +- thirdparty/CGAL/include/CGAL/Point_3.h | 7 +- .../CGAL/include/CGAL/Point_container.h | 10 +- thirdparty/CGAL/include/CGAL/Point_set_2.h | 4 +- thirdparty/CGAL/include/CGAL/Point_set_3.h | 141 +- thirdparty/CGAL/include/CGAL/Point_set_3/IO.h | 6 +- .../CGAL/include/CGAL/Point_set_3/IO/LAS.h | 8 +- .../CGAL/include/CGAL/Point_set_3/IO/OFF.h | 6 +- .../CGAL/include/CGAL/Point_set_3/IO/PLY.h | 72 +- .../CGAL/include/CGAL/Point_set_3/IO/XYZ.h | 6 +- .../internal/Callback_wrapper.h | 4 +- .../internal/Neighbor_query.h | 5 +- .../internal/Rich_grid.h | 12 +- .../internal/Search_traits_vertex_handle_3.h | 4 +- .../voronoi_covariance_3.h | 27 +- .../voronoi_covariance_sphere_3.h | 4 +- .../internal/bbox_diagonal.h | 4 +- thirdparty/CGAL/include/CGAL/Point_traits.h | 4 +- .../CGAL/include/CGAL/Point_with_normal_3.h | 6 +- .../CGAL/Point_with_psc_localisation.h | 4 +- .../include/CGAL/Point_with_surface_index.h | 4 +- .../Point_with_surface_index_geom_traits.h | 4 +- .../include/CGAL/Poisson_implicit_surface_3.h | 4 +- .../CGAL/Poisson_mesh_cell_criteria_3.h | 4 +- .../CGAL/Poisson_reconstruction_function.h | 22 +- thirdparty/CGAL/include/CGAL/Polychain_2.h | 4 +- thirdparty/CGAL/include/CGAL/Polygon_2.h | 30 +- .../Polygon_2/Polygon_2_algorithms_impl.h | 40 +- .../Polygon_2/Polygon_2_edge_circulator.h | 8 +- .../CGAL/Polygon_2/Polygon_2_edge_iterator.h | 4 +- .../include/CGAL/Polygon_2/Polygon_2_impl.h | 5 +- .../CGAL/Polygon_2/Polygon_2_simplicity.h | 20 +- .../Polygon_2/Polygon_2_vertex_circulator.h | 4 +- .../CGAL/include/CGAL/Polygon_2_algorithms.h | 8 +- .../CGAL/Polygon_convex_decomposition_2.h | 10 +- .../Adaptive_sizing_field.h | 282 + .../IO/polygon_mesh_io.h | 8 +- .../Non_manifold_feature_map.h | 18 +- .../Uniform_sizing_field.h | 149 + .../angle_and_area_smoothing.h | 30 +- .../Polygon_mesh_processing/autorefinement.h | 1414 +++++ .../CGAL/Polygon_mesh_processing/bbox.h | 10 +- .../CGAL/Polygon_mesh_processing/border.h | 10 +- .../CGAL/Polygon_mesh_processing/clip.h | 15 +- .../Polygon_mesh_processing/compute_normal.h | 21 +- .../connected_components.h | 11 +- .../Polygon_mesh_processing/corefinement.h | 64 +- .../Polygon_mesh_processing/detect_features.h | 8 +- .../CGAL/Polygon_mesh_processing/distance.h | 53 +- .../CGAL/Polygon_mesh_processing/extrude.h | 6 +- .../CGAL/Polygon_mesh_processing/fair.h | 22 +- ...traversal_traits_with_Hausdorff_distance.h | 4 +- ...ABB_traversal_traits_with_transformation.h | 5 +- .../Corefinement/Face_graph_output_builder.h | 75 +- .../Generic_clip_output_builder.h | 8 +- .../internal/Corefinement/Intersection_type.h | 4 +- .../Output_builder_for_autorefinement.h | 6 +- .../internal/Corefinement/Visitor.h | 16 +- .../internal/Corefinement/face_graph_utils.h | 36 +- .../intersect_triangle_and_segment_3.h | 6 +- .../Corefinement/intersection_callbacks.h | 4 +- .../internal/Corefinement/intersection_impl.h | 6 +- .../Corefinement/intersection_nodes.h | 27 +- .../intersection_of_coplanar_triangles_3.h | 18 +- .../internal/Corefinement/predicates.h | 4 +- .../Triangulate_hole_polygon_mesh.h | 14 +- .../Hole_filling/Triangulate_hole_polyline.h | 44 +- .../internal/Hole_filling/do_not_use_DT3.h | 4 +- .../AABB_filtered_projection_traits.h | 6 +- .../Isotropic_remeshing/remesh_impl.h | 279 +- .../Axis_parallel_plane_traits.h | 12 +- .../Polygon_mesh_slicer/Traversal_traits.h | 4 +- .../Point_inside_vertical_ray_cast.h | 16 +- .../Ray_3_Triangle_3_traversal_traits.h | 4 +- .../internal/Sizing_field_base.h | 78 + .../internal/Smoothing/ceres_support.h | 4 +- .../internal/Smoothing/curvature_flow_impl.h | 31 +- .../internal/Smoothing/mesh_smoothing_impl.h | 26 +- .../internal/Smoothing/smoothing_evaluation.h | 4 +- .../internal/Snapping/helper.h | 6 +- .../internal/Snapping/snap.h | 192 +- .../internal/Snapping/snap_vertices.h | 72 +- .../internal/do_no_use_CDT2.h | 4 +- .../internal/fair_impl.h | 10 +- .../mesh_to_point_set_hausdorff_distance.h | 4 +- .../internal/refine_impl.h | 63 +- .../internal/repair_extra.h | 4 +- .../internal/simplify_polyline.h | 8 +- .../interpolated_corrected_curvatures.h | 1193 +++++ .../Polygon_mesh_processing/intersection.h | 122 +- .../CGAL/Polygon_mesh_processing/locate.h | 248 +- .../Polygon_mesh_processing/manifoldness.h | 12 +- .../CGAL/Polygon_mesh_processing/measure.h | 82 +- .../merge_border_vertices.h | 18 +- .../orient_polygon_soup.h | 32 +- .../orient_polygon_soup_extension.h | 18 +- .../Polygon_mesh_processing/orientation.h | 20 +- .../polygon_mesh_to_polygon_soup.h | 10 +- .../polygon_soup_to_polygon_mesh.h | 98 +- .../random_perturbation.h | 6 +- .../CGAL/Polygon_mesh_processing/refine.h | 6 +- .../refine_mesh_at_isolevel.h | 174 + .../Polygon_mesh_processing/region_growing.h | 515 ++ .../CGAL/Polygon_mesh_processing/remesh.h | 126 +- .../remesh_planar_patches.h | 1673 ++++++ .../CGAL/Polygon_mesh_processing/repair.h | 8 +- .../repair_degeneracies.h | 198 +- .../repair_polygon_soup.h | 131 +- .../repair_self_intersections.h | 17 +- .../self_intersections.h | 472 +- .../shape_predicates.h | 33 +- .../Polygon_mesh_processing/smooth_mesh.h | 4 +- .../Polygon_mesh_processing/smooth_shape.h | 49 +- .../Polygon_mesh_processing/stitch_borders.h | 32 +- .../surface_Delaunay_remeshing.h | 306 ++ .../tangential_relaxation.h | 108 +- .../CGAL/Polygon_mesh_processing/transform.h | 6 +- .../CGAL/Polygon_mesh_processing/triangle.h | 91 + .../triangulate_faces.h | 796 +-- .../triangulate_hole.h | 286 +- .../CGAL/include/CGAL/Polygon_mesh_slicer.h | 45 +- .../CGAL/Polygon_nop_decomposition_2.h | 4 +- .../include/CGAL/Polygon_offset_builder_2.h | 47 +- .../CGAL/Polygon_offset_builder_traits_2.h | 120 +- thirdparty/CGAL/include/CGAL/Polygon_set_2.h | 6 +- .../CGAL/include/CGAL/Polygon_traits_2.h | 4 +- .../Polygon_triangulation_decomposition_2.h | 4 +- .../CGAL/Polygon_vertical_decomposition_2.h | 10 +- .../CGAL/include/CGAL/Polygon_with_holes_2.h | 36 +- .../CGAL/include/CGAL/Polygonal_schema.h | 122 +- .../CGAL/include/CGAL/Polygonal_schema_fwd.h | 4 +- .../include/CGAL/Polygonal_schema_min_items.h | 4 +- .../CGAL/Polygonal_surface_reconstruction.h | 19 +- .../internal/alpha_shape_mesh.h | 6 +- .../internal/compute_confidences.h | 6 +- .../internal/hypothesis.h | 6 +- .../internal/parameters.h | 6 +- .../internal/point_set_with_planes.h | 42 +- .../include/CGAL/PolyhedralSurf_neighbors.h | 6 +- .../CGAL/Polyhedral_complex_mesh_domain_3.h | 164 +- .../CGAL/include/CGAL/Polyhedral_envelope.h | 65 +- .../include/CGAL/Polyhedral_mesh_domain_3.h | 260 +- .../Polyhedral_mesh_domain_with_features_3.h | 223 +- thirdparty/CGAL/include/CGAL/Polyhedron_3.h | 20 +- .../CGAL/include/CGAL/Polyhedron_3_fwd.h | 4 +- .../CGAL/include/CGAL/Polyhedron_3_to_lcc.h | 33 +- .../CGAL/include/CGAL/Polyhedron_copy_3.h | 4 +- .../CGAL/Polyhedron_incremental_builder_3.h | 8 +- .../CGAL/include/CGAL/Polyhedron_items_3.h | 4 +- .../include/CGAL/Polyhedron_items_with_id_3.h | 11 +- .../include/CGAL/Polyhedron_min_items_3.h | 4 +- .../CGAL/include/CGAL/Polyhedron_traits_3.h | 4 +- .../CGAL/Polyhedron_traits_with_normals_3.h | 4 +- .../Hybrid_squared_distance_cost.h | 12 +- .../Scaled_squared_distance_cost.h | 16 +- .../Squared_distance_cost.h | 12 +- .../Stop_above_cost_threshold.h | 6 +- .../Stop_below_count_ratio_threshold.h | 8 +- .../Stop_below_count_threshold.h | 6 +- .../Polyline_simplification_2/Vertex_base_2.h | 6 +- .../CGAL/Polyline_simplification_2/simplify.h | 20 +- thirdparty/CGAL/include/CGAL/Polynomial.h | 5 +- .../Polynomial/Algebraic_structure_traits.h | 8 +- .../Cached_extended_euclidean_algorithm.h | 4 +- .../Polynomial/Chinese_remainder_traits.h | 4 +- .../include/CGAL/Polynomial/Coercion_traits.h | 4 +- .../CGAL/include/CGAL/Polynomial/Degree.h | 4 +- .../include/CGAL/Polynomial/Fraction_traits.h | 4 +- .../CGAL/Polynomial/Get_arithmetic_kernel.h | 4 +- .../include/CGAL/Polynomial/Interpolator.h | 4 +- .../include/CGAL/Polynomial/Modular_traits.h | 4 +- .../CGAL/Polynomial/Monomial_representation.h | 4 +- .../include/CGAL/Polynomial/Polynomial_type.h | 16 +- .../CGAL/Polynomial/Real_embeddable_traits.h | 4 +- .../CGAL/Polynomial/Scalar_factor_traits.h | 4 +- .../include/CGAL/Polynomial/bezout_matrix.h | 4 +- .../include/CGAL/Polynomial/determinant.h | 4 +- thirdparty/CGAL/include/CGAL/Polynomial/fwd.h | 4 +- .../include/CGAL/Polynomial/hgdelta_update.h | 4 +- .../CGAL/include/CGAL/Polynomial/misc.h | 6 +- .../include/CGAL/Polynomial/modular_filter.h | 4 +- .../include/CGAL/Polynomial/modular_gcd.h | 4 +- .../Polynomial/modular_gcd_utcf_algorithm_M.h | 6 +- .../CGAL/Polynomial/modular_gcd_utcf_dfai.h | 6 +- .../CGAL/Polynomial/modular_gcd_utils.h | 6 +- .../include/CGAL/Polynomial/polynomial_gcd.h | 4 +- .../polynomial_gcd_implementations.h | 8 +- .../CGAL/Polynomial/polynomial_gcd_ntl.h | 4 +- .../include/CGAL/Polynomial/prs_resultant.h | 4 +- .../CGAL/include/CGAL/Polynomial/resultant.h | 10 +- .../CGAL/Polynomial/square_free_factorize.h | 4 +- .../CGAL/Polynomial/sturm_habicht_sequence.h | 4 +- .../include/CGAL/Polynomial/subresultants.h | 6 +- .../CGAL/include/CGAL/Polynomial_traits_d.h | 20 +- .../include/CGAL/Polynomial_type_generator.h | 4 +- .../CGAL/include/CGAL/Polynomials_1_2.h | 4 +- .../CGAL/include/CGAL/Polynomials_1_3.h | 4 +- .../CGAL/include/CGAL/Polynomials_2_2.h | 4 +- .../CGAL/include/CGAL/Polynomials_2_3.h | 4 +- .../include/CGAL/Polynomials_for_line_3.h | 4 +- .../CGAL/include/CGAL/Polytope_distance_d.h | 42 +- .../CGAL/Polytope_distance_d_traits_2.h | 9 +- .../CGAL/Polytope_distance_d_traits_3.h | 9 +- .../CGAL/Polytope_distance_d_traits_d.h | 9 +- .../CGAL/include/CGAL/Profile_counter.h | 4 +- thirdparty/CGAL/include/CGAL/Profile_timer.h | 4 +- .../CGAL/Projection_on_sphere_traits_3.h | 7 +- .../CGAL/include/CGAL/Projection_traits_3.h | 4 +- .../include/CGAL/Projection_traits_xy_3.h | 4 +- .../include/CGAL/Projection_traits_xz_3.h | 4 +- .../include/CGAL/Projection_traits_yz_3.h | 4 +- thirdparty/CGAL/include/CGAL/QP_functions.h | 4 +- thirdparty/CGAL/include/CGAL/QP_models.h | 6 +- thirdparty/CGAL/include/CGAL/QP_options.h | 6 +- thirdparty/CGAL/include/CGAL/QP_solution.h | 6 +- .../include/CGAL/QP_solver/Initialization.h | 17 +- .../CGAL/QP_solver/QP__filtered_base.h | 4 +- .../CGAL/QP_solver/QP__filtered_base_impl.h | 11 +- .../include/CGAL/QP_solver/QP__partial_base.h | 4 +- .../include/CGAL/QP_solver/QP_basis_inverse.h | 4 +- .../CGAL/QP_solver/QP_basis_inverse_impl.h | 11 +- .../CGAL/QP_solver/QP_exact_bland_pricing.h | 4 +- .../CGAL/QP_solver/QP_full_exact_pricing.h | 4 +- .../CGAL/QP_solver/QP_full_filtered_pricing.h | 4 +- .../CGAL/QP_solver/QP_functions_impl.h | 4 +- .../CGAL/QP_solver/QP_partial_exact_pricing.h | 4 +- .../QP_solver/QP_partial_filtered_pricing.h | 4 +- .../CGAL/QP_solver/QP_pricing_strategy.h | 4 +- .../include/CGAL/QP_solver/QP_solution_impl.h | 4 +- .../CGAL/include/CGAL/QP_solver/QP_solver.h | 10 +- .../CGAL/QP_solver/QP_solver_bounds_impl.h | 11 +- .../include/CGAL/QP_solver/QP_solver_impl.h | 15 +- .../QP_solver_nonstandardform_impl.h | 11 +- .../CGAL/QP_solver/Unbounded_direction.h | 4 +- .../CGAL/include/CGAL/QP_solver/assertions.h | 4 +- .../CGAL/include/CGAL/QP_solver/basic.h | 4 +- .../CGAL/include/CGAL/QP_solver/debug.h | 4 +- .../CGAL/include/CGAL/QP_solver/functors.h | 4 +- .../include/CGAL/Qt/AlphaShapeGraphicsItem.h | 4 +- .../CGAL/Qt/ApolloniusGraphGraphicsItem.h | 4 +- .../CGAL/include/CGAL/Qt/Basic_viewer_qt.h | 14 +- .../CGAL/include/CGAL/Qt/CGAL_Qt_config.h | 13 +- .../include/CGAL/Qt/CircularArcGraphicsItem.h | 4 +- .../Qt/ConstrainedTriangulationGraphicsItem.h | 4 +- thirdparty/CGAL/include/CGAL/Qt/Converter.h | 13 +- .../include/CGAL/Qt/CreateOpenGLContext.h | 18 +- .../DelaunayMeshTriangulationGraphicsItem.h | 4 +- .../CGAL/include/CGAL/Qt/DemosMainWindow.h | 9 +- .../include/CGAL/Qt/DemosMainWindow_impl.h | 56 +- .../CGAL/include/CGAL/Qt/GraphicsItem.h | 4 +- .../include/CGAL/Qt/GraphicsViewCircleInput.h | 4 +- .../CGAL/Qt/GraphicsViewCircularArcInput.h | 4 +- .../CGAL/include/CGAL/Qt/GraphicsViewInput.h | 4 +- .../CGAL/Qt/GraphicsViewIsoRectangleInput.h | 4 +- .../include/CGAL/Qt/GraphicsViewLineInput.h | 4 +- .../include/CGAL/Qt/GraphicsViewNavigation.h | 4 +- .../CGAL/Qt/GraphicsViewNavigation_impl.h | 4 +- .../include/CGAL/Qt/GraphicsViewPointInput.h | 4 +- .../Qt/GraphicsViewPolygonWithHolesInput.h | 4 +- .../CGAL/Qt/GraphicsViewPolylineInput.h | 8 +- .../CGAL/Qt/GraphicsViewPolylineInput_impl.h | 4 +- .../CGAL/include/CGAL/Qt/ImageInterface.ui | 306 ++ .../CGAL/include/CGAL/Qt/LineGraphicsItem.h | 4 +- .../CGAL/include/CGAL/Qt/PainterOstream.h | 4 +- .../CGAL/include/CGAL/Qt/PointsGraphicsItem.h | 4 +- .../CGAL/Qt/PointsInKdTreeGraphicsItem.h | 4 +- .../include/CGAL/Qt/PolygonGraphicsItem.h | 4 +- .../CGAL/Qt/PolygonWithHolesGraphicsItem.h | 4 +- .../include/CGAL/Qt/PolylinesGraphicsItem.h | 4 +- .../CGAL/Qt/PowerdiagramGraphicsItem.h | 4 +- .../include/CGAL/Qt/RegularGridGraphicsItem.h | 4 +- .../Qt/RegularGridVectorFieldGraphicsItem.h | 4 +- .../Qt/RegularTriangulationGraphicsItem.h | 4 +- .../Qt/SegmentDelaunayGraphGraphicsItem.h | 4 +- .../Qt/SegmentDelaunayGraphLinfGraphicsItem.h | 4 +- .../include/CGAL/Qt/SegmentsGraphicsItem.h | 4 +- .../include/CGAL/Qt/StreamLinesGraphicsItem.h | 4 +- .../CGAL/Qt/TriangulationGraphicsItem.h | 4 +- .../include/CGAL/Qt/VoronoiGraphicsItem.h | 4 +- thirdparty/CGAL/include/CGAL/Qt/camera.h | 5 +- thirdparty/CGAL/include/CGAL/Qt/camera_impl.h | 6 +- thirdparty/CGAL/include/CGAL/Qt/constraint.h | 4 +- .../CGAL/include/CGAL/Qt/constraint_impl.h | 4 +- thirdparty/CGAL/include/CGAL/Qt/debug.h | 4 +- thirdparty/CGAL/include/CGAL/Qt/debug_impl.h | 7 +- thirdparty/CGAL/include/CGAL/Qt/frame.h | 8 +- thirdparty/CGAL/include/CGAL/Qt/frame_impl.h | 12 +- .../CGAL/include/CGAL/Qt/image_interface.h | 4 +- .../CGAL/include/CGAL/Qt/init_ogl_context.h | 4 +- .../include/CGAL/Qt/keyFrameInterpolator.h | 6 +- .../CGAL/Qt/keyFrameInterpolator_impl.h | 6 +- .../include/CGAL/Qt/manipulatedCameraFrame.h | 6 +- .../CGAL/Qt/manipulatedCameraFrame_impl.h | 28 +- .../CGAL/include/CGAL/Qt/manipulatedFrame.h | 6 +- .../include/CGAL/Qt/manipulatedFrame_impl.h | 22 +- .../CGAL/include/CGAL/Qt/mouseGrabber.h | 6 +- .../CGAL/include/CGAL/Qt/mouseGrabber_impl.h | 4 +- thirdparty/CGAL/include/CGAL/Qt/qglviewer.h | 61 +- .../CGAL/include/CGAL/Qt/qglviewer_impl.h | 647 +-- .../include/CGAL/Qt/qglviewer_impl_list.h | 4 +- thirdparty/CGAL/include/CGAL/Qt/quaternion.h | 6 +- .../CGAL/include/CGAL/Qt/quaternion_impl.h | 4 +- thirdparty/CGAL/include/CGAL/Qt/resources.h | 4 +- .../CGAL/include/CGAL/Qt/resources_impl.h | 4 +- thirdparty/CGAL/include/CGAL/Qt/utility.h | 4 +- .../CGAL/include/CGAL/Qt/utility_impl.h | 4 +- thirdparty/CGAL/include/CGAL/Qt/vec.h | 6 +- thirdparty/CGAL/include/CGAL/Qt/vec_impl.h | 6 +- .../CGAL/include/CGAL/Qt/viewer_actions.h | 4 +- thirdparty/CGAL/include/CGAL/Quadtree.h | 4 +- thirdparty/CGAL/include/CGAL/Quotient.h | 12 +- thirdparty/CGAL/include/CGAL/Quotient_fwd.h | 4 +- .../CGAL/include/CGAL/RS/Gmpfr_make_unique.h | 4 +- thirdparty/CGAL/include/CGAL/RS/ak_1.h | 4 +- thirdparty/CGAL/include/CGAL/RS/ak_z_1.h | 4 +- thirdparty/CGAL/include/CGAL/RS/algebraic_1.h | 6 +- .../CGAL/include/CGAL/RS/algebraic_z_1.h | 4 +- .../include/CGAL/RS/bisection_refiner_1.h | 4 +- .../CGAL/include/CGAL/RS/comparator_1.h | 4 +- thirdparty/CGAL/include/CGAL/RS/dyadic.h | 4 +- .../CGAL/include/CGAL/RS/exact_signat_1.h | 4 +- thirdparty/CGAL/include/CGAL/RS/functors_1.h | 4 +- .../CGAL/include/CGAL/RS/functors_z_1.h | 4 +- .../include/CGAL/RS/polynomial_converter_1.h | 4 +- .../CGAL/include/CGAL/RS/rs23_k_isolator_1.h | 4 +- thirdparty/CGAL/include/CGAL/RS/rs2_calls.h | 7 +- .../CGAL/include/CGAL/RS/rs2_isolator_1.h | 4 +- .../CGAL/include/CGAL/RS/rs3_k_refiner_1.h | 4 +- .../CGAL/include/CGAL/RS/rs3_refiner_1.h | 4 +- thirdparty/CGAL/include/CGAL/RS/signat_1.h | 7 +- thirdparty/CGAL/include/CGAL/Random.h | 4 +- .../CGAL/include/CGAL/Random_access_adaptor.h | 4 +- .../CGAL/Random_access_value_adaptor.h | 4 +- .../CGAL/Random_convex_hull_traits_2.h | 4 +- .../include/CGAL/Random_convex_set_traits_2.h | 4 +- thirdparty/CGAL/include/CGAL/Random_impl.h | 11 +- .../include/CGAL/Random_polygon_2_sweep.h | 26 +- .../include/CGAL/Random_polygon_traits_2.h | 4 +- .../include/CGAL/Range_segment_tree_traits.h | 4 +- thirdparty/CGAL/include/CGAL/Range_tree_d.h | 20 +- thirdparty/CGAL/include/CGAL/Range_tree_k.h | 4 +- .../CGAL/include/CGAL/Rational_traits.h | 15 +- thirdparty/CGAL/include/CGAL/Ray_2.h | 9 +- thirdparty/CGAL/include/CGAL/Ray_3.h | 7 +- .../include/CGAL/Real_embeddable_traits.h | 4 +- thirdparty/CGAL/include/CGAL/Real_timer.h | 6 +- .../CGAL/include/CGAL/Real_timer_impl.h | 4 +- .../CGAL/Reconstruction_triangulation_3.h | 13 +- .../CGAL/Rectangular_p_center_traits_2.h | 16 +- .../CGAL/include/CGAL/Referenced_argument.h | 4 +- .../CGAL/include/CGAL/Regular_complex_d.h | 8 +- thirdparty/CGAL/include/CGAL/Regular_grid_2.h | 12 +- .../CGAL/include/CGAL/Regular_triangulation.h | 12 +- .../include/CGAL/Regular_triangulation_2.h | 98 +- .../include/CGAL/Regular_triangulation_3.h | 240 +- ...ular_triangulation_adaptation_policies_2.h | 4 +- ...egular_triangulation_adaptation_traits_2.h | 4 +- .../CGAL/Regular_triangulation_cell_base_3.h | 32 +- ...n_cell_base_with_weighted_circumcenter_3.h | 7 +- ...Regular_triangulation_euclidean_traits_3.h | 4 +- .../CGAL/Regular_triangulation_face_base_2.h | 6 +- .../Regular_triangulation_traits_adapter.h | 4 +- .../Regular_triangulation_vertex_base_2.h | 8 +- .../Regular_triangulation_vertex_base_3.h | 7 +- thirdparty/CGAL/include/CGAL/Residue.h | 4 +- thirdparty/CGAL/include/CGAL/Ridges.h | 15 +- .../Rigid_triangle_mesh_collision_detection.h | 16 +- .../CGAL/Robust_circumcenter_traits_3.h | 4 +- .../CGAL/include/CGAL/Robust_construction.h | 6 +- ..._weighted_circumcenter_filtered_traits_3.h | 28 +- .../CGAL/include/CGAL/Root_for_circles_2_2.h | 6 +- .../CGAL/include/CGAL/Root_for_spheres_2_3.h | 4 +- thirdparty/CGAL/include/CGAL/Root_of_traits.h | 6 +- .../CGAL/Root_of_traits_specializations.h | 4 +- .../CGAL/Rotational_sweep_visibility_2.h | 4 +- .../include/CGAL/Runge_kutta_integrator_2.h | 4 +- .../CGAL/SCIP_mixed_integer_program_traits.h | 11 +- thirdparty/CGAL/include/CGAL/SEP_header.h | 19 +- thirdparty/CGAL/include/CGAL/SEP_to_ImageIO.h | 4 +- .../CGAL/include/CGAL/SMDS_3/Dump_c3t3.h | 143 + .../Mesh_complex_3_in_triangulation_3_fwd.h | 53 + ...n_of_complex_3_in_triangulation_3_to_off.h | 93 + .../internal/Handle_IO_for_pair_of_int.h | 95 + .../CGAL/SMDS_3/internal/SMDS_3_helper.h | 68 + .../CGAL/SMDS_3/internal/indices_management.h | 333 ++ .../CGAL/include/CGAL/SMDS_3/io_signature.h | 363 ++ .../include/CGAL/SMDS_3/tet_soup_to_c3t3.h | 732 +++ .../CGAL/include/CGAL/SMDS_3/utilities.h | 121 + .../STL_Extension/internal/Has_features.h | 41 + .../internal/Has_member_visited.h | 4 +- .../internal/Has_nested_type_Bare_point.h | 4 +- .../internal/boost/array_binary_tree.hpp | 4 +- .../internal/boost/mutable_heap.hpp | 4 +- .../internal/boost/mutable_queue.hpp | 4 +- .../internal/boost/relaxed_heap.hpp | 20 +- .../CGAL/STL_Extension/internal/info_check.h | 4 +- .../internal/mesh_option_classes.h | 236 + .../internal/mesh_parameters_interface.h | 370 ++ .../internal/parameters_interface.h | 133 +- .../CGAL/include/CGAL/Scalar_factor_traits.h | 8 +- .../Advancing_front_mesher.h | 6 +- .../Alpha_shape_mesher.h | 23 +- .../Jet_smoother.h | 14 +- .../Shape_construction_3.h | 6 +- .../Weighted_PCA_smoother.h | 14 +- .../internal/Auto_count.h | 4 +- .../Scale_space_surface_reconstruction_3.h | 44 +- thirdparty/CGAL/include/CGAL/Search_traits.h | 4 +- .../CGAL/include/CGAL/Search_traits_2.h | 4 +- .../CGAL/include/CGAL/Search_traits_3.h | 4 +- .../CGAL/include/CGAL/Search_traits_adapter.h | 47 +- .../CGAL/include/CGAL/Search_traits_d.h | 4 +- thirdparty/CGAL/include/CGAL/Segment_2.h | 9 +- thirdparty/CGAL/include/CGAL/Segment_3.h | 7 +- .../include/CGAL/Segment_Delaunay_graph_2.h | 4 +- .../Are_parallel_C2.h | 4 +- .../Are_same_points_C2.h | 4 +- .../Are_same_segments_C2.h | 4 +- .../Arrangement_enum.h | 4 +- .../Arrangement_type_C2.h | 4 +- .../Arrangement_type_non_intersecting_C2.h | 4 +- .../Basic_predicates_C2.h | 4 +- .../Cartesian_converter.h | 4 +- .../Segment_Delaunay_graph_2/Compare_x_2.h | 4 +- .../Segment_Delaunay_graph_2/Compare_y_2.h | 4 +- .../Construct_storage_site_2.h | 4 +- .../Construct_storage_site_with_info_2.h | 4 +- .../Constructions_C2.h | 4 +- .../Filtered_traits_base_2.h | 4 +- .../Filtered_traits_concept_check_tags.h | 4 +- .../Finite_edge_interior_conflict_C2.h | 4 +- .../Infinite_edge_interior_conflict_C2.h | 4 +- .../Is_degenerate_edge_C2.h | 4 +- .../Kernel_wrapper_2.h | 4 +- .../Segment_Delaunay_graph_2/Orientation_C2.h | 4 +- .../Oriented_side_C2.h | 4 +- .../Oriented_side_of_bisector_C2.h | 4 +- .../Segment_Delaunay_graph_2/Predicates_C2.h | 4 +- .../Segment_Delaunay_graph_2_impl.h | 18 +- .../Segment_Delaunay_graph_hierarchy_2_impl.h | 9 +- .../Sqrt_extension_2.h | 4 +- .../Segment_Delaunay_graph_2/Traits_base_2.h | 4 +- .../Traits_wrapper_2.h | 4 +- .../Triangulation_face_base_with_edges_2.h | 9 +- .../Vertex_conflict_C2.h | 4 +- .../Voronoi_vertex_C2.h | 4 +- .../Voronoi_vertex_ring_C2.h | 6 +- .../Voronoi_vertex_sqrt_field_C2.h | 6 +- .../Voronoi_vertex_sqrt_field_new_C2.h | 4 +- .../CGAL/Segment_Delaunay_graph_2/basic.h | 4 +- .../in_place_edge_list.h | 4 +- .../CGAL/Segment_Delaunay_graph_Linf_2.h | 5 +- .../Basic_predicates_C2.h | 6 +- .../Bisector_Linf.h | 10 +- .../Constructions_C2.h | 18 +- .../Filtered_traits_base_2.h | 4 +- .../Finite_edge_interior_conflict_C2.h | 4 +- .../Infinite_edge_interior_conflict_C2.h | 4 +- .../Orientation_Linf_C2.h | 4 +- .../Oriented_side_C2.h | 4 +- .../Oriented_side_of_bisector_C2.h | 4 +- .../Predicates_C2.h | 4 +- .../Segment_Delaunay_graph_Linf_2_impl.h | 12 +- ...ent_Delaunay_graph_Linf_hierarchy_2_impl.h | 4 +- .../Traits_base_2.h | 4 +- .../Vertex_conflict_C2.h | 4 +- .../Voronoi_vertex_C2.h | 4 +- .../Voronoi_vertex_ring_C2.h | 6 +- .../Voronoi_vertex_sqrt_field_new_C2.h | 4 +- .../Segment_Delaunay_graph_Linf_2/basic.h | 4 +- ...nt_Delaunay_graph_Linf_filtered_traits_2.h | 4 +- .../Segment_Delaunay_graph_Linf_hierarchy_2.h | 4 +- .../Segment_Delaunay_graph_Linf_traits_2.h | 4 +- ...ent_Delaunay_graph_adaptation_policies_2.h | 4 +- ...gment_Delaunay_graph_adaptation_traits_2.h | 4 +- .../CGAL/Segment_Delaunay_graph_face_base_2.h | 4 +- ...Segment_Delaunay_graph_filtered_traits_2.h | 4 +- .../CGAL/Segment_Delaunay_graph_hierarchy_2.h | 4 +- ...t_Delaunay_graph_hierarchy_vertex_base_2.h | 4 +- .../Segment_Delaunay_graph_simple_site_2.h | 4 +- ...ent_Delaunay_graph_simple_storage_site_2.h | 4 +- .../CGAL/Segment_Delaunay_graph_site_2.h | 4 +- .../Segment_Delaunay_graph_storage_site_2.h | 4 +- ..._Delaunay_graph_storage_site_with_info_2.h | 4 +- .../Segment_Delaunay_graph_storage_traits_2.h | 4 +- ...elaunay_graph_storage_traits_with_info_2.h | 4 +- .../CGAL/Segment_Delaunay_graph_traits_2.h | 4 +- .../Segment_Delaunay_graph_vertex_base_2.h | 4 +- thirdparty/CGAL/include/CGAL/Segment_tree_d.h | 24 +- thirdparty/CGAL/include/CGAL/Segment_tree_k.h | 4 +- .../is_pullout_direction.h | 10 +- .../pullout_directions.h | 8 +- .../top_edges.h | 4 +- .../internal/Circle_arrangment.h | 8 +- .../internal/Utils.h | 4 +- .../CGAL/include/CGAL/Shape_detection.h | 12 +- .../CGAL/Shape_detection/Efficient_RANSAC.h | 12 +- .../Shape_detection/Efficient_RANSAC/Cone.h | 4 +- .../Efficient_RANSAC/Cylinder.h | 4 +- .../Efficient_RANSAC/Efficient_RANSAC.h | 50 +- .../Efficient_RANSAC_traits.h | 6 +- .../Shape_detection/Efficient_RANSAC/Octree.h | 4 +- .../Shape_detection/Efficient_RANSAC/Plane.h | 4 +- .../Efficient_RANSAC/Shape_base.h | 4 +- .../Shape_detection/Efficient_RANSAC/Sphere.h | 4 +- .../Shape_detection/Efficient_RANSAC/Torus.h | 4 +- .../Efficient_RANSAC/property_map.h | 10 +- .../CGAL/Shape_detection/Region_growing.h | 17 +- .../Region_growing/Point_set.h | 42 + .../Point_set/K_neighbor_query.h | 245 + .../Least_squares_circle_fit_region.h | 410 ++ .../Least_squares_circle_fit_sorting.h | 245 + .../Least_squares_cylinder_fit_region.h | 417 ++ .../Least_squares_cylinder_fit_sorting.h | 255 + .../Point_set/Least_squares_line_fit_region.h | 394 ++ .../Least_squares_line_fit_sorting.h | 233 + .../Least_squares_plane_fit_region.h | 395 ++ .../Least_squares_plane_fit_sorting.h | 234 + .../Least_squares_sphere_fit_region.h | 399 ++ .../Least_squares_sphere_fit_sorting.h | 244 + .../Point_set/Sphere_neighbor_query.h | 243 + .../Region_growing/Polygon_mesh.h | 33 + .../Least_squares_plane_fit_region.h | 436 ++ .../Least_squares_plane_fit_sorting.h | 196 + .../Polygon_mesh/One_ring_neighbor_query.h | 114 + .../Polygon_mesh/Polyline_graph.h | 341 ++ .../Region_growing/Region_growing.h | 581 ++- .../Region_growing/Segment_set.h | 30 + .../Least_squares_line_fit_region.h | 364 ++ .../Least_squares_line_fit_sorting.h | 221 + .../internal/cylinder_fitting.h | 267 + .../Region_growing/internal/property_map.h | 210 +- .../internal/region_growing_traits.h | 98 + .../Region_growing/internal/utils.h | 655 ++- .../CGAL/include/CGAL/Shape_regularization.h | 4 +- .../Contours/Longest_direction_2.h | 6 +- .../Contours/Multiple_directions_2.h | 6 +- .../Contours/User_defined_directions_2.h | 6 +- .../Shape_regularization/QP_regularization.h | 4 +- .../Segments/Angle_regularization_2.h | 6 +- .../Segments/Delaunay_neighbor_query_2.h | 6 +- .../Segments/Offset_regularization_2.h | 6 +- .../internal/Closed_contour_2.h | 4 +- .../internal/Collinear_groups_2.h | 4 +- .../internal/Contour_base_2.h | 8 +- .../internal/Contour_regularization_2.h | 4 +- .../internal/Open_contour_2.h | 4 +- .../internal/Orthogonal_groups_2.h | 4 +- .../internal/Parallel_groups_2.h | 4 +- .../internal/Segment_wrapper_2.h | 4 +- .../internal/Unique_segments_2.h | 4 +- .../Shape_regularization/internal/utils.h | 6 +- .../regularize_contours.h | 4 +- .../Shape_regularization/regularize_planes.h | 6 +- .../regularize_segments.h | 7 +- .../include/CGAL/Side_of_bounded_square_2.h | 4 +- .../include/CGAL/Side_of_oriented_square_2.h | 4 +- .../CGAL/include/CGAL/Side_of_triangle_mesh.h | 10 +- .../CGAL/include/CGAL/Simple_cartesian.h | 4 +- .../include/CGAL/Simple_circular_kernel_2.h | 4 +- .../CGAL/include/CGAL/Simple_homogeneous.h | 4 +- .../CGAL/Simple_polygon_visibility_2.h | 14 +- .../include/CGAL/Simple_spherical_kernel_3.h | 4 +- .../CGAL/Simplicial_mesh_cell_base_3.h | 250 + .../CGAL/Simplicial_mesh_vertex_base_3.h | 274 + thirdparty/CGAL/include/CGAL/Single.h | 4 +- thirdparty/CGAL/include/CGAL/Sixtuple.h | 4 +- .../CGAL/Sizing_field_with_aabb_tree.h | 703 +++ thirdparty/CGAL/include/CGAL/Skin_surface_3.h | 4 +- .../CGAL/include/CGAL/Skin_surface_base_3.h | 9 +- .../CGAL/Skin_surface_filtered_traits_3.h | 4 +- ...n_surface_marching_tetrahedra_observer_3.h | 4 +- .../CGAL/Skin_surface_polyhedral_items_3.h | 4 +- ...e_polyhedral_items_with_face_information.h | 4 +- .../CGAL/Skin_surface_quadratic_surface_3.h | 4 +- .../CGAL/Skin_surface_refinement_policy_3.h | 4 +- .../CGAL/include/CGAL/Skin_surface_traits_3.h | 4 +- thirdparty/CGAL/include/CGAL/Skiplist.h | 4 +- ...mall_side_angle_bisector_decomposition_2.h | 10 +- .../CGAL/include/CGAL/Small_unordered_map.h | 4 +- .../CGAL/include/CGAL/Small_unordered_set.h | 6 +- .../CGAL/include/CGAL/Snap_rounding_2.h | 4 +- .../CGAL/include/CGAL/Snap_rounding_kd_2.h | 11 +- .../include/CGAL/Snap_rounding_traits_2.h | 4 +- .../Sorted_matrix_search_traits_adaptor.h | 4 +- .../CGAL/include/CGAL/Spatial_lock_grid_3.h | 8 +- .../internal/Get_dimension_tag.h | 4 +- .../internal/K_neighbor_search.h | 8 +- .../internal/Search_helpers.h | 4 +- .../internal/bounded_priority_queue.h | 7 +- .../CGAL/Spatial_sort_traits_adapter_2.h | 4 +- .../CGAL/Spatial_sort_traits_adapter_3.h | 4 +- .../CGAL/Spatial_sort_traits_adapter_d.h | 4 +- .../internal/Transform_coordinates_traits_3.h | 4 +- thirdparty/CGAL/include/CGAL/Sphere_3.h | 9 +- .../CGAL/include/CGAL/Spherical_kernel_3.h | 4 +- .../CGAL/Spherical_kernel_intersections.h | 4 +- .../Spherical_kernel_type_equality_wrapper.h | 9 +- thirdparty/CGAL/include/CGAL/Splitters.h | 4 +- thirdparty/CGAL/include/CGAL/Sqrt_extension.h | 4 +- .../Algebraic_extension_traits.h | 4 +- .../Algebraic_structure_traits.h | 12 +- .../Sqrt_extension/Chinese_remainder_traits.h | 4 +- .../CGAL/Sqrt_extension/Coercion_traits.h | 10 +- .../CGAL/Sqrt_extension/Eigen_NumTraits.h | 4 +- .../CGAL/Sqrt_extension/Fraction_traits.h | 14 +- .../Sqrt_extension/Get_arithmetic_kernel.h | 4 +- .../CGAL/Sqrt_extension/Modular_traits.h | 4 +- .../Sqrt_extension/Real_embeddable_traits.h | 4 +- .../Sqrt_extension/Scalar_factor_traits.h | 4 +- .../CGAL/Sqrt_extension/Sqrt_extension_type.h | 42 +- .../include/CGAL/Sqrt_extension/Wang_traits.h | 4 +- .../CGAL/Sqrt_extension/convert_to_bfi.h | 8 +- .../CGAL/include/CGAL/Sqrt_extension/io.h | 4 +- .../CGAL/include/CGAL/Sqrt_extension_fwd.h | 4 +- .../include/CGAL/Static_filtered_predicate.h | 4 +- .../CGAL/include/CGAL/Straight_skeleton_2.h | 20 +- .../CGAL/Straight_skeleton_2/IO/Dxf_stream.h | 321 ++ .../CGAL/Straight_skeleton_2/IO/Dxf_writer.h | 283 + .../CGAL/Straight_skeleton_2/IO/print.h | 161 + .../Straight_skeleton_2/Polygon_iterators.h | 118 +- .../Polygon_offset_builder_2_impl.h | 26 +- .../Straight_skeleton_aux.h | 103 +- .../Straight_skeleton_builder_2_impl.h | 652 ++- .../Straight_skeleton_builder_events_2.h | 57 +- .../Straight_skeleton_builder_traits_2_aux.h | 164 +- ...traight_skeleton_builder_traits_2_caches.h | 129 + .../CGAL/Straight_skeleton_2/assertions.h | 17 +- .../include/CGAL/Straight_skeleton_2/debug.h | 102 +- .../include/CGAL/Straight_skeleton_2/test.h | 28 +- .../CGAL/Straight_skeleton_builder_2.h | 279 +- .../CGAL/Straight_skeleton_builder_traits_2.h | 623 ++- .../CGAL/Straight_skeleton_converter_2.h | 45 +- .../CGAL/Straight_skeleton_face_base_2.h | 4 +- .../CGAL/Straight_skeleton_halfedge_base_2.h | 71 +- .../include/CGAL/Straight_skeleton_items_2.h | 7 +- .../CGAL/Straight_skeleton_vertex_base_2.h | 15 +- thirdparty/CGAL/include/CGAL/Stream_lines_2.h | 10 +- .../internal/Geometry_container.h | 8 +- .../internal/Euler_extensions.h | 4 +- .../internal/subdivision_hosts_impl_3.h | 5 +- .../subdivision_hosts_3.h | 4 +- .../subdivision_masks_3.h | 20 +- .../subdivision_methods_3.h | 8 +- thirdparty/CGAL/include/CGAL/Subiterator.h | 9 +- thirdparty/CGAL/include/CGAL/Surface_mesh.h | 4 +- .../CGAL/include/CGAL/Surface_mesh/IO.h | 4 +- .../CGAL/include/CGAL/Surface_mesh/IO/3MF.h | 4 +- .../CGAL/include/CGAL/Surface_mesh/IO/OFF.h | 12 +- .../CGAL/include/CGAL/Surface_mesh/IO/PLY.h | 410 +- .../include/CGAL/Surface_mesh/Properties.h | 24 +- .../include/CGAL/Surface_mesh/Surface_mesh.h | 142 +- .../CGAL/Surface_mesh/Surface_mesh_fwd.h | 4 +- .../L21_metric_plane_proxy.h | 6 +- .../L2_metric_plane_proxy.h | 6 +- .../approximate_triangle_mesh.h | 6 +- .../include/CGAL/Surface_mesh_cell_base_3.h | 4 +- ...urface_mesh_complex_2_in_triangulation_3.h | 4 +- .../CGAL/Surface_mesh_default_criteria_3.h | 4 +- .../Surface_mesh_default_edges_criteria_3.h | 4 +- .../Surface_mesh_default_triangulation_3.h | 4 +- .../include/CGAL/Surface_mesh_deformation.h | 4 +- .../ARAP_parameterizer_3.h | 36 +- .../Barycentric_mapping_parameterizer_3.h | 11 +- .../Circular_border_parameterizer_3.h | 14 +- .../Discrete_authalic_parameterizer_3.h | 8 +- .../Discrete_conformal_map_parameterizer_3.h | 8 +- .../Error_code.h | 4 +- .../Fixed_border_parameterizer_3.h | 29 +- .../IO/File_off.h | 4 +- .../Iterative_authalic_parameterizer_3.h | 68 +- .../LSCM_parameterizer_3.h | 248 +- .../MVC_post_processor_3.h | 14 +- .../Mean_value_coordinates_parameterizer_3.h | 8 +- .../Orbifold_Tutte_parameterizer_3.h | 28 +- .../Square_border_parameterizer_3.h | 14 +- .../Two_vertices_parameterizer_3.h | 24 +- .../internal/Bool_property_map.h | 4 +- .../internal/Containers_filler.h | 4 +- .../internal/kernel_traits.h | 4 +- .../internal/orbifold_cone_helper.h | 6 +- .../internal/validity.h | 24 +- .../measure_distortion.h | 6 +- .../orbifold_enums.h | 8 +- .../orbifold_shortest_path.h | 6 +- .../parameterize.h | 12 +- .../internal/AABB_traits.h | 19 +- .../internal/AABB_traversal_traits.h | 8 +- .../internal/Disk_samplers.h | 6 +- .../internal/Expectation_maximization.h | 8 +- .../internal/Filters.h | 12 +- .../internal/K_means_clustering.h | 10 +- .../internal/SDF_calculation.h | 30 +- .../internal/Surface_mesh_segmentation.h | 8 +- .../internal/auxiliary/graph.h | 14 +- .../include/CGAL/Surface_mesh_shortest_path.h | 4 +- .../Surface_mesh_shortest_path.h | 45 +- .../Surface_mesh_shortest_path_traits.h | 10 +- .../Surface_mesh_shortest_path/barycentric.h | 4 +- .../function_objects.h | 8 +- .../internal/Cone_expansion_event.h | 4 +- .../internal/Cone_tree.h | 4 +- .../internal/misc_functions.h | 4 +- .../Edge_collapse_visitor_base.h | 10 +- .../Bounded_distance_placement.h | 20 +- .../Bounded_normal_change_filter.h | 12 +- .../Bounded_normal_change_placement.h | 12 +- .../Edge_collapse/Constrained_placement.h | 6 +- .../Count_ratio_stop_predicate.h | 50 +- .../Edge_collapse/Count_stop_predicate.h | 46 +- .../Edge_count_ratio_stop_predicate.h | 52 + .../Edge_collapse/Edge_count_stop_predicate.h | 50 + .../Policies/Edge_collapse/Edge_length_cost.h | 8 +- .../Edge_length_stop_predicate.h | 4 +- .../Policies/Edge_collapse/Edge_profile.h | 4 +- .../Face_count_ratio_stop_predicate.h | 56 + .../Edge_collapse/Face_count_stop_predicate.h | 52 + .../Edge_collapse/FastEnvelope_filter.h | 18 +- .../GarlandHeckbert_plane_policies.h | 4 +- .../Edge_collapse/GarlandHeckbert_policies.h | 4 +- ...andHeckbert_probabilistic_plane_policies.h | 6 +- ...Heckbert_probabilistic_triangle_policies.h | 6 +- .../GarlandHeckbert_triangle_policies.h | 4 +- .../Policies/Edge_collapse/LindstromTurk.h | 4 +- .../Edge_collapse/LindstromTurk_cost.h | 8 +- .../Edge_collapse/LindstromTurk_placement.h | 6 +- .../Edge_collapse/Midpoint_placement.h | 8 +- .../Polyhedral_envelope_filter.h | 24 +- .../internal/GarlandHeckbert_functions.h | 4 +- .../internal/GarlandHeckbert_policy_base.h | 18 +- .../internal/LindstromTurk_params.h | 4 +- .../internal/Lindstrom_Turk_core.h | 142 +- .../edge_collapse.h | 4 +- .../internal/Common.h | 14 +- .../internal/Edge_collapse.h | 34 +- .../internal/Curve_skeleton.h | 10 +- .../internal/Debug.h | 4 +- .../internal/Detect_degeneracy.h | 4 +- .../internal/Edge_weight_functor.h | 8 +- .../internal/Facewidth.h | 18 +- .../Functors_for_face_graph_wrapper.h | 34 +- .../internal/Generic_map_selector.h | 34 +- .../Iterators_for_face_graph_wrapper.h | 78 +- .../internal/Minimal_quadrangulation.h | 176 +- .../internal/Path_generators.h | 28 +- .../internal/Path_on_surface_with_rle.h | 98 +- .../internal/Shortest_noncontractible_cycle.h | 88 +- .../CGAL/Surface_mesh_traits_generator_3.h | 10 +- .../Surface_mesh_triangulation_generator_3.h | 4 +- .../include/CGAL/Surface_mesh_vertex_base_3.h | 4 +- .../CGAL/Surface_mesher/Combining_oracle.h | 8 +- .../include/CGAL/Surface_mesher/Has_edges.h | 4 +- .../Implicit_surface_oracle_3.h | 44 +- .../Intersection_data_structure_3.h | 4 +- .../CGAL/Surface_mesher/Null_oracle_visitor.h | 4 +- .../Point_surface_indices_oracle_visitor.h | 4 +- .../Poisson_implicit_surface_oracle_3.h | 44 +- .../CGAL/Surface_mesher/Polyhedral_oracle.h | 4 +- .../CGAL/Surface_mesher/Profile_counter.h | 9 +- .../CGAL/Surface_mesher/Profile_timer.h | 4 +- .../CGAL/Surface_mesher/Sphere_oracle_3.h | 6 +- .../CGAL/Surface_mesher/Standard_criteria.h | 4 +- .../CGAL/Surface_mesher/Surface_mesher.h | 6 +- .../Surface_mesher_edges_level.h | 4 +- .../Surface_mesher_edges_level_visitor.h | 4 +- .../Surface_mesher/Surface_mesher_manifold.h | 8 +- .../Surface_mesher_regular_edges.h | 8 +- .../Surface_mesher/Surface_mesher_visitor.h | 4 +- .../CGAL/Surface_mesher/Types_generators.h | 4 +- .../CGAL/Surface_mesher/Verbose_flag.h | 4 +- ...rtices_on_the_same_psc_element_criterion.h | 4 +- .../Vertices_on_the_same_surface_criterion.h | 4 +- .../include/CGAL/Surface_mesher_generator.h | 4 +- .../CGAL/include/CGAL/Surface_sweep_2.h | 19 +- .../Arr_basic_insertion_traits_2.h | 8 +- .../Arr_batched_pl_ss_visitor.h | 4 +- .../Surface_sweep_2/Arr_construction_event.h | 6 +- .../Arr_construction_event_base.h | 10 +- .../Arr_construction_ss_visitor.h | 8 +- .../Arr_construction_subcurve.h | 6 +- .../Arr_default_overlay_traits_base.h | 4 +- .../Arr_insertion_ss_visitor.h | 4 +- .../Surface_sweep_2/Arr_insertion_traits_2.h | 16 +- ...Arr_no_intersection_insertion_ss_visitor.h | 6 +- .../CGAL/Surface_sweep_2/Arr_overlay_event.h | 4 +- .../Surface_sweep_2/Arr_overlay_ss_visitor.h | 59 +- .../Surface_sweep_2/Arr_overlay_subcurve.h | 4 +- .../Surface_sweep_2/Arr_overlay_traits_2.h | 68 +- .../Arr_vert_decomp_ss_visitor.h | 10 +- .../CGAL/Surface_sweep_2/Curve_comparer.h | 4 +- .../CGAL/Surface_sweep_2/Default_event.h | 8 +- .../CGAL/Surface_sweep_2/Default_event_base.h | 10 +- .../CGAL/Surface_sweep_2/Default_subcurve.h | 21 +- .../CGAL/Surface_sweep_2/Default_visitor.h | 4 +- .../Surface_sweep_2/Default_visitor_base.h | 6 +- .../Do_interior_intersect_visitor.h | 4 +- .../CGAL/Surface_sweep_2/Event_comparer.h | 4 +- .../Intersection_points_visitor.h | 4 +- .../No_intersection_surface_sweep_2_impl.h | 8 +- .../CGAL/Surface_sweep_2/No_overlap_event.h | 8 +- .../Surface_sweep_2/No_overlap_event_base.h | 14 +- .../Surface_sweep_2/No_overlap_subcurve.h | 10 +- .../Random_access_output_iterator.h | 4 +- .../CGAL/Surface_sweep_2/Subcurves_visitor.h | 4 +- .../Surface_sweep_2/Surface_sweep_2_debug.h | 4 +- .../Surface_sweep_2/Surface_sweep_2_impl.h | 61 +- .../Surface_sweep_2/Surface_sweep_2_utils.h | 10 +- .../include/CGAL/Surface_sweep_2_algorithms.h | 19 +- .../include/CGAL/Sweep_line_2_algorithms.h | 4 +- .../CGAL/TDS_2/internal/Edge_hash_function.h | 4 +- .../include/CGAL/TDS_2/internal/edge_list.h | 4 +- .../include/CGAL/TDS_3/internal/Dummy_tds_3.h | 4 +- .../internal/Triangulation_ds_circulators_3.h | 124 +- .../internal/Triangulation_ds_iterators_3.h | 5 +- .../TDS_full_cell_default_storage_policy.h | 4 +- .../TDS_full_cell_mirror_storage_policy.h | 4 +- .../Remeshing_cell_base_3.h | 88 +- .../Remeshing_triangulation_3.h | 13 +- .../Remeshing_vertex_base_3.h | 67 +- .../CGAL/Tetrahedral_remeshing/Sizing_field.h | 4 +- .../Uniform_sizing_field.h | 4 +- .../Tetrahedral_remeshing/internal/FMLS.h | 14 +- .../internal/collapse_short_edges.h | 37 +- .../internal/compute_c3t3_statistics.h | 13 +- .../internal/flip_edges.h | 30 +- .../internal/peel_slivers.h | 117 + .../internal/smooth_vertices.h | 61 +- .../internal/split_long_edges.h | 9 +- .../tetrahedral_adaptive_remeshing_impl.h | 254 +- .../internal/tetrahedral_remeshing_helpers.h | 89 +- .../tetrahedral_remeshing_io.h | 4 +- thirdparty/CGAL/include/CGAL/Tetrahedron_3.h | 9 +- .../CGAL/include/CGAL/Three/Buffer_objects.h | 4 +- .../CGAL/include/CGAL/Three/Edge_container.h | 14 +- .../CGAL/include/CGAL/Three/Point_container.h | 14 +- .../Polyhedron_demo_io_plugin_interface.h | 12 +- .../Three/Polyhedron_demo_plugin_helper.h | 4 +- .../Three/Polyhedron_demo_plugin_interface.h | 6 +- .../include/CGAL/Three/Primitive_container.h | 8 +- .../include/CGAL/Three/Scene_draw_interface.h | 4 +- .../include/CGAL/Three/Scene_group_item.h | 34 +- .../CGAL/include/CGAL/Three/Scene_interface.h | 13 +- .../CGAL/include/CGAL/Three/Scene_item.h | 30 +- .../include/CGAL/Three/Scene_item_config.h | 4 +- .../CGAL/Three/Scene_item_rendering_helper.h | 43 +- .../CGAL/Three/Scene_item_with_properties.h | 10 +- .../CGAL/Three/Scene_print_item_interface.h | 4 +- .../CGAL/Three/Scene_transparent_interface.h | 4 +- .../Three/Scene_zoomable_item_interface.h | 4 +- .../CGAL/include/CGAL/Three/TextRenderer.h | 8 +- thirdparty/CGAL/include/CGAL/Three/Three.h | 4 +- .../include/CGAL/Three/Triangle_container.h | 10 +- .../CGAL/include/CGAL/Three/Viewer_config.h | 4 +- .../include/CGAL/Three/Viewer_interface.h | 10 +- .../CGAL/include/CGAL/Three/exceptions.h | 66 +- thirdparty/CGAL/include/CGAL/Threetuple.h | 4 +- thirdparty/CGAL/include/CGAL/Time_stamper.h | 15 +- thirdparty/CGAL/include/CGAL/Timer.h | 6 +- thirdparty/CGAL/include/CGAL/Timer_impl.h | 4 +- .../CGAL/include/CGAL/Transform_iterator.h | 5 +- thirdparty/CGAL/include/CGAL/Tree_base.h | 7 +- thirdparty/CGAL/include/CGAL/Tree_traits.h | 4 +- thirdparty/CGAL/include/CGAL/Triangle_2.h | 9 +- thirdparty/CGAL/include/CGAL/Triangle_3.h | 11 +- .../CGAL/include/CGAL/Triangle_accessor_3.h | 14 +- .../CGAL/Triangular_expansion_visibility_2.h | 14 +- .../CGAL/include/CGAL/Triangular_field_2.h | 4 +- .../Triangulated_mixed_complex_observer_3.h | 4 +- thirdparty/CGAL/include/CGAL/Triangulation.h | 16 +- .../internal/Combination_enumerator.h | 4 +- .../CGAL/Triangulation/internal/Dummy_TDS.h | 4 +- .../internal/Static_or_dynamic_array.h | 4 +- .../internal/Triangulation_ds_iterators.h | 4 +- .../CGAL/Triangulation/internal/utilities.h | 4 +- .../CGAL/include/CGAL/Triangulation_2.h | 441 +- .../CGAL/Triangulation_2/insert_constraints.h | 6 +- .../internal/CTP2_subconstraint_graph.h | 6 +- .../internal/Constraint_hierarchy_2.h | 36 +- .../CGAL/Triangulation_2/internal/In_domain.h | 84 + .../Polyline_constraint_hierarchy_2.h | 93 +- .../Triangulation_line_face_circulator_2.h | 34 +- .../Triangulation_2_projection_traits_3.h | 4 +- .../include/CGAL/Triangulation_2_to_lcc.h | 35 +- .../include/CGAL/Triangulation_2_traits_3.h | 6 +- .../CGAL/include/CGAL/Triangulation_3.h | 1720 ++---- .../Delaunay_triangulation_hierarchy_3.h | 4 +- .../Triangulation_segment_traverser_3_impl.h | 734 ++- .../include/CGAL/Triangulation_3_to_lcc.h | 35 +- .../include/CGAL/Triangulation_cell_base_3.h | 5 +- .../Triangulation_cell_base_with_info_3.h | 4 +- .../include/CGAL/Triangulation_conformer_2.h | 14 +- .../CGAL/Triangulation_data_structure.h | 4 +- .../CGAL/Triangulation_data_structure_2.h | 168 +- .../CGAL/Triangulation_data_structure_3.h | 426 +- ...riangulation_data_structure_using_list_2.h | 4 +- .../Triangulation_default_data_structure_2.h | 4 +- .../CGAL/Triangulation_ds_cell_base_3.h | 28 +- .../CGAL/Triangulation_ds_circulators_2.h | 88 +- .../include/CGAL/Triangulation_ds_face_2.h | 12 +- .../CGAL/Triangulation_ds_face_base_2.h | 26 +- .../include/CGAL/Triangulation_ds_full_cell.h | 4 +- .../CGAL/Triangulation_ds_iterators_2.h | 14 +- .../include/CGAL/Triangulation_ds_vertex.h | 4 +- .../include/CGAL/Triangulation_ds_vertex_2.h | 12 +- .../CGAL/Triangulation_ds_vertex_base_2.h | 4 +- .../CGAL/Triangulation_ds_vertex_base_3.h | 4 +- .../CGAL/include/CGAL/Triangulation_face.h | 4 +- .../include/CGAL/Triangulation_face_base_2.h | 6 +- .../CGAL/Triangulation_face_base_with_id_2.h | 9 +- .../Triangulation_face_base_with_info_2.h | 4 +- .../include/CGAL/Triangulation_full_cell.h | 4 +- .../CGAL/Triangulation_geom_traits_3.h | 6 +- .../include/CGAL/Triangulation_hierarchy_2.h | 15 +- .../include/CGAL/Triangulation_hierarchy_3.h | 51 +- .../Triangulation_hierarchy_vertex_base_2.h | 4 +- .../Triangulation_hierarchy_vertex_base_3.h | 4 +- .../Triangulation_incremental_builder_3.h | 4 +- .../include/CGAL/Triangulation_on_sphere_2.h | 50 +- .../CGAL/Triangulation_on_sphere_2/IO/OFF.h | 8 +- .../internal/arc_on_sphere_2_subsampling.h | 12 +- .../internal/get_precision_bounds.h | 6 +- .../Triangulation_on_sphere_face_base_2.h | 4 +- .../Triangulation_on_sphere_vertex_base_2.h | 4 +- .../CGAL/Triangulation_segment_traverser_3.h | 570 +- .../include/CGAL/Triangulation_simplex_3.h | 11 +- ...angulation_sphere_line_face_circulator_2.h | 10 +- ...riangulation_structural_filtering_traits.h | 4 +- .../CGAL/include/CGAL/Triangulation_utils_2.h | 10 +- .../CGAL/include/CGAL/Triangulation_utils_3.h | 23 +- .../CGAL/include/CGAL/Triangulation_vertex.h | 4 +- .../CGAL/Triangulation_vertex_base_2.h | 7 +- .../CGAL/Triangulation_vertex_base_3.h | 8 +- .../Triangulation_vertex_base_with_id_2.h | 9 +- .../Triangulation_vertex_base_with_info_2.h | 4 +- .../Triangulation_vertex_base_with_info_3.h | 4 +- thirdparty/CGAL/include/CGAL/Trisegment_2.h | 105 +- thirdparty/CGAL/include/CGAL/Twotuple.h | 4 +- thirdparty/CGAL/include/CGAL/Umbilics.h | 16 +- thirdparty/CGAL/include/CGAL/Uncertain.h | 4 +- .../CGAL/Unfiltered_predicate_adaptor.h | 4 +- thirdparty/CGAL/include/CGAL/Union_find.h | 4 +- .../CGAL/include/CGAL/Union_of_balls_3.h | 4 +- .../CGAL/include/CGAL/Unique_hash_map.h | 4 +- .../CGAL/Variational_shape_approximation.h | 92 +- thirdparty/CGAL/include/CGAL/Vector_2.h | 7 +- thirdparty/CGAL/include/CGAL/Vector_3.h | 7 +- .../Vertex2Data_Property_Map_with_std_map.h | 4 +- .../CGAL/Visibility_2/visibility_utils.h | 4 +- .../CGAL/include/CGAL/Voronoi_diagram_2.h | 14 +- .../include/CGAL/Voronoi_diagram_2/Accessor.h | 4 +- .../Adaptation_traits_base_2.h | 4 +- .../Adaptation_traits_functors.h | 4 +- .../Apollonius_graph_degeneracy_testers.h | 4 +- .../Apollonius_graph_nearest_site_2.h | 8 +- .../Cached_degeneracy_testers.h | 4 +- .../Voronoi_diagram_2/Circulator_adaptors.h | 4 +- .../Voronoi_diagram_2/Connected_components.h | 4 +- .../Voronoi_diagram_2/Construct_dual_points.h | 4 +- .../Default_site_inserters.h | 4 +- .../Voronoi_diagram_2/Default_site_removers.h | 4 +- .../Degeneracy_tester_binders.h | 4 +- ...elaunay_triangulation_degeneracy_testers.h | 4 +- .../Delaunay_triangulation_nearest_site_2.h | 8 +- ...iangulation_on_sphere_degeneracy_testers.h | 4 +- .../CGAL/Voronoi_diagram_2/Dummy_iterator.h | 4 +- .../CGAL/Voronoi_diagram_2/Edge_less.h | 4 +- .../include/CGAL/Voronoi_diagram_2/Face.h | 4 +- .../CGAL/Voronoi_diagram_2/Finder_classes.h | 4 +- .../include/CGAL/Voronoi_diagram_2/Halfedge.h | 4 +- .../CGAL/Voronoi_diagram_2/Handle_adaptor.h | 4 +- .../Voronoi_diagram_2/Identity_rejectors.h | 4 +- .../Voronoi_diagram_2/Iterator_adaptors.h | 4 +- .../CGAL/Voronoi_diagram_2/Policy_base.h | 4 +- ...Regular_triangulation_degeneracy_testers.h | 4 +- .../Regular_triangulation_nearest_site_2.h | 8 +- ...egment_Delaunay_graph_degeneracy_testers.h | 4 +- .../Segment_Delaunay_graph_nearest_site_2.h | 8 +- .../CGAL/Voronoi_diagram_2/Site_accessors.h | 4 +- .../CGAL/Voronoi_diagram_2/Unbounded_edges.h | 4 +- .../CGAL/Voronoi_diagram_2/Unbounded_faces.h | 4 +- .../CGAL/Voronoi_diagram_2/Validity_testers.h | 4 +- .../include/CGAL/Voronoi_diagram_2/Vertex.h | 4 +- .../include/CGAL/Voronoi_diagram_2/basic.h | 4 +- .../CGAL/Voronoi_intersection_2_traits_3.h | 4 +- .../CGAL/Weighted_Minkowski_distance.h | 89 +- .../CGAL/include/CGAL/Weighted_point_2.h | 7 +- .../CGAL/include/CGAL/Weighted_point_3.h | 7 +- thirdparty/CGAL/include/CGAL/Weights.h | 4 +- .../include/CGAL/Weights/authalic_weights.h | 4 +- .../CGAL/Weights/barycentric_region_weights.h | 4 +- .../include/CGAL/Weights/cotangent_weights.h | 4 +- .../CGAL/Weights/discrete_harmonic_weights.h | 6 +- .../Weights/internal/pmp_weights_deprecated.h | 4 +- .../CGAL/Weights/internal/polygon_utils_2.h | 4 +- .../include/CGAL/Weights/internal/utils.h | 4 +- .../CGAL/Weights/inverse_distance_weights.h | 4 +- .../include/CGAL/Weights/mean_value_weights.h | 6 +- .../Weights/mixed_voronoi_region_weights.h | 4 +- .../include/CGAL/Weights/shepard_weights.h | 4 +- .../include/CGAL/Weights/tangent_weights.h | 4 +- .../CGAL/Weights/three_point_family_weights.h | 4 +- .../CGAL/Weights/triangular_region_weights.h | 4 +- .../CGAL/Weights/uniform_region_weights.h | 4 +- .../include/CGAL/Weights/uniform_weights.h | 4 +- thirdparty/CGAL/include/CGAL/Weights/utils.h | 4 +- .../CGAL/Weights/voronoi_region_weights.h | 4 +- .../include/CGAL/Weights/wachspress_weights.h | 6 +- thirdparty/CGAL/include/CGAL/Width_3.h | 8 +- .../include/CGAL/Width_default_traits_3.h | 4 +- .../CGAL/include/CGAL/Width_polyhedron_3.h | 4 +- .../include/CGAL/aff_transformation_tags.h | 4 +- .../CGAL/aff_transformation_tags_impl.h | 4 +- thirdparty/CGAL/include/CGAL/algorithm.h | 4 +- .../include/CGAL/all_furthest_neighbors_2.h | 20 +- thirdparty/CGAL/include/CGAL/alpha_wrap_3.h | 26 +- thirdparty/CGAL/include/CGAL/apply_to_range.h | 15 +- .../CGAL/include/CGAL/approximated_offset_2.h | 4 +- thirdparty/CGAL/include/CGAL/argument_swaps.h | 4 +- .../include/CGAL/arrange_offset_polygons_2.h | 34 +- thirdparty/CGAL/include/CGAL/array.h | 8 +- thirdparty/CGAL/include/CGAL/assertions.h | 109 +- .../CGAL/include/CGAL/assertions_behaviour.h | 8 +- .../CGAL/include/CGAL/assertions_impl.h | 4 +- thirdparty/CGAL/include/CGAL/atomic.h | 4 +- thirdparty/CGAL/include/CGAL/auto_link/CGAL.h | 4 +- thirdparty/CGAL/include/CGAL/auto_link/CORE.h | 4 +- .../CGAL/include/CGAL/auto_link/ImageIO.h | 4 +- thirdparty/CGAL/include/CGAL/auto_link/Qt.h | 13 +- .../CGAL/include/CGAL/auto_link/auto_link.h | 6 +- thirdparty/CGAL/include/CGAL/barycenter.h | 4 +- thirdparty/CGAL/include/CGAL/basic.h | 4 +- thirdparty/CGAL/include/CGAL/basic_classes.h | 4 +- .../CGAL/include/CGAL/basic_constructions_2.h | 4 +- .../CGAL/include/CGAL/basic_constructions_3.h | 4 +- .../include/CGAL/bilateral_smooth_point_set.h | 20 +- thirdparty/CGAL/include/CGAL/boost/bimap.hpp | 4 +- .../include/CGAL/boost/bimap/multiset_of.hpp | 4 +- .../boost/graph/Alpha_expansion_MaxFlow_tag.h | 4 +- .../CGAL/include/CGAL/boost/graph/Dual.h | 8 +- .../CGAL/boost/graph/Euler_operations.h | 337 +- .../CGAL/boost/graph/Face_filtered_graph.h | 130 +- .../graph/Graph_with_descriptor_with_graph.h | 10 +- .../Graph_with_descriptor_with_graph_fwd.h | 4 +- .../CGAL/include/CGAL/boost/graph/IO/3MF.h | 10 +- .../CGAL/include/CGAL/boost/graph/IO/GOCAD.h | 18 +- .../graph/IO/Generic_facegraph_builder.h | 12 +- .../graph/IO/Generic_facegraph_printer.h | 4 +- .../CGAL/include/CGAL/boost/graph/IO/INP.h | 4 +- .../CGAL/include/CGAL/boost/graph/IO/OBJ.h | 12 +- .../CGAL/include/CGAL/boost/graph/IO/OFF.h | 14 +- .../CGAL/include/CGAL/boost/graph/IO/PLY.h | 18 +- .../CGAL/include/CGAL/boost/graph/IO/STL.h | 6 +- .../include/CGAL/boost/graph/IO/Tds_2_off.h | 6 +- .../CGAL/include/CGAL/boost/graph/IO/VTK.h | 4 +- .../CGAL/include/CGAL/boost/graph/IO/WRL.h | 4 +- .../CGAL/boost/graph/IO/polygon_mesh_io.h | 250 +- .../boost/graph/METIS/partition_dual_graph.h | 4 +- .../CGAL/boost/graph/METIS/partition_graph.h | 4 +- .../CGAL/include/CGAL/boost/graph/Seam_mesh.h | 21 +- .../boost/graph/alpha_expansion_graphcut.h | 4 +- .../graph/backward_compatibility_functions.h | 4 +- .../CGAL/boost/graph/breadth_first_search.h | 4 +- .../convert_nef_polyhedron_to_polygon_mesh.h | 4 +- .../CGAL/boost/graph/copy_face_graph.h | 36 +- .../include/CGAL/boost/graph/generators.h | 9 +- .../include/CGAL/boost/graph/graph_concepts.h | 4 +- .../boost/graph/graph_traits_Arrangement_2.h | 9 +- ...its_Constrained_Delaunay_triangulation_2.h | 9 +- ...graph_traits_Constrained_triangulation_2.h | 9 +- ..._traits_Constrained_triangulation_plus_2.h | 9 +- .../graph_traits_Delaunay_triangulation_2.h | 9 +- .../graph/graph_traits_Dual_Arrangement_2.h | 9 +- .../boost/graph/graph_traits_HalfedgeDS.h | 5 +- .../graph/graph_traits_HalfedgeDS_default.h | 74 +- ...inear_cell_complex_for_combinatorial_map.h | 58 +- .../CGAL/boost/graph/graph_traits_OpenMesh.h | 4 +- .../graph_traits_PolyMesh_ArrayKernelT.h | 6 +- .../boost/graph/graph_traits_Polyhedron_3.h | 14 +- .../graph_traits_Regular_triangulation_2.h | 9 +- .../CGAL/boost/graph/graph_traits_Seam_mesh.h | 4 +- .../boost/graph/graph_traits_Surface_mesh.h | 51 +- .../graph/graph_traits_TriMesh_ArrayKernelT.h | 6 +- .../graph/graph_traits_Triangulation_2.h | 9 +- ...ph_traits_Triangulation_data_structure_2.h | 9 +- .../graph_traits_Triangulation_hierarchy_2.h | 9 +- .../graph/graph_traits_inheritance_macros.h | 4 +- .../CGAL/boost/graph/halfedge_graph_traits.h | 4 +- .../graph/halfedge_graph_traits_HalfedgeDS.h | 4 +- .../halfedge_graph_traits_Polyhedron_3.h | 9 +- .../CGAL/include/CGAL/boost/graph/helpers.h | 951 ++-- .../boost/graph/internal/Has_member_clear.h | 7 +- .../CGAL/boost/graph/internal/Has_member_id.h | 4 +- .../internal/OM_iterator_from_circulator.h | 42 +- .../internal/graph_traits_2D_TDS_helper.h | 17 +- .../internal/graph_traits_2D_triangulation.h | 8 +- .../graph_traits_2D_triangulation_helper.h | 20 +- .../CGAL/boost/graph/internal/helpers.h | 62 +- .../internal/initialized_index_maps_helpers.h | 8 +- .../internal/properties_2D_triangulation.h | 9 +- thirdparty/CGAL/include/CGAL/boost/graph/io.h | 4 +- .../CGAL/include/CGAL/boost/graph/iterator.h | 205 +- .../boost/graph/kruskal_min_spanning_tree.h | 4 +- .../CGAL/boost/graph/named_params_helper.h | 179 +- .../CGAL/include/CGAL/boost/graph/partition.h | 4 +- .../boost/graph/prim_minimum_spanning_tree.h | 4 +- .../include/CGAL/boost/graph/properties.h | 14 +- ...ies_Constrained_Delaunay_triangulation_2.h | 9 +- .../properties_Constrained_triangulation_2.h | 9 +- ...perties_Constrained_triangulation_plus_2.h | 9 +- .../properties_Delaunay_triangulation_2.h | 9 +- .../boost/graph/properties_HalfedgeDS_base.h | 494 ++ .../graph/properties_HalfedgeDS_default.h | 20 + ...inear_cell_complex_for_combinatorial_map.h | 4 +- .../CGAL/boost/graph/properties_OpenMesh.h | 19 +- .../graph/properties_PolyMesh_ArrayKernelT.h | 4 +- .../boost/graph/properties_Polyhedron_3.h | 501 +- .../graph/properties_Polyhedron_3_features.h | 45 +- .../properties_Polyhedron_3_time_stamp.h | 26 +- .../properties_Regular_triangulation_2.h | 9 +- .../CGAL/boost/graph/properties_Seam_mesh.h | 4 +- .../boost/graph/properties_Surface_mesh.h | 20 +- .../graph/properties_Surface_mesh_features.h | 19 +- .../properties_Surface_mesh_time_stamp.h | 11 +- .../graph/properties_TriMesh_ArrayKernelT.h | 4 +- .../boost/graph/properties_Triangulation_2.h | 9 +- ...roperties_Triangulation_data_structure_2.h | 9 +- .../properties_Triangulation_hierarchy_2.h | 9 +- .../include/CGAL/boost/graph/property_maps.h | 35 +- .../CGAL/include/CGAL/boost/graph/selection.h | 8 +- .../boost/graph/split_graph_into_polylines.h | 4 +- .../CGAL/include/CGAL/boost/graph/visitor.h | 343 +- .../CGAL/boost/iterator/counting_iterator.hpp | 4 +- .../boost/iterator/transform_iterator.hpp | 4 +- thirdparty/CGAL/include/CGAL/boost_mp.h | 17 +- thirdparty/CGAL/include/CGAL/bounding_box.h | 4 +- .../CGAL/include/CGAL/box_intersection_d.h | 10 +- .../CGAL/cartesian_homogeneous_conversion.h | 4 +- thirdparty/CGAL/include/CGAL/centroid.h | 15 +- .../CGAL/certified_numeric_predicates.h | 9 +- .../CGAL/certified_quotient_predicates.h | 9 +- .../CGAL/include/CGAL/ch_akl_toussaint.h | 4 +- thirdparty/CGAL/include/CGAL/ch_bykat.h | 6 +- thirdparty/CGAL/include/CGAL/ch_eddy.h | 6 +- .../CGAL/include/CGAL/ch_graham_andrew.h | 4 +- thirdparty/CGAL/include/CGAL/ch_jarvis.h | 4 +- thirdparty/CGAL/include/CGAL/ch_melkman.h | 4 +- .../CGAL/ch_selected_extreme_points_2.h | 4 +- thirdparty/CGAL/include/CGAL/circulator.h | 28 +- .../CGAL/include/CGAL/circulator_bases.h | 6 +- .../CGAL/include/CGAL/cluster_point_set.h | 10 +- .../CGAL/include/CGAL/compare_vertices.h | 4 +- .../include/CGAL/compute_average_spacing.h | 11 +- .../include/CGAL/compute_outer_frame_margin.h | 75 +- thirdparty/CGAL/include/CGAL/config.h | 101 +- thirdparty/CGAL/include/CGAL/connect_holes.h | 14 +- thirdparty/CGAL/include/CGAL/constant.h | 4 +- .../constructions/Polygon_offset_cons_ftC2.h | 52 +- .../Straight_skeleton_cons_ftC2.h | 784 ++- ...s_for_voronoi_intersection_cartesian_2_3.h | 6 +- .../include/CGAL/constructions/kernel_ftC2.h | 4 +- .../include/CGAL/constructions/kernel_ftC3.h | 84 +- .../CGAL/include/CGAL/constructions_d.h | 4 +- thirdparty/CGAL/include/CGAL/convert_to_bfi.h | 4 +- .../include/CGAL/convex_decomposition_3.h | 8 +- thirdparty/CGAL/include/CGAL/convex_hull_2.h | 4 +- thirdparty/CGAL/include/CGAL/convex_hull_3.h | 49 +- .../CGAL/convex_hull_3_to_face_graph.h | 4 +- .../CGAL/convex_hull_constructive_traits_2.h | 79 +- .../CGAL/include/CGAL/convex_hull_traits_2.h | 6 +- .../CGAL/include/CGAL/convexity_check_2.h | 4 +- .../CGAL/include/CGAL/convexity_check_3.h | 4 +- thirdparty/CGAL/include/CGAL/copy_n.h | 4 +- thirdparty/CGAL/include/CGAL/cpp_float.h | 581 +++ .../include/CGAL/create_offset_polygons_2.h | 138 +- ...ffset_polygons_from_polygon_with_holes_2.h | 58 +- .../include/CGAL/create_straight_skeleton_2.h | 57 +- ...aight_skeleton_from_polygon_with_holes_2.h | 16 +- .../CGAL/create_weighted_offset_polygons_2.h | 382 ++ ...ffset_polygons_from_polygon_with_holes_2.h | 196 + .../create_weighted_straight_skeleton_2.h | 316 ++ ...aight_skeleton_from_polygon_with_holes_2.h | 52 + thirdparty/CGAL/include/CGAL/demangle.h | 4 +- thirdparty/CGAL/include/CGAL/determinant.h | 4 +- .../include/CGAL/determinant_of_vectors.h | 4 +- .../CGAL/include/CGAL/disable_warnings.h | 4 +- .../CGAL/include/CGAL/distance_predicates_2.h | 4 +- .../CGAL/include/CGAL/distance_predicates_3.h | 4 +- thirdparty/CGAL/include/CGAL/double.h | 4 +- .../CGAL/include/CGAL/draw_arrangement_2.h | 758 +++ .../CGAL/draw_constrained_triangulation_2.h | 180 + .../CGAL/include/CGAL/draw_face_graph.h | 124 +- .../include/CGAL/draw_face_graph_with_paths.h | 38 +- .../include/CGAL/draw_linear_cell_complex.h | 54 +- thirdparty/CGAL/include/CGAL/draw_nef_3.h | 30 +- .../CGAL/draw_periodic_2_triangulation_2.h | 6 +- .../CGAL/include/CGAL/draw_point_set_3.h | 8 +- thirdparty/CGAL/include/CGAL/draw_polygon_2.h | 8 +- .../CGAL/include/CGAL/draw_polygon_set_2.h | 206 +- .../include/CGAL/draw_polygon_with_holes_2.h | 210 +- .../CGAL/include/CGAL/draw_polyhedron.h | 4 +- .../include/CGAL/draw_straight_skeleton_2.h | 6 +- .../CGAL/include/CGAL/draw_surface_mesh.h | 64 +- .../CGAL/include/CGAL/draw_triangulation_2.h | 17 +- .../CGAL/include/CGAL/draw_triangulation_3.h | 6 +- .../include/CGAL/draw_voronoi_diagram_2.h | 4 +- .../CGAL/edge_aware_upsample_point_set.h | 24 +- .../CGAL/include/CGAL/enable_warnings.h | 4 +- thirdparty/CGAL/include/CGAL/enum.h | 4 +- thirdparty/CGAL/include/CGAL/envelope_2.h | 4 +- thirdparty/CGAL/include/CGAL/envelope_3.h | 4 +- thirdparty/CGAL/include/CGAL/estimate_scale.h | 5 +- thirdparty/CGAL/include/CGAL/exceptions.h | 21 +- thirdparty/CGAL/include/CGAL/export/CGAL.h | 4 +- thirdparty/CGAL/include/CGAL/export/CORE.h | 6 +- thirdparty/CGAL/include/CGAL/export/ImageIO.h | 4 +- thirdparty/CGAL/include/CGAL/export/Qt.h | 13 +- thirdparty/CGAL/include/CGAL/export/helpers.h | 6 +- .../CGAL/extended_euclidean_algorithm.h | 4 +- .../extract_mean_curvature_flow_skeleton.h | 6 +- .../CGAL/include/CGAL/extremal_polygon_2.h | 96 +- .../CGAL/include/CGAL/extrude_skeleton.h | 1142 ++++ thirdparty/CGAL/include/CGAL/exude_mesh_3.h | 133 +- .../facets_in_complex_3_to_triangle_mesh.h | 142 +- thirdparty/CGAL/include/CGAL/float.h | 4 +- thirdparty/CGAL/include/CGAL/for_each.h | 12 +- .../CGAL/include/CGAL/function_objects.h | 4 +- thirdparty/CGAL/include/CGAL/functional.h | 4 +- .../CGAL/include/CGAL/functions_on_enums.h | 4 +- .../CGAL/include/CGAL/functions_on_signs.h | 4 +- thirdparty/CGAL/include/CGAL/generators.h | 4 +- thirdparty/CGAL/include/CGAL/generic_sweep.h | 4 +- thirdparty/CGAL/include/CGAL/gl.h | 4 +- .../CGAL/global_functions_circular_kernel_2.h | 4 +- .../global_functions_on_root_for_sphere_2_3.h | 4 +- ...l_functions_on_roots_and_polynomials_1_3.h | 4 +- ...l_functions_on_roots_and_polynomials_2_3.h | 4 +- .../global_functions_spherical_kernel_3.h | 4 +- thirdparty/CGAL/include/CGAL/glu.h | 4 +- thirdparty/CGAL/include/CGAL/gmp.h | 4 +- thirdparty/CGAL/include/CGAL/gmpxx.h | 4 +- .../CGAL/include/CGAL/gmpxx_coercion_traits.h | 4 +- .../CGAL/include/CGAL/gnuplot_output_2.h | 4 +- thirdparty/CGAL/include/CGAL/grabbers.h | 4 +- .../include/CGAL/graph_traits_Arrangement_2.h | 12 +- .../CGAL/graph_traits_dual_arrangement_2.h | 4 +- ...aph_traits_dual_arrangement_on_surface_2.h | 4 +- ...al_arrangement_on_surface_with_history_2.h | 4 +- ...h_traits_dual_arrangement_with_history_2.h | 4 +- .../include/CGAL/grid_simplify_point_set.h | 14 +- .../include/CGAL/halfedgeDS_cut_component.h | 4 +- .../CGAL/halfedgeds_connected_components.h | 4 +- thirdparty/CGAL/include/CGAL/hash_openmesh.h | 4 +- .../CGAL/hierarchy_simplify_point_set.h | 18 +- thirdparty/CGAL/include/CGAL/hilbert_sort.h | 4 +- .../include/CGAL/hilbert_sort_on_sphere.h | 4 +- .../CGAL/include/CGAL/in_place_edge_list.h | 4 +- thirdparty/CGAL/include/CGAL/int.h | 6 +- .../include/CGAL/interpolation_functions.h | 4 +- thirdparty/CGAL/include/CGAL/intersection_2.h | 4 +- thirdparty/CGAL/include/CGAL/intersection_3.h | 4 +- thirdparty/CGAL/include/CGAL/intersections.h | 4 +- .../CGAL/include/CGAL/intersections_d.h | 4 +- thirdparty/CGAL/include/CGAL/ipower.h | 6 +- thirdparty/CGAL/include/CGAL/is_convertible.h | 11 +- thirdparty/CGAL/include/CGAL/is_streamable.h | 11 +- .../CGAL/include/CGAL/is_y_monotone_2.h | 4 +- thirdparty/CGAL/include/CGAL/iterator.h | 39 +- .../CGAL/include/CGAL/iterator_from_indices.h | 4 +- .../CGAL/include/CGAL/jet_estimate_normals.h | 12 +- .../CGAL/include/CGAL/jet_smooth_point_set.h | 14 +- .../CGAL/include/CGAL/kernel_assertions.h | 61 +- thirdparty/CGAL/include/CGAL/kernel_basic.h | 4 +- thirdparty/CGAL/include/CGAL/kernel_config.h | 4 +- .../CGAL/include/CGAL/kernel_to_kernel.h | 4 +- .../include/CGAL/known_bit_size_integers.h | 20 +- thirdparty/CGAL/include/CGAL/leda_bigfloat.h | 4 +- .../include/CGAL/leda_bigfloat_interval.h | 4 +- .../CGAL/include/CGAL/leda_coercion_traits.h | 4 +- thirdparty/CGAL/include/CGAL/leda_integer.h | 6 +- thirdparty/CGAL/include/CGAL/leda_rational.h | 4 +- thirdparty/CGAL/include/CGAL/leda_real.h | 8 +- thirdparty/CGAL/include/CGAL/license.h | 4 +- .../CGAL/include/CGAL/license/AABB_tree.h | 6 +- .../Advancing_front_surface_reconstruction.h | 6 +- .../include/CGAL/license/Alpha_shapes_2.h | 6 +- .../include/CGAL/license/Alpha_shapes_3.h | 6 +- .../CGAL/include/CGAL/license/Alpha_wrap_3.h | 6 +- .../include/CGAL/license/Apollonius_graph_2.h | 6 +- .../CGAL/license/Arrangement_on_surface_2.h | 6 +- .../CGAL/license/Barycentric_coordinates_2.h | 6 +- .../CGAL/license/Boolean_set_operations_2.h | 6 +- .../include/CGAL/license/Bounding_volumes.h | 6 +- .../include/CGAL/license/Box_intersection_d.h | 6 +- .../include/CGAL/license/Circular_kernel_2.h | 6 +- .../include/CGAL/license/Circular_kernel_3.h | 6 +- .../include/CGAL/license/Classification.h | 6 +- .../include/CGAL/license/Cone_spanners_2.h | 6 +- .../CGAL/license/Convex_decomposition_3.h | 6 +- .../CGAL/include/CGAL/license/Convex_hull_2.h | 6 +- .../CGAL/include/CGAL/license/Convex_hull_3.h | 6 +- .../CGAL/include/CGAL/license/Convex_hull_d.h | 6 +- .../CGAL/include/CGAL/license/Envelope_2.h | 6 +- .../CGAL/include/CGAL/license/Envelope_3.h | 6 +- .../CGAL/include/CGAL/license/GraphicsView.h | 6 +- .../CGAL/include/CGAL/license/Heat_method_3.h | 6 +- .../CGAL/license/Hyperbolic_triangulation_2.h | 6 +- .../include/CGAL/license/Inscribed_areas.h | 6 +- .../CGAL/include/CGAL/license/Interpolation.h | 6 +- .../include/CGAL/license/Interval_skip_list.h | 6 +- .../CGAL/include/CGAL/license/Jet_fitting_3.h | 6 +- .../CGAL/include/CGAL/license/Matrix_search.h | 6 +- thirdparty/CGAL/include/CGAL/license/Mesh_2.h | 6 +- thirdparty/CGAL/include/CGAL/license/Mesh_3.h | 6 +- .../include/CGAL/license/Minkowski_sum_2.h | 6 +- .../include/CGAL/license/Minkowski_sum_3.h | 6 +- thirdparty/CGAL/include/CGAL/license/Nef_2.h | 6 +- thirdparty/CGAL/include/CGAL/license/Nef_3.h | 6 +- thirdparty/CGAL/include/CGAL/license/Nef_S2.h | 6 +- .../CGAL/license/Optimal_bounding_box.h | 6 +- .../Optimal_transportation_reconstruction_2.h | 6 +- .../CGAL/include/CGAL/license/Orthtree.h | 6 +- .../CGAL/include/CGAL/license/Partition_2.h | 6 +- .../CGAL/license/Periodic_2_triangulation_2.h | 6 +- .../include/CGAL/license/Periodic_3_mesh_3.h | 6 +- .../CGAL/license/Periodic_3_triangulation_3.h | 6 +- .../Periodic_4_hyperbolic_triangulation_2.h | 6 +- .../CGAL/include/CGAL/license/Point_set_2.h | 6 +- .../CGAL/include/CGAL/license/Point_set_3.h | 6 +- .../CGAL/license/Point_set_processing_3.h | 6 +- .../Poisson_surface_reconstruction_3.h | 6 +- .../CGAL/license/Polygon_mesh_processing.h | 6 +- .../Polygon_mesh_processing/Compute_normal.h | 6 +- .../Polyhedral_envelope.h | 6 +- .../Polygon_mesh_processing/autorefinement.h | 54 + .../collision_detection.h | 6 +- .../combinatorial_repair.h | 4 +- .../connected_components.h | 6 +- .../license/Polygon_mesh_processing/core.h | 6 +- .../Polygon_mesh_processing/corefinement.h | 6 +- .../Polygon_mesh_processing/detect_features.h | 6 +- .../Polygon_mesh_processing/distance.h | 6 +- .../geometric_repair.h | 6 +- .../interpolated_corrected_curvatures.h | 54 + .../license/Polygon_mesh_processing/locate.h | 6 +- .../license/Polygon_mesh_processing/measure.h | 6 +- .../meshing_hole_filling.h | 6 +- .../Polygon_mesh_processing/miscellaneous.h | 6 +- .../Polygon_mesh_processing/orientation.h | 6 +- .../Polygon_mesh_processing/predicate.h | 6 +- .../Polygonal_surface_reconstruction.h | 6 +- .../CGAL/include/CGAL/license/Polyhedron.h | 6 +- .../CGAL/license/Polyline_simplification_2.h | 6 +- .../CGAL/license/Polytope_distance_d.h | 6 +- .../license/Principal_component_analysis.h | 6 +- .../CGAL/include/CGAL/license/QP_solver.h | 6 +- .../CGAL/include/CGAL/license/Ridges_3.h | 6 +- thirdparty/CGAL/include/CGAL/license/SMDS_3.h | 54 + .../license/Scale_space_reconstruction_3.h | 6 +- .../include/CGAL/license/SearchStructures.h | 6 +- .../CGAL/license/Segment_Delaunay_graph_2.h | 6 +- .../license/Segment_Delaunay_graph_Linf_2.h | 6 +- .../CGAL/license/Set_movable_separability_2.h | 6 +- .../include/CGAL/license/Shape_detection.h | 6 +- .../CGAL/license/Shape_regularization.h | 6 +- .../include/CGAL/license/Skin_surface_3.h | 6 +- .../include/CGAL/license/Snap_rounding_2.h | 6 +- .../include/CGAL/license/Spatial_searching.h | 6 +- .../CGAL/license/Straight_skeleton_2.h | 6 +- .../license/Straight_skeleton_extrusion_2.h | 54 + .../include/CGAL/license/Stream_lines_2.h | 6 +- .../CGAL/include/CGAL/license/Surface_mesh.h | 6 +- .../CGAL/license/Surface_mesh_approximation.h | 6 +- .../CGAL/license/Surface_mesh_deformation.h | 6 +- .../license/Surface_mesh_parameterization.h | 6 +- .../CGAL/license/Surface_mesh_segmentation.h | 6 +- .../CGAL/license/Surface_mesh_shortest_path.h | 6 +- .../license/Surface_mesh_simplification.h | 6 +- .../license/Surface_mesh_skeletonization.h | 6 +- .../CGAL/license/Surface_mesh_topology.h | 6 +- .../include/CGAL/license/Surface_mesher.h | 6 +- .../include/CGAL/license/Surface_sweep_2.h | 6 +- thirdparty/CGAL/include/CGAL/license/TDS_2.h | 6 +- thirdparty/CGAL/include/CGAL/license/TDS_3.h | 6 +- .../CGAL/license/Tetrahedral_remeshing.h | 6 +- thirdparty/CGAL/include/CGAL/license/Three.h | 6 +- .../CGAL/include/CGAL/license/Triangulation.h | 6 +- .../include/CGAL/license/Triangulation_2.h | 6 +- .../include/CGAL/license/Triangulation_3.h | 6 +- .../CGAL/license/Triangulation_on_sphere_2.h | 6 +- .../CGAL/include/CGAL/license/Visibility_2.h | 6 +- .../include/CGAL/license/Voronoi_diagram_2.h | 6 +- .../include/CGAL/license/gpl_package_list.txt | 16 +- thirdparty/CGAL/include/CGAL/license/lgpl.h | 4 +- .../CGAL/linear_least_squares_fitting_2.h | 4 +- .../CGAL/linear_least_squares_fitting_3.h | 4 +- .../linear_least_squares_fitting_circles_2.h | 4 +- .../linear_least_squares_fitting_cuboids_3.h | 4 +- .../linear_least_squares_fitting_points_2.h | 4 +- .../linear_least_squares_fitting_points_3.h | 4 +- ...inear_least_squares_fitting_rectangles_2.h | 4 +- .../linear_least_squares_fitting_segments_2.h | 4 +- .../linear_least_squares_fitting_segments_3.h | 4 +- .../linear_least_squares_fitting_spheres_3.h | 4 +- ...inear_least_squares_fitting_tetrahedra_3.h | 4 +- ...linear_least_squares_fitting_triangles_2.h | 4 +- ...linear_least_squares_fitting_triangles_3.h | 4 +- .../CGAL/include/CGAL/link_to_face_graph.h | 4 +- .../CGAL/include/CGAL/lloyd_optimize_mesh_2.h | 204 +- .../CGAL/include/CGAL/lloyd_optimize_mesh_3.h | 170 +- thirdparty/CGAL/include/CGAL/long_double.h | 4 +- thirdparty/CGAL/include/CGAL/long_long.h | 4 +- thirdparty/CGAL/include/CGAL/make_mesh_3.h | 337 +- .../include/CGAL/make_periodic_3_mesh_3.h | 301 +- .../CGAL/make_piecewise_smooth_surface_mesh.h | 11 +- .../include/CGAL/make_skin_surface_mesh_3.h | 4 +- .../CGAL/include/CGAL/make_surface_mesh.h | 4 +- .../CGAL/include/CGAL/make_union_of_balls_3.h | 4 +- .../CGAL/include/CGAL/marching_tetrahedra_3.h | 4 +- .../CGAL/mark_domain_in_triangulation.h | 115 + thirdparty/CGAL/include/CGAL/memory.h | 4 +- .../CGAL/include/CGAL/mesh_segmentation.h | 4 +- .../CGAL/include/CGAL/mesh_skin_surface_3.h | 4 +- .../CGAL/include/CGAL/mesh_union_of_balls_3.h | 4 +- thirdparty/CGAL/include/CGAL/min_max_n.h | 4 +- .../CGAL/include/CGAL/min_quadrilateral_2.h | 16 +- .../CGAL/minimum_enclosing_quadrilateral_2.h | 4 +- .../CGAL/include/CGAL/minkowski_sum_2.h | 4 +- .../CGAL/include/CGAL/minkowski_sum_3.h | 6 +- .../include/CGAL/monotone_matrix_search.h | 18 +- .../include/CGAL/more_functions_on_signs.h | 4 +- .../CGAL/include/CGAL/mpfi_coercion_traits.h | 4 +- .../CGAL/include/CGAL/mpfr_coercion_traits.h | 4 +- thirdparty/CGAL/include/CGAL/mpq_class.h | 8 +- thirdparty/CGAL/include/CGAL/mpz_class.h | 11 +- .../CGAL/include/CGAL/mst_orient_normals.h | 43 +- thirdparty/CGAL/include/CGAL/mutex.h | 4 +- .../CGAL/natural_neighbor_coordinates_2.h | 14 +- .../CGAL/natural_neighbor_coordinates_3.h | 40 +- .../CGAL/nearest_neighbor_delaunay_2.h | 4 +- .../include/CGAL/normal_vector_newell_3.h | 4 +- .../CGAL/include/CGAL/number_type_basic.h | 6 +- .../CGAL/include/CGAL/number_type_config.h | 9 +- thirdparty/CGAL/include/CGAL/number_utils.h | 20 +- .../CGAL/include/CGAL/number_utils_classes.h | 4 +- .../CGAL/include/CGAL/odt_optimize_mesh_3.h | 167 +- .../CGAL/include/CGAL/offset_polygon_2.h | 4 +- .../CGAL/include/CGAL/optimal_bounding_box.h | 4 +- .../CGAL/include/CGAL/optimize_mesh_3.h | 4 +- .../include/CGAL/optimize_periodic_3_mesh_3.h | 243 +- thirdparty/CGAL/include/CGAL/partition_2.h | 4 +- .../CGAL/include/CGAL/partition_is_valid_2.h | 12 +- .../CGAL/include/CGAL/pca_estimate_normals.h | 10 +- .../CGAL/periodic_3_triangulation_3_io.h | 4 +- thirdparty/CGAL/include/CGAL/perturb_mesh_3.h | 135 +- .../CGAL/include/CGAL/pierce_rectangles_2.h | 48 +- .../CGAL/include/CGAL/point_generators_2.h | 6 +- .../CGAL/include/CGAL/point_generators_3.h | 4 +- .../CGAL/include/CGAL/point_generators_d.h | 4 +- .../compute_registration_transformation.h | 19 +- .../CGAL/pointmatcher/register_point_sets.h | 8 +- .../CGAL/poisson_refine_triangulation.h | 12 +- .../CGAL/poisson_surface_reconstruction.h | 4 +- .../include/CGAL/polygon_function_objects.h | 4 +- .../include/CGAL/polygon_mesh_processing.h | 28 +- .../include/CGAL/polyhedron_cut_plane_3.h | 4 +- .../CGAL/include/CGAL/polynomial_utils.h | 4 +- .../predicates/Polygon_offset_pred_ftC2.h | 18 +- .../predicates/Straight_skeleton_pred_ftC2.h | 241 +- .../include/CGAL/predicates/kernel_ftC2.h | 4 +- .../include/CGAL/predicates/kernel_ftC3.h | 27 +- .../predicates_for_mixed_complex_3.h | 4 +- ...s_for_voronoi_intersection_cartesian_2_3.h | 8 +- .../CGAL/predicates/sign_of_determinant.h | 4 +- thirdparty/CGAL/include/CGAL/predicates_d.h | 6 +- .../CGAL/include/CGAL/predicates_on_lines_2.h | 4 +- .../include/CGAL/predicates_on_points_2.h | 4 +- .../include/CGAL/predicates_on_points_3.h | 4 +- thirdparty/CGAL/include/CGAL/primes.h | 4 +- thirdparty/CGAL/include/CGAL/property_map.h | 294 +- .../CGAL/include/CGAL/radial_orient_normals.h | 8 +- .../CGAL/random_convex_hull_in_disc_2.h | 6 +- .../CGAL/include/CGAL/random_convex_set_2.h | 4 +- .../CGAL/include/CGAL/random_polygon_2.h | 4 +- .../CGAL/include/CGAL/random_selection.h | 4 +- .../include/CGAL/random_simplify_point_set.h | 8 +- .../include/CGAL/range_search_delaunay_2.h | 6 +- thirdparty/CGAL/include/CGAL/rank.h | 4 +- .../CGAL/include/CGAL/rational_rotation.h | 4 +- .../CGAL/include/CGAL/read_vtk_image_data.h | 4 +- .../include/CGAL/rectangular_3_center_2.h | 51 +- .../include/CGAL/rectangular_p_center_2.h | 26 +- thirdparty/CGAL/include/CGAL/refine_mesh_3.h | 622 +-- .../include/CGAL/refine_periodic_3_mesh_3.h | 410 +- .../CGAL/regular_neighbor_coordinates_2.h | 40 +- .../CGAL/remove_far_points_in_mesh_3.h | 4 +- .../CGAL/include/CGAL/remove_outliers.h | 12 +- .../CGAL/include/CGAL/representation_tags.h | 4 +- thirdparty/CGAL/include/CGAL/result_of.h | 4 +- .../include/CGAL/scanline_orient_normals.h | 11 +- .../CGAL/segment_intersection_points_2.h | 4 +- .../include/CGAL/sibson_gradient_fitting.h | 33 +- .../include/CGAL/simple_transformations_d.h | 4 +- .../CGAL/simplest_rational_in_interval.h | 8 +- .../CGAL/include/CGAL/sorted_matrix_search.h | 20 +- thirdparty/CGAL/include/CGAL/spatial_sort.h | 4 +- .../include/CGAL/spatial_sort_on_sphere.h | 4 +- .../CGAL/include/CGAL/squared_distance_2.h | 4 +- .../CGAL/include/CGAL/squared_distance_3.h | 4 +- thirdparty/CGAL/include/CGAL/sse2.h | 4 +- thirdparty/CGAL/include/CGAL/stddef.h | 4 +- .../CGAL/include/CGAL/structure_point_set.h | 29 +- .../CGAL/subdivide_skin_surface_mesh_3.h | 4 +- .../CGAL/subdivide_union_of_balls_mesh_3.h | 4 +- .../CGAL/include/CGAL/subdivision_method_3.h | 4 +- .../CGAL/surface_mesh_parameterization.h | 13 +- .../CGAL/surface_neighbor_coordinates_3.h | 4 +- .../CGAL/include/CGAL/surface_neighbors_3.h | 4 +- thirdparty/CGAL/include/CGAL/sweep_observer.h | 4 +- thirdparty/CGAL/include/CGAL/tags.h | 42 +- .../CGAL/test_FPU_rounding_mode_impl.h | 4 +- .../CGAL/include/CGAL/tetrahedral_remeshing.h | 68 +- .../tetrahedron_soup_to_triangulation_3.h | 221 + thirdparty/CGAL/include/CGAL/thread.h | 4 +- thirdparty/CGAL/include/CGAL/to_rational.h | 8 +- .../CGAL/include/CGAL/transforming_iterator.h | 22 +- .../include/CGAL/transforming_pair_iterator.h | 20 +- .../CGAL/triangulate_mixed_complex_3.h | 4 +- .../CGAL/triangulate_power_diagram_3.h | 4 +- thirdparty/CGAL/include/CGAL/tss.h | 4 +- thirdparty/CGAL/include/CGAL/tuple.h | 4 +- thirdparty/CGAL/include/CGAL/type_traits.h | 29 +- .../include/CGAL/type_traits/is_iterator.h | 94 + thirdparty/CGAL/include/CGAL/typeset.h | 4 +- thirdparty/CGAL/include/CGAL/use.h | 4 +- thirdparty/CGAL/include/CGAL/user_classes.h | 4 +- thirdparty/CGAL/include/CGAL/utility.h | 4 +- thirdparty/CGAL/include/CGAL/utils.h | 4 +- thirdparty/CGAL/include/CGAL/utils_classes.h | 4 +- .../CGAL/include/CGAL/value_type_traits.h | 4 +- thirdparty/CGAL/include/CGAL/variant.h | 87 + .../CGAL/include/CGAL/vcm_estimate_edges.h | 6 +- .../CGAL/include/CGAL/vcm_estimate_normals.h | 6 +- thirdparty/CGAL/include/CGAL/vector.h | 62 +- thirdparty/CGAL/include/CGAL/version.h | 12 +- .../CGAL/include/CGAL/version_checker.h | 53 + thirdparty/CGAL/include/CGAL/version_macros.h | 4 +- .../CGAL/vtkSurfaceMesherContourFilter.h | 6 +- .../CGAL/include/CGAL/width_assertions.h | 4 +- .../wlop_simplify_and_regularize_point_set.h | 24 +- thirdparty/CGAL/include/CGAL/wmult.h | 4 +- 3547 files changed, 91700 insertions(+), 40651 deletions(-) create mode 100644 thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h create mode 100644 thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_triangulation_cell_base_3.h create mode 100644 thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_triangulation_vertex_base_3.h create mode 100644 thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/validation.h create mode 100644 thirdparty/CGAL/include/CGAL/Base_with_time_stamp.h create mode 100644 thirdparty/CGAL/include/CGAL/CMap_linear_cell_complex_storages_with_index.h create mode 100644 thirdparty/CGAL/include/CGAL/Cartesian/Is_trivial_construction.h create mode 100644 thirdparty/CGAL/include/CGAL/Combinatorial_map_storages_with_index.h create mode 100644 thirdparty/CGAL/include/CGAL/Compact_container_with_index.h create mode 100644 thirdparty/CGAL/include/CGAL/Compact_simplicial_mesh_cell_base_3.h create mode 100644 thirdparty/CGAL/include/CGAL/Converting_construction.h create mode 100644 thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Power_side_of_oriented_power_circle_2.h create mode 100644 thirdparty/CGAL/include/CGAL/GMap_linear_cell_complex_storages_with_index.h create mode 100644 thirdparty/CGAL/include/CGAL/Generalized_map_storages_with_index.h create mode 100644 thirdparty/CGAL/include/CGAL/IO/Progress_bar.h create mode 100644 thirdparty/CGAL/include/CGAL/IO/polygon_mesh_io.h create mode 100644 thirdparty/CGAL/include/CGAL/Info_for_cell_attribute.h create mode 100644 thirdparty/CGAL/include/CGAL/Linear_cell_complex_incremental_builder_3.h create mode 100644 thirdparty/CGAL/include/CGAL/Mesh_3/Detect_features_in_image.h create mode 100644 thirdparty/CGAL/include/CGAL/Mesh_3/Detect_features_on_image_bbox.h create mode 100644 thirdparty/CGAL/include/CGAL/Mesh_3/Null_subdomain_index.h create mode 100644 thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/cases_table.h create mode 100644 thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/combinations.h create mode 100644 thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/coordinates.h create mode 100644 thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/cube_isometries.h create mode 100644 thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/features_detection.h create mode 100644 thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/features_detection_helpers.h create mode 100644 thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/postprocess_weights.h create mode 100644 thirdparty/CGAL/include/CGAL/Mesh_3/parameters.h create mode 100644 thirdparty/CGAL/include/CGAL/Nef_3/SNC_halfedge_key.h create mode 100644 thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_generator.h create mode 100644 thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/Adaptive_sizing_field.h create mode 100644 thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/Uniform_sizing_field.h create mode 100644 thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/autorefinement.h create mode 100644 thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Sizing_field_base.h create mode 100644 thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/interpolated_corrected_curvatures.h create mode 100644 thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/refine_mesh_at_isolevel.h create mode 100644 thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/region_growing.h create mode 100644 thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h create mode 100644 thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/surface_Delaunay_remeshing.h create mode 100644 thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/triangle.h create mode 100644 thirdparty/CGAL/include/CGAL/Qt/ImageInterface.ui create mode 100644 thirdparty/CGAL/include/CGAL/SMDS_3/Dump_c3t3.h create mode 100644 thirdparty/CGAL/include/CGAL/SMDS_3/Mesh_complex_3_in_triangulation_3_fwd.h create mode 100644 thirdparty/CGAL/include/CGAL/SMDS_3/internal/Boundary_of_subdomain_of_complex_3_in_triangulation_3_to_off.h create mode 100644 thirdparty/CGAL/include/CGAL/SMDS_3/internal/Handle_IO_for_pair_of_int.h create mode 100644 thirdparty/CGAL/include/CGAL/SMDS_3/internal/SMDS_3_helper.h create mode 100644 thirdparty/CGAL/include/CGAL/SMDS_3/internal/indices_management.h create mode 100644 thirdparty/CGAL/include/CGAL/SMDS_3/io_signature.h create mode 100644 thirdparty/CGAL/include/CGAL/SMDS_3/tet_soup_to_c3t3.h create mode 100644 thirdparty/CGAL/include/CGAL/SMDS_3/utilities.h create mode 100644 thirdparty/CGAL/include/CGAL/STL_Extension/internal/Has_features.h create mode 100644 thirdparty/CGAL/include/CGAL/STL_Extension/internal/mesh_option_classes.h create mode 100644 thirdparty/CGAL/include/CGAL/STL_Extension/internal/mesh_parameters_interface.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/K_neighbor_query.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_circle_fit_region.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_circle_fit_sorting.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_region.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_sorting.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_line_fit_region.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_line_fit_sorting.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_region.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_sorting.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_sphere_fit_region.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_sphere_fit_sorting.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Sphere_neighbor_query.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_region.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_sorting.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/One_ring_neighbor_query.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Polyline_graph.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Segment_set.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Segment_set/Least_squares_line_fit_region.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Segment_set/Least_squares_line_fit_sorting.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/cylinder_fitting.h create mode 100644 thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/region_growing_traits.h create mode 100644 thirdparty/CGAL/include/CGAL/Simplicial_mesh_cell_base_3.h create mode 100644 thirdparty/CGAL/include/CGAL/Simplicial_mesh_vertex_base_3.h create mode 100644 thirdparty/CGAL/include/CGAL/Sizing_field_with_aabb_tree.h create mode 100644 thirdparty/CGAL/include/CGAL/Straight_skeleton_2/IO/Dxf_stream.h create mode 100644 thirdparty/CGAL/include/CGAL/Straight_skeleton_2/IO/Dxf_writer.h create mode 100644 thirdparty/CGAL/include/CGAL/Straight_skeleton_2/IO/print.h create mode 100644 thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_caches.h create mode 100644 thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h create mode 100644 thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_stop_predicate.h create mode 100644 thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h create mode 100644 thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_stop_predicate.h create mode 100644 thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/peel_slivers.h create mode 100644 thirdparty/CGAL/include/CGAL/Triangulation_2/internal/In_domain.h create mode 100644 thirdparty/CGAL/include/CGAL/boost/graph/properties_HalfedgeDS_base.h create mode 100644 thirdparty/CGAL/include/CGAL/boost/graph/properties_HalfedgeDS_default.h create mode 100644 thirdparty/CGAL/include/CGAL/cpp_float.h create mode 100644 thirdparty/CGAL/include/CGAL/create_weighted_offset_polygons_2.h create mode 100644 thirdparty/CGAL/include/CGAL/create_weighted_offset_polygons_from_polygon_with_holes_2.h create mode 100644 thirdparty/CGAL/include/CGAL/create_weighted_straight_skeleton_2.h create mode 100644 thirdparty/CGAL/include/CGAL/create_weighted_straight_skeleton_from_polygon_with_holes_2.h create mode 100644 thirdparty/CGAL/include/CGAL/draw_arrangement_2.h create mode 100644 thirdparty/CGAL/include/CGAL/draw_constrained_triangulation_2.h create mode 100644 thirdparty/CGAL/include/CGAL/extrude_skeleton.h create mode 100644 thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/autorefinement.h create mode 100644 thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/interpolated_corrected_curvatures.h create mode 100644 thirdparty/CGAL/include/CGAL/license/SMDS_3.h create mode 100644 thirdparty/CGAL/include/CGAL/license/Straight_skeleton_extrusion_2.h create mode 100644 thirdparty/CGAL/include/CGAL/mark_domain_in_triangulation.h create mode 100644 thirdparty/CGAL/include/CGAL/tetrahedron_soup_to_triangulation_3.h create mode 100644 thirdparty/CGAL/include/CGAL/type_traits/is_iterator.h create mode 100644 thirdparty/CGAL/include/CGAL/variant.h create mode 100644 thirdparty/CGAL/include/CGAL/version_checker.h diff --git a/thirdparty/CGAL/include/CGAL/AABB_face_graph_triangle_primitive.h b/thirdparty/CGAL/include/CGAL/AABB_face_graph_triangle_primitive.h index 7d4741d8..f8708d15 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_face_graph_triangle_primitive.h +++ b/thirdparty/CGAL/include/CGAL/AABB_face_graph_triangle_primitive.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_face_graph_triangle_primitive.h $ -// $Id: AABB_face_graph_triangle_primitive.h 746e00f 2020-11-30T18:16:39+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_face_graph_triangle_primitive.h $ +// $Id: include/CGAL/AABB_face_graph_triangle_primitive.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,6 @@ #include #include #include -#include namespace CGAL { @@ -33,7 +32,7 @@ namespace CGAL { * while the AABB tree holding the primitive is in use. * The triangle type of the primitive (`Datum`) is `CGAL::Kernel_traits< boost::property_traits< VertexPointPMap >::%value_type >::%Kernel::Triangle_3`. * - * \cgalModels `AABBPrimitiveWithSharedData` + * \cgalModels{AABBPrimitiveWithSharedData} * *\tparam FaceGraph is a model of the face graph concept. *\tparam VertexPointPMap is a property map with `boost::graph_traits::%vertex_descriptor` @@ -57,9 +56,9 @@ template < class FaceGraph, class CacheDatum=Tag_false > class AABB_face_graph_triangle_primitive #ifndef DOXYGEN_RUNNING - : public AABB_primitive::face_descriptor, - std::pair::face_descriptor, const FaceGraph*> >::type, + : public AABB_primitive::face_descriptor, + std::pair::face_descriptor, const FaceGraph*> >, Triangle_from_face_descriptor_map< FaceGraph, typename Default::Get::const_type >::type VertexPointPMap_; typedef typename boost::graph_traits::face_descriptor FD; - typedef typename boost::mpl::if_ >::type Id_; + typedef std::conditional_t > Id_; typedef Triangle_from_face_descriptor_map Triangle_property_map; typedef One_point_from_face_descriptor_map Point_property_map; diff --git a/thirdparty/CGAL/include/CGAL/AABB_halfedge_graph_segment_primitive.h b/thirdparty/CGAL/include/CGAL/AABB_halfedge_graph_segment_primitive.h index 7a610ecc..9677d927 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_halfedge_graph_segment_primitive.h +++ b/thirdparty/CGAL/include/CGAL/AABB_halfedge_graph_segment_primitive.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h $ -// $Id: AABB_halfedge_graph_segment_primitive.h 746e00f 2020-11-30T18:16:39+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h $ +// $Id: include/CGAL/AABB_halfedge_graph_segment_primitive.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,10 +23,7 @@ #include #include -#include -#include -#include -#include +#include #include @@ -35,7 +32,7 @@ namespace CGAL { /*! * \ingroup PkgAABBTreeRef - * Primitive type for a edge of a polyhedral surface. + * Primitive type for an edge of a polyhedral surface. * It wraps an `edge_descriptor` into a 3D segment. * The class model of `HalfedgeGraph` from which the primitive is built should not be deleted * while the AABB tree holding the primitive is in use. @@ -43,8 +40,10 @@ namespace CGAL { * of `VertexPointPMap` (using the `Kernel_traits` mechanism). * The segment type of the primitive (`Datum`) is `CGAL::Kernel_traits< boost::property_traits< VertexPointPMap >::%value_type >::%Kernel::Segment_3`. * - * \cgalModels `AABBPrimitive` if `OneHalfedgeGraphPerTree` is `CGAL::Tag_false`, - * and `AABBPrimitiveWithSharedData` if `OneHalfedgeGraphPerTree` is `CGAL::Tag_true`. + * \cgalModelsBareBegin + * \cgalModelsBare{`AABBPrimitive` if `OneHalfedgeGraphPerTree` is `CGAL::Tag_false`} + * \cgalModelsBare{`AABBPrimitiveWithSharedData` if `OneHalfedgeGraphPerTree` is `CGAL::Tag_true`} + * \cgalModelsBareEnd * * \tparam HalfedgeGraph is a model of the halfedge graph concept. * as key type and a \cgal Kernel `Point_3` as value type. @@ -70,9 +69,9 @@ template < class HalfedgeGraph, class CacheDatum = Tag_false > class AABB_halfedge_graph_segment_primitive #ifndef DOXYGEN_RUNNING - : public AABB_primitive< typename boost::mpl::if_::edge_descriptor, - std::pair::edge_descriptor, const HalfedgeGraph*> >::type, + : public AABB_primitive< std::conditional_t::edge_descriptor, + std::pair::edge_descriptor, const HalfedgeGraph*> >, Segment_from_edge_descriptor_map< HalfedgeGraph, typename Default::Get::const_type >::type VertexPointPMap_; typedef typename boost::graph_traits::edge_descriptor ED; - typedef typename boost::mpl::if_ >::type Id_; + typedef std::conditional_t > Id_; typedef Segment_from_edge_descriptor_map Segment_property_map; typedef Source_point_from_edge_descriptor_map Point_property_map; diff --git a/thirdparty/CGAL/include/CGAL/AABB_polyhedral_oracle.h b/thirdparty/CGAL/include/CGAL/AABB_polyhedral_oracle.h index bd7c3091..7f318432 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_polyhedral_oracle.h +++ b/thirdparty/CGAL/include/CGAL/AABB_polyhedral_oracle.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/AABB_polyhedral_oracle.h $ -// $Id: AABB_polyhedral_oracle.h 1faa0e2 2021-04-28T10:55:26+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/AABB_polyhedral_oracle.h $ +// $Id: include/CGAL/AABB_polyhedral_oracle.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -84,7 +84,7 @@ namespace CGAL { Object operator()(const Surface_3& surface, const Segment_3& segment) const { - boost::optional< typename AABB_traits::template Intersection_and_primitive_id::Type > + std::optional< typename AABB_traits::template Intersection_and_primitive_id::Type > intersection = surface.tree()->any_intersection(segment); if ( intersection ) @@ -95,7 +95,7 @@ namespace CGAL { Object operator()(const Surface_3& surface, const Line_3& line) const { - boost::optional< typename AABB_traits::template Intersection_and_primitive_id::Type > + std::optional< typename AABB_traits::template Intersection_and_primitive_id::Type > intersection = surface.tree()->any_intersection(line); if ( intersection ) @@ -105,7 +105,7 @@ namespace CGAL { } Object operator()(const Surface_3& surface, const Ray_3& ray) const { - boost::optional< typename AABB_traits::template Intersection_and_primitive_id::Type > + std::optional< typename AABB_traits::template Intersection_and_primitive_id::Type > intersection = surface.tree()->any_intersection(ray); if ( intersection ) diff --git a/thirdparty/CGAL/include/CGAL/AABB_polyhedron_segment_primitive.h b/thirdparty/CGAL/include/CGAL/AABB_polyhedron_segment_primitive.h index 56a82c80..bc74b92b 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_polyhedron_segment_primitive.h +++ b/thirdparty/CGAL/include/CGAL/AABB_polyhedron_segment_primitive.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_polyhedron_segment_primitive.h $ -// $Id: AABB_polyhedron_segment_primitive.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_polyhedron_segment_primitive.h $ +// $Id: include/CGAL/AABB_polyhedron_segment_primitive.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -26,8 +26,7 @@ #define CGAL_REPLACEMENT_HEADER "" #include -#include -#include +#include namespace CGAL { @@ -43,7 +42,7 @@ namespace CGAL { /// AABB tree is built should not be deleted while the AABB tree /// is in use. /// - /// \cgalModels `AABBPrimitive` + /// \cgalModels{AABBPrimitive} /// \tparam GeomTraits must provide a \c %Point_3 /// type, used as \c Point, and a \c %Segment_3 type, used as \c /// Datum and constructible from two arguments of type \c @@ -80,9 +79,9 @@ namespace CGAL { : m_halfedge_handle(*ptr) { }; template AABB_polyhedron_segment_primitive( Iterator it, - typename boost::enable_if< - boost::is_same - >::type* =0 + std::enable_if_t< + std::is_same::value + >* =0 ) : m_halfedge_handle(*it) { } AABB_polyhedron_segment_primitive(const Self& primitive) diff --git a/thirdparty/CGAL/include/CGAL/AABB_polyhedron_triangle_primitive.h b/thirdparty/CGAL/include/CGAL/AABB_polyhedron_triangle_primitive.h index bb594fcf..bff50aa3 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_polyhedron_triangle_primitive.h +++ b/thirdparty/CGAL/include/CGAL/AABB_polyhedron_triangle_primitive.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_polyhedron_triangle_primitive.h $ -// $Id: AABB_polyhedron_triangle_primitive.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_polyhedron_triangle_primitive.h $ +// $Id: include/CGAL/AABB_polyhedron_triangle_primitive.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,8 +22,7 @@ #define CGAL_REPLACEMENT_HEADER "" #include -#include -#include +#include namespace CGAL { /// \ingroup PkgAABBTreeRef @@ -36,7 +35,7 @@ namespace CGAL { /// the polyhedron from which the AABB tree is built should not be /// deleted while the AABB tree is in use. /// - /// \cgalModels `AABBPrimitive` + /// \cgalModels{AABBPrimitive} /// \tparam GeomTraits must provides a \c %Point_3 /// type, used as \c Point, and a \c %Triangle_3 type, used as \c /// Datum and constructible from three arguments of type \c @@ -76,9 +75,9 @@ namespace CGAL { : m_facet_handle(*ptr) { }; template AABB_polyhedron_triangle_primitive( Iterator it, - typename boost::enable_if< - boost::is_same - >::type* =0 + std::enable_if_t< + std::is_same::value + >* =0 ) : m_facet_handle(*it) { } diff --git a/thirdparty/CGAL/include/CGAL/AABB_primitive.h b/thirdparty/CGAL/include/CGAL/AABB_primitive.h index 47cadc7d..234c25f4 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_primitive.h +++ b/thirdparty/CGAL/include/CGAL/AABB_primitive.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_primitive.h $ -// $Id: AABB_primitive.h 3b52e46 2022-05-24T10:02:15+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_primitive.h $ +// $Id: include/CGAL/AABB_primitive.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -53,8 +53,10 @@ struct AABB_primitive_base * The two property maps which are template parameters of the class enable to get the datum and the reference point of * the primitive from the identifier. The last template parameter controls whether the primitive class holds a copy of the datum. * - * \cgalModels `AABBPrimitive` if `ExternalPropertyMaps` is `CGAL::Tag_false`. - * \cgalModels `AABBPrimitiveWithSharedData` if `ExternalPropertyMaps` is `CGAL::Tag_true`. + * \cgalModelsBareBegin + * \cgalModelsBare{`AABBPrimitive` if `ExternalPropertyMaps` is `CGAL::Tag_false`} + * \cgalModelsBare{`AABBPrimitiveWithSharedData` if `ExternalPropertyMaps` is `CGAL::Tag_true`} + * \cgalModelsBareEnd * * \tparam ObjectPropertyMap is a model of `ReadablePropertyMap` with `Id` as * `key_type`. It must be a model of `CopyConstructible`, `DefaultConstructible`, and `CopyAssignable`. diff --git a/thirdparty/CGAL/include/CGAL/AABB_segment_primitive.h b/thirdparty/CGAL/include/CGAL/AABB_segment_primitive.h index c67db833..d91d742e 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_segment_primitive.h +++ b/thirdparty/CGAL/include/CGAL/AABB_segment_primitive.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_segment_primitive.h $ -// $Id: AABB_segment_primitive.h 3127190 2020-12-08T12:48:04+01:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_segment_primitive.h $ +// $Id: include/CGAL/AABB_segment_primitive.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -54,7 +54,7 @@ namespace internal { * The iterator from which the primitive is built should not be invalided * while the AABB tree holding the primitive is in use. * - * \cgalModels `AABBPrimitive` + * \cgalModels{AABBPrimitive} * * \tparam GeomTraits is a traits class providing the nested type `Point_3` and `Segment_3`. * It also provides the functor `Construct_source_3` that has an operator taking a `Segment_3` diff --git a/thirdparty/CGAL/include/CGAL/AABB_traits.h b/thirdparty/CGAL/include/CGAL/AABB_traits.h index 2e0bcf03..330b634c 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_traits.h +++ b/thirdparty/CGAL/include/CGAL/AABB_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_traits.h $ -// $Id: AABB_traits.h 2dda84c 2021-09-28T15:34:25+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_traits.h $ +// $Id: include/CGAL/AABB_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,7 +27,7 @@ #include -#include +#include /// \file AABB_traits.h @@ -39,7 +39,7 @@ template struct Remove_optional { typedef T type; }; template -struct Remove_optional< ::boost::optional > { typedef T type; }; +struct Remove_optional< ::std::optional > { typedef T type; }; //helper controlling whether extra data should be stored in the AABB_tree traits class template ::value> @@ -85,7 +85,7 @@ struct AABB_traits_base_2{ typedef typename CGAL::Bbox_3 Bounding_box; struct Intersection_distance { - boost::optional operator()(const Ray_3& ray, const Bounding_box& bbox) const { + std::optional operator()(const Ray_3& ray, const Bounding_box& bbox) const { FT t_near = -DBL_MAX; // std::numeric_limits::lowest(); C++1903 FT t_far = DBL_MAX; @@ -101,7 +101,7 @@ struct AABB_traits_base_2{ for(int i = 0; i < 3; ++i, ++source_iter, ++direction_iter) { if(*direction_iter == 0) { if((*source_iter < (bbox.min)(i)) || (*source_iter > (bbox.max)(i))) { - return boost::none; + return std::nullopt; } } else { FT t1 = ((bbox.min)(i) - *source_iter) / *direction_iter; @@ -118,7 +118,7 @@ struct AABB_traits_base_2{ // t_far = t2; if(t_near > t_far || t_far < FT(0.)) - return boost::none; + return std::nullopt; } } @@ -149,9 +149,8 @@ class AABB_tree; /// computations, and it handles points as query type for distance /// queries. /// -/// \cgalModels AABBTraits -/// \cgalModels AABBRayIntersectionTraits - +/// \cgalModels{AABBTraits,AABBRayIntersectionTraits} +/// /// \tparam GeomTraits must be a model of the concept \ref AABBGeomTraits, /// and provide the geometric types as well as the intersection tests and computations. /// \tparam Primitive provide the type of primitives stored in the AABB_tree. @@ -193,7 +192,7 @@ class AABB_traits /// `Intersection_and_primitive_id::%Type::first_type` is found according to /// the result type of `GeomTraits::Intersect_3::operator()`. If it is - /// `boost::optional` then it is `T`, and the result type otherwise. + /// `std::optional` then it is `T`, and the result type otherwise. template struct Intersection_and_primitive_id { typedef decltype( @@ -213,7 +212,7 @@ class AABB_traits /// Point query type. typedef typename GeomTraits::Point_3 Point_3; - /// additionnal types for the search tree, required by the RangeSearchTraits concept + /// additional types for the search tree, required by the RangeSearchTraits concept /// \bug This is not documented for now in the AABBTraits concept. typedef typename GeomTraits::Iso_cuboid_3 Iso_cuboid_3; @@ -254,7 +253,7 @@ class AABB_traits * @param beyond iterator on beyond element * @param bbox the bounding box of [first,beyond[ * - * Sorts the range defined by [first,beyond[. Sort is achieved on bbox longuest + * Sorts the range defined by [first,beyond[. Sort is achieved on bbox longest * axis, using the comparison function `_less_than` (dim in {x,y,z}) */ class Split_primitives @@ -364,12 +363,12 @@ class AABB_traits Intersection(const AABB_traits& traits) :m_traits(traits) {} template - boost::optional< typename Intersection_and_primitive_id::Type > + std::optional< typename Intersection_and_primitive_id::Type > operator()(const Query& query, const typename AT::Primitive& primitive) const { auto inter_res = GeomTraits().intersect_3_object()(query, internal::Primitive_helper::get_datum(primitive,m_traits)); if (!inter_res) - return boost::none; - return boost::make_optional( std::make_pair(*inter_res, primitive.id()) ); + return std::nullopt; + return std::make_optional( std::make_pair(*inter_res, primitive.id()) ); } }; diff --git a/thirdparty/CGAL/include/CGAL/AABB_tree.h b/thirdparty/CGAL/include/CGAL/AABB_tree.h index e71e60d7..7cb2816a 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_tree.h +++ b/thirdparty/CGAL/include/CGAL/AABB_tree.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_tree.h $ -// $Id: AABB_tree.h f23deb3 2022-06-01T12:48:17+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_tree.h $ +// $Id: include/CGAL/AABB_tree.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -26,8 +26,7 @@ #include #include #include -#include -#include +#include #ifdef CGAL_HAS_THREADS #include @@ -143,7 +142,7 @@ namespace CGAL { /// An explicit call to `build()` must be made to ensure that the next call to /// a query function will not trigger the construction of the data structure. /// A call to `AABBTraits::set_shared_data(t...)` is made using the internally stored traits. - /// This procedure has a complexity of \f$O(n log(n))\f$, where \f$n\f$ is the number of + /// This procedure has a complexity of \cgalBigO{n log(n)}, where \f$n\f$ is the number of /// primitives of the tree. template void build(T&& ...); @@ -271,7 +270,7 @@ namespace CGAL { /// \tparam Query must be a type for which `Do_intersect` operators are /// defined in the traits class `AABBTraits`. template - boost::optional any_intersected_primitive(const Query& query) const; + std::optional any_intersected_primitive(const Query& query) const; ///@} /// \name Intersections @@ -294,7 +293,7 @@ namespace CGAL { /// \tparam Query must be a type for which `Do_intersect` and `Intersection` operators are /// defined in the traits class `AABBTraits`. template - boost::optional< typename Intersection_and_primitive_id::Type > + std::optional< typename Intersection_and_primitive_id::Type > any_intersection(const Query& query) const; @@ -318,15 +317,15 @@ namespace CGAL { /// `AABBTraits` must be a model of `AABBRayIntersectionTraits` to /// call this member function. template - boost::optional< typename Intersection_and_primitive_id::Type > + std::optional< typename Intersection_and_primitive_id::Type > first_intersection(const Ray& query, const SkipFunctor& skip) const; /// \cond template - boost::optional< typename Intersection_and_primitive_id::Type > + std::optional< typename Intersection_and_primitive_id::Type > first_intersection(const Ray& query) const { - return first_intersection(query, boost::lambda::constant(false)); + return first_intersection(query, [](Primitive_id){ return false; }); } /// \endcond @@ -343,15 +342,15 @@ namespace CGAL { /// `AABBTraits` must be a model of `AABBRayIntersectionTraits` to /// call this member function. template - boost::optional + std::optional first_intersected_primitive(const Ray& query, const SkipFunctor& skip) const; /// \cond template - boost::optional + std::optional first_intersected_primitive(const Ray& query) const { - return first_intersected_primitive(query, boost::lambda::constant(false)); + return first_intersected_primitive(query, [](Primitive_id){ return false; }); } /// \endcond ///@} @@ -964,7 +963,7 @@ namespace CGAL { template template - boost::optional< typename AABB_tree::template Intersection_and_primitive_id::Type > + std::optional< typename AABB_tree::template Intersection_and_primitive_id::Type > AABB_tree::any_intersection(const Query& query) const { using namespace CGAL::internal::AABB_tree; @@ -976,7 +975,7 @@ namespace CGAL { template template - boost::optional::Primitive_id> + std::optional::Primitive_id> AABB_tree::any_intersected_primitive(const Query& query) const { using namespace CGAL::internal::AABB_tree; diff --git a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_drawing_traits.h b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_drawing_traits.h index 2d89d53a..6c4c1fd3 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_drawing_traits.h +++ b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_drawing_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_tree/internal/AABB_drawing_traits.h $ -// $Id: AABB_drawing_traits.h b411e26 2022-06-30T09:22:44+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_tree/internal/AABB_drawing_traits.h $ +// $Id: include/CGAL/AABB_tree/internal/AABB_drawing_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_node.h b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_node.h index 9e5ff7b6..5b228da1 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_node.h +++ b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_node.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_tree/internal/AABB_node.h $ -// $Id: AABB_node.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_tree/internal/AABB_node.h $ +// $Id: include/CGAL/AABB_tree/internal/AABB_node.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h index ea0efa43..d4f294ee 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h +++ b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h $ -// $Id: AABB_ray_intersection.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h $ +// $Id: include/CGAL/AABB_tree/internal/AABB_ray_intersection.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,9 +18,8 @@ #include -#include -#include -#include +#include +#include # if defined(BOOST_MSVC) # pragma warning(push) # pragma warning(disable: 4996) @@ -43,7 +42,7 @@ class AABB_ray_intersection { public: AABB_ray_intersection(const AABBTree& tree) : tree_(tree) {} - boost::optional< Ray_intersection_and_primitive_id > + std::optional< Ray_intersection_and_primitive_id > ray_intersection(const Ray& query, SkipFunctor skip) const { // We hit the root, now continue on the children. Keep track of // nb_primitives through a variable in each Node on the stack. In @@ -63,7 +62,7 @@ class AABB_ray_intersection { Heap_type pq; // pq.reserve(tree_.size() / 2); - boost::optional< Ray_intersection_and_primitive_id > + std::optional< Ray_intersection_and_primitive_id > intersection, /* the temporary for calculating the result */ p; /* the current best intersection */ @@ -84,7 +83,7 @@ class AABB_ray_intersection { if(!skip(current.node->left_data().id()) /* && do_intersect_obj(query, current.node->left_data()) */) { intersection = intersection_obj(query, current.node->left_data()); if(intersection) { - FT ray_distance = boost::apply_visitor(param_visitor, intersection->first); + FT ray_distance = std::visit(param_visitor, intersection->first); if(ray_distance < t) { t = ray_distance; p = intersection; @@ -96,7 +95,7 @@ class AABB_ray_intersection { if(!skip(current.node->right_data().id()) /* && do_intersect_obj(query, current.node->right_data()) */) { intersection = intersection_obj(query, current.node->right_data()); if(intersection) { - FT ray_distance = boost::apply_visitor(param_visitor, intersection->first); + FT ray_distance = std::visit(param_visitor, intersection->first); if(ray_distance < t) { t = ray_distance; p = intersection; @@ -111,7 +110,7 @@ class AABB_ray_intersection { if(!skip(current.node->left_data().id()) /* && do_intersect_obj(query, current.node->left_data()) */) { intersection = intersection_obj(query, current.node->left_data()); if(intersection) { - FT ray_distance = boost::apply_visitor(param_visitor, intersection->first); + FT ray_distance = std::visit(param_visitor, intersection->first); if(ray_distance < t) { t = ray_distance; p = intersection; @@ -121,7 +120,7 @@ class AABB_ray_intersection { // right child const Node* child = &(current.node->right_child()); - boost::optional< FT > dist = intersection_distance_obj(query, child->bbox()); + std::optional< FT > dist = intersection_distance_obj(query, child->bbox()); if(dist) pq.push(Node_ptr_with_ft(child, *dist, 2)); @@ -130,7 +129,7 @@ class AABB_ray_intersection { default: // Children both inner nodes { const Node* child = &(current.node->left_child()); - boost::optional dist = intersection_distance_obj(query, child->bbox()); + std::optional dist = intersection_distance_obj(query, child->bbox()); if(dist) pq.push(Node_ptr_with_ft(child, *dist, current.nb_primitives/2)); @@ -198,10 +197,10 @@ class AABB_ray_intersection { template template -boost::optional< typename AABB_tree::template Intersection_and_primitive_id::Type > +std::optional< typename AABB_tree::template Intersection_and_primitive_id::Type > AABB_tree::first_intersection(const Ray& query, const SkipFunctor& skip) const { - CGAL_static_assertion_msg((boost::is_same::value), + static_assert(std::is_same::value, "Ray and Ray_3 must be the same type"); switch(size()) // copy-paste from AABB_tree::traversal @@ -219,22 +218,22 @@ AABB_tree::first_intersection(const Ray& query, break; } } - return boost::none; + return std::nullopt; } template template -boost::optional::Primitive_id> +std::optional::Primitive_id> AABB_tree::first_intersected_primitive(const Ray& query, const SkipFunctor& skip) const { - boost::optional< + std::optional< typename AABB_tree:: template Intersection_and_primitive_id::Type > res = first_intersection(query, skip); if ( (bool) res ) - return boost::make_optional( res->second ); - return boost::none; + return std::make_optional( res->second ); + return std::nullopt; } } diff --git a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_search_tree.h b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_search_tree.h index f0094fc9..1a269cf5 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_search_tree.h +++ b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_search_tree.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_tree/internal/AABB_search_tree.h $ -// $Id: AABB_search_tree.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_tree/internal/AABB_search_tree.h $ +// $Id: include/CGAL/AABB_tree/internal/AABB_search_tree.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_traversal_traits.h b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_traversal_traits.h index 014bc240..006d7964 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_traversal_traits.h +++ b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/AABB_traversal_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_tree/internal/AABB_traversal_traits.h $ -// $Id: AABB_traversal_traits.h 678b9d8 2022-06-24T11:09:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_tree/internal/AABB_traversal_traits.h $ +// $Id: include/CGAL/AABB_tree/internal/AABB_traversal_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #include -#include +#include namespace CGAL { @@ -69,7 +69,7 @@ class First_intersection_traits public: typedef - boost::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > + std::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > Result; public: First_intersection_traits(const AABBTraits& traits) @@ -124,7 +124,7 @@ class Listing_intersection_traits void intersection(const Query& query, const Primitive& primitive) { - boost::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > + std::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > intersection = m_traits.intersection_object()(query, primitive); if(intersection) @@ -211,7 +211,7 @@ class First_primitive_traits { if( m_traits.do_intersect_object()(query, primitive) ) { - m_result = boost::optional(primitive.id()); + m_result = std::optional(primitive.id()); m_is_found = true; } } @@ -221,12 +221,12 @@ class First_primitive_traits return m_traits.do_intersect_object()(query, node.bbox()); } - boost::optional result() const { return m_result; } + std::optional result() const { return m_result; } bool is_intersection_found() const { return m_is_found; } private: bool m_is_found; - boost::optional m_result; + std::optional m_result; const AABBTraits& m_traits; }; diff --git a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/Has_nested_type_Shared_data.h b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/Has_nested_type_Shared_data.h index d246bcb8..16d3c0c7 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/Has_nested_type_Shared_data.h +++ b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/Has_nested_type_Shared_data.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_tree/internal/Has_nested_type_Shared_data.h $ -// $Id: Has_nested_type_Shared_data.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_tree/internal/Has_nested_type_Shared_data.h $ +// $Id: include/CGAL/AABB_tree/internal/Has_nested_type_Shared_data.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/Is_ray_intersection_geomtraits.h b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/Is_ray_intersection_geomtraits.h index 87ddd6fc..5d39aff1 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/Is_ray_intersection_geomtraits.h +++ b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/Is_ray_intersection_geomtraits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_tree/internal/Is_ray_intersection_geomtraits.h $ -// $Id: Is_ray_intersection_geomtraits.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_tree/internal/Is_ray_intersection_geomtraits.h $ +// $Id: include/CGAL/AABB_tree/internal/Is_ray_intersection_geomtraits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -32,11 +32,11 @@ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_cartesian_const_iterator_3,Cartesian_const template struct Is_ray_intersection_geomtraits -: boost::mpl::and_< Has_ray_3, - Has_construct_source_3, - Has_vector_3, - Has_construct_cartesian_const_iterator_3, - Has_cartesian_const_iterator_3 >::type +: std::bool_constant< Has_ray_3::value && + Has_construct_source_3::value && + Has_vector_3::value && + Has_construct_cartesian_const_iterator_3::value && + Has_cartesian_const_iterator_3::value > {}; diff --git a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/Primitive_helper.h b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/Primitive_helper.h index 65255172..a055604d 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/Primitive_helper.h +++ b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/Primitive_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_tree/internal/Primitive_helper.h $ -// $Id: Primitive_helper.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_tree/internal/Primitive_helper.h $ +// $Id: include/CGAL/AABB_tree/internal/Primitive_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot diff --git a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/triangle_datum_covering.h b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/triangle_datum_covering.h index 5889cc19..9a2992b9 100644 --- a/thirdparty/CGAL/include/CGAL/AABB_tree/internal/triangle_datum_covering.h +++ b/thirdparty/CGAL/include/CGAL/AABB_tree/internal/triangle_datum_covering.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/AABB_tree/include/CGAL/AABB_tree/internal/triangle_datum_covering.h $ -// $Id: triangle_datum_covering.h 1375a0a 2022-03-24T16:10:36+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/AABB_tree/include/CGAL/AABB_tree/internal/triangle_datum_covering.h $ +// $Id: include/CGAL/AABB_tree/internal/triangle_datum_covering.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -143,18 +143,18 @@ struct AABB_covered_triangle_tree_traits // Primitive ID --> box vector pos --> Bounding Box using BPMB = internal::Vector_property_map; - using BPM = CGAL::Property_map_binder; + using BPM = CGAL::Compose_property_map; // Primitive ID --> point vector pos --> Reference Point using RPPMB = internal::Vector_property_map; - using RPPM = CGAL::Property_map_binder; + using RPPM = CGAL::Compose_property_map; // Primitive ID --> Datum pos vector pos --> Datum pos --> Datum // The vector of data has size nf, but the vector of datum pos has size tree.size() using DPPMB = internal::Vector_property_map; // pos --> Datum pos - using DPPM = CGAL::Property_map_binder; // PID --> Datum pos + using DPPM = CGAL::Compose_property_map; // PID --> Datum pos using DPMB = internal::Vector_property_map; // Datum pos --> Datum - using DPM = CGAL::Property_map_binder; // PID --> Datum + using DPM = CGAL::Compose_property_map; // PID --> Datum using Primitive = CGAL::AABB_primitive -#include -#include +#include namespace CGAL { // \ingroup PkgAABBTreeRef @@ -29,7 +28,7 @@ namespace CGAL { // the TriangleMesh from which the AABB tree is built should not be // deleted while the AABB tree is in use. // - // \cgalModels `AABBPrimitive` + // \cgalModels{AABBPrimitive} // \tparam GeomTraits must provides a \c %Point_3 // type, used as \c Point, and a \c %Triangle_3 type, used as \c // Datum and constructible from three arguments of type \c @@ -68,9 +67,9 @@ namespace CGAL { : m_facet(*ptr) { } template AABB_triangulation_3_triangle_primitive( Iterator it, - typename boost::enable_if< - boost::is_same - >::type* =0 + std::enable_if_t< + std::is_same::value + >* =0 ) : m_facet(*it) { } diff --git a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction.h b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction.h index 5a63dbdd..c409de77 100644 --- a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction.h +++ b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h $ -// $Id: Advancing_front_surface_reconstruction.h a23c42a 2022-01-18T13:57:20+01:00 Paul-Edouard Sarlin +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h $ +// $Id: include/CGAL/Advancing_front_surface_reconstruction.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Frank Da, David Cohen-Steiner, Andreas Fabri @@ -186,7 +186,7 @@ namespace CGAL { CGAL::Advancing_front_surface_reconstruction_vertex_base_3< CGAL::Exact_predicates_inexact_constructions_kernel>, CGAL::Advancing_front_surface_reconstruction_cell_base_3< - CGAL::Exact_predicates_inexact_constructions_kernel> > >` + CGAL::Exact_predicates_inexact_constructions_kernel> > > \endcode \tparam P must be a functor offering @@ -370,19 +370,19 @@ namespace CGAL { coord_type K, min_K; const coord_type eps; const coord_type inv_eps_2; // 1/(eps^2) - const coord_type eps_3; // test de ^3 donc points tel 1e-7 soit petit + const coord_type eps_3; // tests using cubed eps so points such that 1e-7 is small const criteria STANDBY_CANDIDATE; const criteria STANDBY_CANDIDATE_BIS; const criteria NOT_VALID_CANDIDATE; //--------------------------------------------------------------------- - //Pour une visu correcte - //pour retenir les facettes selectionnees + // For a correct visualization + // to retain the selected facets int _vh_number; int _facet_number; //--------------------------------------------------------------------- - //Pour le post traitement + // For post-processing mutable int _postprocessing_counter; int _size_before_postprocessing; @@ -501,9 +501,8 @@ namespace CGAL { } //------------------------------------------------------------------- - // pour gerer certaines aretes interieures: a savoir celle encore connectee au - // bord (en fait seule, les aretes interieures reliant 2 bords nous - // interressent...) + // to handle certain interior edges, meaning those still connected to the boundary + // (actually, only the interior edges linking two boundaries are relevant) inline void set_interior_edge(Vertex_handle w, Vertex_handle v) { @@ -806,7 +805,7 @@ namespace CGAL { if ((number_of_facets() > static_cast(T.number_of_vertices()))&& (NB_BORDER_MAX > 0)) - // en principe 2*nb_sommets = nb_facettes: y a encore de la marge!!! + // in theory 2*vertices_n = facets_n: plenty of room!!! { while(postprocessing()){ extend2_timer.start(); @@ -1068,9 +1067,8 @@ namespace CGAL { //--------------------------------------------------------------------- bool is_interior_edge(const Edge_like& key) const - // pour gerer certaines aretes interieures: a savoir celle encore connectee au - // bord (en fait seule, les aretes interieures reliant 2 bords nous - // interressent...) + // to handle certain interior edges, meaning those still connected to the boundary + // (actually, only the interior edges linking two boundaries are relevant) { return (is_interior_edge(key.first, key.second)|| is_interior_edge(key.second, key.first)); @@ -1299,7 +1297,6 @@ namespace CGAL { #ifdef AFSR_LAZY value = lazy_squared_radius(cc); #else - // qualified with CGAL, to avoid a compilation error with clang if(volume(pp0, pp1, pp2, pp3) != 0){ value = T.geom_traits().compute_squared_radius_3_object()(pp0, pp1, pp2, pp3); } else { @@ -1337,7 +1334,6 @@ namespace CGAL { { value = compute_scalar_product(Vc, Vc) - ac*ac/norm_V; if ((value < 0)||(norm_V > inv_eps_2)){ - // qualified with CGAL, to avoid a compilation error with clang value = T.geom_traits().compute_squared_radius_3_object()(cp1, cp2, cp3); } } @@ -1365,7 +1361,7 @@ namespace CGAL { /// @} //--------------------------------------------------------------------- - // For a border edge e we determine the incident facet which has the highest + // For a border edge e, we determine the incident facet which has the highest // chance to be a natural extension of the surface Radius_edge_type @@ -1425,8 +1421,7 @@ namespace CGAL { P2Pn = construct_vector(p2, pn); v2 = construct_cross_product(P2P1,P2Pn); - //pas necessaire de normer pour un bon echantillon: - // on peut alors tester v1*v2 >= 0 + // no need to normalize for a correct sampling: one can then test v1*v2 >= 0 norm = sqrt(norm1 * compute_scalar_product(v2,v2)); pscal = v1*v2; // check if the triangle will produce a sliver on the surface @@ -1437,7 +1432,8 @@ namespace CGAL { if (tmp < min_valueA) { PnP1 = p1-pn; - // DELTA represente la qualite d'echantillonnage du bord + // DELTA encodes the quality of the border sampling + // // We skip triangles having an internal angle along e // whose cosinus is smaller than -DELTA // that is the angle is larger than arcos(-DELTA) @@ -1462,37 +1458,36 @@ namespace CGAL { if ((min_valueA == infinity()) || border_facet) // bad facets case { - min_facet = Facet(c, i); // !!! sans aucune signification.... - value = NOT_VALID_CANDIDATE; // Attention a ne pas inserer dans PQ + min_facet = Facet(c, i); // !!! without any meaning.... + value = NOT_VALID_CANDIDATE; // Do not insert in the PQ } else { min_facet = min_facetA; - //si on considere seulement la pliure value appartient a [0, 2] - //value = coord_type(1) - min_valueP; - - // si la pliure est bonne on note suivant le alpha sinon on prend en compte la - // pliure seule... pour discriminer entre les bons slivers... - // si on veut discriminer les facettes de bonnes pliures plus finement - // alors -(1+1/min_valueA) app a [-inf, -1] - // -min_valueP app a [-1, 1] - + // If we only consider the fold value belongs to [0, 2] + // value = coord_type(1) - min_valueP; + + // If the fold is OK, we rate based on the alpha value. Otherwise, take only the fold into account + // to discriminate between good slivers. + // + // If we wish to discriminate the facets with good folds more finely, + // then: + // -(1+1/min_valueA) is within [-inf, -1] + // -min_valueP is within [-1, 1] + // if (min_valueP > COS_BETA) value = -(coord_type(1) + coord_type(1)/min_valueA); else { - //on refuse une trop grande non-uniformite + // reject overly non-uniform values coord_type tmp = priority (*this, c, i); if (min_valueA <= K * tmp) value = - min_valueP; else { - value = STANDBY_CANDIDATE; // tres mauvais candidat mauvaise pliure - // + grand alpha... a traiter plus tard.... - min_K = - (std::min)(min_K, - min_valueA/tmp); + value = STANDBY_CANDIDATE; // extremely bad candidate, bad fold + large alpha; handle later + min_K = (std::min)(min_K, min_valueA/tmp); } } } @@ -1597,7 +1592,7 @@ namespace CGAL { } //--------------------------------------------------------------------- - // test de reciprocite avant de recoller une oreille anti-singularite + // reciprocity test before glueing anti-singularity ear int test_merge(const Edge_like& ordered_key, const Border_elt& result, const Vertex_handle& v, const coord_type& ear_alpha) @@ -1622,12 +1617,12 @@ namespace CGAL { coord_type norm = sqrt(compute_scalar_product(v1, v1) * compute_scalar_product(v2, v2)); if (v1*v2 > COS_BETA*norm) - return 1; // label bonne pliure sinon: + return 1; // mark as good fold if (ear_alpha <= K * priority(*this, neigh, n_ind)) - return 2; // label alpha coherent... + return 2; // mark alpha consistent - return 0; //sinon oreille a rejeter... + return 0; // ear to be rejected } @@ -1753,7 +1748,7 @@ namespace CGAL { Edge_like ordered_key(v1,v2); if (!is_border_elt(ordered_key, result12)) - std::cerr << "+++probleme coherence bord " << std::endl; + std::cerr << "+++issue with border consistency " << std::endl; bool is_border_el1 = is_border_elt(ordered_el1, result1), is_border_el2 = is_border_elt(ordered_el2, result2); @@ -1782,8 +1777,7 @@ namespace CGAL { return FINAL_CASE; } //--------------------------------------------------------------------- - //on peut alors marquer v1 et on pourrait essayer de merger - //sans faire de calcul inutile??? + // we can then mark v1 and could try to merge without any useless computation??? if (is_border_el1) { Edge_incident_facet edge_Ifacet_2(Edge(c, i, edge_Efacet.first.third), @@ -1796,7 +1790,7 @@ namespace CGAL { return EAR_CASE; } //--------------------------------------------------------------------- - //idem pour v2 + //idem for v2 if (is_border_el2) { Edge_incident_facet edge_Ifacet_1(Edge(c, i, edge_Efacet.first.second), @@ -1852,9 +1846,9 @@ namespace CGAL { // border incident to a point... _mark<1 even if th orientation // may be such as one vh has 2 successorson the same border... { - // a ce niveau on peut tester si le recollement se fait en - // maintenant la compatibilite d'orientation des bords (pour - // surface orientable...) ou si elle est brisee... + // at this level, we can test if glueing can be done while keeping + // compatible orientations for the borders (for an orientable surface...) + // or if it is broken Edge_incident_facet edge_Ifacet_1(Edge(c, i, edge_Efacet.first.second), edge_Efacet.second); Edge_incident_facet edge_Ifacet_2(Edge(c, i, edge_Efacet.first.third), @@ -1884,8 +1878,8 @@ namespace CGAL { Border_elt result_ear2; Edge_like ear1_e, ear2_e; - // pour maintenir la reconstruction d'une surface orientable : - // on verifie que les bords se recollent dans des sens opposes + // to preserve the reconstruction of an orientable surface, we check that + // borders glue to one another in opposite directions if (ordered_key.first==v1) { ear1_e = Edge_like(c->vertex(i), ear1_c ->vertex(ear1_i)); @@ -1897,7 +1891,7 @@ namespace CGAL { ear2_e = Edge_like(c->vertex(i), ear2_c ->vertex(ear2_i)); } - //maintient la surface orientable + // preserves orientability of the surface bool is_border_ear1 = is_ordered_border_elt(ear1_e, result_ear1); bool is_border_ear2 = is_ordered_border_elt(ear2_e, result_ear2); bool ear1_valid(false), ear2_valid(false); @@ -1931,8 +1925,7 @@ namespace CGAL { { Validation_case res = validate(ear1, e1.first); if (!((res == EAR_CASE)||(res == FINAL_CASE))) - std::cerr << "+++probleme de recollement : cas " - << res << std::endl; + std::cerr << "+++issue in glueing: case " << res << std::endl; e2 = compute_value(edge_Ifacet_2); if (ordered_key.first == v1) @@ -1948,8 +1941,7 @@ namespace CGAL { { Validation_case res = validate(ear2, e2.first); if (!((res == EAR_CASE)||(res == FINAL_CASE))) - std::cerr << "+++probleme de recollement : cas " - << res << std::endl; + std::cerr << "+++issue in glueing : case " << res << std::endl; e1 = compute_value(edge_Ifacet_1); if (ordered_key.first == v1) @@ -1962,25 +1954,23 @@ namespace CGAL { _ordered_border.insert(Radius_ptr_type(e1.first, p1)); } } - else// les deux oreilles ne se recollent pas sur la meme arete... + else // both ears do not glue on the same edge { - // on resoud la singularite. + // resolve the singularity if (ear1_valid) { Validation_case res = validate(ear1, e1.first); if (!((res == EAR_CASE)||(res == FINAL_CASE))) - std::cerr << "+++probleme de recollement : cas " - << res << std::endl; + std::cerr << "+++issue in glueing: case " << res << std::endl; } if (ear2_valid) { Validation_case res = validate(ear2, e2.first); if (!((res == EAR_CASE)||(res == FINAL_CASE))) - std::cerr << "+++probleme de recollement : cas " - << res << std::endl; + std::cerr << "+++issue in glueing : case " << res << std::endl; } - // on met a jour la PQ s'il y a lieu... mais surtout pas - // avant la resolution de la singularite + + // Update the PQ if needed, but not before resolving the singularity if (!ear1_valid) { _ordered_border.insert(Radius_ptr_type(e1.first, p1)); @@ -2020,7 +2010,7 @@ namespace CGAL { if (new_candidate.first == STANDBY_CANDIDATE) { - // a garder pour un K un peu plus grand... + // put aside for a slightly larger K new_candidate.first = STANDBY_CANDIDATE_BIS; } @@ -2042,8 +2032,8 @@ namespace CGAL { void extend() { - // initilisation de la variable globale K: qualite d'echantillonnage requise - K = K_init; // valeur d'initialisation de K pour commencer prudemment... + // Initialize the global variable K: required sampling quality + K = K_init; // initial value of K to start carefully coord_type K_prev = K; Vertex_handle v1, v2; @@ -2052,7 +2042,7 @@ namespace CGAL { } do { - min_K = infinity(); // pour retenir le prochain K necessaire pour progresser... + min_K = infinity(); // to store the next K required to progress do { @@ -2095,7 +2085,7 @@ namespace CGAL { { new_candidate = compute_value(mem_Ifacet); if ((new_candidate != mem_e_it)) - // &&(new_candidate.first < NOT_VALID_CANDIDATE)) + // &&(new_candidate.first < NOT_VALID_CANDIDATE)) { IO_edge_type* pnew = set_again_border_elt(key_tmp.first, key_tmp.second, @@ -2111,8 +2101,7 @@ namespace CGAL { (_ordered_border.begin()->first < STANDBY_CANDIDATE_BIS)); K_prev = K; K += (std::max)(K_step, min_K - K + eps); - // on augmente progressivement le K mais on a deja rempli sans - // faire des betises auparavant... + // Progressively increase K, but having already filled without issue beforehand } while((!_ordered_border.empty())&&(K <= K)&&(min_K != infinity())&&(K!=K_prev)); @@ -2125,9 +2114,8 @@ namespace CGAL { //--------------------------------------------------------------------- - // En principe, si l'allocateur de cellules etait bien fait on aurait pas besoin - // de mettre a jour les valeurs rajoutees pour les cellules a la main... - + // In theory, if the cell allocator were properly made, one would not need to manually update + // the values added for the cells void re_init_for_free_cells_cache(const Vertex_handle& vh) { @@ -2152,9 +2140,8 @@ namespace CGAL { int index = c->index(vh); Cell_handle neigh = c->neighbor(index); int n_ind = neigh->index(c); - neigh->set_smallest_radius(n_ind, -1); // pour obliger le recalcul - // si c est selectionnee c'est qu'elle est aussi le mem_IFacet renvoye par - // compute_value... donc a swapper aussi + neigh->set_smallest_radius(n_ind, -1); // forces recomputation + // if c is selected, then it is also the mem_IFacet returned by compute_value... so to be swapped too if (c->is_selected_facet(index)) { int fn = c->facet_number(index); @@ -2214,8 +2201,8 @@ namespace CGAL { circ = next(circ); } while(circ.first.first != c); - // si on passe par la, alors y a eu un probleme.... - std::cerr << "+++probleme dans la MAJ avant remove..." << std::endl; + // if we are here, something went wrong + std::cerr << "+++issue in the update before removal..." << std::endl; return Facet(c, start.second); } @@ -2237,7 +2224,7 @@ namespace CGAL { ordered_map_erase(border_elt.second.first.first, border_IO_elt(vh, vh_succ)); remove_border_edge(vh, vh_succ); - // 1- a virer au cas ou car vh va etre detruit + // 1- remove just in case since vh is about to be destroyed remove_interior_edge(vh_succ, vh); bool while_cond(true); do @@ -2266,14 +2253,14 @@ namespace CGAL { { ordered_map_erase(result.first.first, border_IO_elt(vh_int, vh)); remove_border_edge(vh_int, vh); - // 1- a virer au cas ou car vh va etre detruit + // 1- remove just in case since vh is about to be destroyed remove_interior_edge(vh_int, vh); while_cond = false; } - // a titre preventif... on essaye de s'assurer de marquer les aretes - // interieures au sens large... - // 2- a virer a tout pris pour que maintenir le sens de interior edge + // As a preventive measure, we try to ensure marking the interior edges in a broad sense + + // 2- remove to preserve the interior edge remove_interior_edge(vh_int, vh_succ); remove_interior_edge(vh_succ, vh_int); @@ -2304,16 +2291,16 @@ namespace CGAL { bool create_singularity(const Vertex_handle& vh) { - // Pour reperer le cas de triangle isole + // To detect the isolated triangle case if (vh->is_on_border()) { - // vh sommet 0 + // vh vertex 0 Next_border_elt border_elt = *(vh->first_incident()); - Vertex_handle vh_1 = border_elt.first;// sommet 1 + Vertex_handle vh_1 = border_elt.first;// vertex 1 border_elt = *(vh_1->first_incident()); - Vertex_handle vh_2 = border_elt.first;// sommet 2 + Vertex_handle vh_2 = border_elt.first;// vertex 2 border_elt = *(vh_2->first_incident()); - Vertex_handle vh_3 = border_elt.first;// sommet 0 ??? + Vertex_handle vh_3 = border_elt.first;// vertex 0 ??? Cell_handle c; int i, j, k; if ((vh_3 == vh)&&(T.is_facet(vh, vh_1, vh_2, c, i ,j ,k))) @@ -2328,7 +2315,7 @@ namespace CGAL { } - // Reperer le cas d'aretes interieures... + // Detect the interior edges case std::list vh_list; T.incident_vertices(vh, std::back_inserter(vh_list)); @@ -2402,9 +2389,9 @@ namespace CGAL { std::list L_v; - // Pour controler les sommets choisis sur le bord... + // To control vertices chosen on the boundary - // nombre d'aretes a partir duquel on considere que c'est irrecuperable NB_BORDER_MAX + // NB_BORDER_MAX: number of edges from which we consider that things are irrecoverable int vh_on_border_inserted(0); for(Finite_vertices_iterator v_it = T.finite_vertices_begin(); @@ -2445,7 +2432,7 @@ namespace CGAL { std::size_t itmp, L_v_size_mem; L_v_size_mem = L_v.size(); - if ((vh_on_border_inserted != 0)&& // pour ne post-traiter que les bords + if ((vh_on_border_inserted != 0)&& // to post-process only the borders (L_v.size() < .1 * _size_before_postprocessing)) { { @@ -2460,7 +2447,7 @@ namespace CGAL { } #ifdef VERBOSE if(L_v.size() > 0){ - std::cout << " " << L_v.size() << " non regular points." << std::endl; + std::cout << " " << L_v.size() << " non-regular points." << std::endl; } #endif // VERBOSE re_compute_values(); @@ -2469,7 +2456,7 @@ namespace CGAL { postprocess_timer.stop(); return false; } - // we stop if we removed more than 10% of points or after 20 rounds + // we stop if we removed more than 10% of points, or after 20 rounds if ((L_v_size_mem == L_v.size())|| ((_size_before_postprocessing - T.number_of_vertices()) > .1 * _size_before_postprocessing)|| @@ -2479,7 +2466,6 @@ namespace CGAL { } min_K = infinity(); - // fin-- // if (_postprocessing_counter < 5) // return true; postprocess_timer.stop(); diff --git a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/Surface_face_base_2.h b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/Surface_face_base_2.h index 73872087..a9f46f84 100644 --- a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/Surface_face_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/Surface_face_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction/internal/Surface_face_base_2.h $ -// $Id: Surface_face_base_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction/internal/Surface_face_base_2.h $ +// $Id: include/CGAL/Advancing_front_surface_reconstruction/internal/Surface_face_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Frank Da, David Cohen-Steiner, Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/Surface_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/Surface_vertex_base_2.h index ddf850c6..1574f1a5 100644 --- a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/Surface_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/Surface_vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction/internal/Surface_vertex_base_2.h $ -// $Id: Surface_vertex_base_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction/internal/Surface_vertex_base_2.h $ +// $Id: include/CGAL/Advancing_front_surface_reconstruction/internal/Surface_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Frank Da, David Cohen-Steiner, Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/construct_polyhedron.h b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/construct_polyhedron.h index c8ac85bc..db7117bd 100644 --- a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/construct_polyhedron.h +++ b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/construct_polyhedron.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction/internal/construct_polyhedron.h $ -// $Id: construct_polyhedron.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction/internal/construct_polyhedron.h $ +// $Id: include/CGAL/Advancing_front_surface_reconstruction/internal/construct_polyhedron.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Frank Da, David Cohen-Steiner, Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/construct_surface_2.h b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/construct_surface_2.h index 4714fb2f..55a9d441 100644 --- a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/construct_surface_2.h +++ b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/construct_surface_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction/internal/construct_surface_2.h $ -// $Id: construct_surface_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction/internal/construct_surface_2.h $ +// $Id: include/CGAL/Advancing_front_surface_reconstruction/internal/construct_surface_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Frank Da, David Cohen-Steiner, Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/write_triple_indices.h b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/write_triple_indices.h index 53c28694..110248d5 100644 --- a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/write_triple_indices.h +++ b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction/internal/write_triple_indices.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction/internal/write_triple_indices.h $ -// $Id: write_triple_indices.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction/internal/write_triple_indices.h $ +// $Id: include/CGAL/Advancing_front_surface_reconstruction/internal/write_triple_indices.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Frank Da, David Cohen-Steiner, Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction_cell_base_3.h index 43fbfe05..c6614611 100644 --- a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction_cell_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction_cell_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_cell_base_3.h $ -// $Id: Advancing_front_surface_reconstruction_cell_base_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_cell_base_3.h $ +// $Id: include/CGAL/Advancing_front_surface_reconstruction_cell_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Frank Da, David Cohen-Steiner, Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h index a3092b71..06b438e9 100644 --- a/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h $ -// $Id: Advancing_front_surface_reconstruction_vertex_base_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h $ +// $Id: include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Frank Da, David Cohen-Steiner, Andreas Fabri @@ -220,7 +220,7 @@ namespace CGAL { else { if (m_incident_border->second->first != nullptr) - std::cerr << "+++probleme de MAJ du bord " << std::endl; + std::cerr << "+++issue while updating border " << std::endl; *m_incident_border->second = elt; } } diff --git a/thirdparty/CGAL/include/CGAL/Aff_transformation_2.h b/thirdparty/CGAL/include/CGAL/Aff_transformation_2.h index 557d1f23..7ed2a2fb 100644 --- a/thirdparty/CGAL/include/CGAL/Aff_transformation_2.h +++ b/thirdparty/CGAL/include/CGAL/Aff_transformation_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Aff_transformation_2.h $ -// $Id: Aff_transformation_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Aff_transformation_2.h $ +// $Id: include/CGAL/Aff_transformation_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri, Stefan Schirra diff --git a/thirdparty/CGAL/include/CGAL/Aff_transformation_3.h b/thirdparty/CGAL/include/CGAL/Aff_transformation_3.h index b473fac8..29c22a27 100644 --- a/thirdparty/CGAL/include/CGAL/Aff_transformation_3.h +++ b/thirdparty/CGAL/include/CGAL/Aff_transformation_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Aff_transformation_3.h $ -// $Id: Aff_transformation_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Aff_transformation_3.h $ +// $Id: include/CGAL/Aff_transformation_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri, Stefan Schirra diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_extension_traits.h b/thirdparty/CGAL/include/CGAL/Algebraic_extension_traits.h index ef9c1e5d..7afa4427 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_extension_traits.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_extension_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_foundations/include/CGAL/Algebraic_extension_traits.h $ -// $Id: Algebraic_extension_traits.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_foundations/include/CGAL/Algebraic_extension_traits.h $ +// $Id: include/CGAL/Algebraic_extension_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_converter.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_converter.h index b4870ec4..e4edb279 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_converter.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_converter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_circles/include/CGAL/Algebraic_kernel_converter.h $ -// $Id: Algebraic_kernel_converter.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_circles/include/CGAL/Algebraic_kernel_converter.h $ +// $Id: include/CGAL/Algebraic_kernel_converter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Constantinos Tsirogiannis diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h index 8f4e5ad5..03a65601 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h $ -// $Id: Algebraic_curve_kernel_2.h 7322c79 2022-11-21T14:09:08+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,10 +24,10 @@ #define CGAL_ALGEBRAIC_CURVE_KERNEL_D_2_H #include +#include #include #include -#include -#include +#include #include #include @@ -73,7 +73,7 @@ namespace CGAL { * in turn required by the \c CurvedKernelViaAnalysis_2 concept * (see the documentation of the corresponding package). Therefore, * some types and methods of the class have both an "algebraic" name - * (demanded by \c CurveKernelWithAnalysis_d_2) and an "non-algebraic name + * (demanded by \c CurveKernelWithAnalysis_d_2) and a "non-algebraic" name * (demanded by \c CurveKernel_2). * * \b Algebraic_curve_kernel_2 is a template class, and needs a model @@ -359,7 +359,7 @@ class Algebraic_curve_kernel_2 : public AlgebraicKernel_d_1{ Unary_compose(const Unary_compose& other) = default; Unary_compose& operator=(const Unary_compose& other) = default; - Unary_compose() : _inner(::boost::none),_outer(::boost::none) {} + Unary_compose() : _inner(::std::nullopt),_outer(::std::nullopt) {} typedef typename InnerFunctor::argument_type argument_type; typedef typename OuterFunctor::result_type result_type; @@ -368,11 +368,11 @@ class Algebraic_curve_kernel_2 : public AlgebraicKernel_d_1{ result_type operator() (const argument_type& arg) const { CGAL_assertion(bool(_inner)); CGAL_assertion(bool(_outer)); - return _outer.get()(_inner.get()(arg)); + return _outer.value()(_inner.value()(arg)); } private: - ::boost::optional _inner; - ::boost::optional _outer; + ::std::optional _inner; + ::std::optional _outer; }; template @@ -481,18 +481,18 @@ class Algebraic_curve_kernel_2 : public AlgebraicKernel_d_1{ Curve_analysis_2 _construct_defining_polynomial_from(Bound b) const { typedef CGAL::Fraction_traits FT; // We rely on the fact that the Bound is a fraction - CGAL_static_assertion((::boost::is_same::value)); + static_assert(::std::is_same::value); typedef typename FT::Numerator_type Numerator; typedef typename FT::Denominator_type Denominator; typedef CGAL::Coercion_traits Num_coercion; - CGAL_static_assertion((::boost::is_same + static_assert(::std::is_same ::value)); + typename Num_coercion::Type>::value); typedef CGAL::Coercion_traits Denom_coercion; - CGAL_static_assertion((::boost::is_same + static_assert(::std::is_same ::value)); + typename Denom_coercion::Type>::value); typename Num_coercion::Cast num_cast; typename Denom_coercion::Cast denom_cast; typename FT::Decompose decompose; @@ -840,7 +840,7 @@ class Algebraic_curve_kernel_2 : public AlgebraicKernel_d_1{ } else { // more work! We should not assume that each // roots[i].first has f or g as defining polynomial, because - // the representation might have been simplifed + // the representation might have been simplified // Here's the safe way: Take the simpler of the curves // (but the one without vertical component!) @@ -922,7 +922,7 @@ class Algebraic_curve_kernel_2 : public AlgebraicKernel_d_1{ * * \attention{This method returns the y-coordinate in isolating interval * representation. Calculating such a representation is usually a time- - * consuming taks, since it is against the "y-per-x"-view that we take + * consuming task, since it is against the "y-per-x"-view that we take * in our kernel. Therefore, it is recommended, if possible, * to use the functors * \c Approximate_absolute_y_2 and \c Approximate_relative_y_2 that @@ -2541,18 +2541,18 @@ class Algebraic_curve_kernel_2 : public AlgebraicKernel_d_1{ Polynomial_1 operator() (const Polynomial_2& f, Bound b) const { typedef CGAL::Fraction_traits FT; // We rely on the fact that the Bound is a fraction - CGAL_static_assertion((::boost::is_same::value)); + static_assert(::std::is_same::value); typedef typename FT::Numerator_type Numerator; typedef typename FT::Denominator_type Denominator; typedef CGAL::Coercion_traits Num_coercion; - CGAL_static_assertion((::boost::is_same + static_assert(::std::is_same ::value)); + typename Num_coercion::Type>::value); typedef CGAL::Coercion_traits Denom_coercion; - CGAL_static_assertion((::boost::is_same + static_assert(::std::is_same ::value)); + typename Denom_coercion::Type>::value); typename Num_coercion::Cast num_cast; typename Denom_coercion::Cast denom_cast; typename FT::Decompose decompose; diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h index 95d3bfc5..54a83968 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h $ -// $Id: Algebraic_real_d_1.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -71,8 +71,8 @@ class Algebraic_real_d_1 : public ::CGAL::Handle_with_policy< AlgebraicRealRep_d_1, HandlePolicy > { // currently Rational is the only supported Bound type. - CGAL_static_assertion( - ( ::boost::is_same ::Arithmetic_kernel::Rational>::value)); @@ -174,7 +174,7 @@ public : long old_precision = get_precision( BFI() ); set_precision( BFI(), 53 ); std::pair interval = CGAL::to_interval( convert_to_bfi( (*this))); - this->ptr()->interval_option = boost::optional< std::pair >(interval); + this->ptr()->interval_option = std::optional< std::pair >(interval); set_precision( BFI(), old_precision ); return *(this->ptr()->interval_option); } @@ -579,7 +579,7 @@ struct Coercion_traits< typedef Type result_type; Type operator()(const Type& a) const { return a; } Type operator()(const Coefficient& a) const { - static const bool b = boost::is_same::value; + static const bool b = std::is_same::value; return (*this)(a,Boolean_tag()); } }; diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h index c5eac4a2..a35008b9 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h $ -// $Id: Algebraic_real_quadratic_refinement_rep_bfi.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -45,7 +45,7 @@ namespace internal { * @Unpublished{abbott-quadratic, * author = {John Abbott}, * title = {Quadratic Interval Refinement for Real Roots}, - * url = {http://www.dima.unige.it/~abbott/}, + * url = {https://www.dima.unige.it/~abbott/}, * note = {Poster presented at the 2006 Internat. Sympos. on Symbolic and Algebraic Computation (ISSAC 2006)} * } @@ -86,10 +86,10 @@ class Algebraic_real_quadratic_refinement_rep_bfi CGAL::Polynomial_traits_d::template Rebind ::Other::Type BFI_polynomial; - mutable boost::optional + mutable std::optional < BFI_polynomial > f_bfi_; - mutable boost::optional low_bfi_, f_low_bfi_, + mutable std::optional low_bfi_, f_low_bfi_, high_bfi_, f_high_bfi_; mutable long N; @@ -113,8 +113,8 @@ class Algebraic_real_quadratic_refinement_rep_bfi low_bfi_ = CGAL::convert_to_bfi(this->low()); high_bfi_ = CGAL::convert_to_bfi(this->high()); - f_low_bfi_ = f_bfi_.get().evaluate(low_bfi_.get()); - f_high_bfi_ = f_bfi_.get().evaluate(high_bfi_.get()); + f_low_bfi_ = f_bfi_.value().evaluate(low_bfi_.value()); + f_high_bfi_ = f_bfi_.value().evaluate(high_bfi_.value()); } @@ -125,7 +125,7 @@ class Algebraic_real_quadratic_refinement_rep_bfi } m_bfi = CGAL::convert_to_bfi(m); - f_m_bfi = f_bfi_.get().evaluate(m_bfi); + f_m_bfi = f_bfi_.value().evaluate(m_bfi); if(CGAL::zero_in(f_m_bfi)) { @@ -229,21 +229,21 @@ class Algebraic_real_quadratic_refinement_rep_bfi bool poly_changed = (P!=this->polynomial()); if(poly_changed) { - f_bfi_ = boost::none; + f_bfi_ = std::nullopt; } if(poly_changed || LOW != this->low()) { - f_low_bfi_ = low_bfi_ = boost::none; + f_low_bfi_ = low_bfi_ = std::nullopt; } if(poly_changed || HIGH != this->high()) { - f_high_bfi_ = high_bfi_ = boost::none; + f_high_bfi_ = high_bfi_ = std::nullopt; } Base::set_implicit_rep(P,LOW,HIGH,dummy_bool); } virtual void set_explicit_rep(const Field& m) const { - f_bfi_ = boost::none; - f_low_bfi_ = low_bfi_ = boost::none; - f_high_bfi_ = high_bfi_ = boost::none; + f_bfi_ = std::nullopt; + f_low_bfi_ = low_bfi_ = std::nullopt; + f_high_bfi_ = high_bfi_ = std::nullopt; Base::set_explicit_rep(m); } @@ -256,13 +256,13 @@ class Algebraic_real_quadratic_refinement_rep_bfi if(this->is_rational()) return; if(old_low_!=this->low_) { - f_low_bfi_ = low_bfi_ = boost::none; + f_low_bfi_ = low_bfi_ = std::nullopt; } if(old_high_!=this->high_) { - f_high_bfi_ = high_bfi_ = boost::none; + f_high_bfi_ = high_bfi_ = std::nullopt; } if(old_pol != this->polynomial()) { - f_bfi_ = boost::none; + f_bfi_ = std::nullopt; } } @@ -329,25 +329,25 @@ class Algebraic_real_quadratic_refinement_rep_bfi low_bfi_ = CGAL::convert_to_bfi(this->low()); } if(! f_low_bfi_) { - f_low_bfi_ = f_bfi_.get().evaluate(low_bfi_.get()); + f_low_bfi_ = f_bfi_.value().evaluate(low_bfi_.value()); } if(! high_bfi_) { high_bfi_ = CGAL::convert_to_bfi(this->high()); } if(! f_high_bfi_) { - f_high_bfi_ = f_bfi_.get().evaluate(high_bfi_.get()); + f_high_bfi_ = f_bfi_.value().evaluate(high_bfi_.value()); } Integer i; while(true) { - if(CGAL::zero_in(f_low_bfi_.get() - f_high_bfi_.get())) { + if(CGAL::zero_in(f_low_bfi_.value() - f_high_bfi_.value())) { _set_prec(2*prec_); continue; } - BFI denom = f_low_bfi_.get()-f_high_bfi_.get(); + BFI denom = f_low_bfi_.value()-f_high_bfi_.value(); - BFI z = f_low_bfi_.get() / denom; + BFI z = f_low_bfi_.value() / denom; std::pair int_pair = _to_integer_interval(z,N); Integer i_low = int_pair.first; @@ -458,7 +458,7 @@ class Algebraic_real_quadratic_refinement_rep_bfi f_bfi_ = _convert_polynomial_to_bfi(this->polynomial()); } - BFI eval = f_bfi_.get().evaluate(convert_to_bfi(m)); + BFI eval = f_bfi_.value().evaluate(convert_to_bfi(m)); CGAL::Sign s = CGAL::sign(CGAL::lower(eval)); @@ -490,11 +490,11 @@ class Algebraic_real_quadratic_refinement_rep_bfi Poly f_old = this->polynomial(); Base::simplify(); if(f_old != this->polynomial()) { - f_bfi_ = boost::none; + f_bfi_ = std::nullopt; } } }; -} // namepace internal +} // namespace internal } //namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h index 18cd228d..8a389192 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h $ -// $Id: Algebraic_real_rep.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,7 @@ #include #include #include -#include +#include namespace CGAL { @@ -38,7 +38,7 @@ namespace internal { // sign_at_low_ = polynomial_.evaluate(low_) // x is the only root of polynomial_ in the open interval ]low_,high_[ // low_ != x != high -// ******************* EXEPTION ******************* +// ******************* EXCEPTION ******************* // x is rational: in this case low=high=x template< class Coefficient_, class Rational_> @@ -56,7 +56,7 @@ class Algebraic_real_rep{ typedef Algebraic_real_rep Self; public: - typedef boost::optional< std::pair > Interval_option; + typedef std::optional< std::pair > Interval_option; mutable Poly polynomial_; //!< square free polynomial mutable Rational low_; //!< lower endpoint of interval @@ -135,7 +135,7 @@ class Algebraic_real_rep{ // interval_option left out - // trys to set rational if degree is 1 + // tries to set rational if degree is 1 typedef typename CGAL::Coercion_traits< Coefficient, Rational >::Type RET; set_rational(RET()); } diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h index d3cfb429..00106732 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h $ -// $Id: Algebraic_real_rep_bfi.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -52,7 +52,7 @@ namespace internal { // sign_at_low_ = polynomial_.evaluate(low_) // x is the only root of polynomial_ in the open interval ]low_,high_[ // low_ != x != high -// ******************* EXEPTION ******************* +// ******************* EXCEPTION ******************* // x is rational: in this case low=high=x diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel.h index 89ee8dcf..f6ecc991 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel.h $ -// $Id: Bitstream_coefficient_kernel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h index d2a68227..61e7ca1b 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h $ -// $Id: Bitstream_coefficient_kernel_at_alpha.h fdb17cb 2020-03-26T19:26:10+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h index 802f207b..5af5ab7a 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h $ -// $Id: Bitstream_descartes.h 7322c79 2022-11-21T14:09:08+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -1217,7 +1217,7 @@ class Bitstream_descartes * * The polynomial \c f must have exactly \c m real roots, counted without * multiplicity, and the degree of gcd(f,f') must be \c k. In this - * case, the constructor either isolates the real roots of \c f sucessfully + * case, the constructor either isolates the real roots of \c f successfully * or a Non_generic_position_exception is thrown. Such an exception * certainly occurs if \c f has more than one multiple real root. If \c f * has at most one multiple root over the complex numbers, the roots are diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h index 57e05c5f..0f1305c1 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h $ -// $Id: Bitstream_descartes_E08_tree.h c0ba9b4 2022-11-22T17:42:02+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -31,7 +31,7 @@ #include #include -#include +#include /* * AUXILIARY CLASSES AND FUNCTIONS @@ -446,7 +446,7 @@ struct Bitstream_descartes_E08_node { Integer_vector coeff_; // wrt [lower_, upper_], approximate int min_var_, max_var_; bool coeff_update_delayed_; - // "state data" (copied en bloc by .copy_state_from()) + // "state data" (copied en block by .copy_state_from()) long subdepth_bound_, subdepth_current_; long log_eps_; // $q - p$ long log_C_eps_; // $q - p + 4n$ diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h index 3fa407fc..5f4ae86c 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h $ -// $Id: Bitstream_descartes_rndl_tree.h 6fd4c16 2022-11-22T17:47:19+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -534,7 +534,7 @@ struct Bitstream_descartes_rndl_node { long log_bdry_den_; Integer_vector coeff_; // wrt [lower_, upper_], approximate int min_var_, max_var_; - // "state data" (copied en bloc by .copy_state_from()) + // "state data" (copied en block by .copy_state_from()) long subdiv_tries_, subdiv_fails_; long recdepth_; long log_sep_, delta_log_sep_, log_eps_, log_C_eps_; @@ -737,7 +737,7 @@ class Bitstream_descartes_rndl_tree_rep { Supplying a traits class This class is actually a class template. - To use it, you need to instanciate it with a traits class + To use it, you need to instantiate it with a traits class that defines the following three types and the various functors on them listed below. - \c Coefficient: The type of coefficients supplied @@ -750,7 +750,7 @@ class Bitstream_descartes_rndl_tree_rep { - \c Bound: \c lower() and \c upper() return interval boundaries in this type. Must be \c Assignable. The canonical choice is \c NiX::Exact_float_number. - If you never instanciate \c lower() and \c upper() + If you never instantiate \c lower() and \c upper() (maybe use \c boundaries() instead), you might be lucky and get away with typedef'ing this to \c void. @@ -773,7 +773,7 @@ class Bitstream_descartes_rndl_tree_rep { - \c Lower_bound_log2_abs: A \c UnaryFunction with signature long l = Lower_bound_log2_abs()(Coefficient x). The result \c l must be a lower bound to log2(|x|). - If \c Coefficient posesses \c NiX::NT_traits::Floor_log2_abs, + If \c Coefficient possesses \c NiX::NT_traits::Floor_log2_abs, you can simply use that. - \c lower_bound_log2_abs_object(): A \c const member function taking no arguments and returning a function object diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h index 8e52fefd..68f486ab 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h $ -// $Id: Bitstream_descartes_rndl_tree_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h index 25584ee2..e98206e0 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h $ -// $Id: Curve_analysis_2.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,13 +20,11 @@ #include #include #include +#include #include -#include #include #include -#include - #include #include @@ -67,14 +65,14 @@ namespace internal { template struct Is_derived_from_Handle_with_policy { - typedef boost::false_type Tag; + typedef std::false_type Tag; }; template struct Is_derived_from_Handle_with_policy { typedef typename - boost::is_base_of< CGAL::Handle_with_policy + std::is_base_of< CGAL::Handle_with_policy < typename Comparable::T, typename Comparable::Handle_policy, typename Comparable::Allocator >, @@ -91,7 +89,7 @@ template struct Compare_for_vert_line_map_ }; template - struct Compare_for_vert_line_map_ { + struct Compare_for_vert_line_map_ { bool operator() (const Comparable& a, const Comparable& b) const { return CGAL::Handle_id_less_than< Comparable >()(a,b); @@ -198,7 +196,7 @@ class Curve_analysis_2_rep { size_type index_of_content_root; size_type mult_of_prim_lcoeff_root; size_type index_of_prim_lcoeff_root; - boost::optional stack; + std::optional stack; }; // Functor to get the X_coordinate of an Event_coordinate @@ -212,14 +210,14 @@ class Curve_analysis_2_rep { //! The object holding the information about events, as an optional - mutable boost::optional > + mutable std::optional > event_coordinates; //! The algebraic kernel to use Algebraic_kernel_with_analysis_2* _m_kernel; //! The polynomial defining the curve - boost::optional f; + std::optional f; //! How degenerate situations are handled CGAL::Degeneracy_strategy degeneracy_strategy; @@ -232,24 +230,24 @@ class Curve_analysis_2_rep { * \c f/cont(f). The corresponding curve is equal to the curve of \c f, * only without vertical line components. */ - mutable boost::optional f_primitive; + mutable std::optional f_primitive; //! the polynomial containing all roots of the resultant of the primitive //! part of f and its y-derivative - mutable boost::optional + mutable std::optional resultant_of_primitive_and_derivative_y; //! the polynomial containing all roots of the resultant of the primitive //! part of f and its x-derivative - mutable boost::optional + mutable std::optional resultant_of_primitive_and_derivative_x; //! The Sturm-Habicht polynomials of f - mutable boost::optional > + mutable std::optional > sturm_habicht_of_primitive; //! The content of f - mutable boost::optional content; + mutable std::optional content; //! The non-working shear factors, as far as known mutable std::set bad_shears; @@ -258,10 +256,10 @@ class Curve_analysis_2_rep { mutable std::map sheared_curves; //! Has the curve vertical line components - mutable boost::optional has_vertical_component; + mutable std::optional has_vertical_component; //! The intermediate values - mutable boost::optional > > + mutable std::optional > > intermediate_values; //! stores Y_values at rational coordinate @@ -274,7 +272,7 @@ class Curve_analysis_2_rep { * are asymptotic to y=beta, * or go to +/- infty also in y-direction */ - mutable boost::optional > + mutable std::optional > horizontal_asymptotes_left, horizontal_asymptotes_right; //! friends @@ -482,7 +480,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { * \c internal::Zero_resultant_exception, * instead of performing a shear. * - * \Todo Currently the defualt strategy has been changed to SHEAR_STRATEGY + * \Todo Currently the default strategy has been changed to SHEAR_STRATEGY * because there exist a problem if vertical asymtotes are present at * the rational x-coordinate. */ @@ -548,7 +546,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { if(! this->ptr()->intermediate_values) { this->ptr()->intermediate_values - = std::vector > + = std::vector > (number_of_status_lines_with_event()+1); } @@ -585,7 +583,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { */ void set_f(Polynomial_2 f) { CGAL_precondition(! has_defining_polynomial()); - if((! this->ptr()->f) || f!=this->ptr()->f.get()) { + if((! this->ptr()->f) || f!=this->ptr()->f.value()) { this->copy_on_write(); this->ptr()->f=f; } @@ -632,7 +630,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { event_coordinates(); CGAL_assertion(this->ptr()->has_vertical_component); } - return this->ptr()->has_vertical_component.get(); + return this->ptr()->has_vertical_component.value(); } public: @@ -640,7 +638,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { //! Returns the defining polynomial Polynomial_2 polynomial_2() const { CGAL_precondition(bool(this->ptr()->f)); - return this->ptr()->f.get(); + return this->ptr()->f.value(); } public: @@ -715,8 +713,8 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { = event_line; event_coordinates()[i].stack = event_line; } - CGAL_postcondition(event_coordinates()[i].stack.get().is_event()); - return event_coordinates()[i].stack.get(); + CGAL_postcondition(event_coordinates()[i].stack.value().is_event()); + return event_coordinates()[i].stack.value(); } public: @@ -1168,7 +1166,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { /*! * \brief returns the status line for the interval - * preceeding the ith event + * preceding the ith event * * Returns a status line for a reference x-coordinate of the ith * interval of the curve. If called multiple times for the same i, @@ -1350,7 +1348,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { } } } - return intermediate_values()[i].get(); + return intermediate_values()[i].value(); } @@ -1371,7 +1369,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { if(! this->ptr()->content) { compute_content_and_primitive_part(); } - return this->ptr()->content.get(); + return this->ptr()->content.value(); } public: @@ -1390,7 +1388,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { if(! this->ptr()->f_primitive) { compute_content_and_primitive_part(); } - return this->ptr()->f_primitive.get(); + return this->ptr()->f_primitive.value(); } Algebraic_kernel_with_analysis_2* kernel() const { @@ -1438,7 +1436,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { if(! this->ptr()->sturm_habicht_of_primitive) { compute_sturm_habicht_of_primitive(); } - return this->ptr()->sturm_habicht_of_primitive.get(); + return this->ptr()->sturm_habicht_of_primitive.value(); } public: @@ -1559,7 +1557,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { if(! this->ptr()->resultant_of_primitive_and_derivative_y) { this->ptr()->resultant_of_primitive_and_derivative_y = stha[0][0]; if(this->ptr()->resultant_of_primitive_and_derivative_y. - get().is_zero()) { + value().is_zero()) { throw internal::Zero_resultant_exception (polynomial_2()); } @@ -1583,7 +1581,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { if(! this->ptr()->resultant_of_primitive_and_derivative_y) { compute_resultant_of_primitive_and_derivative_y(); } - return this->ptr()->resultant_of_primitive_and_derivative_y.get(); + return this->ptr()->resultant_of_primitive_and_derivative_y.value(); } private: @@ -1594,7 +1592,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { if(! this->ptr()->resultant_of_primitive_and_derivative_x) { compute_resultant_of_primitive_and_derivative_x(); } - return this->ptr()->resultant_of_primitive_and_derivative_x.get(); + return this->ptr()->resultant_of_primitive_and_derivative_x.value(); } private: @@ -1715,20 +1713,20 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { if(! this->ptr()->event_coordinates) { compute_event_coordinates(); } - return this->ptr()->event_coordinates.get(); + return this->ptr()->event_coordinates.value(); } private: // Returns the intermediate values for intervals between events - std::vector >& intermediate_values() const + std::vector >& intermediate_values() const { if(! this->ptr()->intermediate_values) { // This is created during event_coordiantes() event_coordinates(); CGAL_assertion(bool(this->ptr()->intermediate_values)); } - return this->ptr()->intermediate_values.get(); + return this->ptr()->intermediate_values.value(); } @@ -1828,7 +1826,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { static_cast(lcoeff_roots.size()) && event_values[i]==lcoeff_roots[curr_lcoeff_index]) { // We have a root of the leading coefficient - // of the primitve polynomial + // of the primitive polynomial curr_event.index_of_prim_lcoeff_root = curr_lcoeff_index; curr_event.mult_of_prim_lcoeff_root = lcoeff_mults[curr_lcoeff_index]; @@ -1868,7 +1866,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { static_cast(lcoeff_roots.size()) && event_values[i]==lcoeff_roots[curr_lcoeff_index]) { // We have a root of the leading coefficient - // of the primitve polynomial + // of the primitive polynomial curr_event.index_of_prim_lcoeff_root = curr_lcoeff_index; curr_event.mult_of_prim_lcoeff_root = lcoeff_mults[curr_lcoeff_index]; @@ -1917,7 +1915,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { static_cast(content_roots.size())); this->ptr()->intermediate_values - = std::vector > + = std::vector > (event_coordinate_vector.size()+1); this->ptr()->event_coordinates = event_coordinate_vector; @@ -2112,7 +2110,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { compute_horizontal_asymptotes(); } std::vector& asym_info - = this->ptr()->horizontal_asymptotes_left.get(); + = this->ptr()->horizontal_asymptotes_left.value(); CGAL_precondition(arcno>=0 && arcno(asym_info.size())); return asym_info[arcno]; @@ -2122,7 +2120,7 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > { compute_horizontal_asymptotes(); } std::vector& asym_info - = this->ptr()->horizontal_asymptotes_right.get(); + = this->ptr()->horizontal_asymptotes_right.value(); CGAL_precondition(arcno>=0 && arcno(asym_info.size())); return asym_info[arcno]; diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h index 5aebdab0..e3502cea 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h $ -// $Id: Curve_pair_analysis_2.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -136,9 +136,9 @@ class Curve_pair_analysis_2_rep { typedef std::vector Slice_info; - typedef boost::optional Lazy_slice_info; + typedef std::optional Lazy_slice_info; - typedef boost::optional Lazy_bound; + typedef std::optional Lazy_bound; typedef CGAL::internal::Event_indices Event_indices; @@ -151,11 +151,11 @@ class Curve_pair_analysis_2_rep { typedef std::vector > Intersection_info_container; - typedef boost::optional + typedef std::optional Lazy_intersection_info_container; // For lazy evaluation of Status_line_CPA_1s. - typedef boost::optional Lazy_status_line_CPA_1; + typedef std::optional Lazy_status_line_CPA_1; //! @} @@ -191,31 +191,31 @@ class Curve_pair_analysis_2_rep { Polynomial_2 g; - mutable boost::optional > subresultants; + mutable std::optional > subresultants; - mutable boost::optional > + mutable std::optional > principal_subresultants; - mutable boost::optional > + mutable std::optional > coprincipal_subresultants; - mutable boost::optional resultant; + mutable std::optional resultant; - mutable boost::optional > resultant_roots; - mutable boost::optional > + mutable std::optional > resultant_roots; + mutable std::optional > event_x_coordinates; - mutable boost::optional > + mutable std::optional > multiplicities_of_resultant_roots; - mutable boost::optional > stripe_values; + mutable std::optional > stripe_values; mutable std::vector< Lazy_status_line_CPA_1 > event_slices; - mutable boost::optional > intermediate_values; + mutable std::optional > intermediate_values; - mutable boost::optional< std::vector< Lazy_status_line_CPA_1 > > + mutable std::optional< std::vector< Lazy_status_line_CPA_1 > > intermediate_slices; - mutable boost::optional > event_indices; + mutable std::optional > event_indices; mutable Lazy_intersection_info_container intersection_info_container; @@ -530,7 +530,7 @@ class Curve_pair_analysis_2 : /* * \brief Computes the intermediate x-coordinates and their status lines * - * In fact, it only fills the data fields with boost::none instances, + * In fact, it only fills the data fields with std::nullopt instances, * according to the lazy philosophy of the whole class. */ void compute_intermediate_values_and_slices() const; @@ -547,7 +547,7 @@ class Curve_pair_analysis_2 : compute_resultant(); } CGAL_assertion(bool(this->ptr()->resultant)); - return this->ptr()->resultant.get(); + return this->ptr()->resultant.value(); } std::vector& resultant_roots() const { @@ -555,7 +555,7 @@ class Curve_pair_analysis_2 : compute_resultant_roots_with_multiplicities(); } CGAL_assertion(bool(this->ptr()->resultant_roots)); - return this->ptr()->resultant_roots.get(); + return this->ptr()->resultant_roots.value(); } Algebraic_real_1& resultant_roots(size_type i) const { @@ -569,7 +569,7 @@ class Curve_pair_analysis_2 : compute_resultant_roots_with_multiplicities(); } CGAL_assertion(bool(this->ptr()->multiplicities_of_resultant_roots)); - return this->ptr()->multiplicities_of_resultant_roots.get(); + return this->ptr()->multiplicities_of_resultant_roots.value(); } size_type multiplicities_of_resultant_roots(size_type i) const { @@ -586,10 +586,10 @@ class Curve_pair_analysis_2 : (kernel(), resultant_roots().begin(), resultant_roots().end(), - std::back_inserter(this->ptr()->stripe_values.get())); + std::back_inserter(this->ptr()->stripe_values.value())); } CGAL_assertion(bool(this->ptr()->stripe_values)); - return this->ptr()->stripe_values.get(); + return this->ptr()->stripe_values.value(); } std::vector& event_x_coordinates() const { @@ -597,7 +597,7 @@ class Curve_pair_analysis_2 : compute_event_x_coordinates_with_event_indices(); } CGAL_assertion(bool(this->ptr()->event_x_coordinates)); - return this->ptr()->event_x_coordinates.get(); + return this->ptr()->event_x_coordinates.value(); } std::vector& event_indices() const { @@ -605,7 +605,7 @@ class Curve_pair_analysis_2 : compute_event_x_coordinates_with_event_indices(); } CGAL_assertion(bool(this->ptr()->event_indices)); - return this->ptr()->event_indices.get(); + return this->ptr()->event_indices.value(); } public: @@ -613,7 +613,7 @@ class Curve_pair_analysis_2 : /* * \brief returns the indices of the ith event value * - * Returns a Event_indices (fg,ffy,ggy) such that + * Returns an `Event_indices` (fg,ffy,ggy) such that * the ith event root is the fgth root of the * resultant of \c f and \c g, the ffyth root of the * discriminant of \c f, and the ggyth root of the @@ -633,7 +633,7 @@ class Curve_pair_analysis_2 : compute_intermediate_values_and_slices(); } CGAL_assertion(bool(this->ptr()->intermediate_values)); - return this->ptr()->intermediate_values.get(); + return this->ptr()->intermediate_values.value(); } std::vector& intermediate_slices() const { @@ -641,7 +641,7 @@ class Curve_pair_analysis_2 : compute_intermediate_values_and_slices(); } CGAL_assertion(bool(this->ptr()->intermediate_slices)); - return this->ptr()->intermediate_slices.get(); + return this->ptr()->intermediate_slices.value(); } @@ -652,7 +652,7 @@ class Curve_pair_analysis_2 : compute_subresultants(); } CGAL_assertion(bool(this->ptr()->subresultants)); - return this->ptr()->subresultants.get(); + return this->ptr()->subresultants.value(); } Polynomial_2& subresultants(size_type i) const { @@ -666,7 +666,7 @@ class Curve_pair_analysis_2 : compute_subresultants(); } CGAL_assertion(bool(this->ptr()->principal_subresultants)); - return this->ptr()->principal_subresultants.get(); + return this->ptr()->principal_subresultants.value(); } Polynomial_1& principal_subresultants(size_type i) const { @@ -681,7 +681,7 @@ class Curve_pair_analysis_2 : compute_subresultants(); } CGAL_assertion(bool(this->ptr()->coprincipal_subresultants)); - return this->ptr()->coprincipal_subresultants.get(); + return this->ptr()->coprincipal_subresultants.value(); } Polynomial_1& coprincipal_subresultants(size_type i) const { @@ -1030,7 +1030,7 @@ class Curve_pair_analysis_2 : this->ptr()->event_slices[i] = create_event_slice(i); } CGAL_assertion(bool(this->ptr()->event_slices[i])); - return this->ptr()->event_slices[i].get(); + return this->ptr()->event_slices[i].value(); } @@ -1045,7 +1045,7 @@ class Curve_pair_analysis_2 : } - return intermediate_slices()[i].get(); + return intermediate_slices()[i].value(); } //! Returns bound representative value at the ith interval @@ -1074,7 +1074,7 @@ class Curve_pair_analysis_2 : } } CGAL_assertion(bool(intermediate_values()[i])); - return intermediate_values()[i].get(); + return intermediate_values()[i].value(); } @@ -1312,11 +1312,11 @@ void Curve_pair_analysis_2::compute_resultant() compute_subresultants(); this->ptr()->resultant - = this->ptr()->principal_subresultants.get()[0]; + = this->ptr()->principal_subresultants.value()[0]; } - if(this->ptr()->resultant.get().is_zero()) { + if(this->ptr()->resultant.value().is_zero()) { throw CGAL::internal::Zero_resultant_exception (this->ptr()->f, this->ptr()->g); @@ -1345,8 +1345,8 @@ compute_resultant_roots_with_multiplicities() const { solve_1(resultant(), std::back_inserter(res_pairs)); for(int i=0; i < static_cast(res_pairs.size()); i++ ) { - this->ptr()->resultant_roots.get().push_back(res_pairs[i].first); - this->ptr()->multiplicities_of_resultant_roots.get() + this->ptr()->resultant_roots.value().push_back(res_pairs[i].first); + this->ptr()->multiplicities_of_resultant_roots.value() .push_back(res_pairs[i].second); } @@ -1357,13 +1357,13 @@ compute_resultant_roots_with_multiplicities() const { #if CGAL_ACK_DEBUG_FLAG for(size_type i = 0; i - (this->ptr()->resultant_roots.get().size()); + (this->ptr()->resultant_roots.value().size()); i++) { CGAL_ACK_DEBUG_PRINT << "Root at " - << CGAL::to_double(this->ptr()->resultant_roots.get()[i]) + << CGAL::to_double(this->ptr()->resultant_roots.value()[i]) << " with multiplicity " - << this->ptr()->multiplicities_of_resultant_roots.get()[i] + << this->ptr()->multiplicities_of_resultant_roots.value()[i] << std::endl; } #endif @@ -1401,18 +1401,18 @@ compute_event_x_coordinates_with_event_indices() const { one_curve_events.end(), resultant_roots().begin(), resultant_roots().end(), - std::back_inserter(this->ptr()->event_x_coordinates.get()), + std::back_inserter(this->ptr()->event_x_coordinates.value()), std::back_inserter(events_type), compare); std::vector& events - = this->ptr()->event_x_coordinates.get(); + = this->ptr()->event_x_coordinates.value(); typename std::vector::iterator one_curve_it =one_curve_events_type.begin(); size_type inter_count=0, f_count=0,g_count=0; this->ptr()->event_indices = std::vector(); std::vector& event_indices - = this->ptr()->event_indices.get(); + = this->ptr()->event_indices.value(); for(size_type i=0;i(events.size());i++) { /* #if CGAL_ACK_DEBUG_FLAG @@ -1519,8 +1519,8 @@ compute_intermediate_values_and_slices() const { std::size_t size = event_x_coordinates().size()+1; this->ptr()->intermediate_values=std::vector(); this->ptr()->intermediate_slices=std::vector(); - this->ptr()->intermediate_values.get().resize(size); - this->ptr()->intermediate_slices.get().resize(size); + this->ptr()->intermediate_values.value().resize(size); + this->ptr()->intermediate_slices.value().resize(size); #if CGAL_ACK_DEBUG_FLAG CGAL_ACK_DEBUG_PRINT << "done" << std::endl; #endif @@ -1539,25 +1539,25 @@ compute_subresultants() const { if(CGAL::degree(f,1)ptr()->subresultants.get())); + (g,f,std::back_inserter(this->ptr()->subresultants.value())); #else typename CGAL::Polynomial_traits_d ::Polynomial_subresultants() - (g,f,std::back_inserter(this->ptr()->subresultants.get())); + (g,f,std::back_inserter(this->ptr()->subresultants.value())); #endif } else { #if CGAL_ACK_USE_BEZOUT_MATRIX_FOR_SUBRESULTANTS CGAL::internal::bezout_polynomial_subresultants - (f,g,std::back_inserter(this->ptr()->subresultants.get())); + (f,g,std::back_inserter(this->ptr()->subresultants.value())); #else typename CGAL::Polynomial_traits_d ::Polynomial_subresultants() - (f,g,std::back_inserter(this->ptr()->subresultants.get())); + (f,g,std::back_inserter(this->ptr()->subresultants.value())); #endif } std::vector& subresultants - = this->ptr()->subresultants.get(); + = this->ptr()->subresultants.value(); size_type n = static_cast(subresultants.size()); @@ -1584,11 +1584,11 @@ compute_subresultants() const { // This must be corrected, if f and g have same degree: if(CGAL::degree(f,1) == CGAL::degree(g,1)) { if(n>=1) { - this->ptr()->principal_subresultants.get()[n-1] + this->ptr()->principal_subresultants.value()[n-1] = Polynomial_1(CGAL::leading_coefficient(g)); } if(n>=2) { - this->ptr()->coprincipal_subresultants.get()[n-2] + this->ptr()->coprincipal_subresultants.value()[n-2] = Polynomial_1(g[CGAL::degree(g,1)-1]); } } diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Descartes.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Descartes.h index 087e0ea7..12e3c840 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Descartes.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Descartes.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Descartes.h $ -// $Id: Descartes.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Descartes.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Descartes.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -328,7 +328,7 @@ class Descartes { return false; return (P[0] != Coeff__(0) && P.evaluate(Coeff__(1)) != Coeff__(0)); } - //! Descartes algoritm to determine isolating intervals for the roots + //! Descartes algorithm to determine isolating intervals for the roots //! lying in the interval (0,1). // The parameters $(i,D)$ describe the interval $(i/2^D, (i+1)/2^D)$. // Here $0\leq i < 2^D$. @@ -389,7 +389,7 @@ class Descartes { } - //! Strong Descartes algoritm to determine isolating intervals for the + //! Strong Descartes algorithm to determine isolating intervals for the //! roots lying in the interval (0,1), where the first //! derivative have no sign change. \pre $P$ has only one root in the //! interval given by $(i,D)$. diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Event_line_builder.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Event_line_builder.h index faf303a3..03063b81 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Event_line_builder.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Event_line_builder.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Event_line_builder.h $ -// $Id: Event_line_builder.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Event_line_builder.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Event_line_builder.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -118,7 +118,7 @@ class Event_line_builder { * curve. * * Additionally, the \c id of the event line to be created has to be - * specfied, and + * specified, and * the number of arcs that are entering from the left and leaving to the * right are needed. Furthermore, the flag \c root_of_resultant tells * whether \c alpha is a root of the resultant of the specified curve, and @@ -314,7 +314,7 @@ class Event_line_builder { * * If the first elements in the sequence are known to be zero, * \c first_elements_zero can be set accordingly. The zero test is then - * ommitted for that leading elements. + * omitted for that leading elements. */ template std::pair compute_mk(Algebraic_real_1 alpha, diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Float_traits.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Float_traits.h index a0dd28b6..8e386aac 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Float_traits.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Float_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Float_traits.h $ -// $Id: Float_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Float_traits.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Float_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -41,7 +41,7 @@ namespace CGAL { namespace internal { -// Don't define default, results in more convinient compiler messages +// Don't define default, results in more convenient compiler messages template< class Type > class Float_traits; // { // public: diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h index 8573b609..e8bcbc86 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h $ -// $Id: Interval_evaluate_1.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Interval_evaluate_2.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Interval_evaluate_2.h index 25fe75e8..c828b03b 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Interval_evaluate_2.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Interval_evaluate_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Interval_evaluate_2.h $ -// $Id: Interval_evaluate_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Interval_evaluate_2.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Interval_evaluate_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h index 92b8b1e1..8e965ed8 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h $ -// $Id: LRU_hashed_map.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h $ +// $Id: include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Real_embeddable_extension.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Real_embeddable_extension.h index cf49b5eb..ce4bb703 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Real_embeddable_extension.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Real_embeddable_extension.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Real_embeddable_extension.h $ -// $Id: Real_embeddable_extension.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Real_embeddable_extension.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Real_embeddable_extension.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -54,7 +54,7 @@ namespace internal { // TODO: Implement array in source code file // extern const signed char floor_log2_4bit[16]; // see src/floor_log2_4bit.C -// Don't define default, results in more convinient compiler messages +// Don't define default, results in more convenient compiler messages template< class Type > class Real_embeddable_extension; // { // public: diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Real_roots.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Real_roots.h index c10a2105..a2e62e90 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Real_roots.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Real_roots.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Real_roots.h $ -// $Id: Real_roots.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Real_roots.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Real_roots.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Shear_controller.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Shear_controller.h index 51d46cda..ae91247b 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Shear_controller.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Shear_controller.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_controller.h $ -// $Id: Shear_controller.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_controller.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Shear_controller.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Shear_transformation.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Shear_transformation.h index 643fe047..8233f1b7 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Shear_transformation.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Shear_transformation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_transformation.h $ -// $Id: Shear_transformation.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_transformation.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Shear_transformation.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h index 07185166..8f6f8b60 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h $ -// $Id: Status_line_CA_1.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -127,7 +127,7 @@ class Status_line_CA_1_rep { //Arc_pair _m_num_arcs; //! sequence of arcs crossing this status line (valid only event lines) - mutable boost::optional _m_arcs; + mutable std::optional _m_arcs; //! number of arcs intersecting this status line mutable int _m_total_arcs; @@ -160,10 +160,10 @@ class Status_line_CA_1_rep { std::vector< int > multiplicities_;*/ // stores algebraic real over the vertical line - mutable std::vector >_m_xy_coords; + mutable std::vector >_m_xy_coords; // stores the isolator instance - mutable boost::optional isolator; + mutable std::optional isolator; // befriending the handle friend class Status_line_CA_1; @@ -323,7 +323,7 @@ class Status_line_CA_1 } /*!\brief - * constructs from a given represenation + * constructs from a given representation */ Status_line_CA_1(Rep rep) : Base(rep) { @@ -555,7 +555,7 @@ class Status_line_CA_1 //! Returns the isolator instance Bitstream_descartes& isolator() const { CGAL_assertion(bool(this->ptr()->isolator)); - return this->ptr()->isolator.get(); + return this->ptr()->isolator.value(); } //! Returns whether an isolator has been given for that status line diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h index 2c8a232d..a0b77cf5 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h $ -// $Id: Status_line_CPA_1.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -75,7 +75,7 @@ class Status_line_CPA_1_rep { // represents x-coordinate of event of rational value over interval // computed only by demand - mutable boost::optional _m_x; + mutable std::optional _m_x; // for each event point stores a pair of arcnos of the 1st and 2nd curve // or -1 if respective curve is not involved @@ -208,7 +208,7 @@ class Status_line_CPA_1 : protected: /*!\brief - * constructs from a given represenation + * constructs from a given representation */ Status_line_CPA_1(Rep rep) : Base(rep) { diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h index 2ccf546d..b589f08c 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h $ -// $Id: Xy_coordinate_2.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h $ +// $Id: include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -81,10 +81,10 @@ class Xy_coordinate_2_rep { mutable int _m_arcno; // y-coordinate - mutable boost::optional< Algebraic_real_1 > _m_y; + mutable std::optional< Algebraic_real_1 > _m_y; //! A bounding box for the given point - mutable boost::optional< std::pair > _m_bbox_2_pair; + mutable std::optional< std::pair > _m_bbox_2_pair; }; @@ -233,7 +233,7 @@ class Xy_coordinate_2 : } /*!\brief - * constructs a point from a given represenation + * constructs a point from a given representation */ Xy_coordinate_2(Rep rep) : Base(rep) { @@ -254,7 +254,7 @@ class Xy_coordinate_2 : /*! * \brief y-coordinate of this point * - * Note: In general, this method results in a extremly large polynomial + * Note: In general, this method results in an extremely large polynomial * for the y-coordinate. It is recommended to use it carefully, * and using get_approximation_y() instead whenever approximations suffice. */ @@ -762,7 +762,7 @@ std::istream& operator >> ( is >> arcno; - // read the ") + // read the ")" swallow(is, ')'); pt = Xy_coordinate_2(x, curve, arcno); diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h index 71b23972..b9097511 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h $ -// $Id: algebraic_curve_kernel_2_tools.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h $ +// $Id: include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -157,7 +157,7 @@ template typename AlgebraicKernel_1::Bound } /*! - * \brief finds a Rational value rightt of an Algebraic real alpha + * \brief finds a Rational value right of an Algebraic real alpha */ template typename AlgebraicKernel_1::Bound bound_right_of(const AlgebraicKernel_1* kernel, @@ -186,8 +186,8 @@ template::value_type >::value)); @@ -224,14 +224,14 @@ template void cast_back_utcf(const Poly_coer_1& p,Polynomial_1& q) { // We can assume that both template arguments are polynomial types typedef CGAL::Fraction_traits FT; - CGAL_static_assertion((::boost::is_same::value)); + static_assert(::std::is_same::value); typedef typename FT::Numerator_type Numerator; typedef typename FT::Denominator_type Denominator; typedef CGAL::Coercion_traits Num_coercion; - CGAL_static_assertion((::boost::is_same + static_assert(::std::is_same ::value)); + typename Num_coercion::Type>::value); Numerator p_num; Denominator p_denom; typename FT::Decompose()(p,p_num,p_denom); diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/bound_between_1.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/bound_between_1.h index c288ac71..c0d1f2f2 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/bound_between_1.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/bound_between_1.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/bound_between_1.h $ -// $Id: bound_between_1.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/bound_between_1.h $ +// $Id: include/CGAL/Algebraic_kernel_d/bound_between_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/construct_binary.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/construct_binary.h index e2f1f93f..a6e00455 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/construct_binary.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/construct_binary.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/construct_binary.h $ -// $Id: construct_binary.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/construct_binary.h $ +// $Id: include/CGAL/Algebraic_kernel_d/construct_binary.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/enums.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/enums.h index 0538bc5f..917e94cd 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/enums.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/enums.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/enums.h $ -// $Id: enums.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/enums.h $ +// $Id: include/CGAL/Algebraic_kernel_d/enums.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/exceptions.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/exceptions.h index 7de4b062..39b0beb5 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/exceptions.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/exceptions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/exceptions.h $ -// $Id: exceptions.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/exceptions.h $ +// $Id: include/CGAL/Algebraic_kernel_d/exceptions.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/flags.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/flags.h index db65ba53..a8cc7b11 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/flags.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/flags.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/flags.h $ -// $Id: flags.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/flags.h $ +// $Id: include/CGAL/Algebraic_kernel_d/flags.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -87,10 +87,10 @@ * (i.e., vertical cusps, isolated points on arcs), and usual regular points. * The candidate point on each status line can be checked for being singular * using this flag. This gives additional information but increases - * compuation time + * computation time * * WARNING: Currently, the status line does not store the additional - * information whether a point is singluar or not. + * information whether a point is singular or not. * Therefore, there is currently no reasons to set this flag. It is still * contained for possible further extension of the status line. */ @@ -171,7 +171,7 @@ /** * The algorithm can also handle non-y-regular curves without shearing, * in case that the resultant multiplicity at vertical asymptotes is one. - * This special treatement can be switched off by setting this flag. + * This special treatment can be switched off by setting this flag. * It is not recommended to do this because of efficiency */ #ifndef CGAL_ACK_SHEAR_ALL_NOT_Y_REGULAR_CURVES diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/macros.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/macros.h index 7cd85cfc..7ef586d4 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/macros.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/macros.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/macros.h $ -// $Id: macros.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/macros.h $ +// $Id: include/CGAL/Algebraic_kernel_d/macros.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/refine_zero_against.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/refine_zero_against.h index 39aa631b..07103833 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/refine_zero_against.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/refine_zero_against.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/refine_zero_against.h $ -// $Id: refine_zero_against.h 3f8b32d 2022-03-16T14:53:06+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/refine_zero_against.h $ +// $Id: include/CGAL/Algebraic_kernel_d/refine_zero_against.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -66,7 +66,7 @@ int descartes(Polynomial& p, const Field& low,const Field& high){ } /*! \ingroup \NiX_univariate_polynomial_utils - * \brief refine isolating interval for \c p w.r.t \c q + * \brief refine isolating interval for \c p w.r.t. \c q * * This function refines the interval ]low, high[ * such that it does not contain any zero of \c q different from the diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/shear.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/shear.h index 018019db..c818a7c5 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/shear.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/shear.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/shear.h $ -// $Id: shear.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/shear.h $ +// $Id: include/CGAL/Algebraic_kernel_d/shear.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h index 00f6a96b..6abca59e 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h $ -// $Id: univariate_polynomial_utils.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h $ +// $Id: include/CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d_1.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d_1.h index 3892d108..6c6b1343 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d_1.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d_1.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_1.h $ -// $Id: Algebraic_kernel_d_1.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_1.h $ +// $Id: include/CGAL/Algebraic_kernel_d_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -111,7 +111,7 @@ class Algebraic_kernel_d_1_base { void operator()( Type& t, int rel_prec ) const { // If t is zero, we can refine the interval to - // infinite precission + // infinite precision if( CGAL::is_zero( t ) ) { t = Type(0); } else { diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d_2.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d_2.h index 66d8044b..561bde04 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d_2.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_d_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_2.h $ -// $Id: Algebraic_kernel_d_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_2.h $ +// $Id: include/CGAL/Algebraic_kernel_d_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h index 3f097669..a79ab45c 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_circles/include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h $ -// $Id: function_objects_on_roots_and_polynomials_2_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_circles/include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h $ +// $Id: include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/internal_functions_comparison_root_for_circles_2_2.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/internal_functions_comparison_root_for_circles_2_2.h index 59244bf4..0bd192d1 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/internal_functions_comparison_root_for_circles_2_2.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/internal_functions_comparison_root_for_circles_2_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_circles/include/CGAL/Algebraic_kernel_for_circles/internal_functions_comparison_root_for_circles_2_2.h $ -// $Id: internal_functions_comparison_root_for_circles_2_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_circles/include/CGAL/Algebraic_kernel_for_circles/internal_functions_comparison_root_for_circles_2_2.h $ +// $Id: include/CGAL/Algebraic_kernel_for_circles/internal_functions_comparison_root_for_circles_2_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Julien Hazebrouck diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomial_1_2_and_2_2.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomial_1_2_and_2_2.h index 8c41c641..1605a1d5 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomial_1_2_and_2_2.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomial_1_2_and_2_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_circles/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomial_1_2_and_2_2.h $ -// $Id: internal_functions_on_roots_and_polynomial_1_2_and_2_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_circles/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomial_1_2_and_2_2.h $ +// $Id: include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomial_1_2_and_2_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Julien Hazebrouck diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomials_2_2.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomials_2_2.h index d6f8a7fc..c1697303 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomials_2_2.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomials_2_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_circles/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomials_2_2.h $ -// $Id: internal_functions_on_roots_and_polynomials_2_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_circles/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomials_2_2.h $ +// $Id: include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomials_2_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles_2_2.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles_2_2.h index b9ca86ab..d27403b1 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles_2_2.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_circles_2_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_circles/include/CGAL/Algebraic_kernel_for_circles_2_2.h $ -// $Id: Algebraic_kernel_for_circles_2_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_circles/include/CGAL/Algebraic_kernel_for_circles_2_2.h $ +// $Id: include/CGAL/Algebraic_kernel_for_circles_2_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/function_objects_on_roots_and_polynomials_2_3.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/function_objects_on_roots_and_polynomials_2_3.h index f6cfeed0..6d59267c 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/function_objects_on_roots_and_polynomials_2_3.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/function_objects_on_roots_and_polynomials_2_3.h @@ -9,8 +9,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/function_objects_on_roots_and_polynomials_2_3.h $ -// $Id: function_objects_on_roots_and_polynomials_2_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/function_objects_on_roots_and_polynomials_2_3.h $ +// $Id: include/CGAL/Algebraic_kernel_for_spheres/function_objects_on_roots_and_polynomials_2_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_comparison_root_for_spheres_2_3.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_comparison_root_for_spheres_2_3.h index 4b531eb7..8b20f198 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_comparison_root_for_spheres_2_3.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_comparison_root_for_spheres_2_3.h @@ -9,8 +9,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_comparison_root_for_spheres_2_3.h $ -// $Id: internal_functions_comparison_root_for_spheres_2_3.h 82989ae 2021-03-01T13:11:00+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_comparison_root_for_spheres_2_3.h $ +// $Id: include/CGAL/Algebraic_kernel_for_spheres/internal_functions_comparison_root_for_spheres_2_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h index 8c2a6a87..824776f3 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h @@ -9,8 +9,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h $ -// $Id: internal_functions_on_roots_and_polynomial_1_3_and_2_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h $ +// $Id: include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomial_1_3_and_2_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_1_3.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_1_3.h index 574f6559..975d1fdd 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_1_3.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_1_3.h @@ -9,8 +9,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_1_3.h $ -// $Id: internal_functions_on_roots_and_polynomials_1_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_1_3.h $ +// $Id: include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_1_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h index 12729d70..f014bbbb 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h @@ -9,8 +9,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h $ -// $Id: internal_functions_on_roots_and_polynomials_2_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h $ +// $Id: include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -46,7 +46,7 @@ namespace CGAL { typedef typename AK::Polynomial_1_3 Polynomial_1_3; // The degenerated cases are 2 tangent spheres // os 2 non-intersecting spheres - // beacause we cannot have infinitely many solutions + // because we cannot have infinitely many solutions if(e1 == e2) { if(tangent(e1,e3)) { Polynomial_1_3 p = plane_from_2_spheres(e1,e3); diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres_2_3.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres_2_3.h index b282b6f4..9d4104df 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres_2_3.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_for_spheres_2_3.h @@ -9,8 +9,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres_2_3.h $ -// $Id: Algebraic_kernel_for_spheres_2_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres_2_3.h $ +// $Id: include/CGAL/Algebraic_kernel_for_spheres_2_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h index ebc79c6f..26e36d71 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h $ -// $Id: Algebraic_kernel_rs_gmpq_d_1.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h $ +// $Id: include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h index f89176a7..9b80a3f7 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h $ -// $Id: Algebraic_kernel_rs_gmpz_d_1.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h $ +// $Id: include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/Algebraic_structure_traits.h b/thirdparty/CGAL/include/CGAL/Algebraic_structure_traits.h index c119ffc3..6f1a7ad4 100644 --- a/thirdparty/CGAL/include/CGAL/Algebraic_structure_traits.h +++ b/thirdparty/CGAL/include/CGAL/Algebraic_structure_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h $ -// $Id: Algebraic_structure_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h $ +// $Id: include/CGAL/Algebraic_structure_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -353,8 +353,7 @@ class Algebraic_structure_traits_base< Type_, typedef Coercion_traits< NT1, NT2 > CT; typedef typename CT::Type Coercion_type_NT1_NT2; CGAL_USE_TYPE(Coercion_type_NT1_NT2); - CGAL_static_assertion(( - ::boost::is_same::value)); + static_assert(::std::is_same::value); typename Coercion_traits< NT1, NT2 >::Cast cast; operator()( cast(x), cast(y), q, r ); diff --git a/thirdparty/CGAL/include/CGAL/Alpha_shape_2.h b/thirdparty/CGAL/include/CGAL/Alpha_shape_2.h index 618ae7ff..665ebf3e 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_shape_2.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_shape_2.h @@ -5,8 +5,8 @@ // // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h $ -// $Id: Alpha_shape_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h $ +// $Id: include/CGAL/Alpha_shape_2.h a484bfa $ // Author(s) : Tran Kai Frank DA // Andreas Fabri @@ -23,7 +23,6 @@ #include #include -#include #include #include @@ -58,13 +57,13 @@ class Alpha_shape_2 : public Dt typedef typename Dt::Geom_traits Gt; typedef typename Dt::Triangulation_data_structure Tds; - // The Exact Comparison Tag cannot be used in conjonction with periodic triangulations + // The Exact Comparison Tag cannot be used in conjunction with periodic triangulations // because the periodic triangulations' point() function returns a temporary // value while the lazy predicate evaluations that are used when the Exact tag // is set to true rely on a permanent and safe access to the points. - CGAL_static_assertion( - (boost::is_same::value) || - (boost::is_same::value)); + static_assert( + (std::is_same::value) || + (std::is_same::value)); typedef typename internal::Alpha_nt_selector_2< Gt, ExactAlphaComparisonTag, typename Dt::Weighted_tag>::Type_of_alpha Type_of_alpha; @@ -77,8 +76,8 @@ class Alpha_shape_2 : public Dt typedef Type_of_alpha FT; // check that simplices are correctly instantiated - CGAL_static_assertion( (boost::is_same::value) ); - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); + static_assert(std::is_same::value); typedef typename Dt::Point Point; @@ -433,7 +432,7 @@ protected : private: // the dynamic version is not yet implemented - // desactivate the triangulation member functions + // deactivate the triangulation member functions Vertex_handle insert(const Point& p); // Inserts point `p' in the alpha shape and returns the // corresponding vertex of the underlying Delaunay triangulation. @@ -745,7 +744,7 @@ update_alpha_shape_vertex_list()const; //--------------------------------------------------------------------- private: - // prevent default copy constructor and default assigment + // prevent default copy constructor and default assignment Alpha_shape_2(const Alpha_shape_2& A); @@ -849,7 +848,7 @@ Alpha_shape_2::initialize_interval_edge_map() { // both faces are infinite by definition unattached // the edge is finite by construction - CGAL_triangulation_precondition((is_infinite(pNeighbor) + CGAL_precondition((is_infinite(pNeighbor) && is_infinite(pFace))); interval = make_triple(squared_radius(pFace, i), Infinity, @@ -859,7 +858,7 @@ Alpha_shape_2::initialize_interval_edge_map() else { // is_infinite(pNeighbor) - CGAL_triangulation_precondition((is_infinite(pNeighbor) + CGAL_precondition((is_infinite(pNeighbor) && !is_infinite(pFace))); if (is_attached(pFace, i)) interval = make_triple(UNDEFINED, @@ -1109,7 +1108,7 @@ Alpha_shape_2::update_alpha_shape_vertex_list()const { // which might be infinity // write the vertex v = (*vertex_alpha_it).second; - CGAL_triangulation_assertion((classify(v) == REGULAR)); + CGAL_assertion((classify(v) == REGULAR)); Alpha_shape_vertices_list.push_back(v); } } @@ -1122,7 +1121,7 @@ Alpha_shape_2::update_alpha_shape_vertex_list()const { ++vertex_alpha_it) { v = (*vertex_alpha_it).second; - CGAL_triangulation_assertion((classify(v) == SINGULAR)); + CGAL_assertion((classify(v) == SINGULAR)); Alpha_shape_vertices_list.push_back(v); } @@ -1159,7 +1158,7 @@ Alpha_shape_2::update_alpha_shape_edges_list() const { pInterval = &(*edge_alpha_it).first; - CGAL_triangulation_assertion(pInterval->second != Infinity); + CGAL_assertion(pInterval->second != Infinity); // since this happens only for convex hull of dimension 2 // thus singular @@ -1171,9 +1170,9 @@ Alpha_shape_2::update_alpha_shape_edges_list() const // and alpha is smaller than the upper boundary // which might be infinity // visualize the boundary - CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first, - (*edge_alpha_it).second.second) - == REGULAR)); + CGAL_assertion((classify((*edge_alpha_it).second.first, + (*edge_alpha_it).second.second) + == REGULAR)); Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first, (*edge_alpha_it).second.second)); } @@ -1191,7 +1190,7 @@ Alpha_shape_2::update_alpha_shape_edges_list() const if (pInterval->first == UNDEFINED) { - CGAL_triangulation_assertion(pInterval->second != Infinity); + CGAL_assertion(pInterval->second != Infinity); // since this happens only for convex hull of dimension 2 // thus singular @@ -1203,9 +1202,9 @@ Alpha_shape_2::update_alpha_shape_edges_list() const // and alpha is smaller than the upper boundary // which might be infinity // visualize the boundary - CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first, - (*edge_alpha_it).second.second) - == REGULAR)); + CGAL_assertion((classify((*edge_alpha_it).second.first, + (*edge_alpha_it).second.second) + == REGULAR)); Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first, (*edge_alpha_it).second.second)); } @@ -1219,12 +1218,12 @@ Alpha_shape_2::update_alpha_shape_edges_list() const // if alpha is smaller than the upper boundary // which might be infinity // visualize the boundary - CGAL_triangulation_assertion(((classify((*edge_alpha_it).second.first, - (*edge_alpha_it).second.second) - == REGULAR) - || (classify((*edge_alpha_it).second.first, + CGAL_assertion(((classify((*edge_alpha_it).second.first, (*edge_alpha_it).second.second) - == SINGULAR))); + == REGULAR) + || (classify((*edge_alpha_it).second.first, + (*edge_alpha_it).second.second) + == SINGULAR))); Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first, (*edge_alpha_it).second.second)); } @@ -1324,7 +1323,7 @@ Alpha_shape_2::number_of_solid_components(const Type_of_alpha& alpha) c ++face_it) { Face_handle pFace = face_it; - CGAL_triangulation_postcondition( pFace != nullptr); + CGAL_postcondition( pFace != nullptr); if (classify(pFace, alpha) == INTERIOR){ Data& data = marked_face_set[pFace]; @@ -1358,7 +1357,7 @@ Alpha_shape_2::traverse(const Face_handle& pFace, for (int i=0; i<3; i++) { pNeighbor = fh->neighbor(i); - CGAL_triangulation_assertion(pNeighbor != nullptr); + CGAL_assertion(pNeighbor != nullptr); if (classify(pNeighbor, alpha) == INTERIOR){ Data& data = marked_face_set[pNeighbor]; if(data == false){ @@ -1436,7 +1435,7 @@ template < class Dt, class EACT > typename Alpha_shape_2::Type_of_alpha Alpha_shape_2::find_alpha_solid() const { - // compute the minumum alpha such that all data points + // compute the minimum alpha such that all data points // are either on the boundary or in the interior // not necessarily connected // starting point for searching @@ -1514,7 +1513,7 @@ Alpha_shape_2::op_ostream(std::ostream& os) const // write the vertex v = (*vertex_alpha_it).second; - CGAL_triangulation_assertion((classify(v) == + CGAL_assertion((classify(v) == Alpha_shape_2::REGULAR)); // if we used Edelsbrunner and Muecke's definition // regular means incident to a higher-dimensional face @@ -1536,7 +1535,7 @@ Alpha_shape_2::op_ostream(std::ostream& os) const { pInterval = &(*edge_alpha_it).first; - CGAL_triangulation_assertion(pInterval->second != Infinity); + CGAL_assertion(pInterval->second != Infinity); // since this happens only for convex hull of dimension 1 // thus singular @@ -1563,11 +1562,11 @@ Alpha_shape_2::op_ostream(std::ostream& os) const f = pNeighbor; } - CGAL_triangulation_assertion((classify(f) == - Alpha_shape_2::INTERIOR)); + CGAL_assertion((classify(f) == + Alpha_shape_2::INTERIOR)); - CGAL_triangulation_assertion((classify(f, i) == - Alpha_shape_2::REGULAR)); + CGAL_assertion((classify(f, i) == + Alpha_shape_2::REGULAR)); os << V[f->vertex(f->ccw(i))] << ' ' << V[f->vertex(f->cw(i))] << std::endl; @@ -1595,8 +1594,7 @@ Alpha_shape_2::op_ostream(std::ostream& os) const // write the vertex v = (*vertex_alpha_it).second; - CGAL_triangulation_assertion((classify(v) == - Alpha_shape_2::REGULAR)); + CGAL_assertion((classify(v) == Alpha_shape_2::REGULAR)); V[v] = number_of_vertices++; os << v->point() << std::endl; } @@ -1608,8 +1606,7 @@ Alpha_shape_2::op_ostream(std::ostream& os) const ++vertex_alpha_it) { v = (*vertex_alpha_it).second; - CGAL_triangulation_assertion((classify(v) == - Alpha_shape_2::SINGULAR)); + CGAL_assertion((classify(v) == Alpha_shape_2::SINGULAR)); V[v] = number_of_vertices++; os << v->point() << std::endl; @@ -1652,7 +1649,7 @@ Alpha_shape_2::op_ostream(std::ostream& os) const if (pInterval->second != Infinity && pInterval->second <= get_alpha()) { - CGAL_triangulation_assertion((classify(f, i) == + CGAL_assertion((classify(f, i) == Alpha_shape_2::REGULAR)); // assure that all vertices are in ccw order if (classify(f) == Alpha_shape_2::EXTERIOR) @@ -1665,7 +1662,7 @@ Alpha_shape_2::op_ostream(std::ostream& os) const f = pNeighbor; } - CGAL_triangulation_assertion((classify(f) == + CGAL_assertion((classify(f) == Alpha_shape_2::INTERIOR)); os << V[f->vertex(f->ccw(i))] << ' ' @@ -1680,7 +1677,7 @@ Alpha_shape_2::op_ostream(std::ostream& os) const // write the singular edges if (pInterval->first != UNDEFINED) { - CGAL_triangulation_assertion((classify(f, i) == + CGAL_assertion((classify(f, i) == Alpha_shape_2::SINGULAR)); os << V[f->vertex(f->ccw(i))] << ' ' << V[f->vertex(f->cw(i))] << std::endl; @@ -1739,7 +1736,7 @@ Alpha_shape_2::Output () // which might be infinity // visualize the boundary - CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first, + CGAL_assertion((classify((*edge_alpha_it).second.first, (*edge_alpha_it).second.second) == REGULAR)); @@ -1769,7 +1766,7 @@ Alpha_shape_2::Output () if (pInterval->first == UNDEFINED) { - CGAL_triangulation_assertion(pInterval->second != Infinity); + CGAL_assertion(pInterval->second != Infinity); // since this happens only for convex hull of dimension 1 // thus singular @@ -1782,9 +1779,9 @@ Alpha_shape_2::Output () // which might be infinity // visualize the boundary - CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first, - (*edge_alpha_it).second.second) == - REGULAR)); + CGAL_assertion((classify((*edge_alpha_it).second.first, + (*edge_alpha_it).second.second) == + REGULAR)); L.push_back((this->segment((*edge_alpha_it).second.first, (*edge_alpha_it).second.second)) .source()); @@ -1802,12 +1799,12 @@ Alpha_shape_2::Output () // which might be infinity // visualize the boundary - CGAL_triangulation_assertion(((classify((*edge_alpha_it).second.first, - (*edge_alpha_it).second.second) == - REGULAR) || - (classify((*edge_alpha_it).second.first, - (*edge_alpha_it).second.second) == - SINGULAR))); + CGAL_assertion(((classify((*edge_alpha_it).second.first, + (*edge_alpha_it).second.second) == + REGULAR) || + (classify((*edge_alpha_it).second.first, + (*edge_alpha_it).second.second) == + SINGULAR))); L.push_back((this->segment((*edge_alpha_it).second.first, (*edge_alpha_it).second.second)) .source()); diff --git a/thirdparty/CGAL/include/CGAL/Alpha_shape_3.h b/thirdparty/CGAL/include/CGAL/Alpha_shape_3.h index 0e23b2ca..316ce1ba 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_shape_3.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_shape_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h $ -// $Id: Alpha_shape_3.h 115fa5a 2021-12-14T14:01:21+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h $ +// $Id: include/CGAL/Alpha_shape_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Tran Kai Frank DA @@ -26,8 +26,6 @@ #include #include -#include - #include #include #include @@ -35,6 +33,7 @@ #include #include #include +#include //------------------------------------------------------------------- namespace CGAL { @@ -70,7 +69,7 @@ class Alpha_shape_3 : public Dt // or INTERIOR with respect to the alpha shape. // In GENERAL mode a $k$ simplex is REGULAR if it is on the boundary // of the alpha_complex and belongs to a $k+1$ simplex in the complex - // and it is SINGULAR simplex if it is a boundary simplex tht is not + // and it is SINGULAR simplex if it is a boundary simplex that is not // included in a $k+1$ simplex of the complex. // In REGULARIZED mode each k-dimensional simplex of the triangulation @@ -94,13 +93,13 @@ class Alpha_shape_3 : public Dt typedef typename Dt::Geom_traits Gt; typedef typename Dt::Triangulation_data_structure Tds; - // The Exact Comparison Tag cannot be used in conjonction with periodic triangulations + // The Exact Comparison Tag cannot be used in conjunction with periodic triangulations // because the periodic triangulations' point() function returns a temporary // value while the lazy predicate evaluations that are used when the Exact tag // is set to true rely on a permanent and safe access to the points. - CGAL_static_assertion( - (boost::is_same::value) || - (boost::is_same::value)); + static_assert( + (std::is_same::value) || + (std::is_same::value)); //extra the type used for representing alpha according to ExactAlphaComparisonTag typedef typename internal::Alpha_nt_selector_3::Type_of_alpha NT; @@ -109,8 +108,8 @@ class Alpha_shape_3 : public Dt typedef typename Gt::FT Coord_type; //checks whether tags are correctly set in Vertex and Cell classes - CGAL_static_assertion( (boost::is_same::value) ); - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); + static_assert(std::is_same::value); typedef typename Dt::Point Point; @@ -320,7 +319,7 @@ private : } // the version to be used with Tag_true is templated to avoid - // instanciation through explicit instantiation of the whole class + // instantiation through explicit instantiation of the whole class void set_alpha_min_of_vertices(Tag_false) { for( Finite_vertices_iterator vit = finite_vertices_begin(); @@ -402,7 +401,7 @@ private : // Returns the n-th alpha-value. // n < size() { - CGAL_triangulation_assertion( n > 0 && + CGAL_assertion( n > 0 && n <= static_cast(alpha_spectrum.size()) ); return alpha_spectrum[n-1]; } @@ -423,7 +422,7 @@ private : private: // the dynamic version is not yet implemented - // desactivate the tetrahedralization member functions + // deactivate the tetrahedralization member functions void insert(const Point& /*p*/) {} // Inserts point `p' in the alpha shape and returns the // corresponding vertex of the underlying Delaunay tetrahedralization. @@ -736,7 +735,7 @@ private : // (2) the nb of solid components is equal or less than nb_component NT find_alpha_solid() const; - // compute the minumum alpha such that all data points + // compute the minimum alpha such that all data points // are either on the boundary or in the interior // not necessarily connected // starting point for searching @@ -777,7 +776,7 @@ private : //--------------------------------------------------------------------- private: - // prevent default copy constructor and default assigment + // prevent default copy constructor and default assignment Alpha_shape_3(const Alpha_shape_3&); void operator=(const Alpha_shape_3&); @@ -1293,7 +1292,7 @@ Alpha_shape_3::initialize_alpha_vertex_maps(bool reinitialize) back_inserter(incidents)); typename std::list::iterator chit=incidents.begin(); if (is_infinite(*chit)) as->set_is_on_chull(true); - while (is_infinite(*chit)) ++chit; //skip infinte cells + while (is_infinite(*chit)) ++chit; //skip infinite cells alpha = (*chit)->get_alpha(); as->set_alpha_mid(alpha); as->set_alpha_max(alpha); @@ -1331,7 +1330,7 @@ Alpha_shape_3::initialize_alpha_vertex_maps(bool reinitialize) incident_cells(static_cast(vit), back_inserter(incidents)); typename std::list::iterator chit=incidents.begin(); - while (is_infinite(*chit)) ++chit; //skip infinte cells + while (is_infinite(*chit)) ++chit; //skip infinite cells alpha = (*chit)->get_alpha(); as->set_alpha_mid(alpha); for( ; chit != incidents.end(); ++chit) { @@ -1714,7 +1713,7 @@ Alpha_shape_3::number_of_solid_components(const NT& alpha) const for( cell_it = finite_cells_begin(); cell_it != done; ++cell_it) { Cell_handle pCell = cell_it; - CGAL_triangulation_assertion(pCell != nullptr); + CGAL_assertion(pCell != nullptr); if (classify(pCell, alpha) == INTERIOR){ Data& data = marked_cell_set[pCell]; @@ -1746,7 +1745,7 @@ void Alpha_shape_3::traverse(Cell_handle pCell, for (int i=0; i<=3; i++) { pNeighbor = pCell->neighbor(i); - CGAL_triangulation_assertion(pNeighbor != nullptr); + CGAL_assertion(pNeighbor != nullptr); if (classify(pNeighbor, alpha) == INTERIOR){ Data& data = marked_cell_set[pNeighbor]; if(data == false){ @@ -1836,7 +1835,7 @@ Alpha_shape_3::find_optimal_alpha(size_type nb_components) const template typename Alpha_shape_3::NT Alpha_shape_3::find_alpha_solid() const - // compute the minumum alpha such that all data points + // compute the minimum alpha such that all data points // are either on the boundary or in the interior // not necessarily connected { diff --git a/thirdparty/CGAL/include/CGAL/Alpha_shape_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Alpha_shape_cell_base_3.h index 6a83c4f7..0eb0aa6f 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_shape_cell_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_shape_cell_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_shapes_3/include/CGAL/Alpha_shape_cell_base_3.h $ -// $Id: Alpha_shape_cell_base_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_shapes_3/include/CGAL/Alpha_shape_cell_base_3.h $ +// $Id: include/CGAL/Alpha_shape_cell_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Tran Kai Frank DA diff --git a/thirdparty/CGAL/include/CGAL/Alpha_shape_face_base_2.h b/thirdparty/CGAL/include/CGAL/Alpha_shape_face_base_2.h index ce60646f..a58d86fb 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_shape_face_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_shape_face_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_shapes_2/include/CGAL/Alpha_shape_face_base_2.h $ -// $Id: Alpha_shape_face_base_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_shapes_2/include/CGAL/Alpha_shape_face_base_2.h $ +// $Id: include/CGAL/Alpha_shape_face_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Alpha_shape_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Alpha_shape_vertex_base_2.h index 3ecddebb..ff928095 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_shape_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_shape_vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_shapes_2/include/CGAL/Alpha_shape_vertex_base_2.h $ -// $Id: Alpha_shape_vertex_base_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_shapes_2/include/CGAL/Alpha_shape_vertex_base_2.h $ +// $Id: include/CGAL/Alpha_shape_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,6 +19,7 @@ #include #include #include +#include //------------------------------------------------------------------- namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Alpha_shape_vertex_base_3.h b/thirdparty/CGAL/include/CGAL/Alpha_shape_vertex_base_3.h index 8ed63432..0cfaf810 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_shape_vertex_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_shape_vertex_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_shapes_3/include/CGAL/Alpha_shape_vertex_base_3.h $ -// $Id: Alpha_shape_vertex_base_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_shapes_3/include/CGAL/Alpha_shape_vertex_base_3.h $ +// $Id: include/CGAL/Alpha_shape_vertex_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h b/thirdparty/CGAL/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h index 2488c8b2..c189ffe3 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h $ -// $Id: Lazy_alpha_nt_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h $ +// $Id: include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sébastien Loriot @@ -144,12 +144,12 @@ class Lazy_alpha_nt_2 typedef typename Types::Exact_point Exact_point; typedef typename Types::Input_point Input_point; - //Convertion functions + //Conversion functions Approx_point to_approx(const Input_point& wp) const { // The traits class' Point_2 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible_2< - Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); + static_assert(Is_traits_point_convertible_2< + Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value); To_approx converter; return converter(wp); @@ -158,8 +158,8 @@ class Lazy_alpha_nt_2 Exact_point to_exact(const Input_point& wp) const { // The traits class' Point_2 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible_2< - Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); + static_assert(Is_traits_point_convertible_2< + Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value); To_exact converter; return converter(wp); @@ -167,7 +167,7 @@ class Lazy_alpha_nt_2 //members //the members can be updated when calling method exact() - mutable boost::optional exact_; + mutable std::optional exact_; mutable NT_approx approx_; //private functions @@ -235,7 +235,7 @@ class Lazy_alpha_nt_2 const NT_exact& exact() const { - if (exact_ == boost::none) { + if (exact_ == std::nullopt) { update_exact(); approx_=to_interval(*exact_); } @@ -448,7 +448,7 @@ struct Alpha_nt_selector_2 GeomTraits, // If the base traits is already exact then we don't need to do anything, // and we can simply directly use the traits class - Boolean_tag::value && + Boolean_tag::value && ExactAlphaComparisonTag::value >, Weighted_tag> { }; diff --git a/thirdparty/CGAL/include/CGAL/Alpha_shapes_3/internal/Classification_type.h b/thirdparty/CGAL/include/CGAL/Alpha_shapes_3/internal/Classification_type.h index 0fd7b03b..3b12ceab 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_shapes_3/internal/Classification_type.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_shapes_3/internal/Classification_type.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Classification_type.h $ -// $Id: Classification_type.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Classification_type.h $ +// $Id: include/CGAL/Alpha_shapes_3/internal/Classification_type.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h b/thirdparty/CGAL/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h index c2334804..83570041 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h $ -// $Id: Lazy_alpha_nt_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h $ +// $Id: include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sébastien Loriot @@ -22,7 +22,7 @@ #include #include -#include +#include #include @@ -135,12 +135,12 @@ class Lazy_alpha_nt_3{ typedef typename Types::Approx_point Approx_point; typedef typename Types::Exact_point Exact_point; typedef typename Types::Input_point Input_point; -//Convertion functions +//Conversion functions Approx_point to_approx(const Input_point& wp) const { // The traits class' Point_3 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible_3< - Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); + static_assert(Is_traits_point_convertible_3< + Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value); To_approx converter; return converter(wp); @@ -149,8 +149,8 @@ class Lazy_alpha_nt_3{ Exact_point to_exact(const Input_point& wp) const { // The traits class' Point_3 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible_3< - Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); + static_assert(Is_traits_point_convertible_3< + Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value); To_exact converter; return converter(wp); @@ -158,7 +158,7 @@ class Lazy_alpha_nt_3{ //members //the members can be updated when calling method exact() - mutable boost::optional exact_; + mutable std::optional exact_; mutable NT_approx approx_; //private functions @@ -229,7 +229,7 @@ class Lazy_alpha_nt_3{ } const NT_exact& exact() const { - if (exact_ == boost::none){ + if (exact_ == std::nullopt){ update_exact(); approx_=to_interval(*exact_); } @@ -417,7 +417,7 @@ struct Alpha_nt_selector_3 GeomTraits, // If the base traits is already exact then we don't need to do anything, // and we can simply directly use the traits class - Boolean_tag::value && + Boolean_tag::value && ExactAlphaComparisonTag::value >, Weighted_tag> { }; diff --git a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h index 66a4ee3a..1c62a4ac 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h @@ -1,10 +1,10 @@ -// Copyright (c) 2019-2022 Google LLC (USA). +// Copyright (c) 2019-2023 Google LLC (USA). // All rights reserved. // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h $ -// $Id: Alpha_wrap_3.h beeae18 2022-06-08T12:04:02+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h $ +// $Id: include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez @@ -29,18 +29,29 @@ #include -#include +#include +#include +#include #include #include #include +#include +#include +#include +#include +#include + #include #include #include #include +#include #include -#include +#ifdef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + #include +#endif #include #include #include @@ -50,16 +61,9 @@ #include // only if non-manifoldness is not treated #include #include -#include -#include -#include -#include -#include -#include -#include -#include #include +#include #include #include #include @@ -74,30 +78,11 @@ namespace CGAL { namespace Alpha_wraps_3 { namespace internal { -template -class Cell_base_with_timestamp - : public Cb -{ - std::size_t time_stamp_; - -public: - template - Cell_base_with_timestamp(const Args&... args) : Cb(args...), time_stamp_(-1) { } - - Cell_base_with_timestamp(const Cell_base_with_timestamp& other) : Cb(other), time_stamp_(other.time_stamp_) { } +namespace { - typedef CGAL::Tag_true Has_timestamp; +namespace AW3i = ::CGAL::Alpha_wraps_3::internal; - std::size_t time_stamp() const { return time_stamp_; } - void set_time_stamp(const std::size_t& ts) { time_stamp_ = ts; } - - template - struct Rebind_TDS - { - typedef typename Cb::template Rebind_TDS::Other Cb2; - typedef Cell_base_with_timestamp Other; - }; -}; +} // unnamed namespace struct Wrapping_default_visitor { @@ -109,6 +94,10 @@ struct Wrapping_default_visitor template void on_flood_fill_begin(const AlphaWrapper&) { } + // Whether the flood filling process should continue + template + constexpr bool go_further(const Wrapper&) { return true; } + template void before_facet_treatment(const AlphaWrapper&, const Gate&) { } @@ -125,11 +114,48 @@ struct Wrapping_default_visitor void on_alpha_wrapping_end(const AlphaWrapper&) { }; }; -template -class Alpha_wrap_3 +template +class Alpha_wrapper_3 { + using Oracle = Oracle_; + + // Triangulation using Base_GT = typename Oracle::Geom_traits; - using Geom_traits = Robust_circumcenter_filtered_traits_3; + using Default_Gt = CGAL::Robust_circumcenter_filtered_traits_3; + + using Default_Vb = Alpha_wrap_triangulation_vertex_base_3; + using Default_Cb = Alpha_wrap_triangulation_cell_base_3; + using Default_Cbt = Cell_base_with_timestamp; // for determinism + using Default_Tds = CGAL::Triangulation_data_structure_3; + using Default_Triangulation = CGAL::Delaunay_triangulation_3; + +public: + using Triangulation = typename Default::Get::type; + + // Use the geom traits from the triangulation, and trust the (advanced) user that provided it + using Geom_traits = typename Triangulation::Geom_traits; + +private: + using Cell_handle = typename Triangulation::Cell_handle; + using Facet = typename Triangulation::Facet; + using Vertex_handle = typename Triangulation::Vertex_handle; + using Locate_type = typename Triangulation::Locate_type; + + using Gate = internal::Gate; + + // A sorted queue is a priority queue sorted by circumradius, and is experimentally significantly + // slower. However, intermediate results are usable: at each point of the algorithm, the wrap + // has a somewhat uniform mesh element size. + // + // An unsorted queue is a LIFO queue, and is experimentally much faster (~35%), + // but intermediate results are not useful: a LIFO carves deep before than wide, + // and can thus for example leave scaffolding faces till almost the end of the refinement. +#ifdef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + using Alpha_PQ = Modifiable_priority_queue, CGAL_BOOST_PAIRING_HEAP>; +#else + using Alpha_PQ = std::stack; +#endif using FT = typename Geom_traits::FT; using Point_3 = typename Geom_traits::Point_3; @@ -143,63 +169,50 @@ class Alpha_wrap_3 using SC_Iso_cuboid_3 = SC::Iso_cuboid_3; using SC2GT = Cartesian_converter; - struct Cell_info - { - bool is_outside = false; - }; - - enum Vertex_info - { - DEFAULT = 0, - BBOX_VERTEX, - SEED_VERTEX - }; - - using Vb = Triangulation_vertex_base_3; - using Vbi = Triangulation_vertex_base_with_info_3; - using Cbb = Delaunay_triangulation_cell_base_3; - using Cb = Delaunay_triangulation_cell_base_with_circumcenter_3; - using Cbi = Triangulation_cell_base_with_info_3; - using Cbt = Cell_base_with_timestamp; - using Tds = Triangulation_data_structure_3; - using Dt = Delaunay_triangulation_3; - - using Cell_handle = typename Dt::Cell_handle; - using Facet = typename Dt::Facet; - using Vertex_handle = typename Dt::Vertex_handle; - using Locate_type = typename Dt::Locate_type; - - using Gate = internal::Gate
; - using Alpha_PQ = Modifiable_priority_queue, CGAL_BOOST_PAIRING_HEAP>; + using Seeds = std::vector; protected: - const Oracle& m_oracle; + Oracle m_oracle; SC_Iso_cuboid_3 m_bbox; - FT m_alpha, m_sq_alpha; - FT m_offset, m_sq_offset; + FT m_alpha = FT(-1), m_sq_alpha = FT(-1); + FT m_offset = FT(-1), m_sq_offset = FT(-1); + + Seeds m_seeds; + + Triangulation m_tr; - Dt m_dt; Alpha_PQ m_queue; public: - // Main constructor - Alpha_wrap_3(const Oracle& oracle) + Alpha_wrapper_3() +#ifdef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + // '4096' is an arbitrary, not-too-small value for the largest ID in queue initialization + : m_queue(4096) +#endif + { + // Due to the Steiner point computation being a dichotomy, the algorithm is inherently inexact + // and passing exact kernels is explicitly disabled to ensure no misunderstanding. + static_assert(std::is_floating_point::value); + } + + Alpha_wrapper_3(const Oracle& oracle) : m_oracle(oracle), - m_dt(Geom_traits(oracle.geom_traits())), - // used to set up the initial MPQ, use some arbitrary not-too-small value - m_queue(4096) + m_tr(Geom_traits(oracle.geom_traits())) +#ifdef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + , m_queue(4096) +#endif { - // Due to the Steiner point computation being a dichotomy, the algorithm is inherently inexact - // and passing exact kernels is explicitely disabled to ensure no misunderstanding. - CGAL_static_assertion((std::is_floating_point::value)); + static_assert(std::is_floating_point::value); } public: - const Geom_traits& geom_traits() const { return m_dt.geom_traits(); } - Dt& triangulation() { return m_dt; } - const Dt& triangulation() const { return m_dt; } + const Geom_traits& geom_traits() const { return m_tr.geom_traits(); } + Oracle& oracle() { return m_oracle; } + const Oracle& oracle() const { return m_oracle; } + Triangulation& triangulation() { return m_tr; } + const Triangulation& triangulation() const { return m_tr; } const Alpha_PQ& queue() const { return m_queue; } double default_alpha() const @@ -216,24 +229,27 @@ class Alpha_wrap_3 const Point_3& circumcenter(const Cell_handle c) const { // We only cross an infinite facet once, so this isn't going to be recomputed many times - if(m_dt.is_infinite(c)) + if(m_tr.is_infinite(c)) { - const int inf_index = c->index(m_dt.infinite_vertex()); + const int inf_index = c->index(m_tr.infinite_vertex()); c->set_circumcenter( - geom_traits().construct_circumcenter_3_object()(m_dt.point(c, (inf_index+1)&3), - m_dt.point(c, (inf_index+2)&3), - m_dt.point(c, (inf_index+3)&3))); + geom_traits().construct_circumcenter_3_object()(m_tr.point(c, (inf_index+1)&3), + m_tr.point(c, (inf_index+2)&3), + m_tr.point(c, (inf_index+3)&3))); } return c->circumcenter(geom_traits()); } public: - template + template void operator()(const double alpha, // = default_alpha() const double offset, // = alpha / 30. OutputMesh& output_mesh, - const NamedParameters& np) + const InputNamedParameters& in_np = parameters::default_values(), + const OutputNamedParameters& out_np = parameters::default_values()) { namespace PMP = Polygon_mesh_processing; @@ -241,25 +257,52 @@ class Alpha_wrap_3 using parameters::get_parameter_reference; using parameters::choose_parameter; - using OVPM = typename CGAL::GetVertexPointMap::type; - OVPM ovpm = choose_parameter(get_parameter(np, internal_np::vertex_point), + // + using OVPM = typename CGAL::GetVertexPointMap::type; + OVPM ovpm = choose_parameter(get_parameter(out_np, internal_np::vertex_point), get_property_map(vertex_point, output_mesh)); - typedef typename internal_np::Lookup_named_param_def < - internal_np::visitor_t, - NamedParameters, - Wrapping_default_visitor // default - >::reference Visitor; + // + using Visitor = typename internal_np::Lookup_named_param_def< + internal_np::visitor_t, + InputNamedParameters, + Wrapping_default_visitor // default + >::reference; Wrapping_default_visitor default_visitor; - Visitor visitor = choose_parameter(get_parameter_reference(np, internal_np::visitor), default_visitor); + Visitor visitor = choose_parameter(get_parameter_reference(in_np, internal_np::visitor), default_visitor); + + // Points used to create initial cavities + m_seeds = choose_parameter(get_parameter_reference(in_np, internal_np::seed_points), Seeds()); + + // Whether or not some cells should be reflagged as "inside" after the refinement+carving loop + // as ended, as to ensure that the result is not only combinatorially manifold, but also + // geometrically manifold. + // + // -- Warning -- + // Manifoldness postprocessing will be performed even if the wrapping is interrupted (and + // this option is enabled). + const bool do_enforce_manifoldness = choose_parameter(get_parameter(in_np, internal_np::do_enforce_manifoldness), true); - std::vector no_seeds; - using Seeds = typename internal_np::Lookup_named_param_def< - internal_np::seed_points_t, NamedParameters, std::vector >::reference; - Seeds seeds = choose_parameter(get_parameter_reference(np, internal_np::seed_points), no_seeds); + // Whether to keep pockets of "outside" cells that are not connected to the exterior (or to the + // initial cavities, if used). + // + // -- Warning -- + // Pockets of "outside" cells will be purged even if the wrapping is interrupted (and + // this option is enabled). + const bool keep_inner_ccs = choose_parameter(get_parameter(in_np, internal_np::keep_inner_connected_components), false); - const bool do_enforce_manifoldness = choose_parameter(get_parameter(np, internal_np::do_enforce_manifoldness), true); + // This parameter enables avoiding recomputing the triangulation from scratch when wrapping + // the same input for multiple values of alpha (and typically the same offset values). + // + // -- Warning -- + // If this is enabled, the 3D triangulation will NOT be re-initialized at launch. + // This means that the triangulation is NOT cleared, even if: + // - you use an alpha value that is greater than what was used in a previous run; you will + // obtain the same result as the last run. + // - you use a different offset value between runs, you might then get points that are not + // on the offset surface corresponding to that corresponding to the latter offset value. + const bool refining = choose_parameter(get_parameter(in_np, internal_np::refine_triangulation), false); #ifdef CGAL_AW3_TIMER CGAL::Real_timer t; @@ -268,77 +311,60 @@ class Alpha_wrap_3 visitor.on_alpha_wrapping_begin(*this); - if(!initialize(alpha, offset, seeds)) + std::cout << " initializing cells..." << std::endl; + if(!initialize(alpha, offset, refining)) return; -#ifdef CGAL_AW3_DEBUG_DUMP_EVERY_STEP - extract_surface(output_mesh, ovpm, true /*tolerate non manifoldness*/); - CGAL::IO::write_polygon_mesh("initial_cavities.off", output_mesh, - CGAL::parameters::vertex_point_map(ovpm).stream_precision(17)); -#endif - - alpha_flood_fill(visitor); - #ifdef CGAL_AW3_TIMER t.stop(); - std::cout << "Flood filling took: " << t.time() << " s." << std::endl; + std::cout << "Initialization took: " << t.time() << " s." << std::endl; + t.reset(); + t.start(); #endif - std::cout << " enforcing manifoldness and extracting surface..." << std::endl; - if(do_enforce_manifoldness) - { -#ifdef CGAL_AW3_DEBUG_MANIFOLDNESS - std::cout << "> Make manifold..." << std::endl; - - extract_surface(output_mesh, ovpm, true /*tolerate non manifoldness*/); - -#ifdef CGAL_AW3_DEBUG_DUMP_EVERY_STEP - dump_triangulation_faces("intermediate_dt3.off", false /*only_boundary_faces*/); - IO::write_polygon_mesh("intermediate.off", output_mesh, - CGAL::parameters::vertex_point_map(ovpm).stream_precision(17)); +#ifdef CGAL_AW3_DEBUG_DUMP_INTERMEDIATE_WRAPS + dump_triangulation_faces("starting_wrap.off", true /*only_boundary_faces*/); #endif - FT base_vol = 0; - if(is_closed(output_mesh)) // might not be due to manifoldness - base_vol = PMP::volume(output_mesh, CGAL::parameters::vertex_point_map(ovpm)); - else - std::cerr << "Warning: couldn't compute volume before manifoldness fixes (mesh is not closed)" << std::endl; + alpha_flood_fill(visitor); + +#ifdef CGAL_AW3_DEBUG_DUMP_INTERMEDIATE_WRAPS + dump_triangulation_faces("flood_filled_wrap.off", true /*only_boundary_faces*/); #endif #ifdef CGAL_AW3_TIMER + t.stop(); + std::cout << "Flood filling took: " << t.time() << " s." << std::endl; t.reset(); t.start(); #endif + if(do_enforce_manifoldness) + { make_manifold(); +#ifdef CGAL_AW3_DEBUG_DUMP_INTERMEDIATE_WRAPS + dump_triangulation_faces("manifold_wrap.off", true /*only_boundary_faces*/); +#endif + #ifdef CGAL_AW3_TIMER t.stop(); - std::cout << "\nManifoldness post-processing took: " << t.time() << " s." << std::endl; + std::cout << "Manifoldness post-processing took: " << t.time() << " s." << std::endl; + t.reset(); + t.start(); #endif + } -#ifdef CGAL_AW3_DEBUG_MANIFOLDNESS - if(!is_zero(base_vol)) - { - extract_surface(output_mesh, ovpm, false /*do not tolerate non-manifoldness*/); - - const FT manifold_vol = PMP::volume(output_mesh, CGAL::parameters::vertex_point_map(ovpm)); - const FT ratio = manifold_vol / base_vol; - - std::cout << "Volumes post-manifoldness fix:\n" - << "before: " << base_vol << "\n" - << "after: " << manifold_vol << "\n" - << "ratio: " << ratio << std::endl; - if(ratio > 1.1) // more than 10% extra volume - std::cerr << "Warning: large increase of volume after manifoldness resolution" << std::endl; - } -#endif - } // do_enforce_manifoldness + if(!keep_inner_ccs) + { + // We could purge *before* manifold enforcement, but making the mesh manifold is + // very cheap in most cases, so it is better to keep the code simpler. + purge_inner_connected_components(); -#ifdef CGAL_AW3_TIMER - t.reset(); - t.start(); +#ifdef CGAL_AW3_DEBUG_DUMP_INTERMEDIATE_WRAPS + dump_triangulation_faces("purged_wrap.off", true /*only_boundary_faces*/); #endif + } extract_surface(output_mesh, ovpm, !do_enforce_manifoldness); @@ -351,9 +377,9 @@ class Alpha_wrap_3 std::cout << "Alpha wrap vertices: " << vertices(output_mesh).size() << std::endl; std::cout << "Alpha wrap faces: " << faces(output_mesh).size() << std::endl; - #ifdef CGAL_AW3_DEBUG_DUMP_EVERY_STEP - IO::write_polygon_mesh("final.off", output_mesh, CGAL::parameters::stream_precision(17)); - dump_triangulation_faces("final_dt3.off", false /*only_boundary_faces*/); + #ifdef CGAL_AW3_DEBUG_DUMP_INTERMEDIATE_WRAPS + IO::write_polygon_mesh("final_wrap.off", output_mesh, CGAL::parameters::stream_precision(17)); + dump_triangulation_faces("final_tr.off", false /*only_boundary_faces*/); #endif #endif @@ -361,14 +387,6 @@ class Alpha_wrap_3 } // Convenience overloads - template - void operator()(const double alpha, - const double offset, - OutputMesh& output_mesh) - { - return operator()(alpha, offset, output_mesh, parameters::default_values()); - } - template void operator()(const double alpha, OutputMesh& output_mesh) @@ -386,6 +404,7 @@ class Alpha_wrap_3 SC_Iso_cuboid_3 construct_bbox(const double offset) { // Input axis-aligned bounding box + //todo ip: this function below can be expensive SC_Iso_cuboid_3 bbox = m_oracle.bbox(); const SC_Point_3 bbox_centroid = midpoint((bbox.min)(), (bbox.max)()); @@ -410,6 +429,20 @@ class Alpha_wrap_3 return bbox; } +private: + // The distinction between inside boundary and outside boundary is the presence of cells + // being flagged for manifoldness: inside boundary considers those outside, and outside + // boundary considers them inside. + bool is_on_inside_boundary(Cell_handle ch, Cell_handle nh) const + { + return (ch->is_inside() != nh->is_inside()); // one is "inside", the other is not + } + + bool is_on_outside_boundary(Cell_handle ch, Cell_handle nh) const + { + return (ch->is_outside() != nh->is_outside()); // one is "outside", the other is not + } + private: // Adjust the bbox & insert its corners to construct the starting triangulation void insert_bbox_corners() @@ -424,11 +457,11 @@ class Alpha_wrap_3 for(int i=0; i<8; ++i) { const Point_3 bp = SC2GT()(m_bbox.vertex(i)); - Vertex_handle bv = m_dt.insert(bp); + Vertex_handle bv = m_tr.insert(bp); #ifdef CGAL_AW3_DEBUG_INITIALIZATION std::cout << "\t" << bp << std::endl; #endif - bv->info() = BBOX_VERTEX; + bv->type() = AW3i::Vertex_type:: BBOX_VERTEX; } } @@ -437,20 +470,20 @@ class Alpha_wrap_3 // - Cells whose circumcenter is in the offset volume are inside: this is because // we need to have outside cell circumcenters outside of the volume to ensure // that the refinement point is separated from the existing point set. - bool cavity_cell_outside_tag(const Cell_handle ch) + Cell_label cavity_cell_label(const Cell_handle ch) { - CGAL_precondition(!m_dt.is_infinite(ch)); + CGAL_precondition(!m_tr.is_infinite(ch)); const Tetrahedron_with_outside_info tet(ch, geom_traits()); if(m_oracle.do_intersect(tet)) - return false; + return Cell_label::INSIDE; const Point_3& ch_cc = circumcenter(ch); typename Geom_traits::Construct_ball_3 ball = geom_traits().construct_ball_3_object(); const Ball_3 ch_cc_offset_ball = ball(ch_cc, m_sq_offset); const bool is_cc_in_offset = m_oracle.do_intersect(ch_cc_offset_ball); - return !is_cc_in_offset; + return is_cc_in_offset ? Cell_label::INSIDE : Cell_label::OUTSIDE; } // Create a cavity using seeds rather than starting from the infinity. @@ -489,15 +522,14 @@ class Alpha_wrap_3 // // Another way is to simply make faces incident to the seed always traversable, and then // we only have to ensure faces opposite of the seed are traversable (i.e., radius ~= 1.65 * alpha) - template - bool initialize_with_cavities(const SeedRange& seeds) + bool initialize_with_cavities() { #ifdef CGAL_AW3_DEBUG_INITIALIZATION std::cout << "> Dig cavities" << std::endl; - std::cout << seeds.size() << " seed(s)" << std::endl; + std::cout << m_seeds.size() << " seed(s)" << std::endl; #endif - CGAL_precondition(!seeds.empty()); + CGAL_precondition(!m_seeds.empty()); // Get a double value approximating the scaling factors // std::cout << sqrt(3) * sin(2pi / 5) << std::endl; @@ -506,7 +538,7 @@ class Alpha_wrap_3 Iso_cuboid_3 bbox = SC2GT()(m_bbox); std::vector seed_vs; - for(const Point_3& seed_p : seeds) + for(const Point_3& seed_p : m_seeds) { #ifdef CGAL_AW3_DEBUG_INITIALIZATION std::cout << "Initialize from seed " << seed_p << std::endl; @@ -532,7 +564,7 @@ class Alpha_wrap_3 continue; } - // Mark the seeds and icosahedron vertices as "artificial vertices" such that the facets + // Mark the seeds and icosahedron vertices as "scaffolding" vertices such that the facets // incident to these vertices are always traversable regardless of their circumcenter. // This is done because otherwise some cavities can appear on the mesh: non-traversable facets // with two vertices on the offset, and the third being a deeper inside seed / ico_seed. @@ -542,8 +574,8 @@ class Alpha_wrap_3 // This problem only appears when the seed and icosahedron vertices are close to the offset surface, // which usually happens for large alpha values. - Vertex_handle seed_v = m_dt.insert(seed_p); - seed_v->info() = SEED_VERTEX; + Vertex_handle seed_v = m_tr.insert(seed_p); + seed_v->type() = AW3i::Vertex_type:: SEED_VERTEX; seed_vs.push_back(seed_v); // Icosahedron vertices (see also BGL::make_icosahedron()) @@ -579,9 +611,10 @@ class Alpha_wrap_3 if(bbox.has_on_unbounded_side(seed_neighbor_p)) continue; - Vertex_handle ico_v = m_dt.insert(seed_neighbor_p, seed_v /*hint*/); - ico_v->info() = SEED_VERTEX; + Vertex_handle ico_v = m_tr.insert(seed_neighbor_p, seed_v /*hint*/); + ico_v->type() = AW3i::Vertex_type:: SEED_VERTEX; } + } if(seed_vs.empty()) @@ -593,26 +626,28 @@ class Alpha_wrap_3 } #ifdef CGAL_AW3_DEBUG_INITIALIZATION - std::cout << m_dt.number_of_vertices() - 8 /*bbox*/ << " vertice(s) due to seeds" << std::endl; + std::cout << m_tr.number_of_vertices() - 8 /*bbox*/ << " vertice(s) due to seeds" << std::endl; #endif for(Vertex_handle seed_v : seed_vs) { std::vector inc_cells; inc_cells.reserve(64); - m_dt.incident_cells(seed_v, std::back_inserter(inc_cells)); + m_tr.incident_cells(seed_v, std::back_inserter(inc_cells)); + for(Cell_handle ch : inc_cells) - ch->info().is_outside = cavity_cell_outside_tag(ch); + ch->set_label(cavity_cell_label(ch)); } - // Might as well go through the full triangulation since only seeds should have been inserted - for(Cell_handle ch : m_dt.all_cell_handles()) + // Should be cheap enough to go through the full triangulation as only seeds have been inserted + for(Cell_handle ch : m_tr.all_cell_handles()) { - if(!ch->info().is_outside) + if(ch->is_inside()) continue; - // When the algorithm starts from a manually dug hole, infinite cells are tagged "inside" - CGAL_assertion(!m_dt.is_infinite(ch)); + // When the algorithm starts from a manually dug hole, infinite cells are initialized + // as "inside" such that they do not appear on the boundary + CGAL_assertion(!m_tr.is_infinite(ch)); for(int i=0; i<4; ++i) push_facet(std::make_pair(ch, i)); @@ -629,28 +664,60 @@ class Alpha_wrap_3 return true; } - // tag all infinite cells OUTSIDE and all finite cells INSIDE + // tag all infinite cells "outside" and all finite cells "inside" // init queue with all convex hull facets bool initialize_from_infinity() { - for(Cell_handle ch : m_dt.all_cell_handles()) + for(Cell_handle ch : m_tr.all_cell_handles()) { - if(m_dt.is_infinite(ch)) + if(m_tr.is_infinite(ch)) { - ch->info().is_outside = true; - const int inf_index = ch->index(m_dt.infinite_vertex()); + ch->set_label(Cell_label::OUTSIDE); + const int inf_index = ch->index(m_tr.infinite_vertex()); push_facet(std::make_pair(ch, inf_index)); } else { - ch->info().is_outside = false; + ch->set_label(Cell_label::INSIDE); } } return true; } -public: + void reset_manifold_labels() + { + // No erase counter increment, or it will mess up with a possibly non-empty queue. + for(Cell_handle ch : m_tr.all_cell_handles()) + if(ch->label() == Cell_label::MANIFOLD) + ch->set_label(Cell_label::OUTSIDE); + } + + // This function is used in the case of resumption of a previous run: m_tr is not cleared, + // and we fill the queue with the new parameters. + bool initialize_from_existing_triangulation() + { +#ifdef CGAL_AW3_DEBUG_INITIALIZATION + std::cout << "Restart from a DT of " << m_tr.number_of_cells() << " cells" << std::endl; +#endif + + for(Cell_handle ch : m_tr.all_cell_handles()) + { + if(ch->is_inside()) + continue; + + for(int i=0; i<4; ++i) + { + if(ch->neighbor(i)->is_inside()) + push_facet(std::make_pair(ch, i)); + + } + } + + return true; + } + +private: // Manifoldness is tolerated while debugging and extracting at intermediate states // Not the preferred way because it uses 3*nv storage template @@ -665,13 +732,13 @@ class Alpha_wrap_3 clear(output_mesh); - CGAL_assertion_code(for(auto cit=m_dt.finite_cells_begin(), cend=m_dt.finite_cells_end(); cit!=cend; ++cit)) + CGAL_assertion_code(for(auto cit=m_tr.finite_cells_begin(), cend=m_tr.finite_cells_end(); cit!=cend; ++cit)) CGAL_assertion(cit->tds_data().is_clear()); - for(auto cit=m_dt.finite_cells_begin(), cend=m_dt.finite_cells_end(); cit!=cend; ++cit) + for(auto cit=m_tr.finite_cells_begin(), cend=m_tr.finite_cells_end(); cit!=cend; ++cit) { Cell_handle seed = cit; - if(seed->info().is_outside || seed->tds_data().processed()) + if(seed->is_outside() || seed->tds_data().processed()) continue; std::queue to_visit; @@ -684,29 +751,28 @@ class Alpha_wrap_3 while(!to_visit.empty()) { const Cell_handle cell = to_visit.front(); - CGAL_assertion(!cell->info().is_outside && !m_dt.is_infinite(cell)); + CGAL_assertion(!cell->is_outside() && !m_tr.is_infinite(cell)); to_visit.pop(); if(cell->tds_data().processed()) continue; - cell->tds_data().mark_processed(); for(int fid=0; fid<4; ++fid) { const Cell_handle neighbor = cell->neighbor(fid); - if(neighbor->info().is_outside) + if(neighbor->is_outside()) { // There shouldn't be any artificial vertex on the inside/outside boundary // (past initialization) -// CGAL_assertion(cell->vertex((fid + 1)&3)->info() == DEFAULT); -// CGAL_assertion(cell->vertex((fid + 2)&3)->info() == DEFAULT); -// CGAL_assertion(cell->vertex((fid + 3)&3)->info() == DEFAULT); +// CGAL_assertion(cell->vertex((fid + 1)&3)->type() == AW3i::Vertex_type:: DEFAULT); +// CGAL_assertion(cell->vertex((fid + 2)&3)->type() == AW3i::Vertex_type:: DEFAULT); +// CGAL_assertion(cell->vertex((fid + 3)&3)->type() == AW3i::Vertex_type:: DEFAULT); - points.push_back(m_dt.point(cell, Dt::vertex_triple_index(fid, 0))); - points.push_back(m_dt.point(cell, Dt::vertex_triple_index(fid, 1))); - points.push_back(m_dt.point(cell, Dt::vertex_triple_index(fid, 2))); + points.push_back(m_tr.point(cell, Triangulation::vertex_triple_index(fid, 0))); + points.push_back(m_tr.point(cell, Triangulation::vertex_triple_index(fid, 1))); + points.push_back(m_tr.point(cell, Triangulation::vertex_triple_index(fid, 2))); faces.push_back({idx, idx + 1, idx + 2}); idx += 3; } @@ -717,8 +783,6 @@ class Alpha_wrap_3 } } - PMP::duplicate_non_manifold_edges_in_polygon_soup(points, faces); - CGAL_assertion(PMP::is_polygon_soup_a_polygon_mesh(faces)); PMP::polygon_soup_to_polygon_mesh(points, faces, output_mesh, CGAL::parameters::default_values(), @@ -728,7 +792,7 @@ class Alpha_wrap_3 CGAL_assertion(is_closed(output_mesh)); } - for(auto cit=m_dt.finite_cells_begin(), cend=m_dt.finite_cells_end(); cit!=cend; ++cit) + for(auto cit=m_tr.finite_cells_begin(), cend=m_tr.finite_cells_end(); cit!=cend; ++cit) cit->tds_data().clear(); CGAL_postcondition(!is_empty(output_mesh)); @@ -736,6 +800,8 @@ class Alpha_wrap_3 CGAL_postcondition(is_closed(output_mesh)); PMP::orient_to_bound_a_volume(output_mesh, CGAL::parameters::vertex_point_map(ovpm)); + + collect_garbage(output_mesh); } template @@ -745,43 +811,38 @@ class Alpha_wrap_3 namespace PMP = Polygon_mesh_processing; #ifdef CGAL_AW3_DEBUG - std::cout << "> Extract wrap... ()" << std::endl; + std::cout << "> Extract manifold wrap... ()" << std::endl; #endif - CGAL_assertion_code(for(Vertex_handle v : m_dt.finite_vertex_handles())) + CGAL_assertion_code(for(Vertex_handle v : m_tr.finite_vertex_handles())) CGAL_assertion(!is_non_manifold(v)); clear(output_mesh); - // boundary faces to polygon soup std::vector points; std::vector > faces; std::unordered_map vertex_to_id; - std::size_t nv = 0; - for(auto fit=m_dt.finite_facets_begin(), fend=m_dt.finite_facets_end(); fit!=fend; ++fit) + for(auto fit=m_tr.all_facets_begin(), fend=m_tr.all_facets_end(); fit!=fend; ++fit) { Facet f = *fit; - if(!f.first->info().is_outside) - f = m_dt.mirror_facet(f); + if(!f.first->is_outside()) + f = m_tr.mirror_facet(f); - const Cell_handle c = f.first; + const Cell_handle ch = f.first; const int s = f.second; - const Cell_handle nh = c->neighbor(s); - if(c->info().is_outside == nh->info().is_outside) + const Cell_handle nh = ch->neighbor(s); + if(!is_on_outside_boundary(ch, nh)) continue; std::array ids; for(int pos=0; pos<3; ++pos) { - Vertex_handle vh = c->vertex(Dt::vertex_triple_index(s, pos)); - auto insertion_res = vertex_to_id.emplace(vh, nv); + Vertex_handle vh = ch->vertex(Triangulation::vertex_triple_index(s, pos)); + auto insertion_res = vertex_to_id.emplace(vh, vertex_to_id.size()); if(insertion_res.second) // successful insertion, never-seen-before vertex - { - points.push_back(m_dt.point(vh)); - ++nv; - } + points.push_back(m_tr.point(vh)); ids[pos] = insertion_res.first->second; } @@ -789,12 +850,22 @@ class Alpha_wrap_3 faces.emplace_back(std::array{ids[0], ids[1], ids[2]}); } +#ifdef CGAL_AW3_DEBUG + std::cout << "\t" << points.size() << " points" << std::endl; + std::cout << "\t" << faces.size() << " faces" << std::endl; +#endif + if(faces.empty()) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Warning: empty wrap?..." << std::endl; +#endif return; + } if(!PMP::is_polygon_soup_a_polygon_mesh(faces)) { - CGAL_warning_msg(false, "Could NOT extract mesh..."); + CGAL_warning_msg(false, "Failed to extract a manifold boundary!"); return; } @@ -805,10 +876,12 @@ class Alpha_wrap_3 CGAL_postcondition(!is_empty(output_mesh)); CGAL_postcondition(is_valid_polygon_mesh(output_mesh)); CGAL_postcondition(is_closed(output_mesh)); + CGAL_postcondition(PMP::does_bound_a_volume(output_mesh, CGAL::parameters::vertex_point_map(ovpm))); PMP::orient_to_bound_a_volume(output_mesh, CGAL::parameters::vertex_point_map(ovpm)); } +public: template void extract_surface(OutputMesh& output_mesh, OVPM ovpm, @@ -823,14 +896,14 @@ class Alpha_wrap_3 private: bool is_traversable(const Facet& f) const { - return less_squared_radius_of_min_empty_sphere(m_sq_alpha, f, m_dt); + return less_squared_radius_of_min_empty_sphere(m_sq_alpha, f, m_tr); } bool compute_steiner_point(const Cell_handle ch, const Cell_handle neighbor, Point_3& steiner_point) const { - CGAL_precondition(!m_dt.is_infinite(neighbor)); + CGAL_precondition(!m_tr.is_infinite(neighbor)); typename Geom_traits::Construct_ball_3 ball = geom_traits().construct_ball_3_object(); typename Geom_traits::Construct_vector_3 vector = geom_traits().construct_vector_3_object(); @@ -914,52 +987,86 @@ class Alpha_wrap_3 } private: - enum Facet_queue_status + // A permissive gate is a gate that we can traverse without checking its circumradius + enum class Facet_status { IRRELEVANT = 0, - ARTIFICIAL_FACET, + HAS_INFINITE_NEIGHBOR, // the cell incident to the mirrored facet is infinite (permissive) + SCAFFOLDING, // incident to a SEED or BBOX vertex (permissive) TRAVERSABLE }; + inline const char* get_status_message(const Facet_status status) + { + constexpr std::size_t status_count = 4; + + // Messages corresponding to Error_code list above. Must be kept in sync! + static const char* message[status_count] = { + "Irrelevant facet", + "Facet incident to infinite neighbor", + "Facet with a bbox/seed vertex", + "Traversable facet" + }; + + const std::size_t status_id = static_cast(status); + if(status_id > status_count || status_id < 0) + return "Unknown status"; + else + return message[status_id]; + } + +public: // @speed some decent time may be spent constructing Facet (pairs) for no reason as it's always // just to grab the .first and .second as soon as it's constructed, and not due to API requirements - // e.g. from DT3 - Facet_queue_status facet_status(const Facet& f) const + Facet_status facet_status(const Facet& f) const { - CGAL_precondition(!m_dt.is_infinite(f)); + CGAL_precondition(!m_tr.is_infinite(f)); #ifdef CGAL_AW3_DEBUG_FACET_STATUS std::cout << "facet status: " - << f.first->vertex((f.second + 1)&3)->point() << " " - << f.first->vertex((f.second + 2)&3)->point() << " " - << f.first->vertex((f.second + 3)&3)->point() << std::endl; + << m_tr.point(f.first, Triangulation::vertex_triple_index(f.second, 0)) << " " + << m_tr.point(f.first, Triangulation::vertex_triple_index(f.second, 1)) << " " + << m_tr.point(f.first, Triangulation::vertex_triple_index(f.second, 2)) << std::endl; #endif - // skip if neighbor is OUTSIDE or infinite + // skip if neighbor is "outside" or infinite const Cell_handle ch = f.first; const int id = f.second; + CGAL_precondition(ch->label() == Cell_label::INSIDE || ch->label() == Cell_label::OUTSIDE); + + if(!ch->is_outside()) // "inside" or "manifold" + { +#ifdef CGAL_AW3_DEBUG_FACET_STATUS + std::cout << "Facet is inside" << std::endl; +#endif + return Facet_status::IRRELEVANT; + } + const Cell_handle nh = ch->neighbor(id); - if(m_dt.is_infinite(nh)) - return TRAVERSABLE; + CGAL_precondition(ch->label() == Cell_label::INSIDE || ch->label() == Cell_label::OUTSIDE); + + if(m_tr.is_infinite(nh)) + return Facet_status::HAS_INFINITE_NEIGHBOR; - if(nh->info().is_outside) + if(nh->is_outside()) { #ifdef CGAL_AW3_DEBUG_FACET_STATUS std::cout << "Neighbor already outside" << std::endl; #endif - return IRRELEVANT; + return Facet_status::IRRELEVANT; } - // push if facet is connected to artifical vertices + // push if facet is connected to scaffolding vertices for(int i=0; i<3; ++i) { - const Vertex_handle vh = ch->vertex(Dt::vertex_triple_index(id, i)); - if(vh->info() == BBOX_VERTEX || vh->info() == SEED_VERTEX) + const Vertex_handle vh = ch->vertex(Triangulation::vertex_triple_index(id, i)); + if(vh->type() == AW3i::Vertex_type:: BBOX_VERTEX || + vh->type() == AW3i::Vertex_type:: SEED_VERTEX) { #ifdef CGAL_AW3_DEBUG_FACET_STATUS - std::cout << "artificial facet due to artificial vertex #" << i << std::endl; + std::cout << "Scaffolding facet due to vertex #" << i << std::endl; #endif - return ARTIFICIAL_FACET; + return Facet_status::SCAFFOLDING; } } @@ -969,78 +1076,143 @@ class Alpha_wrap_3 #ifdef CGAL_AW3_DEBUG_FACET_STATUS std::cout << "traversable" << std::endl; #endif - return TRAVERSABLE; + return Facet_status::TRAVERSABLE; } #ifdef CGAL_AW3_DEBUG_FACET_STATUS std::cout << "not traversable" << std::endl; #endif - return IRRELEVANT; + return Facet_status::IRRELEVANT; } +private: bool push_facet(const Facet& f) { - CGAL_precondition(f.first->info().is_outside); + CGAL_precondition(f.first->is_outside()); +#ifdef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE // skip if f is already in queue if(m_queue.contains_with_bounds_check(Gate(f))) return false; +#endif - const Facet_queue_status s = facet_status(f); - if(s == IRRELEVANT) + // @todo could avoid useless facet_status() calls by doing it after the zombie check + // for the unsorted priority queue, but AFAIR, it doesn't save noticeable time (and that + // increases the queue size). + const Facet_status status = facet_status(f); + if(status == Facet_status::IRRELEVANT) return false; - const Cell_handle ch = f.first; - const int id = f.second; - const Point_3& p0 = m_dt.point(ch, (id+1)&3); - const Point_3& p1 = m_dt.point(ch, (id+2)&3); - const Point_3& p2 = m_dt.point(ch, (id+3)&3); +#ifdef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + const FT sqr = smallest_squared_radius_3(f, m_tr); + const bool is_permissive = (status == Facet_status::HAS_INFINITE_NEIGHBOR || + status == Facet_status::SCAFFOLDING); + m_queue.resize_and_push(Gate(f, sqr, is_permissive)); +#else + m_queue.push(Gate(f, m_tr)); +#endif - // @todo should prob be the real value we compare to alpha instead of squared_radius - const FT sqr = geom_traits().compute_squared_radius_3_object()(p0, p1, p2); - m_queue.resize_and_push(Gate(f, sqr, (s == ARTIFICIAL_FACET))); +#ifdef CGAL_AW3_DEBUG_QUEUE + const Cell_handle ch = f.first; + const int s = f.second; + const Point_3& p0 = m_tr.point(ch, Triangulation::vertex_triple_index(s, 0)); + const Point_3& p1 = m_tr.point(ch, Triangulation::vertex_triple_index(s, 1)); + const Point_3& p2 = m_tr.point(ch, Triangulation::vertex_triple_index(s, 2)); + + static int gid = 0; + std::cout << "Queue insertion #" << gid++ << "\n" + << " ch = " << &*ch << " (" << m_tr.is_infinite(ch) << ") " << "\n" + << "\t" << p0 << "\n\t" << p1 << "\n\t" << p2 << std::endl; + std::cout << " Status: " << get_status_message(status) << std::endl; + #ifdef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + std::cout << " SQR: " << sqr << std::endl; + std::cout << " Permissiveness: " << is_permissive << std::endl; + + CGAL_assertion(is_permissive || sqr >= m_sq_alpha); + #endif // CGAL_AW3_USE_SORTED_PRIORITY_QUEUE +#endif // CGAL_AW3_DEBUG_QUEUE return true; } private: - template bool initialize(const double alpha, const double offset, - const SeedRange& seeds) + const bool refining) { #ifdef CGAL_AW3_DEBUG std::cout << "> Initialize..." << std::endl; - std::cout << "Alpha: " << alpha << std::endl; - std::cout << "Offset: " << offset << std::endl; +#endif + + const bool resuming = refining && (alpha == m_alpha) && (offset == m_offset); + +#ifdef CGAL_AW3_DEBUG + std::cout << "\tAlpha: " << alpha << std::endl; + std::cout << "\tOffset: " << offset << std::endl; + std::cout << "\tRefining? " << refining << std::endl; + std::cout << "\tResuming? " << resuming << std::endl; #endif if(!is_positive(alpha) || !is_positive(offset)) { #ifdef CGAL_AW3_DEBUG - std::cout << "Error: invalid input parameters" << std::endl; + std::cerr << "Error: invalid input parameters: " << alpha << " and" << offset << std::endl; #endif return false; } + if(refining && alpha > m_alpha) + std::cerr << "Warning: refining with an alpha greater than the last iteration's!" << std::endl; + if(refining && offset != m_offset) + std::cerr << "Warning: refining with a different offset value!" << std::endl; + m_alpha = FT(alpha); m_sq_alpha = square(m_alpha); m_offset = FT(offset); m_sq_offset = square(m_offset); - m_dt.clear(); + // Resuming means that we do not need to re-initialize the queue: either we have finished + // and there is nothing to do, or the interruption was due to a user callback in the visitor, + // and we can resume with the current queue + if(resuming) + { +#ifdef CGAL_AW3_DEBUG + std::cout << "Resuming with a queue of size: " << m_queue.size() << std::endl; +#endif + + reset_manifold_labels(); + return true; + } + +#ifdef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE m_queue.clear(); +#else + m_queue = { }; +#endif - insert_bbox_corners(); + if(refining) + { + // If we are re-using the triangulation, change the label of the extra elements + // that we have added to ensure a manifold result back to external ("manifold" -> "outside") + reset_manifold_labels(); - if(seeds.empty()) - return initialize_from_infinity(); + return initialize_from_existing_triangulation(); + } else - return initialize_with_cavities(seeds); + { + m_tr.clear(); + + insert_bbox_corners(); + + if(m_seeds.empty()) + return initialize_from_infinity(); + else + return initialize_with_cavities(); + } } template - void alpha_flood_fill(Visitor& visitor) + bool alpha_flood_fill(Visitor& visitor) { #ifdef CGAL_AW3_DEBUG std::cout << "> Flood fill..." << std::endl; @@ -1052,39 +1224,53 @@ class Alpha_wrap_3 // Explore all finite cells that are reachable from one of the initial outside cells. while(!m_queue.empty()) { + if(!visitor.go_further(*this)) + return false; + if ((curr_iter % 3000) == 0) { std::cout << "\r" " cells to visit: " << m_queue.size() - << " " << std::flush; + << " " << std::flush; } ++curr_iter; #ifdef CGAL_AW3_DEBUG_QUEUE_PP check_queue_sanity(); #endif - // const& to something that will be poped, but safe as `ch` && `id` are extracted before the pop + // const& to something that will be popped, but safe as `ch` && `id` are extracted before the pop const Gate& gate = m_queue.top(); + +#ifndef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + if(gate.is_zombie()) + { + m_queue.pop(); + continue; + } +#endif + const Facet& f = gate.facet(); - CGAL_precondition(!m_dt.is_infinite(f)); + CGAL_precondition(!m_tr.is_infinite(f)); const Cell_handle ch = f.first; - const int id = f.second; - const Cell_handle neighbor = ch->neighbor(id); + const int s = f.second; + CGAL_precondition(ch->is_outside()); + + const Cell_handle nh = ch->neighbor(s); + CGAL_precondition(nh->label() == Cell_label::INSIDE || nh->label() == Cell_label::OUTSIDE); #ifdef CGAL_AW3_DEBUG_QUEUE static int fid = 0; - std::cout << m_dt.number_of_vertices() << " DT vertices" << std::endl; + std::cout << m_tr.number_of_vertices() << " DT vertices" << std::endl; std::cout << m_queue.size() << " facets in the queue" << std::endl; std::cout << "Face " << fid++ << "\n" - << "c = " << &*ch << " (" << m_dt.is_infinite(ch) << "), n = " << &*neighbor << " (" << m_dt.is_infinite(neighbor) << ")" << "\n" - << m_dt.point(ch, (id+1)&3) << "\n" << m_dt.point(ch, (id+2)&3) << "\n" << m_dt.point(ch, (id+3)&3) << std::endl; - std::cout << "Priority: " << gate.priority() << std::endl; + << "c = " << &*ch << " (" << m_tr.is_infinite(ch) << "), n = " << &*nh << " (" << m_tr.is_infinite(nh) << ")" << "\n" + << m_tr.point(ch, Triangulation::vertex_triple_index(s, 0)) << "\n" + << m_tr.point(ch, Triangulation::vertex_triple_index(s, 1)) << "\n" + << m_tr.point(ch, Triangulation::vertex_triple_index(s, 2)) << std::endl; + std::cout << "Priority: " << gate.priority() << " (sq alpha: " << m_sq_alpha << ")" << std::endl; + std::cout << "Permissiveness: " << gate.is_permissive_facet() << std::endl; #endif - visitor.before_facet_treatment(*this, gate); - - m_queue.pop(); - #ifdef CGAL_AW3_DEBUG_DUMP_EVERY_STEP static int i = 0; std::string step_name = "results/steps/step_" + std::to_string(static_cast(i)) + ".off"; @@ -1093,18 +1279,27 @@ class Alpha_wrap_3 std::string face_name = "results/steps/face_" + std::to_string(static_cast(i++)) + ".xyz"; std::ofstream face_out(face_name); face_out.precision(17); - face_out << "3\n" << m_dt.point(ch, (id+1)&3) << "\n" << m_dt.point(ch, (id+2)&3) << "\n" << m_dt.point(ch, (id+3)&3) << std::endl; + face_out << "3\n" << m_tr.point(ch, Triangulation::vertex_triple_index(s, 0)) << "\n" + << m_tr.point(ch, Triangulation::vertex_triple_index(s, 1)) << "\n" + << m_tr.point(ch, Triangulation::vertex_triple_index(s, 2)) << std::endl; face_out.close(); #endif - if(m_dt.is_infinite(neighbor)) + visitor.before_facet_treatment(*this, gate); + + m_queue.pop(); + + if(m_tr.is_infinite(nh)) { - neighbor->info().is_outside = true; + nh->set_label(Cell_label::OUTSIDE); +#ifndef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + nh->increment_erase_counter(); +#endif continue; } Point_3 steiner_point; - if(compute_steiner_point(ch, neighbor, steiner_point)) + if(compute_steiner_point(ch, nh, steiner_point)) { // std::cout << CGAL::abs(CGAL::approximate_sqrt(m_oracle.squared_distance(steiner_point)) - m_offset) // << " vs " << 1e-2 * m_offset << std::endl; @@ -1113,17 +1308,20 @@ class Alpha_wrap_3 // locate cells that are going to be destroyed and remove their facet from the queue int li, lj = 0; Locate_type lt; - const Cell_handle conflict_cell = m_dt.locate(steiner_point, lt, li, lj, neighbor); - CGAL_assertion(lt != Dt::VERTEX); + const Cell_handle conflict_cell = m_tr.locate(steiner_point, lt, li, lj, nh); + CGAL_assertion(lt != Triangulation::VERTEX); + // Using small vectors like in Triangulation_3 does not bring any runtime improvement std::vector boundary_facets; std::vector conflict_zone; boundary_facets.reserve(32); conflict_zone.reserve(32); - m_dt.find_conflicts(steiner_point, conflict_cell, + + m_tr.find_conflicts(steiner_point, conflict_cell, std::back_inserter(boundary_facets), std::back_inserter(conflict_zone)); +#ifdef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE // Purge the queue of facets that will be deleted/modified by the Steiner point insertion, // and which might have been gates for(const Cell_handle& cch : conflict_zone) @@ -1138,26 +1336,29 @@ class Alpha_wrap_3 for(const Facet& f : boundary_facets) { - const Facet mf = m_dt.mirror_facet(f); // boundary facets have incident cells in the CZ + const Facet mf = m_tr.mirror_facet(f); // boundary facets have incident cells in the CZ if(m_queue.contains_with_bounds_check(Gate(mf))) m_queue.erase(Gate(mf)); } +#endif visitor.before_Steiner_point_insertion(*this, steiner_point); // Actual insertion of the Steiner point - Vertex_handle vh = m_dt.insert(steiner_point, lt, conflict_cell, li, lj); - vh->info() = DEFAULT; + // We could use TDS functions to avoid recomputing the conflict zone, but in practice + // it does not bring any runtime improvements + Vertex_handle vh = m_tr.insert(steiner_point, lt, conflict_cell, li, lj); + vh->type() = AW3i::Vertex_type:: DEFAULT; visitor.after_Steiner_point_insertion(*this, vh); std::vector new_cells; new_cells.reserve(32); - m_dt.incident_cells(vh, std::back_inserter(new_cells)); - for(const Cell_handle& ch : new_cells) + m_tr.incident_cells(vh, std::back_inserter(new_cells)); + for(const Cell_handle& new_ch : new_cells) { - // std::cout << "new cell has time stamp " << ch->time_stamp() << std::endl; - ch->info().is_outside = m_dt.is_infinite(ch); + // std::cout << "new cell has time stamp " << new_ch->time_stamp() << std::endl; + new_ch->set_label(m_tr.is_infinite(new_ch) ? Cell_label::OUTSIDE : Cell_label::INSIDE); } // Push all new boundary facets to the queue. @@ -1165,34 +1366,37 @@ class Alpha_wrap_3 // because we need to handle internal facets, infinite facets, and also more subtle changes // such as a new cell being marked inside which now creates a boundary // with its incident "outside" flagged cell. - for(Cell_handle ch : new_cells) + for(Cell_handle new_ch : new_cells) { for(int i=0; i<4; ++i) { - if(m_dt.is_infinite(ch, i)) + if(m_tr.is_infinite(new_ch, i)) continue; - const Cell_handle nh = ch->neighbor(i); - if(nh->info().is_outside == ch->info().is_outside) // not on the boundary + const Cell_handle new_nh = new_ch->neighbor(i); + if(new_nh->label() == new_ch->label()) // not on a boundary continue; - const Facet boundary_f = std::make_pair(ch, i); - if(ch->info().is_outside) + const Facet boundary_f = std::make_pair(new_ch, i); + if(new_ch->is_outside()) push_facet(boundary_f); else - push_facet(m_dt.mirror_facet(boundary_f)); + push_facet(m_tr.mirror_facet(boundary_f)); } } } - else + else // no need for a Steiner point, carve through and continue { - // tag neighbor as OUTSIDE - neighbor->info().is_outside = true; + nh->set_label(Cell_label::OUTSIDE); +#ifndef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + nh->increment_erase_counter(); +#endif // for each finite facet of neighbor, push it to the queue - for(int i=0; i<4; ++i) + const int mi = m_tr.mirror_index(ch, s); + for(int i=1; i<4; ++i) { - const Facet neighbor_f = std::make_pair(neighbor, i); + const Facet neighbor_f = std::make_pair(nh, (mi+i)&3); push_facet(neighbor_f); } } @@ -1203,26 +1407,118 @@ class Alpha_wrap_3 visitor.on_flood_fill_end(*this); // Check that no useful facet has been ignored - CGAL_postcondition_code(for(auto fit=m_dt.finite_facets_begin(), fend=m_dt.finite_facets_end(); fit!=fend; ++fit) {) - CGAL_postcondition_code( if(fit->first->info().is_outside == fit->first->neighbor(fit->second)->info().is_outside) continue;) + CGAL_postcondition_code(for(auto fit=m_tr.finite_facets_begin(), fend=m_tr.finite_facets_end(); fit!=fend; ++fit) {) + CGAL_postcondition_code( Cell_handle ch = fit->first; Cell_handle nh = fit->first->neighbor(fit->second); ) + CGAL_postcondition_code( if(ch->label() == nh->label()) continue;) CGAL_postcondition_code( Facet f = *fit;) - CGAL_postcondition_code( if(!fit->first->info().is_outside) f = m_dt.mirror_facet(f);) - CGAL_postcondition( facet_status(f) == IRRELEVANT); + CGAL_postcondition_code( if(ch->is_inside()) f = m_tr.mirror_facet(f);) + CGAL_postcondition( facet_status(f) == Facet_status::IRRELEVANT); CGAL_postcondition_code(}) + + return true; + } + + // Any outside cell that isn't reachable from infinity is a cavity that can be discarded. + std::size_t purge_inner_connected_components() + { +#ifdef CGAL_AW3_DEBUG + std::cout << "> Purge inner islands..." << std::endl; + + std::size_t pre_counter = 0; + for(Cell_handle ch : m_tr.all_cell_handles()) + if(ch->is_outside()) + ++pre_counter; + std::cout << pre_counter << " / " << m_tr.all_cell_handles().size() << " (pre purge)" << std::endl; +#endif + + std::size_t label_change_counter = 0; + + std::stack cells_to_visit; + + if(!m_seeds.empty()) + { + for(const Point_3& seed : m_seeds) + { + Locate_type lt; + int li, lj; + Cell_handle ch = m_tr.locate(seed, lt, li, lj); + + if(!ch->is_outside()) + { + std::cerr << "Warning: cell containing seed is not outside?!" << std::endl; + continue; + } + + cells_to_visit.push(ch); + } + } + else // typical flooding from outside + { + cells_to_visit.push(m_tr.infinite_vertex()->cell()); + } + + while(!cells_to_visit.empty()) + { + Cell_handle curr_c = cells_to_visit.top(); + cells_to_visit.pop(); + + CGAL_assertion(curr_c->is_outside()); + + if(curr_c->tds_data().processed()) + continue; + curr_c->tds_data().mark_processed(); + + for(int j=0; j<4; ++j) + { + Cell_handle neigh_c = curr_c->neighbor(j); + if(neigh_c->tds_data().processed() || !neigh_c->is_outside()) + continue; + + cells_to_visit.push(neigh_c); + } + } + + for(Cell_handle ch : m_tr.all_cell_handles()) + { + if(ch->tds_data().is_clear() && ch->is_outside()) + { + ch->set_label(Cell_label::INSIDE); +#ifndef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + ch->increment_erase_counter(); +#endif + ++label_change_counter; + } + } + + // reset the conflict flags + for(Cell_handle ch : m_tr.all_cell_handles()) + ch->tds_data().clear(); + +#ifdef CGAL_AW3_DEBUG + std::size_t post_counter = 0; + for(Cell_handle ch : m_tr.all_cell_handles()) + if(ch->is_outside()) + ++post_counter; + std::cout << post_counter << " / " << m_tr.all_cell_handles().size() << " (pre purge)" << std::endl; + + std::cout << label_change_counter << " label changes" << std::endl; +#endif + + return label_change_counter; } private: bool is_non_manifold(Vertex_handle v) const { - CGAL_precondition(!m_dt.is_infinite(v)); + CGAL_precondition(!m_tr.is_infinite(v)); bool is_non_manifold = false; std::vector inc_cells; inc_cells.reserve(64); - m_dt.incident_cells(v, std::back_inserter(inc_cells)); + m_tr.incident_cells(v, std::back_inserter(inc_cells)); - // Flood one inside and outside CC. + // Flood one inside and outside CC within the cell umbrella of the vertex. // Process both an inside and an outside CC to also detect edge pinching. // If there are still unprocessed afterwards, there is a non-manifoldness issue. // @@ -1233,10 +1529,10 @@ class Alpha_wrap_3 for(Cell_handle ic : inc_cells) { ic->tds_data().clear(); - if(ic->info().is_outside) + if(ic->is_outside()) outside_start = ic; else if(inside_start == Cell_handle()) - inside_start = ic; + inside_start = ic; // can be "inside" or "manifold" } // fully inside / outside @@ -1268,8 +1564,10 @@ class Alpha_wrap_3 CGAL_assertion(neigh_c->has_vertex(v)); if(neigh_c->tds_data().processed() || - neigh_c->info().is_outside != curr_c->info().is_outside) // do not cross the boundary + is_on_outside_boundary(neigh_c, curr_c)) // do not cross the boundary + { continue; + } cells_to_visit.push(neigh_c); } @@ -1293,7 +1591,7 @@ class Alpha_wrap_3 bool is_non_manifold(Cell_handle c) const { - CGAL_precondition(!m_dt.is_infinite(c)); + CGAL_precondition(!m_tr.is_infinite(c)); for(int i=0; i<4; ++i) { @@ -1309,7 +1607,7 @@ class Alpha_wrap_3 { // Not the best complexity, but it's not important: this function is purely for information // Better complexity --> see PMP::non_manifold_vertices + throw - for(const Vertex_handle v : m_dt.finite_vertex_handles()) + for(const Vertex_handle v : m_tr.finite_vertex_handles()) if(is_non_manifold(v)) return true; @@ -1322,18 +1620,18 @@ class Alpha_wrap_3 bool remove_bbox_vertices() { bool do_remove = true; - auto vit = m_dt.finite_vertices_begin(); + auto vit = m_tr.finite_vertices_begin(); for(std::size_t i=0; i<8; ++i) { Vertex_handle v = vit++; std::vector inc_cells; inc_cells.reserve(64); - m_dt.finite_incident_cells(v, std::back_inserter(inc_cells)); + m_tr.finite_incident_cells(v, std::back_inserter(inc_cells)); for(Cell_handle c : inc_cells) { - if(!c->info().is_outside) + if(!c->is_outside()) { do_remove = false; break; @@ -1348,140 +1646,169 @@ class Alpha_wrap_3 if(!do_remove) return false; - vit = m_dt.finite_vertices_begin(); + vit = m_tr.finite_vertices_begin(); for(std::size_t i=0; i<8; ++i) { Vertex_handle v = vit++; - m_dt.remove(v); + m_tr.remove(v); } return true; } +public: // Not the best complexity, but it's very cheap compared to the rest of the algorithm. void make_manifold() { - namespace PMP = Polygon_mesh_processing; +#ifdef CGAL_AW3_DEBUG + std::cout << "> Make manifold..." << std::endl; + + auto wrap_volume = [&]() + { + FT vol = 0; + for(Cell_handle ch : m_tr.finite_cell_handles()) + if(!ch->is_outside()) + vol += volume(m_tr.point(ch, 0), m_tr.point(ch, 1), m_tr.point(ch, 2), m_tr.point(ch, 3)); + + return vol; + }; - // This seems more harmful than useful after the priority queue has been introduced since - // it adds a lot of flat cells into the triangulation, which then get added to the mesh - // during manifoldness fixing. + #ifdef CGAL_AW3_DEBUG_DUMP_INTERMEDIATE_WRAPS + dump_triangulation_faces("carved_tr.off", true /*only_boundary_faces*/); + #endif + + FT base_vol = wrap_volume(); + if(!is_positive(base_vol)) + std::cerr << "Warning: wrap with non-positive volume?" << std::endl; +#endif + + // This ends up more harmful than useful after the priority queue has been introduced since + // it usually results in a lot of flat cells into the triangulation, which then get added + // to the mesh during manifoldness fixing. // remove_bbox_vertices(); std::stack non_manifold_vertices; // @todo sort somehow? - for(Vertex_handle v : m_dt.finite_vertex_handles()) + for(Vertex_handle v : m_tr.finite_vertex_handles()) { if(is_non_manifold(v)) + { +#ifdef CGAL_AW3_DEBUG_MANIFOLDNESS_PP + std::cout << v->point() << " is non-manifold" << std::endl; +#endif non_manifold_vertices.push(v); + } } // Some lambdas for the comparer - auto has_artificial_vertex = [](Cell_handle c) -> bool + auto has_scaffolding_vertex = [](Cell_handle c) -> bool { for(int i=0; i<4; ++i) - if(c->vertex(i)->info() == BBOX_VERTEX || c->vertex(i)->info() == SEED_VERTEX) + { + if(c->vertex(i)->type() == AW3i::Vertex_type:: BBOX_VERTEX || + c->vertex(i)->type() == AW3i::Vertex_type:: SEED_VERTEX) + { return true; + } + } return false; }; - auto is_on_boundary = [](Cell_handle c, int i) -> bool - { - return (c->info().is_outside != c->neighbor(i)->info().is_outside); - }; - - auto count_boundary_facets = [&](Cell_handle c, Vertex_handle v) -> int - { - const int v_index_in_c = c->index(v); - int boundary_facets = 0; - for(int i=0; i<3; ++i) // also take into account the opposite facet? - { - if(i == v_index_in_c) - continue; - - boundary_facets += is_on_boundary(c, i); - } - - return boundary_facets; - }; + // This originally seemed like a good idea, but in the end it can have strong cascading issues, + // whereas some cells with much smaller volume could have solved the non-manifoldness. +// auto is_on_boundary = [](Cell_handle c, int i) -> bool +// { +// return is_on_outside_boundary(c, c->neighbor(i)); +// }; +// +// auto count_boundary_facets = [&](Cell_handle c, Vertex_handle v) -> int +// { +// const int v_index_in_c = c->index(v); +// int boundary_facets = 0; +// for(int i=0; i<3; ++i) // also take into account the opposite facet? +// { +// if(i == v_index_in_c) +// continue; +// +// boundary_facets += is_on_boundary(c, i); +// } +// +// return boundary_facets; +// }; - // longest edge works better + // Experimentally, longest edge works better // auto sq_circumradius = [&](Cell_handle c) -> FT // { // const Point_3& cc = circumcenter(c); -// return geom_traits().compute_squared_distance_3_object()(m_dt.point(c, 0), cc); +// return geom_traits().compute_squared_distance_3_object()(m_tr.point(c, 0), cc); // }; + // The reasoning behind using longest edge rather than volume is that we want to avoid + // spikes (which would have a small volume), and can often happen since we do not spend + // any care on the quality of tetrahedra. auto sq_longest_edge = [&](Cell_handle c) -> FT { - return (std::max)({ squared_distance(m_dt.point(c, 0), m_dt.point(c, 1)), - squared_distance(m_dt.point(c, 0), m_dt.point(c, 2)), - squared_distance(m_dt.point(c, 0), m_dt.point(c, 3)), - squared_distance(m_dt.point(c, 1), m_dt.point(c, 2)), - squared_distance(m_dt.point(c, 3), m_dt.point(c, 3)), - squared_distance(m_dt.point(c, 2), m_dt.point(c, 3)) }); + return (std::max)({ squared_distance(m_tr.point(c, 0), m_tr.point(c, 1)), + squared_distance(m_tr.point(c, 0), m_tr.point(c, 2)), + squared_distance(m_tr.point(c, 0), m_tr.point(c, 3)), + squared_distance(m_tr.point(c, 1), m_tr.point(c, 2)), + squared_distance(m_tr.point(c, 1), m_tr.point(c, 3)), + squared_distance(m_tr.point(c, 2), m_tr.point(c, 3)) }); }; -#ifdef CGAL_AW3_DEBUG_MANIFOLDNESS +#ifdef CGAL_AW3_DEBUG_MANIFOLDNESS_PP std::cout << non_manifold_vertices.size() << " initial NMV" << std::endl; #endif while(!non_manifold_vertices.empty()) { -#ifdef CGAL_AW3_DEBUG_MANIFOLDNESS +#ifdef CGAL_AW3_DEBUG_MANIFOLDNESS_PP std::cout << non_manifold_vertices.size() << " NMV in queue" << std::endl; #endif Vertex_handle v = non_manifold_vertices.top(); non_manifold_vertices.pop(); -#ifdef CGAL_AW3_DEBUG_MANIFOLDNESS - std::cout << "·"; -#endif - if(!is_non_manifold(v)) continue; // Prioritize: // - cells without bbox vertices - // - cells that already have a large number of boundary facets // - small cells when equal number of boundary facets - // @todo give topmost priority to cells with > 1 non-manifold vertex? + // + // Note that these are properties that do not depend on the cell labels, and so we only need + // to sort once. However, if a criterion such as the number of incident inside cells were added, + // we would need to sort after each modification of "inside"/"outside" labels. auto comparer = [&](Cell_handle l, Cell_handle r) -> bool { - if(has_artificial_vertex(l)) - return false; - if(has_artificial_vertex(r)) - return true; + CGAL_precondition(!m_tr.is_infinite(l) && !m_tr.is_infinite(r)); - const int l_bf_count = count_boundary_facets(l, v); - const int r_bf_count = count_boundary_facets(r, v); - if(l_bf_count != r_bf_count) - return l_bf_count > r_bf_count; + if(has_scaffolding_vertex(l) != has_scaffolding_vertex(r)) + return has_scaffolding_vertex(r); return sq_longest_edge(l) < sq_longest_edge(r); }; std::vector inc_cells; inc_cells.reserve(64); - m_dt.finite_incident_cells(v, std::back_inserter(inc_cells)); + m_tr.finite_incident_cells(v, std::back_inserter(inc_cells)); -#define CGAL_AW3_USE_BRUTE_FORCE_MUTABLE_PRIORITY_QUEUE -#ifndef CGAL_AW3_USE_BRUTE_FORCE_MUTABLE_PRIORITY_QUEUE - std::sort(inc_cells.begin(), inc_cells.end(), comparer); // sort once -#endif + std::vector finite_outside_inc_cells; + finite_outside_inc_cells.reserve(64); + std::copy_if(inc_cells.begin(), inc_cells.end(), std::back_inserter(finite_outside_inc_cells), + [&](Cell_handle c) -> bool { return !m_tr.is_infinite(c) && c->is_outside(); }); - for(auto cit=inc_cells.begin(), cend=inc_cells.end(); cit!=cend; ++cit) + // 'std::stable_sort' to have determinism without having to write something like: + // if(longest_edge(l) == longest_edge(r)) return ... + // in the comparer. It's almost always a small range, so the extra cost does not matter. + std::stable_sort(finite_outside_inc_cells.begin(), finite_outside_inc_cells.end(), comparer); + + for(Cell_handle ic : finite_outside_inc_cells) { -#ifdef CGAL_AW3_USE_BRUTE_FORCE_MUTABLE_PRIORITY_QUEUE - // sort at every iteration since the number of boundary facets evolves - std::sort(cit, cend, comparer); -#endif - Cell_handle ic = *cit; - CGAL_assertion(!m_dt.is_infinite(ic)); + CGAL_assertion(!m_tr.is_infinite(ic) && ic->is_outside()); // This is where new material is added - ic->info().is_outside = false; + ic->set_label(Cell_label::MANIFOLD); #ifdef CGAL_AW3_DEBUG_DUMP_EVERY_STEP static int i = 0; @@ -1496,23 +1823,47 @@ class Alpha_wrap_3 CGAL_assertion(!is_non_manifold(v)); + // Check if the new material has not created a non-manifold configuration. + // @speed this could be done on only the vertices of cells whose labels have changed. std::vector adj_vertices; adj_vertices.reserve(64); - m_dt.finite_adjacent_vertices(v, std::back_inserter(adj_vertices)); + m_tr.finite_adjacent_vertices(v, std::back_inserter(adj_vertices)); for(Vertex_handle nv : adj_vertices) if(is_non_manifold(nv)) non_manifold_vertices.push(nv); } - CGAL_assertion_code(for(Vertex_handle v : m_dt.finite_vertex_handles())) + CGAL_assertion_code(for(Vertex_handle v : m_tr.finite_vertex_handles())) CGAL_assertion(!is_non_manifold(v)); + +#ifdef CGAL_AW3_DEBUG + std::size_t nm_cells_counter = 0; + for(Cell_handle ch : m_tr.all_cell_handles()) + if(ch->label() == Cell_label::MANIFOLD) + ++nm_cells_counter; + std::cout << "Number of added cells: " << nm_cells_counter << std::endl; + + if(!is_zero(base_vol)) + { + const FT manifold_vol = wrap_volume(); + const FT ratio = manifold_vol / base_vol; + + std::cout << "Volumes post-manifoldness fix:\n" + << "before: " << base_vol << "\n" + << "after: " << manifold_vol << "\n" + << "ratio: " << ratio << std::endl; + if(ratio > 1.1) // more than 10% extra volume + std::cerr << "Warning: large increase of volume after manifoldness resolution" << std::endl; + } +#endif } private: void check_queue_sanity() { - std::cout << "Check queue sanity..." << std::endl; + std::cout << "\t~~~ Check queue sanity ~~~" << std::endl; + std::vector queue_gates; Gate previous_top_gate = m_queue.top(); while(!m_queue.empty()) @@ -1522,24 +1873,31 @@ class Alpha_wrap_3 const Facet& current_f = current_gate.facet(); const Cell_handle ch = current_f.first; const int id = current_f.second; - const Point_3& p0 = m_dt.point(ch, (id+1)&3); - const Point_3& p1 = m_dt.point(ch, (id+2)&3); - const Point_3& p2 = m_dt.point(ch, (id+3)&3); - const FT sqr = geom_traits().compute_squared_radius_3_object()(p0, p1, p2); + const Point_3& p0 = m_tr.point(ch, Triangulation::vertex_triple_index(id, 0)); + const Point_3& p1 = m_tr.point(ch, Triangulation::vertex_triple_index(id, 1)); + const Point_3& p2 = m_tr.point(ch, Triangulation::vertex_triple_index(id, 2)); - std::cout << "At Facet with VID " << get(Gate_ID_PM
(), current_gate) << std::endl; + std::cout << "Facet with VID " << get(Gate_ID_PM(), current_gate) << "\n"; + std::cout << "\t" << p0 << "\n\t" << p1 << "\n\t" << p2 << "\n"; - if(current_gate.priority() != sqr) - std::cerr << "Error: facet in queue has wrong priority" << std::endl; +#ifdef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + std::cout << " Permissiveness: " << current_gate.is_permissive_facet() << "\n"; + std::cout << " SQR: " << geom_traits().compute_squared_radius_3_object()(p0, p1, p2) << "\n"; + std::cout << " Priority " << current_gate.priority() << std::endl; if(Less_gate()(current_gate, previous_top_gate)) std::cerr << "Error: current gate has higher priority than the previous top" << std::endl; previous_top_gate = current_gate; +#else + if(current_gate.is_zombie()) + std::cout << "Gate is a zombie!" << std::endl; +#endif m_queue.pop(); } - std::cout << "End sanity check" << std::endl; + + std::cout << "\t~~~ End queue sanity check ~~~" << std::endl; // Rebuild CGAL_assertion(m_queue.empty()); @@ -1560,23 +1918,23 @@ class Alpha_wrap_3 std::size_t nv = 0; std::size_t nf = 0; - for(auto fit=m_dt.finite_facets_begin(), fend=m_dt.finite_facets_end(); fit!=fend; ++fit) + for(auto fit=m_tr.finite_facets_begin(), fend=m_tr.finite_facets_end(); fit!=fend; ++fit) { - Cell_handle c = fit->first; + Cell_handle ch = fit->first; int s = fit->second; - Cell_handle nc = c->neighbor(s); - if(only_boundary_faces && (c->info().is_outside == nc->info().is_outside)) + Cell_handle nh = ch->neighbor(s); + if(only_boundary_faces && ch->label() == nh->label()) continue; std::array ids; for(std::size_t pos=0; pos<3; ++pos) { - Vertex_handle v = c->vertex((s+pos+1)&3); + Vertex_handle v = ch->vertex((s+pos+1)&3); auto insertion_res = vertex_to_id.emplace(v, nv); if(insertion_res.second) { - vertices_ss << m_dt.point(v) << "\n"; + vertices_ss << m_tr.point(v) << "\n"; ++nv; } diff --git a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h new file mode 100644 index 00000000..71a5935c --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h @@ -0,0 +1,298 @@ +// Copyright (c) 2019-2022 Google LLC (USA). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h $ +// $Id: include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Pierre Alliez +// Cedric Portaneri, +// Mael Rouxel-Labbé +// Andreas Fabri +// Michael Hemmer +// +#ifndef CGAL_ALPHA_WRAP_3_INTERNAL_ALPHA_WRAP_AABB_GEOM_TRAITS_H +#define CGAL_ALPHA_WRAP_3_INTERNAL_ALPHA_WRAP_AABB_GEOM_TRAITS_H + +#include + +#include + +#include +#include +#include + +namespace CGAL { +namespace Alpha_wraps_3 { +namespace internal { + +template +struct Tetrahedron_with_outside_info +{ + using Kernel = K; + using Tetrahedron_3 = typename Kernel::Tetrahedron_3; + using Triangle_3 = typename Kernel::Triangle_3; + + template + Tetrahedron_with_outside_info(const CellHandle c, const K& k) + { + typename K::Construct_bbox_3 bbox = k.construct_bbox_3_object(); + typename K::Construct_tetrahedron_3 tetrahedron = k.construct_tetrahedron_3_object(); + typename K::Construct_triangle_3 triangle = k.construct_triangle_3_object(); + + m_tet = tetrahedron(c->vertex(0)->point(), c->vertex(1)->point(), + c->vertex(2)->point(), c->vertex(3)->point()); + m_bbox = bbox(m_tet); + + for(int i=0; i<4; ++i) + { + if(c->neighbor(i)->is_outside()) + m_b.set(i, true); + + m_triangles[i] = triangle(c->vertex((i+1)& 3)->point(), + c->vertex((i+2)& 3)->point(), + c->vertex((i+3)& 3)->point()); + m_tbox[i] = bbox(m_triangles[i]); + } + } + + Tetrahedron_with_outside_info& operator=(const Tetrahedron_with_outside_info& rhs) = default; + + friend std::ostream& operator<<(std::ostream& os, const Tetrahedron_with_outside_info& t) + { + os << t.m_tet; + return os; + } + + Tetrahedron_3 m_tet; + Bbox_3 m_bbox; + std::array m_tbox; + std::array m_triangles; + std::bitset<4> m_b; +}; + +template +class Ball_3 + : private K::Sphere_3 +{ + using FT = typename K::FT; + using Point_3 = typename K::Point_3; + using Sphere_3 = typename K::Sphere_3; + +public: + explicit Ball_3(const Sphere_3& s) : Sphere_3(s) { } + +public: + const Sphere_3& boundary() const { return static_cast(*this); } +}; + +template +class Alpha_wrap_AABB_geom_traits + : public GT +{ +public: + using Ball_3 = internal::Ball_3; + +public: + Alpha_wrap_AABB_geom_traits(const GT& gt = GT()) : GT(gt) { } + +public: + class Construct_ball_3 + { + using FT = typename GT::FT; + using Point_3 = typename GT::Point_3; + using Ball_3 = internal::Ball_3; + + const GT& m_base_traits; + +public: + Construct_ball_3(const GT& base_traits) : m_base_traits(base_traits) { } + + Ball_3 operator()(const Point_3& p, const FT sqr) + { + return Ball_3(m_base_traits.construct_sphere_3_object()(p, sqr)); + } + }; + + // Enrich the base's Do_intersect_3 with Tetrahedron_with_outside_info and Ball_3 overloads + class Do_intersect_3 + : public GT::Do_intersect_3 + { + using Base = typename GT::Do_intersect_3; + + using Point_3 = typename GT::Point_3; + using Segment_3 = typename GT::Segment_3; + using Triangle_3 = typename GT::Triangle_3; + using Ball_3 = internal::Ball_3; + + const GT& m_base_traits; + +public: + Do_intersect_3(const GT& base_traits) + : Base(base_traits.do_intersect_3_object()), + m_base_traits(base_traits) + { } + + using Base::operator(); + + // ====== + // Ball_3 + + bool operator()(const Ball_3& ball, + const Point_3& p) const + { + return !m_base_traits.has_on_unbounded_side_3_object()(ball.boundary(), p); + } + + bool operator()(const Ball_3& ball, + const Segment_3& s) const + { + typename GT::Construct_bbox_3 bbox = m_base_traits.construct_bbox_3_object(); + typename GT::Construct_vertex_3 vertex = m_base_traits.construct_vertex_3_object(); + typename GT::Has_on_bounded_side_3 has_on_bounded_side = m_base_traits.has_on_bounded_side_3_object(); + + if(!do_overlap(bbox(ball.boundary()), bbox(s))) + return false; + + if(Base::operator()(ball.boundary(), s)) + return true; + + return has_on_bounded_side(ball.boundary(), vertex(s, 0)); + } + + bool operator()(const Ball_3& ball, + const Triangle_3& tr) const + { + typename GT::Construct_bbox_3 bbox = m_base_traits.construct_bbox_3_object(); + typename GT::Construct_vertex_3 vertex = m_base_traits.construct_vertex_3_object(); + typename GT::Has_on_bounded_side_3 has_on_bounded_side = m_base_traits.has_on_bounded_side_3_object(); + + if(!do_overlap(bbox(ball.boundary()), bbox(tr))) + return false; + + if(Base::operator()(ball.boundary(), tr)) + return true; + + return has_on_bounded_side(ball.boundary(), vertex(tr, 0)); + } + + bool operator()(const Ball_3& ball, + const CGAL::Bbox_3& bb) const + { + typename GT::Construct_bbox_3 bbox = m_base_traits.construct_bbox_3_object(); + typename GT::Construct_point_3 point = m_base_traits.construct_point_3_object(); + typename GT::Has_on_bounded_side_3 has_on_bounded_side = m_base_traits.has_on_bounded_side_3_object(); + + if(!do_overlap(bbox(ball.boundary()), bb)) + return false; + + if(Base::operator()(ball.boundary(), bb)) + return true; + + const Point_3 bbp = point(bb.xmin(), bb.ymin(), bb.zmin()); + + return has_on_bounded_side(ball.boundary(), bbp); + } + + // ====== + // Tetrahedron_with_outside_info + + template + bool operator()(const Tetrahedron_with_outside_info& q, + const Point_3& p) const + { + typename GT::Construct_bbox_3 bbox = m_base_traits.construct_bbox_3_object(); + + const CGAL::Bbox_3 pbox = bbox(p); + if(!do_overlap(q.m_bbox, pbox)) + return false; + + for(int i=0; i<4; ++i) + { + if(!q.m_b.test(i) && do_overlap(q.m_tbox[i], pbox) && Base::operator()(q.m_triangles[i], p)) + return true; + } + + return m_base_traits.has_on_bounded_side_3_object()(q.m_tet, p); + } + + template + bool operator()(const Tetrahedron_with_outside_info& q, + const Segment_3& s) const + { + typename GT::Construct_bbox_3 bbox = m_base_traits.construct_bbox_3_object(); + typename GT::Construct_vertex_3 vertex = m_base_traits.construct_vertex_3_object(); + + const CGAL::Bbox_3 sbox = bbox(s); + if(!do_overlap(q.m_bbox, sbox)) + return false; + + for(int i=0; i<4; ++i) + { + if(!q.m_b.test(i) && do_overlap(q.m_tbox[i], sbox) && Base::operator()(q.m_triangles[i], s)) + return true; + } + + return m_base_traits.has_on_bounded_side_3_object()(q.m_tet, vertex(s, 0)); + } + + template + bool operator()(const Tetrahedron_with_outside_info& q, + const Triangle_3& tr) const + { + typename GT::Construct_bbox_3 bbox = m_base_traits.construct_bbox_3_object(); + typename GT::Construct_vertex_3 vertex = m_base_traits.construct_vertex_3_object(); + + const CGAL::Bbox_3 tbox = bbox(tr); + if(!do_overlap(q.m_bbox, tbox)) + return false; + + for(int i=0; i<4; ++i) + { + if(!q.m_b.test(i) && do_overlap(q.m_tbox[i], tbox) && Base::operator()(q.m_triangles[i], tr)) + return true; + } + + return m_base_traits.has_on_bounded_side_3_object()(q.m_tet, vertex(tr, 0)); + } + + template + bool operator()(const Tetrahedron_with_outside_info& q, + const CGAL::Bbox_3& bb) const + { + if(!do_overlap(q.m_bbox, bb)) + return false; + + for(int i=0; i<4; ++i) + { + // this overload of do_intersect() must not filter based on q.m_b because + // it is called from the AABB_tree's traversal with a node's bounding box, + // and the fact that a facet is incident to an outside cell is irrelevant + // for the hierarchy of bounding boxes of the primitives. + if(do_overlap(q.m_tbox[i], bb) && Base::operator()(q.m_triangles[i], bb)) + return true; + } + + const Point_3 bbp = m_base_traits.construct_point_3_object()(bb.xmin(), bb.ymin(), bb.zmin()); + return m_base_traits.has_on_bounded_side_3_object()(q.m_tet, bbp); + } + }; + + Construct_ball_3 construct_ball_3_object() const + { + return Construct_ball_3(static_cast(*this)); + } + + Do_intersect_3 do_intersect_3_object() const + { + return Do_intersect_3(static_cast(*this)); + } +}; + +} // namespace internal +} // namespace Alpha_wraps_3 +} // namespace CGAL + +#endif // CGAL_ALPHA_WRAP_3_INTERNAL_ALPHA_WRAP_AABB_GEOM_TRAITS_H diff --git a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_triangulation_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_triangulation_cell_base_3.h new file mode 100644 index 00000000..2d92d4cb --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_triangulation_cell_base_3.h @@ -0,0 +1,131 @@ +// Copyright (c) 2019-2023 Google LLC (USA). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_triangulation_cell_base_3.h $ +// $Id: include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_triangulation_cell_base_3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Mael Rouxel-Labbé + +#ifndef CGAL_ALPHA_WRAP_TRIANGULATION_CELL_BASE_3_H +#define CGAL_ALPHA_WRAP_TRIANGULATION_CELL_BASE_3_H + +#include + +#include + +namespace CGAL { +namespace Alpha_wraps_3 { +namespace internal { + +enum class Cell_label +{ + // Cells that have been carved + OUTSIDE, + // Cells that have not yet been carved + INSIDE, + // OUTSIDE cells that have been labeled "inside" again as to make the result manifold + MANIFOLD +}; + +template < typename GT, + typename Cb = CGAL::Delaunay_triangulation_cell_base_with_circumcenter_3 > +class Alpha_wrap_triangulation_cell_base_3 + : public Cb +{ +public: + typedef typename Cb::Vertex_handle Vertex_handle; + typedef typename Cb::Cell_handle Cell_handle; + +public: + template < typename TDS2 > + struct Rebind_TDS + { + using Cb2 = typename Cb::template Rebind_TDS::Other; + using Other = Alpha_wrap_triangulation_cell_base_3; + }; + +private: + Cell_label m_label = Cell_label::INSIDE; + +#ifndef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + unsigned int m_erase_counter; +#endif + +public: + Alpha_wrap_triangulation_cell_base_3() + : Cb() + {} + + Alpha_wrap_triangulation_cell_base_3(Vertex_handle v0, Vertex_handle v1, + Vertex_handle v2, Vertex_handle v3) + : Cb(v0, v1, v2, v3) + {} + + Alpha_wrap_triangulation_cell_base_3(Vertex_handle v0, Vertex_handle v1, + Vertex_handle v2, Vertex_handle v3, + Cell_handle n0, Cell_handle n1, + Cell_handle n2, Cell_handle n3) + : Cb(v0, v1, v2, v3, n0, n1, n2, n3) + {} + +public: + Cell_label label() const { return m_label; } + void set_label(const Cell_label label) { m_label = label; } + bool is_inside() const { return m_label == Cell_label::INSIDE; } + bool is_outside() const { return m_label == Cell_label::OUTSIDE; } + +#ifndef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + unsigned int erase_counter() const + { + return m_erase_counter; + } + void set_erase_counter(unsigned int c) + { + m_erase_counter = c; + } + void increment_erase_counter() + { + ++m_erase_counter; + } +#endif +}; + +template +class Cell_base_with_timestamp + : public Cb +{ + std::size_t time_stamp_; + +public: + using Has_timestamp = CGAL::Tag_true; + + template + struct Rebind_TDS + { + using Cb2 = typename Cb::template Rebind_TDS::Other; + using Other = Cell_base_with_timestamp; + }; + +public: + template + Cell_base_with_timestamp(const Args&... args) + : Cb(args...), time_stamp_(-1) + { } + + Cell_base_with_timestamp(const Cell_base_with_timestamp& other) + : Cb(other), time_stamp_(other.time_stamp_) + { } + +public: + std::size_t time_stamp() const { return time_stamp_; } + void set_time_stamp(const std::size_t& ts) { time_stamp_ = ts; } +}; + +} // namespace internal +} // namespace Alpha_wraps_3 +} // namespace CGAL + +#endif // CGAL_ALPHA_WRAP_TRIANGULATION_CELL_BASE_3_H diff --git a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_triangulation_vertex_base_3.h b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_triangulation_vertex_base_3.h new file mode 100644 index 00000000..b2b127fe --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_triangulation_vertex_base_3.h @@ -0,0 +1,71 @@ +// Copyright (c) 2019-2023 Google LLC (USA). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_triangulation_vertex_base_3.h $ +// $Id: include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_triangulation_vertex_base_3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Mael Rouxel-Labbé + +#ifndef CGAL_ALPHA_WRAP_TRIANGULATION_VERTEX_BASE_3_H +#define CGAL_ALPHA_WRAP_TRIANGULATION_VERTEX_BASE_3_H + +#include + +#include + +namespace CGAL { +namespace Alpha_wraps_3 { +namespace internal { + +enum class Vertex_type +{ + DEFAULT = 0, + BBOX_VERTEX, + SEED_VERTEX +}; + +template > +class Alpha_wrap_triangulation_vertex_base_3 + : public Vb +{ +private: + Vertex_type vertex_type = Vertex_type::DEFAULT; + +public: + using Cell_handle = typename Vb::Cell_handle; + using Point = typename Vb::Point; + + template + struct Rebind_TDS + { + using Vb2 = typename Vb::template Rebind_TDS::Other; + using Other = Alpha_wrap_triangulation_vertex_base_3; + }; + +public: + Alpha_wrap_triangulation_vertex_base_3() + : Vb() {} + + Alpha_wrap_triangulation_vertex_base_3(const Point& p) + : Vb(p) {} + + Alpha_wrap_triangulation_vertex_base_3(const Point& p, Cell_handle c) + : Vb(p, c) {} + + Alpha_wrap_triangulation_vertex_base_3(Cell_handle c) + : Vb(c) {} + +public: + const Vertex_type& type() const { return vertex_type; } + Vertex_type& type() { return vertex_type; } +}; + +} // namespace internal +} // namespace Alpha_wraps_3 +} // namespace CGAL + +#endif // CGAL_ALPHA_WRAP_TRIANGULATION_VERTEX_BASE_3_H diff --git a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Oracle_base.h b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Oracle_base.h index 20b1291e..db83ea97 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Oracle_base.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Oracle_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Oracle_base.h $ -// $Id: Oracle_base.h 06053d2 2022-05-24T10:02:57+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Oracle_base.h $ +// $Id: include/CGAL/Alpha_wrap_3/internal/Oracle_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -145,6 +145,8 @@ class AABB_tree_oracle bool empty() const { return m_tree_ptr->empty(); } bool do_call() const { return (!empty() || base().do_call()); } + void clear() { m_tree_ptr->clear() && base().clear(); } + public: typename AABB_tree::Bounding_box bbox() const { @@ -313,11 +315,12 @@ class AABB_tree_oracle bool empty() const { return m_tree_ptr->empty(); } bool do_call() const { return !empty(); } + void clear() { m_tree_ptr->clear(); } + public: typename AABB_tree::Bounding_box bbox() const { CGAL_precondition(!empty()); - return tree().bbox(); } diff --git a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Point_set_oracle.h b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Point_set_oracle.h index ddb2518c..e433b151 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Point_set_oracle.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Point_set_oracle.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Point_set_oracle.h $ -// $Id: Point_set_oracle.h 9fbfd9a 2022-05-24T10:08:56+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Point_set_oracle.h $ +// $Id: include/CGAL/Alpha_wrap_3/internal/Point_set_oracle.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -14,7 +14,7 @@ #include -#include +#include #include #include @@ -28,6 +28,7 @@ #include #include #include +#include #include namespace CGAL { @@ -38,9 +39,10 @@ namespace internal { template struct PS_oracle_traits { - using Geom_traits = Alpha_wrap_AABB_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3 + using Geom_traits = Alpha_wrap_AABB_geom_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3 using Points = std::vector; + using Points_ptr = std::shared_ptr; using PR_iterator = typename Points::const_iterator; using Primitive = AABB_primitive; private: - Points m_points; + Points_ptr m_points_ptr; public: // Constructors - Point_set_oracle() - : Oracle_base(BaseOracle(), Base_GT()) - { } - Point_set_oracle(const BaseOracle& base_oracle, const Base_GT& gt = Base_GT()) : Oracle_base(base_oracle, gt) - { } + { + m_points_ptr = std::make_shared(); + } Point_set_oracle(const Base_GT& gt, const BaseOracle& base_oracle = BaseOracle()) - : Oracle_base(base_oracle, gt) + : Point_set_oracle(base_oracle, gt) + { } + + Point_set_oracle() + : Point_set_oracle(BaseOracle(), Base_GT()) { } public: @@ -101,21 +106,27 @@ class Point_set_oracle if(points.empty()) { #ifdef CGAL_AW3_DEBUG - std::cout << "Warning: Input is empty " << std::endl; + std::cout << "Warning: Input is empty (PS)" << std::endl; #endif return; } - const std::size_t old_size = m_points.size(); - m_points.insert(std::cend(m_points), std::cbegin(points), std::cend(points)); + const std::size_t old_size = m_points_ptr->size(); + m_points_ptr->insert(std::cend(*m_points_ptr), std::cbegin(points), std::cend(points)); #ifdef CGAL_AW3_DEBUG std::cout << "Insert into AABB tree (points)..." << std::endl; #endif - this->tree().insert(std::next(std::cbegin(m_points), old_size), std::cend(m_points)); + this->tree().insert(std::next(std::cbegin(*m_points_ptr), old_size), std::cend(*m_points_ptr)); + + // Manually constructing it here purely for profiling reasons: if we keep the lazy approach, + // it will be done at the first treatment of a facet that needs a Steiner point. + // So if one wanted to bench the flood fill runtime, it would be skewed by the time it takes + // to accelerate the tree. + this->tree().accelerate_distance_queries(); - CGAL_postcondition(this->tree().size() == m_points.size()); + CGAL_postcondition(this->tree().size() == m_points_ptr->size()); } }; diff --git a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Segment_soup_oracle.h b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Segment_soup_oracle.h index 079505de..d1e9f099 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Segment_soup_oracle.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Segment_soup_oracle.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Segment_soup_oracle.h $ -// $Id: Segment_soup_oracle.h 9fbfd9a 2022-05-24T10:08:56+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Segment_soup_oracle.h $ +// $Id: include/CGAL/Alpha_wrap_3/internal/Segment_soup_oracle.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -14,7 +14,7 @@ #include -#include +#include #include #include @@ -28,6 +28,7 @@ #include #include #include +#include #include namespace CGAL { @@ -38,9 +39,11 @@ namespace internal { template struct SS_oracle_traits { - using Geom_traits = Alpha_wrap_AABB_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3 + using Geom_traits = Alpha_wrap_AABB_geom_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3 - using Segments = std::vector; + using Segment = typename GT_::Segment_3; + using Segments = std::vector; + using Segments_ptr = std::shared_ptr; using SR_iterator = typename Segments::const_iterator; using Primitive = AABB_primitive; private: - Segments m_segments; + Segments_ptr m_segments_ptr; public: // Constructors - Segment_soup_oracle() - : Oracle_base(BaseOracle(), Base_GT()) - { } - Segment_soup_oracle(const BaseOracle& base_oracle, const Base_GT& gt = Base_GT()) : Oracle_base(base_oracle, gt) - { } + { + m_segments_ptr = std::make_shared(); + } Segment_soup_oracle(const Base_GT& gt, const BaseOracle& base_oracle = BaseOracle()) - : Oracle_base(base_oracle, gt) + : Segment_soup_oracle(base_oracle, gt) + { } + + Segment_soup_oracle() + : Segment_soup_oracle(BaseOracle(), Base_GT()) { } public: @@ -100,20 +107,40 @@ class Segment_soup_oracle if(segments.empty()) { #ifdef CGAL_AW3_DEBUG - std::cout << "Warning: Input is empty " << std::endl; + std::cout << "Warning: Input is empty (SS)" << std::endl; #endif return; } - const std::size_t old_size = m_segments.size(); - m_segments.insert(std::cend(m_segments), std::cbegin(segments), std::cend(segments)); + typename Geom_traits::Is_degenerate_3 is_degenerate = this->geom_traits().is_degenerate_3_object(); + + const std::size_t old_size = m_segments_ptr->size(); + + for(const Segment& s : segments) + { + if(is_degenerate(s)) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Warning: ignoring degenerate segment " << s << std::endl; +#endif + continue; + } + + m_segments_ptr->push_back(s); + } #ifdef CGAL_AW3_DEBUG std::cout << "Insert into AABB tree (segments)..." << std::endl; #endif - this->tree().insert(std::next(std::cbegin(m_segments), old_size), std::cend(m_segments)); + this->tree().insert(std::next(std::cbegin(*m_segments_ptr), old_size), std::cend(*m_segments_ptr)); + + // Manually constructing it here purely for profiling reasons: if we keep the lazy approach, + // it will be done at the first treatment of a facet that needs a Steiner point. + // So if one wanted to bench the flood fill runtime, it would be skewed by the time it takes + // to accelerate the tree. + this->tree().accelerate_distance_queries(); - CGAL_postcondition(this->tree().size() == m_segments.size()); + CGAL_postcondition(this->tree().size() == m_segments_ptr->size()); } }; diff --git a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h index 8563e8db..7b592056 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h $ -// $Id: Triangle_mesh_oracle.h 9fbfd9a 2022-05-24T10:08:56+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h $ +// $Id: include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -14,7 +14,7 @@ #include -#include +#include #include #include @@ -29,6 +29,8 @@ #include #include +#include + namespace CGAL { namespace Alpha_wraps_3 { namespace internal { @@ -37,7 +39,7 @@ namespace internal { template struct TM_oracle_traits { - using Geom_traits = Alpha_wrap_AABB_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3 + using Geom_traits = Alpha_wrap_AABB_geom_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3 using Point_3 = typename Geom_traits::Point_3; using AABB_traits = typename AABB_tree_splitter_traits::AABB_traits; @@ -135,7 +137,7 @@ class Triangle_mesh_oracle if(is_empty(tmesh)) { #ifdef CGAL_AW3_DEBUG - std::cout << "Warning: Input is empty " << std::endl; + std::cout << "Warning: Input is empty (TM)" << std::endl; #endif return; } @@ -146,14 +148,21 @@ class Triangle_mesh_oracle VPM vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(vertex_point, tmesh)); - CGAL_static_assertion((std::is_same::value_type, Point_3>::value)); + static_assert(std::is_same::value_type, Point_3>::value); Splitter_base::reserve(num_faces(tmesh)); + std::cout << " preparing triangle data structure for wrapping..." << std::endl; + CGAL::IO::Progress_bar progress_bar(faces(tmesh).size(), 100); for(face_descriptor f : faces(tmesh)) { if(Polygon_mesh_processing::is_degenerate_triangle_face(f, tmesh, np)) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Warning: ignoring degenerate face " << f << std::endl; +#endif continue; + } const Point_ref p0 = get(vpm, source(halfedge(f, tmesh), tmesh)); const Point_ref p1 = get(vpm, target(halfedge(f, tmesh), tmesh)); @@ -162,7 +171,16 @@ class Triangle_mesh_oracle const Triangle_3 tr = this->geom_traits().construct_triangle_3_object()(p0, p1, p2); Splitter_base::split_and_insert_datum(tr, this->tree(), this->geom_traits()); + + progress_bar.increment_and_print(); } + progress_bar.finish(); + + // Manually constructing it here purely for profiling reasons: if we keep the lazy approach, + // it will be done at the first treatment of a facet that needs a Steiner point. + // So if one wanted to bench the flood fill runtime, it would be skewed by the time it takes + // to accelerate the tree. + this->tree().accelerate_distance_queries(); #ifdef CGAL_AW3_DEBUG std::cout << "Tree: " << this->tree().size() << " primitives (" << num_faces(tmesh) << " faces in input)" << std::endl; diff --git a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h index 79fc360c..e329c71e 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h $ -// $Id: Triangle_soup_oracle.h 964bcd8 2022-05-25T09:37:37+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h $ +// $Id: include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -14,7 +14,7 @@ #include -#include +#include #include #include @@ -38,7 +38,7 @@ namespace internal { template struct TS_oracle_traits { - using Geom_traits = Alpha_wrap_AABB_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3 + using Geom_traits = Alpha_wrap_AABB_geom_traits; // Wrap the kernel to add Ball_3 + custom Do_intersect_3 using Point_3 = typename Geom_traits::Point_3; using AABB_traits = typename AABB_tree_splitter_traits::AABB_traits; using AABB_tree = typename AABB_tree_splitter_traits::AABB_tree; @@ -133,7 +133,7 @@ class Triangle_soup_oracle if(points.empty() || faces.empty()) { #ifdef CGAL_AW3_DEBUG - std::cout << "Warning: Input is empty " << std::endl; + std::cout << "Warning: Input is empty (TS)" << std::endl; #endif return; } @@ -143,7 +143,7 @@ class Triangle_soup_oracle #endif PPM pm = choose_parameter(get_parameter(np, internal_np::point_map)); - CGAL_static_assertion((std::is_same::value_type, Point_3>::value)); + static_assert(std::is_same::value_type, Point_3>::value); Splitter_base::reserve(faces.size()); @@ -164,11 +164,22 @@ class Triangle_soup_oracle const Triangle_3 tr = triangle(p0, p1, p2); if(is_degenerate(tr)) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Warning: ignoring degenerate face " << tr << std::endl; +#endif continue; + } Splitter_base::split_and_insert_datum(tr, this->tree(), this->geom_traits()); } + // Manually constructing it here purely for profiling reasons: if we keep the lazy approach, + // it will be done at the first treatment of a facet that needs a Steiner point. + // So if one wanted to bench the flood fill runtime, it would be skewed by the time it takes + // to accelerate the tree. + this->tree().accelerate_distance_queries(); + #ifdef CGAL_AW3_DEBUG std::cout << "Tree: " << this->tree().size() << " primitives (" << faces.size() << " faces in input)" << std::endl; #endif @@ -179,12 +190,31 @@ class Triangle_soup_oracle void add_triangle_soup(const TriangleRange& triangles, const CGAL_NP_CLASS& /*np*/ = CGAL::parameters::default_values()) { + if(triangles.empty()) + { +#ifdef CGAL_AW3_DEBUG + std::cout << "Warning: Input is empty (TS)" << std::endl; +#endif + return; + } + +#ifdef CGAL_AW3_DEBUG + std::cout << "Insert into AABB Tree (triangles)..." << std::endl; +#endif + typename Geom_traits::Is_degenerate_3 is_degenerate = this->geom_traits().is_degenerate_3_object(); + Splitter_base::reserve(triangles.size()); + for(const Triangle_3& tr : triangles) { if(is_degenerate(tr)) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Warning: ignoring degenerate triangle " << tr << std::endl; +#endif continue; + } Splitter_base::split_and_insert_datum(tr, this->tree(), this->geom_traits()); } diff --git a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/gate_priority_queue.h b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/gate_priority_queue.h index 7ee4bd3d..35163353 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/gate_priority_queue.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/gate_priority_queue.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/gate_priority_queue.h $ -// $Id: gate_priority_queue.h 57cf9e0 2022-04-19T14:55:15+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/gate_priority_queue.h $ +// $Id: include/CGAL/Alpha_wrap_3/internal/gate_priority_queue.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez @@ -27,27 +27,29 @@ namespace CGAL { namespace Alpha_wraps_3 { namespace internal { +#ifdef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + // Represents an alpha-traversable facet in the mutable priority queue -template +template class Gate { - using Facet = typename DT3::Facet; - using FT = typename DT3::Geom_traits::FT; + using Facet = typename Tr::Facet; + using FT = typename Tr::Geom_traits::FT; private: Facet m_facet; FT m_priority; // circumsphere sq_radius - bool m_is_artificial_facet; + bool m_is_permissive_facet; public: // Constructors Gate(const Facet& facet, const FT& priority, - const bool is_artificial_facet) + const bool is_permissive_facet) : m_facet(facet), m_priority(priority), - m_is_artificial_facet(is_artificial_facet) + m_is_permissive_facet(is_permissive_facet) { CGAL_assertion(priority >= 0); } @@ -60,34 +62,85 @@ class Gate public: const Facet& facet() const { return m_facet; } const FT& priority() const { return m_priority; } - bool is_artificial_facet() const { return m_is_artificial_facet; } + bool is_permissive_facet() const { return m_is_permissive_facet; } }; struct Less_gate { - template - bool operator()(const Gate& a, const Gate& b) const + template + bool operator()(const Gate& a, const Gate& b) const { - // @fixme? make it a total order by comparing addresses if both gates are bbox facets - if(a.is_artificial_facet()) - return true; - else if(b.is_artificial_facet()) - return false; + // If one is permissive and the other is not, give priority to the permissive facet. + // + // The permissive facet are given highest priority because they need to be treated + // regardless of their circumradius. Treating them first allow the part that depends + // on alpha to be treated uniformly in a way: whatever the alpha, all permissive faces + // will first be treated. + if(a.is_permissive_facet() != b.is_permissive_facet()) + return a.is_permissive_facet(); + + if(a.priority() == b.priority()) + { + // arbitrary, the sole purpose is to make it a total order for determinism + if(a.facet().first->time_stamp() == b.facet().first->time_stamp()) + return a.facet().second < b.facet().second; + + return a.facet().first->time_stamp() < b.facet().first->time_stamp(); + } + return a.priority() > b.priority(); } }; -template +#else // CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + +// Represents an alpha-traversable facet in the mutable priority queue +template +class Gate +{ + using Facet = typename Tr::Facet; + using FT = typename Tr::Geom_traits::FT; + +private: + Facet m_facet, m_mirror_facet; + const unsigned int m_erase_counter_mem; + const unsigned int m_mirror_erase_counter_mem; + +public: + // Constructors + Gate(const Facet& facet, + const Tr& tr) + : + m_facet(facet), + m_mirror_facet(tr.mirror_facet(facet)), + m_erase_counter_mem(m_facet.first->erase_counter()), + m_mirror_erase_counter_mem(m_mirror_facet.first->erase_counter()) + { + } + +public: + const Facet& facet() const { return m_facet; } + + bool is_zombie() const + { + return (m_facet.first->erase_counter() != m_erase_counter_mem) || + (m_mirror_facet.first->erase_counter() != m_mirror_erase_counter_mem); + } +}; + +#endif // CGAL_AW3_USE_SORTED_PRIORITY_QUEUE + +template struct Gate_ID_PM { - using key_type = Gate; + using key_type = Gate; using value_type = std::size_t; using reference = std::size_t; using category = boost::readable_property_map_tag; inline friend value_type get(Gate_ID_PM, const key_type& k) { - using Facet = typename DT3::Facet; + using Facet = typename Tr::Facet; const Facet& f = k.facet(); return (4 * f.first->time_stamp() + f.second); diff --git a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/geometry_utils.h b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/geometry_utils.h index 380f58f4..522fd831 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/geometry_utils.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/geometry_utils.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/geometry_utils.h $ -// $Id: geometry_utils.h 57cf9e0 2022-04-19T14:55:15+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/geometry_utils.h $ +// $Id: include/CGAL/Alpha_wrap_3/internal/geometry_utils.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez @@ -40,16 +40,16 @@ struct Orientation_of_circumcenter } }; -template +template bool -less_squared_radius_of_min_empty_sphere(typename Dt::Geom_traits::FT sq_alpha, - const typename Dt::Facet& fh, - const Dt& dt) +less_squared_radius_of_min_empty_sphere(typename Tr::Geom_traits::FT sq_alpha, + const typename Tr::Facet& fh, + const Tr& tr) { - using Cell_handle = typename Dt::Cell_handle; - using Point = typename Dt::Point; + using Cell_handle = typename Tr::Cell_handle; + using Point = typename Tr::Point; - using CK = typename Dt::Geom_traits; + using CK = typename Tr::Geom_traits; using Exact_kernel = typename Exact_kernel_selector::Exact_kernel; using Approximate_kernel = Simple_cartesian; using C2A = Cartesian_converter; @@ -61,21 +61,30 @@ less_squared_radius_of_min_empty_sphere(typename Dt::Geom_traits::FT sq_alpha, Orientation_of_circumcenter orientation_of_circumcenter; +#ifdef CGAL_AW3_DEBUG_TRAVERSABILITY + std::cout << "Checking for traversability of facet" << std::endl; +#endif + const Cell_handle c = fh.first; const int ic = fh.second; const Cell_handle n = c->neighbor(ic); - const Point& p1 = dt.point(c, Dt::vertex_triple_index(ic,0)); - const Point& p2 = dt.point(c, Dt::vertex_triple_index(ic,1)); - const Point& p3 = dt.point(c, Dt::vertex_triple_index(ic,2)); + const Point& p1 = tr.point(c, Tr::vertex_triple_index(ic,0)); + const Point& p2 = tr.point(c, Tr::vertex_triple_index(ic,1)); + const Point& p3 = tr.point(c, Tr::vertex_triple_index(ic,2)); // This is not actually possible in the context of alpha wrapping, but keeping it for genericity // and because it does not cost anything. - if(dt.is_infinite(n)) + if(tr.is_infinite(n)) { +#ifdef CGAL_AW3_DEBUG_TRAVERSABILITY + std::cerr << "Warning: computing less_squared_radius_of_min_empty_sphere() with an infinite neighbor?" << std::endl; +#endif + CGAL_assertion(!tr.is_infinite(c)); + Orientation ori = orientation_of_circumcenter(p1, p2, p3, - dt.point(c, 0), dt.point(c, 1), - dt.point(c, 2), dt.point(c, 3)); + tr.point(c, 0), tr.point(c, 1), + tr.point(c, 2), tr.point(c, 3)); if(ori == POSITIVE) { @@ -84,18 +93,22 @@ less_squared_radius_of_min_empty_sphere(typename Dt::Geom_traits::FT sq_alpha, } else { - Comparison_result cr = compare_squared_radius(dt.point(c, 0), dt.point(c, 1), - dt.point(c, 2), dt.point(c, 3), + Comparison_result cr = compare_squared_radius(tr.point(c, 0), tr.point(c, 1), + tr.point(c, 2), tr.point(c, 3), sq_alpha); return cr == LARGER; } } - if(dt.is_infinite(c)) + if(tr.is_infinite(c)) { Orientation ori = orientation_of_circumcenter(p1, p2, p3, - dt.point(n, 0), dt.point(n, 1), - dt.point(n, 2), dt.point(n, 3)); + tr.point(n, 0), tr.point(n, 1), + tr.point(n, 2), tr.point(n, 3)); + +#ifdef CGAL_AW3_DEBUG_TRAVERSABILITY + std::cout << "Cell 'c' is infinite; Orientation: " << ori << std::endl; +#endif if(ori == NEGATIVE) { @@ -104,8 +117,8 @@ less_squared_radius_of_min_empty_sphere(typename Dt::Geom_traits::FT sq_alpha, } else { - Comparison_result cr = compare_squared_radius(dt.point(n, 0), dt.point(n, 1), - dt.point(n, 2), dt.point(n, 3), + Comparison_result cr = compare_squared_radius(tr.point(n, 0), tr.point(n, 1), + tr.point(n, 2), tr.point(n, 3), sq_alpha); return cr == LARGER; } @@ -113,40 +126,40 @@ less_squared_radius_of_min_empty_sphere(typename Dt::Geom_traits::FT sq_alpha, // both c and n are finite if(orientation_of_circumcenter(p1, p2, p3, - dt.point(c, 0), dt.point(c, 1), dt.point(c, 2), dt.point(c, 3)) != + tr.point(c, 0), tr.point(c, 1), tr.point(c, 2), tr.point(c, 3)) != orientation_of_circumcenter(p1, p2, p3, - dt.point(n, 0), dt.point(n, 1), dt.point(n, 2), dt.point(n, 3))) + tr.point(n, 0), tr.point(n, 1), tr.point(n, 2), tr.point(n, 3))) { Comparison_result cr = compare_squared_radius(p1, p2, p3, sq_alpha); #ifdef CGAL_AW3_DEBUG_TRAVERSABILITY std::cout << "dual crosses the face; CR: " - << typename Dt::Geom_traits().compute_squared_radius_3_object()(p1, p2, p3) + << typename Tr::Geom_traits().compute_squared_radius_3_object()(p1, p2, p3) << " sq alpha " << sq_alpha << std::endl; #endif return cr == LARGER; } else { - Comparison_result cr = compare_squared_radius(dt.point(c, 0), dt.point(c, 1), - dt.point(c, 2), dt.point(c, 3), + Comparison_result cr = compare_squared_radius(tr.point(c, 0), tr.point(c, 1), + tr.point(c, 2), tr.point(c, 3), sq_alpha); #ifdef CGAL_AW3_DEBUG_TRAVERSABILITY std::cout << "dual does not cross the face; CR(c): " - << typename Dt::Geom_traits().compute_squared_radius_3_object()(dt.point(c, 0), dt.point(c, 1), - dt.point(c, 2), dt.point(c, 3)) + << typename Tr::Geom_traits().compute_squared_radius_3_object()(tr.point(c, 0), tr.point(c, 1), + tr.point(c, 2), tr.point(c, 3)) << " sq alpha " << sq_alpha << std::endl; #endif if(cr != LARGER) return false; - cr = compare_squared_radius(dt.point(n, 0), dt.point(n, 1), - dt.point(n, 2), dt.point(n, 3), + cr = compare_squared_radius(tr.point(n, 0), tr.point(n, 1), + tr.point(n, 2), tr.point(n, 3), sq_alpha); #ifdef CGAL_AW3_DEBUG_TRAVERSABILITY std::cout << "dual does not cross the face; CR(n): " - << typename Dt::Geom_traits().compute_squared_radius_3_object()(dt.point(n, 0), dt.point(n, 1), - dt.point(n, 2), dt.point(n, 3)) + << typename Tr::Geom_traits().compute_squared_radius_3_object()(tr.point(n, 0), tr.point(n, 1), + tr.point(n, 2), tr.point(n, 3)) << " sq alpha " << sq_alpha << std::endl; #endif @@ -154,6 +167,100 @@ less_squared_radius_of_min_empty_sphere(typename Dt::Geom_traits::FT sq_alpha, } } +template +typename Tr::Geom_traits::FT +smallest_squared_radius_3(const typename Tr::Facet& fh, + const Tr& tr) +{ + using Cell_handle = typename Tr::Cell_handle; + using Point = typename Tr::Point; + using FT = typename Tr::Geom_traits::FT; + + using CK = typename Tr::Geom_traits; + using Exact_kernel = typename Exact_kernel_selector::Exact_kernel; + using Approximate_kernel = Simple_cartesian; + using C2A = Cartesian_converter; + using C2E = typename Exact_kernel_selector::C2E; + + using Orientation_of_circumcenter = Filtered_predicate, + Orientation_of_circumcenter, + C2E, C2A>; + + Orientation_of_circumcenter orientation_of_circumcenter; + + auto squared_radius = tr.geom_traits().compute_squared_radius_3_object(); + +#ifdef CGAL_AW3_DEBUG_TRAVERSABILITY + std::cout << "Computing circumradius of facet" << std::endl; +#endif + + CGAL_precondition(!tr.is_infinite(fh)); + + const Cell_handle c = fh.first; + const int ic = fh.second; + const Cell_handle n = c->neighbor(ic); + + const Point& p1 = tr.point(c, Tr::vertex_triple_index(ic,0)); + const Point& p2 = tr.point(c, Tr::vertex_triple_index(ic,1)); + const Point& p3 = tr.point(c, Tr::vertex_triple_index(ic,2)); + + // This is not actually possible in the context of alpha wrapping, but keeping it for genericity + // and because it does not cost anything. + if(tr.is_infinite(n)) + { + CGAL_assertion(!tr.is_infinite(c)); + + Orientation ori = orientation_of_circumcenter(p1, p2, p3, + tr.point(c, 0), tr.point(c, 1), + tr.point(c, 2), tr.point(c, 3)); + if(ori == POSITIVE) + return squared_radius(p1, p2, p3); + else + return squared_radius(tr.point(c, 0), tr.point(c, 1), tr.point(c, 2), tr.point(c, 3)); + } + + if(tr.is_infinite(c)) + { + Orientation ori = orientation_of_circumcenter(p1, p2, p3, + tr.point(n, 0), tr.point(n, 1), + tr.point(n, 2), tr.point(n, 3)); + +#ifdef CGAL_AW3_DEBUG_TRAVERSABILITY + std::cout << "Cell 'c' is infinite; Orientation: " << ori << std::endl; +#endif + + if(ori == NEGATIVE) + return squared_radius(p1, p2, p3); + else + return squared_radius(tr.point(n, 0), tr.point(n, 1), tr.point(n, 2), tr.point(n, 3)); + } + + // both c and n are finite + if(orientation_of_circumcenter(p1, p2, p3, + tr.point(c, 0), tr.point(c, 1), tr.point(c, 2), tr.point(c, 3)) != + orientation_of_circumcenter(p1, p2, p3, + tr.point(n, 0), tr.point(n, 1), tr.point(n, 2), tr.point(n, 3))) + { +#ifdef CGAL_AW3_DEBUG_TRAVERSABILITY + std::cout << "dual crosses the face; CR: " << squared_radius(p1, p2, p3) << std::endl; +#endif + + return squared_radius(p1, p2, p3); + } + else + { + const FT cr = squared_radius(tr.point(c, 0), tr.point(c, 1), tr.point(c, 2), tr.point(c, 3)); + const FT cnr = squared_radius(tr.point(n, 0), tr.point(n, 1), tr.point(n, 2), tr.point(n, 3)); + +#ifdef CGAL_AW3_DEBUG_TRAVERSABILITY + std::cout << "dual does not cross the face; CR(c): " << cr << " CRn: " << cnr << std::endl; +#endif + + return (CGAL::min)(cr, cnr); + } +} + + } // namespace internal } // namespace Alpha_wraps_3 } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/offset_intersection.h b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/offset_intersection.h index 0d1722e3..6cc50781 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/offset_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/offset_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/offset_intersection.h $ -// $Id: offset_intersection.h 57cf9e0 2022-04-19T14:55:15+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/offset_intersection.h $ +// $Id: include/CGAL/Alpha_wrap_3/internal/offset_intersection.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez diff --git a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/oracles.h b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/oracles.h index 7ba2c40c..0658cb36 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/oracles.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/oracles.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/oracles.h $ -// $Id: oracles.h 57cf9e0 2022-04-19T14:55:15+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/oracles.h $ +// $Id: include/CGAL/Alpha_wrap_3/internal/oracles.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -14,7 +14,7 @@ #include -#include +#include #include #include diff --git a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/splitting_helper.h b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/splitting_helper.h index ad9335bf..3f3f00cb 100644 --- a/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/splitting_helper.h +++ b/thirdparty/CGAL/include/CGAL/Alpha_wrap_3/internal/splitting_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/splitting_helper.h $ -// $Id: splitting_helper.h 57cf9e0 2022-04-19T14:55:15+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/splitting_helper.h $ +// $Id: include/CGAL/Alpha_wrap_3/internal/splitting_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -14,7 +14,7 @@ #include -#include +#include #include #include @@ -167,7 +167,7 @@ struct AABB_tree_splitter_traits // The input face ID serves when traversing the tree, to avoid doing the same intersection() // on the same datum seen from different primitives. // - // Technically, FPM could type-erase the mesh and the VPM, as it currently forces all independant + // Technically, FPM could type-erase the mesh and the VPM, as it currently forces all independent // inputs to have the same types. This is not such much of an issue for the mesh type, // but it can be annoying for the VPM type. using ID = std::pair; @@ -175,18 +175,18 @@ struct AABB_tree_splitter_traits // Primitive ID --> box vector pos --> Bounding Box using BPMB = internal::Vector_property_map; - using BPM = CGAL::Property_map_binder; + using BPM = CGAL::Compose_property_map; // Primitive ID --> point vector pos --> Reference Point using RPPMB = internal::Vector_property_map; - using RPPM = CGAL::Property_map_binder; + using RPPM = CGAL::Compose_property_map; // Primitive ID --> Datum pos vector pos --> Datum pos --> Datum // The vector of data has size nf, but the vector of datum pos has size tree.size() using DPPMB = internal::Vector_property_map; // pos --> Datum pos - using DPPM = CGAL::Property_map_binder; // PID --> Datum pos + using DPPM = CGAL::Compose_property_map; // PID --> Datum pos using DPMB = internal::Vector_property_map; // Datum pos --> Datum - using DPM = CGAL::Property_map_binder; // PID --> Datum + using DPM = CGAL::Compose_property_map; // PID --> Datum using Primitive = CGAL::AABB_primitive + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CGAL { +namespace Alpha_wraps_3 { +namespace internal { + +// @todo this does not detect non-manifold edges with manifold vertices +// (but PMP::self_intersections will catch it) +template +bool is_combinatorially_non_manifold(const TriangleMesh& mesh) +{ + namespace PMP = CGAL::Polygon_mesh_processing; + + using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; + + std::vector non_manifold_cones; + PMP::non_manifold_vertices(mesh, std::back_inserter(non_manifold_cones)); + + if(!non_manifold_cones.empty()) + return true; + + return false; +} + +template +bool has_degenerated_faces(const TriangleMesh& mesh, + const NamedParameters& np = CGAL::parameters::default_values()) +{ + namespace PMP = CGAL::Polygon_mesh_processing; + + for(auto f : faces(mesh)) + if(PMP::is_degenerate_triangle_face(f, mesh, np)) + return true; + + return false; +} + +// Edge length is bounded by twice the circumradius +template +bool check_edge_length(const TriangleMesh& output_mesh, + const double alpha, + const NamedParameters& np = CGAL::parameters::default_values()) +{ + const auto sq_alpha_bound = 4 * square(alpha); + for(auto e : edges(output_mesh)) + { + const auto sqd = Polygon_mesh_processing::squared_edge_length(e, output_mesh, np); + if(sqd > sq_alpha_bound) // alpha is the circumradius + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Error: " << sqd << " greater than " << sq_alpha_bound << std::endl; + std::cerr << get(CGAL::vertex_point, output_mesh, source(e, output_mesh)) << std::endl; + std::cerr << get(CGAL::vertex_point, output_mesh, target(e, output_mesh)) << std::endl; +#endif + return false; + } + } + + return true; +} + +template +bool has_expected_Hausdorff_distance(const TriangleMesh& wrap, + const TriangleMesh& input, + const FT alpha, const FT offset, + const InputNamedParameters& in_np = parameters::default_values(), + const OutputNamedParameters& out_np = parameters::default_values()) +{ + namespace PMP = CGAL::Polygon_mesh_processing; + + using face_descriptor = typename boost::graph_traits::face_descriptor; + + std::vector > fpairs; + + const FT bound = 0.01 * (std::min)(alpha, offset); + const FT d = PMP::bounded_error_Hausdorff_distance( + wrap, input, bound, in_np.output_iterator(std::back_inserter(fpairs)), out_np); + +#ifdef CGAL_AW3_DEBUG + std::cout << "Alpha: " << alpha << " Offset: " << offset << " Bound: " << bound << " Hausdorff_distance: " << d << std::endl; + std::cout << "Maximum distance on faces " << fpairs.back().first << " " << fpairs.back().second << std::endl; +#endif + + return (d < (alpha + offset + bound)); +} + +template +bool is_valid_wrap(const TriangleMesh& wrap, + const bool check_manifoldness, + const NamedParameters& np = parameters::default_values()) +{ + namespace PMP = CGAL::Polygon_mesh_processing; + + if(is_empty(wrap)) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Error: empty wrap" << std::endl; +#endif + return false; + } + + if(!is_valid_polygon_mesh(wrap)) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Error: Invalid wrap mesh" << std::endl; +#endif + return false; + } + + if(!is_triangle_mesh(wrap)) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Error: Wrap is not triangulated" << std::endl; +#endif + return false; + } + + if(!is_closed(wrap)) + { + if(check_manifoldness) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Error: Wrap is not closed" << std::endl; +#endif + return false; + } + else + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "W: Wrap is not closed" << std::endl; +#endif + } + } + else if(!PMP::does_bound_a_volume(wrap, np)) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Error: Wrap does not bound a volume" << std::endl; +#endif + return false; + } + + if(has_degenerated_faces(wrap, np)) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Error: Wrap has degenerate faces" << std::endl; +#endif + return false; + } + + if(is_combinatorially_non_manifold(wrap)) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Error: Wrap is combinatorially non-manifold" << std::endl; +#endif + return false; + } + + if(PMP::does_self_intersect(wrap, np)) + { + if(check_manifoldness) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Error: Wrap self-intersects" << std::endl; +#endif + return false; + } +#ifdef CGAL_AW3_DEBUG + std::cerr << "W: Wrap self-intersects" << std::endl; +#endif + } + + return true; +} + +template +bool is_valid_wrap(const TriangleMesh& wrap, + const NamedParameters& np = parameters::default_values()) +{ + return is_valid_wrap(wrap, true /*consider manifoldness*/, np); +} + +template +bool is_outer_wrap_of_triangle_mesh(const OutputTriangleMesh& wrap, + const InputTriangleMesh& input, + const OutputNamedParameters& out_np = parameters::default_values(), + const InputNamedParameters& in_np = parameters::default_values()) +{ + namespace PMP = CGAL::Polygon_mesh_processing; + + using parameters::get_parameter; + using parameters::choose_parameter; + + using IVPM = typename GetVertexPointMap::const_type; + using OVPM = typename GetVertexPointMap::const_type; + using K = typename GetGeomTraits::type; + +// CGAL::Rigid_triangle_mesh_collision_detection collision_detection; +// collision_detection.add_mesh(input); +// collision_detection.add_mesh(wrap); + +// auto res = collision_detection.get_all_intersections(1); +// if(res.size() != 0) +// { +// std::cerr << "Error: The wrap intersects the input mesh" << std::endl; +// return EXIT_FAILURE; +// } + + if(PMP::do_intersect(input, wrap, in_np, out_np)) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Error: The wrap intersects the input mesh" << std::endl; +#endif + return false; + } + + IVPM in_vpm = choose_parameter(get_parameter(in_np, internal_np::vertex_point), + get_const_property_map(vertex_point, input)); + OVPM out_vpm = choose_parameter(get_parameter(out_np, internal_np::vertex_point), + get_const_property_map(vertex_point, wrap)); + + CGAL::Side_of_triangle_mesh side_of_wrap(wrap, out_vpm); + + // @speed a single vertex per CC would be sufficient + for(auto v : vertices(input)) + { + if(side_of_wrap(get(in_vpm, v)) != CGAL::ON_BOUNDED_SIDE) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Error: Part(s) of the input mesh are outside the wrap: " << get(in_vpm, v) << std::endl; +#endif + return false; + } + } + + return true; +} + +template +bool is_valid_wrap_of_triangle_mesh(const OutputTriangleMesh& wrap, + const InputTriangleMesh& input, + const OutputNamedParameters& out_np = parameters::default_values(), + const InputNamedParameters& in_np = parameters::default_values()) +{ + if(!is_valid_wrap(wrap, out_np)) + return false; + + if(!is_outer_wrap_of_triangle_mesh(wrap, input, out_np, in_np)) + return false; + + return true; +} + +template +bool is_outer_wrap_of_triangle_soup(const TriangleMesh& wrap, + PointRange points, // intentional copies + FaceRange faces, + const OutputNamedParameters& out_np = parameters::default_values(), + const InputNamedParameters& in_np = parameters::default_values()) +{ + namespace PMP = CGAL::Polygon_mesh_processing; + + // Make a mesh out of the soup + PMP::repair_polygon_soup(points, faces); + PMP::orient_polygon_soup(points, faces); + CGAL_assertion(PMP::is_polygon_soup_a_polygon_mesh(faces)); + + TriangleMesh mesh; + PMP::polygon_soup_to_polygon_mesh(points, faces, mesh, in_np); + + return is_outer_wrap_of_triangle_mesh(wrap, mesh, out_np); +} + +template +bool is_valid_wrap_of_triangle_soup(const TriangleMesh& wrap, + const PointRange& points, + const FaceRange& faces, + const OutputNamedParameters& out_np = parameters::default_values(), + const InputNamedParameters& in_np = parameters::default_values()) +{ + if(!is_valid_wrap(wrap, out_np)) + return false; + + if(!is_outer_wrap_of_triangle_soup(wrap, points, faces, out_np, in_np)) + return false; + + return true; +} + +template +bool is_outer_wrap_of_point_set(const TriangleMesh& wrap, + const PointRange& points, + const OutputNamedParameters& out_np = parameters::default_values(), + const InputNamedParameters& in_np = parameters::default_values()) +{ + using parameters::get_parameter; + using parameters::choose_parameter; + + using OVPM = typename GetVertexPointMap::const_type; + using IPM = typename GetPointMap::const_type; + using K = typename Kernel_traits::value_type>::Kernel; + + OVPM out_vpm = choose_parameter(get_parameter(out_np, internal_np::vertex_point), + get_const_property_map(vertex_point, wrap)); + IPM in_pm = choose_parameter(get_parameter(in_np, internal_np::point_map)); + + CGAL::Side_of_triangle_mesh side_of_wrap(wrap, out_vpm); + + // @speed a single vertex per CC would be sufficient + for(const auto& p : points) + { + if(side_of_wrap(get(in_pm, p)) != CGAL::ON_BOUNDED_SIDE) + { +#ifdef CGAL_AW3_DEBUG + std::cerr << "Part(s) of the input mesh are outside the wrap: " << get(in_pm, p) << std::endl; +#endif + return false; + } + } + + return true; +} + +template +bool is_valid_wrap_of_point_set(const TriangleMesh& wrap, + const PointRange& points, + const OutputNamedParameters& out_np = parameters::default_values(), + const InputNamedParameters& in_np = parameters::default_values()) +{ + if(!is_valid_wrap(wrap, out_np)) + return false; + + if(!is_outer_wrap_of_point_set(wrap, points, out_np, in_np)) + return false; + + return true; +} + +} // namespace internal +} // namespace Alpha_wraps_3 +} // namespace CGAL + +#endif // CGAL_ALPHA_WRAP_3_TEST_ALPHA_WRAP_VALIDATION_H diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2.h index 44e20758..b1995d4a 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h $ -// $Id: Apollonius_graph_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h $ +// $Id: include/CGAL/Apollonius_graph_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h index e4e2e3e3..c783be7f 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h $ -// $Id: Apollonius_graph_2_impl.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h $ +// $Id: include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -53,7 +53,7 @@ is_valid(bool verbose, int level) const if (number_of_vertices() < 3) return true; - // CGAL_triangulation_assertion(result); + // CGAL_assertion(result); for (All_edges_iterator eit = all_edges_begin(); eit != all_edges_end(); ++eit) { @@ -64,7 +64,7 @@ is_valid(bool verbose, int level) const if ( !is_infinite(v) ) { result = result && ( incircle(f, v->site()) != NEGATIVE ); - // CGAL_triangulation_assertion(result); + // CGAL_assertion(result); } Edge sym_e = sym_edge(e); f = sym_e.first; @@ -72,7 +72,7 @@ is_valid(bool verbose, int level) const if ( !is_infinite(v) ) { result = result && ( incircle(f, v->site()) != NEGATIVE ); - // CGAL_triangulation_assertion(result); + // CGAL_assertion(result); } } @@ -83,7 +83,7 @@ is_valid(bool verbose, int level) const std::cerr << "Apollonius diagram is NOT valid..." << std::flush; } - // CGAL_triangulation_assertion(result); + // CGAL_assertion(result); return result; } @@ -100,7 +100,7 @@ typename Apollonius_graph_2::Point_2 Apollonius_graph_2:: circumcenter(const Face_handle& f) const { - CGAL_triangulation_precondition (dimension()==2 || !is_infinite(f)); + CGAL_precondition (dimension()==2 || !is_infinite(f)); return circumcenter(f->vertex(0)->site(), f->vertex(1)->site(), f->vertex(2)->site()); @@ -122,7 +122,7 @@ typename Apollonius_graph_2::Site_2 Apollonius_graph_2:: circumcircle(const Face_handle& f) const { - CGAL_triangulation_precondition (dimension()==2 || !is_infinite(f)); + CGAL_precondition (dimension()==2 || !is_infinite(f)); return circumcircle(f->vertex(0)->site(), f->vertex(1)->site(), f->vertex(2)->site()); @@ -178,7 +178,7 @@ typename Gt::Object_2 Apollonius_graph_2:: dual(const Edge e) const { - CGAL_triangulation_precondition( !is_infinite(e) ); + CGAL_precondition( !is_infinite(e) ); if ( dimension() == 1 ) { Site_2 p = (e.first)->vertex(cw(e.second))->site(); @@ -207,16 +207,16 @@ dual(const Edge e) const } // only one of the adjacent faces is infinite - CGAL_triangulation_assertion( is_infinite( e.first ) || + CGAL_assertion( is_infinite( e.first ) || is_infinite( e.first->neighbor(e.second) ) ); - CGAL_triangulation_assertion( !(is_infinite( e.first ) && + CGAL_assertion( !(is_infinite( e.first ) && is_infinite( e.first->neighbor(e.second) ) ) ); - CGAL_triangulation_assertion + CGAL_assertion ( is_infinite( e.first->vertex(e.second) ) || is_infinite( tds().mirror_vertex(e.first, e.second) ) ); @@ -246,7 +246,7 @@ primal(const Edge e) const // typedef typename Geom_traits::Hyperbola_segment_2 Hyperbola_segment; // typedef typename Geom_traits::Parabola_segment_2 Parabola_segment; - // CGAL_triangulation_precondition( !is_infinite(e) ); + // CGAL_precondition( !is_infinite(e) ); if ( number_of_vertices() != 2 ) { if ( is_infinite(e) ) { @@ -257,7 +257,7 @@ primal(const Edge e) const Site_2 s = tds().mirror_vertex( e.first, e.second )->site(); ray = construct_Apollonius_primal_ray_2_object()(p,r,s); } else { - CGAL_triangulation_assertion + CGAL_assertion ( is_infinite( e.first->vertex(ccw(e.second)) ) ); Site_2 q = e.first->vertex( cw(e.second) )->site(); Site_2 r = e.first->vertex( e.second )->site(); @@ -317,11 +317,11 @@ typename Apollonius_graph_2::Edge Apollonius_graph_2:: flip(Face_handle& f, int i) { - CGAL_triangulation_precondition ( f != Face_handle() ); - CGAL_triangulation_precondition (i == 0 || i == 1 || i == 2); - CGAL_triangulation_precondition( dimension()==2 ); + CGAL_precondition ( f != Face_handle() ); + CGAL_precondition (i == 0 || i == 1 || i == 2); + CGAL_precondition( dimension()==2 ); - CGAL_triangulation_precondition( f->vertex(i) != tds().mirror_vertex(f,i) ); + CGAL_precondition( f->vertex(i) != tds().mirror_vertex(f,i) ); this->_tds.flip(f, i); @@ -383,7 +383,7 @@ void Apollonius_graph_2:: remove_degree_2(Vertex_handle v) { - CGAL_triangulation_precondition( is_degree_2(v) ); + CGAL_precondition( is_degree_2(v) ); this->_tds.remove_degree_2( v ); } @@ -403,7 +403,7 @@ void Apollonius_graph_2:: remove_degree_3(Vertex_handle v, Face_handle f) { - CGAL_triangulation_precondition( degree(v) == 3 ); + CGAL_precondition( degree(v) == 3 ); this->_tds.remove_degree_3(v, f); } @@ -416,7 +416,7 @@ typename Apollonius_graph_2::Vertex_handle Apollonius_graph_2:: insert_first(const Site_2& p) { - CGAL_triangulation_precondition(number_of_vertices() == 0); + CGAL_precondition(number_of_vertices() == 0); Vertex_handle v = this->_tds.insert_second(); v->set_site(p); return v; @@ -428,7 +428,7 @@ typename Apollonius_graph_2::Vertex_handle Apollonius_graph_2:: insert_second(const Site_2& p) { - CGAL_triangulation_precondition( number_of_vertices() == 1 ); + CGAL_precondition( number_of_vertices() == 1 ); Vertex_handle vnew; Vertex_handle v(finite_vertices_begin()); if ( is_hidden(v->site(), p) ) { @@ -439,7 +439,7 @@ insert_second(const Site_2& p) v->set_site(p); vnew = v; } else { - CGAL_triangulation_precondition(number_of_vertices() == 1); + CGAL_precondition(number_of_vertices() == 1); vnew = this->_tds.insert_dim_up(infinite_vertex(), true); vnew->set_site(p); // vnew = Delaunay_graph::insert_second(p); @@ -453,7 +453,7 @@ typename Apollonius_graph_2::Vertex_handle Apollonius_graph_2:: insert_third(const Site_2& p) { - CGAL_triangulation_precondition( number_of_vertices() == 2 ); + CGAL_precondition( number_of_vertices() == 2 ); Face_handle f((*finite_edges_begin()).first); Vertex_handle v1(f->vertex(0)); @@ -592,7 +592,7 @@ insert_third(const Site_2& p) } } - // CGAL_triangulation_assertion( is_valid() ); + // CGAL_assertion( is_valid() ); return v; } @@ -1752,8 +1752,8 @@ void Apollonius_graph_2:: remove(Vertex_handle v) { - CGAL_triangulation_precondition( v != Vertex_handle() ); - CGAL_triangulation_precondition( !is_infinite(v) ); + CGAL_precondition( v != Vertex_handle() ); + CGAL_precondition( !is_infinite(v) ); // find a neighbor of v to use for point location of hidden sites to // be re-inserted @@ -1900,7 +1900,7 @@ remove_degree_d_vertex(Vertex_handle v) CGAL_assertion( found ); CGAL_USE(found); } - CGAL_triangulation_precondition( degree(v) == 3 ); + CGAL_precondition( degree(v) == 3 ); this->_tds.remove_degree_3( v, Face_handle() ); @@ -1960,7 +1960,7 @@ template void Apollonius_graph_2::file_output(std::ostream& os) const { - // ouput to a file + // output to a file size_type n = this->_tds.number_of_vertices(); size_type m = this->_tds.number_of_full_dim_faces(); diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h index 48c0c075..25ab886b 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h $ -// $Id: Apollonius_graph_hierarchy_2_impl.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h $ +// $Id: include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -54,7 +54,7 @@ Apollonius_graph_hierarchy_2 } -//Assignement +//Assignment template Apollonius_graph_hierarchy_2 & Apollonius_graph_hierarchy_2:: @@ -332,8 +332,8 @@ void Apollonius_graph_hierarchy_2:: remove(Vertex_handle v) { - CGAL_triangulation_precondition( v != Vertex_handle()); - CGAL_triangulation_precondition( !is_infinite(v)); + CGAL_precondition( v != Vertex_handle()); + CGAL_precondition( !is_infinite(v)); // get the hidden circles typename Apollonius_graph_base::Site_list wp_list; diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Bounded_side_of_ccw_circle_C2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Bounded_side_of_ccw_circle_C2.h index 0aa5ec3d..bce3a78e 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Bounded_side_of_ccw_circle_C2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Bounded_side_of_ccw_circle_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Bounded_side_of_ccw_circle_C2.h $ -// $Id: Bounded_side_of_ccw_circle_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Bounded_side_of_ccw_circle_C2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Bounded_side_of_ccw_circle_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Compare_weight_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Compare_weight_2.h index 92ac9043..b2cb8b49 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Compare_weight_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Compare_weight_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Compare_weight_2.h $ -// $Id: Compare_weight_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Compare_weight_2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Compare_weight_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Compare_x_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Compare_x_2.h index 87e5aa1e..37b16a6c 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Compare_x_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Compare_x_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Compare_x_2.h $ -// $Id: Compare_x_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Compare_x_2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Compare_x_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Compare_y_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Compare_y_2.h index affb25ba..918f8320 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Compare_y_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Compare_y_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Compare_y_2.h $ -// $Id: Compare_y_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Compare_y_2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Compare_y_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Constructions_C2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Constructions_C2.h index 03d6de2a..d7ca8a68 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Constructions_C2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Constructions_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Constructions_C2.h $ -// $Id: Constructions_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Constructions_C2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Constructions_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Constructions_ftC2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Constructions_ftC2.h index 0cb7f619..ed13e79b 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Constructions_ftC2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Constructions_ftC2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Constructions_ftC2.h $ -// $Id: Constructions_ftC2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Constructions_ftC2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Constructions_ftC2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Constructions_rtH2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Constructions_rtH2.h index 094636af..b15619df 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Constructions_rtH2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Constructions_rtH2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Constructions_rtH2.h $ -// $Id: Constructions_rtH2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Constructions_rtH2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Constructions_rtH2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Finite_edge_test8_C2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Finite_edge_test8_C2.h index 32d032f1..b149ba27 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Finite_edge_test8_C2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Finite_edge_test8_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Finite_edge_test8_C2.h $ -// $Id: Finite_edge_test8_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Finite_edge_test8_C2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Finite_edge_test8_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Finite_edge_test_C2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Finite_edge_test_C2.h index 93769e67..3e57f0db 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Finite_edge_test_C2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Finite_edge_test_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Finite_edge_test_C2.h $ -// $Id: Finite_edge_test_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Finite_edge_test_C2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Finite_edge_test_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Incircle8_C2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Incircle8_C2.h index 6b83ec4e..d27666ac 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Incircle8_C2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Incircle8_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Incircle8_C2.h $ -// $Id: Incircle8_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Incircle8_C2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Incircle8_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Incircle_C2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Incircle_C2.h index 1e75d205..6b01e1ac 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Incircle_C2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Incircle_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Incircle_C2.h $ -// $Id: Incircle_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Incircle_C2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Incircle_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Infinite_edge_test_C2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Infinite_edge_test_C2.h index c99f61d3..24a99db6 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Infinite_edge_test_C2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Infinite_edge_test_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Infinite_edge_test_C2.h $ -// $Id: Infinite_edge_test_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Infinite_edge_test_C2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Infinite_edge_test_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Is_degenerate_edge_C2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Is_degenerate_edge_C2.h index 5009ca7c..6b1ab251 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Is_degenerate_edge_C2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Is_degenerate_edge_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Is_degenerate_edge_C2.h $ -// $Id: Is_degenerate_edge_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Is_degenerate_edge_C2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Is_degenerate_edge_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Is_hidden_C2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Is_hidden_C2.h index 21730c72..d673e7be 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Is_hidden_C2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Is_hidden_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Is_hidden_C2.h $ -// $Id: Is_hidden_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Is_hidden_C2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Is_hidden_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Kernel_wrapper_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Kernel_wrapper_2.h index 5d63266e..35ace705 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Kernel_wrapper_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Kernel_wrapper_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Kernel_wrapper_2.h $ -// $Id: Kernel_wrapper_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Kernel_wrapper_2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Kernel_wrapper_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Orientation8_C2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Orientation8_C2.h index 5b73323e..83d700aa 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Orientation8_C2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Orientation8_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Orientation8_C2.h $ -// $Id: Orientation8_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Orientation8_C2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Orientation8_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Orientation_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Orientation_2.h index 99964ae3..00b6d24e 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Orientation_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Orientation_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Orientation_2.h $ -// $Id: Orientation_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Orientation_2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Orientation_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Oriented_side_of_bisector_C2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Oriented_side_of_bisector_C2.h index 0ed29ad8..c5365038 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Oriented_side_of_bisector_C2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Oriented_side_of_bisector_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Oriented_side_of_bisector_C2.h $ -// $Id: Oriented_side_of_bisector_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Oriented_side_of_bisector_C2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Oriented_side_of_bisector_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Predicate_constructions_C2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Predicate_constructions_C2.h index 3627f205..53a803d4 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Predicate_constructions_C2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Predicate_constructions_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Predicate_constructions_C2.h $ -// $Id: Predicate_constructions_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Predicate_constructions_C2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Predicate_constructions_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Predicates_C2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Predicates_C2.h index 1e3aee05..a5a963ac 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Predicates_C2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Predicates_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Predicates_C2.h $ -// $Id: Predicates_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Predicates_C2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Predicates_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Traits_wrapper_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Traits_wrapper_2.h index 5d40413d..ff60a29d 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Traits_wrapper_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/Traits_wrapper_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Traits_wrapper_2.h $ -// $Id: Traits_wrapper_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Traits_wrapper_2.h $ +// $Id: include/CGAL/Apollonius_graph_2/Traits_wrapper_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/basic.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/basic.h index 56fe3b35..53d9c8e6 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/basic.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/basic.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/basic.h $ -// $Id: basic.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/basic.h $ +// $Id: include/CGAL/Apollonius_graph_2/basic.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/comparator_profiler.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/comparator_profiler.h index 07717a14..4f1be325 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/comparator_profiler.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/comparator_profiler.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/comparator_profiler.h $ -// $Id: comparator_profiler.h 3e03d50 2021-05-05T15:32:22+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/comparator_profiler.h $ +// $Id: include/CGAL/Apollonius_graph_2/comparator_profiler.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/compare_quadratic.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/compare_quadratic.h index f3088593..39655c15 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/compare_quadratic.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/compare_quadratic.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/compare_quadratic.h $ -// $Id: compare_quadratic.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/compare_quadratic.h $ +// $Id: include/CGAL/Apollonius_graph_2/compare_quadratic.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/predicate_profiler.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/predicate_profiler.h index e621369f..1b28a971 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/predicate_profiler.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/predicate_profiler.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/predicate_profiler.h $ -// $Id: predicate_profiler.h 3e03d50 2021-05-05T15:32:22+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/predicate_profiler.h $ +// $Id: include/CGAL/Apollonius_graph_2/predicate_profiler.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_is_hidden_C2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_is_hidden_C2.h index e49d6360..6975ec27 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_is_hidden_C2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_is_hidden_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_is_hidden_C2.h $ -// $Id: Uncertain_is_hidden_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_is_hidden_C2.h $ +// $Id: include/CGAL/Apollonius_graph_2/uncertain/Uncertain_is_hidden_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_oriented_side_of_bisector_C2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_oriented_side_of_bisector_C2.h index 0ff5598b..feef4df9 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_oriented_side_of_bisector_C2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_oriented_side_of_bisector_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_oriented_side_of_bisector_C2.h $ -// $Id: Uncertain_oriented_side_of_bisector_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_oriented_side_of_bisector_C2.h $ +// $Id: include/CGAL/Apollonius_graph_2/uncertain/Uncertain_oriented_side_of_bisector_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h index 9d5a6498..47299f53 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h $ -// $Id: Uncertain_vertex_conflict_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h $ +// $Id: include/CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -268,7 +268,7 @@ class Uncertain_vertex_conflict_new_2 { // NOTE:*************************************** // * the perturb boolean variable is not used - // * for consistancy with Menelaos + // * for consistency with Menelaos // NOTE:*************************************** RT x2 = p2.x() - p1.x(); RT y2 = p2.y() - p1.y(); @@ -298,10 +298,10 @@ class Uncertain_vertex_conflict_new_2 if ( is_indeterminate(s_xw2q) ) { return s_xw2q; } power_test = o12 * s_xw2q; - // this results is consistant with Menelaos + // this results is consistent with Menelaos if (power_test != ZERO) { return -power_test; } - // this result is consistant with the perturb on off idea + // this result is consistent with the perturb on off idea //if (power_test != ZERO || ! perturb) return -power_test; o1q = CGAL::sign(xq); @@ -313,10 +313,10 @@ class Uncertain_vertex_conflict_new_2 if ( is_indeterminate(s_yw2q) ) { return s_yw2q; } power_test = o12 * s_yw2q; - // this results is consistant with Menelaos + // this results is consistent with Menelaos if (power_test != ZERO) { return -power_test; } - // this result is consistant with the perturb on off idea + // this result is consistent with the perturb on off idea //if (power_test != ZERO || ! perturb) return -power_test; o1q = CGAL::sign(yq); @@ -348,11 +348,11 @@ class Uncertain_vertex_conflict_new_2 - CGAL::square(xy2q)); if ( is_indeterminate(radInt) ) { return radInt; } - // radical intersection degerate + // radical intersection degenerate if (radInt == ZERO) { CGAL_assertion (radSide != ZERO); - // this result is consistant with the perturb on off idea + // this result is consistent with the perturb on off idea //if (! perturb) return (radSide == orient) ? ZERO : orient; RT rs2q1 = (p2.x() - q.x()) * xw2q + (p2.y() - q.y()) * yw2q; diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/uncertain_functions_on_signs.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/uncertain_functions_on_signs.h index 3bb0e4e6..4a1e1941 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/uncertain_functions_on_signs.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_2/uncertain/uncertain_functions_on_signs.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/uncertain/uncertain_functions_on_signs.h $ -// $Id: uncertain_functions_on_signs.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/uncertain/uncertain_functions_on_signs.h $ +// $Id: include/CGAL/Apollonius_graph_2/uncertain/uncertain_functions_on_signs.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_adaptation_policies_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_adaptation_policies_2.h index 7b6af549..24c430be 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_adaptation_policies_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_adaptation_policies_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Apollonius_graph_adaptation_policies_2.h $ -// $Id: Apollonius_graph_adaptation_policies_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Apollonius_graph_adaptation_policies_2.h $ +// $Id: include/CGAL/Apollonius_graph_adaptation_policies_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_adaptation_traits_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_adaptation_traits_2.h index 53966b4f..fe6aad43 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_adaptation_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_adaptation_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Apollonius_graph_adaptation_traits_2.h $ -// $Id: Apollonius_graph_adaptation_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Apollonius_graph_adaptation_traits_2.h $ +// $Id: include/CGAL/Apollonius_graph_adaptation_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_data_structure_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_data_structure_2.h index 59296f71..063e0df2 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_data_structure_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_data_structure_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_data_structure_2.h $ -// $Id: Apollonius_graph_data_structure_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_data_structure_2.h $ +// $Id: include/CGAL/Apollonius_graph_data_structure_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_filtered_traits_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_filtered_traits_2.h index cd5ba48a..900f6833 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_filtered_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_filtered_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_filtered_traits_2.h $ -// $Id: Apollonius_graph_filtered_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_filtered_traits_2.h $ +// $Id: include/CGAL/Apollonius_graph_filtered_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_hierarchy_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_hierarchy_2.h index a1469cb8..3e9b488f 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_hierarchy_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_hierarchy_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_hierarchy_2.h $ -// $Id: Apollonius_graph_hierarchy_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_hierarchy_2.h $ +// $Id: include/CGAL/Apollonius_graph_hierarchy_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h index 56cf50cc..675260ac 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h $ -// $Id: Apollonius_graph_hierarchy_vertex_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h $ +// $Id: include/CGAL/Apollonius_graph_hierarchy_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_traits_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_traits_2.h index b9b8936e..0ad8f212 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_traits_2.h $ -// $Id: Apollonius_graph_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_traits_2.h $ +// $Id: include/CGAL/Apollonius_graph_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_graph_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_graph_vertex_base_2.h index ae8fa0e1..ee60c240 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_graph_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_graph_vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_graph_vertex_base_2.h $ -// $Id: Apollonius_graph_vertex_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_graph_vertex_base_2.h $ +// $Id: include/CGAL/Apollonius_graph_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,6 @@ #include #include -#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Apollonius_site_2.h b/thirdparty/CGAL/include/CGAL/Apollonius_site_2.h index e0ed5e0f..61a03d59 100644 --- a/thirdparty/CGAL/include/CGAL/Apollonius_site_2.h +++ b/thirdparty/CGAL/include/CGAL/Apollonius_site_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Apollonius_site_2.h $ -// $Id: Apollonius_site_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Apollonius_site_2.h $ +// $Id: include/CGAL/Apollonius_site_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d.h b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d.h index 21f6b5c9..819214e9 100644 --- a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d.h +++ b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d.h $ -// $Id: Approximate_min_ellipsoid_d.h 2b31362 2022-06-22T07:53:20+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d.h $ +// $Id: include/CGAL/Approximate_min_ellipsoid_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -65,7 +65,7 @@ namespace CGAL { // When the input points do not affinely span the whole space // (i.e., if dim(aff(P)) < d), then the smallest enclosing // ellipsoid of P has no volume in R^d and so the points are - // called "degnerate" (see is_degenerate()) below. + // called "degenerate" (see is_degenerate()) below. // As discussed below (before (*)), the centrally symmetric ellipsoid // E':= sqrt{(1+a_eps)(d+1)} E contains (under exact arithmetic) the @@ -140,7 +140,7 @@ namespace CGAL { CGAL_APPEL_ASSERT(is_deg == E->is_degenerate()); CGAL_APPEL_LOG("appel", " Input points are " << (is_deg? "" : "not ") << - "degnerate." << std::endl); + "degenerate." << std::endl); if (is_deg) find_lower_dimensional_approximation(); diff --git a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_configure.h b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_configure.h index 4dacc6a2..a55f15e7 100644 --- a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_configure.h +++ b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_configure.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_configure.h $ -// $Id: Approximate_min_ellipsoid_d_configure.h 5a36ff8 2020-12-04T08:02:26+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_configure.h $ +// $Id: include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_configure.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h index fbb35414..0a0d165d 100644 --- a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h +++ b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h $ -// $Id: Approximate_min_ellipsoid_d_debug.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h $ +// $Id: include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -98,7 +98,7 @@ namespace CGAL { { // Here's where we maintain the only instance: (Notice that it // gets constructed automatically the first time instance() is - // called, and that it gets disposed of (if ever contructed) at + // called, and that it gets disposed of (if ever constructed) at // program termination.) static Logger instance; return instance; @@ -183,7 +183,7 @@ namespace CGAL { // created and started. Otherwise, the timer with name name is // restarted. // - // - lapse(name): Retuns the number of seconds which have elapsed + // - lapse(name): Returns the number of seconds which have elapsed // since start(name) was called last. // Precondition: start(name) has been called once. { @@ -201,7 +201,7 @@ namespace CGAL { { // Here's where we maintain the only instance: (Notice that it // gets constructed automatically the first time instance() is - // called, and that it gets disposed of (if ever contructed) at + // called, and that it gets disposed of (if ever constructed) at // program termination.) static Timer instance; return instance; @@ -255,7 +255,7 @@ namespace CGAL { class Eps_export_2 { // An instance of the following class accepts circles and ellipses - // and procudes an Enhanced-PostScript figure. + // and produces an Enhanced-PostScript figure. public: enum Stroke_mode { Solid=0, Solid_filled=1, Dashed=2 }; enum Label_mode { None, Angle, Random_angle }; diff --git a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h index 053c99b4..7ee2a422 100644 --- a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h +++ b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h @@ -3,13 +3,17 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h $ -// $Id: Approximate_min_ellipsoid_d_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h $ +// $Id: include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Kaspar Fischer +#ifndef CGAL_APPROXIMATE_MIN_ELLIPSOID_D_APPROXIMATE_MIN_ELLIPSOID_D_IMPL_H +#define CGAL_APPROXIMATE_MIN_ELLIPSOID_D_APPROXIMATE_MIN_ELLIPSOID_D_IMPL_H + +#include #include @@ -91,7 +95,7 @@ namespace CGAL { // [ M' m ] // M = [ m^T nu ] // - // where M is the matrix defined via E->matrix(i,j). After caling + // where M is the matrix defined via E->matrix(i,j). After calling // compute_center() (see above), we have in center_ a point c such // that // @@ -101,7 +105,7 @@ namespace CGAL { // // Now if we can write M' = U D U^T holds for some diagonal matrix // D and an orthogonal matrix U then the length l_i of the ith axes - // (corresponding to the ith "direcion" stored in the ith row of + // (corresponding to the ith "direction" stored in the ith row of // U) can be obtained by plugging (0,...,0,l_i,0,...,0)U^T=y-c into // the above equation for E*: // @@ -272,3 +276,5 @@ namespace CGAL { } } + +#endif //CGAL_APPROXIMATE_MIN_ELLIPSOID_D_APPROXIMATE_MIN_ELLIPSOID_D_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h index f4ff1a51..f16f89ec 100644 --- a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h +++ b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h $ -// $Id: Khachiyan_approximation.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h $ +// $Id: include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -12,8 +12,8 @@ // Note: whenever a comment refers to "Khachiyan's paper" then the // paper "Rounding of polytopes in the real number model of -// computation" is ment (Mathematics of Operations Research, Vol. 21, -// No. 2, May 1996). Nontheless, most comments refer to the +// computation" is meant (Mathematics of Operations Research, Vol. 21, +// No. 2, May 1996). Nonetheless, most comments refer to the // accompanying documentation sheet (and not to the above paper), see // the file(s) in documentation/. @@ -85,7 +85,7 @@ namespace CGAL { // // Notice that (at almost all places in this code) whenever a // point "p" is mentioned in a comment then the embedded point is - // ment in case (ii). + // meant in case (ii). const int d_P; // dimension of the input points const int d; // dimension of the ambient space @@ -294,7 +294,7 @@ namespace CGAL { (Embed? "" : "not ") << "embedded)." << std::endl); CGAL_APPEL_TIMER_START("khachiyan"); - // In order to satisfy the invariant on m, we have to initalize + // In order to satisfy the invariant on m, we have to initialize // m with the zero matrix: for (int i=0; i +#ifndef CGAL_APPROX_MIN_ELLIPSOID_KHACHIYAN_APPROX_IMPL_H +#define CGAL_APPROX_MIN_ELLIPSOID_KHACHIYAN_APPROX_IMPL_H + +#include + // Note: whenever a comment refers to "Khachiyan's paper" then the // paper "Rounding of polytopes in the real number model of -// computation" is ment (Mathematics of Operations Research, Vol. 21, -// No. 2, May 1996). Nontheless, most comments refer to the +// computation" is meant (Mathematics of Operations Research, Vol. 21, +// No. 2, May 1996). Nonetheless, most comments refer to the // accompanying documentation sheet (and not to the above paper), see // the file(s) in documentation/. @@ -298,7 +303,7 @@ namespace CGAL { CGAL_APPEL_LOG("appel"," Largest excess after initialization is " << to_double(ex[ex_max]) << "." << "\n"); - // Accoding to Khachiyam (Lemma 3, eq. (2.20) in "Rounding of + // According to Khachiyam (Lemma 3, eq. (2.20) in "Rounding of // polytopes in the real number model of computation"), the // following eps makes (*) hold: eps = n-1; @@ -343,7 +348,7 @@ namespace CGAL { max_error_m_all = (std::max)(max_error,max_error_m_all); max_error_m = max_error; #endif - CGAL_APPEL_LOG("appel"," The represenation error in m is: " << + CGAL_APPEL_LOG("appel"," The representation error in m is: " << to_double(max_error) << (max_error == FT(0)? " (zero)" : "") << "." << "\n"); @@ -663,3 +668,5 @@ namespace CGAL { } } + +#endif // CGAL_APPROX_MIN_ELLIPSOID_KHACHIYAN_APPROX_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d_traits_2.h b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d_traits_2.h index 202acf1f..1ddc70a6 100644 --- a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d_traits_2.h $ -// $Id: Approximate_min_ellipsoid_d_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d_traits_2.h $ +// $Id: include/CGAL/Approximate_min_ellipsoid_d_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d_traits_3.h b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d_traits_3.h index 467cd02f..47e4f433 100644 --- a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d_traits_3.h $ -// $Id: Approximate_min_ellipsoid_d_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d_traits_3.h $ +// $Id: include/CGAL/Approximate_min_ellipsoid_d_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d_traits_d.h b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d_traits_d.h index ea781a78..8e2635cf 100644 --- a/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d_traits_d.h +++ b/thirdparty/CGAL/include/CGAL/Approximate_min_ellipsoid_d_traits_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d_traits_d.h $ -// $Id: Approximate_min_ellipsoid_d_traits_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d_traits_d.h $ +// $Id: include/CGAL/Approximate_min_ellipsoid_d_traits_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arithmetic_kernel.h b/thirdparty/CGAL/include/CGAL/Arithmetic_kernel.h index f85998ce..a675d9a6 100644 --- a/thirdparty/CGAL/include/CGAL/Arithmetic_kernel.h +++ b/thirdparty/CGAL/include/CGAL/Arithmetic_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arithmetic_kernel/include/CGAL/Arithmetic_kernel.h $ -// $Id: Arithmetic_kernel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arithmetic_kernel/include/CGAL/Arithmetic_kernel.h $ +// $Id: include/CGAL/Arithmetic_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Hemmer diff --git a/thirdparty/CGAL/include/CGAL/Arithmetic_kernel/Arithmetic_kernel_base.h b/thirdparty/CGAL/include/CGAL/Arithmetic_kernel/Arithmetic_kernel_base.h index 486df8f5..4c5d29e7 100644 --- a/thirdparty/CGAL/include/CGAL/Arithmetic_kernel/Arithmetic_kernel_base.h +++ b/thirdparty/CGAL/include/CGAL/Arithmetic_kernel/Arithmetic_kernel_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arithmetic_kernel/include/CGAL/Arithmetic_kernel/Arithmetic_kernel_base.h $ -// $Id: Arithmetic_kernel_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arithmetic_kernel/include/CGAL/Arithmetic_kernel/Arithmetic_kernel_base.h $ +// $Id: include/CGAL/Arithmetic_kernel/Arithmetic_kernel_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Hemmer diff --git a/thirdparty/CGAL/include/CGAL/Arr_Bezier_curve_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_Bezier_curve_traits_2.h index 2f592521..eb134c47 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_Bezier_curve_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_Bezier_curve_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h $ -// $Id: Arr_Bezier_curve_traits_2.h 40152a2 2020-06-13T16:43:09+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h $ +// $Id: include/CGAL/Arr_Bezier_curve_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -138,7 +138,7 @@ class Arr_Bezier_curve_traits_2 m_owner (false) {} - /*! Assignmnet operator. */ + /*! Assignment operator. */ Self& operator= (const Self& tr) { if (this == &tr) @@ -499,7 +499,7 @@ class Arr_Bezier_curve_traits_2 template OutputIterator operator() (const Curve_2& B, OutputIterator oi) const { - typedef boost::variant + typedef std::variant Make_x_monotone_result; typedef typename Bounding_traits::Vertical_tangency_point Vertical_tangency_point; @@ -809,7 +809,7 @@ class Arr_Bezier_curve_traits_2 m_traits.compare_y_at_x_2_object()); CGAL_precondition_code(Equal_2 equal_2 = m_traits.equal_2_object()); Compare_x_2 compare_x_2 = m_traits.compare_x_2_object(); - // Check whether source and taget are two distinct points and they lie + // Check whether source and taeget are two distinct points and they lie // on the line. CGAL_precondition(compare_y_at_x_2(src, xcv) == EQUAL); CGAL_precondition(compare_y_at_x_2(tgt, xcv) == EQUAL); diff --git a/thirdparty/CGAL/include/CGAL/Arr_accessor.h b/thirdparty/CGAL/include/CGAL/Arr_accessor.h index 3e035a0f..256cd179 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_accessor.h +++ b/thirdparty/CGAL/include/CGAL/Arr_accessor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h $ -// $Id: Arr_accessor.h 6b64dc8 2020-11-11T09:38:55+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h $ +// $Id: include/CGAL/Arr_accessor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -114,13 +114,13 @@ class Arr_accessor { auto obj = p_arr->topology_traits()->locate_curve_end(cv, ind, ps_x, ps_y); // Return a handle to the DCEL feature. - DFace** f_p = boost::get(&obj); + DFace** f_p = std::get_if(&obj); if (f_p) return (Pl_result::make_result(p_arr->_const_handle_for(*f_p))); - DHalfedge** he_p = boost::get(&obj); + DHalfedge** he_p = std::get_if(&obj); if (he_p) return (Pl_result::make_result(p_arr->_const_handle_for(*he_p))); - DVertex** v_p = boost::get(&obj); + DVertex** v_p = std::get_if(&obj); if (v_p) return (Pl_result::make_result(p_arr->_const_handle_for(*v_p))); // We should never reach here: @@ -430,7 +430,7 @@ class Arr_accessor { * Insert an x-monotone curve into the arrangement, such that one of its * endpoints corresponds to a given arrangement vertex, given the exact * place for the curve in the circular list around this vertex. The other - * endpoint corrsponds to a free vertex (a newly created vertex or an + * endpoint corresponds to a free vertex (a newly created vertex or an * isolated vertex). * \param he_to The reference halfedge. We should represent cv as a pair * of edges, one of them should become he_to's successor. @@ -619,7 +619,7 @@ class Arr_accessor { /*! * Split a given edge into two at a given point, and associate the given * x-monotone curves with the split edges. - * \param e The edge to split (one of the pair of twin halfegdes). + * \param e The edge to split (one of the pair of twin halfedges). * \param p The split point. * \param cv1 The curve that should be associated with the first split edge, * whose source equals e's source and its target is p. @@ -641,7 +641,7 @@ class Arr_accessor { /*! * Split a given edge into two at the given vertex, and associate the given * x-monotone curves with the split edges. - * \param e The edge to split (one of the pair of twin halfegdes). + * \param e The edge to split (one of the pair of twin halfedges). * \param v The split vertex. * \param cv1 The curve that should be associated with the first split edge, * whose source equals e's source and its target is v's point. @@ -663,7 +663,7 @@ class Arr_accessor { /*! * Split a fictitious edge at the given vertex. - * \param e The edge to split (one of the pair of twin halfegdes). + * \param e The edge to split (one of the pair of twin halfedges). * \param v The split vertex. * \return A handle for the first split halfedge, whose source equals the * source of e, and whose target is the split vertex v. @@ -792,7 +792,7 @@ class Arr_accessor { const Dcel& dcel() const { return (p_arr->_dcel()); } /*! - * Clear the entire arrangment. + * Clear the entire arrangement. */ void clear_all() { diff --git a/thirdparty/CGAL/include/CGAL/Arr_algebraic_segment_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_algebraic_segment_traits_2.h index 3ad69860..f6ee006d 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_algebraic_segment_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_algebraic_segment_traits_2.h @@ -3,17 +3,20 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h $ -// $Id: Arr_algebraic_segment_traits_2.h 6b64dc8 2020-11-11T09:38:55+02:00 Efi Fogel -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h $ +// $Id: include/CGAL/Arr_algebraic_segment_traits_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s): Michael Kerber // // ============================================================================ -#ifndef CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS -#define CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS +#ifndef CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS_H +#define CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS_H + +#include + #include @@ -25,7 +28,7 @@ #include -#include +#include #include namespace CGAL { @@ -61,7 +64,7 @@ class Arr_algebraic_segment_traits_2 { // Copy constructor Arr_algebraic_segment_traits_2 (const Self& /* s */) { /* No state...*/} - // Assignement operator + // Assignment operator const Self& operator= (const Self& s) {return s;} @@ -254,7 +257,7 @@ class Arr_algebraic_segment_traits_2 { return std::make_pair(std::make_pair(0,0),vertical); } - // abbrevation for convenience + // abbreviation for convenience bool is_one_one(Curve_2 cv, Point_2 p) const { std::pair,bool> branches @@ -267,11 +270,11 @@ class Arr_algebraic_segment_traits_2 { template OutputIterator x_monotone_segment(Curve_2 cv, Point_2 p, - boost::optional start, - boost::optional end, + std::optional start, + std::optional end, OutputIterator out) const { - typedef boost::variant + typedef std::variant Make_x_monotone_result; //CGAL_assertion(is_one_one(cv,p)); @@ -286,46 +289,46 @@ class Arr_algebraic_segment_traits_2 { this->_ckva()->make_x_monotone_2_object()(cv, std::back_inserter(arcs)); auto it = arcs.begin(); auto helper = it; - const auto* it_seg_p = boost::get(&(*it)); + const auto* it_seg_p = std::get_if(&(*it)); while (it != arcs.end()) { if ( on_arc(p, *it_seg_p) ) break; it++; - it_seg_p = boost::get(&(*it)); + it_seg_p = std::get_if(&(*it)); } - bool left_on_arc = start && on_arc(start.get(), *it_seg_p); - bool right_on_arc = end && on_arc(end.get(), *it_seg_p); + bool left_on_arc = start && on_arc(start.value(), *it_seg_p); + bool right_on_arc = end && on_arc(end.value(), *it_seg_p); if ( left_on_arc && right_on_arc ) { - segs.push_back(it_seg_p->trim(start.get(),end.get())); + segs.push_back(it_seg_p->trim(start.value(),end.value())); } if (left_on_arc && (!right_on_arc)) { if (!it_seg_p->is_finite(CGAL::ARR_MAX_END) || - !equal(start.get(),right(*it_seg_p))) { + !equal(start.value(),right(*it_seg_p))) { if (it_seg_p->is_finite(CGAL::ARR_MIN_END) && - equal(start.get(),left(*it_seg_p))) + equal(start.value(),left(*it_seg_p))) { segs.push_back(*it_seg_p); } else { X_monotone_curve_2 split1,split2; - it_seg_p->split(start.get(),split1,split2); + it_seg_p->split(start.value(),split1,split2); segs.push_back(split2); } } } if ((!left_on_arc) && right_on_arc) { if (!it_seg_p->is_finite(CGAL::ARR_MIN_END) || - ! equal(left(*it_seg_p), end.get())) + ! equal(left(*it_seg_p), end.value())) { if (it_seg_p->is_finite(CGAL::ARR_MAX_END) && - equal(end.get(), right(*it_seg_p))) + equal(end.value(), right(*it_seg_p))) { segs.push_back(*it_seg_p); } else { X_monotone_curve_2 split1,split2; - it_seg_p->split(end.get(), split1, split2); + it_seg_p->split(end.value(), split1, split2); segs.push_back(split1); } } @@ -348,14 +351,14 @@ class Arr_algebraic_segment_traits_2 { } CGAL_assertion(it != arcs.begin()); it--; - it_seg_p = boost::get(&(*it)); + it_seg_p = std::get_if(&(*it)); while (! on_arc(point_it, *it_seg_p)) { CGAL_assertion(it != arcs.begin()); it--; - it_seg_p = boost::get(&(*it)); + it_seg_p = std::get_if(&(*it)); } - if (start && on_arc(start.get(),*it_seg_p)) { - segs.push_front(it_seg_p->trim(start.get(), right(*it_seg_p))); + if (start && on_arc(start.value(),*it_seg_p)) { + segs.push_front(it_seg_p->trim(start.value(), right(*it_seg_p))); break; } else { @@ -365,7 +368,7 @@ class Arr_algebraic_segment_traits_2 { } if (! right_on_arc) { it = helper; // reset - it_seg_p = boost::get(&(*it)); + it_seg_p = std::get_if(&(*it)); Point_2 point_it; while (true) { if (it_seg_p->is_finite(CGAL::ARR_MAX_END) && @@ -378,14 +381,14 @@ class Arr_algebraic_segment_traits_2 { } it++; CGAL_assertion(it != arcs.end()); - it_seg_p = boost::get(&(*it)); + it_seg_p = std::get_if(&(*it)); while(! on_arc(point_it, *it_seg_p)) { it++; CGAL_assertion(it != arcs.end()); - it_seg_p = boost::get(&(*it)); + it_seg_p = std::get_if(&(*it)); } - if(end && on_arc(end.get(),*it_seg_p)) { - segs.push_back(it_seg_p->trim(left(*it_seg_p),end.get())); + if(end && on_arc(end.value(),*it_seg_p)) { + segs.push_back(it_seg_p->trim(left(*it_seg_p),end.value())); break; } else { @@ -407,19 +410,19 @@ class Arr_algebraic_segment_traits_2 { Site_of_point site_of_p, OutputIterator out) const { if(site_of_p==POINT_IN_INTERIOR) { - return x_monotone_segment(cv,p,boost::none, boost::none,out); + return x_monotone_segment(cv,p,std::nullopt, std::nullopt,out); } else if(site_of_p==MIN_ENDPOINT) { return x_monotone_segment(cv, p, - boost::optional(p), - boost::none, + std::optional(p), + std::nullopt, out); } CGAL_assertion(site_of_p==MAX_ENDPOINT); return x_monotone_segment(cv, p, - boost::none, - boost::optional(p), + std::nullopt, + std::optional(p), out); } @@ -468,15 +471,15 @@ class Arr_algebraic_segment_traits_2 { return x_monotone_segment (cv, end_left, - boost::optional(end_left), - boost::optional(end_right), + std::optional(end_left), + std::optional(end_right), out); } else { return x_monotone_segment (cv, end_right, - boost::optional(end_left), - boost::optional(end_right), + std::optional(end_left), + std::optional(end_right), out); } } @@ -655,4 +658,4 @@ class Arr_algebraic_segment_traits_2 { #include -#endif // CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS +#endif // CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS_H diff --git a/thirdparty/CGAL/include/CGAL/Arr_batched_point_location.h b/thirdparty/CGAL/include/CGAL/Arr_batched_point_location.h index 730ac9af..86be5083 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_batched_point_location.h +++ b/thirdparty/CGAL/include/CGAL/Arr_batched_point_location.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_batched_point_location.h $ -// $Id: Arr_batched_point_location.h 0626eb0 2020-06-11T12:32:33+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_batched_point_location.h $ +// $Id: include/CGAL/Arr_batched_point_location.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman @@ -26,7 +26,6 @@ #include #include -#include #include namespace CGAL { @@ -41,7 +40,7 @@ namespace Ss2 = Surface_sweep_2; * \param oi Output: An output iterator for the query results. * \pre The value-type of PointsIterator is Arrangement::Point_2, * and the value-type of OutputIterator is is pair, - * where Result is boost::optional >. * It represents the arrangement feature containing the point. @@ -105,7 +104,7 @@ locate(const Arrangement_on_surface_2& arr, } } - // Obtain a extended traits-class object. + // Obtain an extended traits-class object. const Gt2* geom_traits = arr.geometry_traits(); /* We would like to avoid copy construction of the geometry traits class. @@ -120,7 +119,7 @@ locate(const Arrangement_on_surface_2& arr, * Use the form 'A a(*b);' and not ''A a = b;' to handle the case where A has * only an implicit constructor, (which takes *b as a parameter). */ - typename boost::mpl::if_, const Bgt2&, Bgt2>::type + std::conditional_t, const Bgt2&, Bgt2> ex_traits(*geom_traits); // Define the sweep-line visitor and perform the sweep. diff --git a/thirdparty/CGAL/include/CGAL/Arr_bounded_planar_topology_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_bounded_planar_topology_traits_2.h index b8e7ddb3..3fc86777 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_bounded_planar_topology_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_bounded_planar_topology_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h $ -// $Id: Arr_bounded_planar_topology_traits_2.h 3849f5e 2020-06-14T00:41:25+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h $ +// $Id: include/CGAL/Arr_bounded_planar_topology_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -14,7 +14,7 @@ #ifndef CGAL_ARR_BOUNDED_PLANAR_TOPOLOGY_TRAITS_2_H #define CGAL_ARR_BOUNDED_PLANAR_TOPOLOGY_TRAITS_2_H -#include +#include #include @@ -90,14 +90,10 @@ class Arr_bounded_planar_topology_traits_2 : typedef typename Gt_adaptor_2::Top_side_category Top_side_category; typedef typename Gt_adaptor_2::Right_side_category Right_side_category; - BOOST_MPL_ASSERT - ((boost::is_same< Left_side_category, Arr_oblivious_side_tag >)); - BOOST_MPL_ASSERT - ((boost::is_same< Bottom_side_category, Arr_oblivious_side_tag >)); - BOOST_MPL_ASSERT - ((boost::is_same< Top_side_category, Arr_oblivious_side_tag >)); - BOOST_MPL_ASSERT - ((boost::is_same< Right_side_category, Arr_oblivious_side_tag >)); + static_assert(std::is_same< Left_side_category, Arr_oblivious_side_tag >::value); + static_assert(std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value); + static_assert(std::is_same< Top_side_category, Arr_oblivious_side_tag >::value); + static_assert(std::is_same< Right_side_category, Arr_oblivious_side_tag >::value); //@} /*! \struct @@ -309,7 +305,7 @@ class Arr_bounded_planar_topology_traits_2 : * \pre The curve has a boundary condition in either x or y. * \return An object that wraps the curve end. */ - boost::optional > + std::optional > place_boundary_vertex(Face*, const X_monotone_curve_2&, Arr_curve_end, @@ -318,7 +314,7 @@ class Arr_bounded_planar_topology_traits_2 : { // This function should never be called: CGAL_error(); - return boost::none; + return std::nullopt; } /*! Locate the predecessor halfedge for the given curve around a given @@ -351,13 +347,13 @@ class Arr_bounded_planar_topology_traits_2 : * \pre The curve end is incident to the boundary. * \return An object that contains the curve end. */ - boost::variant + std::variant locate_curve_end(const X_monotone_curve_2&, Arr_curve_end, Arr_parameter_space /* ps_x */, Arr_parameter_space /* ps_y */) { - typedef boost::variant Result; + typedef std::variant Result; // This function should never be called: CGAL_error(); Vertex* v(nullptr); diff --git a/thirdparty/CGAL/include/CGAL/Arr_circle_segment_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_circle_segment_traits_2.h index 18b26a8c..df48714e 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_circle_segment_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_circle_segment_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h $ -// $Id: Arr_circle_segment_traits_2.h 59a0da4 2021-05-19T17:23:53+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h $ +// $Id: include/CGAL/Arr_circle_segment_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -20,16 +20,19 @@ #include /*! \file - * The header file for the Arr_circle_segment_traits_2 class. + * The header file for the Arr_circle_segment_traits_2 class. */ +// Keep the following 2 lines first. +#include +#include +#include + #include #include +#include #include -#include -#include - namespace CGAL { /*! \class @@ -378,6 +381,183 @@ class Arr_circle_segment_traits_2 { } //@} + /// \name Functor definitions for approximations. Used by the landmarks + // point-location strategy and the drawing procedure. + //@{ + typedef double Approximate_number_type; + typedef CGAL::Cartesian Approximate_kernel; + typedef Approximate_kernel::Point_2 Approximate_point_2; + + class Approximate_2 { + protected: + using Traits = Arr_circle_segment_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits the traits. + */ + Approximate_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_circle_segment_traits_2; + + public: + /*! Obtain an approximation of a point coordinate. + * \param p the exact point. + * \param i the coordinate index (either 0 or 1). + * \pre i is either 0 or 1. + * \return An approximation of p's x-coordinate (if i == 0), or an + * approximation of p's y-coordinate (if i == 1). + */ + Approximate_number_type operator()(const Point_2& p, int i) const { + CGAL_precondition((i == 0) || (i == 1)); + return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y())); + } + + /*! Obtain an approximation of a point. + */ + Approximate_point_2 operator()(const Point_2& p) const + { return Approximate_point_2(operator()(p, 0), operator()(p, 1)); } + + /*! Obtain an approximation of an \f$x\f$-monotone curve. + */ + template + OutputIterator operator()(const X_monotone_curve_2& xcv, double error, + OutputIterator oi, bool l2r = true) const { + if (xcv.is_linear()) return approximate_segment(xcv, oi, l2r); + return approximate_arc(xcv, error, oi, l2r);; + } + + private: + /*! Handle segments. + */ + template + OutputIterator approximate_segment(const X_monotone_curve_2& xcv, + OutputIterator oi, + bool l2r = true) const { + // std::cout << "SEGMENT\n"; + auto min_vertex = m_traits.construct_min_vertex_2_object(); + auto max_vertex = m_traits.construct_max_vertex_2_object(); + const auto& src = (l2r) ? min_vertex(xcv) : max_vertex(xcv); + const auto& trg = (l2r) ? max_vertex(xcv) : min_vertex(xcv); + auto xs = CGAL::to_double(src.x()); + auto ys = CGAL::to_double(src.y()); + auto xt = CGAL::to_double(trg.x()); + auto yt = CGAL::to_double(trg.y()); + *oi++ = Approximate_point_2(xs, ys); + *oi++ = Approximate_point_2(xt, yt); + return oi; + } + + template + OutputIterator add_points(double x1, double y1, double t1, + double x2, double y2, double t2, + double error, OutputIterator oi, + Op op, Transform transform) const { + auto tm = (t1 + t2)*0.5; + + // Compute the canocal point where the error is maximal. + double xm, ym; + op(tm, xm, ym); + + auto dx = x2 - x1; + auto dy = y2 - y1; + + // Compute the error; abort if it is below the threshold + auto l = std::sqrt(dx*dx + dy*dy); + auto e = std::abs((xm*dy - ym*dx + x2*y1 - x1*y2) / l); + if (e < error) return oi; + + double x, y; + transform(xm, ym, x, y); + add_points(x1, y1, t1, xm, ym, tm, error, oi, op, transform); + *oi++ = Approximate_point_2(x, y); + add_points(xm, ym, tm, x2, y2, t2, error, oi, op, transform); + return oi; + } + + /*! Compute the circular point given the parameter t and the transform + * data, that is, the center (translation) and the sin and cos of the + * rotation angle. + */ + void circular_point(double r, double t, double& x, double& y) const { + x = r * std::cos(t); + y = r * std::sin(t); + } + + /*! Transform a point. In particular, rotate the canonical point + * (`xc`,`yc`) by an angle, the sine and cosine of which are `sint` and + * `cost`, respectively, and translate by (`cx`,`cy`). + */ + void transform_point(double xc, double yc, double cx, double cy, + double& x, double& y) const { + x = xc + cx; + y = yc + cy; + } + + /*! Handle circular arcs. + */ + template + OutputIterator approximate_arc(const X_monotone_curve_2& xcv, + double error, OutputIterator oi, + bool l2r = true) const { + auto min_vertex = m_traits.construct_min_vertex_2_object(); + auto max_vertex = m_traits.construct_max_vertex_2_object(); + const auto& src = (l2r) ? min_vertex(xcv) : max_vertex(xcv); + const auto& trg = (l2r) ? max_vertex(xcv) : min_vertex(xcv); + auto xs = CGAL::to_double(src.x()); + auto ys = CGAL::to_double(src.y()); + auto xt = CGAL::to_double(trg.x()); + auto yt = CGAL::to_double(trg.y()); + + const typename Kernel::Circle_2& circ = xcv.supporting_circle(); + auto r_sqr = circ.squared_radius(); + auto r = std::sqrt(CGAL::to_double(r_sqr)); + + // Obtain the center: + auto cx = CGAL::to_double(circ.center().x()); + auto cy = CGAL::to_double(circ.center().y()); + + // Inverse transform the source and target + auto xs_t = xs - cx; + auto ys_t = ys - cy; + auto xt_t = xt - cx; + auto yt_t = yt - cy; + + // Compute the parameters ts and tt such that + // source == (x(ts),y(ts)), and + // target == (x(tt),y(tt)) + auto ts = std::atan2(r*ys_t, r*xs_t); + if (ts < 0) ts += 2*CGAL_PI; + auto tt = std::atan2(r*yt_t, r*xt_t); + if (tt < 0) tt += 2*CGAL_PI; + auto orient(xcv.orientation()); + if (xcv.source() != src) orient = CGAL::opposite(orient); + if (orient == COUNTERCLOCKWISE) { + if (tt < ts) tt += 2*CGAL_PI; + } + else { + if (ts < tt) ts += 2*CGAL_PI; + } + + *oi++ = Approximate_point_2(xs, ys); + add_points(xs_t, ys_t, ts, xt_t, yt_t, tt, error, oi, + [&](double tm, double& xm, double& ym) { + circular_point(r, tm, xm, ym); + }, + [&](double xc, double& yc, double& x, double& y) { + transform_point(xc, yc, cx, cy, x, y); + }); + *oi++ = Approximate_point_2(xt, yt); + return oi; + } + }; + + /*! Obtain an Approximate_2 functor object. */ + Approximate_2 approximate_2_object() const { return Approximate_2(*this); } + //@} + /// \name Intersections, subdivisions, and mergings //@{ @@ -404,9 +584,6 @@ class Arr_circle_segment_traits_2 { template OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { - typedef boost::variant - Make_x_monotone_result; - // Increment the serial number of the curve cv, which will serve as its // unique identifier. unsigned int index = 0; @@ -414,22 +591,22 @@ class Arr_circle_segment_traits_2 { if (cv.orientation() == COLLINEAR) { // The curve is a line segment. - *oi++ = Make_x_monotone_result(X_monotone_curve_2(cv.supporting_line(), - cv.source(), - cv.target(), - index)); + *oi++ = X_monotone_curve_2(cv.supporting_line(), + cv.source(), + cv.target(), + index); return oi; } - // Check the case of a degenrate circle (a point). + // Check the case of a degenerate circle (a point). const typename Kernel::Circle_2& circ = cv.supporting_circle(); CGAL::Sign sign_rad = CGAL::sign (circ.squared_radius()); CGAL_precondition (sign_rad != NEGATIVE); if (sign_rad == ZERO) { // Create an isolated point. - *oi++ = Make_x_monotone_result(Point_2(circ.center().x(), - circ.center().y())); + *oi++ = Point_2(circ.center().x(), + circ.center().y()); return oi; } @@ -442,59 +619,59 @@ class Arr_circle_segment_traits_2 { CGAL_assertion (n_vpts == 2); // Subdivide the circle into two arcs (an upper and a lower half). - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - vpts[0], vpts[1], - cv.orientation(), - index)); - - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - vpts[1], vpts[0], - cv.orientation(), - index)); + *oi++ = X_monotone_curve_2(circ, + vpts[0], vpts[1], + cv.orientation(), + index); + + *oi++ = X_monotone_curve_2(circ, + vpts[1], vpts[0], + cv.orientation(), + index); } else { // Act according to the number of vertical tangency points. if (n_vpts == 2) { // Subdivide the circular arc into three x-monotone arcs. - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - cv.source(), vpts[0], - cv.orientation(), - index)); - - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - vpts[0], vpts[1], - cv.orientation(), - index)); - - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - vpts[1], - cv.target(), - cv.orientation(), - index)); + *oi++ = X_monotone_curve_2(circ, + cv.source(), vpts[0], + cv.orientation(), + index); + + *oi++ = X_monotone_curve_2(circ, + vpts[0], vpts[1], + cv.orientation(), + index); + + *oi++ = X_monotone_curve_2(circ, + vpts[1], + cv.target(), + cv.orientation(), + index); } else if (n_vpts == 1) { // Subdivide the circular arc into two x-monotone arcs. - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - cv.source(), - vpts[0], - cv.orientation(), - index)); - - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - vpts[0], - cv.target(), - cv.orientation(), - index)); + *oi++ = X_monotone_curve_2(circ, + cv.source(), + vpts[0], + cv.orientation(), + index); + + *oi++ = X_monotone_curve_2(circ, + vpts[0], + cv.target(), + cv.orientation(), + index); } else { CGAL_assertion(n_vpts == 0); // The arc is already x-monotone: - *oi++ = Make_x_monotone_result(X_monotone_curve_2(circ, - cv.source(), - cv.target(), - cv.orientation(), - index)); + *oi++ = X_monotone_curve_2(circ, + cv.source(), + cv.target(), + cv.orientation(), + index); } } @@ -702,7 +879,7 @@ class Arr_circle_segment_traits_2 { m_traits.compare_y_at_x_2_object()); CGAL_precondition_code(Equal_2 equal_2 = m_traits.equal_2_object()); Compare_x_2 compare_x_2 = m_traits.compare_x_2_object(); - // Check whether source and taget are two distinct points and they lie + // Check whether source and target are two distinct points and they lie // on the line. CGAL_precondition(compare_y_at_x_2(src, xcv) == EQUAL); CGAL_precondition(compare_y_at_x_2(tgt, xcv) == EQUAL); diff --git a/thirdparty/CGAL/include/CGAL/Arr_circular_arc_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_circular_arc_traits_2.h index aa73a86e..b8fe7e30 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_circular_arc_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_circular_arc_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h $ -// $Id: Arr_circular_arc_traits_2.h 1b23ac2 2020-07-02T19:10:00+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h $ +// $Id: include/CGAL/Arr_circular_arc_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion @@ -178,17 +178,17 @@ class Arr_circular_arc_traits_2 { template OutputIterator operator()(const Curve_2& arc, OutputIterator oi) const { - typedef boost::variant + typedef std::variant Make_x_monotone_result; - std::vector objs; + std::vector objs; CircularKernel().make_x_monotone_2_object()(arc, std::back_inserter(objs)); for (const auto& obj : objs) { - if (const auto* p = CGAL::object_cast(&obj)) { + if (const auto* p = std::get_if(&obj)) { *oi++ = Make_x_monotone_result(*p); continue; } - if (const auto* xcv = CGAL::object_cast(&obj)) { + if (const auto* xcv = std::get_if(&obj)) { *oi++ = Make_x_monotone_result(*xcv); continue; } diff --git a/thirdparty/CGAL/include/CGAL/Arr_circular_line_arc_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_circular_line_arc_traits_2.h index abfa2217..380aa3d9 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_circular_line_arc_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_circular_line_arc_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h $ -// $Id: Arr_circular_line_arc_traits_2.h af94033 2021-01-07T16:39:03+01:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h $ +// $Id: include/CGAL/Arr_circular_line_arc_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Julien Hazebrouck @@ -35,7 +35,7 @@ #include -#include +#include #include #include @@ -51,17 +51,17 @@ namespace CGAL { OutputIterator res2) { typedef typename CK::Circular_arc_point_2 Point_2; - typedef boost::variant X_monotone_curve_2; - typedef boost::variant + typedef std::variant X_monotone_curve_2; + typedef std::variant Make_x_monotone_result; for (auto it = res1.begin(); it != res1.end(); ++it) { if (const Arc1* arc = CGAL::object_cast(&*it)) { - boost::variant v = *arc; + std::variant v = *arc; *res2++ = Make_x_monotone_result(v); } else if (const Arc2* line = CGAL::object_cast(&*it)) { - boost::variant v = *line; + std::variant v = *line; *res2++ = Make_x_monotone_result(v); } else if (const Point_2* p = CGAL::object_cast(&*it)) { @@ -81,27 +81,27 @@ namespace CGAL { Circular_arc_point_2; result_type - operator()(const boost::variant< Arc1, Arc2 > &a1, - const boost::variant< Arc1, Arc2 > &a2, + operator()(const std::variant< Arc1, Arc2 > &a1, + const std::variant< Arc1, Arc2 > &a2, const Circular_arc_point_2 &p) const { - if ( const Arc1* arc1 = boost::get( &a1 ) ){ - if ( const Arc1* arc2 = boost::get( &a2 ) ){ + if ( const Arc1* arc1 = std::get_if( &a1 ) ){ + if ( const Arc1* arc2 = std::get_if( &a2 ) ){ return CircularKernel() .compare_y_to_right_2_object()(*arc1, *arc2, p); } else { - const Arc2* arc2e = boost::get( &a2 ); + const Arc2* arc2e = std::get_if( &a2 ); return CircularKernel() .compare_y_to_right_2_object()(*arc1, *arc2e, p); } } - const Arc2* arc1 = boost::get( &a1 ); - if ( const Arc1* arc2 = boost::get( &a2 ) ){ + const Arc2* arc1 = std::get_if( &a1 ); + if ( const Arc1* arc2 = std::get_if( &a2 ) ){ return CircularKernel() .compare_y_to_right_2_object()(*arc1, *arc2, p); } - const Arc2* arc2e = boost::get( &a2 ); + const Arc2* arc2e = std::get_if( &a2 ); return CircularKernel() .compare_y_to_right_2_object()(*arc1, *arc2e, p); } @@ -110,7 +110,6 @@ namespace CGAL { template class Variant_Equal_2 - : public boost::static_visitor { public : @@ -136,7 +135,7 @@ namespace CGAL { : public CircularKernel::Equal_2 { public: - typedef boost::variant< Arc1, Arc2 > Curve_2; + typedef std::variant< Arc1, Arc2 > Curve_2; typedef bool result_type; using CircularKernel::Equal_2::operator(); typedef typename CircularKernel::Circular_arc_point_2 @@ -169,7 +168,7 @@ namespace CGAL { result_type operator()(const Curve_2 &a0, const Curve_2 &a1) const { - return boost::apply_visitor + return std::visit ( Variant_Equal_2(), a0, a1 ); } @@ -188,20 +187,20 @@ namespace CGAL { result_type operator() (const Circular_arc_point_2 &p, - const boost::variant< Arc1, Arc2 > &A1) const + const std::variant< Arc1, Arc2 > &A1) const { - if ( const Arc1* arc1 = boost::get( &A1 ) ){ + if ( const Arc1* arc1 = std::get_if( &A1 ) ){ return CircularKernel().compare_y_at_x_2_object()(p, *arc1); } else { - const Arc2* arc2 = boost::get( &A1 ); + const Arc2* arc2 = std::get_if( &A1 ); return CircularKernel().compare_y_at_x_2_object()(p, *arc2); } } }; template - class Variant_Do_overlap_2 : public boost::static_visitor + class Variant_Do_overlap_2 { public: template < typename T > @@ -229,10 +228,10 @@ namespace CGAL { typedef bool result_type; result_type - operator()(const boost::variant< Arc1, Arc2 > &A0, - const boost::variant< Arc1, Arc2 > &A1) const + operator()(const std::variant< Arc1, Arc2 > &A0, + const std::variant< Arc1, Arc2 > &A1) const { - return boost::apply_visitor + return std::visit ( Variant_Do_overlap_2(), A0, A1 ); } }; @@ -248,23 +247,17 @@ namespace CGAL { template < class OutputIterator,class Not_X_Monotone > OutputIterator - operator()(const boost::variant &A, + operator()(const std::variant &A, OutputIterator res) const { - if ( const Arc1* arc1 = boost::get( &A ) ) { - std::vector container; - CircularKernel(). - make_x_monotone_2_object()(*arc1,std::back_inserter(container)); - return object_to_object_variant - (container, res); + if ( const Arc1* arc1 = std::get_if( &A ) ) { + return CircularKernel(). + make_x_monotone_2_object()(*arc1, res); } else { - const Arc2* arc2 = boost::get( &A ); - std::vector container; - CircularKernel(). - make_x_monotone_2_object()(*arc2,std::back_inserter(container)); - return object_to_object_variant - (container, res); + const Arc2* arc2 = std::get_if( &A ); + return CircularKernel(). + make_x_monotone_2_object()(*arc2, res); } } }; @@ -278,23 +271,23 @@ namespace CGAL { template < class OutputIterator > OutputIterator - operator()(const boost::variant< Arc1, Arc2 > &c1, - const boost::variant< Arc1, Arc2 > &c2, + operator()(const std::variant< Arc1, Arc2 > &c1, + const std::variant< Arc1, Arc2 > &c2, OutputIterator oi) const { - if ( const Arc1* arc1 = boost::get( &c1 ) ){ - if ( const Arc1* arc2 = boost::get( &c2 ) ){ + if ( const Arc1* arc1 = std::get_if( &c1 ) ){ + if ( const Arc1* arc2 = std::get_if( &c2 ) ){ return CircularKernel().intersect_2_object()(*arc1, *arc2, oi); } - const Arc2* arc2 = boost::get( &c2 ); + const Arc2* arc2 = std::get_if( &c2 ); return CircularKernel().intersect_2_object()(*arc1, *arc2, oi); } - const Arc2* arc1e = boost::get( &c1 ); - if ( const Arc1* arc2 = boost::get( &c2 ) ){ + const Arc2* arc1e = std::get_if( &c1 ); + if ( const Arc1* arc2 = std::get_if( &c2 ) ){ return CircularKernel().intersect_2_object()(*arc1e, *arc2, oi); } - const Arc2* arc2 = boost::get( &c2 ); + const Arc2* arc2 = std::get_if( &c2 ); return CircularKernel().intersect_2_object()(*arc1e, *arc2, oi); } @@ -309,13 +302,13 @@ namespace CGAL { Circular_arc_point_2; typedef void result_type; result_type - operator()(const boost::variant< Arc1, Arc2 > &A, + operator()(const std::variant< Arc1, Arc2 > &A, const Circular_arc_point_2 &p, - boost::variant< Arc1, Arc2 > &ca1, - boost::variant< Arc1, Arc2 > &ca2) const + std::variant< Arc1, Arc2 > &ca1, + std::variant< Arc1, Arc2 > &ca2) const { // TODO : optimize by extracting the references from the variants ? - if ( const Arc1* arc1 = boost::get( &A ) ){ + if ( const Arc1* arc1 = std::get_if( &A ) ){ Arc1 carc1; Arc1 carc2; CircularKernel().split_2_object()(*arc1, p, carc1, carc2); @@ -325,7 +318,7 @@ namespace CGAL { } else{ - const Arc2* arc2 = boost::get( &A ); + const Arc2* arc2 = std::get_if( &A ); Arc2 cline1; Arc2 cline2; CircularKernel().split_2_object()(*arc2, p, cline1, cline2); @@ -340,8 +333,6 @@ namespace CGAL { template class Variant_Construct_min_vertex_2 - : public boost::static_visitor - { typedef typename CircularKernel::Circular_arc_point_2 Circular_arc_point_2; @@ -352,7 +343,7 @@ namespace CGAL { //typedef const result_type& qualified_result_type; template < typename T > - //typename boost::remove_reference::type + //std::remove_reference_t Circular_arc_point_2 operator()(const T &a) const { @@ -370,11 +361,11 @@ namespace CGAL { typedef Point_2 result_type; //typedef const result_type& qualified_result_type; - //typename boost::remove_reference::type + //std::remove_reference_t result_type - operator() (const boost::variant< Arc1, Arc2 > & cv) const + operator() (const std::variant< Arc1, Arc2 > & cv) const { - return boost::apply_visitor + return std::visit ( Variant_Construct_min_vertex_2(), cv ); } }; @@ -385,8 +376,6 @@ namespace CGAL { template class Variant_Construct_max_vertex_2 - : public boost::static_visitor { typedef typename CircularKernel::Circular_arc_point_2 Circular_arc_point_2; @@ -397,7 +386,7 @@ namespace CGAL { //typedef const result_type& qualified_result_type; template < typename T > - //typename boost::remove_reference::type + //std::remove_reference_t Circular_arc_point_2 operator()(const T &a) const { @@ -420,18 +409,17 @@ namespace CGAL { typedef Point_2 result_type; //typedef const result_type& qualified_result_type; - //typename boost::remove_reference::type + //std::remove_reference result_type - operator() (const boost::variant< Arc1, Arc2 > & cv) const + operator() (const std::variant< Arc1, Arc2 > & cv) const { - return boost::apply_visitor + return std::visit ( Variant_Construct_max_vertex_2(), cv ); } }; template class Variant_Is_vertical_2 - : public boost::static_visitor { public : @@ -449,9 +437,9 @@ namespace CGAL { public: typedef bool result_type; - bool operator() (const boost::variant< Arc1, Arc2 >& cv) const + bool operator() (const std::variant< Arc1, Arc2 >& cv) const { - return boost::apply_visitor + return std::visit ( Variant_Is_vertical_2(), cv ); } }; @@ -459,7 +447,7 @@ namespace CGAL { } - // a empty class used to have different types between Curve_2 and X_monotone_curve_2 + // an empty class used to have different types between Curve_2 and X_monotone_curve_2 // in Arr_circular_line_arc_traits_2. namespace internal_Argt_traits{ struct Not_X_Monotone{}; @@ -499,8 +487,8 @@ namespace CGAL { typedef internal_Argt_traits::Not_X_Monotone Not_X_Monotone; - typedef boost::variant< Arc1, Arc2, Not_X_Monotone > Curve_2; - typedef boost::variant< Arc1, Arc2 > X_monotone_curve_2; + typedef std::variant< Arc1, Arc2, Not_X_Monotone > Curve_2; + typedef std::variant< Arc1, Arc2 > X_monotone_curve_2; private: CircularKernel ck; diff --git a/thirdparty/CGAL/include/CGAL/Arr_conic_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_conic_traits_2.h index ab1048d1..e659993a 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_conic_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_conic_traits_2.h @@ -3,13 +3,14 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h $ -// $Id: Arr_conic_traits_2.h c0838c5 2021-12-16T16:33:43+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h $ +// $Id: include/CGAL/Arr_conic_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s): Ron Wein // Waqar Khan +// Efi Fogel #ifndef CGAL_ARR_CONIC_TRAITS_2_H #define CGAL_ARR_CONIC_TRAITS_2_H @@ -22,19 +23,28 @@ * The conic traits-class for the arrangement package. */ +// Keep the following 2 lines first. +#include #include #include +#include +#include +#include + +#include #include #include +#include #include #include #include +#include +#include namespace CGAL { -/*! - * \class A traits class for maintaining an arrangement of conic arcs (bounded +/*! \class A traits class for maintaining an arrangement of conic arcs (bounded * segments of algebraic curves of degree 2 at most). * * The class is templated with two parameters: @@ -46,14 +56,12 @@ namespace CGAL { * Nt_traits A traits class for performing various operations on the integer, * rational and algebraic types. */ -template -class Arr_conic_traits_2 -{ +template +class Arr_conic_traits_2 { public: - - typedef Rat_kernel_ Rat_kernel; - typedef Alg_kernel_ Alg_kernel; - typedef Nt_traits_ Nt_traits; + typedef RatKernel Rat_kernel; + typedef AlgKernel Alg_kernel; + typedef NtTraits Nt_traits; typedef typename Rat_kernel::FT Rational; typedef typename Rat_kernel::Point_2 Rat_point_2; @@ -62,16 +70,15 @@ class Arr_conic_traits_2 typedef typename Rat_kernel::Circle_2 Rat_circle_2; typedef typename Alg_kernel::FT Algebraic; + typedef typename Alg_kernel::Point_2 Alg_point_2; typedef typename Nt_traits::Integer Integer; - typedef Arr_conic_traits_2 Self; - // Category tags: typedef Tag_true Has_left_category; typedef Tag_true Has_merge_category; typedef Tag_false Has_do_intersect_category; - //typedef boost::true_type Has_line_segment_constructor; + //typedef std::true_type Has_line_segment_constructor; typedef Arr_oblivious_side_tag Left_side_category; typedef Arr_oblivious_side_tag Bottom_side_category; @@ -79,36 +86,77 @@ class Arr_conic_traits_2 typedef Arr_oblivious_side_tag Right_side_category; // Traits objects: - typedef _Conic_arc_2 Curve_2; - typedef _Conic_x_monotone_arc_2 X_monotone_curve_2; - typedef _Conic_point_2 Point_2; - typedef unsigned int Multiplicity; + typedef Conic_arc_2 Curve_2; + typedef Conic_x_monotone_arc_2 X_monotone_curve_2; + typedef Conic_point_2 Point_2; + typedef size_t Multiplicity; private: - // Type definition for the intersection points mapping. - typedef typename X_monotone_curve_2::Conic_id Conic_id; - typedef typename X_monotone_curve_2::Intersection_point Intersection_point; - typedef typename X_monotone_curve_2::Intersection_map Intersection_map; + using Conic_id = typename Point_2::Conic_id; + using Conic_pair = std::pair; + + /*! \struct Less functor for Conic_pair. + */ + struct Less_conic_pair { + bool operator()(const Conic_pair& cp1, const Conic_pair& cp2) const { + // Compare the pairs of IDs lexicographically. + return ((cp1.first < cp2.first) || + ((cp1.first == cp2.first) && (cp1.second < cp2.second))); + } + }; - mutable Intersection_map inter_map; // Mapping conic pairs to their + typedef std::pair Intersection_point; + typedef std::list Intersection_list; + typedef std::map + Intersection_map; + typedef typename Intersection_map::iterator Intersection_map_iterator; + + + typedef std::shared_ptr Shared_rat_kernel; + typedef std::shared_ptr Shared_alg_kernel; + typedef std::shared_ptr Shared_nt_traits; + + const Shared_rat_kernel m_rat_kernel; + const Shared_alg_kernel m_alg_kernel; + const Shared_nt_traits m_nt_traits; + + mutable Intersection_map m_inter_map; // Mapping conic pairs to their // intersection points. public: + /*! Default constructor. + */ + Arr_conic_traits_2() {} - /*! - * Default constructor. + /*! Construct from resources. */ - Arr_conic_traits_2 () + Arr_conic_traits_2(Shared_rat_kernel rat_kernel, + Shared_alg_kernel alg_kernel, + Shared_nt_traits nt_traits) : + m_rat_kernel(rat_kernel), + m_alg_kernel(alg_kernel), + m_nt_traits(nt_traits) {} - /*! Get the next conic index. */ - static unsigned int get_index () - { + /*! Obtain the rational kernel. + */ + Shared_rat_kernel rat_kernel() const { return m_rat_kernel; } + + /*! Obtain the algebraic kernel. + */ + Shared_alg_kernel alg_kernel() const { return m_alg_kernel; } + + /*! Obtain the nt traits. + */ + Shared_nt_traits nt_traits() const { return m_nt_traits; } + + /*! Obtain the next conic index. */ + static size_t get_index() { #ifdef CGAL_NO_ATOMIC - static unsigned int index; + static size_t index; #else - static std::atomic index; + static std::atomic index; #endif return (++index); } @@ -116,753 +164,4109 @@ class Arr_conic_traits_2 /// \name Basic functor definitions. //@{ - class Compare_x_2 - { + class Compare_x_2 { + protected: + using Traits = Arr_conic_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits The traits. + */ + Compare_x_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_conic_traits_2; + public: - /*! - * Compare the x-coordinates of two points. + /*! Compare the x-coordinates of two points. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2); * SMALLER if x(p1) < x(p2); * EQUAL if x(p1) = x(p2). */ - Comparison_result operator() (const Point_2 & p1, const Point_2 & p2) const - { - Alg_kernel ker; - return (ker.compare_x_2_object() (p1, p2)); - } + Comparison_result operator() (const Point_2& p1, const Point_2& p2) const + { return m_traits.m_alg_kernel->compare_x_2_object()(p1, p2); } }; - /*! Get a Compare_x_2 functor object. */ - Compare_x_2 compare_x_2_object () const - { - return Compare_x_2(); - } + /*! Obtain a Compare_x_2 functor object. */ + Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } + + class Compare_xy_2 { + protected: + using Traits = Arr_conic_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits The traits. + */ + Compare_xy_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_conic_traits_2; - class Compare_xy_2 - { public: - /*! - * Compares two points lexigoraphically: by x, then by y. + /*! Compares two points lexigoraphically: by x, then by y. * \param p1 The first point. * \param p2 The second point. - * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2); - * SMALLER if x(p1) < x(p2), or if x(p1) = x(p2) and y(p1) < y(p2); - * EQUAL if the two points are equal. + * \return `LARGER` if `x(p1) > x(p2)`, or if `x(p1) = x(p2)` and `y(p1) > y(p2)`; + * `SMALLER` if `x(p1) < x(p2)`, or if `x(p1) = x(p2)` and `y(p1) < y(p2)`; + * `EQUAL` if the two points are equal. */ - Comparison_result operator() (const Point_2& p1, const Point_2& p2) const - { - Alg_kernel ker; - return (ker.compare_xy_2_object() (p1, p2)); - } + Comparison_result operator()(const Point_2& p1, const Point_2& p2) const + { return m_traits.m_alg_kernel->compare_xy_2_object()(p1, p2); } }; - /*! Get a Compare_xy_2 functor object. */ - Compare_xy_2 compare_xy_2_object () const - { - return Compare_xy_2(); - } + /*! Obtain a Compare_xy_2 functor object. */ + Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); } - class Construct_min_vertex_2 - { + class Construct_min_vertex_2 { public: - /*! - * Get the left endpoint of the x-monotone curve (segment). - * \param cv The curve. + /*! Obtain the left endpoint of an x-monotone arc. + * \param cv The arc. * \return The left endpoint. */ - const Point_2& operator() (const X_monotone_curve_2 & cv) const - { - return (cv.left()); - } + const Point_2& operator()(const X_monotone_curve_2& xcv) const + { return xcv.left(); } }; - /*! Get a Construct_min_vertex_2 functor object. */ - Construct_min_vertex_2 construct_min_vertex_2_object () const - { - return Construct_min_vertex_2(); - } + /*! Obtain a Construct_min_vertex_2 functor object. */ + Construct_min_vertex_2 construct_min_vertex_2_object() const + { return Construct_min_vertex_2(); } - class Construct_max_vertex_2 - { + class Construct_max_vertex_2 { public: - /*! - * Get the right endpoint of the x-monotone curve (segment). - * \param cv The curve. + /*! Obtain the right endpoint of the x-monotone arc. + * \param cv The arc. * \return The right endpoint. */ - const Point_2& operator() (const X_monotone_curve_2 & cv) const - { - return (cv.right()); - } + const Point_2& operator()(const X_monotone_curve_2& xcv) const + { return xcv.right(); } }; - /*! Get a Construct_max_vertex_2 functor object. */ - Construct_max_vertex_2 construct_max_vertex_2_object () const - { - return Construct_max_vertex_2(); - } + /*! Obtain a Construct_max_vertex_2 functor object. */ + Construct_max_vertex_2 construct_max_vertex_2_object() const + { return Construct_max_vertex_2(); } - class Is_vertical_2 - { + class Is_vertical_2 { public: - /*! - * Check whether the given x-monotone curve is a vertical segment. - * \param cv The curve. - * \return (true) if the curve is a vertical segment; (false) otherwise. + /*! Check whether a given x-monotone arc is a vertical segment. + * \param cv The vertical segment. + * \return `true` if the arc is a vertical segment; `false` otherwise. */ - bool operator() (const X_monotone_curve_2& cv) const - { - return (cv.is_vertical()); - } + bool operator()(const X_monotone_curve_2& cv) const + { return cv.is_vertical(); } }; - /*! Get an Is_vertical_2 functor object. */ - Is_vertical_2 is_vertical_2_object () const - { - return Is_vertical_2(); - } + /*! Obtain an Is_vertical_2 functor object. */ + Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); } + + class Compare_y_at_x_2 { + protected: + using Traits = Arr_conic_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits The traits. + */ + Compare_y_at_x_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_conic_traits_2; - class Compare_y_at_x_2 - { public: - /*! - * Return the location of the given point with respect to the input curve. - * \param cv The curve. + /*! Return the location of a given point with respect to an input arc. + * \param xcv The arc. * \param p The point. - * \pre p is in the x-range of cv. - * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve; - * LARGER if y(p) > cv(x(p)), i.e. the point is above the curve; - * EQUAL if p lies on the curve. + * \pre `p` is in the \f$x\f$-range of `xcv`. + * \return `SMALLER` if `y(p) < xcv(x(p))`, i.e. the point is below the arc; + * `LARGER` if `y(p) > xcv(x(p))`, i.e. the point is above the arc; + * `EQUAL` if `p` lies on the curve. */ - Comparison_result operator() (const Point_2 & p, - const X_monotone_curve_2 & cv) const - { - Alg_kernel ker; + Comparison_result operator()(const Point_2& p, + const X_monotone_curve_2& xcv) const { + auto cmp_y = m_traits.m_alg_kernel->compare_y_2_object(); - if (cv.is_vertical()) - { + if (xcv.is_vertical()) { // A special treatment for vertical segments: // In case p has the same x c-ordinate of the vertical segment, compare // it to the segment endpoints to determine its position. - Comparison_result res1 = ker.compare_y_2_object() (p, cv.left()); - Comparison_result res2 = ker.compare_y_2_object() (p, cv.right()); - - if (res1 == res2) - return (res1); - else - return (EQUAL); + Comparison_result res1 = cmp_y(p, xcv.left()); + Comparison_result res2 = cmp_y(p, xcv.right()); + return (res1 == res2) ? res1 : EQUAL; } // Check whether the point is exactly on the curve. - if (cv.contains_point(p)) - return (EQUAL); - - // Get a point q on the x-monotone arc with the same x coordinate as p. - Comparison_result x_res; - Point_2 q; - - if ((x_res = ker.compare_x_2_object() (p, cv.left())) == EQUAL) - { - q = cv.left(); - } - else - { - CGAL_precondition (x_res != SMALLER); + if (m_traits.contains_point(xcv, p)) return EQUAL; - if ((x_res = ker.compare_x_2_object() (p, cv.right())) == EQUAL) - { - q = cv.right(); - } - else - { - CGAL_precondition (x_res != LARGER); + // Obtain a point q on the x-monotone arc with the same x coordinate as p. + Point_2 q; - q = cv.point_at_x (p); + auto cmp_x = m_traits.m_alg_kernel->compare_x_2_object(); + Comparison_result x_res_left = cmp_x(p, xcv.left()); + if (x_res_left == EQUAL) q = xcv.left(); + else { + CGAL_precondition(x_res_left != SMALLER); + auto x_res_right = cmp_x(p, xcv.right()); + if (x_res_right == EQUAL) q = xcv.right(); + else { + CGAL_precondition(x_res_right != LARGER); + q = m_traits.point_at_x(xcv, p); } } // Compare p with the a point of the curve with the same x coordinate. - return (ker.compare_y_2_object() (p, q)); + return cmp_y(p, q); } }; - /*! Get a Compare_y_at_x_2 functor object. */ - Compare_y_at_x_2 compare_y_at_x_2_object () const - { - return Compare_y_at_x_2(); - } + /*! Obtain a Compare_y_at_x_2 functor object. */ + Compare_y_at_x_2 compare_y_at_x_2_object() const + { return Compare_y_at_x_2(*this); } + + class Compare_y_at_x_left_2 { + protected: + using Traits = Arr_conic_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits The traits. + */ + Compare_y_at_x_left_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_conic_traits_2; - class Compare_y_at_x_left_2 - { public: - /*! - * Compares the y value of two x-monotone curves immediately to the left - * of their intersection point. - * \param cv1 The first curve. - * \param cv2 The second curve. + /*! Compares the \f$y\f$ value of two \f$x\f$-monotone arcs immediately + * to the left of their intersection point. + * \param xcv1 The first arc. + * \param xcv2 The second arc. * \param p The intersection point. - * \pre The point p lies on both curves, and both of them must be also be + * \pre The point `p` lies on both curves, and both of them must be also be * defined (lexicographically) to its left. - * \return The relative position of cv1 with respect to cv2 immdiately to - * the left of p: SMALLER, LARGER or EQUAL. + * \return The relative position of `xcv1` with respect to `xcv2` immdiately + * to the left of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ - Comparison_result operator() (const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2, - const Point_2& p) const + Comparison_result operator()(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2, + const Point_2& p) const { // Make sure that p lies on both curves, and that both are defined to its // left (so their left endpoint is lexicographically smaller than p). - CGAL_precondition (cv1.contains_point (p) && - cv2.contains_point (p)); + CGAL_precondition(m_traits.contains_point(xcv1, p) && + m_traits.contains_point(xcv2, p)); - CGAL_precondition_code ( - Alg_kernel ker; - ); - CGAL_precondition (ker.compare_xy_2_object() (p, - cv1.left()) == LARGER && - ker.compare_xy_2_object() (p, - cv2.left()) == LARGER); + CGAL_precondition_code(const auto ker = m_traits.m_alg_kernel); + CGAL_precondition(ker->compare_xy_2_object()(p, xcv1.left()) == LARGER && + ker->compare_xy_2_object()(p, xcv2.left()) == LARGER); // If one of the curves is vertical, it is below the other one. - if (cv1.is_vertical()) - { - if (cv2.is_vertical()) - // Both are vertical: - return (EQUAL); - else - return (SMALLER); - } - else if (cv2.is_vertical()) - { - return (LARGER); - } + if (xcv1.is_vertical()) return (xcv2.is_vertical()) ? EQUAL : SMALLER; + else if (xcv2.is_vertical()) return LARGER; // Compare the two curves immediately to the left of p: - return (cv1.compare_to_left (cv2, p)); + return compare_to_left(xcv1, xcv2, p); } - }; - - /*! Get a Compare_y_at_x_left_2 functor object. */ - Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const - { - return Compare_y_at_x_left_2(); - } - class Compare_y_at_x_right_2 - { - public: - /*! - * Compares the y value of two x-monotone curves immediately to the right - * of their intersection point. - * \param cv1 The first curve. - * \param cv2 The second curve. - * \param p The intersection point. - * \pre The point p lies on both curves, and both of them must be also be - * defined (lexicographically) to its right. - * \return The relative position of cv1 with respect to cv2 immdiately to - * the right of p: SMALLER, LARGER or EQUAL. + private: + /*! Compare two arcs immediately to the leftt of their intersection point. + * \param xcv1 The first compared arc. + * \param xcv2 The second compared arc. + * \param p The reference intersection point. + * \return The relative position of the arcs to the left of `p`. + * \pre Both arcs we compare are not vertical segments. */ - Comparison_result operator() (const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2, - const Point_2& p) const - { - // Make sure that p lies on both curves, and that both are defined to its - // left (so their left endpoint is lexicographically smaller than p). - CGAL_precondition (cv1.contains_point (p) && - cv2.contains_point (p)); + Comparison_result compare_to_left(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2, + const Point_2& p) const { + CGAL_precondition(! xcv1.is_vertical() && ! xcv2.is_vertical()); - CGAL_precondition_code ( - Alg_kernel ker; - ); + // In case one arc is facing upwards and another facing downwards, it is + // clear that the one facing upward is above the one facing downwards. + if (m_traits.has_same_supporting_conic(xcv1, xcv2)) { + if (xcv1.test_flag(X_monotone_curve_2::FACING_UP) && + xcv2.test_flag(X_monotone_curve_2::FACING_DOWN)) + return LARGER; + else if (xcv1.test_flag(X_monotone_curve_2::FACING_DOWN) && + xcv2.test_flag(X_monotone_curve_2::FACING_UP)) + return SMALLER; - CGAL_precondition (ker.compare_xy_2_object() (p, - cv1.right()) == SMALLER && - ker.compare_xy_2_object() (p, - cv2.right()) == SMALLER); + // In this case the two arcs overlap. + CGAL_assertion(xcv1.facing_mask() == xcv2.facing_mask()); - // If one of the curves is vertical, it is above the other one. - if (cv1.is_vertical()) - { - if (cv2.is_vertical()) - // Both are vertical: - return (EQUAL); - else - return (LARGER); - } - else if (cv2.is_vertical()) - { - return (SMALLER); + return EQUAL; } - // Compare the two curves immediately to the right of p: - return (cv1.compare_to_right (cv2, p)); - } - }; - - /*! Get a Compare_y_at_x_right_2 functor object. */ - Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const - { - return Compare_y_at_x_right_2(); - } - - class Equal_2 - { - public: - /*! - * Check if the two x-monotone curves are the same (have the same graph). - * \param cv1 The first curve. - * \param cv2 The second curve. - * \return (true) if the two curves are the same; (false) otherwise. - */ - bool operator() (const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2) const - { - if (&cv1 == &cv2) - return (true); + // Compare the slopes of the two arcs at p, using their first-order + // partial derivatives. + Algebraic slope1_numer, slope1_denom; + Algebraic slope2_numer, slope2_denom; - return (cv1.equals (cv2)); - } + xcv1.derive_by_x_at(p, 1, slope1_numer, slope1_denom); + xcv2.derive_by_x_at(p, 1, slope2_numer, slope2_denom); - /*! - * Check if the two points are the same. - * \param p1 The first point. - * \param p2 The second point. - * \return (true) if the two point are the same; (false) otherwise. - */ - bool operator() (const Point_2& p1, const Point_2& p2) const - { - if (&p1 == &p2) - return (true); + // Check if any of the slopes is vertical. + const bool is_vertical_slope1 = (CGAL::sign (slope1_denom) == ZERO); + const bool is_vertical_slope2 = (CGAL::sign (slope2_denom) == ZERO); - Alg_kernel ker; - return (ker.compare_xy_2_object() (p1, p2) == EQUAL); - } - }; + if (! is_vertical_slope1 && ! is_vertical_slope2) { + // The two derivatives at p are well-defined: use them to determine + // which arc is above the other (the one with a larger slope is below). + Comparison_result slope_res = CGAL::compare(slope2_numer*slope1_denom, + slope1_numer*slope2_denom); - /*! Get an Equal_2 functor object. */ - Equal_2 equal_2_object () const - { - return Equal_2(); - } - //@} + if (slope_res != EQUAL) return slope_res; - /// \name Intersections, subdivisions, and mergings - //@{ + // Use the second-order derivative. + xcv1.derive_by_x_at(p, 2, slope1_numer, slope1_denom); + xcv2.derive_by_x_at(p, 2, slope2_numer, slope2_denom); - /*! \class Make_x_monotone_2 - * A functor for subdividing curves into x-monotone curves. - */ - class Make_x_monotone_2 { - typedef Arr_conic_traits_2 Self; + slope_res = CGAL::compare(slope1_numer*slope2_denom, + slope2_numer*slope1_denom); - public: - /*! Subdivide a given conic curve (or conic arc) into x-monotone subcurves - * and insert them to a given output iterator. - * \param cv the curve. - * \param oi the output iterator for the result. Its dereference type is a - * variant that wraps a \c Point_2 or an \c X_monotone_curve_2 - * objects. - * \return the past-the-end iterator. - */ - template - OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const - { - typedef boost::variant - Make_x_monotone_result; + if (slope_res != EQUAL) return (slope_res); - // Increment the serial number of the curve cv, which will serve as its - // unique identifier. - auto index = Self::get_index(); - Conic_id conic_id(index); + // Use the third-order derivative. + xcv1.derive_by_x_at(p, 3, slope1_numer, slope1_denom); + xcv2.derive_by_x_at(p, 3, slope2_numer, slope2_denom); - // Find the points of vertical tangency to cv and act accordingly. - typename Curve_2::Point_2 vtan_ps[2]; - int n_vtan_ps; + slope_res = CGAL::compare(slope2_numer*slope1_denom, + slope1_numer*slope2_denom); - n_vtan_ps = cv.vertical_tangency_points(vtan_ps); + // \todo Handle higher-order derivatives: + CGAL_assertion(slope_res != EQUAL); - if (n_vtan_ps == 0) { - // In case the given curve is already x-monotone: - *oi++ = Make_x_monotone_result(X_monotone_curve_2(cv, conic_id)); - return oi; + return slope_res; } + else if (! is_vertical_slope2) { + // The first arc has a vertical slope at p: check whether it is + // facing upwards or downwards and decide accordingly. + CGAL_assertion(xcv1.facing_mask() != 0); - // Split the conic arc into x-monotone sub-curves. - if (cv.is_full_conic()) { - // Make sure we have two vertical tangency points. - CGAL_assertion(n_vtan_ps == 2); + return (xcv1.test_flag(X_monotone_curve_2::FACING_UP)) ? + LARGER : SMALLER; + } + else if (! is_vertical_slope1) { + // The second arc has a vertical slope at p_int: check whether it is + // facing upwards or downwards and decide accordingly. + CGAL_assertion(xcv2.facing_mask() != 0); - // In case the curve is a full conic, split it into two x-monotone - // arcs, one going from ps[0] to ps[1], and the other from ps[1] to - // ps[0]. - *oi++ = Make_x_monotone_result(X_monotone_curve_2(cv, vtan_ps[0], - vtan_ps[1], - conic_id)); - *oi++ = Make_x_monotone_result(X_monotone_curve_2(cv, vtan_ps[1], - vtan_ps[0], - conic_id)); + return (xcv2.test_flag(X_monotone_curve_2::FACING_UP)) ? + SMALLER : LARGER; } - else { - if (n_vtan_ps == 1) { - // Split the arc into two x-monotone sub-curves: one going from the - // arc source to ps[0], and the other from ps[0] to the target. - *oi++ = Make_x_monotone_result(X_monotone_curve_2(cv, cv.source(), - vtan_ps[0], - conic_id)); - *oi++ = Make_x_monotone_result(X_monotone_curve_2(cv, vtan_ps[0], - cv.target(), - conic_id)); - } - else { - CGAL_assertion(n_vtan_ps == 2); - // Identify the first point we encounter when going from cv's source - // to its target, and the second point we encounter. Note that the - // two endpoints must both be below the line connecting the two - // tangnecy points (or both lies above it). - int ind_first = 0; - int ind_second = 1; - Alg_kernel_ ker; - typename Alg_kernel_::Line_2 line = - ker.construct_line_2_object()(vtan_ps[0], vtan_ps[1]); - const Comparison_result start_pos = - ker.compare_y_at_x_2_object() (cv.source(), line); - const Comparison_result order_vpts = - ker.compare_x_2_object()(vtan_ps[0], vtan_ps[1]); - - CGAL_assertion(start_pos != EQUAL && - ker.compare_y_at_x_2_object()(cv.target(), - line) == start_pos); - CGAL_assertion(order_vpts != EQUAL); + // The two arcs have vertical slopes at p_int: + // First check whether one is facing up and one down. In this case the + // comparison result is trivial. + if (xcv1.test_flag(X_monotone_curve_2::FACING_UP) && + xcv2.test_flag(X_monotone_curve_2::FACING_DOWN)) + return LARGER; + else if (xcv1.test_flag(X_monotone_curve_2::FACING_DOWN) && + xcv2.test_flag(X_monotone_curve_2::FACING_UP)) + return SMALLER; - if (((cv.orientation() == COUNTERCLOCKWISE) && - (start_pos == order_vpts)) || - ((cv.orientation() == CLOCKWISE) && (start_pos != order_vpts))) - { - ind_first = 1; - ind_second = 0; - } + // Compute the second-order derivative by y and act according to it. + xcv1.derive_by_y_at(p, 2, slope1_numer, slope1_denom); + xcv2.derive_by_y_at(p, 2, slope2_numer, slope2_denom); - // Split the arc into three x-monotone sub-curves. - *oi++ = Make_x_monotone_result(X_monotone_curve_2(cv, cv.source(), - vtan_ps[ind_first], - conic_id)); + Comparison_result slope_res = + CGAL::compare(slope2_numer*slope1_denom, slope1_numer*slope2_denom); - *oi++ = Make_x_monotone_result(X_monotone_curve_2(cv, - vtan_ps[ind_first], - vtan_ps[ind_second], - conic_id)); + // If necessary, use the third-order derivative by y. + if (slope_res == EQUAL) { + // \todo Check this! + xcv1.derive_by_y_at(p, 3, slope1_numer, slope1_denom); + xcv2.derive_by_y_at(p, 3, slope2_numer, slope2_denom); - *oi++ = Make_x_monotone_result(X_monotone_curve_2(cv, - vtan_ps[ind_second], - cv.target(), - conic_id)); - } + slope_res = + CGAL::compare(slope2_numer*slope1_denom, slope1_numer*slope2_denom); } - return oi; - } - }; + // \todo Handle higher-order derivatives: + CGAL_assertion(slope_res != EQUAL); - /*! Get a Make_x_monotone_2 functor object. */ - Make_x_monotone_2 make_x_monotone_2_object() const - { return Make_x_monotone_2(); } + // Check whether both are facing up. + if (xcv1.test_flag(X_monotone_curve_2::FACING_UP) && + xcv2.test_flag(X_monotone_curve_2::FACING_UP)) + return ((slope_res == LARGER) ? SMALLER : LARGER); - class Split_2 - { - public: - /*! - * Split a given x-monotone curve at a given point into two sub-curves. - * \param cv The curve to split - * \param p The split point. - * \param c1 Output: The left resulting subcurve (p is its right endpoint). - * \param c2 Output: The right resulting subcurve (p is its left endpoint). - * \pre p lies on cv but is not one of its end-points. - */ - void operator() (const X_monotone_curve_2& cv, const Point_2 & p, - X_monotone_curve_2& c1, X_monotone_curve_2& c2) const - { - cv.split (p, c1, c2); - return; + // Both are facing down. + return slope_res; } - }; - - /*! Get a Split_2 functor object. */ - Split_2 split_2_object () const - { - return Split_2(); - } - - class Intersect_2 { - private: - Intersection_map& _inter_map; // The map of intersection points. - - public: - /*! Constructor. */ - Intersect_2(Intersection_map& map) : _inter_map(map) {} - - /*! Find the intersections of the two given curves and insert them to the - * given output iterator. As two segments may itersect only once, only a - * single will be contained in the iterator. - * \param cv1 The first curve. - * \param cv2 The second curve. - * \param oi The output iterator. - * \return The past-the-end iterator. - */ - template - OutputIterator operator()(const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2, - OutputIterator oi) const - { return (cv1.intersect(cv2, _inter_map, oi)); } - }; - /*! Get an Intersect_2 functor object. */ - Intersect_2 intersect_2_object () const { return (Intersect_2(inter_map)); } - - class Are_mergeable_2 - { - public: - /*! - * Check whether it is possible to merge two given x-monotone curves. - * \param cv1 The first curve. - * \param cv2 The second curve. - * \return (true) if the two curves are mergeable - if they are supported - * by the same line and share a common endpoint; (false) otherwise. - */ - bool operator() (const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2) const - { - return (cv1.can_merge_with (cv2)); - } }; - /*! Get an Are_mergeable_2 functor object. */ - Are_mergeable_2 are_mergeable_2_object () const - { - return Are_mergeable_2(); - } + /*! Obtain a Compare_y_at_x_left_2 functor object. */ + Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const + { return Compare_y_at_x_left_2(*this); } - /*! \class Merge_2 - * A functor that merges two x-monotone arcs into one. - */ - class Merge_2 - { + class Compare_y_at_x_right_2 { protected: - typedef Arr_conic_traits_2 Traits; + using Traits = Arr_conic_traits_2; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits& m_traits; /*! Constructor - * \param traits the traits (in case it has state) + * \param traits the traits. */ - Merge_2(const Traits* traits) : m_traits(traits) {} + Compare_y_at_x_right_2(const Traits& traits) : m_traits(traits) {} friend class Arr_conic_traits_2; public: - /*! - * Merge two given x-monotone curves into a single curve (segment). - * \param cv1 The first curve. - * \param cv2 The second curve. - * \param c Output: The merged curve. - * \pre The two curves are mergeable. - */ - void operator() (const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2, - X_monotone_curve_2& c) const + /*! Compares the `y` value of two \f$x\f$-monotone arcs immediately + * to the right of their intersection point. + * \param xcv1 The first arc. + * \param xcv2 The second arc. + * \param p The intersection point. + * \pre The point `p` lies on both curves, and both of them must be also be + * defined (lexicographically) to its right. + * \return The relative position of `xcv1` with respect to `xcv2` immdiately + * to the right of `p`: `SMALLER`, `LARGER`, or `EQUAL`. + */ + Comparison_result operator()(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2, + const Point_2& p) const { - CGAL_precondition(m_traits->are_mergeable_2_object()(cv2, cv1)); + // Make sure that p lies on both curves, and that both are defined to its + // left (so their left endpoint is lexicographically smaller than p). + CGAL_precondition(m_traits.contains_point(xcv1, p) && + m_traits.contains_point(xcv2, p)); + CGAL_precondition_code(const auto ker = m_traits.m_alg_kernel); + CGAL_precondition_code(auto cmp_xy = ker->compare_xy_2_object()); + CGAL_precondition(cmp_xy(p, xcv1.right()) == SMALLER && + cmp_xy(p, xcv2.right()) == SMALLER); - c = cv1; - c.merge (cv2); - } - }; + // If one of the curves is vertical, it is above the other one. + if (xcv1.is_vertical()) return (xcv2.is_vertical()) ? EQUAL : LARGER; + else if (xcv2.is_vertical()) return SMALLER; - /*! Obtain a Merge_2 functor object. */ - Merge_2 merge_2_object() const - { - return Merge_2(this); - } + // Compare the two curves immediately to the right of p: + return compare_to_right(xcv1, xcv2, p); + } - //@} + private: + /*! Compare two arcs immediately to the right of their intersection point. + * \param xcv1 The first compared arc. + * \param xcv2 The second compared arc. + * \param p The reference intersection point. + * \return The relative position of the arcs to the right of `p`. + * \pre Both arcs we compare are not vertical segments. + */ + Comparison_result compare_to_right(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2, + const Point_2& p) const { + CGAL_precondition(! xcv1.is_vertical() && ! xcv2.is_vertical()); - /// \name Functor definitions for the landmarks point-location strategy. - //@{ - typedef double Approximate_number_type; + // In case one arc is facing upwards and another facing downwards, it is + // clear that the one facing upward is above the one facing downwards. + if (m_traits.has_same_supporting_conic(xcv1, xcv2)) { + if (xcv1.test_flag(X_monotone_curve_2::FACING_UP) && + xcv2.test_flag(X_monotone_curve_2::FACING_DOWN)) + return LARGER; + else if (xcv1.test_flag(X_monotone_curve_2::FACING_DOWN) && + xcv2.test_flag(X_monotone_curve_2::FACING_UP)) + return SMALLER; - class Approximate_2 - { - public: + // In this case the two arcs overlap. + CGAL_assertion(xcv1.facing_mask() == xcv2.facing_mask()); + return EQUAL; + } - /*! - * Return an approximation of a point coordinate. - * \param p The exact point. - * \param i The coordinate index (either 0 or 1). - * \pre i is either 0 or 1. - * \return An approximation of p's x-coordinate (if i == 0), or an - * approximation of p's y-coordinate (if i == 1). - */ - Approximate_number_type operator() (const Point_2& p, - int i) const - { - CGAL_precondition (i == 0 || i == 1); + // Compare the slopes of the two arcs at p, using their first-order + // partial derivatives. + Algebraic slope1_numer, slope1_denom; + Algebraic slope2_numer, slope2_denom; + + xcv1.derive_by_x_at(p, 1, slope1_numer, slope1_denom); + xcv2.derive_by_x_at(p, 1, slope2_numer, slope2_denom); + + // Check if any of the slopes is vertical. + const bool is_vertical_slope1 = (CGAL::sign(slope1_denom) == ZERO); + const bool is_vertical_slope2 = (CGAL::sign(slope2_denom) == ZERO); - if (i == 0) - return (CGAL::to_double(p.x())); - else - return (CGAL::to_double(p.y())); + if (! is_vertical_slope1 && ! is_vertical_slope2) { + // The two derivatives at p are well-defined: use them to determine + // which arc is above the other (the one with a larger slope is below). + Comparison_result slope_res = + CGAL::compare(slope1_numer*slope2_denom, slope2_numer*slope1_denom); + + if (slope_res != EQUAL) return (slope_res); + + // Use the second-order derivative. + xcv1.derive_by_x_at(p, 2, slope1_numer, slope1_denom); + xcv2.derive_by_x_at(p, 2, slope2_numer, slope2_denom); + + slope_res = + CGAL::compare(slope1_numer*slope2_denom, slope2_numer*slope1_denom); + + if (slope_res != EQUAL) return (slope_res); + + // Use the third-order derivative. + xcv1.derive_by_x_at(p, 3, slope1_numer, slope1_denom); + xcv2.derive_by_x_at(p, 3, slope2_numer, slope2_denom); + + slope_res = + CGAL::compare(slope1_numer*slope2_denom, slope2_numer*slope1_denom); + + // \todo Handle higher-order derivatives: + CGAL_assertion(slope_res != EQUAL); + + return slope_res; } - }; + else if (! is_vertical_slope2) { + // The first arc has a vertical slope at p: check whether it is + // facing upwards or downwards and decide accordingly. + CGAL_assertion(xcv1.facing_mask() != 0); - /*! Get an Approximate_2 functor object. */ - Approximate_2 approximate_2_object () const - { - return Approximate_2(); + return (xcv1.test_flag(X_monotone_curve_2::FACING_UP)) ? LARGER : SMALLER; + } + else if (! is_vertical_slope1) { + // The second arc has a vertical slope at p_int: check whether it is + // facing upwards or downwards and decide accordingly. + CGAL_assertion(xcv2.facing_mask() != 0); + + return (xcv2.test_flag(X_monotone_curve_2::FACING_UP)) ? SMALLER : LARGER; + } + + // The two arcs have vertical slopes at p_int: + // First check whether one is facing up and one down. In this case the + // comparison result is trivial. + if (xcv1.test_flag(X_monotone_curve_2::FACING_UP) && + xcv2.test_flag(X_monotone_curve_2::FACING_DOWN)) return LARGER; + else if (xcv1.test_flag(X_monotone_curve_2::FACING_DOWN) && + xcv2.test_flag(X_monotone_curve_2::FACING_UP)) return SMALLER; + + // Compute the second-order derivative by y and act according to it. + xcv1.derive_by_y_at(p, 2, slope1_numer, slope1_denom); + xcv2.derive_by_y_at(p, 2, slope2_numer, slope2_denom); + + Comparison_result slope_res = + CGAL::compare(slope1_numer*slope2_denom, slope2_numer*slope1_denom); + + // If necessary, use the third-order derivative by y. + if (slope_res == EQUAL) { + // \todo Check this! + xcv1.derive_by_y_at(p, 3, slope1_numer, slope1_denom); + xcv2.derive_by_y_at(p, 3, slope2_numer, slope2_denom); + + slope_res = + CGAL::compare(slope2_numer*slope1_denom, slope1_numer*slope2_denom); + } + + // \todo Handle higher-order derivatives: + CGAL_assertion(slope_res != EQUAL); + + if (xcv1.test_flag(X_monotone_curve_2::FACING_UP) && + xcv2.test_flag(X_monotone_curve_2::FACING_UP)) + return (slope_res == LARGER) ? SMALLER : LARGER; // both are facing up + return slope_res; // both are facing down } - //! Functor - class Construct_x_monotone_curve_2 { - public: - /*! Return an x-monotone curve connecting the two given endpoints. - * \param p The first point. - * \param q The second point. - * \pre p and q must not be the same. - * \return A segment connecting p and q. - */ - X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q) const - { return (X_monotone_curve_2(p, q)); } }; - /*! Get a Construct_x_monotone_curve_2 functor object. */ - Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const - { return Construct_x_monotone_curve_2(); } + /*! Obtain a Compare_y_at_x_right_2 functor object. */ + Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const + { return Compare_y_at_x_right_2(*this); } + + class Equal_2 { + protected: + using Traits = Arr_conic_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits The traits. + */ + Equal_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_conic_traits_2; - //! Functor - class Construct_curve_2 { public: - /*! Return a curve connecting the two given endpoints. - * \param p The first point. - * \param q The second point. - * \pre p and q must not be the same. - * \return A segment connecting p and q. - */ - Curve_2 operator()(const Point_2& p, const Point_2& q) const - { return (Curve_2(p, q)); } + /*! Check whether two \f$x\f$-monotone curves are the same (have the same + * graph). + * \param xcv1 The first curve. + * \param xcv2 The second curve. + * \return `true` if the two curves are the same; `false` otherwise. + */ + bool operator()(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2) const + { + if (&xcv1 == &xcv2) return true; + return equals(xcv1, xcv2); + } + + /*! Check whether two points are the same. + * \param p1 The first point. + * \param p2 The second point. + * \return `true` if the two point are the same; `false` otherwise. + */ + bool operator()(const Point_2& p1, const Point_2& p2) const { + if (&p1 == &p2) return (true); + return(m_traits.m_alg_kernel->compare_xy_2_object()(p1, p2) == EQUAL); + } + + private: + /*! Check whether two arcs are equal (have the same graph). + * \param xcv1 The first compared arc. + * \param xcv2 The second compared arc. + * \return `true` if the two arcs have the same graph; `false` otherwise. + */ + bool equals(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2) const { + // The two arc must have the same supporting conic curves. + if (! m_traits.has_same_supporting_conic(xcv1, xcv2)) return false; + + auto eq = m_traits.m_alg_kernel->equal_2_object(); + + // Check that the arc endpoints are the same. + if (xcv1.orientation() == COLLINEAR) { + CGAL_assertion(xcv2.orientation() == COLLINEAR); + return((eq(xcv1.source(), xcv2.source()) && + eq(xcv1.target(), xcv2.target())) || + (eq(xcv1.source(), xcv2.target()) && + eq(xcv1.target(), xcv2.source()))); + } + + if (xcv1.orientation() == xcv2.m_orient) { + // Same orientation - the source and target points must be the same. + return (eq(xcv1.source(), xcv2.source()) && + eq(xcv1.target(), xcv2.target())); + } + + // Reverse orientation - the source and target points must be swapped. + return (eq(xcv1.source(), xcv2.target()) && + eq(xcv1.target(), xcv2.source())); + } }; - /*! Get a Construct_curve_2 functor object. */ - Construct_curve_2 construct_curve_2_object () const - { return Construct_curve_2(); } + /*! Obtain an Equal_2 functor object. */ + Equal_2 equal_2_object() const { return Equal_2(*this); } //@} - /// \name Functor definitions for the Boolean set-operation traits. + /// \name Functor definitions to handle boundaries //@{ - class Compare_endpoints_xy_2 - { + /*! A function object that obtains the parameter space of a geometric + * entity along the \f$x-\f$xaxis. + */ + class Parameter_space_in_x_2 { public: - - /*! - * Compare the endpoints of an $x$-monotone curve lexicographically. - * (assuming the curve has a designated source and target points). - * \param cv The curve. - * \return SMALLER if the curve is directed right; - * LARGER if the curve is directed left. + /*! Obtains the parameter space at the end of an arc along the \f$x\f$-axis. + * \param xcv The arc. + * \param ce The arc end indicator: + * `ARR_MIN_END`—the minimal end of `xcv` or + * `ARR_MAX_END`—the maximal end of `xcv`. + * \return the parameter space at the `ce` end of the arc `xcv`. + * `ARR_LEFT_BOUNDARY` —the arc approaches the identification curve from + * the right at the arc left end. + * `ARR_INTERIOR` —the arc does not approache the identification curve. + * `ARR_RIGHT_BOUNDARY`—the arc approaches the identification curve from + * the left at the arc right end. */ - Comparison_result operator() (const X_monotone_curve_2& cv) const - { - if (cv.is_directed_right()) - return (SMALLER); - else - return (LARGER); + Arr_parameter_space operator()(const X_monotone_curve_2 & /* xcv */, + Arr_curve_end /* ce */) const { + CGAL_error_msg("Not implemented yet!"); + return ARR_INTERIOR; } + + /*! Obtains the parameter space at a point along the \f$x\f$-axis. + * \param p The point. + * \return the parameter space at `p`. + */ + Arr_parameter_space operator()(const Point_2 ) const + { return ARR_INTERIOR; } }; - /*! Get a Compare_endpoints_xy_2 functor object. */ - Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const - { - return Compare_endpoints_xy_2(); - } + /*! Obtain a Parameter_space_in_x_2 function object */ + Parameter_space_in_x_2 parameter_space_in_x_2_object() const + { return Parameter_space_in_x_2(); } - class Construct_opposite_2 - { + /*! A function object that obtains the parameter space of a geometric + * entity along the y-axis + */ + class Parameter_space_in_y_2 { public: - - /*! - * Construct an opposite x-monotone (with swapped source and target). - * \param cv The curve. - * \return The opposite curve. + /*! Obtains the parameter space at the end of an arc along the \f$y\f$-axis . + * Note that if the arc end coincides with a pole, then unless the arc + * coincides with the identification curve, the arc end is considered to + * be approaching the boundary, but not on the boundary. + * If the arc coincides with the identification curve, it is assumed to + * be smaller than any other object. + * \param xcv The arc. + * \param ce The arc end indicator: + * `ARR_MIN_END`—the minimal end of `xcv` or + * `ARR_MAX_END`—the maximal end of `xcv`. + * \return the parameter space at the `ce` end of the arc `xcv`. + * `ARR_BOTTOM_BOUNDARY`—the arc approaches the south pole at the arc + * left end. + * `ARR_INTERIOR` —the arc does not approache a contraction point. + * `ARR_TOP_BOUNDARY` —the arc approaches the north pole at the arc + * right end. */ - X_monotone_curve_2 operator() (const X_monotone_curve_2& cv) const - { - return (cv.flip()); + Arr_parameter_space operator()(const X_monotone_curve_2& /* xcv */, + Arr_curve_end /* ce */) const { + CGAL_error_msg("Not implemented yet!"); + return ARR_INTERIOR; } + + /*! Obtains the parameter space at a point along the \f$y\f$-axis. + * \param p The point. + * \return The parameter space at `p`. + */ + Arr_parameter_space operator()(const Point_2 /* p */) const + { return ARR_INTERIOR; } }; - /*! Get a Construct_opposite_2 functor object. */ - Construct_opposite_2 construct_opposite_2_object() const - { - return Construct_opposite_2(); - } + /*! Obtain a Parameter_space_in_y_2 function object */ + Parameter_space_in_y_2 parameter_space_in_y_2_object() const + { return Parameter_space_in_y_2(); } - class Trim_2 - { + //@} + + /// \name Intersections, subdivisions, and mergings + //@{ + + /*! \class Make_x_monotone_2 + * A functor for subdividing curves into x-monotone curves. + */ + class Make_x_monotone_2 { protected: - typedef Arr_conic_traits_2 Traits; + using Traits = Arr_conic_traits_2; /*! The traits (in case it has state) */ const Traits& m_traits; /*! Constructor - * \param traits the traits (in case it has state) + * \param traits The traits. */ - Trim_2(const Traits& traits) : m_traits(traits) {} + Make_x_monotone_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_conic_traits_2; public: + /*! Subdivide a given conic arc into \f$x\f$-monotone sub arcs + * and insert them to a given output iterator. + * \param cv The arc. + * \param oi the output iterator for the result. Its dereference type is a + * variant that wraps a \c Point_2 or an \c X_monotone_curve_2 + * objects. + * \return the past-the-end iterator. + */ + template + OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { + + auto ctr_xcv = m_traits.construct_x_monotone_curve_2_object(); + + // Increment the serial number of the curve cv, which will serve as its + // unique identifier. + auto index = Traits::get_index(); + Conic_id conic_id(index); + + // Find the points of vertical tangency to cv and act accordingly. + Alg_point_2 vtan_ps[2]; + auto n_vtan_ps = m_traits.vertical_tangency_points(cv, vtan_ps); + if (n_vtan_ps == 0) { + // In case the given curve is already x-monotone: + *oi++ = ctr_xcv(cv, conic_id); + return oi; + } + + // Split the conic arc into x-monotone sub-curves. + if (cv.is_full_conic()) { + // Make sure we have two vertical tangency points. + CGAL_assertion(n_vtan_ps == 2); + + // In case the curve is a full conic, split it into two x-monotone + // arcs, one going from ps[0] to ps[1], and the other from ps[1] to + // ps[0]. + *oi++ = ctr_xcv(cv, vtan_ps[0], vtan_ps[1], conic_id); + *oi++ = ctr_xcv(cv, vtan_ps[1], vtan_ps[0], conic_id); + } + else { + if (n_vtan_ps == 1) { + // Split the arc into two x-monotone sub-curves: one going from the + // arc source to ps[0], and the other from ps[0] to the target. + *oi++ = ctr_xcv(cv, cv.source(), vtan_ps[0], conic_id); + *oi++ = ctr_xcv(cv, vtan_ps[0], cv.target(), conic_id); + } + else { + CGAL_assertion(n_vtan_ps == 2); + + // Identify the first point we encounter when going from cv's source + // to its target, and the second point we encounter. Note that the + // two endpoints must both be below the line connecting the two + // tangnecy points (or both lies above it). + int ind_first = 0; + int ind_second = 1; + auto ker = m_traits.m_alg_kernel; + auto cmp_y_at_x_2 = ker->compare_y_at_x_2_object(); + auto line = ker->construct_line_2_object()(vtan_ps[0], vtan_ps[1]); + auto start_pos = cmp_y_at_x_2(cv.source(), line); + auto order_vpts = ker->compare_x_2_object()(vtan_ps[0], vtan_ps[1]); + + CGAL_assertion((start_pos != EQUAL) && + (cmp_y_at_x_2(cv.target(), line) == start_pos)); + CGAL_assertion(order_vpts != EQUAL); + + if (((cv.orientation() == COUNTERCLOCKWISE) && + (start_pos == order_vpts)) || + ((cv.orientation() == CLOCKWISE) && (start_pos != order_vpts))) + { + ind_first = 1; + ind_second = 0; + } + + // Split the arc into three x-monotone sub-curves. + *oi++ = ctr_xcv(cv, cv.source(), + vtan_ps[ind_first], + conic_id); + + *oi++ = ctr_xcv(cv, vtan_ps[ind_first], + vtan_ps[ind_second], + conic_id); + + *oi++ = ctr_xcv(cv, vtan_ps[ind_second], + cv.target(), conic_id); + } + } + + return oi; + } + }; + + /*! Obtain a Make_x_monotone_2 functor object. */ + Make_x_monotone_2 make_x_monotone_2_object() const + { return Make_x_monotone_2(*this); } + + class Split_2 { + protected: + using Traits = Arr_conic_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits The traits. + */ + Split_2(const Traits& traits) : m_traits(traits) {} + friend class Arr_conic_traits_2; - /*!\brief - * Returns a trimmed version of an arc - * - * \param xcv The arc - * \param src the new first endpoint - * \param tgt the new second endpoint - * \return The trimmed arc - * - * \pre src != tgt - * \pre both points must be interior and must lie on \c cv + + public: + /*! Split a given \f$x\f$-monotone arc at a given point into two sub-arcs. + * \param xcv The arc to split + * \param p The split point. + * \param xcv1 Output: The left resulting sub-arc (`p` is its right endpoint). + * \param xcv2 Output: The right resulting sub-arc (`p` is its left endpoint). + * \pre `p` lies on `xcv` but is not one of its end-points. */ - X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv, - const Point_2& src, - const Point_2& tgt)const - { - // make functor objects - CGAL_precondition_code(Compare_y_at_x_2 compare_y_at_x_2 = - m_traits.compare_y_at_x_2_object()); - CGAL_precondition_code(Equal_2 equal_2 = m_traits.equal_2_object()); - Compare_x_2 compare_x_2 = m_traits.compare_x_2_object(); - // Check whether source and taget are two distinct points and they lie - // on the line. - CGAL_precondition(compare_y_at_x_2(src, xcv) == EQUAL); - CGAL_precondition(compare_y_at_x_2(tgt, xcv) == EQUAL); - CGAL_precondition(! equal_2(src, tgt)); + void operator()(const X_monotone_curve_2& xcv, const Point_2 & p, + X_monotone_curve_2& xcv1, X_monotone_curve_2& xcv2) const + { split(xcv, p, xcv1, xcv2); } - //check if the orientation conforms to the src and tgt. - if( (xcv.is_directed_right() && compare_x_2(src, tgt) == LARGER) || - (! xcv.is_directed_right() && compare_x_2(src, tgt) == SMALLER) ) - return (xcv.trim(tgt, src)); - else return (xcv.trim(src, tgt)); + private: + /*! Split the arc into two at a given split point. + * \param p The split point. + * \param xcv1 Output: The first resulting arc, lying to the left of `p`. + * \param xcv2 Output: The first resulting arc, lying to the right of `p`. + * \pre `p` lies in the interior of the arc (not one of its endpoints). + */ + void split(const X_monotone_curve_2& xcv, const Point_2& p, + X_monotone_curve_2& xcv1, X_monotone_curve_2& xcv2) const { + // Make sure that p lies on the interior of the arc. + CGAL_precondition_code(auto eq = m_traits.m_alg_kernel->equal_2_object()); + CGAL_precondition(m_traits.contains_point(xcv, p) && + ! eq(p, xcv.source()) && ! eq(p, xcv.target())); + + // Make copies of the current arc. + xcv1 = xcv; + xcv2 = xcv; + + // Assign the endpoints of the arc. + if (xcv.test_flag(X_monotone_curve_2::IS_DIRECTED_RIGHT)) { + // The arc is directed from left to right, so p becomes xcv1's target + // and xcv2's source. + xcv1.set_target(p); + xcv2.set_source(p); + + if (! p.is_generating_conic(xcv.id())) { + xcv1.target().set_generating_conic(xcv.id()); + xcv2.source().set_generating_conic(xcv.id()); + } + } + else { + // The arc is directed from right to left, so p becomes xcv2's target + // and xcv1's source. + xcv1.set_source(p); + xcv2.set_target(p); + + if (! p.is_generating_conic(xcv.id())) { + xcv1.source().set_generating_conic(xcv.id()); + xcv2.target().set_generating_conic(xcv.id()); + } + } } + }; - /*! Obtain a Trim_2 functor object. */ - Trim_2 trim_2_object() const { return Trim_2(*this); } - //@} -}; + /*! Obtain a Split_2 functor object. */ + Split_2 split_2_object() const { return Split_2(*this); } -#include + class Intersect_2 { + protected: + using Traits = Arr_conic_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor. + * \param traits The traits. + */ + Intersect_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_conic_traits_2; + + public: + /*! Find the intersections of the two given curves and insert them to the + * given output iterator. As two segments may itersect only once, only a + * single will be contained in the iterator. + * \param cv1 The first arc. + * \param cv2 The second arc. + * \param oi The output iterator. + * \return The past-the-end iterator. + */ + template + OutputIterator operator()(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2, + OutputIterator oi) const + { return intersect(xcv1, xcv2, m_traits.m_inter_map, oi); } + + private: + /*! Compute the overlap with a given arc, which is supposed to have the same + * supporting conic curve as this arc. + * \param xcv1 The first arc. + * \param xcv2 The second arc. + * \param overlap Output: The overlapping arc (if any). + * \return Whether we found an overlap. + */ + bool compute_overlap(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2, + X_monotone_curve_2& overlap) const { + // Check if the two arcs are identical. + if (m_traits.equal_2_object()(xcv1,xcv2)) { + overlap = xcv2; + return true; + } + + if (m_traits.is_strictly_between_endpoints(xcv1, xcv2.left())) { + if (m_traits.is_strictly_between_endpoints(xcv1, xcv2.right())) { + // Case 1 - *this: +-----------> + // arc: +=====> + overlap = xcv2; + return true; + } + else { + // Case 2 - *this: +-----------> + // arc: +=====> + overlap = xcv1; + + if (overlap.is_directed_right()) overlap.m_source = xcv2.left(); + else overlap.m_target = xcv2.left(); + + return true; + } + } + else if (m_traits.is_strictly_between_endpoints(xcv1, xcv2.right())) { + // Case 3 - *this: +-----------> + // arc: +=====> + overlap = xcv1; + if (overlap.is_directed_right()) overlap.m_target = xcv2.right(); + else overlap.m_source = xcv2.right(); + return true; + } + else if (m_traits.is_between_endpoints(xcv2, xcv1.source()) && + m_traits.is_between_endpoints(xcv2, xcv1.target()) && + (m_traits.is_strictly_between_endpoints(xcv2, xcv1.source()) || + m_traits.is_strictly_between_endpoints(xcv2, xcv1.target()))) + { + // Case 4 - *this: +-----------> + // arc: +================> + overlap = xcv1; + return true; + } + + // If we reached here, there are no overlaps: + return false; + } + + /*! Intersect the supporing conic curves of this arc and the given arc. + * \param arc The arc to intersect with. + * \param inter_list The list of intersection points. + */ + void intersect_supporting_conics(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2, + Intersection_list& inter_list) const { + if (xcv1.is_special_segment() && ! xcv2.is_special_segment()) { + // If one of the arcs is a special segment, make sure it is (arc). + intersect_supporting_conics(xcv2, xcv1, inter_list); + return; + } + + const int deg1 = + (xcv1.degree_mask() == X_monotone_curve_2::degree_1_mask()) ? 1 : 2; + const int deg2 = + (xcv2.degree_mask() == X_monotone_curve_2::degree_1_mask()) ? 1 : 2; + const auto nt_traits = m_traits.m_nt_traits; + Algebraic xs[4]; + int n_xs = 0; + Algebraic ys[4]; + int n_ys = 0; + + if (xcv2.is_special_segment()) { + // The second arc is a special segment (a*x + b*y + c = 0). + if (xcv1.is_special_segment()) { + // Both arc are sepcial segment, so they have at most one intersection + // point. + const auto* extra_data1 = xcv1.extra_data(); + const auto* extra_data2 = xcv2.extra_data(); + Algebraic denom = + extra_data1->a * extra_data2->b - extra_data1->b * extra_data2->a; + if (CGAL::sign (denom) != CGAL::ZERO) { + xs[0] = (extra_data1->b * extra_data2->c - + extra_data1->c * extra_data2->b) / denom; + n_xs = 1; + + ys[0] = (extra_data1->c * extra_data2->a - + extra_data1->a * extra_data2->c) / denom; + n_ys = 1; + } + } + else { + const auto* extra_data2 = xcv2.extra_data(); + + // Compute the x-coordinates of the intersection points. + n_xs = compute_resultant_roots(*nt_traits, + xcv1.alg_r(), xcv1.alg_s(), + xcv1.alg_t(), xcv1.alg_u(), + xcv1.alg_v(), xcv1.alg_w(), + deg1, + extra_data2->a, + extra_data2->b, + extra_data2->c, + xs); + CGAL_assertion(n_xs <= 2); + + // Compute the y-coordinates of the intersection points. + n_ys = compute_resultant_roots(*nt_traits, + xcv1.alg_s(), xcv1.alg_r(), + xcv1.alg_t(), xcv1.alg_v(), + xcv1.alg_u(), xcv1.alg_w(), + deg1, + extra_data2->b, + extra_data2->a, + extra_data2->c, + ys); + CGAL_assertion(n_ys <= 2); + } + } + else { + // Compute the x-coordinates of the intersection points. + n_xs = compute_resultant_roots(*nt_traits, + xcv1.r(), xcv1.s(), xcv1.t(), + xcv1.u(), xcv1.v(), xcv1.w(), + deg1, + xcv2.r(), xcv2.s(), xcv2.t(), + xcv2.u(), xcv2.v(), xcv2.w(), + deg2, + xs); + CGAL_assertion(n_xs <= 4); + + // Compute the y-coordinates of the intersection points. + n_ys = compute_resultant_roots(*nt_traits, + xcv1.s(), xcv1.r(), xcv1.t(), + xcv1.v(), xcv1.u(), xcv1.w(), + deg1, + xcv2.s(), xcv2.r(), xcv2.t(), + xcv2.v(), xcv2.u(), xcv2.w(), + deg2, + ys); + CGAL_assertion(n_ys <= 4); + } + + // Pair the coordinates of the intersection points. As the vectors of + // x and y-coordinates are sorted in ascending order, we output the + // intersection points in lexicographically ascending order. + Multiplicity mult; + int i, j; + + if (xcv2.is_special_segment()) { + if ((n_xs == 0) || (n_ys == 0)) return; + + if ((n_xs == 1) && (n_ys == 1)) { + // Single intersection. + Point_2 ip(xs[0], ys[0]); + ip.set_generating_conic(xcv1.id()); + ip.set_generating_conic(xcv2.id()); + + // In case the other curve is of degree 2, this is a tangency point. + mult = ((deg1 == 1) || xcv1.is_special_segment()) ? 1 : 2; + inter_list.push_back(Intersection_point(ip, mult)); + } + else if ((n_xs == 1) && (n_ys == 2)) { + Point_2 ip1(xs[0], ys[0]); + ip1.set_generating_conic(xcv1.id()); + ip1.set_generating_conic(xcv2.id()); + + inter_list.push_back(Intersection_point(ip1, 1)); + + Point_2 ip2(xs[0], ys[1]); + ip2.set_generating_conic(xcv1.id()); + ip2.set_generating_conic(xcv2.id()); + + inter_list.push_back(Intersection_point(ip2, 1)); + } + else if ((n_xs == 2) && (n_ys == 1)) { + Point_2 ip1(xs[0], ys[0]); + ip1.set_generating_conic(xcv1.id()); + ip1.set_generating_conic(xcv2.id()); + + inter_list.push_back(Intersection_point(ip1, 1)); + + Point_2 ip2(xs[1], ys[0]); + ip2.set_generating_conic(xcv1.id()); + ip2.set_generating_conic(xcv2.id()); + + inter_list.push_back(Intersection_point(ip2, 1)); + } + else { + CGAL_assertion((n_xs == 2) && (n_ys == 2)); + + // The x-coordinates and the y-coordinates are given in ascending + // order. If the slope of the segment is positive, we pair the + // coordinates as is - otherwise, we swap the pairs. + int ind_first_y(0), ind_second_y(1); + + const auto* extra_data2 = xcv2.extra_data(); + if (CGAL::sign(extra_data2->b) == CGAL::sign(extra_data2->a)) { + ind_first_y = 1; + ind_second_y = 0; + } + + Point_2 ip1(xs[0], ys[ind_first_y]); + ip1.set_generating_conic(xcv1.id()); + ip1.set_generating_conic(xcv2.id()); + + inter_list.push_back(Intersection_point(ip1, 1)); + + Point_2 ip2(xs[1], ys[ind_second_y]); + ip2.set_generating_conic(xcv1.id()); + ip2.set_generating_conic(xcv2.id()); + + inter_list.push_back(Intersection_point(ip2, 1)); + } + + return; + } + + for (i = 0; i < n_xs; ++i) { + for (j = 0; j < n_ys; ++j) { + if (xcv1.is_on_supporting_conic(xs[i], ys[j]) && + xcv2.is_on_supporting_conic(xs[i], ys[j])) + { + // Create the intersection point and set its generating conics. + Point_2 ip(xs[i], ys[j]); + + ip.set_generating_conic(xcv1.id()); + ip.set_generating_conic(xcv2.id()); + + // Compute the multiplicity of the intersection point. + if (deg1 == 1 && deg2 == 1) mult = 1; + else mult = xcv1.multiplicity_of_intersection_point(xcv2, ip); + + // Insert the intersection point to the output list. + inter_list.push_back(Intersection_point(ip, mult)); + } + } + } + } + + /*! Compute the intersections with the given arc. + * \param arc The given intersecting arc. + * \param inter_map Maps conic pairs to lists of their intersection points. + * \param oi The output iterator. + * \return The past-the-end iterator. + */ + template + OutputIterator intersect(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2, + Intersection_map& inter_map, + OutputIterator oi) const + { + if (m_traits.has_same_supporting_conic(xcv1, xcv2)) { + // Check for overlaps between the two arcs. + X_monotone_curve_2 overlap; + + if (compute_overlap(xcv1, xcv2, overlap)) { + // There can be just a single overlap between two x-monotone arcs: + *oi++ = overlap; + return oi; + } + + // In case there is not overlap and the supporting conics are the same, + // there cannot be any intersection points, unless the two arcs share + // an end point. + // Note that in this case we do not define the multiplicity of the + // intersection points we report. + auto alg_kernel = m_traits.m_alg_kernel; + auto eq = alg_kernel->equal_2_object(); + if (eq(xcv1.left(), xcv2.left())) { + Intersection_point ip(xcv1.left(), 0); + *oi++ = ip; + } + + if (eq(xcv1.right(), xcv2.right())) { + Intersection_point ip(xcv1.right(), 0); + *oi++ = ip; + } + + if (eq(xcv1.left(), xcv2.right())) { + Intersection_point ip(xcv1.left(), 0); + *oi++ = ip; + } + + if (eq(xcv1.right(), xcv2.left())) { + Intersection_point ip(xcv1.right(), 0); + *oi++ = ip; + } + + return oi; + } + + // Search for the pair of supporting conics in the map (the first conic + // ID in the pair should be smaller than the second one, to guarantee + // uniqueness). + Conic_pair conic_pair; + Intersection_map_iterator map_iter; + Intersection_list inter_list; + bool invalid_ids = false; + + if (xcv1.id().is_valid() && xcv2.id().is_valid()) { + if (xcv1.id() < xcv2.id()) conic_pair = Conic_pair(xcv1.id(), xcv2.id()); + else conic_pair = Conic_pair(xcv2.id(), xcv1.id()); + map_iter = inter_map.find(conic_pair); + } + else { + // In case one of the IDs is invalid, we do not look in the map neither + // we cache the results. + map_iter = inter_map.end(); + invalid_ids = true; + } + + if (map_iter == inter_map.end()) { + // In case the intersection points between the supporting conics have + // not been computed before, compute them now and store them in the map. + intersect_supporting_conics(xcv1, xcv2, inter_list); + if (! invalid_ids) inter_map[conic_pair] = inter_list; + } + else { + // Obtain the precomputed intersection points from the map. + inter_list = (*map_iter).second; + } + + // Go over the list of intersection points and report those that lie on + // both x-monotone arcs. + for (auto iter = inter_list.begin(); iter != inter_list.end(); ++iter) { + if (m_traits.is_between_endpoints(xcv1, (*iter).first) && + m_traits.is_between_endpoints(xcv2, (*iter).first)) + { + *oi++ = *iter; + } + } + + return oi; + } + }; + + /*! Obtain an Intersect_2 functor object. */ + Intersect_2 intersect_2_object() const { return Intersect_2(*this); } + + class Are_mergeable_2 { + protected: + using Traits = Arr_conic_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits The traits (in case it has state) + */ + Are_mergeable_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_conic_traits_2; + + public: + /*! Check whether it is possible to merge two given x-monotone curves. + * \param xcv1 The first arc. + * \param xcv2 The second arc. + * \return `true` if the two curves are mergeable; that is, they are + * supported by the same curve and share a common endpoint); + * `false` otherwise. + */ + bool operator()(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2) const + { return can_merge_with(xcv1, xcv2); } + + private: + /*! Check whether it is possible to merge the arc with the given arc. + * \param xcv1 The first arc. + * \param xcv2 The second arc. + * \return `true` if it is possible to merge the two arcs; + * `false` otherwise. + */ + bool can_merge_with(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2) const { + // In order to merge the two arcs, they should have the same supporting + // conic. + if (! m_traits.has_same_supporting_conic(xcv1, xcv2)) return false; + + // Check if the left endpoint of one curve is the right endpoint of the + // other. + auto eq = m_traits.m_alg_kernel->equal_2_object(); + return (eq(xcv1.right(), xcv2.left()) || eq(xcv1.left(), xcv2.right())); + } + }; + + /*! Obtain an Are_mergeable_2 functor object. */ + Are_mergeable_2 are_mergeable_2_object() const + { return Are_mergeable_2(*this); } + + /*! \class Merge_2 + * A functor that merges two x-monotone arcs into one. + */ + class Merge_2 { + protected: + using Traits = Arr_conic_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits The traits (in case it has state) + */ + Merge_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_conic_traits_2; + + public: + /*! Merge two given x-monotone curves into a single curve (segment). + * \param xcv1 The first arc. + * \param xcv2 The second arc. + * \param xcv The merged arc. + * \pre The two arcs are mergeable. + */ + void operator()(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2, + X_monotone_curve_2& xcv) const + { + CGAL_precondition(m_traits.are_mergeable_2_object()(xcv2, xcv1)); + xcv = xcv1; + merge(xcv, xcv2); + } + + private: + /*! Merge the current arc with the given arc. + * \param xcv1 The first arc to merge with. + * \param xcv2 The second arc to merge with. + * \pre The two arcs are mergeable. + */ + void merge(X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2) const { + // Check whether we should extend the arc to the left or to the right. + auto eq = m_traits.m_alg_kernel->equal_2_object(); + if (eq(xcv1.right(), xcv2.left())) { + // Extend the arc to the right. + if (xcv1.test_flag(X_monotone_curve_2::IS_DIRECTED_RIGHT)) + xcv1.set_target(xcv2.right()); + else xcv1.set_source(xcv2.right()); + } + else { + CGAL_precondition(eq(xcv1.left(), xcv2.right())); + + // Extend the arc to the left. + if (xcv1.test_flag(X_monotone_curve_2::IS_DIRECTED_RIGHT)) + xcv1.set_source(xcv2.left()); + else xcv1.set_target(xcv2.left()); + } + } + }; + + /*! Obtain a Merge_2 functor object. */ + Merge_2 merge_2_object() const { return Merge_2(*this); } + + //@} + + /*! \name Auxiliary Functor definitions, used gor, e.g., the landmarks + * point-location strategy and the drawing function. + */ + //@{ + typedef double Approximate_number_type; + typedef CGAL::Cartesian Approximate_kernel; + typedef Approximate_kernel::Point_2 Approximate_point_2; + + class Approximate_curve_length_2 { + protected: + using Traits = Arr_conic_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits the traits. + */ + Approximate_curve_length_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_conic_traits_2; + + public: + /*! Obtain an approximation of the length of a curve. + * \param xcv The curve. + * \return An approximation of the length of `xcv`. + */ + Approximate_number_type operator()(const X_monotone_curve_2& xcv) const { + if (xcv.orientation() == COLLINEAR) return segment_length(xcv); + CGAL::Sign sign_conic = CGAL::sign(4*xcv.r()*xcv.s() - xcv.t()*xcv.t()); + if (sign_conic == POSITIVE) return ellipse_length(xcv); + if (sign_conic == NEGATIVE) return hyperbola_length(xcv); + return parabola_length(xcv); + } + + private: + /*! Obtain the segment length. + */ + double segment_length(const X_monotone_curve_2& xcv) { + auto min_vertex = m_traits.construct_min_vertex_2_object(); + auto max_vertex = m_traits.construct_max_vertex_2_object(); + const auto& minv = min_vertex(xcv); + const auto& maxv = max_vertex(xcv); + auto x1 = CGAL::to_double(minv.x()); + auto y1 = CGAL::to_double(minv.y()); + auto x2 = CGAL::to_double(maxv.x()); + auto y2 = CGAL::to_double(maxv.y()); + auto dx = x2 - x1; + auto dy = y2 - y1; + double l = std::sqrt(x2*x2 + y2*y2); + return l; + } + + /*! The formula for the arc length of a parabola is: + * L = 1/2 * √(b^2+16⋅a^2) + b^2/(8*a) * ln((4*a+√(b^2+16⋅a^2))/b) + * where: + * L is the length of the parabola arc. + * a is the length along the parabola axis. + * b is the length of the chord perpendicular to the axis. + * + * --- + * / | \ + * / |a \ + * / | \ + * /---------\ + * / b \ + * + */ + double parabolic_arc_length(double a, double b) const { + if (a == 0) return b; + if (b == 0) return a; + auto b_sqr = b*b; + auto tmp = std::sqrt(b_sqr+16.0*a*a); + return tmp/2.0 + b_sqr*std::log((4.0*a + tmp)/b)/(8.0*a); + } + + /*! Obtain the parabolic arc length. + */ + double parabola_length(const X_monotone_curve_2& xcv) { + double r_m, t_m, s_m, u_m, v_m, w_m; + double cost, sint; + double xs_t, ys_t, xt_t, yt_t; + double a; + double ts, tt; + double cx, cy; + m_traits.approximate_parabola(xcv, + r_m, t_m, s_m, u_m, v_m, w_m, cost, sint, + xs_t, ys_t, xt_t, yt_t, a, ts, tt, cx, cy); + + auto ds = parabolic_arc_length(xs_t, 2.0*std::abs(ys_t)); + auto dt = parabolic_arc_length(xt_t, 2.0*std::abs(yt_t)); + auto d = (CGAL::sign(ys_t) == CGAL::sign(yt_t)) ? + std::abs(ds - dt)/2.0 : (ds + dt)/2.0; + // std::cout << "d, ds, dt = " << d << ", " << ds << "," << dt + // << std::endl; + return d; + } + + double ellipse_length(const X_monotone_curve_2& xcv) { + double r_m, t_m, s_m, u_m, v_m, w_m; + double cost, sint; + double xs_t, ys_t, xt_t, yt_t; + double a, b; + double cx, cy; + double ts, tt; + m_traits.approximate_ellipse(xcv, r_m, t_m, s_m, u_m, v_m, w_m, cost, sint, + xs_t, ys_t, ts, xt_t, yt_t, tt, + a, b, cx, cy); + + namespace bm = boost::math; + auto ratio = b/a; + auto k = std::sqrt(1 - (ratio*ratio)); + auto ds = a*bm::ellint_2(k, ts); + auto dt = a*bm::ellint_2(k, tt); + auto d = std::abs(dt - ds); + // std::cout << "d,ds,dt: " << d << "," << ds << ", " << dt << std::endl; + return d; + } + + double hyperbola_length(const X_monotone_curve_2& /* xcv */) { + CGAL_error_msg("Not implemented yet!"); + double l(0.0); + return l; + } + }; + + class Approximate_2 { + protected: + using Traits = Arr_conic_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits the traits. + */ + Approximate_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_conic_traits_2; + + public: + /*! Obtain an approximation of a point coordinate. + * \param p The exact point. + * \param i The coordinate index (either 0 or 1). + * \pre i is either 0 or 1. + * \return An approximation of p's x-coordinate (if i == 0), or an + * approximation of p's y-coordinate (if i == 1). + */ + Approximate_number_type operator()(const Point_2& p, int i) const { + CGAL_precondition((i == 0) || (i == 1)); + + if (i == 0) return CGAL::to_double(p.x()); + else return CGAL::to_double(p.y()); + } + + /*! Obtain an approximation of a point. + */ + Approximate_point_2 operator()(const Point_2& p) const + { return Approximate_point_2(operator()(p, 0), operator()(p, 1)); } + + /*! Obtain an approximation of an \f$x\f$-monotone curve. + */ + template + OutputIterator operator()(const X_monotone_curve_2& xcv, double error, + OutputIterator oi, bool l2r = true) const { + if (xcv.orientation() == COLLINEAR) + return approximate_segment(xcv, oi, l2r); + CGAL::Sign sign_conic = CGAL::sign(4*xcv.r()*xcv.s() - xcv.t()*xcv.t()); + if (sign_conic == POSITIVE) + return approximate_ellipse(xcv, error, oi, l2r); + if (sign_conic == NEGATIVE) + return approximate_hyperbola(xcv, error, oi, l2r); + return approximate_parabola(xcv, error, oi, l2r); + } + + private: + /*! Handle segments. + */ + template + OutputIterator approximate_segment(const X_monotone_curve_2& xcv, + OutputIterator oi, bool l2r) const { + // std::cout << "SEGMENT\n"; + auto min_vertex = m_traits.construct_min_vertex_2_object(); + auto max_vertex = m_traits.construct_max_vertex_2_object(); + const auto& src = (l2r) ? min_vertex(xcv) : max_vertex(xcv); + const auto& trg = (l2r) ? max_vertex(xcv) : min_vertex(xcv); + auto xs = CGAL::to_double(src.x()); + auto ys = CGAL::to_double(src.y()); + auto xt = CGAL::to_double(trg.x()); + auto yt = CGAL::to_double(trg.y()); + *oi++ = Approximate_point_2(xs, ys); + *oi++ = Approximate_point_2(xt, yt); + return oi; + } + + /*! Transform a point. In particular, rotate the canonical point + * (`xc`,`yc`) by an angle, the sine and cosine of which are `sint` and + * `cost`, respectively, and translate by (`cx`,`cy`). + */ + void transform_point(double xc, double yc, + double cost, double sint, + double cx, double cy, + double& x, double& y) const { + x = xc*cost - yc*sint + cx; + y = xc*sint + yc*cost + cy; + } + + /*! Handle ellipses. + * The general equation of an ellipse is: + * r·𝑥^2 + s·𝑦^2 + t·𝑥·𝑦 + u·𝑥 + v·𝑦 + w = 0 + * where 4·r·s−t^2 > 0 + * We eliminate t so that the x·y term vanishes, applying an inverse + * rotation. Then, we compute the radi and the center. Finaly, we rotate + * back. The angle of rotation is given by: + * 𝑡𝑎𝑛(2𝜃) = 𝐵 / (𝐴−𝐶) + * Then + * 𝑐𝑜𝑠(2𝜃) = sqrt((1 + 𝑐𝑜𝑠(2𝜃))/2) + * 𝑠𝑖𝑛(2𝜃) = sqrt((1 - 𝑐𝑜𝑠(2𝜃))/2) + * The coefficients of the new ellipse are given by: + * r′ = r·𝑐𝑜𝑠(𝜃)^2 + s·𝑠𝑖𝑛(𝜃)^2 + t·𝑐𝑜𝑠(𝜃)·𝑠𝑖𝑛(𝜃) + * s′ = r·𝑠𝑖𝑛(𝜃)^2 + s·𝑐𝑜𝑠(𝜃)^2 − t·𝑐𝑜𝑠(𝜃)·𝑠𝑖𝑛(𝜃) + * t′ = 0 + * u′ = u·𝑐𝑜𝑠(𝜃) + v·𝑠𝑖𝑛(𝜃) + * v′ = −u·𝑠𝑖𝑛(𝜃) + v·𝑐𝑜𝑠(𝜃) + * w′ = w + * After writing this equation in the form: + * (𝑥′ − 𝐶𝑥′)^2 (𝑦′ − 𝐶𝑦′)^2 + * ----------- + ------------ = 1 + * 𝑎^2 𝑏^2 + * We get: + * -u′ + * 𝐶𝑥′ = ---- + * 2·r′ + * + * -v′ + * 𝐶𝑦′ = ---- + * 2·s′ + * + * −4·w′·r′·s′ + s′·u′2 + r′·v′2 + * a^2 = ---------------------------- + * 4·r′^2·s′ + * + * −4·w′·r′·s′ + s′·u′2 + r′·v′2 + * b^2 = ---------------------------- + * 4·r′·s′^2 + * + * Rotate back about angle 𝜃 to find the coordinates of the center: + * 𝐶𝑥 = 𝐶𝑥′·𝑐𝑜𝑠𝜃 − 𝐶𝑦′·𝑠𝑖𝑛𝜃 + * 𝐶𝑦 = 𝐶𝑥′·𝑠𝑖𝑛𝜃 + 𝐶𝑦′·𝑐𝑜𝑠𝜃 + * + * The parametric formula of an ellipse centered at the origin with major + * axis parallel to the x-axis and minor axis parallel to the y-axis is: + * 𝑥(𝛼) = a·𝑐𝑜𝑠(𝛼) + * 𝑦(𝛼) = b·𝑠𝑖𝑛(𝛼) + * where a is the major radius and b is the minor radius. + * + * The rotation transformation is fiven by + * 𝑥 = 𝑥(𝑡)·𝑐𝑜𝑠(𝜃) − 𝑦(𝑡)·𝑠𝑖𝑛(𝜃) + * 𝑦 = 𝑥(𝑡)·𝑠𝑖𝑛(𝜃) + 𝑦(𝑡)·𝑐𝑜𝑠(𝜃) + * Where 𝜃 is the rotation angle + * + * Combining the above we get + * 𝑥(𝛼) = a·𝑐𝑜𝑠(𝛼)·𝑐𝑜𝑠(𝜃) − b·𝑠𝑖𝑛(𝛼)·𝑠𝑖𝑛(𝜃) + * 𝑦(𝛼) = a·𝑐𝑜𝑠(𝛼)·𝑠𝑖𝑛(𝜃) + b·𝑠𝑖𝑛(𝛼)·𝑐𝑜𝑠(𝜃) + * + * To shift from the center we add 𝐶𝑥 to the 𝑥(𝛼) and 𝐶𝑦 to 𝑦(𝛼). + * Therefore, the equations of a Rotated Ellipse are: + * 𝑥(𝛼) = a·𝑐𝑜𝑠(𝛼)·𝑐𝑜𝑠(𝜃) − b·𝑠𝑖𝑛(𝛼)·𝑠𝑖𝑛(𝜃) + 𝐶𝑥 + * 𝑦(𝛼) = a·𝑐𝑜𝑠(𝛼)·𝑠𝑖𝑛(𝜃) + b·𝑠𝑖𝑛(𝛼)·𝑐𝑜𝑠(𝜃) + 𝐶𝑦 + * + * @param error the error bound of the generated approximation. This is + * the Hausdorff distance between the arc and the polyline, + * which approximates the arc. + */ + template + OutputIterator approximate_ellipse(const X_monotone_curve_2& xcv, + double error, OutputIterator oi, + bool l2r = true) const { + // std::cout << "ELLIPSE\n"; + auto min_vertex = m_traits.construct_min_vertex_2_object(); + auto max_vertex = m_traits.construct_max_vertex_2_object(); + const auto& src = (l2r) ? min_vertex(xcv) : max_vertex(xcv); + const auto& trg = (l2r) ? max_vertex(xcv) : min_vertex(xcv); + auto xs = CGAL::to_double(src.x()); + auto ys = CGAL::to_double(src.y()); + auto xt = CGAL::to_double(trg.x()); + auto yt = CGAL::to_double(trg.y()); + // std::cout << "curve: (" << xs << "," << ys + // << ") => (" << xt << "," << yt << ")" + // << std::endl; + + double r_m, t_m, s_m, u_m, v_m, w_m; + double cost, sint; + double xs_t, ys_t, xt_t, yt_t; + double a, b; + double cx, cy; + double ts, tt; + m_traits.approximate_ellipse(xcv, r_m, t_m, s_m, u_m, v_m, w_m, cost, sint, + xs_t, ys_t, ts, xt_t, yt_t, tt, + a, b, cx, cy, l2r); + // std::cout << "a, b: " << a << "," << b << std::endl; + + *oi++ = Approximate_point_2(xs, ys); + add_points(xs_t, ys_t, ts, xt_t, yt_t, tt, error, oi, + [&](double tm, double& xm, double& ym) { + elliptic_point(a, b, tm, xm, ym); + }, + [&](double xc, double& yc, double& x, double& y) { + transform_point(xc, yc, cost, sint, cx, cy, x, y); + }); + *oi++ = Approximate_point_2(xt, yt); + return oi; + } + + /*! Add either an elliptic or a hyperbilc point. + * The arc endpoints are (`x1`, `y1`) and (`x2`, `y2`). + * In our parametric representations for ellipses and hyperbolas the + * following holds: + * p1 = (x1, y1); x1 = x(t1), y1 = y(t1), and + * p2 = (x2, y2); x2 = x(t2), y2 = y(t2) + * The Hausdorff distance between the arc and the segment (p1,p2) is + * at (xm,ym), where xm = x(tm), ym = y(tmp), and tm = (t1 + t2) / 2. + * \param[in] x1 the canonical-arc source-point \f$x\f$-coordinate. + * \param[in] y1 the canonical-arc source-point \f$y\f$-coordinate. + * \param[in] t1 the source-point parameter; \f$yx1 = x(t1) and y1 = y(t1)\f$y. + * \param[in] x2 the canonical-arc target-point \f$x\f$-coordinate. + * \param[in] y2 the canonical arc target-point \f$y\f$-coordinate. + * \param[in] t2 the target-point parameter; \f$yx2 = x(t2) and y2 = y(t2)\f$y. + * \param[in] error + * \param[out] oi + * \param[in] op a function that computes a point \f$(x(t),y(t))\f$ given \f$t\f$. + * \param[in] transform a function that transforms a canonical point to an + * actual point + * + * Observe that in our parametric representation for parabolas, the + * expression for tm is different. + */ + template + OutputIterator add_points(double x1, double y1, double t1, + double x2, double y2, double t2, + double error, OutputIterator oi, + Op op, Transform transform) const { + auto tm = (t1 + t2)*0.5; + + // Compute the canocal point where the error is maximal. + double xm, ym; + op(tm, xm, ym); + + auto dx = x2 - x1; + auto dy = y2 - y1; + + // Compute the error; abort if it is below the threshold + auto l = std::sqrt(dx*dx + dy*dy); + auto e = std::abs((xm*dy - ym*dx + x2*y1 - x1*y2) / l); + if (e < error) return oi; + + double x, y; + transform(xm, ym, x, y); + add_points(x1, y1, t1, xm, ym, tm, error, oi, op, transform); + *oi++ = Approximate_point_2(x, y); + add_points(xm, ym, tm, x2, y2, t2, error, oi, op, transform); + return oi; + } + + /*! Compute the elliptic point given the parameter t and the transform + * data, that is, the center (translation) and the sin and cos of the + * rotation angle. + */ + void elliptic_point(double a, double b, double t, + double& x, double& y) const { + x = a * std::cos(t); + y = b * std::sin(t); + } + + /*! Handle parabolas. + * The arc-length closed form can be found here: + * https://www.vcalc.com/wiki/vCalc/Parabola+-+arc+length + */ + template + OutputIterator approximate_parabola(const X_monotone_curve_2& xcv, + double error, OutputIterator oi, + bool l2r = true) + const { + // std::cout << "PARABOLA\n"; + auto min_vertex = m_traits.construct_min_vertex_2_object(); + auto max_vertex = m_traits.construct_max_vertex_2_object(); + const auto& src = (l2r) ? min_vertex(xcv) : max_vertex(xcv); + const auto& trg = (l2r) ? max_vertex(xcv) : min_vertex(xcv); + auto xs = CGAL::to_double(src.x()); + auto ys = CGAL::to_double(src.y()); + auto xt = CGAL::to_double(trg.x()); + auto yt = CGAL::to_double(trg.y()); + // std::cout << "curve: (" << xs << "," << ys + // << ") => (" << xt << "," << yt << ")" + // << std::endl; + + double r_m, t_m, s_m, u_m, v_m, w_m; + double cost, sint; + double xs_t, ys_t, xt_t, yt_t; + double a; + double ts, tt; + double cx, cy; + m_traits.approximate_parabola(xcv, + r_m, t_m, s_m, u_m, v_m, w_m, cost, sint, + xs_t, ys_t, xt_t, yt_t, a, ts, tt, cx, cy, + l2r); + // std::cout << "sint, cost: " << sint << "," << cost << std::endl; + // std::cout << "a: " << a << std::endl; + // std::cout << "xs' = " << xs_t << "," << ys_t << std::endl; + // std::cout << "xt' = " << xt_t << "," << yt_t << std::endl; + // std::cout << "ts,tt = " << ts << "," << tt << std::endl; + + *oi++ = Approximate_point_2(xs, ys); + add_parabolic_points(xs_t, ys_t, ts, xt_t, yt_t, tt, error, oi, + [&](double tm, double& xm, double& ym) { + parabolic_point(a, tm, xm, ym); + }, + [&](double xc, double& yc, double& x, double& y) { + transform_point(xc, yc, cost, sint, cx, cy, x, y); + }); + *oi++ = Approximate_point_2(xt, yt); + return oi; + } + + /*! Add either an elliptic or a hyperbilc point. + * The arc endpoints are (`x1`, `y1`) and (`x2`, `y2`). + * In our parametric representations for ellipses and hyperbolas the + * following holds: + * \f$p1 = (x1, y1); x1 = x(t1), y1 = y(t1)\f$, and + * \f$p2 = (x2, y2); x2 = x(t2), y2 = y(t2)\f$ + * The Hausdorff distance between the arc and the segment (p1,p2) is + * at (xm,ym), where xm = x(tm), ym = y(tmp), and tm = (x2-x1) / (y2-y1). + * \param[in] x1 the canonical-arc source-point \f$x\f$-coordinate. + * \param[in] y1 the canonical-arc source-point \f$y\f$-coordinate. + * \param[in] t1 the source-point parameter; \f$yx1 = x(t1) and y1 = y(t1)\f$y. + * \param[in] x2 the canonical-arc target-point \f$x\f$-coordinate. + * \param[in] y2 the canonical arc target-point \f$y\f$-coordinate. + * \param[in] t2 the target-point parameter; \f$yx2 = x(t2) and y2 = y(t2)\f$y. + * \param[in] error + * \param[out] oi + * \param[in] op a function that computes a point \f$(x(t),y(t))\f$ given \f$t\f$. + * \param[in] transform a function that transforms a canonical point to an + * actual point + * + * Observe that in our parametric representation for ellipses and + * hyperbolas, the expression for tm is different. + */ + template + OutputIterator add_parabolic_points(double x1, double y1, double t1, + double x2, double y2, double t2, + double error, OutputIterator oi, + Op op, Transform transform) const { + auto dx = x2 - x1; + auto dy = y2 - y1; + auto tm = (dy == 0) ? 0 : dx / dy; + + // Compute the canocal point where the error is maximal. + double xm, ym; + op(tm, xm, ym); + + // Compute the error and abort if it is below the threshold + auto l = std::sqrt(dx*dx + dy*dy); + auto e = std::abs((xm*dy - ym*dx + x2*y1 - x1*y2) / l); + if (e < error) return oi; + + // Compute the actual (transformed) point + double x, y; + transform(xm, ym, x, y); + add_parabolic_points(x1, y1, t1, xm, ym, tm, error, oi, op, transform); + *oi++ = Approximate_point_2(x, y); + add_parabolic_points(xm, ym, tm, x2, y2, t2, error, oi, op, transform); + return oi; + } + + /*! Compute the parabolic point given the parameter t and the transform + * data, that is, the center (translation) and the sin and cos of the + * rotation angle. + */ + void parabolic_point(double a, double t, double& x, double& y) const { + x = a*t*t; + y = 2.0*a*t; + } + + /*! Handle hyperbolas. + */ + template + OutputIterator approximate_hyperbola(const X_monotone_curve_2& xcv, + double error, OutputIterator oi, + bool l2r = true) const { + // std::cout << "HYPERBOLA\n"; + auto min_vertex = m_traits.construct_min_vertex_2_object(); + auto max_vertex = m_traits.construct_max_vertex_2_object(); + const auto& src = (l2r) ? min_vertex(xcv) : max_vertex(xcv); + const auto& trg = (l2r) ? max_vertex(xcv) : min_vertex(xcv); + auto xs = CGAL::to_double(src.x()); + auto ys = CGAL::to_double(src.y()); + auto xt = CGAL::to_double(trg.x()); + auto yt = CGAL::to_double(trg.y()); + + double r_m, t_m, s_m, u_m, v_m, w_m; + double cost, sint; + double xs_t, ys_t, xt_t, yt_t; + double a, b; + double cx, cy; + double ts, tt; + m_traits.approximate_hyperbola(xcv, r_m, t_m, s_m, u_m, v_m, w_m, + cost, sint, + xs_t, ys_t, ts, xt_t, yt_t, tt, + a, b, cx, cy, l2r); + // std::cout << "a, b: " << a << "," << b << std::endl; + // std::cout << "ts, tt: " << ts << "," << tt << std::endl; + + // std::cout << "a, b: " << a << "," << b << std::endl; + *oi++ = Approximate_point_2(xs, ys); + add_points(xs_t, ys_t, ts, xt_t, yt_t, tt, error, oi, + [&](double tm, double& xm, double& ym) { + hyperbolic_point(a, b, tm, xm, ym); + }, + [&](double xc, double& yc, double& x, double& y) { + transform_point(xc, yc, cost, sint, cx, cy, x, y); + }); + *oi++ = Approximate_point_2(xt, yt); + return oi; + } + + /*! Compute the hyperbolic point given the parameter t and the transform + * data, that is, the center (translation) and the sin and cos of the + * rotation angle. + */ + void hyperbolic_point(double a, double b, double t, + double& x, double& y) const { + x = a * std::cosh(t); + y = b * std::sinh(t); + } + }; + + /*! Obtain an Approximate_2 functor object. */ + Approximate_2 approximate_2_object() const { return Approximate_2(*this); } + + //! Functor + class Construct_x_monotone_curve_2 { + using Traits = Arr_conic_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits The traits. + */ + Construct_x_monotone_curve_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_conic_traits_2; + + public: + /*! Construct an \f$x\f$-monotone arc from a conic arc. + * \param cv The given curve. + * \pre cv is \f$x\f$-monotone. + */ + X_monotone_curve_2 operator()(const Curve_2& cv) const { + CGAL_precondition(cv.is_valid() && is_x_monotone(cv)); + X_monotone_curve_2 xcv(cv); + m_traits.set_x_monotone(xcv); + return xcv; + } + + /*! Construct an \f$x\f$-monotone arc from a conic arc. + * \param xcv The given curve. + * \param id The ID of the base curve. + */ + X_monotone_curve_2 operator()(const Curve_2& cv, const Conic_id& id) const { + X_monotone_curve_2 xcv(cv, id); + CGAL_precondition(xcv.is_valid() && id.is_valid()); + m_traits.set_x_monotone(xcv); + return xcv; + } + + /*! Construct an \f$x\f$-monotone sub-arc from a conic arc. + * \param cv The given (base) arc. + * \param source The source point. + * \param target The target point. + * \param id The id of the base arc. + */ + X_monotone_curve_2 operator()(const Curve_2& cv, + const Point_2& source, const Point_2& target, + const Conic_id& id) const + { + // Set the two endpoints. + X_monotone_curve_2 xcv(cv, id); + xcv.set_source(source); + xcv.set_target(target); + CGAL_precondition(xcv.is_valid() && id.is_valid()); + m_traits.set_x_monotone(xcv); + return xcv; + } + + /*! Return an \f$x\f$-monotone curve connecting the two given endpoints. + * \param source The first point. + * \param target The second point. + * \pre `source` and `target` must not be the same. + * \return A segment connecting `source` and `target`. + */ + X_monotone_curve_2 operator()(const Point_2& source, const Point_2& target) + const + { + X_monotone_curve_2 xcv; + + // Set the basic properties. + xcv.set_endpoints(source, target); + xcv.set_orientation(COLLINEAR); + xcv.set_flag(Curve_2::IS_VALID); + + // Set the other properties. + xcv.set_flag(X_monotone_curve_2::DEGREE_1); + xcv.set_flag(X_monotone_curve_2::IS_SPECIAL_SEGMENT); + xcv.update_extra_data(); + + auto cmp_xy = m_traits.m_alg_kernel->compare_xy_2_object(); + Comparison_result res = cmp_xy(source, target); + CGAL_precondition(res != EQUAL); + if (res == SMALLER) xcv.set_flag(X_monotone_curve_2::IS_DIRECTED_RIGHT); + + // Check whether the segment is vertical. + if (CGAL::sign(xcv.extra_data()->b) == ZERO) + xcv.set_flag(X_monotone_curve_2::IS_VERTICAL_SEGMENT); + + return xcv; + } + + /*! Construct a special segment of a given line connecting to given + * endpoints. + * \param a, b, c The coefficients of the supporting line (`ax + by + c = 0`). + * \param source The source point. + * \param target The target point. + */ + X_monotone_curve_2 operator()(const Algebraic& a, const Algebraic& b, + const Algebraic& c, + const Point_2& source, const Point_2& target) + const + { + auto cmp_xy = m_traits.m_alg_kernel->compare_xy_2_object(); + Comparison_result res = cmp_xy(source, target); + CGAL_precondition(res != EQUAL); + + X_monotone_curve_2 xcv; + // Make sure the two endpoints lie on the supporting line. + CGAL_precondition(CGAL::sign(a*source.x()+b*source.y()+c) == CGAL::ZERO); + CGAL_precondition(CGAL::sign(a*target.x()+b*target.y()+c) == CGAL::ZERO); + + // Set the basic properties. + xcv.set_endpoints(source, target); + xcv.set_orientation(COLLINEAR); + xcv.set_flag(Curve_2::IS_VALID); + + // Set the other properties. + if (res == SMALLER) xcv.set_flag(X_monotone_curve_2::IS_DIRECTED_RIGHT); + + xcv.set_flag(X_monotone_curve_2::DEGREE_1); + xcv.set_flag(X_monotone_curve_2::IS_SPECIAL_SEGMENT); + xcv.set_extra_data(a, b, c, ZERO); + + // Check whether the segment is vertical. + if (CGAL::sign(xcv.extra_data()->b) == ZERO) + xcv.set_flag(X_monotone_curve_2::IS_VERTICAL_SEGMENT); + + return xcv; + } + + private: + /*! Determine whether the arc is \f$x\f$-monotone. + */ + bool is_x_monotone(const Curve_2& cv) const { + // Collect vertical tangency points. + Alg_point_2 vtan_ps[2]; + auto res = m_traits.vertical_tangency_points(cv, vtan_ps); + return (res == 0); + } + + /*! Determine whether the arc is \f$y\f$-monotone. + */ + bool is_y_monotone(const Curve_2& cv) const { + // Collect horizontal tangency points. + Alg_point_2 htan_ps[2]; + auto res = m_traits.horizontal_tangency_points(cv, htan_ps); + return (res == 0); + } + + }; + + /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const + { return Construct_x_monotone_curve_2(*this); } + + //! Constructor of conic arcs + class Construct_curve_2 { + protected: + using Traits = Arr_conic_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits The traits. + */ + Construct_curve_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_conic_traits_2; + + public: + /*! Construct an empty curve. + */ + Curve_2 operator()() const { return Curve_2(); } + + /*! Construct a conic arc which is the full conic: + * `C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0` + * \pre The conic C must be an ellipse (so `4rs - t^2 > 0`). + */ + Curve_2 operator()(const Rational& r, const Rational& s, const Rational& t, + const Rational& u, const Rational& v, const Rational& w) + const + { + // Ensure that the given curve is an ellipse (4rs - t^2 is positive). + CGAL_precondition(CGAL::sign(4*r*s - t*t) == POSITIVE); + + // Set the arc to be the full conic (and compute the orientation). + Rational rat_coeffs[6]; + rat_coeffs[0] = r; + rat_coeffs[1] = s; + rat_coeffs[2] = t; + rat_coeffs[3] = u; + rat_coeffs[4] = v; + rat_coeffs[5] = w; + Curve_2 arc; + m_traits.set_full(arc, rat_coeffs, true); + return arc; + } + + /*! Construct a conic arc that lies on the conic: + * `C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0` + * \param orient The orientation of the arc (clockwise or counterclockwise). + * \param source The source point. + * \param target The target point. + * \pre The source and the target must be on the conic boundary and must + * not be the same. + */ + Curve_2 operator()(const Rational& r, const Rational& s, const Rational& t, + const Rational& u, const Rational& v, const Rational& w, + Orientation orient, + const Point_2& source, const Point_2& target) const { + // Make sure that the source and the taget are not the same. + const auto alg_kernel = m_traits.m_alg_kernel; + CGAL_precondition_code(auto eq = alg_kernel->compare_xy_2_object()); + CGAL_precondition(eq(source, target) != EQUAL); + // Set the arc properties (no need to compute the orientation). + Rational rat_coeffs[6] = {r, s, t, u, v, w}; + Curve_2 arc; + arc.set_orientation(orient); + arc.set_endpoints(source, target); + m_traits.set(arc, rat_coeffs); + return arc; + } + + /*! Construct a conic arc that is a circular arc from given three points. + * \param p1 The arc source. + * \param p2 A point in the interior of the arc. + * \param p3 The arc target. + * \pre The three points must not be collinear. + */ + Curve_2 operator()(const Rat_point_2& p1, const Rat_point_2& p2, + const Rat_point_2& p3) const { + Curve_2 arc; + + // Set the source and target. + const Rational& x1 = p1.x(); + const Rational& y1 = p1.y(); + const Rational& x2 = p2.x(); + const Rational& y2 = p2.y(); + const Rational& x3 = p3.x(); + const Rational& y3 = p3.y(); + + const auto nt_traits = m_traits.m_nt_traits; + const auto alg_kernel = m_traits.m_alg_kernel; + Point_2 source(nt_traits->convert(x1), nt_traits->convert(y1)); + Point_2 target(nt_traits->convert(x3), nt_traits->convert(y3)); + arc.set_endpoints(source, target); + + // Make sure that the source and the taget are not the same. + CGAL_precondition_code(auto cmp_xy = alg_kernel->compare_xy_2_object()); + CGAL_precondition(cmp_xy(source, target) != EQUAL); + + // Compute the lines: A1*x + B1*y + C1 = 0, + // and: A2*x + B2*y + C2 = 0, + // where: + const Rational two(2); + + const Rational A1 = two*(x1 - x2); + const Rational B1 = two*(y1 - y2); + const Rational C1 = y2*y2 - y1*y1 + x2*x2 - x1*x1; + + const Rational A2 = two*(x2 - x3); + const Rational B2 = two*(y2 - y3); + const Rational C2 = y3*y3 - y2*y2 + x3*x3 - x2*x2; + + // Compute the coordinates of the intersection point between the + // two lines, given by (Nx / D, Ny / D), where: + const Rational Nx = B1*C2 - B2*C1; + const Rational Ny = A2*C1 - A1*C2; + const Rational D = A1*B2 - A2*B1; + + // Make sure the three points are not collinear. + const bool points_collinear = (CGAL::sign(D) == ZERO); + + if (points_collinear) { + arc.reset_flags(); // inavlid arc + return arc; + } + + // The equation of the underlying circle is given by: + Rational rat_coeffs[6]; + rat_coeffs[0] = D*D; + rat_coeffs[1] = D*D; + rat_coeffs[2] = 0; + rat_coeffs[3] = -two*D*Nx; + rat_coeffs[4] = -two*D*Ny; + rat_coeffs[5] = + Nx*Nx + Ny*Ny - ((D*x2 - Nx)*(D*x2 - Nx) + (D*y2 - Ny)*(D*y2 - Ny)); + + // Determine the orientation: If the mid-point forms a left-turn with + // the source and the target points, the orientation is positive (going + // counterclockwise). + // Otherwise, it is negative (going clockwise). + auto orient_f = alg_kernel->orientation_2_object(); + Point_2 p_mid(nt_traits->convert(x2), nt_traits->convert(y2)); + + auto orient = (orient_f(source, p_mid, target) == LEFT_TURN) ? + COUNTERCLOCKWISE : CLOCKWISE; + arc.set_orientation(orient); + + // Set the arc properties (no need to compute the orientation). + m_traits.set(arc, rat_coeffs); + return arc; + } + + /*! Construct a conic arc from given five points, specified by the + * points p1, p2, p3, p4 and p5. + * \param p1 The source point of the given arc. + * \param p2,p3,p4 Points lying on the conic arc, between p1 and p5. + * \param p5 The target point of the given arc. + * \pre No three points are collinear. + */ + Curve_2 operator()(const Rat_point_2& p1, const Rat_point_2& p2, + const Rat_point_2& p3, const Rat_point_2& p4, + const Rat_point_2& p5) const { + Curve_2 arc; + + // Make sure that no three points are collinear. + auto orient_f = m_traits.m_rat_kernel->orientation_2_object(); + const bool point_collinear = + (orient_f(p1, p2, p3) == COLLINEAR || + orient_f(p1, p2, p4) == COLLINEAR || + orient_f(p1, p2, p5) == COLLINEAR || + orient_f(p1, p3, p4) == COLLINEAR || + orient_f(p1, p3, p5) == COLLINEAR || + orient_f(p1, p4, p5) == COLLINEAR || + orient_f(p2, p3, p4) == COLLINEAR || + orient_f(p2, p3, p5) == COLLINEAR || + orient_f(p2, p4, p5) == COLLINEAR || + orient_f(p3, p4, p5) == COLLINEAR); + + if (point_collinear) { + arc.reset_flags(); // inavlid arc + return arc; + } + + // Set the source and target. + const Rational& x1 = p1.x(); + const Rational& y1 = p1.y(); + const Rational& x5 = p5.x(); + const Rational& y5 = p5.y(); + + const auto nt_traits = m_traits.m_nt_traits; + Point_2 source(nt_traits->convert(x1), nt_traits->convert(y1)); + Point_2 target(nt_traits->convert(x5), nt_traits->convert(y5)); + arc.set_endpoints(source, target); + + // Set a conic curve that passes through the five given point. + typename Rat_kernel::Conic_2 temp_conic; + temp_conic.set(p1, p2, p3, p4, p5); + + // Get the conic coefficients. + Rational rat_coeffs[6]; + rat_coeffs[0] = temp_conic.r(); + rat_coeffs[1] = temp_conic.s(); + rat_coeffs[2] = temp_conic.t(); + rat_coeffs[3] = temp_conic.u(); + rat_coeffs[4] = temp_conic.v(); + rat_coeffs[5] = temp_conic.w(); + + // Determine the orientation: If one of the midpoints forms a left-turn + // with the source and the target points, the orientation is positive + // (going counterclockwise). + // Otherwise, it is negative (going clockwise). + const Orientation turn = orient_f(p1, p2, p5); + + if (turn == LEFT_TURN) { + arc.set_orientation(COUNTERCLOCKWISE); + CGAL_precondition(orient_f(p1, p3, p5) == LEFT_TURN && + orient_f(p1, p4, p5) == LEFT_TURN); + } + else { + arc.set_orientation(CLOCKWISE); + CGAL_precondition(orient_f(p1, p3, p5) != LEFT_TURN && + orient_f(p1, p4, p5) != LEFT_TURN); + } + + // Set the arc properties (no need to compute the orientation). + m_traits.set(arc, rat_coeffs); + + // Make sure that all midpoints are strictly between the + // source and the target. + Point_2 mp2(nt_traits->convert(p2.x()), nt_traits->convert(p2.y())); + Point_2 mp3(nt_traits->convert(p3.x()), nt_traits->convert(p3.y())); + Point_2 mp4(nt_traits->convert(p4.x()), nt_traits->convert(p4.y())); + + if (! m_traits.is_strictly_between_endpoints(arc, mp2) || + ! m_traits.is_strictly_between_endpoints(arc, mp3) || + ! m_traits.is_strictly_between_endpoints(arc, mp4)) + { + arc.reset_flags(); // inavlid arc + return arc; + } + return arc; + } + + /*! Construct a conic arc that lies on a conic given by its coefficients: + * `C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0` + * The source and the target are specified by the intersection of the + * conic with: + * `C_1: r_1*x^2 + s_1*y^2 + t_1*xy + u_1*x + v_1*y + w_1 = 0` + * `C_2: r_2*x^2 + s_2*y^2 + t_2*xy + u_2*x + v_2*y + w_2 = 0` + * The user must also specify the source and the target with approximated + * coordinates. The actual intersection points that best fits the source + * (or the target) will be selected. + */ + Curve_2 operator()(const Rational& r, const Rational& s, const Rational& t, + const Rational& u, const Rational& v, const Rational& w, + Orientation orient, + const Point_2& app_source, + const Rational& r_1, const Rational& s_1, + const Rational& t_1, const Rational& u_1, + const Rational& v_1, const Rational& w_1, + const Point_2& app_target, + const Rational& r_2, const Rational& s_2, + const Rational& t_2, const Rational& u_2, + const Rational& v_2, const Rational& w_2) const { + Curve_2 arc; + arc.set_orientation(orient); + + // Create the integer coefficients of the base conic. + Rational rat_coeffs [6]; + rat_coeffs[0] = r; + rat_coeffs[1] = s; + rat_coeffs[2] = t; + rat_coeffs[3] = u; + rat_coeffs[4] = v; + rat_coeffs[5] = w; + + const auto nt_traits = m_traits.m_nt_traits; + Integer base_coeffs[6]; + nt_traits->convert_coefficients(rat_coeffs, rat_coeffs + 6, base_coeffs); + + int deg_base = (CGAL::sign(base_coeffs[0]) == ZERO && + CGAL::sign(base_coeffs[1]) == ZERO && + CGAL::sign(base_coeffs[2]) == ZERO) ? 1 : 2; + + // Compute the endpoints. + Rational aux_rat_coeffs [6]; + Algebraic xs[4]; + Algebraic ys[4]; + Algebraic val; + bool found; + double curr_dist; + double min_dist = -1; + Integer aux_coeffs[6]; + for (int k = 1; k <= 2; ++k) { + // Get the integer coefficients of the k'th auxiliary conic curve. + aux_rat_coeffs[0] = (k == 1) ? r_1 : r_2; + aux_rat_coeffs[1] = (k == 1) ? s_1 : s_2; + aux_rat_coeffs[2] = (k == 1) ? t_1 : t_2; + aux_rat_coeffs[3] = (k == 1) ? u_1 : u_2; + aux_rat_coeffs[4] = (k == 1) ? v_1 : v_2; + aux_rat_coeffs[5] = (k == 1) ? w_1 : w_2; + + nt_traits->convert_coefficients(aux_rat_coeffs, aux_rat_coeffs + 6, + aux_coeffs); + + int deg_aux = ((CGAL::sign(aux_coeffs[0]) == ZERO) && + (CGAL::sign(aux_coeffs[1]) == ZERO) && + (CGAL::sign(aux_coeffs[2]) == ZERO)) ? 1 : 2; + + // Compute the x- and y-coordinates of intersection points of the base + // conic and the k'th auxiliary conic. + int n_xs = compute_resultant_roots(*nt_traits, + base_coeffs[0], base_coeffs[1], + base_coeffs[2], + base_coeffs[3], base_coeffs[4], + base_coeffs[5], + deg_base, + aux_coeffs[0], aux_coeffs[1], + aux_coeffs[2], + aux_coeffs[3], aux_coeffs[4], + aux_coeffs[5], + deg_aux, + xs); + + int n_ys = compute_resultant_roots(*nt_traits, + base_coeffs[1], base_coeffs[0], + base_coeffs[2], + base_coeffs[4], base_coeffs[3], + base_coeffs[5], + deg_base, + aux_coeffs[1], aux_coeffs[0], + aux_coeffs[2], + aux_coeffs[4], aux_coeffs[3], + aux_coeffs[5], + deg_aux, + ys); + + // Find the intersection point which is nearest the given approximation + // and set it as the endpoint. + found = false; + for (int i = 0; i < n_xs; ++i) { + for (int j = 0; j < n_ys; ++j) { + // Check if the point (xs[i], ys[j]) lies on both conics. + val = nt_traits->convert(base_coeffs[0]) * xs[i]*xs[i] + + nt_traits->convert(base_coeffs[1]) * ys[j]*ys[j] + + nt_traits->convert(base_coeffs[2]) * xs[i]*ys[j] + + nt_traits->convert(base_coeffs[3]) * xs[i] + + nt_traits->convert(base_coeffs[4]) * ys[j] + + nt_traits->convert(base_coeffs[5]); + + if (CGAL::sign(val) != ZERO) continue; + + val = nt_traits->convert(aux_coeffs[0]) * xs[i]*xs[i] + + nt_traits->convert(aux_coeffs[1]) * ys[j]*ys[j] + + nt_traits->convert(aux_coeffs[2]) * xs[i]*ys[j] + + nt_traits->convert(aux_coeffs[3]) * xs[i] + + nt_traits->convert(aux_coeffs[4]) * ys[j] + + nt_traits->convert(aux_coeffs[5]); + + if (CGAL::sign(val) == ZERO) { + // Compute the distance of (xs[i], ys[j]) from the approximated + // endpoint. + double dx, dy; + if (k == 1) { + dx = CGAL::to_double (xs[i] - app_source.x()); + dy = CGAL::to_double (ys[j] - app_source.y()); + } + else { + dx = CGAL::to_double (xs[i] - app_target.x()); + dy = CGAL::to_double (ys[j] - app_target.y()); + } + + curr_dist = dx*dx + dy*dy; + + // Update the endpoint if (xs[i], ys[j]) is the nearest pair so + // far. + if (! found || curr_dist < min_dist) { + if (k == 1) arc.set_source(Point_2(xs[i], ys[j])); + else arc.set_target(Point_2(xs[i], ys[j])); + min_dist = curr_dist; + found = true; + } + } + } + } + + if (! found) { + arc.reset_flags(); // inavlid arc + return arc; + } + } + + // Make sure that the source and the target are not the same. + auto cmp_xy = m_traits.m_alg_kernel->compare_xy_2_object(); + if (cmp_xy(arc.source(), arc.target()) == EQUAL) { + arc.reset_flags(); // inavlid arc + return arc; + } + + // Set the arc properties (no need to compute the orientation). + m_traits.set(arc, rat_coeffs); + return arc; + } + + /*! Return a segment connecting the two given endpoints. + * \param source The source point. + * \param target The target point. + * \pre `source` and `target` must not be the same. + * \return A segment connecting `source` and `target`. + */ + Curve_2 operator()(const Point_2& source, const Point_2& target) const { + const auto alg_kernel = m_traits.m_alg_kernel; + CGAL_precondition_code(auto cmp_xy = alg_kernel->compare_xy_2_object()); + CGAL_precondition(cmp_xy(source, target) != EQUAL); + + Curve_2 cv; + cv.set_coefficients(0, 0, 0, 0, 0, 0); + cv.set_orientation(COLLINEAR); + cv.set_flag(Curve_2::IS_VALID); + cv.set_endpoints(source, target); + cv.update_extra_data(); + return cv; + } + + /*! Construct a conic arc from a given line segment. + * \param seg The line segment with rational endpoints. + */ + Curve_2 operator()(const Rat_segment_2& seg) const { + Curve_2 cv; + cv.set_orientation(COLLINEAR); + + // Set the source and target. + const auto rat_kernel = m_traits.m_rat_kernel; + Rat_point_2 source = rat_kernel->construct_vertex_2_object()(seg, 0); + Rat_point_2 target = rat_kernel->construct_vertex_2_object()(seg, 1); + const Rational& x1 = source.x(); + const Rational& y1 = source.y(); + const Rational& x2 = target.x(); + const Rational& y2 = target.y(); + + const auto nt_traits = m_traits.m_nt_traits; + cv.set_source(Point_2(nt_traits->convert(x1), nt_traits->convert(y1))); + cv.set_target(Point_2(nt_traits->convert(x2), nt_traits->convert(y2))); + + // Make sure that the source and the taget are not the same. + CGAL_precondition_code(auto cmp_xy = rat_kernel->compare_xy_2_object()); + CGAL_precondition(cmp_xy(source, target) != EQUAL); + + // The supporting conic is r=s=t=0, and u*x + v*y + w = 0 should hold + // for both the source (x1,y1) and the target (x2, y2). + const Rational zero(0); + const Rational one(1); + Rational rat_coeffs[6]; + + rat_coeffs[0] = zero; + rat_coeffs[1] = zero; + rat_coeffs[2] = zero; + + if (rat_kernel->compare_x_2_object()(source, target) == EQUAL) { + // The supporting conic is a vertical line, of the form x = CONST. + rat_coeffs[3] = one; + rat_coeffs[4] = zero; + rat_coeffs[5] = -x1; + } + else { + // The supporting line is A*x + B*y + C = 0, where: + // + // A = y2 - y1, B = x1 - x2, C = x2*y1 - x1*y2 + // + rat_coeffs[3] = y2 - y1; + rat_coeffs[4] = x1 - x2; + rat_coeffs[5] = x2*y1 - x1*y2; + } + + // Set the arc properties (no need to compute the orientation). + m_traits.set(cv, rat_coeffs); + return cv; + } + + /*! Construct a conic arc that is a full circle. + * \param circ The circle with rational center and rational squared radius. + */ + Curve_2 operator()(const Rat_circle_2& circ) const { + Curve_2 cv; + cv.set_orientation(CLOCKWISE); + + // Get the circle properties. + const auto rat_kernel = m_traits.m_rat_kernel; + Rat_point_2 center = rat_kernel->construct_center_2_object()(circ); + Rational x0 = center.x(); + Rational y0 = center.y(); + Rational r_sqr = rat_kernel->compute_squared_radius_2_object()(circ); + + // Produce the correponding conic: if the circle center is (x0,y0) + // and its squared radius is R^2, that its equation is: + // x^2 + y^2 - 2*x0*x - 2*y0*y + (x0^2 + y0^2 - R^2) = 0 + // Note that this equation describes a curve with a negative (clockwise) + // orientation. + const Rational zero(0); + const Rational one(1); + const Rational minus_two(-2); + Rational rat_coeffs[6]; + rat_coeffs[0] = one; + rat_coeffs[1] = one; + rat_coeffs[2] = zero; + rat_coeffs[3] = minus_two*x0; + rat_coeffs[4] = minus_two*y0; + rat_coeffs[5] = x0*x0 + y0*y0 - r_sqr; + + // Set the arc to be the full conic (no need to compute the orientation). + m_traits.set_full(cv, rat_coeffs, false); + return cv; + } + + /*! Construct a conic arc that lies on a given circle: + * `C: (x - x0)^2 + (y - y0)^2 = R^2` + * \param orient The orientation of the circle. + * \param source The source point. + * \param target The target point. + * \pre The source and the target must be on the conic boundary and must + * not be the same. + */ + Curve_2 operator()(const Rat_circle_2& circ, Orientation orient, + const Point_2& source, const Point_2& target) const { + // Make sure that the source and the taget are not the same. + CGAL_precondition_code(auto cmp_xy = + m_traits.m_alg_kernel->compare_xy_2_object()); + CGAL_precondition(cmp_xy(source, target) != EQUAL); + CGAL_precondition(orient != COLLINEAR); + + Curve_2 cv; + cv.set_endpoints(source, target); + cv.set_orientation(orient); + + // Get the circle properties. + const auto rat_kernel = m_traits.m_rat_kernel; + Rat_point_2 center = rat_kernel->construct_center_2_object()(circ); + Rational x0 = center.x(); + Rational y0 = center.y(); + Rational r_sqr = rat_kernel->compute_squared_radius_2_object()(circ); + + // Produce the correponding conic: if the circle center is (x0,y0) + // and it squared radius is R^2, that its equation is: + // x^2 + y^2 - 2*x0*x - 2*y0*y + (x0^2 + y0^2 - R^2) = 0 + // Since this equation describes a curve with a negative (clockwise) + // orientation, we multiply it by -1 if nece_Conic_arc_2 ssary to obtain a + // positive (counterclockwise) orientation. + const Rational zero(0); + Rational rat_coeffs[6]; + + if (cv.orientation() == COUNTERCLOCKWISE) { + const Rational minus_one(-1); + const Rational two(2); + + rat_coeffs[0] = minus_one; + rat_coeffs[1] = minus_one; + rat_coeffs[2] = zero; + rat_coeffs[3] = two*x0; + rat_coeffs[4] = two*y0; + rat_coeffs[5] = r_sqr - x0*x0 - y0*y0; + } + else { + const Rational one(1); + const Rational minus_two(-2); + + rat_coeffs[0] = one; + rat_coeffs[1] = one; + rat_coeffs[2] = zero; + rat_coeffs[3] = minus_two*x0; + rat_coeffs[4] = minus_two*y0; + rat_coeffs[5] = x0*x0 + y0*y0 - r_sqr; + } + + // Set the arc properties (no need to compute the orientation). + m_traits.set(cv, rat_coeffs); + return cv; + } + }; + + /*! Obtain a Construct_curve_2 functor object. */ + Construct_curve_2 construct_curve_2_object() const + { return Construct_curve_2(*this); } + //@} + + /// \name Functor definitions for the Boolean set-operation traits. + //@{ + + class Compare_endpoints_xy_2 { + public: + /*! Compare the endpoints of an $x$-monotone curve lexicographically. + * (assuming the curve has a designated source and target points). + * \param cv The curve. + * \return SMALLER if the curve is directed right; + * LARGER if the curve is directed left. + */ + Comparison_result operator()(const X_monotone_curve_2& cv) const + { return (cv.is_directed_right()) ? SMALLER : LARGER; } + }; + + /*! Obtain a Compare_endpoints_xy_2 functor object. */ + Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const + { return Compare_endpoints_xy_2(); } + + class Construct_opposite_2 { + public: + /*! Construct an opposite x-monotone (with swapped source and target). + * \param cv The curve. + * \return The opposite curve. + */ + X_monotone_curve_2 operator()(const X_monotone_curve_2& cv) const + { return cv.flip(); } + }; + + /*! Obtain a Construct_opposite_2 functor object. */ + Construct_opposite_2 construct_opposite_2_object() const + { return Construct_opposite_2(); } + + class Trim_2 { + protected: + using Traits = Arr_conic_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits the traits (in case it has state) + */ + Trim_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_conic_traits_2; + + public: + /*!\brief + * Returns a trimmed version of an cv + * + * \param xcv The arc + * \param src the new first endpoint + * \param tgt the new second endpoint + * \return The trimmed arc + * + * \pre src != tgt + * \pre both points must be interior and must lie on \c cv + */ + X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv, + const Point_2& src, const Point_2& tgt) const + { + // make functor objects + CGAL_precondition_code(Compare_y_at_x_2 compare_y_at_x_2 = + m_traits.compare_y_at_x_2_object()); + CGAL_precondition_code(Equal_2 equal_2 = m_traits.equal_2_object()); + Compare_x_2 compare_x_2 = m_traits.compare_x_2_object(); + // Check whether source and taget are two distinct points and they lie + // on the line. + CGAL_precondition(compare_y_at_x_2(src, xcv) == EQUAL); + CGAL_precondition(compare_y_at_x_2(tgt, xcv) == EQUAL); + CGAL_precondition(! equal_2(src, tgt)); + + //check if the orientation conforms to the src and tgt. + return ((xcv.is_directed_right() && compare_x_2(src, tgt) == LARGER) || + (! xcv.is_directed_right() && compare_x_2(src, tgt) == SMALLER)) ? + trim(xcv, tgt, src) : trim(xcv, src, tgt); + } + + private: + /*! Trim the arc given its new endpoints. + * \param ps The new source point. + * \param pt The new target point. + * \return The new trimmed arc. + * \pre Both ps and pt lies on the arc and must conform with the current + * direction of the arc. + */ + X_monotone_curve_2 trim(const X_monotone_curve_2& xcv, + const Point_2& ps, const Point_2& pt) const { + // Make sure that both ps and pt lie on the arc. + CGAL_precondition(m_traits.contains_point(xcv, ps) && + m_traits.contains_point(xcv, pt)); + + X_monotone_curve_2 res_xcv = xcv; // make a copy of the current arc + + auto eq = m_traits.m_alg_kernel->equal_2_object(); + auto set_source = [&](const Point_2 ps)->void { + if (! eq(ps, xcv.source())) { + res_xcv.set_source(ps); + if (! ps.is_generating_conic(xcv.id())) + res_xcv.source().set_generating_conic(xcv.id()); + } + }; + auto set_target = [&](const Point_2 pt)->void { + if (! eq(pt, xcv.target())) { + res_xcv.set_target(pt); + if (! pt.is_generating_conic(xcv.id())) + res_xcv.target().set_generating_conic(xcv.id()); + } + }; + + // Make sure that the endpoints conform with the direction of the arc. + auto cmp_xy = m_traits.m_alg_kernel->compare_xy_2_object(); + auto res = cmp_xy(ps, pt); + CGAL_assertion(res != EQUAL); + if ((xcv.test_flag(X_monotone_curve_2::IS_DIRECTED_RIGHT) && + (res == LARGER)) || + (! xcv.test_flag(X_monotone_curve_2::IS_DIRECTED_RIGHT) && + (res == SMALLER))) { + set_source(pt); + set_target(ps); + } + else { + set_source(ps); + set_target(pt); + } + + return res_xcv; + } + }; + + /*! Obtain a Trim_2 functor object. */ + Trim_2 trim_2_object() const { return Trim_2(*this); } + //@} + + /// \name Extra functor definitions. + //@{ + + class Construct_bbox_2 { + protected: + using Traits = Arr_conic_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits The traits. + */ + Construct_bbox_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_conic_traits_2; + + public: + /*! Obtain a bounding box for the conic arc. + * \return The bounding box. + */ + Bbox_2 operator()(const X_monotone_curve_2& xcv) const { return bbox(xcv); } + Bbox_2 operator()(const Curve_2& cv) const { return bbox(cv); } + + private: + Bbox_2 bbox(const X_monotone_curve_2& xcv) const { + CGAL_precondition(xcv.is_valid()); + double x_min(0), y_min(0), x_max(0), y_max(0); + + if (xcv.is_full_conic()) { + // In case of a full conic (an ellipse or a circle), compute the + // horizontal and vertical tangency points and use them to bound the arc. + Alg_point_2 tan_ps[2]; + CGAL_assertion_code(size_t n_tan_ps); + + CGAL_assertion_code + (n_tan_ps = m_traits.vertical_tangency_points(xcv, tan_ps)); + CGAL_assertion(n_tan_ps == 2); + + if (CGAL::to_double(tan_ps[0].x()) < CGAL::to_double(tan_ps[1].x())) { + x_min = CGAL::to_double(tan_ps[0].x()); + x_max = CGAL::to_double(tan_ps[1].x()); + } + else { + x_min = CGAL::to_double(tan_ps[1].x()); + x_max = CGAL::to_double(tan_ps[0].x()); + } + + CGAL_assertion_code + (n_tan_ps = m_traits.horizontal_tangency_points(xcv, tan_ps)); + CGAL_assertion(n_tan_ps == 2); + + if (CGAL::to_double(tan_ps[0].y()) < CGAL::to_double(tan_ps[1].y())) { + y_min = CGAL::to_double(tan_ps[0].y()); + y_max = CGAL::to_double(tan_ps[1].y()); + } + else { + y_min = CGAL::to_double(tan_ps[1].y()); + y_max = CGAL::to_double(tan_ps[0].y()); + } + } + else { + // Use the source and target to initialize the exterme points. + bool source_left = + CGAL::to_double(xcv.source().x()) < CGAL::to_double(xcv.target().x()); + x_min = (source_left) ? + CGAL::to_double(xcv.source().x()) : + CGAL::to_double(xcv.target().x()); + x_max = source_left ? + CGAL::to_double(xcv.target().x()) : + CGAL::to_double(xcv.source().x()); + + bool source_down = + CGAL::to_double(xcv.source().y()) < CGAL::to_double(xcv.target().y()); + y_min = source_down ? + CGAL::to_double(xcv.source().y()) : + CGAL::to_double(xcv.target().y()); + y_max = source_down ? + CGAL::to_double(xcv.target().y()) : + CGAL::to_double(xcv.source().y()); + + // Go over the vertical tangency points and try to update the x-points. + Alg_point_2 tan_ps[2]; + auto n_tan_ps = m_traits.vertical_tangency_points(xcv, tan_ps); + for (decltype(n_tan_ps) i = 0; i < n_tan_ps; ++i) { + if (CGAL::to_double(tan_ps[i].x()) < x_min) + x_min = CGAL::to_double(tan_ps[i].x()); + if (CGAL::to_double(tan_ps[i].x()) > x_max) + x_max = CGAL::to_double(tan_ps[i].x()); + } + + // Go over the horizontal tangency points and try to update the y-points. + n_tan_ps = m_traits.horizontal_tangency_points(xcv, tan_ps); + for (decltype(n_tan_ps) i = 0; i < n_tan_ps; ++i) { + if (CGAL::to_double(tan_ps[i].y()) < y_min) + y_min = CGAL::to_double(tan_ps[i].y()); + if (CGAL::to_double(tan_ps[i].y()) > y_max) + y_max = CGAL::to_double(tan_ps[i].y()); + } + } + + // Return the resulting bounding box. + return Bbox_2(x_min, y_min, x_max, y_max); + } + }; + + /*! Obtain a Bbox_2 functor object. */ + Construct_bbox_2 construct_bbox_2_object() const + { return Construct_bbox_2(*this); } + //@} + + /*! Set the properties of a conic arc (for the usage of the constructors). + * \param rat_coeffs A vector of size 6, storing the rational coefficients + * of \f$x^2\f$, \f$y^2\f$, \f$x \cdot y\f$, \f$x\f$, \f$y\f$ + * and the free coefficient resp. + */ + void set(Curve_2& cv, const Rational* rat_coeffs) const { + cv.set_flag(Curve_2::IS_VALID); + + // Convert the coefficients vector to an equivalent vector of integer + // coefficients. + Integer int_coeffs[6]; + m_nt_traits->convert_coefficients(rat_coeffs, rat_coeffs + 6, int_coeffs); + + // Check the orientation of conic curve, and negate the conic coefficients + // if its given orientation. + typename Rat_kernel::Conic_2 temp_conic(rat_coeffs[0], rat_coeffs[1], + rat_coeffs[2], rat_coeffs[3], + rat_coeffs[4], rat_coeffs[5]); + + + Integer r, s, t, u, v, w; + if (cv.orientation() == temp_conic.orientation()) { + r = int_coeffs[0]; + s = int_coeffs[1]; + t = int_coeffs[2]; + u = int_coeffs[3]; + v = int_coeffs[4]; + w = int_coeffs[5]; + } + else { + r = -int_coeffs[0]; + s = -int_coeffs[1]; + t = -int_coeffs[2]; + u = -int_coeffs[3]; + v = -int_coeffs[4]; + w = -int_coeffs[5]; + } + cv.set_coefficients(r, s, t, u, v, w); + + const auto& source = cv.source(); + const auto& target = cv.target(); + // Make sure both endpoint lie on the supporting conic. + if (! is_on_supporting_conic(cv, source) || + ! is_on_supporting_conic(cv, target)) + { + cv.reset_flags(); // inavlid arc + return; + } + + // Check whether we have a degree 2 curve. + if ((CGAL::sign(r) != ZERO) || (CGAL::sign(s) != ZERO) || + (CGAL::sign(t) != ZERO)) + { + if (cv.orientation() == COLLINEAR) { + // Make sure the midpoint is on the line pair (thus making sure that + // the two points are not taken from different lines). + auto ctr_mid_point = m_alg_kernel->construct_midpoint_2_object(); + Point_2 p_mid = ctr_mid_point(source, target); + // if (! is_on_supporting_conic(arc, p_mid)) + if (CGAL::sign((m_nt_traits->convert(r)*p_mid.x() + + m_nt_traits->convert(t)*p_mid.y() + + m_nt_traits->convert(u)) * p_mid.x() + + (m_nt_traits->convert(s)*p_mid.y() + + m_nt_traits->convert(v)) * p_mid.y() + + m_nt_traits->convert(w)) != ZERO) + { + cv.reset_flags(); // inavlid arc + return; + } + + // We have a segment of a line pair with rational coefficients. + // Compose the equation of the underlying line + // (with algebraic coefficients). + cv.update_extra_data(); + } + else { + // The sign of (4rs - t^2) detetmines the conic type: + // - if it is possitive, the conic is an ellipse, + // - if it is negative, the conic is a hyperbola, + // - if it is zero, the conic is a parabola. + CGAL::Sign sign_conic = CGAL::sign(4*r*s - t*t); + + // Build the extra hyperbolic data if necessary + if (sign_conic == NEGATIVE) build_hyperbolic_arc_data(cv); + + if (sign_conic != POSITIVE) { + // In case of a non-degenerate parabola or a hyperbola, make sure + // the arc is not infinite. + Point_2 p_mid = + m_alg_kernel->construct_midpoint_2_object()(source, target); + Alg_point_2 ps[2]; + bool finite_at_x = (points_at_x(cv, p_mid, ps) > 0); + bool finite_at_y = (points_at_y(cv, p_mid, ps) > 0); + if (! finite_at_x && ! finite_at_y) { + cv.reset_flags(); // inavlid arc + return; + } + } + } + } + + + cv.set_flag(Curve_2::IS_VALID); // arc is valid + cv.reset_flag(Curve_2::IS_FULL_CONIC); // not a full conic + } + + /*! Set the properties of a conic arc that is really a full curve + * (that is, an ellipse). + * \param rat_coeffs A vector of size 6, storing the rational coefficients + * of \f$x^2\f$, \f$y^2\f$, \f$x \cdot y\f$, \f$x\f$, \f$y\f$ + * and the free coefficient resp. + * \param comp_orient Should we compute the orientation of the given curve. + */ + void set_full(Curve_2& cv, const Rational* rat_coeffs, + const bool& comp_orient) const { + // Convert the coefficients vector to an equivalent vector of integer + // coefficients. + Integer int_coeffs[6]; + m_nt_traits->convert_coefficients(rat_coeffs, rat_coeffs + 6, int_coeffs); + + // Check the orientation of conic curve, and negate the conic coefficients + // if its given orientation. + typename Rat_kernel::Conic_2 temp_conic(rat_coeffs[0], rat_coeffs[1], + rat_coeffs[2], rat_coeffs[3], + rat_coeffs[4], rat_coeffs[5]); + const Orientation temp_orient = temp_conic.orientation(); + + if (comp_orient) cv.set_orientation(temp_orient); + + Integer r, s, t, u, v, w; + if (cv.orientation() == temp_orient) { + r = int_coeffs[0]; + s = int_coeffs[1]; + t = int_coeffs[2]; + u = int_coeffs[3]; + v = int_coeffs[4]; + w = int_coeffs[5]; + } + else { + r = -int_coeffs[0]; + s = -int_coeffs[1]; + t = -int_coeffs[2]; + u = -int_coeffs[3]; + v = -int_coeffs[4]; + w = -int_coeffs[5]; + } + cv.set_coefficients(r, s, t, u, v, w); + + // Make sure the conic is a non-degenerate ellipse: + // The coefficients should satisfy (4rs - t^2) > 0. + const bool is_ellipse = (CGAL::sign(4*r*s - t*t) == POSITIVE); + CGAL_assertion(is_ellipse); + + // We do not have to store any extra data with the arc. + + // Mark that this arc is a full conic curve. + if (is_ellipse) { + cv.set_flag(Curve_2::IS_VALID); + cv.set_flag(Curve_2::IS_FULL_CONIC); + } + else cv.reset_flags(); // inavlid arc + } + + /*! Check whether the given point lies on the supporting conic of the arc. + * \param p The query point. + * \return true if p lies on the supporting conic; (false) otherwise. + */ + bool is_on_supporting_conic(Curve_2& cv, const Point_2& p) const { + // Check whether p satisfies the conic equation. + const Algebraic r = m_nt_traits->convert(cv.r()); + const Algebraic t = m_nt_traits->convert(cv.t()); + const Algebraic u = m_nt_traits->convert(cv.u()); + const Algebraic s = m_nt_traits->convert(cv.s()); + const Algebraic v = m_nt_traits->convert(cv.v()); + const Algebraic w = m_nt_traits->convert(cv.w()); + + // The point must satisfy: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0. + const Algebraic val = + (r*p.x() + t*p.y() + u)*p.x() + (s*p.y() + v)* p.y() + w; + return (CGAL::sign(val) == ZERO); + } + + /*! Check whether the given point is between the source and the target. + * The point is assumed to be on the conic's boundary. + * \param p The query point. + * \return `true` if the point is between the two endpoints; + * `false` if it is not. + */ + bool is_between_endpoints(const Curve_2& cv, const Point_2& p) const { + CGAL_precondition(! cv.is_full_conic()); + + // Check if p is one of the endpoints. + auto eq = m_alg_kernel->equal_2_object(); + if (eq(p, cv.source()) || eq(p, cv.target())) return true; + else return is_strictly_between_endpoints(cv, p); + } + + /*! Check whether the given point is strictly between the source and the + * target (but not any of them). + * The point is assumed to be on the conic's boundary. + * \param p The query point. + * \return `true` if the point is strictly between the two endpoints; + * `false` if it is not. + */ + bool is_strictly_between_endpoints(const Curve_2& cv, const Point_2& p) const + { + // In case this is a full conic, any point on its boundary is between + // its end points. + if (cv.is_full_conic()) return true; + + // Check if we have extra data available. + const auto* extra_data = cv.extra_data(); + if (extra_data != nullptr) { + if (extra_data->side != ZERO) { + // In case of a hyperbolic arc, make sure the point is located on the + // same branch as the arc. + if (cv.sign_of_extra_data(p.x(), p.y()) != extra_data->side) + return false; + } + else { + // In case we have a segment of a line pair, make sure that p really + // satisfies the equation of the line. + if (cv.sign_of_extra_data(p.x(), p.y()) != ZERO) return false; + } + } + + // Act according to the conic degree. + auto orient_f = m_alg_kernel->orientation_2_object(); + const auto& source = cv.source(); + const auto& target = cv.target(); + if (cv.orientation() == COLLINEAR) { + Comparison_result res1; + Comparison_result res2; + + if (m_alg_kernel->compare_x_2_object()(source, target) == EQUAL) { + // In case of a vertical segment - just check whether the y coordinate + // of p is between those of the source's and of the target's. + auto cmp_y = m_alg_kernel->compare_y_2_object(); + res1 = cmp_y(p, source); + res2 = cmp_y(p, target); + } + else { + // Otherwise, since the segment is x-monotone, just check whether the + // x coordinate of p is between those of the source's and of the + // target's. + auto cmp_x = m_alg_kernel->compare_x_2_object(); + res1 = cmp_x(p, source); + res2 = cmp_x(p, target); + } + + // If p is not in the (open) x-range (or y-range) of the segment, it + // cannot be contained in the segment. + if ((res1 == EQUAL) || (res2 == EQUAL) || (res1 == res2)) return false; + + // Perform an orientation test: This is crucial for segment of line + // pairs, as we want to make sure that p lies on the same line as the + // source and the target. + return (orient_f(source, p, target) == COLLINEAR); + } + + // In case of a conic of degree 2, make a decision based on the conic's + // orientation and whether (source,p,target) is a right or a left turn. + if (cv.orientation() == COUNTERCLOCKWISE) + return (orient_f(source, p, target) == LEFT_TURN); + else + return (orient_f(source, p, target) == RIGHT_TURN); + } + + /*! Build the data for hyperbolic arc, contaning the characterization of the + * hyperbolic branch the arc is placed on. + */ + void build_hyperbolic_arc_data(Curve_2& cv) const { + // Let phi be the rotation angle of the conic from its canonic form. + // We can write: + // + // t + // sin(2*phi) = ----------------------- + // sqrt((r - s)^2 + t^2) + // + // r - s + // cos(2*phi) = ----------------------- + // sqrt((r - s)^2 + t^2) + // + const int or_fact = (cv.orientation() == CLOCKWISE) ? -1 : 1; + const Algebraic r = m_nt_traits->convert(or_fact * cv.r()); + const Algebraic s = m_nt_traits->convert(or_fact * cv.s()); + const Algebraic t = m_nt_traits->convert(or_fact * cv.t()); + const Algebraic cos_2phi = (r - s) / m_nt_traits->sqrt((r-s)*(r-s) + t*t); + const Algebraic zero = 0; + const Algebraic one = 1; + const Algebraic two = 2; + Algebraic sin_phi; + Algebraic cos_phi; + + // Calculate sin(phi) and cos(phi) according to the half-angle formulae: + // + // sin(phi)^2 = 0.5 * (1 - cos(2*phi)) + // cos(phi)^2 = 0.5 * (1 + cos(2*phi)) + Sign sign_t = CGAL::sign(t); + + if (sign_t == ZERO) { + // sin(2*phi) == 0, so phi = 0 or phi = PI/2 + if (CGAL::sign(cos_2phi) == POSITIVE) { + // phi = 0. + sin_phi = zero; + cos_phi = one; + } + else { + // phi = PI/2. + sin_phi = one; + cos_phi = zero; + } + } + else if (sign_t == POSITIVE) { + // sin(2*phi) > 0 so 0 < phi < PI/2. + sin_phi = m_nt_traits->sqrt((one + cos_2phi) / two); + cos_phi = m_nt_traits->sqrt((one - cos_2phi) / two); + } + else { + // sin(2*phi) < 0 so PI/2 < phi < PI. + sin_phi = m_nt_traits->sqrt((one + cos_2phi) / two); + cos_phi = - m_nt_traits->sqrt((one - cos_2phi) / two); + } + + // Calculate the center (x0, y0) of the conic, given by the formulae: + // + // t*v - 2*s*u t*u - 2*r*v + // x0 = ------------- , y0 = ------------- + // 4*r*s - t^2 4*r*s - t^2 + // + // The denominator (4*r*s - t^2) must be negative for hyperbolas. + const Algebraic u = m_nt_traits->convert(or_fact * cv.u()); + const Algebraic v = m_nt_traits->convert(or_fact * cv.v()); + const Algebraic det = 4*r*s - t*t; + Algebraic x0, y0; + + CGAL_assertion(CGAL::sign(det) == NEGATIVE); + + x0 = (t*v - two*s*u) / det; + y0 = (t*u - two*r*v) / det; + + // The axis separating the two branches of the hyperbola is now given by: + // + // cos(phi)*x + sin(phi)*y - (cos(phi)*x0 + sin(phi)*y0) = 0 + // + // We store the equation of this line in the extra data structure and also + // the sign (side of half-plane) our arc occupies with respect to the line. + // We use it to make sure that the two endpoints are located on the same + // branch of the hyperbola. + auto a = cos_phi; + auto b = sin_phi; + auto c = - (cos_phi*x0 + sin_phi*y0); + const auto& source = cv.source(); + auto val = a * source.x() + b * source.y() + c; + auto side = CGAL::sign(val); + CGAL_assertion(side != ZERO); + cv.set_extra_data(a, b, c, side); + CGAL_assertion_code(const auto& target = cv.target()); + CGAL_assertion(side == cv.sign_of_extra_data(target.x(), target.y())); + } + + /*! Find the x coordinates of the underlying conic at a given y coordinate. + * \param y The y coordinate. + * \param xs The output x coordinates. + * \pre The vector xs must be allocated at the size of 2. + * \return The number of x coordinates computed (either 0, 1 or 2). + */ + int conic_get_x_coordinates(const Curve_2& cv, + const Algebraic& y, Algebraic* xs) const { + // Solve the quadratic equation for a given y and find the x values: + // r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0 + Algebraic A = m_nt_traits->convert(cv.r()); + Algebraic B = m_nt_traits->convert(cv.t())*y + m_nt_traits->convert(cv.u()); + Algebraic C = + (m_nt_traits->convert(cv.s())*y + m_nt_traits->convert(cv.v()))*y + + m_nt_traits->convert(cv.w()); + + return solve_quadratic_equation(A, B, C, xs[0], xs[1]); + } + + /*! Find the y coordinates of the underlying conic at a given x coordinate. + * \param x The x coordinate. + * \param ys The output y coordinates. + * \pre The vector ys must be allocated at the size of 2. + * \return The number of y coordinates computed (either 0, 1 or 2). + */ + int conic_get_y_coordinates(const Curve_2& cv, + const Algebraic& x, Algebraic* ys) const { + // Solve the quadratic equation for a given x and find the y values: + // s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0 + Algebraic A = m_nt_traits->convert(cv.s()); + Algebraic B = m_nt_traits->convert(cv.t())*x + m_nt_traits->convert(cv.v()); + Algebraic C = + (m_nt_traits->convert(cv.r())*x + m_nt_traits->convert(cv.u()))*x + + m_nt_traits->convert(cv.w()); + + return solve_quadratic_equation(A, B, C, ys[0], ys[1]); + } + + /*! Solve the given quadratic equation: Ax^2 + B*x + C = 0. + * \param x_minus The root obtained from taking -sqrt(discriminant). + * \param x_plus The root obtained from taking -sqrt(discriminant). + * \return The number of disticnt solutions to the equation. + */ + int solve_quadratic_equation(const Algebraic& A, + const Algebraic& B, + const Algebraic& C, + Algebraic& x_minus, Algebraic& x_plus) const { + // Check if we actually have a linear equation. + if (CGAL::sign(A) == ZERO) { + if (CGAL::sign(B) == ZERO) return 0; + x_minus = x_plus = -C / B; + return 1; + } + + // Compute the discriminant and act according to its sign. + const Algebraic disc = B*B - 4*A*C; + Sign sign_disc = CGAL::sign(disc); + + // Check whether there are no real-valued solutions: + if (sign_disc == NEGATIVE) return 0; + else if (sign_disc == ZERO) { + // One distinct solution: + x_minus = x_plus = -B / (2*A); + return 1; + } + + // Compute the two distinct solutions: + Algebraic _2A = 2*A; + Algebraic sqrt_disc = m_nt_traits->sqrt(disc); + + x_minus = -(B + sqrt_disc) / _2A; + x_plus = (sqrt_disc - B) / _2A; + return 2; + } + + /*! Compute a point on an arc with the same \f$x\f$-coordiante as the given + * point. + * \param p The given point. + * \pre The arc is not vertical and `p` is in the \f$x\f$-range of the arc. + * \return A point on the arc with the same \f$x\f$-coordiante as `p`. + */ + Point_2 point_at_x(const X_monotone_curve_2& xcv, const Point_2& p) const { + // Make sure that p is in the x-range of the arc. + CGAL_precondition(! xcv.is_vertical()); + + CGAL_precondition_code(auto cmp_x = m_alg_kernel->compare_x_2_object()); + CGAL_precondition((cmp_x(p, xcv.left()) != SMALLER) && + (cmp_x(p, xcv.right()) != LARGER)); + + if (xcv.is_special_segment()) { + // In case of a special segment, the equation of the supported line + // (a*x + b*y + c) = 0 is stored with the extra data field, and we + // simply have: + const auto& extra_data = xcv.extra_data(); + Algebraic y = -(extra_data->a*p.x() + extra_data->c) / extra_data->b; + + // Return the computed point. + return Point_2(p.x(), y); + } + + // Compute the y-coordinate according to the degree of the supporting + // conic curve. + Algebraic y; + + if (xcv.degree_mask() == X_monotone_curve_2::degree_1_mask()) { + // In case of a linear curve, the y-coordinate is a simple linear + // expression of x(p) (note that v is not 0 as the arc is not vertical): + // y = -(u*x(p) + w) / v + y = -(xcv.alg_u()*p.x() + xcv.alg_w()) / xcv.alg_v(); + } + else if (xcv.orientation() == COLLINEAR) { + const auto& extra_data = xcv.extra_data(); + CGAL_assertion(extra_data != nullptr); + + // In this case the equation of the supporting line is given by the + // extra data structure. + y = -(extra_data->a * p.x() + extra_data->c) / extra_data->b; + } + else { + CGAL_assertion(xcv.degree_mask() == X_monotone_curve_2::degree_2_mask()); + + // In this case the y-coordinate is one of solutions to the quadratic + // equation: + // s*y^2 + (t*x(p) + v)*y + (r*x(p)^2 + u*x(p) + w) = 0 + Algebraic A = xcv.alg_s(); + Algebraic B = xcv.alg_t()*p.x() + xcv.alg_v(); + Algebraic C = (xcv.alg_r()*p.x() + xcv.alg_u())*p.x() + xcv.alg_w(); + + if (CGAL::sign(xcv.s()) == ZERO) { + // In this case A is 0 and we have a linear equation. + CGAL_assertion(CGAL::sign(B) != ZERO); + + y = -C / B; + } + else { + // Solve the quadratic equation. + Algebraic disc = B*B - 4*A*C; + + CGAL_assertion(CGAL::sign(disc) != NEGATIVE); + + // We take either the root involving -sqrt(disc) or +sqrt(disc) + // based on the information flags. + y = (xcv.test_flag(X_monotone_curve_2::PLUS_SQRT_DISC_ROOT)) ? + (m_nt_traits->sqrt(disc) - B) / (2*A) : + -(B + m_nt_traits->sqrt(disc)) / (2*A); + } + } + + // Return the computed point. + return Point_2(p.x(), y); + } + + /*! Find all points on the arc with a given \f$x\f$-coordinate. + * \param p A placeholder for the \f$x\f$-coordinate. + * \param ps The point on the arc at `x(p)`. + * \pre The vector `ps` should be allocated at the size of 2. + * \return The number of points found. + */ + int points_at_x(const Curve_2& cv, const Point_2& p, Alg_point_2* ps) const { + // Get the y coordinates of the points on the conic. + Algebraic ys[2]; + int n = conic_get_y_coordinates(cv, p.x(), ys); + + // Find all the points that are contained in the arc. + int m = 0; + + for (int i = 0; i < n; ++i) { + ps[m] = Point_2(p.x(), ys[i]); + if (cv.is_full_conic() || is_between_endpoints(cv, ps[m])) ++m; + } + + // Return the number of points on the arc. + CGAL_assertion(m <= 2); + return m; + } + + /*! Find all points on the arc with a given \f$y\f$-coordinate. + * \param p A placeholder for the \f$y\f$-coordinate. + * \param ps The point on the arc at `x(p)`. + * \pre The vector `ps` should be allocated at the size of 2. + * \return The number of points found. + */ + int points_at_y(const Curve_2& cv, const Point_2& p, Alg_point_2* ps) const { + // Get the y coordinates of the points on the conic. + Algebraic xs[2]; + int n = conic_get_x_coordinates(cv, p.y(), xs); + + // Find all the points that are contained in the arc. + int m = 0; + + for (int i = 0; i < n; ++i) { + ps[m] = Point_2(xs[i], p.y()); + if (cv.is_full_conic() || is_between_endpoints(cv, ps[m])) ++m; + } + + // Return the number of points on the arc. + CGAL_assertion(m <= 2); + return m; + } + + /*! Set the properties of the x-monotone conic arc (for the usage of the + * constructors). + */ + void set_x_monotone(X_monotone_curve_2& xcv) const { + // Convert the coefficients of the supporting conic to algebraic numbers. + auto alg_r = m_nt_traits->convert(xcv.r()); + auto alg_s = m_nt_traits->convert(xcv.s()); + auto alg_t = m_nt_traits->convert(xcv.t()); + auto alg_u = m_nt_traits->convert(xcv.u()); + auto alg_v = m_nt_traits->convert(xcv.v()); + auto alg_w = m_nt_traits->convert(xcv.w()); + xcv.set_alg_coefficients(alg_r, alg_s, alg_t, alg_u, alg_v, alg_w); + + // Set the generating conic ID for the source and target points. + xcv.set_generating_conic(xcv.id()); + + // Update the m_info bits. + xcv.set_flag(Curve_2::IS_VALID); + xcv.reset_flag(Curve_2::IS_FULL_CONIC); + + // Check (i) whether the arc is a vertical segment, and (ii) whether it is + // directed right. + auto cmp_x = m_alg_kernel->compare_x_2_object(); + Comparison_result resx = cmp_x(xcv.source(), xcv.target()); + if (resx == SMALLER) xcv.set_flag(X_monotone_curve_2::IS_DIRECTED_RIGHT); + else if (resx == EQUAL) { + xcv.set_flag(X_monotone_curve_2::IS_VERTICAL_SEGMENT); + + auto cmp_y = m_alg_kernel->compare_y_2_object(); + Comparison_result resy = cmp_y(xcv.source(), xcv.target()); + CGAL_assertion(resy != EQUAL); + if (resy == SMALLER) xcv.set_flag(X_monotone_curve_2::IS_DIRECTED_RIGHT); + } + + if (xcv.orientation() == COLLINEAR) { + // Compute the degree of the underlying conic. + if ((CGAL::sign(xcv.r()) != ZERO) || + (CGAL::sign(xcv.s()) != ZERO) || + (CGAL::sign(xcv.t()) != ZERO)) + { + xcv.set_flag(X_monotone_curve_2::DEGREE_2); + xcv.set_flag(X_monotone_curve_2::IS_SPECIAL_SEGMENT); + } + else { + xcv.set_flag(X_monotone_curve_2::DEGREE_1); + + // Check whether this is a special segment + if ((CGAL::sign(xcv.u()) == ZERO) && (CGAL::sign(xcv.v()) == ZERO)) { + xcv.set_flag(X_monotone_curve_2::IS_SPECIAL_SEGMENT); + xcv.update_extra_data(); + } + } + return; + } + + xcv.set_flag(X_monotone_curve_2::DEGREE_2); + + // Compute a midpoint between the source and the target and get the y-value + // of the arc at its x-coordiante. + Point_2 p_mid = + m_alg_kernel->construct_midpoint_2_object()(xcv.source(), xcv.target()); + Algebraic ys[2]; + CGAL_assertion_code(int n_ys = ) + conic_get_y_coordinates(xcv, p_mid.x(), ys); + + CGAL_assertion(n_ys != 0); + + // Check which solution lies on the x-monotone arc. + Point_2 p_arc_mid(p_mid.x(), ys[0]); + + if (is_strictly_between_endpoints(xcv, p_arc_mid)) { + // Mark that we should use the -sqrt(disc) root for points on this + // x-monotone arc. + xcv.reset_flag(X_monotone_curve_2::PLUS_SQRT_DISC_ROOT); + } + else { + CGAL_assertion(n_ys == 2); + p_arc_mid = Point_2(p_mid.x(), ys[1]); + CGAL_assertion(is_strictly_between_endpoints(xcv, p_arc_mid)); + + // Mark that we should use the +sqrt(disc) root for points on this + // x-monotone arc. + xcv.set_flag(X_monotone_curve_2::PLUS_SQRT_DISC_ROOT); + } + + // Check whether the conic is facing up or facing down: + // Check whether the arc (which is x-monotone of degree 2) lies above or + // below the segement that connects its two end-points (x1,y1) and (x2,y2). + // To do that, we find the y coordinate of a point on the arc whose x + // coordinate is (x1+x2)/2 and compare it to (y1+y2)/2. + auto cmp_y = m_alg_kernel->compare_y_2_object(); + Comparison_result res = cmp_y(p_arc_mid, p_mid); + + // If the arc is above the connecting segment, so it is facing upwards. + if (res == LARGER) xcv.set_flag(X_monotone_curve_2::FACING_UP); + // If the arc is below the connecting segment, so it is facing downwards. + else if (res == SMALLER) xcv.set_flag(X_monotone_curve_2::FACING_DOWN); + } + + /*! Check whether the two arcs have the same supporting conic. + * \param xcv1 The first comparedb arc. + * \param xcv2 The secind compared arc. + * \return `true` if the two supporting conics are the same. + */ + bool has_same_supporting_conic(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2) const { + // Check if the two arcs originate from the same conic: + if ((xcv1.id() == xcv2.id()) && + xcv1.id().is_valid() && xcv2.id().is_valid()) + return true; + + // In case both arcs are collinear, check if they have the same + // supporting lines. + if ((xcv1.orientation() == COLLINEAR) && + (xcv2.orientation() == COLLINEAR)) { + // Construct the two supporting lines and compare them. + auto ctr_line = m_alg_kernel->construct_line_2_object(); + typename Alg_kernel::Line_2 l1 = ctr_line(xcv1.source(), xcv1.target()); + typename Alg_kernel::Line_2 l2 = ctr_line(xcv2.source(), xcv2.target()); + auto equal = m_alg_kernel->equal_2_object(); + if (equal(l1, l2)) return true; + + l2 = ctr_line(xcv2.target(), xcv2.source()); + return equal(l1, l2); + } + else if ((xcv1.orientation() == COLLINEAR) || + (xcv2.orientation() == COLLINEAR)) { + // Only one arc is collinear; therefore so the supporting curves cannot + // be the same: + return false; + } + + // Check whether the coefficients of the two supporting conics are equal + // up to a constant factor. + Integer factor1 = 1; + Integer factor2 = 1; + + if (CGAL::sign(xcv1.r()) != ZERO) factor1 = xcv1.r(); + else if (CGAL::sign(xcv1.s()) != ZERO) factor1 = xcv1.s(); + else if (CGAL::sign(xcv1.t()) != ZERO) factor1 = xcv1.t(); + else if (CGAL::sign(xcv1.u()) != ZERO) factor1 = xcv1.u(); + else if (CGAL::sign(xcv1.v()) != ZERO) factor1 = xcv1.v(); + else if (CGAL::sign(xcv1.w()) != ZERO) factor1 = xcv1.w(); + + if (CGAL::sign(xcv2.r()) != ZERO) factor2 = xcv2.r(); + else if (CGAL::sign(xcv2.s()) != ZERO) factor2 = xcv2.s(); + else if (CGAL::sign(xcv2.t()) != ZERO) factor2 = xcv2.t(); + else if (CGAL::sign(xcv2.u()) != ZERO) factor2 = xcv2.u(); + else if (CGAL::sign(xcv2.v()) != ZERO) factor2 = xcv2.v(); + else if (CGAL::sign(xcv2.w()) != ZERO) factor2 = xcv2.w(); + + return (CGAL::compare(xcv1.r() * factor2, xcv2.r() * factor1) == EQUAL && + CGAL::compare(xcv1.s() * factor2, xcv2.s() * factor1) == EQUAL && + CGAL::compare(xcv1.t() * factor2, xcv2.t() * factor1) == EQUAL && + CGAL::compare(xcv1.u() * factor2, xcv2.u() * factor1) == EQUAL && + CGAL::compare(xcv1.v() * factor2, xcv2.v() * factor1) == EQUAL && + CGAL::compare(xcv1.w() * factor2, xcv2.w() * factor1) == EQUAL); + } + + /*! Check whether the given point lies on the arc. + * \param p The qury point. + * \param (true) if p lies on the arc; (false) otherwise. + */ + bool contains_point(const X_monotone_curve_2& xcv, const Point_2& p) const { + // First check if p lies on the supporting conic. We first check whether + // it is one of p's generating conic curves. + bool p_on_conic(false); + if (p.is_generating_conic(xcv.id())) p_on_conic = true; + else { + // Check whether p satisfies the supporting conic equation. + p_on_conic = xcv.is_on_supporting_conic(p.x(), p.y()); + if (p_on_conic) { + // As p lies on the supporting conic of our arc, add its ID to + // the list of generating conics for p. + Point_2& p_non_const = const_cast(p); + p_non_const.set_generating_conic(xcv.id()); + } + } + + if (! p_on_conic) return false; + + // Check if p is between the endpoints of the arc. + return is_between_endpoints(xcv, p); + } + + /*! Find the vertical tangency points of the undelying conic. + * \param ps The output points of vertical tangency. + * This area must be allocated at the size of 2. + * \return The number of vertical tangency points. + */ + int conic_vertical_tangency_points(const Curve_2& cv, Alg_point_2* ps) const { + // In case the base conic is of degree 1 (and not 2), the arc has no + // vertical tangency points. + if (CGAL::sign(cv.s()) == ZERO) return 0; + + // We are interested in the x coordinates where the quadratic equation: + // s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0 + // has a single solution (obviously if s = 0, there are no such points). + // We therefore demand that the discriminant of this equation is zero: + // (t*x + v)^2 - 4*s*(r*x^2 + u*x + w) = 0 + const Integer two(2); + const Integer four(4); + Algebraic xs[2]; + + auto r = cv.r(); + auto s = cv.s(); + auto t = cv.t(); + auto u = cv.u(); + auto v = cv.v(); + auto w = cv.w(); + Algebraic* xs_end = m_nt_traits->solve_quadratic_equation(t*t - four*r*s, + two*t*v - four*s*u, + v*v - four*s*w, + xs); + auto n_xs = static_cast(xs_end - xs); + + // Find the y-coordinates of the vertical tangency points. + Algebraic ys[2]; + Algebraic* ys_end; + int n_ys; + + if (CGAL::sign(cv.t()) == ZERO) { + // The two vertical tangency points have the same y coordinate: + ys[0] = m_nt_traits->convert(-v) / m_nt_traits->convert(two*s); + n_ys = 1; + } + else { + ys_end = m_nt_traits->solve_quadratic_equation(four*r*s*s - s*t*t, + four*r*s*v - two*s*t*u, + r*v*v - t*u*v + + t*t*w, + ys); + n_ys = static_cast(ys_end - ys); + } + + // Pair the x and y coordinates and obtain the vertical tangency points. + int n(0); + + for (int i = 0; i < n_xs; ++i) { + if (n_ys == 1) { + ps[n++] = Point_2(xs[i], ys[0]); + } + else { + for (int j = 0; j < n_ys; ++j) { + if (CGAL::compare(m_nt_traits->convert(two*s) * ys[j], + -(m_nt_traits->convert(t) * xs[i] + + m_nt_traits->convert(v))) == EQUAL) + { + ps[n++] = Point_2(xs[i], ys[j]); + break; + } + } + } + } + + CGAL_assertion(n <= 2); + return n; + } + + /*! Calculate the vertical tangency points of the arc. + * \param vpts The vertical tangency points. + * \pre The vpts vector should be allocated at the size of 2. + * \return The number of vertical tangency points. + */ + size_t vertical_tangency_points(const Curve_2& cv, Alg_point_2* vpts) const { + // No vertical tangency points for line segments: + if (cv.orientation() == COLLINEAR) return 0; + + // Calculate the vertical tangency points of the supporting conic. + Alg_point_2 ps[2]; + auto n = conic_vertical_tangency_points(cv, ps); + // Return only the points that are contained in the arc interior. + size_t m(0); + for (int i = 0; i < n; ++i) { + if (cv.is_full_conic() || is_strictly_between_endpoints(cv, ps[i])) + vpts[m++] = ps[i]; + } + + // Return the number of vertical tangency points found. + CGAL_assertion(m <= 2); + return m; + } + + /*! Find the horizontal tangency points of the undelying conic. + * \param ps The output points of horizontal tangency. + * This area must be allocated at the size of 2. + * \return The number of horizontal tangency points. + */ + size_t conic_horizontal_tangency_points(const Curve_2& cv, Alg_point_2* ps) + const { + const Integer zero(0); + + // In case the base conic is of degree 1 (and not 2), the arc has no + // vertical tangency points. + if (CGAL::sign(cv.r()) == ZERO) return 0; + + // We are interested in the y coordinates were the quadratic equation: + // r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0 + // has a single solution (obviously if r = 0, there are no such points). + // We therefore demand that the discriminant of this equation is zero: + // (t*y + u)^2 - 4*r*(s*y^2 + v*y + w) = 0 + const Integer two(2); + const Integer four(4); + Algebraic ys[2]; + + auto r = cv.r(); + auto s = cv.s(); + auto t = cv.t(); + auto u = cv.u(); + auto v = cv.v(); + auto w = cv.w(); + Algebraic* ys_end = m_nt_traits->solve_quadratic_equation(t*t - four*r*s, + two*t*u - four*r*v, + u*u - four*r*w, + ys); + auto n = static_cast(ys_end - ys); + + // Compute the x coordinates and construct the horizontal tangency points. + for (int i = 0; i < n; ++i) { + // Having computed y, x is the single solution to the quadratic equation + // above, and since its discriminant is 0, x is simply given by: + Algebraic x = -(m_nt_traits->convert(t)*ys[i] + m_nt_traits->convert(u)) / + m_nt_traits->convert(two*r); + ps[i] = Point_2(x, ys[i]); + } + + CGAL_assertion(n <= 2); + return n; + } + + /*! Calculate the horizontal tangency points of the arc. + * \param hpts The horizontal tangency points. + * \pre The hpts vector should be allocated at the size of 2. + * \return The number of horizontal tangency points. + */ + int horizontal_tangency_points(const Curve_2& cv, Alg_point_2* hpts) const { + // No horizontal tangency points for line segments: + if (cv.orientation() == COLLINEAR) return 0; + + // Calculate the horizontal tangency points of the conic. + Alg_point_2 ps[2]; + std::size_t n = conic_horizontal_tangency_points(cv, ps); + + // Return only the points that are contained in the arc interior. + int m = 0; + + for (std::size_t i = 0; i < n; ++i) { + if (cv.is_full_conic() || is_strictly_between_endpoints(cv, ps[i])) + hpts[m++] = ps[i]; + } + + // Return the number of horizontal tangency points found. + CGAL_assertion(m <= 2); + return m; + } + + /*! Apply the inverse of the rotation given by the sin and cosine of the + * rotation angle to the given conic arc. + */ + void inverse_conic(const X_monotone_curve_2& xcv, + double cost, double sint, + double& r_m, double& s_m, double& t_m, + double& u_m, double& v_m, double& w_m) const { + auto r = CGAL::to_double(xcv.r()); + auto s = CGAL::to_double(xcv.s()); + auto t = CGAL::to_double(xcv.t()); + auto u = CGAL::to_double(xcv.u()); + auto v = CGAL::to_double(xcv.v()); + auto w = CGAL::to_double(xcv.w()); + + r_m = r * cost*cost + t*cost*sint + s*sint*sint; + t_m = 0; + s_m = r * sint*sint - t*cost*sint + s*cost*cost; + u_m = u*cost + v*sint; + v_m = - u*sint + v*cost; + w_m = w; + } + + /*! Obtain (i) the rotation that yields the given conic arc when applied + * to the canonical arc, and (ii) the canonical arc. + * \param[in] arc the given arc + * \param[out] r_m the coefficients of the canonical conic. + * \param[out] s_m + * \param[out] t_m + * \param[out] u_m + * \param[out] v_m + * \param[out] w_m + * \param[out] cost the cosine of the rotation angle. + * \param[out] sint the sine of the rotation angle. + */ + void canonical_conic(const X_monotone_curve_2& xcv, + double& r_m, double& s_m, double& t_m, + double& u_m, double& v_m, double& w_m, + double& cost, double& sint) const { + auto r = CGAL::to_double(xcv.r()); + auto s = CGAL::to_double(xcv.s()); + auto t = CGAL::to_double(xcv.t()); + // auto u = CGAL::to_double(xcv.u()); + // auto v = CGAL::to_double(xcv.v()); + // auto w = CGAL::to_double(xcv.w()); + // std::cout << r << "," << s << "," << t << "," + // << u << "," << v << "," << w << std::endl; + + // Compute the cos and sin of the rotation angle + // This eliminates the t coefficinet (which multiplies x·y). + + if (r != s) { + auto theta = atan2(t, r-s) * 0.5; + cost = std::cos(theta); + sint = std::sin(theta); + } + else if (r != 0) { + cost = 1.0; + sint = 0.0; + } + else { + cost = std::sqrt(0.5); + sint = cost; + } + + inverse_conic(xcv, cost, sint, r_m, s_m, t_m, u_m, v_m, w_m); + } + + /*! Inverse transform a point. In particular, inversly rotate the point + * (`x`,`y`) by an angle, the sine and cosine of which are `sint` and + * `cost`, respectively, and translate by (`-cx`,`-cy`). + */ + void inverse_transform_point(double x, double y, + double cost, double sint, + double cx, double cy, + double& xc, double& yc) const { + xc = x*cost + y*sint - cx; + yc = -x*sint + y*cost - cy; + } + + /*! Handle parabolas. + * The arc-length closed form can be found here: + * https://www.vcalc.com/wiki/vCalc/Parabola+-+arc+length + */ + void approximate_parabola(const X_monotone_curve_2& xcv, + double& r_m, double& t_m, double& s_m, + double& u_m, double& v_m, double& w_m, + double& cost, double& sint, + double& xs_t, double& ys_t, + double& xt_t, double& yt_t, + double& a, double& ts, double& tt, + double& cx, double& cy, + bool l2r = true) + const { + auto min_vertex = construct_min_vertex_2_object(); + auto max_vertex = construct_max_vertex_2_object(); + const auto& src = (l2r) ? min_vertex(xcv) : max_vertex(xcv); + const auto& trg = (l2r) ? max_vertex(xcv) : min_vertex(xcv); + auto xs = CGAL::to_double(src.x()); + auto ys = CGAL::to_double(src.y()); + auto xt = CGAL::to_double(trg.x()); + auto yt = CGAL::to_double(trg.y()); + + canonical_conic(xcv, r_m, s_m, t_m, u_m, v_m, w_m, cost, sint); + // std::cout << r_m << "," << s_m << "," << t_m << "," + // << u_m << "," << v_m << "," << w_m << std::endl; + // std::cout << "sint, cost: " << sint << "," << cost << std::endl; + + /* If the axis of the parabola is the 𝑌-axis, shift + * the parabola by 90, essentially, converting the + * parabola to one the axis of which is the 𝑋-axis, as the + * remaining code assume that the 𝑋-axis is the parabola axis. + * + * We need to test whether s_m vanished; however, because of limited + * precision, s_m can become very small. Therefore, instead for comparing + * s_m with zero we compare its absolute value with the absolute value of + * r_m, which is expected to be larger. + */ + if (std::abs(s_m) < std::abs(r_m)) { + // Shift phase: + auto tmp(cost); + cost = sint; + sint = -tmp; + + // Recompute: + inverse_conic(xcv, cost, sint, r_m, s_m, t_m, u_m, v_m, w_m); + } + // std::cout << r_m << "," << s_m << "," << t_m << "," + // << u_m << "," << v_m << "," << w_m << std::endl; + + // Compute the center of the inversly rotated parabola: + // double cx_m = -u_m / (2*r_m); + // double cy_m = (u_m*u_m - 4*r_m*w_m) / (4*r_m*v_m); + auto cx_m = (v_m*v_m - 4*s_m*w_m) / (4*s_m*u_m); + auto cy_m = -v_m / (2*s_m); + // std::cout << "cx_m, cy_m: " << cx_m << "," << cy_m << std::endl; + + // Inverse transform the source and target + inverse_transform_point(xs, ys, cost, sint, cx_m, cy_m, xs_t, ys_t); + inverse_transform_point(xt, yt, cost, sint, cx_m, cy_m, xt_t, yt_t); + + a = -u_m / (4.0*s_m); + ts = ys_t / (2.0*a); + tt = yt_t / (2.0*a); + + // Compute the center (cx,cy) of the ellipse, rotating back: + cx = cx_m*cost - cy_m*sint; + cy = cx_m*sint + cy_m*cost; + // std::cout << "center: " << cx << "," << cy << std::endl; + } + + /*! Handle ellipses. + */ + void approximate_ellipse(const X_monotone_curve_2& xcv, + double& r_m, double& t_m, double& s_m, + double& u_m, double& v_m, double& w_m, + double& cost, double& sint, + double& xs_t, double& ys_t, double& ts, + double& xt_t, double& yt_t, double& tt, + double& a, double& b, double& cx, double& cy, + bool l2r = true) + const { + auto min_vertex = construct_min_vertex_2_object(); + auto max_vertex = construct_max_vertex_2_object(); + const auto& src = (l2r) ? min_vertex(xcv) : max_vertex(xcv); + const auto& trg = (l2r) ? max_vertex(xcv) : min_vertex(xcv); + auto xs = CGAL::to_double(src.x()); + auto ys = CGAL::to_double(src.y()); + auto xt = CGAL::to_double(trg.x()); + auto yt = CGAL::to_double(trg.y()); + + canonical_conic(xcv, r_m, s_m, t_m, u_m, v_m, w_m, cost, sint); + // std::cout << r_m << "," << s_m << "," << t_m << "," + // << u_m << "," << v_m << "," << w_m << std::endl; + // std::cout << "sint, cost: " << sint << "," << cost << std::endl; + + // Compute the radi of the ellipse: + auto numerator = -4*w_m*r_m*s_m + s_m*u_m*u_m + r_m*v_m*v_m; + auto a_sqr = numerator / (4*r_m*r_m*s_m); + auto b_sqr = numerator / (4*r_m*s_m*s_m); + if (a_sqr < b_sqr) { + // Shift phase: + auto tmp(cost); + cost = sint; + sint = -tmp; + + // Recompute: + inverse_conic(xcv, cost, sint, r_m, s_m, t_m, u_m, v_m, w_m); + numerator = -4*w_m*r_m*s_m + s_m*u_m*u_m + r_m*v_m*v_m; + a_sqr = numerator / (4*r_m*r_m*s_m); + b_sqr = numerator / (4*r_m*s_m*s_m); + } + + a = std::sqrt(a_sqr); + b = std::sqrt(b_sqr); + + // Compute the center of the inversly rotated ellipse: + auto cx_m = -u_m / (2*r_m); + auto cy_m = -v_m / (2*s_m); + + // Compute the center (cx,cy) of the ellipse, rotating back: + cx = cx_m*cost - cy_m*sint; + cy = cx_m*sint + cy_m*cost; + // std::cout << "center: " << cx << "," << cy << std::endl; + + // Inverse transform the source and target + inverse_transform_point(xs, ys, cost, sint, cx_m, cy_m, xs_t, ys_t); + inverse_transform_point(xt, yt, cost, sint, cx_m, cy_m, xt_t, yt_t); + // std::cout << "xs_t,ys_t: " << xs_t << "," << ys_t << std::endl; + // std::cout << "xt_t,yt_t: " << xt_t << "," << yt_t << std::endl; + + // Compute the parameters ts and tt such that + // source == (x(ts),y(ts)), and + // target == (x(tt),y(tt)) + ts = std::atan2(a*ys_t, b*xs_t); + if (ts < 0) ts += 2*CGAL_PI; + tt = std::atan2(a*yt_t, b*xt_t); + if (tt < 0) tt += 2*CGAL_PI; + auto orient(xcv.orientation()); + if (xcv.source() != src) orient = CGAL::opposite(orient); + if (orient == COUNTERCLOCKWISE) { + if (tt < ts) tt += 2*CGAL_PI; + } + else { + if (ts < tt) ts += 2*CGAL_PI; + } + // std::cout << "ts,tt: " << ts << "," << tt << std::endl; + } + + /*! Handle hyperbolas. + */ + void approximate_hyperbola(const X_monotone_curve_2& xcv, + double& r_m, double& t_m, double& s_m, + double& u_m, double& v_m, double& w_m, + double& cost, double& sint, + double& xs_t, double& ys_t, double& ts, + double& xt_t, double& yt_t, double& tt, + double& a, double& b, double& cx, double& cy, + bool l2r = true) + const { + auto min_vertex = construct_min_vertex_2_object(); + auto max_vertex = construct_max_vertex_2_object(); + const auto& src = (l2r) ? min_vertex(xcv) : max_vertex(xcv); + const auto& trg = (l2r) ? max_vertex(xcv) : min_vertex(xcv); + auto xs = CGAL::to_double(src.x()); + auto ys = CGAL::to_double(src.y()); + auto xt = CGAL::to_double(trg.x()); + auto yt = CGAL::to_double(trg.y()); + // std::cout << "curve: (" << xs << "," << ys + // << ") => (" << xt << "," << yt << ")" + // << std::endl; + + // If the hyperbola conjugate axis is the Y-axis, add + canonical_conic(xcv, r_m, s_m, t_m, u_m, v_m, w_m, cost, sint); + // std::cout << r_m << "," << s_m << "," << t_m << "," + // << u_m << "," << v_m << "," << w_m << std::endl; + // std::cout << "sint, cost: " << sint << "," << cost << std::endl; + + auto numerator = -4*w_m*r_m*s_m + s_m*u_m*u_m + r_m*v_m*v_m; + auto a_sqr = numerator / (4*r_m*r_m*s_m); + auto b_sqr = -numerator / (4*r_m*s_m*s_m); + + /* If the conjugate axis of the canonical hyperbula is the 𝑌-axis, shift + * the canonical hyperbula by 90, essentially, converting the canonical + * hyperbula to one the conjugate axis of which is the 𝑋-axis, as the + * remaining code assume that the conjugate axis is the 𝑋-axis. + * Here, + * 1. a_sqr = -a_sqr, b_sqr = -b_sqr, and + * 2. x(t),y(t) = a*sinh(t), b*cosh(t) + */ + if (a_sqr < 0) { + // Shift phase: + auto tmp(cost); + cost = sint; + sint = -tmp; + + // Recompute: + inverse_conic(xcv, cost, sint, r_m, s_m, t_m, u_m, v_m, w_m); + numerator = -4*w_m*r_m*s_m + s_m*u_m*u_m + r_m*v_m*v_m; + a_sqr = numerator / (4*r_m*r_m*s_m); + b_sqr = -numerator / (4*r_m*s_m*s_m); + } + // std::cout << "sint, cost: " << sint << "," << cost << std::endl; + + // Compute the center of the inversly rotated ellipse: + auto cx_m = -u_m / (2*r_m); + auto cy_m = -v_m / (2*s_m); + + // Inverse transform the source and target + inverse_transform_point(xs, ys, cost, sint, cx_m, cy_m, xs_t, ys_t); + inverse_transform_point(xt, yt, cost, sint, cx_m, cy_m, xt_t, yt_t); + // std::cout << "xs_t,ys_t: " << xs_t << "," << ys_t << std::endl; + // std::cout << "xt_t,yt_t: " << xt_t << "," << yt_t << std::endl; + + // Compute the center (cx,cy) of the hyperbola, rotating back: + cx = cx_m*cost - cy_m*sint; + cy = cx_m*sint + cy_m*cost; + // std::cout << "center: " << cx << "," << cy << std::endl; + + a = std::sqrt(a_sqr); + b = std::sqrt(b_sqr); + + // We use the parametric representation x(t),y(t) = a*cosh(t), b*sinh(t) + // cosh(t) = (e^t + e^(-t))/2 + // sinh(t) = (e^t - e^(-t))/2 + // Compute the parameters ts and tt such that + // source == (x(ts),y(ts)), and + // target == (x(tt),y(tt)) + // Compute the radi of the hyperbola: + ts = std::asinh(ys_t/b); + tt = std::asinh(yt_t/b); + assert(std::signbit(xs_t) == std::signbit(xt_t)); + + if (std::signbit(xs_t)) a = -a; + } +}; + +#include + +} //namespace CGAL -} //namespace CGAL #endif diff --git a/thirdparty/CGAL/include/CGAL/Arr_consolidated_curve_data_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_consolidated_curve_data_traits_2.h index 08f12585..a996d33e 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_consolidated_curve_data_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_consolidated_curve_data_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_consolidated_curve_data_traits_2.h $ -// $Id: Arr_consolidated_curve_data_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_consolidated_curve_data_traits_2.h $ +// $Id: include/CGAL/Arr_consolidated_curve_data_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_counting_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_counting_traits_2.h index ace62efb..f7ee1cc6 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_counting_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_counting_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h $ -// $Id: Arr_counting_traits_2.h 055f87d 2021-09-15T10:10:45+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h $ +// $Id: include/CGAL/Arr_counting_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Efi Fogel @@ -21,7 +21,7 @@ * A counting traits-class for the arrangement package. * This is a meta-traits class. It is parameterized with another traits class * and inherits from it. For each traits method it maintains a counter that - * counts the number of invokations into the method. + * counts the number of invocations into the method. */ #include @@ -85,18 +85,17 @@ class Arr_counting_traits_2 : public Base_traits { typedef Arr_counting_traits_2 Self; /*! Construct default */ - Arr_counting_traits_2() : Base() + template + Arr_counting_traits_2(Args ... args) : + Base(args...) { clear_counters(); increment(); } - /*! Construct copy */ - Arr_counting_traits_2(const Arr_counting_traits_2& other) : Base(other) - { - clear_counters(); - increment(); - } + /*! Disable copy constructor. + */ + Arr_counting_traits_2(const Arr_counting_traits_2&) = delete; /*! Obtain the counter of the given operation */ size_t count(Operation_id id) const diff --git a/thirdparty/CGAL/include/CGAL/Arr_curve_data_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_curve_data_traits_2.h index 3b8ef894..6361e06a 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_curve_data_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_curve_data_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h $ -// $Id: Arr_curve_data_traits_2.h 372e838 2020-07-06T11:32:32+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h $ +// $Id: include/CGAL/Arr_curve_data_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -23,8 +23,7 @@ #include -#include -#include +#include #include #include @@ -32,6 +31,8 @@ #include #include +#include + namespace CGAL { /*! \class @@ -78,10 +79,10 @@ class Arr_curve_data_traits_2 : public Traits_ { typedef typename internal::Arr_complete_right_side_category:: Category Right_side_category; - // Representation of a curve with an addtional data field: + // Representation of a curve with an additonal data field: typedef _Curve_data_ex Curve_2; - // Representation of an x-monotone curve with an addtional data field: + // Representation of an x-monotone curve with an additonal data field: typedef _Curve_data_ex X_monotone_curve_2; @@ -98,7 +99,7 @@ class Arr_curve_data_traits_2 : public Traits_ { Arr_curve_data_traits_2(const Base_traits_2& traits) : Base_traits_2(traits) {} //@} - /// \name Overriden functors. + /// \name Overridden functors. //@{ //! \name Intersections & subdivisions @@ -125,9 +126,9 @@ class Arr_curve_data_traits_2 : public Traits_ { template OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { - typedef boost::variant + typedef std::variant Base_make_x_monotone_result; - typedef boost::variant + typedef std::variant Make_x_monotone_result; // Make the original curve x-monotone. @@ -137,12 +138,12 @@ class Arr_curve_data_traits_2 : public Traits_ { // Attach the data to each of the resulting x-monotone curves. X_monotone_curve_data xdata = Convert()(cv.data()); for (const auto& base_obj : base_objects) { - if (const auto* bxcv = boost::get(&base_obj)) { + if (const auto* bxcv = std::get_if(&base_obj)) { *oi++ = Make_x_monotone_result(X_monotone_curve_2(*bxcv, xdata)); continue; } // Current object is an isolated point: Leave it as is. - const auto* bp = boost::get(&base_obj); + const auto* bp = std::get_if(&base_obj); CGAL_assertion(bp); *oi++ = Make_x_monotone_result(*bp); } @@ -207,9 +208,7 @@ class Arr_curve_data_traits_2 : public Traits_ { OutputIterator oi) const { typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; - typedef boost::variant + typedef std::variant Intersection_base_result; // Use the base functor to obtain all intersection objects. @@ -222,19 +221,19 @@ class Arr_curve_data_traits_2 : public Traits_ { // Go over all intersection objects and prepare the output. for (const auto& item : base_objects) { const Base_x_monotone_curve_2* base_cv = - boost::get(&item); + std::get_if(&item); if (base_cv != nullptr) { // The current intersection object is an overlapping x-monotone // curve: Merge the data fields of both intersecting curves and // associate the result with the overlapping curve. X_monotone_curve_2 cv(*base_cv, Merge()(cv1.data(), cv2.data())); - *oi++ = Intersection_result(cv); + *oi++ = cv; continue; } // The current intersection object is an intersection point: // Copy it as is. - const Intersection_point* ip = boost::get(&item); - *oi++ = Intersection_result(*ip); + const Intersection_point* ip = std::get_if(&item); + *oi++ = *ip; } return oi; @@ -248,28 +247,32 @@ class Arr_curve_data_traits_2 : public Traits_ { private: const Base_traits_2& m_base; - /*! Generate a helper class template to find out whether the base geometry - * traits has a nested type named Are_mergeable_2. - */ - BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_are_mergeable_2, - Are_mergeable_2, false) + template + bool are_mergeable_data(const T& /* cv1 */, const T& /* cv2 */, long) const { + CGAL_error_msg("Equality operator is not supported."); + return false; + } + + template + auto are_mergeable_data(const T& cv1, const T& cv2, int) const -> + decltype(cv1.data() == cv2.data()) + { return cv1.data() == cv2.data(); } /*! Implementation of the predicate in case the base geometry traits class * has a nested type named Are_mergeable_2. */ template - typename boost::enable_if_c::value, - bool>::type - are_mergeable(const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2) const - { + auto are_mergeable(const X_monotone_curve_2& cv1, + const X_monotone_curve_2& cv2, + const GeomeTraits_2& traits, int) const -> + decltype(traits.are_mergeable_2_object(), bool()) { // In case the two base curves are not mergeable, the extended curves // are not mergeable as well. - if (! (m_base.are_mergeable_2_object()(cv1, cv2))) return false; + if (! (traits.are_mergeable_2_object()(cv1, cv2))) return false; // In case the two base curves are mergeable, check that they have the // same data fields. - return (cv1.data() == cv2.data()); + return are_mergeable_data(cv1, cv2, 0); } /*! Implementation of the predicate in case the base geometry traits class @@ -277,11 +280,9 @@ class Arr_curve_data_traits_2 : public Traits_ { * This function should never be called! */ template - typename boost::enable_if_c::value, - bool>::type - are_mergeable(const X_monotone_curve_2& /* cv1 */, - const X_monotone_curve_2& /* cv2 */) const - { + bool are_mergeable(const X_monotone_curve_2& /* cv1 */, + const X_monotone_curve_2& /* cv2 */, + const GeomeTraits_2& /* traits */, long) const { CGAL_error_msg("Are mergeable is not supported."); return false; } @@ -297,7 +298,7 @@ class Arr_curve_data_traits_2 : public Traits_ { */ bool operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2) const - { return are_mergeable(cv1, cv2); } + { return are_mergeable(cv1, cv2, m_base, 0); } }; /*! Obtain an Are_mergeable_2 functor object. */ @@ -320,7 +321,7 @@ class Arr_curve_data_traits_2 : public Traits_ { * has a nested type named Merge_2. */ template - typename boost::enable_if_c::value, void>::type + std::enable_if_t::value, void> merge(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, X_monotone_curve_2& c) const { @@ -340,7 +341,7 @@ class Arr_curve_data_traits_2 : public Traits_ { * This function should never be called! */ template - typename boost::enable_if_c::value, void>::type + std::enable_if_t::value, void> merge(const X_monotone_curve_2& /* cv1 */, const X_monotone_curve_2& /* cv2 */, X_monotone_curve_2& /* c */) const @@ -407,8 +408,8 @@ class Arr_curve_data_traits_2 : public Traits_ { * has a nested type named Construct_opposite_2. */ template - typename boost::enable_if_c::value, - X_monotone_curve_2>::type + std::enable_if_t::value, + X_monotone_curve_2> construct_opposite(const X_monotone_curve_2& cv) const { X_monotone_curve_2 new_cv(m_base.construct_opposite_2_object()(cv), @@ -421,8 +422,8 @@ class Arr_curve_data_traits_2 : public Traits_ { * This function should never be called! */ template - typename boost::enable_if_c::value, - X_monotone_curve_2>::type + std::enable_if_t::value, + X_monotone_curve_2> construct_opposite(const X_monotone_curve_2&) const { CGAL_error_msg("Construct opposite curve is not supported!"); diff --git a/thirdparty/CGAL/include/CGAL/Arr_dcel_base.h b/thirdparty/CGAL/include/CGAL/Arr_dcel_base.h index 1e677b2a..453a6ba1 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_dcel_base.h +++ b/thirdparty/CGAL/include/CGAL/Arr_dcel_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h $ -// $Id: Arr_dcel_base.h 4ea5251 2022-06-10T16:44:17+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h $ +// $Id: include/CGAL/Arr_dcel_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -38,7 +38,7 @@ namespace CGAL { inline void* _clean_pointer(const void* p) { - CGAL_static_assertion(sizeof(void*) == sizeof(size_t)); + static_assert(sizeof(void*) == sizeof(size_t)); const size_t mask = ~1; const size_t val = (reinterpret_cast(p) & mask); diff --git a/thirdparty/CGAL/include/CGAL/Arr_default_dcel.h b/thirdparty/CGAL/include/CGAL/Arr_default_dcel.h index 1f9df735..49aa64f2 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_default_dcel.h +++ b/thirdparty/CGAL/include/CGAL/Arr_default_dcel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_default_dcel.h $ -// $Id: Arr_default_dcel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_default_dcel.h $ +// $Id: include/CGAL/Arr_default_dcel.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_default_overlay_traits.h b/thirdparty/CGAL/include/CGAL/Arr_default_overlay_traits.h index d3c2769b..5e6c210b 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_default_overlay_traits.h +++ b/thirdparty/CGAL/include/CGAL/Arr_default_overlay_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_default_overlay_traits.h $ -// $Id: Arr_default_overlay_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_default_overlay_traits.h $ +// $Id: include/CGAL/Arr_default_overlay_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h index 6738cabb..270c6d0e 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h $ -// $Id: Arr_directional_non_caching_segment_basic_traits_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h $ +// $Id: include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Efi Fogel diff --git a/thirdparty/CGAL/include/CGAL/Arr_enums.h b/thirdparty/CGAL/include/CGAL/Arr_enums.h index 13799e97..37bfdfbc 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_enums.h +++ b/thirdparty/CGAL/include/CGAL/Arr_enums.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_enums.h $ -// $Id: Arr_enums.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_enums.h $ +// $Id: include/CGAL/Arr_enums.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_extended_dcel.h b/thirdparty/CGAL/include/CGAL/Arr_extended_dcel.h index 97cdcc36..fbac6764 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_extended_dcel.h +++ b/thirdparty/CGAL/include/CGAL/Arr_extended_dcel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h $ -// $Id: Arr_extended_dcel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h $ +// $Id: include/CGAL/Arr_extended_dcel.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -223,7 +223,7 @@ class Arr_face_extended_dcel : * The Traits parameter corresponds to a geometric traits class, which * defines the Point_2 and X_monotone_curve_2 types. * The VertexData, HalfedgeData and FaceData parameter specify the object types - * stored with each vertex, halfegde and face, respectively. + * stored with each vertex, halfedge and face, respectively. */ template y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return true - y(p1) < y(p2); * true - y(p1) = y(p2) and x(p1) < x(p2); @@ -129,7 +129,7 @@ class Arr_geodesic_arc_on_sphere_partition_traits_2 /*! Compare two points lexigoraphically: by y, then by x. * We actually reversing the order, so x <--> y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return true - x(p1) < x(p2); * true - x(p1) = x(p2) and y(p1) < y(p2); @@ -250,7 +250,7 @@ class Arr_geodesic_arc_on_sphere_partition_traits_2 /*! Compare two points by y coordinate. * We actually reversing the order, so x <--> y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return SMALLER - x(p1) < x(p2); * EQUAL - x(p1) = x(p2); @@ -314,8 +314,8 @@ class Arr_geodesic_arc_on_sphere_partition_traits_2 // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h $ -// $Id: Arr_geodesic_arc_on_sphere_partition_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h $ +// $Id: include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -395,7 +395,7 @@ class Arr_geodesic_arc_on_sphere_partition_traits_2 /*! Compare two points lexigoraphically: by x, then by y. * We actually reversing the order, so x <--> y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return true - y(p1) < y(p2); * true - y(p1) = y(p2) and x(p1) < x(p2); @@ -436,7 +436,7 @@ class Arr_geodesic_arc_on_sphere_partition_traits_2 /*! Compare two points lexigoraphically: by y, then by x. * We actually reversing the order, so x <--> y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return true - x(p1) < x(p2); * true - x(p1) = x(p2) and y(p1) < y(p2); @@ -556,7 +556,7 @@ class Arr_geodesic_arc_on_sphere_partition_traits_2 /*! Compare two points by y coordinate. * We actually reversing the order, so x <--> y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return SMALLER - x(p1) < x(p2); * EQUAL - x(p1) = x(p2); diff --git a/thirdparty/CGAL/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h index a62c71be..efd4f881 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h $ -// $Id: Arr_geodesic_arc_on_sphere_traits_2.h 7d4a8e5 2022-04-06T09:12:02+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h $ +// $Id: include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Efi Fogel @@ -26,9 +26,10 @@ #include -#include +#include #include +#include #include #include #include @@ -38,9 +39,86 @@ namespace CGAL { +/*! Represent an extended 3D direction that is used in turn to represent a + * spherical-arc endpoint. The extended data consists of two flags that + * indicate whether the point is on the x and on a y boundaries, + * respectively. + */ +template +class Arr_extended_direction_3 : public Kernel::Direction_3 { +public: + using FT = typename Kernel::FT; + using Direction_3 = typename Kernel::Direction_3; + + /*! Enumeration of discontinuity type */ + enum Location_type { + NO_BOUNDARY_LOC = 0, + MIN_BOUNDARY_LOC, + MID_BOUNDARY_LOC, + MAX_BOUNDARY_LOC + }; + +private: + using Direction_2 = typename Kernel::Direction_2; + + //! The point discontinuity type + Location_type m_location; + + inline Sign x_sign(Direction_3 d) const { return CGAL::sign(d.dx()); } + + inline Sign y_sign(Direction_3 d) const { return CGAL::sign(d.dy()); } + + inline Sign z_sign(Direction_3 d) const { return CGAL::sign(d.dz()); } + +public: + /*! Default constructor */ + Arr_extended_direction_3() : + Direction_3(0, 0, 1), + m_location(MAX_BOUNDARY_LOC) + {} + + /*! Constructor */ + Arr_extended_direction_3(const Direction_3& dir, Location_type location) : + Direction_3(dir), + m_location(location) + {} + + /*! Copy constructor */ + Arr_extended_direction_3(const Arr_extended_direction_3& other) : + Direction_3(static_cast(other)) + { m_location = other.discontinuity_type(); } + + /*! Assignment operator */ + Arr_extended_direction_3& operator=(const Arr_extended_direction_3& other) { + *(static_cast(this)) = static_cast(other); + m_location = other.discontinuity_type(); + return (*this); + } + + /*! Set the location type of the point. + */ + void set_location(Location_type location) { m_location = location; } + + /*! Obtain the location type of the point. + */ + Location_type location() const { return m_location; } + + /*! Obtain the discontinuity type of the point. + * \todo deprecate this one; use the above instead. + */ + Location_type discontinuity_type() const { return m_location; } + + bool is_no_boundary() const { return (m_location == NO_BOUNDARY_LOC); } + + bool is_min_boundary() const { return (m_location == MIN_BOUNDARY_LOC); } + + bool is_mid_boundary() const { return (m_location == MID_BOUNDARY_LOC); } + + bool is_max_boundary() const { return (m_location == MAX_BOUNDARY_LOC); } +}; + template class Arr_x_monotone_geodesic_arc_on_sphere_3; template class Arr_geodesic_arc_on_sphere_3; -template class Arr_extended_direction_3; /*! A traits class-template for constructing and maintaining arcs of great * circles embedded on spheres. It is parameterized from a (linear) geometry @@ -53,44 +131,43 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { friend class Arr_extended_direction_3; public: - typedef Kernel_ Kernel; + using Kernel = Kernel_; // Category tags: - typedef Tag_true Has_left_category; - typedef Tag_true Has_merge_category; - typedef Tag_false Has_do_intersect_category; + using Has_left_category = Tag_true; + using Has_merge_category = Tag_true; + using Has_do_intersect_category = Tag_false; - typedef Arr_identified_side_tag Left_side_category; - typedef Arr_contracted_side_tag Bottom_side_category; - typedef Arr_contracted_side_tag Top_side_category; - typedef Arr_identified_side_tag Right_side_category; + using Left_side_category = Arr_identified_side_tag; + using Bottom_side_category = Arr_contracted_side_tag; + using Top_side_category = Arr_contracted_side_tag; + using Right_side_category = Arr_identified_side_tag; - typedef boost::integral_constant Zero_atan_y; + using Zero_atan_y = std::integral_constant; // Traits objects - typedef Arr_extended_direction_3 Point_2; - typedef Arr_x_monotone_geodesic_arc_on_sphere_3 X_monotone_curve_2; - typedef Arr_geodesic_arc_on_sphere_3 Curve_2; - typedef unsigned int Multiplicity; + using Point_2 = Arr_extended_direction_3; + using X_monotone_curve_2 = Arr_x_monotone_geodesic_arc_on_sphere_3; + using Curve_2 = Arr_geodesic_arc_on_sphere_3; + using Multiplicity = std::size_t; /*! Default constructor */ Arr_geodesic_arc_on_sphere_traits_2() {} protected: - typedef typename Kernel::FT FT; + using FT = typename Kernel::FT; - typedef typename Kernel::Direction_3 Direction_3; - typedef typename Kernel::Vector_3 Vector_3; - typedef typename Kernel::Direction_2 Direction_2; - typedef typename Kernel::Vector_2 Vector_2; + using Direction_3 = typename Kernel::Direction_3; + using Vector_3 = typename Kernel::Vector_3; + using Direction_2 = typename Kernel::Direction_2; + using Vector_2 = typename Kernel::Vector_2; /*! Obtain the intersection of the identification arc and the xy plane. * By default, it is the vector directed along the negative x axis * (x = -infinity). * \return the intersection of the identification arc and the xy plane. */ - inline static const Direction_2& identification_xy() - { + inline static const Direction_2& identification_xy() { static const Direction_2 d(atan_x, atan_y); return d; } @@ -100,8 +177,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * (y = infinity). * \return the normal of the plane that contains the identification arc. */ - inline static const Direction_3& identification_normal() - { + inline static const Direction_3& identification_normal() { static const Direction_3 d(atan_y, -atan_x, 0); return d; } @@ -109,8 +185,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { /*! Obtain the 2D direction directed along the negative x axis * \return the direction directed at x = -infinity */ - inline static const Direction_2& neg_x_2() - { + inline static const Direction_2& neg_x_2() { CGAL_STATIC_THREAD_LOCAL_VARIABLE_2(Direction_2, d, -1, 0); return d; } @@ -118,8 +193,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { /*! Obtain the 2D direction directed along the negative y axis * \return the direction directed at y = -infinity */ - inline static const Direction_2& neg_y_2() - { + inline static const Direction_2& neg_y_2() { CGAL_STATIC_THREAD_LOCAL_VARIABLE_2(Direction_2, d, 0, -1); return d; } @@ -185,8 +259,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \param dir the direction. */ inline Oriented_side oriented_side(const Direction_3& normal, - const Direction_3 dir) const - { + const Direction_3 dir) const { FT dot = normal.vector() * dir.vector(); return CGAL::sign(dot); } @@ -196,9 +269,8 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \param d2 the second direction. * \return the relative orientation of d1 and d2. */ - inline Orientation orientation(const Direction_2& d1, const Direction_2& d2) - const - { + inline Orientation orientation(const Direction_2& d1, + const Direction_2& d2) const { const Kernel& kernel(*this); return kernel.orientation_2_object()(d1.vector(), d2.vector()); } @@ -208,8 +280,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \param d2 the second direction. */ inline Direction_3 construct_normal_3(const Direction_3& d1, - const Direction_3& d2) const - { + const Direction_3& d2) const { const Kernel& kernel(*this); Vector_3 v = kernel.construct_cross_product_vector_3_object()(d1.vector(), d2.vector()); @@ -223,23 +294,21 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \return true if dir is contained in plane; false otherwise. * \pre the plane contains the origin. */ - inline bool has_on(const Direction_3& normal, const Direction_3& dir) const - { + inline bool has_on(const Direction_3& normal, const Direction_3& dir) const { FT dot = normal.vector() * dir.vector(); return CGAL::sign(dot) == ZERO; } public: /*! Compare two endpoint directions by v. - * \param d1 the first enpoint direction. + * \param d1 the first endpoint direction. * \param d2 the second endpoint direction. * \return SMALLER - v(d1) < v(d2); * EQUAL - v(d1) = v(d2); * LARGER - v(d1) > v(d2). */ inline Comparison_result compare_y(const Direction_3& d1, - const Direction_3& d2) const - { + const Direction_3& d2) const { Vector_3 v1 = d1.vector(); Vector_3 v2 = d2.vector(); @@ -273,8 +342,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * LARGER - u(d1) > u(d2). */ inline Comparison_result compare_x(const Direction_2& d1, - const Direction_2& d2) const - { + const Direction_2& d2) const { const Kernel& kernel = *this; if (kernel.equal_2_object()(d1, d2)) return EQUAL; const Direction_2& d = identification_xy(); @@ -283,7 +351,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { } /*! Compare two endpoint directions by u. - * \param d1 the first enpoint direction. + * \param d1 the first endpoint direction. * \param d2 the second endpoint direction. * \return SMALLER - u(d1) < u(d2); * EQUAL - u(d1) = u(d2); @@ -292,8 +360,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \pre d2 does not coincide with any pole. */ inline Comparison_result compare_x(const Direction_3& d1, - const Direction_3& d2) const - { + const Direction_3& d2) const { // Compare the projections onto the xy plane: Direction_2 d1_2 = project_xy(d1); Direction_2 d2_2 = project_xy(d2); @@ -301,7 +368,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { } /*! Compare two endpoint directions lexigoraphically: by u, then by v. - * \param d1 the first enpoint direction. + * \param d1 the first endpoint direction. * \param d2 the second endpoint direction. * \return SMALLER - u(d1) < u(d2); * SMALLER - u(d1) = u(d2) and v(d1) < v(d2); @@ -312,8 +379,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \pre d2 does not lie on the discontinuity arc. */ inline Comparison_result compare_xy(const Direction_3& d1, - const Direction_3& d2) const - { + const Direction_3& d2) const { Comparison_result res = compare_x(d1, d2); if (res == EQUAL) return compare_y(d1, d2); return res; @@ -326,9 +392,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * false otherwise. * \pre point does not coincide with one of the poles */ - bool is_in_x_range(const X_monotone_curve_2& xcv, const Point_2& point) const - { - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + bool is_in_x_range(const X_monotone_curve_2& xcv, + const Point_2& point) const { + using Traits = Arr_geodesic_arc_on_sphere_traits_2; CGAL_precondition(!point.is_min_boundary()); CGAL_precondition(!point.is_max_boundary()); @@ -357,8 +423,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ void intersection_with_identification(const X_monotone_curve_2& xcv, Direction_3& dp, - boost::true_type) const - { + std::true_type) const { const Direction_3& normal = xcv.normal(); dp = (CGAL::sign(normal.dz()) == POSITIVE) ? Direction_3(-(normal.dz()), 0, normal.dx()) : @@ -370,8 +435,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ void intersection_with_identification(const X_monotone_curve_2& xcv, Direction_3& dp, - boost::false_type) const - { + std::false_type) const { const Direction_3& normal = xcv.normal(); FT z((atan_x * normal.dx() + atan_y * normal.dy()) / -(normal.dz())); @@ -382,8 +446,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \param[in] cv the curve */ bool overlap_with_identification(const X_monotone_curve_2& xcv, - boost::true_type) const - { + std::true_type) const { const Direction_3& normal = xcv.normal(); return ((x_sign(normal) == ZERO) && (((y_sign(normal) == NEGATIVE) && !xcv.is_directed_right()) || @@ -394,8 +457,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \param[in] cv the curve */ bool overlap_with_identification(const X_monotone_curve_2& xcv, - boost::false_type) const - { + std::false_type) const { const Direction_3& normal = xcv.normal(); const Direction_3& iden_normal = identification_normal(); const Direction_2 iden_normal_xy = project_xy(iden_normal); @@ -416,9 +478,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { /*! A functor that constructs a point on the sphere. */ class Construct_point_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -435,12 +497,11 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \param[in] y the y coordinate * \param[in] z the z coordinate */ - Point_2 operator()(const FT& x, const FT& y, const FT& z) - { + Point_2 operator()(const FT& x, const FT& y, const FT& z) { Point_2 p; Direction_3& d(p); d = Direction_3(x, y, z); - init(p, boost::integral_constant()); + init(p, std::integral_constant()); return p; } @@ -448,20 +509,18 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * direction. * \param other the other direction */ - Point_2 operator()(const Direction_3& other) - { + Point_2 operator()(const Direction_3& other) { Point_2 p; Direction_3& d(p); d = Direction_3(other); - init(p, boost::integral_constant()); + init(p, std::integral_constant()); return p; } /*! Initialize a point on the sphere, * \param[in] p the point to initialize. */ - void init(Point_2& p, boost::true_type) const - { + void init(Point_2& p, std::true_type) const { const Direction_3& dir = p; if (y_sign(dir) != ZERO) { p.set_location(Point_2::NO_BOUNDARY_LOC); @@ -479,8 +538,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { /*! Initialize a point on the sphere, * \param[in] p the point to initialize. */ - void init(Point_2& p, boost::false_type) const - { + void init(Point_2& p, std::false_type) const { const Direction_3& dir = p; if ((x_sign(dir) == ZERO) && (y_sign(dir) == ZERO)) { typename Point_2::Location_type location = (z_sign(dir) == NEGATIVE) ? @@ -507,9 +565,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { /*! A functor that constructs an x-monotone geodesic arc on the sphere. */ class Construct_x_monotone_curve_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -535,9 +593,8 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \pre the source and target must not coincide. * \pre the source and target cannot be antipodal. */ - X_monotone_curve_2 operator()(const Point_2& source, const Point_2& target) - const - { + X_monotone_curve_2 operator()(const Point_2& source, + const Point_2& target) const { X_monotone_curve_2 xcv; xcv.set_source(source); @@ -560,8 +617,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \param plane the containing plane. * \pre the plane is not vertical */ - X_monotone_curve_2 operator()(const Direction_3& normal) const - { + X_monotone_curve_2 operator()(const Direction_3& normal) const { X_monotone_curve_2 xcv; xcv.set_normal(normal); @@ -607,12 +663,11 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \param target the target point. * \pre the source and target cannot be equal. */ - void init(X_monotone_curve_2& xcv) const - { + void init(X_monotone_curve_2& xcv) const { const Point_2& source = xcv.source(); const Point_2& target = xcv.target(); - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; const Kernel& kernel(m_traits); CGAL_precondition(!kernel.equal_3_object()(Direction_3(source), @@ -640,7 +695,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { return; } - // None of the enpoints coincide with a pole: + // None of the endpoints coincide with a pole: Direction_2 s = Traits::project_xy(source); Direction_2 t = Traits::project_xy(target); @@ -700,9 +755,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { /*! A functor that constructs a geodesic arc on the sphere. */ class Construct_curve_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -727,8 +782,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \pre the source and target cannot be equal. * \pre the source and target cannot be the opoosite of each other. */ - Curve_2 operator()(const Point_2& source, const Point_2& target) - { + Curve_2 operator()(const Point_2& source, const Point_2& target) { Curve_2 cv; cv.set_source(source); cv.set_target(target); @@ -763,7 +817,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { return cv; } - // None of the enpoints coincide with a pole: + // None of the endpoints coincide with a pole: if (z_sign(normal) == ZERO) { // The arc is vertical cv.set_is_vertical(true); @@ -793,8 +847,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { Orientation orient = m_traits.orientation(s, t); const Kernel& kernel = m_traits; - typename Kernel::Counterclockwise_in_between_2 cc_in_between = - kernel.counterclockwise_in_between_2_object(); + auto cc_in_between = kernel.counterclockwise_in_between_2_object(); const Direction_2& d = Traits::identification_xy(); if (orient == LEFT_TURN) { @@ -818,8 +871,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \pre Both endpoints lie on the given plane. */ Curve_2 operator()(const Point_2& source, const Point_2& target, - const Direction_3& normal) - { + const Direction_3& normal) { Curve_2 cv; cv.set_source(source); @@ -828,7 +880,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { cv.set_is_degenerate(false); cv.set_is_empty(false); - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; CGAL_precondition(m_traits.has_on(normal, source)); CGAL_precondition(m_traits.has_on(normal, target)); @@ -911,8 +963,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { Direction_2 s = project(source); Direction_2 t = project(target); const Direction_2& ny = Traits::neg_y_2(); - typename Kernel::Counterclockwise_in_between_2 ccib = - kernel.counterclockwise_in_between_2_object(); + auto ccib = kernel.counterclockwise_in_between_2_object(); cv.set_is_x_monotone((plane_is_positive && !ccib(ny, s, t)) || (!plane_is_positive && !ccib(ny, t, s))); @@ -928,8 +979,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { const Direction_2& d = Traits::identification_xy(); Direction_2 s = Traits::project_xy(source); Direction_2 t = Traits::project_xy(target); - typename Kernel::Counterclockwise_in_between_2 ccib = - kernel.counterclockwise_in_between_2_object(); + auto ccib = kernel.counterclockwise_in_between_2_object(); bool plane_is_positive = (z_sign(normal) == POSITIVE); cv.set_is_x_monotone((plane_is_positive && !ccib(d, s, t)) || (!plane_is_positive && !ccib(d, t, s))); @@ -960,9 +1010,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { /*! A functor that compares the x-coordinates of two directional points */ class Compare_x_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -982,8 +1032,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \pre p1 does not lie on the boundary. * \pre p2 does not lie on the boundary. */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const - { + Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { CGAL_precondition(p1.is_no_boundary()); CGAL_precondition(p2.is_no_boundary()); @@ -992,11 +1041,10 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { }; protected: - /*! Obtain the possitive (north) pole - * \return the possitive (north) pole + /*! Obtain the positive (north) pole + * \return the positive (north) pole */ - inline static const Point_2& pos_pole() - { + inline static const Point_2& pos_pole() { static const Point_2 p(Direction_3(0, 0, 1), Point_2::MAX_BOUNDARY_LOC); return p; } @@ -1004,8 +1052,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { /*! Obtain the negative (south) pole * \return the negative (south) pole */ - inline static const Point_2& neg_pole() - { + inline static const Point_2& neg_pole() { static const Point_2 p(Direction_3(0, 0, -1), Point_2::MIN_BOUNDARY_LOC); return p; } @@ -1019,9 +1066,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ class Compare_xy_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -1033,7 +1080,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { public: /*! Compare two directional points lexigoraphically: by x, then by y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return SMALLER - x(p1) < x(p2); * SMALLER - x(p1) = x(p2) and y(p1) < y(p2); @@ -1043,8 +1090,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \pre p1 does not lie on the boundary. * \pre p2 does not lie on the boundary. */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const - { + Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { CGAL_precondition(p1.is_no_boundary()); CGAL_precondition(p2.is_no_boundary()); @@ -1093,8 +1139,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \return true if the curve is a vertical spherical_arc; false otherwise. * \pre the arc is not degenerate (consists of a single point) */ - bool operator()(const X_monotone_curve_2& xc) const - { + bool operator()(const X_monotone_curve_2& xc) const { CGAL_precondition(!xc.is_degenerate()); return xc.is_vertical(); } @@ -1108,9 +1153,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ class Compare_y_at_x_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -1127,12 +1172,11 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \return SMALLER - y(p) < xc(x(p)), i.e. the point is below the curve; * EQUAL - p lies on the curve. * LARGER - y(p) > xc(x(p)), i.e. the point is above the curve; - * \pre p is not a construction point. + * \pre p is not a contraction point. * \pre p is in the x-range of xc. */ Comparison_result operator()(const Point_2& p, - const X_monotone_curve_2& xc) const - { + const X_monotone_curve_2& xc) const { CGAL_precondition(!p.is_min_boundary() && !p.is_max_boundary()); CGAL_precondition(m_traits.is_in_x_range(xc, p)); @@ -1168,9 +1212,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ class Compare_y_at_x_left_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -1194,8 +1238,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ Comparison_result operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, - const Point_2& p) const - { + const Point_2& p) const { CGAL_precondition(! xc1.is_degenerate()); CGAL_precondition(! xc2.is_degenerate()); CGAL_precondition(p == xc1.right()); @@ -1226,8 +1269,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { auto opposite_3 = kernel.construct_opposite_direction_3_object(); Direction_3 opposite_p = opposite_3(p); if (kernel.equal_3_object()(opposite_p, Direction_3(l1)) || - kernel.equal_3_object()(opposite_p, Direction_3(l2))) - { + kernel.equal_3_object()(opposite_p, Direction_3(l2))) { Sign xsign = Traits::x_sign(p); Sign ysign = Traits::y_sign(p); Project project = (xsign == ZERO) ? @@ -1285,9 +1327,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ class Compare_y_at_x_right_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -1311,8 +1353,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ Comparison_result operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, - const Point_2& p) const - { + const Point_2& p) const { CGAL_precondition(! xc1.is_degenerate()); CGAL_precondition(! xc2.is_degenerate()); @@ -1334,8 +1375,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { auto opposite_3 = kernel.construct_opposite_direction_3_object(); Direction_3 opposite_p = opposite_3(p); if (kernel.equal_3_object()(opposite_p, Direction_3(r1)) || - kernel.equal_3_object()(opposite_p, Direction_3(r2))) - { + kernel.equal_3_object()(opposite_p, Direction_3(r2))) { Sign xsign = Traits::x_sign(p); Sign ysign = Traits::y_sign(p); Project project = (xsign == ZERO) ? @@ -1401,9 +1441,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ class Equal_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -1421,10 +1461,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \return true if the two curves are the same; false otherwise. */ bool operator()(const X_monotone_curve_2& xc1, - const X_monotone_curve_2& xc2) const - { + const X_monotone_curve_2& xc2) const { const Kernel& kernel = m_traits; - typename Kernel::Equal_3 equal_3 = kernel.equal_3_object(); + auto equal_3 = kernel.equal_3_object(); if (xc1.is_full() || xc2.is_full()) { if (!xc1.is_full() || !xc2.is_full()) return false; auto opposite_3 = kernel.construct_opposite_direction_3_object(); @@ -1446,8 +1485,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \param p2 the second point. * \return true if the two point are the same; false otherwise. */ - bool operator()(const Point_2& p1, const Point_2& p2) const - { + bool operator()(const Point_2& p1, const Point_2& p2) const { const Kernel& kernel = m_traits; return kernel.equal_3_object()(Direction_3(p1), Direction_3(p2)); } @@ -1465,9 +1503,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ class Parameter_space_in_x_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -1497,8 +1535,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \pre xcv does not coincide with the identification */ Arr_parameter_space operator()(const X_monotone_curve_2& xcv, - Arr_curve_end ce) const - { + Arr_curve_end ce) const { CGAL_precondition(!m_traits.is_on_y_identification_2_object()(xcv)); // vertical, but not on identification! if (xcv.is_vertical()) return ARR_INTERIOR; @@ -1515,8 +1552,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \param p the point. * \return the parameter space at p. */ - Arr_parameter_space operator()(const Point_2& p) const - { + Arr_parameter_space operator()(const Point_2& p) const { CGAL_precondition(p.is_no_boundary()); CGAL_USE(p); return ARR_INTERIOR; @@ -1550,8 +1586,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * maximal end. */ Arr_parameter_space operator()(const X_monotone_curve_2& xcv, - Arr_curve_end ce) const - { + Arr_curve_end ce) const { return (ce == ARR_MIN_END) ? ((xcv.left().is_min_boundary()) ? ARR_BOTTOM_BOUNDARY: ARR_INTERIOR) : ((xcv.right().is_max_boundary()) ? ARR_TOP_BOUNDARY : ARR_INTERIOR); @@ -1564,8 +1599,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \param p the point. * \return the parameter space at p. */ - Arr_parameter_space operator()(const Point_2& p) const - { + Arr_parameter_space operator()(const Point_2& p) const { return (p.is_min_boundary()) ? ARR_BOTTOM_BOUNDARY : (p.is_max_boundary()) ? ARR_TOP_BOUNDARY : ARR_INTERIOR; @@ -1582,9 +1616,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ class Compare_x_on_boundary_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -1612,8 +1646,8 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ Comparison_result operator()(const Point_2& point, const X_monotone_curve_2& xcv, - Arr_curve_end CGAL_precondition_code(ce)) const - { + Arr_curve_end CGAL_precondition_code(ce)) + const { CGAL_precondition(point.is_no_boundary()); CGAL_precondition_code (const Point_2& p2 = (ce == ARR_MIN_END) ? xcv.left() : xcv.right();); @@ -1658,8 +1692,8 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { Comparison_result operator()(const X_monotone_curve_2& xcv1, Arr_curve_end CGAL_precondition_code(ce1), const X_monotone_curve_2& xcv2, - Arr_curve_end CGAL_precondition_code(ce2)) const - { + Arr_curve_end CGAL_precondition_code(ce2)) + const { CGAL_precondition_code (const Point_2& p1 = (ce1 == ARR_MIN_END) ? xcv1.left() : xcv1.right();); CGAL_precondition(!p1.is_no_boundary()); @@ -1694,9 +1728,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ Comparison_result operator()(const Point_2& /* p1 */, const Point_2& /* p2 */) const - { - CGAL_error(); return EQUAL; - } + { CGAL_error(); return EQUAL; } }; /*! Obtain a Compare_x_on_boundary_2 function object. @@ -1709,9 +1741,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ class Compare_x_near_boundary_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -1745,8 +1777,8 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { CGAL_precondition_code(xcv1), const X_monotone_curve_2& CGAL_precondition_code(xcv2), - Arr_curve_end CGAL_precondition_code(ce)) const - { + Arr_curve_end CGAL_precondition_code(ce)) + const { CGAL_precondition_code (const Point_2& p1 = (ce == ARR_MIN_END) ? xcv1.left() : xcv1.right();); CGAL_precondition(!p1.is_no_boundary()); @@ -1773,9 +1805,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ class Compare_y_near_boundary_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -1799,8 +1831,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ Comparison_result operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, - Arr_curve_end ce) const - { + Arr_curve_end ce) const { CGAL_precondition(! xcv1.is_degenerate()); CGAL_precondition(! xcv2.is_degenerate()); @@ -1917,9 +1948,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ class Is_on_y_identification_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -1943,8 +1974,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \return a Boolean indicating whether xcv coincides with the vertical * identification arc. */ - bool operator()(const X_monotone_curve_2& xcv) const - { + bool operator()(const X_monotone_curve_2& xcv) const { /* If the curve is not vertical and non of its endpoints lie on the * boundary, the arc itself cannot lie on the identification arc. */ @@ -1976,9 +2006,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ class Compare_y_on_boundary_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -1999,8 +2029,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \pre p1 lies on the vertical identification arc including the poles! * \pre p2 lies on the vertical identification arc including the poles! */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const - { + Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { // first deal with the 'degenerate' case of poles! if (p1.is_min_boundary()) { if (p2.is_min_boundary()) return EQUAL; @@ -2038,9 +2067,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ class Make_x_monotone_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -2062,8 +2091,8 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ template OutputIterator operator()(const Curve_2& c, OutputIterator oi) const { - typedef boost::variant - Make_x_monotone_result; + using Make_x_monotone_result = std::variant; + // std::cout << "full: " << c.is_full() << std::endl; // std::cout << "vert: " << c.is_vertical() << std::endl; // std::cout << "xmon: " << c.is_x_monotone() << std::endl; @@ -2140,7 +2169,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { return oi; } - // None of the enpoints coincide with a pole. + // None of the endpoints coincide with a pole. bool s_is_positive, t_is_positive, plane_is_positive; CGAL::Sign xsign = Traits::x_sign(normal); if (xsign == ZERO) { @@ -2172,7 +2201,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { return oi; } - // The curve is not vertical, (none of the enpoints coincide with a pole) + // The curve is not vertical, (none of the endpoints coincide with a pole) Direction_3 dp; m_traits.intersection_with_identification(c, dp, Zero_atan_y()); Point_2 p(dp, Point_2::MID_BOUNDARY_LOC); @@ -2198,9 +2227,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { /*! A functor that splits an x-monotone arc at a directional point. */ class Split_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -2222,14 +2251,12 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \pre xc is not degenerate */ void operator()(const X_monotone_curve_2& xc, const Point_2& p, - X_monotone_curve_2& xc1, X_monotone_curve_2& xc2) const - { + X_monotone_curve_2& xc1, X_monotone_curve_2& xc2) const { CGAL_precondition(!xc.is_degenerate()); const Point_2& source = xc.source(); const Point_2& target = xc.target(); CGAL_precondition_code(const Kernel& kernel = m_traits); - CGAL_precondition_code - (typename Kernel::Equal_3 equal_3 = kernel.equal_3_object()); + CGAL_precondition_code(auto equal_3 = kernel.equal_3_object()); CGAL_precondition(!equal_3(Direction_3(p), Direction_3(source))); CGAL_precondition(!equal_3(Direction_3(p), Direction_3(target))); @@ -2267,9 +2294,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { /*! The clockwise-in-between function object */ class Clockwise_in_between_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -2281,8 +2308,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { public: bool operator()(const Direction_2& d, - const Direction_2& d1, const Direction_2& d2) const - { + const Direction_2& d1, const Direction_2& d2) const { const Kernel& kernel = m_traits; return kernel.counterclockwise_in_between_2_object()(d, d2, d1); } @@ -2317,11 +2343,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { bool vertical, const In_between& in_between, Project project, - OutputIterator oi) const - { - typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; + OutputIterator oi) const { + using Intersection_point = std::pair; + const Kernel& kernel = m_traits; typename Kernel::Equal_2 equal = kernel.equal_2_object(); @@ -2336,14 +2360,14 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { if (equal(l1, r1)) { bool is_full = equal(l2, r2); X_monotone_curve_2 xc(l2_3, r2_3, normal, vertical, true, is_full); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } if (equal(l2, r2)) { CGAL_assertion(! equal(l1, r1)); // already handled above X_monotone_curve_2 xc(l1_3, r1_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } @@ -2357,19 +2381,19 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { // 5. l1 = r2 < r1 < l2 = l1 | One overlap (handled above) if (in_between(r1, r2, l2)) { // Case 1. - *oi++ = Intersection_result(Intersection_point(l1_3, 1)); + *oi++ = Intersection_point(l1_3, 1); return oi; } if (equal(r1, l2)) { // Case 2. - *oi++ = Intersection_result(Intersection_point(l1_3, 1)); - *oi++ = Intersection_result(Intersection_point(l2_3, 1)); + *oi++ = Intersection_point(l1_3, 1); + *oi++ = Intersection_point(l2_3, 1); return oi; } CGAL_assertion(in_between(r1, l2, r2)); // Case 3. X_monotone_curve_2 xc(l2_3, r1_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } @@ -2382,12 +2406,12 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { // 5. l1 < l1 = r1 = l2 < r2 | One overlap (handled above) if (in_between(r2, r1, l1)) { // Case 1. - *oi++ = Intersection_result(Intersection_point(l2_3, 1)); + *oi++ = Intersection_point(l2_3, 1); return oi; } // Case 3. X_monotone_curve_2 xc(l1_3, r2_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } @@ -2399,13 +2423,13 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { if (in_between(r1, l2, r2) || equal(r1, r2)) { // Cases 1 & 2 X_monotone_curve_2 xc(l1_3, r1_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } // Case 3 CGAL_assertion(in_between(r2, l2, r1)); X_monotone_curve_2 xc(l2_3, r2_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } @@ -2417,13 +2441,13 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { if (in_between(l1, r2, l2)) { // Cases 1 X_monotone_curve_2 xc(l2_3, r2_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } // Case 3 CGAL_assertion(in_between(l1, l2, l2)); X_monotone_curve_2 xc(l1_3, r1_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } @@ -2441,12 +2465,12 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { if (in_between(l2, r2, l1)) { // Case 2 X_monotone_curve_2 xc(l1_3, r1_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } // Case 3 X_monotone_curve_2 xc(l2_3, r1_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } @@ -2456,12 +2480,12 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { // Case 4 if (in_between(l1, r1, l2)) { X_monotone_curve_2 xc(l2_3, r2_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } // Case 5 X_monotone_curve_2 xc(l1_3, r2_3, normal, vertical, true); - *oi++ = Intersection_result(xc); + *oi++ = xc; return oi; } @@ -2472,8 +2496,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \pre point lies in the underlying plane of xc. */ bool is_in_between(const Point_2& point, - const X_monotone_curve_2& xc) const - { + const X_monotone_curve_2& xc) const { const Kernel& kernel = m_traits; CGAL_precondition(m_traits.has_on(xc.normal(), point)); @@ -2522,9 +2545,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { } protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -2547,24 +2570,17 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { template OutputIterator operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, - OutputIterator oi) const - { + OutputIterator oi) const { // std::cout << "xc1: " << xc1 << std::endl // << "xc2: " << xc2 << std::endl; CGAL_precondition(!xc1.is_degenerate()); CGAL_precondition(!xc2.is_degenerate()); - typedef typename Kernel::Counterclockwise_in_between_2 - Counterclockwise_in_between_2; - typedef typename Kernel::Equal_3 Equal_3; - - typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; + using Intersection_point = std::pair; const Kernel& kernel = m_traits; - Equal_3 equal_3 = kernel.equal_3_object(); + auto equal_3 = kernel.equal_3_object(); const Direction_3& normal1 = xc1.normal(); const Direction_3& normal2 = xc2.normal(); @@ -2573,7 +2589,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { if (equal_3(normal1, normal2) || equal_3(opposite_normal1, normal2)) { // The underlying planes are the same - Counterclockwise_in_between_2 ccib = kernel.counterclockwise_in_between_2_object(); + auto ccib = kernel.counterclockwise_in_between_2_object(); auto cib = m_traits.clockwise_in_between_2_object(); if (xc1.is_vertical()) { @@ -2583,21 +2599,21 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { (res && (xc1.is_directed_right() != xc2.is_directed_right()))) { if (xc1.left().is_min_boundary() && xc2.left().is_min_boundary()) - *oi++ = Intersection_result(Intersection_point(xc1.left(), 1)); + *oi++ = Intersection_point(xc1.left(), 1); if (xc1.right().is_max_boundary() && xc2.right().is_max_boundary()) - *oi++ = Intersection_result(Intersection_point(xc1.right(), 1)); + *oi++ = Intersection_point(xc1.right(), 1); return oi; } - /*! If the endpoints of one arc coinside with the 2 poles resp, + /*! If the endpoints of one arc coincide with the 2 poles resp, * the other arc is completely overlapping. */ if (xc1.left().is_min_boundary() && xc1.right().is_max_boundary()) { - *oi++ = Intersection_result(xc2); + *oi++ = xc2; return oi; } if (xc2.left().is_min_boundary() && xc2.right().is_max_boundary()) { - *oi++ = Intersection_result(xc1); + *oi++ = xc1; return oi; } /*! Find an endpoint that does not coincide with a pole, and project @@ -2645,12 +2661,12 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { // Observe that xc1 and xc2 may share two endpoints. Point_2 ed = m_traits.construct_point_2_object()(v.direction()); if (is_in_between(ed, xc1) && is_in_between(ed, xc2)) - *oi++ = Intersection_result(Intersection_point(ed, 1)); + *oi++ = Intersection_point(ed, 1); Vector_3 vo(kernel.construct_opposite_vector_3_object()(v)); Point_2 edo = m_traits.construct_point_2_object()(vo.direction()); if (is_in_between(edo, xc1) && is_in_between(edo, xc2)) - *oi++ = Intersection_result(Intersection_point(edo, 1)); + *oi++ = Intersection_point(edo, 1); return oi; } @@ -2661,9 +2677,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { /*! A functor that tests whether two x-monotone arcs can be merged. */ class Are_mergeable_2 { - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -2683,14 +2699,13 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * 2. share a common endpoint that is not on the identification arc */ bool operator()(const X_monotone_curve_2& xc1, - const X_monotone_curve_2& xc2) const - { + const X_monotone_curve_2& xc2) const { if (xc1.is_empty() || xc2.is_empty()) return true; if ((xc1.is_full() || xc1.is_meridian()) && (xc2.is_full() || xc2.is_meridian())) return false; const Kernel& kernel = m_traits; - typename Kernel::Equal_3 equal = kernel.equal_3_object(); + auto equal = kernel.equal_3_object(); // Down cast to pass to kernel member functions const Direction_3& xc1_left = xc1.left(); @@ -2733,9 +2748,9 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { /*! A functor that merges two x-monotone arcs into one */ class Merge_2 { protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; - /*! The traits (in case it has state) */ + //! The traits (in case it has state) const Traits& m_traits; /*! Constructor @@ -2754,8 +2769,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { */ void operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, - X_monotone_curve_2& xc) const - { + X_monotone_curve_2& xc) const { CGAL_precondition (m_traits.are_mergeable_2_object()(xc1, xc2) == true); if (xc1.is_degenerate() || xc1.is_empty()) { @@ -2769,7 +2783,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { } const Kernel& kernel = m_traits; - typename Kernel::Equal_3 equal = kernel.equal_3_object(); + auto equal = kernel.equal_3_object(); // Down cast to pass to kernel member functions const Direction_3& xc1_right = xc1.right(); @@ -2834,11 +2848,14 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { /// \name Functor definitions for the landmarks point-location strategy. //@{ - typedef double Approximate_number_type; + using Approximate_number_type = double; + using Approximate_kernel = CGAL::Cartesian; + using Approximate_point_2 = Arr_extended_direction_3; + using Approximate_kernel_vector_3 = Approximate_kernel::Vector_3; + using Approximate_kernel_direction_3 = Approximate_kernel::Direction_3; class Approximate_2 { public: - /*! Return an approximation of a point coordinate. * \param p the exact point. * \param i the coordinate index (either 0 or 1). @@ -2846,10 +2863,117 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { * \return an approximation of p's x-coordinate (if i == 0), or an * approximation of p's y-coordinate (if i == 1). */ - Approximate_number_type operator()(const Point_2& p, int i) const - { - CGAL_precondition(i == 0 || i == 1); - return (i == 0) ? CGAL::to_double(p.x()) : CGAL::to_double(p.y()); + Approximate_number_type operator()(const Point_2& p, int i) const { + CGAL_precondition((i == 0) || (i == 1) || (i == 2)); + return (i == 0) ? CGAL::to_double(p.dx()) : + ((i == 1) ? CGAL::to_double(p.dy()) : CGAL::to_double(p.dz())); + } + + /*! Obtain an approximation of a point. + */ + Approximate_point_2 operator()(const Point_2& p) const { + Approximate_kernel::Direction_3 dir(operator()(p, 0), operator()(p, 1), + operator()(p, 2)); + auto loc = static_cast(p.location()); + return Approximate_point_2(dir, loc); + } + + /*! Obtain an approximation of an \f$x\f$-monotone curve. + */ + template + OutputIterator operator()(const X_monotone_curve_2& xcv, + Approximate_number_type error, + OutputIterator oi, bool l2r = true) const { + const auto& s = xcv.source(); + const auto& t = xcv.target(); + const auto& n = xcv.normal(); + const auto dx = CGAL::to_double(n.dx()); + const auto dy = CGAL::to_double(n.dy()); + const auto dz = CGAL::to_double(n.dz()); + + Approximate_point_2 as, at; + Approximate_kernel_vector_3 vn; + if (xcv.is_directed_right() == l2r) { + // Get the approximate points + as = (*this)(s); + at = (*this)(t); + vn = Approximate_kernel_vector_3(dx, dy, dz); + } + else { + // Get the approximate points + as = (*this)(t); + at = (*this)(s); + vn = Approximate_kernel_vector_3(-dx, -dy, -dz); + } + + // convert the approximate points to vectors with approximate-kernel + auto vs = approximate_vector_3(as); + auto vt = approximate_vector_3(at); + + // normalize the vectors + auto normalize = [](auto& x) { x /= std::sqrt(x.squared_length()); }; + normalize(vs); + normalize(vt); + normalize(vn); + + // Define the spanning vectors of the coordinate system where we are + // going to make the approximation: + auto axis_x = vs; // x-axis will coincide with the vector from the + // origin to the normalized SOURCE-vector + auto axis_z = vn; // this will make sure that the orientation of the + // approximated curve is consistent with the curve + auto axis_y = CGAL::cross_product(axis_z, axis_x); + normalize(axis_y); + + // In this coordinate system the source has local coords (0,0), hence its + // initial angle with the X-axis is 0 degrees (radians) + // Compute the local coordinates and the angle it makes with the X-axis + Approximate_number_type theta; + if (xcv.is_full()) theta = 2.0 * CGAL_PI; + else { + auto ltx = CGAL::scalar_product(axis_x, vt); + auto lty = CGAL::scalar_product(axis_y, vt); + theta = std::atan2(lty, ltx); + if (theta < 0) + theta += 2.0 * CGAL_PI; + } + + // compute the number of divisions given the requested error + const Approximate_number_type R = 1.0; // radius is always 1 + Approximate_number_type dtheta = 2.0 * std::acos(1 - error / R); + int num_segs = std::ceil(theta / dtheta); + dtheta = theta / num_segs; + + // generate the points approximating the curve + const auto loc = Approximate_point_2::NO_BOUNDARY_LOC; + *oi++ = approximate_point_2(vs, loc); // source vector + for (int i = 1; i < num_segs; ++i) { + const Approximate_number_type angle = i * dtheta; + auto p = std::cos(angle) * axis_x + std::sin(angle) * axis_y; + *oi++ = approximate_point_2(p, loc); + } + *oi++ = approximate_point_2(vt, loc); // target vector + + return oi; + } + + private: + Approximate_kernel_vector_3 + approximate_vector_3(const Approximate_point_2& p) const + { return Approximate_kernel_vector_3(p.dx(), p.dy(), p.dz()); }; + + Approximate_kernel_vector_3 + approximate_vector_3(const Direction_3& d) const { + return Approximate_kernel_vector_3(CGAL::to_double(d.dx()), + CGAL::to_double(d.dy()), + CGAL::to_double(d.dz())); + }; + + Approximate_point_2 + approximate_point_2(const Approximate_kernel_vector_3& v, + const Approximate_point_2::Location_type loc) const { + Approximate_kernel_direction_3 d(v.x(), v.y(), v.z()); + return Approximate_point_2(d, loc); } }; @@ -2863,9 +2987,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { class Compare_endpoints_xy_2 { public: - - /*! - * Compare the endpoints of an $x$-monotone curve lexicographically. + /*! Compare the endpoints of an $x$-monotone curve lexicographically. * (assuming the curve has a designated source and target points). * \param xc the curve. * \return SMALLER if the curve is directed right; @@ -2897,8 +3019,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { #if 0 /*! Inserter for the spherical_arc class used by the traits-class */ template - friend OutputStream& operator<<(OutputStream& os, const Point_2& p) - { + friend OutputStream& operator<<(OutputStream& os, const Point_2& p) { CGAL::To_double todouble; os << static_cast(todouble(p.dx())) << ", " << static_cast(todouble(p.dy())) << ", " @@ -2909,101 +3030,20 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ { /*! Inserter for the spherical_arc class used by the traits-class */ template friend OutputStream& operator<<(OutputStream& os, - const X_monotone_curve_2& xc) - { + const X_monotone_curve_2& xc) { os << "(" << xc.left() << "), (" << xc.right() << ")"; return os; } /*! Extractor for the spherical_arc class used by the traits-class */ template - friend InputStream& operator>>(InputStream& is, X_monotone_curve_2& arc) - { + friend InputStream& operator>>(InputStream& is, X_monotone_curve_2& arc) { CGAL_error_msg("Not implemented yet!"); return is; } #endif }; -/*! Represent an extended 3D direction that is used in turn to represent a - * spherical-arc endpoint. The extended data consists of two flags that - * indicate whether the point is on the x and on a y boundaries, - * respectively. - */ -template -class Arr_extended_direction_3 : public Kernel::Direction_3 { -public: - typedef typename Kernel::FT FT; - typedef typename Kernel::Direction_3 Direction_3; - - /*! Enumeration of discontinuity type */ - enum Location_type { - NO_BOUNDARY_LOC = 0, - MIN_BOUNDARY_LOC, - MID_BOUNDARY_LOC, - MAX_BOUNDARY_LOC - }; - -private: - typedef typename Kernel::Direction_2 Direction_2; - - /*! The point discontinuity type */ - Location_type m_location; - - inline Sign x_sign(Direction_3 d) const { return CGAL::sign(d.dx()); } - - inline Sign y_sign(Direction_3 d) const { return CGAL::sign(d.dy()); } - - inline Sign z_sign(Direction_3 d) const { return CGAL::sign(d.dz()); } - -public: - /*! Default constructor */ - Arr_extended_direction_3() : - Direction_3(0, 0, 1), - m_location(MAX_BOUNDARY_LOC) - {} - - /*! Constructor */ - Arr_extended_direction_3(const Direction_3& dir, Location_type location) : - Direction_3(dir), - m_location(location) - {} - - /*! Copy constructor */ - Arr_extended_direction_3(const Arr_extended_direction_3& other) : - Direction_3(static_cast(other)) - { m_location = other.discontinuity_type(); } - - /*! Assignment operator */ - Arr_extended_direction_3& operator=(const Arr_extended_direction_3& other) - { - *(static_cast(this)) = static_cast(other); - m_location = other.discontinuity_type(); - return (*this); - } - - /*! Set the location of the point. - */ - void set_location(Location_type location) { m_location = location; } - - /*! Obtain the location of the point. - */ - Location_type location() const { return m_location; } - - /*! Obtain the discontinuity type of the point. - * \todo deprecate this one; use the above instead. - */ - Location_type discontinuity_type() const { return m_location; } - - bool is_no_boundary() const { return (m_location == NO_BOUNDARY_LOC); } - - bool is_min_boundary() const { return (m_location == MIN_BOUNDARY_LOC); } - - bool is_mid_boundary() const { return (m_location == MID_BOUNDARY_LOC); } - - bool is_max_boundary() const { return (m_location == MAX_BOUNDARY_LOC); } -}; - /*! A Representation of an x-monotone great circular arc embedded on a sphere, * as used by the Arr_geodesic_arc_on_sphere_traits_2 traits-class * An x-monotone great circular arc cannot cross the closed hemi-circle arc of @@ -3015,38 +3055,38 @@ class Arr_extended_direction_3 : public Kernel::Direction_3 { template class Arr_x_monotone_geodesic_arc_on_sphere_3 { public: - typedef Kernel_ Kernel; - typedef typename Kernel::Direction_3 Direction_3; - typedef typename Kernel::Plane_3 Plane_3; - typedef typename Kernel::Vector_3 Vector_3; - typedef typename Kernel::Direction_2 Direction_2; + using Kernel = Kernel_; + using Direction_3 = typename Kernel::Direction_3; + using Plane_3 = typename Kernel::Plane_3; + using Vector_3 = typename Kernel::Vector_3; + using Direction_2 = typename Kernel::Direction_2; protected: // For some reason compilation under Windows fails without the qualifier - typedef CGAL::Arr_extended_direction_3 Arr_extended_direction_3; + using Arr_extended_direction_3 = CGAL::Arr_extended_direction_3; - /*! The source point of the arc. */ + //! The source point of the arc. Arr_extended_direction_3 m_source; - /*! The target point of the arc. */ + //! The target point of the arc. Arr_extended_direction_3 m_target; - /*! The direction of the plane that contains the arc. */ + //! The direction of the plane that contains the arc. Direction_3 m_normal; - /*! The arc is vertical. */ + //! The arc is vertical. bool m_is_vertical; - /*! Target (lexicographically) larger than source. */ + //! Target (lexicographically) larger than source. bool m_is_directed_right; - /*! The arc is a full circle. */ + //! The arc is a full circle. bool m_is_full; - /* The arc is degenerate - it consists of a single point. */ + //! The arc is degenerate - it consists of a single point. bool m_is_degenerate; - /*! The arc is empty. */ + //! The arc is empty. bool m_is_empty; inline Sign x_sign(Direction_3 d) const { return CGAL::sign(d.dx()); } @@ -3095,8 +3135,7 @@ class Arr_x_monotone_geodesic_arc_on_sphere_3 { * \param other the other arc */ Arr_x_monotone_geodesic_arc_on_sphere_3 - (const Arr_x_monotone_geodesic_arc_on_sphere_3& other) - { + (const Arr_x_monotone_geodesic_arc_on_sphere_3& other) { m_source = other.m_source; m_target = other.m_target; m_normal = other.m_normal; @@ -3109,8 +3148,7 @@ class Arr_x_monotone_geodesic_arc_on_sphere_3 { /*! Assignment operator */ Arr_x_monotone_geodesic_arc_on_sphere_3& operator= - (const Arr_x_monotone_geodesic_arc_on_sphere_3& other) - { + (const Arr_x_monotone_geodesic_arc_on_sphere_3& other) { m_source = other.m_source; m_target = other.m_target; m_normal = other.m_normal; @@ -3136,9 +3174,8 @@ class Arr_x_monotone_geodesic_arc_on_sphere_3 { * \param target the target point. * \pre the source and target cannot be equal. */ - void init() - { - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + void init() { + using Traits = Arr_geodesic_arc_on_sphere_traits_2; Kernel kernel; CGAL_precondition(!kernel.equal_3_object()(Direction_3(m_source), @@ -3166,7 +3203,7 @@ class Arr_x_monotone_geodesic_arc_on_sphere_3 { return; } - // None of the enpoints coincide with a pole: + // None of the endpoints coincide with a pole: Direction_2 s = Traits::project_xy(m_source); Direction_2 t = Traits::project_xy(m_target); @@ -3227,8 +3264,7 @@ class Arr_x_monotone_geodesic_arc_on_sphere_3 { m_is_directed_right(z_sign(normal) == POSITIVE), m_is_full(true), m_is_degenerate(false), - m_is_empty(false) - { + m_is_empty(false) { CGAL_precondition(z_sign(normal) != ZERO); #if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0) @@ -3236,8 +3272,8 @@ class Arr_x_monotone_geodesic_arc_on_sphere_3 { Direction_3(-(normal.dz()), 0, normal.dx()) : Direction_3(normal.dz(), 0, -(normal.dx())); #else - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; - typedef typename Kernel::FT FT; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; + using FT = typename Kernel::FT; const Direction_2& xy = Traits::identification_xy(); FT x = xy.dx(); @@ -3263,8 +3299,7 @@ class Arr_x_monotone_geodesic_arc_on_sphere_3 { m_is_directed_right(z_sign(normal) == POSITIVE), m_is_full(true), m_is_degenerate(false), - m_is_empty(false) - { + m_is_empty(false) { CGAL_precondition(has_on(point)); CGAL_precondition(z_sign(normal) != ZERO); #if !defined(CGAL_FULL_X_MONOTONE_GEODESIC_ARC_ON_SPHERE_IS_SUPPORTED) @@ -3289,8 +3324,7 @@ class Arr_x_monotone_geodesic_arc_on_sphere_3 { m_normal(normal), m_is_full(false), m_is_degenerate(false), - m_is_empty(false) - { + m_is_empty(false) { CGAL_precondition(has_on(source)); CGAL_precondition(has_on(target)); @@ -3400,8 +3434,7 @@ class Arr_x_monotone_geodesic_arc_on_sphere_3 { #if 0 /*! Create a bounding box for the spherical_arc */ - Bbox_2 bbox() const - { + Bbox_2 bbox() const { Kernel kernel; Segment_2 seg = kernel.construct_spherical_arc_2_object()(this->m_source, this->m_target); @@ -3410,8 +3443,7 @@ class Arr_x_monotone_geodesic_arc_on_sphere_3 { #endif /*! Flip the spherical_arc (swap it source and target) */ - Arr_x_monotone_geodesic_arc_on_sphere_3 opposite() const - { + Arr_x_monotone_geodesic_arc_on_sphere_3 opposite() const { Arr_x_monotone_geodesic_arc_on_sphere_3 opp; opp.m_source = this->m_target; opp.m_target = this->m_source; @@ -3430,8 +3462,7 @@ class Arr_x_monotone_geodesic_arc_on_sphere_3 { * \return true if dir is contained in plane; false otherwise. * \pre the plane contains the origin. */ - inline bool has_on(const Direction_3& dir) const - { + inline bool has_on(const Direction_3& dir) const { typename Kernel::FT dot = normal().vector() * dir.vector(); return CGAL::sign(dot) == ZERO; } @@ -3449,25 +3480,25 @@ template class Arr_geodesic_arc_on_sphere_3 : public Arr_x_monotone_geodesic_arc_on_sphere_3 { public: - typedef Kernel_ Kernel; + using Kernel = Kernel_; protected: - typedef Arr_x_monotone_geodesic_arc_on_sphere_3 Base; + using Base = Arr_x_monotone_geodesic_arc_on_sphere_3; public: - typedef typename Base::Plane_3 Plane_3; - typedef typename Base::Direction_3 Direction_3; - typedef typename Base::Direction_2 Direction_2; + using Plane_3 = typename Base::Plane_3; + using Direction_3 = typename Base::Direction_3; + using Direction_2 = typename Base::Direction_2; protected: // For some reason compilation under Windows fails without the qualifier - typedef CGAL::Arr_extended_direction_3 Arr_extended_direction_3; + using Arr_extended_direction_3 = CGAL::Arr_extended_direction_3; using Base::x_sign; using Base::y_sign; using Base::z_sign; - /*! Indicates whether the arc is x-monotone */ + //! Indicates whether the arc is x-monotone bool m_is_x_monotone; public: @@ -3523,8 +3554,7 @@ class Arr_geodesic_arc_on_sphere_3 : */ Arr_geodesic_arc_on_sphere_3(const Arr_extended_direction_3& source, const Arr_extended_direction_3& target, - const Direction_3& normal) - { + const Direction_3& normal) { Kernel kernel; this->set_source(source); @@ -3533,7 +3563,7 @@ class Arr_geodesic_arc_on_sphere_3 : this->set_is_degenerate(false); this->set_is_empty(false); - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; CGAL_precondition(this->has_on(source)); CGAL_precondition(this->has_on(target)); @@ -3613,8 +3643,7 @@ class Arr_geodesic_arc_on_sphere_3 : Direction_2 s = project(source); Direction_2 t = project(target); const Direction_2& ny = Traits::neg_y_2(); - typename Kernel::Counterclockwise_in_between_2 ccib = - kernel.counterclockwise_in_between_2_object(); + auto ccib = kernel.counterclockwise_in_between_2_object(); set_is_x_monotone((plane_is_positive && !ccib(ny, s, t)) || (!plane_is_positive && !ccib(ny, t, s))); @@ -3630,8 +3659,7 @@ class Arr_geodesic_arc_on_sphere_3 : const Direction_2& d = Traits::identification_xy(); Direction_2 s = Traits::project_xy(source); Direction_2 t = Traits::project_xy(target); - typename Kernel::Counterclockwise_in_between_2 ccib = - kernel.counterclockwise_in_between_2_object(); + auto ccib = kernel.counterclockwise_in_between_2_object(); bool plane_is_positive = (z_sign(normal) == POSITIVE); set_is_x_monotone((plane_is_positive && !ccib(d, s, t)) || (!plane_is_positive && !ccib(d, t, s))); @@ -3640,8 +3668,7 @@ class Arr_geodesic_arc_on_sphere_3 : /*! Construct a full spherical_arc from a normal to a plane. * \param normal the normal to the plane containing the arc. */ - Arr_geodesic_arc_on_sphere_3(const Direction_3& normal) - { + Arr_geodesic_arc_on_sphere_3(const Direction_3& normal) { this->normal(normal); this->set_is_vertical(CGAL::sign(normal.dz()) == ZERO); this->set_is_directed_right(true); @@ -3665,8 +3692,7 @@ class Arr_geodesic_arc_on_sphere_3 : /*! Inserter for the spherical_arc class used by the traits-class */ template OutputStream& operator<<(OutputStream& os, - const Arr_extended_direction_3& ed) -{ + const Arr_extended_direction_3& ed) { #if defined(CGAL_ARR_GEODESIC_ARC_ON_SPHERE_DETAILS) os << "(" << ed.dx() << ", " << ed.dy() << ", " << ed.dz(); @@ -3689,8 +3715,7 @@ OutputStream& operator<<(OutputStream& os, template OutputStream& operator<<(OutputStream& os, - const Arr_x_monotone_geodesic_arc_on_sphere_3& arc) -{ + const Arr_x_monotone_geodesic_arc_on_sphere_3& arc) { #if defined(CGAL_ARR_GEODESIC_ARC_ON_SPHERE_DETAILS) os << "(" << "(" << arc.source() << "), (" << arc.target() << ")" @@ -3710,10 +3735,9 @@ operator<<(OutputStream& os, /*! Extractor for the spherical-arc point class used by the traits-class */ template InputStream& -operator>>(InputStream& is, Arr_extended_direction_3& point) -{ - typedef Kernel_ Kernel; - typedef Arr_extended_direction_3 Point; +operator>>(InputStream& is, Arr_extended_direction_3& point) { + using Kernel = Kernel_; + using Point = Arr_extended_direction_3; // CGAL_error_msg("Importing a geodesic point is not supported!"); typename Kernel::Direction_3 d; is >> d; @@ -3727,10 +3751,9 @@ operator>>(InputStream& is, Arr_extended_direction_3& point) template InputStream& operator>>(InputStream& is, - Arr_x_monotone_geodesic_arc_on_sphere_3& arc) -{ - typedef Kernel_ Kernel; - typedef Arr_extended_direction_3 Point; + Arr_x_monotone_geodesic_arc_on_sphere_3& arc) { + using Kernel = Kernel_; + using Point = Arr_extended_direction_3; // CGAL_error_msg("Importing a geodesic arc is not supported!\n"); diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Arr_plane_3.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Arr_plane_3.h index 38b9c493..c1d3a7e4 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Arr_plane_3.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Arr_plane_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h $ -// $Id: Arr_plane_3.h 40152a2 2020-06-13T16:43:09+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h $ +// $Id: include/CGAL/Arr_geometry_traits/Arr_plane_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -201,7 +201,7 @@ class Arr_plane_3 { * intersection or a plane in case plane1 and plane2 coincide. */ template -boost::variant > +std::variant > intersect(const Arr_plane_3 & plane1, const Arr_plane_3 & plane2) { @@ -209,9 +209,9 @@ intersect(const Arr_plane_3 & plane1, typedef typename Kernel::Direction_3 Direction_3; typedef typename Kernel::Line_3 Line_3; typedef typename Kernel::FT FT; - typedef boost::variant > Intersection_result; + typedef std::variant > Intersection_result; - // We know that the plane goes throgh the origin + // We know that the plane goes through the origin const FT& a1 = plane1.a(); const FT& b1 = plane1.b(); const FT& c1 = plane1.c(); diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h index b93a0393..984c429d 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h $ -// $Id: Bezier_bounding_rational_traits.h 0626eb0 2020-06-11T12:32:33+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h $ +// $Id: include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -719,7 +719,7 @@ class Bezier_bounding_rational_traits /*! * Construct a bounding box for the given control polygon. - * \param cp A sequence of control point (the control polgon). + * \param cp A sequence of control point (the control polygon). * \param bbox Output: The bounding box. * \pre cp is not empty. */ @@ -776,7 +776,7 @@ class Bezier_bounding_rational_traits Comparison_result res = EQUAL; // Look for the first pair of consecutive points whose x-coordinate - // (or y-coordinate) are not equal. Their comparsion result will be + // (or y-coordinate) are not equal. Their comparison result will be // set as the "reference" comparison result. typename Control_points::const_iterator pt_curr = cp.begin(); typename Control_points::const_iterator pt_end = cp.end(); @@ -1054,7 +1054,7 @@ class Bezier_bounding_rational_traits const Point_2& s2 = cp2.front(); const Point_2& t2 = cp2.back(); - // Check whether any pair of these endpoints conincide. + // Check whether any pair of these endpoints coincide. NT x, y; // Coordinate of a common endpoint. NT t_val1, t_val2; // Its respective parameters. @@ -1114,7 +1114,7 @@ class Bezier_bounding_rational_traits } /*! - * An auxilary recursive function for computing the approximated + * An auxiliary recursive function for computing the approximated * intersection points between two Bezier curves. * \param cp1 The control points of the first curve. * \param t_min1 The lower bound of the parameter range of the first curve. @@ -1264,22 +1264,22 @@ class Bezier_bounding_rational_traits Control_points aux_vec; auto res1 = f_intersect(skew1a, skew2a); - const Point_2* p1 = boost::get(&*res1); + const Point_2* p1 = std::get_if(&*res1); if (! p1) CGAL_error(); aux_vec.push_back(*p1); auto res2 = f_intersect(skew1a, skew2b); - const Point_2* p2 = boost::get(&*res2); + const Point_2* p2 = std::get_if(&*res2); if (! p2) CGAL_error(); aux_vec.push_back(*p2); auto res3 = f_intersect(skew1b, skew2a); - const Point_2* p3 = boost::get(&*res3); + const Point_2* p3 = std::get_if(&*res3); if (! p3) CGAL_error(); aux_vec.push_back(*p3); auto res4 = f_intersect (skew1b, skew2b); - const Point_2* p4 = boost::get(&*res4); + const Point_2* p4 = std::get_if(&*res4); if (! p4) CGAL_error(); aux_vec.push_back(*p4); @@ -1369,7 +1369,7 @@ class Bezier_bounding_rational_traits } /*! - * An auxilary recursive function for computing the approximated vertical + * An auxiliary recursive function for computing the approximated vertical * tangency points of a Bezier curves. * \param cp The control points of the curve. * \param t_min The lower bound of the parameter range of the curve. diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_cache.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_cache.h index ebd7c546..77d1dfe4 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_cache.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_cache.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h $ -// $Id: Bezier_cache.h 6d949cd 2020-08-08T17:29:55+02:00 Ahmed Essam +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h $ +// $Id: include/CGAL/Arr_geometry_traits/Bezier_cache.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -822,7 +822,7 @@ _Bezier_cache::_compute_resultant } // We multiplied the current row by the i'th diagonal entry, thus - // multipling the determinant value by it. We therefore increment + // multiplying the determinant value by it. We therefore increment // the exponent of mat[i][i] in the normalization factor. exp_fact[i] = exp_fact[i] + 1; } diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h index f42465b7..23ce35e5 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h $ -// $Id: Bezier_curve_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h $ +// $Id: include/CGAL/Arr_geometry_traits/Bezier_curve_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -162,7 +162,7 @@ class _Bezier_curve_2_rep for (k = 0; pts_begin != pts_end; ++pts_begin, k++) { -//SL: Acccording to the fact that all operations are based on polynomials +//SL: According to the fact that all operations are based on polynomials // duplicated control points can be allowed. // // Make sure that we do not have two identical consecutive control // // points. @@ -423,7 +423,7 @@ class _Bezier_curve_2 : } /*! - * Get an interator for the first control point. + * Get an iterator for the first control point. */ Control_point_iterator control_points_begin () const { @@ -431,7 +431,7 @@ class _Bezier_curve_2 : } /*! - * Get a past-the-end interator for control points. + * Get a past-the-end iterator for control points. */ Control_point_iterator control_points_end () const { diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_point_2.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_point_2.h index 2f6ddab0..b7548ee1 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_point_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_point_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h $ -// $Id: Bezier_point_2.h 8682f9b 2020-08-24T11:45:17+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h $ +// $Id: include/CGAL/Arr_geometry_traits/Bezier_point_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -88,7 +88,7 @@ class _Bezier_point_2_rep unsigned int _xid; /*!< Serial number of the originating x-monotone curve. */ Bez_point_bound _bpb; /*!< Bounding information for the - point: bouding control polygon, + point: bounding control polygon, point type, etc. */ Algebraic *p_t; /*!< The algebraic parameter for the point (if available). */ @@ -240,7 +240,7 @@ class _Bezier_point_2_rep * Set the serial number of the originating x-monotone curve. * \param xid the new serial number of the originating x-monotone curve. * \pre The current xid() is 0. - * \pre xid is possitive. + * \pre xid is positive. */ void set_xid (unsigned int xid) { @@ -253,7 +253,7 @@ class _Bezier_point_2_rep }; /*! \struct Subcurve - * Auxilary structure for the vertical_position() function. + * Auxiliary structure for the vertical_position() function. */ typedef typename Bounding_traits::Control_points Control_points; typedef typename Bounding_traits::NT BoundNT; @@ -1421,7 +1421,7 @@ bool _Bezier_point_2_rep::_refine () CGAL_assertion(_origs.size() == 2); // Obtain the other curve that originates the intersection point and use - // it to refine its reprsentation. + // it to refine its representation. Orig_iter org_it = _origs.begin(); ++org_it; Originator& orig2 = *org_it; diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h index f14a6930..398e3b73 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h $ -// $Id: Bezier_x_monotone_2.h 3dc2804 2020-08-11T13:23:08+02:00 Ahmed Essam +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h $ +// $Id: include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -318,13 +318,11 @@ class _Bezier_x_monotone_2 Bezier_cache& cache, OutputIterator oi) const { - typedef boost::variant Intersection_result; - // In case we have two x-monotone subcurves of the same Bezier curve, // check if they have a common left endpoint. if (_curve.is_same(cv._curve)) { if (left().is_same(cv.left()) || left().is_same(cv.right())) - *oi++ = Intersection_result(Intersection_point(left(), 0)); + *oi++ = Intersection_point(left(), 0); } // Compute the intersections of the two sucurves. Note that for caching @@ -341,7 +339,7 @@ class _Bezier_x_monotone_2 // In case of overlap, just report the overlapping subcurve. if (do_ovlp) { - *oi++ = Intersection_result(ovlp_cv); + *oi++ = ovlp_cv; return oi; } @@ -349,14 +347,14 @@ class _Bezier_x_monotone_2 // xy-lexicorgraphical order, and insert them to the output iterator. std::sort(ipts.begin(), ipts.end(), Less_intersection_point(cache)); for (auto ip_it = ipts.begin(); ip_it != ipts.end(); ++ip_it) { - *oi++ = Intersection_result(*ip_it); + *oi++ = *ip_it; } // In case we have two x-monotone subcurves of the same Bezier curve, // check if they have a common right endpoint. if (_curve.is_same(cv._curve)) { if (right().is_same(cv.left()) || right().is_same(cv.right())) { - *oi++ = Intersection_result(Intersection_point(right(), 0)); + *oi++ = Intersection_point(right(), 0); } } @@ -533,7 +531,7 @@ class _Bezier_x_monotone_2 /*! Compute the exact vertical position of the given point with respect to * the x-monotone curve. * \param p The point. - * \param force_exact Sould we force an exact result. + * \param force_exact Should we force an exact result. * \return SMALLER if the point is below the curve; * LARGER if the point is above the curve; * EQUAL if p lies on the curve. @@ -751,7 +749,7 @@ point_position(const Point_2& p, Bezier_cache& cache) const in_range = _is_in_range(p, correct_res); if (! correct_res) { - // Perform the comparsion in an exact manner. + // Perform the comparison in an exact manner. if (! p.is_exact()) p.make_exact(cache); @@ -764,7 +762,7 @@ point_position(const Point_2& p, Bezier_cache& cache) const } // Call the vertical-position function that uses the bounding-boxes - // to evaluate the comparsion result. + // to evaluate the comparison result. typename Bounding_traits::Control_points cp; std::copy(_curve.control_points_begin(), _curve.control_points_end(), @@ -1192,7 +1190,7 @@ _Bezier_x_monotone_2::compare_to_left return (slope_res); // Compare the two subcurves by choosing some point to the left of p - // and compareing the vertical position there. + // and comparing the vertical position there. Comparison_result left_res; if (left().compare_x(cv.left(), cache) != SMALLER) @@ -1376,7 +1374,7 @@ _is_in_range(const Algebraic& t, Bezier_cache& cache) const return (false); } - // Obtain the exact t-range of the curve and peform an exact comparison. + // Obtain the exact t-range of the curve and perform an exact comparison. std::pair range = _t_range (cache); const Algebraic& t_src = range.first; const Algebraic& t_trg = range.second; @@ -1923,7 +1921,7 @@ _clip_control_polygon(typename Bounding_traits::Control_points& ctrl, if (! (org_min->point_bound().type == Bez_point_bound::RATIONAL_PT && CGAL::sign(org_min->point_bound().t_min) == CGAL::ZERO)) { - // It is possible that the paramater range of the originator is too large. + // It is possible that the parameter range of the originator is too large. // We therefore make sure it fits the current bounding box of the point // (which we know is tight enough). p_min.fit_to_bbox(); @@ -1951,7 +1949,7 @@ _clip_control_polygon(typename Bounding_traits::Control_points& ctrl, if (! (org_max->point_bound().type == Bez_point_bound::RATIONAL_PT && CGAL::compare (org_max->point_bound().t_max, 1) == CGAL::EQUAL)) { - // It is possible that the paramater range of the originator is too large. + // It is possible that the parameter range of the originator is too large. // We therefore make sure it fits the current bounding box of the point // (which we know is tight enough). p_max.fit_to_bbox(); @@ -2435,7 +2433,7 @@ _exact_vertical_position(const Point_2& p, #endif ) const { - // If it is a rational point, obtain its rational reprsentation. + // If it is a rational point, obtain its rational representation. Rat_point_2 rat_p; if (p.is_rational()) diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Circle_segment_2.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Circle_segment_2.h index 60858339..7e3346f4 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Circle_segment_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Circle_segment_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h $ -// $Id: Circle_segment_2.h 58276ed 2020-03-31T18:34:28+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h $ +// $Id: include/CGAL/Arr_geometry_traits/Circle_segment_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -995,9 +995,6 @@ class _X_monotone_circle_segment_2 { OutputIterator intersect(const Self& cv, OutputIterator oi, Intersection_map* inter_map = nullptr) const { - typedef std::pair Intersection_point; - typedef boost::variant Intersection_result; - // First check whether the two arcs have the same supporting curve. if (has_same_supporting_curve(cv)) { // Check for overlaps between the two arcs. @@ -1005,7 +1002,7 @@ class _X_monotone_circle_segment_2 { if (_compute_overlap(cv, overlap)) { // There can be just a single overlap between two x-monotone arcs: - *oi++ = Intersection_result(overlap); + *oi++ = overlap; return oi; } @@ -1016,11 +1013,11 @@ class _X_monotone_circle_segment_2 { // intersection points we report. Multiplicity mult = 0; if (left().equals(cv.left()) || left().equals(cv.right())) { - *oi++ = Intersection_result(std::make_pair(left(), mult)); + *oi++ = std::make_pair(left(), mult); } if (right().equals(cv.right()) || right().equals(cv.left())) { - *oi++ = Intersection_result(std::make_pair(right(), mult)); + *oi++ = std::make_pair(right(), mult); } return oi; @@ -1072,7 +1069,7 @@ class _X_monotone_circle_segment_2 { if (this->_is_between_endpoints (iter->first) && cv._is_between_endpoints (iter->first)) { - *oi++ = Intersection_result(*iter); + *oi++ = *iter; } } @@ -1705,7 +1702,7 @@ class _X_monotone_circle_segment_2 { } /*! Compute the intersections between the supporting circle of (*this) and - * the supporting line of the segement cv. + * the supporting line of the segment cv. */ void _circ_line_intersect(const Self& cv, Intersection_list& inter_list) const diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_arc_2.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_arc_2.h index 2cd20a66..0b817626 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_arc_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_arc_2.h @@ -3,34 +3,34 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h $ -// $Id: Conic_arc_2.h fe06974 2022-01-04T16:17:34+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h $ +// $Id: include/CGAL/Arr_geometry_traits/Conic_arc_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // -// Author(s) : Ron Wein +// Author(s): Ron Wein +// Efi Fogel #ifndef CGAL_CONIC_ARC_2_H #define CGAL_CONIC_ARC_2_H #include - /*! \file - * Header file for the _Conic_arc_2 class. + * Header file for the Conic_arc_2 class. */ +#include + #include + +// The following is included for the benefit of deprecated functions. #include #include -#include - namespace CGAL { - -/*! - * Representation of a conic arc -- a bounded segment that lies on a conic +/*! Representation of a conic arc -- a bounded segment that lies on a conic * curve, the loci of all points satisfying the equation: * r*x^2 + s*y^2 + t*xy + u*x + v*y +w = 0 * @@ -44,16 +44,14 @@ namespace CGAL { * rational and algebraic types. */ -template -class _Conic_arc_2 -{ +template +class Conic_arc_2 { public: + typedef RatKernel Rat_kernel; + typedef AlgKernel Alg_kernel; + typedef NtTraits Nt_traits; - typedef Rat_kernel_ Rat_kernel; - typedef Alg_kernel_ Alg_kernel; - typedef Nt_traits_ Nt_traits; - - typedef _Conic_arc_2 Self; + typedef Conic_arc_2 Self; typedef typename Rat_kernel::FT Rational; typedef typename Rat_kernel::Point_2 Rat_point_2; @@ -63,30 +61,8 @@ class _Conic_arc_2 typedef typename Nt_traits::Integer Integer; typedef typename Alg_kernel::FT Algebraic; - typedef typename Alg_kernel::Point_2 Point_2; - typedef _Conic_point_2 Conic_point_2; - -protected: - - Integer _r; // - Integer _s; // The coefficients of the supporting conic curve: - Integer _t; // - Integer _u; // - Integer _v; // r*x^2 + s*y^2 + t*xy + u*x + v*y +w = 0 . - Integer _w; // - - Orientation _orient; // The orientation of the conic. - - // Bit masks for the _info field. - enum - { - IS_VALID = 1, - IS_FULL_CONIC = 2 - }; - - int _info; // Does the arc represent a full conic curve. - Conic_point_2 _source; // The source of the arc (if not a full curve). - Conic_point_2 _target; // The target of the arc (if not a full curve). + typedef typename Alg_kernel::Point_2 Alg_point_2; + typedef Conic_point_2 Point_2; /*! \struct * For arcs whose base is a hyperbola we store the axis (a*x + b*y + c = 0) @@ -96,76 +72,64 @@ class _Conic_arc_2 * structure two store the coefficients of the line supporting this segment. * In this case we set the side field to be ZERO. */ - struct Extra_data - { - Algebraic a; - Algebraic b; - Algebraic c; - Sign side; + struct Extra_data { + Algebraic a; + Algebraic b; + Algebraic c; + Sign side; }; - Extra_data *_extra_data_P; // The extra data stored with the arc - // (may be nullptr). + // Bit masks for the m_info field. + enum { + IS_VALID = 0, + IS_FULL_CONIC, + LAST_INFO, + }; -public: +protected: + Integer m_r; // + Integer m_s; // The coefficients of the supporting conic curve: + Integer m_t; // + Integer m_u; // + Integer m_v; // r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0 + Integer m_w; // + + Orientation m_orient; // The orientation of the conic. + int m_info; // does the arc represent a full conic curve. + Point_2 m_source; // the source of the arc (if not a full curve). + Point_2 m_target; // the target of the arc (if not a full curve). + Extra_data* m_extra_data; // The extra data stored with the arc + // (may be nullptr). - /// \name Construction and destruction functions. +public: + /// \name Deprecated Constructions. //@{ - /*! - * Default constructor. - */ - _Conic_arc_2 () : - _r(0), _s(0), _t(0), _u(0), _v(0), _w(0), - _orient (COLLINEAR), - _info (0), - _extra_data_P (nullptr) - {} - - /*! - * Copy constructor. - * \param arc The copied arc. - */ - _Conic_arc_2 (const Self& arc) : - _r(arc._r), _s(arc._s), _t(arc._t), _u(arc._u), _v(arc._v), _w(arc._w), - _orient (arc._orient), - _info (arc._info), - _source(arc._source), - _target(arc._target) - { - if (arc._extra_data_P != nullptr) - _extra_data_P = new Extra_data (*(arc._extra_data_P)); - else - _extra_data_P = nullptr; - } - - /*! - * Construct a conic arc which is the full conic: + /*!Construct a conic arc which is the full conic: * C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0 * \pre The conic C must be an ellipse (so 4rs - t^2 > 0). */ - _Conic_arc_2 (const Rational& r, const Rational& s, const Rational& t, - const Rational& u, const Rational& v, const Rational& w) : - _extra_data_P (nullptr) + CGAL_DEPRECATED Conic_arc_2(const Rational& r, const Rational& s, + const Rational& t, const Rational& u, + const Rational& v, const Rational& w) : + m_info(0), + m_extra_data(nullptr) { - // Make sure the given curve is an ellipse (4rs - t^2 should be positive). - CGAL_precondition (CGAL::sign (4*r*s - t*t) == POSITIVE); + // Ensure that the given curve is an ellipse (4rs - t^2 is positive). + CGAL_precondition(CGAL::sign(4*r*s - t*t) == POSITIVE); // Set the arc to be the full conic (and compute the orientation). - Rational rat_coeffs [6]; - + Rational rat_coeffs[6]; rat_coeffs[0] = r; rat_coeffs[1] = s; rat_coeffs[2] = t; rat_coeffs[3] = u; rat_coeffs[4] = v; rat_coeffs[5] = w; - - _set_full (rat_coeffs, true); + _set_full(rat_coeffs, true); } - /*! - * Construct a conic arc which lies on the conic: + /*! Construct a conic arc which lies on the conic: * C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0 * \param orient The orientation of the arc (clockwise or counterclockwise). * \param source The source point. @@ -173,43 +137,37 @@ class _Conic_arc_2 * \pre The source and the target must be on the conic boundary and must * not be the same. */ - _Conic_arc_2 (const Rational& r, const Rational& s, const Rational& t, - const Rational& u, const Rational& v, const Rational& w, - const Orientation& orient, - const Point_2& source, const Point_2& target) : - _orient (orient), - _source (source), - _target (target), - _extra_data_P (nullptr) + CGAL_DEPRECATED + Conic_arc_2(const Rational& r, const Rational& s, const Rational& t, + const Rational& u, const Rational& v, const Rational& w, + const Orientation& orient, + const Point_2& source, const Point_2& target) : + m_orient(orient), + m_source(source), + m_target(target), + m_extra_data(nullptr) { - // Make sure that the source and the taget are not the same. - CGAL_precondition (Alg_kernel().compare_xy_2_object() (source, - target) != EQUAL); + // Make sure that the source and the target are not the same. + CGAL_precondition(Alg_kernel().compare_xy_2_object()(source, target) != + EQUAL); // Set the arc properties (no need to compute the orientation). - Rational rat_coeffs [6]; - - rat_coeffs[0] = r; - rat_coeffs[1] = s; - rat_coeffs[2] = t; - rat_coeffs[3] = u; - rat_coeffs[4] = v; - rat_coeffs[5] = w; - - _set (rat_coeffs); + Rational rat_coeffs[6] = {r, s, t, u, v, w}; + _set(rat_coeffs); } /*! Construct a segment conic arc from two endpoints. * \param source the source point with rational coordinates. */ - _Conic_arc_2(const Point_2& source, const Point_2& target) : - _orient (COLLINEAR), - _info(static_cast(IS_VALID)), - _source(source), - _target(target), - _extra_data_P(nullptr) + CGAL_DEPRECATED Conic_arc_2(const Point_2& source, const Point_2& target) : + m_orient(COLLINEAR), + m_info(0), + m_source(source), + m_target(target), + m_extra_data(nullptr) { - CGAL_precondition(Alg_kernel().compare_xy_2_object()(_source, _target) != + set_flag(IS_VALID); + CGAL_precondition(Alg_kernel().compare_xy_2_object()(source, target) != EQUAL); // Compose the equation of the underlying line. @@ -221,57 +179,55 @@ class _Conic_arc_2 // The supporting line is A*x + B*y + C = 0, where: // A = y2 - y1, B = x1 - x2, C = x2*y1 - x1*y2 // We use the extra data field to store the equation of this line. - _extra_data_P = new Extra_data; - _extra_data_P->a = y2 - y1; - _extra_data_P->b = x1 - x2; - _extra_data_P->c = x2*y1 - x1*y2; - _extra_data_P->side = ZERO; + m_extra_data = new Extra_data; + m_extra_data->a = y2 - y1; + m_extra_data->b = x1 - x2; + m_extra_data->c = x2*y1 - x1*y2; + m_extra_data->side = ZERO; } - /*! - * Construct a conic arc from the given line segment. + /*! Construct a conic arc from the given line segment. * \param seg The line segment with rational endpoints. */ - _Conic_arc_2 (const Rat_segment_2& seg) : - _orient (COLLINEAR), - _extra_data_P (nullptr) + CGAL_DEPRECATED Conic_arc_2 (const Rat_segment_2& seg) : + m_orient(COLLINEAR), + m_info(0), + m_extra_data(nullptr) { // Set the source and target. - Rat_kernel ker; - Rat_point_2 source = ker.construct_vertex_2_object() (seg, 0); - Rat_point_2 target = ker.construct_vertex_2_object() (seg, 1); - Rational x1 = source.x(); - Rational y1 = source.y(); - Rational x2 = target.x(); - Rational y2 = target.y(); - Nt_traits nt_traits; - - _source = Point_2 (nt_traits.convert (x1), nt_traits.convert (y1)); - _target = Point_2 (nt_traits.convert (x2), nt_traits.convert (y2)); - - // Make sure that the source and the taget are not the same. - CGAL_precondition (Alg_kernel().compare_xy_2_object() (_source, - _target) != EQUAL); + Rat_kernel ker; + Rat_point_2 source = ker.construct_vertex_2_object()(seg, 0); + Rat_point_2 target = ker.construct_vertex_2_object()(seg, 1); + Rational x1 = source.x(); + Rational y1 = source.y(); + Rational x2 = target.x(); + Rational y2 = target.y(); + Nt_traits nt_traits; + + m_source = Point_2(nt_traits.convert (x1), nt_traits.convert(y1)); + m_target = Point_2(nt_traits.convert (x2), nt_traits.convert(y2)); + + // Make sure that the source and the target are not the same. + CGAL_precondition (Alg_kernel().compare_xy_2_object()(m_source, m_target) + != EQUAL); // The supporting conic is r=s=t=0, and u*x + v*y + w = 0 should hold // for both the source (x1,y1) and the target (x2, y2). - const Rational _zero (0); - const Rational _one (1); - Rational rat_coeffs [6]; + const Rational zero (0); + const Rational one (1); + Rational rat_coeffs[6]; - rat_coeffs[0] = _zero; - rat_coeffs[1] = _zero; - rat_coeffs[2] = _zero; + rat_coeffs[0] = zero; + rat_coeffs[1] = zero; + rat_coeffs[2] = zero; - if (CGAL::compare (x1, x2) == EQUAL) - { + if (CGAL::compare(x1, x2) == EQUAL) { // The supporting conic is a vertical line, of the form x = CONST. - rat_coeffs[3] = _one; - rat_coeffs[4] = _zero; + rat_coeffs[3] = one; + rat_coeffs[4] = zero; rat_coeffs[5] = -x1; } - else - { + else { // The supporting line is A*x + B*y + C = 0, where: // // A = y2 - y1, B = x1 - x2, C = x2*y1 - x1*y2 @@ -282,47 +238,46 @@ class _Conic_arc_2 } // Set the arc properties (no need to compute the orientation). - _set (rat_coeffs); + _set(rat_coeffs); } - /*! - * Set a circular arc that corresponds to a full circle. + /*! Set a circular arc that corresponds to a full circle. * \param circ The circle (with rational center and rational squared radius). */ - _Conic_arc_2 (const Rat_circle_2& circ) : - _orient (CLOCKWISE), - _extra_data_P (nullptr) + CGAL_DEPRECATED Conic_arc_2(const Rat_circle_2& circ) : + m_orient(CLOCKWISE), + m_info(0), + m_extra_data(nullptr) { // Get the circle properties. - Rat_kernel ker; - Rat_point_2 center = ker.construct_center_2_object() (circ); - Rational x0 = center.x(); - Rational y0 = center.y(); - Rational R_sqr = ker.compute_squared_radius_2_object() (circ); + Rat_kernel ker; + Rat_point_2 center = ker.construct_center_2_object()(circ); + Rational x0 = center.x(); + Rational y0 = center.y(); + Rational R_sqr = ker.compute_squared_radius_2_object()(circ); - // Produce the correponding conic: if the circle center is (x0,y0) + // Produce the corresponding conic: if the circle center is (x0,y0) // and its squared radius is R^2, that its equation is: // x^2 + y^2 - 2*x0*x - 2*y0*y + (x0^2 + y0^2 - R^2) = 0 // Note that this equation describes a curve with a negative (clockwise) // orientation. - const Rational _zero (0); - const Rational _one (1); - const Rational _minus_two (-2); - Rational rat_coeffs [6]; - - rat_coeffs[0] = _one; - rat_coeffs[1] = _one; - rat_coeffs[2] = _zero; - rat_coeffs[3] = _minus_two*x0; - rat_coeffs[4] = _minus_two*y0; + const Rational zero(0); + const Rational one (1); + const Rational minus_two(-2); + Rational rat_coeffs[6]; + + rat_coeffs[0] = one; + rat_coeffs[1] = one; + rat_coeffs[2] = zero; + rat_coeffs[3] = minus_two*x0; + rat_coeffs[4] = minus_two*y0; rat_coeffs[5] = x0*x0 + y0*y0 - R_sqr; // Set the arc to be the full conic (no need to compute the orientation). - _set_full (rat_coeffs, false); + _set_full(rat_coeffs, false); } - /*! - * Set a circular arc that lies on the given circle: + /*! Set a circular arc that lies on the given circle: * C: (x - x0)^2 + (y - y0)^2 = R^2 * \param orient The orientation of the circle. * \param source The source point. @@ -330,128 +285,124 @@ class _Conic_arc_2 * \pre The source and the target must be on the conic boundary and must * not be the same. */ - _Conic_arc_2 (const Rat_circle_2& circ, - const Orientation& orient, - const Point_2& source, const Point_2& target) : - _orient(orient), - _source(source), - _target(target), - _extra_data_P (nullptr) + CGAL_DEPRECATED + Conic_arc_2(const Rat_circle_2& circ, const Orientation& orient, + const Point_2& source, const Point_2& target) : + m_orient(orient), + m_info(0), + m_source(source), + m_target(target), + m_extra_data(nullptr) { - // Make sure that the source and the taget are not the same. - CGAL_precondition (Alg_kernel().compare_xy_2_object() (source, - target) != EQUAL); - CGAL_precondition (orient != COLLINEAR); + // Make sure that the source and the target are not the same. + CGAL_precondition(Alg_kernel().compare_xy_2_object()(source, target) != + EQUAL); + CGAL_precondition(orient != COLLINEAR); // Get the circle properties. - Rat_kernel ker; - Rat_point_2 center = ker.construct_center_2_object() (circ); - Rational x0 = center.x(); - Rational y0 = center.y(); - Rational R_sqr = ker.compute_squared_radius_2_object() (circ); + Rat_kernel ker; + Rat_point_2 center = ker.construct_center_2_object()(circ); + Rational x0 = center.x(); + Rational y0 = center.y(); + Rational R_sqr = ker.compute_squared_radius_2_object()(circ); - // Produce the correponding conic: if the circle center is (x0,y0) + // Produce the corresponding conic: if the circle center is (x0,y0) // and it squared radius is R^2, that its equation is: // x^2 + y^2 - 2*x0*x - 2*y0*y + (x0^2 + y0^2 - R^2) = 0 // Since this equation describes a curve with a negative (clockwise) - // orientation, we multiply it by -1 if nece_Conic_arc_2 ssary to obtain a positive - // (counterclockwise) orientation. - const Rational _zero (0); - Rational rat_coeffs[6]; - - if (_orient == COUNTERCLOCKWISE) - { - const Rational _minus_one (-1); - const Rational _two (2); - - rat_coeffs[0] = _minus_one; - rat_coeffs[1] = _minus_one; - rat_coeffs[2] = _zero; - rat_coeffs[3] = _two*x0; - rat_coeffs[4] = _two*y0; + // orientation, we multiply it by -1 if nece_Conic_arc_2 ssary to obtain a + // positive (counterclockwise) orientation. + const Rational zero (0); + Rational rat_coeffs[6]; + + if (m_orient == COUNTERCLOCKWISE) { + const Rational minus_one(-1); + const Rational two(2); + + rat_coeffs[0] = minus_one; + rat_coeffs[1] = minus_one; + rat_coeffs[2] = zero; + rat_coeffs[3] = two*x0; + rat_coeffs[4] = two*y0; rat_coeffs[5] = R_sqr - x0*x0 - y0*y0; } - else - { - const Rational _one (1); - const Rational _minus_two (-2); - - rat_coeffs[0] = _one; - rat_coeffs[1] = _one; - rat_coeffs[2] = _zero; - rat_coeffs[3] = _minus_two*x0; - rat_coeffs[4] = _minus_two*y0; + else { + const Rational one(1); + const Rational minus_two(-2); + + rat_coeffs[0] = one; + rat_coeffs[1] = one; + rat_coeffs[2] = zero; + rat_coeffs[3] = minus_two*x0; + rat_coeffs[4] = minus_two*y0; rat_coeffs[5] = x0*x0 + y0*y0 - R_sqr; } // Set the arc properties (no need to compute the orientation). - _set (rat_coeffs); + _set(rat_coeffs); } - /*! - * Construct a circular arc from the given three points. + /*! Construct a circular arc from the given three points. * \param p1 The arc source. * \param p2 A point in the interior of the arc. * \param p3 The arc target. * \pre The three points must not be collinear. */ - _Conic_arc_2 (const Rat_point_2& p1, - const Rat_point_2& p2, - const Rat_point_2& p3): - _extra_data_P (nullptr) + CGAL_DEPRECATED Conic_arc_2(const Rat_point_2& p1, const Rat_point_2& p2, + const Rat_point_2& p3) : + m_info(0), + m_extra_data(nullptr) { // Set the source and target. - Rational x1 = p1.x(); - Rational y1 = p1.y(); - Rational x2 = p2.x(); - Rational y2 = p2.y(); - Rational x3 = p3.x(); - Rational y3 = p3.y(); - Nt_traits nt_traits; + Rational x1 = p1.x(); + Rational y1 = p1.y(); + Rational x2 = p2.x(); + Rational y2 = p2.y(); + Rational x3 = p3.x(); + Rational y3 = p3.y(); + Nt_traits nt_traits; - _source = Point_2 (nt_traits.convert (x1), nt_traits.convert (y1)); - _target = Point_2 (nt_traits.convert (x3), nt_traits.convert (y3)); + m_source = Point_2(nt_traits.convert (x1), nt_traits.convert(y1)); + m_target = Point_2(nt_traits.convert (x3), nt_traits.convert(y3)); - // Make sure that the source and the taget are not the same. - CGAL_precondition (Alg_kernel().compare_xy_2_object() (_source, - _target) != EQUAL); + // Make sure that the source and the target are not the same. + CGAL_precondition(Alg_kernel().compare_xy_2_object()(m_source, m_target) != + EQUAL); // Compute the lines: A1*x + B1*y + C1 = 0, // and: A2*x + B2*y + C2 = 0, // where: - const Rational _two = 2; + const Rational two = 2; - const Rational A1 = _two*(x1 - x2); - const Rational B1 = _two*(y1 - y2); - const Rational C1 = y2*y2 - y1*y1 + x2*x2 - x1*x1; + const Rational A1 = two*(x1 - x2); + const Rational B1 = two*(y1 - y2); + const Rational C1 = y2*y2 - y1*y1 + x2*x2 - x1*x1; - const Rational A2 = _two*(x2 - x3); - const Rational B2 = _two*(y2 - y3); - const Rational C2 = y3*y3 - y2*y2 + x3*x3 - x2*x2; + const Rational A2 = two*(x2 - x3); + const Rational B2 = two*(y2 - y3); + const Rational C2 = y3*y3 - y2*y2 + x3*x3 - x2*x2; // Compute the coordinates of the intersection point between the // two lines, given by (Nx / D, Ny / D), where: - const Rational Nx = B1*C2 - B2*C1; - const Rational Ny = A2*C1 - A1*C2; - const Rational D = A1*B2 - A2*B1; + const Rational Nx = B1*C2 - B2*C1; + const Rational Ny = A2*C1 - A1*C2; + const Rational D = A1*B2 - A2*B1; // Make sure the three points are not collinear. - const bool points_collinear = (CGAL::sign (D) == ZERO); + const bool points_collinear = (CGAL::sign(D) == ZERO); - if (points_collinear) - { - _info = 0; // Inavlid arc. + if (points_collinear) { + reset_flags(); // inavlid arc return; } // The equation of the underlying circle is given by: - Rational rat_coeffs[6]; - + Rational rat_coeffs[6]; rat_coeffs[0] = D*D; rat_coeffs[1] = D*D; rat_coeffs[2] = 0; - rat_coeffs[3] = -_two*D*Nx; - rat_coeffs[4] = -_two*D*Ny; + rat_coeffs[3] = -two*D*Nx; + rat_coeffs[4] = -two*D*Ny; rat_coeffs[5] = Nx*Nx + Ny*Ny - ((D*x2 - Nx)*(D*x2 - Nx) + (D*y2 - Ny)*(D*y2 - Ny)); @@ -459,40 +410,37 @@ class _Conic_arc_2 // the source and the target points, the orientation is positive (going // counterclockwise). // Otherwise, it is negative (going clockwise). - Alg_kernel ker; + Alg_kernel ker; typename Alg_kernel::Orientation_2 orient_f = ker.orientation_2_object(); + Point_2 p_mid = Point_2(nt_traits.convert(x2), nt_traits.convert(y2)); - Point_2 p_mid = Point_2 (nt_traits.convert (x2), nt_traits.convert (y2)); - - if (orient_f(_source, p_mid, _target) == LEFT_TURN) - _orient = COUNTERCLOCKWISE; + if (orient_f(m_source, p_mid, m_target) == LEFT_TURN) + m_orient = COUNTERCLOCKWISE; else - _orient = CLOCKWISE; + m_orient = CLOCKWISE; // Set the arc properties (no need to compute the orientation). - _set (rat_coeffs); + _set(rat_coeffs); } - /*! - * Construct a conic arc from the given five points, specified by the + /*! Construct a conic arc from the given five points, specified by the * points p1, p2, p3, p4 and p5. * \param p1 The source point of the given arc. * \param p2,p3,p4 Points lying on the conic arc, between p1 and p5. * \param p5 The target point of the given arc. * \pre No three points are collinear. */ - _Conic_arc_2 (const Rat_point_2& p1, - const Rat_point_2& p2, - const Rat_point_2& p3, - const Rat_point_2& p4, - const Rat_point_2& p5) : - _extra_data_P(nullptr) + CGAL_DEPRECATED Conic_arc_2(const Rat_point_2& p1, const Rat_point_2& p2, + const Rat_point_2& p3, const Rat_point_2& p4, + const Rat_point_2& p5) : + m_info(0), + m_extra_data(nullptr) { // Make sure that no three points are collinear. - Rat_kernel ker; + Rat_kernel ker; typename Rat_kernel::Orientation_2 orient_f = ker.orientation_2_object(); - const bool point_collinear = + const bool point_collinear = (orient_f (p1, p2, p3) == COLLINEAR || orient_f (p1, p2, p4) == COLLINEAR || orient_f (p1, p2, p5) == COLLINEAR || @@ -504,27 +452,26 @@ class _Conic_arc_2 orient_f (p2, p4, p5) == COLLINEAR || orient_f (p3, p4, p5) == COLLINEAR); - if (point_collinear) - { - _info = 0; // Inavlid arc. + if (point_collinear) { + reset_flags(); // inavlid arc return; } // Set the source and target. - Rational x1 = p1.x(); - Rational y1 = p1.y(); - Rational x5 = p5.x(); - Rational y5 = p5.y(); - Nt_traits nt_traits; + Rational x1 = p1.x(); + Rational y1 = p1.y(); + Rational x5 = p5.x(); + Rational y5 = p5.y(); + Nt_traits nt_traits; - _source = Point_2 (nt_traits.convert (x1), nt_traits.convert (y1)); - _target = Point_2 (nt_traits.convert (x5), nt_traits.convert (y5)); + m_source = Point_2(nt_traits.convert (x1), nt_traits.convert(y1)); + m_target = Point_2(nt_traits.convert (x5), nt_traits.convert(y5)); // Set a conic curve that passes through the five given point. - typename Rat_kernel::Conic_2 temp_conic; - Rational rat_coeffs [6]; + typename Rat_kernel::Conic_2 temp_conic; + Rational rat_coeffs [6]; - temp_conic.set (p1, p2, p3, p4, p5); + temp_conic.set(p1, p2, p3, p4, p5); // Get the conic coefficients. rat_coeffs[0] = temp_conic.r(); @@ -538,43 +485,37 @@ class _Conic_arc_2 // with the source and the target points, the orientation is positive // (going counterclockwise). // Otherwise, it is negative (going clockwise). - const Orientation turn = orient_f(p1, p2, p5); + const Orientation turn = orient_f(p1, p2, p5); - if (turn == LEFT_TURN) - { - _orient = COUNTERCLOCKWISE; - CGAL_precondition (orient_f(p1, p3, p5) == LEFT_TURN && - orient_f(p1, p4, p5) == LEFT_TURN); + if (turn == LEFT_TURN) { + m_orient = COUNTERCLOCKWISE; + CGAL_precondition(orient_f(p1, p3, p5) == LEFT_TURN && + orient_f(p1, p4, p5) == LEFT_TURN); } - else - { - _orient = CLOCKWISE; - CGAL_precondition (orient_f(p1, p3, p5) != LEFT_TURN && - orient_f(p1, p4, p5) != LEFT_TURN); + else { + m_orient = CLOCKWISE; + CGAL_precondition(orient_f(p1, p3, p5) != LEFT_TURN && + orient_f(p1, p4, p5) != LEFT_TURN); } // Set the arc properties (no need to compute the orientation). - _set (rat_coeffs); + _set(rat_coeffs); // Make sure that all midpoints are strictly between the // source and the target. - Point_2 mp2 = Point_2 (nt_traits.convert (p2.x()), - nt_traits.convert (p2.y())); - Point_2 mp3 = Point_2 (nt_traits.convert (p3.x()), - nt_traits.convert (p3.y())); - Point_2 mp4 = Point_2 (nt_traits.convert (p4.x()), - nt_traits.convert (p4.y())); - - if (! _is_strictly_between_endpoints (mp2) || - ! _is_strictly_between_endpoints (mp3) || - ! _is_strictly_between_endpoints (mp4)) + Point_2 mp2 = Point_2(nt_traits.convert(p2.x()), nt_traits.convert(p2.y())); + Point_2 mp3 = Point_2(nt_traits.convert(p3.x()), nt_traits.convert(p3.y())); + Point_2 mp4 = Point_2(nt_traits.convert(p4.x()), nt_traits.convert(p4.y())); + + if (! _is_strictly_between_endpoints(mp2) || + ! _is_strictly_between_endpoints(mp3) || + ! _is_strictly_between_endpoints(mp4)) { - _info = 0; // Inalvid arc. + reset_flags(); // inavlid arc } } - /*! - * Construct a conic arc which lies on the conic: + /*! Construct a conic arc which lies on the conic: * C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0 * The source and the target are specified by the intersection of the * conic with: @@ -584,63 +525,53 @@ class _Conic_arc_2 * coordinates. The actual intersection points that best fits the source * (or the target) will be selected. */ - _Conic_arc_2 (const Rational& r, const Rational& s, const Rational& t, - const Rational& u, const Rational& v, const Rational& w, - const Orientation& orient, - const Point_2& app_source, - const Rational& r_1, const Rational& s_1, const Rational& t_1, - const Rational& u_1, const Rational& v_1, const Rational& w_1, - const Point_2& app_target, - const Rational& r_2, const Rational& s_2, const Rational& t_2, - const Rational& u_2, const Rational& v_2, const Rational& w_2): - _orient(orient), - _extra_data_P(nullptr) + CGAL_DEPRECATED + Conic_arc_2(const Rational& r, const Rational& s, const Rational& t, + const Rational& u, const Rational& v, const Rational& w, + const Orientation& orient, + const Point_2& app_source, + const Rational& r_1, const Rational& s_1, const Rational& t_1, + const Rational& u_1, const Rational& v_1, const Rational& w_1, + const Point_2& app_target, + const Rational& r_2, const Rational& s_2, const Rational& t_2, + const Rational& u_2, const Rational& v_2, const Rational& w_2): + m_orient(orient), + m_info(0), + m_extra_data(nullptr) { // Create the integer coefficients of the base conic. - Rational rat_coeffs [6]; - Nt_traits nt_traits; - Integer base_coeffs[6]; - int deg_base; - - rat_coeffs[0] = r; - rat_coeffs[1] = s; - rat_coeffs[2] = t; - rat_coeffs[3] = u; - rat_coeffs[4] = v; - rat_coeffs[5] = w; - - nt_traits.convert_coefficients (rat_coeffs, rat_coeffs + 6, - base_coeffs); + Nt_traits nt_traits; + Integer base_coeffs[6]; + int deg_base; + Rational rat_coeffs [6] = {r, s, t, u, v, w}; + nt_traits.convert_coefficients(rat_coeffs, rat_coeffs + 6, base_coeffs); if (CGAL::sign (base_coeffs[0]) == ZERO && CGAL::sign (base_coeffs[1]) == ZERO && - CGAL::sign (base_coeffs[2]) == ZERO) - { + CGAL::sign (base_coeffs[2]) == ZERO) { deg_base = 1; } - else - { + else { deg_base = 2; } // Compute the endpoints. - Rational aux_rat_coeffs [6]; - Integer aux_coeffs[6]; - int deg_aux; - Algebraic xs[4]; - int n_xs; - Algebraic ys[4]; - int n_ys; - int i, j; - Algebraic val; - bool found; - double dx, dy; - double curr_dist; - double min_dist = -1; - int k; - - for (k = 1; k <= 2; k++) - { + Rational aux_rat_coeffs [6]; + Integer aux_coeffs[6]; + int deg_aux; + Algebraic xs[4]; + int n_xs; + Algebraic ys[4]; + int n_ys; + int i, j; + Algebraic val; + bool found; + double dx, dy; + double curr_dist; + double min_dist = -1; + int k; + + for (k = 1; k <= 2; ++k) { // Get the integer coefficients of the k'th auxiliary conic curve. aux_rat_coeffs[0] = (k == 1) ? r_1 : r_2; aux_rat_coeffs[1] = (k == 1) ? s_1 : s_2; @@ -649,55 +580,51 @@ class _Conic_arc_2 aux_rat_coeffs[4] = (k == 1) ? v_1 : v_2; aux_rat_coeffs[5] = (k == 1) ? w_1 : w_2; - nt_traits.convert_coefficients (aux_rat_coeffs, aux_rat_coeffs + 6, - aux_coeffs); + nt_traits.convert_coefficients(aux_rat_coeffs, aux_rat_coeffs + 6, + aux_coeffs); if (CGAL::sign (aux_coeffs[0]) == ZERO && CGAL::sign (aux_coeffs[1]) == ZERO && - CGAL::sign (aux_coeffs[2]) == ZERO) - { + CGAL::sign (aux_coeffs[2]) == ZERO) { deg_aux = 1; } - else - { + else { deg_aux = 2; } // Compute the x- and y-coordinates of intersection points of the base // conic and the k'th auxiliary conic. - n_xs = _compute_resultant_roots (nt_traits, - base_coeffs[0], base_coeffs[1], - base_coeffs[2], - base_coeffs[3], base_coeffs[4], - base_coeffs[5], - deg_base, - aux_coeffs[0], aux_coeffs[1], - aux_coeffs[2], - aux_coeffs[3], aux_coeffs[4], - aux_coeffs[5], - deg_aux, - xs); - - n_ys = _compute_resultant_roots (nt_traits, - base_coeffs[1], base_coeffs[0], - base_coeffs[2], - base_coeffs[4], base_coeffs[3], - base_coeffs[5], - deg_base, - aux_coeffs[1], aux_coeffs[0], - aux_coeffs[2], - aux_coeffs[4], aux_coeffs[3], - aux_coeffs[5], - deg_aux, - ys); + n_xs = compute_resultant_roots(nt_traits, + base_coeffs[0], base_coeffs[1], + base_coeffs[2], + base_coeffs[3], base_coeffs[4], + base_coeffs[5], + deg_base, + aux_coeffs[0], aux_coeffs[1], + aux_coeffs[2], + aux_coeffs[3], aux_coeffs[4], + aux_coeffs[5], + deg_aux, + xs); + + n_ys = compute_resultant_roots(nt_traits, + base_coeffs[1], base_coeffs[0], + base_coeffs[2], + base_coeffs[4], base_coeffs[3], + base_coeffs[5], + deg_base, + aux_coeffs[1], aux_coeffs[0], + aux_coeffs[2], + aux_coeffs[4], aux_coeffs[3], + aux_coeffs[5], + deg_aux, + ys); // Find the intersection point which is nearest the given approximation // and set it as the endpoint. found = false; - for (i = 0; i < n_xs; i++) - { - for (j = 0; j < n_ys; j++) - { + for (i = 0; i < n_xs; ++i) { + for (j = 0; j < n_ys; ++j) { // Check if the point (xs[i], ys[j]) lies on both conics. val = nt_traits.convert(base_coeffs[0]) * xs[i]*xs[i] + nt_traits.convert(base_coeffs[1]) * ys[j]*ys[j] + @@ -706,8 +633,7 @@ class _Conic_arc_2 nt_traits.convert(base_coeffs[4]) * ys[j] + nt_traits.convert(base_coeffs[5]); - if (CGAL::sign (val) != ZERO) - continue; + if (CGAL::sign (val) != ZERO) continue; val = nt_traits.convert(aux_coeffs[0]) * xs[i]*xs[i] + nt_traits.convert(aux_coeffs[1]) * ys[j]*ys[j] + @@ -716,17 +642,14 @@ class _Conic_arc_2 nt_traits.convert(aux_coeffs[4]) * ys[j] + nt_traits.convert(aux_coeffs[5]); - if (CGAL::sign (val) == ZERO) - { + if (CGAL::sign (val) == ZERO) { // Compute the distance of (xs[i], ys[j]) from the approximated // endpoint. - if (k == 1) - { + if (k == 1) { dx = CGAL::to_double (xs[i] - app_source.x()); dy = CGAL::to_double (ys[j] - app_source.y()); } - else - { + else { dx = CGAL::to_double (xs[i] - app_target.x()); dy = CGAL::to_double (ys[j] - app_target.y()); } @@ -735,13 +658,9 @@ class _Conic_arc_2 // Update the endpoint if (xs[i], ys[j]) is the nearest pair so // far. - if (! found || curr_dist < min_dist) - { - if (k == 1) - _source = Point_2 (xs[i], ys[j]); - else - _target = Point_2 (xs[i], ys[j]); - + if (! found || curr_dist < min_dist) { + if (k == 1) m_source = Point_2 (xs[i], ys[j]); + else m_target = Point_2 (xs[i], ys[j]); min_dist = curr_dist; found = true; } @@ -749,180 +668,45 @@ class _Conic_arc_2 } } - if (! found) - { - _info = 0; // Invalid arc. + if (! found) { + reset_flags(); // inavlid arc return; } } // Make sure that the source and the target are not the same. - if (Alg_kernel().compare_xy_2_object() (_source, - _target) == EQUAL) - { - _info = 0; // Invalid arc. + if (Alg_kernel().compare_xy_2_object()(m_source, m_target) == EQUAL) { + reset_flags(); // inavlid arc return; } // Set the arc properties (no need to compute the orientation). - _set (rat_coeffs); - } - - /*! - * Destructor. - */ - virtual ~_Conic_arc_2 () - { - if (_extra_data_P != nullptr) - delete _extra_data_P; - } - - /*! - * Assignment operator. - * \param arc The copied arc. - */ - const Self& operator= (const Self& arc) - { - if (this == &arc) - return (*this); - - // Free any existing data. - if (_extra_data_P != nullptr) - delete _extra_data_P; - - // Copy the arc's attributes. - _r = arc._r; - _s = arc._s; - _t = arc._t; - _u = arc._u; - _v = arc._v; - _w = arc._w; - - _orient = arc._orient; - _info = arc._info; - _source = arc._source; - _target = arc._target; - - // Duplicate the extra data, if necessary. - if (arc._extra_data_P != nullptr) - _extra_data_P = new Extra_data (*(arc._extra_data_P)); - else - _extra_data_P = nullptr; - - return (*this); - } - //@} - - /// \name Get the arc properties. - //@{ - - /*! - * Check if the arc is valid. - */ - bool is_valid () const - { - return ((_info & IS_VALID) != 0); - } - - /*! - * Get the coefficients of the underlying conic. - */ - const Integer& r () const {return (_r);} - const Integer& s () const {return (_s);} - const Integer& t () const {return (_t);} - const Integer& u () const {return (_u);} - const Integer& v () const {return (_v);} - const Integer& w () const {return (_w);} - - /*! - * Check whether the arc is x-monotone. - */ - bool is_x_monotone () const - { - // Check if the arc contains no vertical tangency points. - Point_2 vtan_ps[2]; - return (vertical_tangency_points (vtan_ps) == 0); - } - - /*! - * Check whether the arc is y-monotone. - */ - bool is_y_monotone () const - { - // Check if the arc contains no horizontal tangency points. - Point_2 htan_ps[2]; - return (horizontal_tangency_points (htan_ps) == 0); - } - - /*! - * Check whether the arc represents a full conic curve. - */ - bool is_full_conic () const - { - return ((_info & IS_FULL_CONIC) != 0); - } - - /*! - * Get the arc's source. - * \return The source point. - * \pre The arc does not represent a full conic curve. - */ - const Point_2& source () const - { - CGAL_precondition (! is_full_conic()); - - return (_source); + _set(rat_coeffs); } - /*! - * Get the arc's target. - * \return The target point. - * \pre The arc does not represent a full conic curve. - */ - const Point_2& target () const - { - CGAL_precondition (! is_full_conic()); - - return (_target); - } - - /*! - * Get the orientation of the arc. - * \return The orientation. - */ - Orientation orientation () const - { - return (_orient); - } - - /*! - * Get a bounding box for the conic arc. + /*! Get a bounding box for the conic arc. * \return The bounding box. */ - Bbox_2 bbox () const - { + CGAL_DEPRECATED Bbox_2 bbox() const { CGAL_precondition (is_valid()); - double x_min = 0, y_min = 0; - double x_max = 0, y_max = 0; + double x_min(0), y_min(0); + double x_max(0), y_max(0); - if (is_full_conic()) - { + if (is_full_conic()) { // In case of a full conic (an ellipse or a circle), compute the // horizontal and vertical tangency points and use them to bound the arc. - Point_2 tan_ps[2]; + Point_2 tan_ps[2]; CGAL_assertion_code(int n_tan_ps); CGAL_assertion_code(n_tan_ps = vertical_tangency_points(tan_ps)); CGAL_assertion(n_tan_ps == 2); - if (CGAL::to_double(tan_ps[0].x()) < CGAL::to_double(tan_ps[1].x())) - { + if (CGAL::to_double(tan_ps[0].x()) < CGAL::to_double(tan_ps[1].x())) { x_min = CGAL::to_double(tan_ps[0].x()); x_max = CGAL::to_double(tan_ps[1].x()); } - else - { + else { x_min = CGAL::to_double(tan_ps[1].x()); x_max = CGAL::to_double(tan_ps[0].x()); } @@ -930,42 +714,38 @@ class _Conic_arc_2 CGAL_assertion_code(n_tan_ps = horizontal_tangency_points(tan_ps)); CGAL_assertion(n_tan_ps == 2); - if (CGAL::to_double(tan_ps[0].y()) < CGAL::to_double(tan_ps[1].y())) - { + if (CGAL::to_double(tan_ps[0].y()) < CGAL::to_double(tan_ps[1].y())) { y_min = CGAL::to_double(tan_ps[0].y()); y_max = CGAL::to_double(tan_ps[1].y()); } - else - { + else { y_min = CGAL::to_double(tan_ps[1].y()); y_max = CGAL::to_double(tan_ps[0].y()); } } - else - { + else { // Use the source and target to initialize the exterme points. bool source_left = - CGAL::to_double(_source.x()) < CGAL::to_double(_target.x()); + CGAL::to_double(m_source.x()) < CGAL::to_double(m_target.x()); x_min = source_left ? - CGAL::to_double(_source.x()) : CGAL::to_double(_target.x()); + CGAL::to_double(m_source.x()) : CGAL::to_double(m_target.x()); x_max = source_left ? - CGAL::to_double(_target.x()) : CGAL::to_double(_source.x()); + CGAL::to_double(m_target.x()) : CGAL::to_double(m_source.x()); - bool source_down = - CGAL::to_double(_source.y()) < CGAL::to_double(_target.y()); + bool source_down = + CGAL::to_double(m_source.y()) < CGAL::to_double(m_target.y()); y_min = source_down ? - CGAL::to_double(_source.y()) : CGAL::to_double(_target.y()); + CGAL::to_double(m_source.y()) : CGAL::to_double(m_target.y()); y_max = source_down ? - CGAL::to_double(_target.y()) : CGAL::to_double(_source.y()); + CGAL::to_double(m_target.y()) : CGAL::to_double(m_source.y()); // Go over the vertical tangency points and try to update the x-points. - Point_2 tan_ps[2]; - int n_tan_ps; - int i; + Alg_point_2 tan_ps[2]; + int n_tan_ps; + int i; - n_tan_ps = vertical_tangency_points (tan_ps); - for (i = 0; i < n_tan_ps; i++) - { + n_tan_ps = vertical_tangency_points(tan_ps); + for (i = 0; i < n_tan_ps; ++i) { if (CGAL::to_double(tan_ps[i].x()) < x_min) x_min = CGAL::to_double(tan_ps[i].x()); if (CGAL::to_double(tan_ps[i].x()) > x_max) @@ -973,9 +753,8 @@ class _Conic_arc_2 } // Go over the horizontal tangency points and try to update the y-points. - n_tan_ps = horizontal_tangency_points (tan_ps); - for (i = 0; i < n_tan_ps; i++) - { + n_tan_ps = horizontal_tangency_points(tan_ps); + for (i = 0; i < n_tan_ps; ++i) { if (CGAL::to_double(tan_ps[i].y()) < y_min) y_min = CGAL::to_double(tan_ps[i].y()); if (CGAL::to_double(tan_ps[i].y()) > y_max) @@ -984,398 +763,340 @@ class _Conic_arc_2 } // Return the resulting bounding box. - return (Bbox_2 (x_min, y_min, x_max, y_max)); - } - //@} - - /// \name Modifying functions. - //@{ - - /*! - * Set the source point of the conic arc. - * \param ps The new source point. - * \pre The arc is not a full conic curve. - * ps must lie on the supporting conic curve. - */ - void set_source (const Point_2& ps) - { - CGAL_precondition (! is_full_conic()); - CGAL_precondition (_is_on_supporting_conic (ps)); - CGAL_precondition (Alg_kernel().orientation_2_object() - (_source, ps, _target) == _orient || - Alg_kernel().orientation_2_object() - (ps, _source, _target) == _orient); - - _source = ps; - return; - } - - /*! - * Set the target point of the conic arc. - * \param pt The new source point. - * \pre The arc is not a full conic curve. - * pt must lie on the supporting conic curve. - */ - void set_target (const Point_2& pt) - { - CGAL_precondition (! is_full_conic()); - CGAL_precondition (_is_on_supporting_conic (pt)); - CGAL_precondition (Alg_kernel().orientation_2_object() - (_source, pt, _target) == _orient || - Alg_kernel().orientation_2_object() - (_source, _target, pt) == _orient); - - _target = pt; - return; + return Bbox_2(x_min, y_min, x_max, y_max); } //@} - /// \name Compute points on the arc. - //@{ - - /*! - * Calculate the vertical tangency points of the arc. +protected: + /*! Calculate the vertical tangency points of the arc. * \param vpts The vertical tangency points. * \pre The vpts vector should be allocated at the size of 2. * \return The number of vertical tangency points. */ - int vertical_tangency_points (Point_2* vpts) const - { + CGAL_DEPRECATED int vertical_tangency_points(Alg_point_2* vpts) const { // No vertical tangency points for line segments: - if (_orient == COLLINEAR) - return (0); + if (m_orient == COLLINEAR) return 0; // Calculate the vertical tangency points of the supporting conic. - Point_2 ps[2]; - int n; - - n = _conic_vertical_tangency_points (ps); + Alg_point_2 ps[2]; + int n = _conic_vertical_tangency_points(ps); // Return only the points that are contained in the arc interior. - int m = 0; + int m(0); - for (int i = 0; i < n; i++) - { - if (is_full_conic() || _is_strictly_between_endpoints(ps[i])) - { + for (int i = 0; i < n; ++i) { + if (is_full_conic() || _is_strictly_between_endpoints(ps[i])) { vpts[m] = ps[i]; - m++; + ++m; } } // Return the number of vertical tangency points found. - CGAL_assertion (m <= 2); - return (m); + CGAL_assertion(m <= 2); + return m; } - /*! - * Calculate the horizontal tangency points of the arc. + /*! Calculate the horizontal tangency points of the arc. * \param hpts The horizontal tangency points. * \pre The hpts vector should be allocated at the size of 2. * \return The number of horizontal tangency points. */ - int horizontal_tangency_points (Point_2* hpts) const - { + CGAL_DEPRECATED int horizontal_tangency_points(Alg_point_2* hpts) const { // No horizontal tangency points for line segments: - if (_orient == COLLINEAR) - return (0); + if (m_orient == COLLINEAR) return 0; // Calculate the horizontal tangency points of the conic. - Point_2 ps[2]; - int n; - - n = _conic_horizontal_tangency_points (ps); + Alg_point_2 ps[2]; + int n = _conic_horizontal_tangency_points(ps); // Return only the points that are contained in the arc interior. - int m = 0; + int m = 0; - for (int i = 0; i < n; i++) - { - if (is_full_conic() || _is_strictly_between_endpoints(ps[i])) - { + for (int i = 0; i < n; ++i) { + if (is_full_conic() || _is_strictly_between_endpoints(ps[i])) { hpts[m] = ps[i]; - m++; + ++m; } } // Return the number of horizontal tangency points found. - CGAL_assertion (m <= 2); - return (m); + CGAL_assertion(m <= 2); + return m; } - /*! - * Find all points on the arc with a given x-coordinate. - * \param p A placeholder for the x-coordinate. - * \param ps The point on the arc at x(p). - * \pre The vector ps should be allocated at the size of 2. - * \return The number of points found. + /*! Check whether the given point is strictly between the source and the + * target (but not any of them). + * The point is assumed to be on the conic's boundary. + * \param p The query point. + * \return (true) if the point is strictly between the two endpoints, + * (false) if it is not. */ - int points_at_x (const Point_2& p, - Point_2 *ps) const - { - // Get the y coordinates of the points on the conic. - Algebraic ys[2]; - int n; + CGAL_DEPRECATED bool _is_strictly_between_endpoints(const Point_2& p) const { + // In case this is a full conic, any point on its boundary is between + // its end points. + if (is_full_conic()) return true; - n = _conic_get_y_coordinates (p.x(), ys); + // Check if we have extra data available. + if (m_extra_data != nullptr) { + if (m_extra_data->side != ZERO) { + // In case of a hyperbolic arc, make sure the point is located on the + // same branch as the arc. + if (sign_of_extra_data(p.x(), p.y()) != m_extra_data->side) + return false; + } + else { + // In case we have a segment of a line pair, make sure that p really + // satisfies the equation of the line. + if (sign_of_extra_data(p.x(), p.y()) != ZERO) return false; + } + } - // Find all the points that are contained in the arc. - int m = 0; + // Act according to the conic degree. + Alg_kernel ker; - for (int i = 0; i < n; i++) - { - ps[m] = Point_2 (p.x(), ys[i]); + if (m_orient == COLLINEAR) { + Comparison_result res1; + Comparison_result res2; - if (is_full_conic() || _is_between_endpoints(ps[m])) - m++; - } + if (ker.compare_x_2_object()(m_source, m_target) == EQUAL) { + // In case of a vertical segment - just check whether the y coordinate + // of p is between those of the source's and of the target's. + res1 = ker.compare_y_2_object()(p, m_source); + res2 = ker.compare_y_2_object()(p, m_target); + } + else { + // Otherwise, since the segment is x-monotone, just check whether the + // x coordinate of p is between those of the source's and of the + // target's. + res1 = ker.compare_x_2_object()(p, m_source); + res2 = ker.compare_x_2_object()(p, m_target); + } - // Return the number of points on the arc. - CGAL_assertion (m <= 2); - return (m); + // If p is not in the (open) x-range (or y-range) of the segment, it + // cannot be contained in the segment. + if (res1 == EQUAL || res2 == EQUAL || res1 == res2) return false; + + // Perform an orientation test: This is crucial for segment of line + // pairs, as we want to make sure that p lies on the same line as the + // source and the target. + return (ker.orientation_2_object()(m_source, p, m_target) == COLLINEAR); + } + else { + // In case of a conic of degree 2, make a decision based on the conic's + // orientation and whether (source,p,target) is a right or a left turn. + if (m_orient == COUNTERCLOCKWISE) + return (ker.orientation_2_object()(m_source, p, m_target) == LEFT_TURN); + else + return (ker.orientation_2_object()(m_source, p, m_target) == RIGHT_TURN); + } } - /*! - * Find all points on the arc with a given y-coordinate. - * \param p A placeholder for the y-coordinate. - * \param ps The point on the arc at x(p). - * \pre The vector ps should be allocated at the size of 2. - * \return The number of points found. + /*! Find the vertical tangency points of the undelying conic. + * \param ps The output points of vertical tangency. + * This area must be allocated at the size of 2. + * \return The number of vertical tangency points. */ - int points_at_y (const Point_2& p, - Point_2 *ps) const - { - // Get the y coordinates of the points on the conic. - Algebraic xs[2]; - int n; + CGAL_DEPRECATED + int _conic_vertical_tangency_points(Alg_point_2* ps) const { + const auto& cv = *this; + Nt_traits nt_traits; - n = _conic_get_x_coordinates (p.y(), xs); + // In case the base conic is of degree 1 (and not 2), the arc has no + // vertical tangency points. + if (CGAL::sign(cv.s()) == ZERO) return 0; - // Find all the points that are contained in the arc. - int m = 0; + // We are interested in the x coordinates where the quadratic equation: + // s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0 + // has a single solution (obviously if s = 0, there are no such points). + // We therefore demand that the discriminant of this equation is zero: + // (t*x + v)^2 - 4*s*(r*x^2 + u*x + w) = 0 + const Integer two(2); + const Integer four(4); + Algebraic xs[2]; + + auto r = cv.r(); + auto s = cv.s(); + auto t = cv.t(); + auto u = cv.u(); + auto v = cv.v(); + auto w = cv.w(); + Algebraic* xs_end = nt_traits.solve_quadratic_equation(t*t - four*r*s, + two*t*v - four*s*u, + v*v - four*s*w, + xs); + auto n_xs = static_cast(xs_end - xs); - for (int i = 0; i < n; i++) - { - ps[m] = Point_2 (xs[i], p.y()); + // Find the y-coordinates of the vertical tangency points. + Algebraic ys[2]; + Algebraic* ys_end; + int n_ys; - if (is_full_conic() || _is_between_endpoints(ps[m])) - m++; + if (CGAL::sign(cv.t()) == ZERO) { + // The two vertical tangency points have the same y coordinate: + ys[0] = nt_traits.convert(-v) / nt_traits.convert(two*s); + n_ys = 1; + } + else { + ys_end = nt_traits.solve_quadratic_equation(four*r*s*s - s*t*t, + four*r*s*v - two*s*t*u, + r*v*v - t*u*v + + t*t*w, + ys); + n_ys = static_cast(ys_end - ys); } - // Return the number of points on the arc. - CGAL_assertion (m <= 2); - return (m); - } - //@} + // Pair the x and y coordinates and obtain the vertical tangency points. + int n(0); -private: + for (int i = 0; i < n_xs; ++i) { + if (n_ys == 1) { + ps[n++] = Point_2(xs[i], ys[0]); + } + else { + for (int j = 0; j < n_ys; ++j) { + if (CGAL::compare(nt_traits.convert(two*s) * ys[j], + -(nt_traits.convert(t) * xs[i] + + nt_traits.convert(v))) == EQUAL) + { + ps[n++] = Point_2(xs[i], ys[j]); + break; + } + } + } + } - /// \name Auxiliary construction functions. - //@{ + CGAL_assertion(n <= 2); + return n; + } - /*! - * Set the properties of a conic arc (for the usage of the constructors). - * \param rat_coeffs A vector of size 6, storing the rational coefficients - * of x^2, y^2, xy, x, y and the free coefficient resp. + /*! Find the horizontal tangency points of the undelying conic. + * \param ps The output points of horizontal tangency. + * This area must be allocated at the size of 2. + * \return The number of horizontal tangency points. */ - void _set (const Rational* rat_coeffs) - { - _info = IS_VALID; + CGAL_DEPRECATED + size_t _conic_horizontal_tangency_points(Alg_point_2* ps) const { + const auto& cv = *this; + Nt_traits nt_traits; - // Convert the coefficients vector to an equivalent vector of integer - // coefficients. - Nt_traits nt_traits; - Integer int_coeffs[6]; - - nt_traits.convert_coefficients (rat_coeffs, rat_coeffs + 6, - int_coeffs); - - // Check the orientation of conic curve, and negate the conic coefficients - // if its given orientation. - typename Rat_kernel::Conic_2 temp_conic (rat_coeffs[0], rat_coeffs[1], - rat_coeffs[2], rat_coeffs[3], - rat_coeffs[4], rat_coeffs[5]); - - if (_orient == temp_conic.orientation()) - { - _r = int_coeffs[0]; - _s = int_coeffs[1]; - _t = int_coeffs[2]; - _u = int_coeffs[3]; - _v = int_coeffs[4]; - _w = int_coeffs[5]; - } - else - { - _r = -int_coeffs[0]; - _s = -int_coeffs[1]; - _t = -int_coeffs[2]; - _u = -int_coeffs[3]; - _v = -int_coeffs[4]; - _w = -int_coeffs[5]; - } - - // Make sure both endpoint lie on the supporting conic. - if (! _is_on_supporting_conic (_source) || - ! _is_on_supporting_conic (_target)) - { - _info = 0; // Invalid arc. - return; - } - - _extra_data_P = nullptr; - - // Check whether we have a degree 2 curve. - if ((CGAL::sign (_r) != ZERO || - CGAL::sign (_s) != ZERO || - CGAL::sign (_t) != ZERO)) - { - if (_orient == COLLINEAR) - { - // We have a segment of a line pair with rational coefficients. - // Compose the equation of the underlying line - // (with algebraic coefficients). - const Algebraic x1 = _source.x(), y1 = _source.y(); - const Algebraic x2 = _target.x(), y2 = _target.y(); - - // The supporting line is A*x + B*y + C = 0, where: - // - // A = y2 - y1, B = x1 - x2, C = x2*y1 - x1*y2 - // - // We use the extra dat field to store the equation of this line. - _extra_data_P = new Extra_data; - _extra_data_P->a = y2 - y1; - _extra_data_P->b = x1 - x2; - _extra_data_P->c = x2*y1 - x1*y2; - _extra_data_P->side = ZERO; + const Integer zero(0); - // Make sure the midpoint is on the line pair (thus making sure that - // the two points are not taken from different lines). - Alg_kernel ker; - Point_2 p_mid = ker.construct_midpoint_2_object() (_source, - _target); - - if (CGAL::sign ((nt_traits.convert(_r)*p_mid.x() + - nt_traits.convert(_t)*p_mid.y() + - nt_traits.convert(_u)) * p_mid.x() + - (nt_traits.convert(_s)*p_mid.y() + - nt_traits.convert(_v)) * p_mid.y() + - nt_traits.convert(_w)) != ZERO) - { - _info = 0; // Invalid arc. - return; - } - } - else - { - // The sign of (4rs - t^2) detetmines the conic type: - // - if it is possitive, the conic is an ellipse, - // - if it is negative, the conic is a hyperbola, - // - if it is zero, the conic is a parabola. - CGAL::Sign sign_conic = CGAL::sign (4*_r*_s - _t*_t); - - if (sign_conic == NEGATIVE) - // Build the extra hyperbolic data - _build_hyperbolic_arc_data (); - - if (sign_conic != POSITIVE) - { - // In case of a non-degenerate parabola or a hyperbola, make sure - // the arc is not infinite. - Alg_kernel ker; - Point_2 p_mid = ker.construct_midpoint_2_object() (_source, - _target); - Point_2 ps[2]; + // In case the base conic is of degree 1 (and not 2), the arc has no + // vertical tangency points. + if (CGAL::sign(cv.r()) == ZERO) return 0; - bool finite_at_x = (points_at_x(p_mid, ps) > 0); - bool finite_at_y = (points_at_y(p_mid, ps) > 0); + // We are interested in the y coordinates were the quadratic equation: + // r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0 + // has a single solution (obviously if r = 0, there are no such points). + // We therefore demand that the discriminant of this equation is zero: + // (t*y + u)^2 - 4*r*(s*y^2 + v*y + w) = 0 + const Integer two(2); + const Integer four(4); + Algebraic ys[2]; + + auto r = cv.r(); + auto s = cv.s(); + auto t = cv.t(); + auto u = cv.u(); + auto v = cv.v(); + auto w = cv.w(); + Algebraic* ys_end = nt_traits.solve_quadratic_equation(t*t - four*r*s, + two*t*u - four*r*v, + u*u - four*r*w, + ys); + auto n = static_cast(ys_end - ys); - if (! finite_at_x && ! finite_at_y) - { - _info = 0; // Invalid arc. - return; - } - } - } + // Compute the x coordinates and construct the horizontal tangency points. + for (int i = 0; i < n; ++i) { + // Having computed y, x is the single solution to the quadratic equation + // above, and since its discriminant is 0, x is simply given by: + Algebraic x = -(nt_traits.convert(t)*ys[i] + nt_traits.convert(u)) / + nt_traits.convert(two*r); + ps[i] = Point_2(x, ys[i]); } - // Mark that this arc valid and is not a full conic curve. - _info = IS_VALID; - - return; + CGAL_assertion(n <= 2); + return n; } - /*! - * Set the properties of a conic arc that is really a full curve + /*! Set the properties of a conic arc that is really a full curve * (that is, an ellipse). * \param rat_coeffs A vector of size 6, storing the rational coefficients * of x^2, y^2, xy, x, y and the free coefficient resp. * \param comp_orient Should we compute the orientation of the given curve. */ - void _set_full (const Rational* rat_coeffs, - const bool& comp_orient) - { + CGAL_DEPRECATED + void _set_full(const Rational* rat_coeffs, const bool& comp_orient) { // Convert the coefficients vector to an equivalent vector of integer // coefficients. - Nt_traits nt_traits; - Integer int_coeffs[6]; + Nt_traits nt_traits; + Integer int_coeffs[6]; - nt_traits.convert_coefficients (rat_coeffs, rat_coeffs + 6, - int_coeffs); + nt_traits.convert_coefficients(rat_coeffs, rat_coeffs + 6, int_coeffs); // Check the orientation of conic curve, and negate the conic coefficients // if its given orientation. - typename Rat_kernel::Conic_2 temp_conic (rat_coeffs[0], rat_coeffs[1], - rat_coeffs[2], rat_coeffs[3], - rat_coeffs[4], rat_coeffs[5]); - const Orientation temp_orient = temp_conic.orientation(); - - if (comp_orient) - _orient = temp_orient; - - if (_orient == temp_orient) - { - _r = int_coeffs[0]; - _s = int_coeffs[1]; - _t = int_coeffs[2]; - _u = int_coeffs[3]; - _v = int_coeffs[4]; - _w = int_coeffs[5]; + typename Rat_kernel::Conic_2 temp_conic(rat_coeffs[0], rat_coeffs[1], + rat_coeffs[2], rat_coeffs[3], + rat_coeffs[4], rat_coeffs[5]); + const Orientation temp_orient = temp_conic.orientation(); + + if (comp_orient) set_orientation(temp_orient); + + if (orientation() == temp_orient) { + m_r = int_coeffs[0]; + m_s = int_coeffs[1]; + m_t = int_coeffs[2]; + m_u = int_coeffs[3]; + m_v = int_coeffs[4]; + m_w = int_coeffs[5]; } - else - { - _r = -int_coeffs[0]; - _s = -int_coeffs[1]; - _t = -int_coeffs[2]; - _u = -int_coeffs[3]; - _v = -int_coeffs[4]; - _w = -int_coeffs[5]; + else { + m_r = -int_coeffs[0]; + m_s = -int_coeffs[1]; + m_t = -int_coeffs[2]; + m_u = -int_coeffs[3]; + m_v = -int_coeffs[4]; + m_w = -int_coeffs[5]; } // Make sure the conic is a non-degenerate ellipse: // The coefficients should satisfy (4rs - t^2) > 0. - const bool is_ellipse = (CGAL::sign (4*_r*_s - _t*_t) == POSITIVE); - CGAL_assertion (is_ellipse); - - // We do not have to store any extra data with the arc. - _extra_data_P = nullptr; + const bool is_ellipse = (CGAL::sign(4*m_r*m_s - m_t*m_t) == POSITIVE); + CGAL_assertion(is_ellipse); // Mark that this arc is a full conic curve. - if (is_ellipse) - _info = IS_VALID | IS_FULL_CONIC; - else - _info = 0; + if (is_ellipse) { + set_flag(IS_VALID); + set_flag(IS_FULL_CONIC); + } + else reset_flags(); // inavlid arc + } - return; + /*! Check whether the given point lies on the supporting conic of the arc. + * \param p The query point. + * \return (true) if p lies on the supporting conic; (false) otherwise. + */ + CGAL_DEPRECATED bool _is_on_supporting_conic(const Point_2& p) const { + // Check whether p satisfies the conic equation. + // The point must satisfy: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0. + Nt_traits nt_traits; + const Algebraic val = + (nt_traits.convert(m_r)*p.x() + + nt_traits.convert(m_t)*p.y() + + nt_traits.convert(m_u)) * p.x() + + (nt_traits.convert(m_s)*p.y() + + nt_traits.convert(m_v)) * p.y() + + nt_traits.convert(m_w); + + return (CGAL::sign(val) == ZERO); } - /*! - * Build the data for hyperbolic arc, contaning the characterization of the + /*! Build the data for hyperbolic arc, contaning the characterization of the * hyperbolic branch the arc is placed on. */ - void _build_hyperbolic_arc_data () - { + CGAL_DEPRECATED void _build_hyperbolic_arc_data() { // Let phi be the rotation angle of the conic from its canonic form. // We can write: // @@ -1387,51 +1108,47 @@ class _Conic_arc_2 // cos(2*phi) = ----------------------- // sqrt((r - s)^2 + t^2) // - Nt_traits nt_traits; - const int or_fact = (_orient == CLOCKWISE) ? -1 : 1; - const Algebraic r = nt_traits.convert (or_fact * _r); - const Algebraic s = nt_traits.convert (or_fact * _s); - const Algebraic t = nt_traits.convert (or_fact * _t); - const Algebraic cos_2phi = (r - s) / nt_traits.sqrt((r-s)*(r-s) + t*t); - const Algebraic _zero = 0; - const Algebraic _one = 1; - const Algebraic _two = 2; - Algebraic sin_phi; - Algebraic cos_phi; + Nt_traits nt_traits; + const int or_fact = (m_orient == CLOCKWISE) ? -1 : 1; + const Algebraic r = nt_traits.convert(or_fact * m_r); + const Algebraic s = nt_traits.convert(or_fact * m_s); + const Algebraic t = nt_traits.convert(or_fact * m_t); + const Algebraic cos_2phi = (r - s) / nt_traits.sqrt((r-s)*(r-s) + t*t); + const Algebraic zero = 0; + const Algebraic one = 1; + const Algebraic two = 2; + Algebraic sin_phi; + Algebraic cos_phi; // Calculate sin(phi) and cos(phi) according to the half-angle formulae: // // sin(phi)^2 = 0.5 * (1 - cos(2*phi)) // cos(phi)^2 = 0.5 * (1 + cos(2*phi)) - Sign sign_t = CGAL::sign (t); + Sign sign_t = CGAL::sign(t); - if (sign_t == ZERO) - { + if (sign_t == ZERO) { // sin(2*phi) == 0, so phi = 0 or phi = PI/2 - if (CGAL::sign (cos_2phi) == POSITIVE) - { + if (CGAL::sign(cos_2phi) == POSITIVE) { // phi = 0. - sin_phi = _zero; - cos_phi = _one; + sin_phi = zero; + cos_phi = one; } - else - { + else { // phi = PI/2. - sin_phi = _one; - cos_phi = _zero; + sin_phi = one; + cos_phi = zero; } } - else if (sign_t == POSITIVE) - { + else if (sign_t == POSITIVE) { // sin(2*phi) > 0 so 0 < phi < PI/2. - sin_phi = nt_traits.sqrt((_one + cos_2phi) / _two); - cos_phi = nt_traits.sqrt((_one - cos_2phi) / _two); + sin_phi = nt_traits.sqrt((one + cos_2phi) / two); + cos_phi = nt_traits.sqrt((one - cos_2phi) / two); } else { // sin(2*phi) < 0 so PI/2 < phi < PI. - sin_phi = nt_traits.sqrt((_one + cos_2phi) / _two); - cos_phi = -nt_traits.sqrt((_one - cos_2phi) / _two); + sin_phi = nt_traits.sqrt((one + cos_2phi) / two); + cos_phi = -nt_traits.sqrt((one - cos_2phi) / two); } // Calculate the center (x0, y0) of the conic, given by the formulae: @@ -1441,15 +1158,15 @@ class _Conic_arc_2 // 4*r*s - t^2 4*r*s - t^2 // // The denominator (4*r*s - t^2) must be negative for hyperbolas. - const Algebraic u = nt_traits.convert (or_fact * _u); - const Algebraic v = nt_traits.convert (or_fact * _v); - const Algebraic det = 4*r*s - t*t; - Algebraic x0, y0; + const Algebraic u = nt_traits.convert(or_fact * m_u); + const Algebraic v = nt_traits.convert(or_fact * m_v); + const Algebraic det = 4*r*s - t*t; + Algebraic x0, y0; - CGAL_assertion (CGAL::sign (det) == NEGATIVE); + CGAL_assertion (CGAL::sign(det) == NEGATIVE); - x0 = (t*v - _two*s*u) / det; - y0 = (t*u - _two*r*v) / det; + x0 = (t*v - two*s*u) / det; + y0 = (t*u - two*r*v) / det; // The axis separating the two branches of the hyperbola is now given by: // @@ -1457,407 +1174,529 @@ class _Conic_arc_2 // // We store the equation of this line in the extra data structure and also // the sign (side of half-plane) our arc occupies with respect to the line. - _extra_data_P = new Extra_data; + m_extra_data = new Extra_data; - _extra_data_P->a = cos_phi; - _extra_data_P->b = sin_phi; - _extra_data_P->c = - (cos_phi*x0 + sin_phi*y0); + m_extra_data->a = cos_phi; + m_extra_data->b = sin_phi; + m_extra_data->c = - (cos_phi*x0 + sin_phi*y0); // Make sure that the two endpoints are located on the same branch // of the hyperbola. - _extra_data_P->side = _sign_of_extra_data (_source.x(), _source.y()); - - CGAL_assertion (_extra_data_P->side != ZERO); - CGAL_assertion (_extra_data_P->side == _sign_of_extra_data(_target.x(), - _target.y())); + m_extra_data->side = sign_of_extra_data(m_source.x(), m_source.y()); - return; + CGAL_assertion(m_extra_data->side != ZERO); + CGAL_assertion(m_extra_data->side == + sign_of_extra_data(m_target.x(), m_target.y())); } - //@} - -protected: - - /// \name Auxiliary functions. - //@{ - /*! - * Evaluate the sign of (a*x + b*y + c) stored with the extra data field - * at a given point. - * \param px The x-coordinate of query point. - * \param py The y-coordinate of query point. - * \return The sign of (a*x + b*y + c). + /*! Check whether the given point is between the source and the target. + * The point is assumed to be on the conic's boundary. + * \param p The query point. + * \return (true) if the point is between the two endpoints, + * (false) if it is not. */ - Sign _sign_of_extra_data (const Algebraic& px, - const Algebraic& py) const - { - CGAL_assertion (_extra_data_P != nullptr); + CGAL_DEPRECATED bool _is_between_endpoints(const Point_2& p) const { + CGAL_precondition(! is_full_conic()); - if (_extra_data_P == nullptr) - return (ZERO); - - Algebraic val = (_extra_data_P->a*px + _extra_data_P->b*py + - _extra_data_P->c); - - return (CGAL::sign (val)); + // Check if p is one of the endpoints. + Alg_kernel ker; + if (ker.equal_2_object()(p, m_source) || + ker.equal_2_object()(p, m_target)) + return true; + else return _is_strictly_between_endpoints(p); } - /*! - * Check whether the given point lies on the supporting conic of the arc. - * \param p The query point. - * \return (true) if p lies on the supporting conic; (false) otherwise. + /*! Find the y coordinates of the underlying conic at a given x coordinate. + * \param x The x coordinate. + * \param ys The output y coordinates. + * \pre The vector ys must be allocated at the size of 2. + * \return The number of y coordinates computed (either 0, 1 or 2). */ - bool _is_on_supporting_conic (const Point_2& p) const - { - // Check whether p satisfies the conic equation. - // The point must satisfy: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0. - Nt_traits nt_traits; - const Algebraic val = (nt_traits.convert(_r)*p.x() + - nt_traits.convert(_t)*p.y() + - nt_traits.convert(_u)) * p.x() + - (nt_traits.convert(_s)*p.y() + - nt_traits.convert(_v)) * p.y() + - nt_traits.convert(_w); - - return (CGAL::sign (val) == ZERO); + CGAL_DEPRECATED + int _conic_get_y_coordinates(const Algebraic& x, Algebraic* ys) const { + // Solve the quadratic equation for a given x and find the y values: + // s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0 + Nt_traits nt_traits; + Algebraic A = nt_traits.convert(m_s); + Algebraic B = nt_traits.convert(m_t)*x + nt_traits.convert(m_v); + Algebraic C = (nt_traits.convert(m_r)*x + + nt_traits.convert(m_u))*x + nt_traits.convert(m_w); + return (_solve_quadratic_equation(A, B, C, ys[0], ys[1])); } - /*! - * Check whether the given point is between the source and the target. - * The point is assumed to be on the conic's boundary. - * \param p The query point. - * \return (true) if the point is between the two endpoints, - * (false) if it is not. + /*! Find all points on the arc with a given x-coordinate. + * \param p A placeholder for the x-coordinate. + * \param ps The point on the arc at x(p). + * \pre The vector ps should be allocated at the size of 2. + * \return The number of points found. */ - bool _is_between_endpoints (const Point_2& p) const - { - CGAL_precondition (! is_full_conic()); + CGAL_DEPRECATED int _points_at_x(const Point_2& p, Point_2* ps) const { + // Get the y coordinates of the points on the conic. + Algebraic ys[2]; + int n = _conic_get_y_coordinates(p.x(), ys); - // Check if p is one of the endpoints. - Alg_kernel ker; + // Find all the points that are contained in the arc. + int m(0); - if (ker.equal_2_object() (p, _source) || - ker.equal_2_object() (p, _target)) - { - return (true); - } - else - { - return (_is_strictly_between_endpoints(p)); + for (int i = 0; i < n; ++i) { + ps[m] = Point_2 (p.x(), ys[i]); + if (is_full_conic() || _is_between_endpoints(ps[m])) ++m; } + + // Return the number of points on the arc. + CGAL_assertion(m <= 2); + return m; } - /*! - * Check whether the given point is strictly between the source and the - * target (but not any of them). - * The point is assumed to be on the conic's boundary. - * \param p The query point. - * \return (true) if the point is strictly between the two endpoints, - * (false) if it is not. + /*! Solve the given quadratic equation: Ax^2 + B*x + C = 0. + * \param x_minus The root obtained from taking -sqrt(discriminant). + * \param x_plus The root obtained from taking -sqrt(discriminant). + * \return The number of disticnt solutions to the equation. */ - bool _is_strictly_between_endpoints (const Point_2& p) const - { - // In case this is a full conic, any point on its boundary is between - // its end points. - if (is_full_conic()) - return (true); + CGAL_DEPRECATED int _solve_quadratic_equation(const Algebraic& A, + const Algebraic& B, + const Algebraic& C, + Algebraic& x_minus, + Algebraic& x_plus) const { + // Check if we actually have a linear equation. + if (CGAL::sign(A) == ZERO) { + if (CGAL::sign(B) == ZERO) return (0); + x_minus = x_plus = -C / B; + return 1; + } - // Check if we have extra data available. - if (_extra_data_P != nullptr) - { - if (_extra_data_P->side != ZERO) - { - // In case of a hyperbolic arc, make sure the point is located on the - // same branch as the arc. - if (_sign_of_extra_data(p.x(), p.y()) != _extra_data_P->side) - return (false); - } - else - { - // In case we have a segment of a line pair, make sure that p really - // satisfies the equation of the line. - if (_sign_of_extra_data(p.x(), p.y()) != ZERO) - return (false); - } + // Compute the discriminant and act according to its sign. + const Algebraic disc = B*B - 4*A*C; + Sign sign_disc = CGAL::sign(disc); + + if (sign_disc == NEGATIVE) { + // No real-valued solutions: + return 0; + } + else if (sign_disc == ZERO) { + // One distinct solution: + x_minus = x_plus = -B / (2*A); + return 1; } - // Act according to the conic degree. - Alg_kernel ker; + // Compute the two distinct solutions: + Algebraic _2A = 2*A; + Nt_traits nt_traits; + Algebraic sqrt_disc = nt_traits.sqrt (disc); - if (_orient == COLLINEAR) - { - Comparison_result res1; - Comparison_result res2; + x_minus = -(B + sqrt_disc) / _2A; + x_plus = (sqrt_disc - B) / _2A; + return 2; + } - if (ker.compare_x_2_object() (_source, _target) == EQUAL) - { - // In case of a vertical segment - just check whether the y coordinate - // of p is between those of the source's and of the target's. - res1 = ker.compare_y_2_object() (p, _source); - res2 = ker.compare_y_2_object() (p, _target); - } - else - { - // Otherwise, since the segment is x-monotone, just check whether the - // x coordinate of p is between those of the source's and of the - // target's. - res1 = ker.compare_x_2_object() (p, _source); - res2 = ker.compare_x_2_object() (p, _target); - } + /*! Find the x coordinates of the underlying conic at a given y coordinate. + * \param y The y coordinate. + * \param xs The output x coordinates. + * \pre The vector xs must be allocated at the size of 2. + * \return The number of x coordinates computed (either 0, 1 or 2). + */ + CGAL_DEPRECATED + int _conic_get_x_coordinates(const Algebraic& y, Algebraic* xs) const { + // Solve the quadratic equation for a given y and find the x values: + // r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0 + Nt_traits nt_traits; + Algebraic A = nt_traits.convert(m_r); + Algebraic B = nt_traits.convert(m_t)*y + nt_traits.convert(m_u); + Algebraic C = (nt_traits.convert(m_s)*y + + nt_traits.convert(m_v))*y + nt_traits.convert(m_w); - // If p is not in the (open) x-range (or y-range) of the segment, it - // cannot be contained in the segment. - if (res1 == EQUAL || res2 == EQUAL || res1 == res2) - return (false); + return (_solve_quadratic_equation(A, B, C, xs[0], xs[1])); + } - // Perform an orientation test: This is crucial for segment of line - // pairs, as we want to make sure that p lies on the same line as the - // source and the target. - return (ker.orientation_2_object()(_source, p, _target) == COLLINEAR); - } - else - { - // In case of a conic of degree 2, make a decision based on the conic's - // orientation and whether (source,p,target) is a right or a left turn. - if (_orient == COUNTERCLOCKWISE) - return (ker.orientation_2_object()(_source, p, _target) == LEFT_TURN); - else - return (ker.orientation_2_object()(_source, p, _target) == RIGHT_TURN); + /*! Find all points on the arc with a given y-coordinate. + * \param p A placeholder for the y-coordinate. + * \param ps The point on the arc at x(p). + * \pre The vector ps should be allocated at the size of 2. + * \return The number of points found. + */ + CGAL_DEPRECATED int _points_at_y(const Point_2& p, Point_2* ps) const { + // Get the y coordinates of the points on the conic. + Algebraic xs[2]; + int n = _conic_get_x_coordinates(p.y(), xs); + + // Find all the points that are contained in the arc. + int m(0); + + for (int i = 0; i < n; ++i) { + ps[m] = Point_2 (xs[i], p.y()); + if (is_full_conic() || _is_between_endpoints(ps[m])) ++m; } + + // Return the number of points on the arc. + CGAL_assertion(m <= 2); + return m; } - /*! - * Find the vertical tangency points of the undelying conic. - * \param ps The output points of vertical tangency. - * This area must be allocated at the size of 2. - * \return The number of vertical tangency points. + /*! Set the properties of a conic arc (for the usage of the constructors). + * \param rat_coeffs A vector of size 6, storing the rational coefficients + * of x^2, y^2, xy, x, y and the free coefficient resp. */ - int _conic_vertical_tangency_points (Point_2* ps) const - { - // In case the base conic is of degree 1 (and not 2), the arc has no - // vertical tangency points. - if (CGAL::sign (_s) == ZERO) - return (0); + CGAL_DEPRECATED void _set(const Rational* rat_coeffs) { + set_flag(IS_VALID); + Nt_traits nt_traits; - // We are interested in the x coordinates where the quadratic equation: - // s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0 - // has a single solution (obviously if s = 0, there are no such points). - // We therefore demand that the discriminant of this equation is zero: - // (t*x + v)^2 - 4*s*(r*x^2 + u*x + w) = 0 - const Integer _two = 2; - const Integer _four = 4; - Algebraic xs[2]; - Algebraic *xs_end; - int n_xs; - Nt_traits nt_traits; - - xs_end = nt_traits.solve_quadratic_equation (_t*_t - _four*_r*_s, - _two*_t*_v - _four*_s*_u, - _v*_v - _four*_s*_w, - xs); - n_xs = static_cast(xs_end - xs); + // Convert the coefficients vector to an equivalent vector of integer + // coefficients. + Integer int_coeffs[6]; + nt_traits.convert_coefficients(rat_coeffs, rat_coeffs + 6, int_coeffs); - // Find the y-coordinates of the vertical tangency points. - Algebraic ys[2]; - Algebraic *ys_end; - int n_ys; + // Check the orientation of conic curve, and negate the conic coefficients + // if its given orientation. + typename Rat_kernel::Conic_2 temp_conic(rat_coeffs[0], rat_coeffs[1], + rat_coeffs[2], rat_coeffs[3], + rat_coeffs[4], rat_coeffs[5]); + + if (orientation() == temp_conic.orientation()) { + m_r = int_coeffs[0]; + m_s = int_coeffs[1]; + m_t = int_coeffs[2]; + m_u = int_coeffs[3]; + m_v = int_coeffs[4]; + m_w = int_coeffs[5]; + } + else { + m_r = -int_coeffs[0]; + m_s = -int_coeffs[1]; + m_t = -int_coeffs[2]; + m_u = -int_coeffs[3]; + m_v = -int_coeffs[4]; + m_w = -int_coeffs[5]; + } - if (CGAL::sign (_t) == ZERO) + // Make sure both endpoint lie on the supporting conic. + if (! _is_on_supporting_conic(m_source) || + ! _is_on_supporting_conic(m_target)) { - // The two vertical tangency points have the same y coordinate: - ys[0] = nt_traits.convert (-_v) /nt_traits.convert (_two*_s); - n_ys = 1; + reset_flags(); // inavlid arc + return; } - else + + // Check whether we have a degree 2 curve. + if ((CGAL::sign(m_r) != ZERO) || (CGAL::sign(m_s) != ZERO) || + (CGAL::sign(m_t) != ZERO)) { - ys_end = - nt_traits.solve_quadratic_equation (_four*_r*_s*_s - _s*_t*_t, - _four*_r*_s*_v - _two*_s*_t*_u, - _r*_v*_v - _t*_u*_v + _t*_t*_w, - ys); - n_ys = static_cast(ys_end - ys); - } + if (orientation() == COLLINEAR) { + // Make sure the midpoint is on the line pair (thus making sure that + // the two points are not taken from different lines). + Alg_kernel ker; + auto ctr_mid_point = ker.construct_midpoint_2_object(); + Point_2 p_mid = ctr_mid_point(m_source, m_target); + // if (! is_on_supporting_conic(arc, p_mid)) + if (CGAL::sign((nt_traits.convert(m_r)*p_mid.x() + + nt_traits.convert(m_t)*p_mid.y() + + nt_traits.convert(m_u)) * p_mid.x() + + (nt_traits.convert(m_s)*p_mid.y() + + nt_traits.convert(m_v)) * p_mid.y() + + nt_traits.convert(m_w)) != ZERO) + { + reset_flags(); // inavlid arc + return; + } - // Pair the x and y coordinates and obtain the vertical tangency points. - int n = 0; - int i, j; + // We have a segment of a line pair with rational coefficients. + // Compose the equation of the underlying line + // (with algebraic coefficients). + const Algebraic& x1 = m_source.x(); + const Algebraic& y1 = m_source.y(); + const Algebraic& x2 = m_target.x(); + const Algebraic& y2 = m_target.y(); - for (i = 0; i < n_xs; i++) - { - if (n_ys == 1) - { - ps[n] = Point_2 (xs[i], ys[0]); - n++; + // The supporting line is A*x + B*y + C = 0, where: + // + // A = y2 - y1, B = x1 - x2, C = x2*y1 - x1*y2 + // + // We use the extra dat field to store the equation of this line. + m_extra_data = new Extra_data; + m_extra_data->a = y2 - y1; + m_extra_data->b = x1 - x2; + m_extra_data->c = x2*y1 - x1*y2; + m_extra_data->side = ZERO; } - else - { - for (j = 0; j < n_ys; j++) - { - if (CGAL::compare (nt_traits.convert(_two*_s) * ys[j], - -(nt_traits.convert(_t) * xs[i] + - nt_traits.convert(_v))) == EQUAL) - { - ps[n] = Point_2 (xs[i], ys[j]); - n++; - break; + else { + // The sign of (4rs - t^2) detetmines the conic type: + // - if it is possitive, the conic is an ellipse, + // - if it is negative, the conic is a hyperbola, + // - if it is zero, the conic is a parabola. + CGAL::Sign sign_conic = CGAL::sign(4*m_r*m_s - m_t*m_t); + + // Build the extra hyperbolic data if necessary + if (sign_conic == NEGATIVE) _build_hyperbolic_arc_data(); + + if (sign_conic != POSITIVE) { + // In case of a non-degenerate parabola or a hyperbola, make sure + // the arc is not infinite. + Alg_kernel ker; + Point_2 p_mid = ker.construct_midpoint_2_object()(m_source, m_target); + Point_2 ps[2]; + + bool finite_at_x = (_points_at_x(p_mid, ps) > 0); + bool finite_at_y = (_points_at_y(p_mid, ps) > 0); + + if (! finite_at_x && ! finite_at_y) { + reset_flags(); // inavlid arc + return; } } } } - CGAL_assertion (n <= 2); - return (n); + + set_flag(IS_VALID); // arc is valid + reset_flag(IS_FULL_CONIC); // not a full conic } - /*! - * Find the horizontal tangency points of the undelying conic. - * \param ps The output points of horizontal tangency. - * This area must be allocated at the size of 2. - * \return The number of horizontal tangency points. +public: + /// \name Construction and destruction functions. + //@{ + + /*! Default constructor. + */ + Conic_arc_2() : + m_r(0), m_s(0), m_t(0), m_u(0), m_v(0), m_w(0), + m_orient(COLLINEAR), + m_info(0), + m_extra_data(nullptr) + {} + + /*! Copy constructor. + * \param arc The copied arc. */ - int _conic_horizontal_tangency_points (Point_2* ps) const + Conic_arc_2(const Self& arc) : + m_r(arc.m_r), m_s(arc.m_s), m_t(arc.m_t), + m_u(arc.m_u), m_v(arc.m_v), m_w(arc.m_w), + m_orient(arc.m_orient), + m_info(arc.m_info), + m_source(arc.m_source), + m_target(arc.m_target) { - const Integer _zero = 0; + m_extra_data = (arc.m_extra_data != nullptr) ? + new Extra_data(*(arc.m_extra_data)) : nullptr; + } - // In case the base conic is of degree 1 (and not 2), the arc has no - // vertical tangency points. - if (CGAL::sign (_r) == ZERO) - return (0); + /*! Destructor. + */ + virtual ~Conic_arc_2() { if (m_extra_data != nullptr) delete m_extra_data; } - // We are interested in the y coordinates were the quadratic equation: - // r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0 - // has a single solution (obviously if r = 0, there are no such points). - // We therefore demand that the discriminant of this equation is zero: - // (t*y + u)^2 - 4*r*(s*y^2 + v*y + w) = 0 - const Integer _two = 2; - const Integer _four = 4; - int n; - Algebraic ys[2]; - Algebraic *ys_end; - Nt_traits nt_traits; - - ys_end = nt_traits.solve_quadratic_equation (_t*_t - _four*_r*_s, - _two*_t*_u - _four*_r*_v, - _u*_u - _four*_r*_w, - ys); - n = static_cast(ys_end - ys); + /*! Assignment operator. + * \param arc The copied arc. + */ + const Self& operator=(const Self& arc) { + if (this == &arc) return (*this); - // Compute the x coordinates and construct the horizontal tangency points. - Algebraic x; - int i; + // Free any existing data. + if (m_extra_data != nullptr) delete m_extra_data; - for (i = 0; i < n; i++) - { - // Having computed y, x is the single solution to the quadratic equation - // above, and since its discriminant is 0, x is simply given by: - x = -(nt_traits.convert(_t)*ys[i] + nt_traits.convert(_u)) / - nt_traits.convert(_two*_r); + // Copy the arc's attributes. + m_r = arc.m_r; + m_s = arc.m_s; + m_t = arc.m_t; + m_u = arc.m_u; + m_v = arc.m_v; + m_w = arc.m_w; + + m_orient = arc.m_orient; + m_info = arc.m_info; + m_source = arc.m_source; + m_target = arc.m_target; - ps[i] = Point_2 (x, ys[i]); - } + // Duplicate the extra data, if necessary. + m_extra_data = (arc.m_extra_data != nullptr) ? + new Extra_data(*(arc.m_extra_data)) : nullptr; - CGAL_assertion (n <= 2); - return (n); + return (*this); } + //@} - /*! - * Find the y coordinates of the underlying conic at a given x coordinate. - * \param x The x coordinate. - * \param ys The output y coordinates. - * \pre The vector ys must be allocated at the size of 2. - * \return The number of y coordinates computed (either 0, 1 or 2). + /// \name Get the arc properties. + //@{ + + /*! Determine wheather the arc is valid. */ - int _conic_get_y_coordinates (const Algebraic& x, - Algebraic *ys) const - { - // Solve the quadratic equation for a given x and find the y values: - // s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0 - Nt_traits nt_traits; - Algebraic A = nt_traits.convert(_s); - Algebraic B = nt_traits.convert(_t)*x + nt_traits.convert(_v); - Algebraic C = (nt_traits.convert(_r)*x + - nt_traits.convert(_u))*x + nt_traits.convert(_w); + bool is_valid() const { return test_flag(IS_VALID); } - return (_solve_quadratic_equation (A, B, C, ys[0], ys[1])); + /*! Determine whether the arc represents a full conic curve. + */ + bool is_full_conic() const { return test_flag(IS_FULL_CONIC); } + + /*! Obtain the coefficients of the underlying conic. + */ + const Integer& r() const { return (m_r); } + const Integer& s() const { return (m_s); } + const Integer& t() const { return (m_t); } + const Integer& u() const { return (m_u); } + const Integer& v() const { return (m_v); } + const Integer& w() const { return (m_w); } + + /*! Obtain the arc's source. + * \return The source point. + * \pre The arc does not represent a full conic curve. + */ + const Point_2& source() const { + CGAL_precondition(! is_full_conic()); + return m_source; } - /*! - * Find the x coordinates of the underlying conic at a given y coordinate. - * \param y The y coordinate. - * \param xs The output x coordinates. - * \pre The vector xs must be allocated at the size of 2. - * \return The number of x coordinates computed (either 0, 1 or 2). + /*! Obtain the non const reference to the curve source point. */ - int _conic_get_x_coordinates (const Algebraic& y, - Algebraic *xs) const - { - // Solve the quadratic equation for a given y and find the x values: - // r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0 - Nt_traits nt_traits; - Algebraic A = nt_traits.convert(_r); - Algebraic B = nt_traits.convert(_t)*y + nt_traits.convert(_u); - Algebraic C = (nt_traits.convert(_s)*y + - nt_traits.convert(_v))*y + nt_traits.convert(_w); + Point_2& source() { + CGAL_precondition(! is_full_conic()); + return (this->m_source); + } - return (_solve_quadratic_equation (A, B, C, xs[0], xs[1])); + /*! Obtain the arc's target. + * \return The target point. + * \pre The arc does not represent a full conic curve. + */ + const Point_2& target() const { + CGAL_precondition(! is_full_conic()); + return m_target; } - /*! - * Solve the given quadratic equation: Ax^2 + B*x + C = 0. - * \param x_minus The root obtained from taking -sqrt(discriminant). - * \param x_plus The root obtained from taking -sqrt(discriminant). - * \return The number of disticnt solutions to the equation. + /*! Obtain the non const reference to the curve source point. */ - int _solve_quadratic_equation (const Algebraic& A, - const Algebraic& B, - const Algebraic& C, - Algebraic& x_minus, Algebraic& x_plus) const - { - // Check if we actually have a linear equation. - if (CGAL::sign(A) == ZERO) - { - if (CGAL::sign(B) == ZERO) - return (0); + Point_2& target() { + CGAL_precondition(! is_full_conic()); + return this->m_target; + } - x_minus = x_plus = -C / B; - return (1); - } + /*! Obtain the orientation of the arc. + * \return The orientation. + */ + Orientation orientation() const { return m_orient; } - // Compute the discriminant and act according to its sign. - const Algebraic disc = B*B - 4*A*C; - Sign sign_disc = CGAL::sign (disc); + /*! Obtain the extra data. + */ + const Extra_data* extra_data() const { return m_extra_data; } + //@} - if (sign_disc == NEGATIVE) - { - // No real-valued solutions: - return (0); - } - else if (sign_disc == ZERO) - { - // One distinct solution: - x_minus = x_plus = -B / (2*A); - return (1); - } +protected: + template friend class Arr_conic_traits_2; - // Compute the two distinct solutions: - Algebraic _2A = 2*A; - Nt_traits nt_traits; - Algebraic sqrt_disc = nt_traits.sqrt (disc); + /// \name Flag manipulation functions. + //@{ + template + static constexpr auto flag_mask(const T flag) { return 0x1 << flag; } - x_minus = -(B + sqrt_disc) / _2A; - x_plus = (sqrt_disc - B) / _2A; - return (2); + void reset_flags() { m_info = 0; } + + template + void set_flag(const T flag) { m_info |= flag_mask(flag); } + + template + void reset_flag(const T flag) { m_info &= ~flag_mask(flag); } + + template + void flip_flag(const T flag) { m_info ^= flag_mask(flag);} + + template + bool test_flag(const T flag) const + { return (m_info & flag_mask(flag)); } + //@} + +public: + /// \name Modifying functions (setters); + // only friends have the priviledge to use. + //@{ + + /*! Set the source point of the conic arc. + * \param ps The new source point. + */ + void set_source(const Point_2& ps) { m_source = ps; } + + /*! Set the target point of the conic arc. + * \param pt The new source point. + */ + void set_target(const Point_2& pt) { m_target = pt; } + + /*! Set the coefficients. + */ + void set_coefficients(Integer r, Integer s, Integer t, + Integer u, Integer v, Integer w) { + m_r = r; + m_s = s; + m_t = t; + m_u = u; + m_v = v; + m_w = w; + } + + /*! Set the orientation. + */ + void set_orientation(Orientation orient) { m_orient = orient; } + + /*! Set the endpoints. + */ + void set_endpoints(const Point_2& source, const Point_2& target) { + m_source = source; + m_target = target; + } + + /*! Set the extra data field. + */ + void set_extra_data(Extra_data* extra_data) { m_extra_data = extra_data; } + + /*! Set the extra data field. + */ + void set_extra_data(const Algebraic& a, const Algebraic& b, + const Algebraic& c, Sign side) + { + m_extra_data = new Extra_data; + m_extra_data->a = a; + m_extra_data->b = b; + m_extra_data->c = c; + m_extra_data->side = side; + } + + /*! Update the extra data field. + */ + void update_extra_data() { + const Algebraic x1 = source().x(); + const Algebraic y1 = source().y(); + const Algebraic x2 = target().x(); + const Algebraic y2 = target().y(); + + // The supporting line is A*x + B*y + C = 0, where: + // A = y2 - y1, B = x1 - x2, C = x2*y1 - x1*y2 + // We use the extra data field to store the equation of this line. + m_extra_data = new Extra_data; + m_extra_data->a = y2 - y1; + m_extra_data->b = x1 - x2; + m_extra_data->c = x2*y1 - x1*y2; + m_extra_data->side = ZERO; } //@} +public: + /// \name Auxiliary functions. + //@{ + + /*! Evaluate the sign of (a*x + b*y + c) stored with the extra data field + * at a given point. + * \param px The x-coordinate of query point. + * \param py The y-coordinate of query point. + * \return The sign of (a*x + b*y + c). + */ + Sign sign_of_extra_data(const Algebraic& px, const Algebraic& py) const { + CGAL_assertion(m_extra_data != nullptr); + if (m_extra_data == nullptr) return ZERO; + Algebraic val = m_extra_data->a*px + m_extra_data->b*py + m_extra_data->c; + return CGAL::sign(val); + } + + //@} }; -/*! - * Exporter for conic arcs. +/*! Exporter for conic arcs. */ -template +template std::ostream& operator<< (std::ostream& os, - const _Conic_arc_2 & arc) + const Conic_arc_2& arc) { os << "{" << CGAL::to_double(arc.r()) << "*x^2 + " << CGAL::to_double(arc.s()) << "*y^2 + " @@ -1866,27 +1705,20 @@ operator<< (std::ostream& os, << CGAL::to_double(arc.v()) << "*y + " << CGAL::to_double(arc.w()) << "}"; - if (arc.is_full_conic()) - { - os << " - Full curve"; - } - else - { + if (arc.is_full_conic()) os << " - Full curve"; + else { os << " : (" << CGAL::to_double(arc.source().x()) << "," << CGAL::to_double(arc.source().y()) << ") "; - if (arc.orientation() == CLOCKWISE) - os << "--cw-->"; - else if (arc.orientation() == COUNTERCLOCKWISE) - os << "--ccw-->"; - else - os << "--l-->"; + if (arc.orientation() == CLOCKWISE) os << "--cw-->"; + else if (arc.orientation() == COUNTERCLOCKWISE) os << "--ccw-->"; + else os << "--l-->"; os << " (" << CGAL::to_double(arc.target().x()) << "," << CGAL::to_double(arc.target().y()) << ")"; } - return (os); + return os; } } //namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_intersections_2.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_intersections_2.h index 83c056b5..edbb3079 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_intersections_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_intersections_2.h @@ -3,12 +3,12 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_intersections_2.h $ -// $Id: Conic_intersections_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_intersections_2.h $ +// $Id: include/CGAL/Arr_geometry_traits/Conic_intersections_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // -// Author(s) : Ron Wein +// Author(s): Ron Wein #ifndef CGAL_CONIC_INTERSECTIONS_2_H #define CGAL_CONIC_INTERSECTIONS_2_H @@ -24,8 +24,7 @@ namespace CGAL { -/*! - * Compute the roots of the resultants of the two bivariate polynomials: +/*! Compute the roots of the resultants of the two bivariate polynomials: * C1: r1*x^2 + s1*y^2 + t1*xy + u1*x + v1*y + w1 = 0 * C2: r2*x^2 + s2*y^2 + t2*xy + u2*x + v2*y + w2 = 0 * \param deg1 The degree of the first curve. @@ -35,84 +34,76 @@ namespace CGAL { * \pre xs must be a vector of size 4. * \return The number of distinct roots found. */ -template -int - _compute_resultant_roots (Nt_traits& nt_traits, - const typename Nt_traits::Integer& r1, - const typename Nt_traits::Integer& s1, - const typename Nt_traits::Integer& t1, - const typename Nt_traits::Integer& u1, - const typename Nt_traits::Integer& v1, - const typename Nt_traits::Integer& w1, - const int& deg1, - const typename Nt_traits::Integer& r2, - const typename Nt_traits::Integer& s2, - const typename Nt_traits::Integer& t2, - const typename Nt_traits::Integer& u2, - const typename Nt_traits::Integer& v2, - const typename Nt_traits::Integer& w2, - const int& deg2, - typename Nt_traits::Algebraic *xs) +template +int compute_resultant_roots(const Nt_traits& nt_traits, + const typename Nt_traits::Integer& r1, + const typename Nt_traits::Integer& s1, + const typename Nt_traits::Integer& t1, + const typename Nt_traits::Integer& u1, + const typename Nt_traits::Integer& v1, + const typename Nt_traits::Integer& w1, + const int& deg1, + const typename Nt_traits::Integer& r2, + const typename Nt_traits::Integer& s2, + const typename Nt_traits::Integer& t2, + const typename Nt_traits::Integer& u2, + const typename Nt_traits::Integer& v2, + const typename Nt_traits::Integer& w2, + const int& deg2, + typename Nt_traits::Algebraic* xs) { - if (deg1 == 2 && deg2 == 1) - { + if ((deg1 == 2) && (deg2 == 1)) { // If necessary, swap roles between the two curves, so that the first // curve always has the minimal degree. - return (_compute_resultant_roots (nt_traits, - r2, s2, t2, u2, v2, w2, - deg2, - r1, s1, t1, u1, v1, w1, - deg1, - xs)); + return (compute_resultant_roots(nt_traits, + r2, s2, t2, u2, v2, w2, + deg2, + r1, s1, t1, u1, v1, w1, + deg1, + xs)); } // Act according to the degree of the first conic curve. - const typename Nt_traits::Integer _two = 2; - typename Nt_traits::Integer c[5]; - unsigned int degree = 4; - typename Nt_traits::Algebraic *xs_end; + const typename Nt_traits::Integer two = 2; + typename Nt_traits::Integer c[5]; + unsigned int degree = 4; + typename Nt_traits::Algebraic* xs_end; - if (deg1 == 1) - { + if (deg1 == 1) { // The first curve has no quadratic coefficients, and represents a line. - if (CGAL::sign (v1) == ZERO) - { + if (CGAL::sign (v1) == ZERO) { // The first line is u1*x + w1 = 0, therefore: xs[0] = nt_traits.convert(-w1) / nt_traits.convert(u1); - return (1); + return 1; } // We can write the first curve as: y = -(u1*x + w1) / v1. - if (deg2 == 1) - { + if (deg2 == 1) { // The second curve is also a line. We therefore get the linear // equation c[1]*x + c[0] = 0: c[1] = v1*u2 - u1*v2; c[0] = v1*w2 - w1*v2; - if (CGAL::sign (c[1]) == ZERO) - // The two lines are parallel: - return (0); + // Return if the two lines are parallel + if (CGAL::sign (c[1]) == ZERO) return 0; - xs[0] = nt_traits.convert(-c[0]) / nt_traits.convert(c[1]); - return (1); + xs[0] = nt_traits.convert(-c[0]) / nt_traits.convert(c[1]); + return 1; } // We substitute this expression into the equation of the second // conic, and get the quadratic equation c[2]*x^2 + c[1]*x + c[0] = 0: c[2] = u1*u1*s2 - u1*v1*t2 + v1*v1*r2; - c[1] = _two*u1*w1*s2 - u1*v1*v2 - v1*w1*t2 + v1*v1*u2; + c[1] = two*u1*w1*s2 - u1*v1*v2 - v1*w1*t2 + v1*v1*u2; c[0] = w1*w1*s2 - v1*w1*v2 + v1*v1*w2; - xs_end = nt_traits.solve_quadratic_equation (c[2], c[1], c[0], - xs); + xs_end = nt_traits.solve_quadratic_equation(c[2], c[1], c[0], xs); return static_cast(xs_end - xs); } // At this stage, both curves have degree 2. We obtain a qaurtic polynomial // whose roots are the x-coordinates of the intersection points. - if (CGAL::sign (s1) == ZERO && CGAL::sign (s2) == ZERO) - { + if (CGAL::sign (s1) == ZERO && CGAL::sign (s2) == ZERO) { // If both s1 and s2 are zero, we can write the two curves as: // C1: (t1*x + v1)*y + (r1*x^2 + u1*x + w1) = 0 // C2: (t2*x + v2)*y + (r2*x^2 + u2*x + w2) = 0 @@ -125,50 +116,47 @@ int degree = 3; } - else - { + else { // We can write the two curves as: // C1: (s1)*y^2 + (t1*x + v1)*y + (r1*x^2 + u1*x + w1) = 0 // C2: (s2)*y^2 + (t2*x + v2)*y + (r2*x^2 + u2*x + w2) = 0 // By writing the resultant of these two polynomials we get a quartic // polynomial, whose coefficients are given by: - c[4] = -_two*s1*s2*r1*r2 + s1*t2*t2*r1 - s1*t2*t1*r2 + + c[4] = -two*s1*s2*r1*r2 + s1*t2*t2*r1 - s1*t2*t1*r2 + s1*s1*r2*r2 - s2*t1*r1*t2 + s2*t1*t1*r2 + s2*s2*r1*r1; c[3] = -t2*r1*v1*s2 - u2*t1*t2*s1 - v2*r1*t1*s2 - - r2*t1*v2*s1 - _two*s1*s2*r1*u2 - t2*u1*t1*s2 + u2*t1*t1*s2 - - r2*v1*t2*s1 + u1*t2*t2*s1 + _two*v2*r1*t2*s1 + _two*u2*r2*s1*s1 + - _two*r2*v1*t1*s2 + _two*u1*r1*s2*s2 - _two*s1*s2*u1*r2; + r2*t1*v2*s1 - two*s1*s2*r1*u2 - t2*u1*t1*s2 + u2*t1*t1*s2 - + r2*v1*t2*s1 + u1*t2*t2*s1 + two*v2*r1*t2*s1 + two*u2*r2*s1*s1 + + two*r2*v1*t1*s2 + two*u1*r1*s2*s2 - two*s1*s2*u1*r2; - c[2] = -r2*v1*v2*s1 + u2*u2*s1*s1 + _two*w2*r2*s1*s1 + - _two*u2*v1*t1*s2 - u2*v1*t2*s1 + w2*t1*t1*s2 - _two*s1*s2*u1*u2 - + c[2] = -r2*v1*v2*s1 + u2*u2*s1*s1 + two*w2*r2*s1*s1 + + two*u2*v1*t1*s2 - u2*v1*t2*s1 + w2*t1*t1*s2 - two*s1*s2*u1*u2 - w2*t1*t2*s1 + v2*v2*r1*s1 + u1*u1*s2*s2 - v2*r1*v1*s2 + - _two*w1*r1*s2*s2 - u2*t1*v2*s1 - t2*u1*v1*s2 - _two*s1*s2*r1*w2 - - _two*s1*s2*w1*r2 + r2*v1*v1*s2 + w1*t2*t2*s1 - v2*u1*t1*s2 - - t2*w1*t1*s2 + _two*v2*u1*t2*s1; + two*w1*r1*s2*s2 - u2*t1*v2*s1 - t2*u1*v1*s2 - two*s1*s2*r1*w2 - + two*s1*s2*w1*r2 + r2*v1*v1*s2 + w1*t2*t2*s1 - v2*u1*t1*s2 - + t2*w1*t1*s2 + two*v2*u1*t2*s1; - c[1] = _two*w2*u2*s1*s1 + _two*w2*v1*t1*s2 - w2*v1*t2*s1 + - _two*v2*w1*t2*s1 + _two*w1*u1*s2*s2 - v2*u1*v1*s2 - _two*s1*s2*u1*w2 - + c[1] = two*w2*u2*s1*s1 + two*w2*v1*t1*s2 - w2*v1*t2*s1 + + two*v2*w1*t2*s1 + two*w1*u1*s2*s2 - v2*u1*v1*s2 - two*s1*s2*u1*w2 - v2*w1*t1*s2 + u2*v1*v1*s2 - t2*w1*v1*s2 - w2*t1*v2*s1 + - v2*v2*u1*s1 - u2*v1*v2*s1 - _two*s1*s2*w1*u2; + v2*v2*u1*s1 - u2*v1*v2*s1 - two*s1*s2*w1*u2; c[0] = s2*v1*v1*w2 - s1*v2*v1*w2 - s2*v1*w1*v2 + s2*s2*w1*w1 - - _two*s1*s2*w1*w2 + s1*w1*v2*v2 + s1*s1*w2*w2; + two*s1*s2*w1*w2 + s1*w1*v2*v2 + s1*s1*w2*w2; degree = 4; } // Compute the roots of the resultant polynomial. - typename Nt_traits::Polynomial poly = - nt_traits.construct_polynomial (c, degree); + typename Nt_traits::Polynomial poly = + nt_traits.construct_polynomial(c, degree); - xs_end = nt_traits.compute_polynomial_roots (poly, - xs); + xs_end = nt_traits.compute_polynomial_roots(poly, xs); return static_cast(xs_end - xs); } -/*! - * Compute the roots of the resultants of the two bivariate polynomials: +/*! Compute the roots of the resultants of the two bivariate polynomials: * C1: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0 * C2: A*x + B*y + C = 0 * \param deg1 The degree of the first curve. @@ -177,55 +165,50 @@ int * \pre xs must be a vector of size 4. * \return The number of distinct roots found. */ -template -int -_compute_resultant_roots (Nt_traits& nt_traits, - const typename Nt_traits::Algebraic& r, - const typename Nt_traits::Algebraic& s, - const typename Nt_traits::Algebraic& t, - const typename Nt_traits::Algebraic& u, - const typename Nt_traits::Algebraic& v, - const typename Nt_traits::Algebraic& w, - const int& deg1, - const typename Nt_traits::Algebraic& A, - const typename Nt_traits::Algebraic& B, - const typename Nt_traits::Algebraic& C, - typename Nt_traits::Algebraic *xs) +template +int compute_resultant_roots(const Nt_traits& nt_traits, + const typename Nt_traits::Algebraic& r, + const typename Nt_traits::Algebraic& s, + const typename Nt_traits::Algebraic& t, + const typename Nt_traits::Algebraic& u, + const typename Nt_traits::Algebraic& v, + const typename Nt_traits::Algebraic& w, + const int& deg1, + const typename Nt_traits::Algebraic& A, + const typename Nt_traits::Algebraic& B, + const typename Nt_traits::Algebraic& C, + typename Nt_traits::Algebraic* xs) { - if (deg1 == 1) - { + if (deg1 == 1) { // We should actually compute the intersection of two line: // (u*x + v*y + w = 0) and (A*x + B*y + C = 0): - const typename Nt_traits::Algebraic denom = A*v - B*u; + const typename Nt_traits::Algebraic denom = A*v - B*u; - if (CGAL::sign (denom) == CGAL::ZERO) - // The two lines are parallel and do not intersect. - return (0); + // Return if the two lines are parallel and do not intersect. + if (CGAL::sign(denom) == CGAL::ZERO) return 0; xs[0] = (B*w - C*v) / denom; - return (1); + return 1; } - if (CGAL::sign (B) == CGAL::ZERO) - { + if (CGAL::sign(B) == CGAL::ZERO) { // The first line is A*x + C = 0, therefore: xs[0] = -C / A; - return (1); + return 1; } // We can write the first curve as: y = -(A*x + C) / B. // We substitute this expression into the equation of the conic, and get // the quadratic equation c[2]*x^2 + c[1]*x + c[0] = 0: - const typename Nt_traits::Algebraic _two = 2; - typename Nt_traits::Algebraic c[3]; - typename Nt_traits::Algebraic *xs_end; + const typename Nt_traits::Algebraic two = 2; + typename Nt_traits::Algebraic c[3]; + typename Nt_traits::Algebraic* xs_end; c[2] = A*A*s - A*B*t + B*B*r; - c[1] = _two*A*C*s - A*B*v - B*C*t + B*B*u; + c[1] = two*A*C*s - A*B*v - B*C*t + B*B*u; c[0] = C*C*s - B*C*v + B*B*w; - xs_end = nt_traits.solve_quadratic_equation (c[2], c[1], c[0], - xs); + xs_end = nt_traits.solve_quadratic_equation(c[2], c[1], c[0], xs); return static_cast(xs_end - xs); } diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_point_2.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_point_2.h index a2afd3aa..9512d964 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_point_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_point_2.h @@ -3,159 +3,110 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_point_2.h $ -// $Id: Conic_point_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_point_2.h $ +// $Id: include/CGAL/Arr_geometry_traits/Conic_point_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // -// Author(s) : Ron Wein +// Author(s): Ron Wein +// Efi Fogel #ifndef CGAL_CONIC_POINT_2_H #define CGAL_CONIC_POINT_2_H #include - /*! \file - * Header file for the _Conic_point_2 class. + * Header file for the Conic_point_2 class. */ #include + #include namespace CGAL { -/*! - * \class A class that stores additional information with the point's +/*! \class + * A class that stores additional information with the point's * coordinates, namely the conic IDs of the generating curves. */ -template -class _Conic_point_2 : public Alg_kernel_::Point_2 -{ +template +class Conic_point_2 : public AlgKernel::Point_2 { public: + typedef AlgKernel Alg_kernel; + typedef typename Alg_kernel::Point_2 Base; + typedef Conic_point_2 Self; - typedef Alg_kernel_ Alg_kernel; - typedef typename Alg_kernel::Point_2 Base; - typedef _Conic_point_2 Self; - - typedef typename Alg_kernel::FT Algebraic; + typedef typename Alg_kernel::FT Algebraic; /*! \class * Representation of an ID of a conic arc. */ - class Conic_id - { + class Conic_id { private: - - unsigned int index; // The index of the conic arc. + size_t index; // the index of the conic arc public: - /*! Default constructor. */ - Conic_id () : - index (0) - {} + Conic_id() : index(0) {} /*! Constructor. */ - Conic_id (unsigned int ind) : - index (ind) - { - CGAL_precondition (ind != 0); - } + Conic_id(size_t ind) : index(ind) { CGAL_precondition(ind != 0); } /*! Check if the ID is valid. */ - bool is_valid () const - { - return (index != 0); - } + bool is_valid() const { return (index != 0); } /*! Equality operator. */ - bool operator== (const Conic_id& id) const - { - return (index == id.index); - } + bool operator==(const Conic_id& id) const { return (index == id.index); } /*! Inequality operator. */ - bool operator!= (const Conic_id& id) const - { - return (index != id.index); - } + bool operator!=(const Conic_id& id) const { return (index != id.index); } /*! Less-than operator. */ - bool operator< (const Conic_id& id) const - { - return (index < id.index); - } + bool operator<(const Conic_id& id) const { return (index < id.index); } /*! Greater-than operator. */ - bool operator> (const Conic_id& id) const - { - return (index > id.index); - } + bool operator>(const Conic_id& id) const { return (index > id.index); } }; private: - typedef std::list Ids_container; typedef typename std::list::const_iterator Ids_iterator; - Ids_container conic_ids; // The IDs of the generating conics. - - public: + Ids_container conic_ids; // the IDs of the generating conics. +public: /// \name Constructors. //@{ /*! Default constructors. */ - _Conic_point_2 () : - Base() - {} + Conic_point_2() : Base() {} /*! Constrcutor from the base class. */ - _Conic_point_2 (const Base& p) : - Base (p) - {} + Conic_point_2(const Base& p) : Base(p) {} /*! Constructor with homegeneous coordinates. */ - _Conic_point_2 (const Algebraic& hx, - const Algebraic& hy, - const Algebraic& hz) : - Base (hx, hy, hz) + Conic_point_2(const Algebraic& hx, const Algebraic& hy, const Algebraic& hz) : + Base(hx, hy, hz) {} /*! Constructor with Cartesian coordinates. */ - _Conic_point_2 (const Algebraic& x, const Algebraic& y) : - Base (x, y) - {} + Conic_point_2(const Algebraic& x, const Algebraic& y) : Base(x, y) {} //@} /// \name Maintaining the generating conic IDs. //@{ /*! Add a generating conic ID. */ - void set_generating_conic (const Conic_id& id) - { - if (id.is_valid()) - conic_ids.push_back (id); - - return; - } + void set_generating_conic(const Conic_id& id) + { if (id.is_valid()) conic_ids.push_back(id); } /*! Check if the given conic generates the point. */ - bool is_generating_conic (const Conic_id& id) const - { - if (! id.is_valid()) - return (false); - - Ids_iterator it; - - for (it = conic_ids.begin(); it != conic_ids.end(); ++it) - { - if (*it == id) - return (true); - } - - return (false); + bool is_generating_conic(const Conic_id& id) const { + if (! id.is_valid()) return false; + for (auto it = conic_ids.begin(); it != conic_ids.end(); ++it) + if (*it == id) return true; + return false; } //@} diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h index 1971d0e9..830f636b 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h @@ -3,11 +3,12 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h $ -// $Id: Conic_x_monotone_arc_2.h 1081a67 2022-01-05T19:42:15+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h $ +// $Id: include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // -// Author(s): Ron Wein +// Author(s): Ron Wein +// Efi Fogel #ifndef CGAL_CONIC_X_MONOTONE_ARC_2_H #define CGAL_CONIC_X_MONOTONE_ARC_2_H @@ -15,146 +16,89 @@ #include /*! \file - * Header file for the _Conic_x_monotone_arc_2 class. + * Header file for the Conic_x_monotone_arc_2 class. */ -#include #include -#include - -#include - namespace CGAL { /*! Representation of an x-monotone conic arc. * The class is templated by a representation of a general bounded conic arc. */ - -template -class _Conic_x_monotone_arc_2 : private Conic_arc_ { +template +class Conic_x_monotone_arc_2 : public ConicArc { public: + typedef ConicArc Conic_arc_2; + typedef Conic_x_monotone_arc_2 Self; - typedef Conic_arc_ Conic_arc_2; - typedef _Conic_x_monotone_arc_2 Self; - - typedef typename Conic_arc_2::Alg_kernel Alg_kernel; - typedef typename Conic_arc_2::Algebraic Algebraic; + typedef typename Conic_arc_2::Alg_kernel Alg_kernel; + typedef typename Conic_arc_2::Algebraic Algebraic; - typedef typename Conic_arc_2::Point_2 Point_2; - typedef typename Conic_arc_2::Conic_point_2 Conic_point_2; + typedef typename Conic_arc_2::Alg_point_2 Alg_point_2; + typedef typename Conic_arc_2::Point_2 Point_2; // Type definition for the intersection points mapping. - typedef typename Conic_point_2::Conic_id Conic_id; - typedef std::pair Conic_pair; - typedef std::pair Intersection_point; - typedef std::list Intersection_list; + typedef typename Point_2::Conic_id Conic_id; - using Conic_arc_2::_sign_of_extra_data; + using Conic_arc_2::sign_of_extra_data; using Conic_arc_2::_is_between_endpoints; - using Conic_arc_2::_is_strictly_between_endpoints; - using Conic_arc_2::_conic_get_y_coordinates; - /*! - * \struct Less functor for Conic_pair. - */ - struct Less_conic_pair { - bool operator()(const Conic_pair& cp1, const Conic_pair& cp2) const - { - // Compare the pairs of IDs lexicographically. - return ((cp1.first < cp2.first) || - ((cp1.first == cp2.first) && (cp1.second < cp2.second))); - } - }; - typedef std::map Intersection_map; - typedef typename Intersection_map::value_type Intersection_map_entry; - typedef typename Intersection_map::iterator Intersection_map_iterator; + using Conic_arc_2::IS_VALID; + using Conic_arc_2::IS_FULL_CONIC; -protected: + using Conic_arc_2::flag_mask; + using Conic_arc_2::reset_flags; + using Conic_arc_2::set_flag; + using Conic_arc_2::reset_flag; + using Conic_arc_2::flip_flag; + using Conic_arc_2::test_flag; +private: typedef Conic_arc_2 Base; typedef typename Conic_arc_2::Integer Integer; - typedef typename Conic_arc_2::Nt_traits Nt_traits; - typedef typename Conic_arc_2::Rat_kernel Rat_kernel; - - // Bit masks for the _info field (the two least significant bits are already - // used by the base class). - enum { - IS_VERTICAL_SEGMENT = 4, - IS_DIRECTED_RIGHT = 8, - DEGREE_1 = 16, - DEGREE_2 = 32, - DEGREE_MASK = 16 + 32, - PLUS_SQRT_DISC_ROOT = 64, - FACING_UP = 128, - FACING_DOWN = 256, - FACING_MASK = 128 + 256, - IS_SPECIAL_SEGMENT = 512 - }; - Algebraic alg_r; // The coefficients of the supporting conic curve: - Algebraic alg_s; // - Algebraic alg_t; // r*x^2 + s*y^2 + t*xy + u*x + v*y +w = 0 , - Algebraic alg_u; // - Algebraic alg_v; // converted to algebraic numbers. - Algebraic alg_w; // + Algebraic m_alg_r; // The coefficients of the supporting conic curve: + Algebraic m_alg_s; // + Algebraic m_alg_t; // r*x^2 + s*y^2 + t*xy + u*x + v*y +w = 0 , + Algebraic m_alg_u; // + Algebraic m_alg_v; // converted to algebraic numbers. + Algebraic m_alg_w; // - Conic_id _id; // The ID number of the supporting conic curve. + Conic_id m_id; // The ID number of the supporting conic curve. public: + // Bit masks for the m_info field (the two least significant bits are already + // used by the base class). + enum { + IS_VERTICAL_SEGMENT = Conic_arc_2::LAST_INFO, + IS_DIRECTED_RIGHT, + DEGREE_1, + DEGREE_2, + PLUS_SQRT_DISC_ROOT, + FACING_UP, + FACING_DOWN, + IS_SPECIAL_SEGMENT, + + DEGREE_MASK = (0x1 << DEGREE_1) | (0x1 << DEGREE_2), + FACING_MASK = (0x1 << FACING_UP) | (0x1 << FACING_DOWN) + }; - /// \name Constrcution methods. + /// \name Deprecated Constructions. //@{ - /*! - * Default constructor. - */ - _Conic_x_monotone_arc_2 () : - Base(), - _id() - {} - - /*! - * Copy constructor. - * \param arc The copied arc. - */ - _Conic_x_monotone_arc_2(const Self& arc) : - Base(arc), - alg_r(arc.alg_r), - alg_s(arc.alg_s), - alg_t(arc.alg_t), - alg_u(arc.alg_u), - alg_v(arc.alg_v), - alg_w(arc.alg_w), - _id(arc._id) - {} - - /*! Construct an x-monotone arc from a conic arc. - * \param arc The given (base) arc. - * \pre The given arc is x-monotone. - */ - _Conic_x_monotone_arc_2(const Base& arc) : - Base(arc), - _id() - { - CGAL_precondition(arc.is_valid() && arc.is_x_monotone()); - _set (); - } - - /*! Construct an x-monotone arc from a conic arc. - * \param arc The given (base) arc. - * \param id The ID of the base arc. - */ - _Conic_x_monotone_arc_2(const Base& arc, const Conic_id& id) : - Base(arc), - _id(id) - { - CGAL_precondition(arc.is_valid() && id.is_valid()); - _set (); - } + // /*! Construct an x-monotone arc from a conic arc. + // * \param arc The given (base) arc. + // * \param id The ID of the base arc. + // */ + // CGAL_DEPRECATED Conic_x_monotone_arc_2(const Base& arc, const Conic_id& id) : + // Base(arc), + // m_id(id) + // { + // CGAL_precondition(arc.is_valid() && id.is_valid()); + // _set(); + // } /*! Construct an x-monotone sub-arc from a conic arc. * \param arc The given (base) arc. @@ -162,18 +106,15 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { * \param target The target point. * \param id The ID of the base arc. */ - _Conic_x_monotone_arc_2(const Base& arc, - const Point_2& source, const Point_2& target, - const Conic_id& id) : + CGAL_DEPRECATED Conic_x_monotone_arc_2(const Base& arc, + const Point_2& source, + const Point_2& target, + const Conic_id& id) : Base(arc), - _id(id) + m_id(id) { CGAL_precondition(arc.is_valid() && id.is_valid()); - - // Set the two endpoints. - this->_source = source; - this->_target = target; - + set_endpoints(source, target); _set(); } @@ -182,94 +123,209 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { * \param source The source point. * \param target The target point. */ - _Conic_x_monotone_arc_2(const Point_2& source, const Point_2& target) : + CGAL_DEPRECATED + Conic_x_monotone_arc_2(const Point_2& source, const Point_2& target) : Base(source, target) { - this->_info |= static_cast(DEGREE_1); + set_flag(DEGREE_1); Alg_kernel ker; auto cmp_xy = ker.compare_xy_2_object(); - Comparison_result dir_res = cmp_xy(this->_source, this->_target); - if (dir_res == SMALLER) this->_info |= IS_DIRECTED_RIGHT; + Comparison_result dir_res = cmp_xy(source, target); + if (dir_res == SMALLER) set_flag(IS_DIRECTED_RIGHT); // Check if the segment is vertical. - if (CGAL::sign(this->_extra_data_P->b) == ZERO) - this->_info |= IS_VERTICAL_SEGMENT; + if (CGAL::sign(this->extra_data->b) == ZERO) set_flag(IS_VERTICAL_SEGMENT); // Mark that this is a special segment. - this->_info |= IS_SPECIAL_SEGMENT; + set_flag(IS_SPECIAL_SEGMENT); } - /*! - * Construct a special segment of a given line connecting to given + /*! Construct a special segment of a given line connecting to given * endpoints. * \param a, b, c The coefficients of the supporting line (ax + by + c = 0). * \param source The source point. * \param target The target point. */ - _Conic_x_monotone_arc_2(const Algebraic& a, - const Algebraic& b, - const Algebraic& c, - const Point_2& source, const Point_2& target) : + CGAL_DEPRECATED + Conic_x_monotone_arc_2(const Algebraic& a, const Algebraic& b, + const Algebraic& c, + const Point_2& source, const Point_2& target) : Base() { // Make sure the two endpoints lie on the supporting line. - CGAL_precondition(CGAL::sign(a * source.x() + - b * source.y() + c) == CGAL::ZERO); + CGAL_precondition(CGAL::sign(a * source.x() + b * source.y() + c) == + CGAL::ZERO); - CGAL_precondition(CGAL::sign(a * target.x() + - b * target.y() + c) == CGAL::ZERO); + CGAL_precondition(CGAL::sign(a * target.x() + b * target.y() + c) == + CGAL::ZERO); // Set the basic properties and clear the _info bits. - this->_source = source; - this->_target = target; - this->_orient = COLLINEAR; - this->_info = 0; + this->set_endpoints(source, target); + this->set_orientation(COLLINEAR); + this->reset_flags(); // inavlid arc // Check if the arc is directed right (the target is lexicographically // greater than the source point), or to the left. Alg_kernel ker; - Comparison_result res = - ker.compare_x_2_object()(this->_source, this->_target); + Comparison_result res = ker.compare_x_2_object()(source, target); - this->_info = (static_cast(Conic_arc_2::IS_VALID) | static_cast(DEGREE_1)); + set_flag(Base::IS_VALID); + set_flag(DEGREE_1); if (res == EQUAL) { // Mark that the segment is vertical. - this->_info = (this->_info | IS_VERTICAL_SEGMENT); + set_flag(IS_VERTICAL_SEGMENT); // Compare the endpoints lexicographically. - res = ker.compare_y_2_object()(this->_source, this->_target); - - CGAL_precondition (res != EQUAL); + res = ker.compare_y_2_object()(source, target); + CGAL_precondition(res != EQUAL); if (res == EQUAL) { - // Invalid arc: - this->_info = 0; + reset_flags(); // inavlid arc return; } } - if (res == SMALLER) - this->_info = (this->_info | IS_DIRECTED_RIGHT); + if (res == SMALLER) set_flag(IS_DIRECTED_RIGHT); // Store the coefficients of the line. - this->_extra_data_P = new typename Base::Extra_data; - this->_extra_data_P->a = a; - this->_extra_data_P->b = b; - this->_extra_data_P->c = c; - this->_extra_data_P->side = ZERO; + this->m_extra_data = new typename Base::Extra_data; + this->m_extra_data->a = a; + this->m_extra_data->b = b; + this->m_extra_data->c = c; + this->m_extra_data->side = ZERO; // Mark that this is a special segment. - this->_info = (this->_info | IS_SPECIAL_SEGMENT); + set_flag(IS_SPECIAL_SEGMENT); + } + //@} + +private: + /*! Set the properties of the x-monotone conic arc (for the usage of the + * constructors). + */ + CGAL_DEPRECATED void _set() { + // Convert the coefficients of the supporting conic to algebraic numbers. + typename Base::Nt_traits nt_traits; + + m_alg_r = nt_traits.convert(this->r()); + m_alg_s = nt_traits.convert(this->s()); + m_alg_t = nt_traits.convert(this->t()); + m_alg_u = nt_traits.convert(this->u()); + m_alg_v = nt_traits.convert(this->v()); + m_alg_w = nt_traits.convert(this->w()); + + // Set the generating conic ID for the source and target points. + this->m_source.set_generating_conic(m_id); + this->m_target.set_generating_conic(m_id); + + // Clear the _info bits. + this->set_flag(Base::IS_VALID); + this->reset_flag(Base::IS_FULL_CONIC); + + // Check if the arc is directed right (the target is lexicographically + // greater than the source point), or to the left. + Alg_kernel ker; + Comparison_result dir_res = + ker.compare_xy_2_object()(this->source(), this->target()); + + CGAL_assertion(dir_res != EQUAL); + + if (dir_res == SMALLER) set_flag(IS_DIRECTED_RIGHT); + + // Compute the degree of the underlying conic. + if (CGAL::sign(this->r()) != ZERO || + CGAL::sign(this->s()) != ZERO || + CGAL::sign(this->t()) != ZERO) + { + set_flag(DEGREE_2); - return; + if (this->m_orient == COLLINEAR) { + set_flag(IS_SPECIAL_SEGMENT); + + // The arc is a vertical segment: + if (ker.compare_x_2_object()(this->source(), this->target()) == EQUAL) + set_flag(IS_VERTICAL_SEGMENT); + return; + } + } + else { + CGAL_assertion(CGAL::sign(this->m_u) != ZERO || + CGAL::sign(this->m_v) != ZERO); + // The supporting curve is of the form: _u*x + _w = 0 + if (CGAL::sign(this->m_v) == ZERO) this->set_flag(IS_VERTICAL_SEGMENT); + this->set_flag(DEGREE_1); + return; + } + + if (this->m_orient == COLLINEAR) return; + + // Compute a midpoint between the source and the target and get the y-value + // of the arc at its x-coordiante. + Point_2 p_mid = + ker.construct_midpoint_2_object()(this->source(), this->target()); + Algebraic ys[2]; + CGAL_assertion_code(int n_ys = ) + this->_conic_get_y_coordinates(p_mid.x(), ys); + + CGAL_assertion(n_ys != 0); + + // Check which solution lies on the x-monotone arc. + Point_2 p_arc_mid(p_mid.x(), ys[0]); + + if (this->_is_strictly_between_endpoints(p_arc_mid)) { + // Mark that we should use the -sqrt(disc) root for points on this + // x-monotone arc. + this->reset_flag(PLUS_SQRT_DISC_ROOT); + } + else { + CGAL_assertion(n_ys == 2); + p_arc_mid = Point_2(p_mid.x(), ys[1]); + + CGAL_assertion(this->_is_strictly_between_endpoints(p_arc_mid)); + + // Mark that we should use the +sqrt(disc) root for points on this + // x-monotone arc. + this->set_flag(PLUS_SQRT_DISC_ROOT); + } + + // Check whether the conic is facing up or facing down: + // Check whether the arc (which is x-monotone of degree 2) lies above or + // below the segement that contects its two end-points (x1,y1) and (x2,y2). + // To do that, we find the y coordinate of a point on the arc whose x + // coordinate is (x1+x2)/2 and compare it to (y1+y2)/2. + Comparison_result res = ker.compare_y_2_object()(p_arc_mid, p_mid); + // The arc is above the connecting segment, so it is facing upwards. + if (res == LARGER) this->set_flag(FACING_UP); + // The arc is below the connecting segment, so it is facing downwards. + else if (res == SMALLER) this->set_flag(FACING_DOWN); } - /*! - * Assignment operator. +public: + /// \name Public constrcutors, assignment operators, and destructors. + //@{ + + /*! Default constructor. + */ + Conic_x_monotone_arc_2() : Base(), m_id() {} + + /*! Copy constructor. * \param arc The copied arc. */ - const Self& operator=(const Self& arc) - { + Conic_x_monotone_arc_2(const Self& arc) : + Base(arc), + m_alg_r(arc.m_alg_r), + m_alg_s(arc.m_alg_s), + m_alg_t(arc.m_alg_t), + m_alg_u(arc.m_alg_u), + m_alg_v(arc.m_alg_v), + m_alg_w(arc.m_alg_w), + m_id(arc.m_id) + {} + + /*! Assignment operator. + * \param arc The copied arc. + */ + const Self& operator=(const Self& arc) { CGAL_precondition (arc.is_valid()); if (this == &arc) return (*this); @@ -278,214 +334,263 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { Base::operator= (arc); // Set the rest of the properties. - alg_r = arc.alg_r; - alg_s = arc.alg_s; - alg_t = arc.alg_t; - alg_u = arc.alg_u; - alg_v = arc.alg_v; - alg_w = arc.alg_w; + m_alg_r = arc.m_alg_r; + m_alg_s = arc.m_alg_s; + m_alg_t = arc.m_alg_t; + m_alg_u = arc.m_alg_u; + m_alg_v = arc.m_alg_v; + m_alg_w = arc.m_alg_w; - _id = arc._id; + m_id = arc.m_id; return (*this); } //@} - /// \name Accessing the arc properties. +private: + template friend class Arr_conic_traits_2; + + /// \name private constrcutors to be used only by the traits class template. //@{ - /*! - * Get the coefficients of the underlying conic. + /*! Construct an x-monotone arc from a conic arc. + * \param arc The given (base) arc. + * \pre The given arc is x-monotone. */ - const Integer& r() const { return (this->_r); } - const Integer& s() const { return (this->_s); } - const Integer& t() const { return (this->_t); } - const Integer& u() const { return (this->_u); } - const Integer& v() const { return (this->_v); } - const Integer& w() const { return (this->_w); } - - /*! - * Get the arc's source. - * \return The source point. + Conic_x_monotone_arc_2(const Base& arc) : Base(arc), m_id() {} + + /*! Construct an x-monotone arc from a conic arc. + * \param arc The given (base) arc. + * \param id The ID of the base arc. */ - const Conic_point_2& source() const { return (this->_source); } + Conic_x_monotone_arc_2(const Base& arc, const Conic_id& id) : + Base(arc), + m_id(id) + {} + //@} + +public: + /// \name Accessing the arc properties. + //@{ - /*! Get the arc's target. - * \return The target point. + /*! Obtain the facing mask. */ - const Conic_point_2& target() const { return (this->_target); } + size_t facing_mask() const { return this->m_info & FACING_MASK; } - /*! Get the orientation of the arc. - * \return The orientation. + /*! Obtain the degree mask. */ - Orientation orientation() const { return (this->_orient); } + size_t degree_mask() const { return this->m_info & DEGREE_MASK; } - /*! Get the left endpoint of the arc. + /*! Obtain the coefficients of the underlying conic. */ - const Conic_point_2& left () const - { - if ((this->_info & IS_DIRECTED_RIGHT) != 0) return (this->_source); - else return (this->_target); + const Integer& r() const { return ( this->m_r); } + const Integer& s() const { return ( this->m_s); } + const Integer& t() const { return ( this->m_t); } + const Integer& u() const { return ( this->m_u); } + const Integer& v() const { return ( this->m_v); } + const Integer& w() const { return ( this->m_w); } + + /*! Obtain the left endpoint of the arc. + */ + const Point_2& left() const { + if (this->test_flag(IS_DIRECTED_RIGHT)) return this->source(); + else return this->target(); } - /*! - * Get the right endpoint of the arc. + /*! Obtain the right endpoint of the arc. */ - const Conic_point_2& right () const - { - if ((this->_info & IS_DIRECTED_RIGHT) != 0) return (this->_target); - else return (this->_source); + const Point_2& right() const { + if (this->test_flag(IS_DIRECTED_RIGHT)) return this->target(); + else return this->source(); } - /*! - * Return true iff the conic arc is directed right iexicographically. + /*! Determine whether the conic arc is directed iexicographically right. */ - bool is_directed_right() const - { return ((this->_info & IS_DIRECTED_RIGHT) != 0); } + bool is_directed_right() const { return this->test_flag(IS_DIRECTED_RIGHT); } - /*! - * Get a bounding box for the conic arc. - * \return The bounding box. + /*! Determine whether the conic arc is a vertical segment. */ - Bbox_2 bbox() const { return (Base::bbox()); } - //@} + bool is_vertical() const { return this->test_flag(IS_VERTICAL_SEGMENT); } - /// \name Predicates. - //@{ + /*! Determine whether the conic arc is a facing up. + */ + bool is_upper() const { return this->test_flag(FACING_UP); } - /*! - * Check if the conic arc is a vertical segment. + /*! Determine whether the conic arc is a facing down. */ - bool is_vertical () const - { - return ((this->_info & IS_VERTICAL_SEGMENT) != 0); - } + bool is_lower() const { return this->test_flag(FACING_DOWN); } + + /*! Check whether the arc is a special segment connecting two algebraic + * endpoints (and has no undelying integer conic coefficients). + */ + bool is_special_segment() const { return this->test_flag(IS_SPECIAL_SEGMENT); } + + /*! Obtain the mask of the DEGREE_1 flag. + */ + static constexpr size_t degree_1_mask() { return flag_mask(DEGREE_1); } + + /*! Obtain the mask of the DEGREE_1 flag. + */ + static constexpr size_t degree_2_mask() { return flag_mask(DEGREE_2); } + + /*! Obtain the algebraic coefficients. + */ + Algebraic alg_r() const { return m_alg_r; } + Algebraic alg_s() const { return m_alg_s; } + Algebraic alg_t() const { return m_alg_t; } + Algebraic alg_u() const { return m_alg_u; } + Algebraic alg_v() const { return m_alg_v; } + Algebraic alg_w() const { return m_alg_w; } + + /*! Obtain the conic id. + */ + Conic_id id() const { return m_id; } - /*! - * Check whether the given point lies on the arc. + /*! Check whether the given point lies on the arc. * \param p The qury point. * \param (true) if p lies on the arc; (false) otherwise. */ - bool contains_point(const Conic_point_2& p) const - { + CGAL_DEPRECATED + bool contains_point(const Point_2& p) const { + const auto& xcv = *this; // First check if p lies on the supporting conic. We first check whether // it is one of p's generating conic curves. - bool p_on_conic = false; - - if (p.is_generating_conic(_id)) { - p_on_conic = true; - } + bool p_on_conic(false); + if (p.is_generating_conic(xcv.id())) p_on_conic = true; else { // Check whether p satisfies the supporting conic equation. - p_on_conic = _is_on_supporting_conic(p.x(), p.y()); - + p_on_conic = xcv.is_on_supporting_conic(p.x(), p.y()); if (p_on_conic) { // As p lies on the supporting conic of our arc, add its ID to // the list of generating conics for p. - Conic_point_2& p_non_const = const_cast (p); - p_non_const.set_generating_conic (_id); + Point_2& p_non_const = const_cast(p); + p_non_const.set_generating_conic(xcv.id()); } } - if (! p_on_conic) - return (false); + if (! p_on_conic) return false; // Check if p is between the endpoints of the arc. - return (_is_between_endpoints (p)); + return _is_between_endpoints(p); } + + /*! Obtain a bounding box for the conic arc. + * \return The bounding box. + */ + CGAL_DEPRECATED Bbox_2 bbox() const { return Base::bbox(); } //@} - /// \name Constructing points on the arc. + // Setters //@{ - /*! - * Compute a point on the arc with the same x-coordiante as the given point. - * \param p The given point. - * \pre The arc is not vertical and p is in the x-range of the arc. - * \return A point on the arc with the same x-coordiante as p. + /*! Set the algebraic coefficients. */ - Point_2 point_at_x (const Point_2& p) const + void set_alg_coefficients(const Algebraic& alg_r, const Algebraic& alg_s, + const Algebraic& alg_t, const Algebraic& alg_u, + const Algebraic& alg_v, const Algebraic& alg_w) { - // Make sure that p is in the x-range of the arc. - CGAL_precondition ((this->_info & IS_VERTICAL_SEGMENT) == 0); + m_alg_r = alg_r; + m_alg_s = alg_s; + m_alg_t = alg_t; + m_alg_u = alg_u; + m_alg_v = alg_v; + m_alg_w = alg_w; + } + + /*! Add a generating conic ID. + */ + void set_generating_conic(const Conic_id& id) { + this->m_source.set_generating_conic(id); + this->m_target.set_generating_conic(id); + } + //@} + + /*! Compute a point on an arc with the same \f$x\f$-coordiante as the given + * point. + * \param p The given point. + * \pre The arc is not vertical and `p` is in the \f$x\f$-range of the arc. + * \return A point on the arc with the same \f$x\f$-coordiante as `p`. + */ + CGAL_DEPRECATED + Point_2 point_at_x(const Point_2& p) const { + const auto& xcv = *this; + Alg_kernel alg_kernel; - CGAL_precondition_code ( - Alg_kernel ker; - ); + // Make sure that p is in the x-range of the arc. + CGAL_precondition(! xcv.is_vertical()); - CGAL_precondition(ker.compare_x_2_object() (p, left()) != SMALLER && - ker.compare_x_2_object() (p, right()) != LARGER); + CGAL_precondition_code(auto cmp_x = alg_kernel.compare_x_2_object()); + CGAL_precondition((cmp_x(p, xcv.left()) != SMALLER) && + (cmp_x(p, xcv.right()) != LARGER)); - if (_is_special_segment()) { + if (xcv.is_special_segment()) { // In case of a special segment, the equation of the supported line // (a*x + b*y + c) = 0 is stored with the extra data field, and we // simply have: - Algebraic _y = -(this->_extra_data_P->a*p.x() + - this->_extra_data_P->c) / - this->_extra_data_P->b; + const auto& extra_data = xcv.extra_data(); + Algebraic y = -(extra_data->a*p.x() + extra_data->c) / extra_data->b; // Return the computed point. - return (Point_2 (p.x(), _y)); + return Point_2(p.x(), y); } // Compute the y-coordinate according to the degree of the supporting // conic curve. - Nt_traits nt_traits; + typename Base::Nt_traits nt_traits; Algebraic y; - if ((this->_info & DEGREE_MASK) == DEGREE_1) { + if (xcv.degree_mask() == Self::degree_1_mask()) { // In case of a linear curve, the y-coordinate is a simple linear // expression of x(p) (note that v is not 0 as the arc is not vertical): // y = -(u*x(p) + w) / v - y = -(alg_u*p.x() + alg_w) / alg_v; + y = -(xcv.alg_u()*p.x() + xcv.alg_w()) / xcv.alg_v(); } - else if (this->_orient == COLLINEAR) { - CGAL_assertion (this->_extra_data_P != nullptr); + else if (xcv.orientation() == COLLINEAR) { + const auto& extra_data = xcv.extra_data(); + CGAL_assertion(extra_data != nullptr); // In this case the equation of the supporting line is given by the // extra data structure. - y = -(this->_extra_data_P->a * p.x() + - this->_extra_data_P->c) / this->_extra_data_P->b; + y = -(extra_data->a * p.x() + extra_data->c) / extra_data->b; } else { - CGAL_assertion((this->_info & DEGREE_MASK) == DEGREE_2); + CGAL_assertion(xcv.degree_mask() == Self::degree_2_mask()); // In this case the y-coordinate is one of solutions to the quadratic // equation: // s*y^2 + (t*x(p) + v)*y + (r*x(p)^2 + u*x(p) + w) = 0 - Algebraic A = alg_s; - Algebraic B = alg_t*p.x() + alg_v; - Algebraic C = (alg_r*p.x() + alg_u)*p.x() + alg_w; + Algebraic A = xcv.alg_s(); + Algebraic B = xcv.alg_t()*p.x() + xcv.alg_v(); + Algebraic C = (xcv.alg_r()*p.x() + xcv.alg_u())*p.x() + xcv.alg_w(); - if (CGAL::sign(this->_s) == ZERO) { + if (CGAL::sign(xcv.s()) == ZERO) { // In this case A is 0 and we have a linear equation. - CGAL_assertion (CGAL::sign (B) != ZERO); + CGAL_assertion(CGAL::sign(B) != ZERO); y = -C / B; } else { // Solve the quadratic equation. - Algebraic disc = B*B - 4*A*C; + Algebraic disc = B*B - 4*A*C; - CGAL_assertion (CGAL::sign (disc) != NEGATIVE); + CGAL_assertion(CGAL::sign(disc) != NEGATIVE); // We take either the root involving -sqrt(disc) or +sqrt(disc) // based on the information flags. - if ((this->_info & PLUS_SQRT_DISC_ROOT) != 0) { - y = (nt_traits.sqrt (disc) - B) / (2*A); - } - else { - y = -(B + nt_traits.sqrt (disc)) / (2*A); - } + y = (xcv.test_flag(Self::PLUS_SQRT_DISC_ROOT)) ? + (nt_traits.sqrt(disc) - B) / (2*A) : + -(B + nt_traits.sqrt(disc)) / (2*A); } } // Return the computed point. - return (Point_2 (p.x(), y)); + return Point_2(p.x(), y); } - /*! - * Get a polyline approximating the conic arc. + /// \name Constructing points on the arc. + //@{ + + /*! Obtain a polyline approximating the conic arc. * \param n The maximal number of sample points. * \param oi An output iterator, whose value-type is pair * (representing an approximated point). @@ -494,10 +599,8 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { * (p_0, p_1, ..., p_n), where p_0 and p_n are the left and right * endpoints of the arc, respectively. */ - template - OutputIterator polyline_approximation (size_t n, - OutputIterator oi) const - { + template + OutputIterator polyline_approximation(size_t n, OutputIterator oi) const { CGAL_precondition (n != 0); const double x_left = CGAL::to_double (left().x()); @@ -505,83 +608,152 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { const double x_right = CGAL::to_double (right().x()); const double y_right = CGAL::to_double (right().y()); - if (this->_orient == COLLINEAR) { + if (this->m_orient == COLLINEAR) { // In case of a line segment, return the two endpoints. - *oi++ = std::pair (x_left, y_left); - *oi++ = std::pair (x_right, y_right); + *oi++ = std::pair(x_left, y_left); + *oi++ = std::pair(x_right, y_right); return oi; } // Otherwise, sample (n - 1) equally-spaced points in between. - const double app_r = CGAL::to_double (this->_r); - const double app_s = CGAL::to_double (this->_s); - const double app_t = CGAL::to_double (this->_t); - const double app_u = CGAL::to_double (this->_u); - const double app_v = CGAL::to_double (this->_v); - const double app_w = CGAL::to_double (this->_w); + const double app_r = CGAL::to_double(this->m_r); + const double app_s = CGAL::to_double(this->m_s); + const double app_t = CGAL::to_double(this->m_t); + const double app_u = CGAL::to_double(this->m_u); + const double app_v = CGAL::to_double(this->m_v); + const double app_w = CGAL::to_double(this->m_w); const double x_jump = (x_right - x_left) / n; - double x, y; - const bool A_is_zero = (CGAL::sign(this->_s) == ZERO); - double A = app_s, B, C; - double disc; - size_t i; - - *oi = std::pair(x_left, y_left); // The left point. - ++oi; - for (i = 1; i < n; i++) { + double x, y; + const bool A_is_zero = (CGAL::sign(this->m_s) == ZERO); + double A = app_s, B, C; + double disc; + size_t i; + + *oi++ = std::pair(x_left, y_left); // the left point + for (i = 1; i < n; ++i) { x = x_left + x_jump*i; // Solve the quadratic equation: A*x^2 + B*x + C = 0: B = app_t*x + app_v; C = (app_r*x + app_u)*x + app_w; - if (A_is_zero) { - y = -C / B; - } + if (A_is_zero) y = -C / B; else { disc = B*B - 4*A*C; - if (disc < 0) disc = 0; // We take either the root involving -sqrt(disc) or +sqrt(disc) // based on the information flags. - if ((this->_info & PLUS_SQRT_DISC_ROOT) != 0) { - y = (std::sqrt(disc) - B) / (2*A); - } - else { - y = -(B + std::sqrt (disc)) / (2*A); - } + y = (test_flag(PLUS_SQRT_DISC_ROOT)) ? + (std::sqrt(disc) - B) / (2*A) : -(B + std::sqrt (disc)) / (2*A); } - - *oi++ = std::pair (x, y); + *oi++ = std::pair(x, y); } - *oi++ = std::pair (x_right, y_right); // The right point. + *oi++ = std::pair(x_right, y_right); // the right point return oi; } - /*! Compare to arcs immediately to the right of their intersection point. - * \param arc The compared arc. + //@} + + /// \name Constructing x-monotone arcs. + //@{ + + /*! Flip the arc. + * \return An arc with swapped source and target and a reverse orienation. + */ + Self flip() const { + // Make a copy of the current arc. + Self arc = *this; + + // Reverse the orientation. + if (this->m_orient == CLOCKWISE) arc.m_orient = COUNTERCLOCKWISE; + else if (this->m_orient == COUNTERCLOCKWISE) arc.m_orient = CLOCKWISE; + + // Swap the source and the target. + arc.m_source = this->m_target; + arc.m_target = this->m_source; + + // Change the direction bit among the information flags. + arc.flip_flag(IS_DIRECTED_RIGHT); + + return arc; + } + + /*! Trim the arc given its new endpoints. + * \param ps The new source point. + * \param pt The new target point. + * \return The new trimmed arc. + * \pre Both ps and pt lies on the arc and must conform with the current + * direction of the arc. + */ + CGAL_DEPRECATED + Self trim(const Point_2& ps, const Point_2& pt) const { + auto& xcv = *this; + // Make sure that both ps and pt lie on the arc. + CGAL_precondition(contains_point(ps) && contains_point(pt)); + + // Make sure that the endpoints conform with the direction of the arc. + Alg_kernel alg_kernel; + Self res_xcv = xcv; // make a copy of the current arc + auto eq = alg_kernel.equal_2_object(); + auto set_source = [&](const Point_2 ps)->void { + if (! eq(ps, xcv.source())) { + res_xcv.set_source(ps); + if (! ps.is_generating_conic(xcv.id())) + res_xcv.source().set_generating_conic(xcv.id()); + } + }; + auto set_target = [&](const Point_2 pt)->void { + if (! eq(pt, xcv.target())) { + res_xcv.set_target(pt); + if (! pt.is_generating_conic(xcv.id())) + res_xcv.target().set_generating_conic(xcv.id()); + } + }; + + auto cmp_xy = alg_kernel.compare_xy_2_object(); + auto res = cmp_xy(ps, pt); + CGAL_assertion(res != EQUAL); + if ((xcv.test_flag(Self::IS_DIRECTED_RIGHT) && (res == LARGER)) || + (! xcv.test_flag(Self::IS_DIRECTED_RIGHT) && (res == SMALLER))) { + set_source(pt); + set_target(ps); + } + else { + set_source(ps); + set_target(pt); + } + + return res_xcv; + } + + //@} + + /*! Compare two arcs immediately to the leftt of their intersection point. + * \param xcv1 The first compared arc. + * \param xcv2 The second compared arc. * \param p The reference intersection point. - * \return The relative position of the arcs to the right of p. + * \return The relative position of the arcs to the left of `p`. * \pre Both arcs we compare are not vertical segments. */ - Comparison_result compare_to_right(const Self& arc, - const Conic_point_2& p) const - { - CGAL_precondition((this->_info & IS_VERTICAL_SEGMENT) == 0 && - (arc._info & IS_VERTICAL_SEGMENT) == 0); + CGAL_DEPRECATED + Comparison_result compare_to_left(const Self& xcv2, const Point_2& p) const { + const auto& xcv1 = *this; + CGAL_precondition(! xcv1.is_vertical() && ! xcv2.is_vertical()); // In case one arc is facing upwards and another facing downwards, it is // clear that the one facing upward is above the one facing downwards. - if (_has_same_supporting_conic (arc)) { - if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_DOWN) != 0) + if (_has_same_supporting_conic(xcv2)) { + if (xcv1.test_flag(Self::FACING_UP) && + xcv2.test_flag(Self::FACING_DOWN)) return LARGER; - else if ((this->_info & FACING_DOWN) != 0 && (arc._info & FACING_UP) != 0) + else if (xcv1.test_flag(Self::FACING_DOWN) && + xcv2.test_flag(Self::FACING_UP)) return SMALLER; // In this case the two arcs overlap. - CGAL_assertion((this->_info & FACING_MASK) == (arc._info & FACING_MASK)); + CGAL_assertion(xcv1.facing_mask() == xcv2.facing_mask()); return EQUAL; } @@ -591,79 +763,81 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { Algebraic slope1_numer, slope1_denom; Algebraic slope2_numer, slope2_denom; - _derive_by_x_at (p, 1, slope1_numer, slope1_denom); - arc._derive_by_x_at (p, 1, slope2_numer, slope2_denom); + xcv1.derive_by_x_at(p, 1, slope1_numer, slope1_denom); + xcv2.derive_by_x_at(p, 1, slope2_numer, slope2_denom); // Check if any of the slopes is vertical. - const bool is_vertical_slope1 = (CGAL::sign(slope1_denom) == ZERO); - const bool is_vertical_slope2 = (CGAL::sign(slope2_denom) == ZERO); + const bool is_vertical_slope1 = (CGAL::sign (slope1_denom) == ZERO); + const bool is_vertical_slope2 = (CGAL::sign (slope2_denom) == ZERO); - if (!is_vertical_slope1 && !is_vertical_slope2) { + if (! is_vertical_slope1 && ! is_vertical_slope2) { // The two derivatives at p are well-defined: use them to determine // which arc is above the other (the one with a larger slope is below). - Comparison_result slope_res = - CGAL::compare(slope1_numer*slope2_denom, slope2_numer*slope1_denom); + Comparison_result slope_res = CGAL::compare(slope2_numer*slope1_denom, + slope1_numer*slope2_denom); - if (slope_res != EQUAL) return (slope_res); + if (slope_res != EQUAL) return slope_res; // Use the second-order derivative. - _derive_by_x_at(p, 2, slope1_numer, slope1_denom); - arc._derive_by_x_at(p, 2, slope2_numer, slope2_denom); + xcv1.derive_by_x_at(p, 2, slope1_numer, slope1_denom); + xcv2.derive_by_x_at(p, 2, slope2_numer, slope2_denom); - slope_res = - CGAL::compare(slope1_numer*slope2_denom, slope2_numer*slope1_denom); + slope_res = CGAL::compare(slope1_numer*slope2_denom, + slope2_numer*slope1_denom); if (slope_res != EQUAL) return (slope_res); // Use the third-order derivative. - _derive_by_x_at(p, 3, slope1_numer, slope1_denom); - arc._derive_by_x_at(p, 3, slope2_numer, slope2_denom); + xcv1.derive_by_x_at(p, 3, slope1_numer, slope1_denom); + xcv2.derive_by_x_at(p, 3, slope2_numer, slope2_denom); - slope_res = - CGAL::compare(slope1_numer*slope2_denom, slope2_numer*slope1_denom); + slope_res = CGAL::compare(slope2_numer*slope1_denom, + slope1_numer*slope2_denom); // \todo Handle higher-order derivatives: - CGAL_assertion (slope_res != EQUAL); + CGAL_assertion(slope_res != EQUAL); - return (slope_res); + return slope_res; } - else if (!is_vertical_slope2) { + else if (! is_vertical_slope2) { // The first arc has a vertical slope at p: check whether it is // facing upwards or downwards and decide accordingly. - CGAL_assertion ((this->_info & FACING_MASK) != 0); + CGAL_assertion(xcv1.facing_mask() != 0); - if ((this->_info & FACING_UP) != 0) return (LARGER); - return SMALLER; + return (xcv1.test_flag(Self::FACING_UP)) ? + LARGER : SMALLER; } - else if (!is_vertical_slope1) { + else if (! is_vertical_slope1) { // The second arc has a vertical slope at p_int: check whether it is // facing upwards or downwards and decide accordingly. - CGAL_assertion ((arc._info & FACING_MASK) != 0); + CGAL_assertion(xcv2.facing_mask() != 0); - if ((arc._info & FACING_UP) != 0) return (SMALLER); - return LARGER; + return (xcv2.test_flag(Self::FACING_UP)) ? + SMALLER : LARGER; } // The two arcs have vertical slopes at p_int: // First check whether one is facing up and one down. In this case the // comparison result is trivial. - if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_DOWN) != 0) - return (LARGER); - else if ((this->_info & FACING_DOWN) != 0 && (arc._info & FACING_UP) != 0) + if (xcv1.test_flag(Self::FACING_UP) && + xcv2.test_flag(Self::FACING_DOWN)) + return LARGER; + else if (xcv1.test_flag(Self::FACING_DOWN) && + xcv2.test_flag(Self::FACING_UP)) return SMALLER; // Compute the second-order derivative by y and act according to it. - _derive_by_y_at (p, 2, slope1_numer, slope1_denom); - arc._derive_by_y_at (p, 2, slope2_numer, slope2_denom); + xcv1.derive_by_y_at(p, 2, slope1_numer, slope1_denom); + xcv2.derive_by_y_at(p, 2, slope2_numer, slope2_denom); Comparison_result slope_res = - CGAL::compare(slope1_numer*slope2_denom, slope2_numer*slope1_denom); + CGAL::compare(slope2_numer*slope1_denom, slope1_numer*slope2_denom); // If necessary, use the third-order derivative by y. if (slope_res == EQUAL) { // \todo Check this! - _derive_by_y_at(p, 3, slope1_numer, slope1_denom); - arc._derive_by_y_at(p, 3, slope2_numer, slope2_denom); + xcv1.derive_by_y_at(p, 3, slope1_numer, slope1_denom); + xcv2.derive_by_y_at(p, 3, slope2_numer, slope2_denom); slope_res = CGAL::compare(slope2_numer*slope1_denom, slope1_numer*slope2_denom); @@ -672,38 +846,39 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { // \todo Handle higher-order derivatives: CGAL_assertion(slope_res != EQUAL); - if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_UP) != 0) { - // Both are facing up. + // Check whether both are facing up. + if (xcv1.test_flag(Self::FACING_UP) && + xcv2.test_flag(Self::FACING_UP)) return ((slope_res == LARGER) ? SMALLER : LARGER); - } + // Both are facing down. - return (slope_res); + return slope_res; } - /*! - * Compare to arcs immediately to the leftt of their intersection point. - * \param arc The compared arc. + /*! Compare two arcs immediately to the right of their intersection point. + * \param xcv1 The first compared arc. + * \param xcv2 The second compared arc. * \param p The reference intersection point. - * \return The relative position of the arcs to the left of p. + * \return The relative position of the arcs to the right of `p`. * \pre Both arcs we compare are not vertical segments. */ - Comparison_result compare_to_left(const Self& arc, - const Conic_point_2& p) const - { - CGAL_precondition((this->_info & IS_VERTICAL_SEGMENT) == 0 && - (arc._info & IS_VERTICAL_SEGMENT) == 0); + CGAL_DEPRECATED + Comparison_result compare_to_right(const Self& xcv2, const Point_2& p) const { + const auto& xcv1 = *this; + CGAL_precondition(! xcv1.is_vertical() && ! xcv2.is_vertical()); // In case one arc is facing upwards and another facing downwards, it is // clear that the one facing upward is above the one facing downwards. - if (_has_same_supporting_conic (arc)) { - if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_DOWN) != 0) + if (_has_same_supporting_conic(xcv2)) { + if (xcv1.test_flag(Self::FACING_UP) && + xcv2.test_flag(Self::FACING_DOWN)) return LARGER; - else if ((this->_info & FACING_DOWN) != 0 && (arc._info & FACING_UP) != 0) + else if (xcv1.test_flag(Self::FACING_DOWN) && + xcv2.test_flag(Self::FACING_UP)) return SMALLER; // In this case the two arcs overlap. - CGAL_assertion((this->_info & FACING_MASK) == (arc._info & FACING_MASK)); - + CGAL_assertion(xcv1.facing_mask() == xcv2.facing_mask()); return EQUAL; } @@ -712,79 +887,77 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { Algebraic slope1_numer, slope1_denom; Algebraic slope2_numer, slope2_denom; - _derive_by_x_at(p, 1, slope1_numer, slope1_denom); - arc._derive_by_x_at(p, 1, slope2_numer, slope2_denom); + xcv1.derive_by_x_at(p, 1, slope1_numer, slope1_denom); + xcv2.derive_by_x_at(p, 1, slope2_numer, slope2_denom); // Check if any of the slopes is vertical. - const bool is_vertical_slope1 = (CGAL::sign (slope1_denom) == ZERO); - const bool is_vertical_slope2 = (CGAL::sign (slope2_denom) == ZERO); + const bool is_vertical_slope1 = (CGAL::sign(slope1_denom) == ZERO); + const bool is_vertical_slope2 = (CGAL::sign(slope2_denom) == ZERO); - if (!is_vertical_slope1 && !is_vertical_slope2) { + if (! is_vertical_slope1 && ! is_vertical_slope2) { // The two derivatives at p are well-defined: use them to determine // which arc is above the other (the one with a larger slope is below). - Comparison_result slope_res = CGAL::compare(slope2_numer*slope1_denom, - slope1_numer*slope2_denom); + Comparison_result slope_res = + CGAL::compare(slope1_numer*slope2_denom, slope2_numer*slope1_denom); if (slope_res != EQUAL) return (slope_res); // Use the second-order derivative. - _derive_by_x_at (p, 2, slope1_numer, slope1_denom); - arc._derive_by_x_at (p, 2, slope2_numer, slope2_denom); + xcv1.derive_by_x_at(p, 2, slope1_numer, slope1_denom); + xcv2.derive_by_x_at(p, 2, slope2_numer, slope2_denom); - slope_res = CGAL::compare (slope1_numer*slope2_denom, - slope2_numer*slope1_denom); + slope_res = + CGAL::compare(slope1_numer*slope2_denom, slope2_numer*slope1_denom); if (slope_res != EQUAL) return (slope_res); // Use the third-order derivative. - _derive_by_x_at(p, 3, slope1_numer, slope1_denom); - arc._derive_by_x_at(p, 3, slope2_numer, slope2_denom); + xcv1.derive_by_x_at(p, 3, slope1_numer, slope1_denom); + xcv2.derive_by_x_at(p, 3, slope2_numer, slope2_denom); - slope_res = CGAL::compare(slope2_numer*slope1_denom, - slope1_numer*slope2_denom); + slope_res = + CGAL::compare(slope1_numer*slope2_denom, slope2_numer*slope1_denom); // \todo Handle higher-order derivatives: - CGAL_assertion (slope_res != EQUAL); + CGAL_assertion(slope_res != EQUAL); - return (slope_res); + return slope_res; } - else if (!is_vertical_slope2) { + else if (! is_vertical_slope2) { // The first arc has a vertical slope at p: check whether it is // facing upwards or downwards and decide accordingly. - CGAL_assertion ((this->_info & FACING_MASK) != 0); + CGAL_assertion(xcv1.facing_mask() != 0); - if ((this->_info & FACING_UP) != 0) return (LARGER); - return SMALLER; + return (xcv1.test_flag(Self::FACING_UP)) ? LARGER : SMALLER; } - else if (!is_vertical_slope1) { + else if (! is_vertical_slope1) { // The second arc has a vertical slope at p_int: check whether it is // facing upwards or downwards and decide accordingly. - CGAL_assertion ((arc._info & FACING_MASK) != 0); + CGAL_assertion(xcv2.facing_mask() != 0); - if ((arc._info & FACING_UP) != 0) return (SMALLER); - return LARGER; + return (xcv2.test_flag(Self::FACING_UP)) ? SMALLER : LARGER; } // The two arcs have vertical slopes at p_int: // First check whether one is facing up and one down. In this case the // comparison result is trivial. - if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_DOWN) != 0) - return LARGER; - else if ((this->_info & FACING_DOWN) != 0 && (arc._info & FACING_UP) != 0) - return SMALLER; + if (xcv1.test_flag(Self::FACING_UP) && + xcv2.test_flag(Self::FACING_DOWN)) return LARGER; + else if (xcv1.test_flag(Self::FACING_DOWN) && + xcv2.test_flag(Self::FACING_UP)) return SMALLER; // Compute the second-order derivative by y and act according to it. - _derive_by_y_at(p, 2, slope1_numer, slope1_denom); - arc._derive_by_y_at(p, 2, slope2_numer, slope2_denom); + xcv1.derive_by_y_at(p, 2, slope1_numer, slope1_denom); + xcv2.derive_by_y_at(p, 2, slope2_numer, slope2_denom); Comparison_result slope_res = - CGAL::compare(slope2_numer*slope1_denom, slope1_numer*slope2_denom); + CGAL::compare(slope1_numer*slope2_denom, slope2_numer*slope1_denom); // If necessary, use the third-order derivative by y. if (slope_res == EQUAL) { // \todo Check this! - _derive_by_y_at(p, 3, slope1_numer, slope1_denom); - arc._derive_by_y_at(p, 3, slope2_numer, slope2_denom); + xcv1.derive_by_y_at(p, 3, slope1_numer, slope1_denom); + xcv2.derive_by_y_at(p, 3, slope2_numer, slope2_denom); slope_res = CGAL::compare(slope2_numer*slope1_denom, slope1_numer*slope2_denom); @@ -793,599 +966,142 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { // \todo Handle higher-order derivatives: CGAL_assertion(slope_res != EQUAL); - if ((this->_info & FACING_UP) != 0 && (arc._info & FACING_UP) != 0) { - // Both are facing up. - return ((slope_res == LARGER) ? SMALLER : LARGER); - } - // Both are facing down. - return (slope_res); + if (xcv1.test_flag(Self::FACING_UP) && + xcv2.test_flag(Self::FACING_UP)) + return (slope_res == LARGER) ? SMALLER : LARGER; // both are facing up + return slope_res; // both are facing down } - /*! - * Compute the intersections with the given arc. - * \param arc The given intersecting arc. - * \param inter_map Maps conic pairs to lists of their intersection points. - * \param oi The output iterator. - * \return The past-the-end iterator. + /*! Check whether two arcs are equal (have the same graph). + * \param xcv1 The first compared arc. + * \param xcv2 The second compared arc. + * \return `true` if the two arcs have the same graph; `false` otherwise. */ - template - OutputIterator intersect(const Self& arc, - Intersection_map& inter_map, - OutputIterator oi) const - { - typedef boost::variant Intersection_result; + CGAL_DEPRECATED + bool equals(const Self& xcv2) const { + const auto& xcv1 = *this; + Alg_kernel alg_kernel; - if (_has_same_supporting_conic(arc)) { - // Check for overlaps between the two arcs. - Self overlap; - - if (_compute_overlap(arc, overlap)) { - // There can be just a single overlap between two x-monotone arcs: - *oi++ = Intersection_result(overlap); - return oi; - } - - // In case there is not overlap and the supporting conics are the same, - // there cannot be any intersection points, unless the two arcs share - // an end point. - // Note that in this case we do not define the multiplicity of the - // intersection points we report. - Alg_kernel ker; - - if (ker.equal_2_object()(left(), arc.left())) { - Intersection_point ip(left(), 0); - *oi++ = Intersection_result(ip); - } - - if (ker.equal_2_object()(right(), arc.right())) { - Intersection_point ip(right(), 0); - *oi++ = Intersection_result(ip); - } - - return oi; - } - - // Search for the pair of supporting conics in the map (the first conic - // ID in the pair should be smaller than the second one, to guarantee - // uniqueness). - Conic_pair conic_pair; - Intersection_map_iterator map_iter; - Intersection_list inter_list; - bool invalid_ids = false; - - if (_id.is_valid() && arc._id.is_valid()) { - if (_id < arc._id) conic_pair = Conic_pair (_id, arc._id); - else conic_pair = Conic_pair (arc._id, _id); - map_iter = inter_map.find (conic_pair); - } - else { - // In case one of the IDs is invalid, we do not look in the map neither - // we cache the results. - map_iter = inter_map.end(); - invalid_ids = true; - } - - if (map_iter == inter_map.end()) { - // In case the intersection points between the supporting conics have - // not been computed before, compute them now and store them in the map. - _intersect_supporting_conics(arc, inter_list); - - if (! invalid_ids) inter_map[conic_pair] = inter_list; - } - else { - // Obtain the precomputed intersection points from the map. - inter_list = (*map_iter).second; - } - - // Go over the list of intersection points and report those that lie on - // both x-monotone arcs. - for (auto iter = inter_list.begin(); iter != inter_list.end(); ++iter) { - if (_is_between_endpoints((*iter).first) && - arc._is_between_endpoints((*iter).first)) - { - *oi++ = Intersection_result(*iter); - } - } - - return oi; - } - //@} - - /// \name Constructing x-monotone arcs. - //@{ - - /*! - * Split the arc into two at a given split point. - * \param p The split point. - * \param c1 Output: The first resulting arc, lying to the left of p. - * \param c2 Output: The first resulting arc, lying to the right of p. - * \pre p lies in the interior of the arc (not one of its endpoints). - */ - void split(const Conic_point_2& p, Self& c1, Self& c2) const - { - // Make sure that p lies on the interior of the arc. - CGAL_precondition_code(Alg_kernel ker); - - CGAL_precondition (this->contains_point (p) && - ! ker.equal_2_object() (p, this->_source) && - ! ker.equal_2_object() (p, this->_target)); - - // Make copies of the current arc. - c1 = *this; - c2 = *this; - - // Assign the endpoints of the arc. - if ((this->_info & IS_DIRECTED_RIGHT) != 0) - { - // The arc is directed from left to right, so p becomes c1's target - // and c2's source. - c1._target = p; - c2._source = p; - - if (! p.is_generating_conic (_id)) { - c1._target.set_generating_conic (_id); - c2._source.set_generating_conic (_id); - } - } - else - { - // The arc is directed from right to left, so p becomes c2's target - // and c1's source. - c1._source = p; - c2._target = p; - - if (! p.is_generating_conic (_id)) { - c1._source.set_generating_conic (_id); - c2._target.set_generating_conic (_id); - } - } - - return; - } - - /*! - * Flip the arc. - * \return An arc with swapped source and target and a reverse orienation. - */ - Self flip() const - { - // Make a copy of the current arc. - Self arc = *this; - - // Reverse the orientation. - if (this->_orient == CLOCKWISE) arc._orient = COUNTERCLOCKWISE; - else if (this->_orient == COUNTERCLOCKWISE) arc._orient = CLOCKWISE; - - // Swap the source and the target. - arc._source = this->_target; - arc._target = this->_source; - - // Change the direction bit among the information flags. - arc._info = (this->_info ^ IS_DIRECTED_RIGHT); - - return arc; - } - - /*! - * Trim the arc given its new endpoints. - * \param ps The new source point. - * \param pt The new target point. - * \return The new trimmed arc. - * \pre Both ps and pt lies on the arc and must conform with the current - * direction of the arc. - */ - Self trim(const Conic_point_2& ps, const Conic_point_2& pt) const - { - // Make sure that both ps and pt lie on the arc. - CGAL_precondition(this->contains_point (ps) && - this->contains_point (pt)); - - // Make sure that the endpoints conform with the direction of the arc. - Self arc = *this; - Alg_kernel ker; - - if (! ((((this->_info & IS_DIRECTED_RIGHT) != 0) && - ker.compare_xy_2_object() (ps, pt) == SMALLER) || - (((this->_info & IS_DIRECTED_RIGHT) == 0) && - ker.compare_xy_2_object() (ps, pt) == LARGER))) - { - // We are allowed to change the direction only in case of a segment. - CGAL_assertion (this->_orient == COLLINEAR); - arc._info = (this->_info ^ IS_DIRECTED_RIGHT); - } - - // Make a copy of the current arc and assign its endpoints. - if (! ker.equal_2_object() (ps, this->_source)) { - arc._source = ps; - - if (! ps.is_generating_conic (_id)) - arc._source.set_generating_conic (_id); - } - - if (! ker.equal_2_object() (pt, this->_target)) - { - arc._target = pt; - - if (! pt.is_generating_conic (_id)) - arc._target.set_generating_conic (_id); - } - - return (arc); - } - - /*! - * Check whether the two arcs are equal (have the same graph). - * \param arc The compared arc. - * \return (true) if the two arcs have the same graph; (false) otherwise. - */ - bool equals (const Self& arc) const - { // The two arc must have the same supporting conic curves. - if (! _has_same_supporting_conic (arc)) - return false; + if (! _has_same_supporting_conic(xcv2)) return false; - // Check that the arc endpoints are the same. - Alg_kernel ker; + auto eq = alg_kernel.equal_2_object(); - if (this->_orient == COLLINEAR) { - CGAL_assertion(arc._orient == COLLINEAR); - return((ker.equal_2_object()(this->_source, arc._source) && - ker.equal_2_object()(this->_target, arc._target)) || - (ker.equal_2_object()(this->_source, arc._target) && - ker.equal_2_object()(this->_target, arc._source))); + // Check that the arc endpoints are the same. + if (xcv1.orientation() == COLLINEAR) { + CGAL_assertion(xcv2.orientation() == COLLINEAR); + return((eq(xcv1.source(), xcv2.source()) && + eq(xcv1.target(), xcv2.target())) || + (eq(xcv1.source(), xcv2.target()) && + eq(xcv1.target(), xcv2.source()))); } - if (this->_orient == arc._orient) { + if (xcv1.orientation() == xcv2.m_orient) { // Same orientation - the source and target points must be the same. - return (ker.equal_2_object()(this->_source, arc._source) && - ker.equal_2_object()(this->_target, arc._target)); - } - else { - // Reverse orientation - the source and target points must be swapped. - return (ker.equal_2_object()(this->_source, arc._target) && - ker.equal_2_object()(this->_target, arc._source)); + return (eq(xcv1.source(), xcv2.source()) && + eq(xcv1.target(), xcv2.target())); } + + // Reverse orientation - the source and target points must be swapped. + return (eq(xcv1.source(), xcv2.target()) && + eq(xcv1.target(), xcv2.source())); } /*! Check whether it is possible to merge the arc with the given arc. - * \param arc The query arc. - * \return (true) if it is possible to merge the two arcs; - * (false) otherwise. + * \param xcv1 The first arc. + * \param xcv2 The second arc. + * \return `true` if it is possible to merge the two arcs; + * `false` otherwise. */ - bool can_merge_with(const Self& arc) const - { + CGAL_DEPRECATED + bool can_merge_with(const Self& xcv2) const { + const auto& xcv1 = *this; + Alg_kernel alg_kernel; + // In order to merge the two arcs, they should have the same supporting // conic. - if (! _has_same_supporting_conic(arc)) return false; + if (! _has_same_supporting_conic(xcv2)) return false; // Check if the left endpoint of one curve is the right endpoint of the // other. - Alg_kernel ker; - - return (ker.equal_2_object() (right(), arc.left()) || - ker.equal_2_object() (left(), arc.right())); + auto eq = alg_kernel.equal_2_object(); + return (eq(xcv1.right(), xcv2.left()) || eq(xcv1.left(), xcv2.right())); } /*! Merge the current arc with the given arc. - * \param arc The arc to merge with. + * \param xcv1 The first arc to merge with. + * \param xcv2 The second arc to merge with. * \pre The two arcs are mergeable. */ - void merge(const Self& arc) - { - CGAL_precondition (this->can_merge_with (arc)); - - // Check if we should extend the arc to the left or to the right. - Alg_kernel ker; - - if (ker.equal_2_object() (right(), arc.left())) { + CGAL_DEPRECATED + void merge(const Self& xcv2) const { + const auto& xcv1 = *this; + Alg_kernel alg_kernel; + + // Check whether we should extend the arc to the left or to the right. + auto eq = alg_kernel.equal_2_object(); + if (eq(xcv1.right(), xcv2.left())) { // Extend the arc to the right. - if ((this->_info & IS_DIRECTED_RIGHT) != 0) this->_target = arc.right(); - else this->_source = arc.right(); + if (xcv1.test_flag(Self::IS_DIRECTED_RIGHT)) + xcv1.set_target(xcv2.right()); + else xcv1.set_source(xcv2.right()); } else { - CGAL_precondition (ker.equal_2_object() (left(), arc.right())); + CGAL_precondition(eq(xcv1.left(), xcv2.right())); // Extend the arc to the left. - if ((this->_info & IS_DIRECTED_RIGHT) != 0) - this->_source = arc.left(); - else - this->_target = arc.left(); + if (xcv1.test_flag(Self::IS_DIRECTED_RIGHT)) + xcv1.set_source(xcv2.left()); + else xcv1.set_target(xcv2.left()); } - - return; - } - - bool is_upper() const - { - return ((this->_info & FACING_UP) != 0); - } - - bool is_lower() const - { - return ((this->_info & FACING_DOWN) != 0); } - //@} private: - /// \name Auxiliary (private) functions. //@{ - /*! - * Set the properties of the x-monotone conic arc (for the usage of the - * constructors). - */ - void _set () - { - // Convert the coefficients of the supporting conic to algebraic numbers. - Nt_traits nt_traits; - - alg_r = nt_traits.convert (this->_r); - alg_s = nt_traits.convert (this->_s); - alg_t = nt_traits.convert (this->_t); - alg_u = nt_traits.convert (this->_u); - alg_v = nt_traits.convert (this->_v); - alg_w = nt_traits.convert (this->_w); - - // Set the generating conic ID for the source and target points. - this->_source.set_generating_conic (_id); - this->_target.set_generating_conic (_id); - - // Clear the _info bits. - this->_info = Conic_arc_2::IS_VALID; - - // Check if the arc is directed right (the target is lexicographically - // greater than the source point), or to the left. - Alg_kernel ker; - Comparison_result dir_res = ker.compare_xy_2_object() (this->_source, - this->_target); - - CGAL_assertion (dir_res != EQUAL); - - if (dir_res == SMALLER) - this->_info = (this->_info | IS_DIRECTED_RIGHT); - - // Compute the degree of the underlying conic. - if (CGAL::sign (this->_r) != ZERO || - CGAL::sign (this->_s) != ZERO || - CGAL::sign (this->_t) != ZERO) - { - this->_info = (this->_info | DEGREE_2); - - if (this->_orient == COLLINEAR) - { - this->_info = (this->_info | IS_SPECIAL_SEGMENT); - - if (ker.compare_x_2_object() (this->_source, this->_target) == EQUAL) - { - // The arc is a vertical segment: - this->_info = (this->_info | IS_VERTICAL_SEGMENT); - } - - return; - } - } - else - { - CGAL_assertion (CGAL::sign (this->_u) != ZERO || - CGAL::sign (this->_v) != ZERO); - - if (CGAL::sign (this->_v) == ZERO) - { - - // The supporting curve is of the form: _u*x + _w = 0 - this->_info = (this->_info | IS_VERTICAL_SEGMENT); - } - - this->_info = (this->_info | DEGREE_1); - - return; - } - - if (this->_orient == COLLINEAR) - return; - - // Compute a midpoint between the source and the target and get the y-value - // of the arc at its x-coordiante. - Point_2 p_mid = ker.construct_midpoint_2_object() (this->_source, - this->_target); - Algebraic ys[2]; - CGAL_assertion_code(int n_ys = ) - _conic_get_y_coordinates (p_mid.x(), ys); - - CGAL_assertion (n_ys != 0); - - // Check which solution lies on the x-monotone arc. - Point_2 p_arc_mid (p_mid.x(), ys[0]); - - if (_is_strictly_between_endpoints (p_arc_mid)) - { - // Mark that we should use the -sqrt(disc) root for points on this - // x-monotone arc. - this->_info = (this->_info & ~PLUS_SQRT_DISC_ROOT); - } - else - { - CGAL_assertion (n_ys == 2); - p_arc_mid = Point_2 (p_mid.x(), ys[1]); - - CGAL_assertion (_is_strictly_between_endpoints (p_arc_mid)); - - // Mark that we should use the +sqrt(disc) root for points on this - // x-monotone arc. - this->_info = (this->_info | PLUS_SQRT_DISC_ROOT); - } - - // Check whether the conic is facing up or facing down: - // Check whether the arc (which is x-monotone of degree 2) lies above or - // below the segement that contects its two end-points (x1,y1) and (x2,y2). - // To do that, we find the y coordinate of a point on the arc whose x - // coordinate is (x1+x2)/2 and compare it to (y1+y2)/2. - Comparison_result res = ker.compare_y_2_object() (p_arc_mid, p_mid); - - if (res == LARGER) - { - // The arc is above the connecting segment, so it is facing upwards. - this->_info = (this->_info | FACING_UP); - } - else if (res == SMALLER) - { - // The arc is below the connecting segment, so it is facing downwards. - this->_info = (this->_info | FACING_DOWN); - } - - return; - } - - /*! - * Check if the arc is a special segment connecting two algebraic endpoints - * (and has no undelying integer conic coefficients). - */ - bool _is_special_segment () const - { - return ((this->_info & IS_SPECIAL_SEGMENT) != 0); - } - - /*! - * Check whether the given point lies on the supporting conic of the arc. + /*! Check whether the given point lies on the supporting conic of the arc. * \param px The x-coordinate of query point. * \param py The y-coordinate of query point. * \return (true) if p lies on the supporting conic; (false) otherwise. */ - bool _is_on_supporting_conic (const Algebraic& px, - const Algebraic& py) const - { - CGAL::Sign _sign; - - if (! _is_special_segment()) - { + bool is_on_supporting_conic(const Algebraic& px, const Algebraic& py) const { + CGAL::Sign my_sign = (! is_special_segment()) ? // Check whether p satisfies the conic equation. // The point must satisfy: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0. - _sign = CGAL::sign ((alg_r*px + alg_t*py + alg_u) * px + - (alg_s*py + alg_v) * py + - alg_w); - } - else - { + CGAL::sign((m_alg_r*px + m_alg_t*py + m_alg_u) * px + + (m_alg_s*py + m_alg_v) * py + m_alg_w) : // Check whether p satisfies the equation of the line stored with the // extra data. - _sign = _sign_of_extra_data (px, py); - } - - return (_sign == ZERO); - } - - /*! - * Check whether the two arcs have the same supporting conic. - * \param arc The compared arc. - * \return (true) if the two supporting conics are the same. - */ - bool _has_same_supporting_conic (const Self& arc) const - { - // Check if the two arcs originate from the same conic: - if (_id == arc._id && _id.is_valid() && arc._id.is_valid()) - return (true); - - // In case both arcs are collinear, check if they have the same - // supporting lines. - if (this->_orient == COLLINEAR && arc._orient == COLLINEAR) - { - // Construct the two supporting lines and compare them. - Alg_kernel ker; - typename Alg_kernel::Construct_line_2 construct_line = - ker.construct_line_2_object(); - typename Alg_kernel::Line_2 l1 = construct_line (this->_source, - this->_target); - typename Alg_kernel::Line_2 l2 = construct_line (arc._source, - arc._target); - typename Alg_kernel::Equal_2 equal = ker.equal_2_object(); - - if (equal (l1, l2)) - return (true); - - // Try to compare l1 with the opposite of l2. - l2 = construct_line (arc._target, arc._source); - - return (equal (l1, l2)); - } - else if (this->_orient == COLLINEAR || arc._orient == COLLINEAR) - { - // Only one arc is collinear, so the supporting curves cannot be the - // same: - return (false); - } - - // Check whether the coefficients of the two supporting conics are equal - // up to a constant factor. - Integer factor1 = 1; - Integer factor2 = 1; - - if (CGAL::sign (this->_r) != ZERO) - factor1 = this->_r; - else if (CGAL::sign (this->_s) != ZERO) - factor1 = this->_s; - else if (CGAL::sign (this->_t) != ZERO) - factor1 = this->_t; - else if (CGAL::sign (this->_u) != ZERO) - factor1 = this->_u; - else if (CGAL::sign (this->_v) != ZERO) - factor1 = this->_v; - else if (CGAL::sign (this->_w) != ZERO) - factor1 = this->_w; - - if (CGAL::sign (arc._r) != ZERO) - factor2 = arc._r; - else if (CGAL::sign (arc._s) != ZERO) - factor2 = arc._s; - else if (CGAL::sign (arc._t) != ZERO) - factor2 = arc._t; - else if (CGAL::sign (arc._u) != ZERO) - - factor2 = arc._u; - else if (CGAL::sign (arc._v) != ZERO) - factor2 = arc._v; - else if (CGAL::sign (arc._w) != ZERO) - factor2 = arc._w; - - return (CGAL::compare (this->_r * factor2, arc._r * factor1) == EQUAL && - CGAL::compare (this->_s * factor2, arc._s * factor1) == EQUAL && - CGAL::compare (this->_t * factor2, arc._t * factor1) == EQUAL && - CGAL::compare (this->_u * factor2, arc._u * factor1) == EQUAL && - CGAL::compare (this->_v * factor2, arc._v * factor1) == EQUAL && - CGAL::compare (this->_w * factor2, arc._w * factor1) == EQUAL); + sign_of_extra_data(px, py); + return (my_sign == ZERO); } - /*! - * Get the i'th order derivative by x of the conic at the point p=(x,y). +public: + /*! Obtain the i'th order derivative by x of the conic at the point p=(x,y). * \param p The point where we derive. * \param i The order of the derivatives (either 1, 2 or 3). * \param slope_numer The numerator of the slope. * \param slope_denom The denominator of the slope. * \todo Allow higher order derivatives. */ - void _derive_by_x_at (const Point_2& p, const unsigned int& i, - Algebraic& slope_numer, Algebraic& slope_denom) const - { - if (_is_special_segment()) - { + void derive_by_x_at(const Alg_point_2& p, const unsigned int& i, + Algebraic& slope_numer, Algebraic& slope_denom) const { + if (is_special_segment()) { // Special treatment for special segments, given by (a*x + b*y + c = 0), // so their first-order derivative by x is simply -a/b. The higher-order // derivatives are all 0. - if (i == 1) - { - if (CGAL::sign (this->_extra_data_P->b) != NEGATIVE) - { - slope_numer = - this->_extra_data_P->a; - slope_denom = this->_extra_data_P->b; + if (i == 1) { + if (CGAL::sign(this->m_extra_data->b) != NEGATIVE) { + slope_numer = - this->m_extra_data->a; + slope_denom = this->m_extra_data->b; } - else - { - slope_numer = this->_extra_data_P->a; - slope_denom = - this->_extra_data_P->b; + else { + slope_numer = this->m_extra_data->a; + slope_denom = - this->m_extra_data->b; } } - else - { + else { slope_numer = 0; slope_denom = 1; } @@ -1401,20 +1117,17 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { // y' = - ---------------- = - ------- // 2s*y + t*x + v beta // - const Algebraic _two = 2; - const Algebraic sl_numer = _two*alg_r*p.x() + alg_t*p.y() + alg_u; - const Algebraic sl_denom = _two*alg_s*p.y() + alg_t*p.x() + alg_v; + const Algebraic two = 2; + const Algebraic sl_numer = two*m_alg_r*p.x() + m_alg_t*p.y() + m_alg_u; + const Algebraic sl_denom = two*m_alg_s*p.y() + m_alg_t*p.x() + m_alg_v; - if (i == 1) - { + if (i == 1) { // Make sure that the denominator is always positive. - if (CGAL::sign (sl_denom) != NEGATIVE) - { + if (CGAL::sign (sl_denom) != NEGATIVE) { slope_numer = -sl_numer; slope_denom = sl_denom; } - else - { + else { slope_numer = sl_numer; slope_denom = -sl_denom; } @@ -1428,22 +1141,18 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { // y'' = -2 ------------------------------------- = ------- // beta^3 delta // - const Algebraic sl2_numer = alg_s * sl_numer*sl_numer - - alg_t * sl_numer*sl_denom + - alg_r * sl_denom*sl_denom; - const Algebraic sl2_denom = sl_denom*sl_denom*sl_denom; + const Algebraic sl2_numer = m_alg_s * sl_numer*sl_numer - + m_alg_t * sl_numer*sl_denom + m_alg_r * sl_denom*sl_denom; + const Algebraic sl2_denom = sl_denom*sl_denom*sl_denom; - if (i == 2) - { + if (i == 2) { // Make sure that the denominator is always positive. - if (CGAL::sign (sl_denom) != NEGATIVE) - { - slope_numer = -_two *sl2_numer; + if (CGAL::sign (sl_denom) != NEGATIVE) { + slope_numer = -two *sl2_numer; slope_denom = sl2_denom; } - else - { - slope_numer = _two *sl2_numer; + else { + slope_numer = two *sl2_numer; slope_denom = -sl2_denom; } @@ -1456,20 +1165,17 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { // y''' = -6 ------------------------------ // beta^2 * delta // - const Algebraic sl3_numer = (_two * alg_s * sl_numer - - alg_t * sl_denom) * sl2_numer; - const Algebraic sl3_denom = sl_denom*sl_denom * sl2_denom; + const Algebraic sl3_numer = + (two * m_alg_s * sl_numer - m_alg_t * sl_denom) * sl2_numer; + const Algebraic sl3_denom = sl_denom*sl_denom * sl2_denom; - if (i == 3) - { + if (i == 3) { // Make sure that the denominator is always positive. - if (CGAL::sign (sl_denom) != NEGATIVE) - { + if (CGAL::sign (sl_denom) != NEGATIVE) { slope_numer = -6 * sl3_numer; slope_denom = sl3_denom; } - else - { + else { slope_numer = 6 * sl3_numer; slope_denom = -sl2_denom; } @@ -1479,40 +1185,32 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { // \todo Handle higher-order derivatives as well. CGAL_error(); - return; } - /*! - * Get the i'th order derivative by y of the conic at the point p=(x,y). + /*! Obtain the i'th order derivative by y of the conic at the point p=(x,y). * \param p The point where we derive. * \param i The order of the derivatives (either 1, 2 or 3). * \param slope_numer The numerator of the slope. * \param slope_denom The denominator of the slope. * \todo Allow higher order derivatives. */ - void _derive_by_y_at (const Point_2& p, const int& i, - Algebraic& slope_numer, Algebraic& slope_denom) const - { - if (_is_special_segment()) - { + void derive_by_y_at(const Alg_point_2& p, const int& i, + Algebraic& slope_numer, Algebraic& slope_denom) const { + if (is_special_segment()) { // Special treatment for special segments, given by (a*x + b*y + c = 0), // so their first-order derivative by x is simply -b/a. The higher-order // derivatives are all 0. - if (i == 1) - { - if (CGAL::sign (this->_extra_data_P->a) != NEGATIVE) - { - slope_numer = - this->_extra_data_P->b; - slope_denom = this->_extra_data_P->a; + if (i == 1) { + if (CGAL::sign(this->m_extra_data->a) != NEGATIVE) { + slope_numer = - this->m_extra_data->b; + slope_denom = this->m_extra_data->a; } - else - { - slope_numer = this->_extra_data_P->b; - slope_denom = - this->_extra_data_P->a; + else { + slope_numer = this->m_extra_data->b; + slope_denom = - this->m_extra_data->a; } } - else - { + else { slope_numer = 0; slope_denom = 1; } @@ -1528,25 +1226,21 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { // x' = - ---------------- = ------- // 2r*x + t*y + u beta // - const Algebraic _two = 2; - const Algebraic sl_numer = _two*alg_s*p.y() + alg_t*p.x() + alg_v; - const Algebraic sl_denom = _two*alg_r*p.x() + alg_t*p.y() + alg_u; + const Algebraic two = 2; + const Algebraic sl_numer = two*m_alg_s*p.y() + m_alg_t*p.x() + m_alg_v; + const Algebraic sl_denom = two*m_alg_r*p.x() + m_alg_t*p.y() + m_alg_u; - if (i == 1) - { + if (i == 1) { // Make sure that the denominator is always positive. - if (CGAL::sign (sl_denom) != NEGATIVE) - { + if (CGAL::sign (sl_denom) != NEGATIVE) { slope_numer = -sl_numer; slope_denom = sl_denom; } - else - { + else { slope_numer = sl_numer; slope_denom = -sl_denom; } - return; } @@ -1556,23 +1250,18 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { // x'' = -2 ------------------------------------- // beta^3 // - const Algebraic sl2_numer = alg_r * sl_numer*sl_numer - - alg_t * sl_numer*sl_denom + - alg_s * sl_denom*sl_denom; - const Algebraic sl2_denom = sl_denom*sl_denom*sl_denom; - - if (i == 2) - { + const Algebraic sl2_numer = m_alg_r * sl_numer*sl_numer - + m_alg_t * sl_numer*sl_denom + m_alg_s * sl_denom*sl_denom; + const Algebraic sl2_denom = sl_denom*sl_denom*sl_denom; + if (i == 2) { // Make sure that the denominator is always positive. - if (CGAL::sign (sl_denom) != NEGATIVE) - { - slope_numer = -_two *sl2_numer; + if (CGAL::sign (sl_denom) != NEGATIVE) { + slope_numer = -two *sl2_numer; slope_denom = sl2_denom; } - else - { - slope_numer = _two *sl2_numer; + else { + slope_numer = two *sl2_numer; slope_denom = -sl2_denom; } @@ -1585,20 +1274,17 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { // y''' = -6 ------------------------------ // beta^2 * delta // - const Algebraic sl3_numer = (_two * alg_r * sl_numer - - alg_t * sl_denom) * sl2_numer; - const Algebraic sl3_denom = sl_denom*sl_denom * sl2_denom; + const Algebraic sl3_numer = + (two * m_alg_r * sl_numer - m_alg_t * sl_denom) * sl2_numer; + const Algebraic sl3_denom = sl_denom*sl_denom * sl2_denom; - if (i == 3) - { + if (i == 3) { // Make sure that the denominator is always positive. - if (CGAL::sign (sl_denom) != NEGATIVE) - { + if (CGAL::sign(sl_denom) != NEGATIVE) { slope_numer = -6 * sl3_numer; slope_denom = sl3_denom; } - else - { + else { slope_numer = 6 * sl3_numer; slope_denom = -sl2_denom; } @@ -1608,363 +1294,86 @@ class _Conic_x_monotone_arc_2 : private Conic_arc_ { // \todo Handle higher-order derivatives as well. CGAL_error(); - return; - } - - /*! - * Compute the overlap with a given arc, which is supposed to have the same - * supporting conic curve as this arc. - * \param arc The given arc. - * \param overlap Output: The overlapping arc (if any). - * \return Whether we found an overlap. - */ - bool _compute_overlap (const Self& arc, Self& overlap) const - { - // Check if the two arcs are identical. - if (equals (arc)) - { - overlap = arc; - return (true); - } - - if (_is_strictly_between_endpoints (arc.left())) - { - if (_is_strictly_between_endpoints(arc.right())) - { - // Case 1 - *this: +-----------> - // arc: +=====> - overlap = arc; - return (true); - } - else - { - // Case 2 - *this: +-----------> - // arc: +=====> - overlap = *this; - - if ((overlap._info & IS_DIRECTED_RIGHT) != 0) - overlap._source = arc.left(); - else - overlap._target = arc.left(); - - return (true); - } - } - else if (_is_strictly_between_endpoints (arc.right())) - { - // Case 3 - *this: +-----------> - // arc: +=====> - overlap = *this; - - if ((overlap._info & IS_DIRECTED_RIGHT) != 0) - overlap._target = arc.right(); - else - overlap._source = arc.right(); - - return (true); - } - else if (arc._is_between_endpoints (this->_source) && - arc._is_between_endpoints (this->_target) && - (arc._is_strictly_between_endpoints(this->_source) || - arc._is_strictly_between_endpoints(this->_target))) - { - // Case 4 - *this: +-----------> - // arc: +================> - overlap = *this; - return (true); - } - - // If we reached here, there are no overlaps: - return (false); - } - - /*! - * Intersect the supporing conic curves of this arc and the given arc. - * \param arc The arc to intersect with. - * \param inter_list The list of intersection points. - */ - void _intersect_supporting_conics(const Self& arc, - Intersection_list& inter_list) const - { - if (_is_special_segment() && ! arc._is_special_segment()) { - // If one of the arcs is a special segment, make sure it is (arc). - arc._intersect_supporting_conics(*this, inter_list); - return; - } - - const int deg1 = ((this->_info & DEGREE_MASK) == DEGREE_1) ? 1 : 2; - const int deg2 = ((arc._info & DEGREE_MASK) == DEGREE_1) ? 1 : 2; - Nt_traits nt_traits; - Algebraic xs[4]; - int n_xs = 0; - Algebraic ys[4]; - int n_ys = 0; - - if (arc._is_special_segment()) { - // The second arc is a special segment (a*x + b*y + c = 0). - if (_is_special_segment()) { - // Both arc are sepcial segment, so they have at most one intersection - // point. - Algebraic denom = this->_extra_data_P->a * arc._extra_data_P->b - - this->_extra_data_P->b * arc._extra_data_P->a; - - if (CGAL::sign (denom) != CGAL::ZERO) { - xs[0] = (this->_extra_data_P->b * arc._extra_data_P->c - - this->_extra_data_P->c * arc._extra_data_P->b) / denom; - n_xs = 1; - - ys[0] = (this->_extra_data_P->c * arc._extra_data_P->a - - this->_extra_data_P->a * arc._extra_data_P->c) / denom; - n_ys = 1; - } - } - else { - // Compute the x-coordinates of the intersection points. - n_xs = _compute_resultant_roots (nt_traits, - alg_r, alg_s, alg_t, - alg_u, alg_v, alg_w, - deg1, - arc._extra_data_P->a, - arc._extra_data_P->b, - arc._extra_data_P->c, - xs); - CGAL_assertion (n_xs <= 2); - - // Compute the y-coordinates of the intersection points. - n_ys = _compute_resultant_roots (nt_traits, - alg_s, alg_r, alg_t, - alg_v, alg_u, alg_w, - deg1, - arc._extra_data_P->b, - arc._extra_data_P->a, - arc._extra_data_P->c, - ys); - CGAL_assertion (n_ys <= 2); - } - } - else { - // Compute the x-coordinates of the intersection points. - n_xs = _compute_resultant_roots (nt_traits, - this->_r, this->_s, this->_t, - this->_u, this->_v, this->_w, - deg1, - arc._r, arc._s, arc._t, - arc._u, arc._v, arc._w, - deg2, - xs); - CGAL_assertion (n_xs <= 4); - - // Compute the y-coordinates of the intersection points. - n_ys = _compute_resultant_roots (nt_traits, - this->_s, this->_r, this->_t, - this->_v, this->_u, this->_w, - deg1, - arc._s, arc._r, arc._t, - arc._v, arc._u, arc._w, - deg2, - ys); - CGAL_assertion(n_ys <= 4); - } - - // Pair the coordinates of the intersection points. As the vectors of - // x and y-coordinates are sorted in ascending order, we output the - // intersection points in lexicographically ascending order. - unsigned int mult; - int i, j; - - if (arc._is_special_segment()) - { - if (n_xs == 0 || n_ys == 0) - return; - - if (n_xs == 1 && n_ys == 1) - { - // Single intersection. - Conic_point_2 ip (xs[0], ys[0]); - - ip.set_generating_conic (_id); - ip.set_generating_conic (arc._id); - - // In case the other curve is of degree 2, this is a tangency point. - mult = (deg1 == 1 || _is_special_segment()) ? 1 : 2; - inter_list.push_back(Intersection_point (ip, mult)); - } - else if (n_xs == 1 && n_ys == 2) - { - Conic_point_2 ip1 (xs[0], ys[0]); - - ip1.set_generating_conic (_id); - ip1.set_generating_conic (arc._id); - - inter_list.push_back(Intersection_point (ip1, 1)); - - Conic_point_2 ip2 (xs[0], ys[1]); - - ip2.set_generating_conic (_id); - ip2.set_generating_conic (arc._id); - - inter_list.push_back(Intersection_point (ip2, 1)); - } - else if (n_xs == 2 && n_ys == 1) - { - Conic_point_2 ip1 (xs[0], ys[0]); - - ip1.set_generating_conic (_id); - ip1.set_generating_conic (arc._id); - - inter_list.push_back(Intersection_point (ip1, 1)); - - Conic_point_2 ip2 (xs[1], ys[0]); - - ip2.set_generating_conic (_id); - ip2.set_generating_conic (arc._id); - - inter_list.push_back(Intersection_point (ip2, 1)); - - } - else { - CGAL_assertion (n_xs == 2 && n_ys == 2); - - // The x-coordinates and the y-coordinates are given in ascending - // order. If the slope of the segment is positive, we pair the - // coordinates as is - otherwise, we swap the pairs. - int ind_first_y = 0, ind_second_y = 1; - - if (CGAL::sign (arc._extra_data_P->b) == - CGAL::sign(arc._extra_data_P->a)) - { - ind_first_y = 1; - ind_second_y = 0; - } - - Conic_point_2 ip1(xs[0], ys[ind_first_y]); - - ip1.set_generating_conic(_id); - ip1.set_generating_conic(arc._id); - - inter_list.push_back(Intersection_point (ip1, 1)); - - Conic_point_2 ip2(xs[1], ys[ind_second_y]); - - ip2.set_generating_conic (_id); - ip2.set_generating_conic (arc._id); - - inter_list.push_back(Intersection_point(ip2, 1)); - } - - return; - } - - for (i = 0; i < n_xs; i++) { - for (j = 0; j < n_ys; j++) { - if (_is_on_supporting_conic (xs[i], ys[j]) && - arc._is_on_supporting_conic (xs[i], ys[j])) - { - // Create the intersection point and set its generating conics. - Conic_point_2 ip(xs[i], ys[j]); - - ip.set_generating_conic (_id); - ip.set_generating_conic (arc._id); - - // Compute the multiplicity of the intersection point. - if (deg1 == 1 && deg2 == 1) mult = 1; - else mult = _multiplicity_of_intersection_point(arc, ip); - - // Insert the intersection point to the output list. - inter_list.push_back(Intersection_point(ip, mult)); - } - } - } - - return; } - /*! - * Compute the multiplicity of an intersection point. +private: + /*! Compute the multiplicity of an intersection point. * \param arc The arc to intersect with. * \param p The intersection point. * \return The multiplicity of the intersection point. */ - unsigned int _multiplicity_of_intersection_point (const Self& arc, - const Point_2& p) const - { - CGAL_assertion (! _is_special_segment() || ! arc._is_special_segment()); + size_t multiplicity_of_intersection_point(const Self& xcv, + const Alg_point_2& p) const { + CGAL_assertion(! is_special_segment() || ! xcv.is_special_segment()); // Compare the slopes of the two arcs at p, using their first-order // partial derivatives. - Algebraic slope1_numer, slope1_denom; - Algebraic slope2_numer, slope2_denom; + Algebraic slope1_numer, slope1_denom; + Algebraic slope2_numer, slope2_denom; - _derive_by_x_at (p, 1, slope1_numer, slope1_denom); - arc._derive_by_x_at (p, 1, slope2_numer, slope2_denom); + derive_by_x_at(p, 1, slope1_numer, slope1_denom); + xcv.derive_by_x_at(p, 1, slope2_numer, slope2_denom); - if (CGAL::compare (slope1_numer*slope2_denom, - slope2_numer*slope1_denom) != EQUAL) - { + if (CGAL::compare(slope1_numer*slope2_denom, slope2_numer*slope1_denom) != + EQUAL) { // Different slopes at p - the mutiplicity of p is 1: - return (1); + return 1; } - if (CGAL::sign (slope1_denom) != ZERO && - CGAL::sign (slope2_denom) != ZERO) - { + if (CGAL::sign(slope1_denom) != ZERO && + CGAL::sign(slope2_denom) != ZERO) { // The curves do not have a vertical slope at p. // Compare their second-order derivative by x: - _derive_by_x_at (p, 2, slope1_numer, slope1_denom); - arc._derive_by_x_at (p, 2, slope2_numer, slope2_denom); + derive_by_x_at(p, 2, slope1_numer, slope1_denom); + xcv.derive_by_x_at(p, 2, slope2_numer, slope2_denom); } - else - { + else { // Both curves have a vertical slope at p. // Compare their second-order derivative by y: - _derive_by_y_at (p, 2, slope1_numer, slope1_denom); - arc._derive_by_y_at (p, 2, slope2_numer, slope2_denom); + derive_by_y_at(p, 2, slope1_numer, slope1_denom); + xcv.derive_by_y_at(p, 2, slope2_numer, slope2_denom); } - if (CGAL::compare (slope1_numer*slope2_denom, - slope2_numer*slope1_denom) != EQUAL) + if (CGAL::compare(slope1_numer*slope2_denom, + slope2_numer*slope1_denom) != EQUAL) { // Different curvatures at p - the mutiplicity of p is 2: - return (2); + return 2; } // If we reached here, the multiplicity of the intersection point is 3: - return (3); + return 3; } //@} }; -/*! - * Exporter for x-monotone conic arcs. +/*! Exporter for x-monotone conic arcs. */ -template -std::ostream& operator<< (std::ostream& os, - const _Conic_x_monotone_arc_2& arc) +template +std::ostream& operator<<(std::ostream& os, + const Conic_x_monotone_arc_2& xcv) { // Output the supporting conic curve. - os << "{" << CGAL::to_double(arc.r()) << "*x^2 + " - << CGAL::to_double(arc.s()) << "*y^2 + " - << CGAL::to_double(arc.t()) << "*xy + " - << CGAL::to_double(arc.u()) << "*x + " - << CGAL::to_double(arc.v()) << "*y + " - << CGAL::to_double(arc.w()) << "}"; + os << "{" << CGAL::to_double(xcv.r()) << "*x^2 + " + << CGAL::to_double(xcv.s()) << "*y^2 + " + << CGAL::to_double(xcv.t()) << "*xy + " + << CGAL::to_double(xcv.u()) << "*x + " + << CGAL::to_double(xcv.v()) << "*y + " + << CGAL::to_double(xcv.w()) << "}"; // Output the endpoints. - os << " : (" << CGAL::to_double(arc.source().x()) << "," - << CGAL::to_double(arc.source().y()) << ") "; + os << " : (" << CGAL::to_double(xcv.source().x()) << "," + << CGAL::to_double(xcv.source().y()) << ") "; - if (arc.orientation() == CLOCKWISE) - os << "--cw-->"; - else if (arc.orientation() == COUNTERCLOCKWISE) - os << "--ccw-->"; - else - os << "--l-->"; + if (xcv.orientation() == CLOCKWISE) os << "--cw-->"; + else if (xcv.orientation() == COUNTERCLOCKWISE) os << "--ccw-->"; + else os << "--l-->"; - os << " (" << CGAL::to_double(arc.target().x()) << "," - << CGAL::to_double(arc.target().y()) << ")"; + os << " (" << CGAL::to_double(xcv.target().x()) << "," + << CGAL::to_double(xcv.target().y()) << ")"; - return (os); + return os; } } //namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h index d826895d..037f349a 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h $ -// $Id: Consolidated_curve_data_aux.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h $ +// $Id: include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Curve_data_aux.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Curve_data_aux.h index 27d7e387..446a24c3 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Curve_data_aux.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Curve_data_aux.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Curve_data_aux.h $ -// $Id: Curve_data_aux.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Curve_data_aux.h $ +// $Id: include/CGAL/Arr_geometry_traits/Curve_data_aux.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h index 34f5b08b..5b880de3 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h $ -// $Id: Polycurve_2_iostream.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h $ +// $Id: include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Efi Fogel diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/One_root_number.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/One_root_number.h index c6182f5b..75274ea5 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/One_root_number.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/One_root_number.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/One_root_number.h $ -// $Id: One_root_number.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/One_root_number.h $ +// $Id: include/CGAL/Arr_geometry_traits/One_root_number.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -474,7 +474,7 @@ CGAL::Comparison_result compare (const _One_root_number& x, sign_right = ZERO; } - // Check whether on of the terms is zero. In this case, the comparsion + // Check whether on of the terms is zero. In this case, the comparison // result is simpler: if (sign_left == ZERO) { @@ -507,7 +507,7 @@ CGAL::Comparison_result compare (const _One_root_number& x, // We now square both terms and look at the sign of the one-root number: // ((a1 - a2)^2 - (b1^2*c1 + b2^2*c2)) + 2*b1*b2*sqrt(c1*c2) // - // If both signs are negative, we should swap the comparsion result + // If both signs are negative, we should swap the comparison result // we eventually compute. const NT A = diff_alpha*diff_alpha - (x_sqr + y_sqr); const NT B = 2 * x.beta() * y.beta(); diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Polycurve_2.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Polycurve_2.h index 738c6d3c..c80b613a 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Polycurve_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Polycurve_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polycurve_2.h $ -// $Id: Polycurve_2.h 7cd3a26 2020-09-08T17:46:08+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polycurve_2.h $ +// $Id: include/CGAL/Arr_geometry_traits/Polycurve_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein @@ -96,7 +96,7 @@ class Polycurve_2 { m_subcurves() { typedef typename std::iterator_traits::value_type VT; - typedef typename boost::is_same::type Is_point; + typedef typename std::is_same::type Is_point; construct_polycurve(begin, end, Is_point()); } @@ -108,7 +108,7 @@ class Polycurve_2 { */ template void construct_polycurve(InputIterator begin, InputIterator end, - boost::false_type) + std::false_type) { m_subcurves.assign(begin, end); } /*! Construct a polycurve from a range of points. @@ -120,7 +120,7 @@ class Polycurve_2 { template CGAL_DEPRECATED void construct_polycurve(InputIterator begin, InputIterator end, - boost::true_type) + std::true_type) { // Check if there are no points in the range: InputIterator ps = begin; @@ -433,7 +433,7 @@ class X_monotone_polycurve_2 : Base(begin, end) { typedef typename std::iterator_traits::value_type VT; - typedef typename boost::is_same::type Is_point; + typedef typename std::is_same::type Is_point; construct_x_monotone_polycurve(begin, end, Is_point()); } @@ -444,7 +444,7 @@ class X_monotone_polycurve_2 : */ template void construct_x_monotone_polycurve(InputIterator, InputIterator, - boost::false_type) + std::false_type) {} /*! Construct from a range of points, defining the endpoints of the @@ -453,7 +453,7 @@ class X_monotone_polycurve_2 : template CGAL_DEPRECATED void construct_x_monotone_polycurve(InputIterator, InputIterator, - boost::true_type) + std::true_type) {} }; diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Polyline_2.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Polyline_2.h index ceb91fc1..ef7f0d12 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Polyline_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Polyline_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polyline_2.h $ -// $Id: Polyline_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polyline_2.h $ +// $Id: include/CGAL/Arr_geometry_traits/Polyline_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Efi Fogel diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Rational_arc_2.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Rational_arc_2.h index 04d1e119..9dab79ce 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Rational_arc_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Rational_arc_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h $ -// $Id: Rational_arc_2.h 58276ed 2020-03-31T18:34:28+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h $ +// $Id: include/CGAL/Arr_geometry_traits/Rational_arc_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -95,7 +95,7 @@ class _Base_rational_arc_2 public: - /// \name Constrcution methods. + /// \name Construction methods. //@{ /*! @@ -339,7 +339,7 @@ class _Base_rational_arc_2 if (! valid) return; - // Analyze the bahaviour of the rational function at x = -oo (the source). + // Analyze the behaviour of the rational function at x = -oo (the source). Algebraic y0; const Arr_parameter_space inf_s = _analyze_at_minus_infinity (_numer, _denom, y0); @@ -351,7 +351,7 @@ class _Base_rational_arc_2 else // if (inf_s == ARR_INTERIOR) _ps = Point_2 (0, y0); - // Analyze the bahaviour of the rational function at x = +oo (the target). + // Analyze the behaviour of the rational function at x = +oo (the target). const Arr_parameter_space inf_t = _analyze_at_plus_infinity (_numer, _denom, y0); @@ -989,7 +989,7 @@ class _Base_rational_arc_2 // Both arcs are defined to the same side (left or right) of the vertical // asymptote. If one is defined at y = -oo and the other at y = +oo, we - // preform a "lexicographic" comparison. + // perform a "lexicographic" comparison. const Arr_parameter_space inf_y1 = (ind1 == ARR_MIN_END ? left_infinite_in_y() : right_infinite_in_y()); const Arr_parameter_space inf_y2 = (ind2 == ARR_MIN_END) ? @@ -1833,7 +1833,7 @@ class _Continuous_rational_arc_2 : typedef std::pair Intersection_point; - /// \name Constrcution methods. + /// \name Construction methods. //@{ /*! @@ -1844,7 +1844,7 @@ class _Continuous_rational_arc_2 : {} /*! - * Constrcutor from a base arc. + * Constructor from a base arc. */ _Continuous_rational_arc_2 (const Base& arc) : Base (arc) @@ -2346,7 +2346,7 @@ class _Rational_arc_2 : public _Base_rational_arc_2 typedef typename Base::Rat_vector Rat_vector; typedef typename Base::Polynomial Polynomial; - /// \name Constrcution methods. + /// \name Construction methods. //@{ /*! diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Segment_assertions.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Segment_assertions.h index 7d8639df..d9731f04 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Segment_assertions.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/Segment_assertions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Segment_assertions.h $ -// $Id: Segment_assertions.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Segment_assertions.h $ +// $Id: include/CGAL/Arr_geometry_traits/Segment_assertions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h index 1968a875..07d5b2e3 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h $ -// $Id: de_Casteljau_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h $ +// $Id: include/CGAL/Arr_geometry_traits/de_Casteljau_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_landmarks_point_location.h b/thirdparty/CGAL/include/CGAL/Arr_landmarks_point_location.h index 2054b3fa..6620a21b 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_landmarks_point_location.h +++ b/thirdparty/CGAL/include/CGAL/Arr_landmarks_point_location.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h $ -// $Id: Arr_landmarks_point_location.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h $ +// $Id: include/CGAL/Arr_landmarks_point_location.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -262,7 +262,7 @@ class Arr_landmarks_point_location * \param new_vertex Output: if found a closer vertex to the query point. * \param cv_is_contained_in_seg Output: Whether cv is contained inside seg. * \return A handle to the halfedge (if no intersecting edge is found, the - * function returns an ivalid halfedge handle). + * function returns an invalid halfedge handle). */ Halfedge_const_handle _intersection_with_ccb(Ccb_halfedge_const_circulator circ, diff --git a/thirdparty/CGAL/include/CGAL/Arr_line_arc_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_line_arc_traits_2.h index 214bdc8a..a09b5e56 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_line_arc_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_line_arc_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h $ -// $Id: Arr_line_arc_traits_2.h 5298ff1 2020-07-02T19:10:29+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h $ +// $Id: include/CGAL/Arr_line_arc_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Julien Hazebrouck @@ -125,7 +125,7 @@ class Arr_line_arc_traits_2 { template OutputIterator operator()(const Curve_2& line, OutputIterator oi) const { - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; *oi++ = Make_x_monotone_result(line); return oi; } diff --git a/thirdparty/CGAL/include/CGAL/Arr_linear_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_linear_traits_2.h index 4ba3f624..9bc5d551 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_linear_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_linear_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h $ -// $Id: Arr_linear_traits_2.h c0838c5 2021-12-16T16:33:43+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h $ +// $Id: include/CGAL/Arr_linear_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -26,7 +26,7 @@ #include -#include +#include #include #include @@ -592,7 +592,7 @@ class Arr_linear_traits_2 : public Kernel_ { Compare_y_at_x_2 compare_y_at_x = m_traits.compare_y_at_x_2_object(); //preconditions - //check if source and taget are distinct points and they lie on the line. + //check if source and target are distinct points and they lie on the line. CGAL_precondition(!equal(src, tgt)); CGAL_precondition(compare_y_at_x(src, xcv) == EQUAL); CGAL_precondition(compare_y_at_x(tgt, xcv) == EQUAL); @@ -1249,7 +1249,7 @@ class Arr_linear_traits_2 : public Kernel_ { OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { // Wrap the segment with a variant. - typedef boost::variant + typedef std::variant Make_x_monotone_result; *oi++ = Make_x_monotone_result(cv); return oi; @@ -1326,8 +1326,6 @@ class Arr_linear_traits_2 : public Kernel_ { OutputIterator oi) const { typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; CGAL_precondition(! cv1.is_degenerate()); CGAL_precondition(! cv2.is_degenerate()); @@ -1340,7 +1338,7 @@ class Arr_linear_traits_2 : public Kernel_ { if (! res) return oi; // Check whether we have a single intersection point. - const Point_2* ip = boost::get(&*res); + const Point_2* ip = std::get_if(&*res); if (ip != nullptr) { // Check whether the intersection point ip lies on both segments. const bool ip_on_cv1 = cv1.is_vertical() ? @@ -1354,7 +1352,7 @@ class Arr_linear_traits_2 : public Kernel_ { // Create a pair representing the point with its multiplicity, // which is always 1 for line segments. Intersection_point ip_mult(*ip, 1); - *oi++ = Intersection_result(ip_mult); + *oi++ = ip_mult; } } return oi; @@ -1398,14 +1396,14 @@ class Arr_linear_traits_2 : public Kernel_ { if (cmp_res == SMALLER) { // We have discovered a true overlapping subcurve: - *oi++ = Intersection_result(ovlp); + *oi++ = ovlp; } else if (cmp_res == EQUAL) { // The two objects have the same supporting line, but they just share // a common endpoint. Thus we have an intersection point, but we leave // the multiplicity of this point undefined. Intersection_point ip_mult(ovlp.left(), 0); - *oi++ = Intersection_result(ip_mult); + *oi++ = ip_mult; } return oi; diff --git a/thirdparty/CGAL/include/CGAL/Arr_naive_point_location.h b/thirdparty/CGAL/include/CGAL/Arr_naive_point_location.h index 9b263ff1..919f787e 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_naive_point_location.h +++ b/thirdparty/CGAL/include/CGAL/Arr_naive_point_location.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_naive_point_location.h $ -// $Id: Arr_naive_point_location.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_naive_point_location.h $ +// $Id: include/CGAL/Arr_naive_point_location.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_non_caching_segment_basic_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_non_caching_segment_basic_traits_2.h index f78ba187..592fd9a7 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_non_caching_segment_basic_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_non_caching_segment_basic_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h $ -// $Id: Arr_non_caching_segment_basic_traits_2.h 708469f 2020-06-12T14:06:58+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h $ +// $Id: include/CGAL/Arr_non_caching_segment_basic_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Efi Fogel @@ -30,6 +30,7 @@ * functors required by the concept it models. */ +#include #include #include #include @@ -230,37 +231,63 @@ class Arr_non_caching_segment_basic_traits_2 : public T_Kernel /// \name Functor definitions for the landmarks point-location strategy. //@{ - typedef double Approximate_number_type; + typedef double Approximate_number_type; + typedef CGAL::Cartesian Approximate_kernel; + typedef Approximate_kernel::Point_2 Approximate_point_2; - class Approximate_2 - { - public: + class Approximate_2 { + protected: + using Traits = Arr_non_caching_segment_basic_traits_2; - /*! - * Return an approximation of a point coordinate. + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits the traits. + */ + Approximate_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_non_caching_segment_basic_traits_2; + + public: + /*! Return an approximation of a point coordinate. * \param p The exact point. * \param i The coordinate index (either 0 or 1). * \pre i is either 0 or 1. * \return An approximation of p's x-coordinate (if i == 0), or an * approximation of p's y-coordinate (if i == 1). */ - Approximate_number_type operator() (const Point_2& p, - int i) const - { + Approximate_number_type operator() (const Point_2& p, int i) const { CGAL_precondition (i == 0 || i == 1); + return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y())); + } + + /*! Obtain an approximation of a point. + */ + Approximate_point_2 operator()(const Point_2& p) const + { return Approximate_point_2(operator()(p, 0), operator()(p, 1)); } - if (i == 0) - return (CGAL::to_double(p.x())); - else - return (CGAL::to_double(p.y())); + /*! Obtain an approximation of an \f$x\f$-monotone curve. + */ + template + OutputIterator operator()(const X_monotone_curve_2& xcv, double /* error */, + OutputIterator oi, bool l2r = true) const { + auto min_vertex = m_traits.construct_min_vertex_2_object(); + auto max_vertex = m_traits.construct_max_vertex_2_object(); + const auto& src = (l2r) ? min_vertex(xcv) : max_vertex(xcv); + const auto& trg = (l2r) ? max_vertex(xcv) : min_vertex(xcv); + auto xs = CGAL::to_double(src.x()); + auto ys = CGAL::to_double(src.y()); + auto xt = CGAL::to_double(trg.x()); + auto yt = CGAL::to_double(trg.y()); + *oi++ = Approximate_point_2(xs, ys); + *oi++ = Approximate_point_2(xt, yt); + return oi; } }; /*! Get an Approximate_2 functor object. */ - Approximate_2 approximate_2_object () const - { - return Approximate_2(); - } + Approximate_2 approximate_2_object () const { return Approximate_2(*this); } typedef typename Kernel::Construct_segment_2 Construct_x_monotone_curve_2; diff --git a/thirdparty/CGAL/include/CGAL/Arr_non_caching_segment_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_non_caching_segment_traits_2.h index 81bb45bf..aab80d66 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_non_caching_segment_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_non_caching_segment_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h $ -// $Id: Arr_non_caching_segment_traits_2.h c0838c5 2021-12-16T16:33:43+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h $ +// $Id: include/CGAL/Arr_non_caching_segment_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Efi Fogel @@ -22,12 +22,12 @@ * This traits class handles general segments. It is a model of the * ArrangementTraits_2 concept, a refinement of the ArrangementBasicTraits_2 * concept. The class is templated by a kernel and inherits from the - * Arr_non_caching_segment_basic_traits_2 class instanciated with the kernel - + * Arr_non_caching_segment_basic_traits_2 class instantiated with the kernel - * a model of the ArrangementBasicTraits_2 concept. It defined a few additional * functors required by the concept it models. */ -#include +#include #include #include @@ -131,7 +131,7 @@ class Arr_non_caching_segment_traits_2 : OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { // Wrap the segment with a variant. - typedef boost::variant + typedef std::variant Make_x_monotone_result; *oi++ = Make_x_monotone_result(cv); return oi; @@ -143,7 +143,7 @@ class Arr_non_caching_segment_traits_2 : { return Make_x_monotone_2(); } /*! \class - * A functor for splitting a segment into two segements. + * A functor for splitting a segment into two segments. */ class Split_2 { typedef Arr_non_caching_segment_traits_2 Self; @@ -224,8 +224,6 @@ class Arr_non_caching_segment_traits_2 : OutputIterator oi) const { typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; const Kernel& kernel = m_traits; auto res = kernel.intersect_2_object()(cv1, cv2); @@ -233,20 +231,20 @@ class Arr_non_caching_segment_traits_2 : // There is no intersection: if (! res) return oi; - // Chack if the intersection is a point: - const Point_2* p_p = boost::get(&*res); + // Check if the intersection is a point: + const Point_2* p_p = std::get_if(&*res); if (p_p != nullptr) { // Create a pair representing the point with its multiplicity, // which is always 1 for line segments for all practical purposes. // If the two segments intersect at their endpoints, then the // multiplicity is undefined, but we deliberately ignore it for - // efficieny reasons. - *oi++ = Intersection_result(Intersection_point(*p_p, 1)); + // efficiency reasons. + *oi++ = Intersection_point(*p_p, 1); return oi; } // The intersection is a segment. - const X_monotone_curve_2* cv_p = boost::get(&*res); + const X_monotone_curve_2* cv_p = std::get_if(&*res); CGAL_assertion(cv_p != nullptr); Comparison_result cmp1 = m_traits.compare_endpoints_xy_2_object()(cv1); @@ -257,11 +255,11 @@ class Arr_non_caching_segment_traits_2 : // in the overlap segment if (m_traits.compare_endpoints_xy_2_object()(*cv_p) != cmp1) { auto ctr_opposite = kernel.construct_opposite_segment_2_object(); - *oi++ = Intersection_result(ctr_opposite(*cv_p)); + *oi++ = ctr_opposite(*cv_p); return oi; } } - *oi++ = Intersection_result(*cv_p); + *oi++ = *cv_p; return oi; } }; diff --git a/thirdparty/CGAL/include/CGAL/Arr_observer.h b/thirdparty/CGAL/include/CGAL/Arr_observer.h index 69a0f537..2b06d0a3 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_observer.h +++ b/thirdparty/CGAL/include/CGAL/Arr_observer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_observer.h $ -// $Id: Arr_observer.h 2a3fbc0 2019-11-19T09:47:44+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_observer.h $ +// $Id: include/CGAL/Arr_observer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -100,14 +100,14 @@ class Arr_observer if (p_arr != nullptr) return; - // Notify the concrete oberver (the sub-class) about the attachment. + // Notify the concrete observer (the sub-class) about the attachment. before_attach(arr); // Register the observer object in the new arrangement. p_arr = &arr; p_arr->_register_observer(this); - // Notify the concrete oberver that the attachment took place. + // Notify the concrete observer that the attachment took place. after_attach(); } @@ -116,15 +116,15 @@ class Arr_observer { if (p_arr == nullptr) return; - // Notify the concrete oberver (the sub-class) about the detachment. + // Notify the concrete observer (the sub-class) about the detachment. before_detach (); // Unregister the observer object from the current arrangement, and mark - // that the oberver is not attached to an arrangement. + // that the observer is not attached to an arrangement. p_arr->_unregister_observer(this); p_arr = nullptr; - // Notify the concrete oberver that the detachment took place. + // Notify the concrete observer that the detachment took place. after_detach(); } //@} diff --git a/thirdparty/CGAL/include/CGAL/Arr_overlay.h b/thirdparty/CGAL/include/CGAL/Arr_overlay.h index 4f6c89be..fc1a9c08 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_overlay.h +++ b/thirdparty/CGAL/include/CGAL/Arr_overlay.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_overlay.h $ -// $Id: Arr_overlay.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_overlay.h $ +// $Id: include/CGAL/Arr_overlay.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_overlay_2.h b/thirdparty/CGAL/include/CGAL/Arr_overlay_2.h index 84678a1f..ebae1d02 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_overlay_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_overlay_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h $ -// $Id: Arr_overlay_2.h 4afc249 2021-09-09T15:58:00+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h $ +// $Id: include/CGAL/Arr_overlay_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,8 +24,7 @@ */ #include -#include -#include +#include #include #include @@ -172,14 +171,14 @@ overlay(const Arrangement_on_surface_2& arr1 typedef typename Agt2::Point_2 A_point; typedef typename Bgt2::Point_2 B_point; typedef typename Rgt2::Point_2 Res_point; - CGAL_static_assertion((boost::is_convertible::value)); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert(std::is_convertible::value); + static_assert(std::is_convertible::value); typedef typename Agt2::X_monotone_curve_2 A_xcv; typedef typename Bgt2::X_monotone_curve_2 B_xcv; typedef typename Rgt2::X_monotone_curve_2 Res_xcv; - CGAL_static_assertion((boost::is_convertible::value)); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert(std::is_convertible::value); + static_assert(std::is_convertible::value); typedef Arr_traits_basic_adaptor_2 Gt_adaptor_2; typedef Arr_overlay_traits_2 @@ -231,7 +230,7 @@ overlay(const Arrangement_on_surface_2& arr1 xcvs_vec[i] = Ovl_x_monotone_curve_2(eit2->curve(), invalid_he1, he2); } - // Obtain a extended traits-class object and define the sweep-line visitor. + // Obtain an extended traits-class object and define the sweep-line visitor. const typename Arr_res::Traits_adaptor_2* traits_adaptor = arr.traits_adaptor(); @@ -247,8 +246,8 @@ overlay(const Arrangement_on_surface_2& arr1 * Use the form 'A a(*b);' and not ''A a = b;' to handle the case where A has * only an implicit constructor, (which takes *b as a parameter). */ - typename boost::mpl::if_, - const Ovl_gt2&, Ovl_gt2>::type + std::conditional_t, + const Ovl_gt2&, Ovl_gt2> ex_traits(*traits_adaptor); Ovl_visitor visitor(&arr1, &arr2, &arr, &ovl_tr); @@ -284,8 +283,8 @@ overlay(const Arrangement_on_surface_2& arr1 if (vit1->is_isolated()) { typename Arr_a::Vertex_const_handle v1 = vit1; pts_vec[i++] = - Ovl_point_2(vit1->point(), boost::make_optional(Cell_handle_red(v1)), - boost::optional()); + Ovl_point_2(vit1->point(), std::make_optional(Cell_handle_red(v1)), + std::optional()); } } @@ -294,8 +293,8 @@ overlay(const Arrangement_on_surface_2& arr1 if (vit2->is_isolated()) { typename Arr_b::Vertex_const_handle v2 = vit2; pts_vec[i++] = - Ovl_point_2(vit2->point(), boost::optional(), - boost::make_optional(Cell_handle_blue(v2))); + Ovl_point_2(vit2->point(), std::optional(), + std::make_optional(Cell_handle_blue(v2))); } } diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h index ed098a92..9728ec7a 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h $ -// $Id: Arr_batched_point_location_traits_2.h 6b64dc8 2020-11-11T09:38:55+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h $ +// $Id: include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -411,7 +411,7 @@ class Arr_batched_point_location_traits_2 { } }; - /*! Obtain a Equal_2 function object. */ + /*! Obtain an `Equal_2` function object. */ Equal_2 equal_2_object() const { return (Equal_2(m_base_traits->equal_2_object())); } diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h index 7e393183..b6d7dad3 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h $ -// $Id: Arr_landmarks_pl_impl.h 0626eb0 2020-06-11T12:32:33+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h $ +// $Id: include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Idit Haran @@ -47,7 +47,7 @@ Arr_landmarks_point_location::locate(const Point_2& p) const return lm_location_obj; // 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 fo edges + // and find the location of the query point p. Note that the set of edges // we have crossed so far is initially empty. Halfedge_set crossed_edges; result_type out_obj; @@ -100,7 +100,7 @@ _walk_from_vertex(Vertex_const_handle nearest_vertex, CGAL_assertion_msg(! vh->is_at_open_boundary(), "_walk_from_vertex() from a vertex at infinity."); - // Check if the qurey point p conincides with the vertex. + // Check if the query point p coincides with the vertex. if (m_traits->equal_2_object()(vh->point(), p)) return make_result(vh); @@ -231,7 +231,7 @@ _find_face_around_vertex(Vertex_const_handle vh, } // In case the curves are not equal, just return the incident face of - // the single halfegde (note that this is also the incident face of its + // the single halfedge (note that this is also the incident face of its // twin, as v is the tip of an "antenna"). if (! equal_curr) { CGAL_assertion(curr->face() == curr->twin()->face()); @@ -251,7 +251,7 @@ _find_face_around_vertex(Vertex_const_handle vh, (next->direction() == ARR_RIGHT_TO_LEFT), vp, eq_curr, eq_next)) { - // Break the loop if seg equals one of the halfegdes next to v. + // Break the loop if seg equals one of the halfedges next to v. if (eq_curr) { equal_curr = true; break; @@ -276,7 +276,7 @@ _find_face_around_vertex(Vertex_const_handle vh, } // In case seg is not equal to curr's curve, just return the incident face - // of the halfegde we have located. + // of the halfedge we have located. if (! equal_curr) return make_result(curr->face()); } diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_generator_base.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_generator_base.h index 42d4ce66..3162d435 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_generator_base.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_generator_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h $ -// $Id: Arr_lm_generator_base.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h $ +// $Id: include/CGAL/Arr_point_location/Arr_lm_generator_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Idit Haran diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h index c8c20e8b..e582ed9e 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h $ -// $Id: Arr_lm_grid_generator.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h $ +// $Id: include/CGAL/Arr_point_location/Arr_lm_grid_generator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Idit Haran diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h index 6b0fe300..c0f60c5c 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h $ -// $Id: Arr_lm_halton_generator.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h $ +// $Id: include/CGAL/Arr_point_location/Arr_lm_halton_generator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Idit Haran @@ -81,7 +81,7 @@ class Arr_halton_landmarks_generator : { points.clear(); - // Go over the arrangement vertices and construct their boundig box. + // Go over the arrangement vertices and construct their bounding box. const Arrangement_2* arr = this->arrangement(); Vertex_const_iterator vit; double x_min = 0, x_max = 1, y_min = 0, y_max = 1; diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_middle_edges_generator.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_middle_edges_generator.h index af6b510e..93e738a6 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_middle_edges_generator.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_middle_edges_generator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_middle_edges_generator.h $ -// $Id: Arr_lm_middle_edges_generator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_middle_edges_generator.h $ +// $Id: include/CGAL/Arr_point_location/Arr_lm_middle_edges_generator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h index a5a1d392..9c62bd6a 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h $ -// $Id: Arr_lm_nearest_neighbor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h $ +// $Id: include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Idit Haran @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_random_generator.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_random_generator.h index f8dbac51..c4c95f67 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_random_generator.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_random_generator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_random_generator.h $ -// $Id: Arr_lm_random_generator.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_random_generator.h $ +// $Id: include/CGAL/Arr_point_location/Arr_lm_random_generator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Idit Haran @@ -82,7 +82,7 @@ class Arr_random_landmarks_generator : { points.clear(); - // Go over the arrangement vertices and construct their boundig box. + // Go over the arrangement vertices and construct their bounding box. const Arrangement_2* arr = this->arrangement(); Vertex_const_iterator vit; double x_min = 0, x_max = 1, y_min = 0, y_max = 1; diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_specified_points_generator.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_specified_points_generator.h index 6c335b4b..ee01ae35 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_specified_points_generator.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_specified_points_generator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_specified_points_generator.h $ -// $Id: Arr_lm_specified_points_generator.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_specified_points_generator.h $ +// $Id: include/CGAL/Arr_point_location/Arr_lm_specified_points_generator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Shlomo Golubev diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h index de30e570..51b5a6d9 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h $ -// $Id: Arr_lm_vertices_generator.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h $ +// $Id: include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Idit Haran diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h index f0aac133..0df5f7e3 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h $ -// $Id: Arr_naive_point_location_impl.h 8d95fb8 2021-08-11T18:37:30+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h $ +// $Id: include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -52,7 +52,7 @@ Arr_naive_point_location::locate(const Point_2& p) const return make_result(hh); } - // Go over all faces an locate the innermost one that contains the query + // Go over all faces and locate the innermost one that contains the query // point in its interior. Face_const_handle f_inner; const Face_const_handle invalid_f; diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h index f6b33faf..a302c388 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h $ -// $Id: Arr_simple_point_location_impl.h 0626eb0 2020-06-11T12:32:33+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h $ +// $Id: include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -92,7 +92,7 @@ Arr_simple_point_location::locate(const Point_2& p) const //----------------------------------------------------------------------------- // Locate the arrangement feature which a vertical ray emanating from the -// given point hits (not inculding isolated vertices). +// given point hits (not including isolated vertices). // template typename Arr_simple_point_location::Optional_result_type @@ -155,7 +155,7 @@ _base_vertical_ray_shoot(const Point_2& p, bool shoot_up) const cl_vt = vt; } else { - // Compare with the vertically closest curve so far and detemine the + // Compare with the vertically closest curve so far and determine the // curve closest to p. We first check the case that the two curves // have a common endpoint (note that the two curves do not intersect // in their interiors). Observe that if such a common vertex exists, @@ -192,7 +192,7 @@ _base_vertical_ray_shoot(const Point_2& p, bool shoot_up) const // In case the two curves do not have a common endpoint, but overlap // in their x-range (both contain p), just compare their positions. // Note that in this case one of the edges may be fictitious, so we - // preform the comparsion symbolically in this case. + // perform the comparison symbolically in this case. y_res = (closest_he->has_null_curve()) ? curve_above_under : ((eit->has_null_curve()) ? point_above_under : compare_y_position(closest_he->curve(), eit->curve())); diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h index d6129a6c..fc600add 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h $ -// $Id: Arr_trapezoid_ric_pl_impl.h 6642407 2020-07-29T18:08:32+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h $ +// $Id: include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -75,7 +75,7 @@ Arr_trapezoid_ric_point_location::locate(const Point_2& p) const case TD::POINT: { //p is interior so it should fall on Td_active_vertex - Td_active_vertex& v (boost::get(tr)); + Td_active_vertex& v (std::get(tr)); CGAL_TRAP_PRINT_DEBUG("POINT"); CGAL_assertion(!v.vertex()->is_at_open_boundary()); return make_result(v.vertex()); @@ -84,7 +84,7 @@ Arr_trapezoid_ric_point_location::locate(const Point_2& p) const case TD::CURVE: { - Td_active_edge& e (boost::get(tr)); + Td_active_edge& e (std::get(tr)); Halfedge_const_handle h = e.halfedge(); CGAL_TRAP_PRINT_DEBUG("CURVE"); if ( m_traits->is_in_x_range_2_object()(h->curve(),p) && @@ -100,7 +100,7 @@ Arr_trapezoid_ric_point_location::locate(const Point_2& p) const case TD::TRAPEZOID: { - Td_active_trapezoid t (boost::get(tr)); + Td_active_trapezoid t (std::get(tr)); Halfedge_const_handle h = t.top(); CGAL_TRAP_PRINT_DEBUG("TRAPEZOID"); bool is_p_above_h = (m_traits->is_in_x_range_2_object()(h->curve(),p)) @@ -160,7 +160,7 @@ Arr_trapezoid_ric_point_location:: _get_unbounded_face(const Td_map_item& item,const Point_2& p, Arr_not_all_sides_oblivious_tag) const { - Td_active_trapezoid tr (boost::get(item)); + Td_active_trapezoid tr (std::get(item)); // Halfedge_const_handle h = tr.top(); if (!tr.is_on_top_boundary() || !tr.is_on_bottom_boundary()) { //if one of top or bottom edges is defined @@ -184,13 +184,13 @@ _get_unbounded_face(const Td_map_item& item,const Point_2& p, Td_map_item& left_v_item = td.locate(tr.left(),td_lt); CGAL_assertion(td_lt == TD::POINT); Halfedge_const_handle he; - if (boost::get(&left_v_item) != nullptr) { - Td_active_vertex v(boost::get(left_v_item)); + if (std::get_if(&left_v_item) != nullptr) { + Td_active_vertex v(std::get(left_v_item)); he = v.cw_he(); } else { Td_active_fictitious_vertex - v(boost::get(left_v_item)); + v(std::get(left_v_item)); he = v.cw_he(); } //cw_he() holds the "smallest" curve clockwise starting from 12 o'clock @@ -201,7 +201,7 @@ _get_unbounded_face(const Td_map_item& item,const Point_2& p, //the Halfedge_handle source is left_ee. // this way the face on it's left is the desired one - //MICHAL: maybe add a verification that the above occures + //MICHAL: maybe add a verification that the above occurs return he->face(); } else if (!tr.is_on_right_boundary()) { @@ -216,13 +216,13 @@ _get_unbounded_face(const Td_map_item& item,const Point_2& p, Td_map_item& right_v_item = td.locate(tr.right(),td_lt); CGAL_assertion(td_lt == TD::POINT); Halfedge_const_handle he; - if (boost::get(&right_v_item)!= nullptr) { - Td_active_vertex v(boost::get(right_v_item)); + if (std::get_if(&right_v_item)!= nullptr) { + Td_active_vertex v(std::get(right_v_item)); he = v.cw_he(); } else { Td_active_fictitious_vertex - v(boost::get(right_v_item)); + v(std::get(right_v_item)); he = v.cw_he(); } //its cw_he() holds the "smallest" curve clockwise starting from @@ -234,7 +234,7 @@ _get_unbounded_face(const Td_map_item& item,const Point_2& p, //the Halfedge_handle source is right_ee. // this way the face on it's left is the desired one - //MICHAL: maybe add a verification that the above occures + //MICHAL: maybe add a verification that the above occurs return he->face(); } @@ -270,13 +270,13 @@ _vertical_ray_shoot(const Point_2& p, bool shoot_up) const case TD::POINT: { //p fell on Td_active_vertex - Td_active_vertex& v (boost::get(item)); + Td_active_vertex& v (std::get(item)); return (make_result(v.vertex())); } break; case TD::CURVE: { - Td_active_edge& e (boost::get(item)); + Td_active_edge& e (std::get(item)); Halfedge_const_handle h = e.halfedge(); if ((shoot_up && h->direction() == ARR_LEFT_TO_RIGHT) || @@ -289,7 +289,7 @@ _vertical_ray_shoot(const Point_2& p, bool shoot_up) const break; case TD::TRAPEZOID: { - Td_active_trapezoid trpz (boost::get(item)); + Td_active_trapezoid trpz (std::get(item)); Halfedge_const_handle h = (shoot_up) ? trpz.top() : trpz.bottom(); bool is_p_above_h = (m_traits->is_in_x_range_2_object()(h->curve(),p)) @@ -316,7 +316,7 @@ _vertical_ray_shoot(const Point_2& p, bool shoot_up) const // face) we check the isolated vertices inside the face to check whether there // is an isolated vertex right above/below the query point. // -template +template typename Arr_trapezoid_ric_point_location::result_type Arr_trapezoid_ric_point_location:: _check_isolated_for_vertical_ray_shoot (Halfedge_const_handle halfedge_found, @@ -324,40 +324,36 @@ _check_isolated_for_vertical_ray_shoot (Halfedge_const_handle halfedge_found, bool shoot_up, const Td_map_item& tr) const { + const auto* gt = this->arrangement()->geometry_traits(); const Comparison_result point_above_under = (shoot_up ? SMALLER : LARGER); - typename Geometry_traits_2::Compare_x_2 compare_x = - this->arrangement()->traits()->compare_x_2_object(); - typename Geometry_traits_2::Compare_xy_2 compare_xy = - this->arrangement()->traits()->compare_xy_2_object(); - typename Geometry_traits_2::Compare_y_at_x_2 compare_y_at_x = - this->arrangement()->traits()->compare_y_at_x_2_object(); - - Isolated_vertex_const_iterator iso_verts_it; - Vertex_const_handle closest_iso_v; - const Vertex_const_handle invalid_v; - const Halfedge_const_handle invalid_he; - Face_const_handle face; + auto compare_x = gt->compare_x_2_object(); + auto compare_xy = gt->compare_xy_2_object(); + auto compare_y_at_x = gt->compare_y_at_x_2_object(); + + Vertex_const_handle closest_iso_v; + const Vertex_const_handle invalid_v; + const Halfedge_const_handle invalid_he; // If the closest feature is a valid halfedge, take its incident face. // Otherwise, take the unbounded face. - if (halfedge_found == invalid_he) - face = _get_unbounded_face(tr, p, All_sides_oblivious_category()); - else - face = halfedge_found->face(); + Face_const_handle face = (halfedge_found == invalid_he) ? + _get_unbounded_face(tr, p, All_sides_oblivious_category()) : + halfedge_found->face(); // Go over the isolated vertices in the face. + // The following statement pacifies MSVC. Without it the implicit conversion + // from the iterator to the corresponding handle fails! + Isolated_vertex_const_iterator iso_verts_it; for (iso_verts_it = face->isolated_vertices_begin(); iso_verts_it != face->isolated_vertices_end(); ++iso_verts_it) { // The current isolated vertex should have the same x-coordinate as the // query point in order to be below or above it. - if (compare_x (p, iso_verts_it->point()) != EQUAL) - continue; + if (compare_x (p, iso_verts_it->point()) != EQUAL) continue; // Make sure the isolated vertex is above the query point (if we shoot up) // or below it (if we shoot down). - if (compare_xy (p, iso_verts_it->point()) != point_above_under) - continue; + if (compare_xy (p, iso_verts_it->point()) != point_above_under) continue; // Check if the current isolated vertex lies closer to the query point than // the closest feature so far. @@ -379,12 +375,10 @@ _check_isolated_for_vertical_ray_shoot (Halfedge_const_handle halfedge_found, // If we found an isolated vertex above (or under) the query point, return // a handle to this vertex. - if (closest_iso_v != invalid_v) - return make_result(closest_iso_v); + if (closest_iso_v != invalid_v) return make_result(closest_iso_v); // If we are inside the unbounded face, return this face. - if (halfedge_found == invalid_he) - return make_result(face); + if (halfedge_found == invalid_he) return make_result(face); // Return the halfedge lying above (or below) the query point. return make_result(halfedge_found); diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h index 3af3a7af..fb9acf86 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h $ -// $Id: Arr_triangulation_pl_functions.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h $ +// $Id: include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -86,7 +86,7 @@ Arr_triangulation_point_location::locate(const Point_2& p) case CDT::EDGE: CGAL_TRG_PRINT_DEBUG("locate type = edge" << li); - //li is the index of the vertex OPOSITE to the edge + //li is the index of the vertex OPPOSITE to the edge if (m_cdt.is_constrained(CDT_Edge(fh,li))) { //the edge found is an edge in the plannar map CGAL_TRG_PRINT_DEBUG("the edge is a constrained"); @@ -189,7 +189,7 @@ Arr_triangulation_point_location::locate(const Point_2& p) //---------------------------------------------------- -/*! triangulate the arrangement into a cdt (Constaint Delauney Triangulation): +/*! triangulate the arrangement into a cdt (Constraint Delauney Triangulation): go over all halfedges, and insert each halfedge as a constraint to the cdt. */ template @@ -197,7 +197,7 @@ void Arr_triangulation_point_location::clear_triangulation() { m_cdt.clear(); } //---------------------------------------------------- -/*! triangulate the arrangement into a cdt (Constaint Delauney Triangulation): +/*! triangulate the arrangement into a cdt (Constraint Delauney Triangulation): go over all halfedges, and insert each halfedge as a constraint to the cdt. */ template diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h index e5a10e0a..ff304435 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h $ -// $Id: Arr_triangulation_pl_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h $ +// $Id: include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -85,7 +85,7 @@ Arr_triangulation_point_location::locate (const Point_2& p) const case CDT::EDGE: { CGAL_TRG_PRINT_DEBUG("locate type = edge"<
  • ::locate (const Point_2& p) const //---------------------------------------------------- -/*! triangulate the arrangement into a cdt (Constaint Delauney Triangulation): +/*! triangulate the arrangement into a cdt (Constraint Delauney Triangulation): go over all halfedges, and insert each halfedge as a constraint to the cdt. */ template @@ -217,7 +217,7 @@ void Arr_triangulation_point_location::clear_triangulation () } //---------------------------------------------------- -/*! triangulate the arrangement into a cdt (Constaint Delauney Triangulation): +/*! triangulate the arrangement into a cdt (Constraint Delauney Triangulation): go over all halfedges, and insert each halfedge as a constraint to the cdt. */ template diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h index a4e4629a..29180afa 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h $ -// $Id: Arr_walk_along_line_pl_impl.h f73d067 2020-06-15T20:11:46+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h $ +// $Id: include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -98,7 +98,7 @@ Arr_walk_along_line_point_location::locate(const Point_2& p) const // | | // +--------------+ // - // In this case, we find the first halfegde whose target is x + // In this case, we find the first halfedge whose target is x // in a clockwise direction from "6 o'clock" around x and take // its incident face. @@ -440,7 +440,7 @@ _is_in_connected_component (const Point_2& p, is_on_edge = false; closest_to_target = false; - // Set the results for comparison acording to the ray direction. + // Set the results for comparison according to the ray direction. const Comparison_result point_above_under = (shoot_up ? SMALLER : LARGER); const Comparison_result curve_above_under = (shoot_up ? LARGER : SMALLER); @@ -580,7 +580,7 @@ _is_in_connected_component (const Point_2& p, res = top_traits->compare_y_at_x(p, &(*curr)); if (res == EQUAL) { - // The current edge contains the query point. If the seach is inclusive + // The current edge contains the query point. If the search is inclusive // we return the edge. Otherwise, we return it only if it is vertical, // and contains p in its interior. if (inclusive) { @@ -620,7 +620,7 @@ _is_in_connected_component (const Point_2& p, if (source_res != EQUAL) { if ((closest_he == invalid_he) || (closest_he->twin() == Halfedge_const_handle(curr))) { - // 1. If we have no closests halfedge, we have just found one. + // 1. If we have no closest halfedge, we have just found one. // 2. If the closest halfedge is the twin of our current halfedge, // we can take our halfedge to be the closest one. This covers the // case where our closest halfedge is not in our CCB. @@ -629,7 +629,7 @@ _is_in_connected_component (const Point_2& p, closest_to_target = (target_res == EQUAL); } else { - // Compare with the vertically closest curve so far and detemine the + // Compare with the vertically closest curve so far and determine the // curve closest to p. We first check the case that the two curves // have a common endpoint (note that the two curves do not intersect // in their interiors). Observe that if such a common vertex exists, @@ -673,7 +673,7 @@ _is_in_connected_component (const Point_2& p, // In case the two curves do not have a common endpoint, but // overlap in their x-range (both contain p), just compare their // positions. Note that in this case one of the edges may be - // fictitious, so we preform the comparsion symbolically in this + // fictitious, so we perform the comparison symbolically in this // case. if (closest_he->is_fictitious()) y_res = curve_above_under; @@ -776,7 +776,7 @@ _is_in_connected_component (const Point_2& p, //----------------------------------------------------------------------------- // Find the first halfedge around a given target vertex, when going clockwise // from "6 o'clock" around this vertex (when shooting up) or starting from -// "12 o'clock (when shooting down). +// "12 o'clock" (when shooting down). // template typename Arr_walk_along_line_point_location::Halfedge_const_handle diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_X_trapezoid.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_X_trapezoid.h index b226d60c..0d44875e 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_X_trapezoid.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_X_trapezoid.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h $ -// $Id: Td_X_trapezoid.h 97cac65 2021-07-23T10:59:49+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h $ +// $Id: include/CGAL/Arr_point_location/Td_X_trapezoid.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,11 +18,11 @@ /*! \file - * Defintion of the Td_X_trapezoid class. + * Definition of the Td_X_trapezoid class. */ #include -#include +#include #include @@ -45,7 +45,7 @@ namespace CGAL { * when one of the four sides is on the parameter space boundary. * Trapezoids are created as active and become inactive when Remove() member * function called. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. * X_trapezoid structure can represent a real trapezoid, a Td-edge or an * edge-end (end point). */ @@ -92,9 +92,9 @@ class Td_X_trapezoid : public Handle // type flag + on boundaries flags, // left-bottom neighbor trapezoid, left-top neighbor trapezoid, // right-bottom neighbor trapezoid, right-top neighbor trapezoid - typedef Td_ninetuple, - boost::variant, - boost::variant, + std::variant, + std::variant >, Halfedge_const_handle, unsigned char, @@ -152,15 +152,20 @@ class Td_X_trapezoid : public Handle Dag_node* m_dag_node; //pointer to the search structure (DAG) node - /*! Initialize the trapezoid's neighbours. */ - CGAL_TD_INLINE void init_neighbours(Self* lb_ = 0, Self* lt_ = 0, - Self* rb_ = 0, Self* rt_ = 0) + /*! Initialize the trapezoid's neighbors. */ + CGAL_TD_INLINE void init_neighbors(Self* lb_ = 0, Self* lt_ = 0, + Self* rb_ = 0, Self* rt_ = 0) { set_lb(lb_); set_lt(lt_); set_rb(rb_); set_rt(rt_); } + /*! \copydoc init_neighbors + * \deprecated please use #init_neighbors */ + CGAL_DEPRECATED CGAL_TD_INLINE void init_neighbours(Self* lb_ = 0, Self* lt_ = 0, + Self* rb_ = 0, Self* rt_ = 0) + { init_neighbors(lb_, lt_, rb_, rt_); } /*! Set the DAG node. */ CGAL_TD_INLINE void set_dag_node(Dag_node* p) @@ -234,12 +239,12 @@ class Td_X_trapezoid : public Handle Curve_end v_ce(left()->curve_end()); ptr()->e2 = (std::shared_ptr)(new X_monotone_curve_2(v_ce.cv())); - //CGAL_assertion(boost::get>( &(ptr()->e2)) != nullptr); + //CGAL_assertion(std::get>( &(ptr()->e2)) != nullptr); ptr()->e1 = (v_ce.ce() == ARR_MIN_END ) ? CGAL_TD_CV_MIN_END : CGAL_TD_CV_MAX_END; if (!is_on_boundaries()) - { //if the trapezoid respresents an inner vertex + { //if the trapezoid represents an inner vertex ptr()->e0 = left()->point(); } } @@ -296,16 +301,16 @@ class Td_X_trapezoid : public Handle ptr()->e4 &= ~CGAL_TD_ON_TOP_BOUNDARY; } - /*! Set left bottom neighbour. */ + /*! Set left bottom neighbor. */ CGAL_TD_INLINE void set_lb(Self* lb) { ptr()->e5 = lb; } - /*! Set left top neighbour. */ + /*! Set left top neighbor. */ CGAL_TD_INLINE void set_lt(Self* lt) { ptr()->e6 = lt; } - /*! Set right bottom neighbour. */ + /*! Set right bottom neighbor. */ CGAL_TD_INLINE void set_rb(Self* rb) { ptr()->e7 = rb; } - /*! Set right top neighbour. */ + /*! Set right top neighbor. */ CGAL_TD_INLINE void set_rt(Self* rt) { ptr()->e8 = rt; } public: @@ -317,7 +322,7 @@ class Td_X_trapezoid : public Handle Td_X_trapezoid() { //define the initial trapezoid: left, right, btm, top are at infinity. - // its type is TD_TRAPEZOID ,it is on all boundaries, and has no neighbours + // its type is TD_TRAPEZOID ,it is on all boundaries, and has no neighbors PTR = new Trpz_parameter_space (Traits::vtx_at_left_infinity(), Traits::vtx_at_right_infinity(), @@ -438,8 +443,8 @@ class Td_X_trapezoid : public Handle CGAL_TD_INLINE Vertex_const_handle left_unsafe() const { CGAL_precondition(is_active()); - CGAL_assertion(boost::get(&(ptr()->e0)) != nullptr); - return boost::get(ptr()->e0); + CGAL_assertion(std::get(&(ptr()->e0)) != nullptr); + return std::get(ptr()->e0); } /*! Access trapezoid left. @@ -461,8 +466,8 @@ class Td_X_trapezoid : public Handle CGAL_TD_INLINE Vertex_const_handle right_unsafe() const { CGAL_precondition(is_active()); - CGAL_assertion(boost::get(&(ptr()->e1)) != nullptr); - return boost::get(ptr()->e1); + CGAL_assertion(std::get(&(ptr()->e1)) != nullptr); + return std::get(ptr()->e1); } /*! Access trapezoid right. @@ -484,8 +489,8 @@ class Td_X_trapezoid : public Handle CGAL_TD_INLINE Halfedge_const_handle bottom_unsafe () const { CGAL_precondition(is_active()); - CGAL_assertion(boost::get(&(ptr()->e2)) != nullptr); - return boost::get(ptr()->e2); + CGAL_assertion(std::get(&(ptr()->e2)) != nullptr); + return std::get(ptr()->e2); } /*! Access trapezoid bottom. @@ -521,8 +526,8 @@ class Td_X_trapezoid : public Handle CGAL_precondition(type() == TD_VERTEX); CGAL_precondition(!is_on_boundaries()); - CGAL_assertion(boost::get( &(ptr()->e0)) != nullptr); - return boost::get( ptr()->e0 ); + CGAL_assertion(std::get( &(ptr()->e0)) != nullptr); + return std::get( ptr()->e0 ); } CGAL_TD_INLINE std::pair curve_end_pair_for_boundary_rem_vtx() const @@ -531,13 +536,13 @@ class Td_X_trapezoid : public Handle CGAL_precondition(type() == TD_VERTEX); CGAL_precondition(is_on_boundaries()); - CGAL_assertion(boost::get( &(ptr()->e1)) != nullptr); - CGAL_assertion(boost::get >(&(ptr()->e2)) != nullptr); - X_monotone_curve_2* cv_ptr = (boost::get >(ptr()->e2)).get(); + CGAL_assertion(std::get( &(ptr()->e1)) != nullptr); + CGAL_assertion(std::get >(&(ptr()->e2)) != nullptr); + X_monotone_curve_2* cv_ptr = (std::get >(ptr()->e2)).get(); CGAL_assertion(cv_ptr != nullptr); Arr_curve_end ce = - (boost::get(ptr()->e1) == CGAL_TD_CV_MIN_END) ? + (std::get(ptr()->e1) == CGAL_TD_CV_MIN_END) ? ARR_MIN_END : ARR_MAX_END; return std::make_pair(cv_ptr, ce); @@ -549,13 +554,13 @@ class Td_X_trapezoid : public Handle CGAL_precondition(type() == TD_VERTEX); CGAL_precondition(is_on_boundaries()); - CGAL_assertion(boost::get( &(ptr()->e1)) != nullptr); - CGAL_assertion(boost::get >(&(ptr()->e2)) != nullptr); - X_monotone_curve_2* cv_ptr = (boost::get >(ptr()->e2)).get(); + CGAL_assertion(std::get( &(ptr()->e1)) != nullptr); + CGAL_assertion(std::get >(&(ptr()->e2)) != nullptr); + X_monotone_curve_2* cv_ptr = (std::get >(ptr()->e2)).get(); CGAL_assertion(cv_ptr != nullptr); Arr_curve_end ce = - (boost::get(ptr()->e1) == CGAL_TD_CV_MIN_END) ? + (std::get(ptr()->e1) == CGAL_TD_CV_MIN_END) ? ARR_MIN_END : ARR_MAX_END; return Curve_end(*cv_ptr, ce); @@ -566,13 +571,13 @@ class Td_X_trapezoid : public Handle CGAL_precondition(!is_active()); CGAL_precondition(type() == TD_VERTEX); - CGAL_assertion(boost::get( &(ptr()->e1)) != nullptr); - CGAL_assertion(boost::get >(&(ptr()->e2)) != nullptr); - X_monotone_curve_2* cv_ptr = (boost::get >(ptr()->e2)).get(); + CGAL_assertion(std::get( &(ptr()->e1)) != nullptr); + CGAL_assertion(std::get >(&(ptr()->e2)) != nullptr); + X_monotone_curve_2* cv_ptr = (std::get >(ptr()->e2)).get(); CGAL_assertion(cv_ptr != nullptr); Arr_curve_end ce = - (boost::get(ptr()->e1) == CGAL_TD_CV_MIN_END) ? + (std::get(ptr()->e1) == CGAL_TD_CV_MIN_END) ? ARR_MIN_END : ARR_MAX_END; return Curve_end(*cv_ptr, ce); @@ -582,8 +587,8 @@ class Td_X_trapezoid : public Handle { CGAL_precondition(!is_active() && type() == TD_EDGE); - CGAL_assertion(boost::get >(&(ptr()->e2)) != nullptr); - X_monotone_curve_2* cv_ptr = (boost::get >(ptr()->e2)).get(); + CGAL_assertion(std::get >(&(ptr()->e2)) != nullptr); + X_monotone_curve_2* cv_ptr = (std::get >(ptr()->e2)).get(); CGAL_assertion(cv_ptr != nullptr); return *cv_ptr; } @@ -647,16 +652,16 @@ class Td_X_trapezoid : public Handle return (ptr()->e4 & CGAL_TD_ON_ALL_BOUNDARIES) != 0; } - /*! Access left bottom neighbour. */ + /*! Access left bottom neighbor. */ Self* lb() const { return ptr()->e5; } - /*! Access left top neighbour. */ + /*! Access left top neighbor. */ Self* lt() const { return ptr()->e6; } - /*! Access right bottom neighbour. */ + /*! Access right bottom neighbor. */ Self* rb() const { return ptr()->e7; } - /*! Access right top neighbour. */ + /*! Access right top neighbor. */ Self* rt() const { return ptr()->e8; } /*! Access DAG node. */ diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_edge.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_edge.h index 2bdc27a2..dd72aa30 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_edge.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_edge.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h $ -// $Id: Td_active_edge.h 97cac65 2021-07-23T10:59:49+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h $ +// $Id: include/CGAL/Arr_point_location/Td_active_edge.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Nechushtan @@ -17,11 +17,11 @@ /*! \file - * Defintion of the Td_active_edge class. + * Definition of the Td_active_edge class. */ #include -#include +#include #include @@ -44,7 +44,7 @@ namespace CGAL { * when one of the four sides is on the parameter space boundary. * Trapezoids are created as active and become inactive when Remove() member * function called. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. * X_trapezoid structure can represent a real trapezoid, a Td-edge or an * edge-end (end point). */ @@ -144,11 +144,15 @@ class Td_active_edge : public Handle //Dag_node* m_dag_node; //pointer to the search structure (DAG) node - /*! Initialize the trapezoid's neighbours. */ - inline void init_neighbours(boost::optional next) + /*! Initialize the trapezoid's neighbors. */ + inline void init_neighbors(std::optional> next) { - set_next((next) ? *next : Td_map_item(0)); + set_next((next) ? next->get() : Td_map_item(0)); } + /*! \copydoc init_neighbors + * \deprecated please use #init_neighbors */ + CGAL_DEPRECATED inline void init_neighbours(std::optional> next) + { init_neighbors(next); } /*! Set the DAG node. */ CGAL_TD_INLINE void set_dag_node(Dag_node* p) @@ -195,10 +199,10 @@ class Td_active_edge : public Handle /*! Constructor given Vertex & Halfedge handles. */ Td_active_edge (Halfedge_const_handle he , Dag_node* node = 0, - boost::optional next = boost::none) + std::optional> next = std::nullopt) { - PTR = new Data(he, (next) ? *next : Td_map_item(0), node); + PTR = new Data(he, (next) ? next->get() : Td_map_item(0), node); //m_dag_node = node; } diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h index 709434e6..819914f3 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h $ -// $Id: Td_active_fictitious_vertex.h 97cac65 2021-07-23T10:59:49+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h $ +// $Id: include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Oren Nechushtan @@ -17,11 +17,11 @@ #include /*! \file - * Defintion of the Td_active_fictitious_vertex class. + * Definition of the Td_active_fictitious_vertex class. */ #include -#include +#include #include #ifdef CGAL_TD_DEBUG @@ -43,7 +43,7 @@ namespace CGAL { * when one of the four sides is on the parameter space boundary. * Trapezoids are created as active and become inactive when Remove() member * function called. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. * X_trapezoid structure can represent a real trapezoid, a Td-edge or an * edge-end (end point). */ diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_trapezoid.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_trapezoid.h index c36ad3c0..759690f1 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_trapezoid.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_trapezoid.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h $ -// $Id: Td_active_trapezoid.h 97cac65 2021-07-23T10:59:49+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h $ +// $Id: include/CGAL/Arr_point_location/Td_active_trapezoid.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Nechushtan @@ -17,14 +17,14 @@ /*! \file - * Defintion of the Td_active_trapezoid class. + * Definition of the Td_active_trapezoid class. */ #include #include -#include -#include +#include +#include #ifdef CGAL_TD_DEBUG @@ -44,7 +44,7 @@ namespace CGAL { * bound the trapezoid from above and below. * There exist degenerate trapezoids called infinite trapezoid; this happens * when one of the four sides is on the parameter space boundary. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. */ template class Td_active_trapezoid : public Handle @@ -162,15 +162,20 @@ class Td_active_trapezoid : public Handle //Dag_node* m_dag_node; //pointer to the search structure (DAG) node - /*! Initialize the trapezoid's neighbours. */ - inline void init_neighbours(boost::optional lb, boost::optional lt, - boost::optional rb, boost::optional rt) + /*! Initialize the trapezoid's neighbors. */ + inline void init_neighbors(std::optional> lb, std::optional> lt, + std::optional> rb, std::optional> rt) { - set_lb((lb) ? *lb : Td_map_item(0)); - set_lt((lt) ? *lt : Td_map_item(0)); - set_rb((rb) ? *rb : Td_map_item(0)); - set_rt((rt) ? *rt : Td_map_item(0)); + set_lb((lb) ? lb->get() : Td_map_item(0)); + set_lt((lt) ? lt->get() : Td_map_item(0)); + set_rb((rb) ? rb->get() : Td_map_item(0)); + set_rt((rt) ? rt->get() : Td_map_item(0)); } + /*! \copydoc init_neighbors + * \deprecated please use #init_neighbors */ + CGAL_DEPRECATED inline void init_neighbours(std::optional> lb, std::optional> lt, + std::optional> rb, std::optional> rt) + { init_neighbors(lb, lt, rb, rt); } /*! Set the DAG node. */ inline void set_dag_node(Dag_node* p) @@ -227,16 +232,16 @@ class Td_active_trapezoid : public Handle } - /*! Set left bottom neighbour. */ + /*! Set left bottom neighbor. */ inline void set_lb(const Td_map_item& lb) { ptr()->lb = lb; } - /*! Set left top neighbour. */ + /*! Set left top neighbor. */ inline void set_lt(const Td_map_item& lt) { ptr()->lt = lt; } - /*! Set right bottom neighbour. */ + /*! Set right bottom neighbor. */ inline void set_rb(const Td_map_item& rb) { ptr()->rb = rb; } - /*! Set right top neighbour. */ + /*! Set right top neighbor. */ inline void set_rt(const Td_map_item& rt) { ptr()->rt = rt; } public: @@ -248,7 +253,7 @@ class Td_active_trapezoid : public Handle Td_active_trapezoid() { //define the initial trapezoid: left, right, btm, top are at infinity. - // has no neighbours + // has no neighbors PTR = new Data (Traits::empty_vtx_handle(), Traits::empty_vtx_handle(), @@ -262,14 +267,14 @@ class Td_active_trapezoid : public Handle /*! Constructor given Vertex & Halfedge handles. */ Td_active_trapezoid (Vertex_const_handle l, Vertex_const_handle r, Halfedge_const_handle b, Halfedge_const_handle t, - boost::optional lb = boost::none, - boost::optional lt = boost::none, - boost::optional rb = boost::none, - boost::optional rt = boost::none, + std::optional> lb = std::nullopt, + std::optional> lt = std::nullopt, + std::optional> rb = std::nullopt, + std::optional> rt = std::nullopt, Dag_node* node = 0) { - PTR = new Data (l, r, b, t, (lb) ? *lb : Td_map_item(0), (lt) ? *lt : Td_map_item(0), - (rb) ? *rb : Td_map_item(0), (rt) ? *rt : Td_map_item(0), node); + PTR = new Data (l, r, b, t, (lb) ? lb->get() : Td_map_item(0), (lt) ? lt->get() : Td_map_item(0), + (rb) ? rb->get() : Td_map_item(0), (rt) ? rt->get() : Td_map_item(0), node); //m_dag_node = node; } @@ -392,16 +397,16 @@ class Td_active_trapezoid : public Handle is_on_bottom_boundary() || is_on_top_boundary() ); } - /*! Access left bottom neighbour. */ + /*! Access left bottom neighbor. */ Td_map_item& lb() const { return ptr()->lb; } - /*! Access left top neighbour. */ + /*! Access left top neighbor. */ Td_map_item& lt() const { return ptr()->lt; } - /*! Access right bottom neighbour. */ + /*! Access right bottom neighbor. */ Td_map_item& rb() const { return ptr()->rb; } - /*! Access right top neighbour. */ + /*! Access right top neighbor. */ Td_map_item& rt() const { return ptr()->rt; } /*! Access DAG node. */ @@ -454,14 +459,14 @@ class Td_active_trapezoid : public Handle Td_map_item item (*this); - if (ptr()->rb.which() != 0) + if (ptr()->rb.index() != 0) { - Self tr(boost::get(rb())); + Self tr(std::get(rb())); tr.set_lb(item); } - if (ptr()->rt.which() != 0) + if (ptr()->rt.index() != 0) { - Self tr(boost::get(rt())); + Self tr(std::get(rt())); tr.set_lt(item); } CGAL_assertion(is_on_right_boundary() == right.is_on_right_boundary()); diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_vertex.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_vertex.h index 473e366c..59551ca4 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_vertex.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_active_vertex.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h $ -// $Id: Td_active_vertex.h 97cac65 2021-07-23T10:59:49+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h $ +// $Id: include/CGAL/Arr_point_location/Td_active_vertex.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Oren Nechushtan @@ -17,11 +17,11 @@ #include /*! \file - * Defintion of the Td_active_vertex class. + * Definition of the Td_active_vertex class. */ #include -#include +#include #include @@ -44,7 +44,7 @@ namespace CGAL { * when one of the four sides is on the parameter space boundary. * Trapezoids are created as active and become inactive when Remove() member * function called. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. * X_trapezoid structure can represent a real trapezoid, a Td-edge or an * edge-end (end point). */ diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_dag.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_dag.h index f693f932..9453c489 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_dag.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_dag.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag.h $ -// $Id: Td_dag.h 319383c 2020-05-20T09:47:58+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag.h $ +// $Id: include/CGAL/Arr_point_location/Td_dag.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_dag_node.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_dag_node.h index 4829892d..f75a8aaa 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_dag_node.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_dag_node.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag_node.h $ -// $Id: Td_dag_node.h 319383c 2020-05-20T09:47:58+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag_node.h $ +// $Id: include/CGAL/Arr_point_location/Td_dag_node.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michal Balas @@ -28,7 +28,7 @@ #include #include -#include +#include namespace CGAL { @@ -112,7 +112,7 @@ class Td_dag_node : public Td_dag_node_base public: - class clear_neighbors_visitor : public boost::static_visitor< void > + class clear_neighbors_visitor { public: void operator()(Td_active_trapezoid& t) const @@ -142,10 +142,10 @@ class Td_dag_node : public Td_dag_node_base //d'tor ~Node() { - boost::apply_visitor(clear_neighbors_visitor(), m_data); + std::visit(clear_neighbors_visitor(), m_data); } - bool is_inner_node() const //MICHAL: a node with only left child (like removed node) will be concidered as a leaf + bool is_inner_node() const //MICHAL: a node with only left child (like removed node) will be considered as a leaf { //return !!m_left_child && !!m_right_child; return (!m_left_child.is_null() && !m_right_child.is_null()); diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_edge.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_edge.h index ac4112ec..70423790 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_edge.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_edge.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h $ -// $Id: Td_inactive_edge.h 97cac65 2021-07-23T10:59:49+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h $ +// $Id: include/CGAL/Arr_point_location/Td_inactive_edge.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Nechushtan @@ -17,11 +17,11 @@ /*! \file - * Defintion of the Td_inactive_edge class. + * Definition of the Td_inactive_edge class. */ #include -#include +#include #include @@ -44,7 +44,7 @@ namespace CGAL { * when one of the four sides is on the parameter space boundary. * Trapezoids are created as active and become inactive when Remove() member * function called. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. * X_trapezoid structure can represent a real trapezoid, a Td-edge or an * edge-end (end point). */ diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h index 2971fa9b..82e4898e 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h $ -// $Id: Td_inactive_fictitious_vertex.h 97cac65 2021-07-23T10:59:49+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h $ +// $Id: include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Nechushtan @@ -17,11 +17,11 @@ /*! \file - * Defintion of the Td_inactive_fictitious_vertex class. + * Definition of the Td_inactive_fictitious_vertex class. */ #include -#include +#include #ifdef CGAL_TD_DEBUG @@ -43,7 +43,7 @@ namespace CGAL { * when one of the four sides is on the parameter space boundary. * Trapezoids are created as active and become inactive when Remove() member * function called. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. * X_trapezoid structure can represent a real trapezoid, a Td-edge or an * edge-end (end point). */ diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h index 6257d146..b079b9f2 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h $ -// $Id: Td_inactive_trapezoid.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h $ +// $Id: include/CGAL/Arr_point_location/Td_inactive_trapezoid.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Nechushtan @@ -17,11 +17,11 @@ /*! \file - * Defintion of the Td_inactive_trapezoid class. + * Definition of the Td_inactive_trapezoid class. */ #include -#include +#include #ifdef CGAL_TD_DEBUG diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_vertex.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_vertex.h index db712bab..0399935b 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_vertex.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_inactive_vertex.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h $ -// $Id: Td_inactive_vertex.h 97cac65 2021-07-23T10:59:49+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h $ +// $Id: include/CGAL/Arr_point_location/Td_inactive_vertex.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Nechushtan @@ -17,11 +17,11 @@ /*! \file - * Defintion of the Td_inactive_vertex class. + * Definition of the Td_inactive_vertex class. */ #include -#include +#include #ifdef CGAL_TD_DEBUG @@ -43,7 +43,7 @@ namespace CGAL { * when one of the four sides is on the parameter space boundary. * Trapezoids are created as active and become inactive when Remove() member * function called. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. * X_trapezoid structure can represent a real trapezoid, a Td-edge or an * edge-end (end point). */ diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_ninetuple.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_ninetuple.h index 65c1a77f..c8e458f0 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_ninetuple.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_ninetuple.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_ninetuple.h $ -// $Id: Td_ninetuple.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_ninetuple.h $ +// $Id: include/CGAL/Arr_point_location/Td_ninetuple.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_predicates.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_predicates.h index 3043e675..d26aab12 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_predicates.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_predicates.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_predicates.h $ -// $Id: Td_predicates.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_predicates.h $ +// $Id: include/CGAL/Arr_point_location/Td_predicates.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_traits.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_traits.h index 3995da81..d8f3a60e 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_traits.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Td_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h $ -// $Id: Td_traits.h 6642407 2020-07-29T18:08:32+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h $ +// $Id: include/CGAL/Arr_point_location/Td_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Oren Nechushtan @@ -113,7 +113,7 @@ class Td_traits : public Pm_traits_ Td_inactive_fictitious_vertex; //! type of td map item (Td_halfedge, Td_vertex or Td_trapezoid) - typedef boost::variant< Td_nothing, + typedef std::variant< Td_nothing, Td_active_trapezoid, Td_inactive_trapezoid, Td_active_edge, Td_inactive_edge, Td_active_vertex, Td_active_fictitious_vertex, @@ -352,15 +352,12 @@ class Td_traits : public Pm_traits_ }; - /*! Obtain a Compare_y_at_x_2 functor object. */ + /*! Obtain a Compare_curve_end_x_2 functor object. */ Compare_curve_end_x_2 compare_curve_end_x_2_object () const { return Compare_curve_end_x_2(this); } - - - /*! A functor that compares the y-coordinates of an edge end and a curve at * the point x-coordinate */ @@ -898,8 +895,8 @@ class Td_traits : public Pm_traits_ CGAL_precondition(is_active(left_item) && is_active(right_item)); CGAL_precondition(is_td_trapezoid(left_item) && is_td_trapezoid(right_item)); - Td_active_trapezoid left (boost::get(left_item)); - Td_active_trapezoid right(boost::get(right_item)); + Td_active_trapezoid left (std::get(left_item)); + Td_active_trapezoid right(std::get(right_item)); if (left.is_on_bottom_boundary()) return (right.is_on_bottom_boundary()); @@ -918,8 +915,8 @@ class Td_traits : public Pm_traits_ CGAL_precondition(is_active(left_item) && is_active(right_item)); CGAL_precondition(is_td_trapezoid(left_item) && is_td_trapezoid(right_item)); - Td_active_trapezoid left (boost::get(left_item)); - Td_active_trapezoid right(boost::get(right_item)); + Td_active_trapezoid left (std::get(left_item)); + Td_active_trapezoid right(std::get(right_item)); if (left.is_on_top_boundary()) return (right.is_on_top_boundary()); @@ -960,13 +957,13 @@ class Td_traits : public Pm_traits_ //returns true if the trapezoid is a curve bool is_empty_item(const Td_map_item& tr) const { - return (tr.which() == 0); + return (tr.index() == 0); } //returns true if the trapezoid is a point or a curve bool is_trapezoid(const Td_map_item& tr) const { - switch (tr.which()) + switch (tr.index()) { case TD_ACTIVE_TRAPEZOID: case TD_INACTIVE_TRAPEZOID: @@ -979,7 +976,7 @@ class Td_traits : public Pm_traits_ //returns true if the map item is a vertex bool is_td_vertex(const Td_map_item& tr) const { - switch (tr.which()) + switch (tr.index()) { case TD_ACTIVE_VERTEX: case TD_ACTIVE_FICTITIOUS_VERTEX: @@ -994,7 +991,7 @@ class Td_traits : public Pm_traits_ //returns true if the map item is an edge bool is_td_edge(const Td_map_item& tr) const { - switch (tr.which()) + switch (tr.index()) { case TD_ACTIVE_EDGE: case TD_INACTIVE_EDGE: @@ -1007,7 +1004,7 @@ class Td_traits : public Pm_traits_ //returns true if the map item is an edge bool is_td_trapezoid(const Td_map_item& tr) const { - switch (tr.which()) + switch (tr.index()) { case TD_ACTIVE_TRAPEZOID: case TD_INACTIVE_TRAPEZOID: @@ -1020,7 +1017,7 @@ class Td_traits : public Pm_traits_ //returns true if the trapezoid is a curve bool is_fictitious_vertex(const Td_map_item& tr) const { - switch (tr.which()) + switch (tr.index()) { case TD_ACTIVE_FICTITIOUS_VERTEX: case TD_INACTIVE_FICTITIOUS_VERTEX: @@ -1033,7 +1030,7 @@ class Td_traits : public Pm_traits_ //returns true if the trapezoid is a curve bool is_active(const Td_map_item& tr) const { - switch (tr.which()) + switch (tr.index()) { case TD_ACTIVE_TRAPEZOID: case TD_ACTIVE_EDGE: @@ -1052,7 +1049,7 @@ class Td_traits : public Pm_traits_ CGAL_precondition(is_active(item)); //MICHAL: assumes item is of active edge item - also fails in case of a vertical asymptote //MICHAL: check when this is used exactly - Td_active_edge& e (boost::get(item)); + Td_active_edge& e (std::get(item)); Halfedge_const_handle he = e.halfedge(); return (this->compare_curve_end_x_2_object() (Curve_end(he,ARR_MIN_END), Curve_end(he,ARR_MAX_END))== EQUAL); @@ -1064,7 +1061,7 @@ class Td_traits : public Pm_traits_ { CGAL_precondition( is_active(item) ); CGAL_precondition( is_td_trapezoid(item) ); - Td_active_trapezoid tr (boost::get(item)); + Td_active_trapezoid tr (std::get(item)); return ( tr.is_on_left_boundary() || @@ -1080,7 +1077,7 @@ class Td_traits : public Pm_traits_ } /*! returns true if the end point is inside the closure of the trapezoid - (inlcude all boundaries) */ + (include all boundaries) */ bool is_in_closure (const Td_active_trapezoid& tr, const Curve_end& ce ) const { // test left and right sides @@ -1110,7 +1107,7 @@ class Td_traits : public Pm_traits_ return false; } /*! returns true if the end point is inside the closure of the trapezoid - (inlcude all boundaries) */ + (include all boundaries) */ bool is_in_closure (const Td_active_edge& e, const Curve_end& ce ) const { // test left and right sides diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h index 0a5dcea3..66443fec 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h $ -// $Id: Trapezoidal_decomposition_2.h 1faa0e2 2021-04-28T10:55:26+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h $ +// $Id: include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Oren Nechushtan @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -44,7 +44,7 @@ namespace internal{ // struct used to avoid recursive deletion of elements of // Td_map_item. Td_active_edge and Td_active_edge_item are -// both refering to elements of the same type creating +// both referring to elements of the same type creating // recursive call to ~Handle() if we let the regular // calls of destructors. Here elements are copied in // a vector and the true deletion is done when the vector @@ -93,16 +93,16 @@ struct Non_recursive_td_map_item_destructor void operator()(Td_active_trapezoid& item) { - boost::apply_visitor(m_child_visitor, item.lb()); - boost::apply_visitor(m_child_visitor, item.lt()); - boost::apply_visitor(m_child_visitor, item.rb()); - boost::apply_visitor(m_child_visitor, item.rt()); + std::visit(m_child_visitor, item.lb()); + std::visit(m_child_visitor, item.lt()); + std::visit(m_child_visitor, item.rb()); + std::visit(m_child_visitor, item.rt()); item.clear_neighbors(); } void operator()(Td_active_edge& item) { - boost::apply_visitor(m_child_visitor, item.next()); + std::visit(m_child_visitor, item.next()); item.set_next(Td_map_item(0)); } @@ -124,7 +124,7 @@ struct Non_recursive_td_map_item_destructor { Td_map_item item = queue.back(); queue.pop_back(); - boost::apply_visitor(item_visitor, item); + std::visit(item_visitor, item); } } @@ -138,7 +138,7 @@ struct Non_recursive_td_map_item_destructor { Td_map_item item = queue.back(); queue.pop_back(); - boost::apply_visitor(item_visitor, item); + std::visit(item_visitor, item); } } }; @@ -272,7 +272,7 @@ class Trapezoidal_decomposition_2 Base_map_item_iterator() : traits(0), m_cur_item(Td_map_item(0)){ } Base_map_item_iterator(const Traits* traits_, - boost::optional curr = boost::none) + std::optional curr = std::nullopt) :traits(traits_), m_cur_item((curr) ? *curr : Td_map_item(0) ) { } Base_map_item_iterator(const Base_map_item_iterator &it) @@ -326,18 +326,18 @@ class Trapezoidal_decomposition_2 #endif protected: - //reference to the seperating X_monotone_curve_2 + //reference to the separating X_monotone_curve_2 const X_monotone_curve_2& m_sep; public: //constructors In_face_iterator(const Traits* traits_, Halfedge_const_handle sep, - boost::optional curr = boost::none) + std::optional> curr = std::nullopt) :Base_map_item_iterator(traits_,curr), m_sep(sep->curve()) { } In_face_iterator(const Traits* traits_, const X_monotone_curve_2& sep, - boost::optional curr = boost::none) + std::optional> curr = std::nullopt) :Base_map_item_iterator(traits_,curr), m_sep(sep) { } @@ -356,15 +356,15 @@ class Trapezoidal_decomposition_2 /* destription: - advances m_cur_item to one of the right neighbours according to the relation - between the seperating Halfedge (m_sep) and the right() trapezoid point. + advances m_cur_item to one of the right neighbors according to the relation + between the separating Halfedge (m_sep) and the right() trapezoid point. precoditions: m_sep doesn't intersect any existing edges except possibly on common end points. postconditions: if the rightmost trapezoid was traversed m_cur_item is set to nullptr. remark: - if the seperator is vertical, using the precondition assumptions it + if the separator is vertical, using the precondition assumptions it follows that there is exactly one trapezoid to travel. */ In_face_iterator& operator++() @@ -384,7 +384,7 @@ class Trapezoidal_decomposition_2 if (traits->is_td_trapezoid(m_cur_item)) { //if the map item is a trapezoid - Td_active_trapezoid tr (boost::get(m_cur_item)); + Td_active_trapezoid tr (std::get(m_cur_item)); #ifndef CGAL_TD_DEBUG CGAL_warning_code(Dag_node* tt = tr.dag_node();) @@ -436,7 +436,7 @@ class Trapezoidal_decomposition_2 { //if the map item is an edge - Td_active_edge e (boost::get(m_cur_item)); + Td_active_edge e (std::get(m_cur_item)); CGAL_assertion_code(Dag_node* tt = e.dag_node();) CGAL_assertion(tt != nullptr); CGAL_assertion(tt->is_inner_node()); @@ -453,7 +453,7 @@ class Trapezoidal_decomposition_2 while(traits->is_td_vertex(m_cur_item)) { Dag_node* node = - boost::apply_visitor(dag_node_visitor(),m_cur_item); + std::visit(dag_node_visitor(),m_cur_item); m_cur_item = node->left_child().get_data(); } @@ -481,7 +481,7 @@ class Trapezoidal_decomposition_2 CGAL_precondition (!traits->is_empty_item(m_cur_item)); CGAL_precondition (traits->is_active(m_cur_item) && traits->is_td_trapezoid(m_cur_item)); - return boost::get(m_cur_item); + return std::get(m_cur_item); } Td_active_edge& e() @@ -489,13 +489,13 @@ class Trapezoidal_decomposition_2 CGAL_precondition (!traits->is_empty_item(m_cur_item)); CGAL_precondition (traits->is_active(m_cur_item) && traits->is_td_edge(m_cur_item)); - return boost::get(m_cur_item); + return std::get(m_cur_item); } }; /*! Visitors for accessing td map items methods */ - class rb_visitor : public boost::static_visitor + class rb_visitor { public: Td_map_item operator()(Td_active_trapezoid& t) const @@ -511,7 +511,7 @@ class Trapezoidal_decomposition_2 } }; - class set_rb_visitor : public boost::static_visitor + class set_rb_visitor { public: set_rb_visitor (const Td_map_item& rb) : m_rb(rb) {} @@ -532,7 +532,7 @@ class Trapezoidal_decomposition_2 const Td_map_item& m_rb; }; - class rt_visitor : public boost::static_visitor + class rt_visitor { public: Td_map_item operator()(Td_active_trapezoid& t) const @@ -548,7 +548,7 @@ class Trapezoidal_decomposition_2 } }; - class set_rt_visitor : public boost::static_visitor + class set_rt_visitor { public: set_rt_visitor (const Td_map_item& rt) : m_rt(rt) {} @@ -568,7 +568,7 @@ class Trapezoidal_decomposition_2 const Td_map_item& m_rt; }; - class lb_visitor : public boost::static_visitor + class lb_visitor { public: Td_map_item operator()(Td_active_trapezoid& t) const @@ -584,7 +584,7 @@ class Trapezoidal_decomposition_2 } }; - class set_lb_visitor : public boost::static_visitor + class set_lb_visitor { public: set_lb_visitor (const Td_map_item& lb) : m_lb(lb) {} @@ -604,7 +604,7 @@ class Trapezoidal_decomposition_2 const Td_map_item& m_lb; }; - class set_lt_visitor : public boost::static_visitor + class set_lt_visitor { public: set_lt_visitor (const Td_map_item& lt) : m_lt(lt) {} @@ -624,7 +624,7 @@ class Trapezoidal_decomposition_2 const Td_map_item& m_lt; }; - class bottom_he_visitor : public boost::static_visitor + class bottom_he_visitor { public: Halfedge_const_handle operator()(Td_active_trapezoid& t) const @@ -640,7 +640,7 @@ class Trapezoidal_decomposition_2 } }; - class set_bottom_he_visitor : public boost::static_visitor< void > + class set_bottom_he_visitor { public: set_bottom_he_visitor (Halfedge_const_handle he) : m_bottom_he(he) {} @@ -659,7 +659,7 @@ class Trapezoidal_decomposition_2 Halfedge_const_handle m_bottom_he; }; - class top_he_visitor : public boost::static_visitor + class top_he_visitor { public: Halfedge_const_handle operator()(Td_active_trapezoid& t) const @@ -675,7 +675,7 @@ class Trapezoidal_decomposition_2 } }; - class set_top_he_visitor : public boost::static_visitor + class set_top_he_visitor { public: set_top_he_visitor (Halfedge_const_handle he) : m_top_he(he) {} @@ -694,7 +694,7 @@ class Trapezoidal_decomposition_2 Halfedge_const_handle m_top_he; }; - class cw_he_visitor : public boost::static_visitor< Halfedge_const_handle > + class cw_he_visitor { public: Halfedge_const_handle operator()(Td_active_vertex& t) const @@ -716,7 +716,8 @@ class Trapezoidal_decomposition_2 /*! A visitor to set the cw halfedge of a vertex node. */ - class set_cw_he_visitor : public boost::static_visitor { + class set_cw_he_visitor + { public: set_cw_he_visitor(Halfedge_const_handle he) : m_cw_he(he) {} @@ -734,7 +735,8 @@ class Trapezoidal_decomposition_2 /*! A visitor to reset the cw halfedge of a vertex node. */ - class reset_cw_he_visitor : public boost::static_visitor { + class reset_cw_he_visitor + { public: void operator()(Td_active_vertex& t) const { t.reset_cw_he(); } @@ -744,7 +746,7 @@ class Trapezoidal_decomposition_2 void operator()(T& /*t*/) const { CGAL_assertion(false); } }; - class dag_node_visitor : public boost::static_visitor + class dag_node_visitor { public: Dag_node* operator()(Td_nothing& /* t */) const @@ -765,7 +767,7 @@ class Trapezoidal_decomposition_2 } }; - class set_dag_node_visitor : public boost::static_visitor + class set_dag_node_visitor { public: set_dag_node_visitor(Dag_node* node):m_node(node) {} @@ -789,30 +791,29 @@ class Trapezoidal_decomposition_2 Dag_node* m_node; }; - class curve_end_for_fict_vertex_visitor : - public boost::static_visitor > + class curve_end_for_fict_vertex_visitor { public: - boost::optional operator()(Td_active_fictitious_vertex& t) const + std::optional operator()(Td_active_fictitious_vertex& t) const { return t.curve_end(); } - boost::optional + std::optional operator()(Td_inactive_fictitious_vertex& t) const { return t.curve_end(); } template < typename T > - boost::optional operator()(T& /* t */) const + std::optional operator()(T& /* t */) const { CGAL_assertion(false); - return boost::none; + return std::nullopt; } }; - class point_for_vertex_visitor : public boost::static_visitor< Point > + class point_for_vertex_visitor { public: Point operator()(Td_active_vertex& t) const @@ -833,30 +834,28 @@ class Trapezoidal_decomposition_2 } }; - class curve_end_for_active_vertex_visitor : - public boost::static_visitor > + class curve_end_for_active_vertex_visitor { public: - boost::optional operator()(Td_active_vertex& t) const + std::optional operator()(Td_active_vertex& t) const { return t.curve_end(); } - boost::optional operator()(Td_active_fictitious_vertex& t) const + std::optional operator()(Td_active_fictitious_vertex& t) const { return t.curve_end(); } template < typename T > - boost::optional operator()(T& /* t */) const + std::optional operator()(T& /* t */) const { CGAL_assertion(false); - return boost::none; + return std::nullopt; } }; - class vertex_for_active_vertex_visitor : - public boost::static_visitor + class vertex_for_active_vertex_visitor { public: Vertex_const_handle operator()(Td_active_vertex& t) const @@ -877,27 +876,26 @@ class Trapezoidal_decomposition_2 } }; - class cv_for_edge_visitor : - public boost::static_visitor > + class cv_for_edge_visitor { public: - boost::optional + std::optional> operator()(Td_active_edge& t) const { return t.halfedge()->curve(); } - boost::optional + std::optional> operator()(Td_inactive_edge& t) const { return t.curve(); } template - boost::optional operator()(T& /* t */) const + std::optional> operator()(T& /* t */) const { CGAL_assertion(false); - return boost::none; + return std::nullopt; } }; @@ -998,11 +996,11 @@ class Trapezoidal_decomposition_2 bool is_fict_vtx = traits->is_fictitious_vertex(vtx_item); if (is_fict_vtx) { return (compare(t, - *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(), + *(std::visit(curve_end_for_fict_vertex_visitor(), vtx_item))) == SMALLER); } else { - return (compare(t, boost::apply_visitor(point_for_vertex_visitor(), + return (compare(t, std::visit(point_for_vertex_visitor(), vtx_item)) == SMALLER); } } @@ -1039,12 +1037,12 @@ class Trapezoidal_decomposition_2 bool is_fict_vtx = traits->is_fictitious_vertex(vtx_item); if (is_fict_vtx) { return (compare(t, - *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(), + *(std::visit(curve_end_for_fict_vertex_visitor(), vtx_item))) == LARGER); } else { return (compare(t, - boost::apply_visitor(point_for_vertex_visitor(), + std::visit(point_for_vertex_visitor(), vtx_item)) == LARGER); } } @@ -1058,12 +1056,12 @@ class Trapezoidal_decomposition_2 bool is_fict_vtx = traits->is_fictitious_vertex(vtx_item); if (is_fict_vtx) { return equal(t, - *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(), + *(std::visit(curve_end_for_fict_vertex_visitor(), vtx_item))); } else { return equal(t, - boost::apply_visitor(point_for_vertex_visitor(), + std::visit(point_for_vertex_visitor(), vtx_item)); } } @@ -1090,24 +1088,24 @@ class Trapezoidal_decomposition_2 //if ( traits->is_fictitious_vertex(item) ) //{ // CGAL_precondition(traits->equal_curve_end_2_object() - // (Curve_end(cv,ARR_MIN_END), *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item)))); + // (Curve_end(cv,ARR_MIN_END), *(std::visit(curve_end_for_fict_vertex_visitor(),item)))); //} //else //{ // CGAL_precondition(traits->equal_curve_end_2_object() - // (Curve_end(cv,ARR_MIN_END), boost::apply_visitor(point_for_vertex_visitor(), item))); + // (Curve_end(cv,ARR_MIN_END), std::visit(point_for_vertex_visitor(), item))); //} //find the node of the curve's leftmost trapezoid Dag_node cv_leftmost_node(left_cv_end_node.right_child()); if (traits->is_fictitious_vertex(item) ) { - Curve_end ce( *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(), + Curve_end ce( *(std::visit(curve_end_for_fict_vertex_visitor(), item))); search_using_dag_with_cv(cv_leftmost_node, traits, ce, &cv, cres); } else { - Point p( boost::apply_visitor(point_for_vertex_visitor(), item)); + Point p( std::visit(point_for_vertex_visitor(), item)); search_using_dag_with_cv(cv_leftmost_node, traits, p, &cv, cres); } return cv_leftmost_node; @@ -1159,8 +1157,8 @@ class Trapezoidal_decomposition_2 if (traits->is_empty_item(left_item) || traits->is_empty_item(right_item)) return false; - Td_active_trapezoid& left (boost::get(left_item)); - Td_active_trapezoid& right (boost::get(right_item)); + Td_active_trapezoid& left (std::get(left_item)); + Td_active_trapezoid& right (std::get(right_item)); if (traits->is_trapezoids_top_equal(left,right) && traits->is_trapezoids_bottom_equal(left,right) && @@ -1196,7 +1194,7 @@ class Trapezoidal_decomposition_2 Dag_node* node); //--------------------------------------------------------------------------- // Description: - // the opposite operation for spliting the trapezoid with + // the opposite operation for splitting the trapezoid with // vertical line through ce // Precondition: // The root trapezoid is degenerate point (ce) and is active @@ -1214,7 +1212,7 @@ class Trapezoidal_decomposition_2 // trapezoidal tree with an input halfedge he // Precondition: // The root trapezoid is active - // The root trapezoid is devided by he or is equal to it and is vertical. + // The root trapezoid is divided by he or is equal to it and is vertical. Dag_node& split_trapezoid_by_halfedge(Dag_node& split_node, Td_map_item& prev_e, Td_map_item& prev_bottom_tr, @@ -1504,7 +1502,7 @@ class Trapezoidal_decomposition_2 // Remark: // Given an edge-degenerate trapezoid representing a Halfedge, // all the other trapezoids representing the Halfedge can be extracted - // via moving continously to the left and right neighbours. + // via moving continuously to the left and right neighbors. Td_map_item insert(Halfedge_const_handle he); @@ -1966,7 +1964,7 @@ class Trapezoidal_decomposition_2 for (typename std::list::iterator it = representatives.begin(); it != representatives.end(); ++it) { - Td_active_edge e(boost::get(*it)); + Td_active_edge e(std::get(*it)); container.push_back(e.halfedge()); //it represents an active trapezoid } } @@ -2015,7 +2013,7 @@ class Trapezoidal_decomposition_2 if (static_cast(std::rand()) > RAND_MAX / ( num_of_cv + 1)) return false; - /* INTERNAL COMPILER ERROR overide + /* INTERNAL COMPILER ERROR override #ifndef __GNUC__ */ #ifdef CGAL_TD_REBUILD_DEBUG @@ -2152,7 +2150,7 @@ class Trapezoidal_decomposition_2 // traits may be initialized later m_dag_root = new Dag_node(Td_active_trapezoid()); //(*m_dag_root)->set_dag_node(m_dag_root); - boost::apply_visitor(set_dag_node_visitor(m_dag_root), + std::visit(set_dag_node_visitor(m_dag_root), m_dag_root->get_data()); m_number_of_curves = 0; @@ -2200,11 +2198,11 @@ class Trapezoidal_decomposition_2 //{ // if ( traits->is_fictitious_vertex(item) ) // { - // res = traits->equal_curve_end_2_object()(ce, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item))); + // res = traits->equal_curve_end_2_object()(ce, *(std::visit(curve_end_for_fict_vertex_visitor(),item))); // } // else // { - // res = traits->equal_curve_end_2_object()(ce, boost::apply_visitor(point_for_vertex_visitor(), item)); + // res = traits->equal_curve_end_2_object()(ce, std::visit(point_for_vertex_visitor(), item)); // } //} if (traits->is_td_trapezoid(item)) @@ -2218,11 +2216,11 @@ class Trapezoidal_decomposition_2 //{ // if ( traits->is_fictitious_vertex(item) ) // { - // res = traits->equal_curve_end_2_object()(ce, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item))); + // res = traits->equal_curve_end_2_object()(ce, *(std::visit(curve_end_for_fict_vertex_visitor(),item))); // } // else // { - // res = traits->equal_curve_end_2_object()(ce, boost::apply_visitor(point_for_vertex_visitor(), item)); + // res = traits->equal_curve_end_2_object()(ce, std::visit(point_for_vertex_visitor(), item)); // } //} if (traits->is_td_trapezoid(item)) @@ -2234,7 +2232,7 @@ class Trapezoidal_decomposition_2 lt=POINT; else { - Td_active_trapezoid tr (boost::get(item)); + Td_active_trapezoid tr (std::get(item)); lt = tr.is_on_boundaries()? UNBOUNDED_TRAPEZOID : TRAPEZOID; } } @@ -2343,12 +2341,12 @@ class Trapezoidal_decomposition_2 // if the map item represents a fictitious vertex if (traits->is_fictitious_vertex(item)) { - const Curve_end left_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item))); + const Curve_end left_ce(*(std::visit(curve_end_for_fict_vertex_visitor(),item))); print_ce_data(left_ce.cv(), left_ce.ce(), out); } else // if the map item represents a vertex { - Point p = boost::apply_visitor(point_for_vertex_visitor(),item); + Point p = std::visit(point_for_vertex_visitor(),item); print_point_data(p, out); } out << " (void *)left_child: " << (void*)(&(curr.left_child())) @@ -2363,7 +2361,7 @@ class Trapezoidal_decomposition_2 { // bool is_active = traits->is_active(item); // if the map item represents an edge - const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), item)); + const X_monotone_curve_2& he_cv = *(std::visit(cv_for_edge_visitor(), item)); // so top() is a real Halfedge with a curve() if curr is active // or curr holds the curve if curr is not active diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h index 14b7ef19..20714e9c 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h $ -// $Id: Trapezoidal_decomposition_2_impl.h 1faa0e2 2021-04-28T10:55:26+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h $ +// $Id: include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Michal Balas @@ -52,7 +52,7 @@ split_trapezoid_by_vertex(Dag_node& split_node, Dag_node left_node, right_node; if (traits->is_td_trapezoid(curr_item)) { - Td_active_trapezoid& tr(boost::get(curr_item)); + Td_active_trapezoid& tr(std::get(curr_item)); CGAL_warning(traits->is_in_closure(tr, traits->vtx_to_ce(v))); @@ -63,39 +63,39 @@ split_trapezoid_by_vertex(Dag_node& split_node, (v, tr.right(), tr.bottom(), tr.top())); Td_active_trapezoid& - left_tr(boost::get(left_node.get_data())); + left_tr(std::get(left_node.get_data())); Td_active_trapezoid& - right_tr(boost::get(right_node.get_data())); + right_tr(std::get(right_node.get_data())); CGAL_warning(traits->is_trapezoids_top_equal(left_tr,right_tr)); CGAL_warning(traits->is_trapezoids_bottom_equal(left_tr,right_tr)); CGAL_warning(left_tr.is_on_left_boundary() == tr.is_on_left_boundary()); CGAL_warning(right_tr.is_on_right_boundary() == tr.is_on_right_boundary()); - left_tr.init_neighbours(tr.lb(), tr.lt(), - right_node.get_data(), right_node.get_data()); - right_tr.init_neighbours(left_node.get_data(), left_node.get_data(), - tr.rb(), tr.rt()); + left_tr.init_neighbors(tr.lb(), tr.lt(), + right_node.get_data(), right_node.get_data()); + right_tr.init_neighbors(left_node.get_data(), left_node.get_data(), + tr.rb(), tr.rt()); if (!traits->is_empty_item(tr.lb())) { - Td_active_trapezoid& lb(boost::get(tr.lb())); + Td_active_trapezoid& lb(std::get(tr.lb())); lb.set_rb(left_node.get_data()); } if (!traits->is_empty_item(tr.lt())) { - Td_active_trapezoid& lt(boost::get(tr.lt())); + Td_active_trapezoid& lt(std::get(tr.lt())); lt.set_rt(left_node.get_data()); } if (!traits->is_empty_item(tr.rb())) { - Td_active_trapezoid& rb(boost::get(tr.rb())); + Td_active_trapezoid& rb(std::get(tr.rb())); rb.set_lb(right_node.get_data()); } if (!traits->is_empty_item(tr.rt())) { - Td_active_trapezoid& rt(boost::get(tr.rt())); + Td_active_trapezoid& rt(std::get(tr.rt())); rt.set_lt(right_node.get_data()); } } else { // the curr_item is an edge - Td_active_edge& e(boost::get(curr_item)); + Td_active_edge& e(std::get(curr_item)); CGAL_warning(traits->is_in_closure(e, traits->vtx_to_ce(v))); @@ -103,16 +103,16 @@ split_trapezoid_by_vertex(Dag_node& split_node, right_node.set_data(Td_active_edge(e.halfedge())); - Td_active_edge& left_e(boost::get(left_node.get_data())); - Td_active_edge& right_e(boost::get(right_node.get_data())); + Td_active_edge& left_e(std::get(left_node.get_data())); + Td_active_edge& right_e(std::get(right_node.get_data())); //CGAL_warning(left_e.is_on_left_boundary() == e.is_on_left_boundary()); //CGAL_warning(right_e.is_on_right_boundary() == e.is_on_right_boundary()); - left_e.init_neighbours(boost::none); - //left_e.init_neighbours(e.lb(),e.lt(),Td_map_item(),right_node.get_data()); - right_e.init_neighbours(e.next()); - //right_e.init_neighbours(left_node.get_data(),left_node.get_data(),e.rb(),e.rt()); + left_e.init_neighbors(std::nullopt); + //left_e.init_neighbors(e.lb(),e.lt(),Td_map_item(),right_node.get_data()); + right_e.init_neighbors(e.next()); + //right_e.init_neighbors(left_node.get_data(),left_node.get_data(),e.rb(),e.rt()); } // left and right are set to the point itself, @@ -132,10 +132,10 @@ split_trapezoid_by_vertex(Dag_node& split_node, const Dag_node* left_ptr = &split_node.left_child(); const Dag_node* right_ptr = &split_node.right_child(); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)left_ptr), + std::visit(set_dag_node_visitor((Dag_node*)left_ptr), left_ptr->get_data()); //(*left_ptr)->set_dag_node((Dag_node*)left_ptr); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)right_ptr), + std::visit(set_dag_node_visitor((Dag_node*)right_ptr), right_ptr->get_data()); //(*right_ptr)->set_dag_node((Dag_node*)right_ptr); @@ -168,7 +168,7 @@ build_vertex_map_item(Vertex_const_handle v, //----------------------------------------------------------------------------- // Description: -// the opposite operation for spliting the trapezoid with +// the opposite operation for splitting the trapezoid with // vertical line through ce // Precondition: // tr_node data is a td vertex and is active @@ -219,7 +219,7 @@ deactivate_trapezoid(Dag_node& trpz_node, Dag_node* active_node) const CGAL_precondition(traits->is_active(trpz_node.get_data())); CGAL_precondition(traits->is_td_trapezoid(trpz_node.get_data())); if (Td_active_trapezoid* trap = - boost::get(&trpz_node.get_data())) + std::get_if(&trpz_node.get_data())) trap->non_recursive_clear_neighbors(); trpz_node.set_data(Td_inactive_trapezoid()); if (active_node) trpz_node.set_left_child(*active_node); @@ -233,11 +233,11 @@ deactivate_vertex(Dag_node& vtx_node) const CGAL_precondition(traits->is_td_vertex(vtx_node.get_data())); if (traits->is_fictitious_vertex(vtx_node.get_data())) { Td_active_fictitious_vertex& - v(boost::get(vtx_node.get_data())); + v(std::get(vtx_node.get_data())); vtx_node.set_data(Td_inactive_fictitious_vertex(v.vertex(), &vtx_node)); } else { - Td_active_vertex& v(boost::get(vtx_node.get_data())); + Td_active_vertex& v(std::get(vtx_node.get_data())); vtx_node.set_data(Td_inactive_vertex(v.vertex(), &vtx_node)); } } @@ -259,7 +259,7 @@ deactivate_edge(std::shared_ptr& cv, // trapezoidal tree with an input halfedge he // Precondition: // The root trapezoid is active -// The root trapezoid is devided by he or is equal to it and is vertical. +// The root trapezoid is divided by he or is equal to it and is vertical. template typename Trapezoidal_decomposition_2::Dag_node & Trapezoidal_decomposition_2:: @@ -274,7 +274,7 @@ split_trapezoid_by_halfedge(Dag_node& split_node, CGAL_precondition(traits->is_td_trapezoid(split_node.get_data())); Td_map_item curr_item(split_node.get_data()); - Td_active_trapezoid& split_tr = boost::get(curr_item); + Td_active_trapezoid& split_tr = std::get(curr_item); // sets left and right according to td_edge's source and target positions // sets bottom and top to Halfedge itself @@ -303,37 +303,37 @@ split_trapezoid_by_halfedge(Dag_node& split_node, // CGAL_TD_ON_BOTTOM_BOUNDARY ))); Td_active_trapezoid& bottom = - boost::get(bottom_node.get_data()); + std::get(bottom_node.get_data()); Td_active_trapezoid& top = - boost::get(top_node.get_data()); + std::get(top_node.get_data()); - top.init_neighbours(prev_top_tr, split_tr.lt(), boost::none , split_tr.rt()); - bottom.init_neighbours(split_tr.lb(), prev_bottom_tr, split_tr.rb(), - boost::none); + top.init_neighbors(prev_top_tr, split_tr.lt(), std::nullopt , split_tr.rt()); + bottom.init_neighbors(split_tr.lb(), prev_bottom_tr, split_tr.rb(), + std::nullopt); if (!traits->is_empty_item(prev_bottom_tr)) { Td_active_trapezoid& - prev_btm(boost::get(prev_bottom_tr)); + prev_btm(std::get(prev_bottom_tr)); prev_btm.set_rt(bottom_node.get_data()); } if (!traits->is_empty_item(prev_top_tr)) { - Td_active_trapezoid& prev_top(boost::get(prev_top_tr)); + Td_active_trapezoid& prev_top(std::get(prev_top_tr)); prev_top.set_rb(top_node.get_data()); } if (!traits->is_empty_item(split_tr.lb())) { - Td_active_trapezoid& lb(boost::get(split_tr.lb())); + Td_active_trapezoid& lb(std::get(split_tr.lb())); lb.set_rb(bottom_node.get_data()); } if (!traits->is_empty_item(split_tr.lt())) { - Td_active_trapezoid& lt(boost::get(split_tr.lt())); + Td_active_trapezoid& lt(std::get(split_tr.lt())); lt.set_rt(top_node.get_data()); } if (!traits->is_empty_item(split_tr.rb())) { - Td_active_trapezoid& rb(boost::get(split_tr.rb())); + Td_active_trapezoid& rb(std::get(split_tr.rb())); rb.set_lb(bottom_node.get_data()); } if (!traits->is_empty_item(split_tr.rt())) { - Td_active_trapezoid& rt(boost::get(split_tr.rt())); + Td_active_trapezoid& rt(std::get(split_tr.rt())); rt.set_lt(top_node.get_data()); } split_node.replace(sep,bottom_node,top_node); //nodes depth are updated here @@ -348,14 +348,14 @@ split_trapezoid_by_halfedge(Dag_node& split_node, const Dag_node* bottomPtr = &split_node.left_child(); const Dag_node* topPtr = &split_node.right_child(); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)bottomPtr), + std::visit(set_dag_node_visitor((Dag_node*)bottomPtr), bottomPtr->get_data()); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)topPtr), + std::visit(set_dag_node_visitor((Dag_node*)topPtr), topPtr->get_data()); - // Td_active_edge& new_e = boost::get(split_node.get_data()); + // Td_active_edge& new_e = std::get(split_node.get_data()); if (!traits->is_empty_item(prev_e)) { - Td_active_edge& e( boost::get(prev_e)); + Td_active_edge& e( std::get(prev_e)); e.set_next(split_node.get_data()); } //update these trapezoids pointers. @@ -404,14 +404,14 @@ update_vtx_with_new_edge(Halfedge_const_handle he, //set cw to hold the halfedge whose source is p, // which is clockwise "smallest" starting from top (12 o'clock) - Halfedge_const_handle cw_he(boost::apply_visitor(cw_he_visitor(), vtx_item)); + Halfedge_const_handle cw_he(std::visit(cw_he_visitor(), vtx_item)); if (traits->compare_cw_around_point_2_object()(he->curve(), is_edge_to_right(he,p), cw_he->curve(), is_edge_to_right(cw_he,p), p) == SMALLER) { - boost::apply_visitor(set_cw_he_visitor(he),vtx_item);//v_tr->set_top(he); + std::visit(set_cw_he_visitor(he),vtx_item);//v_tr->set_top(he); } return vtx_item; @@ -430,7 +430,7 @@ insert_curve_at_vtx_using_dag(Halfedge_const_handle he, { CGAL_precondition(lt==TRAPEZOID || lt==UNBOUNDED_TRAPEZOID); - Dag_node* node = boost::apply_visitor(dag_node_visitor(), item); + Dag_node* node = std::visit(dag_node_visitor(), item); CGAL_assertion(node != nullptr); CGAL_assertion(he != m_empty_he_handle); @@ -458,13 +458,13 @@ insert_curve_at_vtx_using_dag(Halfedge_const_handle he, // CGAL_precondition(traits->is_td_vertex(vtx_item)); // CGAL_precondition(traits->is_active(vtx_item)); // -// Halfedge_const_handle cw_he (boost::apply_visitor(cw_he_visitor(), vtx_item)); +// Halfedge_const_handle cw_he (std::visit(cw_he_visitor(), vtx_item)); // // //make sure the cw_he is added in same direction as before // // such that vtx_item is the source (done inside the set methods) // if (cw_he == old_he || cw_he->twin() == old_he) // { -// boost::apply_visitor(set_cw_he_visitor(new_he), vtx_item); +// std::visit(set_cw_he_visitor(new_he), vtx_item); // } //} @@ -479,12 +479,12 @@ update_vtx_cw_he_after_merge(const X_monotone_curve_2& old_cv, CGAL_precondition(traits->is_td_vertex(vtx_item)); CGAL_precondition(traits->is_active(vtx_item)); - Halfedge_const_handle cw_he(boost::apply_visitor(cw_he_visitor(), vtx_item)); + Halfedge_const_handle cw_he(std::visit(cw_he_visitor(), vtx_item)); //make sure the cw_he is added in same direction as before // such that v_tr is the source (done inside the set methods) if (traits->equal_2_object()(cw_he->curve(), old_cv)) - boost::apply_visitor(set_cw_he_visitor(new_he), vtx_item); + std::visit(set_cw_he_visitor(new_he), vtx_item); } //----------------------------------------------------------------------------- @@ -499,12 +499,12 @@ update_vtx_cw_he_after_remove(Halfedge_const_handle old_he, CGAL_precondition(traits->is_td_vertex(vtx_item)); CGAL_precondition(traits->is_active(vtx_item)); - Halfedge_const_handle cw_he(boost::apply_visitor(cw_he_visitor(), vtx_item)); + Halfedge_const_handle cw_he(std::visit(cw_he_visitor(), vtx_item)); if ((old_he == cw_he) || (old_he->twin() == cw_he)) { Halfedge_const_handle new_he = cw_he->twin()->next(); if (new_he != cw_he) - boost::apply_visitor(set_cw_he_visitor(new_he), vtx_item); - else boost::apply_visitor(reset_cw_he_visitor(), vtx_item); // dangling edge removed + std::visit(set_cw_he_visitor(new_he), vtx_item); + else std::visit(reset_cw_he_visitor(), vtx_item); // dangling edge removed } } @@ -520,20 +520,20 @@ update_vtx_cw_he_after_remove(Halfedge_const_handle old_he, // CGAL_precondition(traits->is_td_vertex(vtx_item)); // CGAL_precondition(traits->is_active(vtx_item)); // -// Halfedge_const_handle top_he (boost::apply_visitor(top_he_visitor(), vtx_item)); -// Halfedge_const_handle bottom_he (boost::apply_visitor(bottom_he_visitor(), vtx_item)); +// Halfedge_const_handle top_he (std::visit(top_he_visitor(), vtx_item)); +// Halfedge_const_handle bottom_he (std::visit(bottom_he_visitor(), vtx_item)); // // //make sure the top & bottom are added in same direction as before // // such that sep is the source (done inside the set methods) // if ((top_he == he1) || (top_he == he1->twin()) || // (top_he == he2) || (top_he == he2->twin()) ) // { -// boost::apply_visitor(set_top_he_visitor(new_he), vtx_item); //v_tr.set_top(new_he); +// std::visit(set_top_he_visitor(new_he), vtx_item); //v_tr.set_top(new_he); // } // if ((bottom_he == he1) || (bottom_he == he1->twin()) || // (bottom_he == he2) || (bottom_he == he2->twin()) ) // { -// boost::apply_visitor(set_bottom_he_visitor(new_he), vtx_item); //v_tr.set_bottom(new_he); +// std::visit(set_bottom_he_visitor(new_he), vtx_item); //v_tr.set_bottom(new_he); // } //} @@ -561,22 +561,22 @@ update_map_items_after_merge(In_face_iterator& it, CGAL_assertion(traits->is_active(curr_item)); if (traits->is_td_edge(curr_item)) { - Td_active_edge& e(boost::get(curr_item)); + Td_active_edge& e(std::get(curr_item)); if (e.halfedge() == old_he || e.halfedge() == old_he->twin()) e.set_halfedge(new_he); } else if (traits->is_td_trapezoid(curr_item)) { - Td_active_trapezoid& tr(boost::get(curr_item)); + Td_active_trapezoid& tr(std::get(curr_item)); if (tr.bottom() == old_he || tr.bottom() == old_he->twin()) tr.set_bottom(new_he); if (tr.top() == old_he || tr.top() == old_he->twin()) tr.set_top(new_he); } else { //if is_td_vertex - Halfedge_const_handle cw_he(boost::apply_visitor(cw_he_visitor(), + Halfedge_const_handle cw_he(std::visit(cw_he_visitor(), curr_item)); if (cw_he == old_he || cw_he == old_he->twin()) - boost::apply_visitor(set_cw_he_visitor(new_he), curr_item); + std::visit(set_cw_he_visitor(new_he), curr_item); } last_item = *it; @@ -609,26 +609,26 @@ search_using_dag(Dag_node& curr_node, while (true) { //curr_node is the current pointer to node in the data structure - //curr_item is the curent Td_map_item held in curr_node + //curr_item is the current Td_map_item held in curr_node Td_map_item curr_item(curr_node.get_data()); if (traits->is_td_vertex(curr_item)) { // the curr_item represents a vertex //bool is_fict_vtx = traits->is_fictitious_vertex(curr_item); - //if ((is_fict_vtx && is_end_point_left_low(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) || - // (!is_fict_vtx && is_end_point_left_low(p, boost::apply_visitor(point_for_vertex_visitor(), curr_item))) ) + //if ((is_fict_vtx && is_end_point_left_low(p, *(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)))) || + // (!is_fict_vtx && is_end_point_left_low(p, std::visit(point_for_vertex_visitor(), curr_item))) ) if (is_end_point_left_low(p, curr_node)) { curr_node = curr_node.left_child(); continue; } - //else if ((is_fict_vtx && is_end_point_right_top(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) || - // (!is_fict_vtx && is_end_point_right_top(p, boost::apply_visitor(point_for_vertex_visitor(), curr_item))) ) + //else if ((is_fict_vtx && is_end_point_right_top(p, *(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)))) || + // (!is_fict_vtx && is_end_point_right_top(p, std::visit(point_for_vertex_visitor(), curr_item))) ) else if (is_end_point_right_top(p, curr_node)) { curr_node = curr_node.right_child(); continue; } - //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || - // (!is_fict_vtx && traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) ) + //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || + // (!is_fict_vtx && traits->equal_2_object()(std::visit(point_for_vertex_visitor(), curr_item), p)) ) else if (are_equal_end_points(p, curr_node)) { if (he == m_empty_he_handle) { // he is the empty handle @@ -663,13 +663,13 @@ search_using_dag(Dag_node& curr_node, are_equal_end_points(p,curr_node)); //(is_fict_vtx && - // (is_end_point_left_low(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) || - // is_end_point_right_top(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) || - // traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)),p))) || + // (is_end_point_left_low(p,*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item))) || + // is_end_point_right_top(p,*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item))) || + // traits->equal_curve_end_2_object()(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)),p))) || // (!is_fict_vtx && - // (is_end_point_left_low(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) || - // is_end_point_right_top(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) || - // traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item),p)))); + // (is_end_point_left_low(p,std::visit(point_for_vertex_visitor(), curr_item)) || + // is_end_point_right_top(p,std::visit(point_for_vertex_visitor(), curr_item)) || + // traits->equal_2_object()(std::visit(point_for_vertex_visitor(), curr_item),p)))); return Locate_type(); } @@ -678,7 +678,7 @@ search_using_dag(Dag_node& curr_node, // curr_item represents an edge, // so top() is a real Halfedge with a curve() if curr_item is active // or curr_item holds the curve if it is not active - const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), curr_item)); + const X_monotone_curve_2& he_cv = *(std::visit(cv_for_edge_visitor(), curr_item)); Comparison_result cres = traits->compare_y_at_x_2_object()(p, he_cv); if (cres == SMALLER) { @@ -753,7 +753,7 @@ search_using_dag(Dag_node& curr_node, else { // if is_degenerate() == 0, meaning: curr_item is a real trapezoid if (traits->is_active(curr_item)) { - Td_active_trapezoid& tr = boost::get(curr_item); + Td_active_trapezoid& tr = std::get(curr_item); return tr.is_on_boundaries() ? UNBOUNDED_TRAPEZOID : TRAPEZOID; } curr_node = curr_node.left_child(); @@ -793,7 +793,7 @@ search_using_dag(Dag_node& curr_node, // while(true) // { // //curr_node is the current pointer to node in the data structure -// //curr_item is the curent Td_map_item held in curr_node +// //curr_item is the current Td_map_item held in curr_node // Td_map_item curr_item(curr_node.get_data()); // // if (traits->is_td_vertex(curr_item)) @@ -810,30 +810,30 @@ search_using_dag(Dag_node& curr_node, // bool is_fict_vtx = traits->is_fictitious_vertex(curr_item); // if (is_fict_vtx) // { -// Curve_end vtx_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))); +// Curve_end vtx_ce(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item))); // print_ce_data(vtx_ce.cv(), vtx_ce.ce(), out); // } // else // { -// print_point_data(boost::apply_visitor(point_for_vertex_visitor(),curr_item), out); +// print_point_data(std::visit(point_for_vertex_visitor(),curr_item), out); // } // -// if ((is_fict_vtx && is_end_point_left_low(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) || -// (!is_fict_vtx && is_end_point_left_low(p, boost::apply_visitor(point_for_vertex_visitor(),curr_item))) ) +// if ((is_fict_vtx && is_end_point_left_low(p, *(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)))) || +// (!is_fict_vtx && is_end_point_left_low(p, std::visit(point_for_vertex_visitor(),curr_item))) ) // { // out << " Going left " << std::endl; // curr_node = curr_node.left_child(); // continue; // } -// else if ((is_fict_vtx && is_end_point_right_top(p, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)))) || -// (!is_fict_vtx && is_end_point_right_top(p, boost::apply_visitor(point_for_vertex_visitor(),curr_item))) ) +// else if ((is_fict_vtx && is_end_point_right_top(p, *(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)))) || +// (!is_fict_vtx && is_end_point_right_top(p, std::visit(point_for_vertex_visitor(),curr_item))) ) // { // out << " Going right " << std::endl; // curr_node = curr_node.right_child(); // continue; // } -// else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || -// (!is_fict_vtx && traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(),curr_item), p)) ) +// else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || +// (!is_fict_vtx && traits->equal_2_object()(std::visit(point_for_vertex_visitor(),curr_item), p)) ) // { // out << " Equal to query " << std::endl; // if (he == m_empty_he_handle) //if he is the empty handle @@ -876,7 +876,7 @@ search_using_dag(Dag_node& curr_node, // // if curr_item represents an edge, // // so top() is a real Halfedge with a curve() if curr_item is active // // or curr_item holds the curve if it is not active -// const X_monotone_curve_2& he_cv = *(boost::apply_visitor(cv_for_edge_visitor(), curr_item)); +// const X_monotone_curve_2& he_cv = *(std::visit(cv_for_edge_visitor(), curr_item)); // // out << " EDGE : " ; // if (traits->is_active(curr_item)) @@ -951,7 +951,7 @@ search_using_dag(Dag_node& curr_node, // if (traits->is_active(curr_item)) // { // out << " (active) "; -// Td_active_trapezoid tr = boost::get(curr_item); +// Td_active_trapezoid tr = std::get(curr_item); // if (tr.is_on_boundaries()) // out << " UNBOUNDED! "; // else @@ -1017,26 +1017,26 @@ search_using_dag_with_cv(Dag_node& curr_node, { while (true) { //curr_node is the current pointer to node in the data structure - //curr_item is the curent Td_map_item held in curr_node + //curr_item is the current Td_map_item held in curr_node Td_map_item curr_item(curr_node.get_data()); if (traits->is_td_vertex(curr_item)) { // the curr_item represents a vertex //bool is_fict_vtx = traits->is_fictitious_vertex(curr_item); - //if ((is_fict_vtx && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) || - // (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), ce)) ) + //if ((is_fict_vtx && is_end_point_right_top(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) || + // (!is_fict_vtx && is_end_point_right_top(std::visit(point_for_vertex_visitor(), curr_item), ce)) ) if (is_end_point_left_low(ce, curr_node)) { curr_node = curr_node.left_child(); continue; } - //else if ((is_fict_vtx && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) || - // (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), ce)) ) + //else if ((is_fict_vtx && is_end_point_left_low(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) || + // (!is_fict_vtx && is_end_point_left_low(std::visit(point_for_vertex_visitor(), curr_item), ce)) ) else if (is_end_point_right_top(ce, curr_node)) { curr_node = curr_node.right_child(); continue; } - //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) || - // (!is_fict_vtx && traits->equal_curve_end_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item), ce)) ) + //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), ce)) || + // (!is_fict_vtx && traits->equal_curve_end_2_object()(std::visit(point_for_vertex_visitor(), curr_item), ce)) ) else if (are_equal_end_points(ce, curr_node)) { if (!p_cv) { // p_cv was not given @@ -1070,13 +1070,13 @@ search_using_dag_with_cv(Dag_node& curr_node, is_end_point_right_top(ce, curr_node) || are_equal_end_points(ce, curr_node)); //(is_fict_vtx && - // (is_end_point_left_low(ce,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) || - // is_end_point_right_top(ce,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) || - // traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)),ce))) || + // (is_end_point_left_low(ce,*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item))) || + // is_end_point_right_top(ce,*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item))) || + // traits->equal_curve_end_2_object()(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)),ce))) || // (!is_fict_vtx && - // (is_end_point_left_low(ce,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) || - // is_end_point_right_top(ce,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) || - // traits->equal_curve_end_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item),ce)))); + // (is_end_point_left_low(ce,std::visit(point_for_vertex_visitor(), curr_item)) || + // is_end_point_right_top(ce,std::visit(point_for_vertex_visitor(), curr_item)) || + // traits->equal_curve_end_2_object()(std::visit(point_for_vertex_visitor(), curr_item),ce)))); return Locate_type(); } } @@ -1086,7 +1086,7 @@ search_using_dag_with_cv(Dag_node& curr_node, // or curr_item holds the curve if it is not active const X_monotone_curve_2& he_cv = - *(boost::apply_visitor(cv_for_edge_visitor(), curr_item)); + *(std::visit(cv_for_edge_visitor(), curr_item)); Comparison_result cres = traits->compare_curve_end_y_at_x_2_object()(ce, he_cv); if (cres == SMALLER) { @@ -1174,7 +1174,7 @@ search_using_dag_with_cv(Dag_node& curr_node, else { // if is_degenerate() == 0, meaning: curr_item is a real trapezoid if (traits->is_active(curr_item)) { - Td_active_trapezoid& tr = boost::get(curr_item); + Td_active_trapezoid& tr = std::get(curr_item); return tr.is_on_boundaries() ? UNBOUNDED_TRAPEZOID : TRAPEZOID; } curr_node = curr_node.left_child(); @@ -1207,26 +1207,26 @@ search_using_dag_with_cv(Dag_node& curr_node, while (true) { //curr_node is the current pointer to node in the data structure - //curr_item is the curent Td_map_item held in curr_node + //curr_item is the current Td_map_item held in curr_node Td_map_item curr_item(curr_node.get_data()); if (traits->is_td_vertex(curr_item)) { // the curr_item represents a vertex //bool is_fict_vtx = traits->is_fictitious_vertex(curr_item); - //if ((is_fict_vtx && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || - // (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) ) + //if ((is_fict_vtx && is_end_point_right_top(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || + // (!is_fict_vtx && is_end_point_right_top(std::visit(point_for_vertex_visitor(), curr_item), p)) ) if (is_end_point_left_low(p, curr_node)) { curr_node = curr_node.left_child(); continue; } - //else if ((is_fict_vtx && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || - // (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) ) + //else if ((is_fict_vtx && is_end_point_left_low(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || + // (!is_fict_vtx && is_end_point_left_low(std::visit(point_for_vertex_visitor(), curr_item), p)) ) else if (is_end_point_right_top(p, curr_node)) { curr_node = curr_node.right_child(); continue; } - //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || - // (!is_fict_vtx && traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item), p)) ) + //else if ((is_fict_vtx && traits->equal_curve_end_2_object()(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), p)) || + // (!is_fict_vtx && traits->equal_2_object()(std::visit(point_for_vertex_visitor(), curr_item), p)) ) else if (are_equal_end_points(p, curr_node)) { if (!p_cv) { // p_cv was not given @@ -1260,13 +1260,13 @@ search_using_dag_with_cv(Dag_node& curr_node, is_end_point_right_top(p, curr_node) || are_equal_end_points(p, curr_node)); //CGAL_assertion((is_fict_vtx && - // (is_end_point_left_low(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) || - // is_end_point_right_top(p,*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item))) || - // traits->equal_curve_end_2_object()(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)),p))) || + // (is_end_point_left_low(p,*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item))) || + // is_end_point_right_top(p,*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item))) || + // traits->equal_curve_end_2_object()(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)),p))) || // (!is_fict_vtx && - // (is_end_point_left_low(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) || - // is_end_point_right_top(p,boost::apply_visitor(point_for_vertex_visitor(), curr_item)) || - // traits->equal_2_object()(boost::apply_visitor(point_for_vertex_visitor(), curr_item),p)))); + // (is_end_point_left_low(p,std::visit(point_for_vertex_visitor(), curr_item)) || + // is_end_point_right_top(p,std::visit(point_for_vertex_visitor(), curr_item)) || + // traits->equal_2_object()(std::visit(point_for_vertex_visitor(), curr_item),p)))); return Locate_type(); } } @@ -1275,7 +1275,7 @@ search_using_dag_with_cv(Dag_node& curr_node, // so top() is a real Halfedge with a curve() if curr_item is active // or curr_item holds the curve if it is not active const X_monotone_curve_2& he_cv = - *(boost::apply_visitor(cv_for_edge_visitor(), curr_item)); + *(std::visit(cv_for_edge_visitor(), curr_item)); Comparison_result cres = traits->compare_y_at_x_2_object()(p, he_cv); if (cres == SMALLER) { curr_node = curr_node.left_child(); @@ -1351,7 +1351,7 @@ search_using_dag_with_cv(Dag_node& curr_node, else { // is_degenerate() == 0, meaning: curr_item is a real trapezoid if (traits->is_active(curr_item)) { - Td_active_trapezoid& tr = boost::get(curr_item); + Td_active_trapezoid& tr = std::get(curr_item); return tr.is_on_boundaries() ? UNBOUNDED_TRAPEZOID : TRAPEZOID; } curr_node = curr_node.left_child(); @@ -1377,7 +1377,7 @@ container2dag(Nodes_map& ar, int left, int right, int& num_of_new_nodes) const CGAL_assertion(traits->is_active(item)); CGAL_assertion(traits->is_td_trapezoid(item)); Dag_node& tr_node( ar.find(d)->second); - Td_active_trapezoid& tr(boost::get(tr_node.get_data())); + Td_active_trapezoid& tr(std::get(tr_node.get_data())); Vertex_const_handle v = tr.right(); Curve_end ce(traits->vtx_to_ce(v)); @@ -1397,15 +1397,15 @@ container2dag(Nodes_map& ar, int left, int right, int& num_of_new_nodes) const } num_of_new_nodes++; - boost::apply_visitor(set_dag_node_visitor((Dag_node*)&(curr_node.left_child())), curr_node.left_child().get_data()); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)&(curr_node.right_child())), curr_node.right_child().get_data()); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)&curr_node), + std::visit(set_dag_node_visitor((Dag_node*)&(curr_node.left_child())), curr_node.left_child().get_data()); + std::visit(set_dag_node_visitor((Dag_node*)&(curr_node.right_child())), curr_node.right_child().get_data()); + std::visit(set_dag_node_visitor((Dag_node*)&curr_node), curr_node.get_data()); //curr_node.left_child()->set_dag_node(&curr_node.left_child()); //curr_node.right_child()->set_dag_node(&curr_node.right_child()); //curr_node->set_dag_node(&curr_node);// fake temporary node deactivate_vertex(curr_node); //curr_node->remove(); // mark as deleted - boost::apply_visitor(set_dag_node_visitor((Dag_node*)nullptr), + std::visit(set_dag_node_visitor((Dag_node*)nullptr), curr_node.get_data());//curr_node->set_dag_node(0); return curr_node; @@ -1423,7 +1423,7 @@ is_last_edge(Halfedge_const_handle /* he */ , Td_map_item& vtx_item) CGAL_precondition(traits->is_active(vtx_item)); Vertex_const_handle - v(boost::apply_visitor(vertex_for_active_vertex_visitor(), vtx_item)); + v(std::visit(vertex_for_active_vertex_visitor(), vtx_item)); typename Arrangement_on_surface_2::Halfedge_around_vertex_const_circulator first, second; @@ -1443,7 +1443,7 @@ is_last_edge(Halfedge_const_handle /* he */ , Td_map_item& vtx_item) // Remark: // Given an edge-degenerate trapezoid representing a Halfedge, // all the other trapezoids representing the Halfedge can be extracted -// via moving continously to the left and right neighbours. +// via moving continuously to the left and right neighbors. template typename Trapezoidal_decomposition_2::Td_map_item Trapezoidal_decomposition_2::insert(Halfedge_const_handle he) @@ -1518,13 +1518,13 @@ Trapezoidal_decomposition_2::insert(Halfedge_const_handle he) // locate and insert end points of the input halfedge to the Td_map_item // Dag if needed - Dag_node p1_node(*(boost::apply_visitor(dag_node_visitor(), p1_item))); - //Dag_node p2_node(*(boost::apply_visitor(dag_node_visitor(), p2_item)));// Not in use + Dag_node p1_node(*(std::visit(dag_node_visitor(), p1_item))); + //Dag_node p2_node(*(std::visit(dag_node_visitor(), p2_item)));// Not in use // create the Td_map_item iterator for traveling along the Trapezoids that // intersect the input Halfedge, using left-low to right-high order In_face_iterator it = follow_curve(p1_node,he,LARGER); - boost::optional curr_trp = boost::none; + std::optional curr_trp = std::nullopt; Td_map_item prev = p1_item; Td_map_item prev_bottom_tr = Td_map_item(0); //active_tr Td_map_item prev_top_tr = Td_map_item(0); //active_tr @@ -1539,7 +1539,7 @@ Trapezoidal_decomposition_2::insert(Halfedge_const_handle he) while(!!it) { //this means as long as the iterator is valid curr_trp = it.trp(); - CGAL_assertion(curr_trp != boost::none); + CGAL_assertion(curr_trp != std::nullopt); prev_bottom_tr = (*curr_trp).lb(); prev_top_tr = (*curr_trp).lt(); @@ -1568,7 +1568,7 @@ Trapezoidal_decomposition_2::insert(Halfedge_const_handle he) traits->is_active(new_btm_item)); if (merge_if_possible(prev_bottom_tr, new_btm_item)) { Dag_node* left_child_node = - boost::apply_visitor(dag_node_visitor(),prev_bottom_tr); + std::visit(dag_node_visitor(),prev_bottom_tr); node->set_left_child(*left_child_node); old_bottom_tr = prev_bottom_tr; m_number_of_dag_nodes--; //update number of nodes in the DAG after merge @@ -1581,13 +1581,13 @@ Trapezoidal_decomposition_2::insert(Halfedge_const_handle he) CGAL_assertion(traits->is_td_trapezoid(new_top_item) && traits->is_active(new_top_item)); if (merge_if_possible(prev_top_tr, new_top_item)) { - Dag_node* right_child_node = boost::apply_visitor(dag_node_visitor(), + Dag_node* right_child_node = std::visit(dag_node_visitor(), prev_top_tr); node->set_right_child(*right_child_node); old_top_tr = prev_top_tr; m_number_of_dag_nodes--; //update number of DAG nodes after merge } - // update trapezoid's left/right neighbouring relations + // update trapezoid's left/right neighboring relations //MICHAL: if the assertion below fails then we need to check why CGAL_assertion(!traits->is_td_trapezoid(prev)); if (traits->is_td_trapezoid(prev)) { @@ -1654,14 +1654,14 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) if (lt1 != POINT || lt2 != POINT) return; - CGAL_warning(boost::apply_visitor(dag_node_visitor(), p1_item) != nullptr); - CGAL_warning(boost::apply_visitor(dag_node_visitor(), p2_item) != nullptr); + CGAL_warning(std::visit(dag_node_visitor(), p1_item) != nullptr); + CGAL_warning(std::visit(dag_node_visitor(), p2_item) != nullptr); //retrieve the Dag_nodes of the two point-degenerate trapezoid - Dag_node& p1_node = *(boost::apply_visitor(dag_node_visitor(), p1_item)); - Dag_node& p2_node = *(boost::apply_visitor(dag_node_visitor(), p2_item)); + Dag_node& p1_node = *(std::visit(dag_node_visitor(), p1_item)); + Dag_node& p2_node = *(std::visit(dag_node_visitor(), p2_item)); - //calculate the immediate lower, central and upper neighbourhood of + //calculate the immediate lower, central and upper neighborhood of // the curve in the data structure //In_face_iterator btm_it(follow_curve(tt1,he,SMALLER)); In_face_iterator btm_it(follow_curve(p1_node,he,SMALLER)); @@ -1725,7 +1725,7 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) //copy trapezoid data from btm and top trapezoids Dag_node& new_node = (new_array.find(sz))->second; ++sz; - Td_active_trapezoid& tr(boost::get(new_node.get_data())); + Td_active_trapezoid& tr(std::get(new_node.get_data())); tr.set_dag_node(&new_node); tr.set_lb(btm_it_tr.lb()); tr.set_lt(top_it_tr.lt()); @@ -1741,13 +1741,13 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) } if (!traits->is_empty_item(tr.lb())) { Td_map_item lb_item = tr.lb(); - Td_active_trapezoid& lb_tr(boost::get(lb_item)); + Td_active_trapezoid& lb_tr(std::get(lb_item)); lb_tr.set_rb(new_node.get_data()); } if (!traits->is_empty_item(tr.lt())) { Td_map_item lt_item = tr.lt(); - Td_active_trapezoid& lt_tr(boost::get(lt_item)); + Td_active_trapezoid& lt_tr(std::get(lt_item)); lt_tr.set_rt(new_node.get_data()); } @@ -1764,28 +1764,28 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) //curr_it_tr = *(curr_it.trp()); end_reached = !btm_it || !top_it; - //copy neighbouring trapezoids in case top/btm are not the same for the old + //copy neighboring trapezoids in case top/btm are not the same for the old // trapezoid and the next trapezoid after incrementing the old one if (!btm_it || (inc_btm && !traits->is_trpz_bottom_equal(old_tr_item, *curr_it))) { - Td_map_item rb(boost::apply_visitor(rb_visitor(), old_tr_item)); + Td_map_item rb(std::visit(rb_visitor(), old_tr_item)); if (!traits->is_empty_item(rb)) { - boost::apply_visitor(set_lb_visitor(last_new_tr_item), rb); + std::visit(set_lb_visitor(last_new_tr_item), rb); //rb->set_lb(last_new_tr); - boost::apply_visitor(set_rb_visitor(rb), last_new_tr_item); + std::visit(set_rb_visitor(rb), last_new_tr_item); //last_new_tr->set_rb(rb); } } if (!top_it || (!inc_btm && !traits->is_trpz_top_equal(old_tr_item,*curr_it))) { - Td_map_item rt(boost::apply_visitor(rt_visitor(), old_tr_item)); + Td_map_item rt(std::visit(rt_visitor(), old_tr_item)); if (!traits->is_empty_item(rt)) { - boost::apply_visitor(set_lt_visitor(last_new_tr_item), rt); + std::visit(set_lt_visitor(last_new_tr_item), rt); //rt->set_lt(last_new_tr); - boost::apply_visitor(set_rt_visitor(rt), last_new_tr_item); + std::visit(set_rt_visitor(rt), last_new_tr_item); //last_new_tr->set_rt(rt); } } @@ -1793,7 +1793,7 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) //set the no longer relevant trapezoids as removed and add the new nodes // as their replacement - Dag_node* last_tr_node(boost::apply_visitor(dag_node_visitor(), + Dag_node* last_tr_node(std::visit(dag_node_visitor(), last_tr_item)); if (prev_inc_btm != inc_btm) { @@ -1827,7 +1827,7 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) // update the dag node pointer in the trapezoid const Dag_node* real = &last_tr_node->left_child(); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)real),real->get_data()); //(*real)->set_dag_node((Dag_node*)real); + std::visit(set_dag_node_visitor((Dag_node*)real),real->get_data()); //(*real)->set_dag_node((Dag_node*)real); } while(!end_reached); @@ -1853,18 +1853,18 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) m_number_of_dag_nodes += num_of_new_nodes; //new node (tmp) was added const Dag_node* real = &tr.dag_node()->left_child(); - boost::apply_visitor(set_dag_node_visitor((Dag_node*)real),real->get_data()); //(*real)->set_dag_node((Dag_node*)real); + std::visit(set_dag_node_visitor((Dag_node*)real),real->get_data()); //(*real)->set_dag_node((Dag_node*)real); if (!traits->is_empty_item(rb)) { - boost::apply_visitor(set_rb_visitor(rb),last_new_tr_item); + std::visit(set_rb_visitor(rb),last_new_tr_item); //last_new_tr->set_rb(rb); - boost::apply_visitor(set_lb_visitor(last_new_tr_item),rb); + std::visit(set_lb_visitor(last_new_tr_item),rb); //rb->set_lb(last_new_tr); } if (!traits->is_empty_item(rt)) { - boost::apply_visitor(set_rt_visitor(rt),last_new_tr_item); + std::visit(set_rt_visitor(rt),last_new_tr_item); //last_new_tr->set_rt(rt); - boost::apply_visitor(set_lt_visitor(last_new_tr_item),rt); + std::visit(set_lt_visitor(last_new_tr_item),rt); //rt->set_lt(last_new_tr); } @@ -1876,7 +1876,7 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) //Base_trapezoid_iterator last_mid = mid_it; Dag_node* e_node = nullptr; while (!!++mid_it) { - e_node = boost::apply_visitor(dag_node_visitor(),*last_edge_fragment_it); + e_node = std::visit(dag_node_visitor(),*last_edge_fragment_it); deactivate_edge(removed_cv_ptr,*e_node); //last_mid->remove(); last_edge_fragment_it = mid_it; } @@ -1885,7 +1885,7 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) //4. remove adjacency at right end point //remove the final trapezoid representing the removed halfedge - e_node = boost::apply_visitor(dag_node_visitor(),*last_edge_fragment_it); + e_node = std::visit(dag_node_visitor(),*last_edge_fragment_it); deactivate_edge(removed_cv_ptr,*e_node); //last_mid->remove(); //----------------------------------- @@ -1945,7 +1945,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt, p x------x */ - Td_active_trapezoid& tr(boost::get(item)); + Td_active_trapezoid& tr(std::get(item)); if ((up_direction && !tr.is_on_right_boundary() && (traits->compare_curve_end_x_2_object() @@ -2114,7 +2114,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt, // CGAL_warning(old_t.dag_node()); // //#endif -// //the DAG node of the curve trapezoid where the spiltting point is +// //the DAG node of the curve trapezoid where the splitting point is // Dag_node& old_split_node = *old_t.dag_node(); // // CGAL_assertion(traits->equal_curve_end_2_object() @@ -2202,7 +2202,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt, // In_face_iterator& top_it = *m_before_split.m_p_top_it; // //MICHAL: new end // -// //the DAG node of the curve trapezoid where the spiltting point is +// //the DAG node of the curve trapezoid where the splitting point is // Dag_node& old_split_node = *old_t.dag_node(); // // @@ -2340,7 +2340,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt, // } // else // new_left_t is leftmost representative for he // { -// //set_neighbours_after_split_halfedge_update (new_left_t, t1, he1, he2); //MICHAL: this method does nothing +// //set_neighbors_after_split_halfedge_update (new_left_t, t1, he1, he2); //MICHAL: this method does nothing // } // if (t1.rt()==&old_t) t1.set_rt(&new_left_t); // if (t1.lb()==&old_t) t1.set_lb(&new_left_t); @@ -2366,7 +2366,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt, // } // else // new_right_t is rightmost representative for te // { -// //set_neighbours_after_split_halfedge_update (new_right_t,t2,he1, he2,false); //MICHAL: this method does nothing +// //set_neighbors_after_split_halfedge_update (new_right_t,t2,he1, he2,false); //MICHAL: this method does nothing // } // if (t2.rt()==&old_t) t2.set_rt(&new_right_t); // if (t2.lb()==&old_t) t2.set_lb(&new_right_t); @@ -2409,7 +2409,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt, // // update top curves // bottom_tt.left_child()->set_top(left_he); // bottom_tt.right_child()->set_top(right_he); -// // left and right are not neighbours. +// // left and right are not neighbors. // bottom_tt.left_child()->set_rt(0); // bottom_tt.right_child()->set_lt(0); // @@ -2467,7 +2467,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt, // // update bottom side // top_tt.left_child()->set_bottom(left_he); // top_tt.right_child()->set_bottom(right_he); -// // left and right aren't neighbours +// // left and right aren't neighbors // top_tt.left_child()->set_rb(0); // top_tt.right_child()->set_lb(0); // @@ -2637,9 +2637,9 @@ merge_edge(Halfedge_const_handle he1, Td_map_item mrgp_item = locate(ce, lt); //varifying that all trapezoids are not nullptr and are of type POINT - CGAL_warning(boost::apply_visitor(dag_node_visitor(), leftp_item) != nullptr); - CGAL_warning(boost::apply_visitor(dag_node_visitor(), rightp_item)!= nullptr); - CGAL_warning(boost::apply_visitor(dag_node_visitor(), mrgp_item) != nullptr); + CGAL_warning(std::visit(dag_node_visitor(), leftp_item) != nullptr); + CGAL_warning(std::visit(dag_node_visitor(), rightp_item)!= nullptr); + CGAL_warning(std::visit(dag_node_visitor(), mrgp_item) != nullptr); //define the left curve and the right curve, according // to the common point (that is merged) @@ -2679,8 +2679,8 @@ merge_edge(Halfedge_const_handle he1, #endif //get the nodes of leftmost point and merge point - Dag_node& leftp_node = *(boost::apply_visitor(dag_node_visitor(), leftp_item)); - Dag_node& mrgp_node = *(boost::apply_visitor(dag_node_visitor(), mrgp_item)); + Dag_node& leftp_node = *(std::visit(dag_node_visitor(), leftp_item)); + Dag_node& mrgp_node = *(std::visit(dag_node_visitor(), mrgp_item)); //set iterators for below left curve, on left curve & above left curve In_face_iterator @@ -2760,15 +2760,15 @@ merge_edge(Halfedge_const_handle he1, merge_if_possible(below_cv_left, below_cv_right); // mark older trapezoids as inactive - nodes depth are updated here - Dag_node* above_cv_right_node(boost::apply_visitor(dag_node_visitor(), + Dag_node* above_cv_right_node(std::visit(dag_node_visitor(), above_cv_right)); - Dag_node* above_cv_left_node(boost::apply_visitor(dag_node_visitor(), + Dag_node* above_cv_left_node(std::visit(dag_node_visitor(), above_cv_left)); deactivate_trapezoid( *above_cv_right_node, above_cv_left_node); //above_cv_right->remove(above_cv_left->dag_node()); - Dag_node* below_cv_right_node(boost::apply_visitor(dag_node_visitor(), + Dag_node* below_cv_right_node(std::visit(dag_node_visitor(), below_cv_right)); - Dag_node* below_cv_left_node(boost::apply_visitor(dag_node_visitor(), + Dag_node* below_cv_left_node(std::visit(dag_node_visitor(), below_cv_left)); deactivate_trapezoid( *below_cv_right_node, below_cv_left_node); //below_cv_right->remove(below_cv_left->dag_node()); @@ -2788,7 +2788,7 @@ merge_edge(Halfedge_const_handle he1, CGAL_assertion(traits->is_td_edge(on_cv_left) && traits->is_active(on_cv_left)); - Td_active_edge& e_left(boost::get(on_cv_left)); + Td_active_edge& e_left(std::get(on_cv_left)); e_left.set_next(on_cv_right); CGAL_assertion(traits->is_td_edge(on_cv_right) && @@ -2830,17 +2830,17 @@ longest_query_path_length_rec(bool minus_inf, Dag_node& min_node, if (!minus_inf && !plus_inf) { Td_map_item min_node_item(min_node.get_data()); if (traits->is_fictitious_vertex(min_node_item)) { - const Curve_end min_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),min_node_item))); + const Curve_end min_ce(*(std::visit(curve_end_for_fict_vertex_visitor(),min_node_item))); Td_map_item max_node_item(max_node.get_data()); if (traits->is_fictitious_vertex(max_node_item)) { - const Curve_end max_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),max_node_item))); + const Curve_end max_ce(*(std::visit(curve_end_for_fict_vertex_visitor(),max_node_item))); //min-fict, max-fict if (!is_end_point_left_low(min_ce, max_ce)) return 0; } else { - const Point& max_p(boost::apply_visitor(point_for_vertex_visitor(), + const Point& max_p(std::visit(point_for_vertex_visitor(), max_node_item)); //min-fict, max-pt @@ -2849,18 +2849,18 @@ longest_query_path_length_rec(bool minus_inf, Dag_node& min_node, } } else { - const Point& min_p(boost::apply_visitor(point_for_vertex_visitor(), + const Point& min_p(std::visit(point_for_vertex_visitor(), min_node_item)); Td_map_item max_node_item(max_node.get_data()); if (traits->is_fictitious_vertex(max_node_item)) { - const Curve_end max_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),max_node_item))); + const Curve_end max_ce(*(std::visit(curve_end_for_fict_vertex_visitor(),max_node_item))); //min-pt, max-fict if (!is_end_point_left_low(min_p, max_ce)) return 0; } else { - const Point& max_p(boost::apply_visitor(point_for_vertex_visitor(), + const Point& max_p(std::visit(point_for_vertex_visitor(), max_node_item)); //min-pt, max-pt @@ -2893,19 +2893,19 @@ longest_query_path_length_rec(bool minus_inf, Dag_node& min_node, if (!minus_inf) { Td_map_item min_node_item(min_node.get_data()); if (traits->is_fictitious_vertex(min_node_item)) { - const Curve_end min_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),min_node_item))); + const Curve_end min_ce(*(std::visit(curve_end_for_fict_vertex_visitor(),min_node_item))); //if smaller than the point represented by min_node - //if ((is_fict_vtx && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), min_ce)) || - // (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), min_ce) )) + //if ((is_fict_vtx && is_end_point_left_low(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), min_ce)) || + // (!is_fict_vtx && is_end_point_left_low(std::visit(point_for_vertex_visitor(), curr_item), min_ce) )) if (is_end_point_right_top(min_ce, node)) { new_min_node = min_node; } } else { - const Point& min_p(boost::apply_visitor(point_for_vertex_visitor(),min_node_item)); + const Point& min_p(std::visit(point_for_vertex_visitor(),min_node_item)); //if smaller than the point represented by min_node - //if ((is_fict_vtx && is_end_point_left_low(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), min_p)) || - // (!is_fict_vtx && is_end_point_left_low(boost::apply_visitor(point_for_vertex_visitor(), curr_item), min_p) )) + //if ((is_fict_vtx && is_end_point_left_low(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), min_p)) || + // (!is_fict_vtx && is_end_point_left_low(std::visit(point_for_vertex_visitor(), curr_item), min_p) )) if (is_end_point_right_top(min_p, node)) { new_min_node = min_node; } @@ -2917,21 +2917,21 @@ longest_query_path_length_rec(bool minus_inf, Dag_node& min_node, if (!plus_inf) { Td_map_item max_node_item(max_node.get_data()); if (traits->is_fictitious_vertex(max_node_item)) { - const Curve_end max_ce(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),max_node_item))); + const Curve_end max_ce(*(std::visit(curve_end_for_fict_vertex_visitor(),max_node_item))); //if larger than the point represented by max_node - //if ((is_fict_vtx && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), max_ce)) || - // (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), max_ce) )) + //if ((is_fict_vtx && is_end_point_right_top(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), max_ce)) || + // (!is_fict_vtx && is_end_point_right_top(std::visit(point_for_vertex_visitor(), curr_item), max_ce) )) if (is_end_point_left_low(max_ce, node)) { new_max_node = max_node; } } else { - const Point& max_p(boost::apply_visitor(point_for_vertex_visitor(), + const Point& max_p(std::visit(point_for_vertex_visitor(), max_node_item)); //if smaller than the point represented by min_node - //if ((is_fict_vtx && is_end_point_right_top(*(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),curr_item)), max_p)) || - // (!is_fict_vtx && is_end_point_right_top(boost::apply_visitor(point_for_vertex_visitor(), curr_item), max_p) )) + //if ((is_fict_vtx && is_end_point_right_top(*(std::visit(curve_end_for_fict_vertex_visitor(),curr_item)), max_p)) || + // (!is_fict_vtx && is_end_point_right_top(std::visit(point_for_vertex_visitor(), curr_item), max_p) )) if (is_end_point_left_low(max_p, node)) { new_max_node = max_node; } diff --git a/thirdparty/CGAL/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h b/thirdparty/CGAL/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h index 252dd4a3..0538d6d1 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h +++ b/thirdparty/CGAL/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h $ -// $Id: Trapezoidal_decomposition_2_iostream.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h $ +// $Id: include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -64,9 +64,9 @@ std::ostream& write(std::ostream &out,const Td_X_trapezoid& t, if (!t.is_on_bottom_boundary()) out << t.bottom(); else out << "-oo"; out << ","; if (!t.is_on_top_boundary()) out << t.top(); else out << "+oo"; - out << ",neighbours(" << std::flush; + out << ",neighbors(" << std::flush; - // debug neighbours equivalence relation + // debug neighbors equivalence relation int max_size=4+1; int null_size=2,size=null_size,i,j; @@ -110,7 +110,7 @@ std::ostream& write(std::ostream &out,const Td_X_trapezoid& t, if (pad) out << " "; else pad=true; out << name[j]; - // identify neighbours + // identify neighbors if (traits.is_td_vertex(t) && value[j]) out << "=" << value[j]->top(); } @@ -177,9 +177,9 @@ std::ostream& operator<<(std::ostream &out,const Td_X_trapezoid& t) if (!t.is_on_bottom_boundary()) out << t.bottom(); else out << "-oo"; out << ","; if (!t.is_on_top_boundary()) out << t.top(); else out << "+oo"; - out << ",neighbours(" << std::flush; + out << ",neighbors(" << std::flush; - // debug neighbours equivalence relation + // debug neighbors equivalence relation int max_size=4+1; int null_size=2,size=null_size,i,j; @@ -221,7 +221,7 @@ std::ostream& operator<<(std::ostream &out,const Td_X_trapezoid& t) for(j=null_size;j @@ -15,41 +15,10 @@ #include #include +#include -// The macro CGAL_ARR_POINT_LOCATION_VERSION controls which version of the -// point location is used. Currently two values are supported: -// 1. Point location with CGAL::Object -// 2. Point location with boost::optional > -// The default value is 2. - -#if !defined(CGAL_ARR_POINT_LOCATION_VERSION) -#define CGAL_ARR_POINT_LOCATION_VERSION 2 -#endif - -#include - -#include -#include - -#ifdef CGAL_CFG_BOOST_VARIANT_SWAP_BUG -#if CGAL_ARR_POINT_LOCATION_VERSION > 1 -#include -// workaround for this bug: -// https://svn.boost.org/trac/boost/ticket/2839 -namespace boost{ namespace detail { namespace variant { - -template -inline void move_swap( - ::CGAL::I_Filtered_const_iterator& lhs, - ::CGAL::I_Filtered_const_iterator& rhs) -{ - ::CGAL::I_Filtered_const_iterator tmp( boost::detail::variant::move(lhs) ); - lhs = boost::detail::variant::move(rhs); - rhs = boost::detail::variant::move(tmp); -} -} } } -#endif -#endif +#include +#include namespace CGAL { @@ -61,46 +30,27 @@ struct Arr_point_location_result { typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; typedef typename Arrangement_2::Face_const_handle Face_const_handle; -#if CGAL_ARR_POINT_LOCATION_VERSION < 2 - typedef CGAL::Object Type; -#else - typedef typename boost::variant Type; -#endif typedef Type type; - // This function returns either make_object() or a result_type constructor - // to generate return values. The Object version takes a dummy template - // argument, which is needed for the return of the other option, e.g., - // boost::optional >. + // This function returns a result_type constructor + // to generate return values. // In theory a one parameter variant could be returned, but this _could_ // lead to conversion overhead, and so we rather go for the real type. // Overloads for empty returns are also provided. -#if CGAL_ARR_POINT_LOCATION_VERSION < 2 - template - static - inline Type make_result(T t) { return CGAL::make_object(t); } - - static - inline CGAL::Object empty_optional_result() { return CGAL::Object(); } - - template - static - inline const T* assign(const Type* obj) { return CGAL::object_cast(obj); } -#else template static inline Type make_result(T t) { return Type(t); } static - inline boost::optional empty_optional_result() - { return boost::optional(); } + inline std::optional empty_optional_result() + { return std::optional(); } template static - inline const T* assign(const Type* obj) { return boost::get(obj); } -#endif // CGAL_ARR_POINT_LOCATION_VERSION < 2 + inline const T* assign(const Type* obj) { return std::get_if(obj); } //this one is only to remove warnings in functions static diff --git a/thirdparty/CGAL/include/CGAL/Arr_polycurve_basic_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_polycurve_basic_traits_2.h index 07912425..8dbe2c99 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_polycurve_basic_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_polycurve_basic_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h $ -// $Id: Arr_polycurve_basic_traits_2.h 5be3a41 2021-08-30T15:08:47+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h $ +// $Id: include/CGAL/Arr_polycurve_basic_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Efi Fogel @@ -25,8 +25,7 @@ */ #include -#include -#include +#include #include #include @@ -326,7 +325,7 @@ class Arr_polycurve_basic_traits_2 { {} /*! Compare two directional points lexigoraphically: by x, then by y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return SMALLER - x(p1) < x(p2); * SMALLER - x(p1) = x(p2) and y(p1) < y(p2); @@ -1089,73 +1088,79 @@ class Arr_polycurve_basic_traits_2 { // ArrangementLandmarkTraits concept. //@{ -#if 0 - // The following block assumes that the subcurve traits template parameter - // is a model of the ArrangementLandmarkTraits concept; in other words, it - // defines the nested types Approximate_number_type and Approximate_2 and - // the member function approximate_2_object(). It cannot be used as is if - // the subcurve traits does not model the ArrangementLandmarkTraits concept. - // The functor Construct_x_monotone_curve_2 is provided regardless of the - // subcurve traits. - - typedef typename Subcurve_traits_2::Approximate_number_type - Approximate_number_type; - typedef typename Subcurve_traits_2::Approximate_2 Approximate_2; - - /*! Obtain an Approximate_2 functor object. */ - Approximate_2 approximate_2_object() const - { return subcurve_traits_2()->approximate_2_object(); } -#else // The following block defines the nested types Approximate_number_type and // Approximate_2 and the member function approximate_2_object() based on the // corresponding types and function definitions of the subcurve traits. If // the subcurve traits does not provide these definitions, they are defined - // as dummies. Essentially, the polycurve traits becomes a practical model of - // the ArrangementLandmarkTraits concept only if the subcurve traits is a - // model of this concept. + // as dummies. Essentially, the polycurve traits becomes a model of the + // ArrangementLandmarkTraits concept only if the subcurve traits is a model + // of this concept. // // The following implementation is inspired by - // http://stackoverflow.com/a/11816999/1915421 + // https://stackoverflow.com/a/11816999/1915421 - template - struct Void { - typedef void type; - }; + template using void_t = void; - template + template struct has_approximate_2 { // Generic implementation - typedef void Approximate_number_type; - typedef void Approximate_2; + using Approximate_number_type = void; + using Approximate_point_2 = void; + + struct Approximate_2 { + /*! Obtain an approximation of a point coordinate. + * \param p the exact point. + * \param i the coordinate index (either 0 or 1). + * \pre i is either 0 or 1. + * \return An approximation of p's x-coordinate (if i == 0), or an + * approximation of p's y-coordinate (if i == 1). + */ + Approximate_number_type operator()(const Point_2&, int) const + { CGAL_error_msg("The subtraits does not define Approximate_2!"); } + + /*! Obtain an approximation of a point. + */ + Approximate_point_2 operator()(const Point_2&) const + { CGAL_error_msg("The subtraits does not define Approximate_2!"); } + + /*! Obtain an approximation of an \f$x\f$-monotone curve. + */ + template + OutputIterator operator()(const X_monotone_curve_2&, double, + OutputIterator oi, bool = true) const { + CGAL_error_msg("The subtraits does not define Approximate_2!"); + return oi; + } + }; }; template - struct has_approximate_2::type> - { + struct has_approximate_2> { // Specialization for types holding a nested type T::Approximate_2 - typedef typename T::Approximate_number_type - Approximate_number_type; - typedef typename T::Approximate_2 Approximate_2; + using Approximate_number_type = typename T::Approximate_number_type; + using Approximate_2 = typename T::Approximate_2; + using Approximate_point_2 = typename T::Approximate_point_2; }; - typedef typename has_approximate_2::Approximate_number_type - Approximate_number_type; - typedef typename has_approximate_2::Approximate_2 - Approximate_2; + using Approximate_number_type = + typename has_approximate_2::Approximate_number_type; + using Approximate_2 = + typename has_approximate_2::Approximate_2; + using Approximate_point_2 = + typename has_approximate_2::Approximate_point_2; /*! Obtain an Approximate_2 functor object. */ - Approximate_2 approximate_2_object_impl(boost::false_type) const + Approximate_2 approximate_2_object_impl(std::false_type) const { return subcurve_traits_2()->approximate_2_object(); } - Approximate_2 approximate_2_object_impl(boost::true_type) const { } + Approximate_2 approximate_2_object_impl(std::true_type) const { } - Approximate_2 approximate_2_object() const - { - typedef typename boost::is_same::type Is_void; + Approximate_2 approximate_2_object() const { + using Is_void = typename std::is_same::type; return approximate_2_object_impl(Is_void()); } -#endif + // class Construct_x_monotone_curve_2 { protected: typedef Arr_polycurve_basic_traits_2 @@ -1215,7 +1220,7 @@ class Arr_polycurve_basic_traits_2 { ForwardIterator end) const { typedef typename std::iterator_traits::value_type VT; - typedef typename boost::is_same::type Is_point; + typedef typename std::is_same::type Is_point; // Dispatch the range to the appropriate implementation. return constructor_impl(begin, end, Is_point()); @@ -1233,7 +1238,7 @@ class Arr_polycurve_basic_traits_2 { template X_monotone_curve_2 constructor_impl(ForwardIterator /* begin */, ForwardIterator /* end */, - boost::true_type) const + std::true_type) const { CGAL_error_msg("Cannot construct a polycurve from a range of points!"); } /*! Obtain an x-monotone polycurve from a range of subcurves. @@ -1254,7 +1259,7 @@ class Arr_polycurve_basic_traits_2 { template X_monotone_curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end, - boost::false_type) const + std::false_type) const { CGAL_precondition_msg ( @@ -1593,7 +1598,7 @@ class Arr_polycurve_basic_traits_2 { // x-value. // and also that min end subcurve is always placed at position 0 of the // vector. - // Comfirm with Eric. + // Confirm with Eric. return (ce == ARR_MIN_END) ? 0 : xcv.number_of_subcurves() - 1; } @@ -1682,7 +1687,7 @@ class Arr_polycurve_basic_traits_2 { // x-value. // and also that min end subcurve is always placed at position 0 of the // vector. - // Comfirm with Eric. + // Confirm with Eric. size_type index = (ce == ARR_MIN_END) ? 0 : xcv.number_of_subcurves() - 1; return index; } @@ -2329,7 +2334,7 @@ class Arr_polycurve_basic_traits_2 { target = src; } - // std::cout << "**************the new sourc: " << source + // std::cout << "**************the new source: " << source // << "the new target: " << target << std::endl; /* * Get the source and target subcurve numbers from the polycurve. @@ -2414,7 +2419,7 @@ class Arr_polycurve_basic_traits_2 { /*! Obtain the index of the subcurve in the polycurve that contains the * point q in its x-range. The function performs a binary search, so if the * point q is in the x-range of the polycurve with n subcurves, the subcurve - * containing it can be located in O(log n) operations. + * containing it can be located in \cgalBigO{log n} operations. * \param cv The polycurve curve. * \param q The point. * \return An index i such that q is in the x-range of cv[i]. diff --git a/thirdparty/CGAL/include/CGAL/Arr_polycurve_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_polycurve_traits_2.h index 852e4403..90fd7f32 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_polycurve_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_polycurve_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h $ -// $Id: Arr_polycurve_traits_2.h 521c72d 2021-10-04T13:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h $ +// $Id: include/CGAL/Arr_polycurve_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Efi Fogel @@ -25,10 +25,9 @@ */ #include +#include -#include -#include -#include +#include #include #include @@ -186,9 +185,9 @@ class Arr_polycurve_traits_2 : OutputIterator operator_impl(const Curve_2& cv, OutputIterator oi, Arr_all_sides_oblivious_tag) const { - typedef boost::variant + typedef std::variant Make_x_monotone_subresult; - typedef boost::variant + typedef std::variant Make_x_monotone_result; // If the polycurve is empty, return. @@ -213,7 +212,7 @@ class Arr_polycurve_traits_2 : for (auto its = cv.subcurves_begin(); its != cv.subcurves_end(); ++its) make_seg_x_monotone(*its, std::back_inserter(x_seg_objects)); auto it = x_seg_objects.begin(); - const auto* x_seg_p = boost::get(&(*it)); + const auto* x_seg_p = std::get_if(&(*it)); #if ! defined (CGAL_NO_ASSERTIONS) CGAL_assertion(x_seg_p != nullptr); #endif @@ -261,7 +260,7 @@ class Arr_polycurve_traits_2 : #endif for (++it; it != x_seg_objects.end(); ++it) { - const auto* x_seg_p = boost::get(&(*it)); + const auto* x_seg_p = std::get_if(&(*it)); #if ! defined (CGAL_NO_ASSERTIONS) CGAL_assertion(x_seg_p != nullptr); #endif @@ -319,9 +318,9 @@ class Arr_polycurve_traits_2 : OutputIterator operator_impl(const Curve_2& cv, OutputIterator oi, Arr_not_all_sides_oblivious_tag) const { - typedef boost::variant + typedef std::variant Make_x_monotone_subresult; - typedef boost::variant + typedef std::variant Make_x_monotone_result; // If the polycurve is empty, return. @@ -351,7 +350,7 @@ class Arr_polycurve_traits_2 : for (auto its = cv.subcurves_begin(); its != cv.subcurves_end(); ++its) make_seg_x_monotone(*its, std::back_inserter(x_seg_objects)); auto it = x_seg_objects.begin(); - const auto* x_seg_p = boost::get(&(*it)); + const auto* x_seg_p = std::get_if(&(*it)); #if ! defined (CGAL_NO_ASSERTIONS) CGAL_assertion(x_seg_p != nullptr); #endif @@ -399,7 +398,7 @@ class Arr_polycurve_traits_2 : #endif for (++it; it != x_seg_objects.end(); ++it) { - const auto* x_seg_p = boost::get(&(*it)); + const auto* x_seg_p = std::get_if(&(*it)); #if ! defined (CGAL_NO_ASSERTIONS) CGAL_assertion(x_seg_p != nullptr); #endif @@ -697,10 +696,9 @@ class Arr_polycurve_traits_2 : OutputIterator oi) const { typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_base_result; - typedef boost::variant - Intersection_result; + const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); auto cmp_y_at_x = m_poly_traits.compare_y_at_x_2_object(); @@ -745,7 +743,7 @@ class Arr_polycurve_traits_2 : // cv1's right endpoint equals cv2's left endpoint // Thus we can return this single(!) intersection point Intersection_point p(max_vertex(cv1[i1]), 0); - *oi++ = Intersection_result(p); + *oi++ = p; return oi; } dir1 == SMALLER ? @@ -768,7 +766,7 @@ class Arr_polycurve_traits_2 : // cv2's right endpoint equals cv1's left endpoint // Thus we can return this single(!) intersection point Intersection_point p(max_vertex(cv2[i2]), 0); - *oi++ = Intersection_result(p); + *oi++ = p; return oi; } @@ -819,13 +817,13 @@ class Arr_polycurve_traits_2 : // assume that the subcurves cannot overlap more than once. if (! right_coincides && ! left_coincides) { // Non of the endpoints of the current subcurve of one polycurve - // coincides with the curent subcurve of the other polycurve: + // coincides with the current subcurve of the other polycurve: // Output the intersection if exists. std::vector xections; intersect(cv1[i1], cv2[i2], std::back_inserter(xections)); for (const auto& xection : xections) { const X_monotone_subcurve_2* subcv_p = - boost::get(&xection); + std::get_if(&xection); if (subcv_p != nullptr) { ocv.push_back(*subcv_p); oi = output_ocv (ocv, invert_ocv, oi); @@ -833,8 +831,8 @@ class Arr_polycurve_traits_2 : } const Intersection_point* p_p = - boost::get(&xection); - if (p_p != nullptr) *oi++ = Intersection_result(*p_p); + std::get_if(&xection); + if (p_p != nullptr) *oi++ = *p_p; } } else if (right_coincides && left_coincides) { @@ -847,7 +845,7 @@ class Arr_polycurve_traits_2 : for (const auto& item : sub_xections) { const X_monotone_subcurve_2* x_seg = - boost::get(&item); + std::get_if(&item); if (x_seg != nullptr) { X_monotone_subcurve_2 seg = *x_seg; // We maintain the variant that if the input curves have opposite @@ -864,7 +862,7 @@ class Arr_polycurve_traits_2 : } const Intersection_point* p_ptr = - boost::get(&item); + std::get_if(&item); if (p_ptr != nullptr) { // Any point that is not equal to the max_vertex of the // subcurve should be inserted into oi. @@ -872,7 +870,7 @@ class Arr_polycurve_traits_2 : // will be taken care of as the min_vertex of in the next // iteration. if (! equal(p_ptr->first, max_vertex(cv1[i1]))) - *oi++ = Intersection_result(*p_ptr); + *oi++ = *p_ptr; } } } @@ -897,11 +895,11 @@ class Arr_polycurve_traits_2 : // it multiplicity 0. if (left_res == SMALLER) { Intersection_point p(min_vertex(cv2[i2]), 0); - *oi++ = Intersection_result(p); + *oi++ = p; } else { Intersection_point p(min_vertex(cv1[i1]), 0); - *oi++ = Intersection_result(p); + *oi++ = p; } } } @@ -942,7 +940,7 @@ class Arr_polycurve_traits_2 : (i1 != Polycurve_traits_2::INVALID_INDEX) ? return_point(max_vertex(cv1[i1+1]), 0) : return_point(max_vertex(cv1[0]), 0); - *oi++ = Intersection_result(ip); + *oi++ = ip; } else if (right_res == LARGER) { ip = (dir2 == SMALLER) ? @@ -950,7 +948,7 @@ class Arr_polycurve_traits_2 : (i2 != Polycurve_traits_2::INVALID_INDEX) ? return_point(max_vertex(cv2[i2+1]), 0) : return_point(max_vertex(cv2[0]), 0); - *oi++ = Intersection_result(ip); + *oi++ = ip; } else if (((i1 > 0) && (dir1 == SMALLER)) || ((i1 < n1) && (dir1 != SMALLER)) || @@ -962,7 +960,7 @@ class Arr_polycurve_traits_2 : (i1 != Polycurve_traits_2::INVALID_INDEX) ? return_point(max_vertex(cv1[i1+1]), 0) : return_point(max_vertex(cv1[0]), 0); - *oi++ = Intersection_result(ip); + *oi++ = ip; } else { CGAL_assertion_msg((dir2 == SMALLER && i2 > 0) || @@ -977,7 +975,7 @@ class Arr_polycurve_traits_2 : (i2 != Polycurve_traits_2::INVALID_INDEX) ? return_point(max_vertex(cv2[i2+1]), 0) : return_point(max_vertex(cv2[0]), 0); - *oi++ = Intersection_result(ip); + *oi++ = ip; } } @@ -990,15 +988,12 @@ class Arr_polycurve_traits_2 : inline OutputIterator output_ocv (std::vector& ocv, bool invert_ocv, OutputIterator oi) const { - typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; X_monotone_curve_2 curve; if (invert_ocv) std::reverse (ocv.begin(), ocv.end()); for (X_monotone_subcurve_2& sc : ocv) curve.push_back (sc); - *(oi ++) = Intersection_result(curve); + *(oi ++) = curve; ocv.clear(); @@ -1174,7 +1169,7 @@ class Arr_polycurve_traits_2 : Curve_2 operator()(ForwardIterator begin, ForwardIterator end) const { typedef typename std::iterator_traits::value_type VT; - typedef typename boost::is_same::type Is_point; + typedef typename std::is_same::type Is_point; // Dispatch the range to the appropriate implementation. return constructor_impl(begin, end, Is_point()); } @@ -1191,7 +1186,7 @@ class Arr_polycurve_traits_2 : template Curve_2 constructor_impl(ForwardIterator /* begin */, ForwardIterator /* end */, - boost::true_type) const + std::true_type) const { CGAL_error_msg("Cannot construct a polycurve from a range of points!"); } /*! Construction implementation from a range of subcurves. @@ -1202,7 +1197,7 @@ class Arr_polycurve_traits_2 : */ template Curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end, - boost::false_type) const + std::false_type) const { // Range has to contain at least one subcurve CGAL_precondition(begin != end); diff --git a/thirdparty/CGAL/include/CGAL/Arr_polyline_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_polyline_traits_2.h index 8057de55..14627050 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_polyline_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_polyline_traits_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_polyline_traits_2.h $ -// $Id: Arr_polyline_traits_2.h 54b423c 2021-12-16T11:13:12+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_polyline_traits_2.h $ +// $Id: include/CGAL/Arr_polyline_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Efi Fogel @@ -29,8 +29,7 @@ #include #include -#include -#include +#include #include #include @@ -99,7 +98,6 @@ class Arr_polyline_traits_2 : public Arr_polycurve_traits_2 { typedef typename Base::Equal_2 Equal_2; typedef typename Base::Compare_endpoints_xy_2 Compare_endpoints_xy_2; typedef typename Base::Construct_opposite_2 Construct_opposite_2; - typedef typename Base::Approximate_2 Approximate_2; typedef typename Base::Parameter_space_in_x_2 Parameter_space_in_x_2; typedef typename Base::Parameter_space_in_y_2 Parameter_space_in_y_2; typedef typename Base::Compare_x_on_boundary_2 Compare_x_on_boundary_2; @@ -381,7 +379,7 @@ class Arr_polyline_traits_2 : public Arr_polycurve_traits_2 { Curve_2 operator()(ForwardIterator begin, ForwardIterator end) const { typedef typename std::iterator_traits::value_type VT; - typedef typename boost::is_same::type Is_point; + typedef typename std::is_same::type Is_point; // Dispatch the range to the appropriate implementation. return constructor_impl(begin, end, Is_point()); } @@ -401,7 +399,7 @@ class Arr_polyline_traits_2 : public Arr_polycurve_traits_2 { */ template Curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end, - boost::false_type) const + std::false_type) const { return Base::Construct_curve_2::operator()(begin, end); } /*! Construction of a polyline from a range of points. @@ -414,7 +412,7 @@ class Arr_polyline_traits_2 : public Arr_polycurve_traits_2 { */ template Curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end, - boost::true_type) const + std::true_type) const { // The range must not contain a single point. CGAL_precondition_msg(std::distance(begin, end) != 1, @@ -503,7 +501,7 @@ class Arr_polyline_traits_2 : public Arr_polycurve_traits_2 { const { typedef typename std::iterator_traits::value_type VT; - typedef typename boost::is_same::type Is_point; + typedef typename std::is_same::type Is_point; // Dispatch the range to the appropriate implementation. return constructor_impl(begin, end, Is_point()); } @@ -526,7 +524,7 @@ class Arr_polyline_traits_2 : public Arr_polycurve_traits_2 { template X_monotone_curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end, - boost::false_type) const + std::false_type) const { return Base::Construct_x_monotone_curve_2::operator()(begin, end); } /*! Construction of an x-monotone polyline from a range of points. @@ -541,7 +539,7 @@ class Arr_polyline_traits_2 : public Arr_polycurve_traits_2 { template X_monotone_curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end, - boost::true_type) const + std::true_type) const { // The range must not contain a single point. CGAL_precondition_msg(std::distance(begin, end) != 1, @@ -596,6 +594,62 @@ class Arr_polyline_traits_2 : public Arr_polycurve_traits_2 { Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } + // + using Approximate_number_type = typename Base::Approximate_number_type; + using Approximate_point_2 = typename Base::Approximate_point_2; + + class Approximate_2 : public Base::Approximate_2 { + protected: + using Traits = Arr_polyline_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits the traits. + */ + Approximate_2(const Traits& traits) : + Base::Approximate_2(*(traits.subcurve_traits_2())), + m_traits(traits) + {} + + friend class Arr_polyline_traits_2; + + public: + Approximate_number_type operator()(const Point_2& p, int i) const + { return Base::Approximate_2::operator()(p, i); } + + Approximate_point_2 operator()(const Point_2& p) const + { return Base::Approximate_2::operator()(p); } + + /*! Obtain an approximation of an \f$x\f$-monotone curve. + */ + template + OutputIterator operator()(const X_monotone_curve_2& xcv, double /* error */, + OutputIterator oi, bool l2r = true) const { + if (l2r) { + for (auto it = xcv.points_begin(); it != xcv.points_end(); ++it) { + const auto& p = *it; + auto x = CGAL::to_double(p.x()); + auto y = CGAL::to_double(p.y()); + *oi++ = Approximate_point_2(x, y); + } + return oi; + } + + for (auto it = xcv.points_rbegin(); it != xcv.points_rend(); ++it) { + const auto& p = *it; + auto x = CGAL::to_double(p.x()); + auto y = CGAL::to_double(p.y()); + *oi++ = Approximate_point_2(x, y); + } + return oi; + } + }; + + /*! Obtain an Approximate_2 functor object. */ + Approximate_2 approximate_2_object() const { return Approximate_2(*this); } + /*! Deprecated! * Obtain the segment traits. * \return the segment traits. diff --git a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Algebraic_point_2.h b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Algebraic_point_2.h index e6c9214f..759eea18 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Algebraic_point_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Algebraic_point_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Algebraic_point_2.h $ -// $Id: Algebraic_point_2.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Algebraic_point_2.h $ +// $Id: include/CGAL/Arr_rat_arc/Algebraic_point_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Salzman diff --git a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h index 5ab690e2..615a283f 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h +++ b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h $ -// $Id: Base_rational_arc_ds_1.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h $ +// $Id: include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Salzman @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -26,8 +27,6 @@ #include #include -#include - namespace CGAL { namespace Arr_rational_arc { @@ -63,9 +62,9 @@ class Base_rational_arc_ds_1 typedef std::vector > Root_multiplicity_vector; - CGAL_static_assertion((boost::is_same::value)); - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Cache.h b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Cache.h index 356b8c3c..395f70b8 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Cache.h +++ b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Cache.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Cache.h $ -// $Id: Cache.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Cache.h $ +// $Id: include/CGAL/Arr_rat_arc/Cache.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Salzman diff --git a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h index 8f696671..1549e62d 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h +++ b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h $ -// $Id: Rational_arc_d_1.h 6642407 2020-07-29T18:08:32+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h $ +// $Id: include/CGAL/Arr_rat_arc/Rational_arc_d_1.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Salzman @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -34,7 +35,6 @@ #include #include -#include namespace CGAL { namespace Arr_rational_arc { @@ -100,9 +100,9 @@ class Base_rational_arc_d_1 typedef Algebraic_point_2 Point_2; - CGAL_static_assertion((boost::is_same::value)); - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); + static_assert(std::is_same::value); public: const Rational_function& get_rational_function(const Polynomial_1& numerator, @@ -450,7 +450,7 @@ class Base_rational_arc_d_1 _info = (_info | IS_DIRECTED_RIGHT); - // Analyze the bahaviour of the rational function at x = -oo (the source). + // Analyze the behaviour of the rational function at x = -oo (the source). Algebraic_real_1 y0; const Arr_parameter_space inf_s = _analyze_at_minus_infinity(P, Q, y0); @@ -460,7 +460,7 @@ class Base_rational_arc_d_1 _info = (_info | SRC_AT_Y_PLUS_INFTY); else // if (inf_s == ARR_INTERIOR) _ps = Algebraic_point_2(); //the point is a dummy - //Analyze the bahaviour of the rational function at x = +oo (the target). + //Analyze the behaviour of the rational function at x = +oo (the target). const Arr_parameter_space inf_t = _analyze_at_plus_infinity(P, Q, y0); if (inf_t == ARR_BOTTOM_BOUNDARY) @@ -1010,7 +1010,7 @@ class Base_rational_arc_d_1 //Get the relative position of the point with respect to the rational arc. //param p The query point. //precondition: p is in the x-range of the arc. - // both p's supporting curve and the rational arc are continous + // both p's supporting curve and the rational arc are continuous //return SMALLER if the point is below the arc; // LARGER if the point is above the arc; // EQUAL if p lies on the arc. @@ -1450,7 +1450,7 @@ class Base_rational_arc_d_1 //------------------------------- //-------------------------------------------------------------------------- - // Cannonicalize numerator and denominator such that: + // Canonicalize numerator and denominator such that: // There are no common devisor // If negative sign exists, it is in the numerator void _canonicalize(const Polynomial_1& P,const Polynomial_1& Q, @@ -1852,7 +1852,7 @@ class Continuous_rational_arc_d_1: //typedef std::pair Intersection_point; - /// \name Constrcution methods. + /// \name Construction methods. //@{ /*! @@ -1863,7 +1863,7 @@ class Continuous_rational_arc_d_1: {} /*! - * Constrcutor from a base arc. + * Constructor from a base arc. */ Continuous_rational_arc_d_1(const Base& arc) : Base(arc) @@ -2038,8 +2038,6 @@ class Continuous_rational_arc_d_1: OutputIterator intersect(const Self& arc, OutputIterator oi, const Cache& cache) const { - typedef boost::variant Intersection_result; - CGAL_precondition(this->is_valid()); CGAL_precondition(this->is_continuous()); CGAL_precondition(arc.is_valid()); @@ -2047,7 +2045,7 @@ class Continuous_rational_arc_d_1: if (this->equals(arc)) { Self overlap_arc(*this); - *oi++ = Intersection_result(overlap_arc); + *oi++ = overlap_arc; return oi; } @@ -2170,7 +2168,7 @@ class Continuous_rational_arc_d_1: (this->SRC_AT_Y_MINUS_INFTY | this->SRC_AT_Y_PLUS_INFTY) == 0) { Intersection_point ip(p_left, 0); - *oi++ = Intersection_result(ip); + *oi++ = ip; } return oi; @@ -2189,7 +2187,7 @@ class Continuous_rational_arc_d_1: this->IS_DIRECTED_RIGHT | this->IS_CONTINUOUS | this->IS_VALID); - *oi++ = Intersection_result(overlap_arc); + *oi++ = overlap_arc; return oi; } @@ -2221,7 +2219,7 @@ class Continuous_rational_arc_d_1: Algebraic_point_2 p(this->_f, *x_iter); // Output the intersection point: Intersection_point ip(p, *m_iter); - *oi++ = Intersection_result(ip); + *oi++ = ip; } } @@ -2421,7 +2419,7 @@ class Rational_arc_d_1 : public Base_rational_arc_d_1 typedef typename Base::Cache Cache; - /// \name Constrcution methods. + /// \name Construction methods. //@{ /*! diff --git a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function.h b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function.h index f10d7fe8..d25fc02d 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function.h +++ b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h $ -// $Id: Rational_function.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h $ +// $Id: include/CGAL/Arr_rat_arc/Rational_function.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Salzman diff --git a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h index 3d52a718..cd738c3e 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h +++ b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h $ -// $Id: Rational_function_canonicalized_pair.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h $ +// $Id: include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Salzman diff --git a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function_ordered_pair.h b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function_ordered_pair.h index 6d5c324a..63d3e534 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function_ordered_pair.h +++ b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function_ordered_pair.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_ordered_pair.h $ -// $Id: Rational_function_ordered_pair.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_ordered_pair.h $ +// $Id: include/CGAL/Arr_rat_arc/Rational_function_ordered_pair.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Salzman diff --git a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function_pair.h b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function_pair.h index 691371f9..51a2ddb5 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function_pair.h +++ b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Rational_function_pair.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_pair.h $ -// $Id: Rational_function_pair.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_pair.h $ +// $Id: include/CGAL/Arr_rat_arc/Rational_function_pair.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Salzman diff --git a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Singleton.h b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Singleton.h index 58952558..b52ec013 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Singleton.h +++ b/thirdparty/CGAL/include/CGAL/Arr_rat_arc/Singleton.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Singleton.h $ -// $Id: Singleton.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Singleton.h $ +// $Id: include/CGAL/Arr_rat_arc/Singleton.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Salzman diff --git a/thirdparty/CGAL/include/CGAL/Arr_rational_function_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_rational_function_traits_2.h index 358ff5ca..e86e7675 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_rational_function_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_rational_function_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h $ -// $Id: Arr_rational_function_traits_2.h 6b64dc8 2020-11-11T09:38:55+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h $ +// $Id: include/CGAL/Arr_rational_function_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Oren Salzman @@ -827,7 +827,7 @@ class Arr_rational_function_traits_2 template OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { - typedef boost::variant + typedef std::variant Make_x_monotone_result; // Make the rational arc continuous. diff --git a/thirdparty/CGAL/include/CGAL/Arr_segment_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_segment_traits_2.h index 8380b1db..7683a982 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_segment_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_segment_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h $ -// $Id: Arr_segment_traits_2.h c0838c5 2021-12-16T16:33:43+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h $ +// $Id: include/CGAL/Arr_segment_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -25,9 +25,10 @@ #include -#include +#include #include +#include #include #include #include @@ -486,7 +487,7 @@ class Arr_segment_traits_2 : public Kernel_ { compare_xy(cv2.right(), p) == LARGER); // Compare the slopes of the two segments to determine their relative - // position immediately to the left of q. + // position immediately to the right of q. // Notice we use the supporting lines in order to compare the slopes. return (kernel.compare_slope_2_object()(cv1.line(), cv2.line())); } @@ -565,7 +566,7 @@ class Arr_segment_traits_2 : public Kernel_ { OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { // Wrap the segment with a variant. - typedef boost::variant + typedef std::variant Make_x_monotone_result; *oi++ = Make_x_monotone_result(cv); return oi; @@ -705,8 +706,6 @@ class Arr_segment_traits_2 : public Kernel_ { OutputIterator oi) const { typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; // Early ending with Bbox overlapping test if (! do_bboxes_overlap(cv1, cv2)) return oi; @@ -723,7 +722,7 @@ class Arr_segment_traits_2 : public Kernel_ { CGAL_assertion(bool(res)); // Check if we have a single intersection point. - const Point_2* ip = boost::get(&*res); + const Point_2* ip = std::get_if(&*res); if (ip != nullptr) { CGAL_assertion(cv1.is_vertical() ? m_traits.is_in_y_range_2_object()(cv1, *ip) : @@ -732,7 +731,7 @@ class Arr_segment_traits_2 : public Kernel_ { m_traits.is_in_y_range_2_object()(cv2, *ip) : m_traits.is_in_x_range_2_object()(cv2, *ip)); Intersection_point ip_mult(*ip, 1); - *oi++ = Intersection_result(ip_mult); + *oi++ = ip_mult; return oi; } @@ -753,7 +752,7 @@ class Arr_segment_traits_2 : public Kernel_ { // a common endpoint. Thus we have an intersection point, but we leave // the multiplicity of this point undefined. Intersection_point ip_mult(p_r, 0); - *oi++ = Intersection_result(ip_mult); + *oi++ = ip_mult; return oi; } @@ -764,17 +763,17 @@ class Arr_segment_traits_2 : public Kernel_ { // in the overlap segment if (cv1.is_directed_right()) { X_monotone_curve_2 overlap_seg(cv1.line(), p_l, p_r); - *oi++ = Intersection_result(overlap_seg); + *oi++ = overlap_seg; return oi; } X_monotone_curve_2 overlap_seg(cv1.line(), p_r, p_l); - *oi++ = Intersection_result(overlap_seg); + *oi++ = overlap_seg; return oi; } // cv1 and cv2 have opposite directions, the overlap segment // will be directed from left to right X_monotone_curve_2 overlap_seg(cv1.line(), p_l, p_r); - *oi++ = Intersection_result(overlap_seg); + *oi++ = overlap_seg; return oi; } }; @@ -879,9 +878,24 @@ class Arr_segment_traits_2 : public Kernel_ { /// \name Functor definitions for the landmarks point-location strategy. //@{ - typedef double Approximate_number_type; + typedef double Approximate_number_type; + typedef CGAL::Cartesian Approximate_kernel; + typedef Approximate_kernel::Point_2 Approximate_point_2; class Approximate_2 { + protected: + using Traits = Arr_segment_traits_2; + + /*! The traits (in case it has state) */ + const Traits& m_traits; + + /*! Constructor + * \param traits the traits. + */ + Approximate_2(const Traits& traits) : m_traits(traits) {} + + friend class Arr_segment_traits_2; + public: /*! Obtain an approximation of a point coordinate. * \param p the exact point. @@ -890,15 +904,37 @@ class Arr_segment_traits_2 : public Kernel_ { * \return An approximation of p's x-coordinate (if i == 0), or an * approximation of p's y-coordinate (if i == 1). */ - Approximate_number_type operator()(const Point_2& p, int i) const - { + Approximate_number_type operator()(const Point_2& p, int i) const { CGAL_precondition((i == 0) || (i == 1)); return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y())); } + + /*! Obtain an approximation of a point. + */ + Approximate_point_2 operator()(const Point_2& p) const + { return Approximate_point_2(operator()(p, 0), operator()(p, 1)); } + + /*! Obtain an approximation of an \f$x\f$-monotone curve. + */ + template + OutputIterator operator()(const X_monotone_curve_2& xcv, double /* error */, + OutputIterator oi, bool l2r = true) const { + auto min_vertex = m_traits.construct_min_vertex_2_object(); + auto max_vertex = m_traits.construct_max_vertex_2_object(); + const auto& src = (l2r) ? min_vertex(xcv) : max_vertex(xcv); + const auto& trg = (l2r) ? max_vertex(xcv) : min_vertex(xcv); + auto xs = CGAL::to_double(src.x()); + auto ys = CGAL::to_double(src.y()); + auto xt = CGAL::to_double(trg.x()); + auto yt = CGAL::to_double(trg.y()); + *oi++ = Approximate_point_2(xs, ys); + *oi++ = Approximate_point_2(xt, yt); + return oi; + } }; /*! Obtain an Approximate_2 functor object. */ - Approximate_2 approximate_2_object() const { return Approximate_2(); } + Approximate_2 approximate_2_object() const { return Approximate_2(*this); } //! Functor class Construct_x_monotone_curve_2 { @@ -1041,7 +1077,7 @@ class Arr_segment_traits_2 : public Kernel_ { m_traits.compare_y_at_x_2_object()); Compare_x_2 compare_x_2 = m_traits.compare_x_2_object(); - // check whether source and taget are two distinct points and they lie + // check whether source and target are two distinct points and they lie // on the line. CGAL_precondition(!equal(src, tgt)); CGAL_precondition(compare_y_at_x(src, xcv) == EQUAL); diff --git a/thirdparty/CGAL/include/CGAL/Arr_simple_point_location.h b/thirdparty/CGAL/include/CGAL/Arr_simple_point_location.h index d740de18..7816929d 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_simple_point_location.h +++ b/thirdparty/CGAL/include/CGAL/Arr_simple_point_location.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h $ -// $Id: Arr_simple_point_location.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h $ +// $Id: include/CGAL/Arr_simple_point_location.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -26,7 +26,7 @@ #include #include -#include +#include namespace CGAL { @@ -57,11 +57,7 @@ class Arr_simple_point_location { typedef Result_type result_type; protected: -#if CGAL_ARR_POINT_LOCATION_VERSION < 2 - typedef Result_type Optional_result_type; -#else - typedef typename boost::optional Optional_result_type; -#endif + typedef typename std::optional Optional_result_type; typedef typename Topology_traits::Dcel Dcel; typedef Arr_traits_basic_adaptor_2 Traits_adaptor_2; @@ -71,13 +67,8 @@ class Arr_simple_point_location { const Traits_adaptor_2* m_geom_traits; // Its associated geometry traits. const Topology_traits* m_topol_traits; // Its associated topology traits. -#if CGAL_ARR_POINT_LOCATION_VERSION < 2 - inline bool optional_empty(const CGAL::Object& obj) const { return obj.empty(); } - inline const Result_type& optional_assign(const CGAL::Object& t) const { return t; } -#else - inline bool optional_empty(const boost::optional& t) const { return (!t); } - inline const Result_type& optional_assign(const boost::optional& t) const { return *t; } -#endif + inline bool optional_empty(const std::optional& t) const { return (!t); } + inline const Result_type& optional_assign(const std::optional& t) const { return *t; } template Result_type make_result(T t) const { return Result::make_result(t); } @@ -152,7 +143,7 @@ class Arr_simple_point_location { protected: /*! * Locate the arrangement feature which a vertical ray emanating from the - * given point hits (not inculding isolated vertices). + * given point hits (not including isolated vertices). * \param p The query point. * \param shoot_up Indicates whether the ray is directed upward or downward. * \return An object representing the arrangement feature the ray hits. diff --git a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_on_sphere_transformation.h b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_on_sphere_transformation.h index fc5d64e7..00b7af23 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_on_sphere_transformation.h +++ b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_on_sphere_transformation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_on_sphere_transformation.h $ -// $Id: Arr_on_sphere_transformation.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_on_sphere_transformation.h $ +// $Id: include/CGAL/Arr_spherical_gaussian_map_3/Arr_on_sphere_transformation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Naama mayer diff --git a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h index 368c3655..5590281c 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h +++ b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h $ -// $Id: Arr_polyhedral_sgm.h 74a0e95 2021-03-03T11:01:18+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h $ +// $Id: include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Efi Fogel @@ -84,7 +84,7 @@ class Arr_polyhedral_sgm_initializer : typedef typename Polyhedron::Halfedge_around_vertex_circulator Polyhedron_halfedge_around_vertex_circulator; - typedef boost::is_same + typedef std::is_same Polyhedron_has_normal; typedef typename Polyhedron::HalfedgeDS HDS; @@ -103,13 +103,13 @@ class Arr_polyhedral_sgm_initializer : } }; - void compute_planes(Polyhedron& polyhedron, boost::true_type) + void compute_planes(Polyhedron& polyhedron, std::true_type) { std::transform(polyhedron.facets_begin(), polyhedron.facets_end(), polyhedron.planes_begin(), Normal_equation()); } - /*! Compute the equation of the undelying plane of a facet */ + /*! Compute the equation of the underlying plane of a facet */ struct Plane_equation { template typename Facet::Plane_3 operator()(Facet& f) { @@ -120,7 +120,7 @@ class Arr_polyhedral_sgm_initializer : } }; - void compute_planes(Polyhedron& polyhedron, boost::false_type) + void compute_planes(Polyhedron& polyhedron, std::false_type) { std::transform(polyhedron.facets_begin(), polyhedron.facets_end(), polyhedron.planes_begin(), Plane_equation()); @@ -350,12 +350,12 @@ class Arr_polyhedral_sgm_initializer : /*! Obtain the normal of a facet of a polyhedron that supports normals */ template - const Vector_3& get_normal(const Facet& facet, boost::true_type) const + const Vector_3& get_normal(const Facet& facet, std::true_type) const { return facet->plane(); } /*! Obtain the normal of a facet of a polyhedron that supports planes */ template - Vector_3 get_normal(const Facet& facet, boost::false_type) const + Vector_3 get_normal(const Facet& facet, std::false_type) const { return facet->plane().orthogonal_vector(); } /*! Process a polyhedron vertex recursively constructing the Gaussian map diff --git a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h index c5bd7754..3a4773f4 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h +++ b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h $ -// $Id: Arr_polyhedral_sgm_arr_dcel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h $ +// $Id: include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_initializer_visitor.h b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_initializer_visitor.h index 47e79147..6cf4efca 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_initializer_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_initializer_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_initializer_visitor.h $ -// $Id: Arr_polyhedral_sgm_initializer_visitor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_initializer_visitor.h $ +// $Id: include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_initializer_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_overlay.h b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_overlay.h index 0e69b58d..76f6b267 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_overlay.h +++ b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_overlay.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_overlay.h $ -// $Id: Arr_polyhedral_sgm_overlay.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_overlay.h $ +// $Id: include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_overlay.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Efi Fogel diff --git a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h index f598a10b..9418b52d 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h $ -// $Id: Arr_polyhedral_sgm_polyhedron_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h $ +// $Id: include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -64,11 +64,12 @@ class Arr_polyhedral_sgm_polyhedron_3_vertex : typedef typename Base::Point Point; /*! Constructor */ - Arr_polyhedral_sgm_polyhedron_3_vertex() : Base(), m_marked(false) {} + Arr_polyhedral_sgm_polyhedron_3_vertex() : + Base(), m_processed(false), m_marked(false) {} /*! Constructor */ Arr_polyhedral_sgm_polyhedron_3_vertex(const Point & p) : - Base(p), m_marked(false) {} + Base(p), m_processed(false), m_marked(false) {} /*! Obtain the mutable (geometrical) point. Delegate */ Point & point() { return Base::point(); } @@ -129,7 +130,7 @@ class Arr_polyhedral_sgm_polyhedron_3_face : Base; typedef typename Sgm::Vertex_handle Arr_vertex_handle; - /*! The arrangement vertex handle of the projected noraml. */ + /*! The arrangement vertex handle of the projected normal. */ Arr_vertex_handle m_vertex; /*! Indicates whether it is a marked face */ @@ -161,7 +162,7 @@ class Arr_polyhedral_sgm_polyhedron_3_face : }; /*! The "items" type. A model of the PolyhedralSgmPolyhedronItems_3 concept, - * which is a refinment of the PolyhedronItems_3 concept. Its base class + * which is a refinement of the PolyhedronItems_3 concept. Its base class * Polyhedron_items_3, a model of the latter concept, provides definitions of * vertices with points, halfedges, and faces with normal equations. We extend * the definition of each one of the three items with the necessary data diff --git a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_traits.h b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_traits.h index 904b7d24..fe6ca0a2 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_traits.h +++ b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_traits.h $ -// $Id: Arr_polyhedral_sgm_traits.h 2a3fbc0 2019-11-19T09:47:44+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_traits.h $ +// $Id: include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_transformation.h b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_transformation.h index e3f95838..87b40001 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_transformation.h +++ b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_transformation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_transformation.h $ -// $Id: Arr_polyhedral_sgm_transformation.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_transformation.h $ +// $Id: include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_transformation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Naama mayer diff --git a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h index e772f9c8..c579f246 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h +++ b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h $ -// $Id: Arr_spherical_gaussian_map_3.h 774e353 2022-01-11T11:32:50+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h $ +// $Id: include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Efi Fogel @@ -21,7 +21,7 @@ * embedded on the sphere. * * This file consists of the definition of the main type, namely - * Arr_spherical_gaussian_map_2 and a service tye, + * Arr_spherical_gaussian_map_2 and a service type, * namely Arr_sgm_initializer, that initializes an object of the main type. */ @@ -89,7 +89,7 @@ class Sgm_normalizer { }; #endif -/*! Arr_sgm_initializer is an algorothmic framework that initializes a +/*! Arr_sgm_initializer is an algorithmic framework that initializes a * Arr_spherical_gaussian_map_3 structure. It is parameterized by the SGM to * be initialized and by a visitor class. */ @@ -115,7 +115,7 @@ class Arr_sgm_initializer { virtual ~Arr_sgm_initializer() {} /*! Insert a great arc whose angle is less than Pi and is represented by two - * normals into the SGM. Each normal defines an end point of the greate arc. + * normals into the SGM. Each normal defines an end point of the great arc. * \param normal1 represents the source normal. * \param normal2 represents the target normal. */ @@ -143,7 +143,7 @@ class Arr_sgm_initializer { } /*! Insert a great arc whose angle is less than Pi and is represented by two - * normals into the SGM. Each normal defines an end point of the greate arc. + * normals into the SGM. Each normal defines an end point of the great arc. * \param normal1 represents the source normal. * \param normal2 represents the target normal. * \return the handle for the halfedge directed from the endpoint @@ -154,14 +154,14 @@ class Arr_sgm_initializer { OutputIterator insert(const Vector_3 & normal1, const Vector_3 & normal2, OutputIterator oi) { - typedef boost::variant + typedef std::variant Make_x_monotone_result; std::list x_objects; make_x_monotone(normal1, normal2, std::back_inserter(x_objects)); auto it = x_objects.begin(); - const auto* xc = boost::get(&(*it)); + const auto* xc = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "1.a. insert_in_face_interior(" << *xc << ")" << std::endl; #endif @@ -172,7 +172,7 @@ class Arr_sgm_initializer { ++it; if (it == x_objects.end()) return oi; - xc = boost::get(&(*it)); + xc = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "1.b. insert_from_vertex(" << *xc << ")" << std::endl; #endif @@ -183,7 +183,7 @@ class Arr_sgm_initializer { } /*! Insert a great arc whose angle is less than Pi and is represented by two - * normals into the SGM. Each normal defines an end point of the greate arc. + * normals into the SGM. Each normal defines an end point of the great arc. * \param normal1 represents the source normal. * \param normal2 represents the target normal. * \return the handle for the halfedge directed from the endpoint @@ -195,14 +195,14 @@ class Arr_sgm_initializer { const Vector_3 & normal2, OutputIterator oi) { - typedef boost::variant + typedef std::variant Make_x_monotone_result; std::list x_objects; make_x_monotone(normal1, normal2, std::back_inserter(x_objects)); auto it = x_objects.begin(); - const auto* xc = boost::get(&(*it)); + const auto* xc = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "2.a. insert_from_vertex(" << *xc << ", " << vertex1->point() << ")" << std::endl; @@ -216,7 +216,7 @@ class Arr_sgm_initializer { ++it; if (it == x_objects.end()) return oi; - xc = boost::get(&(*it)); + xc = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "2.b. insert_from_vertex(" << *xc << ")" << std::endl; #endif @@ -227,7 +227,7 @@ class Arr_sgm_initializer { } /*! Insert a great arc whose angle is less than Pi and is represented by two - * normals into the SGM. Each normal defines an end point of the greate arc. + * normals into the SGM. Each normal defines an end point of the great arc. * \param normal1 represents the source normal. * \param normal2 represents the target normal. * \param vertex the handle of the vertex that is the source of the arc @@ -239,7 +239,7 @@ class Arr_sgm_initializer { const Vector_3 & normal2, Vertex_handle vertex2, OutputIterator oi) { - typedef boost::variant + typedef std::variant Make_x_monotone_result; std::list x_objects; @@ -247,7 +247,7 @@ class Arr_sgm_initializer { auto it = x_objects.begin(); if (x_objects.size() == 1) { - const auto* xc = boost::get(&(*it)); + const auto* xc = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "3. insert_from_vertex(" << *xc << ")" << std::endl; #endif @@ -258,8 +258,8 @@ class Arr_sgm_initializer { return oi; } - const X_monotone_curve_2* xc1 = boost::get(&(*it++)); - const X_monotone_curve_2* xc2 = boost::get(&(*it)); + const X_monotone_curve_2* xc1 = std::get_if(&(*it++)); + const X_monotone_curve_2* xc2 = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "3.a. insert_from_vertex(" << *xc2 << ")" << std::endl; @@ -281,7 +281,7 @@ class Arr_sgm_initializer { } /*! Insert a great arc whose angle is less than Pi and is represented by two - * normals into the SGM. Each normal defines an end point of the greate arc. + * normals into the SGM. Each normal defines an end point of the great arc. * \param normal1 represents the source normal. * \param normal2 represents the target normal. * \param vertex1 the handle of the vertex that is the source of the arc @@ -294,13 +294,13 @@ class Arr_sgm_initializer { const Vector_3 & normal2, Vertex_handle vertex2, OutputIterator oi) { - typedef boost::variant + typedef std::variant Make_x_monotone_result; std::list x_objects; make_x_monotone(normal1, normal2, std::back_inserter(x_objects)); auto it = x_objects.begin(); if (x_objects.size() == 1) { - const auto* xc = boost::get(&(*it)); + const auto* xc = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "4. insert_at_vertices(" << *xc << ")" << std::endl; #endif @@ -308,8 +308,8 @@ class Arr_sgm_initializer { return oi; } - const X_monotone_curve_2 * xc1 = boost::get(&(*it++)); - const X_monotone_curve_2 * xc2 = boost::get(&(*it)); + const X_monotone_curve_2 * xc1 = std::get_if(&(*it++)); + const X_monotone_curve_2 * xc2 = std::get_if(&(*it)); #if CGAL_ARR_SPHERICAL_GAUSSIAN_MAP_3_DEBUG==1 std::cout << "4.a. insert_from_vertex(" << *xc1 diff --git a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h index 7bb6fcd5..ddec9af6 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h +++ b/thirdparty/CGAL/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h $ -// $Id: Arr_transform_on_sphere.h 03a2d28 2020-06-14T10:47:45+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h $ +// $Id: include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Naama mayer @@ -46,7 +46,7 @@ void Arr_transform_on_sphere(Arrangement & arr, typedef typename Arrangement::Halfedge_around_vertex_circulator Halfedge_around_vertex_circulator; - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; const Geometry_traits_2 * geom_traits = arr.geometry_traits(); Topology_traits * topol_traits = arr.topology_traits(); @@ -103,7 +103,7 @@ void Arr_transform_on_sphere(Arrangement & arr, topol_traits->erase_redundant_vertex(&(*v_temp)); // Merge the edges into a single one, and delete the vertex from the - // DCEL. (By default, the merge_edge() funtion deletes the vertex.) + // DCEL. (By default, the merge_edge() function deletes the vertex.) arr.merge_edge(havc, havc_next->twin() , merged_cv); } } @@ -156,10 +156,10 @@ void Arr_transform_on_sphere(Arrangement & arr, auto it = objects.begin(); // The curve that its left vertex lies on the identification curve - const auto* sub_cv1 = boost::get(&(*it)); + const auto* sub_cv1 = std::get(&(*it)); ++it; - //The curve that its rigth vertex lies on the identification curve - const auto* sub_cv2 = boost::get(&(*it)); + //The curve that its right vertex lies on the identification curve + const auto* sub_cv2 = std::get(&(*it)); bool eq1 = (*sub_cv1).source() == hei1->source()->point(); bool eq2 = (*sub_cv2).target() == hei1->target()->point(); diff --git a/thirdparty/CGAL/include/CGAL/Arr_spherical_topology_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_spherical_topology_traits_2.h index 099cebd0..71e6ba45 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_spherical_topology_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_spherical_topology_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h $ -// $Id: Arr_spherical_topology_traits_2.h 6b64dc8 2020-11-11T09:38:55+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h $ +// $Id: include/CGAL/Arr_spherical_topology_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Efi Fogel @@ -91,30 +91,14 @@ class Arr_spherical_topology_traits_2 { typedef typename Gt_adaptor_2::Top_side_category Top_side_category; typedef typename Gt_adaptor_2::Right_side_category Right_side_category; - BOOST_MPL_ASSERT - ( - (boost::mpl::or_< - boost::is_same< Left_side_category, Arr_oblivious_side_tag >, - boost::is_same< Left_side_category, Arr_identified_side_tag > >) - ); - BOOST_MPL_ASSERT - ( - (boost::mpl::or_< - boost::is_same< Bottom_side_category, Arr_oblivious_side_tag >, - boost::is_same< Bottom_side_category, Arr_contracted_side_tag > >) - ); - BOOST_MPL_ASSERT - ( - (boost::mpl::or_< - boost::is_same< Top_side_category, Arr_oblivious_side_tag >, - boost::is_same< Top_side_category, Arr_contracted_side_tag > >) - ); - BOOST_MPL_ASSERT - ( - (boost::mpl::or_< - boost::is_same< Right_side_category, Arr_oblivious_side_tag >, - boost::is_same< Right_side_category, Arr_identified_side_tag > >) - ); + static_assert(std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Left_side_category, Arr_identified_side_tag >::value); + static_assert(std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Bottom_side_category, Arr_contracted_side_tag >::value); + static_assert(std::is_same< Top_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Top_side_category, Arr_contracted_side_tag >::value); + static_assert(std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Right_side_category, Arr_identified_side_tag >::value); //@} /*! \struct @@ -170,7 +154,7 @@ class Arr_spherical_topology_traits_2 { //! The geometry-traits adaptor. const Gt_adaptor_2* m_geom_traits; - //! Inidicates whether the traits object should evetually be freed. + //! Indicates whether the traits object should eventually be freed. bool m_own_geom_traits; // Copy constructor and assignment operator - not supported. @@ -305,7 +289,7 @@ class Arr_spherical_topology_traits_2 { return (it != m_boundary_vertices.end()) ? it->second : nullptr; } - // TODO remove if all occurences have been replaced with the new signature that queries for a point + // TODO remove if all occurrences have been replaced with the new signature that queries for a point /*! Obtain a vertex on the line of discontinuity that corresponds to * the given curve-end (or return NULL if no such vertex exists). */ @@ -522,7 +506,7 @@ class Arr_spherical_topology_traits_2 { * \pre The curve has a boundary condition in either x or y. * \return An object that contains the curve end. */ - boost::optional > + std::optional > place_boundary_vertex(Face* f, const X_monotone_curve_2& xc, Arr_curve_end ind, @@ -554,7 +538,7 @@ class Arr_spherical_topology_traits_2 { * \pre The curve end is incident to the boundary. * \return An object that contains the curve end. */ - boost::variant + std::variant locate_curve_end(const X_monotone_curve_2& xc, Arr_curve_end ce, Arr_parameter_space ps_x, Arr_parameter_space ps_y); diff --git a/thirdparty/CGAL/include/CGAL/Arr_tags.h b/thirdparty/CGAL/include/CGAL/Arr_tags.h index 4bc1f99c..9e3ecf03 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_tags.h +++ b/thirdparty/CGAL/include/CGAL/Arr_tags.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_tags.h $ -// $Id: Arr_tags.h 2a3fbc0 2019-11-19T09:47:44+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_tags.h $ +// $Id: include/CGAL/Arr_tags.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -246,46 +245,50 @@ struct Arr_all_sides_not_finite_tag : struct Arr_not_all_sides_not_finite_tag : public virtual Arr_not_all_sides_oblivious_tag {}; -typedef boost::mpl::bool_ Arr_true; -typedef boost::mpl::bool_ Arr_false; +typedef std::true_type Arr_true; +typedef std::false_type Arr_false; template struct Arr_is_side_oblivious { typedef ArrSideCategory Side_cat; - typedef boost::is_same Is_same; - typedef boost::mpl::if_ result; + typedef std::is_same Is_same; + typedef std::bool_constant result; typedef typename result::type type; }; template struct Arr_is_side_open { typedef ArrSideCategory Side_cat; - typedef boost::is_same Is_same; - typedef boost::mpl::if_ result; + typedef std::is_same Is_same; + typedef std::bool_constant result; typedef typename result::type type; }; template struct Arr_is_side_identified { typedef ArrSideCategory Side_cat; - typedef boost::is_same Is_same; - typedef boost::mpl::if_ result; + typedef std::is_same Is_same; + typedef std::bool_constant result; typedef typename result::type type; }; +template +inline constexpr bool Arr_is_side_identified_v = + Arr_is_side_identified::type::value; + template struct Arr_is_side_contracted { typedef ArrSideCategory Side_cat; - typedef boost::is_same Is_same; - typedef boost::mpl::if_ result; + typedef std::is_same Is_same; + typedef std::bool_constant result; typedef typename result::type type; }; template struct Arr_is_side_closed { typedef ArrSideCategory Side_cat; - typedef boost::is_same Is_same; - typedef boost::mpl::if_ result; + typedef std::is_same Is_same; + typedef std::bool_constant result; typedef typename result::type type; }; @@ -307,10 +310,10 @@ struct Arr_all_sides_oblivious_category { /*! Boolean tag that is Arr_all_sides_oblivious_tag if all sides are * oblivious, otherwise Arr_not_all_sides_oblivious_tag */ - typedef typename boost::mpl::if_, - Arr_all_sides_oblivious_tag, - Arr_not_all_sides_oblivious_tag>::type + typedef std::conditional_t result; }; @@ -331,19 +334,19 @@ struct Arr_all_sides_not_open_category { typedef typename Arr_is_side_open::result Bot_ope; typedef typename Arr_is_side_open::result Top_ope; - typedef boost::mpl::not_ Lef_not_ope; - typedef boost::mpl::not_ Rig_not_ope; - typedef boost::mpl::not_ Bot_not_ope; - typedef boost::mpl::not_ Top_not_ope; + static inline constexpr bool lef_not_ope = !Lef_ope::value; + static inline constexpr bool rig_not_ope = !Rig_ope::value; + static inline constexpr bool bot_not_ope = !Bot_ope::value; + static inline constexpr bool top_not_ope = !Top_ope::value; public: /*! Boolean tag that is Arr_all_sides_not_open_tag if all sides are not-open, * otherwise Arr_not_all_sides_not_open_tag */ - typedef typename boost::mpl::if_, - Arr_all_sides_not_open_tag, - Arr_not_all_sides_not_open_tag>::type + typedef std::conditional_t result; }; @@ -374,23 +377,23 @@ struct Arr_sides_category { typedef typename Arr_is_side_open::result Bot_ope; typedef typename Arr_is_side_open::result Top_ope; - typedef boost::mpl::or_ Lef_obl_or_ope; - typedef boost::mpl::or_ Rig_obl_or_ope; - typedef boost::mpl::or_ Bot_obl_or_ope; - typedef boost::mpl::or_ Top_obl_or_ope; - - typedef typename boost::mpl::if_, - Arr_all_sides_not_finite_tag, - Arr_not_all_sides_not_finite_tag>::type + static inline constexpr bool lef_obl_or_ope = Lef_obl::value || Lef_ope::value; + static inline constexpr bool rig_obl_or_ope = Rig_obl::value || Rig_ope::value; + static inline constexpr bool bot_obl_or_ope = Bot_obl::value || Bot_ope::value; + static inline constexpr bool top_obl_or_ope = Top_obl::value || Top_ope::value; + + typedef std::conditional_t tmp; public: - typedef typename boost::mpl::if_, - Arr_all_sides_oblivious_tag, tmp>::type + typedef std::conditional_t result; }; @@ -404,31 +407,27 @@ struct Arr_sane_identified_tagging { typedef ArrBottomSideCategory Bot_side_cat; typedef ArrTopSideCategory Top_side_cat; - typedef typename Arr_is_side_identified::result Lef_ide; - typedef typename Arr_is_side_identified::result Rig_ide; - typedef typename Arr_is_side_identified::result Bot_ide; - typedef typename Arr_is_side_identified::result Top_ide; - - typedef boost::mpl::and_ LR_ide; - typedef boost::mpl::and_ BT_ide; + static inline constexpr bool lef_ide = Arr_is_side_identified_v; + static inline constexpr bool rig_ide = Arr_is_side_identified_v; + static inline constexpr bool bot_ide = Arr_is_side_identified_v; + static inline constexpr bool top_ide = Arr_is_side_identified_v; - typedef boost::mpl::not_ Lef_not_ide; - typedef boost::mpl::not_ Rig_not_ide; - typedef boost::mpl::not_ Bot_not_ide; - typedef boost::mpl::not_ Top_not_ide; + static inline constexpr bool lr_ide = lef_ide && rig_ide; + static inline constexpr bool bt_ide = bot_ide && top_ide; - typedef boost::mpl::and_ LR_not_ide; + static inline constexpr bool lr_not_ide = !lef_ide && !rig_ide; - typedef boost::mpl::and_ BT_not_ide; + static inline constexpr bool bt_not_ide = !bot_ide && !top_ide; - typedef boost::mpl::or_ LR_ok; - typedef boost::mpl::or_ BT_ok; + static inline constexpr bool lr_ok = lr_ide || lr_not_ide; + static inline constexpr bool bt_ok = bt_ide || bt_not_ide; - /*! Boolean tag that is bool_ if opposite sides are either + /*! Boolean tag that is bool_constant if opposite sides are either * both identified or both not-identified, - * otherwise bool_ + * otherwise bool_constant */ - typedef boost::mpl::and_ result; + typedef std::bool_constant result; + static inline constexpr bool value = result::value; }; /*! Checks whether one of two boundary sides are identified @@ -447,10 +446,10 @@ struct Arr_has_identified_sides { typedef typename Arr_is_side_identified::result Side_one_ide; typedef typename Arr_is_side_identified::result Side_two_ide; - /*! Boolean tag that is bool_ if one side is identified, - * otherwise bool_ + /*! Boolean tag that is bool_constant if one side is identified, + * otherwise bool_constant */ - typedef boost::mpl::or_ result; + typedef std::bool_constant result; }; /*! Checks whether one of two boundary sides are contracted @@ -463,10 +462,11 @@ struct Arr_has_contracted_sides_two { typedef typename Arr_is_side_contracted::result Side_one_con; typedef typename Arr_is_side_contracted::result Side_two_con; - /*!\ Boolean tag that is bool_ if one side is identified, - * otherwise bool_ + /*!\ Boolean tag that is bool_constant if one side is identified, + * otherwise bool_constant */ - typedef boost::mpl::or_ result; + typedef std::bool_constant result; }; /*! Checks whether one of two boundary sides are closed @@ -479,10 +479,11 @@ struct Arr_has_closed_sides_two { typedef typename Arr_is_side_closed::result Side_one_clo; typedef typename Arr_is_side_closed::result Side_two_clo; - /*! Boolean tag that is bool_ if one side is identified, - * otherwise bool_ + /*! Boolean tag that is bool_constant if one side is identified, + * otherwise bool_constant */ - typedef boost::mpl::or_ result; + typedef std::bool_constant result; }; /*! Checks whether one of two boundary sides are open @@ -495,10 +496,11 @@ struct Arr_has_open_sides_two { typedef typename Arr_is_side_open::result Side_one_ope; typedef typename Arr_is_side_open::result Side_two_ope; - /*! Boolean tag that is bool_ if one side is identified, - * otherwise bool_ + /*! Boolean tag that is bool_constant if one side is identified, + * otherwise bool_constant */ - typedef boost::mpl::or_ result; + typedef std::bool_constant result; }; /*! Categorizes two boundary sides: @@ -531,11 +533,11 @@ struct Arr_two_sides_category { Is_open; public: - typedef typename boost::mpl::if_::type>::type>::type>::type + typedef std::conditional_t>>> result; }; diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h index b7743f20..0e38352b 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h $ -// $Id: Arr_bounded_planar_batched_pl_helper.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h index 046eba12..cbdc780f 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h $ -// $Id: Arr_bounded_planar_construction_helper.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_insertion_helper.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_insertion_helper.h index 69ebb56d..8abbbe2a 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_insertion_helper.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_insertion_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_insertion_helper.h $ -// $Id: Arr_bounded_planar_insertion_helper.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_insertion_helper.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_bounded_planar_insertion_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h index ec39bcab..b73e76a1 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h $ -// $Id: Arr_bounded_planar_overlay_helper.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h index 2b8af301..5f5a76d8 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h $ -// $Id: Arr_bounded_planar_topology_traits_2_impl.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h index 77a87aa7..e1804060 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h $ -// $Id: Arr_bounded_planar_vert_decomp_helper.h 436ba5f 2020-06-30T21:23:16+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -47,9 +47,9 @@ class Arr_bounded_planar_vert_decomp_helper { typedef typename Arrangement_2::Face_const_handle Face_const_handle; typedef typename Arrangement_2::Topology_traits Topology_traits; - typedef boost::variant Cell_type; - typedef boost::optional Vert_type; + typedef std::optional Vert_type; protected: // Data members: diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h index 01ae16f2..8a565932 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h $ -// $Id: Arr_inc_insertion_zone_visitor.h 6e1fc8a 2021-09-02T16:53:07+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -59,8 +59,8 @@ class Arr_inc_insertion_zone_visitor { const Vertex_handle invalid_v; // An invalid vertex handle. const Halfedge_handle invalid_he; // An invalid halfedge handle. - X_monotone_curve_2 m_sub_cv1; // Auxiliary varibale (for splitting). - X_monotone_curve_2 m_sub_cv2; // Auxiliary varibale (for splitting). + X_monotone_curve_2 m_sub_cv1; // Auxiliary variable (for splitting). + X_monotone_curve_2 m_sub_cv2; // Auxiliary variable (for splitting). public: /*! Constructor. */ diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h index d444d1b0..ae923ae6 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h $ -// $Id: Arr_planar_topology_traits_base_2.h 6e1fc8a 2021-09-02T16:53:07+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -71,8 +71,8 @@ class Arr_planar_topology_traits_base_2 Dcel m_dcel; // The DCEL. const Traits_adaptor_2* m_geom_traits; // The geometry-traits adaptor. - bool m_own_geom_traits; // Inidicate whether we should - // evetually free the traits object. + bool m_own_geom_traits; // Indicate whether we should + // eventually free the traits object. // Copy constructor and assignment operator - not supported. Arr_planar_topology_traits_base_2(const Self&); diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h index c5e6c288..ffb044b8 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h $ -// $Id: Arr_spherical_batched_pl_helper.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h index d0da16fa..3c0d05be 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h $ -// $Id: Arr_spherical_construction_helper.h 2d1e009 2021-03-25T12:53:48+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -151,7 +151,7 @@ class Arr_spherical_construction_helper { bool swap_predecessors(Event* event) const { // If we insert an edge whose right end lies on the north pole, we have - // to flip the order of predecessor halfegdes. + // to flip the order of predecessor halfedges. // TODO what about the corner? return (event->parameter_space_in_x() == ARR_INTERIOR && event->parameter_space_in_y() == ARR_TOP_BOUNDARY); @@ -263,7 +263,7 @@ before_handle_event(Event* event) if (ps_x == ARR_RIGHT_BOUNDARY) { // Process a non-isolated event on the right identified boundary. - // Cannnot be vertical, only curves approaching the right side are possible. + // Cannot be vertical, only curves approaching the right side are possible. // If a vertex on the line of discontinuity does not exists, create one. DVertex* dv = m_top_traits->discontinuity_vertex(event->point()); Vertex_handle v = (dv) ? Vertex_handle(dv) : diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h index 1a33982d..92baf87f 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h $ -// $Id: Arr_spherical_insertion_helper.h 295e9b9 2022-02-02T15:44:48+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -163,7 +163,7 @@ before_handle_event_imp(Event* event, Arr_not_all_sides_oblivious_tag) if (event->is_isolated()) return; if (ps_y == ARR_BOTTOM_BOUNDARY) { - // Process bootom contraction boundary: + // Process bottom contraction boundary: // The event has only one right curve, as there is exactly one curve // incident to an event with boundary conditions. CGAL_assertion((event->number_of_left_curves() == 0) && diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h index 321f6cac..39cdd924 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h $ -// $Id: Arr_spherical_overlay_helper.h 9e5385d 2021-03-25T15:49:58+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h index b4540543..1b8cbaf2 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h $ -// $Id: Arr_spherical_topology_traits_2_impl.h 12a85a9 2021-03-01T15:39:36+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Efi Fogel @@ -188,6 +188,7 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const auto cmp_x_op = m_geom_traits->compare_x_2_object(); auto cmp_y_at_x_op = m_geom_traits->compare_y_at_x_2_object(); auto cmp_x_pt_ce = m_geom_traits->compare_x_point_curve_end_2_object(); + auto cmp_x_ce_ce = m_geom_traits->compare_x_curve_ends_2_object(); auto is_vertical = m_geom_traits->is_vertical_2_object(); auto is_on_y_identification = m_geom_traits->is_on_y_identification_2_object(); @@ -214,16 +215,16 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const /*! We identify 2 main cases: * 1. The vertical ray intersects the boundary at a halfedge. In this - * case the x-possition of p is strictly larger than the x-possition of - * the current-curve source, and strictly smaller than x-possition of - * the current-curve target, or vise versa. + * case the x-position of p is strictly larger than the x-position of + * the current-curve source, and strictly smaller than x-position of + * the current-curve target, or vice versa. * 2. The vertical ray intersects the boundary at a vertex. In this case: - * a. the x-possition of p is strictly smaller than the x-position of the + * a. the x-position of p is strictly smaller than the x-position of the * current-curve source, and equal to the x-position of the current-curve * target, and - * b. the x-possition of p is equal to the x-position of the next-curve + * b. the x-position of p is equal to the x-position of the next-curve * source (not counting vertical curves in between), and strictly larger - * than the x-possition of the next-curve target, or vise verase (that is, + * than the x-position of the next-curve target, or vice verase (that is, * the "smaller" and "larger" interchanged). */ @@ -251,7 +252,6 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const Arr_parameter_space ps_y_target; do { - /* Compare p to the target vertex of the current halfedge. If the * vertex v is on the boundary of the component, p is not in the interior * the face. @@ -265,14 +265,15 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const * the north pole, increase the intersection counter */ if (curr->direction() == ARR_LEFT_TO_RIGHT) { - auto ps_y_1 = ps_y_op(curr->curve(), ARR_MAX_END); - auto ps_y_2 = ps_y_op(curr->next()->curve(), ARR_MAX_END); + const auto& cv1 = curr->curve(); + const auto& cv2 = curr->next()->curve(); + auto ps_y_1 = ps_y_op(cv1, ARR_MAX_END); + auto ps_y_2 = ps_y_op(cv2, ARR_MAX_END); if ((ps_y_1 == ARR_TOP_BOUNDARY) && (ps_y_2 == ARR_TOP_BOUNDARY)) { // Compare the x-coordinates: - const auto& cv1 = curr->curve(); - const auto& cv2 = curr->next()->curve(); Comparison_result rc1, rc2; if (is_on_y_identification(cv1)) { + if (is_on_y_identification(p)) return false; // ----------- // | | |<---- cv1 go // | | || @@ -285,6 +286,7 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const rc2 = cmp_x_pt_ce(p, cv2, ARR_MAX_END); } else if (is_on_y_identification(cv2)) { + if (is_on_y_identification(p)) return false; // ----------- // cv2--->| | | // || | | @@ -296,7 +298,14 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const rc1 = cmp_x_pt_ce(p, cv1, ARR_MAX_END); rc2 = LARGER; } + else if (is_on_y_identification(p)) { + // If the max end of cv1 is smaller than the max end of cv2, + // the identification x-coordinate is in the x-range. + rc1 = cmp_x_ce_ce(cv1, ARR_MAX_END, cv2, ARR_MAX_END); + rc2 = LARGER; + } else { + // None of p, cv1, or cv2 lie on the identification curve. rc1 = cmp_x_pt_ce(p, cv1, ARR_MAX_END); rc2 = cmp_x_pt_ce(p, cv2, ARR_MAX_END); } @@ -562,8 +571,8 @@ let_me_decide_the_outer_ccb(std::pair< CGAL::Sign, CGAL::Sign> signs1, * represent the curve end along the face boundary. */ template -boost::optional - ::Vertex*, typename Arr_spherical_topology_traits_2::Halfedge*> > Arr_spherical_topology_traits_2:: @@ -576,17 +585,17 @@ place_boundary_vertex(Face* /* f */, , Arr_parameter_space ps_y) { - typedef boost::variant Non_optional_result; - typedef boost::optional Result; + typedef std::variant Non_optional_result; + typedef std::optional Result; // std::cout << "place_boundary_vertex()" << std::endl; if (ps_y == ARR_BOTTOM_BOUNDARY) { - if (m_south_pole == nullptr) return boost::none; + if (m_south_pole == nullptr) return std::nullopt; return Result(Non_optional_result(m_south_pole)); } if (ps_y == ARR_TOP_BOUNDARY) { - if (m_north_pole == nullptr) return boost::none; + if (m_north_pole == nullptr) return std::nullopt; return Result(Non_optional_result(m_north_pole)); } @@ -602,7 +611,7 @@ place_boundary_vertex(Face* /* f */, } // The vertex hasn't been created yet, return a null object: - return boost::none; + return std::nullopt; } /*! \brief locate the predecessor halfedge for the given curve around a given @@ -638,7 +647,7 @@ locate_around_boundary_vertex(Vertex* v, /*! \brief locates a DCEL feature that contains a given curve end. */ template -boost::variant +std::variant ::Vertex*, typename Arr_spherical_topology_traits_2::Halfedge*, typename Arr_spherical_topology_traits_2::Face*> @@ -651,7 +660,7 @@ locate_curve_end(const X_monotone_curve_2& xc, Arr_curve_end ind, , Arr_parameter_space ps_y) { - typedef boost::variant Result; + typedef std::variant Result; // Act according to the boundary conditions. if (ps_y == ARR_TOP_BOUNDARY) { // In case the curve end coincides with the north pole, return the vertex @@ -893,7 +902,7 @@ _locate_around_pole(Vertex* v, next = curr->next()->opposite(); } while (curr != first); - // We sould never reach here: + // We should never reach here: CGAL_error(); return nullptr; } diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h index c2664f26..0a9489f4 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h $ -// $Id: Arr_spherical_vert_decomp_helper.h 5985db1 2021-07-28T16:17:10+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -48,9 +48,9 @@ class Arr_spherical_vert_decomp_helper { typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; typedef typename Arrangement_2::Face_const_handle Face_const_handle; - typedef boost::variant Cell_type; - typedef boost::optional Vert_type; + typedef std::optional Vert_type; protected: typedef typename Arrangement_2::Topology_traits Topology_traits; @@ -109,14 +109,14 @@ class Arr_spherical_vert_decomp_helper { template void Arr_spherical_vert_decomp_helper::before_sweep() { - // Get the north pole and the face that intially contains it. + // Get the north pole and the face that initially contains it. m_valid_north_pole = (m_top_traits->north_pole() != nullptr); if (m_valid_north_pole) m_north_pole = Vertex_const_handle (m_top_traits->north_pole()); m_north_face = Face_const_handle (m_top_traits->spherical_face()); - // Get the south pole and the face that intially contains it. + // Get the south pole and the face that initially contains it. m_valid_south_pole = (m_top_traits->south_pole() != nullptr); if (m_valid_south_pole) m_south_pole = Vertex_const_handle (m_top_traits->south_pole()); diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h index 8f59803f..aa318c26 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h $ -// $Id: Arr_unb_planar_batched_pl_helper.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h index 3df93daa..04af3468 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h $ -// $Id: Arr_unb_planar_construction_helper.h 5985db1 2021-07-28T16:17:10+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -165,7 +165,7 @@ class Arr_unb_planar_construction_helper { { // If we insert an edge whose right end lies on the top edge of the // ficititous bounding rectangle, we have to flip the order of predecessor - // halfegdes. + // halfedges. return ((event->parameter_space_in_x() == ARR_INTERIOR) && (event->parameter_space_in_y() == ARR_TOP_BOUNDARY)); } @@ -272,6 +272,21 @@ before_handle_event(Event* event) if (m_prev_minus_inf_x_event != nullptr) m_prev_minus_inf_x_event->set_halfedge_handle(m_lh->next()); m_prev_minus_inf_x_event = event; + + // If the event lies also on the top boundary, associate all curve indices + // of subcurves that "see" m_th from below with the top fictitious halfedge + // (m_th->next()). + if (ps_y == ARR_TOP_BOUNDARY) { + if (m_he_ind_map_p != nullptr) { + Indices_list& list_ref = (*m_he_ind_map_p)[m_th]; + list_ref.clear(); + list_ref.splice(list_ref.end(), m_subcurves_at_ubf); + } + else { + m_subcurves_at_ubf.clear(); + } + CGAL_assertion(m_subcurves_at_ubf.empty()); + } return; case ARR_RIGHT_BOUNDARY: diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h index 5ccba96b..70e9538c 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h $ -// $Id: Arr_unb_planar_insertion_helper.h 6e1fc8a 2021-09-02T16:53:07+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h index dc994977..d3ee9b69 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h $ -// $Id: Arr_unb_planar_overlay_helper.h 6e1fc8a 2021-09-02T16:53:07+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h index 04e2c3c4..b4cb4f04 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h $ -// $Id: Arr_unb_planar_topology_traits_2_impl.h 3849f5e 2020-06-14T00:41:25+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -296,8 +296,8 @@ are_equal(const Vertex *v, // represent the curve end along the face boundary. // template -boost::optional - ::Vertex*, typename Arr_unb_planar_topology_traits_2::Halfedge*> > Arr_unb_planar_topology_traits_2:: @@ -305,8 +305,8 @@ place_boundary_vertex(Face* f, const X_monotone_curve_2& cv, Arr_curve_end ind, Arr_parameter_space ps_x, Arr_parameter_space ps_y) { - typedef boost::variant Non_optional_result; - typedef boost::optional Result; + typedef std::variant Non_optional_result; + typedef std::optional Result; // Get a halfedge on the outer CCB of f and start traversing the CCB. Halfedge* first = *(f->outer_ccbs_begin()); @@ -323,22 +323,22 @@ place_boundary_vertex(Face* f, return Result(curr); } - // Move to the next halfegde along the CCB. + // Move to the next halfedge along the CCB. curr = curr->next(); } while (curr != first); - // If we reached here, we did not find a suitable halfegde, which should + // If we reached here, we did not find a suitable halfedge, which should // never happen. CGAL_error(); - return boost::none; + return std::nullopt; } //----------------------------------------------------------------------------- // Locate a DCEL feature that contains the given unbounded curve end. // template -boost::variant +std::variant ::Vertex*, typename Arr_unb_planar_topology_traits_2::Halfedge*, typename Arr_unb_planar_topology_traits_2::Face*> @@ -346,7 +346,7 @@ Arr_unb_planar_topology_traits_2:: locate_curve_end (const X_monotone_curve_2& cv, Arr_curve_end ind, Arr_parameter_space ps_x, Arr_parameter_space ps_y) { - typedef boost::variant Result; + typedef std::variant Result; // Start traversing the inner CCB of the fictitious face and try to locate // a feature that contains the curve end. @@ -809,7 +809,7 @@ _is_on_fictitious_edge(const X_monotone_curve_2& cv, Arr_curve_end ind, } } else { - // If we reched here, we have a "horizontal" fictitious halfedge. + // If we reached here, we have a "horizontal" fictitious halfedge. Arr_parameter_space he_ps_y = v1->parameter_space_in_y(); CGAL_assertion((he_ps_y == ARR_BOTTOM_BOUNDARY || diff --git a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h index 206dac71..ad636dc2 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h +++ b/thirdparty/CGAL/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h $ -// $Id: Arr_unb_planar_vert_decomp_helper.h 5985db1 2021-07-28T16:17:10+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h $ +// $Id: include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -46,9 +46,9 @@ class Arr_unb_planar_vert_decomp_helper { typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; typedef typename Arrangement_2::Face_const_handle Face_const_handle; - typedef boost::variant Cell_type; - typedef boost::optional Vert_type; + typedef std::optional Vert_type; protected: typedef typename Arrangement_2::Topology_traits Topology_traits; diff --git a/thirdparty/CGAL/include/CGAL/Arr_tracing_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_tracing_traits_2.h index 8fe40e13..0c5725de 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_tracing_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_tracing_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h $ -// $Id: Arr_tracing_traits_2.h 97b35b7 2022-03-13T11:52:42+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h $ +// $Id: include/CGAL/Arr_tracing_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Efi Fogel @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include @@ -162,13 +162,18 @@ class Arr_tracing_traits_2 : public Base_traits { { return m_flags & (0x1 << COMPARE_X_NEAR_BOUNDARY_OP); } public: - /*! Default constructor */ - Arr_tracing_traits_2() : - Base() + /*! Construct default */ + template + Arr_tracing_traits_2(Args ... args) : + Base(args...) { enable_all_traces(); } + /*! Disable copy constructor. + */ + Arr_tracing_traits_2(const Arr_tracing_traits_2&) = delete; + /*! Enable the trace of a traits operation * \param id the operation identifier */ @@ -279,7 +284,7 @@ class Arr_tracing_traits_2 : public Base_traits { m_object(base->construct_min_vertex_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv the curev the left endpoint of which is obtained + * \param xcv the curve the left endpoint of which is obtained * \return the left endpoint */ const Point_2 operator()(const X_monotone_curve_2& xcv) const @@ -305,7 +310,7 @@ class Arr_tracing_traits_2 : public Base_traits { m_object(base->construct_max_vertex_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv the curev the right endpoint of which is obtained + * \param xcv the curve the right endpoint of which is obtained * \return the right endpoint */ const Point_2 operator()(const X_monotone_curve_2& xcv) const @@ -526,7 +531,7 @@ class Arr_tracing_traits_2 : public Base_traits { std::cout << "make_x_monotone" << std::endl << " cv: " << cv << std::endl; - typedef boost::variant + typedef std::variant Make_x_monotone_result; std::list container; @@ -535,12 +540,12 @@ class Arr_tracing_traits_2 : public Base_traits { size_t i = 0; for (auto it = container.begin(); it != container.end(); ++it) { - if (const auto* xcv = boost::get(&*it)) { + if (const auto* xcv = std::get_if(&*it)) { std::cout << " result[" << i++ << "]: xcv: " << *xcv << std::endl; continue; } - if (const auto* p = boost::get(&*it)) { + if (const auto* p = std::get_if(&*it)) { std::cout << " result[" << i++ << "]: p: " << *p << std::endl; continue; } @@ -613,7 +618,7 @@ class Arr_tracing_traits_2 : public Base_traits { OutputIterator oi) const { typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_result; if (! m_enabled) return m_object(xcv1, xcv2, oi); @@ -627,22 +632,22 @@ class Arr_tracing_traits_2 : public Base_traits { unsigned int i = 0; for (const auto& item : container) { - const X_monotone_curve_2* xcv = boost::get(&item); + const X_monotone_curve_2* xcv = std::get_if(&item); if (xcv != nullptr) { std::cout << " result[" << i++ << "]: xcv: " << *xcv << std::endl; + *oi++ = *xcv; continue; } - const Intersection_point* ip = boost::get(&item); + const Intersection_point* ip = std::get_if(&item); if (ip != nullptr) { std::cout << " result[" << i++ << "]: p: " << ip->first << ", multiplicity: " << ip->second << std::endl; + *oi++ = *ip; continue; } } - for (auto it = container.begin(); it != container.end(); ++it) *oi++ = *it; - container.clear(); return oi; } }; @@ -650,13 +655,13 @@ class Arr_tracing_traits_2 : public Base_traits { /*! A functor that tests whether two x-monotone curves can be merged. */ class Are_mergeable_2 { private: - typename Base::Are_mergeable_2 m_object; + const Base& m_base_traits; bool m_enabled; public: /*! Construct */ - Are_mergeable_2(const Base* base, bool enabled = true) : - m_object(base->are_mergeable_2_object()), m_enabled(enabled) {} + Are_mergeable_2(const Base& base, bool enabled = true) : + m_base_traits(base), m_enabled(enabled) {} /*! Operate * \param xcv1 the first curve @@ -667,14 +672,32 @@ class Arr_tracing_traits_2 : public Base_traits { */ bool operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2) const - { - if (!m_enabled) return m_object(xcv1, xcv2); + { return are_mergable_2_impl(xcv1, xcv2, 0); } + + private: + /*! The base does not have Are_mergable_2 + */ + template + bool are_mergable_2_impl(const X_monotone_curve_2& /* xcv1 */, + const X_monotone_curve_2& /* xcv2 */, long) const { + CGAL_error(); + return false; + } + + /*! The base does have Are_mergable_2 + */ + template + auto are_mergable_2_impl(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2, int) const -> + decltype(m_base_traits.are_mergeable_2_object().operator()(xcv1, xcv2)) { + auto are_mergeable = m_base_traits.are_mergeable_2_object(); + if (! m_enabled) return are_mergeable(xcv1, xcv2); std::cout << "are_mergeable" << std::endl << " xcv1: " << xcv1 << std::endl << " xcv2: " << xcv2 << std::endl; - bool are_mergeable = m_object(xcv1, xcv2); - std::cout << " result: " << are_mergeable << std::endl; - return are_mergeable; + bool mergeable = are_mergeable(xcv1, xcv2); + std::cout << " result: " << mergeable << std::endl; + return mergeable; } }; diff --git a/thirdparty/CGAL/include/CGAL/Arr_trapezoid_ric_point_location.h b/thirdparty/CGAL/include/CGAL/Arr_trapezoid_ric_point_location.h index cd7abdc1..883cc4a7 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_trapezoid_ric_point_location.h +++ b/thirdparty/CGAL/include/CGAL/Arr_trapezoid_ric_point_location.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h $ -// $Id: Arr_trapezoid_ric_point_location.h 6642407 2020-07-29T18:08:32+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h $ +// $Id: include/CGAL/Arr_trapezoid_ric_point_location.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_triangulation_point_location.h b/thirdparty/CGAL/include/CGAL/Arr_triangulation_point_location.h index 37d00c7b..e176ae10 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_triangulation_point_location.h +++ b/thirdparty/CGAL/include/CGAL/Arr_triangulation_point_location.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h $ -// $Id: Arr_triangulation_point_location.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h $ +// $Id: include/CGAL/Arr_triangulation_point_location.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Idit Haran diff --git a/thirdparty/CGAL/include/CGAL/Arr_unb_planar_topology_traits_2.h b/thirdparty/CGAL/include/CGAL/Arr_unb_planar_topology_traits_2.h index 41990c5b..133fa951 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_unb_planar_topology_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_unb_planar_topology_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h $ -// $Id: Arr_unb_planar_topology_traits_2.h 3849f5e 2020-06-14T00:41:25+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h $ +// $Id: include/CGAL/Arr_unb_planar_topology_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -87,30 +87,14 @@ class Arr_unb_planar_topology_traits_2 : typedef typename Gt_adaptor_2::Top_side_category Top_side_category; typedef typename Gt_adaptor_2::Right_side_category Right_side_category; - BOOST_MPL_ASSERT( - (boost::mpl::or_< - boost::is_same< Left_side_category, Arr_oblivious_side_tag >, - boost::is_same< Left_side_category, Arr_open_side_tag > > - ) - ); - BOOST_MPL_ASSERT( - (boost::mpl::or_< - boost::is_same< Bottom_side_category, Arr_oblivious_side_tag >, - boost::is_same< Bottom_side_category, Arr_open_side_tag > > - ) - ); - BOOST_MPL_ASSERT( - (boost::mpl::or_< - boost::is_same< Top_side_category, Arr_oblivious_side_tag >, - boost::is_same< Top_side_category, Arr_open_side_tag > > - ) - ); - BOOST_MPL_ASSERT( - (boost::mpl::or_< - boost::is_same< Right_side_category, Arr_oblivious_side_tag >, - boost::is_same< Right_side_category, Arr_open_side_tag > > - ) - ); + static_assert(std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Left_side_category, Arr_open_side_tag >::value); + static_assert(std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Bottom_side_category, Arr_open_side_tag >::value); + static_assert(std::is_same< Top_side_category, Arr_oblivious_side_tag>::value || + std::is_same< Top_side_category, Arr_open_side_tag >::value); + static_assert(std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Right_side_category, Arr_open_side_tag >::value); //@} /*! \struct @@ -307,7 +291,7 @@ class Arr_unb_planar_topology_traits_2 : * \return An object that contains the curve end. * In our case this object always wraps a fictitious edge. */ - boost::optional > + std::optional > place_boundary_vertex(Face* f, const X_monotone_curve_2& cv, Arr_curve_end ind, @@ -346,7 +330,7 @@ class Arr_unb_planar_topology_traits_2 : * In our case this object may either wrap an unbounded face, * or an edge with an end-vertex at infinity (in case of an overlap). */ - boost::variant + std::variant locate_curve_end(const X_monotone_curve_2& cv, Arr_curve_end ind, Arr_parameter_space ps_x, diff --git a/thirdparty/CGAL/include/CGAL/Arr_vertex_index_map.h b/thirdparty/CGAL/include/CGAL/Arr_vertex_index_map.h index 74fb37b9..ac23dcf8 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_vertex_index_map.h +++ b/thirdparty/CGAL/include/CGAL/Arr_vertex_index_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h $ -// $Id: Arr_vertex_index_map.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h $ +// $Id: include/CGAL/Arr_vertex_index_map.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_vertex_map.h b/thirdparty/CGAL/include/CGAL/Arr_vertex_map.h index 3e1296d0..b0af2233 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_vertex_map.h +++ b/thirdparty/CGAL/include/CGAL/Arr_vertex_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_vertex_map.h $ -// $Id: Arr_vertex_map.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_vertex_map.h $ +// $Id: include/CGAL/Arr_vertex_map.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arr_vertical_decomposition_2.h b/thirdparty/CGAL/include/CGAL/Arr_vertical_decomposition_2.h index d19c5f3b..2fe1e9b0 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_vertical_decomposition_2.h +++ b/thirdparty/CGAL/include/CGAL/Arr_vertical_decomposition_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h $ -// $Id: Arr_vertical_decomposition_2.h 3c5552b 2020-06-30T21:22:40+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h $ +// $Id: include/CGAL/Arr_vertical_decomposition_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -24,7 +24,6 @@ #include #include -#include #include namespace CGAL { @@ -87,7 +86,7 @@ decompose(const Arrangement_on_surface_2& arr, Halfedge_const_handle he = (eit->direction() == ARR_RIGHT_TO_LEFT) ? eit : eit->twin(); //attempt to solve compile problem in one of the tests. created the - // tmp_curve instead of passing eit->curve() as a parmeter to the function + // tmp_curve instead of passing eit->curve() as a parameter to the function X_monotone_curve_2 tmp_curve = eit->curve(); xcurves_vec[i++] = Vd_x_monotone_curve_2(tmp_curve, he); } @@ -102,14 +101,14 @@ decompose(const Arrangement_on_surface_2& arr, if (vit->is_isolated()) { Vertex_const_handle iso_v = vit; //attempt to solve compile problem in one of the tests. created the - // tmp_curve instead of passing eit->curve() as a parmeter to the + // tmp_curve instead of passing eit->curve() as a parameter to the // function Point_2 tmp_point = vit->point(); iso_pts_vec[i++] = Vd_point_2(tmp_point, iso_v); } } - // Obtain a extended traits-class object. + // Obtain an extended traits-class object. const Gt2* geom_traits = arr.geometry_traits(); /* We would like to avoid copy construction of the geometry traits class. @@ -124,7 +123,7 @@ decompose(const Arrangement_on_surface_2& arr, * Use the form 'A a(*b);' and not ''A a = b;' to handle the case where A has * only an implicit constructor, (which takes *b as a parameter). */ - typename boost::mpl::if_, const Vgt2&, Vgt2>::type + std::conditional_t, const Vgt2&, Vgt2> ex_traits(*geom_traits); // Define the sweep-line visitor and perform the sweep. diff --git a/thirdparty/CGAL/include/CGAL/Arr_walk_along_line_point_location.h b/thirdparty/CGAL/include/CGAL/Arr_walk_along_line_point_location.h index eadf8936..9328e860 100644 --- a/thirdparty/CGAL/include/CGAL/Arr_walk_along_line_point_location.h +++ b/thirdparty/CGAL/include/CGAL/Arr_walk_along_line_point_location.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h $ -// $Id: Arr_walk_along_line_point_location.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h $ +// $Id: include/CGAL/Arr_walk_along_line_point_location.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -183,7 +183,7 @@ class Arr_walk_along_line_point_location { /*! * Find the first halfedge around a given target vertex, when going clockwise * from "6 o'clock" around this vertex (when shooting up) or starting from - * "12 o'clock (when shooting down). + * "12 o'clock" (when shooting down). * \param v The given vertex. * \param shoot_up If (true) we should start from "6 o'clock", * if (false) we should start from "12 o'clock". diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_2.h b/thirdparty/CGAL/include/CGAL/Arrangement_2.h index 8648c367..3ba72432 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_2.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h $ -// $Id: Arrangement_2.h d91194f 2019-12-02T21:22:25+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h $ +// $Id: include/CGAL/Arrangement_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h index dbb28d70..c9e90afa 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h $ -// $Id: Arr_compute_zone_visitor.h 0626eb0 2020-06-11T12:32:33+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h $ +// $Id: include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,13 +20,13 @@ * Definition of the Arr_compute_zone_visitor class. */ -#include +#include namespace CGAL { /*! \class * A visitor class for Arrangement_zone_2 that outputs the zone of an - * x-monotone curve. Specifically, it outputs handles to the the arrangment + * x-monotone curve. Specifically, it outputs handles to the the arrangement * cells that the x-monotone curve intersects. * The class should be templated by an Arrangement_2 class, and by an * output iterator of a variant of types of handles to the arrangement cells @@ -54,11 +54,11 @@ class Arr_compute_zone_visitor const Halfedge_handle invalid_he; // Invalid halfedge. const Vertex_handle invalid_v; // Invalid vertex. - OutputIterator& out_iter; // for outputing the zone objects. - // Its value type is boost::variant. - bool output_left; // Determines wheter we should + OutputIterator& out_iter; // for outputting the zone objects. + // Its value type is std::variant. + bool output_left; // Determines whether we should // output the left end point of a - // subcurve (to avoid outputing + // subcurve (to avoid outputting // the same feature twice). public: @@ -97,7 +97,7 @@ class Arr_compute_zone_visitor Vertex_handle left_v, Halfedge_handle left_he, Vertex_handle right_v, Halfedge_handle right_he) { - typedef boost::variant + typedef std::variant Zone_result; if (output_left) { @@ -138,7 +138,7 @@ class Arr_compute_zone_visitor Halfedge_handle he, Vertex_handle left_v, Vertex_handle right_v) { - typedef boost::variant + typedef std::variant Zone_result; if (output_left) { diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_default_planar_topology.h b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_default_planar_topology.h index 6fb1cb07..67cfb42b 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_default_planar_topology.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_default_planar_topology.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_default_planar_topology.h $ -// $Id: Arr_default_planar_topology.h 2a3fbc0 2019-11-19T09:47:44+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_default_planar_topology.h $ +// $Id: include/CGAL/Arrangement_2/Arr_default_planar_topology.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h index ce5bda1e..da8c9dbe 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h $ -// $Id: Arr_do_intersect_zone_visitor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h $ +// $Id: include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,8 +24,8 @@ namespace CGAL { /*! \class * A visitor class for Arrangement_zone_2, which check whether - * a given x-monotone curve intersects the arrangment. - * The class shouldbe templated by an Arrangement_2 class. + * a given x-monotone curve intersects the arrangement. + * The class should be templated by an Arrangement_2 class. */ template class Arr_do_intersect_zone_visitor diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h index 8211a017..87d50566 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h $ -// $Id: Arr_on_surface_with_history_2_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h $ +// $Id: include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h index fa9afa56..84452ef8 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h $ -// $Id: Arr_traits_adaptor_2.h 521c72d 2021-10-04T13:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h $ +// $Id: include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // $Date$ // @@ -118,16 +118,348 @@ class Arr_traits_basic_adaptor_2 : public ArrangementBasicTraits_ { // Inherited functors: typedef typename Base::Compare_x_2 Compare_x_2; typedef typename Base::Compare_xy_2 Compare_xy_2; - typedef typename Base::Compare_y_at_x_2 Compare_y_at_x_2; typedef typename Base::Construct_min_vertex_2 Construct_min_vertex_2; typedef typename Base::Construct_max_vertex_2 Construct_max_vertex_2; typedef typename Base::Is_vertical_2 Is_vertical_2; typedef typename Base::Compare_y_at_x_right_2 Compare_y_at_x_right_2; typedef typename Base::Equal_2 Equal_2; - /// \name Overriden functors for bounded boundaries. + /// \name Overridden functors for bounded boundaries. //@{ + /*! A functor that compares the y-coordinates of (i) a given point and (ii) + * a point on a given x-monotone curve at the x-coordinate of the point. + */ + class Compare_y_at_x_2 { + public: + /*! Return the location of the given point with respect to the input curve. + * \param cv the curve. + * \param p the point. + * \pre p is in the x-range of cv. + * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve; + * LARGER if y(p) > cv(x(p)), i.e. the point is above the curve; + * EQUAL if p lies on the curve. + */ + Comparison_result operator()(const Point_2& p, + const X_monotone_curve_2& xcv) const { + return compare_y_at_x(p, xcv, + Left_or_right_sides_category(), + Bottom_or_top_sides_category()); + } + + protected: + //! The base traits. + const Self& m_self; + + /*! Constructor. + * \param base The base traits class. It must be passed, to handle non + * stateless traits objects, (which stores data). + * The constructor is declared private to allow only the functor + * obtaining function, which is a member of the nesting class, + * constructing it. + */ + Compare_y_at_x_2(const Self& self) : m_self(self) {} + + //! Allow its functor obtaining function calling the private constructor. + friend class Arr_traits_basic_adaptor_2; + + private: + /*! 1. Implementation of the operator in case the bottom, top, right, and + * left sides do not have boundary conditions. + */ + Comparison_result compare_y_at_x(const Point_2& p, + const X_monotone_curve_2& xcv, + Arr_all_sides_oblivious_tag, + Arr_all_sides_oblivious_tag) const { + const Base& base = m_self; + auto cmp_y_at_x = base.compare_y_at_x_2_object(); + return cmp_y_at_x(p, xcv); + } + + /*! 2. Implementation of the operator in case the left and right sides are + * identified, and the bottom and top sides do not have boundary conditions. + */ + Comparison_result compare_y_at_x(const Point_2& p, + const X_monotone_curve_2& xcv, + Arr_has_identified_side_tag, + Arr_all_sides_oblivious_tag) const { + const Base& base = m_self; + auto cmp_y_at_x = base.compare_y_at_x_2_object(); + + auto ps_in_x = m_self.parameter_space_in_x_2_object(); + const Arr_parameter_space ps_x = ps_in_x(p); + if (ps_x == ARR_INTERIOR) return cmp_y_at_x(p, xcv); + + auto cmp_y_bnd = m_self.compare_y_on_boundary_2_object(); + auto ctr_min = m_self.construct_min_vertex_2_object(); + auto res = cmp_y_bnd(p, ctr_min(xcv)); + if (res != LARGER) return res; + auto is_on_y_identification = m_self.is_on_y_identification_2_object(); + if (is_on_y_identification(xcv) || + (ps_in_x(xcv, ARR_MAX_END) == ps_in_x(xcv, ARR_MIN_END))) { + auto ctr_max = m_self.construct_max_vertex_2_object(); + res = cmp_y_bnd(p, ctr_max(xcv)); + if (res != SMALLER) return res; + return EQUAL; + } + return LARGER; + } + + /*! 3. Implementation of the operator in case the left and right sides have + * boundary conditions (but are not identified) and the bottom and top sides + * do not. + */ + Comparison_result compare_y_at_x(const Point_2& p, + const X_monotone_curve_2& xcv, + Arr_boundary_cond_tag, + Arr_all_sides_oblivious_tag) const { + const Base& base = m_self; + auto cmp_y_at_x = base.compare_y_at_x_2_object(); + + auto ps_in_x = m_self.parameter_space_in_x_2_object(); + const Arr_parameter_space ps_x = ps_in_x(p); + if (ps_x == ARR_INTERIOR) return cmp_y_at_x(p, xcv); + + auto cmp_y_bnd = m_self.compare_y_on_boundary_2_object(); + auto ctr_min = m_self.construct_min_vertex_2_object(); + auto res = cmp_y_bnd(p, ctr_min(xcv)); + if (res != LARGER) return res; + if (ps_in_x(xcv, ARR_MAX_END) == ps_in_x(xcv, ARR_MIN_END)) { + auto ctr_max = m_self.construct_max_vertex_2_object(); + res = cmp_y_bnd(p, ctr_max(xcv)); + if (res != SMALLER) return res; + return EQUAL; + } + return LARGER; + } + + /*! 4. Implementation of the operator in case the left and right sides do + * not have boundary condition, and the bottom and top sides are identified. + */ + Comparison_result compare_y_at_x(const Point_2& p, + const X_monotone_curve_2& xcv, + Arr_all_sides_oblivious_tag, + Arr_has_identified_side_tag) const { + const Base& base = m_self; + auto cmp_y_at_x = base.compare_y_at_x_2_object(); + + auto ps_in_y = m_self.parameter_space_in_y_2_object(); + const Arr_parameter_space ps_y = ps_in_y(p); + if (ps_y == ARR_INTERIOR) return cmp_y_at_x(p, xcv); + + // The point must lie on the x-identification curve. + auto is_on_x_identification = m_self.is_on_x_identification_2_object(); + CGAL_assertion(is_on_x_identification(p)); + + // If the curve also lies on the x-boundary curve, return EQUAL + if (is_on_x_identification(xcv)) return EQUAL; + + // The curve does not lie entirely on the identification curve. + // Therefore, there are 3 options: + // (i) The point coincides with the left endpoint of xcv. + // (ii) The point coincides with the right endpoint of xcv. + // (iii) Return SMALLER as an arbitrary but consistent choice. + auto cmp_x = m_self.compare_x_2_object(); + + auto ctr_min = m_self.construct_min_vertex_2_object(); + Comparison_result res_min = cmp_x(p, ctr_min(xcv)); + CGAL_assertion(res_min != SMALLER); + if (res_min == EQUAL) { + if (ps_in_y(xcv, ARR_MIN_END) != ARR_INTERIOR) return EQUAL; + } + + auto ctr_max = m_self.construct_max_vertex_2_object(); + Comparison_result res_max = cmp_x(p, ctr_max(xcv)); + CGAL_assertion(res_max != LARGER); + if (res_max == EQUAL) { + if (ps_in_y(xcv, ARR_MAX_END) != ARR_INTERIOR) return EQUAL; + } + + // Return SMALLER as an arbitrary but consistent choice. + return SMALLER; + } + + /*! 5. Implementation of the operator in case the left and right sides are + * identified, and the bottom and top sides are also identified. + */ + Comparison_result compare_y_at_x(const Point_2& p, + const X_monotone_curve_2& xcv, + Arr_has_identified_side_tag xtag, + Arr_has_identified_side_tag ytag) const { + const Base& base = m_self; + auto cmp_y_at_x = base.compare_y_at_x_2_object(); + + auto ps_in_x = m_self.parameter_space_in_y_2_object(); + const Arr_parameter_space ps_x = ps_in_x(p); + auto ps_in_y = m_self.parameter_space_in_y_2_object(); + const Arr_parameter_space ps_y = ps_in_y(p); + if (ps_y == ARR_INTERIOR) { + if (ps_x == ARR_INTERIOR) return cmp_y_at_x(p, xcv); + + return compare_y_at_x(p, xcv, xtag, Arr_all_sides_oblivious_tag()); + } + + if (ps_x == ARR_INTERIOR) + return compare_y_at_x(p, xcv, Arr_all_sides_oblivious_tag(), ytag); + + // All 4 corners are identified. Therefore, if a curve end is on the + // horizontal boundary, it must be equal to p, as it must also be in the + // x-range of p. + if (ps_in_y(xcv, ARR_MIN_END) != ARR_INTERIOR) return EQUAL; + if (ps_in_y(xcv, ARR_MAX_END) != ARR_INTERIOR) return EQUAL; + + return SMALLER; + } + + /*! 6. Implementation of the operator in case the left and right sides have + * boundary conditions (but they are nopt identified) and the bottom and top + * sides are identied. + */ + Comparison_result compare_y_at_x(const Point_2& p, + const X_monotone_curve_2& xcv, + Arr_boundary_cond_tag xtag, + Arr_has_identified_side_tag ytag) const { + const Base& base = m_self; + auto cmp_y_at_x = base.compare_y_at_x_2_object(); + + auto ps_in_x = m_self.parameter_space_in_y_2_object(); + const Arr_parameter_space ps_x = ps_in_x(p); + auto ps_in_y = m_self.parameter_space_in_y_2_object(); + const Arr_parameter_space ps_y = ps_in_y(p); + if (ps_y == ARR_INTERIOR) { + if (ps_x == ARR_INTERIOR) return cmp_y_at_x(p, xcv); + + return compare_y_at_x(p, xcv, xtag, Arr_all_sides_oblivious_tag()); + } + + if (ps_x == ARR_INTERIOR) + return compare_y_at_x(p, xcv, Arr_all_sides_oblivious_tag(), ytag); + + // The point p coincides with a corner. + // The top left is identified with the bottom left. Therefore, if the + // curve min end is on the horizontal identified boundary, it must be + // equal to p, as it must also be in the x-range of p. + if (ps_x == ARR_LEFT_BOUNDARY) { + if (ps_in_y(xcv, ARR_MIN_END) != ARR_INTERIOR) return EQUAL; + } + + // The top right is identified with the bottom right. Therefore, if the + // curve min end is on the horizontal identified boundary, it must be + // equal to p, as it must also be in the x-range of p. + if (ps_x == ARR_RIGHT_BOUNDARY) { + if (ps_in_y(xcv, ARR_MAX_END) != ARR_INTERIOR) return EQUAL; + } + + return SMALLER; + } + + /*! 7. Implementation of the operator in case the left and right sides do + * not have boundary condition, and the bottom and top sides do have (but + * they are not identified). + */ + Comparison_result compare_y_at_x(const Point_2& p, + const X_monotone_curve_2& xcv, + Arr_all_sides_oblivious_tag, + Arr_boundary_cond_tag) const { + const Base& base = m_self; + auto cmp_y_at_x = base.compare_y_at_x_2_object(); + + auto ps_in_y = m_self.parameter_space_in_y_2_object(); + const Arr_parameter_space ps_y = ps_in_y(p); + if (ps_y == ARR_INTERIOR) return cmp_y_at_x(p, xcv); + + auto cmp_x = m_self.compare_x_2_object(); + auto ctr_min = m_self.construct_min_vertex_2_object(); + auto res_min = cmp_x(p, ctr_min(xcv)); + if (res_min == EQUAL) { + if (ps_in_y(xcv, ARR_MIN_END) == ps_y) return EQUAL; + return (ps_y == ARR_BOTTOM_BOUNDARY) ? SMALLER : LARGER; + } + + auto ctr_max = m_self.construct_max_vertex_2_object(); + auto res_max = cmp_x(p, ctr_max(xcv)); + if (res_max == EQUAL) { + if (ps_in_y(xcv, ARR_MAX_END) == ps_y) return EQUAL; + return (ps_y == ARR_BOTTOM_BOUNDARY) ? SMALLER : LARGER; + } + + // The endpoints of xcv do not coincide with p. + if ((ps_in_y(xcv, ARR_MIN_END) != ps_y) || + (ps_in_y(xcv, ARR_MAX_END) != ps_y)) + return (ps_y == ARR_BOTTOM_BOUNDARY) ? SMALLER : LARGER; + + // The endpoints of xcv lie on the same boundary as p. + // There is no way to determine whether xcv completely resides on the same + // boundary of p. Lacking a better choice, we call the base operator. + CGAL_assertion(ps_y == ARR_TOP_BOUNDARY); + return cmp_y_at_x(p, xcv); + } + + /*! 8. Implementation of the operator in case the left and right sides are + * identified, and the bottom and top sides have boundary conditions (but + * they are not identied). + */ + Comparison_result compare_y_at_x(const Point_2& p, + const X_monotone_curve_2& xcv, + Arr_has_identified_side_tag xtag, + Arr_boundary_cond_tag ytag) const { + const Base& base = m_self; + auto cmp_y_at_x = base.compare_y_at_x_2_object(); + + auto ps_in_x = m_self.parameter_space_in_y_2_object(); + const Arr_parameter_space ps_x = ps_in_x(p); + auto ps_in_y = m_self.parameter_space_in_y_2_object(); + const Arr_parameter_space ps_y = ps_in_y(p); + if (ps_y == ARR_INTERIOR) { + if (ps_x == ARR_INTERIOR) return cmp_y_at_x(p, xcv); + + return compare_y_at_x(p, xcv, xtag, Arr_all_sides_oblivious_tag()); + } + + if (ps_x == ARR_INTERIOR) + return compare_y_at_x(p, xcv, Arr_all_sides_oblivious_tag(), ytag); + + // The point p coincides with a corner. + if (ps_in_y(xcv, ARR_MIN_END) == ps_y) return EQUAL; + if (ps_in_y(xcv, ARR_MAX_END) == ps_y) return EQUAL; + return (ps_y == ARR_BOTTOM_BOUNDARY) ? SMALLER : LARGER; + } + + /*! 9. Implementation of the operator in case the left and right sides have + * boundary conditions, but they are not identified, and the bottom and + * top sides also have boundary conditions, but they are not identified. + */ + Comparison_result compare_y_at_x(const Point_2& p, + const X_monotone_curve_2& xcv, + Arr_boundary_cond_tag xtag, + Arr_boundary_cond_tag ytag) const { + const Base& base = m_self; + auto cmp_y_at_x = base.compare_y_at_x_2_object(); + + auto ps_in_x = m_self.parameter_space_in_y_2_object(); + const Arr_parameter_space ps_x = ps_in_x(p); + auto ps_in_y = m_self.parameter_space_in_y_2_object(); + const Arr_parameter_space ps_y = ps_in_y(p); + if (ps_y == ARR_INTERIOR) { + if (ps_x == ARR_INTERIOR) return cmp_y_at_x(p, xcv); + + return compare_y_at_x(p, xcv, xtag, Arr_all_sides_oblivious_tag()); + } + + if (ps_x == ARR_INTERIOR) + return compare_y_at_x(p, xcv, Arr_all_sides_oblivious_tag(), ytag); + + // The point p coincides with a corner. + if (ps_in_y(xcv, ARR_MIN_END) == ps_y) return EQUAL; + if (ps_in_y(xcv, ARR_MAX_END) == ps_y) return EQUAL; + return (ps_y == ARR_BOTTOM_BOUNDARY) ? SMALLER : LARGER; + } + }; + + /*! Obtain an Compare_y_at_x_2 function object. */ + Compare_y_at_x_2 compare_y_at_x_2_object() const + { return Compare_y_at_x_2(*this); } + /*! A functor that compares the y-coordinates of two x-monotone curves * immediately to the left of their intersection point. */ @@ -311,7 +643,7 @@ class Arr_traits_basic_adaptor_2 : public ArrangementBasicTraits_ { Tag_false) const { typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_result; std::list intersections; m_self->intersect_2_object()(xcv1, xcv2, back_inserter(intersections)); @@ -324,7 +656,7 @@ class Arr_traits_basic_adaptor_2 : public ArrangementBasicTraits_ { //@} - /// \name Overriden functors for boundaries. + /// \name Overridden functors for boundaries. //@{ // left-right @@ -1474,7 +1806,6 @@ class Arr_traits_basic_adaptor_2 : public ArrangementBasicTraits_ { /// \name Additional auxiliary functors. //@{ class Is_in_x_range_2 { - public: public: /*! Check whether a given point is in the x-range of the given x-monotone * curve. @@ -1529,7 +1860,7 @@ class Arr_traits_basic_adaptor_2 : public ArrangementBasicTraits_ { auto compare_x = m_self->compare_x_2_object(); auto min_res = compare_x(p, m_self->construct_min_vertex_2_object()(xcv)); if (min_res == SMALLER) return false; // p is to the left of the x-range - else if (min_res == EQUAL) return true; // p coinsides with the left end + else if (min_res == EQUAL) return true; // p coincides with the left end auto max_res = compare_x(p, m_self->construct_max_vertex_2_object()(xcv)); return (max_res != LARGER); @@ -1841,9 +2172,8 @@ class Arr_traits_basic_adaptor_2 : public ArrangementBasicTraits_ { Comparison_result operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2) const { - CGAL_precondition_code( - Is_in_x_range_2 is_in_x_range = m_self->is_in_x_range_2_object(); - ); + CGAL_precondition_code + (Is_in_x_range_2 is_in_x_range = m_self->is_in_x_range_2_object()); CGAL_precondition(is_in_x_range(xcv1, xcv2)); /* The traits class which the basic traits adaptor accepts as a template @@ -1857,22 +2187,19 @@ class Arr_traits_basic_adaptor_2 : public ArrangementBasicTraits_ { * gain in checking the precondition, and it is left unimplemented. */ - Parameter_space_in_x_2 ps_x = m_self->parameter_space_in_x_2_object(); - Parameter_space_in_y_2 ps_y = m_self->parameter_space_in_y_2_object(); - Compare_y_at_x_2 compare_y_at_x = m_self->compare_y_at_x_2_object(); - Construct_min_vertex_2 min_vertex = - m_self->construct_min_vertex_2_object(); - Compare_x_point_curve_end_2 - compare_x_point_curve_end = m_self->compare_x_point_curve_end_2_object(); - Compare_x_curve_ends_2 - compare_x_curve_ends = m_self->compare_x_curve_ends_2_object(); - Compare_y_near_boundary_2 - compare_y_near_bnd = m_self->compare_y_near_boundary_2_object(); + auto ps_x = m_self->parameter_space_in_x_2_object(); + auto ps_y = m_self->parameter_space_in_y_2_object(); + auto compare_y_at_x = m_self->compare_y_at_x_2_object(); + auto min_vertex = m_self->construct_min_vertex_2_object(); + auto compare_x_point_curve_end = + m_self->compare_x_point_curve_end_2_object(); + auto compare_x_curve_ends = m_self->compare_x_curve_ends_2_object(); + auto compare_y_near_bnd = m_self->compare_y_near_boundary_2_object(); // First check whether any of the curves is defined at x boundary. const Arr_parameter_space ps_x1 = ps_x(xcv1, ARR_MIN_END); const Arr_parameter_space ps_x2 = ps_x(xcv2, ARR_MIN_END); - Comparison_result res; + Comparison_result res; CGAL_assertion((ps_x1 != ARR_RIGHT_BOUNDARY) && (ps_x2 != ARR_RIGHT_BOUNDARY)); @@ -1921,7 +2248,7 @@ class Arr_traits_basic_adaptor_2 : public ArrangementBasicTraits_ { if (ps_y1 != ARR_INTERIOR) { if (ps_y2 != ARR_INTERIOR) { - // The curve ends have special boundary with oposite signs in y, + // The curve ends have special boundary with opposite signs in y, // we readily know their relative position (recall that they do not // instersect). if ((ps_y1 == ARR_BOTTOM_BOUNDARY) && (ps_y2 == ARR_TOP_BOUNDARY)) @@ -2816,7 +3143,7 @@ class Arr_traits_basic_adaptor_2 : public ArrangementBasicTraits_ { auto cmp_x_on_bd = m_self->compare_x_on_boundary_2_object(); auto cmp_y_near_bd = m_self->compare_y_near_boundary_2_object(); - auto psy = ps_in_y(cv, ARR_MIN_END); + auto psy = ps_in_y(cv, ARR_MAX_END); CGAL_assertion(psy != ARR_BOTTOM_BOUNDARY); auto on_y_idnt = is_on_y_identification(cv); @@ -3033,17 +3360,17 @@ class Arr_traits_adaptor_2 : typedef typename Base_traits_2::Split_2 Split_2; typedef typename Base_traits_2::Intersect_2 Intersect_2; - /// \name Overriden functors. + /// \name Overridden functors. //@{ /*! A functor that compares two points or two x-monotone curves - * lexigoraphically. Twp points are compared firest by their x-coordinates, + * lexigoraphically. Two points are compared first by their x-coordinates, * then by their y-coordinates. Two curves are compared first their left-most * endpoint, then by the graphs, and finally by their right-most endpoint. */ class Compare_xy_2 { typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_result; public: @@ -3060,7 +3387,7 @@ class Arr_traits_adaptor_2 : */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { - Base base(m_self); + const Base& base = m_self; return base.compare_xy_2_object()(p1, p2); } @@ -3253,7 +3580,7 @@ class Arr_traits_adaptor_2 : // Verify the first intersection is an overlap, remove it, and // recursively call. const X_monotone_curve_2* xcv = - boost::get(&(intersections.front())); + std::get_if(&(intersections.front())); if (! xcv) { CGAL_error_msg("The first intersection is not an overlap!"); return SMALLER; diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h index 5a5fa60e..d8fd8ebc 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h $ -// $Id: Arr_traits_adaptor_2_dispatching.h 2a3fbc0 2019-11-19T09:47:44+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h $ +// $Id: include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,6 @@ #include -#include #include #include #include @@ -59,25 +58,22 @@ struct Or_traits { private: - typedef boost::mpl::bool_< true > true_; - typedef boost::mpl::bool_< false > false_; + typedef std::conditional_t< + std::is_same_v< Arr_smaller_implementation_tag, Arr_use_traits_tag >, + std::true_type, std::false_type > Smaller_traits; - typedef boost::mpl::if_< - boost::is_same< Arr_smaller_implementation_tag, Arr_use_traits_tag >, - true_, false_ > Smaller_traits; - - typedef boost::mpl::if_< - boost::is_same< Arr_larger_implementation_tag, Arr_use_traits_tag >, - true_, false_ > Larger_traits; + typedef std::conditional_t< + std::is_same_v< Arr_larger_implementation_tag, Arr_use_traits_tag >, + std::true_type, std::false_type > Larger_traits; public: //! the result type (if one side asks for traits, then ask traits! //! Or vice versa: If both ask for dummy, then dummy!) - typedef typename boost::mpl::if_< - boost::mpl::or_< Smaller_traits, Larger_traits >, + typedef std::conditional_t< + Smaller_traits::value || Larger_traits::value, Arr_use_traits_tag, - Arr_use_dummy_tag >::type type; + Arr_use_dummy_tag > type; }; @@ -258,7 +254,7 @@ namespace Is_on_y_identification_2 { namespace Compare_y_on_boundary_2 { - // Poitns + // Points template < class ArrSideTag > struct Points { typedef Arr_use_dummy_tag type; diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_with_history_accessor.h b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_with_history_accessor.h index ad1c9e6e..3c28b1a2 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_with_history_accessor.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arr_with_history_accessor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_with_history_accessor.h $ -// $Id: Arr_with_history_accessor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_with_history_accessor.h $ +// $Id: include/CGAL/Arrangement_2/Arr_with_history_accessor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -25,7 +25,7 @@ namespace CGAL { /*! \class * A class that provides access to some of the internal methods of the * Arrangement_on_surface_with_history_2 class. - * Used mostly by the global functions that operate on arrangments with + * Used mostly by the global functions that operate on arrangements with * history objects. */ template diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_2_iterators.h b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_2_iterators.h index 7a031cbb..1ff94f56 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_2_iterators.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_2_iterators.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_2_iterators.h $ -// $Id: Arrangement_2_iterators.h 3448035 2021-03-24T08:25:29+01:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_2_iterators.h $ +// $Id: include/CGAL/Arrangement_2/Arrangement_2_iterators.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h index 671f5f8c..f7f974fa 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h $ -// $Id: Arrangement_on_surface_2_global.h 6b64dc8 2020-11-11T09:38:55+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h $ +// $Id: include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,8 +23,6 @@ #include #include -#include -#include #include #include @@ -61,19 +59,19 @@ namespace Ss2 = Surface_sweep_2; // The last parameter is used to resolve ambiguity between this function and // do_intersect of X_monotone_curve_2 in case that X_monotone_curve_2 and // Curve_2 are the same class. -// The last parameter should be boost::false_type but we used a +// The last parameter should be std::false_type but we used a // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to `do_intersect(Arrangement_2<>&, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, -// mpl_::bool_< true>)' +// std::bool_constant< true>)' // template void insert(Arrangement_on_surface_2& arr, const typename GeometryTraits_2::Curve_2& c, const PointLocation& pl, ZoneVisitor &visitor, - boost::is_same::type) + std::is_same::type) { typedef GeometryTraits_2 Gt2; typedef TopologyTraits Tt; @@ -83,7 +81,7 @@ void insert(Arrangement_on_surface_2& arr, typedef typename Gt2::Point_2 Point_2; typedef typename Gt2::X_monotone_curve_2 X_monotone_curve_2; - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; // Obtain an arrangement accessor. Arr_accessor arr_access(arr); @@ -100,7 +98,7 @@ void insert(Arrangement_on_surface_2& arr, // Insert each x-monotone curve into the arrangement. for (const auto& x_obj : x_objects) { // Act according to the type of the current object. - const auto* x_curve = boost::get(&x_obj); + const auto* x_curve = std::get_if(&x_obj); if (x_curve != nullptr) { // Inserting an x-monotone curve: // Initialize the zone-computation object with the given curve. @@ -118,7 +116,7 @@ void insert(Arrangement_on_surface_2& arr, arr_access.notify_after_global_change(); continue; } - const auto* iso_p = boost::get(&x_obj); + const auto* iso_p = std::get_if(&x_obj); CGAL_assertion(iso_p != nullptr); // Inserting a point into the arrangement: @@ -132,12 +130,12 @@ void insert(Arrangement_on_surface_2& arr, // // The last parameter is used to resolve ambiguity between this function and // do_intersect of Curve_2 in case that X_monotone_curve_2 and Curve_2 are the -// same class. The last parameter should be boost::true_type but we used a +// same class. The last parameter should be std::true_type but we used a // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to `do_intersect(Arrangement_2<>&, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, -// mpl_::bool_< true>)' +// std::bool_constant< true>)' // // template & arr, const typename GeometryTraits_2::X_monotone_curve_2& c, const PointLocation& pl, ZoneVisitor &visitor, - boost::is_same::type) + std::is_same::type) { typedef GeometryTraits_2 Gt2; typedef TopologyTraits Tt; @@ -184,7 +182,7 @@ void insert(Arrangement_on_surface_2& arr, { typedef GeometryTraits_2 Gt2; typedef typename Gt2::X_monotone_curve_2 X_monotone_curve_2; - typedef typename boost::is_same::type + typedef typename std::is_same::type Is_x_monotone; insert(arr, c, pl, visitor, Is_x_monotone()); @@ -193,7 +191,7 @@ void insert(Arrangement_on_surface_2& arr, // In some compilers there is a template deduction disambiguity between this // function and the function receiving two InputIterator. // For now the solution is to add a dummy variable at the end (referring -// to point-location). Maybe the proper solution is to use boost::enable_if +// to point-location). Maybe the proper solution is to use std::enable_if // together with appropriate tag. template @@ -271,7 +269,7 @@ insert_empty(Arrangement_on_surface_2& arr, * Use the form 'A a(*b);' and not ''A a = b;' to handle the case where A has * only an implicit constructor, (which takes *b as a parameter). */ - typename boost::mpl::if_, const Cgt2&, Cgt2>::type + std::conditional_t, const Cgt2&, Cgt2> traits(*geom_traits); // Define a surface-sweep instance and perform the sweep: @@ -326,7 +324,7 @@ void insert_empty(Arrangement_on_surface_2& * Use the form 'A a(*b);' and not ''A a = b;' to handle the case where A has * only an implicit constructor, (which takes *b as a parameter). */ - typename boost::mpl::if_, const Cgt2&, Cgt2>::type + std::conditional_t, const Cgt2&, Cgt2> traits(*geom_traits); // Define a surface-sweep instance and perform the sweep. @@ -379,7 +377,7 @@ void insert_non_empty(Arrangement_on_surface_2, const Igt2&, Igt2>::type + std::conditional_t, const Igt2&, Igt2> traits(*geom_traits); // Create a set of existing as well as new curves and points. @@ -406,18 +404,18 @@ void insert_non_empty(Arrangement_on_surface_2&, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, -// mpl_::bool_< true>)' +// std::bool_constant< true>)' // template void insert(Arrangement_on_surface_2& arr, InputIterator begin, InputIterator end, - boost::is_same::type) + std::is_same::type) { typedef GeometryTraits_2 Gt2; typedef TopologyTraits Tt; @@ -460,18 +458,18 @@ void insert(Arrangement_on_surface_2& arr, // // The last parameter is used to resolve ambiguity between this function and // insert of Curve_2 in case that X_monotone_curve_2 and Curve_2 are the -// same class. The last parameter should be boost::true_type but we used a +// same class. The last parameter should be std::true_type but we used a // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to `do_intersect(Arrangement_2<>&, // const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, -// mpl_::bool_< true>)' +// std::bool_constant< true>)' // template void insert(Arrangement_on_surface_2& arr, InputIterator begin, InputIterator end, - boost::is_same::type) + std::is_same::type) { typedef GeometryTraits_2 Gt2; typedef TopologyTraits Tt; @@ -513,7 +511,7 @@ void insert(Arrangement_on_surface_2& arr, typedef typename std::iterator_traits::value_type Iterator_value_type; - typedef typename boost::is_same::type + typedef typename std::is_same::type Is_x_monotone; return insert(arr, begin, end, Is_x_monotone()); @@ -640,7 +638,7 @@ void insert_curves(Arrangement_on_surface_2& //----------------------------------------------------------------------------- // Insert an x-monotone curve into the arrangement, such that the curve // interior does not intersect with any existing edge or vertex in the -// arragement (incremental insertion). +// arrangement (incremental insertion). // template @@ -683,7 +681,7 @@ insert_non_intersecting_curve // The endpoint must not lie on an existing edge, but may coincide with // and existing vertex vh1. - CGAL_precondition_msg(boost::get(&obj1) == nullptr, + CGAL_precondition_msg(std::get_if(&obj1) == nullptr, "The curve must not intersect an existing edge."); } @@ -691,7 +689,7 @@ insert_non_intersecting_curve // We have a left end with boundary conditions. Use the accessor to locate // the feature that contains it. obj1 = arr_access.locate_curve_end(c, ARR_MIN_END, bx1, by1); - CGAL_precondition_msg(boost::get(&obj1) == nullptr, + CGAL_precondition_msg(std::get_if(&obj1) == nullptr, "The curve must not overlap an existing edge."); } vh1 = Pl_result::template assign(&obj1); @@ -710,7 +708,7 @@ insert_non_intersecting_curve // The endpoint must not lie on an existing edge, but may coincide with // and existing vertex vh2. - CGAL_precondition_msg(boost::get(&obj2) == nullptr, + CGAL_precondition_msg(std::get_if(&obj2) == nullptr, "The curve must not intersect an existing edge."); } else { @@ -721,7 +719,7 @@ insert_non_intersecting_curve // << ", by2: " << by2 // << std::endl; obj2 = arr_access.locate_curve_end(c, ARR_MAX_END, bx2, by2); - CGAL_precondition_msg(boost::get(&obj2) == nullptr, + CGAL_precondition_msg(std::get_if(&obj2) == nullptr, "The curve must not overlap an existing edge."); } vh2 = Pl_result::template assign(&obj2); @@ -737,7 +735,7 @@ insert_non_intersecting_curve if (vh1 != nullptr) { if (vh2 != nullptr) { - // Both endpoints are associated with a existing vertices. + // Both endpoints are associated with existing vertices. // In this case insert_at_vertices() already returns a halfedge // directed from left to right. new_he = arr.insert_at_vertices(c, @@ -766,8 +764,8 @@ insert_non_intersecting_curve // we must insert the curve in the interior of a face. // In this case insert_in_face_interior() already returns a halfedge // directed from left to right. - const Face_const_handle* fh1 = boost::get(&obj1); - const Face_const_handle* fh2 = boost::get(&obj2); + const Face_const_handle* fh1 = std::get_if(&obj1); + const Face_const_handle* fh2 = std::get_if(&obj2); // std::cout << arr << std::endl; // std::cout << "(*fh1)->number_of_outer_ccbs(): " @@ -796,7 +794,7 @@ insert_non_intersecting_curve //----------------------------------------------------------------------------- // Insert an x-monotone curve into the arrangement, such that the curve // interior does not intersect with any existing edge or vertex in the -// arragement (incremental insertion). +// arrangement (incremental insertion). // Overloaded version with no point location object. // template @@ -979,7 +977,7 @@ non_intersecting_insert_non_empty(Arrangement_on_surface_2, const Igt2&, Igt2>::type + std::conditional_t, const Igt2&, Igt2> traits(*geom_traits); // Create a set of existing as well as new curves and points. @@ -1003,7 +1001,7 @@ non_intersecting_insert_non_empty(Arrangement_on_surface_2 @@ -1144,14 +1142,14 @@ insert_point(Arrangement_on_surface_2& arr, arr_access.notify_before_global_change(); - const Face_const_handle* fh = boost::get(&obj); + const Face_const_handle* fh = std::get_if(&obj); if (fh != nullptr) { // p lies inside a face: Insert it as an isolated vertex it the interior of // this face. vh_for_p = arr.insert_in_face_interior(p, arr.non_const_handle(*fh)); } else { - const Halfedge_const_handle* hh = boost::get(&obj); + const Halfedge_const_handle* hh = std::get_if(&obj); if (hh != nullptr) { // p lies in the interior of an edge: Split this edge to create a new // vertex associated with p. @@ -1167,7 +1165,7 @@ insert_point(Arrangement_on_surface_2& arr, } else { // p lies on an existing vertex, so we just update this vertex. - const Vertex_const_handle* vh = boost::get(&obj); + const Vertex_const_handle* vh = std::get_if(&obj); CGAL_assertion(vh != nullptr); vh_for_p = arr.modify_vertex (arr.non_const_handle (*vh), p); } @@ -1381,14 +1379,14 @@ is_valid(const Arrangement_on_surface_2& arr) auto obj = def_pl.ray_shoot_down(curr_v->point()); // if (CGAL::assign(he_below, obj)) { - if (auto* he_below_p = boost::get(&obj)) { + if (auto* he_below_p = std::get_if(&obj)) { // Hit an edge; take the incident face of the halfedge directed to the // right. auto he_below = *he_below_p; in_face = (he_below->direction() == ARR_RIGHT_TO_LEFT) ? he_below->twin()->face() : he_below->face(); } - else if (auto* v_below_p = boost::get(&obj)) { + else if (auto* v_below_p = std::get_if(&obj)) { auto v_below = *v_below_p; // Hit a vertex. if (v_below->is_isolated()) in_face = v_below->face(); @@ -1446,7 +1444,7 @@ is_valid(const Arrangement_on_surface_2& arr) } } else { - auto* in_face_p = boost::get(&obj); + auto* in_face_p = std::get_if(&obj); CGAL_assertion(in_face_p); in_face = *in_face_p; // Hit nothing (an unbounded face is returned). @@ -1466,7 +1464,7 @@ is_valid(const Arrangement_on_surface_2& arr) //----------------------------------------------------------------------------- // Compute the zone of the given x-monotone curve in the existing arrangement. -// Meaning, it output the arrangment's vertices, edges and faces that the +// Meaning, it output the arrangement's vertices, edges and faces that the // x-monotone curve intersects. template @@ -1522,18 +1520,18 @@ zone(Arrangement_on_surface_2& arr, // Checks whether the given x-monotone curve intersects the existing arrangement. // The last parameter is used to resolve ambiguity between this function and // do_intersect of Curve_2 in case that X_monotone_curve_2 and Curve_2 are the -// same class. The last parameter should be boost::true_type but we used a +// same class. The last parameter should be std::true_type but we used a // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to `do_intersect(Arrangement_on_surface_2<>&, -// const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, mpl_::bool_< true>)' +// const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, std::bool_constant< true>)' // template bool do_intersect(Arrangement_on_surface_2& arr, const typename GeometryTraits_2::X_monotone_curve_2& c, - const PointLocation& pl, boost::is_same::type) + const PointLocation& pl, std::is_same::type) { typedef GeometryTraits_2 Gt2; typedef TopologyTraits Tt; @@ -1559,19 +1557,19 @@ do_intersect(Arrangement_on_surface_2& arr, // The last parameter is used to resolve ambiguity between this function and // do_intersect of X_monotone_curve_2 in case that X_monotone_curve_2 and // Curve_2 are the same class. -// The last parameter should be boost::false_type but we used a +// The last parameter should be std::false_type but we used a // workaround since it didn't compile in FC3_g++-3.4.4 with the error of: // // error: no matching function for call to // `do_intersect(Arrangement_on_surface_2<>&, -// const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, mpl_::bool_< true>)' +// const Arr_segment_2&, const Arr_walk_along_line_point_location<>&, std::bool_constant< true>)' // template bool do_intersect(Arrangement_on_surface_2& arr, const typename GeometryTraits_2::X_monotone_curve_2& c, - const PointLocation& pl, boost::is_same::type) + const PointLocation& pl, std::is_same::type) { typedef GeometryTraits_2 Gt2; typedef TopologyTraits Tt; @@ -1584,7 +1582,7 @@ do_intersect(Arrangement_on_surface_2& arr, typedef typename Gt2::Point_2 Point_2; typedef typename Gt2::X_monotone_curve_2 X_monotone_curve_2; - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; typedef typename Arr::Face_const_handle Face_const_handle; const Traits_adaptor_2* traits = @@ -1596,20 +1594,20 @@ do_intersect(Arrangement_on_surface_2& arr, // Insert each x-monotone curve into the arrangement. for (const auto& x_obj : x_objects) { // Act according to the type of the current object. - const X_monotone_curve_2* x_curve = boost::get(&x_obj); + const X_monotone_curve_2* x_curve = std::get_if(&x_obj); if (x_curve != nullptr) { // Check if the x-monotone subcurve intersects the arrangement. if (do_intersect(arr, *x_curve, pl) == true) return true; continue; } - const Point_2* iso_p = boost::get(&x_obj); + const Point_2* iso_p = std::get_if(&x_obj); CGAL_assertion(iso_p != nullptr); // Check whether the isolated point lies inside a face (otherwise, - // it conincides with a vertex or an edge). + // it coincides with a vertex or an edge). auto obj = pl.locate(*iso_p); - if (boost::get(&x_obj) != nullptr) return true; + if (std::get_if(&x_obj) != nullptr) return true; } // If we reached here, the curve does not intersect the arrangement. @@ -1628,7 +1626,7 @@ do_intersect(Arrangement_on_surface_2& arr, typedef typename Gt2::X_monotone_curve_2 X_monotone_curve_2; - typedef typename boost::is_same::type + typedef typename std::is_same::type Is_x_monotone; return do_intersect(arr, c, pl, Is_x_monotone()); diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h index 8f05f3bb..2cbe2f96 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h $ -// $Id: Arrangement_on_surface_2_impl.h 30da4eb 2021-03-22T13:35:23+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h $ +// $Id: include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -31,7 +31,7 @@ * class-template. */ -#include +#include #include #include @@ -248,7 +248,7 @@ Arrangement_on_surface_2::~Arrangement_on_surface_2() template void Arrangement_on_surface_2::clear() { - // Notify the observers that we are about to clear the arragement. + // Notify the observers that we are about to clear the arrangement. _notify_before_clear(); // Free all stored points. @@ -265,7 +265,7 @@ void Arrangement_on_surface_2::clear() _dcel().delete_all(); m_topol_traits.init_dcel(); - // Notify the observers that we have just cleared the arragement. + // Notify the observers that we have just cleared the arrangement. _notify_after_clear(); } @@ -399,7 +399,7 @@ insert_in_face_interior(const X_monotone_curve_2& cv, Face_handle f) new_he = _insert_at_vertices(fict_prev1, cv, ARR_LEFT_TO_RIGHT, fict_prev2->next(), new_face_created, check_swapped_predecessors); - // Comment EBEB 2012-10-21: Swapping does not take place as there is no local minumum so far + // Comment EBEB 2012-10-21: Swapping does not take place as there is no local minimum so far CGAL_assertion(!check_swapped_predecessors); // usually one would expect to have an new_he (and its twin) lying on the // same _inner_ CCB ... @@ -1487,7 +1487,7 @@ remove_isolated_vertex(Vertex_handle v) DFace* p_f = iv->face(); Face_handle f = Face_handle(p_f); - // Notify the observers that we are abount to remove a vertex. + // Notify the observers that we are about to remove a vertex. _notify_before_remove_vertex(v); // Remove the isolated vertex from the face that contains it. @@ -2207,7 +2207,7 @@ _place_and_set_point(DFace* f, const Point_2& p, Halfedge_handle((*p_pred)->next())); } else if (obj.is_empty()) { - // Create a new vertex that reprsents the given point. + // Create a new vertex that represents the given point. v = _create_boundary_vertex(p, ps_x, ps_y); // Notify the topology traits on the creation of the boundary vertex. @@ -2240,7 +2240,7 @@ _place_and_set_curve_end(DFace* f, // Act according to the result type. if (! obj) { - // We have to create a new vertex that reprsents the given curve end. + // We have to create a new vertex that represents the given curve end. DVertex* v = _create_boundary_vertex(cv, ind, ps_x, ps_y); // Notify the topology traits on the creation of the boundary vertex. @@ -2253,7 +2253,7 @@ _place_and_set_curve_end(DFace* f, return v; } - DHalfedge** fict_he_p = boost::get(&*obj); + DHalfedge** fict_he_p = std::get_if(&*obj); if (fict_he_p != nullptr) { DHalfedge* fict_he = *fict_he_p; CGAL_assertion(fict_he != nullptr); @@ -2273,7 +2273,7 @@ _place_and_set_curve_end(DFace* f, Halfedge_handle((*p_pred)->next())); return v; } - DVertex** v_p = boost::get(&*obj); + DVertex** v_p = std::get_if(&*obj); CGAL_assertion(v_p != nullptr); DVertex* v = *v_p; CGAL_assertion(v != nullptr); @@ -2359,7 +2359,7 @@ _insert_in_face_interior(DFace* f, // Insert an x-monotone curve into the arrangement, such that one of its // endpoints corresponds to a given arrangement vertex, given the exact // place for the curve in the circular list around this vertex. The other -// endpoint corrsponds to a free vertex (a newly created vertex or an +// endpoint corresponds to a free vertex (a newly created vertex or an // isolated vertex). // template @@ -2915,7 +2915,7 @@ _insert_at_vertices(DHalfedge* he_to, } else if ((ic1 == ic2) && (oc1 == oc2)) { // In this case we created a pair of halfedge that connect halfedges that - // already belong to the same component. This means we have to cretae a + // already belong to the same component. This means we have to create a // new face by splitting the existing face f. // Notify the observers that we are about to split a face. Face_handle fh(f); @@ -3092,7 +3092,7 @@ _insert_at_vertices(DHalfedge* he_to, // In this case, he1 lies on an outer CCB of f. he1->set_outer_ccb(oc1); - // As the outer component of the exisitng face f may associated with + // As the outer component of the existing face f may associated with // one of the halfedges along the boundary of the new face, we set it // to be he1. oc1->set_halfedge(he1); @@ -3111,7 +3111,7 @@ _insert_at_vertices(DHalfedge* he_to, else { // Use the topology traits to determine whether each of the split // faces is unbounded. Note that if the new face is bounded, then f - // obviously reamins unbounded and there is no need for further checks. + // obviously remains unbounded and there is no need for further checks. new_f->set_unbounded(m_topol_traits.is_unbounded(new_f)); if (new_f->is_unbounded()) @@ -3531,7 +3531,7 @@ _compute_indices(Arr_parameter_space ps_x_curr, Arr_parameter_space ps_y_curr, // newly inserted curve. // // Precondition The OutputIterator must be a back inserter. -// Precondition The traveresed ccb is an inner ccb; thus, it cannot be +// Precondition The traversed ccb is an inner ccb; thus, it cannot be // on an open boundary. // Postcondition If nullptr is a local minimum, it is inserted first. // No other local minima can be nullptr. @@ -4709,7 +4709,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target) // RWRW: NEW! CGAL_assertion((oc1 != nullptr) && (oc2 != nullptr)); - // In case both halfegdes he1 and he2 are incident to the same face + // In case both halfedges he1 and he2 are incident to the same face // but lie on different outer CCBs of this face, removing this pair of // halfedge causes the two components two merge and to become an // inner CCB in the face. @@ -5114,7 +5114,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target) _move_all_isolated_vertices(f2, f1); // move all iso vertices from f2 to f1 // Notice that f2 will be merged with f1, but its boundary will still be - // a hole inside this face. In case he1 is a represantative of this hole, + // a hole inside this face. In case he1 is a representative of this hole, // replace it by its predecessor. if (ic1->halfedge() == he1) ic1->set_halfedge(prev1); diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h index 8367bb46..85ebd085 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h $ -// $Id: Arrangement_zone_2_impl.h 8d95fb8 2021-08-11T18:37:30+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h $ +// $Id: include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -28,8 +28,7 @@ namespace CGAL { // template void Arrangement_zone_2:: -init_with_hint(const X_monotone_curve_2& cv, Pl_result_type obj) -{ +init_with_hint(const X_monotone_curve_2& cv, Pl_result_type obj) { #if defined(ARR_ZONE_VERBOSE) std::cout << "init_with_hint()" << std::endl; #endif @@ -76,12 +75,11 @@ init_with_hint(const X_monotone_curve_2& cv, Pl_result_type obj) } //----------------------------------------------------------------------------- -// Compute the zone of the given curve and issue the apporpriate +// Compute the zone of the given curve and issue the appropriate // notifications for the visitor. // template -void Arrangement_zone_2::compute_zone() -{ +void Arrangement_zone_2::compute_zone() { #if defined(ARR_ZONE_VERBOSE) std::cout << "compute_zone()" << std::endl; #endif @@ -103,7 +101,7 @@ void Arrangement_zone_2::compute_zone() const Vertex_const_handle* vh; const Halfedge_const_handle* hh; - if ((vh = boost::get(&m_obj)) != nullptr) { + if ((vh = std::get_if(&m_obj)) != nullptr) { CGAL_assertion(m_has_left_pt); // The left endpoint coincides with an existing vertex: @@ -125,7 +123,7 @@ void Arrangement_zone_2::compute_zone() #endif } - else if ((hh = boost::get(&m_obj)) != nullptr) { + else if ((hh = std::get_if(&m_obj)) != nullptr) { if (m_has_left_pt) { // Obtain the right halfedge from the halfedge-pair containing m_left_pt // in their interior. @@ -137,9 +135,9 @@ void Arrangement_zone_2::compute_zone() if (m_found_overlap) { // In this case m_cv overlaps the curve associated with m_intersect_he. // Compute the overlapping subcurve. - bool dummy; + Arr_parameter_space dummy; auto obj = _compute_next_intersection(m_intersect_he, false, dummy); - m_overlap_cv = boost::get(*obj); + m_overlap_cv = std::get(*obj); // Remove the overlap from the map. _remove_next_intersection(m_intersect_he); @@ -153,9 +151,9 @@ void Arrangement_zone_2::compute_zone() // overlaps the curve associated with this edge. m_intersect_he = m_arr.non_const_handle(*hh); - bool dummy; + Arr_parameter_space dummy; auto obj = _compute_next_intersection(m_intersect_he, false, dummy); - m_overlap_cv = boost::get(*obj); + m_overlap_cv = std::get(*obj); // Remove the overlap from the map. _remove_next_intersection(m_intersect_he); @@ -166,7 +164,7 @@ void Arrangement_zone_2::compute_zone() } else { // The left endpoint lies inside a face. - const Face_const_handle* fh = boost::get(&m_obj); + const Face_const_handle* fh = std::get_if(&m_obj); CGAL_assertion_msg(fh != nullptr, "Invalid object returned by the point-location query."); @@ -211,9 +209,9 @@ void Arrangement_zone_2::compute_zone() if (m_found_overlap) { // In this case m_cv overlaps the curve associated with m_intersect_he. // Compute the overlapping subcurve to the right of curr_v. - bool dummy; + Arr_parameter_space dummy; auto obj = _compute_next_intersection(m_intersect_he, false, dummy); - m_overlap_cv = boost::get(*obj); + m_overlap_cv = std::get(*obj); // Remove the overlap from the map. _remove_next_intersection(m_intersect_he); @@ -253,8 +251,7 @@ template bool Arrangement_zone_2:: do_overlap_impl(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, - const Point_2& p, Arr_not_all_sides_oblivious_tag) const -{ + const Point_2& p, Arr_not_all_sides_oblivious_tag) const { typename Traits_adaptor_2::Compare_y_at_x_right_2 cmp_right = m_geom_traits->compare_y_at_x_right_2_object(); @@ -289,7 +286,7 @@ do_overlap_impl(const X_monotone_curve_2& cv1, // vertical, they completely lie on the right boundary, and they overlap. if (psx1 == ARR_RIGHT_BOUNDARY) return true; - // If the curves are not vertical, we can safly call the standard function. + // If the curves are not vertical, we can safely call the standard function. // Observe that this case covers the case where (psy == ARR_TOP_BOUNDARY). if (! vertical1) return (cmp_right(cv1, cv2, p) == EQUAL); @@ -307,8 +304,7 @@ do_overlap_impl(const X_monotone_curve_2& cv1, // template bool Arrangement_zone_2:: -_find_prev_around_vertex(Vertex_handle v, Halfedge_handle& he) -{ +_find_prev_around_vertex(Vertex_handle v, Halfedge_handle& he) { #if defined(ARR_ZONE_VERBOSE) std::cout << "_find_prev_around_vertex(" << v->point() << ")" << std::endl; #endif @@ -393,8 +389,7 @@ typename Arrangement_zone_2::Halfedge_handle Arrangement_zone_2:: _direct_intersecting_edge_to_right(const X_monotone_curve_2& cv_ins, const Point_2& cv_left_pt, - Halfedge_handle query_he) -{ + Halfedge_handle query_he) { #if defined(ARR_ZONE_VERBOSE) std::cout << "_direct_intersecting_edge_to_right() " << cv_left_pt << std::endl; @@ -446,8 +441,7 @@ template typename Arrangement_zone_2::Halfedge_handle Arrangement_zone_2:: _direct_intersecting_edge_to_left(const X_monotone_curve_2& cv_ins, - Halfedge_handle query_he) -{ + Halfedge_handle query_he) { #if defined(ARR_ZONE_VERBOSE) std::cout << "_direct_intersecting_edge_to_left()" << std::endl; #endif @@ -505,6 +499,74 @@ _direct_intersecting_edge_to_left(const X_monotone_curve_2& cv_ins, } } +//! Implementation for no boundary conditions. +template +bool Arrangement_zone_2:: +is_intersection_valid_impl(const Point_2& ip, + Arr_parameter_space& /* intersection_location */, + Arr_all_sides_oblivious_tag) const +{ return (m_geom_traits->compare_xy_2_object()(ip, m_left_pt) == LARGER); } + +//! Implementation for left and right identified boundaries. +template +bool Arrangement_zone_2:: +is_intersection_valid_impl(const Point_2& ip, + Arr_parameter_space& intersection_location, + Arr_has_identified_side_tag) const { + auto equal = m_geom_traits->equal_2_object(); + auto is_on_y_ident = m_geom_traits->is_on_y_identification_2_object(); + // Case 1: the curve lies on the y-identification + if (is_on_y_ident(m_cv)) { + if (equal(ip, m_left_pt)) return false; + // We set the location to be on the left as a convention + intersection_location = ARR_LEFT_BOUNDARY; + return true; + } + + // Case 2: The left-end lies on the left boundary + // (It cannot lie on the right boundary) + // If the intersection point is not equal to the left-end, it must lie to + // its right; thus valid. + if (m_left_on_boundary) return ! equal(ip, m_left_pt); + + // Case 3: The right-end lies on the right boundary + if (m_right_on_boundary && equal(ip, m_right_pt)) { + intersection_location = ARR_RIGHT_BOUNDARY; + return true; + } + + // We have a simple intersection point; + // make sure it lies to the right of m_left_pt. + return (m_geom_traits->compare_xy_2_object()(ip, m_left_pt) == LARGER); +} + +/*! Implementation for all the rest. + * It would be better to split into the various cases, which is the cartesian + * product of (contructed, closed, open) X (contructed, closed, open) + */ +template +bool Arrangement_zone_2:: +is_intersection_valid_impl(const Point_2& ip, + Arr_parameter_space& intersection_location, + Arr_boundary_cond_tag) const { + auto equal = m_geom_traits->equal_2_object(); + if (m_left_on_boundary) { + // The left-end lies on the left boundary. If the intersection point is not + // equal to the left-end, the intersection is valid, because it must lie to + // its right. + if (m_has_left_pt) return ! equal(ip, m_left_pt); + else return true; + } + if (m_has_right_pt && m_right_on_boundary && equal(ip, m_right_pt)) { + intersection_location = ARR_RIGHT_BOUNDARY; + return true; + } + + // We have a simple intersection point; + // make sure it lies to the right of m_left_pt. + return (m_geom_traits->compare_xy_2_object()(ip, m_left_pt) == LARGER); +} + //----------------------------------------------------------------------------- // Get the next intersection of cv with the given halfedge. // @@ -513,14 +575,12 @@ typename Arrangement_zone_2::Optional_intersection Arrangement_zone_2:: _compute_next_intersection(Halfedge_handle he, bool skip_first_point, - bool& intersection_on_right_boundary) -{ + Arr_parameter_space& intersection_location) { #if defined(ARR_ZONE_VERBOSE) std::cout << "_compute_next_intersection(" << he->curve() << ", " << skip_first_point << ")" << std::endl; #endif - auto equal = m_geom_traits->equal_2_object(); auto compare_xy = m_geom_traits->compare_xy_2_object(); auto ctr_min = m_geom_traits->construct_min_vertex_2_object(); auto is_closed = m_geom_traits->is_closed_2_object(); @@ -529,12 +589,12 @@ _compute_next_intersection(Halfedge_handle he, const X_monotone_curve_2* p_curve = &(he->curve()); // Try to locate the intersections with this curve in the intersections map. - Intersect_map_iterator iter = m_inter_map.find(p_curve); + auto iter = m_inter_map.find(p_curve); const Intersection_point* ip; const X_monotone_curve_2* icv; bool valid_intersection; - intersection_on_right_boundary = false; + intersection_location = ARR_INTERIOR; if (iter != m_inter_map.end()) { // The intersections with the curve have already been computed. // Retrieve the intersections list from the map. @@ -546,37 +606,22 @@ _compute_next_intersection(Halfedge_handle he, // (if the left point exists). while (! inter_list.empty()) { // Compare that current object with m_left_pt (if exists). - ip = boost::get(&(inter_list.front())); + ip = std::get_if(&(inter_list.front())); if (ip != nullptr) { - // We have an intersection point - if (m_left_on_boundary) { - // The left-end lies on the left boundary. If the intersection point - // is not equal to the left-end, the intersection is valid, because - // it must lie to its right. - if (m_has_left_pt) valid_intersection = ! equal(ip->first, m_left_pt); - else valid_intersection = true; - } - else if (m_has_right_pt && m_right_on_boundary && - equal(ip->first, m_right_pt)) - { - valid_intersection = true; - intersection_on_right_boundary = true; - } - else { - // We have a simple intersection point - make sure it lies to the - // right of m_left_pt. - valid_intersection = (compare_xy(ip->first, m_left_pt) == LARGER); - } + // We have an intersection point - + valid_intersection = + is_intersection_valid(ip->first, intersection_location); } else { // We have an overlapping subcurve. - icv = boost::get(&(inter_list.front())); + icv = std::get_if(&(inter_list.front())); CGAL_assertion(icv != nullptr); if (is_closed(*icv, ARR_MIN_END)) { // The curve has a valid left point - make sure it lies to the // right of m_left_pt. - valid_intersection = (compare_xy(ctr_min(*icv), m_left_pt) != SMALLER); + valid_intersection = + (compare_xy(ctr_min(*icv), m_left_pt) != SMALLER); } // In this case the overlap is not valid. else valid_intersection = false; @@ -595,7 +640,7 @@ _compute_next_intersection(Halfedge_handle he, // The intersections with the curve have not been computed yet, so we // have to compute them now. Note that the first curve we intersect is - // always the subcurve associated with the given halfegde and the second + // always the subcurve associated with the given halfedge and the second // curve is the one we insert. Even though the order seems unimportant, we // exploit this fact in some of the traits classes in order to optimize // computations. @@ -608,28 +653,13 @@ _compute_next_intersection(Halfedge_handle he, // Discard all intersection lying to the left of m_left_pt (if exists). while (! inter_list.empty()) { // Compare that current object with m_left_pt (if exists). - ip = boost::get(&(inter_list.front())); + ip = std::get_if(&(inter_list.front())); if (ip != nullptr) { // We have an intersection point - // Check whether we need to skip the first intersection - if (is_first && skip_first_point) valid_intersection = false; - else if (m_left_on_boundary) { - // The left-end lies on the left boundary. If the intersection point - // is not equal to the left-end, the intersection is valid, because - // it must lie to its right. - if (m_has_left_pt) valid_intersection = ! equal(ip->first, m_left_pt); - else valid_intersection = true; - } - else if (m_right_on_boundary && m_has_right_pt && - equal(ip->first, m_right_pt)) - { - valid_intersection = true; - intersection_on_right_boundary = true; - } - else { - valid_intersection = (compare_xy(ip->first, m_left_pt) == LARGER); - } + valid_intersection = (is_first && skip_first_point) ? false : + is_intersection_valid(ip->first, intersection_location); } else if (m_left_on_boundary) { // The left end is on the boundary, so all overlapping curves are valid, @@ -638,7 +668,7 @@ _compute_next_intersection(Halfedge_handle he, } else { // We have an overlapping subcurve. - icv = boost::get(&(inter_list.front())); + icv = std::get_if(&(inter_list.front())); CGAL_assertion(icv != nullptr); if (is_closed(*icv, ARR_MIN_END)) { @@ -671,13 +701,12 @@ _compute_next_intersection(Halfedge_handle he, // template void Arrangement_zone_2:: -_remove_next_intersection(Halfedge_handle he) -{ +_remove_next_intersection(Halfedge_handle he) { // Get a pointer to the curve associated with the halfedge. const X_monotone_curve_2* p_curve = &(he->curve()); // Locate the intersections with this curve in the intersections map. - Intersect_map_iterator iter = m_inter_map.find(p_curve); + auto iter = m_inter_map.find(p_curve); CGAL_assertion(iter != m_inter_map.end()); CGAL_assertion(! iter->second.empty()); @@ -687,13 +716,12 @@ _remove_next_intersection(Halfedge_handle he) } //----------------------------------------------------------------------------- -// Check if the given point lies completely to the left of the given egde. +// Check if the given point lies completely to the left of the given edge. // template bool Arrangement_zone_2:: _is_to_left_impl(const Point_2& p, Halfedge_handle he, - Arr_not_all_sides_oblivious_tag) const -{ + Arr_not_all_sides_oblivious_tag) const { #if defined(ARR_ZONE_VERBOSE) std::cout << "_is_to_left_impl(" << p << "," << he->curve() << ")" << std::endl; @@ -708,12 +736,12 @@ _is_to_left_impl(const Point_2& p, Halfedge_handle he, if (ps_x_min == ARR_LEFT_BOUNDARY) return false; auto ps_in_y = m_geom_traits->parameter_space_in_y_2_object(); - auto ps_y = ps_in_y(he->curve(), ARR_MIN_END); - if (ps_y != ARR_INTERIOR) { + auto ps_y_min = ps_in_y(he->curve(), ARR_MIN_END); + if (ps_y_min != ARR_INTERIOR) { // Check if p is to the left of the minimal curve-end: auto cmp_x = m_geom_traits->compare_x_point_curve_end_2_object(); const auto res = cmp_x(p, he->curve(), ARR_MIN_END); - return ((res == SMALLER) || (res == EQUAL && ps_y == ARR_TOP_BOUNDARY)); + return ((res == SMALLER) || (res == EQUAL && ps_y_min == ARR_TOP_BOUNDARY)); } // In case the minimal curve-end does not have boundary conditions, simply @@ -724,13 +752,13 @@ _is_to_left_impl(const Point_2& p, Halfedge_handle he, } //----------------------------------------------------------------------------- -// Determine whether a given point lies completely to the right of a given curve. +// Determine whether a given point lies completely to the right of a given +// curve. // template bool Arrangement_zone_2:: _is_to_right_impl(const Point_2& p, Halfedge_handle he, - Arr_not_all_sides_oblivious_tag) const -{ + Arr_not_all_sides_oblivious_tag) const { #if defined(ARR_ZONE_VERBOSE) std::cout << "_is_to_right_impl(" << p << "," << he->curve() << ")" << std::endl; @@ -747,12 +775,12 @@ _is_to_right_impl(const Point_2& p, Halfedge_handle he, if (ps_x_max == ARR_LEFT_BOUNDARY) return true; auto ps_in_y = m_geom_traits->parameter_space_in_y_2_object(); - auto ps_y = ps_in_y(he->curve(), ARR_MAX_END); - if (ps_y != ARR_INTERIOR) { + auto ps_y_max = ps_in_y(he->curve(), ARR_MAX_END); + if (ps_y_max != ARR_INTERIOR) { // Check if p is to the right of the maximal curve-end: auto cmp_x = m_geom_traits->compare_x_point_curve_end_2_object(); auto res = cmp_x(p, he->curve(), ARR_MAX_END); - return ((res == LARGER) || (res == EQUAL && ps_y == ARR_BOTTOM_BOUNDARY)); + return ((res == LARGER) || (res == EQUAL && ps_y_max == ARR_BOTTOM_BOUNDARY)); } // In case the maximal curve-end does not have boundary conditions, simply @@ -768,8 +796,7 @@ _is_to_right_impl(const Point_2& p, Halfedge_handle he, template void Arrangement_zone_2:: _leftmost_intersection(Ccb_halfedge_circulator he_curr, bool on_boundary, - bool& leftmost_on_right_boundary) -{ + Arr_parameter_space& leftmost_location) { #if defined(ARR_ZONE_VERBOSE) std::cout << "_leftmost_intersection(" << he_curr->curve() << ", " << on_boundary << ")" << std::endl; @@ -793,7 +820,7 @@ _leftmost_intersection(Ccb_halfedge_circulator he_curr, bool on_boundary, // entirely to the right of m_intersect_p, its intersection with m_cv (if any) // cannot lie to the left of this point. We therefore do not need to compute // this intersection. - if (m_found_intersect && ! leftmost_on_right_boundary && + if (m_found_intersect && (leftmost_location == ARR_INTERIOR) && _is_to_left(m_intersect_p, he_curr)) return; @@ -821,26 +848,27 @@ _leftmost_intersection(Ccb_halfedge_circulator he_curr, bool on_boundary, // do not intersect. if (! left_equals_curr_endpoint && ((! m_left_on_boundary && _is_to_right(m_left_pt, he_curr)) || - ! is_in_x_range(m_cv, he_curr->curve()))) + ! is_in_x_range(m_cv, he_curr->curve()))) { return; + } // Compute the next intersection of m_cv and the current halfedge. - bool intersection_on_right_boundary; + Arr_parameter_space intersection_location; auto iobj = _compute_next_intersection(he_curr, left_equals_curr_endpoint, - intersection_on_right_boundary); + intersection_location); if (iobj) { // We have found an intersection (either a simple point or an // overlapping x-monotone curve). - const Intersection_point* int_p = boost::get(&*iobj); + const Intersection_point* int_p = std::get_if(&*iobj); if (int_p != nullptr) { Point_2 ip = int_p->first; // Found a simple intersection point. Check if it is the leftmost // intersection point so far. if (! m_found_intersect || - (! intersection_on_right_boundary && - (leftmost_on_right_boundary || + ((intersection_location != ARR_RIGHT_BOUNDARY) && + ((leftmost_location == ARR_RIGHT_BOUNDARY) || compare_xy(ip, m_intersect_p) == SMALLER))) { // Store the leftmost intersection point and the halfedge handle. @@ -848,13 +876,13 @@ _leftmost_intersection(Ccb_halfedge_circulator he_curr, bool on_boundary, m_ip_multiplicity = int_p->second; m_intersect_he = he_curr; m_found_overlap = false; - leftmost_on_right_boundary = intersection_on_right_boundary; + leftmost_location = intersection_location; } } else { // We have located an overlapping curve. Assign ip as its left // endpoint. - const X_monotone_curve_2* icv = boost::get(&*iobj); + const X_monotone_curve_2* icv = std::get_if(&*iobj); CGAL_assertion(icv != nullptr); Point_2 ip = min_vertex(*icv); @@ -880,8 +908,7 @@ _leftmost_intersection(Ccb_halfedge_circulator he_curr, bool on_boundary, // template void Arrangement_zone_2:: -_leftmost_intersection_with_face_boundary(Face_handle face, bool on_boundary) -{ +_leftmost_intersection_with_face_boundary(Face_handle face, bool on_boundary) { #if defined(ARR_ZONE_VERBOSE) std::cout << "_leftmost_intersection_with_face_boundary(" << on_boundary << ")" << std::endl; @@ -895,25 +922,23 @@ _leftmost_intersection_with_face_boundary(Face_handle face, bool on_boundary) auto compare_xy = m_geom_traits->compare_xy_2_object(); auto is_in_x_range = m_geom_traits->is_in_x_range_2_object(); - bool leftmost_on_right_boundary = false; + Arr_parameter_space leftmost_location = ARR_INTERIOR; // Traverse the face outer-boundaries; iterate through all outer CCBs. for (auto occb_it = face->outer_ccbs_begin(); - occb_it != face->outer_ccbs_end(); ++occb_it) - { + occb_it != face->outer_ccbs_end(); ++occb_it) { Ccb_halfedge_circulator he_first = *occb_it; Ccb_halfedge_circulator he_curr = he_first; - do _leftmost_intersection(he_curr, on_boundary, leftmost_on_right_boundary); + do _leftmost_intersection(he_curr, on_boundary, leftmost_location); while (++he_curr != he_first); } // Traverse the face inner-boundaries; iterate through all inner CCBs (holes). for (auto iccb_it = face->inner_ccbs_begin(); - iccb_it != face->inner_ccbs_end(); ++iccb_it) - { + iccb_it != face->inner_ccbs_end(); ++iccb_it) { Ccb_halfedge_circulator he_first = *iccb_it; Ccb_halfedge_circulator he_curr = he_first; - do _leftmost_intersection(he_curr, on_boundary, leftmost_on_right_boundary); + do _leftmost_intersection(he_curr, on_boundary, leftmost_location); while (++he_curr != he_first); } @@ -921,17 +946,17 @@ _leftmost_intersection_with_face_boundary(Face_handle face, bool on_boundary) // Traverse the isolated vertices inside the face (if there exist any), and // check whether an isolated vertex lies on the curve. - typedef typename Arrangement_2::Isolated_vertex_iterator - Isolated_vertex_iterator; - for (Isolated_vertex_iterator iv_it = face->isolated_vertices_begin(); - iv_it != face->isolated_vertices_end(); ++iv_it) - { + // MSVC17 requires an explicit (non-const) type for the iterator. + typename Arrangement_2::Isolated_vertex_iterator iv_it; + for (iv_it = face->isolated_vertices_begin(); + iv_it != face->isolated_vertices_end(); ++iv_it) { // If the isolated vertex is not in the x-range of our curve, disregard it. if (! is_in_x_range(m_cv, iv_it->point())) continue; // If we already have an intersection point, compare it to the current // isolated vertex, in order to filter unnecessary computations. - if (m_found_intersect && compare_xy(iv_it->point(), m_intersect_p) == LARGER) + if (m_found_intersect && + (compare_xy(iv_it->point(), m_intersect_p) == LARGER)) continue; // In case the isolated vertex lies on the curve, update the intersection @@ -960,8 +985,7 @@ _leftmost_intersection_with_face_boundary(Face_handle face, bool on_boundary) // template bool Arrangement_zone_2:: -_zone_in_face(Face_handle face, bool on_boundary) -{ +_zone_in_face(Face_handle face, bool on_boundary) { #if defined(ARR_ZONE_VERBOSE) std::cout << "_zone_in_face(" << on_boundary << ")" << std::endl; #endif @@ -984,7 +1008,7 @@ _zone_in_face(Face_handle face, bool on_boundary) m_visitor->found_subcurve(m_cv, face, m_left_v, m_left_he, m_invalid_v, m_invalid_he); - // Inidicate that we are done with the zone-computation process. + // Indicate that we are done with the zone-computation process. return true; } @@ -1095,7 +1119,7 @@ _zone_in_face(Face_handle face, bool on_boundary) // Associate the intersection list of the original curve with the // right subcurve, while we can associate an empty list with the // left subcurve, as we are now done with it. - Intersect_map_iterator iter = m_inter_map.find(p_orig_curve); + auto iter = m_inter_map.find(p_orig_curve); Intersect_list empty_inter_list; m_inter_map[p_right_subcurve] = iter->second; @@ -1152,7 +1176,7 @@ _zone_in_face(Face_handle face, bool on_boundary) m_left_he = (m_right_he->direction() == ARR_LEFT_TO_RIGHT) ? inserted_he : m_right_he; else { - // Mutliplicity is unkown: + // Mutliplicity is unknown: m_left_he = m_invalid_he; } } @@ -1190,8 +1214,7 @@ _zone_in_face(Face_handle face, bool on_boundary) // curve currently associated with m_intersect_he. // template -bool Arrangement_zone_2::_zone_in_overlap() -{ +bool Arrangement_zone_2::_zone_in_overlap() { #if defined(ARR_ZONE_VERBOSE) std::cout << "_zone_in_overlap()" << std::endl; #endif diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_2/arrangement_type_traits.h b/thirdparty/CGAL/include/CGAL/Arrangement_2/arrangement_type_traits.h index b2276727..1208c430 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_2/arrangement_type_traits.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_2/arrangement_type_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h $ -// $Id: arrangement_type_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h $ +// $Id: include/CGAL/Arrangement_2/arrangement_type_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -13,7 +13,7 @@ /*! \file arrangement_type_traits.h - \brief The file contains meta-function related to the arrangement pakcage. + \brief The file contains meta-function related to the arrangement package. Specifically, it contains the meta-function is_arrangement_2 that determines whether a given type is an arrangement. */ @@ -24,7 +24,7 @@ #include -#include +#include namespace CGAL { @@ -62,7 +62,7 @@ namespace CGAL // In the meanwhile we use a default implementation. template -class is_arrangement_2 : public boost::false_type +class is_arrangement_2 : public std::false_type {}; //-------------------------------- Arrangement_2 @@ -74,7 +74,7 @@ class Arrangement_2; template class is_arrangement_2< Arrangement_2 -> : public boost::false_type +> : public std::false_type {}; @@ -87,7 +87,7 @@ class Arrangement_on_surface_2; template class is_arrangement_2< Arrangement_on_surface_2 -> : public boost::true_type +> : public std::true_type {}; } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_2/graph_traits_dual.h b/thirdparty/CGAL/include/CGAL/Arrangement_2/graph_traits_dual.h index d238729c..881266f2 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_2/graph_traits_dual.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_2/graph_traits_dual.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h $ -// $Id: graph_traits_dual.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h $ +// $Id: include/CGAL/Arrangement_2/graph_traits_dual.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -13,7 +13,7 @@ // Sebastien Loriot // Efi Fogel -// This file contains the follwoing three parts: +// This file contains the following three parts: // 1. The common base class template of the specialized // Dual class template. // @@ -24,8 +24,8 @@ // the various Boost Graph concepts. There is one macro per required function // template. Each macro accepts the name of a template class, an instance of // which represents an arrangement data structure, e.g., Arrangement_2. The -// definitios of the free functions templates for a given arrangement data -// strcture must be present when a dual of this data structure is defined. +// definitions of the free functions templates for a given arrangement data +// structure must be present when a dual of this data structure is defined. #include @@ -176,7 +176,7 @@ class Dual_arrangement_on_surface { _ccb_curr == it._ccb_curr))); } - /*! Derefernce the current circulator. */ + /*! Dereference the current circulator. */ Edge_handle _dereference() const { if (_out) return (_ccb_curr); @@ -314,9 +314,9 @@ namespace CGAL { /*! \class * The common base class template of the specialized * boost::graph_traits > class template. - * The latter serves as a dual adapter for the specialied arrangment, where the + * The latter serves as a dual adapter for the specialied arrangement, where the * valid arrangement faces correspond to graph verices, and two graph vertices - * are connected if the two corrsponding faces are adjacent. + * are connected if the two corresponding faces are adjacent. * We consider the graph as directed. We also allow parallel edges, as two * faces may have more than one common edges. */ diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_on_surface_2.h b/thirdparty/CGAL/include/CGAL/Arrangement_on_surface_2.h index 328f1a36..40415a67 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_on_surface_2.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_on_surface_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h $ -// $Id: Arrangement_on_surface_2.h 4ea5251 2022-06-10T16:44:17+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h $ +// $Id: include/CGAL/Arrangement_on_surface_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -77,13 +77,10 @@ class Arrangement_on_surface_2 { typedef typename Traits_adaptor_2::Top_side_category Top_side_category; typedef typename Traits_adaptor_2::Right_side_category Right_side_category; - BOOST_MPL_ASSERT( - (typename - Arr_sane_identified_tagging::result) - ); + static_assert(Arr_sane_identified_tagging::value); public: typedef Arrangement_on_surface_2 @@ -266,7 +263,7 @@ class Arrangement_on_surface_2 { }; public: - // Forward declerations: + // Forward declarations: class Vertex; class Halfedge; class Face; @@ -575,7 +572,7 @@ class Arrangement_on_surface_2 { typedef DVertex Base; public: - /*! Default constrcutor. */ + /*! Default constructor. */ Vertex() {} /*! Check whether the vertex lies on an open boundary. */ @@ -664,7 +661,7 @@ class Arrangement_on_surface_2 { typedef DHalfedge Base; public: - /*! Default constrcutor. */ + /*! Default constructor. */ Halfedge() {} /*! Check whether the halfedge is fictitious. */ @@ -711,19 +708,19 @@ class Arrangement_on_surface_2 { Halfedge_const_handle twin() const { return (DHalfedge_const_iter(Base::opposite())); } - /*! Get the previous halfegde in the chain (non-const version). */ + /*! Get the previous halfedge in the chain (non-const version). */ Halfedge_handle prev() { return (DHalfedge_iter(Base::prev())); } - /*! Get the previous halfegde in the chain (const version). */ + /*! Get the previous halfedge in the chain (const version). */ Halfedge_const_handle prev() const { return (DHalfedge_const_iter(Base::prev())); } - /*! Get the next halfegde in the chain (non-const version). */ + /*! Get the next halfedge in the chain (non-const version). */ Halfedge_handle next() { return (DHalfedge_iter(Base::next())); } - /*! Get the next halfegde in the chain (const version). */ + /*! Get the next halfedge in the chain (const version). */ Halfedge_const_handle next() const { return (DHalfedge_const_iter(Base::next())); } @@ -764,7 +761,7 @@ class Arrangement_on_surface_2 { typedef DFace Base; public: - /*! Default constrcutor. */ + /*! Default constructor. */ Face() {} /*! Obtain an iterator for the outer CCBs of the face (non-const version). */ @@ -908,8 +905,8 @@ class Arrangement_on_surface_2 { Curves_alloc m_curves_alloc; // allocator for the curves. Observers_container m_observers; // pointers to existing observers. const Traits_adaptor_2* m_geom_traits; // the geometry-traits adaptor. - bool m_own_traits; // inidicates whether the geometry - // traits should be freed up. + bool m_own_traits; // indicates whether the geometry + // traits should be freed. bool m_sweep_mode = false; // sweep mode efficiently @@ -1489,13 +1486,13 @@ class Arrangement_on_surface_2 { /*! * Split a given edge into two, and associate the given x-monotone * curves with the split edges. - * \param e The edge to split (one of the pair of twin halfegdes). + * \param e The edge to split (one of the pair of twin halfedges). * \param cv1 The curve that should be associated with the first split edge. * \param cv2 The curve that should be associated with the second split edge. * \pre cv1's source and cv2's target equal the endpoints of the curve - * currently assoicated with e (respectively), and cv1's target equals - * cv2's target, and this is the split point (ot vice versa). + * currently associated with e (respectively), and cv1's target equals + * cv2's target, and this is the split point (or vice versa). * \return A handle for the halfedge whose source is the source of the * original halfedge e, and whose target is the split point. */ @@ -1506,8 +1503,8 @@ class Arrangement_on_surface_2 { /*! * Merge two edges to form a single edge, and associate the given x-monotone * curve with the merged edge. - * \param e1 The first edge to merge (one of the pair of twin halfegdes). - * \param e2 The second edge to merge (one of the pair of twin halfegdes). + * \param e1 The first edge to merge (one of the pair of twin halfedges). + * \param e2 The second edge to merge (one of the pair of twin halfedges). * \param cv The curve that should be associated with merged edge. * \return A handle for the merged halfedge. */ @@ -1516,7 +1513,7 @@ class Arrangement_on_surface_2 { /*! * Remove an edge from the arrangement. - * \param e The edge to remove (one of the pair of twin halfegdes). + * \param e The edge to remove (one of the pair of twin halfedges). * \param remove_source Should the source vertex of e be removed if it * becomes isolated (true by default). * \param remove_target Should the target vertex of e be removed if it @@ -1566,7 +1563,7 @@ class Arrangement_on_surface_2 { /// \name Determining the boundary-side conditions. //@{ - /*! Determines whether a boundary-side categoty indicates an open side. + /*! Determines whether a boundary-side category indicates an open side. */ inline bool is_open(Arr_boundary_side_tag) const { return false; } inline bool is_open(Arr_open_side_tag) const { return true; } @@ -1587,12 +1584,12 @@ class Arrangement_on_surface_2 { } - /*! Determines whether a boundary-side categoty indicates a constracted side. + /*! Determines whether a boundary-side category indicates a constructed side. */ inline bool is_contracted(Arr_boundary_side_tag) const { return false; } inline bool is_contracted(Arr_contracted_side_tag) const { return true; } - /*! Determines whether a boundary-side categoty indicates a constracted side. + /*! Determines whether a boundary-side category indicates a constructed side. */ inline bool is_identified(Arr_boundary_side_tag) const { return false; } inline bool is_identified(Arr_identified_side_tag) const { return true; } @@ -1905,7 +1902,7 @@ class Arrangement_on_surface_2 { * \param cv The x-monotone curve we use to connect he_to's target and * he_away's source vertex. * \param cv_dir the direction of the curve between he_to and he_away - * \param he_away The succcessor halfedge. + * \param he_away The successor halfedge. * \param local_mins_it the outputiterator * (value_type = std::pair< DHalfedge*, int >, where the int denotes the * index) to report the halfedges pointing to local minima (<-shaped @@ -1971,7 +1968,7 @@ class Arrangement_on_surface_2 { * \param cv The x-monotone curve we use to connect he_to's target and * he_away's source vertex. * \param cv_dir the direction of the curve between he_to and he_away - * \param he_away The succcessor halfedge. + * \param he_away The successor halfedge. * \pre he_to and he_away belong to the same inner CCB. * \return true if he_to=>cv,cv_dir=>he_away lie in the interior of the face we * are about to create (i.e.~are part of the new outer ccb), @@ -2120,7 +2117,7 @@ class Arrangement_on_surface_2 { * Insert an x-monotone curve into the arrangement, such that one of its * endpoints corresponds to a given arrangement vertex, given the exact * place for the curve in the circular list around this vertex. The other - * endpoint corrsponds to a free vertex (a newly created vertex or an + * endpoint corresponds to a free vertex (a newly created vertex or an * isolated vertex). * \param he_to The reference halfedge. We should represent cv as a pair * of edges, one of them should become he_to's successor. @@ -2216,7 +2213,7 @@ class Arrangement_on_surface_2 { /*! * Split a given edge into two at a given point, and associate the given * x-monotone curves with the split edges. - * \param e The edge to split (one of the pair of twin halfegdes). + * \param e The edge to split (one of the pair of twin halfedges). * \param p The split point. * \param cv1 The curve that should be associated with the first split edge, * whose source equals e's source and its target is p. @@ -2232,7 +2229,7 @@ class Arrangement_on_surface_2 { /*! * Split a given edge into two at a given vertex, and associate the given * x-monotone curves with the split edges. - * \param e The edge to split (one of the pair of twin halfegdes). + * \param e The edge to split (one of the pair of twin halfedges). * \param v The split vertex. * \param cv1 The curve that should be associated with the first split edge, * whose source equals e's source and its target is v. @@ -2853,7 +2850,7 @@ class Arrangement_on_surface_2 { // In some compilers there is a template deduction disambiguity between this // function and the following function receiving two InputIterator. // For now the solution is to add a dummy variable at the end (referring -// to point-location). Maybe the proper solution is to use boost::enable_if +// to point-location). Maybe the proper solution is to use std::enable_if // together with appropriate tag. /*! * Insert a curve or x-monotone curve into the arrangement (incremental @@ -2917,7 +2914,7 @@ void insert(Arrangement_on_surface_2& arr, /*! * Insert an x-monotone curve into the arrangement, such that the curve * interior does not intersect with any existing edge or vertex in the - * arragement (incremental insertion). + * arrangement (incremental insertion). * \param arr The arrangement. * \param c The x-monotone curve to be inserted. * \param pl A point-location object associated with the arrangement. @@ -2935,7 +2932,7 @@ insert_non_intersecting_curve /*! * Insert an x-monotone curve into the arrangement, such that the curve * interior does not intersect with any existing edge or vertex in the - * arragement (incremental insertion). The default point-location strategy + * arrangement (incremental insertion). The default point-location strategy * is used for the curve insertion. * \param arr The arrangement. * \param c The x-monotone curve to be inserted. @@ -2952,7 +2949,7 @@ insert_non_intersecting_curve /*! * Insert a range of pairwise interior-disjoint x-monotone curves into * the arrangement, such that the curve interiors do not intersect with - * any existing edge or vertex in the arragement (aggregated insertion). + * any existing edge or vertex in the arrangement (aggregated insertion). * \param arr The arrangement. * \param begin An iterator for the first x-monotone curve in the range. * \param end A past-the-end iterator for the x-monotone curve range. @@ -2970,7 +2967,7 @@ void insert_non_intersecting_curves * the edges incident to the end-vertices of the removed edge after its * deletion, the function performs these merges as well. * \param arr The arrangement. - * \param e The edge to remove (one of the pair of twin halfegdes). + * \param e The edge to remove (one of the pair of twin halfedges). * \return A handle for the remaining face. */ template @@ -3029,7 +3026,7 @@ template bool is_valid(const Arrangement_on_surface_2& arr); /*! Compute the zone of the given x-monotone curve in the existing arrangement. - * Meaning, it output the arrangment's vertices, edges and faces that the + * Meaning, it output the arrangement's vertices, edges and faces that the * x-monotone curve intersects. * \param arr The arrangement. * \param c the x-monotone curve that its zone is computed. diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_on_surface_with_history_2.h b/thirdparty/CGAL/include/CGAL/Arrangement_on_surface_with_history_2.h index 4358c72e..bbb69005 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_on_surface_with_history_2.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_on_surface_with_history_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h $ -// $Id: Arrangement_on_surface_with_history_2.h ba8aec6 2021-04-21T13:24:05+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h $ +// $Id: include/CGAL/Arrangement_on_surface_with_history_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_with_history_2.h b/thirdparty/CGAL/include/CGAL/Arrangement_with_history_2.h index 87d4c26a..44c8d964 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_with_history_2.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_with_history_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h $ -// $Id: Arrangement_with_history_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h $ +// $Id: include/CGAL/Arrangement_with_history_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Arrangement_zone_2.h b/thirdparty/CGAL/include/CGAL/Arrangement_zone_2.h index 10d2b783..6e4bcf9a 100644 --- a/thirdparty/CGAL/include/CGAL/Arrangement_zone_2.h +++ b/thirdparty/CGAL/include/CGAL/Arrangement_zone_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h $ -// $Id: Arrangement_zone_2.h 6b64dc8 2020-11-11T09:38:55+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h $ +// $Id: include/CGAL/Arrangement_zone_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -20,7 +20,7 @@ /*! \file - * Defintion of the Arrangement_zone_2 class. + * Definition of the Arrangement_zone_2 class. */ #include @@ -40,7 +40,7 @@ namespace CGAL { * arrangement. * The arrangement parameter corresponds to the underlying arrangement, and * the zone-visitor parameter corresponds to a visitor class which is capable - * of receiving notifications on the arrangment features the query curve + * of receiving notifications on the arrangement features the query curve * traverses. The visitor has to support the following functions: * - init(), for initializing the visitor with a given arrangement. * - found_subcurve(), called when a non-intersecting x-monotone curve is @@ -55,66 +55,68 @@ namespace CGAL { template class Arrangement_zone_2 { public: - typedef Arrangement_ Arrangement_2; - typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2; - typedef typename Arrangement_2::Topology_traits Topology_traits; + using Arrangement_2 = Arrangement_; + using Geometry_traits_2 = typename Arrangement_2::Geometry_traits_2; + using Topology_traits = typename Arrangement_2::Topology_traits; protected: - typedef Arr_traits_adaptor_2 Traits_adaptor_2; + using Traits_adaptor_2 = Arr_traits_adaptor_2; - typedef typename Traits_adaptor_2::Left_side_category Left_side_category; - typedef typename Traits_adaptor_2::Bottom_side_category Bottom_side_category; - typedef typename Traits_adaptor_2::Top_side_category Top_side_category; - typedef typename Traits_adaptor_2::Right_side_category Right_side_category; + using Left_side_category = typename Traits_adaptor_2::Left_side_category; + using Bottom_side_category = typename Traits_adaptor_2::Bottom_side_category; + using Top_side_category = typename Traits_adaptor_2::Top_side_category; + using Right_side_category = typename Traits_adaptor_2::Right_side_category; - BOOST_MPL_ASSERT - ((typename Arr_sane_identified_tagging::result)); + static_assert(Arr_sane_identified_tagging::value); + // Categories for dispatching + using Are_all_sides_oblivious_category = + typename Arr_all_sides_oblivious_category::result; + + using Left_or_right_sides_category = + typename Arr_two_sides_category::result; public: - typedef ZoneVisitor_ Visitor; + using Visitor = ZoneVisitor_; - typedef typename Arrangement_2::Vertex_handle Vertex_handle; - typedef typename Arrangement_2::Halfedge_handle Halfedge_handle; - typedef typename Arrangement_2::Face_handle Face_handle; + using Vertex_handle = typename Arrangement_2::Vertex_handle; + using Halfedge_handle = typename Arrangement_2::Halfedge_handle; + using Face_handle = typename Arrangement_2::Face_handle; - typedef std::pair Visitor_result; + using Visitor_result = std::pair; - typedef typename Geometry_traits_2::Point_2 Point_2; - typedef typename Geometry_traits_2::X_monotone_curve_2 X_monotone_curve_2; - typedef typename Geometry_traits_2::Multiplicity Multiplicity; + using Point_2 = typename Geometry_traits_2::Point_2; + using X_monotone_curve_2 = typename Geometry_traits_2::X_monotone_curve_2; + using Multiplicity = typename Geometry_traits_2::Multiplicity; protected: - typedef typename Arr_all_sides_oblivious_category::result - Are_all_sides_oblivious_category; - - typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle; - typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; - typedef typename Arrangement_2::Face_const_handle Face_const_handle; + // General types + using Vertex_const_handle = typename Arrangement_2::Vertex_const_handle; + using Halfedge_const_handle = typename Arrangement_2::Halfedge_const_handle; + using Face_const_handle = typename Arrangement_2::Face_const_handle; - typedef typename Arrangement_2::Ccb_halfedge_circulator - Ccb_halfedge_circulator; + using Ccb_halfedge_circulator = + typename Arrangement_2::Ccb_halfedge_circulator; // Types used for caching intersection points: - typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; - typedef boost::optional Optional_intersection; - typedef std::list Intersect_list; - typedef std::map - Intersect_map; - typedef typename Intersect_map::iterator Intersect_map_iterator; + using Intersection_point = std::pair; + using Intersection_result = + std::variant; + using Optional_intersection = std::optional; + using Intersect_list = std::list; + using Intersect_map = std::map; - typedef std::set Curves_set; - typedef typename Curves_set::iterator Curves_set_iterator; + using Curves_set = std::set; + using Curves_set_iterator = typename Curves_set::iterator; - typedef Arr_point_location_result Pl_result; - typedef typename Pl_result::Type Pl_result_type; + using Pl_result = Arr_point_location_result; + using Pl_result_type = typename Pl_result::Type; // Data members: Arrangement_2& m_arr; // The associated arrangement. @@ -155,7 +157,7 @@ class Arrangement_zone_2 { // the right endpoint it its interior. Point_2 m_intersect_p; // The next intersection point. - unsigned int m_ip_multiplicity; // Its multiplicity + Multiplicity m_ip_multiplicity; // Its multiplicity // (0 in case of an overlap). bool m_found_intersect; // An intersection has been found. // (or an overlap). @@ -194,8 +196,7 @@ class Arrangement_zone_2 { * \param pl A point-location object associated with the arrangement. */ template - void init(const X_monotone_curve_2& cv, const PointLocation& pl) - { + void init(const X_monotone_curve_2& cv, const PointLocation& pl) { // Set the curve and check whether its left end has boundary conditions. m_cv = cv; @@ -249,7 +250,7 @@ class Arrangement_zone_2 { */ void init_with_hint(const X_monotone_curve_2& cv, Pl_result_type obj); - /*! Compute the zone of the given curve and issue the apporpriate + /*! Compute the zone of the given curve and issue the appropriate * notifications for the visitor. */ void compute_zone(); @@ -268,8 +269,7 @@ class Arrangement_zone_2 { */ bool do_overlap_impl(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, - const Point_2& p, Arr_all_sides_oblivious_tag) const - { + const Point_2& p, Arr_all_sides_oblivious_tag) const { return m_geom_traits->compare_y_at_x_right_2_object()(cv1, cv2, p) == EQUAL; } @@ -337,7 +337,7 @@ class Arrangement_zone_2 { Optional_intersection _compute_next_intersection(Halfedge_handle he, bool skip_first_point, - bool& intersect_on_right_boundary); + Arr_parameter_space& intersection_location); /*! Remove the next intersection of m_cv with the given halfedge from the map. * \param he A handle to the halfedge. @@ -347,7 +347,7 @@ class Arrangement_zone_2 { void _remove_next_intersection(Halfedge_handle he); /*! Check whether the given point lies completely to the left of the given - * egde. + * edge. * \param p The point. * \param he The halfedge. * \pre he is not a fictitious edge. @@ -371,7 +371,7 @@ class Arrangement_zone_2 { Arr_not_all_sides_oblivious_tag) const; /*! Check whether the given point lies completely to the right of the given - * egde. + * edge. * \param p The point. * \param he The halfedge. * \pre he is not a fictitious edge. @@ -382,8 +382,7 @@ class Arrangement_zone_2 { { return (_is_to_right_impl(p, he, Are_all_sides_oblivious_category())); } bool _is_to_right_impl(const Point_2& p, Halfedge_handle he, - Arr_all_sides_oblivious_tag) const - { + Arr_all_sides_oblivious_tag) const { return (((he->direction() == ARR_LEFT_TO_RIGHT) && m_geom_traits->compare_xy_2_object()(p, he->target()->point()) == LARGER) || @@ -395,12 +394,33 @@ class Arrangement_zone_2 { bool _is_to_right_impl(const Point_2& p, Halfedge_handle he, Arr_not_all_sides_oblivious_tag) const; + /*! Check whether an intersection point is valid. A valid intersection point + * must be to the left of the left end of the curve involved. + */ + bool is_intersection_valid(const Point_2& ip, + Arr_parameter_space& intersection_location) const { + return is_intersection_valid_impl(ip, intersection_location, + Left_or_right_sides_category()); + } + + bool is_intersection_valid_impl(const Point_2& ip, + Arr_parameter_space& intersection_location, + Arr_all_sides_oblivious_tag) const; + + bool is_intersection_valid_impl(const Point_2& ip, + Arr_parameter_space& intersection_location, + Arr_has_identified_side_tag) const; + + bool is_intersection_valid_impl(const Point_2& ip, + Arr_parameter_space& intersection_location, + Arr_boundary_cond_tag) const; + /*! Compute the (lexicographically) leftmost intersection of the query * curve with a given halfedge on the boundary of a face in the arrangement. */ void _leftmost_intersection(Ccb_halfedge_circulator he_curr, bool on_boundary, - bool& leftmost_on_right_boundary); + Arr_parameter_space& leftmost_location); /*! Compute the (lexicographically) leftmost intersection of the query * curve with the boundary of a given face in the arrangement. diff --git a/thirdparty/CGAL/include/CGAL/BOOST_MP_arithmetic_kernel.h b/thirdparty/CGAL/include/CGAL/BOOST_MP_arithmetic_kernel.h index 0d0ca29c..2b244fa0 100644 --- a/thirdparty/CGAL/include/CGAL/BOOST_MP_arithmetic_kernel.h +++ b/thirdparty/CGAL/include/CGAL/BOOST_MP_arithmetic_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arithmetic_kernel/include/CGAL/BOOST_MP_arithmetic_kernel.h $ -// $Id: BOOST_MP_arithmetic_kernel.h ed79fea 2021-09-23T13:02:58+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arithmetic_kernel/include/CGAL/BOOST_MP_arithmetic_kernel.h $ +// $Id: include/CGAL/BOOST_MP_arithmetic_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2.h b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2.h index 2e54441e..07dc613b 100644 --- a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2.h +++ b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2.h $ -// $Id: Barycentric_coordinates_2.h 698a4d3 2021-06-30T12:01:04+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2.h $ +// $Id: include/CGAL/Barycentric_coordinates_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Delaunay_domain_2.h b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Delaunay_domain_2.h index eec0949e..eabb4075 100644 --- a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Delaunay_domain_2.h +++ b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Delaunay_domain_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Delaunay_domain_2.h $ -// $Id: Delaunay_domain_2.h d03c669 2021-08-13T11:33:47+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Delaunay_domain_2.h $ +// $Id: include/CGAL/Barycentric_coordinates_2/Delaunay_domain_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -51,7 +51,7 @@ namespace Barycentric_coordinates { a model of `ReadablePropertyMap` whose key type is `VertexRange::value_type` and value type is `Point_2`. The default is `CGAL::Identity_property_map`. - \cgalModels `DiscretizedDomain_2` + \cgalModels{DiscretizedDomain_2} */ template< typename VertexRange, diff --git a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h index 77f383e5..6db27565 100644 --- a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h +++ b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h $ -// $Id: Discrete_harmonic_2.h be147c5 2022-04-28T07:58:57+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h $ +// $Id: include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,7 +24,7 @@ #include // Boost headers. -#include +#include // CGAL namespace. namespace CGAL { @@ -48,7 +48,7 @@ namespace Barycentric_coordinates { \tparam Traits must be a model of the concepts `BarycentricTraits_2` and `PolygonTraits_2`. -\cgalModels `BarycentricCoordinates_2` +\cgalModels{BarycentricCoordinates_2} \pre The provided polygon is strictly convex. @@ -98,7 +98,7 @@ Discrete_harmonic_2 // This function computes discrete harmonic weights (unnormalized coordinates) for a chosen query point. template - inline boost::optional weights(const Point_2 &query_point, OutputIterator &output) + inline std::optional weights(const Point_2 &query_point, OutputIterator &output) { return weights_2(query_point, output); } @@ -108,7 +108,7 @@ Discrete_harmonic_2 // This function computes discrete harmonic barycentric coordinates for a chosen query point on the bounded side of a strictly convex polygon. // \pre The provided polygon is strictly convex. template - inline boost::optional coordinates_on_bounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) + inline std::optional coordinates_on_bounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) { switch(type_of_algorithm) { @@ -124,14 +124,14 @@ Discrete_harmonic_2 // Pointer cannot be here. Something went wrong. const bool type_of_algorithm_failure = true; CGAL_postcondition( !type_of_algorithm_failure ); - if(!type_of_algorithm_failure) return boost::optional(output); - else return boost::optional(); + if(!type_of_algorithm_failure) return std::optional(output); + else return std::optional(); } // This function computes discrete harmonic barycentric coordinates for a chosen query point on the unbounded side of a strictly convex polygon. // \pre The provided polygon is strictly convex. template - inline boost::optional coordinates_on_unbounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm, const bool warning_tag = true) + inline std::optional coordinates_on_unbounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm, const bool warning_tag = true) { switch(type_of_algorithm) { @@ -147,8 +147,8 @@ Discrete_harmonic_2 // Pointer cannot be here. Something went wrong. const bool type_of_algorithm_failure = true; CGAL_postcondition( !type_of_algorithm_failure ); - if(!type_of_algorithm_failure) return boost::optional(output); - else return boost::optional(); + if(!type_of_algorithm_failure) return std::optional(output); + else return std::optional(); } // Information Functions @@ -184,7 +184,7 @@ Discrete_harmonic_2 // Compute discrete harmonic weights without normalization. template - boost::optional weights_2(const Point_2 &query_point, OutputIterator &output) + std::optional weights_2(const Point_2 &query_point, OutputIterator &output) { // Get the number of vertices in the polygon. const int n = int(number_of_vertices); @@ -220,7 +220,7 @@ Discrete_harmonic_2 ++output; // Return weights. - return boost::optional(output); + return std::optional(output); } // COORDINATES ON BOUNDED SIDE. @@ -228,7 +228,7 @@ Discrete_harmonic_2 // Compute discrete harmonic coordinates on the bounded side of the polygon with the slow O(n^2) but precise algorithm. // Here, n - is the number of the polygon's vertices. template - boost::optional coordinates_on_bounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_bounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) { CGAL_precondition( type_of_polygon() == STRICTLY_CONVEX ); @@ -281,13 +281,13 @@ Discrete_harmonic_2 ++output; // Return coordinates. - return boost::optional(output); + return std::optional(output); } // Compute discrete harmonic coordinates on the bounded side of the polygon with the fast O(n) but less precise algorithm. // Here, n - is the number of the polygon's vertices. Precision is lost near the boundary (~ 1.0e-10 and closer). template - boost::optional coordinates_on_bounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_bounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) { CGAL_precondition( type_of_polygon() == STRICTLY_CONVEX ); @@ -338,7 +338,7 @@ Discrete_harmonic_2 ++output; // Return coordinates. - return boost::optional(output); + return std::optional(output); } // COORDINATES ON UNBOUNDED SIDE. @@ -346,7 +346,7 @@ Discrete_harmonic_2 // Compute discrete harmonic coordinates on the unbounded side of the polygon with the slow O(n^2) but precise algorithm. // Here, n - is the number of the polygon's vertices. template - boost::optional coordinates_on_unbounded_side_precise_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) + std::optional coordinates_on_unbounded_side_precise_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) { if(warning_tag) std::cout << std::endl << "ATTENTION: Discrete harmonic coordinates might be not well-defined outside the polygon!" << std::endl; @@ -358,7 +358,7 @@ Discrete_harmonic_2 // Compute discrete harmonic coordinates on the unbounded side of the polygon with the fast O(n) but less precise algorithm. // Here, n - is the number of the polygon's vertices. Precision is lost near the boundary (~ 1.0e-10 and closer). template - boost::optional coordinates_on_unbounded_side_fast_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) + std::optional coordinates_on_unbounded_side_fast_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) { if(warning_tag) std::cout << std::endl << "ATTENTION: Discrete harmonic coordinates might be not well-defined outside the polygon!" << std::endl; diff --git a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_coordinates_2.h b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_coordinates_2.h index 9e841f65..bd737de9 100644 --- a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_coordinates_2.h +++ b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_coordinates_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_coordinates_2.h $ -// $Id: Discrete_harmonic_coordinates_2.h 9832893 2021-06-28T16:19:29+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_coordinates_2.h $ +// $Id: include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_coordinates_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h index 7d1bc3fa..6b4a84b7 100644 --- a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h +++ b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h $ -// $Id: Generalized_barycentric_coordinates_2.h be147c5 2022-04-28T07:58:57+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h $ +// $Id: include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,7 +24,7 @@ #include // Boost headers. -#include +#include // CGAL namespace. namespace CGAL { @@ -118,7 +118,7 @@ Generalized_barycentric_coordinates_2 /// `CGAL::Barycentric_coordinates::PRECISE` - default slow algorithm, which is as precise as possible and /// `CGAL::Barycentric_coordinates::FAST` - fast algorithm, which is less precise but much faster. template - inline boost::optional operator()(const Point_2 &query_point, OutputIterator output, Query_point_location query_point_location = UNSPECIFIED_LOCATION, Type_of_algorithm type_of_algorithm = PRECISE) + inline std::optional operator()(const Point_2 &query_point, OutputIterator output, Query_point_location query_point_location = UNSPECIFIED_LOCATION, Type_of_algorithm type_of_algorithm = PRECISE) { return coordinates_2(query_point, output, query_point_location, type_of_algorithm); } @@ -129,7 +129,7 @@ Generalized_barycentric_coordinates_2 /// \pre The provided query point belongs to the polygon's boundary. /// \pre (0 <= index) && (index < number of the polygon's vertices). template - inline boost::optional compute_on_edge(const Point_2 &query_point, const int index, OutputIterator output) const + inline std::optional compute_on_edge(const Point_2 &query_point, const int index, OutputIterator output) const { return coordinates_on_boundary_2(query_point, index, output); } @@ -139,7 +139,7 @@ Generalized_barycentric_coordinates_2 /// /// \pre (0 <= index) && (index < number of the polygon's vertices). template - inline boost::optional compute_on_vertex(const int index, OutputIterator output) const + inline std::optional compute_on_vertex(const int index, OutputIterator output) const { return coordinates_on_vertex_2(index, output); } @@ -149,7 +149,7 @@ Generalized_barycentric_coordinates_2 /// /// \pre The provided query point belongs to the polygon's interior, excluding the boundary. template - inline boost::optional compute_weights(const Point_2 &query_point, OutputIterator output) + inline std::optional compute_weights(const Point_2 &query_point, OutputIterator output) { return weights_2(query_point, output); } @@ -183,7 +183,7 @@ Generalized_barycentric_coordinates_2 // This function accepts a container of the type `std::vector` // and returns an iterator of the type `std::back_insert_iterator` // that is placed past-the-end of the resulting sequence of coordinate values. - inline boost::optional > > operator()(const Point_2 &query_point, std::vector &output_vector, Query_point_location query_point_location = UNSPECIFIED_LOCATION, Type_of_algorithm type_of_algorithm = PRECISE) + inline std::optional > > operator()(const Point_2 &query_point, std::vector &output_vector, Query_point_location query_point_location = UNSPECIFIED_LOCATION, Type_of_algorithm type_of_algorithm = PRECISE) { output_vector.reserve(output_vector.size() + number_of_vertices); typedef typename std::back_insert_iterator > OutputIterator; @@ -198,7 +198,7 @@ Generalized_barycentric_coordinates_2 // // \pre The provided query point belongs to the polygon's boundary. // \pre (0 <= index) && (index < number of the polygon's vertices). - inline boost::optional > > compute_on_edge(const Point_2 &query_point, const int index, std::vector &output_vector) const + inline std::optional > > compute_on_edge(const Point_2 &query_point, const int index, std::vector &output_vector) const { output_vector.reserve(output_vector.size() + number_of_vertices); typedef typename std::back_insert_iterator > OutputIterator; @@ -212,7 +212,7 @@ Generalized_barycentric_coordinates_2 // that is placed past-the-end of the resulting sequence of coordinate values. // // \pre (0 <= index) && (index < number of the polygon's vertices). - inline boost::optional > > compute_on_vertex(const int index, std::vector &output_vector) const + inline std::optional > > compute_on_vertex(const int index, std::vector &output_vector) const { output_vector.reserve(output_vector.size() + number_of_vertices); typedef typename std::back_insert_iterator > OutputIterator; @@ -226,7 +226,7 @@ Generalized_barycentric_coordinates_2 // that is placed past-the-end of the resulting sequence of weight values. // // \pre The provided query point belongs to the polygon's interior, excluding the boundary. - inline boost::optional > > compute_weights(const Point_2 &query_point, std::vector &output_vector) + inline std::optional > > compute_weights(const Point_2 &query_point, std::vector &output_vector) { output_vector.reserve(output_vector.size() + number_of_vertices); typedef typename std::back_insert_iterator > OutputIterator; @@ -283,7 +283,7 @@ Generalized_barycentric_coordinates_2 // Compute weights on the bounded side of the polygon - see precondition. template - inline boost::optional weights_2(const Point_2 &query_point, OutputIterator &output) + inline std::optional weights_2(const Point_2 &query_point, OutputIterator &output) { // This is the only global precondition on the computation of weights. CGAL_precondition( CGAL::bounded_side_2(vertex.begin(), vertex.end(), query_point, barycentric_traits) == CGAL::ON_BOUNDED_SIDE ); @@ -295,7 +295,7 @@ Generalized_barycentric_coordinates_2 // Compute coordinates at any point in the plane. template - boost::optional coordinates_2(const Point_2 &query_point, OutputIterator &output, const Query_point_location query_point_location, const Type_of_algorithm type_of_algorithm) + std::optional coordinates_2(const Point_2 &query_point, OutputIterator &output, const Query_point_location query_point_location, const Type_of_algorithm type_of_algorithm) { // Determine a location of the current query point provided by the user. switch(query_point_location) @@ -324,13 +324,13 @@ Generalized_barycentric_coordinates_2 // Pointer cannot be here. Something went wrong. const bool query_point_location_failure = true; CGAL_postcondition( !query_point_location_failure ); - if(!query_point_location_failure) return boost::optional(output); - else return boost::optional(); + if(!query_point_location_failure) return std::optional(output); + else return std::optional(); } // Compute coordinates at any point in the plane with unspecified location. template - boost::optional coordinates_unspecified_2(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) + std::optional coordinates_unspecified_2(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) { // Determine a global location of the current query point. switch(CGAL::bounded_side_2(vertex.begin(), vertex.end(), query_point, barycentric_traits)) @@ -355,15 +355,15 @@ Generalized_barycentric_coordinates_2 // Pointer cannot be here. Something went wrong. const bool query_point_location_failure = true; CGAL_postcondition( !query_point_location_failure ); - if(!query_point_location_failure) return boost::optional(output); - else return boost::optional(); + if(!query_point_location_failure) return std::optional(output); + else return std::optional(); } // COORDINATES ON BOUNDED SIDE. // Compute coordinates on the bounded side of the polygon - precise or fast. template - inline boost::optional coordinates_on_bounded_side_2(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) + inline std::optional coordinates_on_bounded_side_2(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) { CGAL_precondition( CGAL::bounded_side_2(vertex.begin(), vertex.end(), query_point, barycentric_traits) == CGAL::ON_BOUNDED_SIDE ); @@ -374,7 +374,7 @@ Generalized_barycentric_coordinates_2 // Compute coordinates along the boundary of the polygon with beforehand known index of the edge to which the query point belongs. template - boost::optional coordinates_on_boundary_2(const Point_2 &query_point, const int index, OutputIterator &output) const + std::optional coordinates_on_boundary_2(const Point_2 &query_point, const int index, OutputIterator &output) const { CGAL_precondition( CGAL::bounded_side_2(vertex.begin(), vertex.end(), query_point, barycentric_traits) == CGAL::ON_BOUNDARY ); CGAL_precondition( (0 <= index) && (index < int(number_of_vertices)) ); @@ -393,7 +393,7 @@ Generalized_barycentric_coordinates_2 // Compute segment coordinates along the chosen edge with the index = `index`. Segment_coordinates_2 segment_coordinates(vertex[index], vertex[index+1]); - boost::optional success = segment_coordinates(query_point, output); + std::optional success = segment_coordinates(query_point, output); ++output; for(int i = index + 1; i < last; ++i) { @@ -402,20 +402,20 @@ Generalized_barycentric_coordinates_2 } // Return coordinates. - if(success) return boost::optional(output); - else return boost::optional(); + if(success) return std::optional(output); + else return std::optional(); } // Pointer cannot be here. Something went wrong. const bool coordinates_on_boundary_failure = true; CGAL_postcondition( !coordinates_on_boundary_failure ); - if(!coordinates_on_boundary_failure) return boost::optional(output); - else return boost::optional(); + if(!coordinates_on_boundary_failure) return std::optional(output); + else return std::optional(); } // Compute coordinates along the boundary of the polygon without beforehand known index of the edge to which the query point belongs. template - boost::optional coordinates_on_boundary_2(const Point_2 &query_point, OutputIterator &output) const + std::optional coordinates_on_boundary_2(const Point_2 &query_point, OutputIterator &output) const { CGAL_precondition( CGAL::bounded_side_2(vertex.begin(), vertex.end(), query_point, barycentric_traits) == CGAL::ON_BOUNDARY ); @@ -435,7 +435,7 @@ Generalized_barycentric_coordinates_2 // Compute segment coordinates along the edge with the query point. Segment_coordinates_2 segment_coordinates(vertex[index], vertex[index+1]); - boost::optional success = segment_coordinates(query_point, output); + std::optional success = segment_coordinates(query_point, output); if(success) status = true; ++output; break; @@ -452,20 +452,20 @@ Generalized_barycentric_coordinates_2 } // Return coordinates. - if(status == true) return boost::optional(output); - else return boost::optional(); + if(status == true) return std::optional(output); + else return std::optional(); } // Pointer cannot be here. Something went wrong. const bool coordinates_on_boundary_failure = true; CGAL_postcondition( !coordinates_on_boundary_failure ); - if(!coordinates_on_boundary_failure) return boost::optional(output); - else return boost::optional(); + if(!coordinates_on_boundary_failure) return std::optional(output); + else return std::optional(); } // Compute coordinates for a query point lying on the last edge of the polygon. template - boost::optional coordinates_on_last_edge_2(const Point_2 &query_point, const int last, OutputIterator &output) const + std::optional coordinates_on_last_edge_2(const Point_2 &query_point, const int last, OutputIterator &output) const { // Some convenient typedefs. typedef std::vector Coordinate_vector; @@ -478,7 +478,7 @@ Generalized_barycentric_coordinates_2 // Compute segment coordinates along the last edge of the polygon. Segment_coordinates_2 segment_coordinates(vertex[last], vertex[0]); - boost::optional success = segment_coordinates(query_point, std::back_inserter(coordinate)); + std::optional success = segment_coordinates(query_point, std::back_inserter(coordinate)); // Store all the coordinate values. // All the values are zeros apart from those corresponding to the first and the last vertices of the polygon. @@ -492,15 +492,15 @@ Generalized_barycentric_coordinates_2 ++output; // Return computed coordinates. - if(success) return boost::optional(output); - else return boost::optional(); + if(success) return std::optional(output); + else return std::optional(); } // COORDINATES AT VERTEX. // Compute coordinates for a query point lying at one of the polygon's vertices with beforehand known vertex's index. template - boost::optional coordinates_on_vertex_2(const int index, OutputIterator &output) const + std::optional coordinates_on_vertex_2(const int index, OutputIterator &output) const { CGAL_precondition( (0 <= index) && (index < int(number_of_vertices)) ); @@ -519,12 +519,12 @@ Generalized_barycentric_coordinates_2 } // Return coordinates. - return boost::optional(output); + return std::optional(output); } // Compute coordinates for a query point lying at one of the polygon's vertices without beforehand known vertex's index. template - boost::optional coordinates_on_vertex_2(const Point_2 &query_point, OutputIterator &output) const + std::optional coordinates_on_vertex_2(const Point_2 &query_point, OutputIterator &output) const { int index = -1; CGAL_precondition( is_query_point_at_vertex(query_point, index) ); @@ -554,15 +554,15 @@ Generalized_barycentric_coordinates_2 // Return coordinates. CGAL_postcondition( !coordinates_on_vertex_failure ); - if(!coordinates_on_vertex_failure) return boost::optional(output); - else return boost::optional(); + if(!coordinates_on_vertex_failure) return std::optional(output); + else return std::optional(); } // COORDINATES ON UNBOUNDED SIDE. // Compute coordinates on the unbounded side of the polygon - precise or fast. template - inline boost::optional coordinates_on_unbounded_side_2(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) + inline std::optional coordinates_on_unbounded_side_2(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) { CGAL_precondition( CGAL::bounded_side_2(vertex.begin(), vertex.end(), query_point, barycentric_traits) == CGAL::ON_UNBOUNDED_SIDE ); diff --git a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Harmonic_coordinates_2.h b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Harmonic_coordinates_2.h index b01dfc4f..3eb278c8 100644 --- a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Harmonic_coordinates_2.h +++ b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Harmonic_coordinates_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Harmonic_coordinates_2.h $ -// $Id: Harmonic_coordinates_2.h 9ab7e1e 2022-10-20T17:21:43+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Harmonic_coordinates_2.h $ +// $Id: include/CGAL/Barycentric_coordinates_2/Harmonic_coordinates_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h index ac8cfe1f..4f7557ab 100644 --- a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h +++ b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h $ -// $Id: Mean_value_2.h be147c5 2022-04-28T07:58:57+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h $ +// $Id: include/CGAL/Barycentric_coordinates_2/Mean_value_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -26,7 +26,7 @@ // Boost headers. #include -#include +#include // Barycentric coordinates headers. #include @@ -100,7 +100,7 @@ template \tparam Traits must be a model of the concept `BarycentricTraits_2`. -\cgalModels `BarycentricCoordinates_2` +\cgalModels{BarycentricCoordinates_2} */ template @@ -154,7 +154,7 @@ Mean_value_2 // This function computes mean value weights (unnormalized coordinates) for a chosen query point. template - inline boost::optional weights(const Point_2 &query_point, OutputIterator &output) + inline std::optional weights(const Point_2 &query_point, OutputIterator &output) { return weights_2(query_point, output); } @@ -163,7 +163,7 @@ Mean_value_2 // This function computes mean value barycentric coordinates for a chosen query point on the bounded side of a simple polygon. template - inline boost::optional coordinates_on_bounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) + inline std::optional coordinates_on_bounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) { switch(type_of_algorithm) { @@ -179,13 +179,13 @@ Mean_value_2 // Pointer cannot be here. Something went wrong. const bool type_of_algorithm_failure = true; CGAL_postcondition( !type_of_algorithm_failure ); - if(!type_of_algorithm_failure) return boost::optional(output); - else return boost::optional(); + if(!type_of_algorithm_failure) return std::optional(output); + else return std::optional(); } // This function computes mean value barycentric coordinates for a chosen query point on the unbounded side of a simple polygon. template - inline boost::optional coordinates_on_unbounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) + inline std::optional coordinates_on_unbounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) { switch(type_of_algorithm) { @@ -201,8 +201,8 @@ Mean_value_2 // Pointer cannot be here. Something went wrong. const bool type_of_algorithm_failure = true; CGAL_postcondition( !type_of_algorithm_failure ); - if(!type_of_algorithm_failure) return boost::optional(output); - else return boost::optional(); + if(!type_of_algorithm_failure) return std::optional(output); + else return std::optional(); } // Information Functions @@ -243,7 +243,7 @@ Mean_value_2 // Compute mean value weights without normalization. template - boost::optional weights_2(const Point_2 &query_point, OutputIterator &output) + std::optional weights_2(const Point_2 &query_point, OutputIterator &output) { // Get the number of vertices in the polygon. const int n = int(number_of_vertices); @@ -293,7 +293,7 @@ Mean_value_2 ++output; // Return weights. - return boost::optional(output); + return std::optional(output); } // COORDINATES ON BOUNDED SIDE. @@ -301,7 +301,7 @@ Mean_value_2 // Compute mean value coordinates on the bounded side of the polygon with the slow O(n^2) but precise algorithm. // Here, n - is the number of the polygon's vertices. template - boost::optional coordinates_on_bounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_bounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) { // Get the number of vertices in the polygon. const int n = int(number_of_vertices); @@ -368,13 +368,13 @@ Mean_value_2 ++output; // Return coordinates. - return boost::optional(output); + return std::optional(output); } // Compute mean value coordinates on the bounded side of the polygon with the fast O(n) but less precise algorithm. // Here, n - is the number of the polygon's vertices. Precision is lost near the boundary (~ 1.0e-10 and closer). template - boost::optional coordinates_on_bounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_bounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) { // Get the number of vertices in the polygon. const int n = int(number_of_vertices); @@ -437,7 +437,7 @@ Mean_value_2 ++output; // Return coordinates. - return boost::optional(output); + return std::optional(output); } // COORDINATES ON UNBOUNDED SIDE. @@ -445,7 +445,7 @@ Mean_value_2 // Compute mean value coordinates on the unbounded side of the polygon with the slow O(n^2) but precise algorithm. // Here, n - is the number of the polygon's vertices. template - boost::optional coordinates_on_unbounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_unbounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) { // Use the same formulas as for the bounded side since they are also valid on the unbounded side. return coordinates_on_bounded_side_precise_2(query_point, output); @@ -454,7 +454,7 @@ Mean_value_2 // Compute mean value coordinates on the unbounded side of the polygon with the fast O(n) but less precise algorithm. // Here, n - is the number of the polygon's vertices. Precision is lost near the boundary (~ 1.0e-10 and closer). template - boost::optional coordinates_on_unbounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_unbounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) { // Use the same formulas as for the bounded side since they are also valid on the unbounded side. return coordinates_on_bounded_side_fast_2(query_point, output); diff --git a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Mean_value_coordinates_2.h b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Mean_value_coordinates_2.h index 836d7fec..fd4af2fa 100644 --- a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Mean_value_coordinates_2.h +++ b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Mean_value_coordinates_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Mean_value_coordinates_2.h $ -// $Id: Mean_value_coordinates_2.h 9832893 2021-06-28T16:19:29+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Mean_value_coordinates_2.h $ +// $Id: include/CGAL/Barycentric_coordinates_2/Mean_value_coordinates_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h index 9c886897..d59cb247 100644 --- a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h +++ b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h $ -// $Id: Wachspress_2.h be147c5 2022-04-28T07:58:57+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h $ +// $Id: include/CGAL/Barycentric_coordinates_2/Wachspress_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,7 +24,7 @@ #include // Boost headers. -#include +#include // CGAL namespace. namespace CGAL { @@ -48,7 +48,7 @@ namespace Barycentric_coordinates { \tparam Traits must be a model of the concepts `BarycentricTraits_2` and `PolygonTraits_2`. -\cgalModels `BarycentricCoordinates_2` +\cgalModels{BarycentricCoordinates_2} \pre The provided polygon is strictly convex. @@ -96,7 +96,7 @@ Wachspress_2 // This function computes Wachspress weights (unnormalized coordinates) for a chosen query point. template - inline boost::optional weights(const Point_2 &query_point, OutputIterator &output) + inline std::optional weights(const Point_2 &query_point, OutputIterator &output) { return weights_2(query_point, output); } @@ -106,7 +106,7 @@ Wachspress_2 // This function computes Wachspress barycentric coordinates for a chosen query point on the bounded side of a strictly convex polygon. // \pre The provided polygon is strictly convex. template - inline boost::optional coordinates_on_bounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) + inline std::optional coordinates_on_bounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm) { switch(type_of_algorithm) { @@ -122,14 +122,14 @@ Wachspress_2 // Pointer cannot be here. Something went wrong. const bool type_of_algorithm_failure = true; CGAL_postcondition( !type_of_algorithm_failure ); - if(!type_of_algorithm_failure) return boost::optional(output); - else return boost::optional(); + if(!type_of_algorithm_failure) return std::optional(output); + else return std::optional(); } // This function computes Wachspress barycentric coordinates for a chosen query point on the unbounded side of a strictly convex polygon. // \pre The provided polygon is strictly convex. template - inline boost::optional coordinates_on_unbounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm, const bool warning_tag = true) + inline std::optional coordinates_on_unbounded_side(const Point_2 &query_point, OutputIterator &output, const Type_of_algorithm type_of_algorithm, const bool warning_tag = true) { switch(type_of_algorithm) { @@ -145,8 +145,8 @@ Wachspress_2 // Pointer cannot be here. Something went wrong. const bool type_of_algorithm_failure = true; CGAL_postcondition( !type_of_algorithm_failure ); - if(!type_of_algorithm_failure) return boost::optional(output); - else return boost::optional(); + if(!type_of_algorithm_failure) return std::optional(output); + else return std::optional(); } // Information Functions @@ -181,7 +181,7 @@ Wachspress_2 // Compute Wachspress weights without normalization. template - boost::optional weights_2(const Point_2 &query_point, OutputIterator &output) + std::optional weights_2(const Point_2 &query_point, OutputIterator &output) { // Get the number of vertices in the polygon. const int n = int(number_of_vertices); @@ -214,7 +214,7 @@ Wachspress_2 ++output; // Return weights. - return boost::optional(output); + return std::optional(output); } // COORDINATES ON BOUNDED SIDE. @@ -222,7 +222,7 @@ Wachspress_2 // Compute Wachspress coordinates on the bounded side of the polygon with the slow O(n^2) but precise algorithm. // Here, n - is the number of the polygon's vertices. template - boost::optional coordinates_on_bounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_bounded_side_precise_2(const Point_2 &query_point, OutputIterator &output) { CGAL_precondition( type_of_polygon() == STRICTLY_CONVEX ); @@ -265,13 +265,13 @@ Wachspress_2 ++output; // Return coordinates. - return boost::optional(output); + return std::optional(output); } // Compute Wachspress coordinates on the bounded side of the polygon with the fast O(n) but less precise algorithm. // Here, n - is the number of the polygon's vertices. Precision is lost near the boundary (~ 1.0e-10 and closer). template - boost::optional coordinates_on_bounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) + std::optional coordinates_on_bounded_side_fast_2(const Point_2 &query_point, OutputIterator &output) { CGAL_precondition( type_of_polygon() == STRICTLY_CONVEX ); @@ -319,7 +319,7 @@ Wachspress_2 ++output; // Return coordinates. - return boost::optional(output); + return std::optional(output); } // COORDINATES ON UNBOUNDED SIDE. @@ -327,7 +327,7 @@ Wachspress_2 // Compute Wachspress coordinates on the unbounded side of the polygon with the slow O(n^2) but precise algorithm. // Here, n - is the number of the polygon's vertices. template - boost::optional coordinates_on_unbounded_side_precise_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) + std::optional coordinates_on_unbounded_side_precise_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) { if(warning_tag) std::cout << std::endl << "ATTENTION: Wachspress coordinates might be not well-defined outside the polygon!" << std::endl; @@ -339,7 +339,7 @@ Wachspress_2 // Compute Wachspress coordinates on the unbounded side of the polygon with the fast O(n) but less precise algorithm. // Here, n - is the number of the polygon's vertices. Precision is lost near the boundary (~ 1.0e-10 and closer). template - boost::optional coordinates_on_unbounded_side_fast_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) + std::optional coordinates_on_unbounded_side_fast_2(const Point_2 &query_point, OutputIterator &output, bool warning_tag) { if(warning_tag) std::cout << std::endl << "ATTENTION: Wachspress coordinates might be not well-defined outside the polygon!" << std::endl; diff --git a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Wachspress_coordinates_2.h b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Wachspress_coordinates_2.h index 243bf9e7..cd81606b 100644 --- a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Wachspress_coordinates_2.h +++ b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/Wachspress_coordinates_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Wachspress_coordinates_2.h $ -// $Id: Wachspress_coordinates_2.h 9832893 2021-06-28T16:19:29+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Wachspress_coordinates_2.h $ +// $Id: include/CGAL/Barycentric_coordinates_2/Wachspress_coordinates_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/barycentric_enum_2.h b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/barycentric_enum_2.h index 68e8d370..75e1a890 100644 --- a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/barycentric_enum_2.h +++ b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/barycentric_enum_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/barycentric_enum_2.h $ -// $Id: barycentric_enum_2.h 6c7150e 2021-09-24T11:10:20+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/barycentric_enum_2.h $ +// $Id: include/CGAL/Barycentric_coordinates_2/barycentric_enum_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/boundary_coordinates_2.h b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/boundary_coordinates_2.h index 3f7efad6..10700168 100644 --- a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/boundary_coordinates_2.h +++ b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/boundary_coordinates_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/boundary_coordinates_2.h $ -// $Id: boundary_coordinates_2.h 9c56d70 2021-05-20T14:05:21+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/boundary_coordinates_2.h $ +// $Id: include/CGAL/Barycentric_coordinates_2/boundary_coordinates_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/internal/utils_2.h b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/internal/utils_2.h index e20e45d2..dd2e63be 100644 --- a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/internal/utils_2.h +++ b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/internal/utils_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/internal/utils_2.h $ -// $Id: utils_2.h d03c669 2021-08-13T11:33:47+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/internal/utils_2.h $ +// $Id: include/CGAL/Barycentric_coordinates_2/internal/utils_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -31,7 +31,7 @@ // Boost headers. #include -#include +#include // Internal includes. #include @@ -222,7 +222,7 @@ namespace internal { typename VertexRange, typename GeomTraits, typename PointMap> - boost::optional< std::pair > + std::optional< std::pair > get_edge_index_approximate( const VertexRange& polygon, const typename GeomTraits::Point_2& query, @@ -264,7 +264,7 @@ namespace internal { return std::make_pair(Query_point_location::ON_EDGE, i); } } - return boost::none; + return std::nullopt; } // Why this one does not work for harmonic coordinates? - Due to the imprecisions in the Mesh_2 class. @@ -273,7 +273,7 @@ namespace internal { typename VertexRange, typename GeomTraits, typename PointMap> - boost::optional< std::pair > + std::optional< std::pair > get_edge_index_exact( const VertexRange& polygon, const typename GeomTraits::Point_2& query, @@ -303,10 +303,10 @@ namespace internal { return std::make_pair(Query_point_location::ON_EDGE, i); } } - return boost::none; + return std::nullopt; } - // Check wether a query point belongs to the last polygon edge. + // Check whether a query point belongs to the last polygon edge. template< typename VertexRange, typename OutputIterator, @@ -409,7 +409,7 @@ namespace internal { typename VertexRange, typename GeomTraits, typename PointMap> - boost::optional< std::pair > + std::optional< std::pair > locate_wrt_polygon_2( const VertexRange& polygon, const typename GeomTraits::Point_2& query, @@ -430,7 +430,7 @@ namespace internal { default: return std::make_pair(Query_point_location::UNSPECIFIED, std::size_t(-1)); } - return boost::none; + return std::nullopt; } } // namespace internal diff --git a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/segment_coordinates_2.h b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/segment_coordinates_2.h index 29a3fdde..a78bd9e6 100644 --- a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/segment_coordinates_2.h +++ b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/segment_coordinates_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/segment_coordinates_2.h $ -// $Id: segment_coordinates_2.h 0e84898 2022-05-13T15:50:21+02:00 Sebastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/segment_coordinates_2.h $ +// $Id: include/CGAL/Barycentric_coordinates_2/segment_coordinates_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -245,7 +245,7 @@ namespace Barycentric_coordinates { /// Computes segment barycentric coordinates for a chosen query point with respect to both vertices of the segment. /// Computed coordinates are stored in the output iterator `output`. template - inline boost::optional operator()( + inline std::optional operator()( const Point_2 &query_point, OutputIterator output) { return segment_coordinates_2(query_point, output); @@ -280,7 +280,7 @@ namespace Barycentric_coordinates { // This function accepts a container of the type `std::vector` // and returns an iterator of the type `std::back_insert_iterator` // that is placed past-the-end of the resulting sequence of coordinate values. - inline boost::optional > > operator()( + inline std::optional > > operator()( const Point_2 &query_point, std::vector &output_vector) { output_vector.reserve(output_vector.size() + 2); @@ -327,7 +327,7 @@ namespace Barycentric_coordinates { // Compute segment coordinates. template - boost::optional segment_coordinates_2( + std::optional segment_coordinates_2( const Point_2 &query_point, OutputIterator &output) { // Project point on the segment and compute the first coordinate. @@ -341,7 +341,7 @@ namespace Barycentric_coordinates { ++output; // Output both coordinates. - return boost::optional(output); + return std::optional(output); } }; diff --git a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/triangle_coordinates_2.h b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/triangle_coordinates_2.h index cda4bdf0..59c484c1 100644 --- a/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/triangle_coordinates_2.h +++ b/thirdparty/CGAL/include/CGAL/Barycentric_coordinates_2/triangle_coordinates_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/triangle_coordinates_2.h $ -// $Id: triangle_coordinates_2.h 0e84898 2022-05-13T15:50:21+02:00 Sebastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/triangle_coordinates_2.h $ +// $Id: include/CGAL/Barycentric_coordinates_2/triangle_coordinates_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -257,7 +257,7 @@ namespace Barycentric_coordinates { /// Computes triangle barycentric coordinates for a chosen query point with respect to all three vertices of the triangle. /// Computed coordinates are stored in the output iterator `output`. template - inline boost::optional operator()( + inline std::optional operator()( const Point_2 &query_point, OutputIterator output) { return triangle_coordinates_2(query_point, output); @@ -298,7 +298,7 @@ namespace Barycentric_coordinates { // This function accepts a container of the type `std::vector` // and returns an iterator of the type `std::back_insert_iterator` // that is placed past-the-end of the resulting sequence of coordinate values. - inline boost::optional > > operator()( + inline std::optional > > operator()( const Point_2 &query_point, std::vector &output_vector) { output_vector.reserve(output_vector.size() + 3); @@ -347,7 +347,7 @@ namespace Barycentric_coordinates { // Compute triangle coordinates. template - boost::optional triangle_coordinates_2( + std::optional triangle_coordinates_2( const Point_2 &query_point, OutputIterator &output) { // Compute some related sub-areas. @@ -372,7 +372,7 @@ namespace Barycentric_coordinates { ++output; // Output all coordinates. - return boost::optional(output); + return std::optional(output); } }; diff --git a/thirdparty/CGAL/include/CGAL/Base_with_time_stamp.h b/thirdparty/CGAL/include/CGAL/Base_with_time_stamp.h new file mode 100644 index 00000000..c9b47353 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Base_with_time_stamp.h @@ -0,0 +1,41 @@ +// Copyright (c) 2023 GeometryFactory Sarl (France). +// All rights reserved. +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Base_with_time_stamp.h $ +// $Id: include/CGAL/Base_with_time_stamp.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Laurent Rineau + +#ifndef CGAL_BASE_WITH_TIME_STAMP_H +#define CGAL_BASE_WITH_TIME_STAMP_H + +#include // for Tag_true +#include // for std::size_t +#include // for std::forward + +namespace CGAL { + +template +class Base_with_time_stamp : public Base { + std::size_t time_stamp_ = -1; +public: + typedef CGAL::Tag_true Has_timestamp; + + std::size_t time_stamp() const { + return time_stamp_; + } + void set_time_stamp(const std::size_t& ts) { + time_stamp_ = ts; + } + + template < class TDS > + struct Rebind_TDS { + typedef typename Base::template Rebind_TDS::Other Base2; + typedef Base_with_time_stamp Other; + }; +}; + +} // namespace CGAL + +#endif // CGAL_BASE_WITH_TIME_STAMP_H diff --git a/thirdparty/CGAL/include/CGAL/Basic_shaders.h b/thirdparty/CGAL/include/CGAL/Basic_shaders.h index 6a9cbd9b..cf6f3995 100644 --- a/thirdparty/CGAL/include/CGAL/Basic_shaders.h +++ b/thirdparty/CGAL/include/CGAL/Basic_shaders.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Basic_shaders.h $ -// $Id: Basic_shaders.h 66f92a3 2021-08-30T11:11:57+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Basic_shaders.h $ +// $Id: include/CGAL/Basic_shaders.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Bbox_2.h b/thirdparty/CGAL/include/CGAL/Bbox_2.h index 60a1045a..ce1539f0 100644 --- a/thirdparty/CGAL/include/CGAL/Bbox_2.h +++ b/thirdparty/CGAL/include/CGAL/Bbox_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Bbox_2.h $ -// $Id: Bbox_2.h 529add2 2021-07-07T14:37:41+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Bbox_2.h $ +// $Id: include/CGAL/Bbox_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/Bbox_3.h b/thirdparty/CGAL/include/CGAL/Bbox_3.h index 800bbfc7..a96a4af2 100644 --- a/thirdparty/CGAL/include/CGAL/Bbox_3.h +++ b/thirdparty/CGAL/include/CGAL/Bbox_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Bbox_3.h $ -// $Id: Bbox_3.h 529add2 2021-07-07T14:37:41+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Bbox_3.h $ +// $Id: include/CGAL/Bbox_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/Bigfloat_interval_traits.h b/thirdparty/CGAL/include/CGAL/Bigfloat_interval_traits.h index 7216bf94..adf0926b 100644 --- a/thirdparty/CGAL/include/CGAL/Bigfloat_interval_traits.h +++ b/thirdparty/CGAL/include/CGAL/Bigfloat_interval_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interval_support/include/CGAL/Bigfloat_interval_traits.h $ -// $Id: Bigfloat_interval_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interval_support/include/CGAL/Bigfloat_interval_traits.h $ +// $Id: include/CGAL/Bigfloat_interval_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2.h index b63199e3..efcdaedd 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2.h $ -// $Id: Boolean_set_operations_2.h 4151fcb 2021-09-23T11:59:29+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2.h $ +// $Id: include/CGAL/Boolean_set_operations_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Bso_internal_functions.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Bso_internal_functions.h index c38af405..b7366a06 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Bso_internal_functions.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Bso_internal_functions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Bso_internal_functions.h $ -// $Id: Bso_internal_functions.h d968a9e 2021-09-28T16:39:10+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Bso_internal_functions.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Bso_internal_functions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Ccb_curve_iterator.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Ccb_curve_iterator.h index 642e0101..6e402af5 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Ccb_curve_iterator.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Ccb_curve_iterator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Ccb_curve_iterator.h $ -// $Id: Ccb_curve_iterator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Ccb_curve_iterator.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Ccb_curve_iterator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Curve_with_halfedge.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Curve_with_halfedge.h index a58680b8..77556126 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Curve_with_halfedge.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Curve_with_halfedge.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Curve_with_halfedge.h $ -// $Id: Curve_with_halfedge.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Curve_with_halfedge.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Curve_with_halfedge.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h index 79c373fc..64505c99 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h $ -// $Id: Gps_agg_meta_traits.h 7436c14 2020-04-06T01:23:45+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -33,10 +32,10 @@ class Gps_agg_curve_data : public Curve_with_halfedge typedef Curve_with_halfedge Base; const Arrangement* m_arr; // pointer to the arrangement containing the edge. - unsigned int m_bc; // the boudary counter of the halfedge with the same + unsigned int m_bc; // the boundary counter of the halfedge with the same // direction as the curve - unsigned int m_twin_bc; // the boudary counter of the halfedge with the same + unsigned int m_twin_bc; // the boundary counter of the halfedge with the same // direction as the curve public: @@ -124,18 +123,14 @@ class Gps_agg_meta_traits : typedef typename Arr::Right_side_category Right_side_category; // a side is either oblivious or open (unbounded) - BOOST_MPL_ASSERT((boost::mpl::or_< - boost::is_same, - boost::is_same >)); - BOOST_MPL_ASSERT((boost::mpl::or_< - boost::is_same, - boost::is_same >)); - BOOST_MPL_ASSERT((boost::mpl::or_< - boost::is_same, - boost::is_same >)); - BOOST_MPL_ASSERT((boost::mpl::or_< - boost::is_same, - boost::is_same >)); + static_assert(std::is_same::value || + std::is_same::value); + static_assert(std::is_same::value || + std::is_same::value); + static_assert(std::is_same::value || + std::is_same::value); + static_assert(std::is_same::value || + std::is_same::value); typedef typename Arr::Halfedge_handle Halfedge_handle; typedef typename Arr::Vertex_handle Vertex_handle; @@ -165,11 +160,8 @@ class Gps_agg_meta_traits : typedef const std::pair Intersection_base_point; - typedef boost::variant + typedef std::variant Intersection_base_result; - typedef const std::pair Intersection_point; - typedef boost::variant - Intersection_result; const auto* base_traits = m_traits.m_base_traits; auto base_cmp_xy = base_traits->compare_xy_2_object(); @@ -188,16 +180,16 @@ class Gps_agg_meta_traits : // the extenede X_monotone_curve_2 for (const auto& xection : xections) { const Intersection_base_point* base_pt = - boost::get(&xection); + std::get_if(&xection); if (base_pt != nullptr) { Point_2 point_plus(base_pt->first); // the extended point *oi++ = - Intersection_result(std::make_pair(point_plus, base_pt->second)); + std::make_pair(point_plus, base_pt->second); continue; } const Base_x_monotone_curve_2* overlap_cv = - boost::get(&xection); + std::get_if(&xection); CGAL_assertion(overlap_cv != nullptr); unsigned int ov_bc; unsigned int ov_twin_bc; @@ -219,7 +211,7 @@ class Gps_agg_meta_traits : Curve_data cv_data(cv1.data().arr(), Halfedge_handle(), ov_bc, ov_twin_bc); - *oi++ = Intersection_result(X_monotone_curve_2(*overlap_cv, cv_data)); + *oi++ = X_monotone_curve_2(*overlap_cv, cv_data); } return oi; diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h index a5e4e085..3b9d7e02 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h $ -// $Id: Gps_agg_op.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_agg_op.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman @@ -108,7 +108,7 @@ class Gps_agg_op { { std::list curves_list; - unsigned int n_inf_pgn = 0; // number of infinte polygons (arrangement + unsigned int n_inf_pgn = 0; // number of infinite polygons (arrangement // with a contained unbounded face unsigned int n_pgn = 0; // number of polygons (arrangements) unsigned int i; diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_op_surface_sweep_2.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_op_surface_sweep_2.h index 001de0e7..e8ab2227 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_op_surface_sweep_2.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_op_surface_sweep_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_surface_sweep_2.h $ -// $Id: Gps_agg_op_surface_sweep_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_surface_sweep_2.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_agg_op_surface_sweep_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman @@ -110,7 +110,7 @@ class Gps_agg_op_surface_sweep_2 : public Ss2::Surface_sweep_2 { event = this->_allocate_event(vh->point(), event_type, ARR_INTERIOR, ARR_INTERIOR); - // \todo When the boolean set operations are exteneded to support + // \todo When the boolean set operations are extended to support // unbounded curves, we will need here a special treatment. #ifndef CGAL_ARRANGEMENT_ON_SURFACE_2_H @@ -150,7 +150,7 @@ class Gps_agg_op_surface_sweep_2 : public Ss2::Surface_sweep_2 { if (res == SMALLER || q_iter == q_end) { event = this->_allocate_event(vh->point(), event_type, ARR_INTERIOR, ARR_INTERIOR); - // \todo When the boolean set operations are exteneded to support + // \todo When the boolean set operations are extended to support // unbounded curves, we will need here a special treatment. #ifndef CGAL_ARRANGEMENT_ON_SURFACE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h index 424d6ef4..bab63f4d 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h $ -// $Id: Gps_agg_op_visitor.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_base_functor.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_base_functor.h index 91e6a6e8..f0c1185c 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_base_functor.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_base_functor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_base_functor.h $ -// $Id: Gps_base_functor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_base_functor.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_base_functor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h index 368360d2..87598b7f 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h $ -// $Id: Gps_bfs_base_visitor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -57,7 +57,7 @@ class Gps_bfs_base_visitor //! discovered_face /*! discovered_face is called by Gps_bfs_scanner when it reveals a new face during a BFS scan. In the BFS traversal we are going from old_face to - new_face throught the half-edge he. + new_face through the half-edge he. \param old_face The face that was already revealed \param new_face The face that we have just now revealed \param he The half-edge that is used to traverse between them. diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_intersection_visitor.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_intersection_visitor.h index aaaa0332..040ee25f 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_intersection_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_intersection_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_intersection_visitor.h $ -// $Id: Gps_bfs_intersection_visitor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_intersection_visitor.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_bfs_intersection_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_join_visitor.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_join_visitor.h index 6aeefa81..13ea2be6 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_join_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_join_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_join_visitor.h $ -// $Id: Gps_bfs_join_visitor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_join_visitor.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_bfs_join_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_scanner.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_scanner.h index e8a5f70c..4c4719f1 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_scanner.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_scanner.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_scanner.h $ -// $Id: Gps_bfs_scanner.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_scanner.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_bfs_scanner.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_xor_visitor.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_xor_visitor.h index 9a51c08a..d97c0a1b 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_xor_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_bfs_xor_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_xor_visitor.h $ -// $Id: Gps_bfs_xor_visitor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_xor_visitor.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_bfs_xor_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -56,7 +56,7 @@ public Gps_bfs_base_visitor > /*! The function fixes some of the curves, to be in the same direction as the half-edges. - \param arr The given arrangment. + \param arr The given arrangement. */ void after_scan(Arrangement& arr) { diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h index 1c8ba130..032b5bce 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h $ -// $Id: Gps_default_dcel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ /*! \file * This class is the default \dcel{} class used by the General_polygon_set_2 - * and Polygon_set_2} class-templates to represent the undelying internal + * and Polygon_set_2} class-templates to represent the underlying internal * Arrangement_2 data structure. */ diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_default_traits.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_default_traits.h index 9b2eceae..478ba64b 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_default_traits.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_default_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_default_traits.h $ -// $Id: Gps_default_traits.h fcd1289 2020-11-30T10:03:43+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_default_traits.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_default_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_difference_functor.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_difference_functor.h index b51ae71e..dd0a2a18 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_difference_functor.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_difference_functor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_difference_functor.h $ -// $Id: Gps_difference_functor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_difference_functor.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_difference_functor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_do_intersect_functor.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_do_intersect_functor.h index d7f267f3..1fbc481b 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_do_intersect_functor.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_do_intersect_functor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_do_intersect_functor.h $ -// $Id: Gps_do_intersect_functor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_do_intersect_functor.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_do_intersect_functor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_insertion_meta_traits.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_insertion_meta_traits.h index af84e58d..7a20a7e1 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_insertion_meta_traits.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_insertion_meta_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_insertion_meta_traits.h $ -// $Id: Gps_insertion_meta_traits.h 7436c14 2020-04-06T01:23:45+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_insertion_meta_traits.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_insertion_meta_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_intersection_functor.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_intersection_functor.h index 61b7f476..6846ddf0 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_intersection_functor.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_intersection_functor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_intersection_functor.h $ -// $Id: Gps_intersection_functor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_intersection_functor.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_intersection_functor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_join_functor.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_join_functor.h index 8a45ff5e..4e5312dd 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_join_functor.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_join_functor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_join_functor.h $ -// $Id: Gps_join_functor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_join_functor.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_join_functor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_merge.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_merge.h index 607ca888..ee921a62 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_merge.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_merge.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_merge.h $ -// $Id: Gps_merge.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_merge.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_merge.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h index 734ac146..a81591c1 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h $ -// $Id: Gps_on_surface_base_2.h 4dbf509 2021-11-03T16:47:12+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman @@ -146,7 +146,7 @@ class Gps_on_surface_base_2 public: - // default costructor + // default constructor Gps_on_surface_base_2() : m_traits(new Traits_2()), m_traits_adaptor(*m_traits), m_traits_owner(true), @@ -169,7 +169,7 @@ class Gps_on_surface_base_2 m_arr(new Aos_2(*(ps.m_arr))) {} - // Asignment operator + // Assignment operator Gps_on_surface_base_2& operator=(const Self& ps) { if (this == &ps) @@ -456,13 +456,13 @@ class Gps_on_surface_base_2 bool is_empty() const { // We have to check that all the faces of an empty arrangement are not - // conained in the polygon set (there can be several faces in an empty - // arrangement, dependant on the topology traits. + // contained in the polygon set (there can be several faces in an empty + // arrangement, dependent on the topology traits. // The point is that if the arrangement is "empty" (meaning that no curve // or point were inserted and that it is in its original state) then // all the faces (created by the topology traits) should have the same // result for contained() --- from Boolean operations point of view there - // can not be an empty arrangement which has serveral faces with different + // can not be an empty arrangement which has several faces with different // attributes. return (m_arr->is_empty() && !m_arr->faces_begin()->contained()); } @@ -1189,7 +1189,7 @@ class Gps_on_surface_base_2 (*it)->_inner_ccbs().clear(); } - // accessor for low-level arrangement fonctionalities + // accessor for low-level arrangement functionalities CGAL::Arr_accessor accessor(*arr); // the face field of outer and inner ccb are used in the loop to access the old face an halfedge // used to contribute to. These two vectors are used to delay the association to the new face to diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h index 9d49bbdd..44e2cec1 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h $ -// $Id: Gps_on_surface_base_2_impl.h 4dbf509 2021-11-03T16:47:12+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -631,7 +631,7 @@ template typedef Arr_bfs_scanner Arr_bfs_scanner; - //counting_output_operator CTOR reqires a parameter + //counting_output_operator CTOR requires a parameter std::size_t cc = 0; Arr_bfs_scanner scanner(this->m_traits, Counting_output_iterator(&cc)); scanner.scan(*(this->m_arr)); diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h index 818d53e2..d5bb007a 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h $ -// $Id: Gps_polygon_simplifier.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_polygon_simplifier.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h index b9fb7bc9..67fa722a 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h $ -// $Id: Gps_polygon_validation.h 6fd9388 2021-11-03T18:32:40+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -644,7 +644,7 @@ bool are_holes_and_boundary_pairwise_disjoint * * Use sweep to find intersections on the interior of curves (not on vertices) * and overlapping edges which are not allowed (note that 0/1 dimension - * intersections are not detectes by do_intersect() which only returns the + * intersections are not detects by do_intersect() which only returns the * 2D intersection polygon if exists) * Note that using this sweep alone allows for a hole and an edge to share * a vertex and intersect (like illegal input pgn_w_overlap_hole.dat in @@ -686,7 +686,7 @@ bool are_holes_and_boundary_pairwise_disjoint Polygon_2 hole(*hoit); hole.reverse_orientation(); /* gps.join() and gps.insert()requires that the polyon insrted is valid, - * and therfore hole orientation must be reversed + * and therefore the hole orientation must be reversed */ bool intersect = gps.do_intersect(hole); if (intersect) return false; @@ -760,7 +760,7 @@ bool are_holes_and_boundary_pairwise_disjoint * 2 - The PWH is relatively simple polygon (holes are simple...) * 3 - Has it's boundary oriented counterclockwise and the holes oriented * clockwise - * 4 - All the segments (boundry and holes) do not cross or intersect in their + * 4 - All the segments (boundary and holes) do not cross or intersect in their * relative interior * 5 - The holes are on the interior of the boundary polygon if the boundary * is not empty diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h index db45abd6..06bca658 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h $ -// $Id: Gps_simplifier_traits.h 6fcbee1 2020-04-21T17:12:21+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_simplifier_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -133,11 +133,8 @@ class Gps_simplifier_traits : { typedef const std::pair Intersection_base_point; - typedef boost::variant + typedef std::variant Intersection_base_result; - typedef const std::pair Intersection_point; - typedef boost::variant - Intersection_result; const auto* base_traits = m_traits.m_base_traits; auto base_cmp_xy = base_traits->compare_xy_2_object(); @@ -170,17 +167,17 @@ class Gps_simplifier_traits : // the extenede X_monotone_curve_2 for (const auto& xection : xections) { const Intersection_base_point* base_pt = - boost::get(&xection); + std::get_if(&xection); if (base_pt != nullptr) { Point_data pt_data(m_traits.invalid_index()); Point_2 point_plus(base_pt->first, pt_data); // the extended point *oi++ = - Intersection_result(std::make_pair(point_plus, base_pt->second)); + std::make_pair(point_plus, base_pt->second); continue; } const Base_x_monotone_curve_2* overlap_cv = - boost::get(&xection); + std::get_if(&xection); CGAL_assertion(overlap_cv != nullptr); unsigned int ov_bc; @@ -202,7 +199,7 @@ class Gps_simplifier_traits : } Curve_data cv_data(ov_bc, ov_twin_bc, m_traits.invalid_index()); - *oi++ = Intersection_result(X_monotone_curve_2(*overlap_cv, cv_data)); + *oi++ = X_monotone_curve_2(*overlap_cv, cv_data); } return oi; diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_sym_diff_functor.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_sym_diff_functor.h index ea8674f1..cf5abc7d 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_sym_diff_functor.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_sym_diff_functor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_sym_diff_functor.h $ -// $Id: Gps_sym_diff_functor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_sym_diff_functor.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_sym_diff_functor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h index 49e4ce21..c18fba26 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h $ -// $Id: Gps_traits_adaptor.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Baruch Zukerman @@ -132,7 +132,7 @@ class Gps_traits_adaptor : public Traits_ { } if (from_leftmost == end) { - // First occurance + // First occurrence from_leftmost = from; into_leftmost = into; into = from; diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h index 018d349e..8f6a5c8e 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h $ -// $Id: Gps_traits_decorator.h 7436c14 2020-04-06T01:23:45+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -15,9 +15,6 @@ #include - -#include - namespace CGAL { template @@ -56,30 +53,14 @@ class Gps_traits_decorator typedef typename Base::Right_side_category Right_side_category; // a side is either oblivious or open (unbounded) - BOOST_MPL_ASSERT( - (boost::mpl::or_< - boost::is_same< Left_side_category, Arr_oblivious_side_tag >, - boost::is_same< Left_side_category, Arr_open_side_tag > > - ) - ); - BOOST_MPL_ASSERT( - (boost::mpl::or_< - boost::is_same< Bottom_side_category, Arr_oblivious_side_tag >, - boost::is_same< Bottom_side_category, Arr_open_side_tag > > - ) - ); - BOOST_MPL_ASSERT( - (boost::mpl::or_< - boost::is_same< Top_side_category, Arr_oblivious_side_tag >, - boost::is_same< Top_side_category, Arr_open_side_tag > > - ) - ); - BOOST_MPL_ASSERT( - (boost::mpl::or_< - boost::is_same< Right_side_category, Arr_oblivious_side_tag >, - boost::is_same< Right_side_category, Arr_open_side_tag > > - ) - ); + static_assert(std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Left_side_category, Arr_open_side_tag >::value); + static_assert(std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Bottom_side_category, Arr_open_side_tag >::value); + static_assert(std::is_same< Top_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Top_side_category, Arr_open_side_tag >::value); + static_assert(std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Right_side_category, Arr_open_side_tag >::value); class Ex_point_2 { @@ -406,7 +387,7 @@ class Gps_traits_decorator } }; - /*! Get a Equal_2 functor object. */ + /*! Get an `Equal_2` functor object. */ Equal_2 equal_2_object() const { return Equal_2(m_base_traits->equal_2_object()); diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Indexed_event.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Indexed_event.h index 22ceec64..6ed46f6f 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Indexed_event.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Indexed_event.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Indexed_event.h $ -// $Id: Indexed_event.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Indexed_event.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Indexed_event.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Point_with_vertex.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Point_with_vertex.h index 385716c9..8d639cfd 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Point_with_vertex.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Point_with_vertex.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Point_with_vertex.h $ -// $Id: Point_with_vertex.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Point_with_vertex.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Point_with_vertex.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h index c40e67d7..b150d941 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h $ -// $Id: Polygon_2_curve_iterator.h 0b70318 2020-10-20T09:01:29+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Polygon_conversions.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Polygon_conversions.h index 0d043b67..33360e72 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Polygon_conversions.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/Polygon_conversions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_conversions.h $ -// $Id: Polygon_conversions.h 420f37a 2021-09-23T16:28:23+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_conversions.h $ +// $Id: include/CGAL/Boolean_set_operations_2/Polygon_conversions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -92,7 +92,7 @@ convert_polygon(const Polygon_2& polygon, if (polygon.is_empty()) return General_polygon_2(); using Point = typename ArrTraits::Point_2; using X_monotone_curve = typename ArrTraits::X_monotone_curve_2; - using Make_x_monotone_result = boost::variant; + using Make_x_monotone_result = std::variant; auto cv = ctr(boost::range::join(CGAL::make_range(polygon.vertices_begin(), polygon.vertices_end()), CGAL::make_single(*polygon.vertices_begin()))); @@ -101,7 +101,7 @@ convert_polygon(const Polygon_2& polygon, make_x_mtn(cv, boost::make_function_output_iterator ([&](const Make_x_monotone_result& obj) - { gpgn.push_back(*(boost::get(&obj))); })); + { gpgn.push_back(*(std::get_if(&obj))); })); return gpgn; } diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/complement.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/complement.h index d166f079..9e5b3a73 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/complement.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/complement.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/complement.h $ -// $Id: complement.h 4151fcb 2021-09-23T11:59:29+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/complement.h $ +// $Id: include/CGAL/Boolean_set_operations_2/complement.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,8 +18,6 @@ #include -#include - #include #include @@ -33,7 +31,7 @@ #include #include #include -#include +#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/difference.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/difference.h index e229fc73..0c5c0fe1 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/difference.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/difference.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/difference.h $ -// $Id: difference.h 4151fcb 2021-09-23T11:59:29+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/difference.h $ +// $Id: include/CGAL/Boolean_set_operations_2/difference.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,8 +18,6 @@ #include -#include - #include #include @@ -33,7 +31,7 @@ #include #include #include -#include +#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/do_intersect.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/do_intersect.h index 39290a41..27504a21 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/do_intersect.h $ -// $Id: do_intersect.h 7ba4fbc 2022-06-07T20:57:57+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/do_intersect.h $ +// $Id: include/CGAL/Boolean_set_operations_2/do_intersect.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,8 +18,6 @@ #include -#include - #include #include @@ -33,7 +31,7 @@ #include #include #include -#include +#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/intersection.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/intersection.h index 05776208..43374ec1 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/intersection.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/intersection.h $ -// $Id: intersection.h 7ba4fbc 2022-06-07T20:57:57+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/intersection.h $ +// $Id: include/CGAL/Boolean_set_operations_2/intersection.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,8 +18,6 @@ #include -#include - #include #include @@ -33,7 +31,7 @@ #include #include #include -#include +#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/join.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/join.h index 437e4b53..b55a1c82 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/join.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/join.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/join.h $ -// $Id: join.h 420f37a 2021-09-23T16:28:23+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/join.h $ +// $Id: include/CGAL/Boolean_set_operations_2/join.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,8 +18,6 @@ #include -#include - #include #include @@ -33,7 +31,7 @@ #include #include #include -#include +#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/oriented_side.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/oriented_side.h index a45f6533..5499544f 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/oriented_side.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/oriented_side.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/oriented_side.h $ -// $Id: oriented_side.h 4151fcb 2021-09-23T11:59:29+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/oriented_side.h $ +// $Id: include/CGAL/Boolean_set_operations_2/oriented_side.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,8 +18,6 @@ #include -#include - #include #include @@ -33,7 +31,7 @@ #include #include #include -#include +#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/symmetric_difference.h b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/symmetric_difference.h index 55f705be..643fe1e8 100644 --- a/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/symmetric_difference.h +++ b/thirdparty/CGAL/include/CGAL/Boolean_set_operations_2/symmetric_difference.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/symmetric_difference.h $ -// $Id: symmetric_difference.h 420f37a 2021-09-23T16:28:23+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/symmetric_difference.h $ +// $Id: include/CGAL/Boolean_set_operations_2/symmetric_difference.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,8 +18,6 @@ #include -#include - #include #include @@ -33,7 +31,7 @@ #include #include #include -#include +#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Bounded_kernel.h b/thirdparty/CGAL/include/CGAL/Bounded_kernel.h index 4457fdab..53b054af 100644 --- a/thirdparty/CGAL/include/CGAL/Bounded_kernel.h +++ b/thirdparty/CGAL/include/CGAL/Bounded_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Bounded_kernel.h $ -// $Id: Bounded_kernel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Bounded_kernel.h $ +// $Id: include/CGAL/Bounded_kernel.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_d.h b/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_d.h index 877f927a..52fac7d5 100644 --- a/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_d.h +++ b/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Box_intersection_d/include/CGAL/Box_intersection_d/Box_d.h $ -// $Id: Box_d.h 3e03d50 2021-05-05T15:32:22+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Box_intersection_d/include/CGAL/Box_intersection_d/Box_d.h $ +// $Id: include/CGAL/Box_intersection_d/Box_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_traits_d.h b/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_traits_d.h index 0b78e052..bd377eff 100644 --- a/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_traits_d.h +++ b/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_traits_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Box_intersection_d/include/CGAL/Box_intersection_d/Box_traits_d.h $ -// $Id: Box_traits_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Box_intersection_d/include/CGAL/Box_intersection_d/Box_traits_d.h $ +// $Id: include/CGAL/Box_intersection_d/Box_traits_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_with_handle_d.h b/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_with_handle_d.h index f4ae5d5b..3c75848c 100644 --- a/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_with_handle_d.h +++ b/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_with_handle_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Box_intersection_d/include/CGAL/Box_intersection_d/Box_with_handle_d.h $ -// $Id: Box_with_handle_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Box_intersection_d/include/CGAL/Box_intersection_d/Box_with_handle_d.h $ +// $Id: include/CGAL/Box_intersection_d/Box_with_handle_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_with_info_d.h b/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_with_info_d.h index 585c555f..8d35eaa8 100644 --- a/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_with_info_d.h +++ b/thirdparty/CGAL/include/CGAL/Box_intersection_d/Box_with_info_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Box_intersection_d/include/CGAL/Box_intersection_d/Box_with_info_d.h $ -// $Id: Box_with_info_d.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Box_intersection_d/include/CGAL/Box_intersection_d/Box_with_info_d.h $ +// $Id: include/CGAL/Box_intersection_d/Box_with_info_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Box_intersection_d/box_limits.h b/thirdparty/CGAL/include/CGAL/Box_intersection_d/box_limits.h index d2e624d3..f17b4630 100644 --- a/thirdparty/CGAL/include/CGAL/Box_intersection_d/box_limits.h +++ b/thirdparty/CGAL/include/CGAL/Box_intersection_d/box_limits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Box_intersection_d/include/CGAL/Box_intersection_d/box_limits.h $ -// $Id: box_limits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Box_intersection_d/include/CGAL/Box_intersection_d/box_limits.h $ +// $Id: include/CGAL/Box_intersection_d/box_limits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Box_intersection_d/segment_tree.h b/thirdparty/CGAL/include/CGAL/Box_intersection_d/segment_tree.h index fe13bcdb..e1277f0c 100644 --- a/thirdparty/CGAL/include/CGAL/Box_intersection_d/segment_tree.h +++ b/thirdparty/CGAL/include/CGAL/Box_intersection_d/segment_tree.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Box_intersection_d/include/CGAL/Box_intersection_d/segment_tree.h $ -// $Id: segment_tree.h 79f9d82 2022-05-06T14:52:32+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Box_intersection_d/include/CGAL/Box_intersection_d/segment_tree.h $ +// $Id: include/CGAL/Box_intersection_d/segment_tree.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -326,11 +326,11 @@ class Has_member_report }; template -CGAL_CPP17_INLINE constexpr bool Has_member_report_v = Has_member_report::value; +inline constexpr bool Has_member_report_v = Has_member_report::value; template inline -std::enable_if_t, bool> +std::enable_if_t::value, bool> report_impl(Callback callback, int dim) { return callback.report(dim); @@ -338,7 +338,7 @@ report_impl(Callback callback, int dim) template inline -std::enable_if_t, bool> +std::enable_if_t::value, bool> report_impl(const Callback&, int) { return false; @@ -346,7 +346,7 @@ report_impl(const Callback&, int) template inline -std::enable_if_t, void> +std::enable_if_t::value, void> progress_impl(Callback callback, double d) { callback.progress(d); @@ -354,7 +354,7 @@ progress_impl(Callback callback, double d) template inline -std::enable_if_t, void> +std::enable_if_t::value, void> progress_impl(const Callback&, double) {} diff --git a/thirdparty/CGAL/include/CGAL/Buffer_for_vao.h b/thirdparty/CGAL/include/CGAL/Buffer_for_vao.h index f180845d..e52cf5f4 100644 --- a/thirdparty/CGAL/include/CGAL/Buffer_for_vao.h +++ b/thirdparty/CGAL/include/CGAL/Buffer_for_vao.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Buffer_for_vao.h $ -// $Id: Buffer_for_vao.h 440a8df 2022-02-03T08:41:04+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Buffer_for_vao.h $ +// $Id: include/CGAL/Buffer_for_vao.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -106,7 +106,7 @@ namespace internal } }; - // Specialization when K==Local_kernel, because there is no need of convertion here. + // Specialization when K==Local_kernel, because there is no need of conversion here. template struct Geom_utils { @@ -577,7 +577,7 @@ class Buffer_for_vao add_gouraud_normal(m_vertex_normals_for_face[i]); } else - { // Here user does not provide all vertex normals: we use face normal istead + { // Here user does not provide all vertex normals: we use face normal instead // and thus we will not be able to use Gouraud add_gouraud_normal(normal); } @@ -703,7 +703,7 @@ class Buffer_for_vao else { ++(edges[p1][p2]); } } - // (1) We insert all the edges as contraint in the CDT. + // (1) We insert all the edges as constraint in the CDT. typename CDT::Vertex_handle previous=nullptr, first=nullptr; for (unsigned int i=0; iinfo().is_process = false; } // (2.2) We check if the facet is external or internal - std::queue face_queue; - typename CDT::Face_handle face_internal = nullptr; + std::queue face_queue, faces_internal; if (cdt.infinite_vertex()->face()!=nullptr) - { face_queue.push(cdt.infinite_vertex()->face()); } + { + typename CDT::Face_circulator + incident_faces(cdt.infinite_vertex()), end_incident_faces(incident_faces); + do + { face_queue.push(incident_faces); } + while(++incident_faces!=end_incident_faces); + } + // std::cout<<"# faces PUSHED "<info().is_process) { - fh->info().is_process = true; + fh->info().is_process=true; for(int i=0; i<3; ++i) { if(!cdt.is_constrained(std::make_pair(fh, i))) @@ -764,21 +770,16 @@ class Buffer_for_vao if (fh->neighbor(i)!=nullptr) { face_queue.push(fh->neighbor(i)); } } - else if (face_internal==nullptr) - { - face_internal = fh->neighbor(i); - } + else + { faces_internal.push(fh->neighbor(i)); } } } } - if ( face_internal!=nullptr ) - { face_queue.push(face_internal); } - - while(!face_queue.empty()) + while(!faces_internal.empty()) { - typename CDT::Face_handle fh = face_queue.front(); - face_queue.pop(); + typename CDT::Face_handle fh=faces_internal.front(); + faces_internal.pop(); if(!fh->info().is_process) { fh->info().is_process = true; @@ -788,7 +789,7 @@ class Buffer_for_vao if(!cdt.is_constrained(std::make_pair(fh, i))) { if (fh->neighbor(i)!=nullptr) - { face_queue.push(fh->neighbor(i)); } + { faces_internal.push(fh->neighbor(i)); } } } } @@ -872,7 +873,7 @@ class Buffer_for_vao } protected: - // Types usefull for triangulation + // Types useful for triangulation struct Vertex_info { Local_vector v; diff --git a/thirdparty/CGAL/include/CGAL/CC_safe_handle.h b/thirdparty/CGAL/include/CGAL/CC_safe_handle.h index a5397da4..5a53e85c 100644 --- a/thirdparty/CGAL/include/CGAL/CC_safe_handle.h +++ b/thirdparty/CGAL/include/CGAL/CC_safe_handle.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/CC_safe_handle.h $ -// $Id: CC_safe_handle.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/CC_safe_handle.h $ +// $Id: include/CGAL/CC_safe_handle.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Clement Jamin diff --git a/thirdparty/CGAL/include/CGAL/CGAL_Ipelet_base.h b/thirdparty/CGAL/include/CGAL/CGAL_Ipelet_base.h index d1f7952c..6e6d4afe 100644 --- a/thirdparty/CGAL/include/CGAL/CGAL_Ipelet_base.h +++ b/thirdparty/CGAL/include/CGAL/CGAL_Ipelet_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base.h $ -// $Id: CGAL_Ipelet_base.h 01374de 2021-01-25T13:39:36+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base.h $ +// $Id: include/CGAL/CGAL_Ipelet_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/CGAL_Ipelet_base_v6.h b/thirdparty/CGAL/include/CGAL/CGAL_Ipelet_base_v6.h index 8314c6a1..bb19b1e8 100644 --- a/thirdparty/CGAL/include/CGAL/CGAL_Ipelet_base_v6.h +++ b/thirdparty/CGAL/include/CGAL/CGAL_Ipelet_base_v6.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h $ -// $Id: CGAL_Ipelet_base_v6.h 9bf61b7 2020-04-22T11:02:16+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h $ +// $Id: include/CGAL/CGAL_Ipelet_base_v6.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -317,10 +317,10 @@ namespace CGAL{ IpeSegmentSubPath* create_polyline(const iterator first, const iterator last,bool setclose=false) const { - if (boost::next(first)!=last){ + if (std::next(first)!=last){ IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath(); IpeVector Prev_pt=IpeVector(CGAL::to_double(first->x()),CGAL::to_double(first->y())) ; - for (iterator it = boost::next(first);it!=last;++it){ + for (iterator it = std::next(first);it!=last;++it){ IpeVector Cur_pt=IpeVector(CGAL::to_double(it->x()),CGAL::to_double(it->y())); SSP_ipe -> AppendSegment(Prev_pt,Cur_pt); Prev_pt=Cur_pt; @@ -338,12 +338,12 @@ namespace CGAL{ draw_polyline_in_ipe(const iterator first, const iterator last, bool setclose=false,bool deselect_all=false, bool blackfill=false, - typename boost::enable_if< - boost::is_same< + std::enable_if_t< + std::is_same< typename std::iterator_traits::value_type, Point_2 - > - >::type* =nullptr) const + >::value + >* =nullptr) const { IpeSegmentSubPath* SSP_ipe=create_polyline(first,last,setclose); if (SSP_ipe!=nullptr){ @@ -403,9 +403,9 @@ namespace CGAL{ { IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath; IpeVector ipeS=IpeVector( CGAL::to_double(std::get<1>(arc).x()), - CGAL::to_double(std::get<1>(arc).y()));//convert ot ipe format + CGAL::to_double(std::get<1>(arc).y()));//convert to ipe format IpeVector ipeT=IpeVector( CGAL::to_double(std::get<2>(arc).x()), - CGAL::to_double(std::get<2>(arc).y()));//convert ot ipe format + CGAL::to_double(std::get<2>(arc).y()));//convert to ipe format SSP_ipe->AppendArc(IpeMatrix(sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())),0, 0,(std::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)* sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())), @@ -636,13 +636,12 @@ namespace CGAL{ template void draw_in_ipe(const iterator begin,const iterator end,const Iso_rectangle_2& bbox,bool make_grp=true,bool deselect_all=false, - typename boost::enable_if< boost::mpl::or_< boost::is_same::value_type,Point_2> , - boost::mpl::or_< boost::is_same::value_type,Segment_2> , - boost::mpl::or_< boost::is_same::value_type,Circle_2> , - boost::mpl::or_< boost::is_same::value_type,Circular_arc_2> , - boost::is_same::value_type,Polygon_2> - > > > > - >::type* = nullptr) const + std::enable_if_t< std::is_same_v::value_type,Point_2> || + std::is_same_v::value_type,Segment_2> || + std::is_same_v::value_type,Circle_2> || + std::is_same_v::value_type,Circular_arc_2> || + std::is_same_v::value_type,Polygon_2> + >* = nullptr) const { for (iterator it=begin;it!=end;++it) draw_in_ipe(*it,bbox); @@ -945,7 +944,7 @@ namespace CGAL{ //retrieve circle arcs if(SSP_ipe -> Segment(j).Type()==IpePathSegment::EArc && is_only_rotated_or_scaled(object->AsPath()->Matrix())) - {//retreve circle arcs + {//retrieve circle arcs if ( !CGAL::Is_in_tuple::value ){ to_deselect=true; continue; diff --git a/thirdparty/CGAL/include/CGAL/CGAL_Ipelet_base_v7.h b/thirdparty/CGAL/include/CGAL/CGAL_Ipelet_base_v7.h index 32a52f0c..0022e900 100644 --- a/thirdparty/CGAL/include/CGAL/CGAL_Ipelet_base_v7.h +++ b/thirdparty/CGAL/include/CGAL/CGAL_Ipelet_base_v7.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h $ -// $Id: CGAL_Ipelet_base_v7.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h $ +// $Id: include/CGAL/CGAL_Ipelet_base_v7.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -329,10 +329,10 @@ namespace CGAL{ ipe::Curve* create_polyline(const iterator first, const iterator last,bool setclose=false) const { - if (boost::next(first)!=last){ + if (std::next(first)!=last){ ipe::Curve* SSP_ipe = new ipe::Curve(); ipe::Vector Prev_pt=ipe::Vector(CGAL::to_double(first->x()),CGAL::to_double(first->y())) ; - for (iterator it = boost::next(first);it!=last;++it){ + for (iterator it = std::next(first);it!=last;++it){ ipe::Vector Cur_pt=ipe::Vector(CGAL::to_double(it->x()),CGAL::to_double(it->y())); SSP_ipe -> appendSegment(Prev_pt,Cur_pt); Prev_pt=Cur_pt; @@ -350,12 +350,12 @@ namespace CGAL{ draw_polyline_in_ipe(const iterator first, const iterator last, bool setclose=false,bool deselect_all=false, bool blackfill=false, - typename boost::enable_if< - boost::is_same< + std::enable_if_t< + std::is_same< typename std::iterator_traits::value_type, Point_2 - > - >::type* =nullptr) const + >::value + >* =nullptr) const { ipe::Curve* SSP_ipe=create_polyline(first,last,setclose); if (SSP_ipe!=nullptr){ @@ -414,9 +414,9 @@ namespace CGAL{ { ipe::Curve* SSP_ipe = new ipe::Curve; ipe::Vector ipeS=ipe::Vector( CGAL::to_double(std::get<1>(arc).x()), - CGAL::to_double(std::get<1>(arc).y()));//convert ot ipe format + CGAL::to_double(std::get<1>(arc).y()));//convert to ipe format ipe::Vector ipeT=ipe::Vector( CGAL::to_double(std::get<2>(arc).x()), - CGAL::to_double(std::get<2>(arc).y()));//convert ot ipe format + CGAL::to_double(std::get<2>(arc).y()));//convert to ipe format SSP_ipe->appendArc(ipe::Matrix(sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())),0, 0,(std::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)* sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())), @@ -645,13 +645,12 @@ namespace CGAL{ template void draw_in_ipe(const iterator begin,const iterator end,const Iso_rectangle_2& bbox,bool make_grp=true,bool deselect_all=false, - typename boost::enable_if< boost::mpl::or_< boost::is_same::value_type,Point_2> , - boost::mpl::or_< boost::is_same::value_type,Segment_2> , - boost::mpl::or_< boost::is_same::value_type,Circle_2> , - boost::mpl::or_< boost::is_same::value_type,Circular_arc_2> , - boost::is_same::value_type,Polygon_2> - > > > > - >::type* = nullptr) const + std::enable_if_t< std::is_same_v::value_type,Point_2> || + std::is_same_v::value_type,Segment_2> || + std::is_same_v::value_type,Circle_2> || + std::is_same_v::value_type,Circular_arc_2> || + std::is_same_v::value_type,Polygon_2> + >* = nullptr) const { for (iterator it=begin;it!=end;++it) draw_in_ipe(*it,bbox); @@ -822,41 +821,34 @@ namespace CGAL{ CGAL::Cartesian_converter conv; Exact_circle_2 exact_circle=conv(approx_circle); + typedef std::pair Cp2_mult; SK::Intersect_2 inter=SK().intersect_2_object(); - std::vector< std::pair > points; + std::vector< Cp2_mult > points; points.reserve(8); - std::vector ints; + std::vector< Cp2_mult > ints; ints.reserve(2); - std::pair tmp_pt; int indices[8]={-1,-1,-1,-1,-1,-1,-1,-1}; for (unsigned i=0;i!=4;++i){ ints.clear(); SK::Segment_2 S(conv(bbox[i]),conv(bbox[(i+1)%4])); - inter(exact_circle,SK::Line_arc_2(S),std::back_inserter(ints)); + inter(exact_circle,SK::Line_arc_2(S),dispatch_or_drop_output(std::back_inserter(ints))); unsigned index=0; - bool ok=true; switch (ints.size()){ case 1: - ok=CGAL::assign(tmp_pt,ints[0]); - CGAL_assertion(ok); CGAL_USE(ok); - points.push_back(tmp_pt); + points.push_back(ints[0]); index=points.size()-1; indices[i]=index; indices[(i+1)%4+4]=index; break; case 2: int right_ind=i<2?0:1; - ok=CGAL::assign(tmp_pt,ints[right_ind]); - CGAL_assertion(ok); CGAL_USE(ok); - points.push_back(tmp_pt); + points.push_back(ints[right_ind]); index=points.size()-1; indices[i]=index; - ok=CGAL::assign(tmp_pt,ints[(right_ind+1)%2]); - CGAL_assertion(ok); CGAL_USE(ok); - points.push_back(tmp_pt); + points.push_back(ints[(right_ind+1)%2]); index=points.size()-1; indices[(i+1)%4+4]=index; break; @@ -951,7 +943,7 @@ namespace CGAL{ //retrieve circle arcs if(SSP_ipe -> segment(j).type()==ipe::CurveSegment::EArc && is_only_rotated_or_scaled(object->asPath()->matrix())) - {//retreve circle arcs + {//retrieve circle arcs if ( !CGAL::Is_in_tuple::value ){ to_deselect=true; continue; diff --git a/thirdparty/CGAL/include/CGAL/CMap_linear_cell_complex_storages.h b/thirdparty/CGAL/include/CGAL/CMap_linear_cell_complex_storages.h index 97136e18..54e4c0e9 100644 --- a/thirdparty/CGAL/include/CGAL/CMap_linear_cell_complex_storages.h +++ b/thirdparty/CGAL/include/CGAL/CMap_linear_cell_complex_storages.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h $ -// $Id: CMap_linear_cell_complex_storages.h 46f5325 2022-01-27T10:36:22+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h $ +// $Id: include/CGAL/CMap_linear_cell_complex_storages.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -34,28 +34,25 @@ namespace CGAL { struct Container_type; } - /** @file CMap_linear_cell_complex_storages.h - * Definition of storages for dD Linear cell complex for combinatorial maps. - */ - // Storage of darts with compact container, beta with handles // Copy of Combinatorial_map_storage_1 and add new types related - // to geometry (not possible to inherith because we use Self type + // to geometry (not possible to inherit because we use Self type // as template parameter of Dart_wrapper. If we inherit, Self is not // the correct type). template + class Traits_, class Items_, class Alloc_> class CMap_linear_cell_complex_storage_1 { public: + using Self=CMap_linear_cell_complex_storage_1; + using Use_index=CGAL::Tag_false; + using Concurrent_tag=typename internal::Get_concurrent_tag::type; + typedef typename Traits_::Point Point; typedef typename Traits_::Vector Vector; typedef typename Traits_::FT FT; - typedef CMap_linear_cell_complex_storage_1 Self; - typedef CGAL::Tag_false Use_index; - typedef internal::Combinatorial_map_helper Helper; typedef typename Items_::template Dart_wrapper Dart_wrapper; @@ -72,12 +69,14 @@ namespace CGAL { typedef typename internal::Container_type ::type Dart_container; - typedef typename Dart_container::iterator Dart_handle; - typedef typename Dart_container::const_iterator Dart_const_handle; + typedef typename Dart_container::iterator Dart_descriptor; + typedef typename Dart_container::const_iterator Dart_const_descriptor; typedef typename Dart_container::size_type size_type; - typedef std::nullptr_t Null_handle_type; - static const Null_handle_type null_handle; + typedef std::nullptr_t Null_descriptor_type; + inline static constexpr Null_descriptor_type null_descriptor=nullptr; + + using Type_for_compact_container=void*; typedef Items_ Items; typedef Alloc_ Alloc; @@ -85,7 +84,7 @@ namespace CGAL { struct Container_for_attributes : public internal::Container_type ::template rebind_alloc>::type + typename Allocator_traits::template rebind_alloc>::type {}; /// Typedef for attributes typedef typename internal::template Get_attributes_tuple::type @@ -95,11 +94,11 @@ namespace CGAL { struct Attribute_type: public Helper::template Attribute_type {}; template - struct Attribute_handle: public Helper::template Attribute_handle + struct Attribute_descriptor: public Helper::template Attribute_descriptor {}; template - struct Attribute_const_handle: - public Helper::template Attribute_const_handle + struct Attribute_const_descriptor: + public Helper::template Attribute_const_descriptor {}; template struct Attribute_range: public Helper::template Attribute_range @@ -110,14 +109,27 @@ namespace CGAL { {}; typedef typename Attribute_type<0>::type Vertex_attribute; - typedef typename Attribute_handle<0>::type Vertex_attribute_handle; - typedef typename Attribute_const_handle<0>::type - Vertex_attribute_const_handle; + typedef typename Attribute_descriptor<0>::type Vertex_attribute_descriptor; + typedef typename Attribute_const_descriptor<0>::type + Vertex_attribute_const_descriptor; typedef typename Attribute_range<0>::type Vertex_attribute_range; typedef typename Attribute_const_range<0>::type Vertex_attribute_const_range; + /// Deprecated types, keep for now for backward compatibility + using Dart_handle=Dart_descriptor; + using Dart_const_handle=Dart_const_descriptor; + + template + using Attribute_handle=Attribute_descriptor; + template + using Attribute_const_handle=Attribute_const_descriptor; + using Vertex_attribute_handle=Vertex_attribute_descriptor; + using Vertex_attribute_const_handle=Vertex_attribute_const_descriptor; + + inline static constexpr Null_descriptor_type null_handle=null_descriptor; + /// Number of marks static const size_type NB_MARKS = 32; @@ -126,87 +138,112 @@ namespace CGAL { typedef Handle_hash_function Hash_function; + typedef Dart_container Dart_range; + typedef const Dart_container Dart_const_range; + /// @return a Dart_range (range through all the darts of the map). + Dart_range& darts() { return mdarts;} + Dart_const_range& darts() const { return mdarts; } + // Init void init_storage() { // emplace null_dart; initialized in Combinatorial_map class - null_dart_handle = mnull_dart_container.emplace(); + null_dart_descriptor = mnull_dart_container.emplace(); + null_dart_handle=null_dart_descriptor; + } + + void clear_storage() + { + mnull_dart_container.clear(); } + /** Test if the map is empty. + * @return true iff the map is empty. + */ + bool is_empty() const + { return mdarts.empty(); } + + /// @return the number of darts. + size_type number_of_darts() const + { return mdarts.size(); } + + size_type upper_bound_on_dart_ids() const + { return 0; } + /** Return if this dart is free for adimension. * @param dh a dart handle * @param i the dimension. - * @return true iff dh is linked with nullptr for \em adimension. + * @return true iff dh is linked with null_dart_descriptor for \em adimension. */ template - bool is_free(Dart_const_handle dh) const + bool is_free(Dart_const_descriptor dh) const { CGAL_assertion( dh!=nullptr ); CGAL_assertion(i <= dimension); - return dh->mf[i]==null_dart_handle; + return dh->mf[i]==null_dart_descriptor; } - bool is_free(Dart_const_handle dh, unsigned int i) const + bool is_free(Dart_const_descriptor dh, unsigned int i) const { CGAL_assertion( dh!=nullptr ); CGAL_assertion(i <= dimension); - return dh->mf[i]==null_dart_handle; + return dh->mf[i]==null_dart_descriptor; } - bool is_perforated(Dart_const_handle /*dh*/) const + bool is_perforated(Dart_const_descriptor /*dh*/) const { return false; } /// Set simultaneously all the marks of this dart to a given value. - void set_dart_marks(Dart_const_handle ADart, + void set_dart_marks(Dart_const_descriptor ADart, const std::bitset& amarks) const { CGAL_assertion( ADart!=nullptr ); ADart->set_marks(amarks); } /// Return all the marks of a dart. - std::bitset get_dart_marks(Dart_const_handle ADart) const + std::bitset get_dart_marks(Dart_const_descriptor ADart) const { CGAL_assertion( ADart!=nullptr ); return ADart->get_marks(); } /// Return the mark value of dart a given mark number. - bool get_dart_mark(Dart_const_handle ADart, size_type amark) const + bool get_dart_mark(Dart_const_descriptor ADart, size_type amark) const { CGAL_assertion( ADart!=nullptr ); return ADart->get_mark(amark); } /// Set the mark of a given mark number to a given value. - void set_dart_mark(Dart_const_handle ADart, size_type amark, bool avalue) const + void set_dart_mark(Dart_const_descriptor ADart, size_type amark, bool avalue) const { CGAL_assertion( ADart!=nullptr ); ADart->set_mark(amark, avalue); } /// Flip the mark of a given mark number to a given value. - void flip_dart_mark(Dart_const_handle ADart, size_type amark) const + void flip_dart_mark(Dart_const_descriptor ADart, size_type amark) const { CGAL_assertion( ADart!=nullptr ); ADart->flip_mark(amark); } // Access to beta maps - Dart_handle get_beta(Dart_handle ADart, int B1) + Dart_descriptor get_beta(Dart_descriptor ADart, int B1) { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; } - Dart_const_handle get_beta(Dart_const_handle ADart, int B1) const + Dart_const_descriptor get_beta(Dart_const_descriptor ADart, int B1) const { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; } template - Dart_handle get_beta(Dart_handle ADart) + Dart_descriptor get_beta(Dart_descriptor ADart) { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; } template - Dart_const_handle get_beta(Dart_const_handle ADart) const + Dart_const_descriptor get_beta(Dart_const_descriptor ADart) const { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; @@ -214,31 +251,31 @@ namespace CGAL { // return a handle on the i-attribute template - typename Attribute_handle::type attribute(Dart_handle ADart) + typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> - (ADart->mattribute_handles); + (ADart->mattribute_descriptors); } template - typename Attribute_const_handle::type - attribute(Dart_const_handle ADart) const + typename Attribute_const_descriptor::type + attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> - (ADart->mattribute_handles); + (ADart->mattribute_descriptors); } // Copy a given attribute template - typename Attribute_handle::type copy_attribute - (typename Attribute_const_handle::type ah) + typename Attribute_descriptor::type copy_attribute + (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); - typename Attribute_handle::type res= + typename Attribute_descriptor::type res= std::get::value> (mattribute_containers).emplace(*ah); this->template init_attribute_ref_counting(res); @@ -247,7 +284,7 @@ namespace CGAL { // Test if a given attribute is valid template - bool is_valid_attribute(typename Attribute_const_handle::type ah) const + bool is_valid_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->is_valid(); @@ -256,25 +293,25 @@ namespace CGAL { // accessors and modifiers to the attribute ref counting given its handle template std::size_t get_attribute_ref_counting - (typename Attribute_const_handle::type ah) const + (typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->get_nb_refs(); } template - void init_attribute_ref_counting(typename Attribute_handle::type ah) + void init_attribute_ref_counting(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); ah->mrefcounting=0; } template - void inc_attribute_ref_counting(typename Attribute_handle::type ah) + void inc_attribute_ref_counting(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); ah->inc_nb_refs(); } template - void dec_attribute_ref_counting(typename Attribute_handle::type ah) + void dec_attribute_ref_counting(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); ah->dec_nb_refs(); @@ -283,14 +320,14 @@ namespace CGAL { // get the attribute given its handle template typename Attribute_type::type& - get_attribute(typename Attribute_handle::type ah) + get_attribute(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); return *ah; } template const typename Attribute_type::type& - get_attribute(typename Attribute_const_handle::type ah) const + get_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return *ah; @@ -298,14 +335,14 @@ namespace CGAL { // Get the dart of the given attribute template - Dart_handle dart_of_attribute(typename Attribute_handle::type ah) + Dart_descriptor dart_of_attribute(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); return ah->dart(); } template - Dart_const_handle - dart_of_attribute(typename Attribute_const_handle::type ah) const + Dart_const_descriptor + dart_of_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->dart(); @@ -313,30 +350,30 @@ namespace CGAL { // Set the dart of the given attribute template - void set_dart_of_attribute(typename Attribute_handle::type ah, - Dart_handle adart) + void set_dart_of_attribute(typename Attribute_descriptor::type ah, + Dart_descriptor adart) { CGAL_assertion( ah!=nullptr ); ah->set_dart(adart); } // Get the information associated with a given dart - Dart_info& info(Dart_handle adart) + Dart_info& info(Dart_descriptor adart) { return adart->info(); } - const Dart_info& info(Dart_const_handle adart) const + const Dart_info& info(Dart_const_descriptor adart) const { return adart->info(); } // Get the info of the given attribute template typename Attribute_type::type::Info & - info_of_attribute(typename Attribute_handle::type ah) + info_of_attribute(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); return ah->info(); } template const typename Attribute_type::type::Info & - info_of_attribute(typename Attribute_const_handle::type ah) const + info_of_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->info(); @@ -344,7 +381,7 @@ namespace CGAL { // Get the info of the i-cell attribute associated with the given dart template - typename Attribute_type::type::Info & info(Dart_handle adart) + typename Attribute_type::type::Info & info(Dart_descriptor adart) { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); @@ -352,7 +389,7 @@ namespace CGAL { } template const typename Attribute_type::type::Info & - info(Dart_const_handle adart) const + info(Dart_const_descriptor adart) const { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); @@ -361,14 +398,14 @@ namespace CGAL { // Get the dart of the i-cell attribute associated with the given dart template - Dart_handle dart(Dart_handle adart) + Dart_descriptor dart(Dart_descriptor adart) { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); return dart_of_attribute(attribute(adart)); } template - Dart_const_handle dart(Dart_const_handle adart) const + Dart_const_descriptor dart(Dart_const_descriptor adart) const { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); @@ -376,36 +413,40 @@ namespace CGAL { } // Get the dart of the given 0-attribute - Point & point_of_vertex_attribute(typename Attribute_handle<0>::type vh) + Point & point_of_vertex_attribute(typename Attribute_descriptor<0>::type vh) { CGAL_assertion( vh!=nullptr ); return get_attribute<0>(vh).point(); } const Point & point_of_vertex_attribute - (typename Attribute_const_handle<0>::type vh) const + (typename Attribute_const_descriptor<0>::type vh) const { CGAL_assertion( vh!=nullptr ); return get_attribute<0>(vh).point(); } // Debug function - void display_dart(Dart_const_handle ADart) const + void display_dart(Dart_const_descriptor ADart) const { std::cout< - void display_attribute(typename Attribute_const_handle::type ah) const + void display_attribute(typename Attribute_const_descriptor::type ah) const { std::cout<< std::get::value> (mattribute_containers).index(ah); } + template + size_type upper_bound_on_attribute_ids() const + { return 0; } + protected: // Set the handle on the i th attribute template - void basic_set_dart_attribute(Dart_handle dh, - typename Attribute_handle::type ah) + void basic_set_dart_attribute(Dart_descriptor dh, + typename Attribute_descriptor::type ah) { std::get::value> - (dh->mattribute_handles) = ah; + (dh->mattribute_descriptors) = ah; } /** Link a dart with a given dart for a given dimension. @@ -414,18 +455,18 @@ namespace CGAL { * @param i the dimension. */ template - void dart_link_beta(Dart_handle adart, Dart_handle adart2) + void dart_link_beta(Dart_descriptor adart, Dart_descriptor adart2) { CGAL_assertion(i <= dimension); CGAL_assertion(adart!=nullptr && adart2!=nullptr); - CGAL_assertion(adart!=null_dart_handle); + CGAL_assertion(adart!=null_dart_descriptor); adart->mf[i] = adart2; } - void dart_link_beta(Dart_handle adart, Dart_handle adart2, unsigned int i) + void dart_link_beta(Dart_descriptor adart, Dart_descriptor adart2, unsigned int i) { CGAL_assertion(i <= dimension); CGAL_assertion(adart!=nullptr && adart2!=nullptr); - CGAL_assertion(adart!=null_dart_handle); + CGAL_assertion(adart!=null_dart_descriptor); adart->mf[i] = adart2; } @@ -434,40 +475,33 @@ namespace CGAL { * @param i the dimension. */ template - void dart_unlink_beta(Dart_handle adart) + void dart_unlink_beta(Dart_descriptor adart) { CGAL_assertion(adart!=nullptr && i <= dimension); - adart->mf[i] = null_dart_handle; + adart->mf[i] = null_dart_descriptor; } - void dart_unlink_beta(Dart_handle adart, unsigned int i) + void dart_unlink_beta(Dart_descriptor adart, unsigned int i) { CGAL_assertion(adart!=nullptr && i <= dimension); - adart->mf[i] = null_dart_handle; + adart->mf[i] = null_dart_descriptor; } public: - /// Void dart. A dart d is i-free if beta_i(d)=null_dart_handle. - Dart_handle null_dart_handle; // Todo Dart_const_handle ?? + /// Void dart. A dart d is i-free if beta_i(d)=null_dart_descriptor. + Dart_descriptor null_dart_descriptor; // Todo Dart_const_descriptor ?? + Dart_descriptor null_dart_handle; // Deprecated: kept for backward compatibility protected: /// Dart container. Dart_container mdarts; - /// Container for the null_dart_handle. + /// Container for the null_dart_descriptor. Dart_container mnull_dart_container; /// Tuple of attributes containers typename Helper::Attribute_containers mattribute_containers; }; - /// null_handle - template - const typename CMap_linear_cell_complex_storage_1::Null_handle_type - CMap_linear_cell_complex_storage_1::null_handle = nullptr; - } // namespace CGAL #if defined(BOOST_GCC) diff --git a/thirdparty/CGAL/include/CGAL/CMap_linear_cell_complex_storages_with_index.h b/thirdparty/CGAL/include/CGAL/CMap_linear_cell_complex_storages_with_index.h new file mode 100644 index 00000000..9fd4d727 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/CMap_linear_cell_complex_storages_with_index.h @@ -0,0 +1,557 @@ +// Copyright (c) 2013 CNRS and LIRIS' Establishments (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages_with_index.h $ +// $Id: include/CGAL/CMap_linear_cell_complex_storages_with_index.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Guillaume Damiand +// +#ifndef CGAL_CMAP_LINEAR_CELL_COMPLEX_STORAGES_WITH_INDEX_H +#define CGAL_CMAP_LINEAR_CELL_COMPLEX_STORAGES_WITH_INDEX_H 1 + +#include +#include +#include + +#include +#if defined(BOOST_GCC) +_Pragma("GCC diagnostic push") +_Pragma("GCC diagnostic ignored \"-Warray-bounds\"") +#endif + +namespace CGAL { + + namespace internal { + template + struct Combinatorial_map_helper; + + template + struct Container_type; + } + + // Storage of darts with compact container, alpha using index + // Copy of Combinatorial_map_storage_with_index and add new types related + // to geometry (not possible to inherit because we use Self type + // as template parameter of Dart_wrapper. If we inherit, Self is not + // the correct type). + template + class CMap_linear_cell_complex_storage_with_index + { + public: + using Self=CMap_linear_cell_complex_storage_with_index; + using Use_index=CGAL::Tag_true; + using Concurrent_tag=typename internal::Get_concurrent_tag::type; + + typedef typename Traits_::Point Point; + typedef typename Traits_::Vector Vector; + typedef typename Traits_::FT FT; + + typedef internal::Combinatorial_map_helper Helper; + + using Index_type=typename internal::Get_index_type::type; + + typedef typename Items_::template Dart_wrapper Dart_wrapper; + + typedef typename internal::template Get_dart_info::type + Dart_info; + typedef CGAL::Dart Dart; + + typedef std::allocator_traits Allocator_traits; + typedef typename Allocator_traits::template rebind_alloc Dart_allocator; + + typedef Compact_container_with_index, Index_type> + Dart_container; + + typedef typename Dart_container::Index Dart_index; + + typedef Dart_index Dart_descriptor; + typedef Dart_index Dart_const_descriptor; + typedef typename Dart_container::size_type size_type; + + typedef Dart_index Null_descriptor_type; + static const Index_type null_descriptor=Dart_container::null_descriptor; + + using Type_for_compact_container=Index_type; + + typedef Items_ Items; + typedef Alloc_ Alloc; + template + struct Container_for_attributes : public + Compact_container_with_index, + Multiply_by_two_policy_for_cc_with_size<64>, size_type > + {}; + /// Typedef for attributes + typedef typename internal::template Get_attributes_tuple::type + Attributes; + + template + struct Attribute_type: public Helper::template Attribute_type + {}; + template + struct Attribute_descriptor: public Helper::template Attribute_descriptor + {}; + template + struct Attribute_const_descriptor: + public Helper::template Attribute_const_descriptor + {}; + template + struct Attribute_range: public Helper::template Attribute_range + {}; + template + struct Attribute_const_range: + public Helper::template Attribute_const_range + {}; + + typedef typename Attribute_type<0>::type Vertex_attribute; + typedef typename Attribute_descriptor<0>::type Vertex_attribute_descriptor; + typedef typename Attribute_const_descriptor<0>::type + Vertex_attribute_const_descriptor; + + typedef typename Attribute_range<0>::type Vertex_attribute_range; + typedef typename Attribute_const_range<0>::type + Vertex_attribute_const_range; + + /// Deprecated types, keep for now for backward compatibility + using Dart_handle=Dart_descriptor; + using Dart_const_handle=Dart_const_descriptor; + + template + using Attribute_handle=Attribute_descriptor; + template + using Attribute_const_handle=Attribute_const_descriptor; + using Vertex_attribute_handle=Vertex_attribute_descriptor; + using Vertex_attribute_const_handle=Vertex_attribute_const_descriptor; + + static const Index_type null_handle=null_descriptor; + + /// Number of marks + static const size_type NB_MARKS = 32; + + /// The dimension of the combinatorial map. + static const unsigned int dimension = d_; + + typedef internal::Index_hash_function Hash_function; + + //************************************************************************** + // Dart_range + struct Dart_range + { + typedef typename Dart_container::iterator iterator; + typedef typename Dart_container::const_iterator const_iterator; + Dart_range(Self &amap) : mmap(amap) + {} + iterator begin() + { + CGAL_assertion(!mmap.mdarts.empty()); // The container mdarts is not empty + // it has at least the null_dart + iterator res=mmap.mdarts.begin(); ++res; return res; + } + iterator end() { return mmap.mdarts.end(); } + const_iterator begin() const + { const_iterator res=mmap.mdarts.begin(); ++res; return res; } + const_iterator end() const { return mmap.mdarts.end(); } + size_type size() const + { return mmap.mdarts.size()-1; } + bool empty() const + { return size()==0; } // mmap.is_empty(); } + size_type index(Dart_index idx) const + { return idx; } + size_type index(const_iterator cit) const + { return cit; } + bool is_used(size_type i) const + { return mmap.mdarts.is_used(i); } + bool owns(size_type i) const + { return mmap.mdarts.owns(i); } + size_type capacity() const + { return mmap.mdarts.capacity(); } + size_type upper_bound() const + { return mmap.mdarts.upper_bound(); } + private: + Self & mmap; + }; + typedef const Dart_range Dart_const_range; + + /// @return a Dart_range (range through all the darts of the map). + Dart_range& darts() { return mdarts_range;} + Dart_const_range& darts() const { return mdarts_range; } + //************************************************************************** + + CMap_linear_cell_complex_storage_with_index() : mdarts_range(*this) + {} + + void init_storage() + { + // Allocate a dart for null_dart_descriptor + assert(mdarts.empty()); // the compact container is empty + Dart_index local_null_dart_descriptor = mdarts.emplace(); + if(local_null_dart_descriptor!=0) + { + std::cerr<<"[ERROR] fatal in CMap_linear_cell_complex_storage_with_index::init_storage" + < + bool is_free(Dart_const_descriptor dh) const + { + CGAL_assertion(i <= dimension); + return mdarts[dh].mf[i]==null_dart_descriptor; + } + bool is_free(Dart_const_descriptor dh, unsigned int i) const + { + CGAL_assertion(i <= dimension); + return mdarts[dh].mf[i]==null_dart_descriptor; + } + bool is_perforated(Dart_const_descriptor /*dh*/) const + { return false; } + + /// Set simultaneously all the marks of this dart to a given value. + void set_dart_marks(Dart_const_descriptor ADart, + const std::bitset& amarks) const + { + mdarts[ADart].set_marks(amarks); + } + /// Return all the marks of a dart. + std::bitset get_dart_marks(Dart_const_descriptor ADart) const + { + return mdarts[ADart].get_marks(); + } + /// Return the mark value of dart a given mark number. + bool get_dart_mark(Dart_const_descriptor ADart, size_type amark) const + { + return mdarts[ADart].get_mark(amark); + } + + /// Set the mark of a given mark number to a given value. + void set_dart_mark(Dart_const_descriptor ADart, size_type amark, bool avalue) const + { + mdarts[ADart].set_mark(amark, avalue); + } + + /// Flip the mark of a given mark number to a given value. + void flip_dart_mark(Dart_const_descriptor ADart, size_type amark) const + { + mdarts[ADart].flip_mark(amark); + } + + // Access to beta maps + Dart_descriptor get_beta(Dart_descriptor ADart, int B1) + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + Dart_const_descriptor get_beta(Dart_const_descriptor ADart, int B1) const + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + template + Dart_descriptor get_beta(Dart_descriptor ADart) + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + template + Dart_const_descriptor get_beta(Dart_const_descriptor ADart) const + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + + // return a handle on the i-attribute + template + typename Attribute_descriptor::type attribute(Dart_descriptor ADart) + { + static_assert(Helper::template Dimension_index::value>=0, + "attribute called but i-attributes are disabled."); + return std::get::value> + (mdarts[ADart].mattribute_descriptors); + } + template + typename Attribute_const_descriptor::type + attribute(Dart_const_descriptor ADart) const + { + static_assert(Helper::template Dimension_index::value>=0, + "attribute called but i-attributes are disabled."); + return std::get::value> + (mdarts[ADart].mattribute_descriptors); + } + + // Copy a given attribute + template + typename Attribute_descriptor::type copy_attribute + (typename Attribute_const_descriptor::type ah) + { + static_assert(Helper::template Dimension_index::value>=0, + "copy_attribute called but i-attributes are disabled."); + // We need to do a reserve before the emplace in order to avoid a bug of + // invalid reference when the container is reallocated. + std::get::value> + (mattribute_containers).reserve + (std::get::value> + (mattribute_containers).size()+1); + + typename Attribute_descriptor::type res= + std::get::value> + (mattribute_containers).emplace(get_attribute(ah)); + this->template init_attribute_ref_counting(res); + return res; + } + + // Test if a given attribute is valid + template + bool is_valid_attribute(typename Attribute_const_descriptor::type ah) const + { + return get_attribute(ah).is_valid(); + } + + // accessors and modifiers to the attribute ref counting given its handle + template + std::size_t get_attribute_ref_counting + (typename Attribute_const_descriptor::type ah) const + { + return get_attribute(ah).get_nb_refs(); + } + template + void init_attribute_ref_counting(typename Attribute_descriptor::type ah) + { + get_attribute(ah).mrefcounting=0; + } + template + void inc_attribute_ref_counting(typename Attribute_descriptor::type ah) + { + get_attribute(ah).inc_nb_refs(); + } + template + void dec_attribute_ref_counting(typename Attribute_descriptor::type ah) + { + get_attribute(ah).dec_nb_refs(); + } + + // get the attribute given its index + template + typename Attribute_type::type& + get_attribute(typename Attribute_descriptor::type ah) + { + CGAL_assertion( ah!=null_descriptor ); + return std::get::value> + (mattribute_containers)[ah]; + } + template + const typename Attribute_type::type& + get_attribute(typename Attribute_const_descriptor::type ah) const + { + CGAL_assertion( ah!=null_descriptor ); + return std::get::value> + (mattribute_containers)[ah]; + } + + // Get the dart of the given attribute + template + Dart_descriptor dart_of_attribute(typename Attribute_descriptor::type ah) + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).dart(); + } + template + Dart_const_descriptor + dart_of_attribute(typename Attribute_const_descriptor::type ah) const + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).dart(); + } + + // Set the dart of the given attribute + template + void set_dart_of_attribute(typename Attribute_descriptor::type ah, + Dart_descriptor adart) + { + CGAL_assertion( ah!=null_descriptor ); + get_attribute(ah).set_dart(adart); + } + + // Get the information associated with a given dart + Dart_info& info(Dart_descriptor adart) + { return mdarts[adart].info(); } + const Dart_info& info(Dart_const_descriptor adart) const + { return mdarts[adart].info(); } + + // Get the info of the given attribute + template + typename Attribute_type::type::Info & + info_of_attribute(typename Attribute_descriptor::type ah) + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).info(); + } + template + const typename Attribute_type::type::Info & + info_of_attribute(typename Attribute_const_descriptor::type ah) const + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).info(); + } + + // Get the info of the i-cell attribute associated with the given dart + template + typename Attribute_type::type::Info & info(Dart_descriptor adart) + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( this->template attribute(adart)!=null_descriptor ); + return info_of_attribute(attribute(adart)); + } + template + const typename Attribute_type::type::Info & + info(Dart_const_descriptor adart) const + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( attribute(adart)!=null_descriptor ); + return info_of_attribute(attribute(adart)); + } + + // Get the dart of the i-cell attribute associated with the given dart + template + Dart_descriptor dart(Dart_descriptor adart) + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( attribute(adart)!=null_descriptor ); + return dart_of_attribute(attribute(adart)); + } + template + Dart_const_descriptor dart(Dart_const_descriptor adart) const + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( attribute(adart)!=null_descriptor ); + return dart_of_attribute(attribute(adart)); + } + + // Get the dart of the given 0-attribute + Point & point_of_vertex_attribute(typename Attribute_descriptor<0>::type vh) + { + CGAL_assertion( vh!=null_descriptor ); + return get_attribute<0>(vh).point(); + } + + const Point & point_of_vertex_attribute + (typename Attribute_const_descriptor<0>::type vh) const + { + CGAL_assertion( vh!=null_descriptor ); + return get_attribute<0>(vh).point(); + } + + // Debug function + void display_dart(Dart_const_descriptor ADart) const + { std::cout< + void display_attribute(typename Attribute_const_descriptor::type ah) const + { std::cout< + size_type upper_bound_on_attribute_ids() const + { + return std::get::value> + (mattribute_containers).upper_bound(); + } + + protected: + // Set the handle on the i th attribute + template + void basic_set_dart_attribute(Dart_descriptor dh, + typename Attribute_descriptor::type ah) + { + std::get::value> + (mdarts[dh].mattribute_descriptors) = ah; + } + + /** Link a dart with a given dart for a given dimension. + * @param adart the dart to link. + * @param adart2 the dart to link with. + * @param i the dimension. + */ + template + void dart_link_beta(Dart_descriptor adart, Dart_descriptor adart2) + { + CGAL_assertion(i <= dimension); + CGAL_assertion(adart!=null_dart_descriptor); + mdarts[adart].mf[i] = adart2; + } + void dart_link_beta(Dart_descriptor adart, Dart_descriptor adart2, unsigned int i) + { + CGAL_assertion(i <= dimension); + CGAL_assertion(adart!=null_dart_descriptor); + mdarts[adart].mf[i] = adart2; + } + + /** Unlink a dart for a given dimension. + * @param adart a dart. + * @param i the dimension. + */ + template + void dart_unlink_beta(Dart_descriptor adart) + { + CGAL_assertion(i <= dimension); + mdarts[adart].mf[i] = null_dart_descriptor; + } + void dart_unlink_beta(Dart_descriptor adart, unsigned int i) + { + CGAL_assertion(i <= dimension); + mdarts[adart].mf[i] = null_dart_descriptor; + } + + public: + /// Void dart. A dart d is i-free if beta_i(d)=null_dart_descriptor. + Index_type null_dart_descriptor=0; + + // Deprecated: kept for backward compatibility + Index_type null_dart_handle=null_dart_descriptor; + + protected: + /// Dart container. + Dart_container mdarts; + Dart_range mdarts_range; + + /// Container for the null_dart_descriptor: unused; to be compatible with handle version + Dart_container mnull_dart_container; + + /// Tuple of attributes containers + typename Helper::Attribute_containers mattribute_containers; + }; + +} // namespace CGAL + +#if defined(BOOST_GCC) + _Pragma("GCC diagnostic pop") +#endif + +#endif // CGAL_CMAP_LINEAR_CELL_COMPLEX_STORAGES_WITH_INDEX_H // +// EOF // diff --git a/thirdparty/CGAL/include/CGAL/CORE/BigFloat.h b/thirdparty/CGAL/include/CGAL/CORE/BigFloat.h index 200a2d88..f32ba289 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/BigFloat.h +++ b/thirdparty/CGAL/include/CGAL/CORE/BigFloat.h @@ -14,11 +14,11 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/BigFloat.h $ - * $Id: BigFloat.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/BigFloat.h $ + * $Id: include/CGAL/CORE/BigFloat.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE/BigFloatRep.h b/thirdparty/CGAL/include/CGAL/CORE/BigFloatRep.h index 3f0ef9de..d716b677 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/BigFloatRep.h +++ b/thirdparty/CGAL/include/CGAL/CORE/BigFloatRep.h @@ -14,11 +14,11 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/BigFloatRep.h $ - * $Id: BigFloatRep.h 6680a6e 2021-11-09T16:20:48+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/BigFloatRep.h $ + * $Id: include/CGAL/CORE/BigFloatRep.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ @@ -91,7 +91,7 @@ class CGAL_CORE_EXPORT BigFloatRep : public RCRepImpl { void normal(); void bigNormal(BigInt&); - // arithmetics + // arithmetic public: void add(const BigFloatRep&, const BigFloatRep&); void sub(const BigFloatRep&, const BigFloatRep&); @@ -314,7 +314,7 @@ inline void BigFloatRep::eliminateTrailingZeroes() { } } -// bultin functions +// builtin functions inline extLong BigFloatRep::lMSB() const { if (!isZeroIn()) return extLong(floorLg(abs(m) - err)) + bits(exp); diff --git a/thirdparty/CGAL/include/CGAL/CORE/BigFloat_impl.h b/thirdparty/CGAL/include/CGAL/CORE/BigFloat_impl.h index 2166cae0..58663c00 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/BigFloat_impl.h +++ b/thirdparty/CGAL/include/CGAL/CORE/BigFloat_impl.h @@ -23,11 +23,11 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h $ - * $Id: BigFloat_impl.h b6e2656 2021-09-15T11:36:00+01:00 Andreas Fabri + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h $ + * $Id: include/CGAL/CORE/BigFloat_impl.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ @@ -97,7 +97,7 @@ const BigFloat& BigFloat::getOne() { CGAL_INLINE_FUNCTION BigFloat::BigFloat(const Expr& E, const extLong& r, const extLong& a) : RCBigFloat(new BigFloatRep()) { - *this = E.approx(r, a).BigFloatValue(); // lazy implementaion, any other way? + *this = E.approx(r, a).BigFloatValue(); // lazy implementation, any other way? } //////////////////////////////////////////////////////////// @@ -862,7 +862,7 @@ BigFloatRep::toDecimal(unsigned int width, bool Scientific) const { // the output is an integer (in which case it does not physically appear // but conceptually terminates the sequence of digits). - // First, get the decimal representaion of (m * B^(exp)). + // First, get the decimal representation of (m * B^(exp)). if (e2 < 0) { M *= FiveTo(-e2); // M = x * 10^(-e2) } else if (e2 > 0) { @@ -1077,7 +1077,7 @@ std::istream& BigFloatRep :: operator >>(std::istream& i) { } while (isspace(c)); /* loop if met end-of-file, or char read in is white-space. */ // Chen Li, "if (c == EOF)" is unsafe since c is of char type and - // EOF is of int tyep with a negative value -1 + // EOF is of int type with a negative value -1 if (i.eof()) { i.clear(std::ios::eofbit | std::ios::failbit); return i; @@ -1102,7 +1102,7 @@ std::istream& BigFloatRep :: operator >>(std::istream& i) { if (c == '.') d = 1; // Chen Li: fix a bug -- the sign of exponent can not happen before - // the character "e" appears! It must follow the "e' actually. + // the character "e" appears! It must follow the "e" actually. // if (e || c == '-' || c == '+') s = 1; if (e) s = 1; diff --git a/thirdparty/CGAL/include/CGAL/CORE/BigInt.h b/thirdparty/CGAL/include/CGAL/CORE/BigInt.h index 13b0485d..0d0924ef 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/BigInt.h +++ b/thirdparty/CGAL/include/CGAL/CORE/BigInt.h @@ -14,11 +14,11 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/BigInt.h $ - * $Id: BigInt.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/BigInt.h $ + * $Id: include/CGAL/CORE/BigInt.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ #ifndef _CORE_BIGINT_H_ @@ -37,7 +37,7 @@ class BigIntRep : public RCRepImpl { BigIntRep() { mpz_init(mp); } - // Note : should the copy-ctor be alloed at all ? [Sylvain Pion] + // Note : should the copy-ctor be allowed at all ? [Sylvain Pion] BigIntRep(const BigIntRep& z) : RCRepImpl() { mpz_init_set(mp, z.mp); } diff --git a/thirdparty/CGAL/include/CGAL/CORE/BigRat.h b/thirdparty/CGAL/include/CGAL/CORE/BigRat.h index ec10c3c6..affc98d1 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/BigRat.h +++ b/thirdparty/CGAL/include/CGAL/CORE/BigRat.h @@ -14,11 +14,11 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/BigRat.h $ - * $Id: BigRat.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/BigRat.h $ + * $Id: include/CGAL/CORE/BigRat.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ @@ -34,7 +34,7 @@ class BigRatRep : public RCRepImpl { BigRatRep() { mpq_init(mp); } - // Note : should the copy-ctor be alloed at all ? [Sylvain Pion] + // Note : should the copy-ctor be allowed at all ? [Sylvain Pion] BigRatRep(const BigRatRep& z) : RCRepImpl() { mpq_init(mp); mpq_set(mp, z.mp); diff --git a/thirdparty/CGAL/include/CGAL/CORE/CORE.h b/thirdparty/CGAL/include/CGAL/CORE/CORE.h index 3671a13f..f19f8a7d 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/CORE.h +++ b/thirdparty/CGAL/include/CGAL/CORE/CORE.h @@ -15,11 +15,11 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/CORE.h $ - * $Id: CORE.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/CORE.h $ + * $Id: include/CGAL/CORE/CORE.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE/Config.h b/thirdparty/CGAL/include/CGAL/CORE/Config.h index 22ed84e1..6693c91e 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/Config.h +++ b/thirdparty/CGAL/include/CGAL/CORE/Config.h @@ -5,8 +5,8 @@ * * This file is part of CGAL (www.cgal.org). * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/Config.h $ - * $Id: Config.h 26fb266 2019-10-19T16:28:33+02:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/Config.h $ + * $Id: include/CGAL/CORE/Config.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE/CoreAux.h b/thirdparty/CGAL/include/CGAL/CORE/CoreAux.h index e935c14c..4296a44e 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/CoreAux.h +++ b/thirdparty/CGAL/include/CGAL/CORE/CoreAux.h @@ -7,18 +7,18 @@ * * File: CoreAux.h * Synopsis: - * Auxilliary functions + * Auxiliary functions * * Written by * Chee Yap * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/CoreAux.h $ - * $Id: CoreAux.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/CoreAux.h $ + * $Id: include/CGAL/CORE/CoreAux.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE/CoreAux_impl.h b/thirdparty/CGAL/include/CGAL/CORE/CoreAux_impl.h index 3cab84a6..76620125 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/CoreAux_impl.h +++ b/thirdparty/CGAL/include/CGAL/CORE/CoreAux_impl.h @@ -15,11 +15,11 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h $ - * $Id: CoreAux_impl.h 625848e 2021-10-04T13:21:47+02:00 Mael Rouxel-Labbé + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h $ + * $Id: include/CGAL/CORE/CoreAux_impl.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE/CoreDefs.h b/thirdparty/CGAL/include/CGAL/CORE/CoreDefs.h index 92a1a0e7..c4145978 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/CoreDefs.h +++ b/thirdparty/CGAL/include/CGAL/CORE/CoreDefs.h @@ -17,11 +17,11 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/CoreDefs.h $ - * $Id: CoreDefs.h 3e03d50 2021-05-05T15:32:22+02:00 Maxime Gimeno + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/CoreDefs.h $ + * $Id: include/CGAL/CORE/CoreDefs.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE/CoreDefs_impl.h b/thirdparty/CGAL/include/CGAL/CORE/CoreDefs_impl.h index 634f149f..49c1e9f0 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/CoreDefs_impl.h +++ b/thirdparty/CGAL/include/CGAL/CORE/CoreDefs_impl.h @@ -14,11 +14,11 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h $ - * $Id: CoreDefs_impl.h 3e03d50 2021-05-05T15:32:22+02:00 Maxime Gimeno + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h $ + * $Id: include/CGAL/CORE/CoreDefs_impl.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ @@ -42,7 +42,7 @@ namespace CORE { // Note from 2014: does not seem to be used anywhere, and it is not declared // in CoreDefs.h so it is not accessible -// Left here for compatibilty when CGAL_HEADER_ONLY is not defined +// Left here for compatibility when CGAL_HEADER_ONLY is not defined int IOErrorFlag = 0; diff --git a/thirdparty/CGAL/include/CGAL/CORE/CoreIO_impl.h b/thirdparty/CGAL/include/CGAL/CORE/CoreIO_impl.h index b46e0d7c..94acb906 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/CoreIO_impl.h +++ b/thirdparty/CGAL/include/CGAL/CORE/CoreIO_impl.h @@ -11,11 +11,11 @@ * Zilin Du * Chee Yap * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h $ - * $Id: CoreIO_impl.h 8d4aaa9 2022-11-30T11:55:32+00:00 Andreas Fabri + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h $ + * $Id: include/CGAL/CORE/CoreIO_impl.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ @@ -274,7 +274,7 @@ CGAL_INLINE_FUNCTION void writeToFile(const BigInt& z, std::ostream& out, int base, int charsPerLine) { BigInt c = abs(z); - // get the absoulte value string + // get the absolute value string char* buffer = new char[mpz_sizeinbase(c.get_mp(), base) + 2]; mpz_get_str(buffer, base, c.get_mp()); std::size_t length = std::strlen(buffer); @@ -336,7 +336,7 @@ CGAL_INLINE_FUNCTION void writeToFile(const BigFloat& bf, std::ostream& out, int base, int charsPerLine) { BigInt c(CORE::abs(bf.m())); - // get the absoulte value string + // get the absolute value string char* buffer = new char[mpz_sizeinbase(c.get_mp(), base) + 2]; mpz_get_str(buffer, base, c.get_mp()); std::size_t length = std::strlen(buffer); diff --git a/thirdparty/CGAL/include/CGAL/CORE/Expr.h b/thirdparty/CGAL/include/CGAL/CORE/Expr.h index 9b9f8fe1..b617dc83 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/Expr.h +++ b/thirdparty/CGAL/include/CGAL/CORE/Expr.h @@ -18,11 +18,11 @@ * Sylvain Pion * Vikram Sharma * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/Expr.h $ - * $Id: Expr.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/Expr.h $ + * $Id: include/CGAL/CORE/Expr.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ @@ -209,7 +209,7 @@ class Expr : public RCExpr { *this -= 1; return *this; } - /// right deccrement operator (i--) + /// right decrement operator (i--) Expr operator--(int) { Expr t(*this); *this -= 1; @@ -365,7 +365,7 @@ CGAL_CORE_EXPORT Expr pow(const Expr&, unsigned long); inline Expr operator+(const Expr& e1, const Expr& e2) { return Expr(new AddRep(e1.Rep(), e2.Rep())); } -/// substraction +/// subtraction inline Expr operator-(const Expr& e1, const Expr& e2) { return Expr(new SubRep(e1.Rep(), e2.Rep())); } diff --git a/thirdparty/CGAL/include/CGAL/CORE/ExprRep.h b/thirdparty/CGAL/include/CGAL/CORE/ExprRep.h index 4ca77281..3285bafa 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/ExprRep.h +++ b/thirdparty/CGAL/include/CGAL/CORE/ExprRep.h @@ -18,11 +18,11 @@ * Sylvain Pion * Vikram Sharma * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/ExprRep.h $ - * $Id: ExprRep.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/ExprRep.h $ + * $Id: include/CGAL/CORE/ExprRep.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ @@ -145,7 +145,7 @@ struct NodeInfo { // class Expr; /// \class ExprRep -/// \brief The sharable, internal representation of expressions +/// \brief The shareable, internal representation of expressions // Members: private: int refCount, // public: NodeInfo* nodeInfo, // filteredFp ffVal. @@ -425,7 +425,7 @@ class CGAL_CORE_EXPORT ExprRep { extLong computeBound(); /// driver function to approximate void approx(const extLong& relPrec, const extLong& absPrec); - /// compute an approximate value satifying the specified precisions + /// compute an approximate value satisfying the specified precisions virtual void computeApproxValue(const extLong&, const extLong&) = 0; /// Test whether the current approx. value satisfies [relPrec, absPrec] bool withinKnownPrecision(const extLong&, const extLong&); @@ -1340,7 +1340,7 @@ inline int ExprRep::getExactSign() { } // Chee, 7/17/02: degreeBound() function is now -// taken out of "computeExactFlags() +// taken out of "computeExactFlags()" inline int ExprRep::getSign() { if (ffVal.isOK()) return ffVal.sign(); diff --git a/thirdparty/CGAL/include/CGAL/CORE/Expr_impl.h b/thirdparty/CGAL/include/CGAL/CORE/Expr_impl.h index 8abd7a6d..322afdbb 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/Expr_impl.h +++ b/thirdparty/CGAL/include/CGAL/CORE/Expr_impl.h @@ -16,11 +16,11 @@ * Zilin Du * Sylvain Pion * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/Expr_impl.h $ - * $Id: Expr_impl.h a8dbdc3 2021-11-16T16:44:43+01:00 Laurent Rineau + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/Expr_impl.h $ + * $Id: include/CGAL/CORE/Expr_impl.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ @@ -76,8 +76,8 @@ const Expr& Expr::getOne() { // Note: // // This function returns are two consecutive representable binary -// IEEE double values whichs contain the real value, but when you print out -// them, you might be confused by the decimal represention due to round. +// IEEE double values which contain the real value, but when you print out +// them, you might be confused by the decimal representation due to rounding. // CGAL_INLINE_FUNCTION void Expr::doubleInterval(double & lb, double & ub) const { @@ -354,7 +354,7 @@ void ExprRep::reduceTo(const ExprRep *e) { // we can ``reduce'' an Expression to a single node containing // a BigRat value. This reduction is done if the global variable // get_static_rationalReduceFlag()=true. The default value is false. - // This is the intepretation of ratFlag: + // This is the interpretation of ratFlag: // ratFlag < 0 means irrational // ratFlag = 0 means not initialized // ratFlag > 0 means rational diff --git a/thirdparty/CGAL/include/CGAL/CORE/Filter.h b/thirdparty/CGAL/include/CGAL/CORE/Filter.h index 12e018ea..12172ad0 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/Filter.h +++ b/thirdparty/CGAL/include/CGAL/CORE/Filter.h @@ -17,11 +17,11 @@ * Zilin Du * Chee Yap * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/Filter.h $ - * $Id: Filter.h 6c94c15 2020-05-05T14:40:55+02:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/Filter.h $ + * $Id: include/CGAL/CORE/Filter.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE/Gmp.h b/thirdparty/CGAL/include/CGAL/CORE/Gmp.h index 3013b3b6..9b5c1966 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/Gmp.h +++ b/thirdparty/CGAL/include/CGAL/CORE/Gmp.h @@ -5,8 +5,8 @@ * * This file is part of CGAL (www.cgal.org). * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/Gmp.h $ - * $Id: Gmp.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/Gmp.h $ + * $Id: include/CGAL/CORE/Gmp.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE/Gmp_impl.h b/thirdparty/CGAL/include/CGAL/CORE/Gmp_impl.h index 12a63fc6..52b2e486 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/Gmp_impl.h +++ b/thirdparty/CGAL/include/CGAL/CORE/Gmp_impl.h @@ -8,8 +8,8 @@ * * Zilin Du, 2003 * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/Gmp_impl.h $ - * $Id: Gmp_impl.h 12fd01d 2020-09-21T08:54:29+02:00 Ahmed Essam + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/Gmp_impl.h $ + * $Id: include/CGAL/CORE/Gmp_impl.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-only ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE/Impl.h b/thirdparty/CGAL/include/CGAL/CORE/Impl.h index 1bd2261d..d5f85b7b 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/Impl.h +++ b/thirdparty/CGAL/include/CGAL/CORE/Impl.h @@ -5,8 +5,8 @@ * * This file is part of CGAL (www.cgal.org). * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/Impl.h $ - * $Id: Impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/Impl.h $ + * $Id: include/CGAL/CORE/Impl.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE/MemoryPool.h b/thirdparty/CGAL/include/CGAL/CORE/MemoryPool.h index 92b059a8..4f33d562 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/MemoryPool.h +++ b/thirdparty/CGAL/include/CGAL/CORE/MemoryPool.h @@ -14,11 +14,11 @@ * Chee Yap * Sylvain Pion * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/MemoryPool.h $ - * $Id: MemoryPool.h 8a7d3fa 2020-07-21T17:32:30+02:00 Laurent Rineau + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/MemoryPool.h $ + * $Id: include/CGAL/CORE/MemoryPool.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ #ifndef _CORE_MEMORYPOOL_H_ diff --git a/thirdparty/CGAL/include/CGAL/CORE/Promote.h b/thirdparty/CGAL/include/CGAL/CORE/Promote.h index 78628fdf..6dc069d9 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/Promote.h +++ b/thirdparty/CGAL/include/CGAL/CORE/Promote.h @@ -18,11 +18,11 @@ * Sylvain Pion * Vikram Sharma * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/Promote.h $ - * $Id: Promote.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/Promote.h $ + * $Id: include/CGAL/CORE/Promote.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE/Real.h b/thirdparty/CGAL/include/CGAL/CORE/Real.h index f364b567..ecb51e88 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/Real.h +++ b/thirdparty/CGAL/include/CGAL/CORE/Real.h @@ -18,11 +18,11 @@ * Zilin Du * Sylvain Pion * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/Real.h $ - * $Id: Real.h 10e99cb 2020-07-22T09:51:07+02:00 Laurent Rineau + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/Real.h $ + * $Id: include/CGAL/CORE/Real.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ #ifndef _CORE_REAL_H_ @@ -115,7 +115,7 @@ class Real : public RCReal { *this += 1; return t; } - /// right deccrement operator (i--) + /// right decrement operator (i--) Real operator--(int) { Real t(*this); *this -= 1; @@ -168,7 +168,7 @@ class Real : public RCReal { } //@} - /// \name Aprroximation Function + /// \name Approximation Function //@{ /// approximation Real approx(const extLong& r=get_static_defRelPrec(), diff --git a/thirdparty/CGAL/include/CGAL/CORE/RealRep.h b/thirdparty/CGAL/include/CGAL/CORE/RealRep.h index 01dc0601..51339ce4 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/RealRep.h +++ b/thirdparty/CGAL/include/CGAL/CORE/RealRep.h @@ -16,11 +16,11 @@ * Zilin Du * Sylvain Pion * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/RealRep.h $ - * $Id: RealRep.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/RealRep.h $ + * $Id: include/CGAL/CORE/RealRep.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ #ifndef _CORE_REALREP_H_ @@ -459,7 +459,7 @@ inline unsigned long RealBigFloat::length() const { // The BigRat(BigFloat) actually is a // conversion operator (defined in BigFloat.h), _NOT_ // an ordinary class constructor! The C++ language - // specify that an intialization is not an assignment + // specify that an initialization is not an assignment // but a constructor operation! // Considering that BigRat(BigFloat) is a conversion // operator not really a constructor. The programmer's diff --git a/thirdparty/CGAL/include/CGAL/CORE/Real_impl.h b/thirdparty/CGAL/include/CGAL/CORE/Real_impl.h index 8c655073..cac9fd0a 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/Real_impl.h +++ b/thirdparty/CGAL/include/CGAL/CORE/Real_impl.h @@ -17,11 +17,11 @@ * Zilin Du * Sylvain Pion * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/Real_impl.h $ - * $Id: Real_impl.h b6e2656 2021-09-15T11:36:00+01:00 Andreas Fabri + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/Real_impl.h $ + * $Id: include/CGAL/CORE/Real_impl.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ @@ -96,7 +96,7 @@ extern BigInt FiveTo(unsigned long exp); // Note: // -- Zilin Du: 06/03/2003 // -- Original it is the code for Real's constructor for "const char*". -// I change it to a function so that two constrcutors can share the code. +// I change it to a function so that two constructors can share the code. // now it is private and no default value. // // --Default value of the argument "prec" is get_static_defInputDigits() @@ -209,7 +209,7 @@ std::istream& operator >>(std::istream& i, Real& x) { char read in is white-space. */ // Chen Li, // original "if (c == EOF) ..." is unsafe since c is of char type and - // EOF is of int tyep with a negative value -1 + // EOF is of int type with a negative value -1 if (i.eof()) { i.clear(std::ios::eofbit | std::ios::failbit); @@ -237,7 +237,7 @@ std::istream& operator >>(std::istream& i, Real& x) { if (c == '.') d = 1; // Chen Li: fix a bug -- the sign of exponent can not happen before - // the character "e" appears! It must follow the "e' actually. + // the character "e" appears! It must follow the "e" actually. // if (e || c == '-' || c == '+') s = 1; if (e) s = 1; diff --git a/thirdparty/CGAL/include/CGAL/CORE/RefCount.h b/thirdparty/CGAL/include/CGAL/CORE/RefCount.h index fd7a71e3..9d84e6f7 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/RefCount.h +++ b/thirdparty/CGAL/include/CGAL/CORE/RefCount.h @@ -35,11 +35,11 @@ * Zilin Du * Chee Yap * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/RefCount.h $ - * $Id: RefCount.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/RefCount.h $ + * $Id: include/CGAL/CORE/RefCount.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE/Timer.h b/thirdparty/CGAL/include/CGAL/CORE/Timer.h index e5bb58b7..f9b7e694 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/Timer.h +++ b/thirdparty/CGAL/include/CGAL/CORE/Timer.h @@ -23,11 +23,11 @@ * Written by * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/Timer.h $ - * $Id: Timer.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/Timer.h $ + * $Id: include/CGAL/CORE/Timer.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE/extLong.h b/thirdparty/CGAL/include/CGAL/CORE/extLong.h index d1e98f05..5d973de6 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/extLong.h +++ b/thirdparty/CGAL/include/CGAL/CORE/extLong.h @@ -17,11 +17,11 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/extLong.h $ - * $Id: extLong.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/extLong.h $ + * $Id: include/CGAL/CORE/extLong.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE/extLong_impl.h b/thirdparty/CGAL/include/CGAL/CORE/extLong_impl.h index 4813ba76..d76b4965 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/extLong_impl.h +++ b/thirdparty/CGAL/include/CGAL/CORE/extLong_impl.h @@ -21,11 +21,11 @@ * Zilin Du * Sylvain Pion * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/extLong_impl.h $ - * $Id: extLong_impl.h 627a7b2 2020-04-27T17:08:35+02:00 Maxime Gimeno + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/extLong_impl.h $ + * $Id: include/CGAL/CORE/extLong_impl.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ @@ -177,7 +177,7 @@ extLong extLong::operator- () const { // sign // You should check "flag" before calling this, otherwise -// you cannot interprete the returned value! +// you cannot interpret the returned value! CGAL_INLINE_FUNCTION int extLong::sign() const { if (flag == 2) diff --git a/thirdparty/CGAL/include/CGAL/CORE/linearAlgebra.h b/thirdparty/CGAL/include/CGAL/CORE/linearAlgebra.h index 5a7ed006..635d2f75 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/linearAlgebra.h +++ b/thirdparty/CGAL/include/CGAL/CORE/linearAlgebra.h @@ -5,8 +5,8 @@ * * This file is part of CGAL (www.cgal.org). * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/linearAlgebra.h $ - * $Id: linearAlgebra.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/linearAlgebra.h $ + * $Id: include/CGAL/CORE/linearAlgebra.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ /****************************************************************** @@ -22,10 +22,10 @@ * Written by * Shubin Zhao (shubinz@cs.nyu.edu) (2001) * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $Id: linearAlgebra.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $Id: include/CGAL/CORE/linearAlgebra.h a484bfa $ *****************************************************************/ #ifndef CORE_LINEAR_ALGEBRA_H diff --git a/thirdparty/CGAL/include/CGAL/CORE/poly/Curves.h b/thirdparty/CGAL/include/CGAL/CORE/poly/Curves.h index 49b9e3d1..5281bc1b 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/poly/Curves.h +++ b/thirdparty/CGAL/include/CGAL/CORE/poly/Curves.h @@ -49,11 +49,11 @@ * Author: Vikram Sharma and Chee Yap * Date: April 12, 2004 * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/poly/Curves.h $ - * $Id: Curves.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/poly/Curves.h $ + * $Id: include/CGAL/CORE/poly/Curves.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ @@ -147,7 +147,7 @@ class BiPoly{ //BiPoly(deg, d[], C[]): // Takes in a list of list of coefficients. - // Each cofficient list represents a polynomial in X + // Each coefficient list represents a polynomial in X // // deg - ydeg of the bipoly // d[] - array containing the degrees of each coefficient (i.e., X poly) @@ -414,7 +414,7 @@ class Curve : public BiPoly { //Curve(deg, d[], C[]): // Takes in a list of list of coefficients. - // Each cofficient list represents a polynomial in X + // Each coefficient list represents a polynomial in X // // deg - ydeg of the bipoly // d[] - array containing the degrees of each coefficient (i.e., X poly) diff --git a/thirdparty/CGAL/include/CGAL/CORE/poly/Curves.tcc b/thirdparty/CGAL/include/CGAL/CORE/poly/Curves.tcc index d9be8479..4a9c8fb9 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/poly/Curves.tcc +++ b/thirdparty/CGAL/include/CGAL/CORE/poly/Curves.tcc @@ -16,7 +16,7 @@ * Author: Vikram Sharma and Chee Yap * Date: April 12, 2004 * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ @@ -92,7 +92,7 @@ BiPoly::BiPoly(Polynomial p, bool flag){ //BiPoly(deg, d[], C[]): // Takes in a list of list of coefficients. - // Each cofficient list represents a polynomial in X + // Each coefficient list represents a polynomial in X // // deg - ydeg of the bipoly // d[] - array containing the degrees of each coefficient (i.e., X poly) @@ -1101,7 +1101,7 @@ Curve::Curve(Polynomial p, bool flag) //Curve(deg, d[], C[]): // Takes in a list of list of coefficients. - // Each cofficient list represents a polynomial in X + // Each coefficient list represents a polynomial in X // // deg - ydeg of the bipoly // d[] - array containing the degrees of each coefficient (i.e., X poly) diff --git a/thirdparty/CGAL/include/CGAL/CORE/poly/Poly.h b/thirdparty/CGAL/include/CGAL/CORE/poly/Poly.h index e1b9094d..5501e338 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/poly/Poly.h +++ b/thirdparty/CGAL/include/CGAL/CORE/poly/Poly.h @@ -36,11 +36,11 @@ * Author: Chee Yap * Date: May 28, 2002 * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/poly/Poly.h $ - * $Id: Poly.h bd172e5 2020-07-21T17:15:45+02:00 Laurent Rineau + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/poly/Poly.h $ + * $Id: include/CGAL/CORE/poly/Poly.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE/poly/Poly.tcc b/thirdparty/CGAL/include/CGAL/CORE/poly/Poly.tcc index 325f64d5..604a86ad 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/poly/Poly.tcc +++ b/thirdparty/CGAL/include/CGAL/CORE/poly/Poly.tcc @@ -30,7 +30,7 @@ * Author: Chee Yap, Sylvain Pion and Vikram Sharma * Date: May 28, 2002 * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/thirdparty/CGAL/include/CGAL/CORE/poly/Sturm.h b/thirdparty/CGAL/include/CGAL/CORE/poly/Sturm.h index 666d27eb..585de4a3 100644 --- a/thirdparty/CGAL/include/CGAL/CORE/poly/Sturm.h +++ b/thirdparty/CGAL/include/CGAL/CORE/poly/Sturm.h @@ -19,7 +19,7 @@ * It is very important that the BigFloats used in these intervals * have no error at the beginning, and this is maintained * by refinement. Note that if x, y are error-free BigFloats, - * then (x+y)/2 may not be error-free (in current implementaion. + * then (x+y)/2 may not be error-free (in current implementation. * We have to call a special "exact divide by 2" method, * (x+y).div2() for this purpose. * @@ -37,11 +37,11 @@ * Author: Chee Yap and Sylvain Pion, Vikram Sharma * Date: July 20, 2002 * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/CORE/poly/Sturm.h $ - * $Id: Sturm.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/CORE/poly/Sturm.h $ + * $Id: include/CGAL/CORE/poly/Sturm.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/CORE_BigFloat.h b/thirdparty/CGAL/include/CGAL/CORE_BigFloat.h index e4e80373..acced6af 100644 --- a/thirdparty/CGAL/include/CGAL/CORE_BigFloat.h +++ b/thirdparty/CGAL/include/CGAL/CORE_BigFloat.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/CORE_BigFloat.h $ -// $Id: CORE_BigFloat.h 152a084 2021-09-21T13:34:58+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/CORE_BigFloat.h $ +// $Id: include/CGAL/CORE_BigFloat.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/CORE_BigInt.h b/thirdparty/CGAL/include/CGAL/CORE_BigInt.h index 4874c762..1ec02fd7 100644 --- a/thirdparty/CGAL/include/CGAL/CORE_BigInt.h +++ b/thirdparty/CGAL/include/CGAL/CORE_BigInt.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/CORE_BigInt.h $ -// $Id: CORE_BigInt.h 152a084 2021-09-21T13:34:58+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/CORE_BigInt.h $ +// $Id: include/CGAL/CORE_BigInt.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/CORE_BigRat.h b/thirdparty/CGAL/include/CGAL/CORE_BigRat.h index ea09797c..f891a241 100644 --- a/thirdparty/CGAL/include/CGAL/CORE_BigRat.h +++ b/thirdparty/CGAL/include/CGAL/CORE_BigRat.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/CORE_BigRat.h $ -// $Id: CORE_BigRat.h 152a084 2021-09-21T13:34:58+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/CORE_BigRat.h $ +// $Id: include/CGAL/CORE_BigRat.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/CORE_Expr.h b/thirdparty/CGAL/include/CGAL/CORE_Expr.h index 56cffc57..0195a4a2 100644 --- a/thirdparty/CGAL/include/CGAL/CORE_Expr.h +++ b/thirdparty/CGAL/include/CGAL/CORE_Expr.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/CORE_Expr.h $ -// $Id: CORE_Expr.h 152a084 2021-09-21T13:34:58+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/CORE_Expr.h $ +// $Id: include/CGAL/CORE_Expr.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -173,7 +173,11 @@ template <> class Real_embeddable_traits< CORE::Expr > }; }; -} //namespace CGAL +inline const CORE::Expr& approx(const CORE::Expr& d) { return d; } +inline const CORE::Expr& exact(const CORE::Expr& d) { return d; } +inline int depth(const CORE::Expr&){ return -1; } + +} // namespace CGAL //since types are included by CORE_coercion_traits.h: #include diff --git a/thirdparty/CGAL/include/CGAL/CORE_algebraic_number_traits.h b/thirdparty/CGAL/include/CGAL/CORE_algebraic_number_traits.h index 71eb452f..a096a24c 100644 --- a/thirdparty/CGAL/include/CGAL/CORE_algebraic_number_traits.h +++ b/thirdparty/CGAL/include/CGAL/CORE_algebraic_number_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/CORE_algebraic_number_traits.h $ -// $Id: CORE_algebraic_number_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/CORE_algebraic_number_traits.h $ +// $Id: include/CGAL/CORE_algebraic_number_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -202,7 +202,7 @@ class CORE_algebraic_number_traits /*! * Compute the square root of an algebraic number. * \param x The number. - * \return The sqaure root of x. + * \return The square root of x. * \pre x is non-negative. */ Algebraic sqrt (const Algebraic& x) const diff --git a/thirdparty/CGAL/include/CGAL/CORE_arithmetic_kernel.h b/thirdparty/CGAL/include/CGAL/CORE_arithmetic_kernel.h index 25a8e049..739c5f37 100644 --- a/thirdparty/CGAL/include/CGAL/CORE_arithmetic_kernel.h +++ b/thirdparty/CGAL/include/CGAL/CORE_arithmetic_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arithmetic_kernel/include/CGAL/CORE_arithmetic_kernel.h $ -// $Id: CORE_arithmetic_kernel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arithmetic_kernel/include/CGAL/CORE_arithmetic_kernel.h $ +// $Id: include/CGAL/CORE_arithmetic_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Hemmer @@ -42,7 +42,7 @@ class CORE_arithmetic_kernel : public internal::Arithmetic_kernel_base { public: //! exact integers typedef CORE::BigInt Integer; - //! exact float nummber + //! exact float number typedef CORE::BigRat Exact_float_number; //! exact rationals, constructible from integers typedef CORE::BigRat Rational; diff --git a/thirdparty/CGAL/include/CGAL/CORE_coercion_traits.h b/thirdparty/CGAL/include/CGAL/CORE_coercion_traits.h index b9445aa5..baaaee9d 100644 --- a/thirdparty/CGAL/include/CGAL/CORE_coercion_traits.h +++ b/thirdparty/CGAL/include/CGAL/CORE_coercion_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/CORE_coercion_traits.h $ -// $Id: CORE_coercion_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/CORE_coercion_traits.h $ +// $Id: include/CGAL/CORE_coercion_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -138,7 +138,7 @@ template <> struct Coercion_traits< ::CORE::Expr, CORE::BigFloat > -// not provieded by CORE +// not provided by CORE // Note that this is not symmetric to LEDA //CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long long ,::CORE::BigInt) //CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long long ,::CORE::BigRat) diff --git a/thirdparty/CGAL/include/CGAL/Cache.h b/thirdparty/CGAL/include/CGAL/Cache.h index 22912999..c52a34de 100644 --- a/thirdparty/CGAL/include/CGAL/Cache.h +++ b/thirdparty/CGAL/include/CGAL/Cache.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Cache.h $ -// $Id: Cache.h f55ef7d 2020-10-09T18:36:17+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Cache.h $ +// $Id: include/CGAL/Cache.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Hemmer diff --git a/thirdparty/CGAL/include/CGAL/Cartesian.h b/thirdparty/CGAL/include/CGAL/Cartesian.h index f44236cb..d90ad4fd 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian.h $ -// $Id: Cartesian.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian.h $ +// $Id: include/CGAL/Cartesian.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_2.h index 57d6e38a..3b1a51df 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_2.h $ -// $Id: Aff_transformation_2.h e73b8de 2021-04-22T21:17:24+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_2.h $ +// $Id: include/CGAL/Cartesian/Aff_transformation_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_3.h index 69e474dc..3a707f63 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_3.h $ -// $Id: Aff_transformation_3.h 153413e 2021-04-15T13:58:33+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_3.h $ +// $Id: include/CGAL/Cartesian/Aff_transformation_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_rep_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_rep_2.h index 17404c85..d8b18e3c 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_rep_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_rep_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_2.h $ -// $Id: Aff_transformation_rep_2.h e73b8de 2021-04-22T21:17:24+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_2.h $ +// $Id: include/CGAL/Cartesian/Aff_transformation_rep_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_rep_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_rep_3.h index 554f8f99..cee1e4c3 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_rep_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Aff_transformation_rep_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_3.h $ -// $Id: Aff_transformation_rep_3.h e73b8de 2021-04-22T21:17:24+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_3.h $ +// $Id: include/CGAL/Cartesian/Aff_transformation_rep_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Cartesian_base.h b/thirdparty/CGAL/include/CGAL/Cartesian/Cartesian_base.h index 05c96c48..081c3749 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Cartesian_base.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Cartesian_base.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Cartesian_base.h $ -// $Id: Cartesian_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Cartesian_base.h $ +// $Id: include/CGAL/Cartesian/Cartesian_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Circle_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Circle_2.h index ac6b847c..ea97cfe1 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Circle_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Circle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Circle_2.h $ -// $Id: Circle_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Circle_2.h $ +// $Id: include/CGAL/Cartesian/Circle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Circle_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Circle_3.h index 59aa6dff..4747678b 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Circle_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Circle_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Circle_3.h $ -// $Id: Circle_3.h 4a30144 2021-06-23T17:37:47+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Circle_3.h $ +// $Id: include/CGAL/Cartesian/Circle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Pedro Machado, Sebastien Loriot diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/ConicCPA2.h b/thirdparty/CGAL/include/CGAL/Cartesian/ConicCPA2.h index 1ef4b067..16fc1691 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/ConicCPA2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/ConicCPA2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/ConicCPA2.h $ -// $Id: ConicCPA2.h fdb17cb 2020-03-26T19:26:10+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/ConicCPA2.h $ +// $Id: include/CGAL/Cartesian/ConicCPA2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Data_accessor_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Data_accessor_2.h index dd9682f6..d57e0278 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Data_accessor_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Data_accessor_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Data_accessor_2.h $ -// $Id: Data_accessor_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Data_accessor_2.h $ +// $Id: include/CGAL/Cartesian/Data_accessor_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Direction_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Direction_2.h index 21a7be19..54569b93 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Direction_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Direction_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Direction_2.h $ -// $Id: Direction_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Direction_2.h $ +// $Id: include/CGAL/Cartesian/Direction_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Direction_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Direction_3.h index 5ef389e4..4ec8da75 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Direction_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Direction_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Direction_3.h $ -// $Id: Direction_3.h d39c774 2022-03-17T12:14:43+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Direction_3.h $ +// $Id: include/CGAL/Cartesian/Direction_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Is_trivial_construction.h b/thirdparty/CGAL/include/CGAL/Cartesian/Is_trivial_construction.h new file mode 100644 index 00000000..1bf88536 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Is_trivial_construction.h @@ -0,0 +1,466 @@ +// Copyright (c) 2022 GeometryFactory Sarl (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Is_trivial_construction.h $ +// $Id: include/CGAL/Cartesian/Is_trivial_construction.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Laurent Rineau + +#ifndef CGAL_CARTESIAN_IS_TRIVIAL_CONSTRUCTION_H +#define CGAL_CARTESIAN_IS_TRIVIAL_CONSTRUCTION_H + +#include +#include +#include +#include +#include + +namespace CGAL { +namespace CartesianFunctors { + +template +struct Is_trivial_construction_base +{ + // If the return type of the construction, with the specified arguments, is a + // reference or an iterator, them the construction is necessarily trivial. + using return_type = decltype(std::declval()(std::declval()...)); + enum { + value = std::is_reference::value || CGAL::is_iterator::value + }; +}; + +template +struct Is_trivial_construction : public Is_trivial_construction_base +{}; + +template +struct Is_trivial_construction, Args...> + : public Tag_true +{}; + +template +struct Is_trivial_construction, Args...> + : public Tag_true +{}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::RT RT; + + static Tag_true trivial(Return_base_tag, Origin); + static Tag_true trivial(Return_base_tag, RT, RT); + static Tag_true trivial(Origin); + static Tag_true trivial(RT, RT); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::RT RT; + + static Tag_true trivial(Return_base_tag, Origin); + static Tag_true trivial(Return_base_tag, RT, RT, RT); + static Tag_true trivial(Origin); + static Tag_true trivial(RT, RT, RT); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::FT FT; + typedef typename K::Point_2 Point_2; + + static Tag_true trivial(Return_base_tag, Origin); + static Tag_true trivial(Return_base_tag, Point_2, FT); + static Tag_true trivial(Return_base_tag, FT, FT); + static Tag_true trivial(Point_2, FT); + static Tag_true trivial(Origin); + static Tag_true trivial(FT, FT); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::FT FT; + typedef typename K::Point_3 Point_3; + + static Tag_true trivial(Return_base_tag, Origin); + static Tag_true trivial(Return_base_tag, Point_3, FT); + static Tag_true trivial(Return_base_tag, FT, FT, FT); + static Tag_true trivial(Point_3, FT); + static Tag_true trivial(Origin); + static Tag_true trivial(FT, FT, FT); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::RT RT; + typedef typename K::Point_2 Point_2; + + static Tag_true trivial(Return_base_tag, Null_vector); + static Tag_true trivial(Return_base_tag, Origin, Point_2); + static Tag_true trivial(Return_base_tag, RT, RT); + static Tag_true trivial(Null_vector); + static Tag_true trivial(Origin, Point_2); + static Tag_true trivial(RT, RT); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::RT RT; + typedef typename K::Point_3 Point; + typedef typename K::Line_3 Line; + + static Tag_true trivial(Return_base_tag, Null_vector); + static Tag_true trivial(Return_base_tag, Origin, Point); + static Tag_true trivial(Return_base_tag, RT, RT, RT); + static Tag_true trivial(Return_base_tag, Line); + static Tag_true trivial(Null_vector); + static Tag_true trivial(Origin, Point); + static Tag_true trivial(RT, RT, RT); + static Tag_true trivial(Line); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::RT RT; + typedef typename K::Vector_2 Vector; + + static Tag_true trivial(Return_base_tag, RT, RT); + static Tag_true trivial(Return_base_tag, Vector); + static Tag_true trivial(RT, RT); + static Tag_true trivial(Vector); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::RT RT; + typedef typename K::Vector_3 Vector; + + static Tag_true trivial(Return_base_tag, RT, RT, RT); + static Tag_true trivial(Return_base_tag, Vector); + static Tag_true trivial(RT, RT, RT); + static Tag_true trivial(Vector); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::RT RT; + + static Tag_true trivial(Return_base_tag, RT, RT, RT); + static Tag_true trivial(RT, RT, RT); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::Point_3 Point; + typedef typename K::Vector_3 Vector; + typedef typename K::Direction_3 Direction; + + static Tag_true trivial(Return_base_tag, Point, Vector); + static Tag_true trivial(Return_base_tag, Point, Direction); + static Tag_true trivial(Point, Vector); + static Tag_true trivial(Point, Direction); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::Point_2 Point; + + static Tag_true trivial(Return_base_tag, Point, Point); + static Tag_true trivial(Point, Point); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::Point_3 Point; + + static Tag_true trivial(Return_base_tag, Point, Point); + static Tag_true trivial(Point, Point); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::FT FT; + typedef typename K::Point_2 Point; + + static Tag_true trivial(Return_base_tag, Point, FT, Orientation); + static Tag_true trivial(Return_base_tag, Point, Orientation); + static Tag_true trivial(Point, FT, Orientation); + static Tag_true trivial(Point, Orientation); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::Point_2 Point_2; + typedef typename K::Circle_2 Circle_2; + + static Tag_true trivial(Point_2); + static Tag_true trivial(Circle_2); + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::Point_3 Point_3; + typedef typename K::Circle_3 Circle_3; + typedef typename K::Sphere_3 Sphere_3; + + static Tag_true trivial(Point_3); + static Tag_true trivial(Circle_3); + static Tag_true trivial(Sphere_3); + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::Point_2 Point; + typedef typename K::RT RT; + + static Tag_true trivial(Return_base_tag, Point, Point); + static Tag_true trivial(Return_base_tag, Point, Point, int); + static Tag_true trivial(Return_base_tag, Point, Point, Point, Point); + static Tag_true trivial(Return_base_tag, RT, RT, RT, RT); + static Tag_true trivial(Point, Point); + static Tag_true trivial(Point, Point, int); + static Tag_true trivial(Point, Point, Point, Point); + static Tag_true trivial(RT, RT, RT, RT); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::Point_3 Point; + typedef typename K::RT RT; + + static Tag_true trivial(Return_base_tag, Point, Point); + static Tag_true trivial(Return_base_tag, Point, Point, int); + static Tag_true trivial(Return_base_tag, Point, Point, Point, Point, Point, Point); + static Tag_true trivial(Return_base_tag, RT, RT, RT, RT, RT, RT); + static Tag_true trivial(Point, Point); + static Tag_true trivial(Point, Point, int); + static Tag_true trivial(Point, Point, Point, Point, Point, Point); + static Tag_true trivial(RT, RT, RT, RT, RT, RT); +\ + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::Point_2 Point; + + static Tag_true trivial(Return_base_tag, Point, Point); + static Tag_true trivial(Point, Point); +\ + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::Point_3 Point; + + static Tag_true trivial(Return_base_tag, Point, Point); + static Tag_true trivial(Point, Point); +\ + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> : public Tag_true +{}; + +template +struct Is_trivial_construction, Args...> : public Tag_true +{}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::RT RT; + typedef typename K::Circle_3 Circle; + + static Tag_true trivial(Return_base_tag, RT, RT, RT, RT); + static Tag_true trivial(Return_base_tag, Circle); + static Tag_true trivial(RT, RT, RT, RT); + static Tag_true trivial(Circle); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::FT FT; + typedef typename K::Point_3 Point_3; + typedef typename K::Circle_3 Circle_3; + + static Tag_true trivial(Return_base_tag, Point_3, FT, Orientation); + static Tag_true trivial(Return_base_tag, Point_3, Orientation); + static Tag_true trivial(Return_base_tag, Circle_3); + static Tag_true trivial(Point_3, FT, Orientation); + static Tag_true trivial(Point_3, Orientation); + static Tag_true trivial(Circle_3); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> +{ + typedef typename K::Plane_3 Plane_3; + typedef typename K::Sphere_3 Sphere_3; + + static Tag_true trivial(Return_base_tag, Plane_3, Sphere_3, int); + static Tag_true trivial(Plane_3, Sphere_3, int); + static Tag_true trivial(Sphere_3, Plane_3, int); + + static Tag_false trivial(...); + + enum { value = decltype(trivial(std::declval>()...))::value || + Is_trivial_construction_base, Args...>::value + }; +}; + +template +struct Is_trivial_construction, Args...> : public Tag_true +{}; + +template +struct Is_trivial_construction, Args...> : public Tag_true +{}; + +} // end namespace CartesianFunctors +} // end namespace CGAL + +#endif // CGAL_CARTESIAN_IS_TRIVIAL_CONSTRUCTION_H diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Iso_cuboid_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Iso_cuboid_3.h index 79dc5404..9644f80a 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Iso_cuboid_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Iso_cuboid_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h $ -// $Id: Iso_cuboid_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h $ +// $Id: include/CGAL/Cartesian/Iso_cuboid_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Iso_rectangle_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Iso_rectangle_2.h index 39b3c811..1525e13f 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Iso_rectangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Iso_rectangle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h $ -// $Id: Iso_rectangle_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h $ +// $Id: include/CGAL/Cartesian/Iso_rectangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Line_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Line_2.h index c03b1e37..7b3a6600 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Line_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Line_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Line_2.h $ -// $Id: Line_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Line_2.h $ +// $Id: include/CGAL/Cartesian/Line_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Line_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Line_3.h index 171e11f8..92f253a3 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Line_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Line_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Line_3.h $ -// $Id: Line_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Line_3.h $ +// $Id: include/CGAL/Cartesian/Line_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/MatrixC33.h b/thirdparty/CGAL/include/CGAL/Cartesian/MatrixC33.h index 7ed0c8cf..6fd71cf2 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/MatrixC33.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/MatrixC33.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Cartesian/MatrixC33.h $ -// $Id: MatrixC33.h ff09c5d 2019-10-25T16:35:53+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Cartesian/MatrixC33.h $ +// $Id: include/CGAL/Cartesian/MatrixC33.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -18,7 +18,7 @@ #include #include -#include +#include namespace CGAL { @@ -131,6 +131,13 @@ class MatrixC33 return Vector_3(v*m.r0(), v*m.r1(), v*m.r2()); } + friend std::ostream& operator<<(std::ostream & os, const MatrixC33& m) +{ + return os << m.r0() << std::endl + << m.r1() << std::endl + << m.r2() << std::endl; +} + RT determinant() const { return CGAL::determinant(r0().x(), r0().y(), r0().z(), @@ -200,11 +207,11 @@ MatrixC33 adjoint_matrix(const MatrixC33& m) } template -boost::optional< MatrixC33 > inverse_matrix(const MatrixC33& m) +std::optional< MatrixC33 > inverse_matrix(const MatrixC33& m) { typedef typename R::RT RT; typedef MatrixC33 Matrix; - typedef boost::optional result_type; + typedef std::optional result_type; result_type rInverse; diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Plane_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Plane_3.h index 96c2e5f5..7d71fb52 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Plane_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Plane_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Plane_3.h $ -// $Id: Plane_3.h 71bba3e 2022-03-17T22:35:09+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Plane_3.h $ +// $Id: include/CGAL/Cartesian/Plane_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Point_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Point_2.h index 9df21ff3..e0c72ddb 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Point_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Point_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Point_2.h $ -// $Id: Point_2.h cca0a19 2022-04-12T16:14:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Point_2.h $ +// $Id: include/CGAL/Cartesian/Point_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Point_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Point_3.h index aa6f3549..0fd4a73a 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Point_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Point_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Point_3.h $ -// $Id: Point_3.h cca0a19 2022-04-12T16:14:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Point_3.h $ +// $Id: include/CGAL/Cartesian/Point_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Ray_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Ray_2.h index 8277febe..77c66907 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Ray_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Ray_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Ray_2.h $ -// $Id: Ray_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Ray_2.h $ +// $Id: include/CGAL/Cartesian/Ray_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Ray_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Ray_3.h index 095bdf32..ec56a5c1 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Ray_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Ray_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Ray_3.h $ -// $Id: Ray_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Ray_3.h $ +// $Id: include/CGAL/Cartesian/Ray_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Reflection_rep_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Reflection_rep_2.h index 969e20a5..372cb266 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Reflection_rep_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Reflection_rep_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Reflection_rep_2.h $ -// $Id: Reflection_rep_2.h e73b8de 2021-04-22T21:17:24+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Reflection_rep_2.h $ +// $Id: include/CGAL/Cartesian/Reflection_rep_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Rotation_rep_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Rotation_rep_2.h index cd693f4b..cb3ee464 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Rotation_rep_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Rotation_rep_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Rotation_rep_2.h $ -// $Id: Rotation_rep_2.h e73b8de 2021-04-22T21:17:24+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Rotation_rep_2.h $ +// $Id: include/CGAL/Cartesian/Rotation_rep_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Scaling_rep_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Scaling_rep_2.h index 18b7cc04..2f466d6c 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Scaling_rep_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Scaling_rep_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Scaling_rep_2.h $ -// $Id: Scaling_rep_2.h e73b8de 2021-04-22T21:17:24+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Scaling_rep_2.h $ +// $Id: include/CGAL/Cartesian/Scaling_rep_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Scaling_rep_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Scaling_rep_3.h index 4bce378d..158b1d35 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Scaling_rep_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Scaling_rep_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Scaling_rep_3.h $ -// $Id: Scaling_rep_3.h e73b8de 2021-04-22T21:17:24+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Scaling_rep_3.h $ +// $Id: include/CGAL/Cartesian/Scaling_rep_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Segment_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Segment_2.h index 2e569b58..2f527280 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Segment_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Segment_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Segment_2.h $ -// $Id: Segment_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Segment_2.h $ +// $Id: include/CGAL/Cartesian/Segment_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Segment_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Segment_3.h index 194cc5d5..bacb02a2 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Segment_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Segment_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Segment_3.h $ -// $Id: Segment_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Segment_3.h $ +// $Id: include/CGAL/Cartesian/Segment_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Sphere_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Sphere_3.h index 11f9e1d7..2b216cc8 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Sphere_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Sphere_3.h $ -// $Id: Sphere_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Sphere_3.h $ +// $Id: include/CGAL/Cartesian/Sphere_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Tetrahedron_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Tetrahedron_3.h index 07b6ad0e..cae41ecc 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Tetrahedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Tetrahedron_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Tetrahedron_3.h $ -// $Id: Tetrahedron_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Tetrahedron_3.h $ +// $Id: include/CGAL/Cartesian/Tetrahedron_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Translation_rep_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Translation_rep_2.h index 7ca22a2d..b1b4c46a 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Translation_rep_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Translation_rep_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Translation_rep_2.h $ -// $Id: Translation_rep_2.h e73b8de 2021-04-22T21:17:24+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Translation_rep_2.h $ +// $Id: include/CGAL/Cartesian/Translation_rep_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Translation_rep_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Translation_rep_3.h index a154d18c..9ea1f2d4 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Translation_rep_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Translation_rep_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Translation_rep_3.h $ -// $Id: Translation_rep_3.h e73b8de 2021-04-22T21:17:24+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Translation_rep_3.h $ +// $Id: include/CGAL/Cartesian/Translation_rep_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Triangle_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Triangle_2.h index 3fc04d8c..97561eed 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Triangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Triangle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Triangle_2.h $ -// $Id: Triangle_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Triangle_2.h $ +// $Id: include/CGAL/Cartesian/Triangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Triangle_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Triangle_3.h index 2310aa06..f7beacf1 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Triangle_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Triangle_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Triangle_3.h $ -// $Id: Triangle_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Triangle_3.h $ +// $Id: include/CGAL/Cartesian/Triangle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Vector_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Vector_2.h index c2931ab8..0a3556ef 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Vector_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Vector_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Vector_2.h $ -// $Id: Vector_2.h cca0a19 2022-04-12T16:14:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Vector_2.h $ +// $Id: include/CGAL/Cartesian/Vector_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Vector_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Vector_3.h index 06923928..14319b18 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Vector_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Vector_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Vector_3.h $ -// $Id: Vector_3.h cca0a19 2022-04-12T16:14:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Vector_3.h $ +// $Id: include/CGAL/Cartesian/Vector_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Weighted_point_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/Weighted_point_2.h index 32205089..d8d36453 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Weighted_point_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Weighted_point_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Weighted_point_2.h $ -// $Id: Weighted_point_2.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Weighted_point_2.h $ +// $Id: include/CGAL/Cartesian/Weighted_point_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mariette Yvinec diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/Weighted_point_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/Weighted_point_3.h index 5a8dd88a..dc09fd7d 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/Weighted_point_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/Weighted_point_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/Weighted_point_3.h $ -// $Id: Weighted_point_3.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/Weighted_point_3.h $ +// $Id: include/CGAL/Cartesian/Weighted_point_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mariette Yvinec diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/basic_constructions_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/basic_constructions_2.h index b7a6ddf0..325b1ca1 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/basic_constructions_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/basic_constructions_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/basic_constructions_2.h $ -// $Id: basic_constructions_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/basic_constructions_2.h $ +// $Id: include/CGAL/Cartesian/basic_constructions_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/basic_constructions_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/basic_constructions_3.h index 1df9fde7..7e4a51e1 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/basic_constructions_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/basic_constructions_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/basic_constructions_3.h $ -// $Id: basic_constructions_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/basic_constructions_3.h $ +// $Id: include/CGAL/Cartesian/basic_constructions_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/ft_constructions_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/ft_constructions_2.h index 45d7efa3..ddee7943 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/ft_constructions_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/ft_constructions_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/ft_constructions_2.h $ -// $Id: ft_constructions_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/ft_constructions_2.h $ +// $Id: include/CGAL/Cartesian/ft_constructions_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/ft_constructions_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/ft_constructions_3.h index c6969376..249646d3 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/ft_constructions_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/ft_constructions_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/ft_constructions_3.h $ -// $Id: ft_constructions_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/ft_constructions_3.h $ +// $Id: include/CGAL/Cartesian/ft_constructions_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/function_objects.h b/thirdparty/CGAL/include/CGAL/Cartesian/function_objects.h index fef0510e..506d4a55 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/function_objects.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/function_objects.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h $ -// $Id: function_objects.h 1916290 2022-03-21T18:04:03+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h $ +// $Id: include/CGAL/Cartesian/function_objects.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,6 +17,7 @@ #ifndef CGAL_CARTESIAN_FUNCTION_OBJECTS_H #define CGAL_CARTESIAN_FUNCTION_OBJECTS_H +#include #include #include #include @@ -445,14 +446,14 @@ namespace CartesianKernelFunctors { } template - result_type + Needs_FT operator()(const T1& p, const T2& q, const T3& r) const { return CGAL::compare(squared_distance(p, q), squared_distance(p, r)); } template - result_type + Needs_FT operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return CGAL::compare(squared_distance(p, q), squared_distance(r, s)); @@ -591,14 +592,14 @@ namespace CartesianKernelFunctors { } template - result_type + Needs_FT operator()(const T1& p, const T2& q, const T3& r) const { return CGAL::compare(squared_distance(p, q), squared_distance(p, r)); } template - result_type + Needs_FT operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return CGAL::compare(squared_distance(p, q), squared_distance(r, s)); @@ -631,7 +632,6 @@ namespace CartesianKernelFunctors { typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; typedef typename K::Equal_2 Equal_2; - typedef typename K::Less_signed_distance_to_line_2 Less_signed_distance_to_line_2; public: typedef typename K::Comparison_result result_type; @@ -641,7 +641,8 @@ namespace CartesianKernelFunctors { const Point_2& c, const Point_2& d) const { CGAL_kernel_precondition_code(Equal_2 equal;) - CGAL_kernel_precondition(! equal(a,b)); + CGAL_kernel_precondition(! equal(a,b)); + return cmp_signed_dist_to_lineC2( a.x(), a.y(), b.x(), b.y(), c.x(), c.y(), @@ -651,10 +652,9 @@ namespace CartesianKernelFunctors { result_type operator()(const Line_2& l, const Point_2& p, const Point_2& q) const { - Less_signed_distance_to_line_2 less = K().less_signed_distance_to_line_2_object(); - if (less(l, p, q)) return SMALLER; - if (less(l, q, p)) return LARGER; - return EQUAL; + return cmp_signed_dist_to_directionC2(l.a(), l.b(), + p.x(), p.y(), + q.x(), q.y()); } }; @@ -669,28 +669,34 @@ namespace CartesianKernelFunctors { result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s, const FT& ft) const { - return CGAL::compare(squared_radiusC3(p.x(), p.y(), p.z(), - q.x(), q.y(), q.z(), - r.x(), r.y(), r.z(), - s.x(), s.y(), s.z() ), - ft); + FT num, den; + squared_radiusC3(p.x(), p.y(), p.z(), + q.x(), q.y(), q.z(), + r.x(), r.y(), r.z(), + s.x(), s.y(), s.z(), + num, den); + return CGAL::compare(num, den * ft); } result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r, const FT& ft) const { - return CGAL::compare(squared_radiusC3(p.x(), p.y(), p.z(), - q.x(), q.y(), q.z(), - r.x(), r.y(), r.z()), - ft); + FT num, den; + squared_radiusC3(p.x(), p.y(), p.z(), + q.x(), q.y(), q.z(), + r.x(), r.y(), r.z(), + num, den); + return CGAL::compare(num, den * ft); } result_type operator()(const Point_3& p, const Point_3& q, const FT& ft) const { - return CGAL::compare(squared_radiusC3(p.x(), p.y(), p.z(), - q.x(), q.y(), q.z() ), - ft); + FT num, den; + squared_radiusC3(p.x(), p.y(), p.z(), + q.x(), q.y(), q.z(), + num, den); + return CGAL::compare(num, den * ft); } result_type @@ -1235,26 +1241,35 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q) const { - return squared_radiusC3(p.x(), p.y(), p.z(), - q.x(), q.y(), q.z()); + FT num, den; + squared_radiusC3(p.x(), p.y(), p.z(), + q.x(), q.y(), q.z(), + num, den); + return num / den; } result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r) const { - return squared_radiusC3(p.x(), p.y(), p.z(), - q.x(), q.y(), q.z(), - r.x(), r.y(), r.z()); + FT num, den; + squared_radiusC3(p.x(), p.y(), p.z(), + q.x(), q.y(), q.z(), + r.x(), r.y(), r.z(), + num, den); + return num / den; } result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const { - return squared_radiusC3(p.x(), p.y(), p.z(), - q.x(), q.y(), q.z(), - r.x(), r.y(), r.z(), - s.x(), s.y(), s.z()); + FT num, den; + squared_radiusC3(p.x(), p.y(), p.z(), + q.x(), q.y(), q.z(), + r.x(), r.y(), r.z(), + s.x(), s.y(), s.z(), + num, den); + return num / den; } }; @@ -2506,7 +2521,7 @@ namespace CartesianKernelFunctors { FT rsy = psz*qsx-psx*qsz; FT rsz = psx*qsy-psy*qsx; - // The following determinants can be developped and simplified. + // The following determinants can be developed and simplified. // // FT num_x = determinant(psy,psz,ps2, // qsy,qsz,qs2, @@ -3962,7 +3977,7 @@ namespace CartesianKernelFunctors { operator()(const Circle_3 &a, const Point_3 &p) const { return a.rep().has_on(p); } - result_type + Needs_FT operator()(const Sphere_3 &a, const Circle_3 &p) const { return a.rep().has_on(p); } @@ -4206,8 +4221,7 @@ namespace CartesianKernelFunctors { public: typedef typename K::Orientation result_type; - result_type - operator()(const Point_2& p, const Point_2& q, const Point_2& r) const + result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { return orientationC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/line_constructions_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/line_constructions_2.h index f5faa1f5..7b8d611d 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/line_constructions_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/line_constructions_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/line_constructions_2.h $ -// $Id: line_constructions_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/line_constructions_2.h $ +// $Id: include/CGAL/Cartesian/line_constructions_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/plane_constructions_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/plane_constructions_3.h index aee7b884..806d020b 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/plane_constructions_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/plane_constructions_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/plane_constructions_3.h $ -// $Id: plane_constructions_3.h a7fc2c9 2022-03-22T08:01:30+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/plane_constructions_3.h $ +// $Id: include/CGAL/Cartesian/plane_constructions_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -41,6 +41,23 @@ plane_from_points(const typename R::Point_3 &p, return PlaneC3(a, b, c, d); } + +template +CGAL_KERNEL_LARGE_INLINE +PlaneC3 +plane_from_points(Origin, + const typename R::Point_3 &q, + const typename R::Point_3 &r) +{ + typename R::FT a, b, c, d(0); + plane_from_pointsC3( /* origin, */ + q.x(), q.y(), q.z(), + r.x(), r.y(), r.z(), + a, b, c); + return PlaneC3(a, b, c, d); +} + + template CGAL_KERNEL_LARGE_INLINE PlaneC3 @@ -53,7 +70,7 @@ plane_from_point_direction(const typename R::Point_3 &p, return PlaneC3(A, B, C, D); } - template +template CGAL_KERNEL_LARGE_INLINE PlaneC3 plane_from_point_direction(Origin, diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/point_constructions_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/point_constructions_2.h index d72f099d..04063d26 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/point_constructions_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/point_constructions_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/point_constructions_2.h $ -// $Id: point_constructions_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/point_constructions_2.h $ +// $Id: include/CGAL/Cartesian/point_constructions_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/point_constructions_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/point_constructions_3.h index 2a8efc9e..5b6873fb 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/point_constructions_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/point_constructions_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/point_constructions_3.h $ -// $Id: point_constructions_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/point_constructions_3.h $ +// $Id: include/CGAL/Cartesian/point_constructions_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_directions_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_directions_2.h index aabf29d5..0c46cbbf 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_directions_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_directions_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/predicates_on_directions_2.h $ -// $Id: predicates_on_directions_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/predicates_on_directions_2.h $ +// $Id: include/CGAL/Cartesian/predicates_on_directions_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_planes_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_planes_3.h index 495e8988..b17cb756 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_planes_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_planes_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/predicates_on_planes_3.h $ -// $Id: predicates_on_planes_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/predicates_on_planes_3.h $ +// $Id: include/CGAL/Cartesian/predicates_on_planes_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_points_2.h b/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_points_2.h index be8683fb..e3a5d997 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_points_2.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_points_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/predicates_on_points_2.h $ -// $Id: predicates_on_points_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/predicates_on_points_2.h $ +// $Id: include/CGAL/Cartesian/predicates_on_points_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_points_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_points_3.h index 42282dca..0e969ab7 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_points_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/predicates_on_points_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/predicates_on_points_3.h $ -// $Id: predicates_on_points_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/predicates_on_points_3.h $ +// $Id: include/CGAL/Cartesian/predicates_on_points_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian/solve_3.h b/thirdparty/CGAL/include/CGAL/Cartesian/solve_3.h index 37e2de31..8e9637c4 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian/solve_3.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian/solve_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian/solve_3.h $ -// $Id: solve_3.h a4c57e6 2021-03-21T19:35:41+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian/solve_3.h $ +// $Id: include/CGAL/Cartesian/solve_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian_converter.h b/thirdparty/CGAL/include/CGAL/Cartesian_converter.h index 6bb502b0..3e8ada60 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian_converter.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian_converter.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Cartesian_converter.h $ -// $Id: Cartesian_converter.h 3a0a4a6 2021-12-17T12:22:40+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Cartesian_converter.h $ +// $Id: include/CGAL/Cartesian_converter.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -55,7 +56,7 @@ struct Default_converter { // Out will be a variant, source kernel and target kernel template -struct Converting_visitor : boost::static_visitor<> { +struct Converting_visitor{ Converting_visitor(const Converter& conv, Output& out) : conv(&conv), out(&out) {} const Converter* conv; Output* out; @@ -108,6 +109,12 @@ class Cartesian_converter : public Enum_converter return n; } + Return_base_tag + operator()(Return_base_tag o) const + { + return o; + } + const Bbox_2& operator()(const Bbox_2& b) const { @@ -129,7 +136,7 @@ class Cartesian_converter : public Enum_converter template T operator()(const T t, - typename std::enable_if::value>::type* = nullptr) const + std::enable_if_t::value>* = nullptr) const { return t; } @@ -138,13 +145,13 @@ class Cartesian_converter : public Enum_converter // from the sequence, transform with the type mapper and throw the // new list into a variant // visit to get the type, and copy construct inside the return type - template + template typename - Type_mapper< boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >, + Type_mapper< std::optional< std::variant< U ... > >, K1, K2 >::type - operator()(const boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >& o) const { + operator()(const std::optional< std::variant< U ... > >& o) const { typedef typename - Type_mapper< boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >, + Type_mapper< std::optional< std::variant< U ... > >, K1, K2 >::type result_type; result_type res; if(!o) { @@ -154,22 +161,22 @@ class Cartesian_converter : public Enum_converter internal::Converting_visitor conv_visitor = internal::Converting_visitor(*this, res); - boost::apply_visitor(conv_visitor, *o); + std::visit(conv_visitor, *o); return res; } - template + template typename - Type_mapper< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) >, + Type_mapper< std::variant< U ... >, K1, K2 >::type - operator()(const boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > & o) const { + operator()(const std::variant< U ... > & o) const { typedef typename - Type_mapper< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) >, + Type_mapper< std::variant< U ... >, K1, K2 >::type result_type; result_type res; internal::Converting_visitor conv_visitor = internal::Converting_visitor(*this, res); - boost::apply_visitor(conv_visitor, o); + std::visit(conv_visitor, o); return res; } diff --git a/thirdparty/CGAL/include/CGAL/Cartesian_converter_fwd.h b/thirdparty/CGAL/include/CGAL/Cartesian_converter_fwd.h index 84ecb56c..ee64f7d3 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian_converter_fwd.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian_converter_fwd.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/Cartesian_converter_fwd.h $ -// $Id: Cartesian_converter_fwd.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/Cartesian_converter_fwd.h $ +// $Id: include/CGAL/Cartesian_converter_fwd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // diff --git a/thirdparty/CGAL/include/CGAL/Cartesian_d.h b/thirdparty/CGAL/include/CGAL/Cartesian_d.h index 70c5c8a2..c64eca9c 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian_d.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Cartesian_d.h $ -// $Id: Cartesian_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Cartesian_d.h $ +// $Id: include/CGAL/Cartesian_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include @@ -71,7 +71,7 @@ class Cartesian_d typedef typename Point_d_base::Cartesian_const_iterator Cartesian_const_iterator_d; - // Boolean had originally been Bool. It was renamed to avoid a conflict + // Boolean had originally been Bool. It was renamed to avoid a conflict // between a macro defined in Xlib.h poorly chosen to have the same name, // that is 'Bool'. typedef typename Same_uncertainty_nt::type diff --git a/thirdparty/CGAL/include/CGAL/Cartesian_matrix.h b/thirdparty/CGAL/include/CGAL/Cartesian_matrix.h index 09cbbb0e..9695cb1c 100644 --- a/thirdparty/CGAL/include/CGAL/Cartesian_matrix.h +++ b/thirdparty/CGAL/include/CGAL/Cartesian_matrix.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Matrix_search/include/CGAL/Cartesian_matrix.h $ -// $Id: Cartesian_matrix.h 557cf7f 2021-01-29T10:36:59+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Matrix_search/include/CGAL/Cartesian_matrix.h $ +// $Id: include/CGAL/Cartesian_matrix.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #include -#include +#include #include namespace CGAL { @@ -28,11 +28,7 @@ template < class Operation, class Cartesian_matrix { public: -#if CGAL_CXX17 && __has_cpp_attribute(nodiscard) typedef typename std::invoke_result::value_type, typename std::iterator_traits::value_type>::type Value; -#else - typedef typename Operation::result_type Value; -#endif Cartesian_matrix(RandomAccessIC_row r_f, RandomAccessIC_row r_l, @@ -67,8 +63,8 @@ class Cartesian_matrix { Value operator()(int r, int c) const { - CGAL_optimisation_precondition(r >= 0 && r < number_of_rows()); - CGAL_optimisation_precondition(c >= 0 && c < number_of_columns()); + CGAL_precondition(r >= 0 && r < number_of_rows()); + CGAL_precondition(c >= 0 && c < number_of_columns()); return op(row_vec[r], column_vec[c]); } diff --git a/thirdparty/CGAL/include/CGAL/Cell_attribute.h b/thirdparty/CGAL/include/CGAL/Cell_attribute.h index 5fb8513d..76bc9eae 100644 --- a/thirdparty/CGAL/include/CGAL/Cell_attribute.h +++ b/thirdparty/CGAL/include/CGAL/Cell_attribute.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Cell_attribute.h $ -// $Id: Cell_attribute.h 84ca88f 2021-10-19T20:16:43+02:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Cell_attribute.h $ +// $Id: include/CGAL/Cell_attribute.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -15,63 +15,53 @@ #include #include #include +#include namespace CGAL { - template - class Compact_container; +template +class Compact_container; - template - class Concurrent_compact_container; +template +class Concurrent_compact_container; - template - class Combinatorial_map_storage_1; +template +class Compact_container_with_index; - template - class Generalized_map_storage_1; +template +class Combinatorial_map_storage_1; - template - class CMap_linear_cell_complex_storage_1; +template +class Combinatorial_map_storage_with_index; - template - class GMap_linear_cell_complex_storage_1; +template +class Generalized_map_storage_1; - namespace internal { +template +class Generalized_map_storage_with_index; - template - struct Init_id; +template +class CMap_linear_cell_complex_storage_1; - } // end namespace internal +template +class CMap_linear_cell_complex_storage_with_index; - /** @file Cell_attribute.h - * Definition of cell attribute, with or without info. - */ +template +class GMap_linear_cell_complex_storage_1; - /// Info associated with a cell_attribute. - template - class Info_for_cell_attribute - { - public: - /// Contructor without parameter. - Info_for_cell_attribute() - {} +template +class GMap_linear_cell_complex_storage_with_index; - /// Contructor with an info in parameter. - Info_for_cell_attribute(const Info& ainfo) : minfo(ainfo) - {} +namespace internal { - /// Get the info associated with the cell_attribute. - Info& info() - { return minfo; } +template +struct Init_id; - /// Get the info associated with the cell_attribute. - const Info& info() const - { return minfo; } +} // end namespace internal - protected: - /// The info associated with the cell_attribute. - Info minfo; - }; + /** @file Cell_attribute.h + * Definition of cell attribute, with or without info. + */ /// Id associated with a cell attribute template @@ -108,23 +98,38 @@ namespace CGAL { OnMerge, OnSplit, WithID>: public Add_id { - template + template + friend class Compact_container; + + template + friend class Concurrent_compact_container; + + template + friend class Compact_container_with_index; + + template friend class Combinatorial_map_storage_1; - template + template + friend class Combinatorial_map_storage_with_index; + + template friend class Generalized_map_storage_1; - template + template + friend class Generalized_map_storage_with_index; + + template friend class CMap_linear_cell_complex_storage_1; - template - friend class GMap_linear_cell_complex_storage_1; + template + friend class CMap_linear_cell_complex_storage_with_index; - template - friend class Compact_container; + template + friend class GMap_linear_cell_complex_storage_1; - template - friend class Concurrent_compact_container; + template + friend class GMap_linear_cell_complex_storage_with_index; template friend struct internal::Init_id; @@ -132,30 +137,32 @@ namespace CGAL { public: typedef Tag_false Supports_cell_dart; - typedef typename Refs::Dart_handle Dart_handle; - typedef typename Refs::Dart_const_handle Dart_const_handle; + typedef typename Refs::Dart_descriptor Dart_descriptor; + typedef typename Refs::Dart_const_descriptor Dart_const_descriptor; typedef typename Refs::Alloc Alloc; typedef OnMerge On_merge; typedef OnSplit On_split; typedef WithID Has_id; + using Type_for_compact_container=typename Refs::Type_for_compact_container; /// operator = Cell_attribute_without_info& operator=(const Cell_attribute_without_info& acell) { - mrefcounting = acell.mrefcounting; + mrefcounting=acell.mrefcounting; + m_for_cc=acell.m_for_cc; return *this; } /// Get the dart associated with the cell. - Dart_handle dart() { return Refs::null_handle; } + Dart_descriptor dart() { return Refs::null_descriptor; } /// Get the dart associated with the cell. - Dart_const_handle dart() const { return Refs::null_handle; } + Dart_const_descriptor dart() const { return Refs::null_descriptor; } /// Set the dart associated with the cell. - void set_dart(Dart_handle) {} + void set_dart(Dart_descriptor) {} /// Test if the cell is valid. /// For cell without dart, return always true. @@ -169,11 +176,11 @@ namespace CGAL { { return !operator==(other); } protected: - /// Contructor without parameter. - Cell_attribute_without_info(): mrefcounting(0) + /// Constructor without parameter. + Cell_attribute_without_info(): mrefcounting(0), m_for_cc(Refs::null_descriptor) {} - /// Copy contructor. + /// Copy constructor. Cell_attribute_without_info(const Cell_attribute_without_info& acell): mrefcounting(acell.mrefcounting) {} @@ -181,32 +188,30 @@ namespace CGAL { protected: /// Increment the reference counting. void inc_nb_refs() - { mrefcounting+=4; } // 4 because the two lowest bits are reserved for cc + { ++mrefcounting; } /// Decrement the reference counting. void dec_nb_refs() { - CGAL_assertion( mrefcounting>=4 ); - mrefcounting-=4; // 4 because the two lowest bits are reserved for cc + CGAL_assertion( mrefcounting>0 ); + --mrefcounting; } public: /// Get the reference counting. std::size_t get_nb_refs() const - { return (mrefcounting>>2); } // >>2 to ignore the 2 least significant bits + { return mrefcounting; } - void * for_compact_container() const - { return vp; } - void for_compact_container(void *p) - { vp = p; } + Type_for_compact_container for_compact_container() const + { return m_for_cc; } + void for_compact_container(Type_for_compact_container p) + { m_for_cc=p; } private: /// Reference counting: the number of darts linked to this cell. - union - { - std::size_t mrefcounting; - void *vp; - }; + std::size_t mrefcounting; + Type_for_compact_container m_for_cc; // TODO better: this is memory consuming + // TODO: or keep like that and never use an attribute without info and without dart ! }; /** Definition of cell attribute. @@ -218,23 +223,38 @@ namespace CGAL { class Cell_attribute_without_info: public Add_id { - template + template + friend class Compact_container; + + template + friend class Concurrent_compact_container; + + template + friend class Compact_container_with_index; + + template friend class Combinatorial_map_storage_1; - template + template + friend class Combinatorial_map_storage_with_index; + + template friend class Generalized_map_storage_1; - template + template + friend class Generalized_map_storage_with_index; + + template friend class CMap_linear_cell_complex_storage_1; - template - friend class GMap_linear_cell_complex_storage_1; + template + friend class CMap_linear_cell_complex_storage_with_index; - template - friend class Compact_container; + template + friend class GMap_linear_cell_complex_storage_1; - template - friend class Concurrent_compact_container; + template + friend class GMap_linear_cell_complex_storage_with_index; template friend struct internal::Init_id; @@ -242,13 +262,14 @@ namespace CGAL { public: typedef Tag_true Supports_cell_dart; - typedef typename Refs::Dart_handle Dart_handle; - typedef typename Refs::Dart_const_handle Dart_const_handle; + typedef typename Refs::Dart_descriptor Dart_descriptor; + typedef typename Refs::Dart_const_descriptor Dart_const_descriptor; typedef typename Refs::Alloc Alloc; typedef OnMerge On_merge; typedef OnSplit On_split; typedef WithID Has_id; + using Type_for_compact_container=typename Refs::Type_for_compact_container; /// operator = Cell_attribute_without_info& @@ -260,18 +281,18 @@ namespace CGAL { } /// Get the dart associated with the cell. - Dart_handle dart() { return mdart; } + Dart_descriptor dart() { return mdart; } /// Get the dart associated with the cell. - Dart_const_handle dart() const { return mdart; } + Dart_const_descriptor dart() const { return mdart; } /// Set the dart associated with the cell. - void set_dart(Dart_handle adart) { mdart = adart; } + void set_dart(Dart_descriptor adart) { mdart = adart; } /// Test if the cell is valid. - /// A cell is valid if its dart is not nullptr. + /// A cell is valid if its dart is not null_descriptor. bool is_valid() const - { return mdart!=Refs::null_handle; } + { return mdart!=Refs::null_descriptor; } bool operator==(const Cell_attribute_without_info&) const { return true; } @@ -280,12 +301,12 @@ namespace CGAL { { return !operator==(other); } protected: - /// Contructor without parameter. - Cell_attribute_without_info() : mdart(Refs::null_handle), + /// Constructor without parameter. + Cell_attribute_without_info() : mdart(Refs::null_descriptor), mrefcounting(0) {} - /// Copy contructor. + /// Copy constructor. Cell_attribute_without_info(const Cell_attribute_without_info& acell): mdart(acell.mdart), mrefcounting(acell.mrefcounting) @@ -308,14 +329,14 @@ namespace CGAL { std::size_t get_nb_refs() const { return mrefcounting; } - void * for_compact_container() const + Type_for_compact_container for_compact_container() const { return mdart.for_compact_container(); } - void for_compact_container(void *p) + void for_compact_container(Type_for_compact_container p) { mdart.for_compact_container(p); } private: - /// The dart handle associated with the cell. - Dart_handle mdart; + /// The dart descriptor associated with the cell. + Dart_descriptor mdart; /// Reference counting: the number of darts linked to this cell. std::size_t mrefcounting; @@ -334,35 +355,50 @@ namespace CGAL { class Cell_attribute : public Cell_attribute_without_info { - template + template + friend class Compact_container; + + template + friend class Concurrent_compact_container; + + template + friend class Compact_container_with_index; + + template friend class Combinatorial_map_storage_1; - template + template + friend class Combinatorial_map_storage_with_index; + + template friend class Generalized_map_storage_1; - template + template + friend class Generalized_map_storage_with_index; + + template friend class CMap_linear_cell_complex_storage_1; - template - friend class GMap_linear_cell_complex_storage_1; + template + friend class CMap_linear_cell_complex_storage_with_index; - template - friend class Compact_container; + template + friend class GMap_linear_cell_complex_storage_1; - template - friend class Concurrent_compact_container; + template + friend class GMap_linear_cell_complex_storage_with_index; public: typedef Tag_ Supports_cell_dart; - typedef typename Refs::Dart_handle Dart_handle; - typedef typename Refs::Dart_const_handle Dart_const_handle; + typedef typename Refs::Dart_descriptor Dart_descriptor; + typedef typename Refs::Dart_const_descriptor Dart_const_descriptor; typedef typename Refs::Alloc Alloc; typedef OnMerge On_merge; typedef OnSplit On_split; typedef void Info; protected: - /// Default contructor. + /// Default constructor. Cell_attribute() {} }; @@ -374,30 +410,45 @@ namespace CGAL { public Cell_attribute_without_info, public Info_for_cell_attribute { - template + template + friend class Compact_container; + + template + friend class Concurrent_compact_container; + + template + friend class Compact_container_with_index; + + template friend class Combinatorial_map_storage_1; - template + template + friend class Combinatorial_map_storage_with_index; + + template friend class Generalized_map_storage_1; - template + template + friend class Generalized_map_storage_with_index; + + template friend class CMap_linear_cell_complex_storage_1; - template - friend class GMap_linear_cell_complex_storage_1; + template + friend class CMap_linear_cell_complex_storage_with_index; - template - friend class Compact_container; + template + friend class GMap_linear_cell_complex_storage_1; - template - friend class Concurrent_compact_container; + template + friend class GMap_linear_cell_complex_storage_with_index; public: typedef Cell_attribute Self; typedef Tag_ Supports_cell_dart; - typedef typename Refs::Dart_handle Dart_handle; - typedef typename Refs::Dart_const_handle Dart_const_handle; + typedef typename Refs::Dart_descriptor Dart_descriptor; + typedef typename Refs::Dart_const_descriptor Dart_const_descriptor; typedef typename Refs::Alloc Alloc; typedef OnMerge On_merge; typedef OnSplit On_split; @@ -410,11 +461,11 @@ namespace CGAL { { return !operator==(other); } protected: - /// Default contructor. + /// Default constructor. Cell_attribute() {} - /// Contructor with an info in parameter. + /// Constructor with an info in parameter. Cell_attribute(const Info_& ainfo) : Info_for_cell_attribute(ainfo) {} diff --git a/thirdparty/CGAL/include/CGAL/Cell_attribute_with_id.h b/thirdparty/CGAL/include/CGAL/Cell_attribute_with_id.h index 38716ec3..5f77c2ed 100644 --- a/thirdparty/CGAL/include/CGAL/Cell_attribute_with_id.h +++ b/thirdparty/CGAL/include/CGAL/Cell_attribute_with_id.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Cell_attribute_with_id.h $ -// $Id: Cell_attribute_with_id.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Cell_attribute_with_id.h $ +// $Id: include/CGAL/Cell_attribute_with_id.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -42,11 +42,11 @@ namespace CGAL { friend class Concurrent_compact_container; protected: - /// Default contructor. + /// Default constructor. Cell_attribute_with_id() {} - /// Contructor with an info in parameter. + /// Constructor with an info in parameter. Cell_attribute_with_id(const Info_& ainfo) : Cell_attribute(ainfo) {} @@ -64,7 +64,7 @@ namespace CGAL { friend class Concurrent_compact_container; protected: - /// Default contructor. + /// Default constructor. Cell_attribute_with_id() {} }; diff --git a/thirdparty/CGAL/include/CGAL/Cell_attribute_with_point.h b/thirdparty/CGAL/include/CGAL/Cell_attribute_with_point.h index 6186ee10..81d17aab 100644 --- a/thirdparty/CGAL/include/CGAL/Cell_attribute_with_point.h +++ b/thirdparty/CGAL/include/CGAL/Cell_attribute_with_point.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/Cell_attribute_with_point.h $ -// $Id: Cell_attribute_with_point.h 9e250c0 2020-02-12T10:33:57+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/Cell_attribute_with_point.h $ +// $Id: include/CGAL/Cell_attribute_with_point.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -62,6 +62,33 @@ namespace CGAL { template friend class Concurrent_compact_container; + template + friend class Compact_container_with_index; + + template + friend class Combinatorial_map_storage_1; + + template + friend class Combinatorial_map_storage_with_index; + + template + friend class Generalized_map_storage_1; + + template + friend class Generalized_map_storage_with_index; + + template + friend class CMap_linear_cell_complex_storage_1; + + template + friend class CMap_linear_cell_complex_storage_with_index; + + template + friend class GMap_linear_cell_complex_storage_1; + + template + friend class GMap_linear_cell_complex_storage_with_index; + public: typedef Cell_attribute_with_point Self; @@ -71,8 +98,8 @@ namespace CGAL { typedef Point_for_cell Base2; typedef typename LCC::Point Point; - typedef typename LCC::Dart_handle Dart_handle; - typedef typename LCC::Dart_const_handle Dart_const_handle; + typedef typename LCC::Dart_descriptor Dart_descriptor; + typedef typename LCC::Dart_const_descriptor Dart_const_descriptor; typedef Info_ Info; typedef Functor_on_merge_ Functor_on_merge; @@ -120,6 +147,36 @@ namespace CGAL { template friend class Concurrent_compact_container; + template + friend class Compact_container_with_index; + + template + friend class Concurrent_compact_container; + + template + friend class Combinatorial_map_storage_1; + + template + friend class Combinatorial_map_storage_with_index; + + template + friend class Generalized_map_storage_1; + + template + friend class Generalized_map_storage_with_index; + + template + friend class CMap_linear_cell_complex_storage_1; + + template + friend class CMap_linear_cell_complex_storage_with_index; + + template + friend class GMap_linear_cell_complex_storage_1; + + template + friend class GMap_linear_cell_complex_storage_with_index; + public: typedef Cell_attribute Base1; @@ -127,8 +184,8 @@ namespace CGAL { typedef void Info; typedef typename LCC::Point Point; - typedef typename LCC::Dart_handle Dart_handle; - typedef typename LCC::Dart_const_handle Dart_const_handle; + typedef typename LCC::Dart_descriptor Dart_descriptor; + typedef typename LCC::Dart_const_descriptor Dart_const_descriptor; typedef Functor_on_merge_ Functor_on_merge; typedef Functor_on_split_ Functor_on_split; diff --git a/thirdparty/CGAL/include/CGAL/Cell_attribute_with_point_and_id.h b/thirdparty/CGAL/include/CGAL/Cell_attribute_with_point_and_id.h index 6e788ac6..df1bdfde 100644 --- a/thirdparty/CGAL/include/CGAL/Cell_attribute_with_point_and_id.h +++ b/thirdparty/CGAL/include/CGAL/Cell_attribute_with_point_and_id.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/Cell_attribute_with_point_and_id.h $ -// $Id: Cell_attribute_with_point_and_id.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/Cell_attribute_with_point_and_id.h $ +// $Id: include/CGAL/Cell_attribute_with_point_and_id.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -36,15 +36,15 @@ namespace CGAL { typedef typename Base::Point Point; protected: - /// Default contructor. + /// Default constructor. Cell_attribute_with_point_and_id() {} - /// Contructor with an info in parameter. + /// Constructor with an info in parameter. Cell_attribute_with_point_and_id(const Point& apoint) : Base(apoint) {} - /// Contructor with a point and an attribute in parameters. + /// Constructor with a point and an attribute in parameters. Cell_attribute_with_point_and_id(const Point& apoint, const Info_& ainfo) : Base(apoint, ainfo) {} @@ -68,11 +68,11 @@ namespace CGAL { typedef typename Base::Point Point; protected: - /// Default contructor. + /// Default constructor. Cell_attribute_with_point_and_id() {} - /// Contructor with a point in parameter. + /// Constructor with a point in parameter. Cell_attribute_with_point_and_id(const Point& apoint) : Base(apoint) {} }; diff --git a/thirdparty/CGAL/include/CGAL/Cell_const_iterators.h b/thirdparty/CGAL/include/CGAL/Cell_const_iterators.h index 04de73e1..63a5cb74 100644 --- a/thirdparty/CGAL/include/CGAL/Cell_const_iterators.h +++ b/thirdparty/CGAL/include/CGAL/Cell_const_iterators.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Cell_const_iterators.h $ -// $Id: Cell_const_iterators.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Cell_const_iterators.h $ +// $Id: include/CGAL/Cell_const_iterators.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -32,11 +32,11 @@ namespace CGAL { { public: typedef CMap_cell_iterator Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; /// Main constructor. CMap_cell_const_iterator(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /// Constructor from non const version. @@ -54,11 +54,11 @@ namespace CGAL { { public: typedef CMap_one_dart_per_incident_cell_iterator Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; /// Main constructor. CMap_one_dart_per_incident_cell_const_iterator(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap, adart) {} /// Constructor from non const version. @@ -75,14 +75,14 @@ namespace CGAL { { public: typedef CMap_one_dart_per_cell_iterator Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; /// Main constructor. CMap_one_dart_per_cell_const_iterator(const Map_& amap): Base(amap) {} /// Constructor with a dart in parameter (for end iterator). CMap_one_dart_per_cell_const_iterator(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap, adart) {} /// Constructor from non const version. diff --git a/thirdparty/CGAL/include/CGAL/Cell_iterators.h b/thirdparty/CGAL/include/CGAL/Cell_iterators.h index 53dc61bd..b65170e0 100644 --- a/thirdparty/CGAL/include/CGAL/Cell_iterators.h +++ b/thirdparty/CGAL/include/CGAL/Cell_iterators.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Cell_iterators.h $ -// $Id: Cell_iterators.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Cell_iterators.h $ +// $Id: include/CGAL/Cell_iterators.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -15,7 +15,7 @@ #include #include -#include +#include // TODO do all the orbit iterator of any orbit ? @@ -47,7 +47,7 @@ namespace CGAL { typedef CMap_cell_iterator Self; typedef Ite Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; protected: @@ -78,12 +78,12 @@ namespace CGAL { public: /// Main constructor. - CMap_cell_iterator(Map& amap, Dart_handle adart): + CMap_cell_iterator(Map& amap, Dart_descriptor adart): Ite(amap, adart, amap.get_new_mark()), mcell_mark_number(amap.get_new_mark()) { - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); CGAL_assertion(amap.is_whole_map_unmarked(mcell_mark_number)); mark_cell(amap, adart, mcell_mark_number); @@ -168,7 +168,7 @@ namespace CGAL { typedef CMap_cell_iterator Self; typedef Ite Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; protected: @@ -192,12 +192,12 @@ namespace CGAL { public: /// Main constructor. - CMap_cell_iterator(Map& amap, Dart_handle adart): + CMap_cell_iterator(Map& amap, Dart_descriptor adart): Ite(amap, adart), mmark_number(amap.get_new_mark()) { - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, adart, mmark_number); } @@ -275,7 +275,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_all Base; typedef CMap_cell_iterator Self; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; protected: @@ -303,18 +303,18 @@ namespace CGAL { Base(amap), mmark_number(amap.get_new_mark()) { - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, (*this), mmark_number); } /// Constructor with a dart in parameter (for end iterator). - CMap_cell_iterator(Map& amap, Dart_handle adart): + CMap_cell_iterator(Map& amap, Dart_descriptor adart): Base(amap, adart), mmark_number(amap.get_new_mark()) { - if (adart!=this->mmap->null_handle) + if (adart!=this->mmap->null_descriptor) mark_cell(amap, (*this), mmark_number); } @@ -395,14 +395,14 @@ namespace CGAL { dim,Const>, i,dim,Const> Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef Tag_false Use_mark; typedef Tag_false Basic_iterator; /// Main constructor. - CMap_one_dart_per_incident_cell_iterator(Map& amap, Dart_handle adart): + CMap_one_dart_per_incident_cell_iterator(Map& amap, Dart_descriptor adart): Base(amap, adart) {} }; @@ -422,7 +422,7 @@ namespace CGAL { CMap_dart_iterator_basic_of_all, i,dim,Const> Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef Tag_false Use_mark; @@ -432,7 +432,7 @@ namespace CGAL { CMap_one_dart_per_cell_iterator(Map& amap): Base(amap) {} /// Constructor with a dart in parameter (for end iterator). - CMap_one_dart_per_cell_iterator(Map& amap, Dart_handle adart): + CMap_one_dart_per_cell_iterator(Map& amap, Dart_descriptor adart): Base(amap, adart) {} }; diff --git a/thirdparty/CGAL/include/CGAL/Chinese_remainder_traits.h b/thirdparty/CGAL/include/CGAL/Chinese_remainder_traits.h index ef991e93..c59b81c5 100644 --- a/thirdparty/CGAL/include/CGAL/Chinese_remainder_traits.h +++ b/thirdparty/CGAL/include/CGAL/Chinese_remainder_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_foundations/include/CGAL/Chinese_remainder_traits.h $ -// $Id: Chinese_remainder_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_foundations/include/CGAL/Chinese_remainder_traits.h $ +// $Id: include/CGAL/Chinese_remainder_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Circle_2.h b/thirdparty/CGAL/include/CGAL/Circle_2.h index f483b933..24268c47 100644 --- a/thirdparty/CGAL/include/CGAL/Circle_2.h +++ b/thirdparty/CGAL/include/CGAL/Circle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Circle_2.h $ -// $Id: Circle_2.h e7357ac 2021-07-19T14:53:27+02:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Circle_2.h $ +// $Id: include/CGAL/Circle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,6 @@ #define CGAL_CIRCLE_2_H #include -#include #include #include #include @@ -36,7 +35,7 @@ class Circle_2 : public R_::Kernel_base::Circle_2 typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef Circle_2 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Circle_3.h b/thirdparty/CGAL/include/CGAL/Circle_3.h index a2a9d2b4..3257981f 100644 --- a/thirdparty/CGAL/include/CGAL/Circle_3.h +++ b/thirdparty/CGAL/include/CGAL/Circle_3.h @@ -9,8 +9,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Circle_3.h $ -// $Id: Circle_3.h e5279db 2021-09-02T15:44:53+02:00 Sebastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Circle_3.h $ +// $Id: include/CGAL/Circle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -23,7 +23,6 @@ #define CGAL_CIRCLE_3_H #include -#include #include #include #include @@ -44,7 +43,7 @@ template typedef typename R_::Direction_3 Direction_3; typedef Circle_3 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Circle_type.h b/thirdparty/CGAL/include/CGAL/Circle_type.h index daf0a1cd..2a00d387 100644 --- a/thirdparty/CGAL/include/CGAL/Circle_type.h +++ b/thirdparty/CGAL/include/CGAL/Circle_type.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circle_type.h $ -// $Id: Circle_type.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circle_type.h $ +// $Id: include/CGAL/Circle_type.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, diff --git a/thirdparty/CGAL/include/CGAL/Circular_arc_2.h b/thirdparty/CGAL/include/CGAL/Circular_arc_2.h index ac2724a9..5de06593 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_arc_2.h +++ b/thirdparty/CGAL/include/CGAL/Circular_arc_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_arc_2.h $ -// $Id: Circular_arc_2.h 059bc60 2020-07-22T15:13:09+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_arc_2.h $ +// $Id: include/CGAL/Circular_arc_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Circular_arc_3.h b/thirdparty/CGAL/include/CGAL/Circular_arc_3.h index 794d6572..cf60e6c6 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_arc_3.h +++ b/thirdparty/CGAL/include/CGAL/Circular_arc_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_arc_3.h $ -// $Id: Circular_arc_3.h acdf4c6 2020-07-22T15:23:09+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_arc_3.h $ +// $Id: include/CGAL/Circular_arc_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, diff --git a/thirdparty/CGAL/include/CGAL/Circular_arc_point_2.h b/thirdparty/CGAL/include/CGAL/Circular_arc_point_2.h index d0e845d5..e34b77a2 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_arc_point_2.h +++ b/thirdparty/CGAL/include/CGAL/Circular_arc_point_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_arc_point_2.h $ -// $Id: Circular_arc_point_2.h 059bc60 2020-07-22T15:13:09+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_arc_point_2.h $ +// $Id: include/CGAL/Circular_arc_point_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Circular_arc_point_3.h b/thirdparty/CGAL/include/CGAL/Circular_arc_point_3.h index 6514d984..f360c79c 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_arc_point_3.h +++ b/thirdparty/CGAL/include/CGAL/Circular_arc_point_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_arc_point_3.h $ -// $Id: Circular_arc_point_3.h acdf4c6 2020-07-22T15:23:09+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_arc_point_3.h $ +// $Id: include/CGAL/Circular_arc_point_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_2.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_2.h index 87d8a69a..c529d207 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_2.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_2.h $ -// $Id: Circular_kernel_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_2.h $ +// $Id: include/CGAL/Circular_kernel_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Circular_arc_2.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Circular_arc_2.h index 4cd94113..d368cc5a 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Circular_arc_2.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Circular_arc_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_2.h $ -// $Id: Circular_arc_2.h 059bc60 2020-07-22T15:13:09+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_2.h $ +// $Id: include/CGAL/Circular_kernel_2/Circular_arc_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado @@ -740,7 +740,7 @@ class Filtered_bbox_circular_arc_2_base : public Base_CK::Circular_arc_2 Filtered_bbox_circular_arc_2_base(const P_arc& arc) : P_arc(arc), bb(nullptr) {} - // otherwise it will lead to ambiguos definitions + // otherwise it will lead to ambiguous definitions explicit Filtered_bbox_circular_arc_2_base(const Circle_2 &c) : P_arc(c),bb(nullptr) {} diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Circular_arc_point_2.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Circular_arc_point_2.h index 5c9049da..efd2b235 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Circular_arc_point_2.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Circular_arc_point_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_point_2.h $ -// $Id: Circular_arc_point_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_point_2.h $ +// $Id: include/CGAL/Circular_kernel_2/Circular_arc_point_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado @@ -22,10 +22,10 @@ #include +#include #include #include #include -#include namespace CGAL { namespace internal { diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Intersection_traits.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Intersection_traits.h index 133d20c0..143d7282 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Intersection_traits.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Intersection_traits.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h $ -// $Id: Intersection_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h $ +// $Id: include/CGAL/Circular_kernel_2/Intersection_traits.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h $ -// $Id: Intersection_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_2/Intersection_traits.h $ +// $Id: include/CGAL/Circular_kernel_2/Intersection_traits.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Philipp Möller and Sebastien Loriot @@ -17,9 +17,12 @@ #ifndef CGAL_CIRCULAR_KERNEL_2_INTERSECTION_TRAITS_H #define CGAL_CIRCULAR_KERNEL_2_INTERSECTION_TRAITS_H +#include + + #include -#include +#include namespace CGAL { @@ -40,7 +43,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename CK::Circle_2, + std::variant< typename CK::Circle_2, typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -52,7 +55,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename CK::Circular_arc_2, + std::variant< typename CK::Circular_arc_2, typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -64,7 +67,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename CK::Line_arc_2, + std::variant< typename CK::Line_arc_2, typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -76,7 +79,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename std::pair< typename CK::Circular_arc_point_2, + std::variant< typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL > @@ -92,7 +95,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename std::pair< typename CK::Circular_arc_point_2, + std::variant< typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL > @@ -108,7 +111,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename CK::Line_arc_2, + std::variant< typename CK::Line_arc_2, typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -125,7 +128,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename std::pair< typename CK::Circular_arc_point_2, + std::variant< typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL > @@ -155,7 +158,7 @@ template struct CK2_Intersection_traits { typedef typename - boost::variant< typename std::pair< typename CK::Circular_arc_point_2, + std::variant< typename std::pair< typename CK::Circular_arc_point_2, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL > diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Line_arc_2.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Line_arc_2.h index 78497a4b..5c93aca7 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Line_arc_2.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/Line_arc_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_2/Line_arc_2.h $ -// $Id: Line_arc_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_2/Line_arc_2.h $ +// $Id: include/CGAL/Circular_kernel_2/Line_arc_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/function_objects_on_circle_2.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/function_objects_on_circle_2.h index 5928c18e..6e308248 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/function_objects_on_circle_2.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/function_objects_on_circle_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_2/function_objects_on_circle_2.h $ -// $Id: function_objects_on_circle_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_2/function_objects_on_circle_2.h $ +// $Id: include/CGAL/Circular_kernel_2/function_objects_on_circle_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/function_objects_on_line_2.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/function_objects_on_line_2.h index dc642f07..b708eda3 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/function_objects_on_line_2.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/function_objects_on_line_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_2/function_objects_on_line_2.h $ -// $Id: function_objects_on_line_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_2/function_objects_on_line_2.h $ +// $Id: include/CGAL/Circular_kernel_2/function_objects_on_line_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h index bd3881eb..b06e9f2b 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h $ -// $Id: function_objects_polynomial_circular.h 81d9556 2021-02-10T10:06:45+01:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h $ +// $Id: include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado @@ -308,7 +308,7 @@ namespace CircularFunctors { operator()(const Circular_arc_2 &A, OutputIterator res) const { typedef std::pair relat_pos; - typedef std::pair< CGAL::Object, relat_pos> Obj_descr_2; + typedef std::pair< Circular_arc_2, relat_pos> Obj_descr_2; std::vector vec; CircularFunctors::advanced_make_xy_monotone (A, std::back_inserter(vec)); diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/interface_macros.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/interface_macros.h index 12227400..1e55a5cd 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/interface_macros.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/interface_macros.h @@ -3,12 +3,14 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_2/interface_macros.h $ -// $Id: interface_macros.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_2/interface_macros.h $ +// $Id: include/CGAL/Circular_kernel_2/interface_macros.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado +#include + // Partially supported by the IST Programme of the EU as a Shared-cost // RTD (FET Open) Project under Contract No IST-2000-26473 // (ECG - Effective Computational Geometry for Curves and Surfaces) @@ -21,7 +23,7 @@ // It's aimed at being included from within a kernel traits class, this // way we share more code. -// It is the responsability of the including file to correctly set the 2 +// It is the responsibility of the including file to correctly set the 2 // macros CGAL_Circular_Kernel_pred and CGAL_Circular_Kernel_cons. // And they are #undefed at the end of this file. diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h index aeebff12..fb22cc73 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h $ -// $Id: internal_functions_on_circle_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h $ +// $Id: include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado @@ -120,8 +120,6 @@ namespace CircularFunctors { const typename CK::Circle_2 & c2, OutputIterator res ) { - typedef typename CK2_Intersection_traits - ::type result_type; typedef typename CK::Algebraic_kernel AK; typedef typename CK::Polynomial_for_circles_2_2 Equation; typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2; @@ -129,7 +127,7 @@ namespace CircularFunctors { Equation e2 = CircularFunctors::get_equation(c2); if (e1 == e2) { - *res++ = CGAL::internal::ck2_intersection_return(c1); + *res++ = c1; return res; } @@ -145,9 +143,7 @@ namespace CircularFunctors { for ( typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it ) { - *res++ = CGAL::internal::ck2_intersection_return - (std::make_pair(Circular_arc_point_2(it->first), - it->second )); + *res++ = std::make_pair(Circular_arc_point_2(it->first), it->second ); } return res; diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h index b4a09371..fe52217f 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h $ -// $Id: internal_functions_on_circular_arc_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h $ +// $Id: include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado @@ -536,17 +536,15 @@ namespace CircularFunctors { const typename CK::Circular_arc_2 &a2, OutputIterator res ) { - typedef typename CK2_Intersection_traits::type result_type; - - typedef std::vector solutions_container; typedef typename CK::Circular_arc_2 Circular_arc_2; + typedef typename CK::Circle_2 Circle_2; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE + typedef std::vector solutions_container; // same curve if(a1.number() == a2.number()) { - *res++ = result_type(a1); + *res++ = a1; return res; } @@ -571,14 +569,14 @@ namespace CircularFunctors { if((a1s_a2s && a1t_a2t) || (a1s_a2t && a1t_a2s)){ // Case 1 if( (a1.supporting_circle() == a2.supporting_circle()) && ((a1.on_upper_part() && a2.on_upper_part())|| (! a1.on_upper_part() && (! a2.on_upper_part())))){ - *res++ = result_type(a1); + *res++ = a1; } else { if(compare_x(a1.source(), a1.target()) == SMALLER){ - *res++ = result_type(std::make_pair(a1.source(),1u)); - *res++ = result_type(std::make_pair(a1.target(),1u)); + *res++ = std::make_pair(a1.source(),1u); + *res++ = std::make_pair(a1.target(),1u); } else { - *res++ = result_type(std::make_pair(a1.target(),1u)); - *res++ = result_type(std::make_pair(a1.source(),1u)); + *res++ = std::make_pair(a1.target(),1u); + *res++ = std::make_pair(a1.source(),1u); } } return res; @@ -625,7 +623,7 @@ namespace CircularFunctors { if(return_q){ - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } @@ -634,16 +632,14 @@ namespace CircularFunctors { const bool sqr1_eq_sqr2 = (a1.squared_radius() == a2.squared_radius()); const bool c1_eq_c2 = (a1.center() == a2.center()); - typedef typename CK2_Intersection_traits::type result_type; if(sqr1_eq_sqr2 && c1_eq_c2) { if(a1.is_full()) { - *res++ =CGAL::internal::ck2_intersection_return(a2); + *res++ = a2; //return res; } else if(a2.is_full()) { - *res++ =CGAL::internal::ck2_intersection_return(a1); + *res++ = a1; //return res; } else { bool t2_in_a1 = has_on(a1,a2.target(),true); @@ -656,66 +652,66 @@ namespace CircularFunctors { CircularFunctors::compare_xy(a1.source(), a2.source()); if(comp < 0) { if(a1.source() == a2.target()) { - *res++ =CGAL::internal::ck2_intersection_return(std::make_pair(a1.source(),1u)); + *res++ = std::make_pair(a1.source(),1u); } else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a1.source(),a2.target()); - *res++ =CGAL::internal::ck2_intersection_return(arc); + *res++ = arc; } if(a2.source() == a1.target()) { - *res++ =CGAL::internal::ck2_intersection_return(std::make_pair(a2.source(),1u)); + *res++ = std::make_pair(a2.source(),1u); } else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a2.source(),a1.target()); - *res++ =CGAL::internal::ck2_intersection_return(arc); + *res++ = arc; } } else if (comp > 0) { if(a2.source() == a1.target()) { - *res++ =CGAL::internal::ck2_intersection_return(std::make_pair(a2.source(),1u)); + *res++ = std::make_pair(a2.source(),1u); } else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a2.source(),a1.target()); - *res++ =CGAL::internal::ck2_intersection_return(arc); + *res++ = arc; } if(a1.source() == a2.target()) { - *res++ =CGAL::internal::ck2_intersection_return(std::make_pair(a1.source(),1u)); + *res++ = std::make_pair(a1.source(),1u); } else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a1.source(),a2.target()); - *res++ =CGAL::internal::ck2_intersection_return(arc); + *res++ = arc; } } else { - *res++ =CGAL::internal::ck2_intersection_return(a1); + *res++ = a1; } } else { - *res++ =CGAL::internal::ck2_intersection_return(a2); + *res++ = a2; //return res; } } else if(t2_in_a1) { if(a1.source() == a2.target()) - *res++ =CGAL::internal::ck2_intersection_return(std::make_pair(a1.source(),1u)); + *res++ = std::make_pair(a1.source(),1u); else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a1.source(),a2.target()); - *res++ =CGAL::internal::ck2_intersection_return(arc); + *res++ = arc; } //return res; } else if(s2_in_a1) { if(a2.source() == a1.target()) { - *res++ =CGAL::internal::ck2_intersection_return(std::make_pair(a2.source(),1u)); + *res++ = std::make_pair(a2.source(),1u); } else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a2.source(),a1.target()); - *res++ =CGAL::internal::ck2_intersection_return(arc); + *res++ = arc; } //return res; } else if(has_on(a2,a1.source(),true)) { - *res++ =CGAL::internal::ck2_intersection_return(a1); + *res++ = a1; //return res; } //return res; } } else if(!c1_eq_c2) { - solutions_container solutions; + std::vector< std::variant> > solutions; #ifdef CGAL_INTERSECTION_MAP_FOR_SUPPORTING_CIRCLES if(!Circular_arc_2::template @@ -736,24 +732,23 @@ namespace CircularFunctors { if(solutions.size() == 0) return res; else { // The supporting circles are not the same and intersects - for (typename solutions_container::iterator it = solutions.begin(); - it != solutions.end(); ++it) { + for (const auto& v : solutions) { const std::pair - *result = CGAL::object_cast - > (&(*it)); + *result = std::get_if + > (&v); #ifdef CGAL_CK_TEST_BBOX_BEFORE_HAS_ON Bbox_2 rb = result->first.bbox(); if(do_overlap(a1.bbox(), rb) && do_overlap(a2.bbox(),rb)){ if (has_on(a1,result->first,true) && has_on(a2,result->first,true)) { - *res++ =CGAL::internal::ck2_intersection_return(*result); + *res++ = *result; } } #else if (has_on(a1,result->first,true) && has_on(a2,result->first,true)) { - *res++ =CGAL::internal::ck2_intersection_return(*result); + *res++ = *result; } #endif } @@ -1069,7 +1064,7 @@ template < class CK, class OutputIterator > A.circle_number(); #endif - *res++ = make_object(A); + *res++ = A; return res; } @@ -1101,8 +1096,8 @@ template < class CK, class OutputIterator > ca2.set_circle_number(cn); #endif - *res++ = make_object(ca1); - *res++ = make_object(ca2); + *res++ = ca1; + *res++ = ca2; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE intersecs1.push_back(make_object(std::make_pair(x_extremal_point1,1u))); @@ -1131,7 +1126,7 @@ template < class CK, class OutputIterator > unsigned int cn = ca1.circle_number(); #endif - *res++ = make_object(ca1); + *res++ = ca1; if (cmp_end > 0) { // We must cut in 3 parts. const Circular_arc_2 &ca2 = Circular_arc_2(A.supporting_circle(), @@ -1148,8 +1143,8 @@ template < class CK, class OutputIterator > ca3.set_circle_number(cn); #endif - *res++ = make_object(ca2); - *res++ = make_object(ca3); + *res++ = ca2; + *res++ = ca3; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE intersecs1.push_back(make_object(std::make_pair(x_extremal_point1,1u))); intersecs2.push_back(make_object(std::make_pair(x_extremal_point2,1u))); @@ -1171,7 +1166,7 @@ template < class CK, class OutputIterator > ca2.set_circle_number(cn); #endif - *res++ = make_object(ca2); + *res++ = ca2; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE intersecs1.push_back(make_object(std::make_pair(x_extremal_point1,1u))); @@ -1191,7 +1186,7 @@ template < class CK, class OutputIterator > unsigned int cn = ca1.circle_number(); #endif - *res++ = make_object(ca1); + *res++ = ca1; if (cmp_end < 0) { const Circular_arc_2 &ca2 = Circular_arc_2(A.supporting_circle(), x_extremal_point2, @@ -1207,8 +1202,8 @@ template < class CK, class OutputIterator > ca3.set_circle_number(cn); #endif - *res++ = make_object(ca2); - *res++ = make_object(ca3); + *res++ = ca2; + *res++ = ca3; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE intersecs1.push_back(make_object(std::make_pair(x_extremal_point2,1u))); @@ -1232,7 +1227,7 @@ template < class CK, class OutputIterator > ca2.set_circle_number(cn); #endif - *res++ = make_object(ca2); + *res++ = ca2; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE intersecs1.push_back(make_object(std::make_pair(x_extremal_point2,1u))); @@ -1259,8 +1254,8 @@ template < class CK, class OutputIterator > ca2.set_circle_number(cn); #endif - *res++ = make_object(ca1); - *res++ = make_object(ca2); + *res++ = ca1; + *res++ = ca2; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE intersecs1.push_back(make_object(std::make_pair(x_extremal_point2,1u))); @@ -1287,8 +1282,8 @@ template < class CK, class OutputIterator > ca2.set_circle_number(cn); #endif - *res++ = make_object(ca1); - *res++ = make_object(ca2); + *res++ = ca1; + *res++ = ca2; #ifdef CGAL_INTERSECTION_MAP_FOR_XMONOTONIC_ARC_WITH_SAME_SUPPORTING_CIRCLE intersecs1.push_back(make_object(std::make_pair(x_extremal_point1,1u))); @@ -1302,7 +1297,7 @@ template < class CK, class OutputIterator > } // This is the make_x_monotone function returning extra information: -// The ouput iterator refers to pairs, the first part of which is an +// The output iterator refers to pairs, the first part of which is an // object containing the x-monotone arc and the second part is a // boolean defining whether the arc is on the upper part of the // circle or not. This extra information returned by make_x_monotone @@ -1317,7 +1312,7 @@ template < class CK, class OutputIterator > OutputIterator res ) { typedef typename CK::Circular_arc_2 Circular_arc_2; - typedef std::pair S_pair; + typedef std::pair S_pair; int cmp_begin_y = CGAL::compare @@ -1332,13 +1327,13 @@ template < class CK, class OutputIterator > ((((cmp_begin_y > 0) || (cmp_end_y > 0)) && (cmp_x > 0)) || (((cmp_begin_y < 0) || (cmp_end_y < 0)) && (cmp_x < 0)))) { - *res++ = S_pair(make_object(A),(cmp_begin_y>0 || cmp_end_y>0) ); + *res++ = S_pair(A,(cmp_begin_y>0 || cmp_end_y>0) ); return res; } // Half circles if (cmp_begin_y == 0 && cmp_end_y == 0 && cmp_x != 0) { - *res++ = std::make_pair(make_object(A), cmp_x>0 ); + *res++ = std::make_pair(A, cmp_x>0 ); return res; } @@ -1347,67 +1342,67 @@ template < class CK, class OutputIterator > if (cmp_begin_y > 0) { *res++ = S_pair - (make_object(Circular_arc_2(A.supporting_circle(), A.source(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),true))), + (Circular_arc_2(A.supporting_circle(), A.source(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),true)), true); if (cmp_end_y > 0) { // We must cut in 3 parts. *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),true), - CircularFunctors::x_extremal_point - (A.supporting_circle(),false))), + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),true), + CircularFunctors::x_extremal_point + (A.supporting_circle(),false)), false); *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),false), - A.target())), + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),false), + A.target()), true); } else { *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),true), - A.target())), + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),true), + A.target()), false); } } else if (cmp_begin_y < 0) { // Very similar to the previous case. *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - A.source(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),false))), + (Circular_arc_2 (A.supporting_circle(), + A.source(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),false)), false); if (cmp_end_y < CGAL::EQUAL) { // We must cut in 3 parts. *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),false), - CircularFunctors::x_extremal_point - (A.supporting_circle(),true))) , + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),false), + CircularFunctors::x_extremal_point + (A.supporting_circle(),true)) , true ); *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),true), - A.target())), + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),true), + A.target()), false); } else { *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),false), - A.target())), + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),false), + A.target()), true); } } @@ -1415,34 +1410,34 @@ template < class CK, class OutputIterator > if ( compare(A.source().x(),A.supporting_circle().center().x())< 0) { CGAL_assertion(cmp_end_y >= 0); *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - A.source(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),false))), + (Circular_arc_2 (A.supporting_circle(), + A.source(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),false)), false); *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),false), - A.target())), + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),false), + A.target()), true); } else { CGAL_assertion( compare(A.source().x(),A.supporting_circle().center().x())< 0); CGAL_assertion(cmp_end_y != LARGER); *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - A.source(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),true))), + (Circular_arc_2 (A.supporting_circle(), + A.source(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),true)), true); *res++ = std::make_pair - (make_object(Circular_arc_2 (A.supporting_circle(), - CircularFunctors::x_extremal_point - (A.supporting_circle(),true), - A.target())), + (Circular_arc_2 (A.supporting_circle(), + CircularFunctors::x_extremal_point + (A.supporting_circle(),true), + A.target()), false); } } @@ -1457,7 +1452,7 @@ template < class CK, class OutputIterator > // In the same as the advanced_make_x_monotone works, this make_xy_function // returns extra information, descriptive of the position of the returned // xy-monotone arcs on the circle: The output iterator refers to pairs, the -// first part of which is the object containing tha arc and the second part +// first part of which is the object containing the arc and the second part // is another pair containing 2 booleans which equavalently describe whether the // returned xy-monotone arc is on the upper part and the left side of the circle @@ -1469,8 +1464,8 @@ advanced_make_xy_monotone( const typename CK::Circular_arc_2 &a, typedef typename CK::Circular_arc_2 Circular_arc_2; typedef std::pair relat_pos; - typedef std::pair< CGAL::Object, bool> Obj_descr_1; - typedef std::pair< CGAL::Object, relat_pos> Obj_descr_2; + typedef std::pair< Circular_arc_2, bool> Obj_descr_1; + typedef std::pair< Circular_arc_2, relat_pos> Obj_descr_2; typedef std::vector Obj_vector_1; typedef std::vector Obj_vector_2; @@ -1481,8 +1476,7 @@ advanced_make_xy_monotone( const typename CK::Circular_arc_2 &a, advanced_make_x_monotone(a,std::back_inserter(vec)); for(unsigned int i=0;i(&vec.at(i).first); + const Circular_arc_2 *tmp_arc = (&vec.at(i).first); int cmp_begin_x = CGAL::compare (tmp_arc->source().x(), tmp_arc->supporting_circle().center().x()); @@ -1501,22 +1495,21 @@ advanced_make_xy_monotone( const typename CK::Circular_arc_2 &a, Obj_descr_1 tmp=vec.at(i); Obj_descr_2 tmp1,tmp2; - const Circular_arc_2 *tmp_arc = - CGAL::object_cast(&tmp.first); + const Circular_arc_2 *tmp_arc = &tmp.first; - tmp1.first = make_object - (Circular_arc_2(a.supporting_circle(),tmp_arc->source(), + tmp1.first = + Circular_arc_2(a.supporting_circle(),tmp_arc->source(), CircularFunctors::y_extremal_point - (a.supporting_circle(),!tmp.second))); + (a.supporting_circle(),!tmp.second)); tmp1.second.first=tmp.second; tmp1.second.second= (tmp.second)? false : true ; - tmp2.first = make_object - (Circular_arc_2(a.supporting_circle(), + tmp2.first = + Circular_arc_2(a.supporting_circle(), CircularFunctors::y_extremal_point (a.supporting_circle(),!tmp.second), - tmp_arc->target())); + tmp_arc->target()); tmp2.second.first=tmp.second; tmp2.second.second= (tmp.second)? true : false ; @@ -1528,7 +1521,6 @@ advanced_make_xy_monotone( const typename CK::Circular_arc_2 &a, } return res; - } template diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_line_2.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_line_2.h index 43c29e49..12207f3b 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_line_2.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_line_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_2.h $ -// $Id: internal_functions_on_line_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_2.h $ +// $Id: include/CGAL/Circular_kernel_2/internal_functions_on_line_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h index ec2614cb..b98c9a08 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h $ -// $Id: internal_functions_on_line_arc_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h $ +// $Id: include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado @@ -377,8 +377,6 @@ namespace CircularFunctors { const typename CK::Circle_2 & c, OutputIterator res ) { - typedef typename CK2_Intersection_traits - ::type result_type; typedef typename CK::Algebraic_kernel AK; typedef typename CK::Polynomial_1_2 Equation_line; typedef typename CK::Polynomial_for_circles_2_2 Equation_circle; @@ -399,8 +397,7 @@ namespace CircularFunctors { for ( typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it ) { - *res++ = CGAL::internal::ck2_intersection_return - (std::make_pair(Circular_arc_point_2(it->first), it->second )); + *res++ = std::make_pair(Circular_arc_point_2(it->first), it->second ); } return res; @@ -412,8 +409,6 @@ namespace CircularFunctors { const typename CK::Line_arc_2 &a2, OutputIterator res ) { - typedef typename CK2_Intersection_traits - ::type result_type; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Point_2 Point_2; @@ -427,13 +422,13 @@ namespace CircularFunctors { if((a1s_a2s && a1t_a2t) || (a1s_a2t && a1t_a2s)){ - *res++ = result_type(a1); + *res++ = a1; return res; } if(a1s_a2s || a1s_a2t || a1t_a2s || a1t_a2t) { if(! LinearFunctors::non_oriented_equal(a1.supporting_line(),a2.supporting_line())){ - if(a1s_a2s || a1s_a2t) *res++ = CGAL::internal::ck2_intersection_return(std::make_pair(a1.source(), 1u)); - if(a1t_a2s || a1t_a2t) *res++ = CGAL::internal::ck2_intersection_return(std::make_pair(a1.target(), 1u)); + if(a1s_a2s || a1s_a2t) *res++ = std::make_pair(a1.source(), 1u); + if(a1t_a2s || a1t_a2t) *res++ = std::make_pair(a1.target(), 1u); return res; } } @@ -445,16 +440,13 @@ namespace CircularFunctors { int comparison = compare_xy(a2.left(),a1.right()); if(comparison < 0){ if(compare_xy(a1.right(),a2.right()) <= 0){ - *res++ = CGAL::internal::ck2_intersection_return - (Line_arc_2(a1.supporting_line(), a2.left(), a1.right() )); + *res++ = Line_arc_2(a1.supporting_line(), a2.left(), a1.right() ); } else{ - *res++ = CGAL::internal::ck2_intersection_return - (Line_arc_2(a1.supporting_line(), a2.left(), a2.right() )); + *res++ = Line_arc_2(a1.supporting_line(), a2.left(), a2.right() ); } } else if (comparison == 0){ - *res++ =CGAL::internal::ck2_intersection_return - ( std::make_pair(a2.left(),1u)); + *res++ = std::make_pair(a2.left(),1u); } return res; } @@ -462,17 +454,14 @@ namespace CircularFunctors { int comparison = compare_xy(a1.left(),a2.right()); if(comparison < 0){ if(compare_xy(a1.right(),a2.right()) <= 0){ - *res++ = CGAL::internal::ck2_intersection_return - (Line_arc_2(a1.supporting_line(), a1.left(), a1.right() )); + *res++ = Line_arc_2(a1.supporting_line(), a1.left(), a1.right() ); } else{ - *res++ = CGAL::internal::ck2_intersection_return - (Line_arc_2(a1.supporting_line(), a1.left(), a2.right() )); + *res++ = Line_arc_2(a1.supporting_line(), a1.left(), a2.right() ); } } else if (comparison == 0){ - *res++ = CGAL::internal::ck2_intersection_return - ( std::make_pair(a1.left(),1u)); + *res++ = std::make_pair(a1.left(),1u); } return res; } @@ -491,13 +480,13 @@ namespace CircularFunctors { CircularFunctors::compare_xy(intersect_point, a1.target())) && (CircularFunctors::compare_xy(intersect_point, a2.source()) != CircularFunctors::compare_xy(intersect_point, a2.target()))) - *res++ = CGAL::internal::ck2_intersection_return(std::make_pair(intersect_point, 1u)); + *res++ = std::make_pair(intersect_point, 1u); return res; } template - struct Has_on_visitor : public boost::static_visitor { + struct Has_on_visitor { Has_on_visitor(const T* l) : l(l){} const T* l; bool operator()(const std::pair& pair) const { @@ -527,8 +516,8 @@ namespace CircularFunctors { for (typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it) { - if(boost::apply_visitor(Has_on_visitor(&l), *it)) - *res++ = *it; + if(std::visit(Has_on_visitor(&l), *it)) + *res++ = std::get>(*it); } return res; @@ -565,11 +554,11 @@ namespace CircularFunctors { if((ls_cs && lt_ct) || (ls_ct && lt_cs)){ // Case 0 if (compare_xy(l.source(), l.target()) == SMALLER){ - *res++ = result_type(std::make_pair(l.source(), 1u)); - *res++ = result_type(std::make_pair(l.target(), 1u)); + *res++ = std::make_pair(l.source(), 1u); + *res++ = std::make_pair(l.target(), 1u); } else { - *res++ = result_type(std::make_pair(l.target(), 1u)); - *res++ = result_type(std::make_pair(l.source(), 1u)); + *res++ = std::make_pair(l.target(), 1u); + *res++ = std::make_pair(l.source(), 1u); } return res; } else if (ls_cs || lt_ct || ls_ct || lt_cs) { @@ -594,20 +583,20 @@ namespace CircularFunctors { } if( (CircularFunctors::compare_x(p,q) == EQUAL) || CircularFunctors::point_in_x_range(p,r,q)){ // Case 1 - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } else if(c.on_upper_part()){ // Case 2 if(CircularFunctors::compare_x(r,q) == LARGER){ if(CircularFunctors::orientation(q,r,p) == RIGHT_TURN // Case 2 || CircularFunctors::compare_y_to_right(l,c,q) == LARGER){ // Case 3a - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } } else { if(CircularFunctors::orientation(r,q,p) == RIGHT_TURN // Case 2 || CircularFunctors::compare_y_to_left(l,c,q) == LARGER){ // Case 3c - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } } @@ -615,13 +604,13 @@ namespace CircularFunctors { if(CircularFunctors::compare_x(r,q) == LARGER){ if (CircularFunctors::orientation(q,r,p) == LEFT_TURN // Case 2 || CircularFunctors::compare_y_to_right(l,c,q) == SMALLER){ // Case 3b - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } } else { if(CircularFunctors::orientation(r,q,p) == LEFT_TURN || CircularFunctors::compare_y_to_left(l,c,q) == SMALLER){ // Case 3d - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } } @@ -629,7 +618,7 @@ namespace CircularFunctors { typename CK::Linear_kernel::Bounded_side bs = CircularFunctors::bounded_side(c.supporting_circle(),p); if(bs == ON_BOUNDED_SIDE){ - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } else { //Case 4b typedef std::vector::type> @@ -639,12 +628,12 @@ namespace CircularFunctors { std::back_inserter(solutions) ); if(CircularFunctors::compare_x(r,q) == LARGER){ - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); *res++ = solutions.back(); return res; } else { *res++ = solutions.front(); - *res++ = result_type(std::make_pair(q,1u)); + *res++ = std::make_pair(q,1u); return res; } @@ -681,10 +670,10 @@ namespace CircularFunctors { for (typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it) { - if(boost::apply_visitor(Has_on_visitor(&l), *it) && - boost::apply_visitor(Has_on_visitor(&c), *it) ) + if(std::visit(Has_on_visitor(&l), *it) && + std::visit(Has_on_visitor(&c), *it) ) { - *res++ = *it; + *res++ = std::get>(*it); } } return res; @@ -746,25 +735,23 @@ namespace CircularFunctors { typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Point_2 Point_2; typedef typename CK::Line_2 Line_2; - typedef typename CK::Line_arc_2 Line_arc_2; - typedef typename CK2_Intersection_traits::type result_type; if(LinearFunctors::non_oriented_equal(l, la.supporting_line())) { - *res++ = result_type(la); + *res++ = la; } typename Intersection_traits::result_type v = intersection(l, la.supporting_line()); if(!v) return res; - const Point_2 *pt = boost::get(&*v); + const Point_2 *pt = std::get_if(&*v); if(pt == nullptr) return res; Circular_arc_point_2 intersect_point = Circular_arc_point_2(*pt); if (CircularFunctors::compare_xy(intersect_point, la.source()) != CircularFunctors::compare_xy(intersect_point, la.target())) - *res++ = result_type(std::make_pair(intersect_point, 1u)); + *res++ = std::make_pair(intersect_point, 1u); return res; } @@ -790,8 +777,8 @@ namespace CircularFunctors { for (typename solutions_container::const_iterator it = solutions.begin(); it != solutions.end(); ++it) { - if(boost::apply_visitor(Has_on_visitor(&c), *it)) - *res++ = *it; + if(std::visit(Has_on_visitor(&c), *it)) + *res++ = std::get>(*it); } return res; } @@ -810,7 +797,7 @@ namespace CircularFunctors { make_x_monotone( const typename CK::Line_arc_2 &A, OutputIterator res ) { - *res++ = make_object(A); + *res++ = A; return res; } diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/intersection_line_2_circle_2_map.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/intersection_line_2_circle_2_map.h index 93997e92..8fd28f42 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_2/intersection_line_2_circle_2_map.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_2/intersection_line_2_circle_2_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_2/intersection_line_2_circle_2_map.h $ -// $Id: intersection_line_2_circle_2_map.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_2/intersection_line_2_circle_2_map.h $ +// $Id: include/CGAL/Circular_kernel_2/intersection_line_2_circle_2_map.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Circular_arc_3.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Circular_arc_3.h index d178a20d..ad735c2b 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Circular_arc_3.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Circular_arc_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h $ -// $Id: Circular_arc_3.h c529418 2021-03-23T14:06:16+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h $ +// $Id: include/CGAL/Circular_kernel_3/Circular_arc_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, @@ -80,7 +80,7 @@ namespace CGAL { // we can optimize the computations of the sign (for the has_on functor), // by computing the vector s-c and t-s, in order to use them directly on // another compute_sign_of_cross_product function - // we can save time computing the substractions + // we can save time computing the subtractions // the problem is: more memory space is needed _sign_cross_product = CGAL::SphericalFunctors::compute_sign_of_cross_product(s,t,c.center()); @@ -167,11 +167,11 @@ namespace CGAL { CGAL_kernel_precondition(sols1.size() > 0); CGAL_kernel_precondition(sols2.size() > 0); const std::pair& pair1= - *boost::get >( + *std::get >( &sols1[(sols1.size()==1)?(0):(less_xyz_s1?0:1)] ); const std::pair& pair2= - *boost::get >( + *std::get >( &sols2[(sols2.size()==1)?(0):(less_xyz_s2?0:1)] ); // the source and target must be different @@ -194,11 +194,11 @@ namespace CGAL { CGAL_kernel_precondition(sols1.size() > 0); CGAL_kernel_precondition(sols2.size() > 0); const std::pair& pair1= - *boost::get >( + *std::get >( &sols1[(sols1.size()==1)?(0):(less_xyz_p1?0:1)] ); const std::pair& pair2= - *boost::get >( + *std::get >( &sols2[(sols2.size()==1)?(0):(less_xyz_p2?0:1)] ); // the source and target must be different diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h index 4db29596..9ce1617b 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h $ -// $Id: Circular_arc_point_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_point_3.h $ +// $Id: include/CGAL/Circular_kernel_3/Circular_arc_point_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, @@ -81,13 +81,13 @@ class Circular_arc_point_3 if(sols.size() == 1) { // the intersection must be a point const std::pair* pair= - boost::get >(&sols[0]); + std::get_if >(&sols[0]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } else { // the intersections must be a point const std::pair* pair= - boost::get >(&sols[less_xyz?0:1]); + std::get_if >(&sols[less_xyz?0:1]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } @@ -104,13 +104,13 @@ class Circular_arc_point_3 if(sols.size() == 1) { // the intersection must be a point const std::pair* pair= - boost::get >(&sols[0]); + std::get_if >(&sols[0]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } else { // the intersections must be a point const std::pair* pair= - boost::get >(&sols[less_xyz?0:1]); + std::get_if >(&sols[less_xyz?0:1]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } @@ -127,13 +127,13 @@ class Circular_arc_point_3 if(sols.size() == 1) { // the intersection must be a point const std::pair* pair= - boost::get >(&sols[0]); + std::get_if >(&sols[0]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } else { // the intersections must be a point const std::pair* pair= - boost::get >(&sols[less_xyz?0:1]); + std::get_if >(&sols[less_xyz?0:1]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } @@ -149,13 +149,13 @@ class Circular_arc_point_3 if(sols.size() == 1) { // the intersection must be a point const std::pair* pair= - boost::get >(&sols[0]); + std::get_if >(&sols[0]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } else { // the intersections must be a point const std::pair* pair= - boost::get >(&sols[less_xyz?0:1]); + std::get_if >(&sols[less_xyz?0:1]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } @@ -171,13 +171,13 @@ class Circular_arc_point_3 if(sols.size() == 1) { // the intersection must be a point const std::pair* pair= - boost::get >(&sols[0]); + std::get_if >(&sols[0]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } else { // the intersections must be a point const std::pair* pair= - boost::get >(&sols[less_xyz?0:1]); + std::get_if >(&sols[less_xyz?0:1]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } @@ -193,13 +193,13 @@ class Circular_arc_point_3 if(sols.size() == 1) { // the intersection must be a point const std::pair* pair= - boost::get >(&sols[0]); + std::get_if >(&sols[0]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } else { // the intersections must be a point const std::pair* pair= - boost::get >(&sols[less_xyz?0:1]); + std::get_if >(&sols[less_xyz?0:1]); CGAL_kernel_precondition(pair!=nullptr); *this = pair->first.rep(); } diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Intersection_traits.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Intersection_traits.h index 8ac95ae6..d5f514d9 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Intersection_traits.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Intersection_traits.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/Intersection_traits.h $ -// $Id: Intersection_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/Intersection_traits.h $ +// $Id: include/CGAL/Circular_kernel_3/Intersection_traits.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Philipp Möller and Sebastien Loriot @@ -13,9 +13,12 @@ #ifndef CGAL_CIRCULAR_KERNEL_3_INTERSECTION_TRAITS_H #define CGAL_CIRCULAR_KERNEL_3_INTERSECTION_TRAITS_H +#include + + #include -#include +#include #include namespace CGAL { @@ -36,7 +39,7 @@ struct SK3_Intersection_traits template struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< std::pair< typename SK::Circular_arc_point_3, unsigned int > CGAL_ADDITIONAL_VARIANT_FOR_ICL > type; @@ -49,7 +52,7 @@ struct SK3_Intersection_traits template struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< std::pair< typename SK::Circular_arc_point_3, unsigned int >, typename SK::Circle_3 CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -63,7 +66,7 @@ struct SK3_Intersection_traits template struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< std::pair< typename SK::Circular_arc_point_3, unsigned int >, typename SK::Circle_3 CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -77,7 +80,7 @@ struct SK3_Intersection_traits template struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< std::pair , typename SK::Circle_3 CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -87,7 +90,7 @@ struct SK3_Intersection_traits template struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< std::pair CGAL_ADDITIONAL_VARIANT_FOR_ICL > type; @@ -100,7 +103,7 @@ struct SK3_Intersection_traits template struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< typename SK::Circle_3, std::pair , typename SK::Circular_arc_3 @@ -111,7 +114,7 @@ struct SK3_Intersection_traits struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< std::pair , typename SK::Circular_arc_3 CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -125,7 +128,7 @@ struct SK3_Intersection_traits struct SK3_Intersection_traits { - typedef boost::variant< + typedef std::variant< std::pair , typename SK::Line_arc_3 CGAL_ADDITIONAL_VARIANT_FOR_ICL @@ -136,7 +139,7 @@ struct SK3_Intersection_traits struct SK3_intersect_ternary { - typedef boost::variant< + typedef std::variant< typename SK::Circle_3, typename SK::Plane_3, typename SK::Sphere_3, @@ -167,25 +170,4 @@ struct SK3_Intersection_traits - inline RT - sk3_intersection_return(T&& t) { return RT(std::forward(t)); } - template - inline RT - sk3_intersection_return() { return RT(); } - -} } //end of namespace CGAL::internal - - #endif // CGAL_CIRCULAR_KERNEL_2_INTERSECTION_TRAITS_H diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Line_arc_3.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Line_arc_3.h index 3b898a74..ef518549 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Line_arc_3.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/Line_arc_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/Line_arc_3.h $ -// $Id: Line_arc_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/Line_arc_3.h $ +// $Id: include/CGAL/Circular_kernel_3/Line_arc_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, @@ -94,9 +94,9 @@ namespace CGAL { // l must intersect s in 2 points CGAL_kernel_precondition(sols.size() == 2); const std::pair& pair1= - *boost::get >(&sols[0]); + *std::get_if >(&sols[0]); const std::pair& pair2= - *boost::get >(&sols[1]); + *std::get_if >(&sols[1]); if(less_xyz_first) { *this = Line_arc_3(l, pair1.first, pair2.first); } else { @@ -115,9 +115,9 @@ namespace CGAL { CGAL_kernel_precondition(sols1.size() > 0); CGAL_kernel_precondition(sols2.size() > 0); const std::pair& pair1= - *boost::get >(&sols1[(sols1.size()==1)?(0):(less_xyz_s1?0:1)]); + *std::get_if >(&sols1[(sols1.size()==1)?(0):(less_xyz_s1?0:1)]); const std::pair& pair2= - *boost::get >(&sols2[(sols2.size()==1)?(0):(less_xyz_s2?0:1)]); + *std::get_if >(&sols2[(sols2.size()==1)?(0):(less_xyz_s2?0:1)]); // the source and target must be different CGAL_kernel_precondition(pair1.first != pair2.first); *this = Line_arc_3(l, pair1.first, pair2.first); @@ -134,8 +134,8 @@ namespace CGAL { typedef typename SK3_Intersection_traits::type Intersection; Intersection i1 = SK().intersect_3_object()(l, p1); Intersection i2 = SK().intersect_3_object()(l, p2); - const typename SK::Point_3* point1=boost::get( & *i1 ); - const typename SK::Point_3* point2=boost::get( & *i2 ); + const typename SK::Point_3* point1=std::get_if( & *i1 ); + const typename SK::Point_3* point2=std::get_if( & *i2 ); CGAL_assertion(point1!=nullptr); CGAL_assertion(point2!=nullptr); // the source and target must be different diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h index 6572f60c..0ef8dc31 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h $ -// $Id: function_objects_polynomial_sphere.h 81d9556 2021-02-10T10:06:45+01:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h $ +// $Id: include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, @@ -21,7 +21,7 @@ #include -#include +#include #include #include diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/get_equation_object_on_curved_kernel_3.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/get_equation_object_on_curved_kernel_3.h index 815adbf9..fea73e33 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/get_equation_object_on_curved_kernel_3.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/get_equation_object_on_curved_kernel_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/get_equation_object_on_curved_kernel_3.h $ -// $Id: get_equation_object_on_curved_kernel_3.h ad813b4 2020-07-30T16:19:02+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/get_equation_object_on_curved_kernel_3.h $ +// $Id: include/CGAL/Circular_kernel_3/get_equation_object_on_curved_kernel_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/interface_macros.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/interface_macros.h index 77b26ff7..cf7ae06a 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/interface_macros.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/interface_macros.h @@ -3,13 +3,15 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/interface_macros.h $ -// $Id: interface_macros.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/interface_macros.h $ +// $Id: include/CGAL/Circular_kernel_3/interface_macros.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, // Sebastien Loriot, Julien Hazebrouck, Damien Leroy +#include + // Partially supported by the IST Programme of the EU as a // STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) @@ -18,7 +20,7 @@ // It's aimed at being included from within a kernel traits class, this // way we share more code. -// It is the responsability of the including file to correctly set the 2 +// It is the responsibility of the including file to correctly set the 2 // macros CGAL_Kernel_pred and CGAL_Kernel_cons. // And they are #undefed at the end of this file. diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_function_compare_spherical_kernel.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_function_compare_spherical_kernel.h index a589b557..84508f59 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_function_compare_spherical_kernel.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_function_compare_spherical_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_function_compare_spherical_kernel.h $ -// $Id: internal_function_compare_spherical_kernel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_function_compare_spherical_kernel.h $ +// $Id: include/CGAL/Circular_kernel_3/internal_function_compare_spherical_kernel.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_function_compare_to_right_spherical_kernel.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_function_compare_to_right_spherical_kernel.h index 9fdc2214..655585cd 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_function_compare_to_right_spherical_kernel.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_function_compare_to_right_spherical_kernel.h @@ -9,8 +9,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_function_compare_to_right_spherical_kernel.h $ -// $Id: internal_function_compare_to_right_spherical_kernel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_function_compare_to_right_spherical_kernel.h $ +// $Id: include/CGAL/Circular_kernel_3/internal_function_compare_to_right_spherical_kernel.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h index 2814b3aa..f076a2c0 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h $ -// $Id: internal_function_has_on_spherical_kernel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h $ +// $Id: include/CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_circle_3.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_circle_3.h index b9199040..720bb8d1 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_circle_3.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_circle_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_circle_3.h $ -// $Id: internal_functions_on_circle_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_circle_3.h $ +// $Id: include/CGAL/Circular_kernel_3/internal_functions_on_circle_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h index 23f9b1e1..eeb4e2be 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h $ -// $Id: internal_functions_on_circular_arc_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h $ +// $Id: include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, @@ -189,8 +189,6 @@ namespace CGAL { const typename SK::Circular_arc_3 & ca, OutputIterator res) { - typedef typename SK3_Intersection_traits::type result_type; typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; typedef std::vector< typename SK3_Intersection_traits::type @@ -198,7 +196,7 @@ namespace CGAL { typedef std::pair Solution; if(SK().has_on_3_object()(p,ca.supporting_circle())) { - *res++ = CGAL::internal::sk3_intersection_return(ca); + *res++ = ca; } solutions_container solutions; @@ -208,14 +206,14 @@ namespace CGAL { if(solutions.size() == 1) { const Solution& sol=*CGAL::Intersections::internal::intersect_get(solutions[0]); if(SK().has_on_3_object()(ca,sol.first,true)) - *res++ = CGAL::internal::sk3_intersection_return(sol); + *res++ = sol; } else { const Solution& sol1=*CGAL::Intersections::internal::intersect_get(solutions[0]); const Solution& sol2=*CGAL::Intersections::internal::intersect_get(solutions[1]); if(SK().has_on_3_object()(ca,sol1.first,true)) - *res++ = CGAL::internal::sk3_intersection_return(sol1); + *res++ = sol1; if(SK().has_on_3_object()(ca,sol2.first,true)) - *res++ = CGAL::internal::sk3_intersection_return(sol2); + *res++ = sol2; } return res; } @@ -261,8 +259,6 @@ namespace CGAL { const typename SK::Circular_arc_3 & a2, OutputIterator res) { - typedef typename SK3_Intersection_traits::type result_type; typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; typedef typename SK::Circular_arc_3 Circular_arc_3; typedef std::vector< typename SK3_Intersection_traits @@ -272,11 +268,11 @@ namespace CGAL { if(non_oriented_equal(a1.supporting_circle(), a2.supporting_circle())) { if(a1.rep().is_full()) { - *res++ = CGAL::internal::sk3_intersection_return(a2); + *res++ = a2; //return res; } else if(a2.rep().is_full()) { - *res++ = CGAL::internal::sk3_intersection_return(a1); + *res++ = a1; //return res; } else { bool t2_in_a1 = SK().has_on_3_object()(a1,a2.target(),true); @@ -289,58 +285,58 @@ namespace CGAL { SK().compare_xyz_3_object()(a1.source(), a2.source()); if(comp < 0) { if(a1.source() == a2.target()) { - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(a1.source(),1u)); + *res++ = std::make_pair(a1.source(),1u); } else { const Circular_arc_3 & arc = Circular_arc_3(a1.supporting_circle(),a1.source(),a2.target()); - *res++ = CGAL::internal::sk3_intersection_return(arc); + *res++ = arc; } if(a2.source() == a1.target()) { - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(a2.source(),1u)); + *res++ = std::make_pair(a2.source(),1u); } else { const Circular_arc_3 & arc = Circular_arc_3(a1.supporting_circle(),a2.source(),a1.target()); - *res++ = CGAL::internal::sk3_intersection_return(arc); + *res++ = arc; } } else if(comp > 0) { if(a2.source() == a1.target()) { - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(a2.source(),1u)); + *res++ = std::make_pair(a2.source(),1u); } else { const Circular_arc_3 & arc = Circular_arc_3(a1.supporting_circle(),a2.source(),a1.target()); - *res++ = CGAL::internal::sk3_intersection_return(arc); + *res++ = arc; } if(a1.source() == a2.target()) { - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(a1.source(),1u)); + *res++ = std::make_pair(a1.source(),1u); } else { const Circular_arc_3 & arc = Circular_arc_3(a1.supporting_circle(),a1.source(),a2.target()); - *res++ = CGAL::internal::sk3_intersection_return(arc); + *res++ = arc; } } else { - *res++ = CGAL::internal::sk3_intersection_return(a1); + *res++ = a1; } } else { - *res++ = CGAL::internal::sk3_intersection_return(a2); + *res++ = a2; } } else if(t2_in_a1) { if(a1.source() == a2.target()) - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(a1.source(),1u)); + *res++ = std::make_pair(a1.source(),1u); else { const Circular_arc_3 & arc = Circular_arc_3(a1.supporting_circle(),a1.source(),a2.target()); - *res++ = CGAL::internal::sk3_intersection_return(arc); + *res++ = arc; } //return res; } else if(s2_in_a1) { if(a2.source() == a1.target()) { - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(a2.source(),1u)); + *res++ = std::make_pair(a2.source(),1u); } else { const Circular_arc_3 & arc = Circular_arc_3(a1.supporting_circle(),a2.source(),a1.target()); - *res++ = CGAL::internal::sk3_intersection_return(arc); + *res++ = arc; } } else if(SK().has_on_3_object()(a2,a1.source(),true)) { - *res++ = CGAL::internal::sk3_intersection_return(a1); + *res++ = a1; } } } else { @@ -353,16 +349,16 @@ namespace CGAL { const Solution& sol=*CGAL::Intersections::internal::intersect_get(solutions[0]); if(SK().has_on_3_object()(a1,sol.first,true) && SK().has_on_3_object()(a2,sol.first,true)) - *res++ = solutions[0]; + *res++ = sol; } else { const Solution& sol1=*CGAL::Intersections::internal::intersect_get(solutions[0]); const Solution& sol2=*CGAL::Intersections::internal::intersect_get(solutions[1]); if(SK().has_on_3_object()(a1,sol1.first,true) && SK().has_on_3_object()(a2,sol1.first,true)) - *res++ = solutions[0]; + *res++ = sol1; if(SK().has_on_3_object()(a1,sol2.first,true) && SK().has_on_3_object()(a2,sol2.first,true)) - *res++ = solutions[1]; + *res++ = sol2; } } return res; diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_point_3.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_point_3.h index 1849f67f..a336c93b 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_point_3.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_point_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_point_3.h $ -// $Id: internal_functions_on_circular_arc_point_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_point_3.h $ +// $Id: include/CGAL/Circular_kernel_3/internal_functions_on_circular_arc_point_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_line_3.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_line_3.h index e75820d2..6b2eeee5 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_line_3.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_line_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_line_3.h $ -// $Id: internal_functions_on_line_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_line_3.h $ +// $Id: include/CGAL/Circular_kernel_3/internal_functions_on_line_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_line_arc_3.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_line_arc_3.h index 00d8e0c4..7e4411b0 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_line_arc_3.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_line_arc_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_line_arc_3.h $ -// $Id: internal_functions_on_line_arc_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_line_arc_3.h $ +// $Id: include/CGAL/Circular_kernel_3/internal_functions_on_line_arc_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado @@ -83,7 +83,6 @@ namespace CGAL { typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; typedef typename SK::Line_3 Line_3; typedef typename SK::Line_arc_3 Line_arc_3; - typedef typename SK3_Intersection_traits::type result_type; typename Intersection_traits::result_type o = SK().intersect_3_object()(l1.supporting_line(), @@ -96,7 +95,7 @@ namespace CGAL { Circular_arc_point_3 p = *inters_p; if(!SK().has_on_3_object()(l1,p,true)) return res; if(!SK().has_on_3_object()(l2,p,true)) return res; - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(p,1u)); + *res++ = std::make_pair(p,1u); } else if( CGAL::Intersections::internal::intersect_get(o) ) { if(SK().compare_xyz_3_object()(l1.lower_xyz_extremity(), l2.lower_xyz_extremity()) < 0) { @@ -106,15 +105,15 @@ namespace CGAL { if(comparison < 0) { if(SK().compare_xyz_3_object()(l1.higher_xyz_extremity(), l2.higher_xyz_extremity()) <= 0) { - *res++ = CGAL::internal::sk3_intersection_return - (Line_arc_3(l1.supporting_line(), - l2.lower_xyz_extremity(), - l1.higher_xyz_extremity())); + *res++ = + Line_arc_3(l1.supporting_line(), + l2.lower_xyz_extremity(), + l1.higher_xyz_extremity()); } else { - *res++ = CGAL::internal::sk3_intersection_return(l2); + *res++ = l2; } } else if (comparison == 0) { - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(l2.lower_xyz_extremity(),1u)); + *res++ = std::make_pair(l2.lower_xyz_extremity(),1u); } } else { @@ -124,16 +123,16 @@ namespace CGAL { if(comparison < 0){ if(SK().compare_xyz_3_object()(l1.higher_xyz_extremity(), l2.higher_xyz_extremity()) <= 0) { - *res++ = CGAL::internal::sk3_intersection_return(l1); + *res++ = l1; } else { - *res++ = CGAL::internal::sk3_intersection_return - (Line_arc_3(l1.supporting_line(), - l1.lower_xyz_extremity(), - l2.higher_xyz_extremity() )); + *res++ = + Line_arc_3(l1.supporting_line(), + l1.lower_xyz_extremity(), + l2.higher_xyz_extremity() ); } } else if (comparison == 0){ - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(l1.lower_xyz_extremity(),1u)); + *res++ = std::make_pair(l1.lower_xyz_extremity(),1u); } } } @@ -149,8 +148,6 @@ namespace CGAL { typedef typename SK::Point_3 Point_3; typedef typename SK::Circular_arc_point_3 Circular_arc_point_3; typedef typename SK::Line_3 Line_3; - typedef typename SK::Line_arc_3 Line_arc_3; - typedef typename SK3_Intersection_traits::type result_type; typename Intersection_traits::result_type o = SK().intersect_3_object()(l, la.supporting_line()); @@ -159,11 +156,11 @@ namespace CGAL { return res; if(const Line_3* inters_l = CGAL::Intersections::internal::intersect_get(o)) { - *res++ = CGAL::internal::sk3_intersection_return(la); + *res++ = la; } else if(const Point_3* inters_p = CGAL::Intersections::internal::intersect_get(o)) { Circular_arc_point_3 p = *inters_p; if(!SK().has_on_3_object()(la,p,true)) return res; - *res++ = CGAL::internal::sk3_intersection_return(std::make_pair(p,1u)); + *res++ = std::make_pair(p,1u); } return res; diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_plane_3.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_plane_3.h index 983e2b74..16c8146e 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_plane_3.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_plane_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_plane_3.h $ -// $Id: internal_functions_on_plane_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_plane_3.h $ +// $Id: include/CGAL/Circular_kernel_3/internal_functions_on_plane_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h index 41565f73..e7d2573d 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h $ -// $Id: internal_functions_on_sphere_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h $ +// $Id: include/CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado @@ -202,17 +202,10 @@ namespace CGAL { namespace internal { // we need to pass the result_type, to hack around the fact that // object doesn't support operator=(const T&) and so we keep backwards compatibility - template - struct pair_transform { - RT operator()(const std::pair< typename SK::Root_for_spheres_2_3, unsigned >& p) { - return RT(std::make_pair(typename SK::Circular_arc_point_3(p.first), p.second)); - } - }; - template - struct pair_transform { - CGAL::Object operator()(const std::pair< typename SK::Root_for_spheres_2_3, unsigned >& p) { - return CGAL::make_object(std::make_pair(typename SK::Circular_arc_point_3(p.first), p.second)); + struct pair_transform { + auto operator()(const std::pair< typename SK::Root_for_spheres_2_3, unsigned >& p) { + return std::make_pair(typename SK::Circular_arc_point_3(p.first), p.second); } }; @@ -222,15 +215,15 @@ namespace CGAL { // pair, otherwise just dump the value with conversion to RT // (again: converting to RT before assigning to the Iterator is // just to keep object working) - template - struct Point_conversion_visitor : public boost::static_visitor { + template + struct Point_conversion_visitor { Point_conversion_visitor(const OutputIterator& it) : it(it) {} template - OutputIterator operator()(const T& t) { *it++ = RT(t); return it; } + OutputIterator operator()(const T& t) { *it++ = t; return it; } OutputIterator operator()(const typename SK::Point_3& p) { // 2 multiplicities - *it++ = RT(std::make_pair(typename SK::Circular_arc_point_3(p), 2u)); + *it++ = std::make_pair(typename SK::Circular_arc_point_3(p), 2u); return it; } OutputIterator it; @@ -244,8 +237,6 @@ namespace CGAL { const typename SK::Line_3 & l, OutputIterator res) { - typedef typename SK3_Intersection_traits - ::type result_type; typedef typename SK::Algebraic_kernel Algebraic_kernel; typedef typename SK::Polynomial_for_spheres_2_3 Equation_sphere; typedef typename SK::Polynomials_for_line_3 Equation_line; @@ -259,7 +250,7 @@ namespace CGAL { solutions_container solutions; Algebraic_kernel().solve_object()(e1, e2, std::back_inserter(solutions)); - return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); + return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); } // The special 3 object functions @@ -278,20 +269,20 @@ namespace CGAL { typedef typename SK::Point_3 Point_3; typedef typename SK::Sphere_3 Sphere_3; typedef typename SK::Algebraic_kernel Algebraic_kernel; - typedef typename SK3_Intersection_traits::type result_type; + typedef typename SK::Boolean Bool; CGAL_kernel_precondition(!s1.is_degenerate()); CGAL_kernel_precondition(!s2.is_degenerate()); CGAL_kernel_precondition(!s3.is_degenerate()); if(non_oriented_equal(s1,s2) && non_oriented_equal(s2,s3)) { - *res++ = result_type(s1); + *res++ = s1; return res; } if(non_oriented_equal(s1,s2)) { if(typename Intersection_traits::result_type v = SK().intersect_3_object()(s1, s3)) { - internal::Point_conversion_visitor visitor(res); - return boost::apply_visitor(visitor, + internal::Point_conversion_visitor visitor(res); + return std::visit(visitor, *v); } return res; @@ -299,8 +290,8 @@ namespace CGAL { if(non_oriented_equal(s1,s3) || non_oriented_equal(s2,s3)) { if(typename Intersection_traits::result_type v = SK().intersect_3_object()(s1, s2)) { - internal::Point_conversion_visitor visitor(res); - return boost::apply_visitor( + internal::Point_conversion_visitor visitor(res); + return std::visit( visitor, *v); } @@ -312,13 +303,13 @@ namespace CGAL { if(!v) return res; if(const Point_3* p = CGAL::Intersections::internal::intersect_get(v)) { if(SK().has_on_3_object()(s3, *p)) { - *res++ = result_type(std::make_pair(Circular_arc_point_3(*p),2u)); + *res++ = std::make_pair(Circular_arc_point_3(*p),2u); } return res; } if(const Circle_3* c = CGAL::Intersections::internal::intersect_get(v)) { - if(SK().has_on_3_object()(s3, *c)) { - *res++ = result_type(*c); + if(static_cast(SK().has_on_3_object()(s3, *c))) { + *res++ = *c; } return res; } @@ -332,7 +323,7 @@ namespace CGAL { algebraic_solutions_container solutions; Algebraic_kernel().solve_object()(e1, e2, e3, std::back_inserter(solutions)); - return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); + return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); } template < class SK, class OutputIterator > @@ -342,8 +333,6 @@ namespace CGAL { const typename SK::Sphere_3 & s2, OutputIterator res) { - typedef typename boost::variant< std::pair< typename SK::Circular_arc_point_3, unsigned int>, - typename SK::Circle_3 > result_type; typedef typename SK::Root_for_spheres_2_3 Root_for_spheres_2_3; typedef typename SK::Polynomial_for_spheres_2_3 Equation_sphere; typedef typename SK::Polynomial_1_3 Equation_plane; @@ -356,8 +345,8 @@ namespace CGAL { if(non_oriented_equal(s1,s2)) { if(typename Intersection_traits::result_type v = SK().intersect_3_object()(p, s1)) { - internal::Point_conversion_visitor visitor(res); - return boost::apply_visitor( + internal::Point_conversion_visitor visitor(res); + return std::visit( visitor, *v); } @@ -367,8 +356,8 @@ namespace CGAL { if(non_oriented_equal(p,radical_p)) { if(typename Intersection_traits::result_type v = SK().intersect_3_object()(p, s1)) { - internal::Point_conversion_visitor visitor(res); - return boost::apply_visitor( + internal::Point_conversion_visitor visitor(res); + return std::visit( visitor, *v); } @@ -381,7 +370,7 @@ namespace CGAL { algebraic_solutions_container; algebraic_solutions_container solutions; Algebraic_kernel().solve_object()(e1, e2, e3, std::back_inserter(solutions)); - return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); + return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); } template < class SK, class OutputIterator > @@ -391,8 +380,6 @@ namespace CGAL { const typename SK::Sphere_3 & s, OutputIterator res) { - typedef typename boost::variant< std::pair< typename SK::Circular_arc_point_3, unsigned int>, - typename SK::Circle_3 > result_type; typedef typename SK::Root_for_spheres_2_3 Root_for_spheres_2_3; typedef typename SK::Polynomial_for_spheres_2_3 Equation_sphere; typedef typename SK::Polynomial_1_3 Equation_plane; @@ -405,8 +392,8 @@ namespace CGAL { if(non_oriented_equal(p1,p2)) { if(typename Intersection_traits::result_type v = SK().intersect_3_object()(p1, s)) { - internal::Point_conversion_visitor visitor(res); - return boost::apply_visitor( + internal::Point_conversion_visitor visitor(res); + return std::visit( visitor, *v); } @@ -419,7 +406,7 @@ namespace CGAL { algebraic_solutions_container; algebraic_solutions_container solutions; Algebraic_kernel().solve_object()(e1, e2, e3, std::back_inserter(solutions)); - return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); + return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); } template < class SK, class OutputIterator > @@ -449,13 +436,9 @@ namespace CGAL { typedef typename SK::Root_for_spheres_2_3 Root_for_spheres_2_3; typedef typename SK::Polynomials_for_circle_3 Equation_circle; typedef typename SK::Algebraic_kernel Algebraic_kernel; - typedef typename SK::Circle_3 Circle_3; - - typedef typename SK3_Intersection_traits - ::type result_type; if(non_oriented_equal(c1,c2)) { - *res++ = CGAL::internal::sk3_intersection_return(c1); + *res++ = c1; return res; } Equation_circle e1 = get_equation(c1); @@ -464,7 +447,7 @@ namespace CGAL { algebraic_solutions_container; algebraic_solutions_container solutions; Algebraic_kernel().solve_object()(e1, e2, std::back_inserter(solutions)); - return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); + return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); } template < class SK, class OutputIterator > @@ -476,10 +459,6 @@ namespace CGAL { typedef typename SK::Root_for_spheres_2_3 Root_for_spheres_2_3; typedef typename SK::Polynomials_for_circle_3 Equation_circle; typedef typename SK::Polynomials_for_line_3 Equation_line; - typedef typename SK::Circle_3 Circle_3; - - typedef typename SK3_Intersection_traits - ::type result_type; typedef typename SK::Algebraic_kernel Algebraic_kernel; CGAL_kernel_precondition(!l.is_degenerate()); @@ -489,7 +468,7 @@ namespace CGAL { algebraic_solutions_container; algebraic_solutions_container solutions; Algebraic_kernel().solve_object()(e1, e2, std::back_inserter(solutions)); - return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); + return std::transform(solutions.begin(), solutions.end(), res, internal::pair_transform()); } // At the moment we dont need those functions diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_converter.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_converter.h index b619f70a..e2d20f52 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_converter.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_converter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_converter.h $ -// $Id: Circular_kernel_converter.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_converter.h $ +// $Id: include/CGAL/Circular_kernel_converter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_intersections.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_intersections.h index 31d769f3..7d1c0015 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_intersections.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_intersections.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_intersections.h $ -// $Id: Circular_kernel_intersections.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_intersections.h $ +// $Id: include/CGAL/Circular_kernel_intersections.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Circular_kernel_type_equality_wrapper.h b/thirdparty/CGAL/include/CGAL/Circular_kernel_type_equality_wrapper.h index c56e88ba..10f92a5b 100644 --- a/thirdparty/CGAL/include/CGAL/Circular_kernel_type_equality_wrapper.h +++ b/thirdparty/CGAL/include/CGAL/Circular_kernel_type_equality_wrapper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Circular_kernel_type_equality_wrapper.h $ -// $Id: Circular_kernel_type_equality_wrapper.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Circular_kernel_type_equality_wrapper.h $ +// $Id: include/CGAL/Circular_kernel_type_equality_wrapper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Circulator/Circulator_adapters.h b/thirdparty/CGAL/include/CGAL/Circulator/Circulator_adapters.h index 571c6250..e36177db 100644 --- a/thirdparty/CGAL/include/CGAL/Circulator/Circulator_adapters.h +++ b/thirdparty/CGAL/include/CGAL/Circulator/Circulator_adapters.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circulator/include/CGAL/Circulator/Circulator_adapters.h $ -// $Id: Circulator_adapters.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circulator/include/CGAL/Circulator/Circulator_adapters.h $ +// $Id: include/CGAL/Circulator/Circulator_adapters.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Circulator/Circulator_concepts.h b/thirdparty/CGAL/include/CGAL/Circulator/Circulator_concepts.h index 76dd0ab9..ea151cf4 100644 --- a/thirdparty/CGAL/include/CGAL/Circulator/Circulator_concepts.h +++ b/thirdparty/CGAL/include/CGAL/Circulator/Circulator_concepts.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circulator/include/CGAL/Circulator/Circulator_concepts.h $ -// $Id: Circulator_concepts.h c9af7a1 2020-10-14T10:59:46+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circulator/include/CGAL/Circulator/Circulator_concepts.h $ +// $Id: include/CGAL/Circulator/Circulator_concepts.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Circulator/Safe_circulator_from_iterator.h b/thirdparty/CGAL/include/CGAL/Circulator/Safe_circulator_from_iterator.h index 9520928f..d3690bc3 100644 --- a/thirdparty/CGAL/include/CGAL/Circulator/Safe_circulator_from_iterator.h +++ b/thirdparty/CGAL/include/CGAL/Circulator/Safe_circulator_from_iterator.h @@ -8,8 +8,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circulator/include/CGAL/Circulator/Safe_circulator_from_iterator.h $ -// $Id: Safe_circulator_from_iterator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circulator/include/CGAL/Circulator/Safe_circulator_from_iterator.h $ +// $Id: include/CGAL/Circulator/Safe_circulator_from_iterator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,7 +22,7 @@ #include -#include +#include #include @@ -53,9 +53,9 @@ class Safe_circulator_from_iterator { private: - boost::optional m_begin; - boost::optional m_end; - boost::optional m_current; + std::optional m_begin; + std::optional m_end; + std::optional m_current; bool m_empty; public: diff --git a/thirdparty/CGAL/include/CGAL/Circulator_identity.h b/thirdparty/CGAL/include/CGAL/Circulator_identity.h index 6119fcd2..a5ccd323 100644 --- a/thirdparty/CGAL/include/CGAL/Circulator_identity.h +++ b/thirdparty/CGAL/include/CGAL/Circulator_identity.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Circulator_identity.h $ -// $Id: Circulator_identity.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Circulator_identity.h $ +// $Id: include/CGAL/Circulator_identity.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Circulator_on_node.h b/thirdparty/CGAL/include/CGAL/Circulator_on_node.h index e3bdbe20..6e41743a 100644 --- a/thirdparty/CGAL/include/CGAL/Circulator_on_node.h +++ b/thirdparty/CGAL/include/CGAL/Circulator_on_node.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Circulator_on_node.h $ -// $Id: Circulator_on_node.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Circulator_on_node.h $ +// $Id: include/CGAL/Circulator_on_node.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Circulator_project.h b/thirdparty/CGAL/include/CGAL/Circulator_project.h index 21c5fefc..3c4c91ab 100644 --- a/thirdparty/CGAL/include/CGAL/Circulator_project.h +++ b/thirdparty/CGAL/include/CGAL/Circulator_project.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Circulator_project.h $ -// $Id: Circulator_project.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Circulator_project.h $ +// $Id: include/CGAL/Circulator_project.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Classification.h b/thirdparty/CGAL/include/CGAL/Classification.h index 2570d0c9..d5a95811 100644 --- a/thirdparty/CGAL/include/CGAL/Classification.h +++ b/thirdparty/CGAL/include/CGAL/Classification.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification.h $ -// $Id: Classification.h 8264096 2021-02-23T08:49:18+01:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification.h $ +// $Id: include/CGAL/Classification.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Cluster.h b/thirdparty/CGAL/include/CGAL/Classification/Cluster.h index 81bc1beb..b09c8e52 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Cluster.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Cluster.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Cluster.h $ -// $Id: Cluster.h 8166579 2021-10-11T19:58:07+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Cluster.h $ +// $Id: include/CGAL/Classification/Cluster.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/ETHZ/Random_forest_classifier.h b/thirdparty/CGAL/include/CGAL/Classification/ETHZ/Random_forest_classifier.h index ba3e0f91..21fdcc34 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/ETHZ/Random_forest_classifier.h +++ b/thirdparty/CGAL/include/CGAL/Classification/ETHZ/Random_forest_classifier.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/ETHZ/Random_forest_classifier.h $ -// $Id: Random_forest_classifier.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/ETHZ/Random_forest_classifier.h $ +// $Id: include/CGAL/Classification/ETHZ/Random_forest_classifier.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -63,7 +63,7 @@ namespace ETHZ { \note This classifier is distributed under the MIT license. - \cgalModels `CGAL::Classification::Classifier` + \cgalModels{CGAL::Classification::Classifier} */ class Random_forest_classifier { diff --git a/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/dataview.h b/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/dataview.h index 5f39433c..3ef4cbae 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/dataview.h +++ b/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/dataview.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/ETHZ/internal/dataview.h $ -// $Id: dataview.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/ETHZ/internal/dataview.h $ +// $Id: include/CGAL/Classification/ETHZ/internal/dataview.h a484bfa $ // SPDX-License-Identifier: LicenseRef-RFL // License notice in Installation/LICENSE.RFL // diff --git a/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp b/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp index 6b3505d3..e6bb1355 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp +++ b/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp $ -// $Id: common-libraries.hpp 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp $ +// $Id: include/CGAL/Classification/ETHZ/internal/random-forest/common-libraries.hpp a484bfa $ // SPDX-License-Identifier: LicenseRef-RFL // License notice in Installation/LICENSE.RFL // @@ -34,18 +34,14 @@ #include #include #include -#if BOOST_VERSION >= 104700 -# include -#else -# include -#endif +#include #include #include #if defined(CGAL_LINKED_WITH_BOOST_IOSTREAMS) && defined(CGAL_LINKED_WITH_BOOST_SERIALIZATION) #include #endif #include -#include +#include #include #include #include @@ -65,17 +61,10 @@ inline void init_feature_class_data(FeatureClassDataFloat& /*data*/, int /*n_cla } typedef std::unordered_set FeatureSet; -#if BOOST_VERSION >= 104700 typedef boost::random::uniform_int_distribution<> UniformIntDist; typedef boost::random::normal_distribution<> NormalDist; typedef boost::random::mt19937 RandomGen; typedef boost::random::uniform_01<> UnitDist; -#else -typedef boost::uniform_int<> UniformIntDist; -typedef boost::normal_distribution<> NormalDist; -typedef boost::uniform_01<> UnitDist; -typedef boost::mt19937 RandomGen; -#endif struct ForestParams { size_t n_classes; diff --git a/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/forest.hpp b/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/forest.hpp index dd5f0e7a..5d9e0554 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/forest.hpp +++ b/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/forest.hpp @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/forest.hpp $ -// $Id: forest.hpp 7599bbe 2020-10-01T13:53:02+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/forest.hpp $ +// $Id: include/CGAL/Classification/ETHZ/internal/random-forest/forest.hpp a484bfa $ // SPDX-License-Identifier: LicenseRef-RFL // License notice in Installation/LICENSE.RFL // @@ -164,7 +164,7 @@ class RandomForest { f (seed_start, sample_idxes, trees, samples, labels, params.n_in_bag_samples, split_generator); #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (std::is_convertible::value) diff --git a/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/node-gini.hpp b/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/node-gini.hpp index 7f79c764..b1d4479a 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/node-gini.hpp +++ b/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/node-gini.hpp @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/node-gini.hpp $ -// $Id: node-gini.hpp 7cfe6df 2020-04-07T11:02:16+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/node-gini.hpp $ +// $Id: include/CGAL/Classification/ETHZ/internal/random-forest/node-gini.hpp a484bfa $ // SPDX-License-Identifier: LicenseRef-RFL // License notice in Installation/LICENSE.RFL // diff --git a/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/node.hpp b/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/node.hpp index 62f0e37e..44e4d9f0 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/node.hpp +++ b/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/node.hpp @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/node.hpp $ -// $Id: node.hpp 7599bbe 2020-10-01T13:53:02+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/node.hpp $ +// $Id: include/CGAL/Classification/ETHZ/internal/random-forest/node.hpp a484bfa $ // SPDX-License-Identifier: LicenseRef-RFL // License notice in Installation/LICENSE.RFL // diff --git a/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/tree.hpp b/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/tree.hpp index 0736a075..4efc61d9 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/tree.hpp +++ b/thirdparty/CGAL/include/CGAL/Classification/ETHZ/internal/random-forest/tree.hpp @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/tree.hpp $ -// $Id: tree.hpp ed25fd2 2020-04-07T11:02:16+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/tree.hpp $ +// $Id: include/CGAL/Classification/ETHZ/internal/random-forest/tree.hpp a484bfa $ // SPDX-License-Identifier: LicenseRef-RFL // License notice in Installation/LICENSE.RFL // diff --git a/thirdparty/CGAL/include/CGAL/Classification/Evaluation.h b/thirdparty/CGAL/include/CGAL/Classification/Evaluation.h index 6af12a95..ccfcd105 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Evaluation.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Evaluation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Evaluation.h $ -// $Id: Evaluation.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Evaluation.h $ +// $Id: include/CGAL/Classification/Evaluation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_mean_of_feature.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_mean_of_feature.h index c5dd1112..5d959e23 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_mean_of_feature.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_mean_of_feature.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Cluster_mean_of_feature.h $ -// $Id: Cluster_mean_of_feature.h 0e934b1 2020-08-04T13:16:13+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Cluster_mean_of_feature.h $ +// $Id: include/CGAL/Classification/Feature/Cluster_mean_of_feature.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_size.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_size.h index 136adec4..abdbb782 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_size.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_size.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Cluster_size.h $ -// $Id: Cluster_size.h 0e934b1 2020-08-04T13:16:13+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Cluster_size.h $ +// $Id: include/CGAL/Classification/Feature/Cluster_size.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_variance_of_feature.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_variance_of_feature.h index 5c301df5..f446c428 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_variance_of_feature.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_variance_of_feature.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Cluster_variance_of_feature.h $ -// $Id: Cluster_variance_of_feature.h 0e934b1 2020-08-04T13:16:13+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Cluster_variance_of_feature.h $ +// $Id: include/CGAL/Classification/Feature/Cluster_variance_of_feature.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_vertical_extent.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_vertical_extent.h index 1f5d869f..8bb29a92 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_vertical_extent.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Cluster_vertical_extent.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Cluster_vertical_extent.h $ -// $Id: Cluster_vertical_extent.h 19004a7 2020-08-04T13:41:48+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Cluster_vertical_extent.h $ +// $Id: include/CGAL/Classification/Feature/Cluster_vertical_extent.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Color_channel.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Color_channel.h index 7c8e22f1..348987ff 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Color_channel.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Color_channel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Color_channel.h $ -// $Id: Color_channel.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Color_channel.h $ +// $Id: include/CGAL/Classification/Feature/Color_channel.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Distance_to_plane.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Distance_to_plane.h index 61b43dfc..122356c4 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Distance_to_plane.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Distance_to_plane.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Distance_to_plane.h $ -// $Id: Distance_to_plane.h 0e934b1 2020-08-04T13:16:13+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Distance_to_plane.h $ +// $Id: include/CGAL/Classification/Feature/Distance_to_plane.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot, Florent Lafarge diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Echo_scatter.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Echo_scatter.h index b00dcec9..1fd02c8a 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Echo_scatter.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Echo_scatter.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Echo_scatter.h $ -// $Id: Echo_scatter.h 0e934b1 2020-08-04T13:16:13+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Echo_scatter.h $ +// $Id: include/CGAL/Classification/Feature/Echo_scatter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot, Florent Lafarge diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Eigenvalue.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Eigenvalue.h index b3ee2af9..f90c777c 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Eigenvalue.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Eigenvalue.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Eigenvalue.h $ -// $Id: Eigenvalue.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Eigenvalue.h $ +// $Id: include/CGAL/Classification/Feature/Eigenvalue.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Elevation.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Elevation.h index 2ac11bcf..df3794c1 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Elevation.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Elevation.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Elevation.h $ -// $Id: Elevation.h 19004a7 2020-08-04T13:41:48+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Elevation.h $ +// $Id: include/CGAL/Classification/Feature/Elevation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Florent Lafarge, Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Gradient_of_feature.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Gradient_of_feature.h index 3b2d57a0..395c0927 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Gradient_of_feature.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Gradient_of_feature.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Gradient_of_feature.h $ -// $Id: Gradient_of_feature.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Gradient_of_feature.h $ +// $Id: include/CGAL/Classification/Feature/Gradient_of_feature.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -37,7 +37,7 @@ class Gradient_of_feature : public Feature_base const InputRange& m_input; ItemMap m_map; Feature_handle m_feature; - boost::shared_ptr m_query; + std::shared_ptr m_query; public: /*! diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Height_above.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Height_above.h index fbfb323b..4a1b2596 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Height_above.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Height_above.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Height_above.h $ -// $Id: Height_above.h 19004a7 2020-08-04T13:41:48+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Height_above.h $ +// $Id: include/CGAL/Classification/Feature/Height_above.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Florent Lafarge, Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Height_below.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Height_below.h index e5e3f955..5fc43c7d 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Height_below.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Height_below.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Height_below.h $ -// $Id: Height_below.h 19004a7 2020-08-04T13:41:48+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Height_below.h $ +// $Id: include/CGAL/Classification/Feature/Height_below.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Florent Lafarge, Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Simple_feature.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Simple_feature.h index c4f13473..9da948d2 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Simple_feature.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Simple_feature.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Simple_feature.h $ -// $Id: Simple_feature.h 0e934b1 2020-08-04T13:16:13+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Simple_feature.h $ +// $Id: include/CGAL/Classification/Feature/Simple_feature.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Vertical_dispersion.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Vertical_dispersion.h index d38e6f2b..10de645d 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Vertical_dispersion.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Vertical_dispersion.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Vertical_dispersion.h $ -// $Id: Vertical_dispersion.h 0e934b1 2020-08-04T13:16:13+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Vertical_dispersion.h $ +// $Id: include/CGAL/Classification/Feature/Vertical_dispersion.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Vertical_range.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Vertical_range.h index ead89ca3..4ebfc973 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Vertical_range.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Vertical_range.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Vertical_range.h $ -// $Id: Vertical_range.h 19004a7 2020-08-04T13:41:48+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Vertical_range.h $ +// $Id: include/CGAL/Classification/Feature/Vertical_range.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Florent Lafarge, Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature/Verticality.h b/thirdparty/CGAL/include/CGAL/Classification/Feature/Verticality.h index feb3e443..1cba3da1 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature/Verticality.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature/Verticality.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature/Verticality.h $ -// $Id: Verticality.h 0e934b1 2020-08-04T13:16:13+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature/Verticality.h $ +// $Id: include/CGAL/Classification/Feature/Verticality.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature_base.h b/thirdparty/CGAL/include/CGAL/Classification/Feature_base.h index 8f8d138d..560e1f40 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature_base.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature_base.h $ -// $Id: Feature_base.h 627584f 2020-09-30T08:38:45+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature_base.h $ +// $Id: include/CGAL/Classification/Feature_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -68,7 +68,7 @@ class Feature_base \brief %Handle to a `Feature_base`. - \cgalModels Handle + \cgalModels{Handle} */ class Feature_handle { }; #else diff --git a/thirdparty/CGAL/include/CGAL/Classification/Feature_set.h b/thirdparty/CGAL/include/CGAL/Classification/Feature_set.h index 567ad59a..b983b793 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Feature_set.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Feature_set.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Feature_set.h $ -// $Id: Feature_set.h 473d30b 2021-04-06T15:12:45+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Feature_set.h $ +// $Id: include/CGAL/Classification/Feature_set.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Image.h b/thirdparty/CGAL/include/CGAL/Classification/Image.h index ebbd4b5b..50998282 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Image.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Image.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Image.h $ -// $Id: Image.h 43014ba 2020-04-02T10:28:50+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Image.h $ +// $Id: include/CGAL/Classification/Image.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -16,6 +16,7 @@ #include #include +#include #define CGAL_CLASSIFICATION_IMAGE_SIZE_LIMIT 100000000 @@ -38,13 +39,16 @@ class Image std::shared_ptr m_sparse; Type m_default; + +public: // Forbid using copy constructor - Image (const Image&) + // Make it public for a strange VC++ std17 boost-1_82 error + // https://github.com/boostorg/core/issues/148 + Image(const Image&) { + CGAL_assertion(false); } -public: - Image () : m_width(0), m_height(0), m_depth(0) { } diff --git a/thirdparty/CGAL/include/CGAL/Classification/Label.h b/thirdparty/CGAL/include/CGAL/Classification/Label.h index 65c84a66..ee00d2c5 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Label.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Label.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Label.h $ -// $Id: Label.h c863ee6 2021-05-04T17:28:52+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Label.h $ +// $Id: include/CGAL/Classification/Label.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -105,7 +105,7 @@ class Label \brief %Handle to a classification `Label`. - \cgalModels Handle + \cgalModels{Handle} */ class Label_handle { }; #else diff --git a/thirdparty/CGAL/include/CGAL/Classification/Label_set.h b/thirdparty/CGAL/include/CGAL/Classification/Label_set.h index 6e85ca28..8f4b3228 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Label_set.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Label_set.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Label_set.h $ -// $Id: Label_set.h 7fe4c32 2021-12-27T09:19:42+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Label_set.h $ +// $Id: include/CGAL/Classification/Label_set.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Local_eigen_analysis.h b/thirdparty/CGAL/include/CGAL/Classification/Local_eigen_analysis.h index 4c4aec48..a364bef3 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Local_eigen_analysis.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Local_eigen_analysis.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Local_eigen_analysis.h $ -// $Id: Local_eigen_analysis.h 350b917 2021-04-11T14:50:44+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Local_eigen_analysis.h $ +// $Id: include/CGAL/Classification/Local_eigen_analysis.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -265,7 +265,7 @@ class Local_eigen_analysis out.m_content->mean_range = 0.; #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (std::is_convertible::value) @@ -353,7 +353,7 @@ class Local_eigen_analysis out.m_content->mean_range = 0.; #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (std::is_convertible::value) @@ -431,7 +431,7 @@ class Local_eigen_analysis #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (std::is_convertible::value) diff --git a/thirdparty/CGAL/include/CGAL/Classification/Mesh_feature_generator.h b/thirdparty/CGAL/include/CGAL/Classification/Mesh_feature_generator.h index 0f433974..da3cfb4b 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Mesh_feature_generator.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Mesh_feature_generator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Mesh_feature_generator.h $ -// $Id: Mesh_feature_generator.h 350b917 2021-04-11T14:50:44+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Mesh_feature_generator.h $ +// $Id: include/CGAL/Classification/Mesh_feature_generator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Mesh_neighborhood.h b/thirdparty/CGAL/include/CGAL/Classification/Mesh_neighborhood.h index 74c9022b..ae979016 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Mesh_neighborhood.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Mesh_neighborhood.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Mesh_neighborhood.h $ -// $Id: Mesh_neighborhood.h 0e934b1 2020-08-04T13:16:13+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Mesh_neighborhood.h $ +// $Id: include/CGAL/Classification/Mesh_neighborhood.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -77,7 +77,7 @@ class Mesh_neighborhood /*! Functor that computes the 1-ring neighborhood of the face of an input mesh. - \cgalModels CGAL::Classification::NeighborQuery + \cgalModels{CGAL::Classification::NeighborQuery} \sa Mesh_neighborhood */ @@ -110,7 +110,7 @@ class Mesh_neighborhood /*! Functor that computes the N-ring neighborhood of the face of an input mesh. - \cgalModels CGAL::Classification::NeighborQuery + \cgalModels{CGAL::Classification::NeighborQuery} \sa Mesh_neighborhood */ diff --git a/thirdparty/CGAL/include/CGAL/Classification/OpenCV/Random_forest_classifier.h b/thirdparty/CGAL/include/CGAL/Classification/OpenCV/Random_forest_classifier.h index 36b5090e..a91284c3 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/OpenCV/Random_forest_classifier.h +++ b/thirdparty/CGAL/include/CGAL/Classification/OpenCV/Random_forest_classifier.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/OpenCV/Random_forest_classifier.h $ -// $Id: Random_forest_classifier.h 0e934b1 2020-08-04T13:16:13+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/OpenCV/Random_forest_classifier.h $ +// $Id: include/CGAL/Classification/OpenCV/Random_forest_classifier.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -47,7 +47,7 @@ namespace OpenCV { \note This class requires the \ref thirdpartyOpenCV library. - \cgalModels `CGAL::Classification::Classifier` + \cgalModels{CGAL::Classification::Classifier} */ class Random_forest_classifier { diff --git a/thirdparty/CGAL/include/CGAL/Classification/Planimetric_grid.h b/thirdparty/CGAL/include/CGAL/Classification/Planimetric_grid.h index 33fbb4d9..628e8fcf 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Planimetric_grid.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Planimetric_grid.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Planimetric_grid.h $ -// $Id: Planimetric_grid.h 0e934b1 2020-08-04T13:16:13+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Planimetric_grid.h $ +// $Id: include/CGAL/Classification/Planimetric_grid.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot, Florent Lafarge diff --git a/thirdparty/CGAL/include/CGAL/Classification/Point_set_feature_generator.h b/thirdparty/CGAL/include/CGAL/Classification/Point_set_feature_generator.h index aeb703b5..8576a6e5 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Point_set_feature_generator.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Point_set_feature_generator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Point_set_feature_generator.h $ -// $Id: Point_set_feature_generator.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Point_set_feature_generator.h $ +// $Id: include/CGAL/Classification/Point_set_feature_generator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/Point_set_neighborhood.h b/thirdparty/CGAL/include/CGAL/Classification/Point_set_neighborhood.h index 51779d02..1f59178d 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Point_set_neighborhood.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Point_set_neighborhood.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Point_set_neighborhood.h $ -// $Id: Point_set_neighborhood.h 833e511 2021-11-10T11:31:42+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Point_set_neighborhood.h $ +// $Id: include/CGAL/Classification/Point_set_neighborhood.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -73,7 +73,7 @@ class Point_set_neighborhood My_point_property_map (const PointRange *input, PointMap point_map) : input (input), point_map (point_map) { } - // we did not put `reference` here on purpose as the recommanded default + // we did not put `reference` here on purpose as the recommended default // is `Identity_property_map` and not `Identity_property_map` friend decltype(auto) get (const My_point_property_map& ppmap, key_type i) { return get(ppmap.point_map, *(ppmap.input->begin()+std::size_t(i))); } @@ -96,7 +96,7 @@ class Point_set_neighborhood Functor that computes the neighborhood of an input point with a fixed number of neighbors. - \cgalModels CGAL::Classification::NeighborQuery + \cgalModels{CGAL::Classification::NeighborQuery} \sa Point_set_neighborhood */ @@ -131,7 +131,7 @@ class Point_set_neighborhood as the points lying in a sphere of fixed radius centered at the input point. - \cgalModels CGAL::Classification::NeighborQuery + \cgalModels{CGAL::Classification::NeighborQuery} \sa Point_set_neighborhood */ diff --git a/thirdparty/CGAL/include/CGAL/Classification/Sum_of_weighted_features_classifier.h b/thirdparty/CGAL/include/CGAL/Classification/Sum_of_weighted_features_classifier.h index 547849a3..26f37c3a 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/Sum_of_weighted_features_classifier.h +++ b/thirdparty/CGAL/include/CGAL/Classification/Sum_of_weighted_features_classifier.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h $ -// $Id: Sum_of_weighted_features_classifier.h 393ae7d 2021-05-12T15:03:53+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h $ +// $Id: include/CGAL/Classification/Sum_of_weighted_features_classifier.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot, Florent Lafarge @@ -48,7 +48,7 @@ namespace Classification { \brief %Classifier based on the sum of weighted features with user-defined effects on labels. - \cgalModels `CGAL::Classification::Classifier` + \cgalModels{CGAL::Classification::Classifier} */ class Sum_of_weighted_features_classifier { @@ -898,7 +898,7 @@ class Sum_of_weighted_features_classifier std::size_t gt = j; #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (std::is_convertible::value) diff --git a/thirdparty/CGAL/include/CGAL/Classification/classify.h b/thirdparty/CGAL/include/CGAL/Classification/classify.h index c92a4503..508aadea 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/classify.h +++ b/thirdparty/CGAL/include/CGAL/Classification/classify.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/classify.h $ -// $Id: classify.h 0e934b1 2020-08-04T13:16:13+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/classify.h $ +// $Id: include/CGAL/Classification/classify.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot, Florent Lafarge diff --git a/thirdparty/CGAL/include/CGAL/Classification/compressed_float.h b/thirdparty/CGAL/include/CGAL/Classification/compressed_float.h index 6883d4ce..2a36a2d9 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/compressed_float.h +++ b/thirdparty/CGAL/include/CGAL/Classification/compressed_float.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/compressed_float.h $ -// $Id: compressed_float.h e9d41d7 2020-04-21T10:03:00+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/compressed_float.h $ +// $Id: include/CGAL/Classification/compressed_float.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/internal/verbosity.h b/thirdparty/CGAL/include/CGAL/Classification/internal/verbosity.h index a2322165..c6724986 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/internal/verbosity.h +++ b/thirdparty/CGAL/include/CGAL/Classification/internal/verbosity.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/internal/verbosity.h $ -// $Id: verbosity.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/internal/verbosity.h $ +// $Id: include/CGAL/Classification/internal/verbosity.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Classification/property_maps.h b/thirdparty/CGAL/include/CGAL/Classification/property_maps.h index 8a045977..9848b5f0 100644 --- a/thirdparty/CGAL/include/CGAL/Classification/property_maps.h +++ b/thirdparty/CGAL/include/CGAL/Classification/property_maps.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Classification/include/CGAL/Classification/property_maps.h $ -// $Id: property_maps.h 590ddf8 2021-10-08T15:38:47+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Classification/include/CGAL/Classification/property_maps.h $ +// $Id: include/CGAL/Classification/property_maps.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -32,7 +32,7 @@ namespace Classification \brief Property map that constructs the center of mass of the face of a mesh on-the-fly. - \cgalModels `ReadablePropertyMap` + \cgalModels{ReadablePropertyMap} \tparam FaceGraph model of `FaceGraph`. @@ -85,7 +85,7 @@ class Face_descriptor_to_center_of_mass_map \brief Property map that constructs a face descriptor with a `bbox()` method from a face descriptor. - \cgalModels `ReadablePropertyMap` + \cgalModels{ReadablePropertyMap} \tparam FaceGraph model of `FaceGraph`. diff --git a/thirdparty/CGAL/include/CGAL/Coercion_traits.h b/thirdparty/CGAL/include/CGAL/Coercion_traits.h index bef3ae0f..bad4593d 100644 --- a/thirdparty/CGAL/include/CGAL/Coercion_traits.h +++ b/thirdparty/CGAL/include/CGAL/Coercion_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_foundations/include/CGAL/Coercion_traits.h $ -// $Id: Coercion_traits.h a88a84b 2021-08-13T15:46:50+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_foundations/include/CGAL/Coercion_traits.h $ +// $Id: include/CGAL/Coercion_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,21 +23,21 @@ #define CGAL_COERCION_TRAITS_H 1 #include +#include #include -#include #include -// Makro to define an additional operator for binary functors which takes +// Macro to define an additional operator for binary functors which takes // two number types as parameters that are interoperable with the // number type #define CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, Result_type ) \ template < class CT_Type_1, class CT_Type_2 > \ Result_type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { \ - CGAL_static_assertion((::boost::is_same< \ + static_assert(::std::is_same< \ typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT \ - >::value)); \ + >::value) ; \ \ typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; \ return operator()( cast(x), cast(y) ); \ diff --git a/thirdparty/CGAL/include/CGAL/Combination_enumerator.h b/thirdparty/CGAL/include/CGAL/Combination_enumerator.h index a6e4d6bc..3e884fd0 100644 --- a/thirdparty/CGAL/include/CGAL/Combination_enumerator.h +++ b/thirdparty/CGAL/include/CGAL/Combination_enumerator.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generator/include/CGAL/Combination_enumerator.h $ -// $Id: Combination_enumerator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generator/include/CGAL/Combination_enumerator.h $ +// $Id: include/CGAL/Combination_enumerator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus diff --git a/thirdparty/CGAL/include/CGAL/Combinatorial_map.h b/thirdparty/CGAL/include/CGAL/Combinatorial_map.h index d300a4a8..e1a10e0d 100644 --- a/thirdparty/CGAL/include/CGAL/Combinatorial_map.h +++ b/thirdparty/CGAL/include/CGAL/Combinatorial_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Combinatorial_map.h $ -// $Id: Combinatorial_map.h 95b6bf3 2022-03-18T15:58:28+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Combinatorial_map.h $ +// $Id: include/CGAL/Combinatorial_map.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -39,8 +40,8 @@ #include #include #include +#include #include -#include #include #include @@ -114,8 +115,8 @@ namespace CGAL { typedef Combinatorial_map_base Self; typedef Refs_ Refs; typedef typename Base::Dart Dart; - typedef typename Base::Dart_handle Dart_handle; - typedef typename Base::Dart_const_handle Dart_const_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; + typedef typename Base::Dart_const_descriptor Dart_const_descriptor; typedef typename Base::Dart_container Dart_container; typedef typename Base::size_type size_type; typedef typename Base::Helper Helper; @@ -123,15 +124,17 @@ namespace CGAL { typedef typename Base::Items Items; typedef typename Base::Alloc Alloc; typedef typename Base::Use_index Use_index; + typedef typename Base::Dart_range Dart_range; + typedef typename Base::Dart_const_range Dart_const_range; static const size_type NB_MARKS = Base::NB_MARKS; static const size_type INVALID_MARK = NB_MARKS; static const unsigned int dimension = Base::dimension; - typedef typename Base::Null_handle_type Null_handle_type; - using Base::null_handle; - using Base::null_dart_handle; + typedef typename Base::Null_descriptor_type Null_descriptor_type; + using Base::null_descriptor; + using Base::null_dart_descriptor; using Base::mdarts; using Base::get_beta; using Base::is_free; @@ -149,21 +152,22 @@ namespace CGAL { using Base::info_of_attribute; using Base::info; using Base::dart; - - /// Typedef for Dart_range, a range through all the darts of the map. - typedef Dart_container Dart_range; - typedef const Dart_container Dart_const_range; + using Base::darts; + using Base::number_of_darts; + using Base::is_empty; + using Base::upper_bound_on_dart_ids; + using Base::upper_bound_on_attribute_ids; /// Typedef for attributes template struct Attribute_type: public Base::template Attribute_type {}; template - struct Attribute_handle: public Base::template Attribute_handle + struct Attribute_descriptor: public Base::template Attribute_descriptor {}; template - struct Attribute_const_handle: - public Base::template Attribute_const_handle + struct Attribute_const_descriptor: + public Base::template Attribute_const_descriptor {}; template struct Attribute_range: public Base::template Attribute_range @@ -181,7 +185,7 @@ namespace CGAL { */ Combinatorial_map_base() { - CGAL_static_assertion_msg(Helper::nb_attribs<=dimension+1, + static_assert(Helper::nb_attribs<=dimension+1, "Too many attributes in the tuple Attributes_enabled"); this->init_storage(); @@ -198,14 +202,14 @@ namespace CGAL { this->automatic_attributes_management = true; - init_dart(null_dart_handle); + init_dart(null_dart_descriptor); CGAL_assertion(number_of_darts()==0); } /** Copy the given combinatorial map 'amap' into *this. * Note that both CMap can have different dimensions and/or non void attributes. - * Here CMap2 is necessarily non const; while Dart_handle_2 can be a const or non const handle. + * Here CMap2 is necessarily non const; while Dart_descriptor_2 can be a const or non const descriptor. * This is the "generic" method, called by the different variants below. * Marks reserved and automatic attributes management are not updated. * @param amap the combinatorial map to copy. @@ -215,15 +219,15 @@ namespace CGAL { * @param dartinfoconverter functor to transform original information of darts into information of copies * @param pointconverter functor to transform points in original map into points of copies. * @param copy_perforated_darts true to copy also darts marked perforated (if any) - * @param mark_perforated_darts true to mark darts wich are copies of perforated darts (if any) + * @param mark_perforated_darts true to mark darts which are copies of perforated darts (if any) * @post *this is valid. */ - template void generic_copy(CMap2& amap, - std::unordered_map* origin_to_copy, - std::unordered_map* copy_to_origin, + std::unordered_map* origin_to_copy, + std::unordered_map* copy_to_origin, const Converters& converters, const DartInfoConverter& dartinfoconverter, const PointConverter& pointconverter, @@ -254,11 +258,11 @@ namespace CGAL { // Create an mapping between darts of the two maps (originals->copies). // (here we cannot use CGAL::Unique_hash_map because it does not provide // iterators... - std::unordered_map local_dartmap; - if (origin_to_copy==NULL) // Use local_dartmap if user does not provides its own unordered_map + std::unordered_map local_dartmap; + if (origin_to_copy==nullptr) // Use local_dartmap if user does not provides its own unordered_map { origin_to_copy=&local_dartmap; } - Dart_handle new_dart; + Dart_descriptor new_dart; for (typename CMap2::Dart_range::iterator it=amap.darts().begin(), itend=amap.darts().end(); it!=itend; ++it) { @@ -281,7 +285,7 @@ namespace CGAL { } (*origin_to_copy)[it]=new_dart; - if (copy_to_origin!=NULL) { (*copy_to_origin)[new_dart]=it; } + if (copy_to_origin!=nullptr) { (*copy_to_origin)[new_dart]=it; } internal::Copy_dart_info_functor ::run @@ -292,7 +296,7 @@ namespace CGAL { unsigned int min_dim=(dimension::iterator + typename std::unordered_map::iterator dartmap_iter, dartmap_iter_end=origin_to_copy->end(); for (dartmap_iter=origin_to_copy->begin(); dartmap_iter!=dartmap_iter_end; ++dartmap_iter) @@ -328,9 +332,9 @@ namespace CGAL { typename PointConverter> void copy(CMap2& amap, std::unordered_map - * origin_to_copy, + * origin_to_copy, std::unordered_map - * copy_to_origin, + * copy_to_origin, const Converters& converters, const DartInfoConverter& dartinfoconverter, const PointConverter& pointconverter, @@ -338,7 +342,7 @@ namespace CGAL { bool copy_perforated_darts=false, size_type mark_perforated=INVALID_MARK) { - generic_copy (amap, origin_to_copy, copy_to_origin, converters, dartinfoconverter, pointconverter, copy_marks, @@ -350,9 +354,9 @@ namespace CGAL { typename PointConverter> void copy_from_const(const CMap2& amap, std::unordered_map - * origin_to_copy, + * origin_to_copy, std::unordered_map - * copy_to_origin, + * copy_to_origin, const Converters& converters, const DartInfoConverter& dartinfoconverter, const PointConverter& pointconverter, @@ -360,7 +364,7 @@ namespace CGAL { bool copy_perforated_darts=false, size_type mark_perforated=INVALID_MARK) { - generic_copy (const_cast(amap), origin_to_copy, copy_to_origin, converters, dartinfoconverter, pointconverter, copy_marks, @@ -371,9 +375,9 @@ namespace CGAL { template void copy(CMap2& amap, std::unordered_map - * origin_to_copy, + * origin_to_copy, std::unordered_map - * copy_to_origin, + * copy_to_origin, const Converters& converters, const DartInfoConverter& dartinfoconverter, bool copy_marks=true, @@ -391,9 +395,9 @@ namespace CGAL { template void copy_from_const(const CMap2& amap, std::unordered_map - * origin_to_copy, + * origin_to_copy, std::unordered_map - * copy_to_origin, + * copy_to_origin, const Converters& converters, const DartInfoConverter& dartinfoconverter, bool copy_marks=true, @@ -411,9 +415,9 @@ namespace CGAL { template void copy(CMap2& amap, std::unordered_map - * origin_to_copy, + * origin_to_copy, std::unordered_map - * copy_to_origin, + * copy_to_origin, const Converters& converters, bool copy_marks=true, bool copy_perforated_darts=false, @@ -428,9 +432,9 @@ namespace CGAL { template void copy_from_const(const CMap2& amap, std::unordered_map - * origin_to_copy, + * origin_to_copy, std::unordered_map - * copy_to_origin, + * copy_to_origin, const Converters& converters, bool copy_marks=true, bool copy_perforated_darts=false, @@ -445,9 +449,9 @@ namespace CGAL { template void copy(CMap2& amap, std::unordered_map - * origin_to_copy=nullptr, + * origin_to_copy=nullptr, std::unordered_map - * copy_to_origin=nullptr, + * copy_to_origin=nullptr, bool copy_marks=true, bool copy_perforated_darts=false, size_type mark_perforated=INVALID_MARK) @@ -461,9 +465,9 @@ namespace CGAL { template void copy_from_const(const CMap2& amap, std::unordered_map - * origin_to_copy=nullptr, + * origin_to_copy=nullptr, std::unordered_map - * copy_to_origin=nullptr, + * copy_to_origin=nullptr, bool copy_marks=true, bool copy_perforated_darts=false, size_type mark_perforated=INVALID_MARK) @@ -560,7 +564,7 @@ namespace CGAL { amap.mused_marks_stack); std::swap_ranges(mnb_marked_darts,mnb_marked_darts+NB_MARKS, amap.mnb_marked_darts); - std::swap(null_dart_handle, amap.null_dart_handle); + std::swap(null_dart_descriptor, amap.null_dart_descriptor); this->mnull_dart_container.swap(amap.mnull_dart_container); std::swap(automatic_attributes_management, @@ -573,9 +577,9 @@ namespace CGAL { void import_from_halfedge_graph(const HEG& heg, std::unordered_map ::halfedge_descriptor, - Dart_handle>* origin_to_copy=NULL, + Dart_descriptor>* origin_to_copy=NULL, std::unordered_map - ::halfedge_descriptor>* copy_to_origin=NULL, bool copy_perforated_darts=false, @@ -586,11 +590,11 @@ namespace CGAL { // iterators... std::unordered_map ::halfedge_descriptor, - Dart_handle> local_dartmap; + Dart_descriptor> local_dartmap; if (origin_to_copy==NULL) // Used local_dartmap if user does not provides its own unordered_map { origin_to_copy=&local_dartmap; } - Dart_handle new_dart; + Dart_descriptor new_dart; for (typename boost::graph_traits::halfedge_iterator it=halfedges(heg).begin(), itend=halfedges(heg).end(); it!=itend; ++it) @@ -609,7 +613,7 @@ namespace CGAL { typename std::unordered_map ::halfedge_descriptor, - Dart_handle>::iterator dartmap_iter, dartmap_iter_end=origin_to_copy->end(); + Dart_descriptor>::iterator dartmap_iter, dartmap_iter_end=origin_to_copy->end(); for (dartmap_iter=origin_to_copy->begin(); dartmap_iter!=dartmap_iter_end; ++dartmap_iter) { @@ -635,21 +639,16 @@ namespace CGAL { */ void clear() { + this->clear_storage(); mdarts.clear(); for ( size_type i = 0; i < NB_MARKS; ++i) this->mnb_marked_darts[i] = 0; internal::Clear_all::run(mattribute_containers); this->init_storage(); - init_dart(null_dart_handle); + init_dart(null_dart_descriptor); } - /** Test if the map is empty. - * @return true iff the map is empty. - */ - bool is_empty() const - { return mdarts.empty(); } - friend std::ostream& operator<< (std::ostream& os, const Self& amap) { save_combinatorial_map(amap, os); @@ -665,12 +664,12 @@ namespace CGAL { /** Create a new dart and add it to the map. * The marks of the darts are initialised with mmask_marks, i.e. the dart * is unmarked for all the marks. - * @return a Dart_handle on the new dart. + * @return a Dart_descriptor on the new dart. */ template < typename... Args > - Dart_handle create_dart(const Args&... args) + Dart_descriptor create_dart(const Args&... args) { - Dart_handle res=mdarts.emplace(args...); + Dart_descriptor res=mdarts.emplace(args...); init_dart(res); return res; } @@ -678,7 +677,7 @@ namespace CGAL { /** Erase a dart from the list of darts. * @param adart the dart to erase. */ - void erase_dart(Dart_handle adart) + void erase_dart(Dart_descriptor adart) { // 1) We update the number of marked darts. for ( size_type i = 0; i < mnb_used_marks; ++i) @@ -699,7 +698,7 @@ namespace CGAL { * which do not delete attribute having no more dart associated. * @param adart the dart to erase. */ - void restricted_erase_dart(Dart_handle adart) + void restricted_erase_dart(Dart_descriptor adart) { // 1) We update the number of marked darts. for ( size_type i = 0; i < mnb_used_marks; ++i) @@ -717,49 +716,45 @@ namespace CGAL { } /// @return true if dh points to a used dart (i.e. valid). - bool is_dart_used(Dart_const_handle dh) const + bool is_dart_used(Dart_const_descriptor dh) const { return mdarts.is_used(dh); } - /// @return a Dart_range (range through all the darts of the map). - Dart_range& darts() { return mdarts;} - Dart_const_range& darts() const { return mdarts; } - /** Get the first dart of this map. * @return the first dart. */ - Dart_handle first_dart() + Dart_descriptor first_dart() { - if (darts().begin() == darts().end()) return null_handle; - return mdarts.begin(); + if (darts().begin() == darts().end()) return null_descriptor; + return darts().begin(); } - Dart_const_handle first_dart() const + Dart_const_descriptor first_dart() const { - if (darts().begin() == darts().end()) return null_handle; - return mdarts.begin(); + if (darts().begin() == darts().end()) return null_descriptor; + return darts().begin(); } - /// @return the Dart_handle corresponding to the given dart. - Dart_handle dart_handle(Dart& adart) + /// @return the Dart_descriptor corresponding to the given dart. + Dart_descriptor dart_descriptor(Dart& adart) { return mdarts.iterator_to(adart); } - Dart_const_handle dart_handle(const Dart& adart) const + Dart_const_descriptor dart_descriptor(const Dart& adart) const { return mdarts.iterator_to(adart); } - Dart_handle dart_handle(size_type i) + Dart_descriptor dart_descriptor(size_type i) { CGAL_assertion(darts().is_used(i)); return mdarts.iterator_to(darts()[i]); } - Dart_const_handle dart_handle(size_type i) const + Dart_const_descriptor dart_descriptor(size_type i) const { CGAL_assertion(darts().is_used(i)); return mdarts.iterator_to(darts()[i]); } /** Return the highest dimension for which dh is not free. - * @param dh a dart handle + * @param dh a dart descriptor * @return the dimension d such that dh is not d-free but k-free for * all k>d. -1 if the dart is free for all d in {0..n} */ - int highest_nonfree_dimension(Dart_const_handle dh) const + int highest_nonfree_dimension(Dart_const_descriptor dh) const { for (int i=(int)dimension; i>=0; --i) { if ( !is_free(dh, i) ) return i; } @@ -767,76 +762,76 @@ namespace CGAL { } /** Return a dart belonging to the same edge and to the second vertex - * of the current edge (nullptr if such a dart does not exist). - * @return An handle to the opposite dart. + * of the current edge (null_descriptor if such a dart does not exist). + * @return An descriptor to the opposite dart. */ - Dart_handle opposite(Dart_handle dh) + Dart_descriptor opposite(Dart_descriptor dh) { for (unsigned int i = 2; i <= dimension; ++i) if (!is_free(dh, i)) return beta(dh, i); - return null_handle; + return null_descriptor; } - Dart_const_handle opposite(Dart_const_handle dh) const + Dart_const_descriptor opposite(Dart_const_descriptor dh) const { for (unsigned int i = 2; i <= dimension; ++i) if (!is_free(dh, i)) return beta(dh, i); - return null_handle; + return null_descriptor; } /** Return a dart incident to the other extremity of the current edge, * but contrary to opposite, non necessary to the same edge - * (nullptr if such a dart does not exist). - * @return An handle to the opposite dart. + * (null_descriptor if such a dart does not exist). + * @return An descriptor to the opposite dart. */ - Dart_handle other_extremity(Dart_handle dh) + Dart_descriptor other_extremity(Dart_descriptor dh) { for (unsigned int i = 1; i <= dimension; ++i) if (!is_free(dh, i)) return beta(dh, i); - return null_handle; + return null_descriptor; } - Dart_const_handle other_extremity(Dart_const_handle dh) const + Dart_const_descriptor other_extremity(Dart_const_descriptor dh) const { for (unsigned int i = 1; i <= dimension; ++i) if (!is_free(dh, i)) return beta(dh, i); - return null_handle; + return null_descriptor; } - // Set the handle on the i th attribute + // Set the descriptor on the i th attribute // Restricted version which do not use delete attributes when their ref // counting become null, nor that update the dart of attribute. template - void restricted_set_dart_attribute(Dart_handle dh, - typename Attribute_handle::type ah) + void restricted_set_dart_attribute(Dart_descriptor dh, + typename Attribute_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "set_dart_attribute called but i-attributes are disabled."); if ( this->template attribute(dh)==ah ) return; - if ( this->template attribute(dh)!=null_handle ) + if ( this->template attribute(dh)!=null_descriptor ) { this->template dec_attribute_ref_counting(this->template attribute(dh)); } Base::template basic_set_dart_attribute(dh, ah); - if ( ah!=null_handle ) + if ( ah!=null_descriptor ) { this->template inc_attribute_ref_counting(ah); } } - // Set the handle on the i th attribute + // Set the descriptor on the i th attribute template - void set_dart_attribute(Dart_handle dh, - typename Attribute_handle::type ah) + void set_dart_attribute(Dart_descriptor dh, + typename Attribute_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "set_dart_attribute called but i-attributes are disabled."); if ( this->template attribute(dh)==ah ) return; - if ( this->template attribute(dh)!=null_handle ) + if ( this->template attribute(dh)!=null_descriptor ) { this->template dec_attribute_ref_counting(this->template attribute(dh)); if ( this->are_attributes_automatically_managed() && @@ -847,7 +842,7 @@ namespace CGAL { this->template basic_set_dart_attribute(dh, ah); - if ( ah!=null_handle ) + if ( ah!=null_descriptor ) { this->template set_dart_of_attribute(ah, dh); this->template inc_attribute_ref_counting(ah); @@ -855,12 +850,12 @@ namespace CGAL { } protected: - /// Marks can be modified even for const handle; otherwise it is not + /// Marks can be modified even for const descriptor; otherwise it is not /// possible to iterate through const combinatorial maps. - // Initialize a given dart: all beta to null_dart_handle and all + // Initialize a given dart: all beta to null_dart_descriptor and all // attributes to null, all marks unmarked. - void init_dart(Dart_handle adart) + void init_dart(Dart_descriptor adart) { set_dart_marks(adart, mmask_marks); @@ -872,9 +867,9 @@ namespace CGAL { internal::Init_id::run(mdarts, adart); } - // Initialize a given dart: all beta to null_dart_handle and all + // Initialize a given dart: all beta to null_dart_descriptor and all // attributes to null, marks are given. - void init_dart(Dart_handle adart, + void init_dart(Dart_descriptor adart, const std::bitset& amarks) { set_marks(adart, amarks); @@ -893,63 +888,63 @@ namespace CGAL { /// @return the betas of ADart (beta are used in the same order than /// they are given as parameters) template - Dart_handle beta(Dart_handle ADart, Betas... betas) - { return CGAL::internal::Beta_functor:: + Dart_descriptor beta(Dart_descriptor ADart, Betas... betas) + { return CGAL::internal::Beta_functor:: run(*this, ADart, betas...); } template - Dart_const_handle beta(Dart_const_handle ADart, Betas... betas) const - { return CGAL::internal::Beta_functor:: + Dart_const_descriptor beta(Dart_const_descriptor ADart, Betas... betas) const + { return CGAL::internal::Beta_functor:: run(*this, ADart, betas...); } template - Dart_handle beta(Dart_handle ADart) - { return CGAL::internal::Beta_functor_static:: + Dart_descriptor beta(Dart_descriptor ADart) + { return CGAL::internal::Beta_functor_static:: run(*this, ADart); } template - Dart_const_handle beta(Dart_const_handle ADart) const - { return CGAL::internal::Beta_functor_static:: + Dart_const_descriptor beta(Dart_const_descriptor ADart) const + { return CGAL::internal::Beta_functor_static:: run(*this, ADart); } // Generic function to iterate on CMap or GMap in a generic way - bool is_previous_exist(Dart_const_handle ADart) const + bool is_previous_exist(Dart_const_descriptor ADart) const { return !this->template is_free<0>(ADart); } - bool is_next_exist(Dart_const_handle ADart) const + bool is_next_exist(Dart_const_descriptor ADart) const { return !this->template is_free<1>(ADart); } template - bool is_opposite_exist(Dart_const_handle ADart) const + bool is_opposite_exist(Dart_const_descriptor ADart) const { return !this->template is_free(ADart); } - Dart_handle previous(Dart_handle ADart) + Dart_descriptor previous(Dart_descriptor ADart) { return this->template beta<0>(ADart); } - Dart_const_handle previous(Dart_const_handle ADart) const + Dart_const_descriptor previous(Dart_const_descriptor ADart) const { return this->template beta<0>(ADart); } - Dart_handle next(Dart_handle ADart) + Dart_descriptor next(Dart_descriptor ADart) { return this->template beta<1>(ADart); } - Dart_const_handle next(Dart_const_handle ADart) const + Dart_const_descriptor next(Dart_const_descriptor ADart) const { return this->template beta<1>(ADart); } - Dart_handle opposite2(Dart_handle ADart) + Dart_descriptor opposite2(Dart_descriptor ADart) { return this->template beta<2>(ADart); } - Dart_const_handle opposite2(Dart_const_handle ADart) const + Dart_const_descriptor opposite2(Dart_const_descriptor ADart) const { return this->template beta<2>(ADart); } template - Dart_handle opposite(Dart_handle ADart) + Dart_descriptor opposite(Dart_descriptor ADart) { return this->template beta(ADart); } template - Dart_const_handle opposite(Dart_const_handle ADart) const + Dart_const_descriptor opposite(Dart_const_descriptor ADart) const { return this->template beta(ADart); } - void set_next(Dart_handle dh1, Dart_handle dh2) + void set_next(Dart_descriptor dh1, Dart_descriptor dh2) { this->link_beta<1>(dh1, dh2); } template - void set_opposite(Dart_handle dh1, Dart_handle dh2) + void set_opposite(Dart_descriptor dh1, Dart_descriptor dh2) { this->link_beta(dh1, dh2); } - Dart_handle other_orientation(Dart_handle ADart) + Dart_descriptor other_orientation(Dart_descriptor ADart) { return ADart; } - Dart_const_handle other_orientation(Dart_const_handle ADart) const + Dart_const_descriptor other_orientation(Dart_const_descriptor ADart) const { return ADart; } size_type number_of_halfedges() const @@ -1081,7 +1076,7 @@ namespace CGAL { * @param amark the given mark. * @return true iff adart is marked for the mark amark. */ - bool is_marked(Dart_const_handle adart, size_type amark) const + bool is_marked(Dart_const_descriptor adart, size_type amark) const { CGAL_assertion( is_reserved(amark) ); @@ -1093,10 +1088,10 @@ namespace CGAL { * @param amark the given mark. * @param astate the state of the mark (on or off). */ - void set_mark_to(Dart_const_handle adart, size_type amark, + void set_mark_to(Dart_const_descriptor adart, size_type amark, bool astate) const { - CGAL_assertion( adart != null_dart_handle ); + CGAL_assertion( adart != null_dart_descriptor ); CGAL_assertion( is_reserved(amark) ); if (is_marked(adart, amark) != astate) @@ -1112,9 +1107,9 @@ namespace CGAL { * @param adart the dart. * @param amark the given mark. */ - void mark(Dart_const_handle adart, size_type amark) const + void mark(Dart_const_descriptor adart, size_type amark) const { - CGAL_assertion( adart != null_dart_handle ); + CGAL_assertion( adart != null_dart_descriptor ); CGAL_assertion( is_reserved(amark) ); if (is_marked(adart, amark)) return; @@ -1127,9 +1122,9 @@ namespace CGAL { * @param adart the dart. * @param amark the given mark. */ - void unmark(Dart_const_handle adart, size_type amark) const + void unmark(Dart_const_descriptor adart, size_type amark) const { - CGAL_assertion( adart != null_dart_handle ); + CGAL_assertion( adart != null_dart_descriptor ); CGAL_assertion( is_reserved(amark) ); if (!is_marked(adart, amark)) return; @@ -1146,7 +1141,7 @@ namespace CGAL { void mark_null_dart(size_type amark) const { CGAL_assertion( is_reserved(amark) ); - set_dart_mark(null_dart_handle, amark, !mmask_marks[amark]); + set_dart_mark(null_dart_descriptor, amark, !mmask_marks[amark]); } /** Unmark null_dart. @@ -1155,11 +1150,11 @@ namespace CGAL { void unmark_null_dart(size_type amark) const { CGAL_assertion( is_reserved(amark) ); - set_dart_mark(null_dart_handle, amark, mmask_marks[amark]); + set_dart_mark(null_dart_descriptor, amark, mmask_marks[amark]); } /** Unmark all the darts of the map for a given mark. - * If all the darts are marked or unmarked, this operation takes O(1) + * If all the darts are marked or unmarked, this operation takes \cgalBigO{1} * operations, otherwise it traverses all the darts of the map. * @param amark the given mark. */ @@ -1211,33 +1206,33 @@ namespace CGAL { } template - bool belong_to_same_cell(Dart_const_handle adart1, - Dart_const_handle adart2) const + bool belong_to_same_cell(Dart_const_descriptor adart1, + Dart_const_descriptor adart2) const { return CGAL::belong_to_same_cell(*this, adart1, adart2); } template - bool is_whole_cell_unmarked(Dart_const_handle adart, size_type amark) const + bool is_whole_cell_unmarked(Dart_const_descriptor adart, size_type amark) const { return CGAL::is_whole_cell_unmarked(*this, adart, amark); } template - bool is_whole_cell_marked(Dart_const_handle adart, size_type amark) const + bool is_whole_cell_marked(Dart_const_descriptor adart, size_type amark) const { return CGAL::is_whole_cell_marked(*this, adart, amark); } template - size_type mark_cell(Dart_const_handle adart, size_type amark) const + size_type mark_cell(Dart_const_descriptor adart, size_type amark) const { return CGAL::mark_cell(*this, adart, amark); } template - size_type unmark_cell(Dart_const_handle adart, size_type amark) const + size_type unmark_cell(Dart_const_descriptor adart, size_type amark) const { return CGAL::unmark_cell(*this, adart, amark); } template - size_type mark_oriented_cell(Dart_const_handle adart, size_type amark, + size_type mark_oriented_cell(Dart_const_descriptor adart, size_type amark, size_type amark2=INVALID_MARK) const { return CGAL::mark_oriented_cell(*this, adart, amark, amark2); } template - size_type unmark_oriented_cell(Dart_const_handle adart, size_type amark, + size_type unmark_oriented_cell(Dart_const_descriptor adart, size_type amark, size_type amark2=INVALID_MARK) const { return CGAL::unmark_oriented_cell(*this, adart, amark, amark2); } @@ -1280,7 +1275,7 @@ namespace CGAL { { CGAL_assertion( 2<=i && i<=dimension ); unsigned int res = 0; - Dart_handle d, d2; + Dart_descriptor d, d2; for ( typename Dart_range::iterator it(darts().begin()); it!=darts().end(); ++it) @@ -1314,10 +1309,10 @@ namespace CGAL { } d2 = beta(it); - while (d2!=null_dart_handle && + while (d2!=null_dart_descriptor && !this->template is_free(beta(d2))) { d2 = beta(d2); } - if (d2!=null_dart_handle && !this->template is_free(d2)) + if (d2!=null_dart_descriptor && !this->template is_free(d2)) { if (i==2) basic_link_beta<1>(beta<2>(d2), d); else basic_link_beta_for_involution(beta(d2), d); @@ -1326,10 +1321,10 @@ namespace CGAL { if (i==2) // We perhaps need also to link beta0 { d2 = beta<0>(it); - while (d2!=null_dart_handle && + while (d2!=null_dart_descriptor && !this->template is_free<0>(beta<2>(d2))) { d2 = beta<2, 0>(d2); } - if (d2!=null_dart_handle && !this->template is_free<2>(d2)) + if (d2!=null_dart_descriptor && !this->template is_free<2>(d2)) { basic_link_beta<0>(beta<2>(d2), d); } @@ -1486,10 +1481,6 @@ namespace CGAL { run(*this); } - /// @return the number of darts. - size_type number_of_darts() const - { return mdarts.size(); } - /// @return an estimation of the bytes used by the combinatorial map. size_type bytes() const { @@ -1533,8 +1524,8 @@ namespace CGAL { template < class Ite > std::ostream& display_orbits(std::ostream & aos) const { - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); unsigned int nb = 0; size_type amark = get_new_mark(); for ( typename Dart_range::const_iterator it1(darts().begin()), @@ -1589,17 +1580,17 @@ namespace CGAL { } /// Create a new attribute. - /// @return a handle on the new attribute. + /// @return a descriptor on the new attribute. template - typename Attribute_handle::type create_attribute(const Args&... args) + typename Attribute_descriptor::type create_attribute(const Args&... args) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= + typename Attribute_descriptor::type res= std::get::value> (mattribute_containers).emplace(args...); // Reinitialize the ref counting of the new attribute. This is normally - // not required except if create_attribute is used as "copy contructor". + // not required except if create_attribute is used as "copy constructor". this->template init_attribute_ref_counting(res); internal::Init_id::type>::run (this->template attributes(), res); @@ -1607,11 +1598,11 @@ namespace CGAL { } /// Erase an attribute. - /// @param h a handle to the attribute to erase. + /// @param h a descriptor to the attribute to erase. template - void erase_attribute(typename Attribute_handle::type h) + void erase_attribute(typename Attribute_descriptor::type h) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "erase_attribute but i-attributes are disabled"); std::get::value> (mattribute_containers).erase(h); @@ -1619,9 +1610,9 @@ namespace CGAL { /// @return true if ah points to a used i-attribute (i.e. valid). template - bool is_attribute_used(typename Attribute_const_handle< i >::type ah) const + bool is_attribute_used(typename Attribute_const_descriptor< i >::type ah) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "is_attribute_used but i-attributes are disabled"); return std::get::value> (mattribute_containers).is_used(ah); @@ -1631,7 +1622,7 @@ namespace CGAL { template size_type number_of_attributes() const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "number_of_attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers).size(); @@ -1642,17 +1633,20 @@ namespace CGAL { * @param ah the vertex to set. */ template - void set_attribute(Dart_handle dh, - typename Attribute_handle::type ah) + void set_attribute(Dart_descriptor dh, + typename Attribute_descriptor::type ah) { - CGAL_static_assertion(i<=dimension); - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(i<=dimension); + static_assert(Helper::template Dimension_index::value>=0, "set_attribute but i-attributes are disabled"); - for ( typename Dart_of_cell_range::iterator it(*this, dh); - it.cont(); ++it) + for (typename Dart_of_cell_range::iterator it(*this, dh); + it.cont(); ++it) { this->template set_dart_attribute(it, ah); } + if(ah!=null_descriptor) + // To ensure that the dart of this attribute is dh + { this->template set_dart_of_attribute(ah, dh); } } /// @return a Attributes_range (range through all the @@ -1660,7 +1654,7 @@ namespace CGAL { template typename Attribute_range::type & attributes() { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers); @@ -1669,7 +1663,7 @@ namespace CGAL { template typename Attribute_const_range::type & attributes() const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers); @@ -1682,7 +1676,7 @@ namespace CGAL { typename Attribute_type::type&)>& onsplit_functor() { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1698,7 +1692,7 @@ namespace CGAL { typename Attribute_type::type&)>& onsplit_functor() const { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1714,7 +1708,7 @@ namespace CGAL { typename Attribute_type::type&)>& onmerge_functor() { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1729,7 +1723,7 @@ namespace CGAL { typename Attribute_type::type&)>& onmerge_functor() const { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1746,7 +1740,7 @@ namespace CGAL { * @param adart1 a first dart. * @param adart2 a second dart. */ - void basic_link_beta_0(Dart_handle adart1, Dart_handle adart2) + void basic_link_beta_0(Dart_descriptor adart1, Dart_descriptor adart2) { // Intel warning #1017: name following "template" must be a template this->template dart_link_beta<0>(adart1, adart2); @@ -1761,7 +1755,7 @@ namespace CGAL { * @param adart1 a first dart. * @param adart2 a second dart. */ - void basic_link_beta_1(Dart_handle adart1, Dart_handle adart2) + void basic_link_beta_1(Dart_descriptor adart1, Dart_descriptor adart2) { this->template dart_link_beta<1>(adart1, adart2); this->template dart_link_beta<0>(adart2, adart1); @@ -1777,13 +1771,13 @@ namespace CGAL { * @param i the dimension of the beta. */ template - void basic_link_beta_for_involution(Dart_handle adart1, Dart_handle adart2) + void basic_link_beta_for_involution(Dart_descriptor adart1, Dart_descriptor adart2) { CGAL_assertion( i>=2 && i<=dimension ); this->template dart_link_beta(adart1, adart2); this->template dart_link_beta(adart2, adart1); } - void basic_link_beta_for_involution(Dart_handle adart1, Dart_handle adart2, + void basic_link_beta_for_involution(Dart_descriptor adart1, Dart_descriptor adart2, unsigned int i) { CGAL_assertion( i>=2 && i<=dimension ); @@ -1801,13 +1795,13 @@ namespace CGAL { * @param adart2 a second dart. */ template - void basic_link_beta(Dart_handle adart1, Dart_handle adart2) + void basic_link_beta(Dart_descriptor adart1, Dart_descriptor adart2) { if ( i==0 ) basic_link_beta_0(adart1, adart2); else if ( i==1 ) basic_link_beta_1(adart1, adart2); else basic_link_beta_for_involution(adart1, adart2); } - void basic_link_beta(Dart_handle adart1, Dart_handle adart2, + void basic_link_beta(Dart_descriptor adart1, Dart_descriptor adart2, unsigned int i) { if ( i==0 ) basic_link_beta_0(adart1, adart2); @@ -1815,10 +1809,10 @@ namespace CGAL { else basic_link_beta_for_involution(adart1, adart2, i); } - /** Double link two darts, and update the nullptr attributes. + /** Double link two darts, and update the null_descriptor attributes. * \em adart1 is 0-linked to \em adart2 and \em adart2 is 1-linked - * with \em adart1. The nullptr attributes of \em adart1 are updated to - * non nullptr attributes associated to \em adart2, and vice-versa. + * with \em adart1. The null_descriptor attributes of \em adart1 are updated to + * non null_descriptor attributes associated to \em adart2, and vice-versa. * If both darts have an attribute, the attribute of adart1 is * associated to adart2. * We can obtain a non-valid map with darts belonging to a same cell @@ -1826,7 +1820,7 @@ namespace CGAL { * @param adart1 a first dart. * @param adart2 a second dart. */ - void link_beta_0(Dart_handle adart1, Dart_handle adart2) + void link_beta_0(Dart_descriptor adart1, Dart_descriptor adart2) { Helper::template Foreach_enabled_attributes_except , 1>:: @@ -1835,10 +1829,10 @@ namespace CGAL { this->template dart_link_beta<1>(adart2, adart1); } - /** Double link two darts, and update the nullptr attributes. + /** Double link two darts, and update the null_descriptor attributes. * \em adart1 is 1-linked to \em adart2 and \em adart2 is 0-linked - * with \em adart1. The nullptr attributes of \em adart1 are updated to - * non nullptr attributes associated to \em adart2, and vice-versa. + * with \em adart1. The null_descriptor attributes of \em adart1 are updated to + * non null_descriptor attributes associated to \em adart2, and vice-versa. * If both darts have an attribute, the attribute of adart1 is * associated to adart2. * We can obtain a non-valid map with darts belonging to a same cell @@ -1846,7 +1840,7 @@ namespace CGAL { * @param adart1 a first dart. * @param adart2 a second dart. */ - void link_beta_1(Dart_handle adart1, Dart_handle adart2) + void link_beta_1(Dart_descriptor adart1, Dart_descriptor adart2) { Helper::template Foreach_enabled_attributes_except , 1>:: @@ -1855,10 +1849,10 @@ namespace CGAL { this->template dart_link_beta<0>(adart2, adart1); } - /** Double link two darts, and update the nullptr attributes. + /** Double link two darts, and update the null_descriptor attributes. * \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked - * with \em adart1. The nullptr attributes of \em adart1 are updated to - * non nullptr attributes associated to \em adart2, and vice-versa. + * with \em adart1. The null_descriptor attributes of \em adart1 are updated to + * non null_descriptor attributes associated to \em adart2, and vice-versa. * If both darts have an attribute, the attribute of adart1 is * associated to adart2. * We can obtain a non-valid map with darts belonging to a same cell @@ -1869,7 +1863,7 @@ namespace CGAL { * @pre 2<=i<=dimension. */ template - void link_beta_for_involution(Dart_handle adart1, Dart_handle adart2) + void link_beta_for_involution(Dart_descriptor adart1, Dart_descriptor adart2) { CGAL_assertion( 2<=i && i<=dimension ); Helper::template Foreach_enabled_attributes_except @@ -1879,10 +1873,10 @@ namespace CGAL { this->template dart_link_beta(adart2, adart1); } - /** Double link two darts, and update the nullptr attributes. + /** Double link two darts, and update the null_descriptor attributes. * \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked - * with \em adart1. The nullptr attributes of \em adart1 are updated to - * non nullptr attributes associated to \em adart2, and vice-versa. + * with \em adart1. The null_descriptor attributes of \em adart1 are updated to + * non null_descriptor attributes associated to \em adart2, and vice-versa. * If both darts have an attribute, the attribute of adart1 is * associated to adart2. * We can obtain a non-valid map with darts belonging to a same cell @@ -1891,7 +1885,7 @@ namespace CGAL { * @param adart2 a second dart. */ template - void link_beta(Dart_handle adart1, Dart_handle adart2) + void link_beta(Dart_descriptor adart1, Dart_descriptor adart2) { if ( are_attributes_automatically_managed() ) { @@ -1904,8 +1898,8 @@ namespace CGAL { /** Double link a dart with betai to a second dart. * \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked - * with \em adart1. The nullptr attributes of \em adart1 are updated to - * non nullptr attributes associated to \em adart2, and vice-versa, + * with \em adart1. The null_descriptor attributes of \em adart1 are updated to + * non null_descriptor attributes associated to \em adart2, and vice-versa, * if both darts have an attribute, the attribute of adart1 is * associated to adart2 (only if update_attributes==true). * @param adart1 a first dart. @@ -1914,7 +1908,7 @@ namespace CGAL { * (deprecated, now we use are_attributes_automatically_managed()) */ template - void link_beta(Dart_handle adart1, Dart_handle adart2, + void link_beta(Dart_descriptor adart1, Dart_descriptor adart2, bool update_attributes) { if ( update_attributes ) link_beta(adart1, adart2); @@ -1928,7 +1922,7 @@ namespace CGAL { * attributes. * @param adart a dart. */ - void unlink_beta_0(Dart_handle adart) + void unlink_beta_0(Dart_descriptor adart) { CGAL_assertion(!this->template is_free<0>(adart)); this->template dart_unlink_beta<1>(beta<0>(adart)); @@ -1942,7 +1936,7 @@ namespace CGAL { * attributes. * @param adart a dart. */ - void unlink_beta_1(Dart_handle adart) + void unlink_beta_1(Dart_descriptor adart) { CGAL_assertion(!this->template is_free<1>(adart)); this->template dart_unlink_beta<0>(beta<1>(adart)); @@ -1958,14 +1952,14 @@ namespace CGAL { * @param i the dimension of the beta. */ template - void unlink_beta_for_involution(Dart_handle adart) + void unlink_beta_for_involution(Dart_descriptor adart) { CGAL_assertion(!this->template is_free(adart)); CGAL_assertion(2<=i && i<=dimension); this->template dart_unlink_beta(beta(adart)); this->template dart_unlink_beta(adart); } - void unlink_beta_for_involution(Dart_handle adart, unsigned int i) + void unlink_beta_for_involution(Dart_descriptor adart, unsigned int i) { CGAL_assertion(!is_free(adart,i)); CGAL_assertion(2<=i && i<=dimension); @@ -1982,13 +1976,13 @@ namespace CGAL { * @param i the dimension of the beta. */ template - void unlink_beta(Dart_handle adart) + void unlink_beta(Dart_descriptor adart) { if ( i==0 ) unlink_beta_0(adart); else if ( i==1 ) unlink_beta_1(adart); else unlink_beta_for_involution(adart); } - void unlink_beta(Dart_handle adart, unsigned int i) + void unlink_beta(Dart_descriptor adart, unsigned int i) { if ( i==0 ) unlink_beta_0(adart); else if ( i==1 ) unlink_beta_1(adart); @@ -2001,7 +1995,7 @@ namespace CGAL { * @return true iff \em adart1 can be i-sewn with \em adart2. */ template - bool is_sewable(Dart_const_handle adart1, Dart_const_handle adart2) const + bool is_sewable(Dart_const_descriptor adart1, Dart_const_descriptor adart2) const { return CGAL::internal:: Is_sewable_functor::run(this, adart1, adart2); @@ -2014,7 +2008,7 @@ namespace CGAL { * @param adart2 the second dart. * @pre is_sewable<1>(adart1, adart2). */ - void topo_sew_1(Dart_handle adart1, Dart_handle adart2) + void topo_sew_1(Dart_descriptor adart1, Dart_descriptor adart2) { CGAL_assertion( (is_sewable<1>(adart1,adart2)) ); @@ -2029,7 +2023,7 @@ namespace CGAL { else { size_type m = get_new_mark(); - std::deque dartv; + std::deque dartv; for ( CGAL::CMap_dart_iterator_basic_of_cell it(*this, adart1, m); it.cont(); ++it ) { @@ -2045,7 +2039,7 @@ namespace CGAL { else basic_link_beta_0(I1, I2); } - for ( typename std::deque::iterator it=dartv.begin(); + for ( typename std::deque::iterator it=dartv.begin(); it!=dartv.end(); ++it) { unmark(*it,m); } CGAL_assertion( is_whole_map_unmarked(m) ); @@ -2060,7 +2054,7 @@ namespace CGAL { * @param adart2 the second dart. * @pre is_sewable<0>(adart1, adart2). */ - void topo_sew_0(Dart_handle adart1, Dart_handle adart2) + void topo_sew_0(Dart_descriptor adart1, Dart_descriptor adart2) { topo_sew_1(adart2, adart1); } /** Topological sew by betai two given darts plus all the required darts @@ -2072,7 +2066,7 @@ namespace CGAL { * @pre is_sewable(adart1, adart2). */ template - void topo_sew_for_involution(Dart_handle adart1, Dart_handle adart2) + void topo_sew_for_involution(Dart_descriptor adart1, Dart_descriptor adart2) { CGAL_assertion( 2<=i && i<=Self::dimension ); CGAL_assertion( (is_sewable(adart1,adart2)) ); @@ -2093,7 +2087,7 @@ namespace CGAL { * @pre is_sewable(adart1, adart2). */ template - void topo_sew(Dart_handle adart1, Dart_handle adart2) + void topo_sew(Dart_descriptor adart1, Dart_descriptor adart2) { if ( i==0 ) topo_sew_1(adart2, adart1); else if ( i==1 ) topo_sew_1(adart1, adart2); @@ -2108,7 +2102,7 @@ namespace CGAL { * @pre is_sewable<0>(adart1, adart2). * @post is_valid() */ - void sew_0(Dart_handle adart1, Dart_handle adart2) + void sew_0(Dart_descriptor adart1, Dart_descriptor adart2) { CGAL_assertion( (is_sewable<0>(adart1,adart2)) ); @@ -2123,7 +2117,7 @@ namespace CGAL { } size_type m = get_new_mark(); - std::deque dartv; + std::deque dartv; for ( CGAL::CMap_dart_iterator_basic_of_cell it(*this, adart1, m); it.cont(); ++it ) { @@ -2160,7 +2154,7 @@ namespace CGAL { else basic_link_beta_1(I1, I2); } - for ( typename std::deque::iterator it=dartv.begin(); + for ( typename std::deque::iterator it=dartv.begin(); it!=dartv.end(); ++it ) { unmark(*it,m); } CGAL_assertion( is_whole_map_unmarked(m) ); @@ -2179,7 +2173,7 @@ namespace CGAL { * @pre is_sewable<1>(adart1, adart2). * @post is_valid() */ - void sew_1(Dart_handle adart1, Dart_handle adart2) + void sew_1(Dart_descriptor adart1, Dart_descriptor adart2) { CGAL_assertion( (is_sewable<1>(adart1,adart2)) ); @@ -2194,7 +2188,7 @@ namespace CGAL { } size_type m = get_new_mark(); - std::deque dartv; + std::deque dartv; for ( CGAL::CMap_dart_iterator_basic_of_cell it(*this, adart1, m); it.cont(); ++it ) { @@ -2232,7 +2226,7 @@ namespace CGAL { else basic_link_beta_0(I1, I2); } - for ( typename std::deque::iterator it=dartv.begin(); + for ( typename std::deque::iterator it=dartv.begin(); it!=dartv.end(); ++it ) { unmark(*it,m); } CGAL_assertion( is_whole_map_unmarked(m) ); @@ -2253,7 +2247,7 @@ namespace CGAL { * @post is_valid() */ template - void sew_for_involution(Dart_handle adart1, Dart_handle adart2) + void sew_for_involution(Dart_descriptor adart1, Dart_descriptor adart2) { CGAL_assertion( 2<=i && i<=dimension ); CGAL_assertion( (is_sewable(adart1,adart2)) ); @@ -2295,7 +2289,7 @@ namespace CGAL { * @post is_valid() */ template - void sew(Dart_handle adart1, Dart_handle adart2) + void sew(Dart_descriptor adart1, Dart_descriptor adart2) { if ( are_attributes_automatically_managed() ) { @@ -2316,7 +2310,7 @@ namespace CGAL { * @pre is_sewable(adart1, adart2). */ template - void sew(Dart_handle adart1, Dart_handle adart2, bool update_attributes) + void sew(Dart_descriptor adart1, Dart_descriptor adart2, bool update_attributes) { if ( update_attributes ) sew(adart1, adart2); else topo_sew(adart1, adart2); @@ -2328,12 +2322,12 @@ namespace CGAL { * @param adart first dart. * @pre !adart->is_free(1). */ - void topo_unsew_1(Dart_handle adart) + void topo_unsew_1(Dart_descriptor adart) { CGAL_assertion( !this->template is_free<1>(adart) ); size_type m = get_new_mark(); - std::deque dartv; + std::deque dartv; for ( CGAL::CMap_dart_iterator_basic_of_cell it(*this, adart, m); it.cont(); ++it ) { @@ -2348,7 +2342,7 @@ namespace CGAL { else unlink_beta_0(it); } - for ( typename std::deque::iterator it=dartv.begin(); + for ( typename std::deque::iterator it=dartv.begin(); it!=dartv.end(); ++it ) { unmark(*it,m); } CGAL_assertion( is_whole_map_unmarked(m) ); @@ -2361,7 +2355,7 @@ namespace CGAL { * @param adart first dart. * @pre !adart->is_free(0). */ - void topo_unsew_0(Dart_handle adart) + void topo_unsew_0(Dart_descriptor adart) { CGAL_assertion( !this->template is_free<0>(adart) ); topo_unsew_1(this->template beta<0>(adart) ); @@ -2375,7 +2369,7 @@ namespace CGAL { * @pre 2<=i<=dimension. */ template - void topo_unsew_for_involution(Dart_handle adart) + void topo_unsew_for_involution(Dart_descriptor adart) { CGAL_assertion( !this->template is_free(adart) ); CGAL_assertion( 2<=i && i<=Self::dimension ); @@ -2392,7 +2386,7 @@ namespace CGAL { * @pre !adart->is_free(i). */ template - void topo_unsew(Dart_handle adart) + void topo_unsew(Dart_descriptor adart) { if ( i==0 ) topo_unsew_0(adart); else if ( i==1 ) topo_unsew_1(adart); @@ -2406,14 +2400,14 @@ namespace CGAL { * @pre !adart->is_free(0). * @post is_valid() */ - void unsew_0(Dart_handle adart) + void unsew_0(Dart_descriptor adart) { CGAL_assertion( !this->template is_free<0>(adart) ); size_type m=get_new_mark(); - std::deque dartv; - std::deque modified_darts; - std::deque modified_darts2; + std::deque dartv; + std::deque modified_darts; + std::deque modified_darts2; for ( CGAL::CMap_dart_iterator_basic_of_cell it(*this, adart, m); it.cont(); ++it ) @@ -2439,7 +2433,7 @@ namespace CGAL { } } - for ( typename std::deque::iterator it=dartv.begin(); + for ( typename std::deque::iterator it=dartv.begin(); it!=dartv.end(); ++it ) { unmark(*it,m); } @@ -2460,14 +2454,14 @@ namespace CGAL { * @pre !adart->is_free(1). * @post is_valid() */ - void unsew_1(Dart_handle adart) + void unsew_1(Dart_descriptor adart) { CGAL_assertion( !this->template is_free<1>(adart) ); size_type m = get_new_mark(); - std::deque dartv; - std::deque modified_darts; - std::deque modified_darts2; + std::deque dartv; + std::deque modified_darts; + std::deque modified_darts2; for ( CGAL::CMap_dart_iterator_basic_of_cell it(*this, adart, m); it.cont(); ++it) @@ -2493,7 +2487,7 @@ namespace CGAL { } } - for ( typename std::deque::iterator + for ( typename std::deque::iterator it=dartv.begin(); it!=dartv.end(); ++it) { unmark(*it, m); } CGAL_assertion( is_whole_map_unmarked(m) ); @@ -2515,12 +2509,12 @@ namespace CGAL { * @pre 2<=i<=dimension */ template - void unsew_for_involution(Dart_handle adart) + void unsew_for_involution(Dart_descriptor adart) { CGAL_assertion(2<=i && i<=Self::dimension); CGAL_assertion( !this->template is_free(adart) ); - std::deque modified_darts; + std::deque modified_darts; for ( CGAL::CMap_dart_iterator_of_involution it(*this, adart); it.cont(); ++it ) @@ -2545,7 +2539,7 @@ namespace CGAL { * @post is_valid() */ template - void unsew(Dart_handle adart) + void unsew(Dart_descriptor adart) { if ( are_attributes_automatically_managed() ) { @@ -2565,7 +2559,7 @@ namespace CGAL { * @pre !adart->is_free(i). */ template - void unsew(Dart_handle adart, bool update_attributes) + void unsew(Dart_descriptor adart, bool update_attributes) { if ( update_attributes ) unsew(adart); else topo_unsew(adart); @@ -2584,10 +2578,10 @@ namespace CGAL { /** Reverse the orientation (swap beta 0 & 1 links) of the connected * component containing the given dart. * A valid map after this operation remains valid. - * @param adart handle to a dart + * @param adart descriptor to a dart * @return none */ - void reverse_orientation_connected_component (Dart_handle adart, + void reverse_orientation_connected_component (Dart_descriptor adart, size_type amark=INVALID_MARK) { internal::Reverse_orientation_of_connected_component_functor:: @@ -2598,7 +2592,7 @@ namespace CGAL { /// @return the size (in number of darts) of the biggest cc. std::size_t keep_biggest_connected_component() { - std::map ccs; + std::map ccs; size_type treated=get_new_mark(); for (auto it=darts().begin(), itend=darts().end(); it!=itend; ++it) @@ -2729,7 +2723,7 @@ namespace CGAL { * @param adart the dart. * @param amarks the marks to set. */ - void set_marks(Dart_const_handle adart, + void set_marks(Dart_const_descriptor adart, const std::bitset & amarks) const { set_dart_marks(adart, amarks ^ mmask_marks); } @@ -2737,7 +2731,7 @@ namespace CGAL { * @param adart the dart. * @return allt the marks of adart. */ - std::bitset get_marks(Dart_const_handle adart) const + std::bitset get_marks(Dart_const_descriptor adart) const { return get_dart_marks(adart) ^ mmask_marks; } /** Get the mask associated to a given mark. @@ -2754,7 +2748,7 @@ namespace CGAL { /// @return the positive turn between the two given darts. // @pre beta1(d1) and d2 must belong to the same vertex. - std::size_t positive_turn(Dart_const_handle d1, Dart_const_handle d2) const + std::size_t positive_turn(Dart_const_descriptor d1, Dart_const_descriptor d2) const { CGAL_assertion((!this->template is_free<1>(d1))); /* CGAL_assertion((belong_to_same_cell<0>(this->template beta<1>(d1), @@ -2762,7 +2756,7 @@ namespace CGAL { if (d2==beta<2>(d1)) { return 0; } - Dart_const_handle dd1=d1; + Dart_const_descriptor dd1=d1; std::size_t res=1; while (beta<1>(dd1)!=d2) { @@ -2780,7 +2774,7 @@ namespace CGAL { /// @return the negative turn between the two given darts. // @pre beta1(d1) and d2 must belong to the same vertex. - std::size_t negative_turn(Dart_const_handle d1, Dart_const_handle d2) const + std::size_t negative_turn(Dart_const_descriptor d1, Dart_const_descriptor d2) const { CGAL_assertion((!this->template is_free<1>(d1))); /* CGAL_assertion((belong_to_same_cell<0>(this->template beta<1>(d1), @@ -2793,7 +2787,7 @@ namespace CGAL { d1=beta<2>(d1); d2=beta<2>(d2); - Dart_const_handle dd1=d1; + Dart_const_descriptor dd1=d1; std::size_t res=1; while (beta<0>(dd1)!=d2) { @@ -2820,9 +2814,8 @@ namespace CGAL { unsigned int erase_marked_darts(size_type amark) { unsigned int res = 0, i = 0; - Dart_handle d; - for ( typename Dart_range::iterator it(darts().begin()), - itend(darts().end()); it!=itend; ) + Dart_descriptor d; + for(typename Dart_range::iterator it=darts().begin(); it!=darts().end();) { d = it++; if (is_marked(d, amark)) @@ -2846,7 +2839,7 @@ namespace CGAL { , CGAL::CMap_dart_const_iterator_basic_of_orbit > Base; - Dart_of_orbit_basic_range(Self &amap, Dart_handle adart, size_type amark=INVALID_MARK): + Dart_of_orbit_basic_range(Self &amap, Dart_descriptor adart, size_type amark=INVALID_MARK): Base(amap, adart, amark) {} }; @@ -2860,7 +2853,7 @@ namespace CGAL { > Base; - Dart_of_orbit_basic_const_range(const Self &amap, Dart_const_handle + Dart_of_orbit_basic_const_range(const Self &amap, Dart_const_descriptor adart, size_type amark=INVALID_MARK): Base(amap, adart, amark) {} @@ -2876,7 +2869,7 @@ namespace CGAL { , CGAL::CMap_dart_const_iterator_of_orbit > Base; - Dart_of_orbit_range(Self &amap, Dart_handle adart) : Base(amap,adart) + Dart_of_orbit_range(Self &amap, Dart_descriptor adart) : Base(amap,adart) {} }; //************************************************************************** @@ -2888,29 +2881,29 @@ namespace CGAL { typedef CGAL::CMap_const_range > Base; - Dart_of_orbit_const_range(const Self &amap, Dart_const_handle adart): + Dart_of_orbit_const_range(const Self &amap, Dart_const_descriptor adart): Base(amap,adart) {} }; //************************************************************************** /// @return a range on all the darts of the given orbit template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) + Dart_of_orbit_range darts_of_orbit(Dart_descriptor adart) { return Dart_of_orbit_range(*this,adart); } //-------------------------------------------------------------------------- template Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const + darts_of_orbit(Dart_const_descriptor adart) const { return Dart_of_orbit_const_range(*this,adart); } //-------------------------------------------------------------------------- template - Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_handle adart, + Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_descriptor adart, size_type amark=INVALID_MARK) { return Dart_of_orbit_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const + darts_of_orbit_basic(Dart_const_descriptor adart, size_type amark=INVALID_MARK) const { return Dart_of_orbit_basic_const_range(*this,adart,amark); } //************************************************************************** // Dart_of_cell_basic_range @@ -2923,7 +2916,7 @@ namespace CGAL { , CGAL::CMap_dart_const_iterator_basic_of_cell > Base; - Dart_of_cell_basic_range(Self &amap, Dart_handle adart, size_type amark=INVALID_MARK) : + Dart_of_cell_basic_range(Self &amap, Dart_descriptor adart, size_type amark=INVALID_MARK) : Base(amap, adart, amark) {} }; @@ -2936,7 +2929,7 @@ namespace CGAL { typedef CMap_const_range > Base; - Dart_of_cell_basic_const_range(const Self &amap, Dart_const_handle adart, + Dart_of_cell_basic_const_range(const Self &amap, Dart_const_descriptor adart, size_type amark=INVALID_MARK) : Base(amap, adart, amark) {} @@ -2952,7 +2945,7 @@ namespace CGAL { , CGAL::CMap_dart_const_iterator_of_cell > Base; - Dart_of_cell_range(Self &amap, Dart_handle adart) : + Dart_of_cell_range(Self &amap, Dart_descriptor adart) : Base(amap, adart) {} }; @@ -2965,47 +2958,47 @@ namespace CGAL { typedef CMap_const_range > Base; - Dart_of_cell_const_range(const Self &amap, Dart_const_handle adart) : + Dart_of_cell_const_range(const Self &amap, Dart_const_descriptor adart) : Base(amap, adart) {} }; //-------------------------------------------------------------------------- /// @return a range on all the darts of the given i-cell template - Dart_of_cell_basic_range darts_of_cell_basic(Dart_handle adart, + Dart_of_cell_basic_range darts_of_cell_basic(Dart_descriptor adart, size_type amark=INVALID_MARK) { return Dart_of_cell_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_cell_basic_const_range darts_of_cell_basic - (Dart_const_handle adart, size_type amark=INVALID_MARK) const + (Dart_const_descriptor adart, size_type amark=INVALID_MARK) const { return Dart_of_cell_basic_const_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_cell_basic_range - darts_of_cell_basic(Dart_handle adart, size_type amark=INVALID_MARK) + darts_of_cell_basic(Dart_descriptor adart, size_type amark=INVALID_MARK) { return darts_of_cell_basic(adart,amark); } //-------------------------------------------------------------------------- template Dart_of_cell_basic_const_range - darts_of_cell_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const + darts_of_cell_basic(Dart_const_descriptor adart, size_type amark=INVALID_MARK) const { return darts_of_cell_basic(adart,amark); } //-------------------------------------------------------------------------- template - Dart_of_cell_range darts_of_cell(Dart_handle adart) + Dart_of_cell_range darts_of_cell(Dart_descriptor adart) { return Dart_of_cell_range(*this,adart); } //-------------------------------------------------------------------------- template - Dart_of_cell_const_range darts_of_cell(Dart_const_handle adart) const + Dart_of_cell_const_range darts_of_cell(Dart_const_descriptor adart) const { return Dart_of_cell_const_range(*this,adart); } //-------------------------------------------------------------------------- template - Dart_of_cell_range darts_of_cell(Dart_handle adart) + Dart_of_cell_range darts_of_cell(Dart_descriptor adart) { return darts_of_cell(adart); } //-------------------------------------------------------------------------- template Dart_of_cell_const_range - darts_of_cell(Dart_const_handle adart) const + darts_of_cell(Dart_const_descriptor adart) const { return darts_of_cell(adart); } //************************************************************************** // Dart_of_involution_basic_range @@ -3018,7 +3011,7 @@ namespace CGAL { , CGAL::CMap_dart_const_iterator_basic_of_involution > Base; - Dart_of_involution_basic_range(Self &amap, Dart_handle adart, + Dart_of_involution_basic_range(Self &amap, Dart_descriptor adart, size_type amark=INVALID_MARK): Base(amap, adart, amark) {} @@ -3034,7 +3027,7 @@ namespace CGAL { Base; Dart_of_involution_basic_const_range(const Self &amap, - Dart_const_handle adart, + Dart_const_descriptor adart, size_type amark=INVALID_MARK) : Base(amap, adart, amark) {} @@ -3042,23 +3035,23 @@ namespace CGAL { //************************************************************************** template Dart_of_involution_basic_range - darts_of_involution_basic(Dart_handle adart, size_type amark=INVALID_MARK) + darts_of_involution_basic(Dart_descriptor adart, size_type amark=INVALID_MARK) { return Dart_of_involution_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_involution_basic_const_range - darts_of_involution_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const + darts_of_involution_basic(Dart_const_descriptor adart, size_type amark=INVALID_MARK) const { return Dart_of_involution_basic_const_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_involution_basic_range - darts_of_involution_basic(Dart_handle adart, size_type amark=INVALID_MARK) + darts_of_involution_basic(Dart_descriptor adart, size_type amark=INVALID_MARK) { return Dart_of_involution_basic_range (*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_involution_basic_const_range - darts_of_involution_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const + darts_of_involution_basic(Dart_const_descriptor adart, size_type amark=INVALID_MARK) const { return Dart_of_involution_basic_const_range (*this,adart,amark); } //************************************************************************** @@ -3073,7 +3066,7 @@ namespace CGAL { CGAL::CMap_dart_const_iterator_basic_of_involution_inv > Base; - Dart_of_involution_inv_basic_range(Self &amap, Dart_handle adart, + Dart_of_involution_inv_basic_range(Self &amap, Dart_descriptor adart, size_type amark=INVALID_MARK): Base(amap, adart, amark) {} @@ -3090,7 +3083,7 @@ namespace CGAL { Base; Dart_of_involution_inv_basic_const_range(const Self &amap, - Dart_const_handle adart, + Dart_const_descriptor adart, size_type amark=INVALID_MARK) : Base(amap, adart, amark) {} @@ -3098,24 +3091,24 @@ namespace CGAL { //************************************************************************** template Dart_of_involution_inv_basic_range - darts_of_involution_inv_basic(Dart_handle adart, size_type amark=INVALID_MARK) + darts_of_involution_inv_basic(Dart_descriptor adart, size_type amark=INVALID_MARK) { return Dart_of_involution_inv_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_involution_inv_basic_const_range - darts_of_involution_inv_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const + darts_of_involution_inv_basic(Dart_const_descriptor adart, size_type amark=INVALID_MARK) const { return Dart_of_involution_inv_basic_const_range (*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_involution_inv_basic_range - darts_of_involution_inv_basic(Dart_handle adart, size_type amark=INVALID_MARK) + darts_of_involution_inv_basic(Dart_descriptor adart, size_type amark=INVALID_MARK) { return Dart_of_involution_inv_basic_range (*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_involution_inv_basic_const_range - darts_of_involution_inv_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const + darts_of_involution_inv_basic(Dart_const_descriptor adart, size_type amark=INVALID_MARK) const { return Dart_of_involution_inv_basic_const_range (*this,adart,amark); } //************************************************************************** @@ -3129,7 +3122,7 @@ namespace CGAL { , CGAL::CMap_dart_const_iterator_of_involution > Base; - Dart_of_involution_range(Self &amap, Dart_handle adart) : + Dart_of_involution_range(Self &amap, Dart_descriptor adart) : Base(amap, adart) {} }; @@ -3143,29 +3136,29 @@ namespace CGAL { > Base; Dart_of_involution_const_range(const Self &amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap, adart) {} }; //************************************************************************** template Dart_of_involution_range - darts_of_involution(Dart_handle adart) + darts_of_involution(Dart_descriptor adart) { return Dart_of_involution_range(*this,adart); } //-------------------------------------------------------------------------- template Dart_of_involution_const_range - darts_of_involution(Dart_const_handle adart) const + darts_of_involution(Dart_const_descriptor adart) const { return Dart_of_involution_const_range(*this,adart); } //-------------------------------------------------------------------------- template Dart_of_involution_range - darts_of_involution(Dart_handle adart) + darts_of_involution(Dart_descriptor adart) { return Dart_of_involution_range(*this,adart); } //-------------------------------------------------------------------------- template Dart_of_involution_const_range - darts_of_involution(Dart_const_handle adart) const + darts_of_involution(Dart_const_descriptor adart) const { return Dart_of_involution_const_range(*this,adart); } //************************************************************************** // Dart_of_involution_inv_range @@ -3178,7 +3171,7 @@ namespace CGAL { , CGAL::CMap_dart_const_iterator_of_involution_inv > Base; - Dart_of_involution_inv_range(Self &amap, Dart_handle adart) : + Dart_of_involution_inv_range(Self &amap, Dart_descriptor adart) : Base(amap, adart) {} }; @@ -3193,29 +3186,29 @@ namespace CGAL { Base; Dart_of_involution_inv_const_range(const Self &amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap, adart) {} }; //************************************************************************** template Dart_of_involution_inv_range - darts_of_involution_inv(Dart_handle adart) + darts_of_involution_inv(Dart_descriptor adart) { return Dart_of_involution_inv_range(*this,adart); } //-------------------------------------------------------------------------- template Dart_of_involution_inv_const_range - darts_of_involution_inv(Dart_const_handle adart) const + darts_of_involution_inv(Dart_const_descriptor adart) const { return Dart_of_involution_inv_const_range(*this,adart); } //-------------------------------------------------------------------------- template Dart_of_involution_inv_range - darts_of_involution_inv(Dart_handle adart) + darts_of_involution_inv(Dart_descriptor adart) { return Dart_of_involution_inv_range(*this,adart); } //-------------------------------------------------------------------------- template Dart_of_involution_inv_const_range - darts_of_involution_inv(Dart_const_handle adart) const + darts_of_involution_inv(Dart_const_descriptor adart) const { return Dart_of_involution_inv_const_range (*this,adart); } //************************************************************************** @@ -3226,9 +3219,9 @@ namespace CGAL { Dart_basic_range(Self &amap) : mmap(amap) {} iterator begin() { return iterator(mmap); } - iterator end() { return iterator(mmap,mmap.null_handle); } + iterator end() { return iterator(mmap,mmap.null_descriptor); } const_iterator begin() const { return const_iterator(mmap); } - const_iterator end() const { return const_iterator(mmap,mmap.null_handle); } + const_iterator end() const { return const_iterator(mmap,mmap.null_descriptor); } size_type size() const { return mmap.number_of_darts(); } bool empty() const @@ -3243,7 +3236,7 @@ namespace CGAL { Dart_basic_const_range(Self &amap) : mmap(amap) {} const_iterator begin() const { return const_iterator(mmap); } - const_iterator end() const { return const_iterator(mmap,mmap.null_handle); } + const_iterator end() const { return const_iterator(mmap,mmap.null_descriptor); } size_type size() const { return mmap.number_of_darts(); } bool empty() const @@ -3269,7 +3262,7 @@ namespace CGAL { CGAL::CMap_one_dart_per_incident_cell_const_iterator > Base; - One_dart_per_incident_cell_range(Self &amap, Dart_handle adart): + One_dart_per_incident_cell_range(Self &amap, Dart_descriptor adart): Base(amap, adart) {} }; @@ -3284,7 +3277,7 @@ namespace CGAL { > Base; One_dart_per_incident_cell_const_range(const Self &amap, - Dart_const_handle adart) : + Dart_const_descriptor adart) : Base(amap, adart) {} }; @@ -3298,9 +3291,9 @@ namespace CGAL { One_dart_per_cell_range(Self &amap) : mmap(amap), msize(0) {} iterator begin() { return iterator(mmap); } - iterator end() { return iterator(mmap,mmap.null_handle); } + iterator end() { return iterator(mmap,mmap.null_descriptor); } const_iterator begin() const { return const_iterator(mmap); } - const_iterator end() const { return const_iterator(mmap,mmap.null_handle); } + const_iterator end() const { return const_iterator(mmap,mmap.null_descriptor); } size_type size() const { if (msize==0) @@ -3323,7 +3316,7 @@ namespace CGAL { One_dart_per_cell_const_range(const Self &amap) : mmap(amap), msize(0) {} const_iterator begin() const { return const_iterator(mmap); } - const_iterator end() const { return const_iterator(mmap,mmap.null_handle); } + const_iterator end() const { return const_iterator(mmap,mmap.null_descriptor); } size_type size() const { if (msize==0) @@ -3341,22 +3334,22 @@ namespace CGAL { /// @return a range on the i-cells incindent to the given j-cell. template One_dart_per_incident_cell_range - one_dart_per_incident_cell(Dart_handle adart) + one_dart_per_incident_cell(Dart_descriptor adart) { return One_dart_per_incident_cell_range(*this,adart); } //-------------------------------------------------------------------------- template One_dart_per_incident_cell_const_range - one_dart_per_incident_cell(Dart_const_handle adart) const + one_dart_per_incident_cell(Dart_const_descriptor adart) const { return One_dart_per_incident_cell_const_range(*this,adart); } //-------------------------------------------------------------------------- template One_dart_per_incident_cell_range - one_dart_per_incident_cell(Dart_handle adart) + one_dart_per_incident_cell(Dart_descriptor adart) { return one_dart_per_incident_cell(adart); } //-------------------------------------------------------------------------- template One_dart_per_incident_cell_const_range - one_dart_per_incident_cell(Dart_const_handle adart) const + one_dart_per_incident_cell(Dart_const_descriptor adart) const { return one_dart_per_incident_cell(adart); } //-------------------------------------------------------------------------- /// @return a range on all the i-cells @@ -3381,33 +3374,35 @@ namespace CGAL { /** Compute the dual of a Combinatorial_map. * @param amap the cmap in which we build the dual of this map. - * @param adart a dart of the initial map, nullptr by default. - * @return adart of the dual map, the dual of adart if adart!=nullptr, + * @param adart a dart of the initial map, null_descriptor by default. + * @return adart of the dual map, the dual of adart if adart!=null_descriptor, * any dart otherwise. * As soon as we don't modify this map and amap map, we can iterate * simultaneously through all the darts of the two maps and we have * each time of the iteration two "dual" darts. */ - Dart_handle dual(Self& amap, Dart_handle adart=null_handle) + Dart_descriptor dual(Self& amap, Dart_descriptor adart=null_descriptor) { CGAL_assertion( is_without_boundary(dimension) ); - CGAL::Unique_hash_map< Dart_handle, Dart_handle, - typename Self::Hash_function > dual(Dart_handle(), darts().size()); - Dart_handle d, d2, res = amap.null_handle; + CGAL::Unique_hash_map + dual(Dart_descriptor(), darts().size()); + Dart_descriptor d, d2, res=amap.null_descriptor, newd; // We clear amap. TODO return a new amap ? amap.clear(); // We create a copy of all the dart of the map. - for ( typename Dart_range::iterator it=darts().begin(); - it!=darts().end(); ++it) + for (typename Dart_range::iterator it=darts().begin(); + it!=darts().end(); ++it) { - dual[it] = amap.create_dart(); + newd=amap.create_dart(); + dual[it]=newd; internal::Copy_dart_info_functor:: - run(static_cast(amap), static_cast(*this), - it, dual[it]); - if ( it==adart && res==amap.null_handle ) res = dual[it]; + run(static_cast(*this), static_cast(amap), + it, newd); + if (it==adart && res==amap.null_descriptor) { res=newd; } } // Then we link the darts by using the dual formula : @@ -3418,20 +3413,20 @@ namespace CGAL { for ( typename Dart_range::iterator it=darts().begin(); it!=darts().end(); ++it, ++it2) { - d = it2; // The supposition on the order allows to avoid d=dual[it]; + d=it2; // The supposition on the order allows to avoid d=dual[it]; CGAL_assertion( it2==dual[it] ); // First case outside the loop since we need to use link_beta1 if ( amap.template is_free<1>(d) && - beta(it)!=null_dart_handle ) - amap.basic_link_beta_1(d, dual[beta(it)]); + beta(it)!=null_dart_descriptor ) + { amap.basic_link_beta_1(d, dual[beta(it)]); } // and during the loop we use link_beta(d1,d2,i) for ( unsigned int i=dimension-2; i>=1; --i) { if ( amap.is_free(d,dimension-i) && - beta(it, dimension, i)!=null_dart_handle ) - amap.basic_link_beta(d, dual[beta(it, dimension, i)], dimension-i); + beta(it, dimension, i)!=null_dart_descriptor ) + { amap.basic_link_beta(d, dual[beta(it, dimension, i)], dimension-i); } } if ( amap.template is_free(d) ) { @@ -3440,7 +3435,7 @@ namespace CGAL { } } - if ( res==amap.null_handle ) res = amap.darts().begin(); + if ( res==amap.null_descriptor ) { res=amap.darts().begin(); } return res; } @@ -3463,11 +3458,11 @@ namespace CGAL { */ template - bool are_cc_isomorphic(Dart_const_handle dh1, + bool are_cc_isomorphic(Dart_const_descriptor dh1, const Combinatorial_map_base & map2, typename Combinatorial_map_base - ::Dart_const_handle dh2, + ::Dart_const_descriptor dh2, bool testDartInfo=true, bool testAttributes=true, bool testPoint=true) const @@ -3477,8 +3472,8 @@ namespace CGAL { bool match = true; // Two stacks used to run through the two maps. - std::deque< Dart_const_handle > toTreat1; - std::deque< typename Map2::Dart_const_handle > toTreat2; + std::deque< Dart_const_descriptor > toTreat1; + std::deque< typename Map2::Dart_const_descriptor > toTreat2; // A dart of this map is marked with m1 if its bijection was set // (and similarly for mark m2 and darts of map2) @@ -3492,12 +3487,12 @@ namespace CGAL { toTreat1.push_back(dh1); toTreat2.push_back(dh2); - Dart_const_handle current; - typename Map2::Dart_const_handle other; + Dart_const_descriptor current; + typename Map2::Dart_const_descriptor other; unsigned int i = 0; - CGAL::Unique_hash_map bijection; while (match && !toTreat1.empty()) @@ -3514,15 +3509,15 @@ namespace CGAL { { match=false; } else { - bijection[current] = other; + bijection[current]=other; mark(current, m1); map2.mark(other, m2); // We first test info of darts if (match && testDartInfo) - match=internal::Test_is_same_dart_info_functor:: - run(*this, map2, current, other); + { match=internal::Test_is_same_dart_info_functor:: + run(*this, map2, current, other); } // We need to test in both direction because // Foreach_enabled_attributes only test non void attributes @@ -3531,13 +3526,13 @@ namespace CGAL { if (testAttributes) { if (match) - Helper::template Foreach_enabled_attributes + { Helper::template Foreach_enabled_attributes < internal::Test_is_same_attribute_functor >:: - run(*this, map2, current, other, match); + run(*this, map2, current, other, match); } if (match) - Map2::Helper::template Foreach_enabled_attributes + { Map2::Helper::template Foreach_enabled_attributes < internal::Test_is_same_attribute_functor >:: - run(map2, *this, other, current, match); + run(map2, *this, other, current, match); } } if (match && testPoint) @@ -3548,9 +3543,9 @@ namespace CGAL { ::run(*this, map2, current, other); } - // We test if the injection is valid with its neighboors. + // We test if the injection is valid with its neighbors. // We go out as soon as it is not satisfied. - for (i = 0; match && i <= dimension; ++i) + for (i=0; match && i<=dimension; ++i) { if ( i>map2.dimension ) { @@ -3570,7 +3565,7 @@ namespace CGAL { { match=false; } else { - if (is_marked(beta(current,i), m1) != + if (is_marked(beta(current,i), m1)!= map2.is_marked(map2.beta(other,i), m2)) { match=false; } else @@ -3677,7 +3672,7 @@ namespace CGAL { if (is_empty() && map2.is_empty()) return true; if (is_empty() || map2.is_empty()) return false; - Dart_const_handle d1=darts().begin(); + Dart_const_descriptor d1=darts().begin(); for (typename Combinatorial_map_base:: Dart_range::const_iterator it(map2.darts().begin()), @@ -3716,7 +3711,7 @@ namespace CGAL { /** Create an half-edge. * @return a dart of the new half-edge. */ - Dart_handle make_half_edge() + Dart_descriptor make_half_edge() { return create_dart(); } /** Create an edge. @@ -3725,28 +3720,28 @@ namespace CGAL { * this is not the case for GMap) * @return a dart of the new edge. */ - Dart_handle make_edge(bool /*closed*/=false) + Dart_descriptor make_edge(bool /*closed*/=false) { - Dart_handle d1 = create_dart(); - Dart_handle d2 = create_dart(); + Dart_descriptor d1 = create_dart(); + Dart_descriptor d2 = create_dart(); this->template basic_link_beta_for_involution<2>(d1, d2); return d1; } - /** Create an edge given 2 Attribute_handle<0>. + /** Create an edge given 2 Attribute_descriptor<0>. * Note that this function can be used only if 0-attributes are non void - * @param h0 the first vertex handle. - * @param h1 the second vertex handle. + * @param h0 the first vertex descriptor. + * @param h1 the second vertex descriptor. * if closed==true, the edge has no 2-free dart. * (note that for CMap there is no differente between true and false, but * this is not the case for GMap) * @return the dart of the new edge incident to h0. */ - Dart_handle make_segment(typename Attribute_handle<0>::type h0, - typename Attribute_handle<0>::type h1, + Dart_descriptor make_segment(typename Attribute_descriptor<0>::type h0, + typename Attribute_descriptor<0>::type h1, bool /*closed*/=false) { - Dart_handle d1 = this->make_edge(); + Dart_descriptor d1 = this->make_edge(); set_dart_attribute<0>(d1,h0); set_dart_attribute<0>(this->beta<2>(d1),h1); @@ -3758,15 +3753,15 @@ namespace CGAL { * (a cycle of alg darts beta1 links together). * @return a new dart. */ - Dart_handle make_combinatorial_polygon(unsigned int alg) + Dart_descriptor make_combinatorial_polygon(unsigned int alg) { CGAL_assertion(alg>0); - Dart_handle start = create_dart(); - Dart_handle prev = start; + Dart_descriptor start = create_dart(); + Dart_descriptor prev = start; for ( unsigned int nb=1; nb0); unsigned int nb = 0; - Dart_const_handle cur = adart; + Dart_const_descriptor cur = adart; do { ++nb; - if ( cur==null_dart_handle ) return false; // Open face + if ( cur==null_dart_descriptor ) return false; // Open face cur = beta(cur,1); } while( cur!=adart ); return (nb==alg); } - /** Create a triangle given 3 Attribute_handle<0>. - * @param h0 the first handle. - * @param h1 the second handle. - * @param h2 the third handle. + /** Create a triangle given 3 Attribute_descriptor<0>. + * @param h0 the first descriptor. + * @param h1 the second descriptor. + * @param h2 the third descriptor. * Note that this function can be used only if 0-attributes are non void * @return the dart of the new triangle incident to h0 and to edge h0h1. */ - Dart_handle make_triangle(typename Attribute_handle<0>::type h0, - typename Attribute_handle<0>::type h1, - typename Attribute_handle<0>::type h2) + Dart_descriptor make_triangle(typename Attribute_descriptor<0>::type h0, + typename Attribute_descriptor<0>::type h1, + typename Attribute_descriptor<0>::type h2) { - Dart_handle d1 = this->make_combinatorial_polygon(3); + Dart_descriptor d1 = this->make_combinatorial_polygon(3); set_dart_attribute<0>(d1,h0); set_dart_attribute<0>(this->beta<1>(d1),h1); @@ -3817,20 +3812,20 @@ namespace CGAL { return d1; } - /** Create a quadrangle given 4 Vertex_attribute_handle. - * @param h0 the first vertex handle. - * @param h1 the second vertex handle. - * @param h2 the third vertex handle. - * @param h3 the fourth vertex handle. + /** Create a quadrangle given 4 Vertex_attribute_descriptor. + * @param h0 the first vertex descriptor. + * @param h1 the second vertex descriptor. + * @param h2 the third vertex descriptor. + * @param h3 the fourth vertex descriptor. * Note that this function can be used only if 0-attributes are non void * @return the dart of the new quadrilateral incident to h0 and to edge h0h1. */ - Dart_handle make_quadrangle(typename Attribute_handle<0>::type h0, - typename Attribute_handle<0>::type h1, - typename Attribute_handle<0>::type h2, - typename Attribute_handle<0>::type h3) + Dart_descriptor make_quadrangle(typename Attribute_descriptor<0>::type h0, + typename Attribute_descriptor<0>::type h1, + typename Attribute_descriptor<0>::type h2, + typename Attribute_descriptor<0>::type h3) { - Dart_handle d1 = this->make_combinatorial_polygon(4); + Dart_descriptor d1 = this->make_combinatorial_polygon(4); set_dart_attribute<0>(d1,h0); set_dart_attribute<0>(this->beta<1>(d1),h1); @@ -3847,10 +3842,10 @@ namespace CGAL { * @param d4 a dart onto a fourth triangle. * @return d1. */ - Dart_handle make_combinatorial_tetrahedron(Dart_handle d1, - Dart_handle d2, - Dart_handle d3, - Dart_handle d4) + Dart_descriptor make_combinatorial_tetrahedron(Dart_descriptor d1, + Dart_descriptor d2, + Dart_descriptor d3, + Dart_descriptor d4) { basic_link_beta_for_involution(d1, d2, 2); basic_link_beta_for_involution(d3, beta(d2, 0), 2); @@ -3863,17 +3858,17 @@ namespace CGAL { } /** Test if a volume is a combinatorial tetrahedron. - * @param adart an intial dart + * @param adart an initial dart * @return true iff the volume containing adart is a combinatorial tetrahedron. */ - bool is_volume_combinatorial_tetrahedron(Dart_const_handle d1) const + bool is_volume_combinatorial_tetrahedron(Dart_const_descriptor d1) const { - Dart_const_handle d2 = beta(d1, 2); - Dart_const_handle d3 = beta(d2, 0, 2); - Dart_const_handle d4 = beta(d2, 1, 2); + Dart_const_descriptor d2 = beta(d1, 2); + Dart_const_descriptor d3 = beta(d2, 0, 2); + Dart_const_descriptor d4 = beta(d2, 1, 2); - if ( d1==null_dart_handle || d2==null_dart_handle || - d3==null_dart_handle || d4==null_dart_handle ) return false; + if ( d1==null_dart_descriptor || d2==null_dart_descriptor || + d3==null_dart_descriptor || d4==null_dart_descriptor ) return false; if ( !is_face_combinatorial_polygon(d1, 3) || !is_face_combinatorial_polygon(d2, 3) || @@ -3898,12 +3893,12 @@ namespace CGAL { /** Create a new combinatorial tetrahedron. * @return a new dart. */ - Dart_handle make_combinatorial_tetrahedron() + Dart_descriptor make_combinatorial_tetrahedron() { - Dart_handle d1 = make_combinatorial_polygon(3); - Dart_handle d2 = make_combinatorial_polygon(3); - Dart_handle d3 = make_combinatorial_polygon(3); - Dart_handle d4 = make_combinatorial_polygon(3); + Dart_descriptor d1 = make_combinatorial_polygon(3); + Dart_descriptor d2 = make_combinatorial_polygon(3); + Dart_descriptor d3 = make_combinatorial_polygon(3); + Dart_descriptor d4 = make_combinatorial_polygon(3); return make_combinatorial_tetrahedron(d1, d2, d3, d4); } @@ -3917,12 +3912,12 @@ namespace CGAL { * @param d6 a dart onto a sixth quadrilateral. * @return d1. */ - Dart_handle make_combinatorial_hexahedron(Dart_handle d1, - Dart_handle d2, - Dart_handle d3, - Dart_handle d4, - Dart_handle d5, - Dart_handle d6) + Dart_descriptor make_combinatorial_hexahedron(Dart_descriptor d1, + Dart_descriptor d2, + Dart_descriptor d3, + Dart_descriptor d4, + Dart_descriptor d5, + Dart_descriptor d6) { basic_link_beta_for_involution(d1, beta(d4, 1, 1), 2); @@ -3956,20 +3951,20 @@ namespace CGAL { } /** Test if a volume is a combinatorial hexahedron. - * @param adart an intial dart + * @param adart an initial dart * @return true iff the volume containing adart is a combinatorial hexahedron. */ - bool is_volume_combinatorial_hexahedron(Dart_const_handle d1) const + bool is_volume_combinatorial_hexahedron(Dart_const_descriptor d1) const { - Dart_const_handle d2 = beta(d1, 1, 1, 2); - Dart_const_handle d3 = beta(d2, 1, 1, 2); - Dart_const_handle d4 = beta(d3, 1, 1, 2); - Dart_const_handle d5 = beta(d1, 0, 2); - Dart_const_handle d6 = beta(d4, 1, 2); + Dart_const_descriptor d2 = beta(d1, 1, 1, 2); + Dart_const_descriptor d3 = beta(d2, 1, 1, 2); + Dart_const_descriptor d4 = beta(d3, 1, 1, 2); + Dart_const_descriptor d5 = beta(d1, 0, 2); + Dart_const_descriptor d6 = beta(d4, 1, 2); - if ( d1==null_dart_handle || d2==null_dart_handle || - d3==null_dart_handle || d4==null_dart_handle || - d5==null_dart_handle || d6==null_dart_handle ) return false; + if ( d1==null_dart_descriptor || d2==null_dart_descriptor || + d3==null_dart_descriptor || d4==null_dart_descriptor || + d5==null_dart_descriptor || d6==null_dart_descriptor ) return false; if (!is_face_combinatorial_polygon(d1, 4) || !is_face_combinatorial_polygon(d2, 4) || @@ -4010,14 +4005,14 @@ namespace CGAL { /** Create a new combinatorial hexahedron. * @return a new dart. */ - Dart_handle make_combinatorial_hexahedron() + Dart_descriptor make_combinatorial_hexahedron() { - Dart_handle d1 = make_combinatorial_polygon(4); - Dart_handle d2 = make_combinatorial_polygon(4); - Dart_handle d3 = make_combinatorial_polygon(4); - Dart_handle d4 = make_combinatorial_polygon(4); - Dart_handle d5 = make_combinatorial_polygon(4); - Dart_handle d6 = make_combinatorial_polygon(4); + Dart_descriptor d1 = make_combinatorial_polygon(4); + Dart_descriptor d2 = make_combinatorial_polygon(4); + Dart_descriptor d3 = make_combinatorial_polygon(4); + Dart_descriptor d4 = make_combinatorial_polygon(4); + Dart_descriptor d5 = make_combinatorial_polygon(4); + Dart_descriptor d6 = make_combinatorial_polygon(4); return make_combinatorial_hexahedron(d1, d2, d3, d4, d5, d6); } @@ -4029,7 +4024,7 @@ namespace CGAL { * @return true iff the i-cell can be removed. */ template < unsigned int i > - bool is_removable(Dart_const_handle adart) const + bool is_removable(Dart_const_descriptor adart) const { return CGAL::Is_removable_functor::run(*this, adart); } /** Remove an i-cell, 0<=i<=dimension. @@ -4038,7 +4033,7 @@ namespace CGAL { * @return the number of deleted darts. */ template < unsigned int i > - size_t remove_cell(Dart_handle adart, bool update_attributes = true) + size_t remove_cell(Dart_descriptor adart, bool update_attributes = true) { return CGAL::Remove_cell_functor:: run(*this,adart,update_attributes); @@ -4051,7 +4046,7 @@ namespace CGAL { * @return true iff the i-cell can be contracted. */ template < unsigned int i > - bool is_contractible(Dart_const_handle adart) const + bool is_contractible(Dart_const_descriptor adart) const { return CGAL::Is_contractible_functor::run(*this,adart); } /** Contract an i-cell, 1<=i<=dimension. @@ -4059,27 +4054,27 @@ namespace CGAL { * @return the number of deleted darts. */ template < unsigned int i > - size_t contract_cell(Dart_handle adart, bool update_attributes = true) + size_t contract_cell(Dart_descriptor adart, bool update_attributes = true) { return CGAL::Contract_cell_functor:: run(*this,adart, update_attributes); } /** Insert a vertex in a given edge. - * @param adart a dart of the edge (!=nullptr && !=null_dart_handle). + * @param adart a dart of the edge (!=null_descriptor && !=null_dart_descriptor). * @param update_attributes a boolean to update the enabled attributes * @return a dart of the new vertex. */ - Dart_handle insert_cell_0_in_cell_1( Dart_handle adart, - typename Attribute_handle<0>::type - ah=null_handle, + Dart_descriptor insert_cell_0_in_cell_1( Dart_descriptor adart, + typename Attribute_descriptor<0>::type + ah=null_descriptor, bool update_attributes=true ) { - Dart_handle d1, d2; + Dart_descriptor d1, d2; size_type amark=get_new_mark(); // 1) We store all the darts of the edge. - std::deque vect; + std::deque vect; size_type m=get_new_mark(); { for ( typename Dart_of_cell_basic_range<1>::iterator @@ -4089,7 +4084,7 @@ namespace CGAL { } // 2) For each dart of the cell, we modify link of neighbors. - typename std::deque::iterator it = vect.begin(); + typename std::deque::iterator it = vect.begin(); for (; it != vect.end(); ++it) { d1 = create_dart(); @@ -4115,7 +4110,7 @@ namespace CGAL { , 0>:: run(*this,*it,d1); } - if (ah != null_handle) + if (ah != null_descriptor) { // We initialise the 0-atttrib to ah internal::Set_i_attribute_of_dart_functor:: @@ -4150,23 +4145,23 @@ namespace CGAL { } /** Insert a vertex in the given 2-cell which is split in triangles, - * once for each inital edge of the facet. + * once for each initial edge of the facet. * @param adart a dart of the facet to triangulate. * @param update_attributes a boolean to update the enabled attributes * (deprecated, now we use are_attributes_automatically_managed()) * @return A dart incident to the new vertex. */ - Dart_handle insert_cell_0_in_cell_2( Dart_handle adart, - typename Attribute_handle<0>::type - ah=null_handle, + Dart_descriptor insert_cell_0_in_cell_2( Dart_descriptor adart, + typename Attribute_descriptor<0>::type + ah=null_descriptor, bool update_attributes=true ) { - CGAL_assertion(adart!=null_dart_handle); + CGAL_assertion(adart!=null_dart_descriptor); - Dart_handle first=adart, prev=null_handle, - cur=null_handle, next=null_handle, - n1=null_handle, n2=null_handle, - nn1=null_handle, nn2=null_handle; + Dart_descriptor first=adart, prev=null_descriptor, + cur=null_descriptor, next=null_descriptor, + n1=null_descriptor, n2=null_descriptor, + nn1=null_descriptor, nn2=null_descriptor; // If the facet is open, we search the dart 0-free while ( !this->template is_free<0>(first) && @@ -4177,7 +4172,7 @@ namespace CGAL { size_type treated = get_new_mark(); // Stack of marked darts - std::deque tounmark; + std::deque tounmark; // Now we run through the facet cur = first; @@ -4192,21 +4187,21 @@ namespace CGAL { n1=create_dart(); link_beta_0(cur, n1); } - else n1 = null_handle; + else n1 = null_descriptor; if (!this->template is_free<1>(cur)) { n2 = create_dart(); link_beta_1(cur, n2); } - else n2 = null_handle; + else n2 = null_descriptor; - if ( n1!=null_handle ) + if ( n1!=null_descriptor ) { - if ( n2!=null_handle ) + if ( n2!=null_descriptor ) basic_link_beta_0(n1, n2); - if ( prev!=null_handle ) + if ( prev!=null_descriptor ) this->template basic_link_beta_for_involution<2>(prev, n1); if (are_attributes_automatically_managed() && update_attributes) @@ -4222,15 +4217,15 @@ namespace CGAL { { if ( !is_marked(beta(cur, dim), treated) ) { - if (n1!=null_handle) + if (n1!=null_descriptor) { nn1=create_dart(); link_beta_1(beta(cur, dim), nn1); basic_link_beta_for_involution(n1, nn1, dim); } - else nn1=null_handle; + else nn1=null_descriptor; - if (n2!=null_handle) + if (n2!=null_descriptor) { nn2=create_dart(); link_beta_0(beta(cur, dim), nn2); @@ -4241,22 +4236,22 @@ namespace CGAL { run(*this, nn2, ah); } } - else nn2=null_handle; + else nn2=null_descriptor; - if (nn1 != null_handle && nn2 != null_handle) + if (nn1 != null_descriptor && nn2 != null_descriptor) basic_link_beta_1(nn1, nn2); - if (nn1 != null_handle && prev != null_handle) + if (nn1 != null_descriptor && prev != null_descriptor) this->template basic_link_beta_for_involution<2>(nn1, beta(prev, dim)); mark(beta(cur, dim), treated); } else { - if ( n1!=null_handle ) + if ( n1!=null_descriptor ) basic_link_beta_for_involution(n1, beta(cur, dim, 1), dim); - if ( n2!=null_handle ) + if ( n2!=null_descriptor ) basic_link_beta_for_involution(n2, beta(cur, dim, 0), dim); } @@ -4266,9 +4261,9 @@ namespace CGAL { prev = n2; cur = next; } - while(cur!=first && cur!=null_dart_handle); + while(cur!=first && cur!=null_dart_descriptor); - if (n2 != null_handle) + if (n2 != null_descriptor) { this->template basic_link_beta_for_involution<2> (this->template beta<0>(first), n2); @@ -4284,7 +4279,7 @@ namespace CGAL { // Now we unmark all marked darts, and we degroup the new faces with the // initial one (if 2-attributes are non void). - for ( typename std::deque::iterator + for ( typename std::deque::iterator itd=tounmark.begin(); itd!=tounmark.end(); ++itd ) { unmark(*itd, treated); @@ -4312,17 +4307,17 @@ namespace CGAL { } /** Insert a dangling edge in a 2-cell between given by a dart. - * @param adart1 a first dart of the facet (!=nullptr && !=null_dart_handle). + * @param adart1 a first dart of the facet (!=null_descriptor && !=null_dart_descriptor). * @param update_attributes a boolean to update the enabled attributes * @return a dart of the new edge, not incident to the vertex of adart1. */ - Dart_handle insert_dangling_cell_1_in_cell_2( Dart_handle adart1, - typename Attribute_handle<0>:: - type ah=null_handle, + Dart_descriptor insert_dangling_cell_1_in_cell_2( Dart_descriptor adart1, + typename Attribute_descriptor<0>:: + type ah=null_descriptor, bool update_attributes=true ) { size_type mark1 = get_new_mark(); - std::deque to_unmark; + std::deque to_unmark; { for ( CMap_dart_iterator_basic_of_cell it(*this,adart1,mark1); it.cont(); ++it ) @@ -4332,8 +4327,8 @@ namespace CGAL { } } - Dart_handle d1 = null_handle; - Dart_handle d2 = null_handle; + Dart_descriptor d1 = null_descriptor; + Dart_descriptor d2 = null_descriptor; unsigned int s1 = 0; size_type treated=get_new_mark(); @@ -4382,7 +4377,7 @@ namespace CGAL { } } if (are_attributes_automatically_managed() && - update_attributes && ah!=nullptr) + update_attributes && ah!=null_descriptor) { internal::Set_i_attribute_of_dart_functor::run(*this, d1, ah); } @@ -4396,7 +4391,7 @@ namespace CGAL { CGAL_assertion( is_whole_map_marked(treated) ); free_mark(treated); - for ( typename std::deque::iterator it=to_unmark.begin(); + for ( typename std::deque::iterator it=to_unmark.begin(); it!=to_unmark.end(); ++it) { unmark(*it, mark1); } @@ -4415,10 +4410,11 @@ namespace CGAL { * @param adart2 a second dart. * @return true iff an edge can be inserted between adart1 and adart2. */ - bool is_insertable_cell_1_in_cell_2(Dart_const_handle adart1, - Dart_const_handle adart2) const + bool is_insertable_cell_1_in_cell_2(Dart_const_descriptor adart1, + Dart_const_descriptor adart2) const { - if ( adart1==adart2 ) return false; + if (adart1==adart2 || adart1==null_descriptor) return false; + if (adart2==null_descriptor) return true; for ( CMap_dart_const_iterator_of_orbit it(*this,adart1); it.cont(); ++it ) { @@ -4428,22 +4424,88 @@ namespace CGAL { } /** Insert an edge in a 2-cell between two given darts. - * @param adart1 a first dart of the facet (!=nullptr && !=null_dart_handle). - * @param adart2 a second dart of the facet. If nullptr insert a dangling edge. + * @param adart1 a first dart of the facet (!=null_descriptor && !=null_dart_descriptor). + * @param adart2 a second dart of the facet. If null_descriptor insert a dangling edge. * @param update_attributes a boolean to update the enabled attributes * @return a dart of the new edge, and not incident to the * same vertex than adart1. */ - Dart_handle insert_cell_1_in_cell_2(Dart_handle adart1, - Dart_handle adart2, - bool update_attributes=true) + Dart_descriptor insert_cell_1_in_cell_2(Dart_descriptor adart1, + Dart_descriptor adart2, + bool update_attributes=true) { - if ( adart2==null_handle ) - return insert_dangling_cell_1_in_cell_2(adart1, null_handle, + CGAL_assertion(is_insertable_cell_1_in_cell_2(adart1, adart2)); + if ( adart2==null_descriptor ) + return insert_dangling_cell_1_in_cell_2(adart1, null_descriptor, update_attributes); + return generic_insert_cell_1(adart1, adart2, false, update_attributes); + } - CGAL_assertion(is_insertable_cell_1_in_cell_2(adart1, adart2)); + /** Test if an edge can be inserted between two different 2-cells + * between two given darts. + * @param adart1 a first dart. + * @param adart2 a second dart. + * @return true iff an edge can be inserted between adart1 and adart2. + */ + bool is_insertable_cell_1_between_two_cells_2(Dart_const_descriptor adart1, + Dart_const_descriptor adart2) const + { + if (adart1==adart2 || adart1==null_descriptor || adart2==null_descriptor) + { return false; } + for ( CMap_dart_const_iterator_of_orbit it(*this,adart1); + it.cont(); ++it ) + { + if ( it==adart2 ) return false; + } + return true; + } + /** Insert an edge between two different 2-cells, between two given darts. + * @param adart1 a first dart of the first facet (!=null_descriptor && !=null_dart_descriptor). + * @param adart2 a second dart of the second facet (!=null_descriptor && !=null_dart_descriptor). + * @param update_attributes a boolean to update the enabled attributes + * @return a dart of the new edge, and not incident to the + * same vertex than adart1. + */ + Dart_descriptor insert_cell_1_between_two_cells_2(Dart_descriptor adart1, + Dart_descriptor adart2, + bool update_attributes=true) + { + CGAL_assertion(is_insertable_cell_1_between_two_cells_2(adart1, adart2)); + return generic_insert_cell_1(adart1, adart2, true, update_attributes); + } + + /** Insert an edge between two given darts. If the two darts belong to the same facet, call + * insert_cell_1_in_cell_2, otherwise call insert_cell_1_between_two_cells_2. + * @param adart1 a first dart (!=null_descriptor && !=null_dart_descriptor). + * @param adart2 a second dart. + * @param update_attributes a boolean to update the enabled attributes + * @return a dart of the new edge, and not incident to the + * same vertex than adart1. + */ + Dart_descriptor insert_cell_1(Dart_descriptor adart1, + Dart_descriptor adart2, + bool update_attributes=true) + { + if(is_insertable_cell_1_in_cell_2(adart1, adart2)) + { return insert_cell_1_in_cell_2(adart1, adart2, update_attributes); } + return insert_cell_1_between_two_cells_2(adart1, adart2, update_attributes); + } + + /** Generic method to insert a 1-cell, either in a 2-cell (cf. insert_cell_1_in_cell_2) + * or between two different 2-cells (cf. insert_cell_1_between_two_cells_2). + * Indeed the code is the same, except for the group/degroup attribute. + * merge is true if adart1 and adart2 belongs to two different facets; in this case + * the two facets should be merged (they are now linked by the new edge); + * merge is false it adart1 and adart2 belongs to the same facet; in this case + * the facet is split in two. + * Internal method not supposed to be called by users. + */ + Dart_descriptor generic_insert_cell_1(Dart_descriptor adart1, + Dart_descriptor adart2, + bool merge, + bool update_attributes) + { size_type m1=get_new_mark(); CMap_dart_iterator_basic_of_involution it1(*this, adart1, m1); @@ -4451,7 +4513,7 @@ namespace CGAL { CMap_dart_iterator_basic_of_involution it2(*this, adart2, m2); size_type mark1=get_new_mark(); - std::deque to_unmark; + std::deque to_unmark; { for ( CMap_dart_iterator_basic_of_cell it(*this,adart1,mark1); it.cont(); ++it ) @@ -4461,8 +4523,8 @@ namespace CGAL { } } - Dart_handle d1=null_handle; - Dart_handle d2=null_handle; + Dart_descriptor d1=null_descriptor; + Dart_descriptor d2=null_descriptor; unsigned int s1=0; size_type treated=get_new_mark(); @@ -4500,7 +4562,7 @@ namespace CGAL { } this->template basic_link_beta_for_involution<2>(d2, d1); - for ( unsigned int dim=3; dim<=dimension; ++dim) + for (unsigned int dim=3; dim<=dimension; ++dim) { if ( !is_free(it1, dim) && is_marked(beta(it1, dim), treated) ) @@ -4517,7 +4579,19 @@ namespace CGAL { if (are_attributes_automatically_managed() && update_attributes) { - internal::Degroup_attribute_functor_run::run(*this, d1, d2); + if(merge) + { // Here we group all enabled attributes starting from 2 to dimension + Helper::template Foreach_enabled_attributes + , 2>::run(*this, adart1, adart2); + // And we need to group also beta_i(adart1) and beta_i(adart2) for all + // enabled attributes starting from 3 dimension. Indeed when two i-cells + // are grouped for adart1 and adart2, this group also all beta_j two by two + // except for beta_i. + Helper::template Foreach_enabled_attributes + , 3>::run(*this, adart1, adart2); + } + else // Here we degroup 2-attributes + { internal::Degroup_attribute_functor_run::run(*this, adart1, adart2); } } negate_mark(m1); @@ -4538,7 +4612,7 @@ namespace CGAL { free_mark(m2); free_mark(treated); - typename std::deque::iterator it = to_unmark.begin(); + typename std::deque::iterator it = to_unmark.begin(); for (; it != to_unmark.end(); ++it) { unmark(*it, mark1); } CGAL_assertion( is_whole_map_unmarked(mark1) ); @@ -4565,20 +4639,20 @@ namespace CGAL { // The path must have at least one dart. if (afirst==alast) return false; - Dart_const_handle prec = null_handle; - Dart_const_handle od = null_handle; + Dart_const_descriptor prec = null_descriptor; + Dart_const_descriptor od = null_descriptor; for (InputIterator it(afirst); it!=alast; ++it) { // The path must contain only non empty darts. - if (*it == null_handle || *it==null_dart_handle) return false; + if (*it == null_descriptor || *it==null_dart_descriptor) return false; // Two consecutive darts of the path must belong to two edges // incident to the same vertex of the same volume. - if (prec != null_handle) + if (prec != null_descriptor) { od = other_extremity(prec); - if ( od==null_handle ) return false; + if ( od==null_descriptor ) return false; // of and *it must belong to the same vertex of the same volume if ( !belong_to_same_cell<0, 2>(od, *it) ) @@ -4589,7 +4663,7 @@ namespace CGAL { // The path must be closed. od = other_extremity(prec); - if ( od==null_handle ) return false; + if ( od==null_descriptor ) return false; if (!belong_to_same_cell<0, 2>(od, *afirst)) return false; @@ -4604,14 +4678,14 @@ namespace CGAL { * @return a dart of the new 2-cell. */ template - Dart_handle insert_cell_2_in_cell_3(InputIterator afirst, + Dart_descriptor insert_cell_2_in_cell_3(InputIterator afirst, InputIterator alast, bool update_attributes=true) { CGAL_assertion(is_insertable_cell_2_in_cell_3(afirst,alast)); - Dart_handle prec = null_handle, d = null_handle, - dd = null_handle, first = null_handle, it0=null_handle; + Dart_descriptor prec = null_descriptor, d = null_descriptor, + dd = null_descriptor, first = null_descriptor, it0=null_descriptor; bool withBeta3 = false; { @@ -4637,7 +4711,7 @@ namespace CGAL { this->template basic_link_beta_for_involution<2>(*it, d); - if (prec != null_handle) + if (prec != null_descriptor) { basic_link_beta_0(prec, d); if (withBeta3) @@ -4673,8 +4747,8 @@ namespace CGAL { { if ( !is_free(beta(first, 2), dim) ) { - Dart_handle first2 = null_handle; - prec = null_handle; + Dart_descriptor first2 = null_descriptor; + prec = null_descriptor; for ( CMap_dart_iterator_basic_of_orbit it(*this, first); it.cont(); ++it ) { @@ -4695,7 +4769,7 @@ namespace CGAL { CGAL_assertion(!is_free(it, 2)); this->template basic_link_beta_for_involution<2>(beta(it, 2, dim), d); - if ( prec!=null_handle ) + if ( prec!=null_descriptor ) { basic_link_beta_0(prec, d); if (withBeta3) @@ -4786,8 +4860,8 @@ namespace CGAL { typedef Combinatorial_map Self; typedef Combinatorial_map_base Base; - typedef typename Base::Dart_handle Dart_handle; - typedef typename Base::Dart_const_handle Dart_const_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; + typedef typename Base::Dart_const_descriptor Dart_const_descriptor; typedef typename Base::Alloc Alloc; typedef typename Base::Exception_no_more_available_mark Exception_no_more_available_mark; diff --git a/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h b/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h index 33f86952..dad279ab 100644 --- a/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h +++ b/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h $ -// $Id: Combinatorial_map_copy_functors.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h $ +// $Id: include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -41,7 +41,7 @@ namespace internal // **************************************************************************** // Map1 is the existing map, to convert into map2. // Functor called only when both i-attributes have non void info. -// General cases when both info are differents. +// General cases when both info are different. template< typename Map1, typename Map2, unsigned int i, typename Info1=typename Map1::template Attribute_type::type::Info, @@ -49,18 +49,18 @@ template< typename Map1, typename Map2, unsigned int i, Attribute_type::type::Info > struct Create_attribute_if_same_info_cmap { - static typename Map2::template Attribute_handle::type + static typename Map2::template Attribute_descriptor::type run(Map2&, const Info1& ) - { return Map2::null_handle; } + { return Map2::null_descriptor; } }; // Special case when both attributes have the same info. template< typename Map1, typename Map2, unsigned int i, typename Info > struct Create_attribute_if_same_info_cmap { - static typename Map2::template Attribute_handle::type + static typename Map2::template Attribute_descriptor::type run(Map2& map2, const Info& info) - { typename Map2::template Attribute_handle::type + { typename Map2::template Attribute_descriptor::type res = map2.template create_attribute(); map2.template info_of_attribute(res)=info; return res; @@ -137,9 +137,9 @@ template=My_length::value)> struct Get_convert_attribute_functor { - static typename Map2::template Attribute_handle::type - run( const Map1& cmap1, Map2& cmap2, typename Map1::Dart_const_handle dh1, - typename Map2::Dart_handle dh2, const Converters& /*converters*/) + static typename Map2::template Attribute_descriptor::type + run( const Map1& cmap1, Map2& cmap2, typename Map1::Dart_const_descriptor dh1, + typename Map2::Dart_descriptor dh2, const Converters& /*converters*/) { return CGAL::Default_converter_cmap_attributes() @@ -150,9 +150,9 @@ struct Get_convert_attribute_functor template struct Get_convert_attribute_functor { - static typename Map2::template Attribute_handle::type - run( const Map1& cmap1, Map2& cmap2, typename Map1::Dart_const_handle dh1, - typename Map2::Dart_handle dh2, const Converters& converters) + static typename Map2::template Attribute_descriptor::type + run( const Map1& cmap1, Map2& cmap2, typename Map1::Dart_const_descriptor dh1, + typename Map2::Dart_descriptor dh2, const Converters& converters) { return std::get(converters) (cmap1, cmap2, dh1, dh2); } @@ -170,24 +170,24 @@ template< typename Map1, typename Map2, unsigned int i, ::type>::value > struct Call_functor_if_both_attributes_have_info { - static typename Map2::template Attribute_handle::type + static typename Map2::template Attribute_descriptor::type run( const Map1&, Map2&, - typename Map1::Dart_const_handle, - typename Map2::Dart_handle, + typename Map1::Dart_const_descriptor, + typename Map2::Dart_descriptor, const Converters&) - { return Map2::null_handle; } + { return Map2::null_descriptor; } }; template< typename Map1, typename Map2, unsigned int i, typename Converters > struct Call_functor_if_both_attributes_have_info { - static typename Map2::template Attribute_handle::type + static typename Map2::template Attribute_descriptor::type run( const Map1& cmap1, Map2& cmap2, - typename Map1::Dart_const_handle dh1, - typename Map2::Dart_handle dh2, + typename Map1::Dart_const_descriptor dh1, + typename Map2::Dart_descriptor dh2, const Converters& converters ) { return Get_convert_attribute_functor:: @@ -199,11 +199,11 @@ template< typename Map1, typename Map2, unsigned int i, typename Converters > struct Call_functor_if_both_attributes_have_info { - static typename Map2::template Attribute_handle::type + static typename Map2::template Attribute_descriptor::type run( const Map1& /*cmap1*/, Map2& cmap2, - typename Map1::Dart_const_handle /*dh1*/, - typename Map2::Dart_handle /*dh2*/, + typename Map1::Dart_const_descriptor /*dh1*/, + typename Map2::Dart_descriptor /*dh2*/, const Converters& /*converters*/ ) { return cmap2.template create_attribute(); @@ -220,24 +220,24 @@ template< typename Map1, typename Map2, unsigned int i, ::type>::value > struct Call_functor_if_both_attributes_have_point { - static typename Map2::template Attribute_handle::type + static typename Map2::template Attribute_descriptor::type run( const Map1&, Map2&, - typename Map1::Dart_const_handle, - typename Map2::Dart_handle, + typename Map1::Dart_const_descriptor, + typename Map2::Dart_descriptor, const Pointconverter&) - { return Map2::null_handle; } + { return Map2::null_descriptor; } }; // Specialisation with i==0 and both attributes have points. template< typename Map1, typename Map2, typename Pointconverter > struct Call_functor_if_both_attributes_have_point { - static typename Map2::template Attribute_handle<0>::type + static typename Map2::template Attribute_descriptor<0>::type run( const Map1& cmap1, Map2& cmap2, - typename Map1::Dart_const_handle dh1, - typename Map2::Dart_handle dh2, + typename Map1::Dart_const_descriptor dh1, + typename Map2::Dart_descriptor dh2, const Pointconverter& pointconverter ) { return pointconverter(cmap1, cmap2, dh1, dh2); } }; @@ -254,25 +254,25 @@ struct Copy_attribute_functor_if_nonvoid { static void run( const Map1& cmap1, Map2& cmap2, - typename Map1::Dart_const_handle dh1, - typename Map2::Dart_handle dh2, + typename Map1::Dart_const_descriptor dh1, + typename Map2::Dart_descriptor dh2, const Converters& converters, const Pointconverter& pointconverter) { // If dh1 has no i-attribute, nothing to copy. - if ( cmap1.template attribute(dh1)==Map1::null_handle ) return; + if ( cmap1.template attribute(dh1)==Map1::null_descriptor ) return; // If dh2 has already an i-attribute, it was already copied. - if ( cmap2.template attribute(dh2)!=Map2::null_handle ) return; + if ( cmap2.template attribute(dh2)!=Map2::null_descriptor ) return; // Otherwise we copy the attribute if both attributes have non void info, // or if they both have no info. - typename Map2::template Attribute_handle::type + typename Map2::template Attribute_descriptor::type res=Call_functor_if_both_attributes_have_info :: run(cmap1, cmap2, dh1, dh2, converters); - if ( res!=Map2::null_handle ) + if ( res!=Map2::null_descriptor ) cmap2.template set_attribute(dh2, res); // And the point if both attributes have points (and only for 0-attributes) @@ -280,8 +280,8 @@ struct Copy_attribute_functor_if_nonvoid :: run(cmap1, cmap2, dh1, dh2, pointconverter); - if ( res!=Map2::null_handle && - cmap2.template attribute(dh2)==Map2::null_handle ) + if ( res!=Map2::null_descriptor && + cmap2.template attribute(dh2)==Map2::null_descriptor ) cmap2.template set_attribute(dh2, res); } }; @@ -295,13 +295,13 @@ struct Copy_attribute_functor_if_nonvoid(dh2)!=Map2::null_handle ) return; + if ( cmap2.template attribute<0>(dh2)!=Map2::null_descriptor ) return; // Create the point if 0-attributes has Point. if ( CGAL::template Is_attribute_has_point @@ -319,8 +319,8 @@ struct Copy_attribute_functor_if_nonvoid static void run( const Map1& cmap1, Map2& cmap2, - typename Map1::Dart_const_handle dh1, - typename Map2::Dart_handle dh2, + typename Map1::Dart_const_descriptor dh1, + typename Map2::Dart_descriptor dh2, const Converters& converters, const Pointconverter& pointconverter) { Copy_attribute_functor_if_nonvoid @@ -355,8 +355,8 @@ struct Copy_dart_info_functor_if_nonvoid { static void run( const Map1& map1, Map2& map2, - typename Map1::Dart_const_handle dh1, - typename Map2::Dart_handle dh2, + typename Map1::Dart_const_descriptor dh1, + typename Map2::Dart_descriptor dh2, const DartInfoConverter& converter) { converter(map1, map2, dh1, dh2); } }; @@ -368,8 +368,8 @@ struct Copy_dart_info_functor_if_nonvoid:: run(cmap1, cmap2, dh1, dh2, converter); @@ -426,32 +426,32 @@ struct Copy_dart_info_functor template< typename Map1, typename Map2, unsigned int i> struct Default_converter_cmap_attributes { - typename Map2::template Attribute_handle::type operator() - (const Map1& map1, Map2& map2, typename Map1::Dart_const_handle dh1, - typename Map2::Dart_handle dh2) const + typename Map2::template Attribute_descriptor::type operator() + (const Map1& map1, Map2& map2, typename Map1::Dart_const_descriptor dh1, + typename Map2::Dart_descriptor dh2) const { CGAL_USE(dh2); - CGAL_assertion( map1.template attribute(dh1)!=Map1::null_handle ); - CGAL_assertion( map2.template attribute(dh2)==Map2::null_handle ); + CGAL_assertion( map1.template attribute(dh1)!=Map1::null_descriptor ); + CGAL_assertion( map2.template attribute(dh2)==Map2::null_descriptor ); return internal::Create_attribute_if_same_info_cmap ::run(map2, map1.template info(dh1)); } }; // **************************************************************************** // Cast converter always copy attributes, doing a cast. This can work only -// if both types are convertible and this is user responsability +// if both types are convertible and this is user responsibility // to use it only in this case. template< typename Map1, typename Map2, unsigned int i> struct Cast_converter_cmap_attributes { - typename Map2::template Attribute_handle::type operator() - (const Map1& map1, Map2& map2, typename Map1::Dart_const_handle dh1, - typename Map2::Dart_handle dh2) const + typename Map2::template Attribute_descriptor::type operator() + (const Map1& map1, Map2& map2, typename Map1::Dart_const_descriptor dh1, + typename Map2::Dart_descriptor dh2) const { CGAL_USE(dh2); - CGAL_assertion( map1.template attribute(dh1)!=Map1::null_handle ); - CGAL_assertion( map2.template attribute(dh2)==Map2::null_handle ); - typename Map2::template Attribute_handle::type + CGAL_assertion( map1.template attribute(dh1)!=Map1::null_descriptor ); + CGAL_assertion( map2.template attribute(dh2)==Map2::null_descriptor ); + typename Map2::template Attribute_descriptor::type res = map2.template create_attribute(); map2.template info_of_attribute(res) = (typename Map2::template Attribute_type::type::Info) @@ -466,27 +466,27 @@ template< typename Map1, typename Map2, struct Default_converter_dart_info { void operator() (const Map1&, Map2&, - typename Map1::Dart_const_handle, - typename Map2::Dart_handle) const + typename Map1::Dart_const_descriptor, + typename Map2::Dart_descriptor) const {} }; template< typename Map1, typename Map2, typename Info> struct Default_converter_dart_info { void operator() (const Map1& map1, Map2& map2, - typename Map1::Dart_const_handle dh1, - typename Map2::Dart_handle dh2) const + typename Map1::Dart_const_descriptor dh1, + typename Map2::Dart_descriptor dh2) const { map2.info(dh2)=map1.info(dh1); } }; // **************************************************************************** // Cast converter of dart info. This can work only if both types are -// convertible and this is user responsability to use it only in this case. +// convertible and this is user responsibility to use it only in this case. template< typename Map1, typename Map2> struct Cast_converter_dart_info { void operator() (const Map1& map1, Map2& map2, - typename Map1::Dart_const_handle dh1, - typename Map2::Dart_handle dh2) const + typename Map1::Dart_const_descriptor dh1, + typename Map2::Dart_descriptor dh2) const { map2.info(dh2)=(typename Map2::Dart_info)map1.info(dh1); } }; // **************************************************************************** @@ -504,15 +504,15 @@ struct Cast_converter_dart_info template< typename Map1, typename Map2> struct Default_converter_cmap_0attributes_with_point { - typename Map2::template Attribute_handle<0>::type operator() - (const Map1& map1, Map2& map2, typename Map1::Dart_const_handle dh1, - typename Map2::Dart_handle dh2) const + typename Map2::template Attribute_descriptor<0>::type operator() + (const Map1& map1, Map2& map2, typename Map1::Dart_const_descriptor dh1, + typename Map2::Dart_descriptor dh2) const { - CGAL_assertion( map1.template attribute<0>(dh1)!=Map1::null_handle ); + CGAL_assertion( map1.template attribute<0>(dh1)!=Map1::null_descriptor ); - typename Map2::template Attribute_handle<0>::type + typename Map2::template Attribute_descriptor<0>::type res = map2.template attribute<0>(dh2); - if ( res==Map2::null_handle ) + if ( res==Map2::null_descriptor ) { res = map2.template create_attribute<0>(); } diff --git a/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h b/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h index 809b03b4..6f179ac4 100644 --- a/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h +++ b/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h $ -// $Id: Combinatorial_map_group_functors.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h $ +// $Id: include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -33,15 +33,22 @@ * Group_attribute_functor to group the -attributes of two * given i-cells (except for j-adim). If one i-attribute is nullptr, we set the * darts of its i-cell to the second attribute. If both i-attributes are - * non nullptr, we overide all the i-attribute of the second i-cell to the + * non nullptr, we override all the i-attribute of the second i-cell to the * first i-attribute. * + * Group_neighboor_attribute to group the -attributes of beta_i(d1) and + * beta_i(d2) if they exist. + * * Degroup_attribute_functor_run to degroup one i-attributes in two * (except for j-adim). * * Test_split_attribute_functor to test if there is some i-attributes * that are split after an operation. Modified darts are given in a * std::deque. + * + * Set_dart_of_attribute_if_marked to set the dart of the i-attribute + * associated with a dart if the old dart is marked. Used in remove_cell + * functions. */ namespace CGAL { @@ -61,24 +68,24 @@ struct Group_nonvoid_attribute_functor_of_dart_run { /// Group the i-attribute of dh1 and dh2. static void run(CMap& amap, - typename CMap::Dart_handle dh1, - typename CMap::Dart_handle dh2) + typename CMap::Dart_descriptor dh1, + typename CMap::Dart_descriptor dh2) { - CGAL_static_assertion( 1<=i && i<=CMap::dimension ); - CGAL_static_assertion( i!=j && (i!=1 || j!=0) ); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert( 1<=i && i<=CMap::dimension ); + static_assert( i!=j && (i!=1 || j!=0) ); + static_assert(CMap::Helper::template Dimension_index::value>=0, "Group_attribute_functor_of_dart_run but " "i-attributes are disabled"); - typename CMap::template Attribute_handle::type + typename CMap::template Attribute_descriptor::type a1=amap.template attribute(dh1); - typename CMap::template Attribute_handle::type + typename CMap::template Attribute_descriptor::type a2=amap.template attribute(dh2); // If the two attributes are equal, nothing to do. if ( a1==a2 ) return; - if ( a1==CMap::null_handle ) amap.template set_dart_attribute(dh1, a2); + if ( a1==CMap::null_descriptor ) amap.template set_dart_attribute(dh1, a2); else amap.template set_dart_attribute(dh2, a1); } }; @@ -87,34 +94,34 @@ template struct Group_nonvoid_attribute_functor_of_dart_run { static void run(CMap& amap, - typename CMap::Dart_handle dh1, - typename CMap::Dart_handle dh2) + typename CMap::Dart_descriptor dh1, + typename CMap::Dart_descriptor dh2) { - CGAL_static_assertion(j!=0 && j!=1); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(j!=0 && j!=1); + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_of_dart_run<0> but " "0-attributes are disabled"); - typename CMap::template Attribute_handle<0>::type - a1=CMap::null_handle, a2=CMap::null_handle; + typename CMap::template Attribute_descriptor<0>::type + a1=CMap::null_descriptor, a2=CMap::null_descriptor; // First extremity - typename CMap::Dart_handle od = amap.other_extremity(dh2); - if ( od!=amap.null_handle ) + typename CMap::Dart_descriptor od = amap.other_extremity(dh2); + if ( od!=amap.null_descriptor ) { a1=amap.template attribute<0>(dh1); a2=amap.template attribute<0>(od); - if ( a1==CMap::null_handle && a2!=CMap::null_handle ) + if ( a1==CMap::null_descriptor && a2!=CMap::null_descriptor ) amap.template set_dart_attribute<0>(dh1, a2); } // Second extremity od = amap.other_extremity(dh1); - if ( od!=amap.null_handle ) + if ( od!=amap.null_descriptor ) { a1=amap.template attribute<0>(od); - if ( a1!=CMap::null_handle ) + if ( a1!=CMap::null_descriptor ) amap.template set_dart_attribute<0>(dh2, a1); } } @@ -124,22 +131,22 @@ template struct Group_nonvoid_attribute_functor_of_dart_run { static void run(CMap& amap, - typename CMap::Dart_handle dh1, - typename CMap::Dart_handle dh2) + typename CMap::Dart_descriptor dh1, + typename CMap::Dart_descriptor dh2) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_of_dart_run<0> but " "0-attributes are disabled"); - typename CMap::Dart_handle od = amap.other_extremity(dh2); - if ( od!=amap.null_handle ) + typename CMap::Dart_descriptor od = amap.other_extremity(dh2); + if ( od!=amap.null_descriptor ) { - typename CMap::template Attribute_handle<0>::type + typename CMap::template Attribute_descriptor<0>::type a1=amap.template attribute<0>(dh1); - typename CMap::template Attribute_handle<0>::type + typename CMap::template Attribute_descriptor<0>::type a2=amap.template attribute<0>(od); - if ( a1==CMap::null_handle && a2!=CMap::null_handle ) + if ( a1==CMap::null_descriptor && a2!=CMap::null_descriptor ) amap.template set_dart_attribute<0>(dh1, a2); } } @@ -149,20 +156,20 @@ template struct Group_nonvoid_attribute_functor_of_dart_run { static void run(CMap& amap, - typename CMap::Dart_handle dh1, - typename CMap::Dart_handle dh2) + typename CMap::Dart_descriptor dh1, + typename CMap::Dart_descriptor dh2) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_of_dart_run<0> but " "0-attributes are disabled"); - typename CMap::Dart_handle od = amap.other_extremity(dh1); - if ( od!=amap.null_handle ) + typename CMap::Dart_descriptor od = amap.other_extremity(dh1); + if ( od!=amap.null_descriptor ) { - typename CMap::template Attribute_handle<0>::type + typename CMap::template Attribute_descriptor<0>::type a1=amap.template attribute<0>(od); - if ( a1!=CMap::null_handle ) + if ( a1!=CMap::null_descriptor ) amap.template set_dart_attribute<0>(dh2, a1); } } @@ -172,8 +179,8 @@ template struct Group_nonvoid_attribute_functor_of_dart_run { static void run(CMap&, - typename CMap::Dart_handle, - typename CMap::Dart_handle) + typename CMap::Dart_descriptor, + typename CMap::Dart_descriptor) {} }; // Specialization for i=1 and j=0. Do nothing as edges attributes are not @@ -182,8 +189,8 @@ template struct Group_nonvoid_attribute_functor_of_dart_run { static void run(CMap&, - typename CMap::Dart_handle, - typename CMap::Dart_handle) + typename CMap::Dart_descriptor, + typename CMap::Dart_descriptor) {} }; //------------------------------------------------------------------------------ @@ -193,8 +200,8 @@ struct Group_attribute_functor_of_dart_run { /// Group the i-attribute of dh1 and dh2. static void run(CMap& amap, - typename CMap::Dart_handle dh1, - typename CMap::Dart_handle dh2) + typename CMap::Dart_descriptor dh1, + typename CMap::Dart_descriptor dh2) { Group_nonvoid_attribute_functor_of_dart_run:: run(amap, dh1, dh2); } }; @@ -203,8 +210,8 @@ template struct Group_attribute_functor_of_dart_run { static void run(CMap&, - typename CMap::Dart_handle, - typename CMap::Dart_handle) + typename CMap::Dart_descriptor, + typename CMap::Dart_descriptor) {} }; // ************************************************************************ @@ -221,8 +228,8 @@ struct Group_attribute_functor_of_dart { template static void run(CMap& amap, - typename CMap::Dart_handle adart1, - typename CMap::Dart_handle adart2) + typename CMap::Dart_descriptor adart1, + typename CMap::Dart_descriptor adart2) { CGAL::internal::Group_attribute_functor_of_dart_run:: run(amap,adart1,adart2); @@ -237,37 +244,45 @@ template::value>=0, "Group_attribute_functor_run but i-attributes are disabled" ); - typename CMap::template Attribute_handle::type + typename CMap::template Attribute_descriptor::type a1=amap.template attribute(adart1); - typename CMap::template Attribute_handle::type + typename CMap::template Attribute_descriptor::type a2=amap.template attribute(adart2); // If the two attributes are equal, nothing to do. - if ( a1 == a2 ) return; - - typename CMap::Dart_handle toSet = amap.null_handle; + if (a1==a2) + { + if(a1!=CMap::null_descriptor && dart1_deleted && + amap.template dart_of_attribute(a1)==adart1) + { amap.template set_dart_of_attribute(a1, adart2); } + return; + } + typename CMap::Dart_descriptor toSet = amap.null_descriptor; // If the attribute associated to adart1 is nullptr, set it with // the attribute associated to adart2 (necessarily != nullptr) - if (a1 == CMap::null_handle) + if (a1 == CMap::null_descriptor) { toSet = adart1; a1 = a2; } else { toSet = adart2; - if (a2 != CMap::null_handle) + if (a2 != CMap::null_descriptor) { CGAL::internal::Call_merge_functor::run(amap, a1, a2); } } amap.template set_attribute(toSet, a1); + if(dart1_deleted && toSet==adart1) + { amap.template set_dart_of_attribute(a1, adart2); } } }; // Specialization for i=0 and 2<=j. We update 0-attributes for beta_j j>=2. @@ -276,52 +291,55 @@ template struct Group_nonvoid_attribute_functor_run { static void run( CMap& amap, - typename CMap::Dart_handle dh1, - typename CMap::Dart_handle dh2 ) + typename CMap::Dart_descriptor dh1, + typename CMap::Dart_descriptor dh2, + bool dart1_deleted=true) { - CGAL_static_assertion_msg + static_assert ( CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_run<0> but 0-attributes are disabled" ); - CGAL_static_assertion(j!=0 && j!=1); + static_assert(j!=0 && j!=1); - typename CMap::template Attribute_handle<0>::type - a1=CMap::null_handle, a2=CMap::null_handle; - typename CMap::Dart_handle toSet=amap.null_handle; + typename CMap::template Attribute_descriptor<0>::type + a1=CMap::null_descriptor, a2=CMap::null_descriptor; + typename CMap::Dart_descriptor toSet=amap.null_descriptor; // First extremity - typename CMap::Dart_handle od=amap.other_extremity(dh2); - if ( od!=amap.null_handle ) + typename CMap::Dart_descriptor od=amap.other_extremity(dh2); + if ( od!=amap.null_descriptor ) { a1=amap.template attribute<0>(dh1); a2=amap.template attribute<0>(od); if ( a1!=a2 ) { - if ( a1==CMap::null_handle ) + if ( a1==CMap::null_descriptor ) { toSet=dh1; a1=a2; } else { toSet=od; - if ( a2!=CMap::null_handle ) + if ( a2!=CMap::null_descriptor ) { CGAL::internal::Call_merge_functor::run(amap, a1, a2); } } amap.template set_attribute<0>(toSet, a1); + if(dart1_deleted && toSet==dh1) + { amap.template set_dart_of_attribute<0>(a1, od); } } } // Second extremity od = amap.other_extremity(dh1); - if ( od!=amap.null_handle ) + if ( od!=amap.null_descriptor ) { a1=amap.template attribute<0>(od); a2=amap.template attribute<0>(dh2); if ( a1!=a2 ) { - if ( a1==CMap::null_handle ) + if ( a1==CMap::null_descriptor ) { toSet=od; a1=a2; } else { toSet=dh2; - if ( a2!=CMap::null_handle ) + if ( a2!=CMap::null_descriptor ) { CGAL::internal::Call_merge_functor::run(amap, a1, a2); } @@ -337,33 +355,36 @@ template struct Group_nonvoid_attribute_functor_run { static void run( CMap& amap, - typename CMap::Dart_handle dh1, - typename CMap::Dart_handle dh2 ) + typename CMap::Dart_descriptor dh1, + typename CMap::Dart_descriptor dh2, + bool dart1_deleted=true) { - CGAL_static_assertion_msg + static_assert ( CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_run<0> but 0-attributes are disabled" ); - typename CMap::Dart_handle od=amap.other_extremity(dh2); - if ( od!=amap.null_handle ) + typename CMap::Dart_descriptor od=amap.other_extremity(dh2); + if ( od!=amap.null_descriptor ) { - typename CMap::Dart_handle toSet=amap.null_handle; - typename CMap::template Attribute_handle<0>::type + typename CMap::Dart_descriptor toSet=amap.null_descriptor; + typename CMap::template Attribute_descriptor<0>::type a1=amap.template attribute<0>(dh1); - typename CMap::template Attribute_handle<0>::type + typename CMap::template Attribute_descriptor<0>::type a2=amap.template attribute<0>(od); if ( a1!=a2 ) { - if ( a1==CMap::null_handle ) + if ( a1==CMap::null_descriptor ) { toSet=dh1; a1=a2; } else { toSet=od; - if ( a2!=CMap::null_handle ) + if ( a2!=CMap::null_descriptor ) { CGAL::internal::Call_merge_functor::run(amap, a1, a2); } } amap.template set_attribute<0>(toSet, a1); + if(dart1_deleted && toSet==dh1) + { amap.template set_dart_of_attribute<0>(a1, od); } } } } @@ -374,28 +395,29 @@ template struct Group_nonvoid_attribute_functor_run { static void run( CMap& amap, - typename CMap::Dart_handle dh1, - typename CMap::Dart_handle dh2 ) + typename CMap::Dart_descriptor dh1, + typename CMap::Dart_descriptor dh2, + bool=true) { - CGAL_static_assertion_msg + static_assert ( CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_run<0> but 0-attributes are disabled" ); - typename CMap::Dart_handle od =amap.other_extremity(dh1); - if ( od!=amap.null_handle ) + typename CMap::Dart_descriptor od =amap.other_extremity(dh1); + if ( od!=amap.null_descriptor ) { - typename CMap::Dart_handle toSet=amap.null_handle; - typename CMap::template Attribute_handle<0>::type + typename CMap::Dart_descriptor toSet=amap.null_descriptor; + typename CMap::template Attribute_descriptor<0>::type a1=amap.template attribute<0>(od); - typename CMap::template Attribute_handle<0>::type + typename CMap::template Attribute_descriptor<0>::type a2=amap.template attribute<0>(dh2); if ( a1!=a2 ) { - if ( a1==CMap::null_handle ) + if ( a1==CMap::null_descriptor ) { toSet=od; a1=a2; } else { toSet=dh2; - if ( a2!=CMap::null_handle ) + if ( a2!=CMap::null_descriptor ) { CGAL::internal::Call_merge_functor::run(amap, a1, a2); } @@ -410,8 +432,9 @@ template struct Group_nonvoid_attribute_functor_run { static void run(CMap&, - typename CMap::Dart_handle, - typename CMap::Dart_handle) + typename CMap::Dart_descriptor, + typename CMap::Dart_descriptor, + bool=true) {} }; // Specialization for i=1 and j=0. Do nothing as edges attributes are not @@ -420,8 +443,9 @@ template struct Group_nonvoid_attribute_functor_run { static void run(CMap&, - typename CMap::Dart_handle, - typename CMap::Dart_handle) + typename CMap::Dart_descriptor, + typename CMap::Dart_descriptor, + bool=true) {} }; //------------------------------------------------------------------------------ @@ -431,17 +455,20 @@ template::run(amap, d1, d2); } + typename CMap::Dart_descriptor d1, + typename CMap::Dart_descriptor d2, + bool dart1_deleted=true) + { Group_nonvoid_attribute_functor_run:: + run(amap, d1, d2, dart1_deleted); } }; // Specialization for void attributes. template struct Group_attribute_functor_run { static void run( CMap&, - typename CMap::Dart_handle, - typename CMap::Dart_handle ) + typename CMap::Dart_descriptor, + typename CMap::Dart_descriptor, + bool=true) {} }; // ************************************************************************ @@ -458,12 +485,28 @@ struct Group_attribute_functor { template static void run(CMap& amap, - typename CMap::Dart_handle adart1, - typename CMap::Dart_handle adart2) + typename CMap::Dart_descriptor adart1, + typename CMap::Dart_descriptor adart2) { CGAL::internal::Group_attribute_functor_run:: run(amap,adart1,adart2); } }; // ************************************************************************ +/// Group i-attribute of beta_i(d1) and beta_i(d2) if they exist. +template +struct Group_neighboor_attribute +{ + template + static void run(CMap& amap, typename CMap::Dart_descriptor d1, + typename CMap::Dart_descriptor d2) + { + if(!amap.template is_free(d1) && !amap.template is_free(d2)) + { + CGAL::internal::Group_attribute_functor_run::run + (amap, amap.template opposite(d1), amap.template opposite(d2), false); + } + } +}; +// ************************************************************************ // Functor used to degroup one i-attribute of one i-cell in two, except the // attribute of j. template::value>=0, "Degroup_attribute_functor_run but i-attributes are disabled" ); - typename CMap::template Attribute_handle::type + typename CMap::template Attribute_descriptor::type a1=amap.template attribute(adart1); // If there is no first attribute, nothing to degroup. - if ( a1==CMap::null_handle ) return; + if ( a1==CMap::null_descriptor ) return; // If the second attribute is non null and already different from a1, // nothing to do. if ( a1!=amap.template attribute(adart2) && - amap.template attribute(adart2)!=CMap::null_handle ) return; + amap.template attribute(adart2)!=CMap::null_descriptor ) return; CGAL_assertion( (!CGAL::belong_to_same_cell (amap, adart1, adart2)) ); @@ -498,7 +541,7 @@ struct Degroup_nonvoid_attribute_functor_run // we are sure it belongs to the first i-cell. amap.template set_dart_of_attribute(a1, adart1); - typename CMap::template Attribute_handle::type + typename CMap::template Attribute_descriptor::type a2 = amap.template copy_attribute(a1); amap.template set_attribute(adart2, a2); @@ -510,8 +553,8 @@ template struct Degroup_nonvoid_attribute_functor_run { static void run(CMap&, - typename CMap::Dart_handle, - typename CMap::Dart_handle) + typename CMap::Dart_descriptor, + typename CMap::Dart_descriptor) {} }; //------------------------------------------------------------------------------ @@ -520,8 +563,8 @@ template:: run(amap, adart1, adart2); } }; @@ -530,8 +573,8 @@ template struct Degroup_attribute_functor_run { static void run(CMap&, - typename CMap::Dart_handle, - typename CMap::Dart_handle) + typename CMap::Dart_descriptor, + typename CMap::Dart_descriptor) {} }; // ************************************************************************ @@ -544,29 +587,38 @@ struct Degroup_attribute_functor_run // process them exactly once. template void test_split_attribute_functor_one_dart -( CMap& amap, typename CMap::Dart_handle adart, - CGAL::Unique_hash_map::type, +( CMap& amap, typename CMap::Dart_descriptor adart, + CGAL::Unique_hash_map::type, unsigned int, typename CMap::Hash_function> & found_attributes, typename CMap::size_type mark ) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Test_split_attribute_functor_one_dart but " "i-attributes are disabled"); - typedef typename CMap::template Attribute_handle::type - Attribute_handle_i; + typedef typename CMap::template Attribute_descriptor::type + Attribute_descriptor_i; // If the current dart has no attribute, or if it is aldready marked, // nothing to do. - if ( amap.template attribute(adart)==CMap::null_handle || + if ( amap.template attribute(adart)==CMap::null_descriptor || amap.is_marked(adart, mark) ) return; - Attribute_handle_i a1 = amap.template attribute(adart); + Attribute_descriptor_i a1 = amap.template attribute(adart); if ( found_attributes.is_defined(a1) ) { // Here the attribute was already present in the hash_map - Attribute_handle_i a2 = amap.template + + // We need to call reserve for the cc with index case. Indeed, if the vector + // is reallocated, the reference returned by get_attribute(a1) will be + // invalidated, and the copy will be wrong. Note that there is no overhead + // since the creation of the attribute need one allocation. + amap.template attributes().reserve(amap.template attributes().size()+1); + + // Now we are sure that the creation of a new attribute will not imply + // a realloc. + Attribute_descriptor_i a2 = amap.template create_attribute(amap.template get_attribute(a1)); for ( CGAL::CMap_dart_iterator_basic_of_cell @@ -602,25 +654,25 @@ struct Test_split_nonvoid_attribute_functor_run { // modified_darts is the set of modified darts for beta_j static void run( CMap& amap, - const std::deque + const std::deque &modified_darts, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { - CGAL_static_assertion( 1<=i && i<=CMap::dimension ); + static_assert( 1<=i && i<=CMap::dimension ); CGAL_assertion( i!=j ); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Test_split_attribute_functor_run but " "i-attributes are disabled"); - typedef typename CMap::template Attribute_handle::type - Attribute_handle_i; + typedef typename CMap::template Attribute_descriptor::type + Attribute_descriptor_i; - CGAL::Unique_hash_map found_attributes; typename CMap::size_type mark = amap.get_new_mark(); // to mark incident cells. - typename std::deque::const_iterator + typename std::deque::const_iterator it=modified_darts.begin(); for ( ; it!=modified_darts.end(); ++it ) { @@ -643,34 +695,34 @@ struct Test_split_nonvoid_attribute_functor_run amap.free_mark(mark); } static void run( CMap& amap, - const std::deque + const std::deque &modified_darts, - const std::deque + const std::deque &modified_darts2, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { - CGAL_static_assertion( 1<=i && i<=CMap::dimension ); + static_assert( 1<=i && i<=CMap::dimension ); CGAL_assertion( i!=j ); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Test_split_attribute_functor_run but " "i-attributes are disabled"); - typedef typename CMap::template Attribute_handle::type - Attribute_handle_i; + typedef typename CMap::template Attribute_descriptor::type + Attribute_descriptor_i; - CGAL::Unique_hash_map found_attributes; typename CMap::size_type mark = amap.get_new_mark(); // to mark incident cells. - typename std::deque::const_iterator + typename std::deque::const_iterator it=modified_darts.begin(); for ( ; it!=modified_darts.end(); ++it ) { CGAL::internal::test_split_attribute_functor_one_dart (amap, *it, found_attributes, mark); } - typename std::deque::const_iterator + typename std::deque::const_iterator it2=modified_darts2.begin(); for ( ; it2!=modified_darts2.end(); ++it2 ) { @@ -706,25 +758,25 @@ template struct Test_split_nonvoid_attribute_functor_run { static void run( CMap& amap, - const std::deque + const std::deque &modified_darts, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { CGAL_assertion( j!=0 && j!=1 ); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Test_split_attribute_functor_run<0> but " "0-attributes are disabled"); - typedef typename CMap::template Attribute_handle<0>::type - Attribute_handle_0; + typedef typename CMap::template Attribute_descriptor<0>::type + Attribute_descriptor_0; - CGAL::Unique_hash_map found_attributes; - typename CMap::Dart_handle od=amap.null_handle; + typename CMap::Dart_descriptor od=amap.null_descriptor; typename CMap::size_type mark = amap.get_new_mark(); // to mark incident cells. - typename std::deque::const_iterator + typename std::deque::const_iterator it=modified_darts.begin(); for ( ; it!=modified_darts.end(); ++it ) { @@ -732,7 +784,7 @@ struct Test_split_nonvoid_attribute_functor_run (amap, *it, found_attributes, mark); od=amap.other_extremity(*it); - if ( od!=amap.null_handle ) + if ( od!=amap.null_descriptor ) CGAL::internal::test_split_attribute_functor_one_dart (amap, od, found_attributes, mark); } @@ -748,7 +800,7 @@ struct Test_split_nonvoid_attribute_functor_run CGAL::mark_cell(amap, *it, mark); od=amap.other_extremity(*it); - if ( od!=amap.null_handle && !amap.is_marked(od, mark) ) + if ( od!=amap.null_descriptor && !amap.is_marked(od, mark) ) CGAL::mark_cell(amap, od, mark); } @@ -756,27 +808,27 @@ struct Test_split_nonvoid_attribute_functor_run amap.free_mark(mark); } static void run( CMap& amap, - const std::deque + const std::deque &modified_darts, - const std::deque + const std::deque &modified_darts2, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { CGAL_assertion( j!=0 && j!=1 ); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Test_split_attribute_functor_run<0> but " "0-attributes are disabled"); - typedef typename CMap::template Attribute_handle<0>::type - Attribute_handle_0; + typedef typename CMap::template Attribute_descriptor<0>::type + Attribute_descriptor_0; - CGAL::Unique_hash_map found_attributes; - typename CMap::Dart_handle od=amap.null_handle; + typename CMap::Dart_descriptor od=amap.null_descriptor; typename CMap::size_type mark = amap.get_new_mark(); // to mark incident cells. - typename std::deque::const_iterator + typename std::deque::const_iterator it=modified_darts.begin(); for ( ; it!=modified_darts.end(); ++it ) { @@ -784,11 +836,11 @@ struct Test_split_nonvoid_attribute_functor_run (amap, *it, found_attributes, mark); od=amap.other_extremity(*it); - if ( od!=amap.null_handle ) + if ( od!=amap.null_descriptor ) CGAL::internal::test_split_attribute_functor_one_dart (amap, od, found_attributes, mark); } - typename std::deque::const_iterator + typename std::deque::const_iterator it2=modified_darts2.begin(); for ( ; it2!=modified_darts2.end(); ++it2 ) { @@ -796,7 +848,7 @@ struct Test_split_nonvoid_attribute_functor_run (amap, *it2, found_attributes, mark); od=amap.other_extremity(*it2); - if ( od!=amap.null_handle ) + if ( od!=amap.null_descriptor ) CGAL::internal::test_split_attribute_functor_one_dart (amap, od, found_attributes, mark); } @@ -812,7 +864,7 @@ struct Test_split_nonvoid_attribute_functor_run CGAL::mark_cell(amap, *it, mark); od=amap.other_extremity(*it); - if ( od!=amap.null_handle && !amap.is_marked(od, mark) ) + if ( od!=amap.null_descriptor && !amap.is_marked(od, mark) ) CGAL::mark_cell(amap, od, mark); } for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 ) @@ -824,7 +876,7 @@ struct Test_split_nonvoid_attribute_functor_run CGAL::mark_cell(amap, *it2, mark); od=amap.other_extremity(*it2); - if ( od!=amap.null_handle && !amap.is_marked(od, mark) ) + if ( od!=amap.null_descriptor && !amap.is_marked(od, mark) ) CGAL::mark_cell(amap, od, mark); } @@ -839,42 +891,42 @@ struct Test_split_nonvoid_attribute_functor_run template struct Test_split_nonvoid_attribute_functor_run { - static void run( CMap&, const std::deque&, + static void run( CMap&, const std::deque&, typename CMap::size_type =CMap::INVALID_MARK) { CGAL_assertion(false); } static void run( CMap& amap, - const std::deque + const std::deque &modified_darts, - const std::deque + const std::deque &modified_darts2, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Test_split_attribute_functor_run<0> but " "0-attributes are disabled"); - typedef typename CMap::template Attribute_handle<0>::type - Attribute_handle_0; + typedef typename CMap::template Attribute_descriptor<0>::type + Attribute_descriptor_0; - CGAL::Unique_hash_map found_attributes; - typename CMap::Dart_handle od=amap.null_handle; + typename CMap::Dart_descriptor od=amap.null_descriptor; typename CMap::size_type mark = amap.get_new_mark(); // to mark incident cells. - typename std::deque::const_iterator + typename std::deque::const_iterator it=modified_darts.begin(); for ( ; it!=modified_darts.end(); ++it ) { CGAL::internal::test_split_attribute_functor_one_dart (amap, *it, found_attributes, mark); } - typename std::deque::const_iterator + typename std::deque::const_iterator it2=modified_darts2.begin(); for ( ; it2!=modified_darts2.end(); ++it2 ) { od=amap.other_extremity(*it2); - if ( od!=amap.null_handle ) + if ( od!=amap.null_descriptor ) CGAL::internal::test_split_attribute_functor_one_dart (amap, od, found_attributes, mark); } @@ -895,7 +947,7 @@ struct Test_split_nonvoid_attribute_functor_run amap.unmark(*it2, mark_modified_darts); od=amap.other_extremity(*it2); - if ( od!=amap.null_handle && !amap.is_marked(od, mark) ) + if ( od!=amap.null_descriptor && !amap.is_marked(od, mark) ) CGAL::mark_cell(amap, od, mark); } @@ -908,12 +960,12 @@ struct Test_split_nonvoid_attribute_functor_run template struct Test_split_nonvoid_attribute_functor_run { - static void run( CMap&, const std::deque&, + static void run( CMap&, const std::deque&, typename CMap::size_type =CMap::INVALID_MARK) { CGAL_assertion(false); } - static void run( CMap& amap, const std::deque& + static void run( CMap& amap, const std::deque& modified_darts, - const std::deque& + const std::deque& modified_darts2, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { CGAL::internal::Test_split_nonvoid_attribute_functor_run:: @@ -923,11 +975,11 @@ struct Test_split_nonvoid_attribute_functor_run template struct Test_split_nonvoid_attribute_functor_run { - static void run( CMap&, const std::deque&, + static void run( CMap&, const std::deque&, typename CMap::size_type=CMap::INVALID_MARK) {} - static void run( CMap&, const std::deque&, - const std::deque&, + static void run( CMap&, const std::deque&, + const std::deque&, typename CMap::size_type=CMap::INVALID_MARK) {} }; @@ -936,11 +988,11 @@ struct Test_split_nonvoid_attribute_functor_run template struct Test_split_nonvoid_attribute_functor_run { - static void run( CMap&, const std::deque&, + static void run( CMap&, const std::deque&, typename CMap::size_type=CMap::INVALID_MARK) {} - static void run( CMap&, const std::deque&, - const std::deque&, + static void run( CMap&, const std::deque&, + const std::deque&, typename CMap::size_type=CMap::INVALID_MARK) {} }; @@ -951,16 +1003,16 @@ struct Test_split_attribute_functor_run { // modified_darts is the set of modified darts for beta_j static void run( CMap& amap, - const std::deque + const std::deque &modified_darts, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { Test_split_nonvoid_attribute_functor_run:: run(amap, modified_darts, mark_modified_darts); } static void run( CMap& amap, - const std::deque + const std::deque &modified_darts, - const std::deque + const std::deque &modified_darts2, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { Test_split_nonvoid_attribute_functor_run:: @@ -971,11 +1023,11 @@ struct Test_split_attribute_functor_run template struct Test_split_attribute_functor_run { - static void run( CMap&, const std::deque&, + static void run( CMap&, const std::deque&, typename CMap::size_type=CMap::INVALID_MARK) {} - static void run( CMap&, const std::deque&, - const std::deque&, + static void run( CMap&, const std::deque&, + const std::deque&, typename CMap::size_type=CMap::INVALID_MARK) {} }; @@ -993,7 +1045,7 @@ struct Test_split_attribute_functor // it with the new i-cell and call onsplit functors. template static void run( CMap& amap, - const std::deque + const std::deque &modified_darts, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { @@ -1002,9 +1054,9 @@ struct Test_split_attribute_functor } template static void run( CMap& amap, - const std::deque + const std::deque &modified_darts, - const std::deque + const std::deque &modified_darts2, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { @@ -1013,6 +1065,28 @@ struct Test_split_attribute_functor } }; // ************************************************************************ +template::type> +struct Set_dart_of_attribute_if_marked +{ + static void run(CMap& amap, typename CMap::Dart_descriptor d1, + typename CMap::size_type amark) + { + if(amap.template attribute(d1)!=CMap::null_descriptor && + amap.template dart(d1)!=CMap::null_descriptor && + amap.is_marked(amap.template dart(d1), amark)) + { amap.template dart(d1)=d1; } + } +}; +// Specialization for void attributes. +template +struct Set_dart_of_attribute_if_marked +{ + static void run(CMap&, typename CMap::Dart_descriptor, + typename CMap::size_type) + {} +}; +// ************************************************************************ } // namespace internal } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h b/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h index 15f62ef8..fb361272 100644 --- a/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h +++ b/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h $ -// $Id: Combinatorial_map_internal_functors.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h $ +// $Id: include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -39,7 +39,7 @@ * valid (all its darts are linked to the same attribute, no other dart is * linked with this attribute). * - * internal::Count_cell_functor to count the nuber of i-cells. + * internal::Count_cell_functor to count the number of i-cells. * * internal::Count_bytes_one_attribute_functor to count the memory * occupied by i-attributes. @@ -66,7 +66,7 @@ * internal::Test_is_same_attribute_functor to test if two * i-attributes of two darts are isomorphic (ie they have the same info). * - * inernal::Test_is_same_attribute_point_functor to test if + * internal::Test_is_same_attribute_point_functor to test if * the point of two i-attributes are equal. * * internal::Reverse_orientation_of_map_functor to reverse the @@ -75,7 +75,7 @@ * internal::Reverse_orientation_of_connected_component_functor to reverse * the orientation of a connected component in a cmap * - * internal::Init_attribute_functor to initialize all attributes to nullptr. + * internal::Init_attribute_functor to initialize all attributes to null_descriptor. * * internal::Correct_invalid_attributes_functor to correct the i-attribute * associated with a given i-cell @@ -142,8 +142,8 @@ struct Call_split_functor typedef typename Attribute::On_split On_split; static void - run(CMap& amap, typename CMap::template Attribute_handle::type a1, - typename CMap::template Attribute_handle::type a2) + run(CMap& amap, typename CMap::template Attribute_descriptor::type a1, + typename CMap::template Attribute_descriptor::type a2) { // Static version CGAL::internal::Apply_cell_functor:: @@ -161,8 +161,8 @@ struct Call_split_functor template struct Call_split_functor { - static void run(typename CMap::Dart_handle, - typename CMap::Dart_handle) + static void run(typename CMap::Dart_descriptor, + typename CMap::Dart_descriptor) {} }; // **************************************************************************** @@ -179,8 +179,8 @@ struct Call_merge_functor typedef typename Attribute::On_merge On_merge; static void - run(CMap& amap, typename CMap::template Attribute_handle::type a1, - typename CMap::template Attribute_handle::type a2) + run(CMap& amap, typename CMap::template Attribute_descriptor::type a1, + typename CMap::template Attribute_descriptor::type a2) { // Static version CGAL::internal::Apply_cell_functor:: @@ -198,8 +198,8 @@ struct Call_merge_functor template struct Call_merge_functor { - static void run(CMap&, typename CMap::Dart_handle, - typename CMap::Dart_handle) + static void run(CMap&, typename CMap::Dart_descriptor, + typename CMap::Dart_descriptor) {} }; // **************************************************************************** @@ -217,10 +217,10 @@ struct Test_is_valid_attribute_functor template static void run(const CMap& amap, - typename CMap::Dart_const_handle adart, + typename CMap::Dart_const_descriptor adart, std::vector& marks, bool& ares) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Test_is_valid_attribute_functor but " " i-attributes are disabled"); @@ -231,7 +231,7 @@ struct Test_is_valid_attribute_functor bool valid = true; bool found_dart = false; - typename CMap::template Attribute_const_handle::type + typename CMap::template Attribute_const_descriptor::type a=amap.template attribute(adart); unsigned int nb = 0; @@ -246,20 +246,22 @@ struct Test_is_valid_attribute_functor amap.template display_attribute(a); std::cout<<" != first:"; amap.template display_attribute(amap.template attribute(it)); - std::cout<<" for dart "; + std::cout<<" for darts "; + amap.display_dart(adart); + std::cout<<" and "; amap.display_dart(it); std::cout<(a) ) + if ( a!=amap.null_descriptor && it==amap.template dart_of_attribute(a) ) found_dart=true; amap.mark(it, amark); ++nb; } - if ( a!=amap.null_handle ) + if ( a!=amap.null_descriptor ) { if ( amap.template get_attribute_ref_counting(a)!=nb ) { @@ -274,14 +276,14 @@ struct Test_is_valid_attribute_functor if ( !amap.template is_valid_attribute(a) ) { std::cout<<"ERROR: the dart associated with an "<(a)!=amap.null_handle && + if ( amap.template dart_of_attribute(a)!=amap.null_descriptor && !found_dart ) { - std::cout<<"ERROR: the non nullptr dart of an "< static void run(CMap& amap, - typename CMap::Dart_handle adart, + typename CMap::Dart_descriptor adart, std::vector& marks) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Correct_invalid_attributes_functor but " " i-attributes are disabled"); size_type amark = marks[i]; - typename CMap::template Attribute_handle::type + typename CMap::template Attribute_descriptor::type a=amap.template attribute(adart); // dart already test, or without i-attribute if ( amap.is_marked(adart, amark) ) return; - if ( a==amap.null_handle) { amap.mark(adart, amark); return; } + if ( a==amap.null_descriptor) { amap.mark(adart, amark); return; } // We search if all the darts of the i-cell has the same i-attrib, and we count // the number of darts of the i-cell. unsigned int nb=0; bool found_dart = false; - for ( typename CMap::template Dart_of_cell_basic_range::iterator - it(amap, adart, amark); it.cont(); ++it, ++nb ) + for ( typename CMap::template Dart_of_cell_range::iterator + it(amap, adart); it.cont(); ++it, ++nb ) { if ( a!=amap.template attribute(it) ) { @@ -346,7 +348,7 @@ struct Correct_invalid_attributes_functor // the i-attribute is shared by different cells => we duplicate it. if ( nb!=amap.template get_attribute_ref_counting(a) ) { - typename CMap::template Attribute_handle::type + typename CMap::template Attribute_descriptor::type a2=amap.template copy_attribute(a); amap.template set_attribute(adart, a2); } @@ -360,14 +362,14 @@ struct Cleanup_useless_attributes template static void run(CMap& amap) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Cleanup_useless_attributes but " " i-attributes are disabled"); - for ( typename CMap::template Attribute_range::type::iterator - it=amap.template attributes().begin(), - itend=amap.template attributes().end(); it!=itend; ++it ) + for (typename CMap::template Attribute_range::type::iterator + it=amap.template attributes().begin(); + it!=amap.template attributes().end(); ++it) { if ( amap.template get_attribute(it).get_nb_refs()==0 ) { @@ -385,7 +387,7 @@ struct Count_cell_functor template static void run( const CMap& amap, - typename CMap::Dart_const_handle adart, + typename CMap::Dart_const_descriptor adart, std::vector& amarks, std::vector& ares ) { @@ -429,9 +431,9 @@ template::type> struct Decrease_attribute_functor_run { - static void run(CMap& amap, typename CMap::Dart_handle adart) + static void run(CMap& amap, typename CMap::Dart_descriptor adart) { - if ( amap.template attribute(adart)!=CMap::null_handle ) + if ( amap.template attribute(adart)!=CMap::null_descriptor ) { amap.template dec_attribute_ref_counting(amap.template attribute(adart)); if ( amap.are_attributes_automatically_managed() && @@ -445,7 +447,7 @@ struct Decrease_attribute_functor_run template struct Decrease_attribute_functor_run { - static void run(CMap&, typename CMap::Dart_handle) + static void run(CMap&, typename CMap::Dart_descriptor) {} }; // **************************************************************************** @@ -455,7 +457,7 @@ template struct Decrease_attribute_functor { template - static void run(CMap& amap, typename CMap::Dart_handle adart) + static void run(CMap& amap, typename CMap::Dart_descriptor adart) { CGAL::internal::Decrease_attribute_functor_run::run(amap, adart); } }; // **************************************************************************** @@ -463,9 +465,9 @@ template::type> struct Restricted_decrease_attribute_functor_run { - static void run(CMap& amap, typename CMap::Dart_handle adart) + static void run(CMap& amap, typename CMap::Dart_descriptor adart) { - if ( amap.template attribute(adart)!=CMap::null_handle ) + if ( amap.template attribute(adart)!=CMap::null_descriptor ) { amap.template dec_attribute_ref_counting(amap.template attribute(adart)); } @@ -475,7 +477,7 @@ struct Restricted_decrease_attribute_functor_run template struct Restricted_decrease_attribute_functor_run { - static void run(CMap&, typename CMap::Dart_handle) + static void run(CMap&, typename CMap::Dart_descriptor) {} }; // **************************************************************************** @@ -485,18 +487,18 @@ template struct Restricted_decrease_attribute_functor { template - static void run(CMap& amap, typename CMap::Dart_handle adart) + static void run(CMap& amap, typename CMap::Dart_descriptor adart) { CGAL::internal::Restricted_decrease_attribute_functor_run:: run(amap, adart); } }; // **************************************************************************** -/// Functor used to initialize all attributes to nullptr. +/// Functor used to initialize all attributes to null_descriptor. template struct Init_attribute_functor { template - static void run(CMap& amap, typename CMap::Dart_handle adart) - { amap.template set_dart_attribute(adart, CMap::null_handle); } + static void run(CMap& amap, typename CMap::Dart_descriptor adart) + { amap.template set_dart_attribute(adart, CMap::null_descriptor); } }; // **************************************************************************** /// Functor used to set the i-attribute of a given dart. @@ -504,8 +506,8 @@ template::type> struct Set_i_attribute_of_dart_functor { - static void run( CMap& amap, typename CMap::Dart_handle dh, - typename CMap::template Attribute_handle::type ah ) + static void run( CMap& amap, typename CMap::Dart_descriptor dh, + typename CMap::template Attribute_descriptor::type ah ) { amap.template set_dart_attribute(dh, ah); } @@ -514,8 +516,8 @@ struct Set_i_attribute_of_dart_functor template struct Set_i_attribute_of_dart_functor { - static void run( CMap&, typename CMap::Dart_handle, - typename CMap::template Attribute_handle::type) + static void run( CMap&, typename CMap::Dart_descriptor, + typename CMap::template Attribute_descriptor::type) {} }; // **************************************************************************** @@ -526,8 +528,8 @@ template::type, - typename Map2::template Attribute_const_handle::type) + typename Map1::template Attribute_const_descriptor::type, + typename Map2::template Attribute_const_descriptor::type) { return false; } }; @@ -535,8 +537,8 @@ template struct Is_same_info { static bool run(const Map1&, const Map2&, - typename Map1::template Attribute_const_handle::type, - typename Map2::template Attribute_const_handle::type) + typename Map1::template Attribute_const_descriptor::type, + typename Map2::template Attribute_const_descriptor::type) { return false; } }; @@ -544,8 +546,8 @@ template struct Is_same_info { static bool run(const Map1&, const Map2&, - typename Map1::template Attribute_const_handle::type, - typename Map2::template Attribute_const_handle::type) + typename Map1::template Attribute_const_descriptor::type, + typename Map2::template Attribute_const_descriptor::type) { return false; } }; @@ -553,8 +555,8 @@ template struct Is_same_info { static bool run(const Map1&, const Map2&, - typename Map1::template Attribute_const_handle::type, - typename Map2::template Attribute_const_handle::type) + typename Map1::template Attribute_const_descriptor::type, + typename Map2::template Attribute_const_descriptor::type) { return true; } }; @@ -562,8 +564,8 @@ template struct Is_same_info { static bool run(const Map1& m1, const Map2& m2, - typename Map1::template Attribute_const_handle::type a1, - typename Map2::template Attribute_const_handle::type a2) + typename Map1::template Attribute_const_descriptor::type a1, + typename Map2::template Attribute_const_descriptor::type a2) { return m1.template info_of_attribute(a1)== m2.template info_of_attribute(a2); } }; @@ -575,15 +577,15 @@ template(dh1)==Map1::null_handle && - m2.template attribute(dh2)==Map2::null_handle) + if (m1.template attribute(dh1)==Map1::null_descriptor && + m2.template attribute(dh2)==Map2::null_descriptor) return true; - if (m1.template attribute(dh1)==Map1::null_handle || - m2.template attribute(dh2)==Map2::null_handle) + if (m1.template attribute(dh1)==Map1::null_descriptor || + m2.template attribute(dh2)==Map2::null_descriptor) return false; return @@ -598,9 +600,9 @@ template struct Is_same_attribute_info_functor { static bool run(const Map1&, const Map2& m2, - typename Map1::Dart_const_handle, - typename Map2::Dart_const_handle dh2) - { return m2.template attribute(dh2)==Map2::null_handle; } + typename Map1::Dart_const_descriptor, + typename Map2::Dart_const_descriptor dh2) + { return m2.template attribute(dh2)==Map2::null_descriptor; } }; // Case T2==void @@ -608,9 +610,9 @@ template struct Is_same_attribute_info_functor { static bool run(const Map1& m1, const Map2&, - typename Map1::Dart_const_handle dh1, - typename Map2::Dart_const_handle) - { return m1.template attribute(dh1)==Map1::null_handle; } + typename Map1::Dart_const_descriptor dh1, + typename Map2::Dart_const_descriptor) + { return m1.template attribute(dh1)==Map1::null_descriptor; } }; // Case T1==T2==void @@ -618,8 +620,8 @@ template struct Is_same_attribute_info_functor { static bool run(const Map1&, const Map2&, - typename Map1::Dart_const_handle, - typename Map2::Dart_const_handle) + typename Map1::Dart_const_descriptor, + typename Map2::Dart_const_descriptor) { return true; } }; // **************************************************************************** @@ -631,8 +633,8 @@ template struct Test_is_same_dart_info_functor { static bool run(const Map1&, const Map2&, - typename Map1::Dart_const_handle, - typename Map2::Dart_const_handle) + typename Map1::Dart_const_descriptor, + typename Map2::Dart_const_descriptor) { return true; } }; @@ -651,8 +653,8 @@ template struct Test_is_same_dart_info_functor { static bool run(const Map1& map1, const Map2& map2, - typename Map1::Dart_const_handle dh1, - typename Map2::Dart_const_handle dh2) + typename Map1::Dart_const_descriptor dh1, + typename Map2::Dart_const_descriptor dh2) { return (map1.info(dh1)==map2.info(dh2)); } }; @@ -702,16 +704,16 @@ template(dh1)==Map1::null_handle && - m2.template attribute(dh2)==Map2::null_handle) + static_assert( Withpoint1==true && Withpoint2==true ); + if (m1.template attribute(dh1)==Map1::null_descriptor && + m2.template attribute(dh2)==Map2::null_descriptor) return true; - if (m1.template attribute(dh1)==Map1::null_handle || - m2.template attribute(dh2)==Map2::null_handle) + if (m1.template attribute(dh1)==Map1::null_descriptor || + m2.template attribute(dh2)==Map2::null_descriptor) return false; return @@ -727,8 +729,8 @@ template struct Test_is_same_attribute_point_functor { static bool run(const Map1&, const Map2&, - typename Map1::Dart_const_handle, - typename Map2::Dart_const_handle) + typename Map1::Dart_const_descriptor, + typename Map2::Dart_const_descriptor) { return false; } }; @@ -737,8 +739,8 @@ template struct Test_is_same_attribute_point_functor { static bool run(const Map1&, const Map2&, - typename Map1::Dart_const_handle, - typename Map2::Dart_const_handle) + typename Map1::Dart_const_descriptor, + typename Map2::Dart_const_descriptor) { return false; } }; @@ -747,8 +749,8 @@ template struct Test_is_same_attribute_point_functor { static bool run(const Map1&, const Map2&, - typename Map1::Dart_const_handle, - typename Map2::Dart_const_handle) + typename Map1::Dart_const_descriptor, + typename Map2::Dart_const_descriptor) { return true; } }; // **************************************************************************** @@ -758,8 +760,8 @@ struct Test_is_same_attribute_functor { template static void run(const Map1& m1, const Map2& m2, - typename Map1::Dart_const_handle dh1, - typename Map2::Dart_const_handle dh2, + typename Map1::Dart_const_descriptor dh1, + typename Map2::Dart_const_descriptor dh2, bool & res) { if (res) @@ -782,9 +784,12 @@ struct Reverse_orientation_of_map_functor CGAL_precondition(amap.is_whole_map_unmarked(mymark)); CGAL_precondition(amap.is_valid()); - typename CMap::Dart_handle first=nullptr, current=nullptr, prev=nullptr, next=nullptr; - typename CMap::Helper::template Attribute_handle<0>::type - first_attribute=nullptr, next_attribute=nullptr; + typename CMap::Dart_descriptor first=amap.null_descriptor, + current=amap.null_descriptor, + prev=amap.null_descriptor, + next=amap.null_descriptor; + typename CMap::Helper::template Attribute_descriptor<0>::type + first_attribute=amap.null_descriptor, next_attribute=amap.null_descriptor; for (typename CMap::Dart_range::iterator current_dart=amap.darts().begin(), last_dart = amap.darts().end(); current_dart!=last_dart; @@ -844,14 +849,14 @@ struct Reverse_orientation_of_map_functor if (amap.is_marked(current_dart, mymark)) continue; if (amap.is_marked(current_dart, mymark)) continue; - typename CMap::Dart_handle first_dart_in_cell= current_dart; - typename CMap::Dart_handle current_dart_in_cell=current_dart; + typename CMap::Dart_descriptor first_dart_in_cell= current_dart; + typename CMap::Dart_descriptor current_dart_in_cell=current_dart; do { amap.mark(current_dart_in_cell, mymark); - typename CMap::Dart_handle previous_dart_in_cell= + typename CMap::Dart_descriptor previous_dart_in_cell= amap.template beta<0>(current_dart_in_cell); - typename CMap::Dart_handle next_dart_in_cell= + typename CMap::Dart_descriptor next_dart_in_cell= amap.template beta<1>(current_dart_in_cell); amap.template dart_link_beta<1>(current_dart_in_cell, previous_dart_in_cell); amap.template dart_link_beta<0>(current_dart_in_cell, next_dart_in_cell); @@ -870,15 +875,16 @@ template ::type> struct Reverse_orientation_of_connected_component_functor { - static void run(CMap& amap, typename CMap::Dart_handle adart, + static void run(CMap& amap, typename CMap::Dart_descriptor adart, typename CMap::size_type amark=CMap::INVALID_MARK) { typename CMap::size_type mymark = (amark==CMap::INVALID_MARK?amap.get_new_mark():amark); - typename CMap::Dart_handle first=nullptr, current=nullptr, prev=nullptr, next=nullptr; - typename CMap::Helper::template Attribute_handle<0>::type - first_attribute=nullptr, next_attribute=nullptr; + typename CMap::Dart_descriptor first=amap.null_descriptor, current=amap.null_descriptor, + prev=amap.null_descriptor, next=amap.null_descriptor; + typename CMap::Helper::template Attribute_descriptor<0>::type + first_attribute=amap.null_descriptor, next_attribute=amap.null_descriptor; for (typename CMap::template Dart_of_cell_range::iterator current_dart=amap.template darts_of_cell @@ -932,7 +938,7 @@ struct Reverse_orientation_of_connected_component_functor template struct Reverse_orientation_of_connected_component_functor { - static void run(CMap& amap, typename CMap::Dart_handle adart, + static void run(CMap& amap, typename CMap::Dart_descriptor adart, typename CMap::size_type amark=CMap::INVALID_MARK) { typename CMap::size_type mymark = @@ -947,15 +953,15 @@ struct Reverse_orientation_of_connected_component_functor { if (amap.is_marked(current_dart, mymark)) continue; - typename CMap::Dart_handle first_dart_in_cell=current_dart; - typename CMap::Dart_handle current_dart_in_cell=current_dart; + typename CMap::Dart_descriptor first_dart_in_cell=current_dart; + typename CMap::Dart_descriptor current_dart_in_cell=current_dart; do { amap.mark(current_dart_in_cell, mymark); - typename CMap::Dart_handle previous_dart_in_cell= + typename CMap::Dart_descriptor previous_dart_in_cell= amap.template beta<0>(current_dart_in_cell); - typename CMap::Dart_handle next_dart_in_cell= + typename CMap::Dart_descriptor next_dart_in_cell= amap.template beta<1>(current_dart_in_cell); amap.template dart_link_beta<1>(current_dart_in_cell, previous_dart_in_cell); @@ -975,55 +981,55 @@ struct Reverse_orientation_of_connected_component_functor }; // **************************************************************************** // Beta functor, used to combine several beta. -template +template struct Beta_functor; -template -struct Beta_functor +template +struct Beta_functor { - static Dart_handle run(CMap& AMap, Dart_handle ADart, int B) + static Dart_descriptor run(CMap& AMap, Dart_descriptor ADart, int B) { return AMap.get_beta(ADart, B); } }; -template -struct Beta_functor +template +struct Beta_functor { - static Dart_handle run(CMap& AMap, Dart_handle ADart, unsigned int B) + static Dart_descriptor run(CMap& AMap, Dart_descriptor ADart, unsigned int B) { return AMap.get_beta(ADart, B); } }; -template -struct Beta_functor +template +struct Beta_functor { - static Dart_handle run(CMap& AMap, Dart_handle ADart, int B, Betas... betas) - { return Beta_functor:: + static Dart_descriptor run(CMap& AMap, Dart_descriptor ADart, int B, Betas... betas) + { return Beta_functor:: run(AMap, AMap.get_beta(ADart, B), betas...); } }; -template -struct Beta_functor +template +struct Beta_functor { - static Dart_handle run(CMap& AMap, Dart_handle ADart, unsigned int B, + static Dart_descriptor run(CMap& AMap, Dart_descriptor ADart, unsigned int B, Betas... betas) - { return Beta_functor:: + { return Beta_functor:: run(AMap, AMap.get_beta(ADart, B), betas...); } }; // **************************************************************************** -template +template struct Beta_functor_static; -template -struct Beta_functor_static +template +struct Beta_functor_static { - static Dart_handle run(CMap& AMap, Dart_handle ADart) + static Dart_descriptor run(CMap& AMap, Dart_descriptor ADart) { return AMap.template get_beta(ADart); } }; -template -struct Beta_functor_static +template +struct Beta_functor_static { - static Dart_handle run(CMap& AMap, Dart_handle ADart) - { return Beta_functor_static:: + static Dart_descriptor run(CMap& AMap, Dart_descriptor ADart) + { return Beta_functor_static:: run(AMap, AMap.template get_beta(ADart)); } }; // **************************************************************************** @@ -1039,7 +1045,8 @@ struct Init_id template struct Init_id { - static void run(Container&, typename Container::iterator) + template + static void run(Container&, Index) {} }; // **************************************************************************** diff --git a/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_sewable.h b/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_sewable.h index a56adcc3..aa4f5173 100644 --- a/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_sewable.h +++ b/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_sewable.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_sewable.h $ -// $Id: Combinatorial_map_sewable.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_sewable.h $ +// $Id: include/CGAL/Combinatorial_map/internal/Combinatorial_map_sewable.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -28,8 +28,8 @@ template struct Is_sewable_functor { static bool run( const CMap* amap, - typename CMap::Dart_const_handle adart1, - typename CMap::Dart_const_handle adart2 ) + typename CMap::Dart_const_descriptor adart1, + typename CMap::Dart_const_descriptor adart2 ) { CGAL_assertion( 1<=i && i<=CMap::dimension ); CGAL_assertion( 3 bijection; typename CMap::size_type m1 = amap->get_new_mark(); @@ -137,8 +137,8 @@ template struct Is_sewable_functor { static bool run( const CMap* amap, - typename CMap::Dart_const_handle adart1, - typename CMap::Dart_const_handle adart2 ) + typename CMap::Dart_const_descriptor adart1, + typename CMap::Dart_const_descriptor adart2 ) { return Is_sewable_functor::run(amap, adart2, adart1); } }; @@ -147,8 +147,8 @@ template struct Is_sewable_functor { static bool run( const CMap* amap, - typename CMap::Dart_const_handle adart1, - typename CMap::Dart_const_handle adart2 ) + typename CMap::Dart_const_descriptor adart1, + typename CMap::Dart_const_descriptor adart2 ) { if ( !amap->template is_free<0>(adart1) || !amap->template is_free<1>(adart2) ) @@ -161,8 +161,8 @@ template struct Is_sewable_functor { static bool run( const CMap* amap, - typename CMap::Dart_const_handle adart1, - typename CMap::Dart_const_handle adart2 ) + typename CMap::Dart_const_descriptor adart1, + typename CMap::Dart_const_descriptor adart2 ) { if ( !amap->template is_free<1>(adart1) || !amap->template is_free<0>(adart2) ) @@ -176,8 +176,8 @@ template struct Is_sewable_functor { static bool run( const CMap* amap, - typename CMap::Dart_const_handle adart1, - typename CMap::Dart_const_handle adart2 ) + typename CMap::Dart_const_descriptor adart1, + typename CMap::Dart_const_descriptor adart2 ) { if ( !amap->template is_free<0>(adart1) || !amap->template is_free<1>(adart2) ) @@ -190,8 +190,8 @@ template struct Is_sewable_functor { static bool run( const CMap* amap, - typename CMap::Dart_const_handle adart1, - typename CMap::Dart_const_handle adart2 ) + typename CMap::Dart_const_descriptor adart1, + typename CMap::Dart_const_descriptor adart2 ) { if ( !amap->template is_free<1>(adart1) || !amap->template is_free<0>(adart2) ) @@ -204,8 +204,8 @@ template struct Is_sewable_functor { static bool run( const CMap* amap, - typename CMap::Dart_const_handle adart1, - typename CMap::Dart_const_handle adart2 ) + typename CMap::Dart_const_descriptor adart1, + typename CMap::Dart_const_descriptor adart2 ) { if ( !amap->template is_free<2>(adart1) || !amap->template is_free<2>(adart2) || adart1==adart2 ) @@ -219,8 +219,8 @@ template struct Is_sewable_functor { static bool run( const CMap* amap, - typename CMap::Dart_const_handle adart1, - typename CMap::Dart_const_handle adart2 ) + typename CMap::Dart_const_descriptor adart1, + typename CMap::Dart_const_descriptor adart2 ) { if ( !amap->template is_free<0>(adart1) || !amap->template is_free<1>(adart2) ) @@ -245,8 +245,8 @@ template struct Is_sewable_functor { static bool run( const CMap* amap, - typename CMap::Dart_const_handle adart1, - typename CMap::Dart_const_handle adart2 ) + typename CMap::Dart_const_descriptor adart1, + typename CMap::Dart_const_descriptor adart2 ) { if ( !amap->template is_free<1>(adart1) || !amap->template is_free<0>(adart2) ) @@ -271,8 +271,8 @@ template struct Is_sewable_functor { static bool run( const CMap* amap, - typename CMap::Dart_const_handle adart1, - typename CMap::Dart_const_handle adart2 ) + typename CMap::Dart_const_descriptor adart1, + typename CMap::Dart_const_descriptor adart2 ) { if ( !amap->template is_free<2>(adart1) || !amap->template is_free<2>(adart2) || adart1==adart2 ) @@ -285,8 +285,8 @@ template struct Is_sewable_functor { static bool run( const CMap* amap, - typename CMap::Dart_const_handle adart1, - typename CMap::Dart_const_handle adart2 ) + typename CMap::Dart_const_descriptor adart1, + typename CMap::Dart_const_descriptor adart2 ) { if ( !amap->template is_free<3>(adart1) || !amap->template is_free<3>(adart2) ) diff --git a/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h b/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h index 8bac679d..fbac992f 100644 --- a/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h +++ b/thirdparty/CGAL/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h $ -// $Id: Combinatorial_map_utility.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h $ +// $Id: include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -16,8 +16,9 @@ #include #include #include +#include +#include -#include #include #include @@ -73,6 +74,25 @@ namespace CGAL struct Get_attributes_tuple { typedef typename T::Attributes type; }; + // Get the Index_type + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_index_type,Index_type,false) + template::value > + struct Get_index_type + { typedef std::uint32_t type; }; // By default use uint32_t for index type + template + struct Get_index_type + { typedef typename T::Index_type type; }; + + // Get the Concurrent_tag + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_concurrent_tag,Use_concurrent_container,false) + template::value > + struct Get_concurrent_tag + { typedef CGAL::Tag_false type; }; + template + struct Get_concurrent_tag + { typedef CGAL::Tag_true type; }; + // Convert a tuple in a same tuple where each void type was replaced into // CGAL::Void. template @@ -152,8 +172,8 @@ namespace CGAL ,dim>::pos - 1; static const int value = - ( pos==k ) ? ( boost::is_same::value ? 0:-dim-1 ) - : ( ( pos::value ? 1:0 ) + ( pos==k ) ? ( std::is_same::value ? 0:-dim-1 ) + : ( ( pos::value ? 1:0 ) + Nb_type_in_tuple_up_to_k ,dim >::value) @@ -166,7 +186,7 @@ namespace CGAL { static const int pos=dim; static const int value=(pos==k? - (boost::is_same::value?0:-dim-1) : + (std::is_same::value?0:-dim-1) : 0); }; @@ -185,8 +205,8 @@ namespace CGAL ,dim >::pos - 1; static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) + ( pos==k ) ? ( std::is_same::value ? -dim-1 : 0 ) + : ( ( pos::value ? 0:1 ) + Nb_type_different_in_tuple_up_to_k ,dim >::value) :0 @@ -199,7 +219,7 @@ namespace CGAL { static const int pos=dim; static const int value=(pos==k? - (boost::is_same::value?-dim-1:0) : + (std::is_same::value?-dim-1:0) : 0); }; @@ -322,23 +342,24 @@ namespace CGAL //is called for case k only if the k'th type in the tuple //is different from Void. Note that to the converse of Foreach_static //Functor are called from n =0 to k - template + template struct Foreach_static_restricted; - template + template struct Foreach_static_restricted,n> + std::tuple,n, startn> { template static void run(T& ... t){ - Conditionnal_run::run(t...); + if(n>=startn) + { Conditionnal_run::run(t...); } Foreach_static_restricted - ,n+1>::run(t...); + , n+1, startn>::run(t...); } }; - template - struct Foreach_static_restricted,n>{ + template + struct Foreach_static_restricted,n, startn>{ template static void run(T& ... ){} }; @@ -413,18 +434,29 @@ namespace CGAL typedef typename CMap::template Container_for_attributes type; }; + template + struct Iterator_type + { + using type=typename Container::iterator; + using const_type=typename Container::const_iterator; + }; + + template + struct Iterator_type + { + using type=typename Container::Index; + using const_type=typename Container::Index; + }; + // defines as type Compact_container::iterator template struct Add_compact_container_iterator{ typedef std::allocator_traits Allocator_traits; typedef typename Allocator_traits::template rebind_alloc Attr_allocator; - typedef typename CMap::template Container_for_attributes::iterator - iterator_type; - // TODO case when there is no Use_index typedef in CMap - typedef typename boost::mpl::if_ - < typename boost::is_same::type, - typename CMap::Dart_handle, iterator_type >::type type; + // TODO? case when there is no Use_index typedef in CMap + using type=typename Iterator_type, typename CMap::Use_index>::type; }; // defines as type Compact_container::const_iterator @@ -432,12 +464,9 @@ namespace CGAL struct Add_compact_container_const_iterator{ typedef std::allocator_traits Allocator_traits; typedef typename Allocator_traits::template rebind_alloc Attr_allocator; - typedef typename CMap::template Container_for_attributes:: - const_iterator iterator_type; - typedef typename boost::mpl::if_ - < typename boost::is_same::type, - typename CMap::Dart_handle, iterator_type >::type type; + using type=typename Iterator_type, typename CMap::Use_index>::const_type; }; // All the attributes (with CGAL::Void) @@ -483,8 +512,8 @@ namespace CGAL Attribute_const_iterators; typedef Attribute_containers Attribute_ranges; - typedef Attribute_iterators Attribute_handles; - typedef Attribute_const_iterators Attribute_const_handles; + typedef Attribute_iterators Attribute_descriptors; + typedef Attribute_const_iterators Attribute_const_descriptors; typedef typename Tuple_converter< Define_cell_attribute_binary_functor, Enabled_attributes >::type @@ -504,31 +533,36 @@ namespace CGAL struct Attribute_type { typedef Void type; }; - // Helper class allowing to retreive the d-cell-handle attribute - template::type> - struct Attribute_handle + // Helper class allowing to retrieve the d-cell-descriptor attribute + template::type, + typename WithIndex=typename CMap::Use_index> + struct Attribute_descriptor { typedef typename std::tuple_element - ::value,Attribute_handles>::type type; + ::value,Attribute_descriptors>::type type; }; template - struct Attribute_handle + struct Attribute_descriptor { typedef CGAL::Void* type; }; - // Helper class allowing to retreive the d-cell-const handle attribute + template + struct Attribute_descriptor + { typedef typename CMap::Dart_index type; }; + + // Helper class allowing to retrieve the d-cell-const descriptor attribute template::type> - struct Attribute_const_handle + struct Attribute_const_descriptor { typedef typename std::tuple_element - ::value, Attribute_const_handles>::type type; + ::value, Attribute_const_descriptors>::type type; }; template - struct Attribute_const_handle + struct Attribute_const_descriptor { typedef CGAL::Void* type; }; - // Helper class allowing to retreive the d-cell-iterator attribute + // Helper class allowing to retrieve the d-cell-iterator attribute template::type> struct Attribute_iterator { @@ -540,7 +574,7 @@ namespace CGAL struct Attribute_iterator { typedef CGAL::Void* type; }; - // Helper class allowing to retreive the d-cell-const handle attribute + // Helper class allowing to retrieve the d-cell-const descriptor attribute template::type> struct Attribute_const_iterator { @@ -552,7 +586,7 @@ namespace CGAL struct Attribute_const_iterator { typedef CGAL::Void* type; }; - // Helper class allowing to retreive the d-cell-attribute range + // Helper class allowing to retrieve the d-cell-attribute range template::type> struct Attribute_range { @@ -564,7 +598,7 @@ namespace CGAL struct Attribute_range { typedef CGAL::Void type; }; - // Helper class allowing to retreive the d-cell-attribute const range + // Helper class allowing to retrieve the d-cell-attribute const range template::type> struct Attribute_const_range { @@ -576,13 +610,13 @@ namespace CGAL struct Attribute_const_range { typedef CGAL::Void type; }; - // To iterate onto each enabled attributes - template + // To iterate onto each enabled attributes, starting from startn-attributes (0 by default) + template struct Foreach_enabled_attributes { template static void run(Ts& ... t) - { Foreach_static_restricted::run(t...); } + { Foreach_static_restricted::run(t...); } }; // To iterate onto each enabled attributes, except j-attributes template diff --git a/thirdparty/CGAL/include/CGAL/Combinatorial_map_basic_operations.h b/thirdparty/CGAL/include/CGAL/Combinatorial_map_basic_operations.h index 7e30c0f0..cebb6c7c 100644 --- a/thirdparty/CGAL/include/CGAL/Combinatorial_map_basic_operations.h +++ b/thirdparty/CGAL/include/CGAL/Combinatorial_map_basic_operations.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Combinatorial_map_basic_operations.h $ -// $Id: Combinatorial_map_basic_operations.h 3fb644e 2020-04-10T17:40:30+02:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Combinatorial_map_basic_operations.h $ +// $Id: include/CGAL/Combinatorial_map_basic_operations.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -15,7 +15,7 @@ #include #include -#include +#include namespace CGAL { @@ -31,11 +31,11 @@ namespace CGAL */ template < class Map, class Iterator > bool belong_to_same_orbit(const Map & amap, - typename Map::Dart_const_handle adart1, - typename Map::Dart_const_handle adart2) + typename Map::Dart_const_descriptor adart1, + typename Map::Dart_const_descriptor adart2) { - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); bool found=false; for (Iterator it(amap, adart1); !found && it.cont(); ++it) @@ -54,11 +54,11 @@ namespace CGAL */ template < class Map, class Iterator > bool is_whole_orbit_marked(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); bool res=true; for ( Iterator it(amap, adart); res && it.cont(); ++it ) @@ -77,7 +77,7 @@ namespace CGAL */ template < class Map, class Iterator > bool is_whole_orbit_unmarked(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { amap.negate_mark(amark); @@ -95,11 +95,11 @@ namespace CGAL */ template < class Map, class Iterator > typename Map::size_type mark_orbit(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); CGAL_assertion( (is_whole_orbit_unmarked > (amap, adart, amark)) ); @@ -123,7 +123,7 @@ namespace CGAL */ template < class Map, class Iterator > typename Map::size_type unmark_orbit(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { amap.negate_mark(amark); @@ -141,8 +141,8 @@ namespace CGAL */ template < class Map, unsigned int i, unsigned int d> bool belong_to_same_cell(const Map & amap, - typename Map::Dart_const_handle adart1, - typename Map::Dart_const_handle adart2) + typename Map::Dart_const_descriptor adart1, + typename Map::Dart_const_descriptor adart2) { return CGAL::belong_to_same_orbit::const_iterator> @@ -151,8 +151,8 @@ namespace CGAL template < class Map, unsigned int i> bool belong_to_same_cell(const Map & amap, - typename Map::Dart_const_handle adart1, - typename Map::Dart_const_handle adart2) + typename Map::Dart_const_descriptor adart1, + typename Map::Dart_const_descriptor adart2) { return CGAL::template belong_to_same_cell(amap,adart1,adart2); } @@ -166,7 +166,7 @@ namespace CGAL */ template < class Map, unsigned int i, unsigned int d> bool is_whole_cell_marked(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { return CGAL::template is_whole_orbit_marked bool is_whole_cell_marked(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { return CGAL::template is_whole_cell_marked @@ -191,7 +191,7 @@ namespace CGAL */ template < class Map, unsigned int i, unsigned int d > bool is_whole_cell_unmarked(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { return CGAL::template is_whole_orbit_unmarked bool is_whole_cell_unmarked(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { return CGAL::template is_whole_cell_unmarked @@ -217,7 +217,7 @@ namespace CGAL */ template < class Map, unsigned int i, unsigned int d > typename Map::size_type mark_cell(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { return CGAL::template mark_orbit::const_iterator> @@ -225,7 +225,7 @@ namespace CGAL template < class Map, unsigned int i> typename Map::size_type mark_cell(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { return CGAL::template mark_cell(amap, adart, amark);} @@ -238,7 +238,7 @@ namespace CGAL */ template < class Map, unsigned int i, unsigned int d > typename Map::size_type unmark_cell(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { return CGAL::template unmark_orbit::const_iterator> @@ -246,7 +246,7 @@ namespace CGAL template < class Map, unsigned int i > typename Map::size_type unmark_cell(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { return CGAL::template unmark_cell(amap, adart, amark); } @@ -256,7 +256,7 @@ namespace CGAL struct Need_to_mark_for_oriented_cell { static bool run(const Map & /*amap*/, - typename Map::Dart_const_handle /*adart*/, + typename Map::Dart_const_descriptor /*adart*/, typename Map::size_type /*amark*/, OperationState /*op*/) { return true; } @@ -269,7 +269,7 @@ namespace CGAL struct Need_to_mark_for_oriented_cell { static bool run(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark, OperationState op) { @@ -301,12 +301,12 @@ namespace CGAL */ template < class Map, class Iterator > typename Map::size_type mark_oriented_orbit(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark, typename Map::size_type amark2=Map::INVALID_MARK) { - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); CGAL_assertion( (is_whole_orbit_unmarked > (amap, adart, amark)) ); @@ -334,7 +334,7 @@ namespace CGAL template < class Map, class Iterator > typename Map::size_type unmark_oriented_orbit(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark, typename Map::size_type amark2=Map::INVALID_MARK) { @@ -360,7 +360,7 @@ namespace CGAL */ template < class Map, unsigned int i, unsigned int d > typename Map::size_type mark_oriented_cell(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark, typename Map::size_type amark2=Map::INVALID_MARK) { return CGAL::template mark_oriented_orbit @@ -369,7 +369,7 @@ namespace CGAL template < class Map, unsigned int i> typename Map::size_type mark_oriented_cell(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark, typename Map::size_type amark2=Map::INVALID_MARK) { return CGAL::template mark_oriented_cell @@ -384,7 +384,7 @@ namespace CGAL */ template < class Map, unsigned int i, unsigned int d > typename Map::size_type unmark_oriented_cell(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark, typename Map::size_type amark2=Map::INVALID_MARK) { return CGAL::template unmark_oriented_orbit @@ -393,7 +393,7 @@ namespace CGAL template < class Map, unsigned int i > typename Map::size_type unmark_oriented_cell(const Map & amap, - typename Map::Dart_const_handle adart, + typename Map::Dart_const_descriptor adart, typename Map::size_type amark, typename Map::size_type amark2=Map::INVALID_MARK) { return CGAL::template unmark_oriented_cell @@ -407,9 +407,9 @@ namespace CGAL */ template < class Map, unsigned int i > typename Map::size_type degree(const Map & amap, - typename Map::Dart_const_handle adart) + typename Map::Dart_const_descriptor adart) { - CGAL_assertion(adart != nullptr); + CGAL_assertion(adart!=amap.null_descriptor); typename Map::size_type nbIncident = 0; typename Map::size_type mark; @@ -456,9 +456,9 @@ namespace CGAL */ template < class Map, unsigned int i > typename Map::size_type codegree(const Map & amap, - typename Map::Dart_const_handle adart) + typename Map::Dart_const_descriptor adart) { - CGAL_assertion(adart != nullptr); + CGAL_assertion(adart!=amap.null_descriptor); typename Map::size_type nbIncident = 0; typename Map::size_type mark; diff --git a/thirdparty/CGAL/include/CGAL/Combinatorial_map_functors.h b/thirdparty/CGAL/include/CGAL/Combinatorial_map_functors.h index e0205089..07a82e79 100644 --- a/thirdparty/CGAL/include/CGAL/Combinatorial_map_functors.h +++ b/thirdparty/CGAL/include/CGAL/Combinatorial_map_functors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Combinatorial_map_functors.h $ -// $Id: Combinatorial_map_functors.h d909084 2022-01-18T14:30:21+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Combinatorial_map_functors.h $ +// $Id: include/CGAL/Combinatorial_map_functors.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -70,10 +70,10 @@ struct Display_attribute_functor { template static void run(const CMap& amap, - typename CMap::Dart_const_handle adart) + typename CMap::Dart_const_descriptor adart) { - if ( amap.template attribute(adart)==nullptr ) - std::cout<<"nullptr"; + if (amap.template attribute(adart)==amap.null_descriptor) + std::cout<<"null_descriptor"; else amap.template display_attribute(amap.template attribute(adart)); } @@ -85,7 +85,7 @@ struct Test_is_valid_attribute_functor { template static bool run(const CMap& amap, - typename CMap::Dart_const_handle adart) + typename CMap::Dart_const_descriptor adart) { typedef typename CMap::size_type size_type; @@ -113,8 +113,8 @@ template::type> struct Set_i_attribute_functor { - static void run( CMap& amap, typename CMap::Dart_handle dh, - typename CMap::template Attribute_handle::type ah ) + static void run( CMap& amap, typename CMap::Dart_descriptor dh, + typename CMap::template Attribute_descriptor::type ah ) { amap.template set_attribute(dh, ah); } @@ -123,8 +123,8 @@ struct Set_i_attribute_functor template struct Set_i_attribute_functor { - static void run( CMap&, typename CMap::Dart_handle, - typename CMap::template Attribute_handle::type) + static void run( CMap&, typename CMap::Dart_descriptor, + typename CMap::template Attribute_descriptor::type) {} }; // **************************************************************************** diff --git a/thirdparty/CGAL/include/CGAL/Combinatorial_map_fwd.h b/thirdparty/CGAL/include/CGAL/Combinatorial_map_fwd.h index c6984587..798d5f25 100644 --- a/thirdparty/CGAL/include/CGAL/Combinatorial_map_fwd.h +++ b/thirdparty/CGAL/include/CGAL/Combinatorial_map_fwd.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Combinatorial_map_fwd.h $ -// $Id: Combinatorial_map_fwd.h 46f5325 2022-01-27T10:36:22+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Combinatorial_map_fwd.h $ +// $Id: include/CGAL/Combinatorial_map_fwd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -14,24 +14,62 @@ #include #include +#include namespace CGAL { struct Generic_map_min_items; -template +template class Combinatorial_map_storage_1; -template < unsigned int d_, class Refs_, - class Items_=Generic_map_min_items, - class Alloc_=CGAL_ALLOCATOR(int), - class Storage_= Combinatorial_map_storage_1 > +template +class Combinatorial_map_storage_with_index; + +namespace internal +{ +template +struct Default_storage_for_cmap_when_tag +{ + template + using type=Combinatorial_map_storage_1; +}; +template<> +struct Default_storage_for_cmap_when_tag +{ + template + using type=Combinatorial_map_storage_with_index; +}; + +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_use_index_tag_cmap,Use_index,false) +template::value> +struct Default_storage_for_cmap +{ + template + using type=Combinatorial_map_storage_1; +}; +template +struct Default_storage_for_cmap +{ + template + using type=typename CGAL::internal::template + Default_storage_for_cmap_when_tag:: + template type; +}; +} // namespace internal + +template::template type> class Combinatorial_map_base; -template < unsigned int d_, - class Items_=Generic_map_min_items, - class Alloc_=CGAL_ALLOCATOR(int), - class Storage_= Combinatorial_map_storage_1 > +template::template type> class Combinatorial_map; } // CGAL diff --git a/thirdparty/CGAL/include/CGAL/Combinatorial_map_iterators_base.h b/thirdparty/CGAL/include/CGAL/Combinatorial_map_iterators_base.h index 8ce71dfa..2030b68b 100644 --- a/thirdparty/CGAL/include/CGAL/Combinatorial_map_iterators_base.h +++ b/thirdparty/CGAL/include/CGAL/Combinatorial_map_iterators_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h $ -// $Id: Combinatorial_map_iterators_base.h 5ecd852 2021-04-26T21:37:02+01:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h $ +// $Id: include/CGAL/Combinatorial_map_iterators_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -15,9 +15,11 @@ #include #include +#include + #include -#include -#include + +#include namespace CGAL { @@ -25,7 +27,7 @@ namespace CGAL { * Basic classes that serve as tools for definition of iterators. There are 3 classes: * - CMap_dart_iterator is the basic generic class defining - * what is an interator on darts. + * what is an iterator on darts. * - CMap_extend_iterator to extend the given iterator by adding * the involution Bi. * - CMap_non_basic_iterator to transform the basic iterator Ite @@ -61,25 +63,28 @@ namespace CGAL { * Class CMap_dart_iterator is a generic iterator. All the combinatorial * map iterator classes inherit from this class (or one of its subclass). */ - template < typename Map_,bool Const=false > - class CMap_dart_iterator: public boost::mpl::if_c< Const, + template < typename Map_,bool Const=false, typename UseIndex=typename Map_::Use_index > + class CMap_dart_iterator; + + template < typename Map_,bool Const> + class CMap_dart_iterator: public std::conditional_t< Const, typename Map_::Dart_container::const_iterator, - typename Map_::Dart_container::iterator>::type + typename Map_::Dart_container::iterator> //public internal::CC_iterator { public: typedef CMap_dart_iterator Self; - typedef typename boost::mpl::if_c< Const, + typedef std::conditional_t< Const, typename Map_::Dart_container::const_iterator, - typename Map_::Dart_container::iterator>::type Base; + typename Map_::Dart_container::iterator> Base; + // typedef internal::CC_iterator Base; - typedef typename boost::mpl::if_c< Const, - typename Map_::Dart_const_handle, - typename Map_::Dart_handle>::type - Dart_handle; - typedef typename boost::mpl::if_c< Const, const Map_, - Map_>::type Map; + typedef std::conditional_t< Const, + typename Map_::Dart_const_descriptor, + typename Map_::Dart_descriptor> + Dart_descriptor; + typedef std::conditional_t< Const, const Map_, Map_> Map; typedef std::input_iterator_tag iterator_category; typedef typename Base::value_type value_type; @@ -94,7 +99,7 @@ namespace CGAL { public: /// Main constructor. - CMap_dart_iterator(Map& amap, Dart_handle adart): + CMap_dart_iterator(Map& amap, Dart_descriptor adart): Base(adart), mmap(&amap), mfirst_dart(adart), @@ -104,7 +109,7 @@ namespace CGAL { /// == operator. bool operator==(const Self& aiterator) const { - return ( ((*this==mmap->null_handle) && (aiterator==mmap->null_handle)) || + return ( ((*this==mmap->null_descriptor) && (aiterator==mmap->null_descriptor)) || (mfirst_dart == aiterator.mfirst_dart && static_cast(*this)== static_cast(aiterator)) ); @@ -115,7 +120,7 @@ namespace CGAL { { return !operator==(aiterator); } /// Accessor to the initial dart of the iterator. - Dart_handle get_first_dart() const { return mfirst_dart; } + Dart_descriptor get_first_dart() const { return mfirst_dart; } /// Accessor to the combinatorial map. Map* get_combinatorial_map() const { return mmap; } @@ -126,14 +131,14 @@ namespace CGAL { /// Test if the iterator is at its end. bool cont() const - { return static_cast(*this)!=mmap->null_handle; } + { return static_cast(*this)!=mmap->null_descriptor; } /// Get the previous operation used for the last ++. OperationState prev_operation() const { return mprev_op; } protected: /// Set the current dart to a given dart - void set_current_dart(Dart_handle adart) + void set_current_dart(Dart_descriptor adart) { Base::operator=(adart); } private: @@ -146,28 +151,134 @@ namespace CGAL { protected: /// test if adart->beta(ai) exists and is not marked for amark - bool is_unmarked(Dart_handle adart, unsigned int ai, size_type amark) const + bool is_unmarked(Dart_descriptor adart, unsigned int ai, size_type amark) const { return !mmap->is_marked(mmap->beta(adart,ai), amark); } /// test if adart->beta(ai)->beta(aj) exists - bool exist_betaij(Dart_handle adart, unsigned int ai, unsigned int aj) const + bool exist_betaij(Dart_descriptor adart, unsigned int ai, unsigned int aj) const { return !mmap->is_free(adart, ai) && !mmap->is_free(mmap->beta(adart, ai), aj); } /// test if adart->beta(ai)->beta(aj) exists and is not marked for amark - bool is_unmarked2(Dart_handle adart, unsigned int ai, unsigned int aj, + bool is_unmarked2(Dart_descriptor adart, unsigned int ai, unsigned int aj, typename Map::size_type amark) const { return !mmap->is_marked(mmap->beta(adart, ai, aj), amark); } + protected: + /// The map containing the darts to iterate on. + Map* mmap; + + /// The initial dart of the iterator. + Dart_descriptor mfirst_dart; + + /// The last operation used for the ++ operator. + OperationState mprev_op; + }; + + template < typename Map_,bool Const > + class CMap_dart_iterator: + /*public std::conditional_t< Const, + typename Map_::Dart_container::const_iterator, + typename Map_::Dart_container::iterator>*/ + public internal::CC_iterator_with_index + { + public: + typedef CMap_dart_iterator Self; + + /*typedef std::conditional_t< Const, + typename Map_::Dart_container::const_iterator, + typename Map_::Dart_container::iterator> Base;*/ + typedef internal::CC_iterator_with_index Base; + + typedef std::conditional_t< Const, + typename Map_::Dart_const_descriptor, + typename Map_::Dart_descriptor> + Dart_descriptor; + typedef std::conditional_t< Const, const Map_, Map_> Map; + + typedef std::input_iterator_tag iterator_category; + typedef typename Base::value_type value_type; + typedef typename Base::difference_type difference_type; + typedef typename Base::pointer pointer; + typedef typename Base::reference reference; + + /// true iff this iterator is basic + typedef Tag_true Basic_iterator; + + public: + /// Main constructor. + CMap_dart_iterator(Map& amap, Dart_descriptor adart): + Base(&amap.mdarts, adart), + mmap(&amap), + mfirst_dart(adart), + mprev_op(OP_NONE) + {} + + /// == operator. + bool operator==(const Self& aiterator) const + { + return ((*this==mmap->null_descriptor) && (aiterator==mmap->null_descriptor)) || + (mfirst_dart == aiterator.mfirst_dart && + static_cast(*this)== + static_cast(aiterator)); + } + + /// != operator. + bool operator!=(const Self& aiterator) const + { return !operator==(aiterator); } + + /// Accessor to the initial dart of the iterator. + Dart_descriptor get_first_dart() const { return mfirst_dart; } + + /// Accessor to the combinatorial map. + Map* get_combinatorial_map() const { return mmap; } + + /// Rewind of the iterator to its beginning. + void rewind() + { set_current_dart(mfirst_dart); mprev_op = OP_NONE; } + + /// Test if the iterator is at its end. + bool cont() const + { return this->get_current()!=mmap->null_descriptor; } + + /// Get the previous operation used for the last ++. + OperationState prev_operation() const { return mprev_op; } + + protected: + /// Set the current dart to a given dart + void set_current_dart(Dart_descriptor adart) + { this->set_current(adart); } + + private: + /// operator -- in private to invalidate the base operator. + Self& operator--() + { return *this; } + /// operator -- in private to invalidate the base operator. + Self operator--(int) + { return *this; } + + protected: + /// test if adart->beta(ai) exists and is not marked for amark + bool is_unmarked(Dart_descriptor adart, unsigned int ai, unsigned amark) const + { return !mmap->is_marked(mmap->beta(adart,ai), amark); } + + /// test if adart->beta(ai)->beta(aj) exists + bool exist_betaij(Dart_descriptor adart, unsigned int ai, unsigned int aj) const + { return !mmap->is_free(adart, ai) && !mmap->is_free(mmap->beta(adart, ai), aj); } + + /// test if adart->beta(ai)->beta(aj) exists and is not marked for amark + bool is_unmarked2(Dart_descriptor adart, unsigned int ai, unsigned int aj, + unsigned amark) const + { return !mmap->is_marked(mmap->beta(adart, ai, aj), amark); } protected: /// The map containing the darts to iterate on. Map* mmap; /// The initial dart of the iterator. - Dart_handle mfirst_dart; + Dart_descriptor mfirst_dart; /// The last operation used for the ++ operator. OperationState mprev_op; @@ -185,24 +296,24 @@ namespace CGAL { typedef CMap_extend_iterator Self; typedef Ite Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef Tag_true Use_mark; typedef typename Map::size_type size_type; - CGAL_static_assertion( (Bi<=Map::dimension && - boost::is_same::value) ); + static_assert(Bi<=Map::dimension && + std::is_same::value); public: /// Main constructor. - CMap_extend_iterator(Map& amap, Dart_handle adart, size_type amark): + CMap_extend_iterator(Map& amap, Dart_descriptor adart, size_type amark): Base(amap, adart), mmark_number(amark), minitial_dart(adart) { - if ( minitial_dart!=amap.null_handle ) + if ( minitial_dart!=amap.null_descriptor ) { this->mmap->mark_null_dart(mmark_number); this->mmap->mark(minitial_dart, mmark_number); @@ -219,7 +330,7 @@ namespace CGAL { { CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::operator= ( Base(*this->mmap,minitial_dart) ); - mto_treat = std::queue(); + mto_treat = std::queue(); this->mmap->mark(minitial_dart, mmark_number); this->mmap->mark_null_dart(mmark_number); if (!this->mmap->is_free(minitial_dart, Bi) && @@ -284,13 +395,13 @@ namespace CGAL { protected: /// Queue of darts to process. - std::queue mto_treat; + std::queue mto_treat; /// Index of the used mark. size_type mmark_number; /// Initial dart - Dart_handle minitial_dart; + Dart_descriptor minitial_dart; }; //**************************************************************************** /* Class CMap_extend_iterator which extend a given iterator by @@ -304,7 +415,7 @@ namespace CGAL { typedef CMap_extend_iterator Self; typedef Ite Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef Tag_true Use_mark; @@ -312,10 +423,10 @@ namespace CGAL { typedef typename Map::size_type size_type; /// Main constructor. - CMap_extend_iterator(Map& amap, Dart_handle adart, size_type amark): + CMap_extend_iterator(Map& amap, Dart_descriptor adart, size_type amark): Base(amap, adart, amark) { - if ( this->minitial_dart!=amap.null_handle && + if ( this->minitial_dart!=amap.null_descriptor && !this->mmap->is_free(this->minitial_dart, Bi) && this->mmap->beta(this->minitial_dart, Bi)!=this->minitial_dart ) { @@ -373,18 +484,18 @@ namespace CGAL { typedef Base_ Base; typedef typename Base::Map Map; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; /// True iff this iterator is basic typedef Tag_false Basic_iterator; typedef typename Map::size_type size_type; - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); /// Main constructor. - CMap_non_basic_iterator(Map& amap, Dart_handle adart1): + CMap_non_basic_iterator(Map& amap, Dart_descriptor adart1): Base(amap, adart1, amap.get_new_mark()) {} @@ -461,16 +572,16 @@ namespace CGAL { typedef Base_ Base; typedef typename Base::Map Map; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; /// True iff this iterator is basic typedef Tag_false Basic_iterator; - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); /// Main constructor. - CMap_non_basic_iterator(Map& amap, Dart_handle adart): + CMap_non_basic_iterator(Map& amap, Dart_descriptor adart): Base(amap, adart) {} }; @@ -481,13 +592,13 @@ namespace CGAL { { typedef It iterator; typedef Const_it const_iterator; - CMap_range(Map_ &amap, typename Map_::Dart_handle adart) : + CMap_range(Map_ &amap, typename Map_::Dart_descriptor adart) : mmap(amap), mdart(adart), msize(0) {} iterator begin() { return iterator(mmap,mdart); } - iterator end() { return iterator(mmap,mmap.null_handle); } + iterator end() { return iterator(mmap,mmap.null_descriptor); } const_iterator begin() const { return const_iterator(mmap,mdart); } - const_iterator end() const { return const_iterator(mmap,mmap.null_handle); } + const_iterator end() const { return const_iterator(mmap,mmap.null_descriptor); } typename Map_::size_type size() const { if (msize==0) @@ -499,7 +610,7 @@ namespace CGAL { { return mmap.is_empty(); } private: Map_ & mmap; - typename Map_::Dart_handle mdart; + typename Map_::Dart_descriptor mdart; mutable typename Map_::size_type msize; }; //**************************************************************************** @@ -512,13 +623,13 @@ namespace CGAL { typedef typename Map_::size_type size_type; - CMap_range(Map_ &amap, typename Map_::Dart_handle adart, size_type amark=Map_::INVALID_MARK): + CMap_range(Map_ &amap, typename Map_::Dart_descriptor adart, size_type amark=Map_::INVALID_MARK): mmap(amap), mdart(adart), msize(0), mmark(amark) {} iterator begin() { return iterator(mmap,mdart,mmark); } - iterator end() { return iterator(mmap,mmap.null_handle,mmark); } + iterator end() { return iterator(mmap,mmap.null_descriptor,mmark); } const_iterator begin() const { return const_iterator(mmap,mdart,mmark); } - const_iterator end() const { return const_iterator(mmap,mmap.null_handle,mmark); } + const_iterator end() const { return const_iterator(mmap,mmap.null_descriptor,mmark); } typename Map_::size_type size() const { if (msize==0) @@ -531,7 +642,7 @@ namespace CGAL { { return mmap.is_empty(); } private: Map_ & mmap; - typename Map_::Dart_handle mdart; + typename Map_::Dart_descriptor mdart; mutable typename Map_::size_type msize; size_type mmark; }; @@ -541,11 +652,11 @@ namespace CGAL { struct CMap_const_range { typedef Const_it const_iterator; - CMap_const_range(const Map_ &amap, typename Map_::Dart_const_handle adart): + CMap_const_range(const Map_ &amap, typename Map_::Dart_const_descriptor adart): mmap(amap), mdart(adart), msize(0) {} const_iterator begin() const { return const_iterator(mmap,mdart); } - const_iterator end() const { return const_iterator(mmap,mmap.null_handle); } + const_iterator end() const { return const_iterator(mmap,mmap.null_descriptor); } typename Map_::size_type size() const { if (msize==0) @@ -557,7 +668,7 @@ namespace CGAL { { return mmap.is_empty(); } private: const Map_ & mmap; - typename Map_::Dart_const_handle mdart; + typename Map_::Dart_const_descriptor mdart; mutable typename Map_::size_type msize; }; //**************************************************************************** @@ -566,12 +677,12 @@ namespace CGAL { { typedef Const_it const_iterator; typedef typename Map_::size_type size_type; - CMap_const_range(const Map_ &amap, typename Map_::Dart_const_handle adart, + CMap_const_range(const Map_ &amap, typename Map_::Dart_const_descriptor adart, size_type amark=Map_::INVALID_MARK): mmap(amap), mdart(adart), msize(0), mmark(amark) {} const_iterator begin() const { return const_iterator(mmap,mdart,mmark); } - const_iterator end() const { return const_iterator(mmap,mmap.null_handle,mmark); } + const_iterator end() const { return const_iterator(mmap,mmap.null_descriptor,mmark); } typename Map_::size_type size() const { if (msize==0) @@ -584,7 +695,7 @@ namespace CGAL { { return mmap.is_empty(); } private: const Map_ & mmap; - typename Map_::Dart_const_handle mdart; + typename Map_::Dart_const_descriptor mdart; mutable typename Map_::size_type msize; size_type mmark; }; diff --git a/thirdparty/CGAL/include/CGAL/Combinatorial_map_operations.h b/thirdparty/CGAL/include/CGAL/Combinatorial_map_operations.h index 65d213a1..b51a149e 100644 --- a/thirdparty/CGAL/include/CGAL/Combinatorial_map_operations.h +++ b/thirdparty/CGAL/include/CGAL/Combinatorial_map_operations.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h $ -// $Id: Combinatorial_map_operations.h 46f5325 2022-01-27T10:36:22+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h $ +// $Id: include/CGAL/Combinatorial_map_operations.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -34,7 +34,7 @@ namespace CGAL template struct Is_removable_functor { - static bool run(const CMap& amap, typename CMap::Dart_const_handle adart) + static bool run(const CMap& amap, typename CMap::Dart_const_descriptor adart) { // TODO? Optimisation for dim-2, and to not test all the darts of the cell? bool res = true; @@ -52,14 +52,14 @@ namespace CGAL template struct Is_removable_functor { - static bool run(const CMap&, typename CMap::Dart_const_handle) + static bool run(const CMap&, typename CMap::Dart_const_descriptor) { return true; } }; // Specialization for i=CMap::dimension-1 template struct Is_removable_functor { - static bool run(const CMap&, typename CMap::Dart_const_handle) + static bool run(const CMap&, typename CMap::Dart_const_descriptor) { return true; } }; @@ -74,21 +74,21 @@ namespace CGAL template struct Remove_cell_functor { - static size_t run(CMap& amap, typename CMap::Dart_handle adart, + static size_t run(CMap& amap, typename CMap::Dart_descriptor adart, bool update_attributes) { - CGAL_static_assertion ( 1<=i && i(adart)) ); size_t res = 0; - typename CMap::Dart_handle d1, d2; - typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle; + typename CMap::Dart_descriptor d1, d2; + typename CMap::Dart_descriptor dg1=amap.null_descriptor, dg2=amap.null_descriptor; typename CMap::size_type mark = amap.get_new_mark(); typename CMap::size_type mark_modified_darts = amap.get_new_mark(); - std::deque to_erase; + std::deque to_erase; const int iinv = CGAL_BETAINV(i); @@ -97,7 +97,7 @@ namespace CGAL it.cont(); ++it ) { to_erase.push_back(it); - if ( !amap.template is_free(it) && dg1==amap.null_handle ) + if ( !amap.template is_free(it) && dg1==amap.null_descriptor ) { dg1=it; dg2=amap.template beta(it); } amap.mark(it, mark); ++res; @@ -106,49 +106,54 @@ namespace CGAL if (amap.are_attributes_automatically_managed() && update_attributes) { // We group the two (i+1)-cells incident if they exist. - if ( dg1!=amap.null_handle ) + if ( dg1!=amap.null_descriptor ) + { CGAL::internal::Group_attribute_functor_run:: - run(amap, dg1, dg2); + run(amap, dg1, dg2, true); // true because dg1 will be removed + } } // During the operation, we store in modified_darts the darts modified // to test after the loop the non void attributes that are split. - std::deque modified_darts; + std::deque modified_darts; // If i==1, we modify beta1, thus in modified_darts we store all // the darts having beta0 modified, and in modified_darts2 all the // darts having beta1 modified. For i>1 all the modified darts are // stored in modified_darts. - std::deque modified_darts2; - std::deque &first_modified_darts= + std::deque modified_darts2; + std::deque &first_modified_darts= (i==1?modified_darts2:modified_darts); // For each dart of the i-cell, we modify i-links of neighbors. - typename std::deque::iterator it = + typename std::deque::iterator it = to_erase.begin(); for ( ; it!=to_erase.end(); ++it ) { if (i!=1 || amap.template beta<1>(*it)!=*it) // for 1-removal of a dart loop, nothing to do { d1=amap.template beta(*it); - while (d1!=amap.null_dart_handle && amap.is_marked(d1, mark)) + while (d1!=amap.null_dart_descriptor && amap.is_marked(d1, mark)) { d1=amap.template beta(d1); if (d1==amap. template beta(*it)) - { d1=amap.null_dart_handle; } + { d1=amap.null_dart_descriptor; } } d2=amap.template beta(*it); - while ( d2!=amap.null_dart_handle && amap.is_marked(d2, mark) ) + while ( d2!=amap.null_dart_descriptor && amap.is_marked(d2, mark) ) { d2=amap.template beta(d2); if ( d2==amap.template beta(*it) ) - { d2=amap.null_dart_handle; } + { d2=amap.null_dart_descriptor; } } - if ( d1!=amap.null_dart_handle ) + if ( d1!=amap.null_dart_descriptor ) { - if ( d2!=amap.null_dart_handle && d1!=d2 ) + internal::Set_dart_of_attribute_if_marked:: + run(amap, d1, mark); + + if ( d2!=amap.null_dart_descriptor && d1!=d2 ) { amap.template basic_link_beta(d1, d2); amap.mark(d1, mark_modified_darts); @@ -172,7 +177,7 @@ namespace CGAL } } } - else if ( d2!=amap.null_dart_handle ) + else if ( d2!=amap.null_dart_descriptor ) { if ( !amap.template is_free(d2) ) { @@ -222,13 +227,13 @@ namespace CGAL // Thus we unmark them now. if ( !amap.is_whole_map_unmarked(mark_modified_darts) ) { - for ( typename std::deque:: + for ( typename std::deque:: iterator it=modified_darts.begin(); it!=modified_darts.end(); ++it ) amap.unmark(*it, mark_modified_darts); if ( i==1 ) { - for ( typename std::deque:: + for ( typename std::deque:: iterator it=modified_darts2.begin(); it!=modified_darts2.end(); ++it ) amap.unmark(*it, mark_modified_darts); @@ -256,14 +261,14 @@ namespace CGAL template struct Remove_cell_functor { - static size_t run(CMap& amap, typename CMap::Dart_handle adart, + static size_t run(CMap& amap, typename CMap::Dart_descriptor adart, bool update_attributes) { typename CMap::size_type mark = amap.get_new_mark(); - std::deque to_erase; + std::deque to_erase; size_t res = 0; - std::deque modified_darts; + std::deque modified_darts; // We mark all the darts of the d-cell. for ( CGAL::CMap_dart_iterator_basic_of_cell @@ -275,7 +280,7 @@ namespace CGAL } // We unlink all the darts of the d-cell for beta-d. - typename std::deque::iterator + typename std::deque::iterator it = to_erase.begin(); for ( it = to_erase.begin(); it != to_erase.end(); ++it ) { @@ -324,25 +329,25 @@ namespace CGAL template struct Remove_cell_functor { - static size_t run(CMap& amap, typename CMap::Dart_handle adart, + static size_t run(CMap& amap, typename CMap::Dart_descriptor adart, bool update_attributes) { CGAL_assertion( (amap.template is_removable<0>(adart)) ); size_t res = 0; - typename CMap::Dart_handle d1, d2; - typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle; + typename CMap::Dart_descriptor d1, d2; + typename CMap::Dart_descriptor dg1=amap.null_descriptor, dg2=amap.null_descriptor; typename CMap::size_type mark = amap.get_new_mark(); // First we store and mark all the darts of the 0-cell to remove. - std::deque to_erase; + std::deque to_erase; for ( CGAL::CMap_dart_iterator_basic_of_cell it(amap,adart,mark); it.cont(); ++it ) { to_erase.push_back(it); - if ( !amap.template is_free<0>(it) && dg1==amap.null_handle ) + if ( !amap.template is_free<0>(it) && dg1==amap.null_descriptor ) { dg1=it; dg2=amap.template beta<0>(it); } amap.mark(it, mark); ++res; @@ -351,24 +356,27 @@ namespace CGAL if (amap.are_attributes_automatically_managed() && update_attributes ) { // We group the two edges incident if they exist. - if ( dg1!=amap.null_handle ) + if ( dg1!=amap.null_descriptor ) CGAL::internal::Group_attribute_functor_run:: - run(amap, dg1, dg2); + run(amap, dg1, dg2, true); // true because dg1 will be removed } // During the operation, we store in modified_darts the darts modified // by beta0 to test after the loop non void attributes that are split. - std::deque modified_darts; + std::deque modified_darts; // And we store in modified_darts2 all the darts having beta1 modified. - std::deque modified_darts2; + std::deque modified_darts2; // For each dart of the vertex, we modify 0 and 1-links of neighbors. - typename std::deque::iterator it = + typename std::deque::iterator it = to_erase.begin(); for ( ; it != to_erase.end(); ++it) { if ( !amap.template is_free<0>(*it) ) { + internal::Set_dart_of_attribute_if_marked:: + run(amap, amap.template beta<0>(*it), mark); + if ( !amap.template is_free<1>(*it) && amap.template beta<0>(*it)!=(*it) ) { @@ -452,7 +460,7 @@ namespace CGAL template struct Is_contractible_functor { - static bool run(const CMap& amap, typename CMap::Dart_const_handle adart) + static bool run(const CMap& amap, typename CMap::Dart_const_descriptor adart) { // TODO ? Optimisation possible to not test all the darts of the cell ? bool res = true; @@ -470,14 +478,14 @@ namespace CGAL template struct Is_contractible_functor { - static bool run(const CMap&, typename CMap::Dart_const_handle) + static bool run(const CMap&, typename CMap::Dart_const_descriptor) { return false; } }; // Specialization for i=1 template struct Is_contractible_functor { - static bool run(const CMap&, typename CMap::Dart_const_handle) + static bool run(const CMap&, typename CMap::Dart_const_descriptor) { return true; } }; @@ -490,16 +498,16 @@ namespace CGAL template struct Contract_cell_functor { - static size_t run(CMap& amap, typename CMap::Dart_handle adart, + static size_t run(CMap& amap, typename CMap::Dart_descriptor adart, bool update_attributes) { - CGAL_static_assertion ( 2<=i && i<=CMap::dimension ); + static_assert ( 2<=i && i<=CMap::dimension ); CGAL_assertion( (amap.template is_contractible(adart)) ); size_t res = 0; - typename CMap::Dart_handle d1, d2; - typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle; + typename CMap::Dart_descriptor d1, d2; + typename CMap::Dart_descriptor dg1=amap.null_descriptor, dg2=amap.null_descriptor; typename CMap::size_type mark = amap.get_new_mark(); typename CMap::size_type mark_modified_darts = amap.get_new_mark(); @@ -507,12 +515,12 @@ namespace CGAL const int imuinv = CGAL_BETAINV(i-1); // First we store and mark all the darts of the i-cell to contract. - std::deque to_erase; + std::deque to_erase; for ( CGAL::CMap_dart_iterator_basic_of_cell it(amap,adart,mark); it.cont(); ++it ) { to_erase.push_back(it); - if ( !amap.template is_free(it) && dg1==amap.null_handle ) + if ( !amap.template is_free(it) && dg1==amap.null_descriptor ) { dg1=it; dg2=amap.template beta(it); } amap.mark(it, mark); ++res; @@ -521,42 +529,42 @@ namespace CGAL if ( amap.are_attributes_automatically_managed() && update_attributes ) { // We group the two (i-1)-cells incident if they exist. - if ( dg1!=amap.null_handle ) + if ( dg1!=amap.null_descriptor ) CGAL::internal::Group_attribute_functor_run:: - run(amap, dg1, dg2); + run(amap, dg1, dg2, true); // true because dg1 will be removed } // During the operation, we store in modified_darts the darts modified // to test after the loop the non void attributes that are split. - std::deque modified_darts; + std::deque modified_darts; // For each dart of the i-cell, we modify i-links of neighbors. - typename std::deque::iterator it = + typename std::deque::iterator it = to_erase.begin(); for ( ; it!=to_erase.end(); ++it ) { d1 = amap.template beta(*it); - while ( d1!=amap.null_dart_handle && amap.is_marked(d1, mark) ) + while ( d1!=amap.null_dart_descriptor && amap.is_marked(d1, mark) ) { d1 = amap.template beta(d1); - if (d1 == amap.template beta(*it)) d1 = amap.null_dart_handle; + if (d1 == amap.template beta(*it)) d1 = amap.null_dart_descriptor; } if ( !amap.is_marked(d1, mark_modified_darts) ) { d2 = amap.template beta(*it); - while ( d2!=amap.null_dart_handle && amap.is_marked(d2, mark) ) + while ( d2!=amap.null_dart_descriptor && amap.is_marked(d2, mark) ) { d2 = amap.template beta(d2); if ( d2==amap.template beta(*it) ) - d2=amap.null_dart_handle; + d2=amap.null_dart_descriptor; } if ( !amap.is_marked(d2, mark_modified_darts) ) { - if (d1 != amap.null_dart_handle) + if (d1 != amap.null_dart_descriptor) { - if (d2 != amap.null_dart_handle && d1!=d2 ) + if (d2 != amap.null_dart_descriptor && d1!=d2 ) { amap.template basic_link_beta_for_involution(d1, d2); amap.mark(d1, mark_modified_darts); @@ -576,7 +584,7 @@ namespace CGAL } } } - else if (d2 != amap.null_dart_handle) + else if (d2 != amap.null_dart_descriptor) { if ( !amap.is_free(d2,i) ) { @@ -622,7 +630,7 @@ namespace CGAL // Thus we unmark them now. if ( !amap.is_whole_map_unmarked(mark_modified_darts) ) { - for ( typename std::deque:: + for ( typename std::deque:: iterator it=modified_darts.begin(); it!=modified_darts.end(); ++it ) amap.unmark(*it, mark_modified_darts); @@ -647,25 +655,25 @@ namespace CGAL template struct Contract_cell_functor { - static size_t run(CMap& amap, typename CMap::Dart_handle adart, + static size_t run(CMap& amap, typename CMap::Dart_descriptor adart, bool update_attributes) { CGAL_assertion( (amap.template is_contractible<1>(adart)) ); size_t res = 0; - typename CMap::Dart_handle d1, d2; - typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle; + typename CMap::Dart_descriptor d1, d2; + typename CMap::Dart_descriptor dg1=amap.null_descriptor, dg2=amap.null_descriptor; typename CMap::size_type amark = amap.get_new_mark(); // First we store and mark all the darts of the 1-cell to contract. - std::deque to_erase; + std::deque to_erase; for ( CGAL::CMap_dart_iterator_basic_of_cell it(amap,adart,amark); it.cont(); ++it ) { to_erase.push_back(it); - if ( dg1==amap.null_handle && !amap.template is_free<0>(it) && + if ( dg1==amap.null_descriptor && !amap.template is_free<0>(it) && !amap.template is_free<1>(it) ) { dg1=amap.template beta<0>(it); dg2=amap.template beta<1>(it); } amap.mark(it, amark); @@ -675,19 +683,19 @@ namespace CGAL if ( amap.are_attributes_automatically_managed() && update_attributes ) { // We group the two vertices incident if they exist. - if ( dg1!=amap.null_handle ) + if ( dg1!=amap.null_descriptor ) CGAL::internal::Group_attribute_functor_run:: - run(amap, dg1, dg2); + run(amap, dg1, dg2, true); // true because dg1 will be removed } // During the operation, we store in modified_darts the darts modified // by beta0 to test after the loop non void attributes that are split. - std::deque modified_darts; + std::deque modified_darts; // And we store in modified_darts2 all the darts having beta1 modified. - std::deque modified_darts2; + std::deque modified_darts2; // For each dart of the cell, we modify link of neighbors. - typename std::deque::iterator it = + typename std::deque::iterator it = to_erase.begin(); for ( ; it!=to_erase.end(); ++it ) { diff --git a/thirdparty/CGAL/include/CGAL/Combinatorial_map_save_load.h b/thirdparty/CGAL/include/CGAL/Combinatorial_map_save_load.h index 56d894e3..13bd9926 100644 --- a/thirdparty/CGAL/include/CGAL/Combinatorial_map_save_load.h +++ b/thirdparty/CGAL/include/CGAL/Combinatorial_map_save_load.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h $ -// $Id: Combinatorial_map_save_load.h 5c57f83 2021-10-14T17:19:33+02:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h $ +// $Id: include/CGAL/Combinatorial_map_save_load.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -57,7 +57,7 @@ namespace CGAL { // ... // - // Here T is a Dart_const_handle so we don't need & + // Here T is a Dart_const_descriptor so we don't need & template void write_cmap_dart_node(boost::property_tree::ptree & /*node*/, T) {} @@ -161,7 +161,7 @@ namespace CGAL { struct My_functor_cmap_save_one_attrib { static void run(CMap& amap, boost::property_tree::ptree& ptree, - std::unordered_map& myDarts) { // add dimension & type @@ -174,7 +174,7 @@ namespace CGAL { for (auto it=amap.template one_dart_per_cell().begin(), itend=amap.template one_dart_per_cell().end(); it!=itend; ++it) { - if (amap.template attribute(it)!=nullptr) + if (amap.template attribute(it)!=amap.null_descriptor) { // make composant, dart and property node boost::property_tree::ptree & nattr = ndim.add("a", ""); @@ -194,7 +194,7 @@ namespace CGAL { struct My_functor_cmap_save_one_attrib { static void run(CMap& amap, boost::property_tree::ptree& ptree, - std::unordered_map& myDarts) { // add dimension & type @@ -207,7 +207,7 @@ namespace CGAL { for (auto it=amap.template one_dart_per_cell().begin(), itend=amap.template one_dart_per_cell().end(); it!=itend; ++it) { - if (amap.template attribute(it)!=nullptr) + if (amap.template attribute(it)!=amap.null_descriptor) { // make composant, dart and property node boost::property_tree::ptree & nattr = ndim.add("a", ""); @@ -226,7 +226,7 @@ namespace CGAL { struct My_functor_cmap_save_one_attrib { static void run(CMap& amap, boost::property_tree::ptree& ptree, - std::unordered_map& myDarts) { // add dimension & type @@ -240,7 +240,7 @@ namespace CGAL { for (auto it=amap.template one_dart_per_cell().begin(), itend=amap.template one_dart_per_cell().end(); it!=itend; ++it) { - if (amap.template attribute(it)!=nullptr) + if (amap.template attribute(it)!=amap.null_descriptor) { // make composant, dart and property node boost::property_tree::ptree & nattr = ndim.add("a", ""); @@ -259,7 +259,7 @@ namespace CGAL { struct My_functor_cmap_save_one_attrib { static void run(CMap& amap, boost::property_tree::ptree& ptree, - std::unordered_map& myDarts) { // add dimension & type @@ -272,7 +272,7 @@ namespace CGAL { for (auto it=amap.template one_dart_per_cell().begin(), itend=amap.template one_dart_per_cell().end(); it!=itend; ++it) { - if (amap.template attribute(it)!=nullptr) + if (amap.template attribute(it)!=amap.null_descriptor) { // make composant, dart and property node boost::property_tree::ptree & nattr = ndim.add("a", ""); @@ -288,7 +288,7 @@ namespace CGAL { { template static void run(CMap& amap, boost::property_tree::ptree& ptree, - std::unordered_map& myDarts) { My_functor_cmap_save_one_attrib::run(amap, ptree, myDarts); @@ -297,7 +297,7 @@ namespace CGAL { template < class CMap > boost::property_tree::ptree cmap_save_darts - (CMap& amap, std::unordered_map& myDarts) { CGAL_assertion( myDarts.empty() ); @@ -341,13 +341,13 @@ namespace CGAL { template < class CMap > boost::property_tree::ptree cmap_save_attributes - (const CMap& amap, std::unordered_map& myDarts) { using boost::property_tree::ptree; ptree pt; - // update pt adding nodes containing attributes informations + // update pt adding nodes containing attributes information CMap::Helper::template Foreach_enabled_attributes >::run(const_cast(amap), pt, myDarts); @@ -371,11 +371,11 @@ namespace CGAL { tree.put("data", ""); /** First we save general information of the map (by default nothing, - the fuction can be specialized by users). */ + the function can be specialized by users). */ f(tree); // map dart => number - std::unordered_map myDarts; + std::unordered_map myDarts; // Save darts ptree pt_darts=cmap_save_darts(amap, myDarts); @@ -414,7 +414,7 @@ namespace CGAL { return save_combinatorial_map(amap, filename, f); } - // Here T is a Dart_handle so no need of & + // Here T is a Dart_descriptor so no need of & template void read_cmap_dart_node (const boost::property_tree::ptree::value_type &/*v*/, T /*val*/) @@ -505,7 +505,7 @@ namespace CGAL { struct My_functor_cmap_load_one_attrib { static void run(const boost::property_tree::ptree& pt, CMap& amap, - const std::vector& myDarts) + const std::vector& myDarts) { for(const boost::property_tree::ptree::value_type& v0 : pt.get_child("data.attributes") ) @@ -547,7 +547,7 @@ namespace CGAL { if( type==type_map && v2.first == "v" ) { if (amap.template attribute(myDarts[id_dart_cellule]) - ==nullptr ) + ==amap.null_descriptor ) amap.template set_attribute (myDarts[id_dart_cellule], amap.template create_attribute()); @@ -558,14 +558,15 @@ namespace CGAL { if( ptype==ptype_map && v2.first == "p" ) { if (amap.template attribute(myDarts[id_dart_cellule]) - ==nullptr ) + ==amap.null_descriptor ) amap.template set_attribute (myDarts[id_dart_cellule], amap.template create_attribute()); read_cmap_attribute_node (v2, - amap.template attribute(myDarts[id_dart_cellule]) - ->point()); + amap.template get_attribute + (amap.template attribute(myDarts[id_dart_cellule])). + point()); } } } @@ -581,7 +582,7 @@ namespace CGAL { struct My_functor_cmap_load_one_attrib { static void run(const boost::property_tree::ptree& pt, CMap& amap, - const std::vector& myDarts) + const std::vector& myDarts) { for( const boost::property_tree::ptree::value_type &v0 : pt.get_child("data.attributes") ) @@ -618,15 +619,16 @@ namespace CGAL { if( v2.first == "p" ) { if (amap.template attribute - (myDarts[id_dart_cellule])==nullptr ) + (myDarts[id_dart_cellule])==amap.null_descriptor ) amap.template set_attribute (myDarts[id_dart_cellule], amap.template create_attribute()); read_cmap_attribute_node (v2, - (amap.template attribute - (myDarts[id_dart_cellule])->point())); + (amap.template get_attribute + (amap.template attribute(myDarts[id_dart_cellule])). + point())); } } } @@ -642,7 +644,7 @@ namespace CGAL { struct My_functor_cmap_load_one_attrib { static void run(const boost::property_tree::ptree& pt, CMap& amap, - const std::vector& myDarts) + const std::vector& myDarts) { for( const boost::property_tree::ptree::value_type &v0 : pt.get_child("data.attributes") ) @@ -679,7 +681,7 @@ namespace CGAL { if( v2.first == "v" ) { if (amap.template attribute - (myDarts[id_dart_cellule])==nullptr) + (myDarts[id_dart_cellule])==amap.null_descriptor) amap.template set_attribute (myDarts[id_dart_cellule], amap.template create_attribute()); @@ -701,7 +703,7 @@ namespace CGAL { struct My_functor_cmap_load_one_attrib { static void run(const boost::property_tree::ptree& pt, CMap& amap, - const std::vector& myDarts) + const std::vector& myDarts) { for( const boost::property_tree::ptree::value_type &v0 : pt.get_child("data.attributes") ) @@ -723,7 +725,8 @@ namespace CGAL { { id_dart_cellule=v1.second.get("d")-1; - if (amap.template attribute(myDarts[id_dart_cellule])==nullptr) + if (amap.template attribute(myDarts[id_dart_cellule])== + amap.null_descriptor) amap.template set_attribute (myDarts[id_dart_cellule], amap.template create_attribute()); @@ -738,14 +741,14 @@ namespace CGAL { /** Functor called to load i-attributes. * @param pt a boost::property_tree::ptree load from an xml file * @param amap a pointer to the map to load into - * @param myDarts an array of Dart_handle st myDarts[i] is the ith dart. + * @param myDarts an array of Dart_descriptor st myDarts[i] is the ith dart. */ template struct My_functor_cmap_load_attrib { template static void run(const boost::property_tree::ptree& pt, CMap& amap, - const std::vector& myDarts) + const std::vector& myDarts) { My_functor_cmap_load_one_attrib::run(pt, amap, myDarts); } @@ -753,7 +756,7 @@ namespace CGAL { template < class CMap > bool cmap_load_darts(boost::property_tree::ptree &pt, CMap& amap, - std::vector& myDarts) + std::vector& myDarts) { // use a boost::property_tree using boost::property_tree::ptree; @@ -800,7 +803,7 @@ namespace CGAL { template < class CMap > void cmap_load_attributes(const boost::property_tree::ptree& pt, CMap& amap, - const std::vector& myDarts) + const std::vector& myDarts) { CMap::Helper::template Foreach_enabled_attributes >::run(pt, amap, myDarts); @@ -815,11 +818,11 @@ namespace CGAL { read_xml(input, pt); /** First we load general information of the map (by default nothing, - the fuction can be specialized by users). */ + the function can be specialized by users). */ f(pt); // Then we load darts and attributes. - std::vector myDarts; + std::vector myDarts; cmap_load_darts(pt,amap,myDarts); cmap_load_attributes(pt,amap,myDarts); return true; diff --git a/thirdparty/CGAL/include/CGAL/Combinatorial_map_storages.h b/thirdparty/CGAL/include/CGAL/Combinatorial_map_storages.h index 597c3c75..d58f7e06 100644 --- a/thirdparty/CGAL/include/CGAL/Combinatorial_map_storages.h +++ b/thirdparty/CGAL/include/CGAL/Combinatorial_map_storages.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h $ -// $Id: Combinatorial_map_storages.h 46f5325 2022-01-27T10:36:22+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h $ +// $Id: include/CGAL/Combinatorial_map_storages.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -34,16 +34,14 @@ namespace CGAL { struct Container_type; } - /** @file Combinatorial_map_storages.h - * Definition of storages for dD Combinatorial map. - */ // Storage of darts with compact container, beta with handles - template + template class Combinatorial_map_storage_1 { public: - typedef Combinatorial_map_storage_1 Self; - typedef CGAL::Tag_false Use_index; + using Self=Combinatorial_map_storage_1; + using Use_index=CGAL::Tag_false; + using Concurrent_tag=typename internal::Get_concurrent_tag::type; typedef internal::Combinatorial_map_helper Helper; @@ -61,12 +59,14 @@ namespace CGAL { typedef typename internal::Container_type ::type Dart_container; - typedef typename Dart_container::iterator Dart_handle; - typedef typename Dart_container::const_iterator Dart_const_handle; + typedef typename Dart_container::iterator Dart_descriptor; + typedef typename Dart_container::const_iterator Dart_const_descriptor; typedef typename Dart_container::size_type size_type; - typedef std::nullptr_t Null_handle_type; - static const Null_handle_type null_handle; + typedef std::nullptr_t Null_descriptor_type; + inline static constexpr Null_descriptor_type null_descriptor=nullptr; + + using Type_for_compact_container=void*; typedef Items_ Items; typedef Alloc_ Alloc; @@ -74,7 +74,7 @@ namespace CGAL { struct Container_for_attributes : public internal::Container_type ::template rebind_alloc>::type + typename Allocator_traits::template rebind_alloc>::type {}; /// Typedef for attributes typedef typename internal::template Get_attributes_tuple::type @@ -84,11 +84,11 @@ namespace CGAL { struct Attribute_type: public Helper::template Attribute_type {}; template - struct Attribute_handle: public Helper::template Attribute_handle + struct Attribute_descriptor: public Helper::template Attribute_descriptor {}; template - struct Attribute_const_handle: - public Helper::template Attribute_const_handle + struct Attribute_const_descriptor: + public Helper::template Attribute_const_descriptor {}; template struct Attribute_range: public Helper::template Attribute_range @@ -98,6 +98,17 @@ namespace CGAL { public Helper::template Attribute_const_range {}; + /// Deprecated types, keep for now for backward compatibility + using Dart_handle=Dart_descriptor; + using Dart_const_handle=Dart_const_descriptor; + + template + using Attribute_handle=Attribute_descriptor; + template + using Attribute_const_handle=Attribute_const_descriptor; + + inline static constexpr Null_descriptor_type null_handle=null_descriptor; + /// Number of marks static const size_type NB_MARKS = 32; @@ -106,87 +117,112 @@ namespace CGAL { typedef Handle_hash_function Hash_function; + typedef Dart_container Dart_range; + typedef const Dart_container Dart_const_range; + /// @return a Dart_range (range through all the darts of the map). + Dart_range& darts() { return mdarts;} + Dart_const_range& darts() const { return mdarts; } + // Init void init_storage() { // emplace null_dart; initialized in Combinatorial_map class - null_dart_handle = mnull_dart_container.emplace(); + null_dart_descriptor = mnull_dart_container.emplace(); + null_dart_handle=null_dart_descriptor; + } + + void clear_storage() + { + mnull_dart_container.clear(); } - /** Return if this dart is free for adimension. + /** Test if the map is empty. + * @return true iff the map is empty. + */ + bool is_empty() const + { return mdarts.empty(); } + + /// @return the number of darts. + size_type number_of_darts() const + { return mdarts.size(); } + + size_type upper_bound_on_dart_ids() const + { return 0; } + + /** Return if this dart is free for adimension. * @param dh a dart handle * @param i the dimension. - * @return true iff dh is linked with nullptr for \em adimension. + * @return true iff dh is linked with null_dart_descriptor for \em adimension. */ template - bool is_free(Dart_const_handle dh) const + bool is_free(Dart_const_descriptor dh) const { CGAL_assertion( dh!=nullptr ); CGAL_assertion(i <= dimension); - return dh->mf[i]==null_dart_handle; + return dh->mf[i]==null_dart_descriptor; } - bool is_free(Dart_const_handle dh, unsigned int i) const + bool is_free(Dart_const_descriptor dh, unsigned int i) const { CGAL_assertion( dh!=nullptr ); CGAL_assertion(i <= dimension); - return dh->mf[i]==null_dart_handle; + return dh->mf[i]==null_dart_descriptor; } - bool is_perforated(Dart_const_handle /*dh*/) const + bool is_perforated(Dart_const_descriptor /*dh*/) const { return false; } /// Set simultaneously all the marks of this dart to a given value. - void set_dart_marks(Dart_const_handle ADart, + void set_dart_marks(Dart_const_descriptor ADart, const std::bitset& amarks) const { CGAL_assertion( ADart!=nullptr ); ADart->set_marks(amarks); } /// Return all the marks of a dart. - std::bitset get_dart_marks(Dart_const_handle ADart) const + std::bitset get_dart_marks(Dart_const_descriptor ADart) const { CGAL_assertion( ADart!=nullptr ); return ADart->get_marks(); } /// Return the mark value of dart a given mark number. - bool get_dart_mark(Dart_const_handle ADart, size_type amark) const + bool get_dart_mark(Dart_const_descriptor ADart, size_type amark) const { CGAL_assertion( ADart!=nullptr ); return ADart->get_mark(amark); } /// Set the mark of a given mark number to a given value. - void set_dart_mark(Dart_const_handle ADart, size_type amark, bool avalue) const + void set_dart_mark(Dart_const_descriptor ADart, size_type amark, bool avalue) const { CGAL_assertion( ADart!=nullptr ); ADart->set_mark(amark, avalue); } /// Flip the mark of a given mark number to a given value. - void flip_dart_mark(Dart_const_handle ADart, size_type amark) const + void flip_dart_mark(Dart_const_descriptor ADart, size_type amark) const { CGAL_assertion( ADart!=nullptr ); ADart->flip_mark(amark); } // Access to beta maps - Dart_handle get_beta(Dart_handle ADart, int B1) + Dart_descriptor get_beta(Dart_descriptor ADart, int B1) { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; } - Dart_const_handle get_beta(Dart_const_handle ADart, int B1) const + Dart_const_descriptor get_beta(Dart_const_descriptor ADart, int B1) const { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; } template - Dart_handle get_beta(Dart_handle ADart) + Dart_descriptor get_beta(Dart_descriptor ADart) { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; } template - Dart_const_handle get_beta(Dart_const_handle ADart) const + Dart_const_descriptor get_beta(Dart_const_descriptor ADart) const { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; @@ -194,31 +230,31 @@ namespace CGAL { // return a handle on the i-attribute template - typename Attribute_handle::type attribute(Dart_handle ADart) + typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> - (ADart->mattribute_handles); + (ADart->mattribute_descriptors); } template - typename Attribute_const_handle::type - attribute(Dart_const_handle ADart) const + typename Attribute_const_descriptor::type + attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> - (ADart->mattribute_handles); + (ADart->mattribute_descriptors); } // Copy a given attribute template - typename Attribute_handle::type copy_attribute - (typename Attribute_const_handle::type ah) + typename Attribute_descriptor::type copy_attribute + (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); - typename Attribute_handle::type res= + typename Attribute_descriptor::type res= std::get::value> (mattribute_containers).emplace(*ah); this->template init_attribute_ref_counting(res); @@ -227,7 +263,7 @@ namespace CGAL { // Test if a given attribute is valid template - bool is_valid_attribute(typename Attribute_const_handle::type ah) const + bool is_valid_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->is_valid(); @@ -236,25 +272,25 @@ namespace CGAL { // accessors and modifiers to the attribute ref counting given its handle template std::size_t get_attribute_ref_counting - (typename Attribute_const_handle::type ah) const + (typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->get_nb_refs(); } template - void init_attribute_ref_counting(typename Attribute_handle::type ah) + void init_attribute_ref_counting(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); ah->mrefcounting=0; } template - void inc_attribute_ref_counting(typename Attribute_handle::type ah) + void inc_attribute_ref_counting(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); ah->inc_nb_refs(); } template - void dec_attribute_ref_counting(typename Attribute_handle::type ah) + void dec_attribute_ref_counting(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); ah->dec_nb_refs(); @@ -263,14 +299,14 @@ namespace CGAL { // get the attribute given its handle template typename Attribute_type::type& - get_attribute(typename Attribute_handle::type ah) + get_attribute(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); return *ah; } template const typename Attribute_type::type& - get_attribute(typename Attribute_const_handle::type ah) const + get_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return *ah; @@ -278,14 +314,14 @@ namespace CGAL { // Get the dart of the given attribute template - Dart_handle dart_of_attribute(typename Attribute_handle::type ah) + Dart_descriptor dart_of_attribute(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); return ah->dart(); } template - Dart_const_handle - dart_of_attribute(typename Attribute_const_handle::type ah) const + Dart_const_descriptor + dart_of_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->dart(); @@ -293,30 +329,30 @@ namespace CGAL { // Set the dart of the given attribute template - void set_dart_of_attribute(typename Attribute_handle::type ah, - Dart_handle adart) + void set_dart_of_attribute(typename Attribute_descriptor::type ah, + Dart_descriptor adart) { CGAL_assertion( ah!=nullptr ); ah->set_dart(adart); } // Get the information associated with a given dart - Dart_info& info(Dart_handle adart) + Dart_info& info(Dart_descriptor adart) { return adart->info(); } - const Dart_info& info(Dart_const_handle adart) const + const Dart_info& info(Dart_const_descriptor adart) const { return adart->info(); } // Get the info of the given attribute template typename Attribute_type::type::Info & - info_of_attribute(typename Attribute_handle::type ah) + info_of_attribute(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); return ah->info(); } template const typename Attribute_type::type::Info & - info_of_attribute(typename Attribute_const_handle::type ah) const + info_of_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->info(); @@ -324,7 +360,7 @@ namespace CGAL { // Get the info of the i-cell attribute associated with the given dart template - typename Attribute_type::type::Info & info(Dart_handle adart) + typename Attribute_type::type::Info & info(Dart_descriptor adart) { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); @@ -332,7 +368,7 @@ namespace CGAL { } template const typename Attribute_type::type::Info & - info(Dart_const_handle adart) const + info(Dart_const_descriptor adart) const { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); @@ -341,14 +377,14 @@ namespace CGAL { // Get the dart of the i-cell attribute associated with the given dart template - Dart_handle dart(Dart_handle adart) + Dart_descriptor dart(Dart_descriptor adart) { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); return dart_of_attribute(attribute(adart)); } template - Dart_const_handle dart(Dart_const_handle adart) const + Dart_const_descriptor dart(Dart_const_descriptor adart) const { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); @@ -356,22 +392,26 @@ namespace CGAL { } // Debug function - void display_dart(Dart_const_handle ADart) const + void display_dart(Dart_const_descriptor ADart) const { std::cout< - void display_attribute(typename Attribute_const_handle::type ah) const + void display_attribute(typename Attribute_const_descriptor::type ah) const { std::cout<< std::get::value> (mattribute_containers).index(ah); } + template + size_type upper_bound_on_attribute_ids() const + { return 0; } + protected: // Set the handle on the i th attribute template - void basic_set_dart_attribute(Dart_handle dh, - typename Attribute_handle::type ah) + void basic_set_dart_attribute(Dart_descriptor dh, + typename Attribute_descriptor::type ah) { std::get::value> - (dh->mattribute_handles) = ah; + (dh->mattribute_descriptors) = ah; } /** Link a dart with a given dart for a given dimension. @@ -380,18 +420,18 @@ namespace CGAL { * @param i the dimension. */ template - void dart_link_beta(Dart_handle adart, Dart_handle adart2) + void dart_link_beta(Dart_descriptor adart, Dart_descriptor adart2) { CGAL_assertion(i <= dimension); CGAL_assertion(adart!=nullptr && adart2!=nullptr); - CGAL_assertion(adart!=null_dart_handle); + CGAL_assertion(adart!=null_dart_descriptor); adart->mf[i] = adart2; } - void dart_link_beta(Dart_handle adart, Dart_handle adart2, unsigned int i) + void dart_link_beta(Dart_descriptor adart, Dart_descriptor adart2, unsigned int i) { CGAL_assertion(i <= dimension); CGAL_assertion(adart!=nullptr && adart2!=nullptr); - CGAL_assertion(adart!=null_dart_handle); + CGAL_assertion(adart!=null_dart_descriptor); adart->mf[i] = adart2; } @@ -400,37 +440,33 @@ namespace CGAL { * @param i the dimension. */ template - void dart_unlink_beta(Dart_handle adart) + void dart_unlink_beta(Dart_descriptor adart) { CGAL_assertion(adart!=nullptr && i <= dimension); - adart->mf[i] = null_dart_handle; + adart->mf[i] = null_dart_descriptor; } - void dart_unlink_beta(Dart_handle adart, unsigned int i) + void dart_unlink_beta(Dart_descriptor adart, unsigned int i) { CGAL_assertion(adart!=nullptr && i <= dimension); - adart->mf[i] = null_dart_handle; + adart->mf[i] = null_dart_descriptor; } public: - /// Void dart. A dart d is i-free if beta_i(d)=null_dart_handle. - Dart_handle null_dart_handle; // Todo Dart_const_handle ?? + /// Void dart. A dart d is i-free if beta_i(d)=null_dart_descriptor. + Dart_descriptor null_dart_descriptor; // Todo Dart_const_descriptor ?? + Dart_descriptor null_dart_handle; // Deprecated: kept for backward compatibility protected: /// Dart container. Dart_container mdarts; - /// Container for the null_dart_handle. + /// Container for the null_dart_descriptor. Dart_container mnull_dart_container; /// Tuple of attributes containers typename Helper::Attribute_containers mattribute_containers; }; - /// null_handle - template < unsigned int d_, class Items_, class Alloc_, class Concurrent_tag > - const typename Combinatorial_map_storage_1::Null_handle_type - Combinatorial_map_storage_1::null_handle = nullptr; - } // namespace CGAL #if defined(BOOST_GCC) diff --git a/thirdparty/CGAL/include/CGAL/Combinatorial_map_storages_with_index.h b/thirdparty/CGAL/include/CGAL/Combinatorial_map_storages_with_index.h new file mode 100644 index 00000000..4b8658ac --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Combinatorial_map_storages_with_index.h @@ -0,0 +1,522 @@ +// Copyright (c) 2013 CNRS and LIRIS' Establishments (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h $ +// $Id: include/CGAL/Combinatorial_map_storages_with_index.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Guillaume Damiand +// +#ifndef CGAL_COMBINATORIAL_MAP_STORAGES_WITH_INDEX_H +#define CGAL_COMBINATORIAL_MAP_STORAGES_WITH_INDEX_H 1 + +#include +#include +#include + +#include +#if defined(BOOST_GCC) +_Pragma("GCC diagnostic push") +_Pragma("GCC diagnostic ignored \"-Warray-bounds\"") +#endif + +namespace CGAL { + + namespace internal { + template + struct Combinatorial_map_helper; + + template + struct Container_type; + } + + // Storage with combinatorial maps using index + template + class Combinatorial_map_storage_with_index + { + public: + using Self=Combinatorial_map_storage_with_index; + using Use_index=CGAL::Tag_true; + using Concurrent_tag=typename internal::Get_concurrent_tag::type; + + typedef internal::Combinatorial_map_helper Helper; + + using Index_type=typename internal::Get_index_type::type; + + typedef typename Items_::template Dart_wrapper Dart_wrapper; + + typedef typename internal::template Get_dart_info::type + Dart_info; + typedef CGAL::Dart Dart; + + typedef std::allocator_traits Allocator_traits; + typedef typename Allocator_traits::template rebind_alloc Dart_allocator; + + typedef Compact_container_with_index, Index_type> + Dart_container; + + typedef typename Dart_container::Index Dart_index; + + typedef Dart_index Dart_descriptor; + typedef Dart_index Dart_const_descriptor; + typedef typename Dart_container::size_type size_type; + + typedef Dart_index Null_descriptor_type; + static const Index_type null_descriptor=Dart_container::null_descriptor; + + using Type_for_compact_container=Index_type; + + typedef Items_ Items; + typedef Alloc_ Alloc; + template + struct Container_for_attributes : public + Compact_container_with_index, + Multiply_by_two_policy_for_cc_with_size<64>, size_type > + {}; + /// Typedef for attributes + typedef typename internal::template Get_attributes_tuple::type + Attributes; + + template + struct Attribute_type: public Helper::template Attribute_type + {}; + template + struct Attribute_descriptor: public Helper::template Attribute_descriptor + {}; + template + struct Attribute_const_descriptor: + public Helper::template Attribute_const_descriptor + {}; + template + struct Attribute_range: public Helper::template Attribute_range + {}; + template + struct Attribute_const_range: + public Helper::template Attribute_const_range + {}; + + /// Deprecated types, keep for now for backward compatibility + using Dart_handle=Dart_descriptor; + using Dart_const_handle=Dart_const_descriptor; + + template + using Attribute_handle=Attribute_descriptor; + template + using Attribute_const_handle=Attribute_const_descriptor; + + static const Index_type null_handle=null_descriptor; + + /// Number of marks + static const size_type NB_MARKS = 32; + + /// The dimension of the combinatorial map. + static const unsigned int dimension = d_; + + typedef internal::Index_hash_function Hash_function; + + //************************************************************************** + // Dart_range + struct Dart_range + { + typedef typename Dart_container::iterator iterator; + typedef typename Dart_container::const_iterator const_iterator; + Dart_range(Self &amap) : mmap(amap) + {} + iterator begin() + { + CGAL_assertion(!mmap.mdarts.empty()); // The container mdarts is not empty + // it has at least the null_dart + iterator res=mmap.mdarts.begin(); ++res; return res; + } + iterator end() { return mmap.mdarts.end(); } + const_iterator begin() const + { const_iterator res=mmap.mdarts.begin(); ++res; return res; } + const_iterator end() const { return mmap.mdarts.end(); } + size_type size() const + { return mmap.mdarts.size()-1; } + bool empty() const + { return size()==0; } // mmap.is_empty(); } + size_type index(Dart_index idx) const + { return idx; } + size_type index(const_iterator cit) const + { return cit; } + bool is_used(size_type i) const + { return mmap.mdarts.is_used(i); } + bool owns(size_type i) const + { return mmap.mdarts.owns(i); } + size_type capacity() const + { return mmap.mdarts.capacity(); } + size_type upper_bound() const + { return mmap.mdarts.upper_bound(); } + private: + Self & mmap; + }; + typedef const Dart_range Dart_const_range; + + /// @return a Dart_range (range through all the darts of the map). + Dart_range& darts() { return mdarts_range;} + Dart_const_range& darts() const { return mdarts_range; } + //************************************************************************** + + Combinatorial_map_storage_with_index() : mdarts_range(*this) + {} + + void init_storage() + { + // Allocate a dart for null_dart_descriptor + assert(mdarts.empty()); // the compact container is empty + Dart_index local_null_dart_descriptor = mdarts.emplace(); + if(local_null_dart_descriptor!=0) + { + std::cerr<<"[ERROR] fatal in Combinatorial_map_storage_with_index::init_storage" + < + bool is_free(Dart_const_descriptor dh) const + { + CGAL_assertion(i <= dimension); + return mdarts[dh].mf[i]==null_dart_descriptor; + } + bool is_free(Dart_const_descriptor dh, unsigned int i) const + { + CGAL_assertion(i <= dimension); + return mdarts[dh].mf[i]==null_dart_descriptor; + } + bool is_perforated(Dart_const_descriptor /*dh*/) const + { return false; } + + /// Set simultaneously all the marks of this dart to a given value. + void set_dart_marks(Dart_const_descriptor ADart, + const std::bitset& amarks) const + { + mdarts[ADart].set_marks(amarks); + } + /// Return all the marks of a dart. + std::bitset get_dart_marks(Dart_const_descriptor ADart) const + { + return mdarts[ADart].get_marks(); + } + /// Return the mark value of dart a given mark number. + bool get_dart_mark(Dart_const_descriptor ADart, size_type amark) const + { + return mdarts[ADart].get_mark(amark); + } + + /// Set the mark of a given mark number to a given value. + void set_dart_mark(Dart_const_descriptor ADart, size_type amark, bool avalue) const + { + mdarts[ADart].set_mark(amark, avalue); + } + + /// Flip the mark of a given mark number to a given value. + void flip_dart_mark(Dart_const_descriptor ADart, size_type amark) const + { + mdarts[ADart].flip_mark(amark); + } + + // Access to beta maps + Dart_descriptor get_beta(Dart_descriptor ADart, int B1) + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + Dart_const_descriptor get_beta(Dart_const_descriptor ADart, int B1) const + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + template + Dart_descriptor get_beta(Dart_descriptor ADart) + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + template + Dart_const_descriptor get_beta(Dart_const_descriptor ADart) const + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + + // return a handle on the i-attribute + template + typename Attribute_descriptor::type attribute(Dart_descriptor ADart) + { + static_assert(Helper::template Dimension_index::value>=0, + "attribute called but i-attributes are disabled."); + return std::get::value> + (mdarts[ADart].mattribute_descriptors); + } + template + typename Attribute_const_descriptor::type + attribute(Dart_const_descriptor ADart) const + { + static_assert(Helper::template Dimension_index::value>=0, + "attribute called but i-attributes are disabled."); + return std::get::value> + (mdarts[ADart].mattribute_descriptors); + } + + // Copy a given attribute + template + typename Attribute_descriptor::type copy_attribute + (typename Attribute_const_descriptor::type ah) + { + static_assert(Helper::template Dimension_index::value>=0, + "copy_attribute called but i-attributes are disabled."); + // We need to do a reserve before the emplace in order to avoid a bug of + // invalid reference when the container is reallocated. + std::get::value> + (mattribute_containers).reserve + (std::get::value> + (mattribute_containers).size()+1); + + typename Attribute_descriptor::type res= + std::get::value> + (mattribute_containers).emplace(get_attribute(ah)); + this->template init_attribute_ref_counting(res); + return res; + } + + // Test if a given attribute is valid + template + bool is_valid_attribute(typename Attribute_const_descriptor::type ah) const + { + return get_attribute(ah).is_valid(); + } + + // accessors and modifiers to the attribute ref counting given its handle + template + std::size_t get_attribute_ref_counting + (typename Attribute_const_descriptor::type ah) const + { + return get_attribute(ah).get_nb_refs(); + } + template + void init_attribute_ref_counting(typename Attribute_descriptor::type ah) + { + get_attribute(ah).mrefcounting=0; + } + template + void inc_attribute_ref_counting(typename Attribute_descriptor::type ah) + { + get_attribute(ah).inc_nb_refs(); + } + template + void dec_attribute_ref_counting(typename Attribute_descriptor::type ah) + { + get_attribute(ah).dec_nb_refs(); + } + + // get the attribute given its index + template + typename Attribute_type::type& + get_attribute(typename Attribute_descriptor::type ah) + { + CGAL_assertion( ah!=null_descriptor ); + return std::get::value> + (mattribute_containers)[ah]; + } + template + const typename Attribute_type::type& + get_attribute(typename Attribute_const_descriptor::type ah) const + { + CGAL_assertion( ah!=null_descriptor ); + return std::get::value> + (mattribute_containers)[ah]; + } + + // Get the dart of the given attribute + template + Dart_descriptor dart_of_attribute(typename Attribute_descriptor::type ah) + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).dart(); + } + template + Dart_const_descriptor + dart_of_attribute(typename Attribute_const_descriptor::type ah) const + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).dart(); + } + + // Set the dart of the given attribute + template + void set_dart_of_attribute(typename Attribute_descriptor::type ah, + Dart_descriptor adart) + { + CGAL_assertion( ah!=null_descriptor ); + get_attribute(ah).set_dart(adart); + } + + // Get the information associated with a given dart + Dart_info& info(Dart_descriptor adart) + { return mdarts[adart].info(); } + const Dart_info& info(Dart_const_descriptor adart) const + { return mdarts[adart].info(); } + + // Get the info of the given attribute + template + typename Attribute_type::type::Info & + info_of_attribute(typename Attribute_descriptor::type ah) + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).info(); + } + template + const typename Attribute_type::type::Info & + info_of_attribute(typename Attribute_const_descriptor::type ah) const + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).info(); + } + + // Get the info of the i-cell attribute associated with the given dart + template + typename Attribute_type::type::Info & info(Dart_descriptor adart) + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( this->template attribute(adart)!=null_descriptor ); + return info_of_attribute(attribute(adart)); + } + template + const typename Attribute_type::type::Info & + info(Dart_const_descriptor adart) const + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( attribute(adart)!=null_descriptor ); + return info_of_attribute(attribute(adart)); + } + + // Get the dart of the i-cell attribute associated with the given dart + template + Dart_descriptor dart(Dart_descriptor adart) + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( attribute(adart)!=null_descriptor ); + return dart_of_attribute(attribute(adart)); + } + template + Dart_const_descriptor dart(Dart_const_descriptor adart) const + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( attribute(adart)!=null_descriptor ); + return dart_of_attribute(attribute(adart)); + } + + // Debug function + void display_dart(Dart_const_descriptor ADart) const + { std::cout< + void display_attribute(typename Attribute_const_descriptor::type ah) const + { std::cout< + size_type upper_bound_on_attribute_ids() const + { + return std::get::value> + (mattribute_containers).upper_bound(); + } + + protected: + // Set the handle on the i th attribute + template + void basic_set_dart_attribute(Dart_descriptor dh, + typename Attribute_descriptor::type ah) + { + std::get::value> + (mdarts[dh].mattribute_descriptors) = ah; + } + + /** Link a dart with a given dart for a given dimension. + * @param adart the dart to link. + * @param adart2 the dart to link with. + * @param i the dimension. + */ + template + void dart_link_beta(Dart_descriptor adart, Dart_descriptor adart2) + { + CGAL_assertion(i <= dimension); + CGAL_assertion(adart!=null_dart_descriptor); + mdarts[adart].mf[i] = adart2; + } + void dart_link_beta(Dart_descriptor adart, Dart_descriptor adart2, unsigned int i) + { + CGAL_assertion(i <= dimension); + CGAL_assertion(adart!=null_dart_descriptor); + mdarts[adart].mf[i] = adart2; + } + + /** Unlink a dart for a given dimension. + * @param adart a dart. + * @param i the dimension. + */ + template + void dart_unlink_beta(Dart_descriptor adart) + { + CGAL_assertion(i <= dimension); + mdarts[adart].mf[i] = null_dart_descriptor; + } + void dart_unlink_beta(Dart_descriptor adart, unsigned int i) + { + CGAL_assertion(i <= dimension); + mdarts[adart].mf[i] = null_dart_descriptor; + } + + public: + /// Void dart. A dart d is i-free if beta_i(d)=null_dart_descriptor. + Index_type null_dart_descriptor=0; + + // Deprecated: kept for backward compatibility + Index_type null_dart_handle=null_dart_descriptor; + + protected: + /// Dart container. + Dart_container mdarts; + Dart_range mdarts_range; + + /// Container for the null_dart_descriptor: unused; to be compatible with handle version + Dart_container mnull_dart_container; + + /// Tuple of attributes containers + typename Helper::Attribute_containers mattribute_containers; + }; + +} // namespace CGAL + +#if defined(BOOST_GCC) + _Pragma("GCC diagnostic pop") +#endif + +#endif // CGAL_COMBINATORIAL_MAP_STORAGES_WITH_INDEX_H // +// EOF // diff --git a/thirdparty/CGAL/include/CGAL/Compact_container.h b/thirdparty/CGAL/include/CGAL/Compact_container.h index 9bdc6759..6af871e9 100644 --- a/thirdparty/CGAL/include/CGAL/Compact_container.h +++ b/thirdparty/CGAL/include/CGAL/Compact_container.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Compact_container.h $ -// $Id: Compact_container.h 440a8df 2022-02-03T08:41:04+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Compact_container.h $ +// $Id: include/CGAL/Compact_container.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion @@ -33,8 +33,7 @@ #include #include #include - -#include +#include // An STL like container with the following properties : // - to achieve compactness, it requires access to a pointer stored in T, @@ -537,11 +536,17 @@ class Compact_container return false; } - bool owns_dereferencable(const_iterator cit) const + bool owns_dereferenceable(const_iterator cit) const { return cit != end() && owns(cit); } + + CGAL_DEPRECATED bool owns_dereferencable(const_iterator cit) const + { + return owns_dereferenceable(cit); + } + /** Reserve method to ensure that the capacity of the Compact_container be * greater or equal than a given value n. */ @@ -859,10 +864,10 @@ namespace internal { typedef typename DSC::value_type value_type; typedef typename DSC::size_type size_type; typedef typename DSC::difference_type difference_type; - typedef typename boost::mpl::if_c< Const, const value_type*, - value_type*>::type pointer; - typedef typename boost::mpl::if_c< Const, const value_type&, - value_type&>::type reference; + typedef std::conditional_t< Const, const value_type*, + value_type*> pointer; + typedef std::conditional_t< Const, const value_type&, + value_type&> reference; typedef std::bidirectional_iterator_tag iterator_category; // the initialization with nullptr is required by our Handle concept. @@ -879,7 +884,7 @@ namespace internal { // Converting constructor from mutable to constant iterator template CC_iterator(const CC_iterator< - typename std::enable_if<(!OtherConst && Const), DSC>::type, + std::enable_if_t<(!OtherConst && Const), DSC>, OtherConst> &const_it) #ifdef CGAL_COMPACT_CONTAINER_DEBUG_TIME_STAMP : ts(Time_stamper::time_stamp(const_it.operator->())) @@ -891,7 +896,7 @@ namespace internal { // Assignment operator from mutable to constant iterator template CC_iterator & operator= (const CC_iterator< - typename std::enable_if<(!OtherConst && Const), DSC>::type, + std::enable_if_t<(!OtherConst && Const), DSC>, OtherConst> &const_it) { m_ptr = const_it.operator->(); @@ -1147,6 +1152,20 @@ namespace handle { } // namespace internal +template +class Output_rep > { +protected: + using CC_iterator = CGAL::internal::CC_iterator; + using Compact_container = typename CC_iterator::CC; + using Time_stamper = typename Compact_container::Time_stamper; + CC_iterator it; +public: + Output_rep( const CC_iterator it) : it(it) {} + std::ostream& operator()( std::ostream& out) const { + return (out << Time_stamper::display_id(it.operator->())); + } +}; + } //namespace CGAL namespace std { diff --git a/thirdparty/CGAL/include/CGAL/Compact_container_with_index.h b/thirdparty/CGAL/include/CGAL/Compact_container_with_index.h new file mode 100644 index 00000000..04710fc2 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Compact_container_with_index.h @@ -0,0 +1,1030 @@ +// Copyright (c) 2022 CNRS and LIRIS' Establishments (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Compact_container_with_index.h $ +// $Id: include/CGAL/Compact_container_with_index.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Guillaume Damiand +// +#ifndef CGAL_COMPACT_CONTAINER_WITH_INDEX_H +#define CGAL_COMPACT_CONTAINER_WITH_INDEX_H + +#include +#include +#include +#include +#include + +// An STL like container, similar to Compact_container, but uses indices +// instead of handles. +// - free list can be stored in a std::deque or in a data member stored in T +// - Boolean used to mark used/free elements can be stored in a std::bitset +// or in the most significant bit of the data member. + +// TODO low priority : +// - rebind<> the allocator +// - Exception safety guarantees +// - Thread safety guarantees +// - std requirements on iterators says all defined operations are constant +// time amortized (it's not true here, maybe it could be with some work...) +// - all this is expected especially when there are not so many free objects +// compared to the allocated elements. +// - Currently, end() can be invalidated on erase() if the upper bound has changed. + +namespace CGAL { + +// default policy: each time the array of element is increased, the size +// is multiply by 2 (like for std::vector). +template +struct Multiply_by_two_policy_for_cc_with_size +{ + static const unsigned int first_block_size=k; + + template + static void increase_size(Compact_container& cc) + { cc.next_delta=cc.capacity_; } +}; + +// constant size policy: the size of the array is always extended by the same +// number of elements. +template +struct Constant_size_policy_for_cc_with_size +{ + static const unsigned int first_block_size=k; + + template + static void increase_size(Compact_container& /*cc*/) + {} +}; + +// The traits class describes the way to access the size_type. +// It can be specialized. +template < class T, class size_type > +struct Compact_container_with_index_traits { + static size_type size_t(const T &t) + { return t.for_compact_container(); } + static void set_size_t(T &t, size_type v) + { t.for_compact_container(v); } +}; + +namespace internal { + template < class DSC, bool Const> + class CC_iterator_with_index; + + template < class T, class ST > + class MyIndex; +} + +// Free list management: three versions: +// * free elements stored in a std::deque and used Booleans in a std::vector +// * free elements stored in a data member of T and used Booleans in a std::vector +// * free elements stored in a data member of T, and used Booleans in its most significant bit +// Note that version deque and data member does not exist (no interest?) +// (1) By default, use a deque and a vector. +template +class Free_list_management +{}; + +// (1) Case with a deque for the freelist and a vector for Booleans. +template +class Free_list_management +{ + using Self=Free_list_management; + using T=typename CC_with_index::value_type; + using size_type=typename CC_with_index::size_type; + +public: + static const size_type null_descriptor=(std::numeric_limits::max)(); + + Free_list_management(CC_with_index* cc_with_index): + m_cc_with_index(cc_with_index) + {} + + void init() + { + m_free_list=std::stack(); + assert(m_free_list.empty()); + if(m_cc_with_index->capacity()>0) + { m_used.assign(m_cc_with_index->capacity(), false); } + else { m_used.clear(); } + m_cc_with_index->upper_bound_=0; + } + + void increase_to(size_type old_size) + { + CGAL_USE(old_size); + CGAL_assertion(m_cc_with_index->capacity()>old_size); + m_used.resize(m_cc_with_index->capacity(), false); + // m_cc_with_index->upper_bound_ does not change. + } + + void swap(Self& other) + { + // We should not swap m_cc_with_index, but only the content of the free list + m_free_list.swap(other.m_free_list); + m_used.swap(other.m_used); + } + + bool is_empty() const + { return m_free_list.empty() && + m_cc_with_index->upper_bound()>=m_cc_with_index->capacity(); } + + bool is_used(size_type i) const + { + CGAL_assertion(icapacity() && i!=null_descriptor); + return m_used[i]; + } + + // Push the ith element on the free list: it becomes free + void push(size_type i) + { + CGAL_assertion(icapacity() && i!=null_descriptor); + CGAL_assertion(is_used(i)); + m_used[i]=false; + if(i+1==m_cc_with_index->upper_bound()) + { --m_cc_with_index->upper_bound_; } + else + { m_free_list.push(i); } + } + + size_type top() const + { + CGAL_assertion(!is_empty()); + if(m_cc_with_index->upper_bound()capacity()) + { return m_cc_with_index->upper_bound(); } + return m_free_list.top(); + } + + // Pop one element from the free list (the top): it becomes used + size_type pop() + { + CGAL_assertion(!is_empty()); + CGAL_assertion(!is_used(top())); + size_type res=m_cc_with_index->upper_bound(); + if(m_cc_with_index->upper_bound()capacity()) + { + res=m_cc_with_index->upper_bound(); + ++m_cc_with_index->upper_bound_; + } + else + { + res=m_free_list.top(); + m_free_list.pop(); + } + CGAL_assertion(resupper_bound()); + CGAL_assertion(res!=null_descriptor); + CGAL_assertion(!is_used(res)); + m_used[res]=true; + return res; + } + + void copy_special_data(const T& /*src*/, T& /*dest*/) + {} + +protected: + CC_with_index* const m_cc_with_index; + std::stack m_free_list; + std::vector m_used; +}; + +// (2) Case with the "in place" free list, and a vector for Booleans. +template +class Free_list_management +{ + using Self=Free_list_management; + using T=typename CC_with_index::value_type; + using size_type=typename CC_with_index::size_type; + using Traits=Compact_container_with_index_traits ; + +public: + static const size_type null_descriptor=(std::numeric_limits::max)(); + + Free_list_management(CC_with_index* cc_with_index): + m_cc_with_index(cc_with_index) + {} + + void init() + { + if(m_cc_with_index->capacity()>0) + { + m_used.assign(m_cc_with_index->capacity(), false); + m_free_list=0; + for(size_type i=0; + i(m_cc_with_index->capacity()-1); ++i) + { Traits::set_size_t((*m_cc_with_index)[i], i+1); } + // Next of the last element is null_descriptor. + Traits::set_size_t((*m_cc_with_index)[m_cc_with_index->capacity()-1], + null_descriptor); + } + else + { + m_free_list=null_descriptor; + m_used.clear(); + } + m_cc_with_index->upper_bound_=0; + } + + void increase_to(size_type old_size) + { + CGAL_assertion(m_cc_with_index->capacity()>old_size); + m_used.resize(m_cc_with_index->capacity(), false); + for(size_type i=old_size; + i(m_cc_with_index->capacity()-1); ++i) + { Traits::set_size_t((*m_cc_with_index)[i], i+1); } + // Next of the last element is null_descriptor. + Traits::set_size_t((*m_cc_with_index)[m_cc_with_index->capacity()-1], + m_free_list); + m_free_list=old_size; + // m_cc_with_index->upper_bound_ does not change. + } + + void swap(Self& other) + { + // We should not swap m_cc_with_index, but only the content of the free list + std::swap(m_free_list, other.m_free_list); + m_used.swap(other.m_used); + } + + bool is_empty() const + { return m_free_list==null_descriptor; } + + bool is_used(size_type i) const + { + CGAL_assertion(icapacity() && i!=null_descriptor); + return m_used[i]; + } + + // Push the ith element on the free list: it becomes free + void push(size_type i) + { + CGAL_assertion(icapacity() && i!=null_descriptor); + CGAL_assertion(is_used(i)); + m_used[i]=false; + if(i+1==m_cc_with_index->upper_bound()) + { --m_cc_with_index->upper_bound_; } + Traits::set_size_t((*m_cc_with_index)[i], m_free_list); + m_free_list=i; + } + + size_type top() const + { + CGAL_assertion(!is_empty()); + return m_free_list; + } + + // Pop one element from the free list (the top): it becomes used + size_type pop() + { + CGAL_assertion(!is_empty()); + CGAL_assertion(!is_used(top())); + size_type res=m_free_list; + if(res>=m_cc_with_index->upper_bound()) + { m_cc_with_index->upper_bound_=res+1; } + CGAL_assertion(resupper_bound()); + CGAL_assertion(res!=null_descriptor); + CGAL_assertion(!is_used(res)); + m_free_list=Traits::size_t((*m_cc_with_index)[res]); + m_used[res]=true; + return res; + } + + void copy_special_data(const T& src, T& dest) + { Traits::set_size_t(dest, Traits::size_t(src)); } + +protected: + CC_with_index* const m_cc_with_index; + size_type m_free_list; // First free element, null_descriptor if no free + std::vector m_used; +}; + +// (3) Case with the "in place" free list, and "in place" Booleans. +template +class Free_list_management +{ + using Self=Free_list_management; + using T=typename CC_with_index::value_type; + using size_type=typename CC_with_index::size_type; + using Traits=Compact_container_with_index_traits ; + +public: + static const size_type null_descriptor=(std::numeric_limits::max)()/2; + + Free_list_management(CC_with_index* cc_with_index): + m_cc_with_index(cc_with_index) + {} + + void init() + { + if(m_cc_with_index->capacity()>0) + { + m_free_list=0; + for(size_type i=0; + i(m_cc_with_index->capacity()-1); ++i) + { static_set_val((*m_cc_with_index)[i], i+1, FREE); } + // Next of the last element is null_descriptor. + static_set_val((*m_cc_with_index)[m_cc_with_index->capacity()-1], + null_descriptor, FREE); + } + else + { + m_free_list=null_descriptor; + } + m_cc_with_index->upper_bound_=0; + } + + void increase_to(size_type old_size) + { + CGAL_assertion(m_cc_with_index->capacity()>old_size); + for(size_type i=old_size; + i(m_cc_with_index->capacity()-1); ++i) + { static_set_val((*m_cc_with_index)[i], i+1, FREE); } + static_set_val((*m_cc_with_index)[m_cc_with_index->capacity()-1], + m_free_list, FREE); + m_free_list=old_size; + // m_cc_with_index->upper_bound_ does not change. + } + + void swap(Self& other) + { + // We should not swap m_cc_with_index, but only the content of the free list + std::swap(m_free_list, other.m_free_list); + } + + bool is_empty() const + { return m_free_list==null_descriptor; } + + bool is_used(size_type i) const + { + CGAL_assertion(icapacity() && i!=null_descriptor); + return static_type((*m_cc_with_index)[i])==USED; + } + + // Push the ith element on the free list: it becomes free + void push(size_type i) + { + CGAL_assertion(icapacity() && i!=null_descriptor); + CGAL_assertion(is_used(i)); + static_set_val((*m_cc_with_index)[i], m_free_list, FREE); + m_free_list=i; + } + + size_type top() const + { + CGAL_assertion(!is_empty()); + return m_free_list; + } + + // Pop one element from the free list (the top): it becomes used + size_type pop() + { + CGAL_assertion(!is_empty()); + CGAL_assertion(!is_used(top())); + size_type res=m_free_list; + if(res>=m_cc_with_index->upper_bound()) + { m_cc_with_index->upper_bound_=res+1; } + CGAL_assertion(resupper_bound()); + CGAL_assertion(res!=null_descriptor); + CGAL_assertion(!is_used(res)); + static_set_type((*m_cc_with_index)[res], USED); + m_free_list=static_get_val((*m_cc_with_index)[res]); + return res; + } + + void copy_special_data(const T& src, T& dest) + { Traits::set_size_t(dest, Traits::size_t(src)); } + +protected: + // Definition of the bit squatting : + // ================================= + // e is composed of a size_t and the big 1 bit. + // value of the last bit as "Type" : 0 == reserved element; 1==free element. + // When an element is free, the other bits represent the index of the + // next free element. + + enum Type { USED = 0, FREE = 1 }; + + static const int nbbits_size_type_m1 = sizeof(size_type)*8 - 1; + static const size_type mask_type = ((size_type)-1)-(((size_type)-1)/2); + + // Get the type of the pointee. + static Type static_type(const T& e) + // TODO check if this is ok for little and big endian + { return (Type) ((Traits::size_t(e) & mask_type)>>(nbbits_size_type_m1)); } + + // get the value of the element (removing the used bit) + static size_type static_get_val(const T& e) + { return (Traits::size_t(e) & ~mask_type); } + + // set the value of the element and its type + static void static_set_type(T& e, Type t) + { Traits::set_size_t(e, static_get_val(e) | + ( ((size_type)t) <<(nbbits_size_type_m1))); } + + // set the value of the element and its type + static void static_set_val(T& e, size_type v, Type t) + { Traits::set_size_t(e, v | ( ((size_type)t) <<(nbbits_size_type_m1))); } + +protected: + CC_with_index* m_cc_with_index; + size_type m_free_list; +}; + +// Index class +// templated by a compact container with index, to differentiate the different class +// (for example to allow two methods with same name and two different Index as parameter) +template +class Index_for_cc_with_index +{ +public: + using Self=Index_for_cc_with_index; + using size_type=Index_type; + + /// Constructor. + Index_for_cc_with_index(size_type idx=null_descriptor) + : m_idx(idx) + {} + + /// Get the underlying index + operator size_type() const + { return m_idx; } + + // Constructor allowing to transform an index from one container to another + template + Index_for_cc_with_index(const Index2& idx): m_idx(static_cast(idx)) + {} + + /// Increment the internal index. This operations does not + /// guarantee that the index is valid or undeleted after the + /// increment. + Self& operator++() { ++m_idx; return *this; } + /// Decrement the internal index. This operations does not + /// guarantee that the index is valid or undeleted after the + /// decrement. + Self& operator--() { --m_idx; return *this; } + + /// Increment the internal index. This operations does not + /// guarantee that the index is valid or undeleted after the + /// increment. + Self operator++(int) { Self tmp(*this); ++m_idx; return tmp; } + /// Decrement the internal index. This operations does not + /// guarantee that the index is valid or undeleted after the + /// decrement. + Self operator--(int) { Self tmp(*this); --m_idx; return tmp; } + + size_type for_compact_container() const + { return m_idx; } + void for_compact_container(size_type v) + { m_idx=v; } + +private: + size_type m_idx; +}; + +namespace internal +{ +struct Index_hash_function { + typedef std::size_t result_type; + template + std::size_t operator() (const H& h) const { + return h; + } +}; +} + +template < class T, class Allocator_, class Increment_policy, + class IndexType = std::size_t > +class Compact_container_with_index +{ + typedef Allocator_ Al; + typedef Increment_policy Incr_policy; + typedef typename Default::Get< Al, CGAL_ALLOCATOR(T) >::type Allocator; + typedef Compact_container_with_index Self; +public: + typedef T value_type; + typedef IndexType size_type; + typedef Allocator allocator_type; + typedef value_type& reference; + typedef const value_type& const_reference; + + typedef typename std::allocator_traits::pointer pointer; + typedef typename std::allocator_traits::const_pointer const_pointer; + typedef typename std::allocator_traits::difference_type difference_type; + + typedef internal::CC_iterator_with_index iterator; + typedef internal::CC_iterator_with_index const_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + + using TFree_list_management=Free_list_management + ; + static const size_type null_descriptor=TFree_list_management::null_descriptor; + using Index=Index_for_cc_with_index; + + friend class internal::CC_iterator_with_index; + friend class internal::CC_iterator_with_index; + friend TFree_list_management; + + template + friend struct Addition_size_policy; + template friend struct Constant_size_policy_for_cc_with_size; + template + friend struct Multiply_by_two_policy_for_cc_with_size; + + explicit Compact_container_with_index(const Allocator &a = Allocator()) + : alloc(a), + free_list(this) + { init(); } + + template < class InputIterator > + Compact_container_with_index(InputIterator first, InputIterator last, + const Allocator & a = Allocator()) + : alloc(a), + free_list(this) + { + init(); + std::copy(first, last, CGAL::inserter(*this)); + } + + // The copy constructor and assignment operator preserve the iterator order + Compact_container_with_index(const Compact_container_with_index &c) + : alloc(c.get_allocator()), + free_list(this) + { + init(); + next_delta=c.next_delta; + std::copy(c.begin(), c.end(), CGAL::inserter(*this)); + } + + Compact_container_with_index(Compact_container_with_index&& c) noexcept + : alloc(c.get_allocator()), + free_list(*this) + { c.swap(*this); } + + Compact_container_with_index & + operator=(const Compact_container_with_index &c) + { + if (&c != this) { + Self tmp(c); + swap(tmp); + } + return *this; + } + + Compact_container_with_index & operator=(Compact_container_with_index&& c) noexcept + { + Self tmp(std::move(c)); + tmp.swap(*this); + return *this; + } + + ~Compact_container_with_index() + { clear(); } + + void swap(Self &c) + { + std::swap(alloc, c.alloc); + std::swap(capacity_, c.capacity_); + std::swap(upper_bound_, c.upper_bound_); + std::swap(size_, c.size_); + std::swap(next_delta, c.next_delta); + std::swap(all_items, c.all_items); + free_list.swap(c.free_list); + } + + bool is_used(size_type i) const + { return free_list.is_used(i); } + + const T& operator[] (size_type i) const + { + CGAL_assertion(all_items!=nullptr && i=all_items && value < (all_items+capacity_)) + { + return (value-all_items); + } + return 0; + } + + iterator index_to(size_type value) { + return iterator(this, value); + } + const_iterator index_to(size_type value) const { + return const_iterator(this, value); + } + + // Boost.Intrusive interface + iterator iterator_to(reference value) { + return iterator(this, compute_index(&value)); + } + const_iterator iterator_to(const_reference value) const { + return const_iterator(this, compute_index(&value)); + } + + // Special insert methods that construct the objects in place + // (just forward the arguments to the constructor, to optimize a copy). + template < typename... Args > + Index emplace(const Args&... args) + { + if (free_list.is_empty()) + { increase_size(); } + + Index ret=free_list.pop(); + T& e=operator[](ret); + //std::allocator_traits::construct(alloc, &e, args...); + new (&e) value_type(args...); + ++size_; + return ret; + } + + Index insert(const T &t) + { + if (free_list.is_empty()) + { increase_size(); } + + Index ret=free_list.pop(); + T& e=operator[](ret); + //std::allocator_traits::construct(alloc, &e, t); + new (&e) value_type(t); + ++size_; + return ret; + } + + template < class InputIterator > + void insert(InputIterator first, InputIterator last) + { + for (; first != last; ++first) + { insert(*first); } + } + + template < class InputIterator > + void assign(InputIterator first, InputIterator last) + { + clear(); + insert(first, last); + } + + void erase(Index i) + { + CGAL_precondition(is_used(i)); + T& e=operator[](i); + std::allocator_traits::destroy(alloc, &e); + //e.~T(); + free_list.push(i); + --size_; + } + + void erase(iterator first, iterator last) { + while (first != last) + { erase(first++); } + } + + void clear(); + + // Merge the content of d into *this. d gets cleared. + // TODO? void merge(Self &d); + + size_type size() const + { + CGAL_expensive_assertion(size_ == + (size_type) std::distance(begin(), end())); + return size_; + } + + size_type max_size() const + { return std::allocator_traits::max_size(alloc); } + + size_type capacity() const + { return capacity_; } + + size_type upper_bound() const + { return upper_bound_; } + + // void resize(size_type sz, T c = T()); // TODO makes sense ??? + + bool empty() const + { return size_==0; } + + allocator_type get_allocator() const + { return alloc; } + + size_type index(const_iterator cit) const + { return static_cast(cit); } + + size_type index(Index idx) const + { return static_cast(idx); } + + // Returns whether the iterator "cit" is in the range [begin(), end()]. + // This function is mostly useful for purposes of efficient debugging at + // higher levels. + bool owns(const_iterator cit) const + { + if (cit==end()) + { return true; } + + const_pointer c=&*cit; + if (c>=all_items && c<(all_items+capacity_)) + { return is_used(cit); } + return false; + } + + bool owns(size_type i) const + { return i=n) return; + increase_size(); + } + +private: + + void increase_size(); + + void init() + { + next_delta =Incr_policy::first_block_size; + capacity_ =0; + upper_bound_=0; + size_ =0; + all_items =nullptr; + free_list.init(); + } + + allocator_type alloc; // allocator + size_type capacity_; // capacity of the block + size_type upper_bound_; // <=capacity_ all indices >=upper_bound are unused + size_type size_; // Number of elements allocated (used) + size_type next_delta; // Size of the delta for the block size + pointer all_items; // pointer to the block + TFree_list_management free_list; // free list management +}; + +template < class T, class Allocator, class Increment_policy, class IndexType > +void Compact_container_with_index:: +clear() +{ + for (size_type i=0; i::destroy(alloc, &operator[](i)); } + } + std::allocator_traits::deallocate(alloc, all_items, capacity_); + all_items=nullptr; + + init(); +} + +template < class T, class Allocator, class Increment_policy, class IndexType > +void Compact_container_with_index:: +increase_size() +{ + size_type oldcapacity=capacity_; + capacity_+=next_delta; + + pointer all_items2= + std::allocator_traits::allocate(alloc, capacity_); + for (size_type index=0; index::construct + (alloc, &(all_items2[index]), std::move(all_items[index])); + //new (&all_items2[index]) value_type(all_items[index]); + std::allocator_traits::destroy(alloc, &(all_items[index])); + } + else + { free_list.copy_special_data(all_items[index], all_items2[index]); } + } + std::swap(all_items, all_items2); + std::allocator_traits::deallocate(alloc, + all_items2, oldcapacity); + free_list.increase_to(oldcapacity); + + // Increase the block_size for the next time. + Increment_policy::increase_size(*this); +} + +namespace internal { + + // ********************************************************************** + // Iterator if we use index: in this case, an iterator use one more + // data member of type size_type: memory footprint is more important than + // iterator without index. However such iterator is not supposed to be used + // in function parameters, to store handles through elements... + // We must use indices for that. + template < class DSC, bool Const > + class CC_iterator_with_index + { + typedef typename DSC::iterator iterator; + typedef CC_iterator_with_index Self; + + friend class CC_iterator_with_index; + friend class CC_iterator_with_index; + + public: + typedef typename DSC::value_type value_type; + typedef typename DSC::size_type size_type; + typedef typename DSC::difference_type difference_type; + typedef std::conditional_t< Const, const value_type*, + value_type*> pointer; + typedef std::conditional_t< Const, const value_type&, + value_type&> reference; + typedef std::bidirectional_iterator_tag iterator_category; + + typedef std::conditional_t< Const, const DSC*, DSC*> cc_pointer; + + CC_iterator_with_index(): m_ptr_to_cc(nullptr), + m_index(0) + {} + + // Either a harmless copy-ctor, + // or a conversion from iterator to const_iterator. + CC_iterator_with_index(const iterator &it): m_ptr_to_cc(it.m_ptr_to_cc), + m_index(it.m_index) + { + CGAL_assertion(m_index<=m_ptr_to_cc->upper_bound()); + } + + // Same for assignment operator + CC_iterator_with_index& operator=(const iterator &it) + { + m_ptr_to_cc=it.m_ptr_to_cc; + m_index=it.m_index; + return *this; + } + + operator size_type() const + { return m_index; } + + size_type get_current() const + { return m_index; } + + protected: + void set_current(size_type dh) + { m_index=dh; } + + protected: + + // Only Compact_container should access these constructors. + //template + friend class Compact_container_with_index; + cc_pointer m_ptr_to_cc; + size_type m_index; + + // For begin() + CC_iterator_with_index(cc_pointer ptr, int, int): m_ptr_to_cc(ptr), + m_index(0) + { + if(!m_ptr_to_cc->is_used(m_index)) + { increment(); } + } + + // Construction from raw pointer and for end(). + CC_iterator_with_index(cc_pointer ptr, size_type index): m_ptr_to_cc(ptr), + m_index(index) + {} + + // NB: in case empty container, begin==end==upper_bound. + void increment() + { + // It's either pointing to end(), or valid. + CGAL_assertion_msg(m_ptr_to_cc!=nullptr, + "Incrementing a singular iterator or an empty container iterator ?"); + CGAL_assertion_msg(m_indexupper_bound(), + "Incrementing end() ?"); + + // If it's not end(), then it's valid, we can do ++. + do + { ++m_index; } + while(m_indexupper_bound() && + (!m_ptr_to_cc->is_used(m_index))); + } + + void decrement() + { + // It's either pointing to end(), or valid. + CGAL_assertion_msg(m_ptr_to_cc!=nullptr, + "Decrementing a singular iterator or an empty container iterator ?"); + CGAL_assertion_msg(m_index>0, "Decrementing begin() ?"); + + // If it's not begin(), then it's valid, we can do --. + do + { + CGAL_assertion(m_index>0); + --m_index; + } + while(!m_ptr_to_cc->is_used(m_index)); + } + + public: + + Self & operator++() + { increment(); return *this; } + + Self & operator--() + { decrement(); return *this; } + + Self operator++(int) { Self tmp(*this); ++(*this); return tmp; } + Self operator--(int) { Self tmp(*this); --(*this); return tmp; } + + reference operator*() const { return ((*m_ptr_to_cc)[m_index]); } + + pointer operator->() const { return &((*m_ptr_to_cc)[m_index]); } + + bool is_end() const { return m_index>=m_ptr_to_cc->upper_bound(); } + + // Can itself be used for bit-squatting. + size_type for_compact_container() const + { return m_index; } + void for_compact_container(size_type v) + { m_index=v; } + + template + friend bool operator==(const CC_iterator_with_index&, + const CC_iterator_with_index&); + + template + friend bool operator!=(const CC_iterator_with_index&, + const CC_iterator_with_index&); + }; + + template < class DSC, bool Const1, bool Const2 > + inline + bool operator==(const CC_iterator_with_index &rhs, + const CC_iterator_with_index &lhs) + { + return rhs.m_ptr_to_cc==lhs.m_ptr_to_cc && + (rhs.m_index==lhs.m_index || + (rhs.is_end() && lhs.is_end())); + } + + template < class DSC, bool Const1, bool Const2 > + inline + bool operator!=(const CC_iterator_with_index &rhs, + const CC_iterator_with_index &lhs) + { + return rhs.m_ptr_to_cc!=lhs.m_ptr_to_cc || + (rhs.m_index!=lhs.m_index && + (!rhs.is_end() || !lhs.is_end())); + } + +} // namespace internal + +} //namespace CGAL + +namespace std +{ + +#ifndef CGAL_CFG_NO_STD_HASH + +template +struct hash>: + public CGAL::cpp98::unary_function, + std::size_t> +{ + std::size_t operator()(const CGAL::Index_for_cc_with_index& idx) const + { return CGAL::internal::Index_hash_function()(idx); } +}; +#endif // CGAL_CFG_NO_STD_HASH + +} // namespace std + +#endif // CGAL_COMPACT_CONTAINER_WITH_INDEX_H diff --git a/thirdparty/CGAL/include/CGAL/Compact_mesh_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Compact_mesh_cell_base_3.h index 93070599..879f59f9 100644 --- a/thirdparty/CGAL/include/CGAL/Compact_mesh_cell_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Compact_mesh_cell_base_3.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h $ -// $Id: Compact_mesh_cell_base_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h $ +// $Id: include/CGAL/Compact_mesh_cell_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau, Stephane Tayeb, Andreas Fabri @@ -16,22 +16,17 @@ #include - #include #include #include #include -#include #include #include #include #include -#include - -#include - +#include #ifdef CGAL_LINKED_WITH_TBB # include @@ -127,21 +122,21 @@ class Compact_mesh_cell_base_3_base } #endif - /// Marks \c facet as visited + /// Marks `facet` as visited void set_facet_visited (const int facet) { CGAL_precondition(facet>=0 && facet <4); bits_ |= char(1 << facet); } - /// Marks \c facet as not visited + /// Marks `facet` as not visited void reset_visited (const int facet) { CGAL_precondition(facet>=0 && facet<4); bits_ = char(bits_ & (15 & ~(1 << facet))); } - /// Returns \c true if \c facet is marked as visited + /// Returns `true` if `facet` is marked as visited bool is_facet_visited (const int facet) const { CGAL_precondition(facet>=0 && facet<4); @@ -198,7 +193,7 @@ class Compact_mesh_cell_base_3_base ++this->m_erase_counter; } - /// Marks \c facet as visited + /// Marks `facet` as visited void set_facet_visited (const int facet) { CGAL_precondition(facet>=0 && facet<4); @@ -210,7 +205,7 @@ class Compact_mesh_cell_base_3_base } } - /// Marks \c facet as not visited + /// Marks `facet` as not visited void reset_visited (const int facet) { CGAL_precondition(facet>=0 && facet<4); @@ -223,7 +218,7 @@ class Compact_mesh_cell_base_3_base } } - /// Returns \c true if \c facet is marked as visited + /// Returns `true` if `facet` is marked as visited bool is_facet_visited (const int facet) const { CGAL_precondition(facet>=0 && facet<4); @@ -355,7 +350,7 @@ class Compact_mesh_cell_3 Vertex_handle vertex(int i) const { - CGAL_triangulation_precondition( i >= 0 && i <= 3 ); + CGAL_precondition( i >= 0 && i <= 3 ); return V[i]; } @@ -378,13 +373,13 @@ class Compact_mesh_cell_3 if (v == V[0]) { return 0; } if (v == V[1]) { return 1; } if (v == V[2]) { return 2; } - CGAL_triangulation_assertion( v == V[3] ); + CGAL_assertion( v == V[3] ); return 3; } Cell_handle neighbor(int i) const { - CGAL_triangulation_precondition( i >= 0 && i <= 3); + CGAL_precondition( i >= 0 && i <= 3); return N[i]; } @@ -407,7 +402,7 @@ class Compact_mesh_cell_3 if (n == N[0]) return 0; if (n == N[1]) return 1; if (n == N[2]) return 2; - CGAL_triangulation_assertion( n == N[3] ); + CGAL_assertion( n == N[3] ); return 3; } @@ -416,8 +411,8 @@ class Compact_mesh_cell_3 void set_neighbor(int i, Cell_handle n) { - CGAL_triangulation_precondition( i >= 0 && i <= 3); - CGAL_triangulation_precondition( this != n.operator->() ); + CGAL_precondition( i >= 0 && i <= 3); + CGAL_precondition( this != n.operator->() ); N[i] = n; } @@ -430,10 +425,10 @@ class Compact_mesh_cell_3 void set_neighbors(Cell_handle n0, Cell_handle n1, Cell_handle n2, Cell_handle n3) { - CGAL_triangulation_precondition( this != n0.operator->() ); - CGAL_triangulation_precondition( this != n1.operator->() ); - CGAL_triangulation_precondition( this != n2.operator->() ); - CGAL_triangulation_precondition( this != n3.operator->() ); + CGAL_precondition( this != n0.operator->() ); + CGAL_precondition( this != n1.operator->() ); + CGAL_precondition( this != n2.operator->() ); + CGAL_precondition( this != n3.operator->() ); N[0] = n0; N[1] = n1; N[2] = n2; @@ -442,7 +437,7 @@ class Compact_mesh_cell_3 // CHECKING - // the following trivial is_valid allows + // the following trivial is_valid enables // the user of derived cell base classes // to add their own purpose checking bool is_valid(bool = false, int = 0) const @@ -466,7 +461,7 @@ class Compact_mesh_cell_3 // but there's not much we can do for this now. void set_vertex(int i, Vertex_handle v) { - CGAL_triangulation_precondition( i >= 0 && i <= 3); + CGAL_precondition( i >= 0 && i <= 3); invalidate_weighted_circumcenter_cache(); V[i] = v; } @@ -490,8 +485,8 @@ class Compact_mesh_cell_3 template const Point_3& weighted_circumcenter(const GT_& gt) const { - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); if (internal_tbb::is_null(weighted_circumcenter_)) { this->try_to_set_circumcenter( new Point_3(gt.construct_weighted_circumcenter_3_object() @@ -531,42 +526,42 @@ class Compact_mesh_cell_3 bool is_cache_valid() const { return sliver_cache_validity_; } void reset_cache_validity() const { sliver_cache_validity_ = false; } - /// Set surface index of \c facet to \c index + /// Set surface index of `facet` to `index` void set_surface_patch_index(const int facet, const Surface_patch_index& index) { CGAL_precondition(facet>=0 && facet<4); surface_index_table_[facet] = index; } - /// Returns surface index of facet \c facet + /// Returns surface index of facet `facet` Surface_patch_index surface_patch_index(const int facet) const { CGAL_precondition(facet>=0 && facet<4); return surface_index_table_[facet]; } - /// Sets surface center of \c facet to \c point + /// Sets surface center of `facet` to `point` void set_facet_surface_center(const int facet, const Point_3& point) { CGAL_precondition(facet>=0 && facet<4); surface_center_table_[facet] = point; } - /// Returns surface center of \c facet + /// Returns surface center of `facet` Point_3 get_facet_surface_center(const int facet) const { CGAL_precondition(facet>=0 && facet<4); return surface_center_table_[facet]; } - /// Sets surface center index of \c facet to \c index + /// Sets surface center index of `facet` to `index` void set_facet_surface_center_index(const int facet, const Index& index) { CGAL_precondition(facet>=0 && facet<4); surface_center_index_table_[facet] = index; } - /// Returns surface center of \c facet + /// Returns surface center of `facet` Index get_facet_surface_center_index(const int facet) const { CGAL_precondition(facet>=0 && facet<4); @@ -589,7 +584,7 @@ class Compact_mesh_cell_3 void set_surface_index(const int facet, const Surface_index& index) { set_surface_patch_index(facet,index); } - /// Returns surface index of facet \c facet + /// Returns surface index of facet `facet` Surface_index surface_index(const int facet) const { return surface_patch_index(facet); } #endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX @@ -709,6 +704,32 @@ class Compact_mesh_cell_3 }; // end class Compact_mesh_cell_3 +/*! +\ingroup PkgMesh3MeshClasses + +The class `Compact_mesh_cell_base_3` is a model of the concept `MeshCellBase_3`. +It is designed to serve as cell base class for the 3D triangulation +used in the 3D mesh generation process. It is more compact in memory than +`Mesh_cell_base_3`. + +\tparam GT is the geometric traits class. +It has to be a model of the concept `MeshTriangulationTraits_3`. + +\tparam MD provides the types of indices used to identify +the faces of the input complex. It has to be a model +of the concept `MeshDomain_3`. + +\tparam TDS is the triangulation data structure class to which cells +belong. That parameter is only used by the rebind mechanism (see +`::TriangulationDSCellBase_3::Rebind_TDS`). Users should always use the +default parameter value `void`. + +\cgalModels{MeshCellBase_3} + +\sa `CGAL::Mesh_complex_3_in_triangulation_3` +\sa `CGAL::Mesh_cell_base_3` + +*/ template< class GT, class MD, class TDS = void > @@ -719,7 +740,11 @@ template class Compact_mesh_cell_base_3 { public: +#ifdef DOXYGEN_RUNNING + typedef unspecified_type Triangulation_data_structure; +#else typedef internal::Dummy_tds_3 Triangulation_data_structure; +#endif typedef Triangulation_data_structure::Vertex_handle Vertex_handle; typedef Triangulation_data_structure::Cell_handle Cell_handle; template @@ -740,7 +765,11 @@ template diff --git a/thirdparty/CGAL/include/CGAL/Compact_simplicial_mesh_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Compact_simplicial_mesh_cell_base_3.h new file mode 100644 index 00000000..53ce0b07 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Compact_simplicial_mesh_cell_base_3.h @@ -0,0 +1,391 @@ +// Copyright (c) 2006-2007 INRIA Sophia-Antipolis (France). +// Copyright (c) 2008,2011 GeometryFactory Sarl (France) +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/Compact_simplicial_mesh_cell_base_3.h $ +// $Id: include/CGAL/Compact_simplicial_mesh_cell_base_3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Laurent Rineau, Stephane Tayeb, Andreas Fabri, Jane Tournois + +#ifndef CGAL_COMPACT_SIMPLICIAL_MESH_CELL_BASE_3_H +#define CGAL_COMPACT_SIMPLICIAL_MESH_CELL_BASE_3_H + +#include + +#include +#include +#include +#include +#include +#include + +#include + +namespace CGAL { + +// Adds information to Cb about the cell of the input complex containing it +template +class Compact_simplicial_mesh_cell_3 +{ +public: + using Triangulation_data_structure = TDS; + + using Vertex_handle = typename TDS::Vertex_handle; + using Cell_handle = typename TDS::Cell_handle; + using Vertex = typename TDS::Vertex; + using Cell = typename TDS::Cell; + using TDS_data = typename TDS::Cell_data; + + // Index Type + using Subdomain_index = Subdomain_index_; + using Surface_patch_index = Surface_patch_index_; + +public: + // Constructors + Compact_simplicial_mesh_cell_3() + : time_stamp_(std::size_t(-1)) + {} + + Compact_simplicial_mesh_cell_3(const Compact_simplicial_mesh_cell_3& rhs) + : N(rhs.N) + , V(rhs.V) + , time_stamp_(rhs.time_stamp_) + , subdomain_index_(rhs.subdomain_index_) + { + for(int i=0; i <4; i++){ + surface_index_table_[i] = rhs.surface_index_table_[i]; + } + } + + Compact_simplicial_mesh_cell_3(Vertex_handle v0, + Vertex_handle v1, + Vertex_handle v2, + Vertex_handle v3) + : V(CGAL::make_array(v0, v1, v2, v3)) + { + } + + Compact_simplicial_mesh_cell_3(Vertex_handle v0, + Vertex_handle v1, + Vertex_handle v2, + Vertex_handle v3, + Cell_handle n0, + Cell_handle n1, + Cell_handle n2, + Cell_handle n3) + : N(CGAL::make_array(n0, n1, n2, n3)) + , V(CGAL::make_array(v0, v1, v2, v3)) + { + } + + // ACCESS FUNCTIONS + Vertex_handle vertex(int i) const + { + CGAL_precondition( i >= 0 && i <= 3 ); + return V[i]; + } + + bool has_vertex(Vertex_handle v) const + { + return (V[0] == v) || (V[1] == v) || (V[2]== v) || (V[3]== v); + } + + bool has_vertex(Vertex_handle v, int & i) const + { + if (v == V[0]) { i = 0; return true; } + if (v == V[1]) { i = 1; return true; } + if (v == V[2]) { i = 2; return true; } + if (v == V[3]) { i = 3; return true; } + return false; + } + + int index(Vertex_handle v) const + { + if (v == V[0]) { return 0; } + if (v == V[1]) { return 1; } + if (v == V[2]) { return 2; } + CGAL_assertion( v == V[3] ); + return 3; + } + + Cell_handle neighbor(int i) const + { + CGAL_precondition( i >= 0 && i <= 3); + return N[i]; + } + + bool has_neighbor(Cell_handle n) const + { + return (N[0] == n) || (N[1] == n) || (N[2] == n) || (N[3] == n); + } + + bool has_neighbor(Cell_handle n, int & i) const + { + if(n == N[0]){ i = 0; return true; } + if(n == N[1]){ i = 1; return true; } + if(n == N[2]){ i = 2; return true; } + if(n == N[3]){ i = 3; return true; } + return false; + } + + int index(Cell_handle n) const + { + if (n == N[0]) return 0; + if (n == N[1]) return 1; + if (n == N[2]) return 2; + CGAL_assertion( n == N[3] ); + return 3; + } + + // SETTING + void set_neighbor(int i, Cell_handle n) + { + CGAL_precondition( i >= 0 && i <= 3); + CGAL_precondition( this != n.operator->() ); + N[i] = n; + } + + void set_neighbors() + { + N[0] = N[1] = N[2] = N[3] = Cell_handle(); + } + + void set_neighbors(Cell_handle n0, Cell_handle n1, + Cell_handle n2, Cell_handle n3) + { + CGAL_precondition( this != n0.operator->() ); + CGAL_precondition( this != n1.operator->() ); + CGAL_precondition( this != n2.operator->() ); + CGAL_precondition( this != n3.operator->() ); + N[0] = n0; + N[1] = n1; + N[2] = n2; + N[3] = n3; + } + + // CHECKING + + // the following trivial is_valid allows + // the user of derived cell base classes + // to add their own purpose checking + bool is_valid(bool = false, int = 0) const + { return true; } + + // For use by Compact_container. + void * for_compact_container() const { return N[0].for_compact_container(); } + void for_compact_container(void *p) { N[0].for_compact_container(p); } + + // TDS internal data access functions. + TDS_data& tds_data() { return _tds_data; } + const TDS_data& tds_data() const { return _tds_data; } + + // We must override the functions that modify the vertices. + // And if the point inside a vertex is modified, we fail, + // but there's not much we can do for this now. + void set_vertex(int i, Vertex_handle v) + { + CGAL_precondition( i >= 0 && i <= 3); + V[i] = v; + } + + void set_vertices() + { + V[0] = V[1] = V[2] = V[3] = Vertex_handle(); + } + + void set_vertices(Vertex_handle v0, Vertex_handle v1, + Vertex_handle v2, Vertex_handle v3) + { + V[0] = v0; + V[1] = v1; + V[2] = v2; + V[3] = v3; + } + + // Returns the index of the cell of the input complex that contains the cell + Subdomain_index subdomain_index() const { return subdomain_index_; } + + // Sets the index of the cell of the input complex that contains the cell + void set_subdomain_index(const Subdomain_index& index) + { subdomain_index_ = index; } + + /// Set surface index of \c facet to \c index + void set_surface_patch_index(const int facet, const Surface_patch_index& index) + { + CGAL_precondition(facet>=0 && facet<4); + surface_index_table_[facet] = index; + } + + /// Returns surface index of facet \c facet + Surface_patch_index surface_patch_index(const int facet) const + { + CGAL_precondition(facet>=0 && facet<4); + return surface_index_table_[facet]; + } + + /// Returns true if facet lies on a surface patch + bool is_facet_on_surface(const int facet) const + { + CGAL_precondition(facet>=0 && facet<4); + return ( !( Surface_patch_index() == surface_index_table_[facet] )); + } + + // ----------------------------------- + // Backward Compatibility + // ----------------------------------- +#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX + typedef Surface_patch_index Surface_index; + + void set_surface_index(const int facet, const Surface_index& index) + { set_surface_patch_index(facet,index); } + + /// Returns surface index of facet \c facet + Surface_index surface_index(const int facet) const + { return surface_patch_index(facet); } +#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX + // ----------------------------------- + // End backward Compatibility + // ----------------------------------- + + static + std::string io_signature() + { + return + Get_io_signature()() + + "+(" + Get_io_signature()() + ")[4]"; + } + + /// For the determinism of Compact_container iterators + ///@{ + typedef Tag_true Has_timestamp; + + std::size_t time_stamp() const { + return time_stamp_; + } + void set_time_stamp(const std::size_t& ts) { + time_stamp_ = ts; + } + ///@} + +private: + /// Stores surface_index for each facet of the cell + std::array surface_index_table_ = {}; + + std::array N; + std::array V; + + std::size_t time_stamp_; + + // The index of the cell of the input complex that contains me + Subdomain_index subdomain_index_ = {}; + + TDS_data _tds_data; + +public: + friend std::istream& operator>>(std::istream &is, Compact_simplicial_mesh_cell_3 &c) + { + Subdomain_index index; + if(IO::is_ascii(is)) + is >> index; + else + read(is, index); + + if(is) + { + c.set_subdomain_index(index); + for(int i = 0; i < 4; ++i) + { + Surface_patch_index i2; + if(IO::is_ascii(is)) + is >> IO::iformat(i2); + else + read(is, i2); + + c.set_surface_patch_index(i, i2); + } + } + + return is; + } + + friend + std::ostream& operator<<(std::ostream &os, const Compact_simplicial_mesh_cell_3&c) + { + if(IO::is_ascii(os)) + os << c.subdomain_index(); + else + write(os, c.subdomain_index()); + + for(int i = 0; i < 4; ++i) + { + if(IO::is_ascii(os)) + os << ' ' << IO::oformat(c.surface_patch_index(i)); + else + write(os, c.surface_patch_index(i)); + } + + return os; + } +}; + +/*! +\ingroup PkgSMDS3Classes + +The class `Compact_simplicial_mesh_cell_base_3` +is a model of the concept `SimplicialMeshCellBase_3`. +It is designed to serve as cell base class for.3D simplicial mesh data structures. +It stores and gives access to data about the complex the cell belongs to, such as the +subdomain it belongs to or surface it takes part to. +It is more compact in memory than `CGAL::Simplicial_mesh_cell_base_3`. + +\tparam SubdomainIndex Type of indices for subdomains of the discretized geometric domain. +Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible` +and `EqualityComparable`. The default constructed value must match the label +of the exterior of the domain (which contains at least the unbounded component). +It must match `MeshDomain_3::Subdomain_index` when used for mesh generation. + +\tparam SurfacePatchIndex Type of indices for surface patches (boundaries and interfaces) +of the discretized geometric domain. +Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible` +and `EqualityComparable`. The default constructed value must be the index value +assigned to a non surface facet. +It must match `MeshDomain_3::Surface_patch_index` when used for mesh generation. + +\cgalModels{SimplicialMeshCellBase_3} + +\sa `CGAL::Mesh_complex_3_in_triangulation_3` +\sa \link Mesh_cell_base_3 `CGAL::Mesh_cell_base_3`\endlink +\sa `MeshDomain_3` +\sa `MeshDomainWithFeatures_3` +*/ +template +class Compact_simplicial_mesh_cell_base_3 +{ +public: +#ifdef DOXYGEN_RUNNING + typedef unspecified_type Triangulation_data_structure; +#else + typedef internal::Dummy_tds_3 Triangulation_data_structure; +#endif + typedef Triangulation_data_structure::Vertex_handle Vertex_handle; + typedef Triangulation_data_structure::Cell_handle Cell_handle; + +public: + template + struct Rebind_TDS + { + typedef Compact_simplicial_mesh_cell_3 Other; + }; +}; + +} // namespace CGAL + +#endif // CGAL_COMPACT_SIMPLICIAL_MESH_CELL_BASE_3_H diff --git a/thirdparty/CGAL/include/CGAL/Compare_handles_with_or_without_timestamps.h b/thirdparty/CGAL/include/CGAL/Compare_handles_with_or_without_timestamps.h index 3b1c5ad0..b94ced83 100644 --- a/thirdparty/CGAL/include/CGAL/Compare_handles_with_or_without_timestamps.h +++ b/thirdparty/CGAL/include/CGAL/Compare_handles_with_or_without_timestamps.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Compare_handles_with_or_without_timestamps.h $ -// $Id: Compare_handles_with_or_without_timestamps.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Compare_handles_with_or_without_timestamps.h $ +// $Id: include/CGAL/Compare_handles_with_or_without_timestamps.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau diff --git a/thirdparty/CGAL/include/CGAL/Complex_2_in_triangulation_3.h b/thirdparty/CGAL/include/CGAL/Complex_2_in_triangulation_3.h index b58f6a38..a69cc9c3 100644 --- a/thirdparty/CGAL/include/CGAL/Complex_2_in_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/Complex_2_in_triangulation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Complex_2_in_triangulation_3.h $ -// $Id: Complex_2_in_triangulation_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Complex_2_in_triangulation_3.h $ +// $Id: include/CGAL/Complex_2_in_triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -767,7 +767,7 @@ operator>> (std::istream& is, Complex_2_in_triangulation_3& c2t3) c2t3.clear(); is >> c2t3.triangulation(); - // restore datas of c2t3 + // restore data of c2t3 for(typename Tr::Finite_facets_iterator fit = c2t3.triangulation().finite_facets_begin(); fit != c2t3.triangulation().finite_facets_end(); diff --git a/thirdparty/CGAL/include/CGAL/Complex_2_in_triangulation_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Complex_2_in_triangulation_cell_base_3.h index 084490ee..15268732 100644 --- a/thirdparty/CGAL/include/CGAL/Complex_2_in_triangulation_cell_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Complex_2_in_triangulation_cell_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Complex_2_in_triangulation_cell_base_3.h $ -// $Id: Complex_2_in_triangulation_cell_base_3.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Complex_2_in_triangulation_cell_base_3.h $ +// $Id: include/CGAL/Complex_2_in_triangulation_cell_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Complex_2_in_triangulation_vertex_base_3.h b/thirdparty/CGAL/include/CGAL/Complex_2_in_triangulation_vertex_base_3.h index cf552354..4a03be06 100644 --- a/thirdparty/CGAL/include/CGAL/Complex_2_in_triangulation_vertex_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Complex_2_in_triangulation_vertex_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Complex_2_in_triangulation_vertex_base_3.h $ -// $Id: Complex_2_in_triangulation_vertex_base_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Complex_2_in_triangulation_vertex_base_3.h $ +// $Id: include/CGAL/Complex_2_in_triangulation_vertex_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Complexity_tags.h b/thirdparty/CGAL/include/CGAL/Complexity_tags.h index a2721b31..197f23e1 100644 --- a/thirdparty/CGAL/include/CGAL/Complexity_tags.h +++ b/thirdparty/CGAL/include/CGAL/Complexity_tags.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Complexity_tags.h $ -// $Id: Complexity_tags.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Complexity_tags.h $ +// $Id: include/CGAL/Complexity_tags.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Compute_anchor_3.h b/thirdparty/CGAL/include/CGAL/Compute_anchor_3.h index 2e6c87cc..e95e45c7 100644 --- a/thirdparty/CGAL/include/CGAL/Compute_anchor_3.h +++ b/thirdparty/CGAL/include/CGAL/Compute_anchor_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/Compute_anchor_3.h $ -// $Id: Compute_anchor_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/Compute_anchor_3.h $ +// $Id: include/CGAL/Compute_anchor_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Compute_cone_boundaries_2.h b/thirdparty/CGAL/include/CGAL/Compute_cone_boundaries_2.h index b3730208..26e9a21e 100644 --- a/thirdparty/CGAL/include/CGAL/Compute_cone_boundaries_2.h +++ b/thirdparty/CGAL/include/CGAL/Compute_cone_boundaries_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cone_spanners_2/include/CGAL/Compute_cone_boundaries_2.h $ -// $Id: Compute_cone_boundaries_2.h 6486844 2022-05-10T11:30:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cone_spanners_2/include/CGAL/Compute_cone_boundaries_2.h $ +// $Id: include/CGAL/Compute_cone_boundaries_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Concatenate_iterator.h b/thirdparty/CGAL/include/CGAL/Concatenate_iterator.h index 4b27a59f..9ccf5739 100644 --- a/thirdparty/CGAL/include/CGAL/Concatenate_iterator.h +++ b/thirdparty/CGAL/include/CGAL/Concatenate_iterator.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Concatenate_iterator.h $ -// $Id: Concatenate_iterator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Concatenate_iterator.h $ +// $Id: include/CGAL/Concatenate_iterator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Concurrent_compact_container.h b/thirdparty/CGAL/include/CGAL/Concurrent_compact_container.h index 6ee9ed69..272471d4 100644 --- a/thirdparty/CGAL/include/CGAL/Concurrent_compact_container.h +++ b/thirdparty/CGAL/include/CGAL/Concurrent_compact_container.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Concurrent_compact_container.h $ -// $Id: Concurrent_compact_container.h 440a8df 2022-02-03T08:41:04+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Concurrent_compact_container.h $ +// $Id: include/CGAL/Concurrent_compact_container.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Clement Jamin @@ -36,8 +36,6 @@ #include #include -#include - namespace CGAL { #define CGAL_GENERATE_MEMBER_DETECTOR(X) \ @@ -542,11 +540,16 @@ class Concurrent_compact_container return false; } - bool owns_dereferencable(const_iterator cit) const + bool owns_dereferenceable(const_iterator cit) const { return cit != end() && owns(cit); } + CGAL_DEPRECATED bool owns_dereferencable(const_iterator cit) const + { + return owns_dereferenceable(cit); + } + /** Reserve method to ensure that the capacity of the Concurrent_compact_container be * greater or equal than a given value n. */ @@ -749,7 +752,7 @@ void Concurrent_compact_container::merge(Self &d) #else // not CGAL_CONCURRENT_COMPACT_CONTAINER_APPROXIMATE_SIZE m_capacity += d.m_capacity; #endif // not CGAL_CONCURRENT_COMPACT_CONTAINER_APPROXIMATE_SIZE - // It seems reasonnable to take the max of the block sizes. + // It seems reasonable to take the max of the block sizes. m_block_size = (std::max)(m_block_size, d.m_block_size); // Clear d. d.init(); diff --git a/thirdparty/CGAL/include/CGAL/Cone_spanners_2/Less_by_direction_2.h b/thirdparty/CGAL/include/CGAL/Cone_spanners_2/Less_by_direction_2.h index ea8bebc1..7f49c504 100644 --- a/thirdparty/CGAL/include/CGAL/Cone_spanners_2/Less_by_direction_2.h +++ b/thirdparty/CGAL/include/CGAL/Cone_spanners_2/Less_by_direction_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cone_spanners_2/include/CGAL/Cone_spanners_2/Less_by_direction_2.h $ -// $Id: Less_by_direction_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cone_spanners_2/include/CGAL/Cone_spanners_2/Less_by_direction_2.h $ +// $Id: include/CGAL/Cone_spanners_2/Less_by_direction_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cone_spanners_2/Plane_scan_tree.h b/thirdparty/CGAL/include/CGAL/Cone_spanners_2/Plane_scan_tree.h index 7ef01355..d8d9f52f 100644 --- a/thirdparty/CGAL/include/CGAL/Cone_spanners_2/Plane_scan_tree.h +++ b/thirdparty/CGAL/include/CGAL/Cone_spanners_2/Plane_scan_tree.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree.h $ -// $Id: Plane_scan_tree.h 0d66e19 2020-07-24T17:05:10+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree.h $ +// $Id: include/CGAL/Cone_spanners_2/Plane_scan_tree.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Cone_spanners_2/Plane_scan_tree_impl.h b/thirdparty/CGAL/include/CGAL/Cone_spanners_2/Plane_scan_tree_impl.h index 2e05ef85..88a23f76 100644 --- a/thirdparty/CGAL/include/CGAL/Cone_spanners_2/Plane_scan_tree_impl.h +++ b/thirdparty/CGAL/include/CGAL/Cone_spanners_2/Plane_scan_tree_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree_impl.h $ -// $Id: Plane_scan_tree_impl.h 72bf8cc 2021-09-15T07:07:18+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree_impl.h $ +// $Id: include/CGAL/Cone_spanners_2/Plane_scan_tree_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -139,8 +139,8 @@ class _Leaf : public _Node { /* Destructor. * Frees memory used for storing key-value pair, thus invalidating any - * exisitng pointers to any keys and/or values in the tree. During and - * after destruction, neighbour nodes are not guarenteed to be consistent. + * existing pointers to any keys and/or values in the tree. During and + * after destruction, neighbor nodes are not guaranteed to be consistent. * Specifically, the linked list along the leaves of the B+ tree is * invalidated. */ virtual ~_Leaf() { diff --git a/thirdparty/CGAL/include/CGAL/Cone_spanners_enum_2.h b/thirdparty/CGAL/include/CGAL/Cone_spanners_enum_2.h index d23a7087..808b0a58 100644 --- a/thirdparty/CGAL/include/CGAL/Cone_spanners_enum_2.h +++ b/thirdparty/CGAL/include/CGAL/Cone_spanners_enum_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cone_spanners_2/include/CGAL/Cone_spanners_enum_2.h $ -// $Id: Cone_spanners_enum_2.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cone_spanners_2/include/CGAL/Cone_spanners_enum_2.h $ +// $Id: include/CGAL/Cone_spanners_enum_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Conic_2.h b/thirdparty/CGAL/include/CGAL/Conic_2.h index 7ab6cbeb..b752da13 100644 --- a/thirdparty/CGAL/include/CGAL/Conic_2.h +++ b/thirdparty/CGAL/include/CGAL/Conic_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Conic_2.h $ -// $Id: Conic_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Conic_2.h $ +// $Id: include/CGAL/Conic_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Constrained_Delaunay_triangulation_2.h b/thirdparty/CGAL/include/CGAL/Constrained_Delaunay_triangulation_2.h index a2a5f502..a67f803b 100644 --- a/thirdparty/CGAL/include/CGAL/Constrained_Delaunay_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/Constrained_Delaunay_triangulation_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h $ -// $Id: Constrained_Delaunay_triangulation_2.h 97b675d 2023-01-10T08:07:28+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h $ +// $Id: include/CGAL/Constrained_Delaunay_triangulation_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -16,14 +16,14 @@ #include -#include +#include #include #include #ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO #include #include -#include +#include #include #include @@ -163,7 +163,7 @@ class Constrained_Delaunay_triangulation_2 : Ctr(gt) { insert_constraints(lc.begin(), lc.end()); - CGAL_triangulation_postcondition( is_valid() ); + CGAL_postcondition( is_valid() ); } template @@ -173,7 +173,7 @@ class Constrained_Delaunay_triangulation_2 : Ctr(gt) { insert_constraints(it, last); - CGAL_triangulation_postcondition( is_valid() ); + CGAL_postcondition( is_valid() ); } virtual ~Constrained_Delaunay_triangulation_2() {} @@ -315,12 +315,12 @@ class Constrained_Delaunay_triangulation_2 #ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO std::ptrdiff_t insert( InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< + std::enable_if_t< + std::is_convertible< typename internal::Get_iterator_value_type< InputIterator >::type, Point - > - >::type* = nullptr + >::value + >* = nullptr ) #else #if defined(_MSC_VER) @@ -397,12 +397,12 @@ class Constrained_Delaunay_triangulation_2 std::ptrdiff_t insert( InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< + std::enable_if_t< + std::is_convertible< typename internal::Get_iterator_value_type< InputIterator >::type, std::pair::type> - > - >::type* =nullptr + >::value + >* =nullptr ) { return insert_with_info< std::pair::type> >(first,last); @@ -412,12 +412,10 @@ class Constrained_Delaunay_triangulation_2 std::ptrdiff_t insert( boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, - typename boost::enable_if< - boost::mpl::and_< - boost::is_convertible< typename std::iterator_traits::value_type, Point >, - boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - > - >::type* =nullptr + std::enable_if_t< + std::is_convertible_v< typename std::iterator_traits::value_type, Point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > + >* =nullptr ) { return insert_with_info< boost::tuple::type> >(first,last); @@ -431,6 +429,9 @@ class Constrained_Delaunay_triangulation_2 IndicesIterator indices_first, IndicesIterator indices_beyond) { + if(indices_first == indices_beyond){ + return insert(points_first, points_beyond); + } std::vector points(points_first, points_beyond); return internal::insert_constraints(*this,points, indices_first, indices_beyond); } @@ -450,7 +451,7 @@ class Constrained_Delaunay_triangulation_2 OutputItFaces fit, OutputItBoundaryEdges eit, Face_handle start = Face_handle()) const { - CGAL_triangulation_precondition( dimension() == 2); + CGAL_precondition( dimension() == 2); int li; Locate_type lt; Face_handle fh = locate(p,lt,li, start); @@ -469,7 +470,7 @@ class Constrained_Delaunay_triangulation_2 pit = propagate_conflicts(p,fh,2,pit); return pit; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return std::make_pair(fit,eit); } @@ -692,7 +693,7 @@ flip (Face_handle& f, int i) Face_handle g = f->neighbor(i); int j = mirror_index(f,i); - // save wings neighbors to be able to restore contraint status + // save wings neighbors to be able to restore constraint status Face_handle f1 = f->neighbor(cw(i)); int i1 = mirror_index(f,cw(i)); Face_handle f2 = f->neighbor(ccw(i)); @@ -704,7 +705,7 @@ flip (Face_handle& f, int i) // The following precondition prevents the test suit // of triangulation to work on constrained Delaunay triangulation - //CGAL_triangulation_precondition(is_flipable(f,i)); + //CGAL_precondition(is_flipable(f,i)); this->_tds.flip(f, i); // restore constraint status @@ -947,9 +948,9 @@ remove(Vertex_handle v) // remove a vertex and updates the constrained edges of the new faces // precondition : there is no incident constraints { - CGAL_triangulation_precondition( v != Vertex_handle() ); - CGAL_triangulation_precondition( ! is_infinite(v)); - CGAL_triangulation_precondition( ! are_there_incident_constraints(v)); + CGAL_precondition( v != Vertex_handle() ); + CGAL_precondition( ! is_infinite(v)); + CGAL_precondition( ! are_there_incident_constraints(v)); if (dimension() <= 1) Ctr::remove(v); else remove_2D(v); return; @@ -963,7 +964,7 @@ remove(Vertex_handle v) // // insert point p in edge(f,i) // // bypass the precondition for point a to be in edge(f,i) // // update constrained status -// // this member fonction is not robust with exact predicates +// // this member function is not robust with exact predicates // // and approximate construction. Should be removed // { // Vertex_handle vh=Ctr::special_insert_in_edge(a,f,i); @@ -1018,13 +1019,13 @@ Constrained_Delaunay_triangulation_2:: is_valid(bool verbose, int level) const { bool result = Ctr::is_valid(verbose, level); - CGAL_triangulation_assertion( result ); + CGAL_assertion( result ); Finite_faces_iterator fit= finite_faces_begin(); for (; fit != finite_faces_end(); fit++) { for(int i=0;i<3;i++) { result = result && !is_flipable(fit,i, false); - CGAL_triangulation_assertion( result ); + CGAL_assertion( result ); } } return result; diff --git a/thirdparty/CGAL/include/CGAL/Constrained_Delaunay_triangulation_face_base_2.h b/thirdparty/CGAL/include/CGAL/Constrained_Delaunay_triangulation_face_base_2.h index 50785de3..80e7ecf3 100644 --- a/thirdparty/CGAL/include/CGAL/Constrained_Delaunay_triangulation_face_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Constrained_Delaunay_triangulation_face_base_2.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Constrained_Delaunay_triangulation_face_base_2.h $ -// $Id: Constrained_Delaunay_triangulation_face_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Constrained_Delaunay_triangulation_face_base_2.h $ +// $Id: include/CGAL/Constrained_Delaunay_triangulation_face_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jane Tournois, Raul Gallegos @@ -17,7 +17,7 @@ #include -#include +#include #include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Constrained_triangulation_2.h b/thirdparty/CGAL/include/CGAL/Constrained_triangulation_2.h index 9d898428..96e50237 100644 --- a/thirdparty/CGAL/include/CGAL/Constrained_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/Constrained_triangulation_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Constrained_triangulation_2.h $ -// $Id: Constrained_triangulation_2.h 2e67ce5 2023-01-27T20:52:05+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Constrained_triangulation_2.h $ +// $Id: include/CGAL/Constrained_triangulation_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include #include @@ -34,10 +34,31 @@ #include #include -#include #include #include +#ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS +# include +# include +# include +namespace CGAL { + +struct With_point_tag {}; + +template +struct Output_rep, With_point_tag> + : public Output_rep> +{ + using Base = Output_rep>; + using Base::Base; + + std::ostream& operator()(std::ostream& out) const { + return Base::operator()(out) << "= " << this->it->point(); + } +}; +} // namespace CGAL +#endif // CGAL_CDT_2_DEBUG_INTERSECTIONS + namespace CGAL { struct No_constraint_intersection_tag{}; @@ -46,7 +67,7 @@ struct Exact_intersections_tag{}; // to be used with an exact number type struct Exact_predicates_tag{}; // to be used with filtered exact number // This was deprecated and replaced by ` No_constraint_intersection_tag` and `No_constraint_intersection_requiring_constructions_tag` -// due to an inconsistency between the code and the documenation. +// due to an inconsistency between the code and the documentation. struct CGAL_DEPRECATED No_intersection_tag : public No_constraint_intersection_requiring_constructions_tag { }; @@ -74,9 +95,10 @@ namespace internal { template struct Itag { - typedef typename boost::mpl::if_::Is_exact, - Exact_intersections_tag, - Exact_predicates_tag>::type type; + using Is_exact = typename Algebraic_structure_traits::Is_exact; + typedef std::conditional_t type; }; } // namespace internal @@ -204,7 +226,7 @@ class Constrained_triangulation_2 for( ;lcit != lc.end(); lcit++) { insert( (*lcit).first, (*lcit).second); } - CGAL_triangulation_postcondition( is_valid() ); + CGAL_postcondition( is_valid() ); } template @@ -216,7 +238,7 @@ class Constrained_triangulation_2 for ( ; it != last; it++) { insert_constraint((*it).first, (*it).second); } - CGAL_triangulation_postcondition( is_valid() ); + CGAL_postcondition( is_valid() ); } //TODO Is that destructor correct ? @@ -308,11 +330,11 @@ class Constrained_triangulation_2 #if 1 template static decltype(auto) get_source(const Segment_2& segment){ - return segment.source(); + return segment[0]; } template static decltype(auto) get_target(const Segment_2& segment){ - return segment.target(); + return segment[1]; } static const Point& get_source(const Constraint& cst){ @@ -330,12 +352,12 @@ class Constrained_triangulation_2 template void insert_constraint(Vertex_handle vaa, Vertex_handle vbb, OutputIterator out) -// forces the constrained [va,vb] -// [va,vb] will eventually be split into several edges +// forces the constrained [vaa,vbb] +// [vaa,vbb] will potentially be split into several edges // if a vertex vc of t lies on segment ab // of if ab intersect some constrained edges { - CGAL_triangulation_precondition( vaa != vbb); + CGAL_precondition( vaa != vbb); Vertex_handle vi; Face_handle fr; @@ -597,6 +619,13 @@ insert_constraint(Vertex_handle vaa, Vertex_handle vbb, OutputIterator out) return are_there; } +#ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + auto display_vertex(Vertex_handle v) const { + With_point_tag point_tag; + using CGAL::IO::oformat; + return IO::oformat(v, point_tag); + } +#endif // CGAL_CDT_2_DEBUG_INTERSECTIONS template OutputItEdges incident_constraints(Vertex_handle v, @@ -610,7 +639,7 @@ insert_constraint(Vertex_handle vaa, Vertex_handle vbb, OutputIterator out) return out; } - // the following fonctions are overloaded + // the following functions are overloaded // to take care of constraint marks template Vertex_handle star_hole( const Point& p, @@ -799,24 +828,27 @@ insert_constraint(Vertex_handle vaa, Vertex_handle vbb) // if a vertex vc of t lies on segment ab // or if ab intersect some constrained edges { + if(vaa == vbb){ + return; + } std::stack > stack; stack.push(std::make_pair(vaa,vbb)); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_constraint( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_2::insert_constraint( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n"; internal::Indentation_level::Exit_guard exit_guard = CGAL::internal::cdt_2_indent_level.open_new_scope(); #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS while(! stack.empty()){ boost::tie(vaa,vbb) = stack.top(); stack.pop(); - CGAL_triangulation_precondition( vaa != vbb); + CGAL_precondition( vaa != vbb); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_constraint, stack pop=( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_2::insert_constraint, stack pop=( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " ) remaining stack size: " << stack.size() << '\n'; CGAL_assertion(this->is_valid()); @@ -858,12 +890,12 @@ insert_constraint(Vertex_handle vaa, Vertex_handle vbb) if (vi != vaa && vi != vbb) { #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_constraint stack push [vaa, vi] ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vi->time_stamp() << "= " << vi->point() + << "CT_2::insert_constraint stack push [vaa, vi] ( " << display_vertex(vaa) + << " , " << display_vertex(vi) << " )\n"; std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_constraint stack push [vi, vbb] ( #" << vi->time_stamp() << "= " << vi->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_2::insert_constraint stack push [vi, vbb] ( " << display_vertex(vi) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS stack.push(std::make_pair(vaa,vi)); @@ -872,8 +904,8 @@ insert_constraint(Vertex_handle vaa, Vertex_handle vbb) else{ #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_constraint stack push [vaa, vbb]( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_2::insert_constraint stack push [vaa, vbb]( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS stack.push(std::make_pair(vaa,vbb)); @@ -921,8 +953,8 @@ find_intersected_faces(Vertex_handle vaa, // is constrained #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::find_intersected_faces ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_2::find_intersected_faces ( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n" << CGAL::internal::cdt_2_indent_level << "> current constrained edges are:\n"; @@ -1075,9 +1107,9 @@ intersect(Face_handle f, int i, const Point& pc = f->vertex(cw(i))->point(); const Point& pd = f->vertex(ccw(i))->point(); Point pi; - CGAL_triangulation_assertion_code( bool ok = ) + CGAL_assertion_code( bool ok = ) intersection(geom_traits(), pa, pb, pc, pd, pi, itag ); - CGAL_triangulation_assertion(ok); + CGAL_assertion(ok); Vertex_handle vi = virtual_insert(pi, Triangulation::EDGE, f, i); return vi; } @@ -1220,7 +1252,7 @@ insert_intersection(Face_handle f, int i, } #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_intersection, `vi` is ( #" << vi->time_stamp() << "= " << vi->point() + << "CT_2::insert_intersection, `vi` is ( " << display_vertex(vi) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS return vi; @@ -1245,16 +1277,16 @@ intersect(Face_handle f, int i, #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::intersect segment ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() - << " ) with edge ( #"<< vcc->time_stamp() << "= " << vcc->point() - << " , #" << vdd->time_stamp() << "= " << vdd->point() + << "CT_2::intersect segment ( " << display_vertex(vaa) + << " , " << display_vertex(vbb) + << " ) with edge ( " << display_vertex(vcc) + << " , " << display_vertex(vdd) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS Vertex_handle vi = insert_intersection(f, i, vaa, vbb, vcc, vdd, pa, pb, pc, pd, itag); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::intersect, `vi` is ( #" << vi->time_stamp() << "= " << vi->point() + << "CT_2::intersect, `vi` is ( " << display_vertex(vi) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS @@ -1310,7 +1342,7 @@ update_constraints_incident(Vertex_handle va, //dimension() ==2 int cwi, ccwi, indf; Face_circulator fc=incident_faces(va), done(fc); - CGAL_triangulation_assertion(fc != nullptr); + CGAL_assertion(fc != nullptr); do { indf = fc->index(va); cwi=cw(indf); @@ -1358,7 +1390,7 @@ update_constraints_opposite(Vertex_handle va) // update status of edges opposite to a // after insertion of a { - CGAL_triangulation_assertion(dimension()==2); + CGAL_assertion(dimension()==2); Face_handle f=va->face(), start=f; int indf; do { @@ -1465,9 +1497,9 @@ remove(Vertex_handle v) // remove a vertex and updates the constrained edges of the new faces // precondition : there is no incident constraints { - CGAL_triangulation_precondition( v != Vertex_handle() ); - CGAL_triangulation_precondition( ! is_infinite(v)); - CGAL_triangulation_precondition( ! are_there_incident_constraints(v)); + CGAL_precondition( v != Vertex_handle() ); + CGAL_precondition( ! is_infinite(v)); + CGAL_precondition( ! are_there_incident_constraints(v)); if (number_of_vertices() == 1) remove_first(v); else if (number_of_vertices() == 2) remove_second(v); @@ -1859,16 +1891,16 @@ compute_intersection(const Gt& gt, #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS typedef typename Gt::Segment_2 Segment_2; if(result){ - if (const Segment_2* s = boost::get(&*result)){ + if (const Segment_2* s = std::get_if(&*result)){ std::cerr << CGAL::internal::cdt_2_indent_level << "compute_intersection: " << *s << '\n'; - }else if(const Point_2* p = boost::get(&*result)) + }else if(const Point_2* p = std::get_if(&*result)) std::cerr << CGAL::internal::cdt_2_indent_level << "compute_intersection: " << *p << '\n'; } #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS if(result){ - if(const Point_2* p = boost::get(&*result)){ + if(const Point_2* p = std::get_if(&*result)){ pi = *p; return true; } diff --git a/thirdparty/CGAL/include/CGAL/Constrained_triangulation_face_base_2.h b/thirdparty/CGAL/include/CGAL/Constrained_triangulation_face_base_2.h index d521f88b..b9258938 100644 --- a/thirdparty/CGAL/include/CGAL/Constrained_triangulation_face_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Constrained_triangulation_face_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Constrained_triangulation_face_base_2.h $ -// $Id: Constrained_triangulation_face_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Constrained_triangulation_face_base_2.h $ +// $Id: include/CGAL/Constrained_triangulation_face_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -16,7 +16,7 @@ #include -#include +#include #include namespace CGAL { @@ -109,7 +109,7 @@ inline void Constrained_triangulation_face_base_2:: set_constraint(int i, bool b) { - CGAL_triangulation_precondition( i == 0 || i == 1 || i == 2); + CGAL_precondition( i == 0 || i == 1 || i == 2); C[i] = b; } diff --git a/thirdparty/CGAL/include/CGAL/Constrained_triangulation_plus_2.h b/thirdparty/CGAL/include/CGAL/Constrained_triangulation_plus_2.h index b423edee..ade9fe9e 100644 --- a/thirdparty/CGAL/include/CGAL/Constrained_triangulation_plus_2.h +++ b/thirdparty/CGAL/include/CGAL/Constrained_triangulation_plus_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h $ -// $Id: Constrained_triangulation_plus_2.h 561cc66 2022-06-29T12:30:35+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h $ +// $Id: include/CGAL/Constrained_triangulation_plus_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,12 +18,11 @@ #include #include -#include +#include #include #include #include #include -#include #include #include @@ -31,6 +30,7 @@ #include #include +#include namespace CGAL { @@ -129,6 +129,10 @@ Default::Get< Tr_, Constrained_Delaunay_triangulation_2< using Triangulation::is_infinite; using Triangulation::number_of_vertices; #endif +#ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + using Triangulation::display_vertex; +#endif // CGAL_CDT_2_DEBUG_INTERSECTIONS + typedef typename Triangulation::Edge Edge; typedef typename Triangulation::Vertex Vertex; @@ -232,7 +236,7 @@ Default::Get< Tr_, Constrained_Delaunay_triangulation_2< , hierarchy(Vh_less_xy(this)) { insert_constraints(first, last); - CGAL_triangulation_postcondition( this->is_valid() ); + CGAL_postcondition( this->is_valid() ); } @@ -242,7 +246,7 @@ Default::Get< Tr_, Constrained_Delaunay_triangulation_2< , hierarchy(Vh_less_xy(this)) { insert_constraints(constraints.begin(), constraints.end()); - CGAL_triangulation_postcondition( this->is_valid() ); + CGAL_postcondition( this->is_valid() ); } //Helping void clear() { Base::clear(); hierarchy.clear(); } @@ -275,8 +279,8 @@ Default::Get< Tr_, Constrained_Delaunay_triangulation_2< { #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint( #" << va->time_stamp() << "= " << va->point() - << " , #" << vb->time_stamp() << "= " << vb->point() + << "CT_plus_2::insert_constraint( " << display_vertex(va) + << " , " << display_vertex(vb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS // protects against inserting a zero length constraint @@ -578,7 +582,7 @@ Default::Get< Tr_, Constrained_Delaunay_triangulation_2< insert_incident_faces(vcit, out); } //AF vertices_in_constraint_begin(ca)->fixed() = true; - // Vertices_in_constraint_iterator end = boost::prior(vertices_in_constraint_end(ca)); + // Vertices_in_constraint_iterator end = std::prev(vertices_in_constraint_end(ca)); // end->fixed() = true; fc.write_faces(out); @@ -749,8 +753,8 @@ Default::Get< Tr_, Constrained_Delaunay_triangulation_2< void simplify(Vertices_in_constraint_iterator v) { - Vertices_in_constraint_iterator u = boost::prior(v); - Vertices_in_constraint_iterator w = boost::next(v); + Vertices_in_constraint_iterator u = std::prev(v); + Vertices_in_constraint_iterator w = std::next(v); bool unew = (*u != *w); hierarchy.simplify(u,v,w); @@ -883,13 +887,13 @@ insert_subconstraint(Vertex_handle vaa, { #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_subconstraint( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_subconstraint( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n"; internal::Indentation_level::Exit_guard exit_guard = CGAL::internal::cdt_2_indent_level.open_new_scope(); std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint stack push [va, vb] ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_constraint stack push [va, vb] ( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS std::stack > stack; @@ -898,11 +902,11 @@ insert_subconstraint(Vertex_handle vaa, while(! stack.empty()){ boost::tie(vaa,vbb) = stack.top(); stack.pop(); - CGAL_triangulation_precondition( vaa != vbb); + CGAL_precondition( vaa != vbb); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_subconstraint, stack pop=( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_subconstraint, stack pop=( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " ) remaining stack size: " << stack.size() << '\n'; CGAL_assertion(this->is_valid()); @@ -914,8 +918,8 @@ insert_subconstraint(Vertex_handle vaa, if(this->includes_edge(vaa,vbb,vi,fr,i)) { #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_subconstraint, the segment ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_subconstraint, the segment ( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " ) is an edge with #" << vi->time_stamp() << "= " << vi->point() << '\n'; @@ -925,8 +929,8 @@ insert_subconstraint(Vertex_handle vaa, hierarchy.split_constraint(vaa,vbb,vi); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint (includes_edge) stack push [vi, vbb] ( #" << vi->time_stamp() << "= " << vi->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_constraint (includes_edge) stack push [vi, vbb] ( " << display_vertex(vi) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS stack.push(std::make_pair(vi,vbb)); @@ -949,12 +953,12 @@ insert_subconstraint(Vertex_handle vaa, hierarchy.split_constraint(vaa,vbb,vi); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint stack push [vaa, vi] ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vi->time_stamp() << "= " << vi->point() + << "CT_plus_2::insert_constraint stack push [vaa, vi] ( " << display_vertex(vaa) + << " , " << display_vertex(vi) << " )\n"; std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint stack push [vi, vbb] ( #" << vi->time_stamp() << "= " << vi->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_constraint stack push [vi, vbb] ( " << display_vertex(vi) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS stack.push(std::make_pair(vaa,vi)); @@ -963,8 +967,8 @@ insert_subconstraint(Vertex_handle vaa, else { #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint stack push [vaa, vbb]( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_constraint stack push [vaa, vbb]( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS stack.push(std::make_pair(vaa,vbb)); @@ -1055,7 +1059,7 @@ copy_triangulation(const Constrained_triangulation_plus_2 &ctp) Vertex_iterator vit = ctp.vertices_begin(); Vertex_iterator vvit = this->vertices_begin(); for( ; vit != ctp.vertices_end(); ++vit, ++vvit) { - CGAL_triangulation_assertion(vit->point() == vvit->point()); + CGAL_assertion(vit->point() == vvit->point()); vmap[vit] = vvit; } hierarchy.copy(ctp.hierarchy, vmap); @@ -1092,7 +1096,7 @@ insert(const Point& a, Locate_type lt, Face_handle loc, int li) if ( lt == Triangulation::EDGE && loc->is_constrained(li) ) { - if(boost::is_same::value) + if(std::is_same::value) throw typename Tr::Intersection_of_constraints_exception(); insert_in_constrained_edge = true; @@ -1167,12 +1171,12 @@ intersect(Face_handle f, int i, Vertex_handle vcc, vdd; vcc = f->vertex(cw(i)); vdd = f->vertex(ccw(i)); - CGAL_triangulation_assertion_code( bool b1 = ) + CGAL_assertion_code( bool b1 = ) hierarchy.enclosing_constraint(vcc,vdd,vc,vd); - CGAL_triangulation_assertion_code( bool b2 = ) + CGAL_assertion_code( bool b2 = ) hierarchy.enclosing_constraint(vaa,vbb,va,vb); - CGAL_triangulation_assertion(b1); - CGAL_triangulation_assertion(b2); + CGAL_assertion(b1); + CGAL_assertion(b2); const Point& pa = va->point(); const Point& pb = vb->point(); @@ -1180,23 +1184,23 @@ intersect(Face_handle f, int i, const Point& pd = vd->point(); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::intersect segment ( #" << va->time_stamp() << "= " << va->point() - << " , #" << vb->time_stamp() << "= " << vb->point() + << "CT_plus_2::intersect segment ( " << display_vertex(va) + << " , " << display_vertex(vb) << " ) with edge ( #"<< vc->time_stamp() << "= " << vc->point() - << " , #" << vd->time_stamp() << "= " << vd->point() + << " , " << display_vertex(vd) << " , Exact_intersections_tag)\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS Point pi(ORIGIN); // initialize although we are sure that it will be // set by the intersection, but to quiet a warning Intersection_tag itag = Intersection_tag(); - CGAL_triangulation_assertion_code( bool ok = ) + CGAL_assertion_code( bool ok = ) intersection(geom_traits(), pa, pb, pc, pd, pi, itag ); - CGAL_triangulation_assertion(ok); + CGAL_assertion(ok); Vertex_handle vi = insert(pi, Triangulation::EDGE, f, i); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::intersect, `vi` is ( #" << vi->time_stamp() << "= " << vi->point() + << "CT_plus_2::intersect, `vi` is ( " << display_vertex(vi) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS return vi; @@ -1220,10 +1224,10 @@ intersect(Face_handle f, int i, const Point& pd = vdd->point(); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::intersect segment ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::intersect segment ( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " ) with edge ( #"<< vcc->time_stamp() << "= " << vcc->point() - << " , #" << vdd->time_stamp() << "= " << vdd->point() + << " , " << display_vertex(vdd) << " , Exact_predicates_tag)\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS diff --git a/thirdparty/CGAL/include/CGAL/Constrained_voronoi_diagram_2.h b/thirdparty/CGAL/include/CGAL/Constrained_voronoi_diagram_2.h index 49ca463c..f517f96d 100644 --- a/thirdparty/CGAL/include/CGAL/Constrained_voronoi_diagram_2.h +++ b/thirdparty/CGAL/include/CGAL/Constrained_voronoi_diagram_2.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Constrained_voronoi_diagram_2.h $ -// $Id: Constrained_voronoi_diagram_2.h 7e3af5c 2021-09-10T11:26:53+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Constrained_voronoi_diagram_2.h $ +// $Id: include/CGAL/Constrained_voronoi_diagram_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jane Tournois, Raul Gallegos, Pierre Alliez @@ -21,6 +21,7 @@ #include #include #include +#include #include namespace CGAL { @@ -145,7 +146,7 @@ class Cvd_cell_2 // Cdt should be of the type Constrained_Delaunay_triangulation_2 -// and the face base shoul be Constrained_Delaunay_triangulation_face_base_2 +// and the face base should be Constrained_Delaunay_triangulation_face_base_2 template class Constrained_voronoi_diagram_2 { @@ -415,8 +416,8 @@ template Cvd_cell_2 dual(const Tr& tr, const typename Tr::Vertex_handle& v) { - CGAL_triangulation_precondition( v != typename Tr::Vertex_handle()); - CGAL_triangulation_precondition( !tr.is_infinite(v)); + CGAL_precondition( v != typename Tr::Vertex_handle()); + CGAL_precondition( !tr.is_infinite(v)); Constrained_voronoi_diagram_2 diagram(tr); return diagram.cvd_cell(v); @@ -436,8 +437,8 @@ Cvd_cell_2 dual(const Tr& tr, // typedef Tr::Geom_traits::Ray_2 Ray; // typedef Tr::Geom_traits::Vector_2 Vector_2; // -// CGAL_triangulation_precondition( v != Vertex_handle()); -// CGAL_triangulation_precondition( !tr.is_infinite(v)); +// CGAL_precondition( v != Vertex_handle()); +// CGAL_precondition( !tr.is_infinite(v)); // // // The Circulator moves ccw. // std::vector segments; diff --git a/thirdparty/CGAL/include/CGAL/Construct_theta_graph_2.h b/thirdparty/CGAL/include/CGAL/Construct_theta_graph_2.h index 79616a86..270ac1f4 100644 --- a/thirdparty/CGAL/include/CGAL/Construct_theta_graph_2.h +++ b/thirdparty/CGAL/include/CGAL/Construct_theta_graph_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h $ -// $Id: Construct_theta_graph_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h $ +// $Id: include/CGAL/Construct_theta_graph_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -88,7 +88,7 @@ class Construct_theta_graph_2 { \param k Number of cones to divide space into \param initial_direction A direction denoting one of the rays dividing the - cones. This allows arbitary rotations of the rays that divide + cones. This allows arbitrary rotations of the rays that divide the plane. (default: positive x-axis) \param cones_selected Indicates whether even, odd or all cones are selected to construct graph. diff --git a/thirdparty/CGAL/include/CGAL/Construct_yao_graph_2.h b/thirdparty/CGAL/include/CGAL/Construct_yao_graph_2.h index dd156304..fb3171c8 100644 --- a/thirdparty/CGAL/include/CGAL/Construct_yao_graph_2.h +++ b/thirdparty/CGAL/include/CGAL/Construct_yao_graph_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h $ -// $Id: Construct_yao_graph_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h $ +// $Id: include/CGAL/Construct_yao_graph_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -82,7 +82,7 @@ class Construct_yao_graph_2 { \param k Number of cones to divide space into \param initial_direction A direction denoting one of the rays dividing the - cones. This allows arbitary rotations of the rays that divide + cones. This allows arbitrary rotations of the rays that divide the plane. (default: positive x-axis) \param cones_selected Indicates whether even, odd or all cones are selected to construct graph. diff --git a/thirdparty/CGAL/include/CGAL/Container_helper.h b/thirdparty/CGAL/include/CGAL/Container_helper.h index 55c2adb0..f8305576 100644 --- a/thirdparty/CGAL/include/CGAL/Container_helper.h +++ b/thirdparty/CGAL/include/CGAL/Container_helper.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Container_helper.h $ -// $Id: Container_helper.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Container_helper.h $ +// $Id: include/CGAL/Container_helper.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,9 +17,9 @@ #include #include -#include #include +#include namespace CGAL { namespace internal { @@ -30,7 +30,7 @@ CGAL_GENERATE_MEMBER_DETECTOR(resize); // Typical container template void resize(Container& c, std::size_t size, - typename boost::enable_if_c::value>::type* = nullptr) + std::enable_if_t::value>* = nullptr) { c.resize(size); } @@ -38,10 +38,8 @@ void resize(Container& c, std::size_t size, // Container without a resize() function, but with a size() function (e.g. an array) template void resize(Container& CGAL_assertion_code(array), std::size_t CGAL_assertion_code(size), - typename boost::enable_if< - boost::mpl::and_< - boost::mpl::not_ >, - has_size > >::type* = nullptr) + std::enable_if_t::value && + has_size::value >* = nullptr) { CGAL_assertion(array.size() == size); } @@ -49,9 +47,9 @@ void resize(Container& CGAL_assertion_code(array), std::size_t CGAL_assertion_co // A class with neither resize() nor size(), can't enforce size (it better be correct!) template void resize(Container&, std::size_t, - typename boost::disable_if< - boost::mpl::or_, - has_size > >::type* = nullptr) + std::enable_if_t< + !(has_resize::value || + has_size::value)>* = nullptr) { } @@ -62,7 +60,7 @@ CGAL_GENERATE_MEMBER_DETECTOR(reserve); // Container with 'reserve' template void reserve(Container& c, std::size_t size, - typename boost::enable_if_c::value>::type* = nullptr) + std::enable_if_t::value>* = nullptr) { c.reserve(size); } @@ -70,7 +68,7 @@ void reserve(Container& c, std::size_t size, // Container with no 'reserve' template void reserve(Container&, std::size_t, - typename boost::disable_if_c::value>::type* = nullptr) + std::enable_if_t::value>* = nullptr) { } diff --git a/thirdparty/CGAL/include/CGAL/Converting_construction.h b/thirdparty/CGAL/include/CGAL/Converting_construction.h new file mode 100644 index 00000000..0114fa40 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Converting_construction.h @@ -0,0 +1,64 @@ +// Copyright (c) 2022 GeometryFactory Sarl (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Converting_construction.h $ +// $Id: include/CGAL/Converting_construction.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Laurent Rineau + +#ifndef CGAL_CONVERTING_CONSTRUCTION_H +#define CGAL_CONVERTING_CONSTRUCTION_H + +#include +#include +#include +#include + +namespace CGAL { + +template +struct Converting_construction +{ + CGAL_NO_UNIQUE_ADDRESS Source_construction source_construction; + CGAL_NO_UNIQUE_ADDRESS Target_construction construct; + CGAL_NO_UNIQUE_ADDRESS Converter convert; + CGAL_NO_UNIQUE_ADDRESS Backward_converter backward_convert; + + template ::value>* = nullptr> + decltype(auto) operator()(Args&&... args) const { + return source_construction(std::forward(args)...); + } + + template ::value>* = nullptr> + auto operator()(Args&&... args) const { + return backward_convert(construct(convert(args)...)); + } +}; + +template +struct Converting_constructions_kernel_adaptor : public Kernel_A +{ + using A_to_B = Cartesian_converter; + using B_to_A = Cartesian_converter; + +#define CGAL_Kernel_cons(C,Cf) \ + using C = Converting_construction; \ + C Cf() const { return C(); } + +#include + +}; + +} // end namespace CGAL + +#endif // CGAL_CONVERTING_CONSTRUCTION_H diff --git a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Edge_sorter.h b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Edge_sorter.h index 6e902411..8a253462 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Edge_sorter.h +++ b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Edge_sorter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Edge_sorter.h $ -// $Id: Edge_sorter.h 1a08127 2020-11-18T07:43:12+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Edge_sorter.h $ +// $Id: include/CGAL/Convex_decomposition_3/Edge_sorter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/External_structure_builder.h b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/External_structure_builder.h index 1bad1d03..b604e05f 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/External_structure_builder.h +++ b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/External_structure_builder.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/External_structure_builder.h $ -// $Id: External_structure_builder.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/External_structure_builder.h $ +// $Id: include/CGAL/Convex_decomposition_3/External_structure_builder.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,6 +17,7 @@ #include +#include #include #undef CGAL_NEF_DEBUG diff --git a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Insert_vertex_into_edge.h b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Insert_vertex_into_edge.h index 3f4cf2e3..33b88ded 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Insert_vertex_into_edge.h +++ b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Insert_vertex_into_edge.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Insert_vertex_into_edge.h $ -// $Id: Insert_vertex_into_edge.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Insert_vertex_into_edge.h $ +// $Id: include/CGAL/Convex_decomposition_3/Insert_vertex_into_edge.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Ray_hit_generator.h b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Ray_hit_generator.h index ef7b49f7..59d1c772 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Ray_hit_generator.h +++ b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Ray_hit_generator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Ray_hit_generator.h $ -// $Id: Ray_hit_generator.h 1172c9d 2022-03-29T17:48:17+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Ray_hit_generator.h $ +// $Id: include/CGAL/Convex_decomposition_3/Ray_hit_generator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,6 +17,7 @@ #include #include +#include #include #include diff --git a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Ray_hit_generator2.h b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Ray_hit_generator2.h index 7662c69e..6090092d 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Ray_hit_generator2.h +++ b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Ray_hit_generator2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Ray_hit_generator2.h $ -// $Id: Ray_hit_generator2.h 1172c9d 2022-03-29T17:48:17+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Ray_hit_generator2.h $ +// $Id: include/CGAL/Convex_decomposition_3/Ray_hit_generator2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Reflex_edge_searcher.h b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Reflex_edge_searcher.h index f0ecfa02..7db97aac 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Reflex_edge_searcher.h +++ b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Reflex_edge_searcher.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Reflex_edge_searcher.h $ -// $Id: Reflex_edge_searcher.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Reflex_edge_searcher.h $ +// $Id: include/CGAL/Convex_decomposition_3/Reflex_edge_searcher.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Reflex_vertex_searcher.h b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Reflex_vertex_searcher.h index b613a4b1..91c065dc 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Reflex_vertex_searcher.h +++ b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Reflex_vertex_searcher.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Reflex_vertex_searcher.h $ -// $Id: Reflex_vertex_searcher.h 4229fa4 2021-04-27T22:34:01+01:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Reflex_vertex_searcher.h $ +// $Id: include/CGAL/Convex_decomposition_3/Reflex_vertex_searcher.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/SFace_separator.h b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/SFace_separator.h index 6fd4782e..27fe7d48 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/SFace_separator.h +++ b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/SFace_separator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/SFace_separator.h $ -// $Id: SFace_separator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/SFace_separator.h $ +// $Id: include/CGAL/Convex_decomposition_3/SFace_separator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,8 +14,9 @@ #include - +#include #include +#include #include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/SM_walls.h b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/SM_walls.h index 6dbb43af..df747c8a 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/SM_walls.h +++ b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/SM_walls.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/SM_walls.h $ -// $Id: SM_walls.h 30e536b 2021-03-01T08:06:48+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/SM_walls.h $ +// $Id: include/CGAL/Convex_decomposition_3/SM_walls.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,6 +14,8 @@ #include +#include +#include #undef CGAL_NEF_DEBUG #define CGAL_NEF_DEBUG 227 diff --git a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Single_wall_creator.h b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Single_wall_creator.h index 3affe86c..01351fcb 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Single_wall_creator.h +++ b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Single_wall_creator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Single_wall_creator.h $ -// $Id: Single_wall_creator.h 6831403 2021-09-29T11:47:08+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Single_wall_creator.h $ +// $Id: include/CGAL/Convex_decomposition_3/Single_wall_creator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Single_wall_creator2.h b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Single_wall_creator2.h index 5ae79234..2d1da44d 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Single_wall_creator2.h +++ b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Single_wall_creator2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Single_wall_creator2.h $ -// $Id: Single_wall_creator2.h 30e536b 2021-03-01T08:06:48+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Single_wall_creator2.h $ +// $Id: include/CGAL/Convex_decomposition_3/Single_wall_creator2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,10 +14,12 @@ #include - +#include #include +#include #include #include +#include #include #undef CGAL_NEF_DEBUG diff --git a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Single_wall_creator3.h b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Single_wall_creator3.h index 46dbd870..f077ae91 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Single_wall_creator3.h +++ b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/Single_wall_creator3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Single_wall_creator3.h $ -// $Id: Single_wall_creator3.h 30e536b 2021-03-01T08:06:48+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Single_wall_creator3.h $ +// $Id: include/CGAL/Convex_decomposition_3/Single_wall_creator3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,10 +14,12 @@ #include - +#include #include +#include #include #include +#include #include #undef CGAL_NEF_DEBUG diff --git a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/YVertical_wall_builder.h b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/YVertical_wall_builder.h index ab83dfba..c51655a3 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/YVertical_wall_builder.h +++ b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/YVertical_wall_builder.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/YVertical_wall_builder.h $ -// $Id: YVertical_wall_builder.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/YVertical_wall_builder.h $ +// $Id: include/CGAL/Convex_decomposition_3/YVertical_wall_builder.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,8 +14,9 @@ #include - -#include +#include +#include +#include #include #include diff --git a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/is_reflex_sedge.h b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/is_reflex_sedge.h index 4854593b..0a29955e 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/is_reflex_sedge.h +++ b/thirdparty/CGAL/include/CGAL/Convex_decomposition_3/is_reflex_sedge.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/is_reflex_sedge.h $ -// $Id: is_reflex_sedge.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/is_reflex_sedge.h $ +// $Id: include/CGAL/Convex_decomposition_3/is_reflex_sedge.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,6 +14,8 @@ #include +#include +#include #undef CGAL_NEF_DEBUG #define CGAL_NEF_DEBUG 239 diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h b/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h index 38dbeff2..803220f0 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h $ -// $Id: ch_akl_toussaint_impl.h 21755b1 2021-03-24T15:05:41+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h $ +// $Id: include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ #include #endif // CGAL_CH_NO_POSTCONDITIONS -#include +#include #include #include #include @@ -220,8 +220,6 @@ ch_akl_toussaint(ForwardIterator first, ForwardIterator last, OutputIterator result, const Traits& ch_traits) { - using namespace boost; - typedef typename Traits::Point_2 Point_2; typedef typename Traits::Left_turn_2 Left_of_line; // added @@ -254,7 +252,7 @@ ch_akl_toussaint(ForwardIterator first, ForwardIterator last, region3.push_back( *e); region4.push_back( *n); - CGAL_ch_postcondition_code( ForwardIterator save_first = first; ) + CGAL_postcondition_code( ForwardIterator save_first = first; ) int duplicated_exteme_points = (std::get<0>(ranges)==std::get<1>(ranges)?1:0) + (std::get<1>(ranges)==std::get<2>(ranges)?1:0) + @@ -325,12 +323,12 @@ ch_akl_toussaint(ForwardIterator first, ForwardIterator last, res, ch_traits); } - CGAL_ch_postcondition_code( first = save_first; ) - CGAL_ch_postcondition( \ + CGAL_postcondition_code( first = save_first; ) + CGAL_postcondition( \ is_ccw_strongly_convex_2( res.output_so_far_begin(), \ res.output_so_far_end(), \ ch_traits)); - CGAL_ch_expensive_postcondition( \ + CGAL_expensive_postcondition( \ ch_brute_force_check_2( \ first, last, \ res.output_so_far_begin(), res.output_so_far_end(), \ diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_bykat_impl.h b/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_bykat_impl.h index 572bdb92..cfd7304e 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_bykat_impl.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_bykat_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/Convex_hull_2/ch_bykat_impl.h $ -// $Id: ch_bykat_impl.h 21755b1 2021-03-24T15:05:41+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/Convex_hull_2/ch_bykat_impl.h $ +// $Id: include/CGAL/Convex_hull_2/ch_bykat_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ #include #endif // CGAL_CH_NO_POSTCONDITIONS -#include +#include #include #include #include @@ -34,15 +34,16 @@ ch_bykat(InputIterator first, InputIterator last, OutputIterator result, const Traits& ch_traits) { - using namespace boost; + typedef typename Traits::Point_2 Point_2; - typedef typename Traits::Point_2 Point_2; - typedef typename Traits::Left_turn_2 Left_turn_2; - typedef typename Traits::Less_signed_distance_to_line_2 Less_dist; - typedef typename Traits::Equal_2 Equal_2; + typedef typename Traits::Compare_signed_distance_to_line_2 Compare_dist_2; + typedef typename Traits::Equal_2 Equal_2; + typedef typename Traits::Left_turn_2 Left_turn_2; + typedef typename Traits::Less_xy_2 Less_xy_2; - Left_turn_2 left_turn = ch_traits.left_turn_2_object(); - Equal_2 equal_points = ch_traits.equal_2_object(); + Equal_2 equal_points = ch_traits.equal_2_object(); + Left_turn_2 left_turn = ch_traits.left_turn_2_object(); + Less_xy_2 less_xy = ch_traits.less_xy_2_object(); if (first == last) return result; @@ -79,12 +80,24 @@ ch_bykat(InputIterator first, InputIterator last, for (;;) { - // This functor must be in the for loop so that the Convex_hull_constructive traits_2 works correctly - Less_dist less_dist = ch_traits.less_signed_distance_to_line_2_object(); + // This functor must be in the for loop so that the Convex_hull_constructive traits_2 works correctly + Compare_dist_2 cmp_dist = ch_traits.compare_signed_distance_to_line_2_object(); + if ( l != r) { - Point_2 c = *std::min_element( l, r, [&less_dist,&a,&b](const Point_2&p1, const Point_2& p2) - { return less_dist(a, b, p1, p2); }); + // We need the farthest point, but since we are on the right side of the line, + // signed distances are negative. Hence std::min_element. + auto less_dist = [&a, &b, &cmp_dist, &less_xy](const Point_2&p1, const Point_2& p2) -> bool + { + CGAL::Comparison_result res = cmp_dist(a, b, p1, p2); + if(res == CGAL::EQUAL) + return less_xy(p1, p2); + + return (res == CGAL::SMALLER); + }; + + Point_2 c = *std::min_element( l, r, less_dist); + H.push_back( b ); L.push_back( l ); R.push_back( l = std::partition(l, r, [&left_turn,&c,&b](const Point_2&p) @@ -103,11 +116,11 @@ ch_bykat(InputIterator first, InputIterator last, r = R.back(); R.pop_back(); } } - CGAL_ch_postcondition( \ + CGAL_postcondition( \ is_ccw_strongly_convex_2( res.output_so_far_begin(), \ res.output_so_far_end(), \ ch_traits)); - CGAL_ch_expensive_postcondition( \ + CGAL_expensive_postcondition( \ ch_brute_force_check_2( \ P.begin(), P.end(), \ res.output_so_far_begin(), res.output_so_far_end(), \ @@ -126,17 +139,18 @@ ch_bykat_with_threshold(InputIterator first, InputIterator last, OutputIterator result, const Traits& ch_traits) { - using namespace boost; + typedef typename Traits::Point_2 Point_2; + + typedef typename Traits::Compare_signed_distance_to_line_2 Compare_dist_2; + typedef typename Traits::Equal_2 Equal_2; + typedef typename Traits::Left_turn_2 Left_turn_2; + typedef typename Traits::Less_xy_2 Less_xy_2; - typedef typename Traits::Point_2 Point_2; - typedef typename Traits::Left_turn_2 Left_turn_2; - typedef typename Traits::Less_signed_distance_to_line_2 - Less_dist; - typedef typename std::vector< Point_2 >::iterator - PointIterator; - typedef typename Traits::Equal_2 Equal_2; + typedef typename std::vector< Point_2 >::iterator PointIterator; - Equal_2 equal_points = ch_traits.equal_2_object(); + Equal_2 equal_points = ch_traits.equal_2_object(); + Left_turn_2 left_turn = ch_traits.left_turn_2_object(); + Less_xy_2 less_xy = ch_traits.less_xy_2_object(); if (first == last) return result; @@ -172,21 +186,33 @@ ch_bykat_with_threshold(InputIterator first, InputIterator last, #endif // no postconditions ... H.push_back( a ); L.push_back( Pbegin ); - Left_turn_2 left_turn = ch_traits.left_turn_2_object(); R.push_back( l = std::partition( Pbegin, Pend, [&left_turn,&a,&b](const Point_2&p) { return left_turn(a, b, p); })); r = std::partition( l, Pend, [&left_turn,&a,&b](const Point_2&p) { return left_turn(b, a, p); }); - Less_dist less_dist = ch_traits.less_signed_distance_to_line_2_object(); for (;;) { + // This functor must be in the for loop so that the Convex_hull_constructive traits_2 works correctly + Compare_dist_2 cmp_dist = ch_traits.compare_signed_distance_to_line_2_object(); + if ( l != r) { if ( r-l > CGAL_ch_THRESHOLD ) { - Point_2 c = *std::min_element( l, r, [&less_dist,&a,&b](const Point_2&p1, const Point_2& p2) - { return less_dist(a, b, p1, p2); }); + // We need the farthest point, but since we are on the right side of the line, + // signed distances are negative. Hence std::min_element. + auto less_dist = [&a, &b, &cmp_dist, &less_xy](const Point_2&p1, const Point_2& p2) -> bool + { + CGAL::Comparison_result res = cmp_dist(a, b, p1, p2); + if(res == CGAL::EQUAL) + return less_xy(p1, p2); + + return (res == CGAL::SMALLER); + }; + + Point_2 c = *std::min_element( l, r, less_dist); + H.push_back( b ); L.push_back( l ); R.push_back( l = std::partition(l, r, [&left_turn,&c,&b](const Point_2&p) @@ -199,15 +225,14 @@ ch_bykat_with_threshold(InputIterator first, InputIterator last, { std::swap( a, *--l); std::swap( b, *++r); - if ( ch_traits.less_xy_2_object()(*l,*r) ) + if ( less_xy(*l,*r) ) { - std::sort(std::next(l), r, - ch_traits.less_xy_2_object() ); + std::sort(std::next(l), r, less_xy); } else { - std::sort(std::next(l), r, [&ch_traits](const Point_2&p1, const Point_2& p2) - { return ch_traits.less_xy_2_object()(p2, p1); }); + std::sort(std::next(l), r, [&less_xy](const Point_2&p1, const Point_2& p2) + { return less_xy(p2, p1); }); } ch__ref_graham_andrew_scan(l, std::next(r), res, ch_traits); std::swap( a, *l); @@ -230,11 +255,11 @@ ch_bykat_with_threshold(InputIterator first, InputIterator last, r = R.back(); R.pop_back(); } } - CGAL_ch_postcondition( \ + CGAL_postcondition( \ is_ccw_strongly_convex_2( res.output_so_far_begin(), \ res.output_so_far_end(), \ ch_traits)); - CGAL_ch_expensive_postcondition( \ + CGAL_expensive_postcondition( \ ch_brute_force_check_2( \ Pbegin, Pend, \ res.output_so_far_begin(), res.output_so_far_end(), \ diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_eddy_impl.h b/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_eddy_impl.h index ea574b75..23df6250 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_eddy_impl.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_eddy_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/Convex_hull_2/ch_eddy_impl.h $ -// $Id: ch_eddy_impl.h c4ad713 2021-01-05T11:40:22+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/Convex_hull_2/ch_eddy_impl.h $ +// $Id: include/CGAL/Convex_hull_2/ch_eddy_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ #include #endif // CGAL_CH_NO_POSTCONDITIONS -#include +#include #include #include #include @@ -34,27 +34,39 @@ ch__recursive_eddy(List& L, ListIterator a_it, ListIterator b_it, const Traits& ch_traits) { - using namespace boost; + typedef typename Traits::Point_2 Point_2; - typedef typename Traits::Point_2 Point_2; - typedef typename Traits::Left_turn_2 Left_turn_2; - typedef typename Traits::Less_signed_distance_to_line_2 Less_dist; + typedef typename Traits::Compare_signed_distance_to_line_2 Compare_dist_2; + typedef typename Traits::Less_xy_2 Less_xy_2; + typedef typename Traits::Left_turn_2 Left_turn_2; - Left_turn_2 left_turn = ch_traits.left_turn_2_object(); + Compare_dist_2 cmp_dist = ch_traits.compare_signed_distance_to_line_2_object(); + Left_turn_2 left_turn = ch_traits.left_turn_2_object(); + Less_xy_2 less_xy = ch_traits.less_xy_2_object(); - CGAL_ch_precondition( \ + CGAL_precondition( \ std::find_if(a_it, b_it, \ [&left_turn, a_it, b_it](const Point_2& p) { return left_turn(*b_it, *a_it, p); }) \ != b_it ); + const Point_2& a = *a_it; + const Point_2& b = *b_it; ListIterator f_it = std::next(a_it); - Less_dist less_dist = ch_traits.less_signed_distance_to_line_2_object(); - ListIterator - c_it = std::min_element( f_it, b_it, // max before - [&less_dist, a_it, b_it](const Point_2& p1, const Point_2& p2) - { return less_dist(*a_it, *b_it, p1, p2); }); + + // We need the farthest point, but since we are on the right side of the line, + // signed distances are negative. Hence std::min_element. + auto less_dist = [&a, &b, &cmp_dist, &less_xy](const Point_2&p1, const Point_2& p2) -> bool + { + CGAL::Comparison_result res = cmp_dist(a, b, p1, p2); + if(res == CGAL::EQUAL) + return less_xy(p1, p2); + + return (res == CGAL::SMALLER); + }; + + ListIterator c_it = std::min_element( f_it, b_it, less_dist); Point_2 c = *c_it; c_it = std::partition(f_it, b_it, [&left_turn, &c, a_it](const Point_2& p) @@ -80,8 +92,6 @@ ch_eddy(InputIterator first, InputIterator last, OutputIterator result, const Traits& ch_traits) { - using namespace boost; - typedef typename Traits::Point_2 Point_2; typedef typename Traits::Left_turn_2 Left_turn_2; typedef typename Traits::Equal_2 Equal_2; @@ -127,9 +137,9 @@ ch_eddy(InputIterator first, InputIterator last, ch__recursive_eddy( L, e, w, ch_traits); - CGAL_ch_postcondition( \ + CGAL_postcondition( \ is_ccw_strongly_convex_2( L.begin(), w, ch_traits) ); - CGAL_ch_expensive_postcondition( \ + CGAL_expensive_postcondition( \ ch_brute_force_check_2( first, last, \ L.begin(), w, ch_traits ) ); diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h b/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h index 1d598343..3305ead6 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h $ -// $Id: ch_graham_andrew_impl.h 5a36ff8 2020-12-04T08:02:26+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h $ +// $Id: include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,7 @@ #include #endif // CGAL_CH_NO_POSTCONDITIONS -#include +#include #include #include #include @@ -42,11 +42,11 @@ ch_graham_andrew_scan( BidirectionalIterator first, BidirectionalIterator alpha; BidirectionalIterator beta; BidirectionalIterator iter; - CGAL_ch_precondition( first != last ); - CGAL_ch_precondition( std::next(first) != last ); + CGAL_precondition( first != last ); + CGAL_precondition( std::next(first) != last ); --last; - CGAL_ch_precondition( *first != *last ); + CGAL_precondition( *first != *last ); S.push_back( last ); S.push_back( first ); Left_turn left_turn = ch_traits.left_turn_2_object(); @@ -78,7 +78,7 @@ ch_graham_andrew_scan( BidirectionalIterator first, alpha = beta; stack_rev_iter = S.rbegin(); beta = *++stack_rev_iter; - CGAL_ch_assertion(S.size() >= 2); + CGAL_assertion(S.size() >= 2); } S.push_back( iter ); beta = alpha; @@ -98,11 +98,11 @@ ch_graham_andrew_scan( BidirectionalIterator first, #endif // no postconditions ... for ( ++stack_iter; stack_iter != S.end(); ++stack_iter) { *res = **stack_iter; ++res; } - CGAL_ch_postcondition( \ + CGAL_postcondition( \ is_ccw_strongly_convex_2( res.output_so_far_begin(), \ res.output_so_far_end(), \ ch_traits)); - CGAL_ch_expensive_postcondition( \ + CGAL_expensive_postcondition( \ ch_brute_force_chain_check_2( \ first, last, \ res.output_so_far_begin(), res.output_so_far_end(), \ @@ -123,7 +123,7 @@ ch__ref_graham_andrew_scan( BidirectionalIterator first, { typedef typename Traits::Left_turn_2 Left_turn; - CGAL_ch_precondition_code( + CGAL_precondition_code( typedef typename Traits::Equal_2 Equal_2; Equal_2 equal_points = ch_traits.equal_2_object(); ) @@ -134,11 +134,11 @@ ch__ref_graham_andrew_scan( BidirectionalIterator first, BidirectionalIterator alpha; BidirectionalIterator beta; BidirectionalIterator iter; - CGAL_ch_precondition( first != last ); - CGAL_ch_precondition( std::next(first) != last ); + CGAL_precondition( first != last ); + CGAL_precondition( std::next(first) != last ); --last; - CGAL_ch_precondition(! equal_points(*first,*last) ); + CGAL_precondition(! equal_points(*first,*last) ); S.push_back( last ); S.push_back( first ); @@ -168,7 +168,7 @@ ch__ref_graham_andrew_scan( BidirectionalIterator first, alpha = beta; stack_rev_iter = S.rbegin(); beta = *++stack_rev_iter; - CGAL_ch_assertion(S.size() >= 2); + CGAL_assertion(S.size() >= 2); } S.push_back( iter ); beta = alpha; @@ -213,11 +213,11 @@ ch_graham_andrew( InputIterator first, #endif // no postconditions ... ch__ref_graham_andrew_scan( V.begin(), V.end(), res, ch_traits); ch__ref_graham_andrew_scan( V.rbegin(), V.rend(), res, ch_traits); - CGAL_ch_postcondition( \ + CGAL_postcondition( \ is_ccw_strongly_convex_2( res.output_so_far_begin(), \ res.output_so_far_end(), \ ch_traits)); - CGAL_ch_expensive_postcondition( \ + CGAL_expensive_postcondition( \ ch_brute_force_check_2( \ V.begin(), V.end(), \ res.output_so_far_begin(), res.output_so_far_end(), \ diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_jarvis_impl.h b/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_jarvis_impl.h index ce0fe6d0..f3d71ff2 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_jarvis_impl.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_jarvis_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/Convex_hull_2/ch_jarvis_impl.h $ -// $Id: ch_jarvis_impl.h 21755b1 2021-03-24T15:05:41+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/Convex_hull_2/ch_jarvis_impl.h $ +// $Id: include/CGAL/Convex_hull_2/ch_jarvis_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,7 @@ #endif // CGAL_CH_NO_POSTCONDITIONS #include -#include +#include #include #include @@ -36,8 +36,6 @@ ch_jarvis_march(ForwardIterator first, ForwardIterator last, OutputIterator result, const Traits& ch_traits) { - using namespace boost; - if (first == last) return result; typedef typename Traits::Less_rotate_ccw_2 Less_rotate_ccw; typedef typename Traits::Equal_2 Equal_2; @@ -50,16 +48,16 @@ ch_jarvis_march(ForwardIterator first, ForwardIterator last, typedef typename Traits::Point_2 Point_2; Tee_for_output_iterator res(result); #endif // no postconditions ... - CGAL_ch_assertion_code( \ + CGAL_assertion_code( \ int count_points = 0; ) - CGAL_ch_assertion_code( \ + CGAL_assertion_code( \ for (ForwardIterator fit = first; fit!= last; ++fit) ++count_points; ) Less_rotate_ccw rotation_predicate = ch_traits.less_rotate_ccw_2_object( ); *res = start_p; ++res; - CGAL_ch_assertion_code( \ + CGAL_assertion_code( \ int constructed_points = 1; ) - CGAL_ch_exactness_assertion_code( \ + CGAL_exactness_assertion_code( \ Point previous_point = start_p; ) ForwardIterator it = std::min_element( first, last, @@ -67,26 +65,26 @@ ch_jarvis_march(ForwardIterator first, ForwardIterator last, {return rotation_predicate(start_p, p1, p2);} ); while (! equal_points(*it, stop_p) ) { - CGAL_ch_exactness_assertion( \ + CGAL_exactness_assertion( \ *it != previous_point ); - CGAL_ch_exactness_assertion_code( \ + CGAL_exactness_assertion_code( \ previous_point = *it; ) *res = *it; ++res; - CGAL_ch_assertion_code( \ + CGAL_assertion_code( \ ++constructed_points;) - CGAL_ch_assertion( \ + CGAL_assertion( \ constructed_points <= count_points + 1 ); it = std::min_element( first, last, [it, &rotation_predicate](const Point& p1, const Point& p2) {return rotation_predicate(*it, p1, p2);} ); } - CGAL_ch_postcondition( \ + CGAL_postcondition( \ is_ccw_strongly_convex_2( res.output_so_far_begin(), \ res.output_so_far_end(), \ ch_traits)); - CGAL_ch_expensive_postcondition( \ + CGAL_expensive_postcondition( \ ch_brute_force_check_2( first, last, \ res.output_so_far_begin(), res.output_so_far_end(), \ diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_melkman_impl.h b/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_melkman_impl.h index d3f7a2f9..9288183c 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_melkman_impl.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_melkman_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/Convex_hull_2/ch_melkman_impl.h $ -// $Id: ch_melkman_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/Convex_hull_2/ch_melkman_impl.h $ +// $Id: include/CGAL/Convex_hull_2/ch_melkman_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -15,14 +15,14 @@ #include - #ifndef CGAL_CH_NO_POSTCONDITIONS #include #endif // CGAL_CH_NO_POSTCONDITIONS -#include -#include -#include +#include + +#include +#include namespace CGAL { @@ -37,19 +37,19 @@ ch_melkman( InputIterator first, InputIterator last, typename Traits::Left_turn_2 left_turn = ch_traits.left_turn_2_object(); Equal_2 equal_points = ch_traits.equal_2_object(); - CGAL_ch_assertion_code( \ + CGAL_assertion_code( \ typename Traits::Less_xy_2 less = ch_traits.less_xy_2_object(); ) std::deque< Point> Q; - CGAL_ch_expensive_postcondition_code( std::deque< Point> IN; ) + CGAL_expensive_postcondition_code( std::deque< Point> IN; ) if (first == last) return result; // 0 elements Point p = *first; - CGAL_ch_expensive_postcondition_code( IN.push_back(p); ) + CGAL_expensive_postcondition_code( IN.push_back(p); ) if (++first == last) { *result = p; ++result; return result; } // 1 element Point q = *first; - CGAL_ch_expensive_postcondition_code( IN.push_back(q); ) + CGAL_expensive_postcondition_code( IN.push_back(q); ) if (++first == last) // 2 elements { *result = p; ++result; @@ -63,11 +63,11 @@ ch_melkman( InputIterator first, InputIterator last, while (first != last) { r = *first; - CGAL_ch_expensive_postcondition_code( IN.push_back(r); ) + CGAL_expensive_postcondition_code( IN.push_back(r); ) // visited input sequence = p,..., q, r if ( left_turn(p,q,r)) { Q.push_back( q); break; } if ( left_turn(q,p,r)) { Q.push_front( q); break; } - CGAL_ch_assertion( less( p, q) ? less (p, r) : less( r, p)); + CGAL_assertion( less( p, q) ? less (p, r) : less( r, p)); q = r; ++first; } @@ -84,7 +84,7 @@ ch_melkman( InputIterator first, InputIterator last, while ( ++first != last) { r = *first; - CGAL_ch_expensive_postcondition_code( IN.push_back(r); ) + CGAL_expensive_postcondition_code( IN.push_back(r); ) if (left_turn( current, r, Q.front()) || left_turn( Q.back(), r, current)) // r outside cone Q.front(), current, Q.back() <=> @@ -110,9 +110,9 @@ ch_melkman( InputIterator first, InputIterator last, Q.push_back( current); // add last point to Q - CGAL_ch_postcondition( \ + CGAL_postcondition( \ is_ccw_strongly_convex_2( Q.begin(), Q.end(), ch_traits)); - CGAL_ch_expensive_postcondition( \ + CGAL_expensive_postcondition( \ ch_brute_force_check_2( IN.begin(),IN.end(), Q.begin(),Q.end(), ch_traits)); std::copy( Q.begin(), Q.end(), result); return result; diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_selected_extreme_points_2_impl.h b/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_selected_extreme_points_2_impl.h index 1b6344c8..ba470836 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_selected_extreme_points_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_2/ch_selected_extreme_points_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/Convex_hull_2/ch_selected_extreme_points_2_impl.h $ -// $Id: ch_selected_extreme_points_2_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/Convex_hull_2/ch_selected_extreme_points_2_impl.h $ +// $Id: include/CGAL/Convex_hull_2/ch_selected_extreme_points_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_2/convexity_check_2_impl.h b/thirdparty/CGAL/include/CGAL/Convex_hull_2/convexity_check_2_impl.h index 898127e9..bdab56bb 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_2/convexity_check_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_2/convexity_check_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/Convex_hull_2/convexity_check_2_impl.h $ -// $Id: convexity_check_2_impl.h 4bb0406 2021-02-04T18:12:12+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/Convex_hull_2/convexity_check_2_impl.h $ +// $Id: include/CGAL/Convex_hull_2/convexity_check_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -181,8 +181,6 @@ ch_brute_force_chain_check_2(ForwardIterator1 first1, ForwardIterator2 last2, const Traits& ch_traits ) { - using namespace boost; - typedef typename Traits::Left_turn_2 Left_turn_2; ForwardIterator1 iter11; diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_2.h b/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_2.h index e1661adb..b0fde52a 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_2.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_3/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_2.h $ -// $Id: Convex_hull_traits_dual_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_3/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_2.h $ +// $Id: include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -114,7 +114,7 @@ namespace CGAL } }; - struct Less_signed_distance_to_line_2 { + struct Compare_signed_distance_to_line_2 { typedef typename R::RT RT; typedef bool result_type; @@ -181,8 +181,8 @@ namespace CGAL return Less_yx_2(); } - Less_signed_distance_to_line_2 less_signed_distance_to_line_2_object () const { - return Less_signed_distance_to_line_2(); + Compare_signed_distance_to_line_2 compare_signed_distance_to_line_2_object () const { + return Compare_signed_distance_to_line_2(); } Orientation_2 orientation_2_object () const { @@ -276,7 +276,7 @@ namespace CGAL } }; - struct Less_signed_distance_to_line_2 { + struct Compare_signed_distance_to_line_2 { typedef typename R::RT RT; typedef bool result_type; @@ -343,8 +343,8 @@ namespace CGAL return Less_yx_2(); } - Less_signed_distance_to_line_2 less_signed_distance_to_line_2_object () const { - return Less_signed_distance_to_line_2(); + Compare_signed_distance_to_line_2 compare_signed_distance_to_line_2_object () const { + return Compare_signed_distance_to_line_2(); } Orientation_2 orientation_2_object () const { @@ -438,7 +438,7 @@ namespace CGAL } }; - struct Less_signed_distance_to_line_2 { + struct Compare_signed_distance_to_line_2 { typedef typename R::RT RT; typedef bool result_type; @@ -504,8 +504,8 @@ namespace CGAL return Less_yx_2(); } - Less_signed_distance_to_line_2 less_signed_distance_to_line_2_object () const { - return Less_signed_distance_to_line_2(); + Compare_signed_distance_to_line_2 compare_signed_distance_to_line_2_object () const { + return Compare_signed_distance_to_line_2(); } Orientation_2 orientation_2_object () const { diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h b/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h index 478b39a9..99d690ee 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_3/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h $ -// $Id: Convex_hull_traits_dual_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_3/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h $ +// $Id: include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h b/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h index 39d3f6f6..0cce7181 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h $ -// $Id: halfspace_intersection_3.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h $ +// $Id: include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -26,11 +26,12 @@ #include #include // For interior_polyhedron_3 +#ifndef CGAL_CH3_DUAL_WITHOUT_QP_SOLVER #include +#endif #include #include -#include #include namespace CGAL @@ -67,13 +68,12 @@ namespace CGAL // Typedefs for intersection typedef typename Kernel::Plane_3 Plane_3; typedef typename Kernel::Line_3 Line_3; - typedef boost::optional< boost::variant< Point_3, + typedef std::optional< std::variant< Point_3, Line_3, Plane_3 > > result_inter; std::unordered_map primal_vertices; - size_t n = 0; // First, computing the primal vertices for(Facet_const_handle fd : faces(_dual)){ @@ -98,10 +98,10 @@ namespace CGAL result_inter result = CGAL::intersection(pp1, pp2, pp3); CGAL_assertion_msg(bool(result), "halfspace_intersection_3: no intersection"); - CGAL_assertion_msg(boost::get(& *result) != nullptr, + CGAL_assertion_msg(std::get_if(& *result) != nullptr, "halfspace_intersection_3: intersection is not a point"); - const Point_3* pp = boost::get(& *result); + const Point_3* pp = std::get_if(& *result); // Primal vertex associated to the current dual plane Point_3 ppp(origin.x() + pp->x(), @@ -111,7 +111,6 @@ namespace CGAL vertex_descriptor vd = add_vertex(primal); primal_vertices[fd] = vd; put(vpm, vd, ppp); - ++n; } // Then, add facets to the primal polyhedron @@ -230,7 +229,11 @@ namespace CGAL template void halfspace_intersection_3 (PlaneIterator begin, PlaneIterator end, Polyhedron &P, - boost::optional::value_type>::Kernel::Point_3> origin = boost::none) { + std::optional::value_type>::Kernel::Point_3> origin +#ifndef CGAL_CH3_DUAL_WITHOUT_QP_SOLVER + = std::nullopt +#endif + ) { // Checks whether the intersection is a polyhedron CGAL_assertion_msg(Convex_hull_3::internal::is_intersection_dim_3(begin, end), "halfspace_intersection_3: intersection not a polyhedron"); @@ -241,11 +244,13 @@ namespace CGAL // if a point inside is not provided find one using linear programming if (!origin) { +#ifndef CGAL_CH3_DUAL_WITHOUT_QP_SOLVER // find a point inside the intersection origin = halfspace_intersection_interior_point_3(begin, end); +#endif - CGAL_assertion_msg(origin!=boost::none, "halfspace_intersection_3: problem when determing a point inside the intersection"); - if (origin==boost::none) + CGAL_assertion_msg(origin!=std::nullopt, "halfspace_intersection_3: problem when determining a point inside the intersection"); + if (origin==std::nullopt) return; } @@ -263,7 +268,7 @@ namespace CGAL // The check is done only if the number type is not float or double because in that // case we know the construction of dual points is not exact CGAL_assertion_msg( - boost::is_floating_point::value || + std::is_floating_point::value || Convex_hull_3::internal::point_inside_convex_polyhedron(P, *origin), "halfspace_intersection_3: origin not in the polyhedron" ); @@ -275,7 +280,7 @@ namespace CGAL void halfspace_intersection_3 (PlaneIterator begin, PlaneIterator end, Polyhedron &P, typename Kernel_traits::value_type>::Kernel::Point_3 const& origin) { - halfspace_intersection_3(begin, end , P, boost::make_optional(origin)); + halfspace_intersection_3(begin, end , P, std::make_optional(origin)); } #endif } // namespace CGAL @@ -283,4 +288,3 @@ namespace CGAL #include #endif // CGAL_HALFSPACE_INTERSECTION_3_H - diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h b/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h index f0f3a3ec..e311089f 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h $ -// $Id: halfspace_intersection_interior_point_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h $ +// $Id: include/CGAL/Convex_hull_3/dual/halfspace_intersection_interior_point_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -165,7 +165,7 @@ class Interior_polyhedron_3 { \ingroup PkgConvexHull3Functions computes a point belonging to the intersection of the halfspaces defined by the planes contained in the range `[begin, end)`. -If the intersection is empty, `boost::none` is returned. +If the intersection is empty, `std::nullopt` is returned. \attention Halfspaces are considered as lower halfspaces that is to say if the plane's equation is \f$ a\, x +b\, y +c\, z + d = 0 \f$ then the corresponding halfspace is defined by \f$ a\, x +b\, y +c\, z + d \le 0 \f$ . @@ -173,21 +173,21 @@ is \f$ a\, x +b\, y +c\, z + d = 0 \f$ then the corresponding halfspace is defin \tparam PlaneIterator must be an input iterator with the value type being a `Plane_3` object from \cgal Kernel */ template -boost::optional::value_type>::Kernel::Point_3> +std::optional::value_type>::Kernel::Point_3> halfspace_intersection_interior_point_3(PlaneIterator begin, PlaneIterator end) { // Types typedef typename Kernel_traits::value_type>::Kernel K; // choose exact integral type - typedef typename internal::Exact_field_selector::Type ET; + typedef typename internal::Exact_field_selector::Type ET; // find a point inside the intersection internal::Interior_polyhedron_3 interior; if (!interior.find(begin, end)) - return boost::none; + return std::nullopt; - return boost::make_optional(interior.inside_point()); + return std::make_optional(interior.inside_point()); } } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h b/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h index fe419895..b72c4501 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h $ -// $Id: halfspace_intersection_with_constructions_3.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h $ +// $Id: include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,9 @@ #include // For interior_polyhedron_3 +#ifndef CGAL_CH3_DUAL_WITHOUT_QP_SOLVER #include +#endif #include #include @@ -90,7 +92,7 @@ namespace CGAL void halfspace_intersection_with_constructions_3(PlaneIterator pbegin, PlaneIterator pend, Polyhedron &P, - boost::optional::value_type>::Kernel::Point_3> origin, + std::optional::value_type>::Kernel::Point_3> origin, const Traits & ch_traits) { typedef typename Kernel_traits::value_type>::Kernel K; typedef typename K::Point_3 Point; @@ -99,10 +101,12 @@ namespace CGAL // if a point inside is not provided find one using linear programming if (!origin) { // find a point inside the intersection +#ifndef CGAL_CH3_DUAL_WITHOUT_QP_SOLVER origin = halfspace_intersection_interior_point_3(pbegin, pend); +#endif - CGAL_assertion_msg(origin!=boost::none, "halfspace_intersection_with_constructions_3: problem when determing a point inside the intersection"); - if (origin==boost::none) + CGAL_assertion_msg(origin!=std::nullopt, "halfspace_intersection_with_constructions_3: problem when determining a point inside the intersection"); + if (origin==std::nullopt) return; } @@ -134,7 +138,11 @@ namespace CGAL void halfspace_intersection_with_constructions_3 (PlaneIterator pbegin, PlaneIterator pend, Polyhedron &P, - boost::optional::value_type>::Kernel::Point_3> const& origin = boost::none) { + std::optional::value_type>::Kernel::Point_3> const& origin +#ifndef CGAL_CH3_DUAL_WITHOUT_QP_SOLVER + = std::nullopt +#endif + ) { typedef typename Kernel_traits::value_type>::Kernel K; typedef typename K::Point_3 Point_3; typedef typename Convex_hull_3::internal::Default_traits_for_Chull_3::type Traits; diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/predicates.h b/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/predicates.h index b7e0d7b2..c0b8e821 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/predicates.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_3/dual/predicates.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_3/include/CGAL/Convex_hull_3/dual/predicates.h $ -// $Id: predicates.h 46d1aea 2022-05-09T15:30:26+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_3/include/CGAL/Convex_hull_3/dual/predicates.h $ +// $Id: include/CGAL/Convex_hull_3/dual/predicates.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_3/internal/Indexed_triangle_set.h b/thirdparty/CGAL/include/CGAL/Convex_hull_3/internal/Indexed_triangle_set.h index a0263e3a..f7b5eb29 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_3/internal/Indexed_triangle_set.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_3/internal/Indexed_triangle_set.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_3/include/CGAL/Convex_hull_3/internal/Indexed_triangle_set.h $ -// $Id: Indexed_triangle_set.h cb4f549 2021-12-07T16:03:18+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_3/include/CGAL/Convex_hull_3/internal/Indexed_triangle_set.h $ +// $Id: include/CGAL/Convex_hull_3/internal/Indexed_triangle_set.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_d.h b/thirdparty/CGAL/include/CGAL/Convex_hull_d.h index 69275f9d..73eb60ef 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_d.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_d/include/CGAL/Convex_hull_d.h $ -// $Id: Convex_hull_d.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_d/include/CGAL/Convex_hull_d.h $ +// $Id: include/CGAL/Convex_hull_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -627,7 +627,7 @@ typedef CGAL::Iterator_project< bool is_valid(bool throw_exceptions = false) const; /*{\Mop checks the validity of the data structure. - If |throw_exceptions == thrue| then the program throws + If |throw_exceptions == true| then the program throws the following exceptions to inform about the problem.\\ [[chull_has_center_on_wrong_side_of_hull_facet]] the hyperplane supporting a facet has the wrong orientation.\\ @@ -1304,7 +1304,7 @@ std::list< typename Convex_hull_d::Simplex_handle > Convex_hull_d::facets_visible_from(const Point_d& x) { std::list visible_simplices; - int location = -1; // intialization is important + int location = -1; // initialization is important std::size_t num_of_visited_simplices = 0; // irrelevant Facet_handle f; // irrelevant @@ -1319,7 +1319,7 @@ Bounded_side Convex_hull_d::bounded_side(const Point_d& x) { if ( is_dimension_jump(x) ) return ON_UNBOUNDED_SIDE; std::list visible_simplices; - int location = -1; // intialization is important + int location = -1; // initialization is important std::size_t num_of_visited_simplices = 0; // irrelevant Facet_handle f; diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_d_to_polyhedron_3.h b/thirdparty/CGAL/include/CGAL/Convex_hull_d_to_polyhedron_3.h index 9b1c5848..610169b7 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_d_to_polyhedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_d_to_polyhedron_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_d/include/CGAL/Convex_hull_d_to_polyhedron_3.h $ -// $Id: Convex_hull_d_to_polyhedron_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_d/include/CGAL/Convex_hull_d_to_polyhedron_3.h $ +// $Id: include/CGAL/Convex_hull_d_to_polyhedron_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -105,7 +105,7 @@ include || template void convex_hull_d_to_polyhedron_3( const Convex_hull_d& C, Polyhedron_3& P) -/*{\Mfunc converts the convex hull |C| to polyedral surface stored in +/*{\Mfunc converts the convex hull |C| to polyhedral surface stored in |P|.\\ \precond |dim == 3| and |dcur == 3|. }*/ { typedef Convex_hull_d ChullType; diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_d_traits_3.h b/thirdparty/CGAL/include/CGAL/Convex_hull_d_traits_3.h index 5d8cda98..a1bd1418 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_d_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_d_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_d/include/CGAL/Convex_hull_d_traits_3.h $ -// $Id: Convex_hull_d_traits_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_d/include/CGAL/Convex_hull_d_traits_3.h $ +// $Id: include/CGAL/Convex_hull_d_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_face_base_2.h b/thirdparty/CGAL/include/CGAL/Convex_hull_face_base_2.h index 1f339945..3e5da0ae 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_face_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_face_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_3/include/CGAL/Convex_hull_face_base_2.h $ -// $Id: Convex_hull_face_base_2.h 9ecb90c 2022-01-26T19:07:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_3/include/CGAL/Convex_hull_face_base_2.h $ +// $Id: include/CGAL/Convex_hull_face_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_traits_3.h b/thirdparty/CGAL/include/CGAL/Convex_hull_traits_3.h index 847e3657..134fd4cb 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_3/include/CGAL/Convex_hull_traits_3.h $ -// $Id: Convex_hull_traits_3.h 61d42c3 2021-12-16T13:49:45+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_3/include/CGAL/Convex_hull_traits_3.h $ +// $Id: include/CGAL/Convex_hull_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -151,7 +151,7 @@ struct GT3_for_CH3 { template ::type::value && + std::is_floating_point::type::value && R_::Has_filtered_predicates_tag::value > > class Convex_hull_traits_3 diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_traits_adapter_2.h b/thirdparty/CGAL/include/CGAL/Convex_hull_traits_adapter_2.h index fecd5ed4..59beadea 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_traits_adapter_2.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_traits_adapter_2.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/Convex_hull_traits_adapter_2.h $ -// $Id: Convex_hull_traits_adapter_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/Convex_hull_traits_adapter_2.h $ +// $Id: include/CGAL/Convex_hull_traits_adapter_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot @@ -13,16 +13,15 @@ #ifndef CGAL_CONVEX_HULL_TRAITS_ADAPTER_2_H #define CGAL_CONVEX_HULL_TRAITS_ADAPTER_2_H -#include +#include + #include #include - namespace CGAL{ - template class Convex_hull_traits_adapter_2:public Base_traits{ PointPropertyMap ppmap_; @@ -90,12 +89,12 @@ class Convex_hull_traits_adapter_2:public Base_traits{ } }; - struct Less_signed_distance_to_line_2 : public Base_traits::Less_signed_distance_to_line_2{ - Less_signed_distance_to_line_2(const PointPropertyMap& ppmap,const typename Base_traits::Less_signed_distance_to_line_2& base): - Base_traits::Less_signed_distance_to_line_2(base),ppmap_(ppmap){} + struct Compare_signed_distance_to_line_2 : public Base_traits::Compare_signed_distance_to_line_2{ + Compare_signed_distance_to_line_2(const PointPropertyMap& ppmap,const typename Base_traits::Compare_signed_distance_to_line_2& base): + Base_traits::Compare_signed_distance_to_line_2(base),ppmap_(ppmap){} const PointPropertyMap& ppmap_; bool operator()(Arg_type p,Arg_type q, Arg_type r, Arg_type s) const { - return static_cast(this)->operator()(get(ppmap_,p),get(ppmap_,q),get(ppmap_,r),get(ppmap_,s)); + return static_cast(this)->operator()(get(ppmap_,p),get(ppmap_,q),get(ppmap_,r),get(ppmap_,s)); } }; @@ -103,7 +102,7 @@ class Convex_hull_traits_adapter_2:public Base_traits{ Left_turn_2 left_turn_2_object () const {return Left_turn_2(ppmap_,static_cast(this)->left_turn_2_object() );} Orientation_2 orientation_2_object () const {return Orientation_2(ppmap_,static_cast(this)->orientation_2_object() );} Less_rotate_ccw_2 less_rotate_ccw_2_object () const {return Less_rotate_ccw_2(ppmap_,static_cast(this)->less_rotate_ccw_2_object() );} - Less_signed_distance_to_line_2 less_signed_distance_to_line_2_object () const {return Less_signed_distance_to_line_2(ppmap_,static_cast(this)->less_signed_distance_to_line_2_object() );} + Compare_signed_distance_to_line_2 compare_signed_distance_to_line_2_object () const {return Compare_signed_distance_to_line_2(ppmap_,static_cast(this)->compare_signed_distance_to_line_2_object() );} Less_xy_2 less_xy_2_object () const {return Less_xy_2(ppmap_,static_cast(this)->less_xy_2_object() );} Less_yx_2 less_yx_2_object () const {return Less_yx_2(ppmap_,static_cast(this)->less_yx_2_object() );} @@ -113,6 +112,4 @@ class Convex_hull_traits_adapter_2:public Base_traits{ } //namespace CGAL -#include - #endif //CGAL_CONVEX_HULL_TRAITS_ADAPTER_2_H diff --git a/thirdparty/CGAL/include/CGAL/Convex_hull_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Convex_hull_vertex_base_2.h index 5bf70025..f5d7228b 100644 --- a/thirdparty/CGAL/include/CGAL/Convex_hull_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Convex_hull_vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_3/include/CGAL/Convex_hull_vertex_base_2.h $ -// $Id: Convex_hull_vertex_base_2.h 9ecb90c 2022-01-26T19:07:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_3/include/CGAL/Convex_hull_vertex_base_2.h $ +// $Id: include/CGAL/Convex_hull_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,6 +18,7 @@ #include #include +#include #include @@ -77,7 +78,7 @@ template std::ostream& operator<<(std::ostream &os, const Convex_hull_vertex_base_2& v) { - return os << static_cast(v) << v.point(); + return os << static_cast(v) << IO::serialize(v.point()); } } //namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Counted_number.h b/thirdparty/CGAL/include/CGAL/Counted_number.h index 3c4f5a14..d6a5c9c6 100644 --- a/thirdparty/CGAL/include/CGAL/Counted_number.h +++ b/thirdparty/CGAL/include/CGAL/Counted_number.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Counted_number.h $ -// $Id: Counted_number.h 59a0da4 2021-05-19T17:23:53+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Counted_number.h $ +// $Id: include/CGAL/Counted_number.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Counting_iterator.h b/thirdparty/CGAL/include/CGAL/Counting_iterator.h index 65eaa4cd..afb06427 100644 --- a/thirdparty/CGAL/include/CGAL/Counting_iterator.h +++ b/thirdparty/CGAL/include/CGAL/Counting_iterator.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Counting_iterator.h $ -// $Id: Counting_iterator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Counting_iterator.h $ +// $Id: include/CGAL/Counting_iterator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h index 4557a619..9c47ae1a 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h $ -// $Id: Arc_2.h bfc5b7e 2021-08-10T10:49:11+03:00 Efi Fogel -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Eric Berberich // Pavel Emeliyanenko @@ -13,6 +13,9 @@ #ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_ARC_2_H #define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_ARC_2_H +#include + + /*!\file include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h *\brief defines class \c Arc_2 that represents an arc on a curve that * can be analyzed. @@ -22,9 +25,9 @@ #include #include -#include +#include +#include #include -#include #include #include @@ -155,13 +158,13 @@ class Arc_2_rep { mutable bool _m_left_to_right; //! stores the index of an interval this arc belongs to - mutable boost::optional _m_interval_id; + mutable std::optional _m_interval_id; //! stores boundary value in x-range of non-vertical interval - mutable boost::optional< Bound > _m_boundary_in_interval; + mutable std::optional< Bound > _m_boundary_in_interval; //! stores a bbox for an arc - mutable boost::optional< CGAL::Bbox_2 > _m_bbox; + mutable std::optional< CGAL::Bbox_2 > _m_bbox; //!@} }; @@ -232,7 +235,7 @@ class Arc_2 : //!@} #if !defined(CGAL_NO_ASSERTIONS) - static const bool Kernel_arc_2_equals_Arc_2 = boost::is_same::value; + static const bool Kernel_arc_2_equals_Arc_2 = std::is_same::value; #endif public: @@ -1088,7 +1091,7 @@ class Arc_2 : } /*!\brief - * Compares the relative vertical aligment of this arc with a second + * Compares the relative vertical alignment of this arc with a second * immediately to the left of one of their intersection points. * * If one of the curves is vertical (emanating downward from p), @@ -1116,7 +1119,7 @@ class Arc_2 : } /*!\brief - * Compares the relative vertical aligment of this arc with a second + * Compares the relative vertical alignment of this arc with a second * immediately to the right of one of their intersection points. * * If one of the curves is vertical (emanating downward from p), @@ -1436,7 +1439,7 @@ class Arc_2 : * \pre p != q * \pre both points must be interior and must lie on \c cv */ - // do we need this method separetely ?? + // do we need this method separately ?? Kernel_arc_2 trim(const Point_2& p, const Point_2& q) const { CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Trim_2, trim_2) @@ -1937,7 +1940,7 @@ class Arc_2 : * \param cv2 the second arc * \param where the location in parameter space * \param x0 The x-coordinate - * \param perturb determines whether to pertub slightly to the left/right + * \param perturb determines whether to perturb slightly to the left/right * \return the relative vertical alignment * * \pre !is_on_bottom_top(where) @@ -1964,7 +1967,7 @@ class Arc_2 : * \param cv2 the second arc * \param where the location in parameter space * \param x0 The x-coordinate - * \param perturb determines whether to pertub slightly to the left/right + * \param perturb determines whether to perturb slightly to the left/right * \return the relative vertical alignment */ CGAL::Comparison_result _compare_coprime( @@ -2240,8 +2243,8 @@ class Arc_2 : rep._m_is_vertical = this->ptr()->_m_is_vertical; rep._m_left_to_right = this->ptr()->_m_left_to_right; - rep._m_interval_id = boost::none; - rep._m_boundary_in_interval = boost::none; + rep._m_interval_id = std::nullopt; + rep._m_boundary_in_interval = std::nullopt; return std::make_pair(Kernel_arc_2(rep), cmp); } @@ -2372,8 +2375,8 @@ class Arc_2 : this->ptr()->_m_arcno_max = arcno(); // invalidate curve-specific data - this->ptr()->_m_interval_id = boost::none; - this->ptr()->_m_boundary_in_interval = boost::none; + this->ptr()->_m_interval_id = std::nullopt; + this->ptr()->_m_boundary_in_interval = std::nullopt; } //!@} @@ -2595,7 +2598,7 @@ class Arc_2 : /*!\brief * computes intersection of two arcs meeting only at their curve ends. * - * Intersection points are returned in the output interator \c oi as object + * Intersection points are returned in the output iterator \c oi as object * of type std::pair (intersection + multiplicity) * * \param cv1 the first arc diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h index 5c6a494e..cfd21f86 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h $ -// $Id: Curve_interval_arcno_cache.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Pavel Emeliyanenko @@ -13,6 +13,9 @@ #ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_CURVE_INTERVAL_ARCNO_CACHE_H #define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_CURVE_INTERVAL_ARCNO_CACHE_H +#include + + /*!\file include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h * \brief defines \c Curve_interval_arcno_cache functor */ @@ -84,7 +87,7 @@ struct Curve_interval_arcno_cache { //!@} - //!\name Functor invokation + //!\name Functor invocation //!@{ /*!\brief diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h index f4306b22..903f8ec3 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h $ -// $Id: Curve_renderer_facade.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pavel Emeliyanenko // @@ -21,6 +21,9 @@ #ifndef CGAL_CKVA_CURVE_RENDERER_FACADE_H #define CGAL_CKVA_CURVE_RENDERER_FACADE_H +#include + + // do not compile curve renderer code (for fast debugging) //#define CGAL_CKVA_DUMMY_RENDERER @@ -62,7 +65,6 @@ #include #include -#include #include @@ -246,15 +248,15 @@ class Curve_renderer_interface * \c Coord_2 must be constructible from a pair of integers / doubles * depending on the renderer type * - * computes optionaly end-point coordinates (even if they lie outside the + * computes optionally end-point coordinates (even if they lie outside the * window) */ template < class Coord_2, template < class, class > class Container, class Allocator > inline void draw(const Arc_2& arc, Container< std::vector< Coord_2 >, Allocator >& pts, - boost::optional< Coord_2 > *end_pt1 = nullptr, - boost::optional< Coord_2 > *end_pt2 = nullptr) { + std::optional< Coord_2 > *end_pt1 = nullptr, + std::optional< Coord_2 > *end_pt2 = nullptr) { #ifndef CGAL_CKVA_DUMMY_RENDERER Bbox_2 bbox; @@ -279,7 +281,7 @@ class Curve_renderer_interface std::cerr << "Switching to multi-precision arithmetic" << std::endl; #ifdef CGAL_CKVA_USE_MULTIPREC_ARITHMETIC - if(::boost::is_same:: + if(::std::is_same:: Is_exact, CGAL::Tag_true>::value) goto Lexit; @@ -298,7 +300,7 @@ class Curve_renderer_interface std::cerr << "Switching to exact arithmetic" << std::endl; #ifdef CGAL_CKVA_USE_RATIONAL_ARITHMETIC - if(::boost::is_same< + if(::std::is_same< typename Algebraic_structure_traits< Float >::Is_exact, CGAL::Tag_true>::value) goto Lexit; @@ -335,7 +337,7 @@ Lexit: std::cerr << "Sorry, this does not work even with exact " * rasterizes a point on curve, returns point coordinates as objects of * type \c Coord_2 which are constructible from a pair of ints / doubles * - * retunrs \c false if point lies outside the window or cannot be + * returns \c false if point lies outside the window or cannot be * rasterized due to precision problems */ template < class Coord_2 > diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h index 60cf9068..b597c60c 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h $ -// $Id: Curved_kernel_via_analysis_2_functors.h 5e73fe1 2021-08-04T12:22:09+03:00 Efi Fogel -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Eric Berberich @@ -14,6 +14,9 @@ #ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_FUNCTORS_H #define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_FUNCTORS_H +#include + + /*!\file include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h * \brief defines Curved_kernel_via_analysis_2 function objects + class */ @@ -945,7 +948,7 @@ Curved_kernel_via_analysis_2_functor_base< CurvedKernelViaAnalysis_2 > { }; /*!\brief - * Functor that computes the relative vertical aligment of two arcs left + * Functor that computes the relative vertical alignment of two arcs left * of a point */ template < class CurvedKernelViaAnalysis_2 > @@ -1056,7 +1059,7 @@ Curved_kernel_via_analysis_2_functor_base< CurvedKernelViaAnalysis_2 > { /*!\brief - * Functor that computes the relative vertical aligment of two arcs right + * Functor that computes the relative vertical alignment of two arcs right * of a point */ template < class CurvedKernelViaAnalysis_2 > @@ -1426,7 +1429,7 @@ class Intersect_2 : typedef unsigned int Multiplicity; typedef std::pair Intersection_point; - typedef boost::variant Intersection_result; + typedef std::variant Intersection_result; //! the result type typedef CGAL::cpp98::iterator @@ -1469,13 +1472,13 @@ class Intersect_2 : // point-wise intersections std::vector arcs; if (cv1._trim_if_overlapped(cv2, std::back_inserter(arcs))) { - for (const auto& item : arcs) *oi++ = Intersection_result(item); + for (const auto& item : arcs) *oi++ = item; return oi; } // process non-ov erlapping case std::vector vec; Arc_2::_intersection_points(cv1, cv2, std::back_inserter(vec)); - for (const auto& item : vec) *oi++ = Intersection_result(item); + for (const auto& item : vec) *oi++ = item; return oi; } @@ -1905,7 +1908,7 @@ Curved_kernel_via_analysis_2_functor_base { { typedef typename Curved_kernel_via_analysis_2::Point_2 Point_2; typedef typename Curved_kernel_via_analysis_2::Arc_2 Arc_2; - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; *oi++ = Make_x_monotone_result(cv); return oi; } @@ -1932,7 +1935,7 @@ Curved_kernel_via_analysis_2_functor_base { /*!\brief * Splits an input object \c obj into x-monotone arcs and isolated points * - * \param obj the polymorph input object: can represet \c Point_2, + * \param obj the polymorph input object: can represent \c Point_2, * \c Arc_2, \c Non_x_monotone_arc_2 or \c Curve_analysis_2 * \param oi Output iterator that stores CGAL::Object, which either * encapsulates \c Point_2 or \c Arc_2 @@ -1945,7 +1948,7 @@ Curved_kernel_via_analysis_2_functor_base { typedef typename Curved_kernel_via_analysis_2::Arc_2 Arc_2; typedef typename Curved_kernel_via_analysis_2::Non_x_monotone_arc_2 Non_x_monotone_arc_2; - typedef boost::variant + typedef std::variant Make_x_monotone_result; Curve_analysis_2 curve; diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h index 23796457..48e87fce 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h $ -// $Id: Curved_kernel_via_analysis_2_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Eric Berberich @@ -14,6 +14,9 @@ #ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_IMPL_H #define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_IMPL_H +#include + + /*!\file include/CGAL/Curved_kernel_via_analysis_2.h * \brief defines class \c Curved_kernel_via_analysis_2 * @@ -100,7 +103,7 @@ class Curved_kernel_via_analysis_2_base //!@{ - //! type of inverval arcno cache + //! type of interval arcno cache typedef internal::Curve_interval_arcno_cache< Curve_kernel_2 > Curve_interval_arcno_cache; diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h index d3a4d170..5f9ec5c0 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h $ -// $Id: Fig_stream_Curve_renderer_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ophir Setter @@ -43,7 +43,7 @@ operator << typedef std::pair< int, int > Coord_2; typedef std::vector< Coord_2 > Coord_vec_2; - boost::optional < Coord_2 > p1, p2; + std::optional < Coord_2 > p1, p2; std::list points; Bbox_2 bbox (CGAL::to_double(ws.bounding_rect().xmin()), diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h index ef0d93d2..8a26e944 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h $ -// $Id: Filtered_curved_kernel_via_analysis_2_impl.h bfc5b7e 2021-08-10T10:49:11+03:00 Efi Fogel -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Eric Berberich @@ -15,6 +15,9 @@ #ifndef CGAL_FILTERED_CURVED_KERNEL_VIA_ANALYSIS_2_IMPL_H #define CGAL_FILTERED_CURVED_KERNEL_VIA_ANALYSIS_2_IMPL_H +#include + + /*!\file include/CGAL/Filtered_curved_kernel_via_analysis_2.h * \brief defines class \c Filtered_curved_kernel_via_analysis_2 * @@ -546,7 +549,7 @@ class Intersect_2 : if (!Base::_ckva()->may_have_intersection_2_object()(cv1, cv2)) { // return no one - CKvA_CERR("\nfilter: sucessfull\n"); + CKvA_CERR("\nfilter: successful\n"); CGAL_assertion_code( { diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h index 7c47e164..d475c455 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h $ -// $Id: Generic_arc_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Pavel Emeliyanenko @@ -14,6 +14,9 @@ #ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_GENERIC_ARC_2_H #define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_GENERIC_ARC_2_H +#include + + /*!\file include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h * \brief defines class \c Generic_arc_2 * @@ -83,9 +86,9 @@ class Generic_arc_2_rep // end-points (in degenerate case both point to the same object) mutable Generic_point_2 _m_min; - mutable boost::optional _m_max; + mutable std::optional _m_max; // stores native arc object (only for non-degenerate case) - mutable boost::optional _m_arc; + mutable std::optional _m_arc; // whether an arc is degenerate //bool _m_is_degenerate; @@ -148,7 +151,7 @@ class Generic_arc_2 #endif /*!\brief - * constructs an arc from a given represenation + * constructs an arc from a given representation */ Generic_arc_2(Rep rep) : Base(rep) { diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h index 260608c6..47c09c65 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h $ -// $Id: Generic_point_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Pavel Emeliyanenko @@ -13,6 +13,9 @@ #ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_GENERIC_POINT_2_H #define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_GENERIC_POINT_2_H +#include + + /*!\file include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h * \brief defines class \c Generic_point_2 * @@ -67,12 +70,12 @@ class Generic_point_2_rep _m_point(p) { } - mutable boost::optional _m_arc; // supporting arc for points at inf + mutable std::optional _m_arc; // supporting arc for points at inf // stores respective curve end if this is a point at infinity CGAL::Arr_curve_end _m_end; - mutable boost::optional _m_point; // stores a finite point + mutable std::optional _m_point; // stores a finite point // befriending the handle friend class Generic_point_2; @@ -128,7 +131,7 @@ class Generic_point_2 } #endif /*!\brief - * constructs an arc from a given represenation + * constructs an arc from a given representation */ Generic_point_2(Rep rep) : Base(rep) { diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h index b74f9295..020bacbd 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h $ -// $Id: Make_x_monotone_2.h f55ef7d 2020-10-09T18:36:17+02:00 Mael Rouxel-Labbé -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Eric Berberich @@ -17,6 +17,9 @@ #ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_MAKE_X_MONOTONE_2_H #define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_MAKE_X_MONOTONE_2_H +#include + + /*!\file include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h * \brief defines \c Make_x_monotone_2 functor */ @@ -54,11 +57,11 @@ struct Make_x_monotone_2 : public CGAL::cpp98::binary_function< typename CurvedKernelViaAnalysis_2::Curve_2, CGAL::cpp98::iterator >, CGAL::cpp98::iterator > > { @@ -116,7 +119,7 @@ struct Make_x_monotone_2 : //!@} - //!\name Functor invokation + //!\name Functor invocation //!@{ // TODO add operator for non-x-monotone arc @@ -132,7 +135,7 @@ struct Make_x_monotone_2 : template OutputIterator operator()(Curve_analysis_2 curve, OutputIterator oi) { - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; Construct_arc_2 construct_arc_2 = _m_curved_kernel->construct_arc_2_object(); @@ -290,7 +293,7 @@ struct Make_x_monotone_2 : Coordinate_1 x, std::vector pts, OutputIterator oi) const { - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; Construct_arc_2 construct_arc_2 = _m_curved_kernel->construct_arc_2_object(); diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h index d0627d4a..6ca7aa1e 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h $ -// $Id: Non_x_monotone_arc_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Pavel Emeliyanenko @@ -13,6 +13,9 @@ #ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_NON_X_MONOTONE_ARC_2_H #define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_NON_X_MONOTONE_ARC_2_H +#include + + /*!\file include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h * \brief defines class \c Non_x_monotone_arc_2 * diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h index 809c78d6..8f4aaec8 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h $ -// $Id: Point_2.h a3d1765 2021-07-19T14:18:40+02:00 Maxime Gimeno -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/Point_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Eric Berberich @@ -14,6 +14,9 @@ #ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_POINT_2_H #define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_POINT_2_H +#include + + /*!\file include/CGAL/Curved_kernel_via_analysis_2/Point_2.h * \brief defines class \c Point_2 that represents a point on a curve that can * be analyzed. @@ -21,9 +24,8 @@ #include -#include +#include #include -#include #include @@ -31,6 +33,8 @@ #include +#include + namespace CGAL { namespace internal { @@ -75,8 +79,7 @@ class Point_2_rep typedef typename Curve_kernel_2::Curve_analysis_2 Curve_analysis_2; //! default constructor - Point_2_rep() { - } + Point_2_rep() : _m_location(CGAL::ARR_INTERIOR) {} //! constructs a "finite" point on curve, //! implies CGAL::NO_BOUNDARY in x/y @@ -106,22 +109,22 @@ class Point_2_rep //! curve point finite coordinates. They are valid only if boundary in y //! is not set (CGAL::NO_BOUNDARY), otherwise only x-coordinate is //! accessible, i.e., point is in interior - boost::optional< Coordinate_2 > _m_xy; + std::optional< Coordinate_2 > _m_xy; //! x-coordinate of a curve point - boost::optional< Coordinate_1 > _m_x; + std::optional< Coordinate_1 > _m_x; //! curve of point at boundary - boost::optional< Curve_analysis_2 > _m_curve; + std::optional< Curve_analysis_2 > _m_curve; //! arc of point at boundary - boost::optional< int > _m_arcno; + std::optional< int > _m_arcno; //! location of a point in parameter space mutable CGAL::Arr_parameter_space _m_location; //! store a double approximation of point - mutable boost::optional< std::pair< double, double > > _m_doubles; + mutable std::optional< std::pair< double, double > > _m_doubles; }; /*!\brief @@ -170,7 +173,7 @@ class Point_2 : //!@} #if !defined(CGAL_NO_ASSERTIONS) - static const bool Kernel_point_2_equals_Point_2 = boost::is_same::value; + static const bool Kernel_point_2_equals_Point_2 = std::is_same::value; #endif public: @@ -325,7 +328,7 @@ class Point_2 : //!@{ /*!\brief - * constructs from a given represenation + * constructs from a given representation */ /*!\brief * Constructor for for rebind @@ -700,14 +703,13 @@ class Point_2 : default: // ASCII os << "Point_2("; - - os << this->ptr()->_m_xy; + os << ::CGAL::IO::oformat(this->ptr()->_m_xy); os << ","; - os << this->ptr()->_m_x; + os << ::CGAL::IO::oformat(this->ptr()->_m_x); os << ","; - os << this->ptr()->_m_curve; + os << ::CGAL::IO::oformat(this->ptr()->_m_curve); os << ","; - os << this->ptr()->_m_arcno; + os << ::CGAL::IO::oformat(this->ptr()->_m_arcno); os << ","; os << this->ptr()->_m_location; @@ -737,13 +739,13 @@ class Point_2 : swallow(is, '('); // read values - is >> rep._m_xy; + is >> IO::iformat(rep._m_xy); swallow(is, ','); - is >> rep._m_x; + is >> IO::iformat(rep._m_x); swallow(is, ','); - is >> rep._m_curve; + is >> IO::iformat(rep._m_curve); swallow(is, ','); - is >> rep._m_arcno; + is >> IO::iformat(rep._m_arcno); swallow(is, ','); is >> rep._m_location; diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h index 3b88266e..dc43b7d7 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h @@ -3,15 +3,18 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h $ -// $Id: Sweep_curves_adapter_2.h 2aa0c9c 2020-07-02T19:11:30+03:00 Efi Fogel -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Pavel Emeliyanenko #ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_SWEEP_CURVES_ADAPTER_2_H -#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_SWEEP_CURVES_ADAPTER_2_H 1 +#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_SWEEP_CURVES_ADAPTER_2_H + +#include + /*!\file include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h * \brief defines class \c Sweep_curves_adapter_2 @@ -22,7 +25,7 @@ #include -#include +#include #include #include #include @@ -726,7 +729,7 @@ class Make_x_monotone_2 typedef typename SweepCurvesAdapter_2::Native_arc_2 Native_arc_2; typedef typename SweepCurvesAdapter_2::Native_point_2 Native_point_2; typedef typename SweepCurvesAdapter_2::Generic_point_2 Generic_point_2; - typedef boost::variant + typedef std::variant Make_x_monotone_result; std::vector objs; @@ -734,11 +737,11 @@ class Make_x_monotone_2 make_x_monotone(cv, std::back_inserter(objs)); // sort out normal and degenerate arcs for (auto& obj : objs) { - if (auto* arc = boost::get(&obj)) { + if (auto* arc = std::get(&obj)) { *oi++ = Generic_arc_2(*arc); continue; } - auto* pt = boost::get(&obj); + auto* pt = std::get(&obj); CGAL_assertion(pt); *oi++ = Generic_arc_2(Generic_point_2(*pt)); } diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h index 234fcf0d..a2f1cfed 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h $ -// $Id: Curve_renderer_2.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pavel Emeliyanenko // @@ -19,6 +19,9 @@ #ifndef CGAL_CKVA_CURVE_RENDERER_2_H #define CGAL_CKVA_CURVE_RENDERER_2_H +#include + + #ifndef CGAL_AK_ENABLE_DEPRECATED_INTERFACE #define CGAL_AK_ENABLE_DEPRECATED_INTERFACE 1 #endif @@ -218,7 +221,7 @@ class Curve_renderer_2 //! returns \c true when the precision limit for a specified number type is //! reached typename Renderer_traits::Precision_limit limit; - //! maximum level of subdivision dependending on speficied number type + //! maximum level of subdivision dependending on specified number type static const unsigned MAX_SUBDIVISION_LEVEL = Renderer_traits::MAX_SUBDIVISION_LEVEL; @@ -397,7 +400,7 @@ class Curve_renderer_2 //! with correct parameters const Integer one; //! just "one" bool branches_coincide; //! indicates that there are several branches - //! passing through one neighbourhood pixel + //! passing through one neighborhood pixel int direction_taken; //! stores a direction taken from the seed point //! during tracking, if it's possible to determine //! 0 - towards lower point, 1 - towards upper @@ -423,8 +426,8 @@ template < class Coord_2, template < class, class > class Container, class Allocator > void draw(const Arc_2& arc, Container< std::vector< Coord_2 >, Allocator >& points, - boost::optional< Coord_2 > *end_pt1 = nullptr, - boost::optional< Coord_2 > *end_pt2 = nullptr) { + std::optional< Coord_2 > *end_pt1 = nullptr, + std::optional< Coord_2 > *end_pt2 = nullptr) { #ifdef CGAL_CKVA_CR_TIMING refine_timer.start(); @@ -1065,7 +1068,7 @@ void draw_lump(std::vector< Coord_2 >& rev_points, int& last_x, if(set_ready) ready = true; - if(!test_neighbourhood(pix, back_dir, new_dir)) { + if(!test_neighborhood(pix, back_dir, new_dir)) { ux = pix.x; uy = pix.y; if(witness == pix) { // witness subpixel is a pixel itself @@ -1095,7 +1098,7 @@ void draw_lump(std::vector< Coord_2 >& rev_points, int& last_x, stored_prev = prev_pix; } - if(!test_neighbourhood(pix, back_dir, new_dir)) { + if(!test_neighborhood(pix, back_dir, new_dir)) { if(stored_dir != -1) { pix = stored_pix; prev_pix = stored_prev; @@ -1223,7 +1226,7 @@ bool subdivide(Pixel_2& pix, int back_dir, int& new_dir) { throw internal::Insufficient_rasterize_precision_exception(); } - // if several branches coincide withing this pixel we cannot perform + // if several branches coincide within this pixel we cannot perform // a subdivision if(branches_coincide) return false; @@ -1257,7 +1260,7 @@ bool subdivide(Pixel_2& pix, int back_dir, int& new_dir) { pix.sub_y = (pix.sub_y<<1) + (idx>>1); //Gfx_DETAILED_OUT("subpixel index: " << idx << " (" << pix.sub_x << "; " // << pix.sub_y << ")" << std::endl); - if(!test_neighbourhood(pix, back_dir, new_dir)) + if(!test_neighborhood(pix, back_dir, new_dir)) return subdivide(pix,back_dir,new_dir); //Gfx_DETAILED_OUT("new direction found: " << new_dir << " at a pixel:" << //pix << std::endl); @@ -1313,7 +1316,7 @@ bool get_seed_point(const Rational& seed, Pixel_2& start, int *dir, << start.level << std::endl; throw internal::Insufficient_rasterize_precision_exception(); } - //dump_neighbourhood(start); + //dump_neighborhood(start); if(limit(engine.pixel_w/NT(lvl))||limit(engine.pixel_h/NT(lvl))) { std::cerr << "get_seed_point: too small subpixel size: " << @@ -1425,7 +1428,7 @@ bool test_pixel(const Pixel_2& pix, int *dir, int *b_taken, bool& b_coincide) /* Gfx_OUT("test pixel: " << pix << "--------------------------------\n"); - dump_neighbourhood(pix); + dump_neighborhood(pix); Gfx_OUT("----------------------------------------------\n\n");*/ b_coincide = false; @@ -1863,7 +1866,7 @@ bool recursive_check(int var, const NT& beg_, const NT& end_, return recursive_check(var, key_2, mid, key, poly, depth+1); } -//! computes lower/upper boundaries for pixel's neighbourhood +//! computes lower/upper boundaries for pixel's neighborhood void get_boundaries(int var, const Pixel_2& pix, Stripe& stripe) { int level = pix.level, val = pix.y; @@ -1906,14 +1909,14 @@ inline void get_polynomials(int var, Stripe& stripe) { } /*! - * checks 8-pixel neighbourhood of a pixel, returns \c true if - * only one curve branch intersects pixel's neighbourhood, \c dir + * checks 8-pixel neighborhood of a pixel, returns \c true if + * only one curve branch intersects pixel's neighborhood, \c dir * defines backward direction, \c new_dir is a new tracking direction * * if \c CGAL_CKVA_RENDER_WITH_REFINEMENT is set, in case of success \c pix * receives double approximations of intersection point */ -bool test_neighbourhood(Pixel_2& pix, int dir, int& new_dir) +bool test_neighborhood(Pixel_2& pix, int dir, int& new_dir) { NT lvl = NT(one << pix.level); NT inv = NT(1.0) / lvl; @@ -2258,6 +2261,11 @@ bool compute_double_approx(int var, const NT& l_, const NT& r_, pix.yv = CGAL::to_double(engine.y_min + y*engine.pixel_h); return ret; } +/*! \copydoc test_neighborhood + * \deprecated please use #test_neighborhood */ +CGAL_DEPRECATED bool test_neighbourhood(Pixel_2& pix, int dir, int& new_dir) +{ return test_neighborhood(pix, new_dir); } + #endif // CGAL_CKVA_RENDER_WITH_REFINEMENT //! \brief returns whether a polynomial has zero over an interval, @@ -2585,7 +2593,7 @@ inline bool is_isolated_pixel(const Pixel_2& /* pix */) { // DEBUG ONLY #ifdef Gfx_USE_OUT -void dump_neighbourhood(const Pixel_2& pix) { +void dump_neighborhood(const Pixel_2& pix) { CGAL::IO::set_mode(std::cerr, CGAL::IO::PRETTY); CGAL::IO::set_mode(std::cout, CGAL::IO::PRETTY); @@ -2764,8 +2772,10 @@ void dump_neighbourhood(const Pixel_2& pix) { Gfx_OUT("sign change at segment 2" << std::endl); } #else -void dump_neighbourhood(const Pixel_2&) { } +void dump_neighborhood(const Pixel_2&) { } #endif // Gfx_USE_OUT +CGAL_DEPRECATED void dump_neighbourhood(const Pixel_2& pix) +{ dump_neighborhood(pix); } //!@} }; // class Curve_renderer_2<> diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h index 4f3a3297..0719a987 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h $ -// $Id: Curve_renderer_internals.h 32b31fd 2021-02-02T11:09:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pavel Emeliyanenko // @@ -22,7 +22,10 @@ */ #ifndef CGAL_CKVA_CURVE_RENDERER_INTERNALS_H -#define CGAL_CKVA_CURVE_RENDERER_INTERNALS_H 1 +#define CGAL_CKVA_CURVE_RENDERER_INTERNALS_H + +#include + #include #include @@ -62,7 +65,7 @@ namespace internal { // derivative range analysis #define CGAL_RECURSIVE_DER_MAX_DEGREE 7 -// 8-pixel neighbouthood directions +// 8-pixel neighborhood directions static const struct { int x; int y; } directions[] = { { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1}, {-1, 0}, {-1,-1}, { 0,-1}, { 1,-1}}; @@ -277,7 +280,7 @@ class Curve_renderer_internals return (low*up < 0); //(low < 0&&up > 0); } - //! \brief evalutates a certain polynomial derivative at x + //! \brief evaluates a certain polynomial derivative at x //! //! \c der_coeffs is a set of derivative coefficients, //! \c poly - polynomial coefficients @@ -295,7 +298,7 @@ class Curve_renderer_internals return y; } - //! \brief evalutates a polynomial at certain x-coordinate + //! \brief evaluates a polynomial at certain x-coordinate static NT evaluate(const Poly_1& poly, const NT& x, bool *error_bounds_ = nullptr) { @@ -754,7 +757,7 @@ bool get_range_MAA_1(int var, const NT& l_, const NT& r_, const NT& key, const Poly_1& poly, int check = 1) { Derivative_2 *der = (var == CGAL_X_RANGE) ? der_x : der_y; - // stores precomputed polynomial derivatives and binominal coeffs + // stores precomputed polynomial derivatives and binomial coeffs Derivative_1 der_cache //(der->size()+1, NT(0)) , binom;//(der->size()+1, NT(0)); @@ -824,7 +827,7 @@ bool get_range_MAA_1(int var, const NT& l_, const NT& r_, const NT& key, } // assume we have an array of derivatives: // der_cache: {f^(0); f^(1); f^(2); ...} - // and binominal coefficients: [h; h^2/2; h^3/6; ... h^d/d!] + // and binomial coefficients: [h; h^2/2; h^3/6; ... h^d/d!] der_iterator_1 eval_it = der_cache.end()-1, local_it, binom_it, eval_end = der_cache.end(); d = poly.degree(); diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h index da2c9760..86f70a64 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h $ -// $Id: Curve_renderer_traits.h 32b31fd 2021-02-02T11:09:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pavel Emeliyanenko // @@ -14,6 +14,9 @@ #ifndef CGAL_CKVA_CURVE_RENDERER_TRAITS_H #define CGAL_CKVA_CURVE_RENDERER_TRAITS_H +#include + + #include #include @@ -67,7 +70,7 @@ struct Max_coeff }; /*!\brief - * divides an input value by a contant + * divides an input value by a constant * * provided that there is a coercion between \c Input and \c Result types */ diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_1.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_1.h index a4a78995..969c6896 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_1.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_1.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_1.h $ -// $Id: Subdivision_1.h 0d66e19 2020-07-24T17:05:10+02:00 Mael Rouxel-Labbé -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_1.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_1.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pavel Emeliyanenko // @@ -17,7 +17,10 @@ */ #ifndef CGAL_CKVA_SUBDIVISION_1_H -#define CGAL_CKVA_SUBDIVISION_1_H 1 +#define CGAL_CKVA_SUBDIVISION_1_H + +#include + #include #include diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h index 57aa885a..eefd2e4d 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h $ -// $Id: Subdivision_2.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pavel Emeliyanenko // @@ -17,7 +17,10 @@ */ #ifndef CGAL_CKVA_SUBDIVISION_2_H -#define CGAL_CKVA_SUBDIVISION_2_H 1 +#define CGAL_CKVA_SUBDIVISION_2_H + +#include + #warning this file is considered obsolete @@ -166,7 +169,7 @@ class Subdivision_2 void precompute(); //! \brief switches to another cache instance depending on the //! supporting curve of a segment - //! \brief evalutates the ith derivative at certain x + //! \brief evaluates the ith derivative at certain x //! //! \c cache_it - an intetator pointing to the end of an array of //! polynomial coefficients, \c der_it - an iterator for derivative @@ -179,7 +182,7 @@ class Subdivision_2 val = val * x + (*cache_it--) * (*der_it); return val; } - //! evalutates a function at a certain x + //! evaluates a function at a certain x NT evaluate(const Poly_1& poly, const NT& x) { const_iterator_1 it = poly.end() - 1, begin = poly.begin(); diff --git a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h index 2d7ba245..adb640ba 100644 --- a/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h +++ b/thirdparty/CGAL/include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h $ -// $Id: simple_models.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h $ +// $Id: include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Pavel Emeliyanenko @@ -13,6 +13,9 @@ #ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_TEST_SIMPLE_MODELS_H #define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_TEST_SIMPLE_MODELS_H +#include + + /*!\file include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h * \brief defines dummy implementations satisfying Curve_kernel_2 * concept requirenments @@ -472,7 +475,7 @@ class Status_line_CA_1 } /*!\brief - * constructs from a given represenation + * constructs from a given representation */ Status_line_CA_1(Rep rep) : Base(rep) { @@ -630,7 +633,7 @@ class Curve_analysis_2 : } /*!\brief - * constructsa curve analysis from a given represenation + * constructs a curve analysis from a given representation */ Curve_analysis_2(Rep rep) : Base(rep) { @@ -776,7 +779,7 @@ class Status_line_CPA_1 : } /*!\brief - * constructs from a given represenation + * constructs from a given representation */ Status_line_CPA_1(Rep rep) : Base(rep) { diff --git a/thirdparty/CGAL/include/CGAL/Curves_on_surface_topology.h b/thirdparty/CGAL/include/CGAL/Curves_on_surface_topology.h index 4ef58440..e30ba820 100644 --- a/thirdparty/CGAL/include/CGAL/Curves_on_surface_topology.h +++ b/thirdparty/CGAL/include/CGAL/Curves_on_surface_topology.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_topology/include/CGAL/Curves_on_surface_topology.h $ -// $Id: Curves_on_surface_topology.h b58c05e 2020-08-13T17:59:32-04:00 Youmu +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_topology/include/CGAL/Curves_on_surface_topology.h $ +// $Id: include/CGAL/Curves_on_surface_topology.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -34,8 +34,8 @@ class Curves_on_surface_topology // Types for shortest noncontractible cycle using Shortest_noncontractible_cycle=typename internal::Shortest_noncontractible_cycle; using Facewidth =typename internal::Facewidth; - using Dart_const_handle =typename Shortest_noncontractible_cycle::Original_dart_const_handle; - using halfedge_descriptor =Dart_const_handle ; // To be compatible with BGL + using Dart_const_descriptor =typename Shortest_noncontractible_cycle::Original_dart_const_descriptor; + using halfedge_descriptor =Dart_const_descriptor ; // To be compatible with BGL // Constructor Curves_on_surface_topology(const Mesh& amesh, bool /* display_time */=false) : @@ -116,14 +116,14 @@ class Curves_on_surface_topology template Path_on_surface compute_shortest_non_contractible_cycle_with_base_point - (Dart_const_handle dh, const WeightFunctor& wf, bool display_time=false) const + (Dart_const_descriptor dh, const WeightFunctor& wf, bool display_time=false) const { compute_shortest_non_contractible_cycle_representation(display_time); return m_shortest_noncontractible_cycle->compute_cycle(dh, NULL, wf, display_time); } Path_on_surface compute_shortest_non_contractible_cycle_with_base_point - (Dart_const_handle dh, bool display_time=false) const + (Dart_const_descriptor dh, bool display_time=false) const { compute_shortest_non_contractible_cycle_representation(display_time); return m_shortest_noncontractible_cycle->compute_cycle(dh, display_time); @@ -161,7 +161,7 @@ class Curves_on_surface_topology { m_facewidth=std::make_unique(m_original_mesh, display_time); } } - std::vector compute_face_width(bool display_time=false) const + std::vector compute_face_width(bool display_time=false) const { compute_face_width_representation(display_time); return m_facewidth->compute_face_width(display_time); @@ -181,7 +181,7 @@ class Curves_on_surface_topology // Utility functions // Set whether to display warning message in `std::cerr` when input doesn't meet - // prerequesite + // prerequisite void set_verbose(bool is_verbose) { m_is_verbose = is_verbose; diff --git a/thirdparty/CGAL/include/CGAL/Dart.h b/thirdparty/CGAL/include/CGAL/Dart.h index 79716271..99da41d4 100644 --- a/thirdparty/CGAL/include/CGAL/Dart.h +++ b/thirdparty/CGAL/include/CGAL/Dart.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Dart.h $ -// $Id: Dart.h 46f5325 2022-01-27T10:36:22+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Dart.h $ +// $Id: include/CGAL/Dart.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -26,22 +26,37 @@ namespace CGAL { template class Concurrent_compact_container; - template + template + class Compact_container_with_index; + + template class Combinatorial_map_storage_1; - template + template + class Combinatorial_map_storage_with_index; + + template class Generalized_map_storage_1; - template + template + class Generalized_map_storage_with_index; + + template class CMap_linear_cell_complex_storage_1; - template + template + class CMap_linear_cell_complex_storage_with_index; + + template class GMap_linear_cell_complex_storage_1; + template + class GMap_linear_cell_complex_storage_with_index; + namespace internal { - template - struct Init_id; + template + struct Init_id; } // end namespace internal @@ -51,8 +66,8 @@ namespace CGAL { /** Definition of nD dart without information. * The_dart class describes an nD dart (basic element of a combinatorial or generalized map). - * A dart is composed with handle towards its neighbors, - * a bitset containing Boolean marks, and handle towards enabled attributes. + * A dart is composed with descriptor towards its neighbors, + * a bitset containing Boolean marks, and descriptor towards enabled attributes. * n is the dimension of the space (2 for 2D, 3 for 3D...) * Refs the ref class */ @@ -60,41 +75,57 @@ namespace CGAL { struct Dart_without_info: public Add_id { public: - template + template + friend class Compact_container; + + template + friend class Concurrent_compact_container; + + template + friend class Compact_container_with_index; + + template friend class Combinatorial_map_storage_1; - template + template + friend class Combinatorial_map_storage_with_index; + + template friend class Generalized_map_storage_1; - template + template + friend class Generalized_map_storage_with_index; + + template friend class CMap_linear_cell_complex_storage_1; - template - friend class GMap_linear_cell_complex_storage_1; + template + friend class CMap_linear_cell_complex_storage_with_index; - template - friend class Compact_container; + template + friend class GMap_linear_cell_complex_storage_1; - template - friend class Concurrent_compact_container; + template + friend class GMap_linear_cell_complex_storage_with_index; template friend struct internal::Init_id; - typedef Dart_without_info Self; - typedef typename Refs::Dart_handle Dart_handle; - typedef typename Refs::size_type size_type; - typedef typename Refs::Dart_const_handle Dart_const_handle; - typedef typename Refs::Helper Helper; - typedef WithId Has_id; + typedef Dart_without_info Self; + typedef typename Refs::Dart_descriptor Dart_descriptor; + typedef typename Refs::size_type size_type; + typedef typename Refs::Dart_const_descriptor Dart_const_descriptor; + typedef typename Refs::Helper Helper; + typedef WithId Has_id; + using Type_for_compact_container=typename Refs::Type_for_compact_container; /// Typedef for attributes template - struct Attribute_handle: public Refs::template Attribute_handle + struct Attribute_descriptor: public Refs::template Attribute_descriptor {}; template - struct Attribute_const_handle: - public Refs::template Attribute_const_handle + struct Attribute_const_descriptor: + public Refs::template Attribute_const_descriptor {}; /// The number of used marks. @@ -103,17 +134,27 @@ namespace CGAL { /// The dimension of the combinatorial map. static const unsigned int dimension = d; - void * for_compact_container() const + Type_for_compact_container for_compact_container() const { return mf[0].for_compact_container(); } - void for_compact_container(void *p) + void for_compact_container(Type_for_compact_container p) { mf[0].for_compact_container(p); } - Dart_handle get_f(unsigned int i) const + Dart_descriptor get_f(unsigned int i) const { assert(i<=dimension); return mf[i]; } + bool operator==(const Self& other) const + { + if(mmarks!=other.mmarks || + mattribute_descriptors!=other.mattribute_descriptors) + { return false; } + for(unsigned int i=0; i<=dimension; ++i) + { if(mf[i]!=other.mf[i]) { return false; }} + return true; + } + protected: /** Default constructor: no real initialisation, * because this is done in the combinatorial map class. @@ -124,11 +165,21 @@ namespace CGAL { /** Copy constructor: * @param adart a dart. */ - Dart_without_info(const Dart_without_info& adart) : mmarks(adart.mmarks), - mattribute_handles(adart.mattribute_handles) + Dart_without_info(const Dart_without_info& other) : + mmarks(other.mmarks), + mattribute_descriptors(other.mattribute_descriptors) { - for (unsigned int i = 0; i <= dimension; ++i) - mf[i] = adart.mf[i]; + for (unsigned int i=0; i<=dimension; ++i) + { mf[i]=other.mf[i]; } + } + + Self& operator=(const Self& other) + { + mmarks=other.mmarks; + mattribute_descriptors=other.mattribute_descriptors; + for (unsigned int i=0; i<=dimension; ++i) + { mf[i]=other.mf[i]; } + return *this; } /** Return the mark value of a given mark number. @@ -171,33 +222,33 @@ namespace CGAL { void set_marks(const std::bitset& amarks) const { mmarks = amarks; } - /// @return a handle on the i-attribute + /// @return a descriptor on the i-attribute template - typename Attribute_handle::type attribute() + typename Attribute_descriptor::type attribute() { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> - (mattribute_handles); + (mattribute_descriptors); } template - typename Attribute_const_handle::type attribute() const + typename Attribute_const_descriptor::type attribute() const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> - (mattribute_handles); + (mattribute_descriptors); } protected: - /// Neighboors for each dimension +1 (from 0 to dimension). - Dart_handle mf[dimension+1]; + /// Neighbors for each dimension +1 (from 0 to dimension). + Dart_descriptor mf[dimension+1]; /// Values of Boolean marks. mutable std::bitset mmarks; /// Attributes enabled - typename Helper::Attribute_handles mattribute_handles; + typename Helper::Attribute_descriptors mattribute_descriptors; }; // Dart definition with an info; @@ -207,37 +258,57 @@ namespace CGAL { struct Dart : public Dart_without_info { public: - template + using Base=Dart_without_info; + + template + friend class Compact_container; + + template + friend class Concurrent_compact_container; + + template + friend class Compact_container_with_index; + + template friend class Combinatorial_map_storage_1; - template + template + friend class Combinatorial_map_storage_with_index; + + template friend class Generalized_map_storage_1; - template + template + friend class Generalized_map_storage_with_index; + + template friend class CMap_linear_cell_complex_storage_1; - template - friend class GMap_linear_cell_complex_storage_1; + template + friend class CMap_linear_cell_complex_storage_with_index; - template - friend class Compact_container; + template + friend class GMap_linear_cell_complex_storage_1; - template - friend class Concurrent_compact_container; + template + friend class GMap_linear_cell_complex_storage_with_index; typedef Dart Self; typedef Info_ Info; + bool operator==(const Self& other) const + { return Base::operator==(other) && minfo==other.minfo; } + protected: /** Default constructor: no real initialisation, * because this is done in the combinatorial or generalized map class. */ - Dart() - {} + Dart()=default; // default => zero-initializing built-in types Dart(const Info_& info) : minfo(info) {} + protected: Info_& info() { return minfo; } const Info_& info() const @@ -255,6 +326,14 @@ namespace CGAL { typedef CGAL::Void Info; }; + // Specialization of Dart class when info==CGAL::Void + template + struct Dart : public Dart_without_info + { + public: + typedef CGAL::Void Info; + }; + } // namespace CGAL #endif // CGAL_DART_H // diff --git a/thirdparty/CGAL/include/CGAL/Dart_const_iterators.h b/thirdparty/CGAL/include/CGAL/Dart_const_iterators.h index 1867d6f4..77598f05 100644 --- a/thirdparty/CGAL/include/CGAL/Dart_const_iterators.h +++ b/thirdparty/CGAL/include/CGAL/Dart_const_iterators.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Dart_const_iterators.h $ -// $Id: Dart_const_iterators.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Dart_const_iterators.h $ +// $Id: include/CGAL/Dart_const_iterators.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -38,17 +38,17 @@ namespace CGAL { typedef CMap_dart_const_iterator_basic_of_orbit Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; typedef typename Map_::size_type size_type; /// Main constructor. CMap_dart_const_iterator_basic_of_orbit(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /// Main constructor. CMap_dart_const_iterator_basic_of_orbit(const Map_& amap, - Dart_const_handle adart, + Dart_const_descriptor adart, size_type amark): Base(amap,adart,amark) {} @@ -69,11 +69,11 @@ namespace CGAL { typedef CMap_dart_const_iterator_of_orbit Self; typedef CMap_dart_iterator_of_orbit_generic Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; /// Main constructor. CMap_dart_const_iterator_of_orbit(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /// Constructor from non const version. @@ -90,17 +90,17 @@ namespace CGAL { { public: typedef CMap_dart_iterator_basic_of_all Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; typedef typename Map_::size_type size_type; /* Main constructor. */ CMap_dart_const_iterator_basic_of_all(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /* Main constructor. */ CMap_dart_const_iterator_basic_of_all(const Map_& amap, - Dart_const_handle adart, + Dart_const_descriptor adart, size_type /*amark*/): Base(amap,adart) {} @@ -118,17 +118,17 @@ namespace CGAL { { public: typedef CMap_dart_iterator_basic_of_cell Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; typedef typename Map_::size_type size_type; /* Main constructor. */ CMap_dart_const_iterator_basic_of_cell(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /* Main constructor. */ CMap_dart_const_iterator_basic_of_cell(const Map_& amap, - Dart_const_handle adart, + Dart_const_descriptor adart, size_type amark): Base(amap,adart,amark) {} @@ -146,11 +146,11 @@ namespace CGAL { { public: typedef CMap_dart_iterator_of_cell Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; /* Main constructor. */ CMap_dart_const_iterator_of_cell(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /// Constructor from non const version. @@ -167,17 +167,17 @@ namespace CGAL { { public: typedef CMap_dart_iterator_basic_of_involution Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; typedef typename Map_::size_type size_type; /* Main constructor. */ CMap_dart_const_iterator_basic_of_involution(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /* Main constructor. */ CMap_dart_const_iterator_basic_of_involution(const Map_& amap, - Dart_const_handle adart, + Dart_const_descriptor adart, size_type amark): Base(amap,adart,amark) {} @@ -195,11 +195,11 @@ namespace CGAL { { public: typedef CMap_dart_iterator_of_involution Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; /* Main constructor. */ CMap_dart_const_iterator_of_involution(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /// Constructor from non const version. @@ -216,17 +216,17 @@ namespace CGAL { { public: typedef CMap_dart_iterator_basic_of_involution_inv Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; typedef typename Map_::size_type size_type; /* Main constructor. */ CMap_dart_const_iterator_basic_of_involution_inv(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /* Main constructor. */ CMap_dart_const_iterator_basic_of_involution_inv(const Map_& amap, - Dart_const_handle adart, + Dart_const_descriptor adart, size_type amark): Base(amap,adart,amark) {} @@ -244,11 +244,11 @@ namespace CGAL { { public: typedef CMap_dart_iterator_of_involution_inv Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; /* Main constructor. */ CMap_dart_const_iterator_of_involution_inv(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /// Constructor from non const version. diff --git a/thirdparty/CGAL/include/CGAL/Dart_iterators.h b/thirdparty/CGAL/include/CGAL/Dart_iterators.h index 06a05bd9..c12efc76 100644 --- a/thirdparty/CGAL/include/CGAL/Dart_iterators.h +++ b/thirdparty/CGAL/include/CGAL/Dart_iterators.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Dart_iterators.h $ -// $Id: Dart_iterators.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Dart_iterators.h $ +// $Id: include/CGAL/Dart_iterators.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -48,7 +48,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_orbit_generic Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -56,12 +56,12 @@ namespace CGAL { public: /// Main constructor. - CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart): + CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart): Base(amap, adart) {} /// Main constructor. - CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, + CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} @@ -70,7 +70,7 @@ namespace CGAL { Self& operator++() { CGAL_assertion(this->cont()); - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); this->mprev_op = OP_END; return *this; } @@ -92,7 +92,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_orbit_generic Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -100,13 +100,13 @@ namespace CGAL { public: /// Main constructor. - CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart): + CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart): Base(amap, adart), mfirst_dir(true) {} /// Main constructor. - CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, + CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart), mfirst_dir(true) @@ -153,7 +153,7 @@ namespace CGAL { if ((*this)==this->mfirst_dart) { - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); this->mprev_op = OP_END; } } @@ -161,7 +161,7 @@ namespace CGAL { { if (this->mmap->is_free(*this, 1)) { - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); this->mprev_op = OP_END; } else @@ -194,7 +194,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_orbit_generic Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -202,13 +202,13 @@ namespace CGAL { public: /// Main constructor. - CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart): + CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart): Base(amap, adart), mfirst_dir(true) {} /// Main constructor. - CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, + CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart), mfirst_dir(true) @@ -244,7 +244,7 @@ namespace CGAL { if ((*this)==this->mfirst_dart) { - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); this->mprev_op = OP_END; } } @@ -252,7 +252,7 @@ namespace CGAL { { if (this->mmap->is_free(*this, 0)) { - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); this->mprev_op = OP_END; } else @@ -285,7 +285,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_orbit_generic Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -293,15 +293,15 @@ namespace CGAL { public: /// Main constructor. - CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart): + CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart): Base(amap, adart) - { CGAL_static_assertion( Bi>=2 && Bi<=Map::dimension ); } + { static_assert( Bi>=2 && Bi<=Map::dimension ); } /// Main constructor. - CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, + CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) - { CGAL_static_assertion( Bi>=2 && Bi<=Map::dimension ); } + { static_assert( Bi>=2 && Bi<=Map::dimension ); } /// Prefix ++ operator. Self& operator++() @@ -309,7 +309,7 @@ namespace CGAL { CGAL_assertion(this->cont()); if ((*this)!=this->mfirst_dart || this->mmap->is_free(*this, Bi)) { - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); this->mprev_op = OP_END; } else @@ -340,23 +340,23 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_two_beta Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; typedef Tag_false Use_mark; - CGAL_static_assertion( Bi>1 && delta>1 && Bi+delta<=Map::dimension ); + static_assert( Bi>1 && delta>1 && Bi+delta<=Map::dimension ); public: /// Main constructor. - CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart): + CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_descriptor adart): Base(amap, adart), mcurdart(0) {} /// Main constructor. - CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, + CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart), mcurdart(0) @@ -393,7 +393,7 @@ namespace CGAL { else { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } } } @@ -408,7 +408,7 @@ namespace CGAL { else { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } } else if (mcurdart==2) @@ -422,7 +422,7 @@ namespace CGAL { { CGAL_assertion (mcurdart==3); this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } return *this; @@ -454,17 +454,17 @@ namespace CGAL { typedef CMap_extend_iterator , 2> Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; typedef Tag_true Use_mark; - CGAL_static_assertion( 2<=Map::dimension ); + static_assert( 2<=Map::dimension ); public: /// Main constructor. - CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, + CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_descriptor adart, size_type amark): Base(amap, adart, amark) {} @@ -487,17 +487,17 @@ namespace CGAL { typedef CMap_extend_iterator , 2> Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; typedef Tag_true Use_mark; - CGAL_static_assertion( 2<=Map::dimension ); + static_assert( 2<=Map::dimension ); public: /// Main constructor. - CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, + CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_descriptor adart, size_type amark): Base(amap, adart, amark) {} @@ -518,34 +518,34 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_two_beta Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; typedef Tag_false Use_mark; - CGAL_static_assertion( delta>1 && delta<=Map::dimension ); + static_assert( delta>1 && delta<=Map::dimension ); public: /// Main constructor. - CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart): + CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_descriptor adart): Base(amap, adart), mit(amap, adart), mexist_betaj(false), mprev_betaj(false), mfirst_border(true) - { if (adart!=this->mmap->null_handle) + { if (adart!=this->mmap->null_descriptor) mexist_betaj=!this->mmap->is_free(adart, delta); } /// Main constructor. - CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, + CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart), mit(amap, adart), mexist_betaj(false), mprev_betaj(false), mfirst_border(true) - { if (adart!=this->mmap->null_handle) + { if (adart!=this->mmap->null_descriptor) mexist_betaj=!this->mmap->is_free(adart, delta); } /// Prefix ++ operator. @@ -565,7 +565,7 @@ namespace CGAL { ++mit; this->mprev_op = mit.prev_operation(); if ( !mit.cont() ) - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); else { if ( !mfirst_border ) @@ -619,34 +619,34 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_two_beta Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; typedef Tag_false Use_mark; - CGAL_static_assertion( delta>1 && delta+1<=Map::dimension ); + static_assert( delta>1 && delta+1<=Map::dimension ); public: /// Main constructor. - CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart): + CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_descriptor adart): Base(amap, adart), mit(amap, adart), mexist_betaj(false), mprev_betaj(false), mfirst_border(true) - { if (adart!=this->mmap->null_handle) + { if (adart!=this->mmap->null_descriptor) mexist_betaj=!this->mmap->is_free(adart, 1+delta); } /// Main constructor. - CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, + CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart), mit(amap, adart), mexist_betaj(false), mprev_betaj(false), mfirst_border(true) - { if (adart!=this->mmap->null_handle) + { if (adart!=this->mmap->null_descriptor) mexist_betaj=!this->mmap->is_free(adart, 1+delta); } /// Prefix ++ operator. @@ -666,7 +666,7 @@ namespace CGAL { ++mit; this->mprev_op = mit.prev_operation(); if ( !mit.cont() ) - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); else { if ( !mfirst_border ) @@ -720,24 +720,24 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_two_beta Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; typedef Tag_false Use_mark; - CGAL_static_assertion( Bi>1 && Bi+1<=Map::dimension ); + static_assert( Bi>1 && Bi+1<=Map::dimension ); public: /// Main constructor. - CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart): + CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_descriptor adart): Base(amap, adart), mfirst_dir(true), mnext_try_betai(true) {} /// Main constructor. - CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, + CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart), mfirst_dir(true), @@ -767,7 +767,7 @@ namespace CGAL { if (this->mmap->is_free(this->mfirst_dart, Bi+1)) { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } else { @@ -790,7 +790,7 @@ namespace CGAL { if (this->mmap->is_free(this->mfirst_dart, Bi+1)) { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } else { @@ -805,7 +805,7 @@ namespace CGAL { if ((*this)==this->mfirst_dart) { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } else { @@ -822,7 +822,7 @@ namespace CGAL { if (this->mmap->is_free(*this, Bi)) { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } else { @@ -836,7 +836,7 @@ namespace CGAL { if (this->mmap->is_free(*this, Bi+1)) { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } else { @@ -875,7 +875,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_orbit_generic Self; typedef CMap_dart_iterator_basic_of_two_beta Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -883,12 +883,12 @@ namespace CGAL { public: /// Main constructor. - CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart) : + CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart) : Base(amap, adart) {} /// Main constructor. - CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, + CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart, size_type amark): Base(amap, adart, amark) {} @@ -911,7 +911,7 @@ namespace CGAL { , Bk> Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -920,7 +920,7 @@ namespace CGAL { public: /// Main constructor. - CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, + CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart, size_type amark): Base(amap, adart, amark) {} @@ -937,15 +937,15 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_orbit Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Map::Dart_handle Dart_handle; + typedef typename Map::Dart_descriptor Dart_descriptor; typedef typename Map::size_type size_type; /// Main constructor. - CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart): + CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_descriptor adart): Base(amap,adart) {} /// Main constructor. - CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart,size_type amark): + CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_descriptor adart,size_type amark): Base(amap,adart,amark) {} }; @@ -960,7 +960,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_all Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -977,11 +977,11 @@ namespace CGAL { {} /// Constructor with a dart in parameter (for end iterator). - CMap_dart_iterator_basic_of_all(Map& amap, Dart_handle adart): + CMap_dart_iterator_basic_of_all(Map& amap, Dart_descriptor adart): Base(amap, adart) {} /// Constructor with a dart in parameter (for end iterator). - CMap_dart_iterator_basic_of_all(Map& amap, Dart_handle adart, + CMap_dart_iterator_basic_of_all(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} @@ -996,7 +996,7 @@ namespace CGAL { { this->mprev_op = OP_POP; } else { - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); this->mprev_op = OP_END; } return *this; @@ -1020,23 +1020,23 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_cell Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; typedef Tag_true Use_mark; - CGAL_static_assertion( i>1 && i<=Map::dimension+1 ); + static_assert( i>1 && i<=Map::dimension+1 ); public: /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart), mmark_number(amark) { - if (adart!=this->mmap->null_handle) + if (adart!=this->mmap->null_descriptor) { this->mmap->mark_null_dart(mmark_number); this->mmap->mark(adart, mmark_number); @@ -1048,7 +1048,7 @@ namespace CGAL { { CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); - mto_treat = std::queue(); + mto_treat = std::queue(); this->mmap->mark(*this, mmark_number); this->mmap->mark_null_dart(mmark_number); } @@ -1058,16 +1058,16 @@ namespace CGAL { { CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); - Dart_handle nd = this->mmap->null_handle; + Dart_descriptor nd = this->mmap->null_descriptor; for ( unsigned int k=0; kis_unmarked((*this), k, mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { nd = this->mmap->beta(*this, k); - CGAL_assertion(nd!=this->mmap->null_dart_handle); + CGAL_assertion(nd!=this->mmap->null_dart_descriptor); this->mprev_op = OP_BETAI; } else @@ -1081,10 +1081,10 @@ namespace CGAL { { if ( this->is_unmarked((*this), k, mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { nd = this->mmap->beta(*this, k); - CGAL_assertion(nd!=this->mmap->null_dart_handle); + CGAL_assertion(nd!=this->mmap->null_dart_descriptor); this->mprev_op = OP_BETAI; } else @@ -1095,7 +1095,7 @@ namespace CGAL { } } - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { if (!mto_treat.empty()) { @@ -1119,7 +1119,7 @@ namespace CGAL { protected: /// Queue of darts to process. - std::queue mto_treat; + std::queue mto_treat; /// Index of the used mark. size_type mmark_number; @@ -1134,7 +1134,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_cell Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -1143,12 +1143,12 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart), mmark_number(amark) { - if (adart!=this->mmap->null_handle) + if (adart!=this->mmap->null_descriptor) { this->mmap->mark(adart, mmark_number); this->mmap->mark_null_dart(mmark_number); @@ -1160,7 +1160,7 @@ namespace CGAL { { CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); - mto_treat = std::queue(); + mto_treat = std::queue(); this->mmap->mark((*this), mmark_number); this->mmap->mark_null_dart(mmark_number); } @@ -1171,16 +1171,16 @@ namespace CGAL { CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); - Dart_handle nd = this->mmap->null_handle; + Dart_descriptor nd = this->mmap->null_descriptor; for ( unsigned int k=2; k<=d; ++k ) { if ( this->is_unmarked((*this), k, mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { nd = this->mmap->beta(*this, k); - CGAL_assertion(nd!=this->mmap->null_dart_handle); + CGAL_assertion(nd!=this->mmap->null_dart_descriptor); this->mprev_op = OP_BETAI; } else @@ -1191,12 +1191,12 @@ namespace CGAL { } } - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { if (!mto_treat.empty()) { nd = mto_treat.front(); - CGAL_assertion(nd!=this->mmap->null_dart_handle); + CGAL_assertion(nd!=this->mmap->null_dart_descriptor); mto_treat.pop(); this->mprev_op = OP_POP; } @@ -1216,7 +1216,7 @@ namespace CGAL { protected: /// Queue of darts to process. - std::queue mto_treat; + std::queue mto_treat; /// Index of the used mark. size_type mmark_number; @@ -1231,7 +1231,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_cell Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -1240,11 +1240,11 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart), mmark_number(amark) - { if (adart!=this->mmap->null_handle) + { if (adart!=this->mmap->null_descriptor) { this->mmap->mark(adart, mmark_number); this->mmap->mark_null_dart(mmark_number); @@ -1256,7 +1256,7 @@ namespace CGAL { { CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); - mto_treat = std::queue(); + mto_treat = std::queue(); this->mmap->mark((*this), mmark_number); this->mmap->mark_null_dart(mmark_number); } @@ -1267,16 +1267,16 @@ namespace CGAL { CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); - Dart_handle nd = this->mmap->null_handle; + Dart_descriptor nd = this->mmap->null_descriptor; for ( unsigned int k=2; k<=d; ++k ) { if ( this->is_unmarked2((*this), 0, k, mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { nd = this->mmap->beta(*this, 0, k); - CGAL_assertion(nd!=this->mmap->null_dart_handle); + CGAL_assertion(nd!=this->mmap->null_dart_descriptor); this->mprev_op = OP_BETA0I; } else @@ -1287,10 +1287,10 @@ namespace CGAL { } if ( this->is_unmarked2((*this), k, 1, mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { nd = this->mmap->beta(*this, k, 1); - CGAL_assertion(nd!=this->mmap->null_dart_handle); + CGAL_assertion(nd!=this->mmap->null_dart_descriptor); this->mprev_op = OP_BETAI1; } else @@ -1303,10 +1303,10 @@ namespace CGAL { { if ( this->is_unmarked2((*this), k, l, mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { nd = this->mmap->beta(*this, k, l); - CGAL_assertion(nd!=this->mmap->null_dart_handle); + CGAL_assertion(nd!=this->mmap->null_dart_descriptor); this->mprev_op = OP_BETAIJ; } else @@ -1317,10 +1317,10 @@ namespace CGAL { } if ( this->is_unmarked2((*this), l, k, mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { nd = this->mmap->beta(*this, l, k); - CGAL_assertion(nd!=this->mmap->null_dart_handle); + CGAL_assertion(nd!=this->mmap->null_dart_descriptor); this->mprev_op = OP_BETAJI; } else @@ -1332,12 +1332,12 @@ namespace CGAL { } } - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { if (!mto_treat.empty()) { nd = mto_treat.front(); - CGAL_assertion(nd!=this->mmap->null_dart_handle); + CGAL_assertion(nd!=this->mmap->null_dart_descriptor); mto_treat.pop(); this->mprev_op = OP_POP; } @@ -1357,7 +1357,7 @@ namespace CGAL { protected: /// Queue of darts to process. - std::queue mto_treat; + std::queue mto_treat; /// Index of the used mark. size_type mmark_number; @@ -1372,19 +1372,19 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_cell Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} @@ -1399,19 +1399,19 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_cell Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} @@ -1426,13 +1426,13 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_cell Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart, amark) {} @@ -1447,19 +1447,19 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_cell Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} }; @@ -1473,19 +1473,19 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_cell Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} }; @@ -1499,13 +1499,13 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_cell Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart, amark) {} @@ -1520,13 +1520,13 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_cell Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart, amark) {} @@ -1543,7 +1543,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_cell Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -1552,14 +1552,14 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart), mfirst_dir(true) {} /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart), mfirst_dir(true) @@ -1580,14 +1580,14 @@ namespace CGAL { if (mfirst_dir) { this->set_current_dart(this->mmap->beta(*this, 0, 2)); - if ((*this)==this->mmap->null_dart_handle) + if ((*this)==this->mmap->null_dart_descriptor) { mfirst_dir = false; this->set_current_dart(this->mmap->beta(this->mfirst_dart, 2, 1)); - if ((*this)==this->mmap->null_dart_handle) + if ((*this)==this->mmap->null_dart_descriptor) { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } else { @@ -1599,7 +1599,7 @@ namespace CGAL { if ((*this)==this->mfirst_dart) { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } else this->mprev_op = OP_BETA0I; @@ -1608,10 +1608,10 @@ namespace CGAL { else { this->set_current_dart(this->mmap->beta(*this, 2, 1)); - if ((*this) == this->mmap->null_dart_handle) + if ((*this) == this->mmap->null_dart_descriptor) { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } else this->mprev_op = OP_BETA21; @@ -1644,10 +1644,10 @@ namespace CGAL { > Base; typedef typename Base::Map Map; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; /// Main constructor. - CMap_dart_iterator_of_orbit_generic(Map& amap, Dart_handle adart1): + CMap_dart_iterator_of_orbit_generic(Map& amap, Dart_descriptor adart1): Base(amap, adart1) {} }; @@ -1660,10 +1660,10 @@ namespace CGAL { typedef CMap_dart_iterator_of_orbit Self; typedef CMap_dart_iterator_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; /// Main constructor. - CMap_dart_iterator_of_orbit(Map_& amap, Dart_handle adart): + CMap_dart_iterator_of_orbit(Map_& amap, Dart_descriptor adart): Base(amap, adart) {} }; @@ -1679,11 +1679,11 @@ namespace CGAL { CMap_dart_iterator_basic_of_cell > Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; /// Main constructor. - CMap_dart_iterator_of_cell(Map& amap, Dart_handle adart1): + CMap_dart_iterator_of_cell(Map& amap, Dart_descriptor adart1): Base(amap, adart1) {} }; @@ -1704,7 +1704,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -1716,14 +1716,14 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart), mmark_number(amark) { CGAL_assertion( d>=3 && d<=Map::dimension ); CGAL_assertion( i>=3 && i<=Map::dimension ); - if (adart!=this->mmap->null_handle) + if (adart!=this->mmap->null_descriptor) { this->mmap->mark(adart, mmark_number); this->mmap->mark_null_dart(mmark_number); @@ -1735,7 +1735,7 @@ namespace CGAL { { CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); - mto_treat = std::queue(); + mto_treat = std::queue(); this->mmap->mark((*this), mmark_number); this->mmap->mark_null_dart(mmark_number); } @@ -1746,16 +1746,16 @@ namespace CGAL { CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); - Dart_handle nd = this->mmap->null_handle; + Dart_descriptor nd = this->mmap->null_descriptor; for ( int k=0; k<2; ++k ) { if ( this->is_unmarked((*this), k, mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { nd = this->mmap->beta(*this, k); - CGAL_assertion(nd!=this->mmap->null_dart_handle); + CGAL_assertion(nd!=this->mmap->null_dart_descriptor); this->mprev_op = OP_BETAI; } else @@ -1771,10 +1771,10 @@ namespace CGAL { if ( k!=i-1 && k!=i && k!=i+1 && this->is_unmarked((*this), k, mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { nd = this->mmap->beta(*this, k); - CGAL_assertion(nd!=this->mmap->null_dart_handle); + CGAL_assertion(nd!=this->mmap->null_dart_descriptor); this->mprev_op = OP_BETAI; } else @@ -1785,7 +1785,7 @@ namespace CGAL { } } - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { if (!mto_treat.empty()) { @@ -1809,7 +1809,7 @@ namespace CGAL { protected: /// Queue of darts to process. - std::queue mto_treat; + std::queue mto_treat; /// Index of the used mark. size_type mmark_number; @@ -1827,7 +1827,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution_inv Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -1839,13 +1839,13 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart), mmark_number(amark) { CGAL_assertion( i>=3 && i<=Map::dimension ); - if (adart!=this->mmap->null_handle) + if (adart!=this->mmap->null_descriptor) { this->mmap->mark(adart, mmark_number); this->mmap->mark_null_dart(mmark_number); @@ -1857,7 +1857,7 @@ namespace CGAL { { CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); - mto_treat = std::queue(); + mto_treat = std::queue(); this->mmap->mark((*this), mmark_number); this->mmap->mark_null_dart(mmark_number); } @@ -1868,16 +1868,16 @@ namespace CGAL { CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); - Dart_handle nd = this->mmap->null_handle; + Dart_descriptor nd = this->mmap->null_descriptor; for ( int k=1; k>=0; --k ) { if ( this->is_unmarked((*this), k, mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { nd = this->mmap->beta(*this, k); - CGAL_assertion(nd!=this->mmap->null_dart_handle); + CGAL_assertion(nd!=this->mmap->null_dart_descriptor); this->mprev_op = OP_BETAI; } else @@ -1892,10 +1892,10 @@ namespace CGAL { if ( k!=i-1 && k!=i && k!=i+1 && this->is_unmarked((*this), k, mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { nd = this->mmap->beta(*this, k); - CGAL_assertion(nd!=this->mmap->null_dart_handle); + CGAL_assertion(nd!=this->mmap->null_dart_descriptor); this->mprev_op = OP_BETAI; } else @@ -1906,7 +1906,7 @@ namespace CGAL { } } - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { if (!mto_treat.empty()) { @@ -1930,7 +1930,7 @@ namespace CGAL { protected: /// Queue of darts to process. - std::queue mto_treat; + std::queue mto_treat; /// Index of the used mark. size_type mmark_number; @@ -1946,7 +1946,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -1958,11 +1958,11 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart), mmark_number(amark) - { if (adart!=this->mmap->null_handle) + { if (adart!=this->mmap->null_descriptor) { this->mmap->mark(adart, mmark_number); this->mmap->mark_null_dart(mmark_number); @@ -1974,7 +1974,7 @@ namespace CGAL { { CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); - mto_treat = std::queue(); + mto_treat = std::queue(); this->mmap->mark_null_dart(mmark_number); this->mmap->mark((*this), mmark_number); } @@ -1985,16 +1985,16 @@ namespace CGAL { CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); - Dart_handle nd = this->mmap->null_handle; + Dart_descriptor nd = this->mmap->null_descriptor; for ( unsigned int k=3; k<=d; ++k ) { if ( this->is_unmarked((*this), k, mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { nd = this->mmap->beta(*this, k); - CGAL_assertion(nd!=this->mmap->null_dart_handle); + CGAL_assertion(nd!=this->mmap->null_dart_descriptor); this->mprev_op = OP_BETAI; } else @@ -2005,7 +2005,7 @@ namespace CGAL { } } - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { if (!mto_treat.empty()) { @@ -2029,7 +2029,7 @@ namespace CGAL { protected: /// Queue of darts to process. - std::queue mto_treat; + std::queue mto_treat; /// Index of the used mark. size_type mmark_number; @@ -2045,7 +2045,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution_inv Self; typedef CMap_dart_iterator_basic_of_involution Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -2057,7 +2057,7 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart,amark) {} @@ -2073,7 +2073,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -2085,11 +2085,11 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart), mmark_number(amark) - { if ( adart!=this->mmap->null_handle) + { if ( adart!=this->mmap->null_descriptor) { this->mmap->mark(adart, mmark_number); this->mmap->mark_null_dart(mmark_number); @@ -2101,7 +2101,7 @@ namespace CGAL { { CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); - mto_treat = std::queue(); + mto_treat = std::queue(); this->mmap->mark((*this), mmark_number); this->mmap->mark_null_dart(mmark_number); } @@ -2112,16 +2112,16 @@ namespace CGAL { CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); - Dart_handle nd = this->mmap->null_handle; + Dart_descriptor nd = this->mmap->null_descriptor; for ( unsigned int k=4; k<=d; ++k ) { if ( this->is_unmarked((*this), k, mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { nd = this->mmap->beta(*this, k); - CGAL_assertion(nd!=this->mmap->null_dart_handle); + CGAL_assertion(nd!=this->mmap->null_dart_descriptor); this->mprev_op = OP_BETAI; } else @@ -2132,7 +2132,7 @@ namespace CGAL { } } - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { if (!mto_treat.empty()) { @@ -2156,7 +2156,7 @@ namespace CGAL { protected: /// Queue of darts to process. - std::queue mto_treat; + std::queue mto_treat; /// Index of the used mark. size_type mmark_number; @@ -2172,7 +2172,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution_inv Self; typedef CMap_dart_iterator_basic_of_involution Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -2184,7 +2184,7 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart,amark) {} @@ -2200,7 +2200,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -2212,13 +2212,13 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -2233,7 +2233,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution_inv Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -2245,13 +2245,13 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -2266,7 +2266,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -2278,13 +2278,13 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -2299,7 +2299,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution_inv Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -2311,13 +2311,13 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -2332,7 +2332,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -2344,13 +2344,13 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -2365,7 +2365,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution_inv Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -2377,13 +2377,13 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -2398,7 +2398,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -2410,13 +2410,13 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /* amark*/): Base(amap, adart) {} /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -2431,7 +2431,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution_inv Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -2443,13 +2443,13 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -2464,7 +2464,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -2476,13 +2476,13 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -2497,7 +2497,7 @@ namespace CGAL { typedef CMap_dart_iterator_basic_of_involution_inv Self; typedef CMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -2509,13 +2509,13 @@ namespace CGAL { public: /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -2534,7 +2534,7 @@ namespace CGAL { /// Main constructor. CMap_dart_iterator_of_involution(typename Base::Map& amap, - typename Base::Dart_handle adart1): + typename Base::Dart_descriptor adart1): Base(amap, adart1) {} }; @@ -2553,7 +2553,7 @@ namespace CGAL { /// Main constructor. CMap_dart_iterator_of_involution_inv(typename Base::Map& amap, - typename Base::Dart_handle adart1): + typename Base::Dart_descriptor adart1): Base(amap, adart1) {} }; diff --git a/thirdparty/CGAL/include/CGAL/Default.h b/thirdparty/CGAL/include/CGAL/Default.h index f478ccee..25dd8c48 100644 --- a/thirdparty/CGAL/include/CGAL/Default.h +++ b/thirdparty/CGAL/include/CGAL/Default.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Default.h $ -// $Id: Default.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Default.h $ +// $Id: include/CGAL/Default.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Default_diagonalize_traits.h b/thirdparty/CGAL/include/CGAL/Default_diagonalize_traits.h index 726b8948..e923dcce 100644 --- a/thirdparty/CGAL/include/CGAL/Default_diagonalize_traits.h +++ b/thirdparty/CGAL/include/CGAL/Default_diagonalize_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Solver_interface/include/CGAL/Default_diagonalize_traits.h $ -// $Id: Default_diagonalize_traits.h 267a641 2021-05-31T14:01:08+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Solver_interface/include/CGAL/Default_diagonalize_traits.h $ +// $Id: include/CGAL/Default_diagonalize_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -30,7 +30,7 @@ namespace CGAL { /// \tparam FT Number type /// \tparam dim Dimension of the matrices and vectors /// -/// \cgalModels `DiagonalizeTraits` +/// \cgalModels{DiagonalizeTraits} template class Default_diagonalize_traits { diff --git a/thirdparty/CGAL/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h b/thirdparty/CGAL/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h index 8157bd41..689f6996 100644 --- a/thirdparty/CGAL/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_deformation/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h $ -// $Id: Deformation_Eigen_closest_rotation_traits_3.h a98b548 2022-05-12T16:03:53+02:00 Sven Oesau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_deformation/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h $ +// $Id: include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Gael Guennebaud and Ilker O. Yaz @@ -13,6 +13,8 @@ #ifndef CGAL_DEFORMATION_EIGEN_CLOSEST_ROTATION_TRAITS_3_H #define CGAL_DEFORMATION_EIGEN_CLOSEST_ROTATION_TRAITS_3_H +#include + #include #include @@ -21,7 +23,7 @@ namespace CGAL { /// A class to compute the closest rotation in Frobenius norm to a 3x3 Matrix using the \link thirdpartyEigen `Eigen` library \endlink. /// The internal computation relies on `Eigen::JacobiSVD<>` solver. /// -/// \cgalModels `DeformationClosestRotationTraits_3` +/// \cgalModels{DeformationClosestRotationTraits_3} class Deformation_Eigen_closest_rotation_traits_3{ public: diff --git a/thirdparty/CGAL/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h b/thirdparty/CGAL/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h index a75c21ca..1fc9a397 100644 --- a/thirdparty/CGAL/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_deformation/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h $ -// $Id: Deformation_Eigen_polar_closest_rotation_traits_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_deformation/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h $ +// $Id: include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Gael Guennebaud Ilker O. Yaz @@ -13,6 +13,8 @@ #ifndef CGAL_DEFORMATION_EIGEN_POLAR_CLOSEST_ROTATION_TRAITS_3_H #define CGAL_DEFORMATION_EIGEN_POLAR_CLOSEST_ROTATION_TRAITS_3_H +#include + #include #include #include @@ -23,7 +25,7 @@ namespace CGAL { /// The internal computation relies on a hybrid system using the solvers `Eigen::SelfAdjointEigenSolver<>` /// and `Eigen::JacobiSVD<>` (polar decomposition). /// - /// \cgalModels `DeformationClosestRotationTraits_3` + /// \cgalModels{DeformationClosestRotationTraits_3} class Deformation_Eigen_polar_closest_rotation_traits_3 : public Deformation_Eigen_closest_rotation_traits_3{ public: diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_d.h b/thirdparty/CGAL/include/CGAL/Delaunay_d.h index dafb3408..8d645f9c 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_d.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_d/include/CGAL/Delaunay_d.h $ -// $Id: Delaunay_d.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_d/include/CGAL/Delaunay_d.h $ +// $Id: include/CGAL/Delaunay_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -830,7 +830,7 @@ locate(const Point_d& x) const // lift(p) is not a dimension jump std::list candidates; std::size_t dummy1 = 0; - int loc = -1; // intialization is important + int loc = -1; // initialization is important Simplex_handle f; this -> visibility_search(origin_simplex_,lp,candidates,dummy1,loc,f); this -> clear_visited_marks(origin_simplex_); diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_mesh_area_criteria_2.h b/thirdparty/CGAL/include/CGAL/Delaunay_mesh_area_criteria_2.h index e93c618c..8c06c1bf 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_mesh_area_criteria_2.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_mesh_area_criteria_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Delaunay_mesh_area_criteria_2.h $ -// $Id: Delaunay_mesh_area_criteria_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Delaunay_mesh_area_criteria_2.h $ +// $Id: include/CGAL/Delaunay_mesh_area_criteria_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_mesh_criteria_2.h b/thirdparty/CGAL/include/CGAL/Delaunay_mesh_criteria_2.h index 2e1d68f3..526ba071 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_mesh_criteria_2.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_mesh_criteria_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Delaunay_mesh_criteria_2.h $ -// $Id: Delaunay_mesh_criteria_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Delaunay_mesh_criteria_2.h $ +// $Id: include/CGAL/Delaunay_mesh_criteria_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_mesh_face_base_2.h b/thirdparty/CGAL/include/CGAL/Delaunay_mesh_face_base_2.h index 4206a01a..7a695ebf 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_mesh_face_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_mesh_face_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Delaunay_mesh_face_base_2.h $ -// $Id: Delaunay_mesh_face_base_2.h 7a6bdc1 2020-05-15T14:16:56+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Delaunay_mesh_face_base_2.h $ +// $Id: include/CGAL/Delaunay_mesh_face_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,8 +19,11 @@ #include #include + + namespace CGAL { + template > class Delaunay_mesh_face_base_2 : public Fb diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_mesh_local_size_criteria_2.h b/thirdparty/CGAL/include/CGAL/Delaunay_mesh_local_size_criteria_2.h index bdd62e04..e9bfcb42 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_mesh_local_size_criteria_2.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_mesh_local_size_criteria_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Delaunay_mesh_local_size_criteria_2.h $ -// $Id: Delaunay_mesh_local_size_criteria_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Delaunay_mesh_local_size_criteria_2.h $ +// $Id: include/CGAL/Delaunay_mesh_local_size_criteria_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_mesh_size_criteria_2.h b/thirdparty/CGAL/include/CGAL/Delaunay_mesh_size_criteria_2.h index d22bfb33..5214a8fd 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_mesh_size_criteria_2.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_mesh_size_criteria_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Delaunay_mesh_size_criteria_2.h $ -// $Id: Delaunay_mesh_size_criteria_2.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Delaunay_mesh_size_criteria_2.h $ +// $Id: include/CGAL/Delaunay_mesh_size_criteria_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_mesh_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Delaunay_mesh_vertex_base_2.h index b0f93de3..53f507b6 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_mesh_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_mesh_vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Delaunay_mesh_vertex_base_2.h $ -// $Id: Delaunay_mesh_vertex_base_2.h e3934f1 2021-05-12T15:20:27+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Delaunay_mesh_vertex_base_2.h $ +// $Id: include/CGAL/Delaunay_mesh_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_mesher_2.h b/thirdparty/CGAL/include/CGAL/Delaunay_mesher_2.h index 05728dce..a4fc9416 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_mesher_2.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_mesher_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Delaunay_mesher_2.h $ -// $Id: Delaunay_mesher_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Delaunay_mesher_2.h $ +// $Id: include/CGAL/Delaunay_mesher_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,6 +20,8 @@ #include #include #include +#include +#include namespace CGAL { @@ -27,14 +29,14 @@ template class Delaunay_mesher_2 { - /** \name \c Tr types */ + /** \name `Tr` types */ typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Face_handle Face_handle; typedef typename Tr::Edge Edge; typedef typename Tr::Point Point; - /** \name Types needed for private member datas */ + /** \name Types needed for private member data */ typedef Mesh_2::Refine_edges_with_clusters > Edges_level; @@ -53,7 +55,7 @@ class Delaunay_mesher_2 typedef Seeds_iterator Seeds_const_iterator; private: - // --- PRIVATE MEMBER DATAS --- + // --- PRIVATE MEMBER DATA --- Tr& tr; Criteria criteria; Null_mesher_level null_level; @@ -116,10 +118,10 @@ class Delaunay_mesher_2 public: /** \name MARKING FUNCTIONS */ - /** The value type of \a InputIterator should be \c Point, and represents + /** The value type of \a InputIterator should be `Point`, and represents seeds. Connected components of seeds are marked with the value of - \a mark. Other components are marked with \c !mark. The connected - component of infinite faces is always marked with \c false. + \a mark. Other components are marked with `!mark`. The connected + component of infinite faces is always marked with `false`. */ template void set_seeds(InputIterator b, InputIterator e, @@ -188,7 +190,7 @@ class Delaunay_mesher_2 propagate_marks(tr.infinite_face(), false); } - /** Propagates the mark \c mark recursivly. */ + /** Propagates the mark `mark` recursively. */ static void propagate_marks(const Face_handle fh, bool mark) { // std::queue only works with std::list on VC++6, and not with @@ -340,32 +342,73 @@ class Delaunay_mesher_2 // --- GLOBAL FUNCTIONS --- +#if !defined(CGAL_NO_DEPRECATED_CODE) template +CGAL_DEPRECATED void refine_Delaunay_mesh_2(Tr& t, const Criteria& criteria = Criteria(), bool domain_specified=false) { - typedef Delaunay_mesher_2 Mesher; - - Mesher mesher(t, criteria); + Delaunay_mesher_2 mesher(t, criteria); mesher.init(domain_specified); mesher.refine_mesh(); } - template +CGAL_DEPRECATED void refine_Delaunay_mesh_2(Tr& t, InputIterator b, InputIterator e, const Criteria& criteria = Criteria(), bool mark = false) { - typedef Delaunay_mesher_2 Mesher; - - Mesher mesher(t, criteria); + Delaunay_mesher_2 mesher(t, criteria); mesher.set_seeds(b, e, mark); mesher.refine_mesh(); } +#endif + +template +void +refine_Delaunay_mesh_2(Tr& t, const CGAL_NP_CLASS& np) +{ + typedef Delaunay_mesh_size_criteria_2 Default_criteria; + typedef typename internal_np::Lookup_named_param_def::type Criteria; + + using parameters::choose_parameter; + using parameters::get_parameter; + using parameters::get_parameter_reference; + using parameters::is_default_parameter; + + Delaunay_mesher_2 mesher( + t, choose_parameter( + get_parameter_reference(np, internal_np::criteria))); + + if (!choose_parameter(get_parameter(np, internal_np::domain_is_initialized), false)) + { + if (is_default_parameter::value) // no seeds provided + { + mesher.init(false); + } + else + { + typedef std::vector Default_seeds; + typedef typename internal_np::Lookup_named_param_def::reference Seeds; + Default_seeds ds; + Seeds seeds = choose_parameter(get_parameter_reference(np, internal_np::seeds), ds); + mesher.set_seeds(seeds.begin(), seeds.end(), + choose_parameter(get_parameter(np, internal_np::seeds_are_in_domain), false)); + } + } + else + mesher.init(true); + + mesher.refine_mesh(); +} } // end namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_mesher_no_edge_refinement_2.h b/thirdparty/CGAL/include/CGAL/Delaunay_mesher_no_edge_refinement_2.h index d0e856fa..57dc1408 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_mesher_no_edge_refinement_2.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_mesher_no_edge_refinement_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Delaunay_mesher_no_edge_refinement_2.h $ -// $Id: Delaunay_mesher_no_edge_refinement_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Delaunay_mesher_no_edge_refinement_2.h $ +// $Id: include/CGAL/Delaunay_mesher_no_edge_refinement_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -26,14 +26,14 @@ template class Delaunay_mesher_no_edge_refinement_2 { - /** \name \c Tr types */ + /** \name `Tr` types */ typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Face_handle Face_handle; typedef typename Tr::Edge Edge; typedef typename Tr::Point Point; - /** \name Types needed for private member datas */ + /** \name Types needed for private member data */ typedef Mesh_2::Do_not_refine_edges > Edges_level_base; typedef Mesh_2::Refine_edges void set_seeds(InputIterator b, InputIterator e, @@ -181,7 +181,7 @@ class Delaunay_mesher_no_edge_refinement_2 propagate_marks(tr.infinite_face(), false); } - /** Propagates the mark \c mark recursivly. */ + /** Propagates the mark `mark` recursively. */ static void propagate_marks(const Face_handle fh, bool mark) { // std::queue only works with std::list on VC++6, and not with diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation.h b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation.h index 90970fb1..60f15a77 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/Delaunay_triangulation.h $ -// $Id: Delaunay_triangulation.h ec01356 2020-12-15T22:18:12+01:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/Delaunay_triangulation.h $ +// $Id: include/CGAL/Delaunay_triangulation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus @@ -130,12 +130,12 @@ class Delaunay_triangulation // Wrapper struct Side_of_oriented_subsphere_d { - boost::optional* fop; + std::optional* fop; Construct_flat_orientation_d cfo; In_flat_side_of_oriented_sphere_d ifsoos; Side_of_oriented_subsphere_d( - boost::optional& x, + std::optional& x, Construct_flat_orientation_d const&y, In_flat_side_of_oriented_sphere_d const&z) : fop(&x), cfo(y), ifsoos(z) {} @@ -145,7 +145,7 @@ class Delaunay_triangulation { if(!*fop) *fop=cfo(a,b); - return ifsoos(fop->get(),a,b,p); + return ifsoos(fop->value(),a,b,p); } }; public: @@ -416,7 +416,7 @@ ::remove( Vertex_handle v ) Dark_triangulation dark_side( maximal_dimension(), flat_orientation_ ? - std::pair(current_dimension(), flat_orientation_.get_ptr()) + std::pair(current_dimension(), &flat_orientation_.value()) : std::pair((std::numeric_limits::max)(), (Flat_orientation_d*) nullptr) ); Dark_s_handle dark_s; @@ -523,7 +523,7 @@ ::remove( Vertex_handle v ) // 2. Find corresponding Facet on boundary of dark zone // 3. stitch. - // 1. Build a facet on the boudary of the light zone: + // 1. Build a facet on the boundary of the light zone: Full_cell_handle light_s = *simps.begin(); Facet light_ft(light_s, light_s->index(v)); diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_2.h b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_2.h index ed57c8b0..988437e6 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h $ -// $Id: Delaunay_triangulation_2.h d1a323c 2020-03-26T19:24:14+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h $ +// $Id: include/CGAL/Delaunay_triangulation_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mariette Yvinec @@ -88,7 +88,7 @@ class Delaunay_triangulation_2 Delaunay_triangulation_2( const Delaunay_triangulation_2 &tr) : Triangulation_2(tr) - { CGAL_triangulation_postcondition(is_valid()); } + { CGAL_postcondition(is_valid()); } Delaunay_triangulation_2(Delaunay_triangulation_2&&) = default; Delaunay_triangulation_2& operator=(const Delaunay_triangulation_2&) = default; @@ -193,7 +193,7 @@ class Delaunay_triangulation_2 void propagating_flip(const Face_handle& f,int i); #endif -// auxilliary functions for remove +// auxiliary functions for remove void remove_degree_init(Vertex_handle v, std::vector &f, std::vector &w, std::vector &i,int&d,int&maxd); void remove_degree_triangulate(Vertex_handle v, std::vector &f, @@ -269,7 +269,7 @@ class Delaunay_triangulation_2 std::vector &w, std::vector &i); void remove_degree7_rightfan (Vertex_handle&,int,std::vector &f, std::vector &w, std::vector &i); -// end of auxilliary functions for remove +// end of auxiliary functions for remove Vertex_handle nearest_vertex_2D(const Point& p, Face_handle f) const; Vertex_handle nearest_vertex_1D(const Point& p) const; @@ -300,12 +300,12 @@ class Delaunay_triangulation_2 template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< - typename std::iterator_traits::value_type, - Point - > - >::type* = nullptr) + std::enable_if_t< + std::is_convertible< + typename std::iterator_traits::value_type, + Point + >::value + >* = nullptr) #else template < class InputIterator > std::ptrdiff_t @@ -358,10 +358,8 @@ class Delaunay_triangulation_2 it = indices.begin(), end = indices.end(); it != end; ++it) { v_hint = insert(points[*it], hint); - if(v_hint!=Vertex_handle()) { - v_hint->info()=infos[*it]; - hint=v_hint->face(); - } + v_hint->info()=infos[*it]; + hint=v_hint->face(); } return this->number_of_vertices() - n; @@ -373,11 +371,11 @@ class Delaunay_triangulation_2 std::ptrdiff_t insert(InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< + std::enable_if_t< + std::is_convertible< typename std::iterator_traits::value_type, std::pair::type> - > >::type* = nullptr) + >::value >* = nullptr) { return insert_with_info< std::pair::type> >(first,last); } @@ -386,12 +384,10 @@ class Delaunay_triangulation_2 std::ptrdiff_t insert(boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, - typename boost::enable_if< - boost::mpl::and_< - boost::is_convertible< typename std::iterator_traits::value_type, Point >, - boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - > - >::type* = nullptr) + std::enable_if_t< + std::is_convertible_v< typename std::iterator_traits::value_type, Point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > + >* = nullptr) { return insert_with_info< boost::tuple::type> >(first,last); } @@ -404,7 +400,7 @@ class Delaunay_triangulation_2 OutputItBoundaryEdges eit, Face_handle start = Face_handle()) const { - CGAL_triangulation_precondition(this->dimension() == 2); + CGAL_precondition(this->dimension() == 2); int li; Locate_type lt; Face_handle fh = this->locate(p,lt,li, start); @@ -422,7 +418,7 @@ class Delaunay_triangulation_2 pit = propagate_conflicts(p,fh,2,pit); return pit; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return std::make_pair(fit,eit); } @@ -674,7 +670,7 @@ is_valid(bool verbose, int level) const result = result && ON_POSITIVE_SIDE != side_of_oriented_circle(it, this->mirror_vertex(it,i)->point(), false); } - CGAL_triangulation_assertion(result); + CGAL_assertion(result); } } return result; @@ -705,7 +701,7 @@ typename Delaunay_triangulation_2::Vertex_handle Delaunay_triangulation_2:: nearest_vertex_2D(const Point& p, Face_handle f) const { - CGAL_triangulation_precondition(this->dimension() == 2); + CGAL_precondition(this->dimension() == 2); f = this->locate(p,f); typename Geom_traits::Compare_distance_2 @@ -775,8 +771,8 @@ typename Delaunay_triangulation_2::Point Delaunay_triangulation_2:: dual(Face_handle f) const { - CGAL_triangulation_precondition(this->_tds.is_face(f)); - CGAL_triangulation_precondition(this->dimension()==2); + CGAL_precondition(this->_tds.is_face(f)); + CGAL_precondition(this->dimension()==2); return circumcenter(f); } @@ -785,12 +781,12 @@ Object Delaunay_triangulation_2:: dual(const Edge &e) const { - CGAL_triangulation_precondition(this->_tds.is_edge(e.first,e.second)); + CGAL_precondition(this->_tds.is_edge(e.first,e.second)); typedef typename Geom_traits::Line_2 Line; typedef typename Geom_traits::Ray_2 Ray; - CGAL_triangulation_precondition (!this->is_infinite(e)); + CGAL_precondition (!this->is_infinite(e)); if(this->dimension()== 1) { const Point& p = (e.first)->vertex(cw(e.second))->point(); const Point& q = (e.first)->vertex(ccw(e.second))->point(); @@ -1031,8 +1027,8 @@ void Delaunay_triangulation_2:: remove_and_give_new_faces(Vertex_handle v, OutputItFaces fit) { - CGAL_triangulation_precondition(v != Vertex_handle()); - CGAL_triangulation_precondition(!this->is_infinite(v)); + CGAL_precondition(v != Vertex_handle()); + CGAL_precondition(!this->is_infinite(v)); if(this->number_of_vertices() == 1) this->remove_first(v); else if(this->number_of_vertices() == 2) this->remove_second(v); @@ -1071,8 +1067,8 @@ remove(Vertex_handle v) { int d; - CGAL_triangulation_precondition(v != Vertex_handle()); - CGAL_triangulation_precondition(!this->is_infinite(v)); + CGAL_precondition(v != Vertex_handle()); + CGAL_precondition(!this->is_infinite(v)); if(this->dimension() <= 1) { Triangulation::remove(v); return; } @@ -2119,7 +2115,7 @@ typename Delaunay_triangulation_2::Vertex_handle Delaunay_triangulation_2:: move_if_no_collision(Vertex_handle v, const Point &p) { - CGAL_triangulation_precondition(!this->is_infinite(v)); + CGAL_precondition(!this->is_infinite(v)); if(v->point() == p) return v; const int dim = this->dimension(); @@ -2167,7 +2163,7 @@ move_if_no_collision(Vertex_handle v, const Point &p) Face_handle f = v->face(); int i = f->index(v); if(i==0) {f = f->neighbor(1);} - CGAL_triangulation_assertion(f->index(v) == 1); + CGAL_assertion(f->index(v) == 1); Face_handle g= f->neighbor(0); f->set_vertex(1, g->vertex(1)); f->set_neighbor(0,g->neighbor(0)); @@ -2177,7 +2173,7 @@ move_if_no_collision(Vertex_handle v, const Point &p) Face_handle f_ins = inserted->face(); i = f_ins->index(inserted); if(i==0) {f_ins = f_ins->neighbor(1);} - CGAL_triangulation_assertion(f_ins->index(inserted) == 1); + CGAL_assertion(f_ins->index(inserted) == 1); Face_handle g_ins = f_ins->neighbor(0); f_ins->set_vertex(1, v); g_ins->set_vertex(0, v); @@ -2249,7 +2245,7 @@ typename Delaunay_triangulation_2::Vertex_handle Delaunay_triangulation_2:: move(Vertex_handle v, const Point &p) { - CGAL_triangulation_precondition(!this->is_infinite(v)); + CGAL_precondition(!this->is_infinite(v)); if(v->point() == p) return v; Vertex_handle w = move_if_no_collision(v,p); if(w != v) { @@ -2264,9 +2260,9 @@ bool Delaunay_triangulation_2:: is_delaunay_after_displacement(Vertex_handle v, const Point &p) const { - CGAL_triangulation_precondition(!this->is_infinite(v)); - CGAL_triangulation_precondition(this->dimension() == 2); - CGAL_triangulation_precondition(!this->test_dim_down(v)); + CGAL_precondition(!this->is_infinite(v)); + CGAL_precondition(this->dimension() == 2); + CGAL_precondition(!this->test_dim_down(v)); if(v->point() == p) return true; Point ant = v->point(); v->set_point(p); @@ -2320,7 +2316,7 @@ move_if_no_collision_and_give_new_faces(Vertex_handle v, const Point &p, OutputItFaces oif) { - CGAL_triangulation_precondition(!this->is_infinite(v)); + CGAL_precondition(!this->is_infinite(v)); if(v->point() == p) return v; const int dim = this->dimension(); @@ -2374,7 +2370,7 @@ move_if_no_collision_and_give_new_faces(Vertex_handle v, Face_handle f = v->face(); int i = f->index(v); if(i==0) {f = f->neighbor(1);} - CGAL_triangulation_assertion(f->index(v) == 1); + CGAL_assertion(f->index(v) == 1); Face_handle g= f->neighbor(0); f->set_vertex(1, g->vertex(1)); f->set_neighbor(0,g->neighbor(0)); @@ -2385,7 +2381,7 @@ move_if_no_collision_and_give_new_faces(Vertex_handle v, Face_handle f_ins = inserted->face(); i = f_ins->index(inserted); if(i==0) {f_ins = f_ins->neighbor(1);} - CGAL_triangulation_assertion(f_ins->index(inserted) == 1); + CGAL_assertion(f_ins->index(inserted) == 1); Face_handle g_ins = f_ins->neighbor(0); f_ins->set_vertex(1, v); g_ins->set_vertex(0, v); diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_3.h b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_3.h index c5bccd63..ce230582 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h $ -// $Id: Delaunay_triangulation_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h $ +// $Id: include/CGAL/Delaunay_triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -333,12 +333,12 @@ class Delaunay_triangulation_3 #ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< + std::enable_if_t< + std::is_convertible< typename std::iterator_traits::value_type, Point - > - >::type* = nullptr) + >::value + >* = nullptr) #else template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last) @@ -479,12 +479,12 @@ class Delaunay_triangulation_3 public: template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< + std::enable_if_t< + std::is_convertible< typename std::iterator_traits::value_type, std::pair::type> - > >::type* =nullptr) + >::value >* =nullptr) { return insert_with_info< std::pair::type> >(first,last); } @@ -493,12 +493,10 @@ class Delaunay_triangulation_3 std::ptrdiff_t insert(boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, - typename boost::enable_if< - boost::mpl::and_< - boost::is_convertible< typename std::iterator_traits::value_type, Point >, - boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - > - >::type* =nullptr) + std::enable_if_t< + std::is_convertible_v< typename std::iterator_traits::value_type, Point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > + >* =nullptr) { return insert_with_info< boost::tuple::type> >(first,last); @@ -548,7 +546,7 @@ class Delaunay_triangulation_3 OutputIteratorInternalFacets ifit, bool *could_lock_zone = nullptr) const { - CGAL_triangulation_precondition(dimension() >= 2); + CGAL_precondition(dimension() >= 2); std::vector cells; cells.reserve(32); @@ -621,7 +619,7 @@ class Delaunay_triangulation_3 vertices_on_conflict_zone_boundary(const Point&p, Cell_handle c, OutputIterator res) const { - CGAL_triangulation_precondition(dimension() >= 2); + CGAL_precondition(dimension() >= 2); // Get the facets on the boundary of the hole. std::vector facets; @@ -667,7 +665,7 @@ class Delaunay_triangulation_3 template < typename InputIterator > size_type remove(InputIterator first, InputIterator beyond) { - CGAL_triangulation_precondition(!this->does_repeat_in_range(first, beyond)); + CGAL_precondition(!this->does_repeat_in_range(first, beyond)); size_type n = number_of_vertices(); #ifdef CGAL_TRIANGULATION_3_PROFILING @@ -794,7 +792,7 @@ class Delaunay_triangulation_3 nearest_vertex(const Point& p, Vertex_handle v, Vertex_handle w) const { // In case of equality, v is returned. - CGAL_triangulation_precondition(v != w); + CGAL_precondition(v != w); if(is_infinite(v)) return w; @@ -1076,7 +1074,7 @@ Delaunay_triangulation_3:: insert(const Point& p, Cell_handle start, bool *could_lock_zone) { Locate_type lt; - int li, lj; + int li = -1, lj = -1; // Parallel if(could_lock_zone) @@ -1301,7 +1299,7 @@ remove(Vertex_handle v) Vertex_remover remover(tmp); Tr_Base::remove(v, remover); - CGAL_triangulation_expensive_postcondition(is_valid()); + CGAL_expensive_postcondition(is_valid()); } template < class Gt, class Tds, class Lds > @@ -1313,7 +1311,7 @@ remove(Vertex_handle v, bool *could_lock_zone) Vertex_remover remover(tmp); bool ret = Tr_Base::remove(v, remover, could_lock_zone); - CGAL_triangulation_expensive_postcondition(is_valid()); + CGAL_expensive_postcondition(is_valid()); return ret; } @@ -1327,7 +1325,7 @@ move_if_no_collision(Vertex_handle v, const Point& p) Vertex_inserter inserter(*this); Vertex_handle res = Tr_Base::move_if_no_collision(v,p,remover,inserter); - CGAL_triangulation_expensive_postcondition(is_valid()); + CGAL_expensive_postcondition(is_valid()); return res; } @@ -1336,7 +1334,7 @@ typename Delaunay_triangulation_3::Vertex_handle Delaunay_triangulation_3:: move(Vertex_handle v, const Point& p) { - CGAL_triangulation_precondition(!is_infinite(v)); + CGAL_precondition(!is_infinite(v)); if(v->point() == p) return v; @@ -1356,7 +1354,7 @@ remove_and_give_new_cells(Vertex_handle v, OutputItCells fit) Vertex_remover remover(tmp); Tr_Base::remove_and_give_new_cells(v,remover,fit); - CGAL_triangulation_expensive_postcondition(is_valid()); + CGAL_expensive_postcondition(is_valid()); } template < class Gt, class Tds, class Lds > @@ -1373,7 +1371,7 @@ move_if_no_collision_and_give_new_cells(Vertex_handle v, const Point& p, Tr_Base::move_if_no_collision_and_give_new_cells(v,p, remover,inserter,fit); - CGAL_triangulation_expensive_postcondition(is_valid()); + CGAL_expensive_postcondition(is_valid()); return res; } @@ -1383,7 +1381,7 @@ Delaunay_triangulation_3:: side_of_oriented_sphere(const Point& p0, const Point& p1, const Point& p2, const Point& p3, const Point& p, bool perturb) const { - CGAL_triangulation_precondition(orientation(p0, p1, p2, p3) == POSITIVE); + CGAL_precondition(orientation(p0, p1, p2, p3) == POSITIVE); Oriented_side os = geom_traits().side_of_oriented_sphere_3_object()(p0, p1, p2, p3, p); @@ -1416,7 +1414,7 @@ side_of_oriented_sphere(const Point& p0, const Point& p1, const Point& p2, return o; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return ON_NEGATIVE_SIDE; } @@ -1427,8 +1425,8 @@ coplanar_side_of_bounded_circle(const Point& p0, const Point& p1, const Point& p2, const Point& p, bool perturb) const { // In dim==2, we should even be able to assert orient == POSITIVE. - CGAL_triangulation_precondition(coplanar_orientation(p0, p1, p2) - != COLLINEAR); + CGAL_precondition(coplanar_orientation(p0, p1, p2) + != COLLINEAR); Bounded_side bs = geom_traits().coplanar_side_of_bounded_circle_3_object()(p0, p1, p2, p); @@ -1478,7 +1476,7 @@ side_of_sphere(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3, const Point& p, bool perturb) const { - CGAL_triangulation_precondition(dimension() == 3); + CGAL_precondition(dimension() == 3); if(is_infinite(v0)) { @@ -1538,12 +1536,12 @@ side_of_circle(Cell_handle c, int i, const Point& p, bool perturb) const // ON_BOUNDED_SIDE for a point in the open half-plane // ON_UNBOUNDED_SIDE elsewhere - CGAL_triangulation_precondition(dimension() >= 2); + CGAL_precondition(dimension() >= 2); int i3 = 5; if(dimension() == 2) { - CGAL_triangulation_precondition(i == 3); + CGAL_precondition(i == 3); // the triangulation is supposed to be valid, ie the facet // with vertices 0 1 2 in this order is positively oriented if(! c->has_vertex(infinite_vertex(), i3)) @@ -1556,8 +1554,8 @@ side_of_circle(Cell_handle c, int i, const Point& p, bool perturb) const // is positively oriented Vertex_handle v1 = c->vertex(ccw(i3)), v2 = c->vertex(cw(i3)); - CGAL_triangulation_assertion(coplanar_orientation(v1->point(), v2->point(), - mirror_vertex(c, i3)->point()) == NEGATIVE); + CGAL_assertion(coplanar_orientation(v1->point(), v2->point(), + mirror_vertex(c, i3)->point()) == NEGATIVE); Orientation o = coplanar_orientation(v1->point(), v2->point(), p); if(o != COLLINEAR) return Bounded_side(o); @@ -1570,7 +1568,7 @@ side_of_circle(Cell_handle c, int i, const Point& p, bool perturb) const } // else dimension == 3 - CGAL_triangulation_precondition(i >= 0 && i < 4); + CGAL_precondition(i >= 0 && i < 4); if((! c->has_vertex(infinite_vertex(),i3)) || (i3 != i)) { // finite facet @@ -1579,10 +1577,10 @@ side_of_circle(Cell_handle c, int i, const Point& p, bool perturb) const int i0 = (i>0) ? 0 : 1; int i1 = (i>1) ? 1 : 2; int i2 = (i>2) ? 2 : 3; - CGAL_triangulation_precondition(coplanar(c->vertex(i0)->point(), - c->vertex(i1)->point(), - c->vertex(i2)->point(), - p)); + CGAL_precondition(coplanar(c->vertex(i0)->point(), + c->vertex(i1)->point(), + c->vertex(i2)->point(), + p)); return coplanar_side_of_bounded_circle(c->vertex(i0)->point(), c->vertex(i1)->point(), c->vertex(i2)->point(), @@ -1615,7 +1613,7 @@ Delaunay_triangulation_3:: nearest_vertex_in_cell(const Point& p, Cell_handle c) const { // Returns the finite vertex of the cell c which is the closest to p. - CGAL_triangulation_precondition(dimension() >= 0); + CGAL_precondition(dimension() >= 0); Vertex_handle nearest = nearest_vertex(p, c->vertex(0), c->vertex(1)); if(dimension() >= 2) @@ -1690,9 +1688,9 @@ bool Delaunay_triangulation_3:: is_delaunay_after_displacement(Vertex_handle v, const Point& p) const { - CGAL_triangulation_precondition(!this->is_infinite(v)); - CGAL_triangulation_precondition(this->dimension() == 2); - CGAL_triangulation_precondition(!this->test_dim_down(v)); + CGAL_precondition(!this->is_infinite(v)); + CGAL_precondition(this->dimension() == 2); + CGAL_precondition(!this->test_dim_down(v)); if(v->point() == p) return true; @@ -1766,7 +1764,7 @@ bool Delaunay_triangulation_3:: is_Gabriel(Cell_handle c, int i) const { - CGAL_triangulation_precondition(dimension() == 3 && !is_infinite(c,i)); + CGAL_precondition(dimension() == 3 && !is_infinite(c,i)); typename Geom_traits::Side_of_bounded_sphere_3 side_of_bounded_sphere = geom_traits().side_of_bounded_sphere_3_object(); @@ -1803,7 +1801,7 @@ bool Delaunay_triangulation_3:: is_Gabriel(Cell_handle c, int i, int j) const { - CGAL_triangulation_precondition(dimension() == 3 && !is_infinite(c,i,j)); + CGAL_precondition(dimension() == 3 && !is_infinite(c,i,j)); typename Geom_traits::Side_of_bounded_sphere_3 side_of_bounded_sphere = geom_traits().side_of_bounded_sphere_3_object(); @@ -1830,8 +1828,8 @@ typename Delaunay_triangulation_3::Point Delaunay_triangulation_3:: dual(Cell_handle c) const { - CGAL_triangulation_precondition(dimension()==3); - CGAL_triangulation_precondition(! is_infinite(c)); + CGAL_precondition(dimension()==3); + CGAL_precondition(! is_infinite(c)); return c->circumcenter(geom_traits()); } @@ -1840,12 +1838,12 @@ typename Delaunay_triangulation_3::Object Delaunay_triangulation_3:: dual(Cell_handle c, int i) const { - CGAL_triangulation_precondition(dimension()>=2); - CGAL_triangulation_precondition(! is_infinite(c,i)); + CGAL_precondition(dimension()>=2); + CGAL_precondition(! is_infinite(c,i)); if(dimension() == 2) { - CGAL_triangulation_precondition(i == 3); + CGAL_precondition(i == 3); return construct_object(construct_circumcenter(c->vertex(0)->point(), c->vertex(1)->point(), c->vertex(2)->point())); @@ -1890,12 +1888,12 @@ typename Delaunay_triangulation_3::Line Delaunay_triangulation_3:: dual_support(Cell_handle c, int i) const { - CGAL_triangulation_precondition(dimension()>=2); - CGAL_triangulation_precondition(! is_infinite(c,i)); + CGAL_precondition(dimension()>=2); + CGAL_precondition(! is_infinite(c,i)); if(dimension() == 2) { - CGAL_triangulation_precondition(i == 3); + CGAL_precondition(i == 3); return construct_equidistant_line(c->vertex(0)->point(), c->vertex(1)->point(), c->vertex(2)->point()); @@ -1916,7 +1914,7 @@ is_valid(bool verbose, int level) const if(verbose) std::cerr << "invalid data structure" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -1925,7 +1923,7 @@ is_valid(bool verbose, int level) const if(verbose) std::cerr << "no infinite vertex" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -1946,7 +1944,7 @@ is_valid(bool verbose, int level) const if(verbose) std::cerr << "non-empty sphere " << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } @@ -1972,7 +1970,7 @@ is_valid(bool verbose, int level) const if(verbose) std::cerr << "non-empty circle " << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } @@ -2009,7 +2007,7 @@ is_valid(Cell_handle c, bool verbose, int level) const std::cerr << c->vertex(i)->point() << ", " ; std::cerr << std::endl; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } switch(dimension()) @@ -2025,7 +2023,7 @@ is_valid(Cell_handle c, bool verbose, int level) const if(verbose) std::cerr << "non-empty sphere " << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } @@ -2043,7 +2041,7 @@ is_valid(Cell_handle c, bool verbose, int level) const if(verbose) std::cerr << "non-empty circle " << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_adaptation_policies_2.h b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_adaptation_policies_2.h index 0eae2682..6874acec 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_adaptation_policies_2.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_adaptation_policies_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Delaunay_triangulation_adaptation_policies_2.h $ -// $Id: Delaunay_triangulation_adaptation_policies_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Delaunay_triangulation_adaptation_policies_2.h $ +// $Id: include/CGAL/Delaunay_triangulation_adaptation_policies_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_adaptation_traits_2.h b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_adaptation_traits_2.h index 638fea22..f9a5ca66 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_adaptation_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_adaptation_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Delaunay_triangulation_adaptation_traits_2.h $ -// $Id: Delaunay_triangulation_adaptation_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Delaunay_triangulation_adaptation_traits_2.h $ +// $Id: include/CGAL/Delaunay_triangulation_adaptation_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_cell_base_3.h index fb59e6b1..f06538f7 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_cell_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_cell_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_3.h $ -// $Id: Delaunay_triangulation_cell_base_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_3.h $ +// $Id: include/CGAL/Delaunay_triangulation_cell_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -20,10 +20,9 @@ #include #include -#include #include -#include +#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h index 03a0b9b1..42e267ed 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h $ -// $Id: Delaunay_triangulation_cell_base_with_circumcenter_3.h 4df8440 2022-03-18T20:03:22+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h $ +// $Id: include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -21,7 +21,7 @@ #include -#include +#include #include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_2.h b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_2.h index b0befedb..ccc32856 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_2.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h $ -// $Id: Delaunay_triangulation_on_sphere_2.h d871728 2021-07-23T13:09:37+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h $ +// $Id: include/CGAL/Delaunay_triangulation_on_sphere_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mariette Yvinec, @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include @@ -27,7 +27,6 @@ #include #include -#include #include #include @@ -147,7 +146,7 @@ class Delaunay_triangulation_on_sphere_2 { } - // Assignement + // Assignment Delaunay_triangulation_on_sphere_2& operator=(Delaunay_triangulation_on_sphere_2 other) // intentional copy { Base::swap(static_cast(other)); @@ -259,9 +258,9 @@ class Delaunay_triangulation_on_sphere_2 template Vertex_handle insert(const P& p, Face_handle f = Face_handle(), - typename std::enable_if::value>::type* = nullptr) + std::enable_if_t::value>* = nullptr) { - CGAL_triangulation_assertion((std::is_same::value)); + CGAL_assertion((std::is_same::value)); return insert(geom_traits().construct_point_on_sphere_2_object()(p), f); } @@ -291,16 +290,16 @@ class Delaunay_triangulation_on_sphere_2 // Input range has value type Point, with Point != Point_3 template size_type insert(InputIterator first, InputIterator beyond, - typename std::enable_if< + std::enable_if_t< !std::is_same::value_type, - Point_3>::value>::type* = nullptr); + Point_3>::value>* = nullptr); // Input range has value type Point_3, possibly with Point == Point_3 template size_type insert(InputIterator first, InputIterator beyond, - typename std::enable_if< + std::enable_if_t< std::is_same::value_type, - Point_3>::value>::type* = nullptr); + Point_3>::value>* = nullptr); bool update_ghost_faces(Vertex_handle v, bool first = false); @@ -474,7 +473,7 @@ typename Triangulation_on_sphere_2::Vertex_handle Delaunay_triangulation_on_sphere_2:: insert_third(const Point& p) { - CGAL_triangulation_assertion(number_of_vertices() == 2); + CGAL_assertion(number_of_vertices() == 2); Vertex_handle v = vertices_begin(); Vertex_handle u = v->face()->neighbor(0)->vertex(0); @@ -493,10 +492,10 @@ insert_third(const Point& p) nv->set_point(p); - CGAL_triangulation_assertion_code(Face_handle f = all_edges_begin()->first;) - CGAL_triangulation_assertion(orientation_on_sphere(point(f, 0), - point(f, 1), - point(f->neighbor(0), 1)) != RIGHT_TURN); + CGAL_assertion_code(Face_handle f = all_edges_begin()->first;) + CGAL_assertion(orientation_on_sphere(point(f, 0), + point(f, 1), + point(f->neighbor(0), 1)) != RIGHT_TURN); return nv; } @@ -516,7 +515,7 @@ insert_outside_affine_hull_regular(const Point& p) const Point& p1 = point(f, 1); const Point& p2 = point(fn, 1); - CGAL_triangulation_assertion(orientation_on_sphere(p0, p1, p2) != NEGATIVE); + CGAL_assertion(orientation_on_sphere(p0, p1, p2) != NEGATIVE); Orientation orient2 = side_of_oriented_circle(p0, p1, p2, p); if(orient2 == POSITIVE) @@ -587,7 +586,7 @@ insert(const Point& p, Locate_type lt, Face_handle loc, int /*li*/) } } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return v; } @@ -606,7 +605,7 @@ insert(const Point& p, Face_handle start) return Vertex_handle(); case TOO_CLOSE: { - CGAL_triangulation_assertion(loc != Face_handle()); + CGAL_assertion(loc != Face_handle()); return loc->vertex(li); } case VERTEX: @@ -626,14 +625,14 @@ template typename Delaunay_triangulation_on_sphere_2::size_type Delaunay_triangulation_on_sphere_2:: insert(InputIterator first, InputIterator beyond, - typename std::enable_if< + std::enable_if_t< !std::is_same::value_type, - Point_3>::value>::type*) + Point_3>::value>*) { typedef Point_3_with_iterator P3_wit; - CGAL_static_assertion((std::is_same::value_type, Point>::value)); - CGAL_static_assertion(!(std::is_same::value)); + static_assert(std::is_same::value_type, Point>::value); + static_assert(!std::is_same::value); const size_type n = number_of_vertices(); @@ -661,7 +660,7 @@ insert(InputIterator first, InputIterator beyond, points.reserve(input_points.size()); for(const P3_wit& p3wi : p3_points) { - CGAL_triangulation_assertion(p3wi.input_point_ptr != nullptr); + CGAL_assertion(p3wi.input_point_ptr != nullptr); points.push_back(*(p3wi.input_point_ptr)); } @@ -682,9 +681,9 @@ template typename Delaunay_triangulation_on_sphere_2::size_type Delaunay_triangulation_on_sphere_2:: insert(InputIterator first, InputIterator beyond, - typename std::enable_if< + std::enable_if_t< std::is_same::value_type, - Point_3>::value>::type*) + Point_3>::value>*) { const size_type n = number_of_vertices(); @@ -715,7 +714,7 @@ bool Delaunay_triangulation_on_sphere_2:: update_ghost_faces(Vertex_handle v, bool first) { - CGAL_triangulation_assertion(dimension() == 2); + CGAL_assertion(dimension() == 2); bool ghost_found = false; @@ -736,7 +735,7 @@ update_ghost_faces(Vertex_handle v, bool first) } else // not first { - CGAL_triangulation_assertion(v != Vertex_handle()); + CGAL_assertion(v != Vertex_handle()); Face_circulator fc = this->incident_faces(v, v->face()); Face_circulator done(fc); do @@ -763,7 +762,7 @@ void Delaunay_triangulation_on_sphere_2:: remove_1D(Vertex_handle v) { - CGAL_triangulation_precondition(v != Vertex_handle()); + CGAL_precondition(v != Vertex_handle()); tds().remove_1D(v); } @@ -792,7 +791,7 @@ void Delaunay_triangulation_on_sphere_2:: remove(Vertex_handle v) { - CGAL_triangulation_precondition(v != Vertex_handle()); + CGAL_precondition(v != Vertex_handle()); if(number_of_vertices() <= 3) tds().remove_dim_down(v); @@ -824,7 +823,7 @@ test_dim_down(Vertex_handle v) if(it4 == vertices_end()) break; - CGAL_triangulation_assertion(it != v && it2 != v && it3 != v && it4 != v); + CGAL_assertion(it != v && it2 != v && it3 != v && it4 != v); if(side_of_oriented_circle(it->point(), it2->point(), it3->point(), it4->point()) != ON_ORIENTED_BOUNDARY) return false; @@ -1134,7 +1133,7 @@ is_valid_face(Face_handle fh, bool verbose, int /*level*/) const { Orientation test = side_of_oriented_circle(fh, point(fh->vertex(i))); result = result && test == ON_ORIENTED_BOUNDARY; - CGAL_triangulation_assertion(result); + CGAL_assertion(result); } if(!result) @@ -1146,7 +1145,7 @@ is_valid_face(Face_handle fh, bool verbose, int /*level*/) const } } - CGAL_triangulation_assertion(result); + CGAL_assertion(result); return result; } @@ -1162,7 +1161,7 @@ is_valid(bool verbose, int level) const if(verbose) std::cerr << "invalid data structure" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -1177,18 +1176,18 @@ is_valid(bool verbose, int level) const case 0: break; case 1: - CGAL_triangulation_assertion(this->is_plane()); + CGAL_assertion(this->is_plane()); break; case 2: for(All_faces_iterator it=all_faces_begin(); it!=all_faces_end(); ++it) { Orientation s = orientation_on_sphere(point(it, 0), point(it, 1), point(it, 2)); result = result && (s != NEGATIVE || it->is_ghost()); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); } result = result && (number_of_faces() == 2 * number_of_vertices() - 4); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); break; } @@ -1196,7 +1195,7 @@ is_valid(bool verbose, int level) const if(verbose) std::cerr << " number of vertices " << number_of_vertices() << "\t" << std::endl; - CGAL_triangulation_assertion(result); + CGAL_assertion(result); return result; } diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_adaptation_policies_2.h b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_adaptation_policies_2.h index b42c993a..cead7443 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_adaptation_policies_2.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_adaptation_policies_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Delaunay_triangulation_on_sphere_adaptation_policies_2.h $ -// $Id: Delaunay_triangulation_on_sphere_adaptation_policies_2.h d5a306b 2021-06-11T17:26:36+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Delaunay_triangulation_on_sphere_adaptation_policies_2.h $ +// $Id: include/CGAL/Delaunay_triangulation_on_sphere_adaptation_policies_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_adaptation_traits_2.h b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_adaptation_traits_2.h index 85f24146..6559745d 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_adaptation_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_adaptation_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Delaunay_triangulation_on_sphere_adaptation_traits_2.h $ -// $Id: Delaunay_triangulation_on_sphere_adaptation_traits_2.h 942d461 2021-05-05T16:59:22+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Delaunay_triangulation_on_sphere_adaptation_traits_2.h $ +// $Id: include/CGAL/Delaunay_triangulation_on_sphere_adaptation_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_traits_2.h b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_traits_2.h index 37a9ad96..98e86a8f 100644 --- a/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Delaunay_triangulation_on_sphere_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_traits_2.h $ -// $Id: Delaunay_triangulation_on_sphere_traits_2.h 76b6649 2021-04-29T23:22:47+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_traits_2.h $ +// $Id: include/CGAL/Delaunay_triangulation_on_sphere_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mariette Yvinec, @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include @@ -101,14 +101,14 @@ class Inside_cone_2 // Check if r is on the same side of the plane orthogonal to the plane (c,p,q) // and going through c and p as q const Orientation op = _lk.coplanar_orientation_3_object()(_center, p, q, r); - CGAL_triangulation_assertion(op != COLLINEAR); + CGAL_assertion(op != COLLINEAR); if(op == NEGATIVE) return false; // Check if r is on the same side of the plane orthogonal to the plane (c,p,q) // and going through c and q as p const Orientation oq = _lk.coplanar_orientation_3_object()(_center, q, p, r); - CGAL_triangulation_assertion(oq != COLLINEAR); + CGAL_assertion(oq != COLLINEAR); if(oq == NEGATIVE) return false; diff --git a/thirdparty/CGAL/include/CGAL/Diagonalize_traits.h b/thirdparty/CGAL/include/CGAL/Diagonalize_traits.h index ac02e92f..8261287d 100644 --- a/thirdparty/CGAL/include/CGAL/Diagonalize_traits.h +++ b/thirdparty/CGAL/include/CGAL/Diagonalize_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Solver_interface/include/CGAL/Diagonalize_traits.h $ -// $Id: Diagonalize_traits.h 267a641 2021-05-31T14:01:08+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Solver_interface/include/CGAL/Diagonalize_traits.h $ +// $Id: include/CGAL/Diagonalize_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -42,7 +42,7 @@ namespace CGAL { /// \tparam FT Number type /// \tparam dim Dimension of the matrices and vectors /// -/// \cgalModels `DiagonalizeTraits` +/// \cgalModels{DiagonalizeTraits} template class Diagonalize_traits { diff --git a/thirdparty/CGAL/include/CGAL/Dimension.h b/thirdparty/CGAL/include/CGAL/Dimension.h index 813f3ca4..34b3c1af 100644 --- a/thirdparty/CGAL/include/CGAL/Dimension.h +++ b/thirdparty/CGAL/include/CGAL/Dimension.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Dimension.h $ -// $Id: Dimension.h e9d41d7 2020-04-21T10:03:00+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Dimension.h $ +// $Id: include/CGAL/Dimension.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Direction_2.h b/thirdparty/CGAL/include/CGAL/Direction_2.h index 5d528160..edd81d44 100644 --- a/thirdparty/CGAL/include/CGAL/Direction_2.h +++ b/thirdparty/CGAL/include/CGAL/Direction_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Direction_2.h $ -// $Id: Direction_2.h e7357ac 2021-07-19T14:53:27+02:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Direction_2.h $ +// $Id: include/CGAL/Direction_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,6 @@ #define CGAL_DIRECTION_2_H #include -#include #include #include #include @@ -39,7 +38,7 @@ class Direction_2 : public R_::Kernel_base::Direction_2 typedef typename R_::Kernel_base::Direction_2 RDirection_2; typedef Direction_2 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Direction_3.h b/thirdparty/CGAL/include/CGAL/Direction_3.h index f4151a6c..ff4e6fd4 100644 --- a/thirdparty/CGAL/include/CGAL/Direction_3.h +++ b/thirdparty/CGAL/include/CGAL/Direction_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Direction_3.h $ -// $Id: Direction_3.h e7357ac 2021-07-19T14:53:27+02:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Direction_3.h $ +// $Id: include/CGAL/Direction_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,6 @@ #define CGAL_DIRECTION_3_H #include -#include #include #include #include @@ -38,7 +37,7 @@ class Direction_3 : public R_::Kernel_base::Direction_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Direction_3 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/Line_2_Line_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/Line_2_Line_2.h index 220fd4b8..9a12a564 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/Line_2_Line_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/Line_2_Line_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/Line_2_Line_2.h $ -// $Id: Line_2_Line_2.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/Line_2_Line_2.h $ +// $Id: include/CGAL/Distance_2/Line_2_Line_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/Line_2_Triangle_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/Line_2_Triangle_2.h index abf3a172..e7694024 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/Line_2_Triangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/Line_2_Triangle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/Line_2_Triangle_2.h $ -// $Id: Line_2_Triangle_2.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/Line_2_Triangle_2.h $ +// $Id: include/CGAL/Distance_2/Line_2_Triangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Line_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Line_2.h index 7dd05b7b..f72608ba 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Line_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Line_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/Point_2_Line_2.h $ -// $Id: Point_2_Line_2.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/Point_2_Line_2.h $ +// $Id: include/CGAL/Distance_2/Point_2_Line_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Point_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Point_2.h index 6a46397f..649c4177 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Point_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Point_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/Point_2_Point_2.h $ -// $Id: Point_2_Point_2.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/Point_2_Point_2.h $ +// $Id: include/CGAL/Distance_2/Point_2_Point_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Ray_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Ray_2.h index 1e4f9e80..b5ce2dc7 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Ray_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Ray_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/Point_2_Ray_2.h $ -// $Id: Point_2_Ray_2.h 7e62c02 2021-04-12T14:02:37+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/Point_2_Ray_2.h $ +// $Id: include/CGAL/Distance_2/Point_2_Ray_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Segment_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Segment_2.h index 57aa567c..1fd4bbe1 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Segment_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Segment_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/Point_2_Segment_2.h $ -// $Id: Point_2_Segment_2.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/Point_2_Segment_2.h $ +// $Id: include/CGAL/Distance_2/Point_2_Segment_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Triangle_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Triangle_2.h index c525cb90..d2d2317a 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Triangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/Point_2_Triangle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/Point_2_Triangle_2.h $ -// $Id: Point_2_Triangle_2.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/Point_2_Triangle_2.h $ +// $Id: include/CGAL/Distance_2/Point_2_Triangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/Ray_2_Line_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/Ray_2_Line_2.h index 58a74b13..306350df 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/Ray_2_Line_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/Ray_2_Line_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/Ray_2_Line_2.h $ -// $Id: Ray_2_Line_2.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/Ray_2_Line_2.h $ +// $Id: include/CGAL/Distance_2/Ray_2_Line_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/Ray_2_Ray_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/Ray_2_Ray_2.h index cfccffaf..8d09a734 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/Ray_2_Ray_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/Ray_2_Ray_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/Ray_2_Ray_2.h $ -// $Id: Ray_2_Ray_2.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/Ray_2_Ray_2.h $ +// $Id: include/CGAL/Distance_2/Ray_2_Ray_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/Ray_2_Triangle_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/Ray_2_Triangle_2.h index 0b8c219d..b58f794a 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/Ray_2_Triangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/Ray_2_Triangle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/Ray_2_Triangle_2.h $ -// $Id: Ray_2_Triangle_2.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/Ray_2_Triangle_2.h $ +// $Id: include/CGAL/Distance_2/Ray_2_Triangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Line_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Line_2.h index a5812edf..60fa8d28 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Line_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Line_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/Segment_2_Line_2.h $ -// $Id: Segment_2_Line_2.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/Segment_2_Line_2.h $ +// $Id: include/CGAL/Distance_2/Segment_2_Line_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Ray_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Ray_2.h index 9c65ddda..9b56a64a 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Ray_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Ray_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/Segment_2_Ray_2.h $ -// $Id: Segment_2_Ray_2.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/Segment_2_Ray_2.h $ +// $Id: include/CGAL/Distance_2/Segment_2_Ray_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Segment_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Segment_2.h index 4640791c..670896dc 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Segment_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Segment_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/Segment_2_Segment_2.h $ -// $Id: Segment_2_Segment_2.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/Segment_2_Segment_2.h $ +// $Id: include/CGAL/Distance_2/Segment_2_Segment_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Triangle_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Triangle_2.h index 711d88a2..aa4c923b 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Triangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/Segment_2_Triangle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/Segment_2_Triangle_2.h $ -// $Id: Segment_2_Triangle_2.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/Segment_2_Triangle_2.h $ +// $Id: include/CGAL/Distance_2/Segment_2_Triangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/Triangle_2_Triangle_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/Triangle_2_Triangle_2.h index 036819a8..3fd4cd6f 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/Triangle_2_Triangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/Triangle_2_Triangle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/Triangle_2_Triangle_2.h $ -// $Id: Triangle_2_Triangle_2.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/Triangle_2_Triangle_2.h $ +// $Id: include/CGAL/Distance_2/Triangle_2_Triangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_2/internal/squared_distance_utils_2.h b/thirdparty/CGAL/include/CGAL/Distance_2/internal/squared_distance_utils_2.h index 1025b86c..24d8787f 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_2/internal/squared_distance_utils_2.h +++ b/thirdparty/CGAL/include/CGAL/Distance_2/internal/squared_distance_utils_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/Distance_2/internal/squared_distance_utils_2.h $ -// $Id: squared_distance_utils_2.h 518aad8 2021-04-12T17:42:12+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/Distance_2/internal/squared_distance_utils_2.h $ +// $Id: include/CGAL/Distance_2/internal/squared_distance_utils_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Line_3_Line_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Line_3_Line_3.h index f02f7fb9..f08fb7fc 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Line_3_Line_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Line_3_Line_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Line_3_Line_3.h $ -// $Id: Line_3_Line_3.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Line_3_Line_3.h $ +// $Id: include/CGAL/Distance_3/Line_3_Line_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Line_3_Plane_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Line_3_Plane_3.h index f7dacc34..09591dde 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Line_3_Plane_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Line_3_Plane_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Line_3_Plane_3.h $ -// $Id: Line_3_Plane_3.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Line_3_Plane_3.h $ +// $Id: include/CGAL/Distance_3/Line_3_Plane_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Plane_3_Plane_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Plane_3_Plane_3.h index f883ae0d..6722155d 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Plane_3_Plane_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Plane_3_Plane_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Plane_3_Plane_3.h $ -// $Id: Plane_3_Plane_3.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Plane_3_Plane_3.h $ +// $Id: include/CGAL/Distance_3/Plane_3_Plane_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Line_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Line_3.h index 787b8815..5143c012 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Line_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Line_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Point_3_Line_3.h $ -// $Id: Point_3_Line_3.h a4a00d9 2021-06-23T22:30:23+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Point_3_Line_3.h $ +// $Id: include/CGAL/Distance_3/Point_3_Line_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Plane_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Plane_3.h index 2c84095f..0a2d9c6b 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Plane_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Plane_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Point_3_Plane_3.h $ -// $Id: Point_3_Plane_3.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Point_3_Plane_3.h $ +// $Id: include/CGAL/Distance_3/Point_3_Plane_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Point_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Point_3.h index e48ab3be..48254875 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Point_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Point_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Point_3_Point_3.h $ -// $Id: Point_3_Point_3.h 5deb509 2021-04-12T14:42:44+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Point_3_Point_3.h $ +// $Id: include/CGAL/Distance_3/Point_3_Point_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Ray_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Ray_3.h index f7bbddc2..6540a858 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Ray_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Ray_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Point_3_Ray_3.h $ -// $Id: Point_3_Ray_3.h a4a00d9 2021-06-23T22:30:23+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Point_3_Ray_3.h $ +// $Id: include/CGAL/Distance_3/Point_3_Ray_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Segment_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Segment_3.h index be6d3ac8..73d59228 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Segment_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Segment_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h $ -// $Id: Point_3_Segment_3.h a4a00d9 2021-06-23T22:30:23+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Point_3_Segment_3.h $ +// $Id: include/CGAL/Distance_3/Point_3_Segment_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Tetrahedron_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Tetrahedron_3.h index 5c26a94a..d8221e32 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Tetrahedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Tetrahedron_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Point_3_Tetrahedron_3.h $ -// $Id: Point_3_Tetrahedron_3.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Point_3_Tetrahedron_3.h $ +// $Id: include/CGAL/Distance_3/Point_3_Tetrahedron_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Triangle_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Triangle_3.h index e1e48f24..9483b97d 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Triangle_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Triangle_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h $ -// $Id: Point_3_Triangle_3.h 5aeb592 2022-02-28T11:29:54+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Point_3_Triangle_3.h $ +// $Id: include/CGAL/Distance_3/Point_3_Triangle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Weighted_point_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Weighted_point_3.h index 91aa36ef..ab61d2cf 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Weighted_point_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Point_3_Weighted_point_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Point_3_Weighted_point_3.h $ -// $Id: Point_3_Weighted_point_3.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Point_3_Weighted_point_3.h $ +// $Id: include/CGAL/Distance_3/Point_3_Weighted_point_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Ray_3_Line_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Ray_3_Line_3.h index 2ba77d46..5d148abe 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Ray_3_Line_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Ray_3_Line_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Ray_3_Line_3.h $ -// $Id: Ray_3_Line_3.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Ray_3_Line_3.h $ +// $Id: include/CGAL/Distance_3/Ray_3_Line_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Ray_3_Plane_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Ray_3_Plane_3.h index 0d2270a3..81554692 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Ray_3_Plane_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Ray_3_Plane_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Ray_3_Plane_3.h $ -// $Id: Ray_3_Plane_3.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Ray_3_Plane_3.h $ +// $Id: include/CGAL/Distance_3/Ray_3_Plane_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Ray_3_Ray_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Ray_3_Ray_3.h index 8ecf0d68..6bf728bc 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Ray_3_Ray_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Ray_3_Ray_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Ray_3_Ray_3.h $ -// $Id: Ray_3_Ray_3.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Ray_3_Ray_3.h $ +// $Id: include/CGAL/Distance_3/Ray_3_Ray_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Line_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Line_3.h index 02775766..177fbd3c 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Line_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Line_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Segment_3_Line_3.h $ -// $Id: Segment_3_Line_3.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Segment_3_Line_3.h $ +// $Id: include/CGAL/Distance_3/Segment_3_Line_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Plane_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Plane_3.h index 28707f37..b1e7cae9 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Plane_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Plane_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Segment_3_Plane_3.h $ -// $Id: Segment_3_Plane_3.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Segment_3_Plane_3.h $ +// $Id: include/CGAL/Distance_3/Segment_3_Plane_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Ray_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Ray_3.h index b5dc8ab6..0ecdc4ec 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Ray_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Ray_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Segment_3_Ray_3.h $ -// $Id: Segment_3_Ray_3.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Segment_3_Ray_3.h $ +// $Id: include/CGAL/Distance_3/Segment_3_Ray_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Segment_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Segment_3.h index 95964322..78f21ac5 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Segment_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Segment_3_Segment_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h $ -// $Id: Segment_3_Segment_3.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Segment_3_Segment_3.h $ +// $Id: include/CGAL/Distance_3/Segment_3_Segment_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Triangle_3_Triangle_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Triangle_3_Triangle_3.h index 76efa131..8d3a0cc1 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Triangle_3_Triangle_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Triangle_3_Triangle_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h $ -// $Id: Triangle_3_Triangle_3.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h $ +// $Id: include/CGAL/Distance_3/Triangle_3_Triangle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/Weighted_point_3_Weighted_point_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/Weighted_point_3_Weighted_point_3.h index 827ea10e..b926bf55 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/Weighted_point_3_Weighted_point_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/Weighted_point_3_Weighted_point_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/Weighted_point_3_Weighted_point_3.h $ -// $Id: Weighted_point_3_Weighted_point_3.h cf15bbe 2021-05-07T19:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/Weighted_point_3_Weighted_point_3.h $ +// $Id: include/CGAL/Distance_3/Weighted_point_3_Weighted_point_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Distance_3/internal/squared_distance_utils_3.h b/thirdparty/CGAL/include/CGAL/Distance_3/internal/squared_distance_utils_3.h index 0daccde3..d5b8007c 100644 --- a/thirdparty/CGAL/include/CGAL/Distance_3/internal/squared_distance_utils_3.h +++ b/thirdparty/CGAL/include/CGAL/Distance_3/internal/squared_distance_utils_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h $ -// $Id: squared_distance_utils_3.h a4a00d9 2021-06-23T22:30:23+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/Distance_3/internal/squared_distance_utils_3.h $ +// $Id: include/CGAL/Distance_3/internal/squared_distance_utils_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Double_map.h b/thirdparty/CGAL/include/CGAL/Double_map.h index 1e188e2f..aa59217f 100644 --- a/thirdparty/CGAL/include/CGAL/Double_map.h +++ b/thirdparty/CGAL/include/CGAL/Double_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesher_level/include/CGAL/Double_map.h $ -// $Id: Double_map.h 393ae7d 2021-05-12T15:03:53+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesher_level/include/CGAL/Double_map.h $ +// $Id: include/CGAL/Double_map.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Dummy_tds_2.h b/thirdparty/CGAL/include/CGAL/Dummy_tds_2.h index df20e8c0..478acb59 100644 --- a/thirdparty/CGAL/include/CGAL/Dummy_tds_2.h +++ b/thirdparty/CGAL/include/CGAL/Dummy_tds_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_2/include/CGAL/Dummy_tds_2.h $ -// $Id: Dummy_tds_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_2/include/CGAL/Dummy_tds_2.h $ +// $Id: include/CGAL/Dummy_tds_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Dynamic_matrix.h b/thirdparty/CGAL/include/CGAL/Dynamic_matrix.h index fd39786e..2b4cc215 100644 --- a/thirdparty/CGAL/include/CGAL/Dynamic_matrix.h +++ b/thirdparty/CGAL/include/CGAL/Dynamic_matrix.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Matrix_search/include/CGAL/Dynamic_matrix.h $ -// $Id: Dynamic_matrix.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Matrix_search/include/CGAL/Dynamic_matrix.h $ +// $Id: include/CGAL/Dynamic_matrix.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ #include #include -#include +#include namespace CGAL { @@ -56,8 +56,8 @@ class Dynamic_matrix Value operator()( int r, int c) const { - CGAL_optimisation_precondition( r >= 0 && r < number_of_rows()); - CGAL_optimisation_precondition( c >= 0 && c < number_of_columns()); + CGAL_precondition( r >= 0 && r < number_of_rows()); + CGAL_precondition( c >= 0 && c < number_of_columns()); return (*matrix)( r << row_power, column_indices[c]); } @@ -70,18 +70,18 @@ class Dynamic_matrix void replace_column( int o, int n) { - CGAL_optimisation_precondition( o >= 0 && o < number_of_columns()); - CGAL_optimisation_precondition( n >= 0 && n < number_of_columns()); + CGAL_precondition( o >= 0 && o < number_of_columns()); + CGAL_precondition( n >= 0 && n < number_of_columns()); column_indices[o] = column_indices[n]; } void shrink_to_quadratic_size() { - CGAL_optimisation_precondition( number_of_columns() >= number_of_rows()); + CGAL_precondition( number_of_columns() >= number_of_rows()); column_indices.erase( column_indices.begin() + number_of_rows(), column_indices.end()); - CGAL_optimisation_postcondition( number_of_columns() == number_of_rows()); + CGAL_postcondition( number_of_columns() == number_of_rows()); } private: diff --git a/thirdparty/CGAL/include/CGAL/Dynamic_property_map.h b/thirdparty/CGAL/include/CGAL/Dynamic_property_map.h index 022212ca..d745b7f1 100644 --- a/thirdparty/CGAL/include/CGAL/Dynamic_property_map.h +++ b/thirdparty/CGAL/include/CGAL/Dynamic_property_map.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Property_map/include/CGAL/Dynamic_property_map.h $ -// $Id: Dynamic_property_map.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Property_map/include/CGAL/Dynamic_property_map.h $ +// $Id: include/CGAL/Dynamic_property_map.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,8 +19,6 @@ #include #include -#include -#include #include @@ -128,9 +126,9 @@ struct Dynamic_with_index { typedef Key key_type; typedef Value value_type; - typedef typename boost::mpl::if_< boost::is_same, - value_type, - value_type&>::type reference; + typedef std::conditional_t< std::is_same_v, + value_type, + value_type&> reference; typedef boost::read_write_property_map_tag category; Dynamic_with_index() diff --git a/thirdparty/CGAL/include/CGAL/Eigen_diagonalize_traits.h b/thirdparty/CGAL/include/CGAL/Eigen_diagonalize_traits.h index ad905e85..efdef693 100644 --- a/thirdparty/CGAL/include/CGAL/Eigen_diagonalize_traits.h +++ b/thirdparty/CGAL/include/CGAL/Eigen_diagonalize_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Solver_interface/include/CGAL/Eigen_diagonalize_traits.h $ -// $Id: Eigen_diagonalize_traits.h 267a641 2021-05-31T14:01:08+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Solver_interface/include/CGAL/Eigen_diagonalize_traits.h $ +// $Id: include/CGAL/Eigen_diagonalize_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jocelyn Meyron and Quentin Mérigot @@ -51,9 +51,9 @@ struct Restricted_FT { typedef float type; }; /// \tparam FT Number type /// \tparam dim Dimension of the matrices and vectors /// -/// \cgalModels `DiagonalizeTraits` +/// \cgalModels{DiagonalizeTraits} /// -/// \sa http://eigen.tuxfamily.org/index.php?title=Main_Page +/// \sa https://eigen.tuxfamily.org/index.php?title=Main_Page template class Eigen_diagonalize_traits { diff --git a/thirdparty/CGAL/include/CGAL/Eigen_matrix.h b/thirdparty/CGAL/include/CGAL/Eigen_matrix.h index dd3b6823..fe4d5cb8 100644 --- a/thirdparty/CGAL/include/CGAL/Eigen_matrix.h +++ b/thirdparty/CGAL/include/CGAL/Eigen_matrix.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Solver_interface/include/CGAL/Eigen_matrix.h $ -// $Id: Eigen_matrix.h 267a641 2021-05-31T14:01:08+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Solver_interface/include/CGAL/Eigen_matrix.h $ +// $Id: include/CGAL/Eigen_matrix.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Gael Guennebaud @@ -23,9 +23,9 @@ namespace CGAL { \ingroup PkgSolverInterfaceLS The class `Eigen_matrix` is a wrapper around `Eigen` matrix type -`Eigen::Matrix`. +`Eigen::Matrix`. -\cgalModels `SvdTraits::Matrix` +\cgalModels{SvdTraits::Matrix} \tparam T Number type. \tparam D1 Number of rows, or Dynamic diff --git a/thirdparty/CGAL/include/CGAL/Eigen_solver_traits.h b/thirdparty/CGAL/include/CGAL/Eigen_solver_traits.h index 9b0dac12..bf4a9b4f 100644 --- a/thirdparty/CGAL/include/CGAL/Eigen_solver_traits.h +++ b/thirdparty/CGAL/include/CGAL/Eigen_solver_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Solver_interface/include/CGAL/Eigen_solver_traits.h $ -// $Id: Eigen_solver_traits.h b905482 2021-06-11T15:24:49+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Solver_interface/include/CGAL/Eigen_solver_traits.h $ +// $Id: include/CGAL/Eigen_solver_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Gael Guennebaud @@ -68,14 +68,14 @@ struct Get_eigen_matrix< ::Eigen::SparseLU, FT> The class `Eigen_solver_traits` provides an interface to the sparse solvers of \ref thirdpartyEigen "Eigen". \ref thirdpartyEigen "Eigen" version 3.1 (or later) must be available on the system. -\cgalModels `SparseLinearAlgebraWithFactorTraits_d` and `NormalEquationSparseLinearAlgebraTraits_d` +\cgalModels{SparseLinearAlgebraWithFactorTraits_d,NormalEquationSparseLinearAlgebraTraits_d} \tparam EigenSolverT A sparse solver of \ref thirdpartyEigen "Eigen". The default solver is the iterative bi-conjugate gradient stabilized solver `Eigen::BiCGSTAB` for `double`. \sa `CGAL::Eigen_sparse_matrix` \sa `CGAL::Eigen_sparse_symmetric_matrix` \sa `CGAL::Eigen_vector` -\sa http://eigen.tuxfamily.org/index.php?title=Main_Page +\sa https://eigen.tuxfamily.org/index.php?title=Main_Page \cgalHeading{Instantiation Example} @@ -242,7 +242,12 @@ class Eigen_solver_traits::EigenType public: typedef EigenSolverT Solver; typedef Scalar NT; +#ifdef DOXYGEN_RUNNING + typedef unspecified_type Matrix; +#else typedef internal::Get_eigen_matrix::type Matrix; +#endif + typedef Eigen_vector Vector; // Public operations diff --git a/thirdparty/CGAL/include/CGAL/Eigen_sparse_matrix.h b/thirdparty/CGAL/include/CGAL/Eigen_sparse_matrix.h index dc457ed9..eb2b7801 100644 --- a/thirdparty/CGAL/include/CGAL/Eigen_sparse_matrix.h +++ b/thirdparty/CGAL/include/CGAL/Eigen_sparse_matrix.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Solver_interface/include/CGAL/Eigen_sparse_matrix.h $ -// $Id: Eigen_sparse_matrix.h 267a641 2021-05-31T14:01:08+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Solver_interface/include/CGAL/Eigen_sparse_matrix.h $ +// $Id: include/CGAL/Eigen_sparse_matrix.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Gael Guennebaud @@ -21,10 +21,10 @@ namespace CGAL { \ingroup PkgSolverInterfaceLS The class `Eigen_sparse_matrix` is a wrapper around `Eigen` matrix type -`Eigen::SparseMatrix` +`Eigen::SparseMatrix` that represents general matrices, be they symmetric or not. -\cgalModels `SparseLinearAlgebraTraits_d::Matrix` +\cgalModels{SparseLinearAlgebraTraits_d::Matrix} \tparam T Number type. @@ -202,8 +202,8 @@ struct Eigen_sparse_matrix /// Read access to a matrix coefficient. /// /// \warning Complexity: - /// - O(log(n)) if the matrix is already built. - /// - O(n) if the matrix is not built. + /// - \cgalBigO{log(n)} if the matrix is already built. + /// - \cgalBigO{n} if the matrix is not built. /// `n` being the number of entries in the matrix. /// /// \pre 0 <= i < row_dimension(). @@ -298,14 +298,14 @@ struct Eigen_sparse_matrix /*! -\ingroup PkgSolverInterfaceRefLS +\ingroup PkgSolverInterfaceLS The class `Eigen_sparse_symmetric_matrix` is a wrapper around `Eigen` matrix type -`Eigen::SparseMatrix` +`Eigen::SparseMatrix` Since the matrix is symmetric, only the lower triangle part is stored. -\cgalModels `SparseLinearAlgebraTraits_d::Matrix` +\cgalModels{SparseLinearAlgebraTraits_d::Matrix} \tparam T Number type. diff --git a/thirdparty/CGAL/include/CGAL/Eigen_svd.h b/thirdparty/CGAL/include/CGAL/Eigen_svd.h index 3c324c76..ac51818a 100644 --- a/thirdparty/CGAL/include/CGAL/Eigen_svd.h +++ b/thirdparty/CGAL/include/CGAL/Eigen_svd.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Solver_interface/include/CGAL/Eigen_svd.h $ -// $Id: Eigen_svd.h a98b548 2022-05-12T16:03:53+02:00 Sven Oesau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Solver_interface/include/CGAL/Eigen_svd.h $ +// $Id: include/CGAL/Eigen_svd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Gael Guennebaud @@ -31,7 +31,7 @@ The class `Eigen_svd` provides an algorithm to solve in the least square sense a linear system with a singular value decomposition using \ref thirdpartyEigen. -\cgalModels `SvdTraits` +\cgalModels{SvdTraits} */ class Eigen_svd diff --git a/thirdparty/CGAL/include/CGAL/Eigen_vector.h b/thirdparty/CGAL/include/CGAL/Eigen_vector.h index 4a3d9687..4cb7f831 100644 --- a/thirdparty/CGAL/include/CGAL/Eigen_vector.h +++ b/thirdparty/CGAL/include/CGAL/Eigen_vector.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Solver_interface/include/CGAL/Eigen_vector.h $ -// $Id: Eigen_vector.h 267a641 2021-05-31T14:01:08+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Solver_interface/include/CGAL/Eigen_vector.h $ +// $Id: include/CGAL/Eigen_vector.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Gael Guennebaud @@ -20,11 +20,10 @@ namespace CGAL { \ingroup PkgSolverInterfaceLS The class `Eigen_vector` is a wrapper around `Eigen` -vector type, +vector type, which is a simple array of numbers. -\cgalModels `SvdTraits::Vector` -\cgalModels `SparseLinearAlgebraTraits_d::Vector`. +\cgalModels{SvdTraits::Vector,SparseLinearAlgebraTraits_d::Vector} \tparam T Number type. diff --git a/thirdparty/CGAL/include/CGAL/Enum_converter.h b/thirdparty/CGAL/include/CGAL/Enum_converter.h index 9502336c..1ce5c961 100644 --- a/thirdparty/CGAL/include/CGAL/Enum_converter.h +++ b/thirdparty/CGAL/include/CGAL/Enum_converter.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Enum_converter.h $ -// $Id: Enum_converter.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Enum_converter.h $ +// $Id: include/CGAL/Enum_converter.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Env_default_diagram_1.h b/thirdparty/CGAL/include/CGAL/Env_default_diagram_1.h index 9c076e6f..f577d89a 100644 --- a/thirdparty/CGAL/include/CGAL/Env_default_diagram_1.h +++ b/thirdparty/CGAL/include/CGAL/Env_default_diagram_1.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_2/include/CGAL/Env_default_diagram_1.h $ -// $Id: Env_default_diagram_1.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_2/include/CGAL/Env_default_diagram_1.h $ +// $Id: include/CGAL/Env_default_diagram_1.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/Env_plane_traits_3.h b/thirdparty/CGAL/include/CGAL/Env_plane_traits_3.h index befae2fa..14e37798 100644 --- a/thirdparty/CGAL/include/CGAL/Env_plane_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Env_plane_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_3/include/CGAL/Env_plane_traits_3.h $ -// $Id: Env_plane_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_3/include/CGAL/Env_plane_traits_3.h $ +// $Id: include/CGAL/Env_plane_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman @@ -47,7 +47,6 @@ class Env_plane_traits_3 : public Arr_linear_traits_2 typedef typename Kernel::Ray_2 Ray_2; typedef typename Kernel::Line_2 Line_2; typedef typename Kernel::Line_3 Line_3; - typedef typename Kernel::Object_3 Object_3; typedef std::pair Intersection_curve; typedef typename Base::Left_side_category Left_side_category; @@ -326,8 +325,8 @@ class Env_plane_traits_3 : public Arr_linear_traits_2 const Plane_3& h = s.plane(); Line_2 proj_line(h.a(), h.b(), h.d()); - *o++ = make_object(std::make_pair(X_monotone_curve_2(proj_line), - ON_ORIENTED_BOUNDARY)); + *o++ = std::make_pair(X_monotone_curve_2(proj_line), + ON_ORIENTED_BOUNDARY); return o; } @@ -339,7 +338,7 @@ class Env_plane_traits_3 : public Arr_linear_traits_2 Oriented_side side = (res == SMALLER) ? ON_POSITIVE_SIDE : ON_NEGATIVE_SIDE; - *o++ = make_object(std::make_pair(X_monotone_curve_2(s.line()), side)); + *o++ = std::make_pair(X_monotone_curve_2(s.line()), side); return o; } }; @@ -369,11 +368,10 @@ class Env_plane_traits_3 : public Arr_linear_traits_2 { Line_2 l1(h1.a(), h1.b(), h1.d()); Line_2 l2(h2.a(), h2.b(), h2.d()); - Object obj = k.intersect_2_object()(l1, l2); + auto obj = k.intersect_2_object()(l1, l2); - Point_2 p; - if(assign(p, obj)) - *o++ = make_object(p); + if(const Point_2* p = std::get_if(&(*obj))) + *o++ = *p; // otherwise, the vertical planes are parallel or overlap, so we return // nothing. @@ -382,90 +380,82 @@ class Env_plane_traits_3 : public Arr_linear_traits_2 if(s1.is_all_plane() && s2.is_all_plane()) { - Object obj = k.intersect_3_object()(h1, h2); - Line_3 l; - if(assign(l, obj)) - *o++ = make_object(Intersection_curve(project_xy(l, k), 1)); + auto obj = k.intersect_3_object()(h1, h2); + CGAL_assertion(obj != std::nullopt); + if(const Line_3* l = std::get_if(&(*obj))) + *o++ = Intersection_curve(project_xy(*l, k), 1); return o; } if(s1.is_all_plane() && !s2.is_all_plane()) { - Object obj = plane_half_plane_proj_intersection(h1, - h2, - s2.line(), - k); - if(obj.is_empty()) + auto obj = plane_half_plane_proj_intersection(h1, + h2, + s2.line(), + k); + if(obj ==std::nullopt) return o; - Line_2 temp_l; - if(assign(temp_l, obj)) + if(const Line_2* line = std::get_if(&(*obj))) { - *o++ = make_object(Intersection_curve(temp_l, 1)); + *o++ = Intersection_curve(*line, 1); return o; } - Ray_2 ray; - if(assign(ray, obj)) + if(const Ray_2* ray = std::get_if(&(*obj))) { - *o++ = make_object(Intersection_curve(ray, 1)); + *o++ = Intersection_curve(*ray, 1); return o; } return o; } if(!s2.is_all_plane() && s2.is_all_plane()) { - Object obj = plane_half_plane_proj_intersection(h2, - h1, - s1.line(), - k); - if(obj.is_empty()) + auto obj = plane_half_plane_proj_intersection(h2, + h1, + s1.line(), + k); + if(obj == std::nullopt) return o; - Line_2 line; - if(assign(line, obj)) + if(const Line_2* line = std::get_if(&(*obj))) { - *o++ = make_object(Intersection_curve(line, 1)); + *o++ = Intersection_curve(*line, 1); return o; } - Ray_2 ray; - if(assign(ray, obj)) + if(const Ray_2* ray = std::get_if(&(*obj))) { - *o++ = make_object(Intersection_curve(ray, 1)); + *o++ = Intersection_curve(*ray, 1); return o; } return o; - } CGAL_assertion(!s2.is_all_plane() && !s2.is_all_plane()); - Object obj = + auto obj = half_plane_half_plane_proj_intersection(h1, s1.line(), h2, s2.line(), k); - if(obj.is_empty()) + if(obj ==std::nullopt ) return o; - Line_2 line; - if(assign(line, obj)) + + if(const Line_2* line = std::get_if(&(*obj))) { - *o++ = make_object(Intersection_curve(line, 1)); + *o++ = Intersection_curve(*line, 1); return o; } - Ray_2 ray; - if(assign(ray, obj)) + if(const Ray_2* ray = std::get_if(&(*obj))) { - *o++ = make_object(Intersection_curve(ray, 1)); + *o++ = Intersection_curve(*ray, 1); return o; } - Segment_2 seg; - if(assign(seg, obj)) + if(const Segment_2* seg = std::get_if(&(*obj))) { - *o++ = make_object(Intersection_curve(seg, 1)); + *o++ = Intersection_curve(*seg, 1); return o; } - Point_2 p; - if(assign(p, obj)) + if(const Point_2* p = std::get_if(&(*obj))) { - *o++ = make_object(p); + *o++ = *p; return o; } return o; diff --git a/thirdparty/CGAL/include/CGAL/Env_sphere_traits_3.h b/thirdparty/CGAL/include/CGAL/Env_sphere_traits_3.h index 549b24bd..35b63ea1 100644 --- a/thirdparty/CGAL/include/CGAL/Env_sphere_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Env_sphere_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_3/include/CGAL/Env_sphere_traits_3.h $ -// $Id: Env_sphere_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_3/include/CGAL/Env_sphere_traits_3.h $ +// $Id: include/CGAL/Env_sphere_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michal Meyerovitch @@ -18,7 +18,6 @@ #include -#include #include #include #include @@ -26,51 +25,51 @@ #include #include +#include + namespace CGAL { -template -class Env_sphere_traits_3 : public ConicTraits_2 -{ +template +class Env_sphere_traits_3 : public ConicTraits_2 { public: - typedef ConicTraits_2 Traits_2; - typedef Env_sphere_traits_3 Self; + typedef ConicTraits_2 Traits_2; + typedef Env_sphere_traits_3 Self; - typedef typename Traits_2::Point_2 Point_2; - typedef typename Traits_2::Curve_2 Curve_2; - typedef typename Traits_2::X_monotone_curve_2 X_monotone_curve_2; - typedef typename Traits_2::Multiplicity Multiplicity; + typedef typename Traits_2::Point_2 Point_2; + typedef typename Traits_2::Curve_2 Curve_2; + typedef typename Traits_2::X_monotone_curve_2 X_monotone_curve_2; + typedef typename Traits_2::Multiplicity Multiplicity; - typedef typename Traits_2::Rat_kernel Rat_kernel; - typedef typename Traits_2::Alg_kernel Alg_kernel; - typedef typename Traits_2::Nt_traits Nt_traits; + typedef typename Traits_2::Rat_kernel Rat_kernel; + typedef typename Traits_2::Alg_kernel Alg_kernel; + typedef typename Traits_2::Nt_traits Nt_traits; - typedef typename Rat_kernel::FT Rational; - typedef typename Rat_kernel::Point_2 Rat_point_2; - typedef typename Rat_kernel::Segment_2 Rat_segment_2; - typedef typename Rat_kernel::Line_2 Rat_line_2; - typedef typename Rat_kernel::Circle_2 Rat_circle_2; - typedef typename Rat_kernel::Point_3 Rat_point_3; + typedef typename Rat_kernel::FT Rational; + typedef typename Rat_kernel::Point_2 Rat_point_2; + typedef typename Rat_kernel::Segment_2 Rat_segment_2; + typedef typename Rat_kernel::Line_2 Rat_line_2; + typedef typename Rat_kernel::Circle_2 Rat_circle_2; + typedef typename Rat_kernel::Point_3 Rat_point_3; - typedef typename Alg_kernel::FT Algebraic; - typedef typename Alg_kernel::Point_2 Alg_point_2; - typedef typename Alg_kernel::Circle_2 Alg_circle_2; + typedef typename Alg_kernel::FT Algebraic; + typedef typename Alg_kernel::Point_2 Alg_point_2; + typedef typename Alg_kernel::Circle_2 Alg_circle_2; - typedef typename Rat_kernel::Sphere_3 Surface_3; + typedef typename Rat_kernel::Sphere_3 Surface_3; // here we refer to the lower part of the sphere only - typedef Surface_3 Xy_monotone_surface_3; + typedef Surface_3 Xy_monotone_surface_3; + protected: - typedef std::pair Intersection_curve; + typedef std::pair Intersection_curve; public: class Make_xy_monotone_3 { protected: - const Self & parent; + const Self& parent; public: - Make_xy_monotone_3(const Self * p) : parent(*p) - {} + Make_xy_monotone_3(const Self * p) : parent(*p) {} // create xy-monotone surfaces from a general surface // return a past-the-end iterator @@ -89,56 +88,50 @@ class Env_sphere_traits_3 : public ConicTraits_2 /*! Get a Make_xy_monotone_3 functor object. */ Make_xy_monotone_3 - make_xy_monotone_3_object() const - { - return Make_xy_monotone_3(this); - } + make_xy_monotone_3_object() const { return Make_xy_monotone_3(this); } - class Construct_projected_boundary_2 - { + class Construct_projected_boundary_2 { protected: - const Self & parent; + const Self& parent; public: - Construct_projected_boundary_2(const Self * p) : parent(*p) - {} + Construct_projected_boundary_2(const Self* p) : parent(*p) {} // insert into the OutputIterator all the (2d) curves of the boundary of // the vertical projection of the surface on the xy-plane // the OutputIterator value type is X_monotone_curve_2 template OutputIterator - operator()(const Xy_monotone_surface_3& s, OutputIterator o) const - { + operator()(const Xy_monotone_surface_3& s, OutputIterator o) const { + const auto gt_2 = parent.geometry_traits_2(); + // the projected boundary in a circle, with a projected center, // and same radius Rat_point_2 proj_center = parent.project(s.center()); Rat_circle_2 circ(proj_center, s.squared_radius()); - Curve_2 curve(circ); - Object objs[2]; - CGAL_assertion_code(Object *p = ) + Curve_2 curve = gt_2->construct_curve_2_object()(circ); + typedef std::variant Variant; + Variant objs[2]; + + CGAL_assertion_code(Variant* p = ) parent.make_x_monotone_2_object()(curve, objs); CGAL_assertion(p == objs + 2); - X_monotone_curve_2 cv1, cv2; + const X_monotone_curve_2* cv1 = std::get_if(&(objs[0])); + const X_monotone_curve_2* cv2 = std::get_if(&(objs[1])); - CGAL_assertion(assign(cv1, objs[0])); - CGAL_assertion(assign(cv2, objs[1])); + CGAL_assertion(cv1!=nullptr); + CGAL_assertion(cv2!=nullptr); - assign(cv1, objs[0]); - assign(cv2, objs[1]); - - if(cv1.is_lower()) - { - CGAL_assertion(cv2.is_upper()); - *o++ = make_object(std::make_pair(cv1, ON_POSITIVE_SIDE)); - *o++ = make_object(std::make_pair(cv2, ON_NEGATIVE_SIDE)); + if (cv1->is_lower()) { + CGAL_assertion(cv2->is_upper()); + *o++ = std::make_pair(*cv1, ON_POSITIVE_SIDE); + *o++ = std::make_pair(*cv2, ON_NEGATIVE_SIDE); } - else - { - CGAL_assertion(cv2.is_lower()); - *o++ = make_object(std::make_pair(cv1, ON_NEGATIVE_SIDE)); - *o++ = make_object(std::make_pair(cv2, ON_POSITIVE_SIDE)); + else { + CGAL_assertion(cv2->is_lower()); + *o++ = std::make_pair(*cv1, ON_NEGATIVE_SIDE); + *o++ = std::make_pair(*cv2, ON_POSITIVE_SIDE); } return o; @@ -148,59 +141,57 @@ class Env_sphere_traits_3 : public ConicTraits_2 /*! Get a Construct_projected_boundary_2 functor object. */ Construct_projected_boundary_2 construct_projected_boundary_2_object() const - { - return Construct_projected_boundary_2(this); - } + { return Construct_projected_boundary_2(this); } - class Construct_projected_intersections_2 - { + class Construct_projected_intersections_2 { protected: - const Self & parent; + const Self& parent; public: - Construct_projected_intersections_2(const Self * p) : parent(*p) - {} + Construct_projected_intersections_2(const Self * p) : parent(*p) {} // insert into OutputIterator all the (2d) projections on the xy plane of // the intersection objects between the 2 surfaces // the data type of OutputIterator is Object - template + template OutputIterator - operator()(const Xy_monotone_surface_3& s1, - const Xy_monotone_surface_3& s2, - OutputIterator o) const - { + operator()(const Xy_monotone_surface_3& s1, const Xy_monotone_surface_3& s2, + OutputIterator o) const { + const auto gt_2 = parent.geometry_traits_2(); + auto ctr_cv = gt_2->construct_curve_2_object(); + auto nt_traits = gt_2->nt_traits(); + Rat_point_3 p1 = s1.center(); Rat_point_3 p2 = s2.center(); - const Rational a1 = p1.x(), b1 = p1.y(), c1 = p1.z(), - a2 = p2.x(), b2 = p2.y(), c2 = p2.z(); - const Rational sqr_r1 = s1.squared_radius(), - sqr_r2 = s2.squared_radius(); - -// // the spheres intersect iff d(p1, p2) <= (r1+r2) -// // squaring this twice, we get the condition -// // sqr_d^2 + (1-2*sqr_d)(sqr_r1 + sqr_r2) - 2*sqr_r1*sqr_r2 <= 0 -// // with only rational numbers involved. -// // todo: check if it helps -// Rat_kernel ratk; -// Rational sqr_d = ratk.compute_squared_distance_3_object()(p1, p2); -// Sign do_inter = CGAL_NTS sign(sqr_d*sqr_d + (1-2*sqr_d)*(sqr_r1+sqr_r2)-2*sqr_r1*sqr_r2); -// if (do_inter == POSITIVE) -// return o; - - Nt_traits nt_traits; + const Rational a1 = p1.x(); + const Rational b1 = p1.y(); + const Rational c1 = p1.z(); + const Rational a2 = p2.x(); + const Rational b2 = p2.y(); + const Rational c2 = p2.z(); + const Rational sqr_r1 = s1.squared_radius(); + const Rational sqr_r2 = s2.squared_radius(); + + // // the spheres intersect iff d(p1, p2) <= (r1+r2) + // // squaring this twice, we get the condition + // // sqr_d^2 + (1-2*sqr_d)(sqr_r1 + sqr_r2) - 2*sqr_r1*sqr_r2 <= 0 + // // with only rational numbers involved. + // // todo: check if it helps + // Rat_kernel ratk; + // Rational sqr_d = ratk.compute_squared_distance_3_object()(p1, p2); + // Sign do_inter = + // CGAL_NTS sign(sqr_d*sqr_d + (1-2*sqr_d)*(sqr_r1+sqr_r2)-2*sqr_r1*sqr_r2); + // if (do_inter == POSITIVE) + // return o; // we check if the centers of the 2 spheres have same z coordinate - // in this case the potential projected intersection is a segment // (or point) - if (CGAL_NTS compare(c1, c2) == EQUAL) - { - if (CGAL_NTS compare(b1, b2) == EQUAL) - { - if (CGAL_NTS compare(a1, a2) == EQUAL) + if (CGAL_NTS compare(c1, c2) == EQUAL) { + if (CGAL_NTS compare(b1, b2) == EQUAL) { + if (CGAL_NTS compare(a1, a2) == EQUAL) { // the same center, we have no intersection // (we don't return overlappings as intersections) - { return o; } @@ -234,27 +225,20 @@ class Env_sphere_traits_3 : public ConicTraits_2 Rational B = -8*b1*sqr_a_diff; Rational C = 4*sqr_a_diff*(sqr_a1+sqr_b1-sqr_r1) + m*m - 4*m*a1*a_diff; - Algebraic ys[2]; - Algebraic *ys_end; - std::ptrdiff_t n_ys; - ys_end = nt_traits.solve_quadratic_equation(A, B, C, ys); - n_ys = ys_end - ys; + Algebraic* ys_end = nt_traits->solve_quadratic_equation(A, B, C, ys); + std::ptrdiff_t n_ys = ys_end - ys; - if (n_ys == 0) - { - return o; // no intersection - } + if (n_ys == 0) return o; // no intersection // the x coordinate of the solution points Algebraic xs = m / (2*a_diff); - if (n_ys == 1) - { + if (n_ys == 1) { // intersection is a point Point_2 inter_point(xs , ys[0]); - *o++ = make_object(inter_point); + *o++ = inter_point; return o; } @@ -268,14 +252,12 @@ class Env_sphere_traits_3 : public ConicTraits_2 // equation (1) is: // 2(a1-a2)x - m = 0 - - Curve_2 res(0,0,0, 2*a_diff, 0, -m, COLLINEAR, end1, end2); + Curve_2 res = ctr_cv(0, 0, 0, 2*a_diff, 0, -m, COLLINEAR, end1, end2); parent.add_curve_to_output(res, o); - //*o++ = make_object(Intersection_curve(res, TRANSVERSAL)); + //*o++ = Intersection_curve(res, TRANSVERSAL); } - else - { + else { // here we have c1 == c2, b1 != b2. // the intersection lies on the plane // -2(a1-a2)x + m @@ -316,22 +298,18 @@ class Env_sphere_traits_3 : public ConicTraits_2 Rational E = -8*a1*sqr_b_diff - 4*m*a_diff + 8*b1*a_diff*b_diff; Rational F = 4*sqr_b_diff*(sqr_a1+sqr_b1-sqr_r1) + m*m - 4*m*b1*b_diff; - Algebraic xs[2]; - Algebraic *xs_end; - std::ptrdiff_t n_xs; + Algebraic xs[2]; - xs_end = nt_traits.solve_quadratic_equation(D, E, F, xs); - n_xs = xs_end - xs; + Algebraic* xs_end = nt_traits->solve_quadratic_equation(D, E, F, xs); + std::ptrdiff_t n_xs = xs_end - xs; - if (n_xs == 0) - { + if (n_xs == 0) { return o; // no intersection } - if (n_xs == 1) - { + if (n_xs == 1) { // intersection is a point Point_2 inter_point(xs[0], (-2*a_diff*xs[0] + m)/(2*b_diff) ); - *o++ = make_object(inter_point); + *o++ = inter_point; return o; } @@ -348,16 +326,15 @@ class Env_sphere_traits_3 : public ConicTraits_2 // equation (1) is: // 2(a1-a2)x + 2(b1-b2)y - m = 0 - Curve_2 res(0,0,0, 2*a_diff, 2*b_diff, -m, COLLINEAR, end1, end2); + Curve_2 res = + ctr_cv(0,0,0, 2*a_diff, 2*b_diff, -m, COLLINEAR, end1, end2); parent.add_curve_to_output(res, o); - //*o++ = make_object(Intersection_curve(res, TRANSVERSAL)); + //*o++ = Intersection_curve(res, TRANSVERSAL); } - } // now the potential intersection is (a part of) a circle, // and the projection is (a part of) an ellipse - else - { + else { // here we have c1 != c2. // the intersection lies on the plane: // -2(a1-a2)x -2(b1-b2)y + m @@ -411,7 +388,7 @@ class Env_sphere_traits_3 : public ConicTraits_2 Rational sqr_c1 = c1*c1, sqr_c2 = c2*c2; Rational m = sqr_a1 + sqr_b1 + sqr_c1 - - sqr_a2 - sqr_b2 - sqr_c2 + sqr_r2 - sqr_r1; + sqr_a2 - sqr_b2 - sqr_c2 + sqr_r2 - sqr_r1; Rational R = 4*sqr_c_diff + 4*sqr_a_diff; Rational S = 4*sqr_c_diff + 4*sqr_b_diff; @@ -419,26 +396,20 @@ class Env_sphere_traits_3 : public ConicTraits_2 Rational U = -8*a1*sqr_c_diff + 8*c1*c_diff*a_diff - 4*m*a_diff; Rational V = -8*b1*sqr_c_diff + 8*c1*c_diff*b_diff - 4*m*b_diff; Rational W = 4*sqr_c_diff*(sqr_a1+sqr_b1+sqr_c1-sqr_r1) - - 4*m*c1*c_diff + m*m; + 4*m*c1*c_diff + m*m; // if the full spheres do not intersect, the equation we get has no // real solution, so we should check it: bool ellipse_is_point = false; - if (!parent.is_valid_conic_equation(R, S, T, U, V, W, - ellipse_is_point)) - { + if (! parent.is_valid_conic_equation(R, S, T, U, V, W, ellipse_is_point)) return o; - } // we need only a part of the ellipse (as stated in (**)) so we // construct the cutting line, which is: // equation (*) <= min(c1,c2) -- for lower envelope // equation (*) >= max(c1,c2) -- for upper envelope - Rational z_plane; - if (parent.m_is_lower) - z_plane = ((c1 < c2) ? c1 : c2); - else - z_plane = ((c1 > c2) ? c1 : c2); + Rational z_plane = (parent.m_is_lower) ? + ((c1 < c2) ? c1 : c2) : ((c1 > c2) ? c1 : c2); // we get (for lower envelope) @@ -452,33 +423,30 @@ class Env_sphere_traits_3 : public ConicTraits_2 // for upper envelope, we should multiply the line equation by -1 int envelope_coef = 1; - if (!parent.m_is_lower) - envelope_coef = -1; + if (! parent.m_is_lower) envelope_coef = -1; Sign sign_c_diff = CGAL_NTS sign(c_diff); Rational la = envelope_coef*2*a_diff*sign_c_diff; Rational lb = envelope_coef*2*b_diff*sign_c_diff; Rational lc = envelope_coef*sign_c_diff*(2*c_diff*z_plane - m); - if (ellipse_is_point) - { + if (ellipse_is_point) { // as specified in the is_valid_conic_equation method, the // intersection point is: // Rational px = S*(4*U - T*V)/(T*T - 4*S*R); px = px / 2; - Rational py = -(T*px + V)/(2*S); + Rational py = -(T*px + V)/(2*S); // should check if the point is in the non-negative side of the // line - if (CGAL_NTS sign(la*px + lb*py +lc) != NEGATIVE) - { - *o++ = make_object(Point_2(px, py)); - } + if (CGAL_NTS sign(la*px + lb*py +lc) != NEGATIVE) + *o++ = Point_2(px, py); return o; - } + } // EBEB 2012/06/29: Added because of - // no matching function for call to 'compare(CGAL::Env_sphere_traits_3::Rational&, int) + // no matching function for call to + // compare(CGAL::Env_sphere_traits_3::Rational&, int) Rational zero(0); // if (a1==a2) and (b1==b2) (*) is a plane parallel to the xy-plane @@ -490,11 +458,10 @@ class Env_sphere_traits_3 : public ConicTraits_2 CGAL_NTS compare(b_diff, zero) == EQUAL) { Sign sign_lc = CGAL_NTS sign(lc); - if (sign_lc != NEGATIVE) - { - Curve_2 res(R, S, T, U, V, W); + if (sign_lc != NEGATIVE) { + Curve_2 res = ctr_cv(R, S, T, U, V, W); parent.add_curve_to_output(res, o); - //*o++ = make_object(Intersection_curve(res, TRANSVERSAL)); + //*o++ = Intersection_curve(res, TRANSVERSAL); } return o; } @@ -505,31 +472,29 @@ class Env_sphere_traits_3 : public ConicTraits_2 // R*x^2 + S*y^2 + T*xy + U*x + V*y + W = 0 Alg_point_2 source, target, pmid; std::ptrdiff_t n_inter_points; - if (CGAL_NTS compare(lb, zero) != EQUAL) - { + if (CGAL_NTS compare(lb, zero) != EQUAL) { // Find the x-coordinates of the intersection points of the conic // curve and the line y = -(la*x + lc) / lb: // we get a quadratic equation Ax^2 + Bx + C = 0 // where A = lb*lb*R + la*(la*S - lb*T) // B = 2*la*lc*S - lb*(lc*T + la*V - lb*U) // C = S*lc*lc + lb*(lb*W - lc*V) - Rational A = lb*lb*R + la*(la*S - lb*T), - B = 2*la*lc*S - lb*(lc*T + la*V - lb*U), - C = S*lc*lc + lb*(lb*W - lc*V); + Rational A = lb*lb*R + la*(la*S - lb*T); + Rational B = 2*la*lc*S - lb*(lc*T + la*V - lb*U); + Rational C = S*lc*lc + lb*(lb*W - lc*V); - Algebraic inter_xs[2]; - Algebraic *inter_xs_end; + Algebraic inter_xs[2]; + Algebraic* inter_xs_end; - inter_xs_end = nt_traits.solve_quadratic_equation(A, B, C, inter_xs); + inter_xs_end = nt_traits->solve_quadratic_equation(A, B, C, inter_xs); n_inter_points = inter_xs_end - inter_xs; if (n_inter_points > 0) - source = Alg_point_2(inter_xs[0], - -(la*inter_xs[0] + lc) / Algebraic(lb)); - if (n_inter_points == 2) - { - target = Alg_point_2(inter_xs[1], - -(la*inter_xs[1] + lc) / Algebraic(lb)); + source = + Alg_point_2(inter_xs[0], -(la*inter_xs[0] + lc) / Algebraic(lb)); + if (n_inter_points == 2) { + target = + Alg_point_2(inter_xs[1], -(la*inter_xs[1] + lc) / Algebraic(lb)); // Get the conic points whose x-coordinate are in the middle of the // two endpoints. @@ -542,30 +507,30 @@ class Env_sphere_traits_3 : public ConicTraits_2 CGAL_precondition_code(int x_mid_n_y_points;); Alg_point_2 x_mid_y_points[2]; - Curve_2 inter_cv(R, S, T, U, V, W); + Curve_2 inter_cv = ctr_cv(R, S, T, U, V, W); CGAL_precondition_code(x_mid_n_y_points = ) - inter_cv.points_at_x(x_mid_point, x_mid_y_points); + gt_2->points_at_x(inter_cv, x_mid_point, x_mid_y_points); CGAL_precondition(x_mid_n_y_points > 0); Algebraic y1 = x_mid_y_points[0].y(), y2 = x_mid_y_points[1].y(); - if (CGAL_NTS compare(Algebraic(la)*x_mid + Algebraic(lb)*y1 + Algebraic(lc), - Algebraic(0) - ) == LARGER) - { + if (CGAL_NTS compare(Algebraic(la)*x_mid + Algebraic(lb)*y1 + + Algebraic(lc), + Algebraic(0)) == LARGER) + { pmid = Alg_point_2(x_mid, y1); } - else - { - CGAL_assertion(CGAL_NTS compare(Algebraic(la)*x_mid + Algebraic(lb)*y2 + Algebraic(lc), + else { + CGAL_assertion(CGAL_NTS compare(Algebraic(la)*x_mid + + Algebraic(lb)*y2 + Algebraic(lc), Algebraic(0)) == LARGER); pmid = Alg_point_2(x_mid, y2); } } } - else - { // lb == 0 + else { + // lb == 0 CGAL_assertion(CGAL_NTS compare(la, zero) != EQUAL); // Find the intersection of the vertical line x = -lc / la: @@ -574,21 +539,20 @@ class Env_sphere_traits_3 : public ConicTraits_2 // where A = S // B = T*inter_x + V // C = R*inter_x^2 + U*inter_x + W - Rational A = S, - B = T*inter_x + V, - C = R*inter_x*inter_x + U*inter_x + W; + Rational A = S; + Rational B = T*inter_x + V; + Rational C = R*inter_x*inter_x + U*inter_x + W; - Algebraic inter_points[2]; - Algebraic *inter_points_end; + Algebraic inter_points[2]; + Algebraic* inter_points_end; inter_points_end = - nt_traits.solve_quadratic_equation(A, B, C, inter_points); + nt_traits->solve_quadratic_equation(A, B, C, inter_points); n_inter_points = inter_points_end - inter_points; if (n_inter_points > 0) source = Alg_point_2(Algebraic(inter_x), inter_points[0]); - if (n_inter_points == 2) - { + if (n_inter_points == 2) { target = Alg_point_2(Algebraic(inter_x), inter_points[1]); // Get the conic points whose y-coordinate are in the middle of the @@ -599,32 +563,30 @@ class Env_sphere_traits_3 : public ConicTraits_2 Alg_point_2 y_mid_point(0, y_mid); Alg_point_2 y_mid_x_points[2]; - Curve_2 inter_cv(R, S, T, U, V, W); - - CGAL_precondition_code(int y_mid_n_x_points =) - inter_cv.points_at_y(y_mid_point, y_mid_x_points); + Curve_2 inter_cv = ctr_cv(R, S, T, U, V, W); + CGAL_precondition_code(int y_mid_n_x_points =) + gt_2->points_at_y(inter_cv, y_mid_point, y_mid_x_points); CGAL_precondition(y_mid_n_x_points > 0); Algebraic x1 = y_mid_x_points[0].x(), x2 = y_mid_x_points[1].x(); - if (CGAL_NTS compare( - Algebraic(la)*x1 + Algebraic(lb)*y_mid + Algebraic(lc), - Algebraic(0)) == LARGER) + if (CGAL_NTS compare(Algebraic(la)*x1 + Algebraic(lb)*y_mid + + Algebraic(lc), + Algebraic(0)) == LARGER) { pmid = Alg_point_2(x1, y_mid); } - else - { - CGAL_assertion(CGAL_NTS compare ( - Algebraic(la)*x2 + Algebraic(lb)*y_mid + Algebraic(lc), - Algebraic(0)) == LARGER); + else { + CGAL_assertion(CGAL_NTS compare(Algebraic(la)*x2 + + Algebraic(lb)*y_mid + + Algebraic(lc), + Algebraic(0)) == LARGER); pmid = Alg_point_2(x2, Algebraic(y_mid)); } } } - if (n_inter_points < 2) - { + if (n_inter_points < 2) { // we should check whether the ellipse is in the positive side of the // line - in which case we return the full ellipse // or not - in which case there is no intersection if @@ -634,31 +596,27 @@ class Env_sphere_traits_3 : public ConicTraits_2 // for this, we find a point inside the ellipse and substitute // its coordinates in the line equation - Curve_2 inter_cv(R, S, T, U, V, W); + Curve_2 inter_cv = ctr_cv(R, S, T, U, V, W); Alg_point_2 vtan_ps[2]; - CGAL_assertion_code(int n_vtan_ps =) - inter_cv.vertical_tangency_points(vtan_ps); - + CGAL_assertion_code(std::size_t n_vtan_ps =) + gt_2->vertical_tangency_points(inter_cv, vtan_ps); CGAL_assertion(n_vtan_ps == 2); Algebraic lval = Algebraic(la)*vtan_ps[0].x() + Algebraic(lb)*vtan_ps[0].y() + Algebraic(lc); Sign lval_sign = CGAL_NTS sign(lval); - if (lval_sign == POSITIVE) - { + if (lval_sign == POSITIVE) { // the full ellipse is in the positive side parent.add_curve_to_output(inter_cv, o); - //*o++ = make_object(Intersection_curve(inter_cv, TRANSVERSAL)); + //*o++ = Intersection_curve(inter_cv, TRANSVERSAL); return o; } - else if (lval_sign == NEGATIVE) - { + else if (lval_sign == NEGATIVE) { // the full ellipse is in the negative side, except maybe the point // source in the case n_inter_points = 1 (which lies on the line) - if (n_inter_points == 1) - *o++ = make_object(Point_2(source)); + if (n_inter_points == 1) *o++ = Point_2(source); return o; } @@ -667,16 +625,14 @@ class Env_sphere_traits_3 : public ConicTraits_2 // n_inter_points == 1 and source = vtan_ps[0] CGAL_assertion(n_inter_points == 1 && source == vtan_ps[0]); // so we try the other vertical tangency point - lval = Algebraic(la)*vtan_ps[1].x() + - Algebraic(lb)*vtan_ps[1].y() + Algebraic(lc); + lval = Algebraic(la)*vtan_ps[1].x() + Algebraic(lb)*vtan_ps[1].y() + + Algebraic(lc); lval_sign = CGAL_NTS sign(lval); CGAL_assertion(lval_sign != ZERO); - if (lval_sign == POSITIVE) - parent.add_curve_to_output(inter_cv, o); - //*o++ = make_object(Intersection_curve(inter_cv, TRANSVERSAL)); - else - *o++ = make_object(Point_2(source)); + if (lval_sign == POSITIVE) parent.add_curve_to_output(inter_cv, o); + //*o++ = Intersection_curve(inter_cv, TRANSVERSAL); + else *o++ = Point_2(source); return o; } @@ -688,18 +644,15 @@ class Env_sphere_traits_3 : public ConicTraits_2 // If the mid-point forms a left-turn with the source and the target // points, the orientation is positive (going counterclockwise). // Otherwise, it is negative (going clockwise). - Alg_kernel k; - typename Alg_kernel::Orientation_2 orient_f = k.orientation_2_object(); - Orientation orient; - if (orient_f(source, pmid, target) == LEFT_TURN) - orient = CGAL::COUNTERCLOCKWISE; - else - orient = CGAL::CLOCKWISE; - - Curve_2 res(R, S, T, U, V, W, orient, source, target); + auto alg_kernel = gt_2->alg_kernel(); + auto orient_f = alg_kernel->orientation_2_object(); + Orientation orient = (orient_f(source, pmid, target) == LEFT_TURN) ? + CGAL::COUNTERCLOCKWISE : CGAL::CLOCKWISE; + + Curve_2 res = ctr_cv(R, S, T, U, V, W, orient, source, target); CGAL_assertion(res.is_valid()); parent.add_curve_to_output(res, o); - //*o++ = make_object(Intersection_curve(res, TRANSVERSAL)); + //*o++ = Intersection_curve(res, TRANSVERSAL); } return o; @@ -709,18 +662,14 @@ class Env_sphere_traits_3 : public ConicTraits_2 /*! Get a Construct_projected_intersections_2 functor object. */ Construct_projected_intersections_2 construct_projected_intersections_2_object() const - { - return Construct_projected_intersections_2(this); - } + { return Construct_projected_intersections_2(this); } - class Compare_z_at_xy_3 - { + class Compare_z_at_xy_3 { protected: - const Self & parent; + const Self& parent; public: - Compare_z_at_xy_3(const Self * p) : parent(*p) - {} + Compare_z_at_xy_3(const Self* p) : parent(*p) {} // check which of the surfaces is closer to the envelope at the xy // coordinates of point (i.e. lower if computing the lower envelope, or @@ -728,8 +677,7 @@ class Env_sphere_traits_3 : public ConicTraits_2 // precondition: the surfaces are defined in point Comparison_result operator()(const Point_2& p, const Xy_monotone_surface_3& s1, - const Xy_monotone_surface_3& s2) const - { + const Xy_monotone_surface_3& s2) const { Comparison_result c2 = compare_in_point_second_method(p, s1, s2); CGAL_expensive_assertion_code( @@ -747,12 +695,10 @@ class Env_sphere_traits_3 : public ConicTraits_2 // answer is the same for each of these points Comparison_result operator()(const X_monotone_curve_2& cv, const Xy_monotone_surface_3& s1, - const Xy_monotone_surface_3& s2) const - { + const Xy_monotone_surface_3& s2) const { // we compute a middle point on cv and use the previous function Point_2 mid = parent.construct_middle_point(cv); - Comparison_result res = - parent.compare_z_at_xy_3_object()(mid, s1, s2); + Comparison_result res = parent.compare_z_at_xy_3_object()(mid, s1, s2); return res; } @@ -762,18 +708,15 @@ class Env_sphere_traits_3 : public ConicTraits_2 Comparison_result compare_in_point_first_method(const Point_2& p, const Xy_monotone_surface_3& s1, - const Xy_monotone_surface_3& s2) const - { + const Xy_monotone_surface_3& s2) const { // find the z coordinates of surface 1 over p Algebraic z1 = parent.compute_envelope_z_in_point(p, s1); // find the z coordinates of surface 2 over p Algebraic z2 = parent.compute_envelope_z_in_point(p, s2); Sign res = CGAL_NTS sign(z1 - z2); - if (parent.m_is_lower) - return res; - else - return -res; + if (parent.m_is_lower) return res; + else return -res; } // second method of compare in point @@ -796,10 +739,14 @@ class Env_sphere_traits_3 : public ConicTraits_2 { Rat_point_3 p1 = s1.center(); Rat_point_3 p2 = s2.center(); - const Rational a1 = p1.x(), b1 = p1.y(), c1 = p1.z(), - a2 = p2.x(), b2 = p2.y(), c2 = p2.z(); - const Rational sqr_r1 = s1.squared_radius(), - sqr_r2 = s2.squared_radius(); + const Rational a1 = p1.x(); + const Rational b1 = p1.y(); + const Rational c1 = p1.z(); + const Rational a2 = p2.x(); + const Rational b2 = p2.y(); + const Rational c2 = p2.z(); + const Rational sqr_r1 = s1.squared_radius(); + const Rational sqr_r2 = s2.squared_radius(); const Algebraic x1 = p.x(), y1 = p.y(); Rational c_diff = c1 - c2; @@ -814,67 +761,54 @@ class Env_sphere_traits_3 : public ConicTraits_2 if (CGAL_NTS sign(A2) == NEGATIVE) std::cout << "A2 = " << A2 << std::endl; - Sign res; // sign_a_plus_b_x_sqrt_e_plus_c_x_sqrt_f is a CGAL method which // computes the sign of quantity: a + b * sqrt(e) + c * sqrt(f) - - res = CGAL::sign_a_plus_b_x_sqrt_e_plus_c_x_sqrt_f(Algebraic(c_diff), - Algebraic(-1), - Algebraic(1), - A1, - A2); + Sign res = + CGAL::sign_a_plus_b_x_sqrt_e_plus_c_x_sqrt_f(Algebraic(c_diff), + Algebraic(-1), + Algebraic(1), + A1, + A2); return res; } }; /*! Get a Compare_z_at_xy_3 functor object. */ Compare_z_at_xy_3 - compare_z_at_xy_3_object() const - { - return Compare_z_at_xy_3(this); - } + compare_z_at_xy_3_object() const { return Compare_z_at_xy_3(this); } - class Compare_z_at_xy_above_3 - { + class Compare_z_at_xy_above_3 { protected: - const Self & parent; + const Self& parent; public: - Compare_z_at_xy_above_3(const Self * p) : parent(*p) - {} + Compare_z_at_xy_above_3(const Self* p) : parent(*p) {} // check which of the surfaces is closer to the envelope on the points above // the curve cv (i.e. lower if computing the lower envelope, or upper if // computing the upper envelope) // precondition: the surfaces are defined above cv - // the choise between s1 and s2 for the envelope is the same + // the choice between s1 and s2 for the envelope is the same // for every point in the infinitesimal region above cv // the surfaces are EQUAL over the curve cv Comparison_result operator()(const X_monotone_curve_2& cv, const Xy_monotone_surface_3& s1, const Xy_monotone_surface_3& s2) const - { - Comparison_result res = parent.compare_on_side(cv, s1, s2, false); - return res; - } + { return parent.compare_on_side(cv, s1, s2, false); } }; /*! Get a Compare_z_at_xy_above_3 functor object. */ Compare_z_at_xy_above_3 compare_z_at_xy_above_3_object() const - { - return Compare_z_at_xy_above_3(this); - } + { return Compare_z_at_xy_above_3(this); } - class Compare_z_at_xy_below_3 - { + class Compare_z_at_xy_below_3 { protected: - const Self & parent; + const Self& parent; public: - Compare_z_at_xy_below_3(const Self * p) : parent(*p) - {} + Compare_z_at_xy_below_3(const Self* p) : parent(*p) {} Comparison_result operator()(const X_monotone_curve_2& cv, @@ -889,46 +823,40 @@ class Env_sphere_traits_3 : public ConicTraits_2 /*! Get a Compare_z_at_xy_below_3 functor object. */ Compare_z_at_xy_below_3 compare_z_at_xy_below_3_object() const - { - return Compare_z_at_xy_below_3(this); - } + { return Compare_z_at_xy_below_3(this); } /***************************************************************************/ // public method needed for testing // checks if point is in the xy-range of surf - class Is_defined_over - { + class Is_defined_over { protected: - const Self & parent; + const Self& parent; public: - Is_defined_over(const Self * p) : parent(*p) - {} + Is_defined_over(const Self* p) : parent(*p) {} // checks if point is in the xy-range of surf - bool operator()(const Point_2& p, const Xy_monotone_surface_3& s) const - { + bool operator()(const Point_2& p, const Xy_monotone_surface_3& s) const { // project the surface on the plane Rat_point_2 proj_center = parent.project(s.center()); Rat_circle_2 boundary(proj_center, s.squared_radius()); - Nt_traits nt_traits; - Alg_kernel k; + const auto gt_2 = parent.geometry_traits_2(); + auto nt_traits = gt_2->nt_traits(); Alg_point_2 aproj_center(proj_center.x(), proj_center.y()); - Alg_circle_2 aboundary(aproj_center, nt_traits.convert(s.squared_radius())); + Alg_circle_2 aboundary(aproj_center, nt_traits->convert(s.squared_radius())); // check if the projected point is inside the projected boundary - return (!k.has_on_unbounded_side_2_object()(aboundary, p)); + auto alg_kernel = gt_2->alg_kernel(); + return (! alg_kernel->has_on_unbounded_side_2_object()(aboundary, p)); } }; /*! Get a Is_defined_over functor object. */ Is_defined_over is_defined_over_object() const - { - return Is_defined_over(this); - } + { return Is_defined_over(this); } /***************************************************************************/ @@ -1005,64 +933,52 @@ class Env_sphere_traits_3 : public ConicTraits_2 // and we solve the problem as for triangles Rat_point_3 p1 = s1.center(); Rat_point_3 p2 = s2.center(); - const Rational a1 = p1.x(), b1 = p1.y(), c1 = p1.z(), - a2 = p2.x(), b2 = p2.y(), c2 = p2.z(); + const Rational a1 = p1.x(); + const Rational b1 = p1.y(); + const Rational c1 = p1.z(); + const Rational a2 = p2.x(); + const Rational b2 = p2.y(); + const Rational c2 = p2.z(); Algebraic A1 = x0 - a1, B1 = y0 - b1, C1 = z0 - c1; Algebraic A2 = x0 - a2, B2 = y0 - b2, C2 = z0 - c2; - if (C1 != 0 && C2 != 0) - { + if (C1 != 0 && C2 != 0) { Sign sign1 = CGAL_NTS sign((A2*A3+B2*B3)/C2-(A1*A3+B1*B3)/C1); // to make sure the direction is correct, we take a second point on the // line: for vertical line we take (x0, y0+1) // otherwise we take (x0+1, y0+ m/n) Algebraic x1, y1; - if (n == 0) - { + if (n == 0) { x1 = x0; y1 = y0+1; } - else - { + else { x1 = x0+1; y1 = y0 + (m/n); } Sign sign2 = CGAL_NTS sign(-B3*x1+A3*y1-(-B3*x0+A3*y0)); // the answer negates according to the side of the line we ask of - Sign sign3 = (compare_on_right ? (CGAL_NTS sign(1)) : - (CGAL_NTS sign(-1))); + Sign sign3 = (compare_on_right ? (CGAL_NTS sign(1)) : (CGAL_NTS sign(-1))); return sign1 * sign2 * sign3; } - else if (C1 != 0 && C2 == 0) - { - // sphere 2 is on the envelope (both lower & upper) - return LARGER; - } - else if (C1 == 0 && C2 != 0) - - { - // sphere 1 is on the envelope (both lower & upper) - return SMALLER; - } - else - CGAL_error(); - + // sphere 2 is on the envelope (both lower & upper) + else if (C1 != 0 && C2 == 0) return LARGER; + // sphere 1 is on the envelope (both lower & upper) + else if (C1 == 0 && C2 != 0) return SMALLER; + else CGAL_error(); return EQUAL; } Rat_point_2 project(const Rat_point_3& p) const - { - return Rat_point_2(p.x(), p.y()); - } + { return Rat_point_2(p.x(), p.y()); } // compute the z coordinate of the surface s in point p on the envelope // (i.e. take lower point if lower envelope, upper otherwise) // precondition: s is defined at p Algebraic compute_envelope_z_in_point(const Point_2& p, - const Xy_monotone_surface_3& s) const - { + const Xy_monotone_surface_3& s) const { Algebraic res; // the point coordinates @@ -1079,57 +995,49 @@ class Env_sphere_traits_3 : public ConicTraits_2 // z^2 - 2cz + [(x1-a)^2 + (y1-b)^2 + c^2 - r^2] = 0 Algebraic x_diff = x1 - a, y_diff = y1 - b; // the coefficients are: - Algebraic A = 1, - B = -2*c, - C = x_diff*x_diff + y_diff*y_diff + c*c - sqr_r; + Algebraic A = 1; + Algebraic B = -2*c; + Algebraic C = x_diff*x_diff + y_diff*y_diff + c*c - sqr_r; Algebraic zs[2]; - Algebraic *zs_end; + Algebraic* zs_end; std::ptrdiff_t n_zs; - Nt_traits nt_traits; - zs_end = nt_traits.solve_quadratic_equation(A, B, C, zs); + auto nt_traits = m_geometry_traits_2->nt_traits(); + zs_end = nt_traits->solve_quadratic_equation(A, B, C, zs); n_zs = zs_end - zs; CGAL_precondition(n_zs > 0); - if (n_zs == 1) - // only one point is defined at p, this is the result - return zs[0]; + // only one point is defined at p, this is the result + if (n_zs == 1) return zs[0]; CGAL_assertion(n_zs == 2); Comparison_result comp = CGAL_NTS compare(zs[0], zs[1]); - if (m_is_lower) - res = ((comp == SMALLER) ? zs[0] : zs[1]); - else - res = ((comp == LARGER) ? zs[0] : zs[1]); - + if (m_is_lower) res = ((comp == SMALLER) ? zs[0] : zs[1]); + else res = ((comp == LARGER) ? zs[0] : zs[1]); return res; } // construct the point in the middle of cv - Point_2 construct_middle_point(const X_monotone_curve_2& cv) const - { + Point_2 construct_middle_point(const X_monotone_curve_2& cv) const { // get the x-value of the middle point - Alg_kernel k; - Alg_point_2 mid_x = k.construct_midpoint_2_object()(cv.source(), - cv.target()); - -// TODO_NEW_DESIGN - this is not implemented in X_monotone_curve_2, but maybe we want it there? -// if (cv.is_segment()) -// return mid_x; - if (cv.is_vertical()) - return Point_2(mid_x); - - return Point_2(cv.point_at_x(mid_x)); + auto alg_kernel = m_geometry_traits_2->alg_kernel(); + Alg_point_2 mid_x = + alg_kernel->construct_midpoint_2_object()(cv.source(), cv.target()); + + // TODO_NEW_DESIGN - this is not implemented in X_monotone_curve_2, but + // maybe we want it there? + // if (cv.is_segment()) return mid_x; + if (cv.is_vertical()) return Point_2(mid_x); + return Point_2(m_geometry_traits_2->point_at_x(cv, mid_x)); } // for the test - Point_2 construct_middle_point(const Point_2& p1, const Point_2& p2) const - { - Alg_kernel k; - return Point_2(k.construct_midpoint_2_object()(p1, p2)); + Point_2 construct_middle_point(const Point_2& p1, const Point_2& p2) const { + auto alg_kernel = m_geometry_traits_2->alg_kernel(); + return Point_2(alg_kernel->construct_midpoint_2_object()(p1, p2)); } // check if the equation @@ -1139,8 +1047,7 @@ class Env_sphere_traits_3 : public ConicTraits_2 template bool is_valid_conic_equation(const NT& r, const NT& s, const NT& t, const NT& u, const NT& v, const NT& w, - bool &is_point) const - { + bool& is_point) const { // initialize is_point to false, and will change it when we detect // that the equation represents a point is_point = false; @@ -1160,16 +1067,14 @@ class Env_sphere_traits_3 : public ConicTraits_2 // (the conic equation in this case represents hyperbola or 2 // intersecting lines) Sign sign_A = CGAL_NTS sign(t*t - 4*s*r); - if (sign_A == POSITIVE) - return true; + if (sign_A == POSITIVE) return true; // if A < 0 we have a sad parabula, so we should check if it crosses the // x-axis, i.e. if the equation f(x) = 0 has a real solution x. // this means that discriminant(f(x)) >= 0 // discriminant(f(x)) = B^2 - 4AC // = (2tv-4su)^2 - 4(t^2-4sr)(v^2-4sw) // = s(-tvu + su^2 + wt^2 + rv^2 - 4srw) - if (sign_A == NEGATIVE) - { + if (sign_A == NEGATIVE) { // (in this case the conic equation represents ellipse, circle, point // or no curve) Sign sign_s = CGAL_NTS sign(s); @@ -1178,9 +1083,7 @@ class Env_sphere_traits_3 : public ConicTraits_2 // solution for f(x), say x0. since we get f(x0)=0 and f(x)<0 forall // x!=x0, we have only one solution for (**). So the equation represents // a point with coordinates x0=-B/2A, y0=-(tx0 + v)/2s - if (sign_eq == ZERO) - is_point = true; - + if (sign_eq == ZERO) is_point = true; Sign sign_disc = CGAL_NTS sign(int(sign_s * sign_eq)); return (sign_disc != NEGATIVE); } @@ -1192,95 +1095,93 @@ class Env_sphere_traits_3 : public ConicTraits_2 // (in this case the conic equation represents parabola, 2 parallel lines, // 1 line or no curve) Sign sign_B = CGAL_NTS sign(s*(t*v - 4*u)); - if (sign_B != ZERO) - return true; + if (sign_B != ZERO) return true; Sign sign_C = CGAL_NTS sign(v*v - 4*s*w); - return (sign_C != NEGATIVE); } // for the test: - Point_2 vertical_ray_shoot_2(const Point_2& pt, - const X_monotone_curve_2& cv) const + Point_2 vertical_ray_shoot_2(const Point_2& pt, const X_monotone_curve_2& cv) + const { - if (cv.is_vertical()) - { - Alg_kernel k; - if (!k.less_y_2_object()(cv.left(), pt)) + if (cv.is_vertical()) { + auto alg_kernel = m_geometry_traits_2->alg_kernel(); + if (! alg_kernel->less_y_2_object()(cv.left(), pt)) return cv.left(); - else - { - CGAL_assertion(k.less_y_2_object()(cv.right(), pt)); + else { + CGAL_assertion(alg_kernel->less_y_2_object()(cv.right(), pt)); return cv.right(); } } - else - return cv.point_at_x(pt); + else return m_geometry_traits_2->point_at_x(cv, pt); } - template - OutputIterator add_curve_to_output(const Curve_2& c, OutputIterator oi) const - { - Object objs[2]; - Object* p_obj = this->make_x_monotone_2_object()(c, objs); - for(Object* o = objs; o != p_obj; ++o) - { - X_monotone_curve_2 cv; - if(assign(cv, *o)) - { - *oi++ = make_object(Intersection_curve(cv, 1)); - } - else - { - Point_2 pt; - CGAL_assertion(assign(pt, *o)); - assign(pt, *o); - *oi++ = make_object(pt); + template + OutputIterator add_curve_to_output(const Curve_2& c, OutputIterator oi) const { + std::variant objs[2]; + + std::variant* p_obj = this->make_x_monotone_2_object()(c, objs); + for(std::variant* o = objs; o != p_obj; ++o) { + if(const X_monotone_curve_2* cv = std::get_if(o)) + *oi++ = Intersection_curve(*cv, 1); + else { + const Point_2* pt = std::get_if(o); + CGAL_assertion(pt!=nullptr); + *oi++ = *pt; } } return oi; } + typedef std::shared_ptr Shared_geometry_traits_2; + /*! Default constructor. */ - Env_sphere_traits_3() : m_is_lower(true) + Env_sphere_traits_3() : + m_is_lower(true), + m_geometry_traits_2(new Traits_2) {} + /*! Constructor from a conic 2D geometry traits. */ + Env_sphere_traits_3(Shared_geometry_traits_2 geometry_traits_2) : + m_is_lower(true), + m_geometry_traits_2(geometry_traits_2) + {} + + /*! Obtain the undelying conic 2D geometry traits. + */ + const Shared_geometry_traits_2 geometry_traits_2() const + { return m_geometry_traits_2; } + protected: mutable bool m_is_lower; + +private: + //! The conic geometry-traits. + const Shared_geometry_traits_2 m_geometry_traits_2; }; /*! * Compare two spheres: first compare their center points in an * xyz-lexicographic order, then by their radii. */ -template -bool operator< (const CGAL::Sphere_3 & a, - const CGAL::Sphere_3 & b) +template +bool operator<(const CGAL::Sphere_3& a, const CGAL::Sphere_3& b) { - Kernel k; + Kernel k; Comparison_result res = k.compare_xyz_3_object()(a.center(), b.center()); - - if (res == EQUAL) - { - res = CGAL::compare (a.squared_radius(), b.squared_radius()); - } - + if (res == EQUAL) res = CGAL::compare (a.squared_radius(), b.squared_radius()); return (res == SMALLER); } /*! * Compare two spheres for equality. */ -template +template bool operator== (const typename Kernel::Sphere_3& a, - const typename Kernel::Sphere_3& b) -{ - Kernel k; - - if (! k.equal_3_object() (a.center(), b.center())) - return (false); - + const typename Kernel::Sphere_3& b) { + Kernel k; + if (! k.equal_3_object() (a.center(), b.center())) return (false); return (CGAL::compare (a.squared_radius(), b.squared_radius()) == EQUAL); } diff --git a/thirdparty/CGAL/include/CGAL/Env_surface_data_traits_3.h b/thirdparty/CGAL/include/CGAL/Env_surface_data_traits_3.h index a814da6e..5daad877 100644 --- a/thirdparty/CGAL/include/CGAL/Env_surface_data_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Env_surface_data_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_3/include/CGAL/Env_surface_data_traits_3.h $ -// $Id: Env_surface_data_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_3/include/CGAL/Env_surface_data_traits_3.h $ +// $Id: include/CGAL/Env_surface_data_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -48,10 +48,10 @@ class Env_surface_data_traits_3 : public Traits_ typedef typename Base_traits_3::Xy_monotone_surface_3 Base_xy_monotone_surface_3; - // Representation of a surface with an addtional data field: + // Representation of a surface with an additional data field: typedef _Curve_data_ex Surface_3; - // Representation of an xy-monotone surface with an addtional data field: + // Representation of an xy-monotone surface with an additional data field: typedef _Curve_data_ex Xy_monotone_surface_3; @@ -70,7 +70,7 @@ class Env_surface_data_traits_3 : public Traits_ {} //@} - /// \name Overriden functors. + /// \name Overridden functors. //@{ class Make_xy_monotone_3 diff --git a/thirdparty/CGAL/include/CGAL/Env_tracing_traits_3.h b/thirdparty/CGAL/include/CGAL/Env_tracing_traits_3.h index 99a80ed9..b71c4919 100644 --- a/thirdparty/CGAL/include/CGAL/Env_tracing_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Env_tracing_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_3/include/CGAL/Env_tracing_traits_3.h $ -// $Id: Env_tracing_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_3/include/CGAL/Env_tracing_traits_3.h $ +// $Id: include/CGAL/Env_tracing_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -194,14 +194,15 @@ class Env_tracing_traits_3 : public Traits_ Base base; std::cerr << "Construct_projected_boundary_2: JUST FIRST" << std::endl; std::cerr << "Surface: " << s << std::endl; - std::list l; + // TODO UPDATE CONCEPT + CHANGES.md + std::list< std::variant, Point_2 > > l; base.construct_projected_boundary_2_object() (s, std::back_inserter(l)); if (l.size() > 0) { - std::pair i; - if (CGAL::assign(i, l.front())) - std::cerr << "First: " << i.first << std::endl; + if (const std::pair* i = + std::get_if>(&l.front())) + std::cerr << "First: " << i->first << std::endl; else std::cerr << "First intersection is a point" << std::endl; } @@ -232,15 +233,14 @@ class Env_tracing_traits_3 : public Traits_ << std::endl; std::cerr << "Surface1: " << s1 << std::endl; std::cerr << "Surface2: " << s2 << std::endl; - std::list l; + std::list< std::variant > l; base.construct_projected_intersections_2_object() (s1, s2, std::back_inserter(l)); if (l.size() > 0) { - Intersection_curve i; - if (CGAL::assign(i, l.front())) - std::cerr << "First: " << i.first << std::endl; + if (const Intersection_curve* i = std::get_if(&l.front())) + std::cerr << "First: " << i->first << std::endl; else std::cerr << "First intersection is not a point" << std::endl; } diff --git a/thirdparty/CGAL/include/CGAL/Env_triangle_traits_3.h b/thirdparty/CGAL/include/CGAL/Env_triangle_traits_3.h index c69dc804..ba3adb52 100644 --- a/thirdparty/CGAL/include/CGAL/Env_triangle_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Env_triangle_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_3/include/CGAL/Env_triangle_traits_3.h $ -// $Id: Env_triangle_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_3/include/CGAL/Env_triangle_traits_3.h $ +// $Id: include/CGAL/Env_triangle_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michal Meyerovitch @@ -20,8 +20,6 @@ #include - -#include #include #include #include @@ -259,7 +257,7 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 } /*! - * Check if the triangel is vertical. + * Check if the triangle is vertical. */ bool is_vertical() const { @@ -457,7 +455,7 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 // the points should not be collinear CGAL_assertion(s1 != 0); - // should also take care for the original and trasformed direction of + // should also take care for the original and transformed direction of // the segment Sign s2 = CGAL_NTS sign(w3 - w1); Sign s = CGAL_NTS sign(int(s1 * s2)); @@ -546,9 +544,9 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 s2 != ON_ORIENTED_BOUNDARY && s3 != ON_ORIENTED_BOUNDARY); - *o++ = make_object(std::make_pair(A, s1)); - *o++ = make_object(std::make_pair(B, s2)); - *o++ = make_object(std::make_pair(C, s3)); + *o++ = std::make_pair(A, s1); + *o++ = std::make_pair(B, s2); + *o++ = std::make_pair(C, s3); } else { @@ -561,8 +559,8 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 b2 = parent->project(a2); CGAL_assertion(b1 != b2); - *o++ = make_object(std::make_pair(X_monotone_curve_2(b1, b2), - ON_ORIENTED_BOUNDARY)); + *o++ = std::make_pair(X_monotone_curve_2(b1, b2), + ON_ORIENTED_BOUNDARY); } return o; } @@ -611,32 +609,30 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 return o; } - Object inter_obj = parent->intersection(s1,s2); - if (inter_obj.is_empty()) + std::optional> inter_obj + = parent->intersection(s1,s2); + if (inter_obj == std::nullopt) { return o; } - Point_3 point; - Segment_3 curve; - if (k.assign_3_object()(point, inter_obj)) - *o++ = make_object(parent->project(point)); + if (const Point_3* point = std::get_if(&(*inter_obj))) + *o++ = parent->project(*point); else { - CGAL_assertion_code(bool b = ) - k.assign_3_object()(curve, inter_obj); - CGAL_assertion(b); + const Segment_3* curve = std::get_if(&(*inter_obj)); + CGAL_assertion(curve != nullptr); - Segment_2 proj_seg = parent->project(curve); + Segment_2 proj_seg = parent->project(*curve); if (! k.is_degenerate_2_object() (proj_seg)) { Intersection_curve inter_cv (proj_seg, 1); - *o++ = make_object(inter_cv); + *o++ = inter_cv; } else { const Point_2& p = k.construct_point_on_2_object() (proj_seg, 0); - *o++ = make_object(p); + *o++ = p; } } @@ -756,7 +752,7 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 // upper envelope) // precondition: the surfaces are defined above cv (to the left of cv, // if cv is directed from min point to max point) - // the choise between surf1 and surf2 for the envelope is + // the choice between surf1 and surf2 for the envelope is // the same for every point in the infinitesimal region // above cv // the surfaces are EQUAL over the curve cv @@ -1019,7 +1015,7 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 return b; } - // check whethe two xy-monotone surfaces (3D-triangles or segments) + // check whether two xy-monotone surfaces (3D-triangles or segments) // intersect bool do_intersect(const Xy_monotone_surface_3& s1, const Xy_monotone_surface_3& s2) const @@ -1044,8 +1040,9 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 // intersect two xy-monotone surfaces (3D-triangles or segments) // if the triangles overlap, the result is empty // the result can be a segment or a point - Object intersection(const Xy_monotone_surface_3& s1, - const Xy_monotone_surface_3& s2) const + std::optional< std::variant> + intersection(const Xy_monotone_surface_3& s1, + const Xy_monotone_surface_3& s2) const { CGAL_precondition(s1.is_xy_monotone()); CGAL_precondition(s2.is_xy_monotone()); @@ -1054,14 +1051,13 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 // first, try to intersect the bounding boxes of the triangles, // efficiently return empty object when the triangles are faraway if (!CGAL::do_overlap(s1.bbox(), s2.bbox())) - return Object(); + return std::nullopt; // if intersecting two segment - alculate the intersection - // as in the case of dimention 2 + // as in the case of dimension 2 if (s1.is_segment() && s2.is_segment()) { - Object res = intersection_of_segments(s1, s2); - return res; + return intersection_of_segments(s1, s2); } // if both triangles lie on the same (non-vertical) plane, they overlap @@ -1070,96 +1066,92 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 Plane_3 p1 = s1.plane(); Plane_3 p2 = s2.plane(); if (p1 == p2 || p1 == p2.opposite()) - return Object(); + return std::nullopt; // calculate intersection between a triangle and the other triangle's // supporting plane // if there is no intersection - then the triangles have no intersection // between them. - Object inter_obj = intersection(p1, s2); + auto inter_obj = intersection(p1, s2); - if (inter_obj.is_empty()) - return Object(); + if (inter_obj == std::nullopt) + return std::nullopt; // otherwise, if the intersection in a point, we should check if it lies // inside the first triangle - Assign_3 assign_obj = k.assign_3_object(); - Point_3 inter_point; - if (assign_obj(inter_point, inter_obj)) + if (const Point_3* inter_point = std::get_if(&(*inter_obj))) { - Object res = intersection_on_plane_3(p1, s1, inter_point); - return res; + std::optional res = intersection_on_plane_3(p1, s1, *inter_point); + if (res != std::nullopt) + return res.value(); } else { // if the intersection is a segment, we check the intersection of the // other plane-triangle pair - Segment_3 inter_seg; - CGAL_assertion(assign_obj(inter_seg, inter_obj)); - assign_obj(inter_seg, inter_obj); + const Segment_3* inter_seg = std::get_if(&(*inter_obj)); + CGAL_assertion(inter_seg != nullptr); - inter_obj = intersection(p2, s1); + auto inter_obj2 = intersection(p2, s1); // if there is no intersection - then the triangles have no intersection // between them. - if (inter_obj.is_empty()) - return Object(); + if (inter_obj2 == std::nullopt) + return std::nullopt; - if (assign_obj(inter_point, inter_obj)) + if (const Point_3* inter_point = std::get_if(&(*inter_obj2))) { - // if the intersection is a point, which lies on the segment, - // than it is the result, - // otherwise, empty result - if (k.has_on_3_object()(inter_seg, inter_point)) - return make_object(inter_point); - else - return Object(); + // if the intersection is a point, which lies on the segment, + // than it is the result, + // otherwise, empty result + if (k.has_on_3_object()(*inter_seg, *inter_point)) + return *inter_point; + else + return std::nullopt; } else { - // both plane-triangle intersections are segments, which are collinear, - // and lie on the line which is the intersection of the two supporting - // planes - Segment_3 inter_seg2; - CGAL_assertion(assign_obj(inter_seg2, inter_obj)); - assign_obj(inter_seg2, inter_obj); - - Point_3 min1 = k.construct_min_vertex_3_object()(inter_seg), - max1 = k.construct_max_vertex_3_object()(inter_seg); - Point_3 min2 = k.construct_min_vertex_3_object()(inter_seg2), - max2 = k.construct_max_vertex_3_object()(inter_seg2); - - CGAL_assertion((k.collinear_3_object()(min1, min2, max1) && + // both plane-triangle intersections are segments, which are collinear, + // and lie on the line which is the intersection of the two supporting + // planes + const Segment_3* inter_seg2 = std::get_if(&(*inter_obj)); + CGAL_assertion(inter_seg2 != nullptr); + + Point_3 min1 = k.construct_min_vertex_3_object()(*inter_seg), + max1 = k.construct_max_vertex_3_object()(*inter_seg); + Point_3 min2 = k.construct_min_vertex_3_object()(*inter_seg2), + max2 = k.construct_max_vertex_3_object()(*inter_seg2); + + CGAL_assertion((k.collinear_3_object()(min1, min2, max1) && k.collinear_3_object()(min1, max2, max1))); - // we need to find the overlapping part, if exists - Point_3 min, max; - if (k.less_xyz_3_object()(min1, min2)) - min = min2; - else - min = min1; - if (k.less_xyz_3_object()(max1, max2)) - max = max1; - else - max = max2; - - Object res; - Comparison_result comp_res = k.compare_xyz_3_object()(min, max); - if (comp_res == EQUAL) - res = make_object(min); - else if (comp_res == SMALLER) - res = make_object(Segment_3(min, max)); - // else - empty result - - return res; + // we need to find the overlapping part, if exists + Point_3 min, max; + if (k.less_xyz_3_object()(min1, min2)) + min = min2; + else + min = min1; + if (k.less_xyz_3_object()(max1, max2)) + max = max1; + else + max = max2; + + Comparison_result comp_res = k.compare_xyz_3_object()(min, max); + if (comp_res == EQUAL) + return min; + else if (comp_res == SMALLER) + return Segment_3(min, max); + // else - empty result } } + return std::nullopt; } // calculate intersection between triangle & point on the same plane plane - Object intersection_on_plane_3(const Plane_3& plane, - const Xy_monotone_surface_3& triangle, - const Point_3& point) const + std::optional + intersection_on_plane_3(const Plane_3& plane, + const Xy_monotone_surface_3& triangle, + const Point_3& point) const { Kernel k; CGAL_precondition( triangle.is_xy_monotone() ); @@ -1177,14 +1169,15 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 else has_on = k.has_on_3_object()(static_cast(triangle), point); if (has_on) - return make_object(point); + return point; else - return Object(); + return std::nullopt; } // calculate intersection between 2 segments on the same vertical plane plane - Object intersection_of_segments(const Xy_monotone_surface_3& s1, - const Xy_monotone_surface_3& s2) const + std::optional< std::variant> + intersection_of_segments(const Xy_monotone_surface_3& s1, + const Xy_monotone_surface_3& s2) const { Kernel k; CGAL_precondition( s1.is_xy_monotone() && s1.is_segment()); @@ -1193,14 +1186,14 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 // if the segments are not coplanar, they cannot intersect if (!k.coplanar_3_object()(s1.vertex(0), s1.vertex(1), s2.vertex(0), s2.vertex(1))) - return Object(); + return std::nullopt; const Plane_3& plane = s1.plane(); if (s2.plane() != plane && s2.plane() != plane.opposite()) // todo: this case is not needed in the algorithm, // so we don't implement it - return Object(); + return std::nullopt; CGAL_precondition( !k.is_degenerate_3_object()(plane) ); CGAL_precondition( s2.plane() == plane || @@ -1212,30 +1205,24 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 v2 = plane.to_2d(s1.vertex(1)); Segment_2 seg1_t(v1, v2); - Point_2 u1 = plane.to_2d(s2.vertex(0)), + Point_2 u1 = plane.to_2d(s2.vertex(0)), u2 = plane.to_2d(s2.vertex(1)); - Segment_2 seg2_t(u1, u2); + Segment_2 seg2_t(u1, u2); - Object inter_obj = k.intersect_2_object()(seg1_t, seg2_t); - Assign_2 assign_2 = k.assign_2_object(); - if (inter_obj.is_empty()) - return inter_obj; + auto inter_obj = k.intersect_2_object()(seg1_t, seg2_t); + if (inter_obj == std::nullopt) + return std::nullopt; - Point_2 inter_point; - Segment_2 inter_segment; - - if (assign_2(inter_point, inter_obj)) - return make_object(plane.to_3d(inter_point)); + if (const Point_2* inter_point = std::get_if(&(*inter_obj))) + return plane.to_3d(*inter_point); else { - CGAL_assertion_code(bool b = ) - assign_2(inter_segment, inter_obj); - CGAL_assertion(b); - - return make_object - (Segment_3 - (plane.to_3d(k.construct_vertex_2_object()(inter_segment, 0)), - plane.to_3d(k.construct_vertex_2_object()(inter_segment, 1)))); + const Segment_2* inter_segment = std::get_if(&(*inter_obj)); + CGAL_assertion(inter_segment!=nullptr); + + return Segment_3 + (plane.to_3d(k.construct_vertex_2_object()(*inter_segment, 0)), + plane.to_3d(k.construct_vertex_2_object()(*inter_segment, 1))); } } @@ -1244,8 +1231,9 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 // and a (non degenerate) plane in 3d // the result object can be empty, a point, a segment or the original // triangle - Object intersection(const Plane_3& pl, - const Xy_monotone_surface_3& tri) const + std::optional> + intersection(const Plane_3& pl, + const Xy_monotone_surface_3& tri) const { Kernel k; CGAL_precondition( tri.is_xy_monotone() ); @@ -1278,24 +1266,23 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 points_on_plane[n_points_on_plane++] = i; } - CGAL_assertion(n_points_on_plane + - n_points_on_positive + n_points_on_negative == 3); + CGAL_assertion(n_points_on_plane + n_points_on_positive + n_points_on_negative == 3); // if all vertices of tri lie on the same size (positive/negative) of pl, // there is no intersection if (n_points_on_positive == 3 || n_points_on_negative == 3) - return Object(); + return std::nullopt; // if all vertices of tri lie on pl then we return tri if (n_points_on_plane == 3) - return make_object(tri); + return tri; // if 2 vertices lie on pl, then return the segment between them if (n_points_on_plane == 2) { int point_idx1 = points_on_plane[0], point_idx2 = points_on_plane[1]; - return make_object (Segment_3(tri.vertex(point_idx1), - tri.vertex(point_idx2))); + return Segment_3(tri.vertex(point_idx1), + tri.vertex(point_idx2)); } // if only 1 lie on pl, should check the segment opposite to it on tri @@ -1306,7 +1293,7 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 // if the other 2 vertices are on the same side of pl, // then the answer is just this vertex if (n_points_on_negative == 2 || n_points_on_positive == 2) - return make_object(tri.vertex(point_on_plane_idx)); + return tri.vertex(point_on_plane_idx); // now it is known that one vertex is on pl, and the segment of tri // opposite to it should intersect pl @@ -1315,15 +1302,14 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 Segment_3 tri_segment(tri.vertex(point_on_plane_idx+1), tri.vertex(point_on_plane_idx+2)); - Object inter_result = k.intersect_3_object()(pl, tri_segment); - Point_3 inter_point; - CGAL_assertion( k.assign_3_object()(inter_point, inter_result) ); - k.assign_3_object()(inter_point, inter_result); + auto inter_result = k.intersect_3_object()(pl, tri_segment); + const Point_3* inter_point = std::get_if(&(*inter_result)); + CGAL_assertion( inter_point != nullptr ); // create the resulting segment // (between tri[point_on_plane_idx] and inter_point) - return make_object(Segment_3(tri.vertex(point_on_plane_idx), - inter_point)); + return Segment_3(tri.vertex(point_on_plane_idx), + *inter_point); } @@ -1341,16 +1327,14 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 { Segment_3 seg(tri.vertex(points_on_positive[pos_it]), tri.vertex(points_on_negative[neg_it])); - Object inter_result = k.intersect_3_object()(pl, seg); - Point_3 inter_point; - // the result of the intersection must be a point - CGAL_assertion( k.assign_3_object()(inter_point, inter_result) ); - k.assign_3_object()(inter_point, inter_result); - inter_points[n_inter_points++] = inter_point; + auto inter_result = k.intersect_3_object()(pl, seg); + const Point_3* inter_point = std::get_if(&(*inter_result)); + CGAL_assertion( inter_point != nullptr ); + inter_points[n_inter_points++] = *inter_point; } CGAL_assertion( n_inter_points == 2 ); - return make_object(Segment_3(inter_points[0], inter_points[1])); + return Segment_3(inter_points[0], inter_points[1]); } // compare the value of s1 in p1 to the value of s2 in p2 @@ -1394,13 +1378,12 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 Line_3 vl = k.construct_line_3_object() (point, dir); const Plane_3& plane = s.plane(); - Object res = k.intersect_3_object()(plane, vl); - CGAL_assertion(!res.is_empty()); - Point_3 ip; - CGAL_assertion(k.assign_3_object()(ip, res)); - k.assign_3_object()(ip, res); + auto res = k.intersect_3_object()(plane, vl); + CGAL_assertion(res != std::nullopt); + const Point_3* ip = std::get_if(&(*res)); + CGAL_assertion(ip != nullptr); - return ip; + return *ip; } } @@ -1438,12 +1421,10 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 Line_2 l(tvl_point1, tvl_point2); Segment_2 seg(t1, t2); - Object inter_obj = k.intersect_2_object()(seg, l); - Point_2 inter_point; - CGAL_assertion_code(bool is_inter_point =) - k.assign_2_object()(inter_point, inter_obj); - CGAL_assertion(is_inter_point); - return plane.to_3d(inter_point); + auto inter_obj = k.intersect_2_object()(seg, l); + const Point_2* inter_point = std::get_if(&(*inter_obj)); + CGAL_assertion(inter_point != nullptr); + return plane.to_3d(*inter_point); } Point_2 construct_middle_point(const Point_2& p1, const Point_2& p2) const @@ -1495,14 +1476,11 @@ class Env_triangle_traits_3 : public Arr_segment_traits_2 typename Kernel::Line_2 vl = k.construct_line_2_object() (pt, dir); // Compute the intersetion between the vertical line and the given curve. - Object res = k.intersect_2_object()(seg, vl); - Point_2 ip; - bool ray_shoot_successful = k.assign_2_object()(ip, res); - - if (! ray_shoot_successful) - CGAL_assertion (ray_shoot_successful); + auto res = k.intersect_2_object()(seg, vl); + const Point_2* ip = std::get_if(&(*res)); + CGAL_assertion (ip != nullptr); - return (ip); + return *ip; } }; diff --git a/thirdparty/CGAL/include/CGAL/Envelope_2/Env_divide_and_conquer_2.h b/thirdparty/CGAL/include/CGAL/Envelope_2/Env_divide_and_conquer_2.h index 4be52667..8d4afb76 100644 --- a/thirdparty/CGAL/include/CGAL/Envelope_2/Env_divide_and_conquer_2.h +++ b/thirdparty/CGAL/include/CGAL/Envelope_2/Env_divide_and_conquer_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2.h $ -// $Id: Env_divide_and_conquer_2.h 35fd91b 2020-08-20T16:03:29+02:00 Ahmed Essam +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2.h $ +// $Id: include/CGAL/Envelope_2/Env_divide_and_conquer_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein @@ -18,7 +18,7 @@ #include #include -#include +#include #include @@ -116,9 +116,7 @@ class Envelope_divide_and_conquer_2 { // Subdivide the curves into x-monotone subcurves. CurvesIterator it; - std::list objects; - std::list::iterator obj_it; - X_monotone_curve_2 xcv; + std::list> objects; std::list x_curves; for (it = begin; it != end; it++) @@ -127,10 +125,10 @@ class Envelope_divide_and_conquer_2 objects.clear(); traits->make_x_monotone_2_object()(*it, std::back_inserter(objects)); - for (obj_it = objects.begin(); obj_it != objects.end(); ++obj_it) + for (auto obj_it = objects.begin(); obj_it != objects.end(); ++obj_it) { - if(CGAL::assign (xcv, *obj_it)) - x_curves.push_back (xcv); + if(const X_monotone_curve_2* xcv_ptr = std::get_if(&(*obj_it))) + x_curves.push_back (*xcv_ptr); } } diff --git a/thirdparty/CGAL/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h b/thirdparty/CGAL/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h index 314a1d6b..8bc6a55a 100644 --- a/thirdparty/CGAL/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h $ -// $Id: Env_divide_and_conquer_2_impl.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h $ +// $Id: include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein @@ -19,7 +19,7 @@ * Definitions of the functions of the Envelope_divide_and_conquer_2 class. */ -#include +#include namespace CGAL { @@ -451,43 +451,33 @@ compare_y_at_end(const X_monotone_curve_2& xcv1, { CGAL_precondition(traits->is_in_x_range_2_object()(xcv1, xcv2)); - typedef typename Traits_adaptor_2::Compare_xy_2 Compare_xy_2; - typedef typename Traits::Compare_y_at_x_2 Compare_y_at_x_2; - typedef typename Traits::Construct_min_vertex_2 Construct_min_vertex_2; - typedef typename Traits::Construct_max_vertex_2 Construct_max_vertex_2; - - Compare_y_at_x_2 compare_y_at_x = traits->compare_y_at_x_2_object(); - Construct_min_vertex_2 min_vertex = - traits->construct_min_vertex_2_object(); - Construct_max_vertex_2 max_vertex = - traits->construct_max_vertex_2_object(); + const auto compare_y_at_x = traits->compare_y_at_x_2_object(); + const auto min_vertex = traits->construct_min_vertex_2_object(); + const auto max_vertex = traits->construct_max_vertex_2_object(); + const auto parm_space_in_x = traits->parameter_space_in_x_2_object(); // First check whether any of the curves is defined at x boundary. - const Arr_parameter_space ps_x1 = - traits->parameter_space_in_x_2_object()(xcv1, curve_end); - const Arr_parameter_space ps_x2 = - traits->parameter_space_in_x_2_object()(xcv2, curve_end); - Comparison_result res; + const Arr_parameter_space ps_x1 = parm_space_in_x(xcv1, curve_end); + const Arr_parameter_space ps_x2 = parm_space_in_x(xcv2, curve_end); if (ps_x1 != ARR_INTERIOR) { if (ps_x2 != ARR_INTERIOR) { + const auto cmp_y_near_boundary = + traits->compare_y_near_boundary_2_object(); // Compare the relative position of the curves at x boundary. - return (traits->compare_y_near_boundary_2_object()(xcv1, xcv2, - curve_end)); + return cmp_y_near_boundary(xcv1, xcv2, curve_end); } // Check if the left end of xcv2 lies at y boundary. - const Arr_parameter_space ps_y2 = - traits->parameter_space_in_y_2_object()(xcv2, curve_end); + const auto parm_space_in_y = traits->parameter_space_in_y_2_object(); + const Arr_parameter_space ps_y2 = parm_space_in_y(xcv2, curve_end); - if (ps_y2 == ARR_BOTTOM_BOUNDARY) - return (LARGER); // xcv2 is obviously below xcv1. - else if (ps_y2 == ARR_TOP_BOUNDARY) - return (SMALLER); // xcv2 is obviously above xcv1. + if (ps_y2 == ARR_BOTTOM_BOUNDARY) return LARGER; + else if (ps_y2 == ARR_TOP_BOUNDARY) return SMALLER; // Compare the position of the left end of xcv2 (which is a normal // point) to xcv1. - res = (curve_end == ARR_MIN_END) ? + Comparison_result res = (curve_end == ARR_MIN_END) ? compare_y_at_x(min_vertex(xcv2), xcv1) : compare_y_at_x(max_vertex(xcv2), xcv1); @@ -496,50 +486,45 @@ compare_y_at_end(const X_monotone_curve_2& xcv1, } else if (ps_x2 != ARR_INTERIOR) { // Check if the left end of xcv1 lies at y boundary. - const Arr_parameter_space ps_y1 = traits->parameter_space_in_y_2_object() - (xcv1, curve_end); + const auto parm_space_in_y = traits->parameter_space_in_y_2_object(); + const Arr_parameter_space ps_y1 = parm_space_in_y(xcv1, curve_end); - if (ps_y1 == ARR_BOTTOM_BOUNDARY) - return (SMALLER); // xcv1 is obviously below xcv2. - else if (ps_y1 == ARR_TOP_BOUNDARY) - return (LARGER); // xcv1 is obviously above xcv2. + if (ps_y1 == ARR_BOTTOM_BOUNDARY) return SMALLER; + else if (ps_y1 == ARR_TOP_BOUNDARY) return LARGER; // Compare the position of the left end of xcv1 (which is a normal // point) to xcv2. - res = (curve_end == ARR_MIN_END) ? + Comparison_result res = (curve_end == ARR_MIN_END) ? compare_y_at_x(min_vertex(xcv1), xcv2) : compare_y_at_x(max_vertex(xcv1), xcv2); - return (res); + return res; } // Check if the left curve end lies at y = +/- oo. - const Arr_parameter_space ps_y1 = - traits->parameter_space_in_y_2_object()(xcv1, curve_end); - const Arr_parameter_space ps_y2 = - traits->parameter_space_in_y_2_object()(xcv2, curve_end); - Comparison_result l_res; + const auto parm_space_in_y = traits->parameter_space_in_y_2_object(); + const Arr_parameter_space ps_y1 = parm_space_in_y(xcv1, curve_end); + const Arr_parameter_space ps_y2 = parm_space_in_y(xcv2, curve_end); if (ps_y1 != ARR_INTERIOR) { if (ps_y2 != ARR_INTERIOR) { - // The curve ends have boundary conditions with oposite signs in y, + // The curve ends have boundary conditions with opposite signs in y, // we readily know their relative position (recall that they do not // instersect). if ((ps_y1 == ARR_BOTTOM_BOUNDARY) && (ps_y2 == ARR_TOP_BOUNDARY)) - return (SMALLER); + return SMALLER; else if ((ps_y1 == ARR_TOP_BOUNDARY) && (ps_y2 == ARR_BOTTOM_BOUNDARY)) - return (LARGER); + return LARGER; // Both curves have vertical asymptotes with the same sign in y. // Check which asymptote is the rightmost. Note that in this case // the vertical asymptotes cannot be equal. - l_res = traits->compare_x_curve_ends_2_object()(xcv1, curve_end, - xcv2, curve_end); + const auto cmp_x_curve_ends = traits->compare_x_curve_ends_2_object(); + Comparison_result l_res = + cmp_x_curve_ends(xcv1, curve_end, xcv2, curve_end); CGAL_assertion(l_res != EQUAL); - if (ps_y1 == ARR_TOP_BOUNDARY) - return (l_res); - else - return CGAL::opposite(l_res); + if (ps_y1 == ARR_TOP_BOUNDARY) return l_res; + else return CGAL::opposite(l_res); } // xcv1 has a vertical asymptote and xcv2 has a normal left endpoint. @@ -547,12 +532,13 @@ compare_y_at_end(const X_monotone_curve_2& xcv1, const Point_2& left2 = (curve_end == ARR_MIN_END) ? min_vertex(xcv2) : max_vertex(xcv2); - l_res = - traits->compare_x_point_curve_end_2_object()(left2, xcv1, curve_end); + const auto cmp_x_point_curve_end = + traits->compare_x_point_curve_end_2_object(); + Comparison_result l_res = cmp_x_point_curve_end(left2, xcv1, curve_end); if (l_res == LARGER) { // left2 lies in the x-range of xcv1, so it is safe to compare: - res = compare_y_at_x(left2, xcv1); + Comparison_result res = compare_y_at_x(left2, xcv1); return CGAL::opposite(res); } else @@ -562,11 +548,12 @@ compare_y_at_end(const X_monotone_curve_2& xcv1, else if (ps_y2 != ARR_INTERIOR) { // xcv2 has a vertical asymptote and xcv1 has a normal left endpoint. // Compare the x-positions of this endpoint and the asymptote. - const Point_2& left1 = + const Point_2& left1 = (curve_end == ARR_MIN_END) ? min_vertex(xcv1) : max_vertex(xcv1); - l_res = - traits->compare_x_point_curve_end_2_object()(left1, xcv2, curve_end); + const auto cmp_x_point_curve_end = + traits->compare_x_point_curve_end_2_object(); + Comparison_result l_res = cmp_x_point_curve_end(left1, xcv2, curve_end); return ((l_res == LARGER) ? // left1 lies in the x-range of xcv2, so it is safe to compare: @@ -575,22 +562,22 @@ compare_y_at_end(const X_monotone_curve_2& xcv1, } // In this case we compare two normal points. - Compare_xy_2 compare_xy = traits->compare_xy_2_object(); + const auto compare_xy = traits->compare_xy_2_object(); // Get the left endpoints of xcv1 and xcv2. - const Point_2& left1 = + const Point_2& left1 = (curve_end == ARR_MIN_END) ? min_vertex(xcv1) : max_vertex(xcv1); - const Point_2& left2 = + const Point_2& left2 = (curve_end == ARR_MIN_END) ? min_vertex(xcv2) : max_vertex(xcv2); // Locate the rightmost point of left1 and left2 and compare its position // to the other curve. - l_res = compare_xy(left1, left2); + Comparison_result l_res = compare_xy(left1, left2); return ((l_res != SMALLER) ? - // left1 is in the x-range of xcv2: + // left1 is in the x-range of xcv2: compare_y_at_x(left1, xcv2) : - // left2 is in the x-range of xcv1: + // left2 is in the x-range of xcv1: CGAL::opposite(compare_y_at_x(left2, xcv1))); } /*@}*/ @@ -622,9 +609,7 @@ _merge_two_intervals(Edge_const_handle e1, bool is_leftmost1, // This is the rightmost vertex in the current minimization diagram (out_d). // The intersection points/curves that interest us are the ones in // [v_leftmost, v]. - // Without using make_optional we get a "maybe uninitialized" warning with gcc -Wall - boost::optional v_leftmost = - boost::make_optional(false, Vertex_const_handle()); + std::optional v_leftmost; if (is_leftmost1 == true) { if (is_leftmost2 == false) @@ -645,9 +630,7 @@ _merge_two_intervals(Edge_const_handle e1, bool is_leftmost1, // Find the next intersection of the envelopes to the right of the current // rightmost point in the merged diagram. - // \todo Use the faster object_cast. - std::list objects; - CGAL::Object obj; + std::list> objects; const X_monotone_curve_2* intersection_curve; const Intersection_point* intersection_point; @@ -656,10 +639,10 @@ _merge_two_intervals(Edge_const_handle e1, bool is_leftmost1, while (! objects.empty()) { // Pop the xy-lexicographically smallest intersection object. - obj = objects.front(); + auto obj = objects.front(); objects.pop_front(); - if ((intersection_point = CGAL::object_cast(&obj)) != + if ((intersection_point = std::get_if(&obj)) != nullptr) { // We have a simple intersection point. @@ -691,7 +674,7 @@ _merge_two_intervals(Edge_const_handle e1, bool is_leftmost1, break; } - // Create a new vertex in the output diagram that corrsponds to the + // Create a new vertex in the output diagram that corresponds to the // current intersection point. if (is_in_x_range) { CGAL_assertion(current_res != EQUAL); @@ -740,7 +723,7 @@ _merge_two_intervals(Edge_const_handle e1, bool is_leftmost1, else { // We have an x-monotone curve representing an overlap of the two // curves. - intersection_curve = CGAL::object_cast(&obj); + intersection_curve = std::get_if(&obj); if (intersection_curve == nullptr) CGAL_error_msg("unrecognized intersection object."); @@ -916,7 +899,7 @@ _merge_two_intervals(Edge_const_handle e1, bool is_leftmost1, // origin_of_v could be EQUAL but the curves do not intersect. // This is because of the fact that v could be the endpoint of the NEXT - // curve (which is lower than the currrent curve. The second diagram, however, + // curve (which is lower than the current curve. The second diagram, however, // has a curve that ends at v. // For example: // First diagram is the segment: [(0, -1), (1, 0)] diff --git a/thirdparty/CGAL/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h b/thirdparty/CGAL/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h index 941826bc..67b34c4c 100644 --- a/thirdparty/CGAL/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h +++ b/thirdparty/CGAL/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_3/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h $ -// $Id: Env_plane_traits_3_functions.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_3/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h $ +// $Id: include/CGAL/Envelope_3/Env_plane_traits_3_functions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman @@ -16,65 +16,62 @@ #include -#include #include namespace CGAL { template -Object plane_half_plane_proj_intersection(const typename K::Plane_3 &h1, - const typename K::Plane_3 &h2, - const typename K::Line_2 &l, - const K& k) +std::optional< std::variant > +plane_half_plane_proj_intersection(const typename K::Plane_3 &h1, + const typename K::Plane_3 &h2, + const typename K::Line_2 &l, + const K& k) { typedef typename K::Line_3 Line_3; typedef typename K::Line_2 Line_2; typedef typename K::Plane_3 Plane_3; // intersect the two planes - Object h_obj = k.intersect_3_object()(h1, h2); - if(h_obj.is_empty()) - return Object(); // no intersection at all (paralles planes) + auto h_obj = k.intersect_3_object()(h1, h2); + if(h_obj == std::nullopt) + return std::nullopt; // no intersection at all (parallel planes) Plane_3 p; - if(assign(p, h_obj)) - return Object(); + if(std::get_if(&(*h_obj))==nullptr) + return std::nullopt; // if two planes are not parallel they must intersect at a 3D line - Line_3 l3; - CGAL_assertion_code(bool b =) - assign(l3, h_obj); - CGAL_assertion(b); + const Line_3* l3 = std::get_if(&(*h_obj)); + CGAL_assertion(l3!=nullptr); - const Line_2& proj_inter_line = project_xy(l3, k); + const Line_2& proj_inter_line = project_xy(*l3, k); - return line_under_linear_constraint(proj_inter_line, l, k); + return line_under_linear_constraint(proj_inter_line, l, k); //LR } template -Object half_plane_half_plane_proj_intersection(const typename K::Plane_3 &h1, - const typename K::Line_2 &l1, - const typename K::Plane_3 &h2, - const typename K::Line_2 &l2, - const K& k) +std::optional< std::variant > +half_plane_half_plane_proj_intersection(const typename K::Plane_3 &h1, + const typename K::Line_2 &l1, + const typename K::Plane_3 &h2, + const typename K::Line_2 &l2, + const K& k) { typedef typename K::Ray_2 Ray_2; typedef typename K::Line_2 Line_2; - Object obj = plane_half_plane_proj_intersection(h1, h2, l2, k); - if(obj.is_empty()) - return Object(); + auto obj = plane_half_plane_proj_intersection(h1, h2, l2, k); + if(obj == std::nullopt) + return std::nullopt; - Line_2 l; - if(assign(l, obj)) - return line_under_linear_constraint(l, l1, k); + if(const Line_2* line = std::get_if(&(*obj))) + return line_under_linear_constraint(*line, l1, k); - Ray_2 ray; - if(assign(ray, obj)) - return ray_under_linear_constraint(ray, l1, k); + if(const Ray_2* ray = std::get_if(&(*obj))) + return ray_under_linear_constraint(*ray, l1, k); - CGAL_error(); // doesnt suppose to reach here - return Object(); + CGAL_error(); // doesn't suppose to reach here + return std::nullopt; } template @@ -97,96 +94,91 @@ typename K::Line_2 project_xy(const typename K::Line_3& l, // l1 is a line, l2 is a linear constraint (determined by the direction // of the line). template -Object line_under_linear_constraint(const typename K::Line_2& l1, - const typename K::Line_2& l2, - const K& k) +std::optional< std::variant > +line_under_linear_constraint(const typename K::Line_2& l1, + const typename K::Line_2& l2, + const K& k) { typedef typename K::Ray_2 Ray_2; - typedef typename K::Line_2 Line_2; typedef typename K::Vector_2 Vector_2; typedef typename K::Point_2 Point_2; - Object obj = k.intersect_2_object()(l1, l2); - Point_2 p; - if(assign(p, obj)) + auto obj = k.intersect_2_object()(l1, l2); + + if(obj == std::nullopt)// the two lines are parallel { - const Vector_2& vec = k.construct_vector_2_object()(l1); - const Point_2& s = k.construct_translated_point_2_object()(p, vec); - const Ray_2& ray = k.construct_ray_2_object()(p, s); + const Point_2& s = k.construct_point_on_2_object()(l1, 0); Oriented_side side = k.oriented_side_2_object()(l2, s); + if(side == ON_NEGATIVE_SIDE) - { - return make_object(k.construct_opposite_ray_2_object()(ray)); - } + return std::nullopt; - CGAL_assertion(side == ON_POSITIVE_SIDE); //the two lines are not parallel - return make_object(ray); + CGAL_assertion(side == ON_POSITIVE_SIDE); // the two lines are parallel + return l1; } - if(obj.is_empty()) // the two lines are parallel + if(const Point_2* p = std::get_if(&(*obj))) { - const Point_2& s = k.construct_point_on_2_object()(l1, 0); + const Vector_2& vec = k.construct_vector_2_object()(l1); + const Point_2& s = k.construct_translated_point_2_object()(*p, vec); + const Ray_2& ray = k.construct_ray_2_object()(*p, s); Oriented_side side = k.oriented_side_2_object()(l2, s); - if(side == ON_NEGATIVE_SIDE) - return Object(); + { + return k.construct_opposite_ray_2_object()(ray); + } - CGAL_assertion(side == ON_POSITIVE_SIDE); // the two lines are parallel - return make_object(l1); + CGAL_assertion(side == ON_POSITIVE_SIDE); //the two lines are not parallel + return ray; } // the two lines overlap - CGAL_USE_TYPE(Line_2); - CGAL_assertion_code(Line_2 dummy;); - CGAL_assertion_code(bool b = assign(dummy, obj);); - CGAL_assertion(b); - - return make_object(l1); + return l1; } template -Object ray_under_linear_constraint(const typename K::Ray_2& ray, - const typename K::Line_2& l, - const K& k) +std::optional< std::variant > +ray_under_linear_constraint(const typename K::Ray_2& ray, + const typename K::Line_2& l, + const K& k) { typedef typename K::Vector_2 Vector_2; typedef typename K::Point_2 Point_2; const Point_2& s = k.construct_point_on_2_object()(ray, 0); Oriented_side side = k.oriented_side_2_object()(l, s); - Object obj = k.intersect_2_object()(ray, l); - if(obj.is_empty()) + auto obj = k.intersect_2_object()(ray, l); + if(obj == std::nullopt) { if(side == ON_NEGATIVE_SIDE) - return Object(); + return std::nullopt; CGAL_assertion(side == ON_POSITIVE_SIDE); - return make_object(ray); + return ray; } - Point_2 p; - if(assign(p, obj)) + if(const Point_2* p = std::get_if(&(*obj))) { if(side == ON_POSITIVE_SIDE) - return make_object(k.construct_segment_2_object()(s, p)); + return k.construct_segment_2_object()(s, *p); Vector_2 vec = k.construct_vector_2_object()(ray); if(side == ON_NEGATIVE_SIDE) - return make_object(k.construct_ray_2_object()(p, vec)); + return k.construct_ray_2_object()(*p, vec); CGAL_assertion(side == ON_ORIENTED_BOUNDARY); const Vector_2& vec_of_l = k.construct_vector_2_object()(l); Orientation orient = k.orientation_2_object()(vec_of_l, vec); if(orient == LEFT_TURN) - return make_object(ray); + return ray; CGAL_assertion(orient == RIGHT_TURN); - return make_object(s); + return s; } // the ray and the line overlap - return make_object(ray); + return ray; } diff --git a/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_base.h b/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_base.h index 6360f578..17d255ca 100644 --- a/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_base.h +++ b/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_3/include/CGAL/Envelope_3/Envelope_base.h $ -// $Id: Envelope_base.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_3/include/CGAL/Envelope_3/Envelope_base.h $ +// $Id: include/CGAL/Envelope_3/Envelope_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michal Meyerovitch diff --git a/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h b/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h index a5f9d374..ad7b5710 100644 --- a/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h +++ b/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_3/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h $ -// $Id: Envelope_diagram_on_surface_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_3/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h $ +// $Id: include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michal Meyerovitch @@ -129,14 +129,14 @@ class Envelope_diagram_2 : template class is_arrangement_2< Envelope_diagram_on_surface_2 -> : public boost::true_type +> : public std::true_type {}; // specialization template class is_arrangement_2< Envelope_diagram_2 -> : public boost::true_type +> : public std::true_type {}; diff --git a/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h b/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h index c92779f1..ff76f8b4 100644 --- a/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h +++ b/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h $ -// $Id: Envelope_divide_and_conquer_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h $ +// $Id: include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michal Meyerovitch @@ -27,7 +27,6 @@ #include #include -#include #include #include #include @@ -38,7 +37,7 @@ #ifdef CGAL_ENVELOPE_USE_BFS_FACE_ORDER #include #include -#include +#include #endif // this base divide & conquer algorithm splits the input into 2 groups, @@ -183,7 +182,7 @@ class Envelope_divide_and_conquer_3 } // compute the envelope of surfaces in 3D, using the default arbitrary - // dividor + // divider template void construct_lu_envelope(SurfaceIterator begin, SurfaceIterator end, Minimization_diagram_2& result) @@ -193,7 +192,7 @@ class Envelope_divide_and_conquer_3 } - // compute the envelope of surfaces in 3D using the given set dividor + // compute the envelope of surfaces in 3D using the given set divider template void construct_lu_envelope(SurfaceIterator begin, SurfaceIterator end, Minimization_diagram_2& result, @@ -219,7 +218,7 @@ class Envelope_divide_and_conquer_3 } // compute the envelope of xy-monotone surfaces in 3D, - // using the default arbitrary dividor + // using the default arbitrary divider template void construct_envelope_xy_monotone(SurfaceIterator begin, SurfaceIterator end, @@ -230,7 +229,7 @@ class Envelope_divide_and_conquer_3 } // compute the envelope of xy-monotone surfaces in 3D using the given - // set dividor + // set divider template void construct_envelope_xy_monotone(SurfaceIterator begin, SurfaceIterator end, @@ -307,9 +306,8 @@ class Envelope_divide_and_conquer_3 void deal_with_one_surface(Xy_monotone_surface_3& surf, Minimization_diagram_2& result) { - typedef std::list Boundary_list; typedef std::pair Boundary_xcurve; - typedef Boundary_list::iterator Boundary_iterator; + typedef std::list> Boundary_list; Boundary_list boundary; m_geom_traits-> @@ -325,17 +323,15 @@ class Envelope_divide_and_conquer_3 return; } - for (Boundary_iterator boundary_it = boundary.begin(); + for (auto boundary_it = boundary.begin(); boundary_it != boundary.end(); ++boundary_it) { - const Object& obj = *boundary_it; - Boundary_xcurve boundary_cv; - if (assign(boundary_cv, obj)) + if (const Boundary_xcurve* boundary_cv = std::get_if(&(*boundary_it))) { - Oriented_side side = boundary_cv.second; + Oriented_side side = boundary_cv->second; Halfedge_handle he = - insert_non_intersecting_curve(result, boundary_cv.first); + insert_non_intersecting_curve(result, boundary_cv->first); if (side == ON_ORIENTED_BOUNDARY) { @@ -366,7 +362,7 @@ class Envelope_divide_and_conquer_3 he->twin()->face()->set_no_data(); } - // init auxiliary data for f and its boundarys. + // init auxiliary data for f and its boundaries. for(Outer_ccb_iterator ocit = f->outer_ccbs_begin(); ocit != f->outer_ccbs_end(); ocit++){ Ccb_halfedge_circulator face_hec = *ocit; @@ -408,10 +404,9 @@ class Envelope_divide_and_conquer_3 else { // the xy-surface is an isolated point - Point_2 p; - CGAL_assertion(assign(p, obj)); - assign(p, obj); - insert_point(result, p); + const Point_2* p = std::get_if(&(*boundary_it)); + CGAL_assertion(p!=nullptr); + insert_point(result, *p); } } @@ -475,7 +470,7 @@ class Envelope_divide_and_conquer_3 { Halfedge_handle hh = ei; // there must be data from at least one map, because all the surfaces - // are continous + // are continuous if (!get_aux_is_set(hh, 0) || !get_aux_is_set(hh, 1)) continue; CGAL_assertion(get_aux_is_set(hh, 0)); @@ -604,7 +599,7 @@ class Envelope_divide_and_conquer_3 if (vh->is_decision_set()) continue; // there must be data from at least one map, because all the surfaces - // are continous + // are continuous CGAL_assertion(get_aux_is_set(vh, 0)); CGAL_assertion(get_aux_is_set(vh, 1)); CGAL_assertion(!aux_has_no_data(vh, 1) || !aux_has_no_data(vh, 0)); diff --git a/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_element_visitor_3.h b/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_element_visitor_3.h index b060e9c4..cbd7288f 100644 --- a/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_element_visitor_3.h +++ b/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_element_visitor_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h $ -// $Id: Envelope_element_visitor_3.h 0d66e19 2020-07-24T17:05:10+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h $ +// $Id: include/CGAL/Envelope_3/Envelope_element_visitor_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michal Meyerovitch @@ -131,7 +131,8 @@ class Envelope_element_visitor_3 Vertices_to_edges_map; typedef std::pair Intersection_curve; - typedef std::list Intersections_list; + typedef std::list> Intersections_list; // this is used in the resolve edge process typedef Triple Point_2_with_info; @@ -199,7 +200,8 @@ class Envelope_element_visitor_3 // find the projected intersections of the surfaces. if none - we have // a simple case: // need only resolve non-intersecting and return - std::list inter_objs; + std::list> inter_objs; + get_projected_intersections(surf1, surf2, std::back_inserter(inter_objs)); if (inter_objs.size() == 0) @@ -243,11 +245,6 @@ class Envelope_element_visitor_3 map_copied_to_orig_faces[copied_face] = face; - // insert the projected intersections into the temporary minimization diagram - Point_2 point; - Intersection_curve curve; - Object cur_obj; - // we use our zone visitor, which only inserts into the arrangement the // points and curves which are inside the copied face // it updates the result arrangement at the same time (action after action @@ -287,12 +284,10 @@ class Envelope_element_visitor_3 this); Md_point_location pl(copied_face_arr); - std::list::iterator inter_objs_it = inter_objs.begin(); - for (; inter_objs_it != inter_objs.end(); ++inter_objs_it) + for (auto inter_objs_it = inter_objs.begin(); + inter_objs_it != inter_objs.end(); ++inter_objs_it) { - cur_obj = *inter_objs_it; - CGAL_assertion(!cur_obj.is_empty()); - if (assign(point, cur_obj)) + if (const Point_2* point = std::get_if(&(*inter_objs_it))) { // intersection can be a point when the surfaces only touch each other. // we are only interested in the points that are inside the face or @@ -302,12 +297,12 @@ class Envelope_element_visitor_3 // should use observer for split_edge // if not in a sub-face of "face", shouldn't insert it // the above information is available in zone_visitor - insert_point(copied_face_arr, point, pl, zone_visitor); + insert_point(copied_face_arr, *point, pl, zone_visitor); } - else if (assign(curve, cur_obj)) + else if (const Intersection_curve* curve = std::get_if(&(*inter_objs_it))) { - zone_visitor.set_current_intersection_type(curve.second); - insert(copied_face_arr, curve.first, pl, zone_visitor); + zone_visitor.set_current_intersection_type(curve->second); + insert(copied_face_arr, curve->first, pl, zone_visitor); CGAL_assertion(copied_face_arr.is_valid()); CGAL_assertion(result.is_valid()); } @@ -485,7 +480,7 @@ class Envelope_element_visitor_3 const Xy_monotone_surface_3& surf2 = get_aux_surface(edge, 1); // find the projected intersections - std::list inter_objs; + std::list> inter_objs; get_projected_intersections(surf1, surf2, std::back_inserter(inter_objs)); if (inter_objs.size() == 0) @@ -511,7 +506,7 @@ class Envelope_element_visitor_3 // we should have a list of points where we should split the edge's curve // we then will sort the list, and split the curve - // we should pay a special attension for overlaps, since we can get special + // we should pay a special attention for overlaps, since we can get special // edges // we associate with every point 2 flags: @@ -522,52 +517,42 @@ class Envelope_element_visitor_3 bool is_min_end_at_inf = false; bool is_max_end_at_inf = false; - Point_2 point; - Intersection_curve icurve; - Object cur_obj; - - std::list::iterator inter_objs_it = inter_objs.begin(); - for (; inter_objs_it != inter_objs.end(); ++inter_objs_it) + for (auto inter_objs_it = inter_objs.begin(); + inter_objs_it != inter_objs.end(); ++inter_objs_it) { - cur_obj = *inter_objs_it; - CGAL_assertion(!cur_obj.is_empty()); - if (assign(point, cur_obj)) + if (const Point_2* point = std::get_if(&(*inter_objs_it))) { // if the point is on the curve, should add it the split points // list, otherwise, it is irrelevant and should be ignored - if (is_point_on_curve(point, original_cv)) - split_points.push_back(Point_2_with_info(point, false, false)); + if (is_point_on_curve(*point, original_cv)) + split_points.push_back(Point_2_with_info(*point, false, false)); } - else if (assign(icurve, cur_obj)) + else if (const Intersection_curve* icurve = std::get_if(&(*inter_objs_it))) { - const X_monotone_curve_2& x_curve = icurve.first; + const X_monotone_curve_2& x_curve = icurve->first; // find the intersection points and overlapping segments with the // original curve and insert them to the list of split points // intersect the x-monotone curve with the edge's curve typedef std::pair Intersect_point_2; - std::list intersections_list; - const Intersect_point_2* ip; - const X_monotone_curve_2* icv; + std::list> intersections_list; m_traits->intersect_2_object()(x_curve, original_cv, std::back_inserter(intersections_list)); - std::list::iterator inter_it = intersections_list.begin(); - for (; inter_it != intersections_list.end(); ++inter_it) + for (auto inter_it = intersections_list.begin(); inter_it != intersections_list.end(); ++inter_it) { - ip = object_cast(&(*inter_it)); - if (ip != nullptr) + if (const Intersect_point_2* ip = std::get_if(&(*inter_it))) { split_points.push_back(Point_2_with_info(ip->first, false, false)); } else { - icv = object_cast(&(*inter_it)); + const X_monotone_curve_2* icv = std::get_if(&(*inter_it)); CGAL_assertion(icv != nullptr); // we will add the *icv end points to the split_points, unless - // but we should be carefull with infinite curves. + // but we should be careful with infinite curves. Arr_traits_adaptor_2 tr_adaptor(*m_traits); if (tr_adaptor.parameter_space_in_y_2_object() (*icv, ARR_MIN_END) == ARR_INTERIOR && @@ -791,15 +776,15 @@ class Envelope_element_visitor_3 const Vertex_const_handle* vh; Vertex_handle vh_for_p; - CGAL::Object obj = pl.locate(p); + auto obj = pl.locate(p); visitor.init(&arr); - if ((fh = object_cast(&obj)) + if ((fh = std::get_if(&obj)) != nullptr) { vh_for_p = visitor.found_point_in_face(p, arr.non_const_handle(*fh)); } - else if ((hh = object_cast(&obj)) != nullptr) + else if ((hh = std::get_if(&obj))) { vh_for_p = visitor.found_point_on_edge(p , arr.non_const_handle(*hh)); } @@ -807,7 +792,7 @@ class Envelope_element_visitor_3 { // In this case p lies on an existing vertex, so we just update this // vertex. - vh = object_cast(&obj); + vh = std::get_if(&obj); CGAL_assertion(vh != nullptr); vh_for_p = visitor.found_point_on_vertex(p, arr.non_const_handle(*vh)); } @@ -825,7 +810,7 @@ class Envelope_element_visitor_3 // and we compare the surfaces to the left/right of it // otherwise we compare the surfaces over an (arbitrary) edge of the face, // assuming this is the correct answer for the face since the surfaces are - // continous + // continuous // In either case, we try to copy decision from an incident face, is possible // before asking the geometric question Comparison_result resolve_minimal_face(Face_handle face, @@ -1000,7 +985,7 @@ class Envelope_element_visitor_3 const Xy_monotone_surface_3&, Arr_all_sides_oblivious_tag) { - CGAL_error(); // doesnt' suppose to reach here at all!!! + CGAL_error(); // doesn't suppose to reach here at all!!! return SMALLER; } @@ -1035,7 +1020,7 @@ class Envelope_element_visitor_3 bool can_copy_decision_from_face_to_edge(Halfedge_handle h) { // can copy decision from face to its incident edge if the aux - // envelopes are continous over the face and edge + // envelopes are continuous over the face and edge return (h->get_has_equal_aux_data_in_face(0) && h->get_has_equal_aux_data_in_face(1)); } @@ -1043,7 +1028,7 @@ class Envelope_element_visitor_3 bool can_copy_decision_from_edge_to_vertex(Halfedge_handle h) { // can copy decision from face to its incident edge if the aux - // envelopes are continous over the face and edge + // envelopes are continuous over the face and edge return (h->get_has_equal_aux_data_in_target(0) && h->get_has_equal_aux_data_in_target(1)); } @@ -1113,7 +1098,7 @@ class Envelope_element_visitor_3 // intersection, there would also be intersection between the surfaces // over the face, and we know now that there isn't. - // if the first map is continous, but the second isn't (i.e. when we move + // if the first map is continuous, but the second isn't (i.e. when we move // from the face to the edge, the envelope goes closer), then if the // second map wins on the face, it wins on the edge also else if (!hh->is_decision_set() && @@ -1125,7 +1110,7 @@ class Envelope_element_visitor_3 hh->twin()->set_decision(DAC_DECISION_SECOND); } - // if the second map is continous, but the first isn't, then if the + // if the second map is continuous, but the first isn't, then if the // first map wins on the face, it wins on the edge also else if (!hh->is_decision_set() && face->get_decision() == DAC_DECISION_FIRST && @@ -1164,7 +1149,7 @@ class Envelope_element_visitor_3 { vh->set_decision(hh->get_decision()); } - // if the first map is continous, but the second isn't (i.e. when we move + // if the first map is continuous, but the second isn't (i.e. when we move // from the edge to the vertex, the envelope goes closer), then if the // second map wins on the edge, it wins on the vertex also else if (hh->get_decision() == DAC_DECISION_SECOND && @@ -1173,7 +1158,7 @@ class Envelope_element_visitor_3 { vh->set_decision(DAC_DECISION_SECOND); } - // if the second map is continous, but the first isn't, then if the + // if the second map is continuous, but the first isn't, then if the // first map wins on the edge, it wins on the vertex also else if (hh->get_decision() == DAC_DECISION_FIRST && !hh->get_has_equal_aux_data_in_target(0) && @@ -1299,7 +1284,7 @@ class Envelope_element_visitor_3 res = convert_decision_to_comparison_result(hh->get_decision()); result = true; } - // if the first map is continous, but the second isn't (i.e. when we + // if the first map is continuous, but the second isn't (i.e. when we // move from the edge to the face, the envelope goes farther), then // if the first map wins on the edge, it wins on the face also else if (hh->is_decision_set() && @@ -1310,7 +1295,7 @@ class Envelope_element_visitor_3 res = convert_decision_to_comparison_result(DAC_DECISION_FIRST); result = true; } - // if the second map is continous, but the first isn't, then if the + // if the second map is continuous, but the first isn't, then if the // second map wins on the edge, it wins on the face also else if (hh->is_decision_set() && hh->get_decision() == DAC_DECISION_SECOND && @@ -1342,7 +1327,7 @@ class Envelope_element_visitor_3 res = convert_decision_to_comparison_result(hh->get_decision()); result = true; } - // if the first map is continous, but the second isn't (i.e. when we + // if the first map is continuous, but the second isn't (i.e. when we // move from the edge to the face, the envelope goes farther), then // if the first map wins on the edge, it wins on the face also else if (hh->is_decision_set() && @@ -1354,7 +1339,7 @@ class Envelope_element_visitor_3 result = true; } - // if the second map is continous, but the first isn't, then if the + // if the second map is continuous, but the first isn't, then if the // second map wins on the edge, it wins on the face also else if (hh->is_decision_set() && hh->get_decision() == DAC_DECISION_SECOND && @@ -1408,7 +1393,7 @@ class Envelope_element_visitor_3 // can copy the data from the edge, since we already took care of // the vertices of projected intersections edge->source()->set_decision(edge->get_decision()); - // if the first map is continous, but the second isn't (i.e. when we move + // if the first map is continuous, but the second isn't (i.e. when we move // from the edge to the vertex, the envelope goes closer), then if the // second map wins on the edge, it wins on the vertex also else if (edge->get_decision() == DAC_DECISION_SECOND && @@ -1417,7 +1402,7 @@ class Envelope_element_visitor_3 { edge->source()->set_decision(DAC_DECISION_SECOND); } - // if the second map is continous, but the first isn't, then if the + // if the second map is continuous, but the first isn't, then if the // first map wins on the edge, it wins on the vertex also else if (edge->get_decision() == DAC_DECISION_FIRST && !edge->twin()->get_has_equal_aux_data_in_target(0) && @@ -1432,7 +1417,7 @@ class Envelope_element_visitor_3 // can copy the data from the edge, since we already took care of // the vertices of projected intersections edge->target()->set_decision(edge->get_decision()); - // if the first map is continous, but the second isn't (i.e. when we move + // if the first map is continuous, but the second isn't (i.e. when we move // from the edge to the vertex, the envelope goes closer), then if the // second map wins on the edge, it wins on the vertex also else if (edge->get_decision() == DAC_DECISION_SECOND && @@ -1441,7 +1426,7 @@ class Envelope_element_visitor_3 { edge->target()->set_decision(DAC_DECISION_SECOND); } - // if the second map is continous, but the first isn't, then if the + // if the second map is continuous, but the first isn't, then if the // first map wins on the edge, it wins on the vertex also else if (edge->get_decision() == DAC_DECISION_FIRST && !edge->get_has_equal_aux_data_in_target(0) && @@ -2117,7 +2102,7 @@ class Envelope_element_visitor_3 // this observer is used in the process of resolving a face - // it listens to what happpens in the copied arrangement, and copies back + // it listens to what happens in the copied arrangement, and copies back // the actions to result arrangements very efficiently class Copy_observer : public Md_observer { @@ -2263,7 +2248,7 @@ class Envelope_element_visitor_3 virtual void after_create_edge(Halfedge_handle e) { - // a new edge e was created in small_arr, we should create a corresponing + // a new edge e was created in small_arr, we should create a corresponding // edge in big_arr CGAL_assertion(map_vertices.is_defined(create_edge_v1)); CGAL_assertion(map_vertices.is_defined(create_edge_v2)); @@ -3171,7 +3156,7 @@ class Envelope_element_visitor_3 // for using its methods Self* parent; - // current type of interection curve that is inserted + // current type of intersection curve that is inserted Multiplicity itype; }; diff --git a/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_overlay_2.h b/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_overlay_2.h index 50772e3e..0f43a6bb 100644 --- a/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_overlay_2.h +++ b/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_overlay_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_3/include/CGAL/Envelope_3/Envelope_overlay_2.h $ -// $Id: Envelope_overlay_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_3/include/CGAL/Envelope_3/Envelope_overlay_2.h $ +// $Id: include/CGAL/Envelope_3/Envelope_overlay_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_overlay_functor.h b/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_overlay_functor.h index ccfe3d45..92da5511 100644 --- a/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_overlay_functor.h +++ b/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_overlay_functor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_3/include/CGAL/Envelope_3/Envelope_overlay_functor.h $ -// $Id: Envelope_overlay_functor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_3/include/CGAL/Envelope_3/Envelope_overlay_functor.h $ +// $Id: include/CGAL/Envelope_3/Envelope_overlay_functor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michal Meyerovitch diff --git a/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_pm_dcel.h b/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_pm_dcel.h index 911bce72..5629c3b5 100644 --- a/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_pm_dcel.h +++ b/thirdparty/CGAL/include/CGAL/Envelope_3/Envelope_pm_dcel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_3/include/CGAL/Envelope_3/Envelope_pm_dcel.h $ -// $Id: Envelope_pm_dcel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_3/include/CGAL/Envelope_3/Envelope_pm_dcel.h $ +// $Id: include/CGAL/Envelope_3/Envelope_pm_dcel.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michal Meyerovitch diff --git a/thirdparty/CGAL/include/CGAL/Envelope_3/set_dividors.h b/thirdparty/CGAL/include/CGAL/Envelope_3/set_dividors.h index 08a70f0a..164ef257 100644 --- a/thirdparty/CGAL/include/CGAL/Envelope_3/set_dividors.h +++ b/thirdparty/CGAL/include/CGAL/Envelope_3/set_dividors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_3/include/CGAL/Envelope_3/set_dividors.h $ -// $Id: set_dividors.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_3/include/CGAL/Envelope_3/set_dividors.h $ +// $Id: include/CGAL/Envelope_3/set_dividors.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -46,7 +46,7 @@ class Arbitrary_dividor }; //! The last element is stored in the second sequence and all the other (n-1) -// elments are stored in the first sequence. +// elements are stored in the first sequence. class Incremental_dividor { public: diff --git a/thirdparty/CGAL/include/CGAL/Envelope_diagram_1.h b/thirdparty/CGAL/include/CGAL/Envelope_diagram_1.h index 8e28d467..d3e5184d 100644 --- a/thirdparty/CGAL/include/CGAL/Envelope_diagram_1.h +++ b/thirdparty/CGAL/include/CGAL/Envelope_diagram_1.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_2/include/CGAL/Envelope_diagram_1.h $ -// $Id: Envelope_diagram_1.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_2/include/CGAL/Envelope_diagram_1.h $ +// $Id: include/CGAL/Envelope_diagram_1.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/Epeck_d.h b/thirdparty/CGAL/include/CGAL/Epeck_d.h index 12b6839e..ced9479f 100644 --- a/thirdparty/CGAL/include/CGAL/Epeck_d.h +++ b/thirdparty/CGAL/include/CGAL/Epeck_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/Epeck_d.h $ -// $Id: Epeck_d.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/Epeck_d.h $ +// $Id: include/CGAL/Epeck_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/Epic_converter.h b/thirdparty/CGAL/include/CGAL/Epic_converter.h index 623d8c58..c1c986a9 100644 --- a/thirdparty/CGAL/include/CGAL/Epic_converter.h +++ b/thirdparty/CGAL/include/CGAL/Epic_converter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Epic_converter.h $ -// $Id: Epic_converter.h c4b8c37 2022-03-11T10:21:51+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Epic_converter.h $ +// $Id: include/CGAL/Epic_converter.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Epick_d.h b/thirdparty/CGAL/include/CGAL/Epick_d.h index 952fd164..ed5c608c 100644 --- a/thirdparty/CGAL/include/CGAL/Epick_d.h +++ b/thirdparty/CGAL/include/CGAL/Epick_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/Epick_d.h $ -// $Id: Epick_d.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/Epick_d.h $ +// $Id: include/CGAL/Epick_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/Euclidean_distance.h b/thirdparty/CGAL/include/CGAL/Euclidean_distance.h index 1f85d15e..18c9e87e 100644 --- a/thirdparty/CGAL/include/CGAL/Euclidean_distance.h +++ b/thirdparty/CGAL/include/CGAL/Euclidean_distance.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Euclidean_distance.h $ -// $Id: Euclidean_distance.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Euclidean_distance.h $ +// $Id: include/CGAL/Euclidean_distance.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Euclidean_distance_sphere_point.h b/thirdparty/CGAL/include/CGAL/Euclidean_distance_sphere_point.h index 07a4d95e..605b3cd1 100644 --- a/thirdparty/CGAL/include/CGAL/Euclidean_distance_sphere_point.h +++ b/thirdparty/CGAL/include/CGAL/Euclidean_distance_sphere_point.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Euclidean_distance_sphere_point.h $ -// $Id: Euclidean_distance_sphere_point.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Euclidean_distance_sphere_point.h $ +// $Id: include/CGAL/Euclidean_distance_sphere_point.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Euler_integrator_2.h b/thirdparty/CGAL/include/CGAL/Euler_integrator_2.h index d20d4a6c..4f6bdeea 100644 --- a/thirdparty/CGAL/include/CGAL/Euler_integrator_2.h +++ b/thirdparty/CGAL/include/CGAL/Euler_integrator_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_lines_2/include/CGAL/Euler_integrator_2.h $ -// $Id: Euler_integrator_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_lines_2/include/CGAL/Euler_integrator_2.h $ +// $Id: include/CGAL/Euler_integrator_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Exact_algebraic.h b/thirdparty/CGAL/include/CGAL/Exact_algebraic.h index 63bbad67..7e5bd382 100644 --- a/thirdparty/CGAL/include/CGAL/Exact_algebraic.h +++ b/thirdparty/CGAL/include/CGAL/Exact_algebraic.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Exact_algebraic.h $ -// $Id: Exact_algebraic.h 350b917 2021-04-11T14:50:44+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Exact_algebraic.h $ +// $Id: include/CGAL/Exact_algebraic.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -37,10 +37,7 @@ It is a typedef of another number type. Its exact definition depends on the availability the third-party libraries \core, and \leda. \cgal must be configured with at least one of those libraries. -\cgalModels `FieldWithSqrt` -\cgalModels `RealEmbeddable` -\cgalModels `Fraction` -\cgalModels `FromDoubleConstructible` +\cgalModels{FieldWithSqrt,RealEmbeddable,Fraction,FromDoubleConstructible} */ #if DOXYGEN_RUNNING diff --git a/thirdparty/CGAL/include/CGAL/Exact_circular_kernel_2.h b/thirdparty/CGAL/include/CGAL/Exact_circular_kernel_2.h index c9d1ecdf..95658d94 100644 --- a/thirdparty/CGAL/include/CGAL/Exact_circular_kernel_2.h +++ b/thirdparty/CGAL/include/CGAL/Exact_circular_kernel_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Exact_circular_kernel_2.h $ -// $Id: Exact_circular_kernel_2.h e813d9f 2021-05-28T11:25:01+02:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Exact_circular_kernel_2.h $ +// $Id: include/CGAL/Exact_circular_kernel_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Exact_integer.h b/thirdparty/CGAL/include/CGAL/Exact_integer.h index 2ce57a3c..f03a9b8f 100644 --- a/thirdparty/CGAL/include/CGAL/Exact_integer.h +++ b/thirdparty/CGAL/include/CGAL/Exact_integer.h @@ -7,27 +7,17 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Exact_integer.h $ -// $Id: Exact_integer.h 4bd7049 2022-05-03T12:14:50+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Exact_integer.h $ +// $Id: include/CGAL/Exact_integer.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Laurent Rineau -#include -#include -#if CGAL_USE_GMPXX -# include -#elif CGAL_USE_GMP -# include -#elif CGAL_USE_LEDA -# include -#elif CGAL_USE_CORE -# include -#elif defined CGAL_USE_BOOST_MP -#else -# error CGAL is configured with none of GMP, LEDA, Boost.Multiprecision and CORE. cannot be used. -#endif +#ifndef CGAL_EXACT_INTEGER_H +#define CGAL_EXACT_INTEGER_H + +#include namespace CGAL { @@ -40,8 +30,7 @@ It is a typedef of another number type. Its exact definition depends on the availability the third-party libraries \gmp, \core, and \leda. \cgal must be configured with at least one of those libraries. -\cgalModels `EuclideanRing` -\cgalModels `RealEmbeddable` +\cgalModels{EuclideanRing,RealEmbeddable} */ #if DOXYGEN_RUNNING @@ -50,30 +39,10 @@ typedef unspecified_type Exact_integer; #else // not DOXYGEN_RUNNING -#if ( (defined(CGAL_TEST_SUITE) && CGAL_VERSION_NR == 1050500900) || defined(CGAL_FORCE_USE_BOOST_MP))\ - && BOOST_VERSION > 107800 && defined(CGAL_USE_BOOST_MP) -// use boost-mp by default in the testsuite until 5.5-beta is out -typedef BOOST_cpp_arithmetic_kernel::Integer Exact_integer; -#else // BOOST_VERSION > 107800 -#ifdef CGAL_USE_GMPXX -typedef mpz_class Exact_integer; -#elif defined(CGAL_USE_GMP) -#if defined(CGAL_USE_BOOST_MP) -typedef BOOST_gmp_arithmetic_kernel::Integer Exact_integer; -#else -typedef Gmpz Exact_integer; -#endif -#elif defined(CGAL_USE_LEDA) -typedef leda_integer Exact_integer; -#elif defined(CGAL_USE_BOOST_MP) -typedef BOOST_cpp_arithmetic_kernel::Integer Exact_integer; -#elif defined(CGAL_USE_CORE) -typedef CORE::BigInt Exact_integer; -#else -#error "ERROR: Cannot determine a BigInt type!" -#endif // CGAL_USE_CORE -#endif // BOOST_VERSION > 107800 +using Exact_integer = internal::Exact_NT_backend::Integer; #endif // not DOXYGEN_RUNNING } /* end namespace CGAL */ + +#endif // CGAL_EXACT_INTEGER_H diff --git a/thirdparty/CGAL/include/CGAL/Exact_kernel_selector.h b/thirdparty/CGAL/include/CGAL/Exact_kernel_selector.h index 61bc11f2..05e24a24 100644 --- a/thirdparty/CGAL/include/CGAL/Exact_kernel_selector.h +++ b/thirdparty/CGAL/include/CGAL/Exact_kernel_selector.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Exact_kernel_selector.h $ -// $Id: Exact_kernel_selector.h 561cc66 2022-06-29T12:30:35+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Exact_kernel_selector.h $ +// $Id: include/CGAL/Exact_kernel_selector.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion, diff --git a/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel.h b/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel.h index fcf88882..cc785f69 100644 --- a/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel.h +++ b/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Exact_predicates_exact_constructions_kernel.h $ -// $Id: Exact_predicates_exact_constructions_kernel.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Exact_predicates_exact_constructions_kernel.h $ +// $Id: include/CGAL/Exact_predicates_exact_constructions_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel_with_kth_root.h b/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel_with_kth_root.h index fa4d822a..cc3d0166 100644 --- a/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel_with_kth_root.h +++ b/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel_with_kth_root.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Exact_predicates_exact_constructions_kernel_with_kth_root.h $ -// $Id: Exact_predicates_exact_constructions_kernel_with_kth_root.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Exact_predicates_exact_constructions_kernel_with_kth_root.h $ +// $Id: include/CGAL/Exact_predicates_exact_constructions_kernel_with_kth_root.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h b/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h index b8f7ee5e..259bad54 100644 --- a/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h +++ b/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h $ -// $Id: Exact_predicates_exact_constructions_kernel_with_root_of.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h $ +// $Id: include/CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h b/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h index 4daa6cec..b9b517f7 100644 --- a/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h +++ b/thirdparty/CGAL/include/CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h $ -// $Id: Exact_predicates_exact_constructions_kernel_with_sqrt.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h $ +// $Id: include/CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Exact_predicates_inexact_constructions_kernel.h b/thirdparty/CGAL/include/CGAL/Exact_predicates_inexact_constructions_kernel.h index 076ef1df..737898f0 100644 --- a/thirdparty/CGAL/include/CGAL/Exact_predicates_inexact_constructions_kernel.h +++ b/thirdparty/CGAL/include/CGAL/Exact_predicates_inexact_constructions_kernel.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Exact_predicates_inexact_constructions_kernel.h $ -// $Id: Exact_predicates_inexact_constructions_kernel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Exact_predicates_inexact_constructions_kernel.h $ +// $Id: include/CGAL/Exact_predicates_inexact_constructions_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,28 +19,67 @@ #include #include +#include #include +#include +#include namespace CGAL { -// The following is equivalent to Filtered_kernel< Simple_cartesian >, -// but it's shorter in terms of template name length (for error messages, mangling...). - -class Epick - : public Filtered_kernel_adaptor< - Type_equality_wrapper< Simple_cartesian::Base::Type, Epick >, +constexpr bool epick_use_static_filter = #ifdef CGAL_NO_STATIC_FILTERS - false > + false; #else - true > + true; #endif + +// Here Epick is a class, and Double_precision_epick an alias to it. +class Epick; +class Single_precision_epick; +using Double_precision_epick = Epick; + +namespace internal { + + // Basic objects, constructions, and predicates, using the same base class as + // Simple_cartesian: Cartesian_base without reference counting. + template + using Epick_base = + typename Simple_cartesian::template Base::Type; + + // Add the type equality property, by changing the objects types + template + using Epick_base_with_type_equality = + Type_equality_wrapper, Kernel>; + + // Change the predicates to filtered predicates (with static filters or not) + template + using Epick_with_filtered_predicates = + Filtered_kernel_adaptor, epick_use_static_filter>; +}; + +// The following is equivalent to Filtered_kernel< Simple_cartesian >, +// but it's shorter in terms of template name length (for error messages, mangling...). +class Epick : public internal::Epick_with_filtered_predicates {}; -typedef Epick Exact_predicates_inexact_constructions_kernel; +template <> +struct Triangulation_structural_filtering_traits { + using Use_structural_filtering_tag = Tag_true; +}; + +using Exact_predicates_inexact_constructions_kernel = Epick; + + +// This kernel is Epick with the difference that its `FT` is `float`. +class Single_precision_epick + : public Converting_constructions_kernel_adaptor< + internal::Epick_with_filtered_predicates, + Double_precision_epick> +{}; template <> -struct Triangulation_structural_filtering_traits { - typedef Tag_true Use_structural_filtering_tag; +struct Triangulation_structural_filtering_traits { + using Use_structural_filtering_tag = Tag_true; }; } //namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Exact_rational.h b/thirdparty/CGAL/include/CGAL/Exact_rational.h index 93e921e4..e801217c 100644 --- a/thirdparty/CGAL/include/CGAL/Exact_rational.h +++ b/thirdparty/CGAL/include/CGAL/Exact_rational.h @@ -7,13 +7,16 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Exact_rational.h $ -// $Id: Exact_rational.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Exact_rational.h $ +// $Id: include/CGAL/Exact_rational.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Laurent Rineau +#ifndef CGAL_EXACT_RATIONAL_H +#define CGAL_EXACT_RATIONAL_H + #include namespace CGAL { @@ -27,10 +30,7 @@ It is a typedef of another number type. Its exact definition depends on the availability the third-party libraries \gmp, \core, and \leda. \cgal must be configured with at least one of those libraries. -\cgalModels `Field` -\cgalModels `RealEmbeddable` -\cgalModels `Fraction` -\cgalModels `FromDoubleConstructible` +\cgalModels{Field,RealEmbeddable,Fraction,FromDoubleConstructible} */ #if DOXYGEN_RUNNING @@ -39,8 +39,10 @@ typedef unspecified_type Exact_rational; #else // not DOXYGEN_RUNNING -typedef internal::Exact_field_selector::Type Exact_rational; +using Exact_rational = internal::Exact_NT_backend::Rational; #endif } /* end namespace CGAL */ + +#endif // CGAL_EXACT_RATIONAL_H diff --git a/thirdparty/CGAL/include/CGAL/Exact_spherical_kernel_3.h b/thirdparty/CGAL/include/CGAL/Exact_spherical_kernel_3.h index 7d8b0070..9093879e 100644 --- a/thirdparty/CGAL/include/CGAL/Exact_spherical_kernel_3.h +++ b/thirdparty/CGAL/include/CGAL/Exact_spherical_kernel_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Exact_spherical_kernel_3.h $ -// $Id: Exact_spherical_kernel_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Exact_spherical_kernel_3.h $ +// $Id: include/CGAL/Exact_spherical_kernel_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Exponent_vector.h b/thirdparty/CGAL/include/CGAL/Exponent_vector.h index a5babee9..d016b5f3 100644 --- a/thirdparty/CGAL/include/CGAL/Exponent_vector.h +++ b/thirdparty/CGAL/include/CGAL/Exponent_vector.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Exponent_vector.h $ -// $Id: Exponent_vector.h 0ef8127 2021-04-20T20:20:58+01:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Exponent_vector.h $ +// $Id: include/CGAL/Exponent_vector.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,12 +19,12 @@ #include #include #include +#include #include #include #include #include -#include namespace CGAL { @@ -59,7 +59,7 @@ class Exponent_vector : :v(begin,end){ typedef typename std::iterator_traits::value_type value_type; CGAL_USE_TYPE(value_type); - CGAL_static_assertion(( ::boost::is_same::value)); + static_assert(::std::is_same::value); } diff --git a/thirdparty/CGAL/include/CGAL/Extended_cartesian.h b/thirdparty/CGAL/include/CGAL/Extended_cartesian.h index 27a61f3c..ce744055 100644 --- a/thirdparty/CGAL/include/CGAL/Extended_cartesian.h +++ b/thirdparty/CGAL/include/CGAL/Extended_cartesian.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Extended_cartesian.h $ -// $Id: Extended_cartesian.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Extended_cartesian.h $ +// $Id: include/CGAL/Extended_cartesian.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Extended_homogeneous.h b/thirdparty/CGAL/include/CGAL/Extended_homogeneous.h index 4963eafd..c8c36778 100644 --- a/thirdparty/CGAL/include/CGAL/Extended_homogeneous.h +++ b/thirdparty/CGAL/include/CGAL/Extended_homogeneous.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Extended_homogeneous.h $ -// $Id: Extended_homogeneous.h 7e62c02 2021-04-12T14:02:37+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Extended_homogeneous.h $ +// $Id: include/CGAL/Extended_homogeneous.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Extremal_polygon_traits_2.h b/thirdparty/CGAL/include/CGAL/Extremal_polygon_traits_2.h index 34319a88..d793b1ff 100644 --- a/thirdparty/CGAL/include/CGAL/Extremal_polygon_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Extremal_polygon_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Inscribed_areas/include/CGAL/Extremal_polygon_traits_2.h $ -// $Id: Extremal_polygon_traits_2.h d8d5f1d 2021-01-05T18:41:11+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Inscribed_areas/include/CGAL/Extremal_polygon_traits_2.h $ +// $Id: include/CGAL/Extremal_polygon_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -83,7 +83,7 @@ struct Extremal_polygon_area_traits_2 { int number_of_points( static_cast(iterator_distance( points_begin, points_end))); - CGAL_optimisation_precondition( number_of_points > min_k()); + CGAL_precondition( number_of_points > min_k()); // this gives the area of the triangle of two points with // the root: @@ -136,7 +136,7 @@ struct Extremal_polygon_area_traits_2 { }; } //namespace CGAL -#include + #include #ifdef CGAL_USE_LEDA #include @@ -221,11 +221,11 @@ struct Extremal_polygon_perimeter_traits_2 { using std::less; using std::max_element; - CGAL_optimisation_precondition_code( + CGAL_precondition_code( int number_of_points( static_cast(iterator_distance( points_begin, points_end)));) - CGAL_optimisation_precondition( number_of_points > min_k()); + CGAL_precondition( number_of_points > min_k()); // kind of messy, but first we have to have something // like Distance (function object) ... diff --git a/thirdparty/CGAL/include/CGAL/Extreme_points_traits_adapter_3.h b/thirdparty/CGAL/include/CGAL/Extreme_points_traits_adapter_3.h index 62ab5b56..f4a73fce 100644 --- a/thirdparty/CGAL/include/CGAL/Extreme_points_traits_adapter_3.h +++ b/thirdparty/CGAL/include/CGAL/Extreme_points_traits_adapter_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_3/include/CGAL/Extreme_points_traits_adapter_3.h $ -// $Id: Extreme_points_traits_adapter_3.h 263ad6b 2020-08-20T18:25:01+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_3/include/CGAL/Extreme_points_traits_adapter_3.h $ +// $Id: include/CGAL/Extreme_points_traits_adapter_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -190,7 +190,7 @@ class Extreme_points_traits_adapter_3 typedef Convex_hull_3::internal::Forward_functor< typename Btt::Less_yx_2, PointPropertyMap> Less_yx_2; typedef Convex_hull_3::internal::Forward_functor< - typename Btt::Less_signed_distance_to_line_2, PointPropertyMap> Less_signed_distance_to_line_2; + typename Btt::Compare_signed_distance_to_line_2, PointPropertyMap> Compare_signed_distance_to_line_2; typedef Convex_hull_3::internal::Forward_functor< typename Btt::Left_turn_2, PointPropertyMap> Left_turn_2; @@ -219,8 +219,8 @@ class Extreme_points_traits_adapter_3 { return Less_xy_2(vpm_, static_cast(this)->less_xy_2_object()); } Less_yx_2 less_yx_2_object() const { return Less_yx_2(vpm_, static_cast(this)->less_yx_2_object()); } - Less_signed_distance_to_line_2 less_signed_distance_to_line_2_object() const - { return Less_signed_distance_to_line_2(vpm_, static_cast(this)->Less_signed_distance_to_line_2()); } + Compare_signed_distance_to_line_2 compare_signed_distance_to_line_2_object() const + { return Compare_signed_distance_to_line_2(vpm_, static_cast(this)->Compare_signed_distance_to_line_2()); } Less_rotate_ccw_2 less_rotate_ccw_2_object() const { return Less_rotate_ccw_2(vpm_, static_cast(this)->less_rotate_ccw_2_object()); } Left_turn_2 left_turn_2_object() const diff --git a/thirdparty/CGAL/include/CGAL/FPU.h b/thirdparty/CGAL/include/CGAL/FPU.h index 33e9c80b..f1ec2785 100644 --- a/thirdparty/CGAL/include/CGAL/FPU.h +++ b/thirdparty/CGAL/include/CGAL/FPU.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/FPU.h $ -// $Id: FPU.h b363b7e 2022-11-25T10:14:18+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/FPU.h $ +// $Id: include/CGAL/FPU.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -25,7 +25,7 @@ #include // for HUGE_VAL #endif -// This file specifies some platform dependant functions, regarding the FPU +// This file specifies some platform dependent functions, regarding the FPU // directed rounding modes. There is only support for double precision. // // It also contains the definition of the Protect_FPU_rounding<> class, @@ -143,8 +143,8 @@ inline double IA_opacify(double x) { #ifdef __llvm__ // LLVM's support for inline asm is completely messed up: - // http://llvm.org/bugs/show_bug.cgi?id=17958 - // http://llvm.org/bugs/show_bug.cgi?id=17959 + // https://bugs.llvm.org/show_bug.cgi?id=17958 + // https://bugs.llvm.org/show_bug.cgi?id=17959 // etc. // This seems to produce code that is ok (not optimal but better than // volatile). In case of trouble, use volatile instead. @@ -166,7 +166,7 @@ inline double IA_opacify(double x) // Intel used not to emulate this perfectly, we'll see. // If we create a version of IA_opacify for vectors, note that gcc < 4.8 // fails with "+g" and we need to use "+mx" instead. - // "+X" ICEs ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59155 ) and + // "+X" ICEs ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59155 ) and // may not be safe? // The constraint 'g' doesn't include floating point registers ??? // Intel has a bug where -mno-sse still defines __SSE__ and __SSE2__ @@ -180,10 +180,10 @@ inline double IA_opacify(double x) # endif # elif (defined __i386__ || defined __x86_64__) // "+f" doesn't compile on x86(_64) - // ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59157 ) - // Don't mix "t" with "g": http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59180 + // ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59157 ) + // Don't mix "t" with "g": https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59180 // We can't put "t" with "x" either, prefer "x" for -mfpmath=sse,387. - // ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59181 ) + // ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59181 ) asm volatile ("" : "+mt"(x) ); # elif (defined __VFP_FP__ && !defined __SOFTFP__) || defined __aarch64__ // ARM @@ -217,7 +217,7 @@ inline double IA_force_to_double(double x) #if defined __GNUG__ # ifdef CGAL_HAS_SSE2 // For an explanation of volatile: - // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56027 + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56027 asm volatile ("" : "+mx"(x) ); # else // Similar to writing to a volatile and reading back, except that calling diff --git a/thirdparty/CGAL/include/CGAL/FPU_extension.h b/thirdparty/CGAL/include/CGAL/FPU_extension.h index 7cb5f9ed..6639ab98 100644 --- a/thirdparty/CGAL/include/CGAL/FPU_extension.h +++ b/thirdparty/CGAL/include/CGAL/FPU_extension.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/FPU_extension.h $ -// $Id: FPU_extension.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/FPU_extension.h $ +// $Id: include/CGAL/FPU_extension.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/FPU_gcc_i386.h b/thirdparty/CGAL/include/CGAL/FPU_gcc_i386.h index 5fdad57e..0c2ee289 100644 --- a/thirdparty/CGAL/include/CGAL/FPU_gcc_i386.h +++ b/thirdparty/CGAL/include/CGAL/FPU_gcc_i386.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/FPU_gcc_i386.h $ -// $Id: FPU_gcc_i386.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/FPU_gcc_i386.h $ +// $Id: include/CGAL/FPU_gcc_i386.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/FPU_gcc_i386_sse2.h b/thirdparty/CGAL/include/CGAL/FPU_gcc_i386_sse2.h index 60ab0440..64765b91 100644 --- a/thirdparty/CGAL/include/CGAL/FPU_gcc_i386_sse2.h +++ b/thirdparty/CGAL/include/CGAL/FPU_gcc_i386_sse2.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/FPU_gcc_i386_sse2.h $ -// $Id: FPU_gcc_i386_sse2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/FPU_gcc_i386_sse2.h $ +// $Id: include/CGAL/FPU_gcc_i386_sse2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/FPU_msvc.h b/thirdparty/CGAL/include/CGAL/FPU_msvc.h index 6e16b4f9..b113162f 100644 --- a/thirdparty/CGAL/include/CGAL/FPU_msvc.h +++ b/thirdparty/CGAL/include/CGAL/FPU_msvc.h @@ -5,8 +5,8 @@ // Licensees holding a valid commercial license may use this file in // accordance with the commercial license agreement provided with the software. // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/FPU_msvc.h $ -// $Id: FPU_msvc.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/FPU_msvc.h $ +// $Id: include/CGAL/FPU_msvc.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Face_graph_wrapper.h b/thirdparty/CGAL/include/CGAL/Face_graph_wrapper.h index 702752af..3076730d 100644 --- a/thirdparty/CGAL/include/CGAL/Face_graph_wrapper.h +++ b/thirdparty/CGAL/include/CGAL/Face_graph_wrapper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_topology/include/CGAL/Face_graph_wrapper.h $ -// $Id: Face_graph_wrapper.h 440a8df 2022-02-03T08:41:04+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_topology/include/CGAL/Face_graph_wrapper.h $ +// $Id: include/CGAL/Face_graph_wrapper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -40,7 +40,7 @@ class Face_graph_wrapper public: typedef HEG_ HEG; typedef Face_graph_wrapper Self; - typedef boost::uint32_t /*std::size_t*/ size_type; + typedef std::uint32_t /*std::size_t*/ size_type; typedef Self Refs; struct Dart_container @@ -51,13 +51,13 @@ class Face_graph_wrapper // typedef My_halfedge_iterator const_iterator; // TODO ? }; - typedef typename boost::graph_traits::halfedge_descriptor Dart_handle; - typedef typename boost::graph_traits::halfedge_descriptor Dart_const_handle; + typedef typename boost::graph_traits::halfedge_descriptor Dart_descriptor; + typedef typename boost::graph_traits::halfedge_descriptor Dart_const_descriptor; - typedef Dart_handle Null_handle_type; - // typedef CGAL::Void* Null_handle_type; - static const Null_handle_type null_handle; //=Dart_handle(); - static const Null_handle_type null_dart_handle; //=Dart_handle(); + typedef Dart_descriptor Null_descriptor_type; + // typedef CGAL::Void* Null_descriptor_type; + static const Null_descriptor_type null_descriptor; //=Dart_descriptor(); + static const Null_descriptor_type null_dart_descriptor; //=Dart_descriptor(); /// Number of marks static const size_type NB_MARKS = 32; @@ -117,15 +117,15 @@ class Face_graph_wrapper { return m_fg; } template - bool is_free(Dart_const_handle /* dh */) const + bool is_free(Dart_const_descriptor /* dh */) const { return false; } // Not possible to have a free dart with an HEG. - bool is_free(Dart_const_handle /*dh*/, unsigned int /*i*/) const + bool is_free(Dart_const_descriptor /*dh*/, unsigned int /*i*/) const { return false; } // Not possible to have a free dart with an HEG. - bool is_perforated(Dart_const_handle dh) const + bool is_perforated(Dart_const_descriptor dh) const { return is_border(dh, m_fg); } - Dart_const_handle get_beta(Dart_const_handle ADart, int B1) const + Dart_const_descriptor get_beta(Dart_const_descriptor ADart, int B1) const { CGAL_assertion(B1>=0 && B1<=static_cast(dimension)); if (B1==1) return internal::Get_beta::value(m_fg, ADart); @@ -133,7 +133,7 @@ class Face_graph_wrapper return internal::Get_beta::value(m_fg, ADart); } template - Dart_const_handle get_beta(Dart_const_handle ADart) const + Dart_const_descriptor get_beta(Dart_const_descriptor ADart) const { CGAL_assertion(B1>=0 && B1<=static_cast(dimension)); return internal::Get_beta::value(m_fg, ADart); @@ -142,52 +142,52 @@ class Face_graph_wrapper bool is_empty() const { return number_of_darts()==0; } - /* ?? bool is_dart_used(Dart_const_handle dh) const + /* ?? bool is_dart_used(Dart_const_descriptor dh) const { return true; ?? } */ - int highest_nonfree_dimension(Dart_const_handle /* dh */) const + int highest_nonfree_dimension(Dart_const_descriptor /* dh */) const { return 2; } - Dart_const_handle previous(Dart_const_handle ADart) const + Dart_const_descriptor previous(Dart_const_descriptor ADart) const { return get_beta<0>(ADart); } - Dart_const_handle next(Dart_const_handle ADart) const + Dart_const_descriptor next(Dart_const_descriptor ADart) const { return get_beta<1>(ADart); } - Dart_const_handle opposite(Dart_const_handle dh) const + Dart_const_descriptor opposite(Dart_const_descriptor dh) const { return get_beta<2>(dh); } - Dart_const_handle opposite2(Dart_const_handle dh) const + Dart_const_descriptor opposite2(Dart_const_descriptor dh) const { return get_beta<2>(dh); } - Dart_const_handle other_extremity(Dart_const_handle dh) const + Dart_const_descriptor other_extremity(Dart_const_descriptor dh) const { return get_beta<1>(dh); } template - Dart_const_handle opposite(Dart_const_handle ADart) const + Dart_const_descriptor opposite(Dart_const_descriptor ADart) const { return this->template get_beta(ADart); } - Dart_const_handle other_orientation(Dart_const_handle ADart) const + Dart_const_descriptor other_orientation(Dart_const_descriptor ADart) const { return ADart; } - bool is_previous_exist(Dart_const_handle) const + bool is_previous_exist(Dart_const_descriptor) const { return true; } - bool is_next_exist(Dart_const_handle) const + bool is_next_exist(Dart_const_descriptor) const { return true; } template - bool is_opposite_exist(Dart_const_handle /* ADart */) const + bool is_opposite_exist(Dart_const_descriptor /* ADart */) const { return true; } template - Dart_handle beta(Dart_handle ADart, Betas... betas) - { return CGAL::internal::Beta_functor:: + Dart_descriptor beta(Dart_descriptor ADart, Betas... betas) + { return CGAL::internal::Beta_functor:: run(*this, ADart, betas...); } template - Dart_const_handle beta(Dart_const_handle ADart, Betas... betas) const - { return CGAL::internal::Beta_functor:: + Dart_const_descriptor beta(Dart_const_descriptor ADart, Betas... betas) const + { return CGAL::internal::Beta_functor:: run(*this, ADart, betas...); } template - Dart_handle beta(Dart_handle ADart) - { return CGAL::internal::Beta_functor_static:: + Dart_descriptor beta(Dart_descriptor ADart) + { return CGAL::internal::Beta_functor_static:: run(*this, ADart); } template - Dart_const_handle beta(Dart_const_handle ADart) const - { return CGAL::internal::Beta_functor_static:: + Dart_const_descriptor beta(Dart_const_descriptor ADart) const + { return CGAL::internal::Beta_functor_static:: run(*this, ADart); } size_type number_of_darts() const @@ -270,27 +270,27 @@ class Face_graph_wrapper void mark_null_dart( size_type /*amark*/) const {} - bool get_dart_mark(Dart_const_handle ADart, size_type amark) const + bool get_dart_mark(Dart_const_descriptor ADart, size_type amark) const { CGAL_assertion(is_reserved(amark)); return get(m_all_marks, ADart)[amark]; } - void set_dart_mark(Dart_const_handle ADart, size_type amark, bool avalue) const + void set_dart_mark(Dart_const_descriptor ADart, size_type amark, bool avalue) const { CGAL_assertion(is_reserved(amark)); const_cast& >(get(m_all_marks, ADart)).set(amark, avalue); } - void flip_dart_mark(Dart_const_handle ADart, size_type amark) const + void flip_dart_mark(Dart_const_descriptor ADart, size_type amark) const { set_dart_mark(ADart, amark, !get_dart_mark(ADart, amark)); } - bool is_marked(Dart_const_handle adart, size_type amark) const + bool is_marked(Dart_const_descriptor adart, size_type amark) const { CGAL_assertion(is_reserved(amark)); return get_dart_mark(adart, amark)!=mmask_marks[amark]; } - void set_mark_to(Dart_const_handle adart, size_type amark, + void set_mark_to(Dart_const_descriptor adart, size_type amark, bool astate) const { CGAL_assertion(is_reserved(amark)); @@ -304,7 +304,7 @@ class Face_graph_wrapper } } - void mark(Dart_const_handle adart, size_type amark) const + void mark(Dart_const_descriptor adart, size_type amark) const { CGAL_assertion(is_reserved(amark)); @@ -314,9 +314,9 @@ class Face_graph_wrapper flip_dart_mark(adart, amark); } - void unmark(Dart_const_handle adart, size_type amark) const + void unmark(Dart_const_descriptor adart, size_type amark) const { - CGAL_assertion( adart!=this->null_dart_handle ); + CGAL_assertion( adart!=this->null_dart_descriptor ); CGAL_assertion( is_reserved(amark) ); if (!is_marked(adart, amark)) return; @@ -389,12 +389,12 @@ class Face_graph_wrapper { typedef CGAL::internal::FGW_cell_iterator iterator; typedef CGAL::internal::FGW_cell_iterator const_iterator; - Dart_of_cell_range(const Self &amap, Dart_handle adart) : mmap(amap), + Dart_of_cell_range(const Self &amap, Dart_descriptor adart) : mmap(amap), m_initdart(adart), msize(0) {} const_iterator begin() const { return const_iterator(mmap, m_initdart); } - const_iterator end() const { return const_iterator(mmap, m_initdart, mmap.null_handle); } + const_iterator end() const { return const_iterator(mmap, m_initdart, mmap.null_descriptor); } size_type size() const { if (msize==0) @@ -409,7 +409,7 @@ class Face_graph_wrapper { return mmap.is_empty(); } private: const Self & mmap; - Dart_handle m_initdart; + Dart_descriptor m_initdart; mutable typename Self::size_type msize; }; //************************************************************************** @@ -419,11 +419,11 @@ class Face_graph_wrapper {}; */ //-------------------------------------------------------------------------- template - Dart_of_cell_range darts_of_cell(Dart_handle adart) + Dart_of_cell_range darts_of_cell(Dart_descriptor adart) { return Dart_of_cell_range(*this,adart); } //-------------------------------------------------------------------------- template - Dart_of_cell_range darts_of_cell(Dart_const_handle adart) const + Dart_of_cell_range darts_of_cell(Dart_const_descriptor adart) const { return Dart_of_cell_range(*this,adart); } // Before it was Dart_of_cell_const_range //************************************************************************** // Dart_range @@ -433,9 +433,9 @@ class Face_graph_wrapper Dart_range(const Self &amap) : mmap(amap), msize(0) {} iterator begin() { return iterator(mmap); } - iterator end() { return iterator(mmap,mmap.null_handle); } + iterator end() { return iterator(mmap,mmap.null_descriptor); } const_iterator begin() const { return const_iterator(mmap); } - const_iterator end() const { return const_iterator(mmap,mmap.null_handle); } + const_iterator end() const { return const_iterator(mmap,mmap.null_descriptor); } size_type size() const { if (msize==0) @@ -457,7 +457,7 @@ class Face_graph_wrapper run(mmap.get_fg(), *it); } - size_type index(Dart_const_handle it) const + size_type index(Dart_const_descriptor it) const { return internal::Index_from_halfedge_descriptor:: run(mmap.get_fg(), it); @@ -474,7 +474,7 @@ class Face_graph_wrapper Dart_const_range(const Self &amap) : mmap(amap), msize(0) {} const_iterator begin() const { return const_iterator(mmap); } - const_iterator end() const { return const_iterator(mmap,mmap.null_handle); } + const_iterator end() const { return const_iterator(mmap,mmap.null_descriptor); } size_type size() const { if (msize==0) @@ -498,20 +498,20 @@ class Face_graph_wrapper const Dart_range& darts() const { return mdarts; } // Before it was Dart_const_range(*this) //************************************************************************** - Dart_handle dart_handle(size_type i) + Dart_descriptor dart_descriptor(size_type i) { CGAL_assertion(darts().is_used(i)); return internal::Halfedge_descriptor_from_index::run(get_fg(), i); } - Dart_const_handle dart_handle(size_type i) const + Dart_const_descriptor dart_descriptor(size_type i) const { CGAL_assertion(darts().is_used(i)); return internal::Halfedge_descriptor_from_index::run(get_fg(), i); } template - bool belong_to_same_cell(Dart_const_handle adart1, - Dart_const_handle adart2) const + bool belong_to_same_cell(Dart_const_descriptor adart1, + Dart_const_descriptor adart2) const { for (typename Dart_of_cell_range::iterator it=darts_of_cell(adart1).begin(), itend=darts_of_cell(adart1).end(); it!=itend; ++it) @@ -520,7 +520,7 @@ class Face_graph_wrapper } template - bool is_whole_cell_unmarked(Dart_const_handle adart, size_type amark) const + bool is_whole_cell_unmarked(Dart_const_descriptor adart, size_type amark) const { for (typename Dart_of_cell_range::iterator it=darts_of_cell(adart).begin(), itend=darts_of_cell(adart).end(); it!=itend; ++it) @@ -529,7 +529,7 @@ class Face_graph_wrapper } template - bool is_whole_cell_marked(Dart_const_handle adart, size_type amark) const + bool is_whole_cell_marked(Dart_const_descriptor adart, size_type amark) const { for (typename Dart_of_cell_range::iterator it=darts_of_cell(adart).begin(), itend=darts_of_cell(adart).end(); it!=itend; ++it) @@ -538,7 +538,7 @@ class Face_graph_wrapper } template - size_type mark_cell(Dart_const_handle adart, size_type amark) const + size_type mark_cell(Dart_const_descriptor adart, size_type amark) const { size_type res=0; for (typename Dart_of_cell_range::iterator it=darts_of_cell(adart).begin(), @@ -547,7 +547,7 @@ class Face_graph_wrapper return res; } - size_type mark_cell(Dart_const_handle adart, unsigned int i, size_type amark) const + size_type mark_cell(Dart_const_descriptor adart, unsigned int i, size_type amark) const { if (i==0) { return mark_cell<0>(adart, amark); } else if (i==1) { return mark_cell<1>(adart, amark); } @@ -556,7 +556,7 @@ class Face_graph_wrapper } template - size_type unmark_cell(Dart_const_handle adart, size_type amark) const + size_type unmark_cell(Dart_const_descriptor adart, size_type amark) const { size_type res=0; for (typename Dart_of_cell_range::iterator it=darts_of_cell(adart).begin(), @@ -566,7 +566,7 @@ class Face_graph_wrapper } template - size_type mark_oriented_cell(Dart_const_handle adart, size_type amark, + size_type mark_oriented_cell(Dart_const_descriptor adart, size_type amark, size_type amark2=INVALID_MARK) const { size_type res=0; @@ -580,7 +580,7 @@ class Face_graph_wrapper } template - size_type unmark_oriented_cell(Dart_const_handle adart, size_type amark, + size_type unmark_oriented_cell(Dart_const_descriptor adart, size_type amark, size_type amark2=INVALID_MARK) const { size_type res=0; @@ -740,21 +740,21 @@ class Face_graph_wrapper mutable MarkPMap m_all_marks; }; - /// null_handle + /// null_descriptor // template - // const typename Face_graph_wrapper::Null_handle_type - // Face_graph_wrapper::null_handle=nullptr; + // const typename Face_graph_wrapper::Null_descriptor_type + // Face_graph_wrapper::null_descriptor=nullptr; template - const typename Face_graph_wrapper::Null_handle_type - Face_graph_wrapper::null_handle=typename Face_graph_wrapper::Dart_handle(); + const typename Face_graph_wrapper::Null_descriptor_type + Face_graph_wrapper::null_descriptor=typename Face_graph_wrapper::Dart_descriptor(); - /// null_dart_handle + /// null_dart_descriptor // template - // const typename Face_graph_wrapper::Null_handle_type - // Face_graph_wrapper::null_dart_handle=nullptr; + // const typename Face_graph_wrapper::Null_descriptor_type + // Face_graph_wrapper::null_dart_descriptor=nullptr; template - const typename Face_graph_wrapper::Null_handle_type - Face_graph_wrapper::null_dart_handle=typename Face_graph_wrapper::Dart_handle(); + const typename Face_graph_wrapper::Null_descriptor_type + Face_graph_wrapper::null_dart_descriptor=typename Face_graph_wrapper::Dart_descriptor(); template struct Get_map @@ -893,8 +893,8 @@ class Face_graph_wrapper typedef typename Mesh::Point Point; typedef typename Mesh::Vector Vector; - template - static const Point& get_point(const Mesh& m, Dart_handle dh) + template + static const Point& get_point(const Mesh& m, Dart_descriptor dh) { return m.point(dh); } }; @@ -906,8 +906,8 @@ class Face_graph_wrapper typedef typename Kernel::Point_3 Point; typedef typename Kernel::Vector_3 Vector; - template - static const Point& get_point(const Mesh& m, Dart_handle dh) + template + static const Point& get_point(const Mesh& m, Dart_descriptor dh) { return m.point(m.source(dh)); } }; @@ -924,8 +924,8 @@ class Face_graph_wrapper typedef typename Kernel::Point_3 Point; typedef typename Kernel::Vector_3 Vector; - template - static const Point& get_point(const Mesh& /*m*/, Dart_handle dh) + template + static const Point& get_point(const Mesh& /*m*/, Dart_descriptor dh) { return dh->opposite()->vertex()->point(); } }; diff --git a/thirdparty/CGAL/include/CGAL/Filter_circulator.h b/thirdparty/CGAL/include/CGAL/Filter_circulator.h index c4fc482b..2bc9d205 100644 --- a/thirdparty/CGAL/include/CGAL/Filter_circulator.h +++ b/thirdparty/CGAL/include/CGAL/Filter_circulator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Filter_circulator.h $ -// $Id: Filter_circulator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Filter_circulator.h $ +// $Id: include/CGAL/Filter_circulator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_bbox_circular_kernel_2.h b/thirdparty/CGAL/include/CGAL/Filtered_bbox_circular_kernel_2.h index 7a39314f..dc2d5d35 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_bbox_circular_kernel_2.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_bbox_circular_kernel_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Filtered_bbox_circular_kernel_2.h $ -// $Id: Filtered_bbox_circular_kernel_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Filtered_bbox_circular_kernel_2.h $ +// $Id: include/CGAL/Filtered_bbox_circular_kernel_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h b/thirdparty/CGAL/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h index c0a7d0ca..9129794c 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h $ -// $Id: bbox_filtered_predicates.h 5c8df66 2020-09-25T14:25:14+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h $ +// $Id: include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Constantinos Tsirogiannis , Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h b/thirdparty/CGAL/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h index bcd214af..e4cd8ae1 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h @@ -3,12 +3,14 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h $ -// $Id: interface_macros.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h $ +// $Id: include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado +#include + // Partially supported by the IST Programme of the EU as a Shared-cost // RTD (FET Open) Project under Contract No IST-2000-26473 // (ECG - Effective Computational Geometry for Curves and Surfaces) @@ -21,7 +23,7 @@ // It's aimed at being included from within a kernel traits class, this // way we share more code. -// It is the responsability of the including file to correctly set the 2 +// It is the responsibility of the including file to correctly set the 2 // macros CGAL_Filtered_Bbox_Circular_Kernel_pred and CGAL_Filtered_Bbox_Circular_Kernel_cons. // And they are #undefed at the end of this file. diff --git a/thirdparty/CGAL/include/CGAL/Filtered_construction.h b/thirdparty/CGAL/include/CGAL/Filtered_construction.h index 5d29c8eb..8e3e1771 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_construction.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_construction.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_construction.h $ -// $Id: Filtered_construction.h c8624ee 2021-09-09T11:01:03+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_construction.h $ +// $Id: include/CGAL/Filtered_construction.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_extended_homogeneous.h b/thirdparty/CGAL/include/CGAL/Filtered_extended_homogeneous.h index ed549b68..481c41e2 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_extended_homogeneous.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_extended_homogeneous.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Filtered_extended_homogeneous.h $ -// $Id: Filtered_extended_homogeneous.h 74c029c 2021-09-09T11:44:36+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Filtered_extended_homogeneous.h $ +// $Id: include/CGAL/Filtered_extended_homogeneous.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel.h index 391ce781..b4ce2d7f 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel.h $ -// $Id: Filtered_kernel.h 561cc66 2022-06-29T12:30:35+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel.h $ +// $Id: include/CGAL/Filtered_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,10 +21,6 @@ #include #include -#include -#include -#include - #include #include @@ -81,13 +77,16 @@ struct Filtered_kernel_base Approximate_kernel approximate_kernel() const { return {}; } // We change the predicates. -#define CGAL_Kernel_pred(P, Pf) \ - typedef Filtered_predicate P; \ +#define CGAL_Kernel_pred_RT_or_FT(P, Pf) \ + typedef Filtered_predicate_RT_FT P; \ P Pf() const { return P(); } -#define CGAL_Kernel_pred_RT(P, Pf) \ - typedef Filtered_predicate P; \ - P Pf() const { return P(); } +#define CGAL_Kernel_pred(P, Pf) CGAL_Kernel_pred_RT_or_FT(P, Pf) // We don't touch the constructions. #define CGAL_Kernel_cons(Y,Z) diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h index b1283a49..cd06c198 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h $ -// $Id: Cartesian_coordinate_iterator_2.h 66c20ba 2021-08-03T16:30:18+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h $ +// $Id: include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -15,14 +15,14 @@ #include #include -#include +#include namespace CGAL { // This class should go away. // It is now only used by the Filtered_kernel. // It allows to iterate over the coordinates of both a Point_2 and a Vector_2, -// using a boost::variant, as the iterator types are the same at the kernel level. +// using a std::variant, as the iterator types are the same at the kernel level. template class Cartesian_coordinate_iterator_2 @@ -31,7 +31,7 @@ class Cartesian_coordinate_iterator_2 protected: typedef typename K::Point_2 P; typedef typename K::Vector_2 V; - boost::variant var; + std::variant var; int index; typedef Cartesian_coordinate_iterator_2 Self; @@ -57,9 +57,9 @@ class Cartesian_coordinate_iterator_2 reference operator*() const { - if (const P* const* p = boost::get(&var)) + if (const P* const* p = std::get_if(&var)) return (*p)->cartesian(index); - const V* const* v = boost::get(&var); + const V* const* v = std::get_if(&var); CGAL_assertion(v != 0); return (*v)->cartesian(index); } diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h index 59feb429..ca542af3 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h $ -// $Id: Cartesian_coordinate_iterator_3.h 66c20ba 2021-08-03T16:30:18+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h $ +// $Id: include/CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -15,14 +15,14 @@ #include #include -#include +#include namespace CGAL { // This class should go away. // It is now only used by the Filtered_kernel. // It allows to iterate over the coordinates of both a Point_3 and a Vector_3, -// using a boost::variant, as the iterator types are the same at the kernel level. +// using a std::variant, as the iterator types are the same at the kernel level. template class Cartesian_coordinate_iterator_3 @@ -31,7 +31,7 @@ class Cartesian_coordinate_iterator_3 protected: typedef typename K::Point_3 P; typedef typename K::Vector_3 V; - boost::variant var; + std::variant var; int index; typedef Cartesian_coordinate_iterator_3 Self; @@ -57,9 +57,9 @@ class Cartesian_coordinate_iterator_3 reference operator*() const { - if (const P* const* p = boost::get(&var)) + if (const P* const* p = std::get_if(&var)) return (*p)->cartesian(index); - const V* const* v = boost::get(&var); + const V* const* v = std::get_if(&var); CGAL_assertion(v != 0); return (*v)->cartesian(index); } diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Angle_3.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Angle_3.h index 785aca54..acd805c1 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Angle_3.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Angle_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Angle_3.h $ -// $Id: Angle_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Angle_3.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Angle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,7 @@ #include #include -// inspired from http://cag.csail.mit.edu/~amy/papers/box-jgt.pdf +// inspired from https://people.csail.mit.edu/amy/papers/box-jgt.pdf namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Collinear_3.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Collinear_3.h index 49a0092b..2a6e3436 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Collinear_3.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Collinear_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Collinear_3.h $ -// $Id: Collinear_3.h c7437c6 2021-09-23T16:14:00+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Collinear_3.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Collinear_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_distance_3.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_distance_3.h index 65d23ab6..2f8325dd 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_distance_3.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_distance_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_distance_3.h $ -// $Id: Compare_distance_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_distance_3.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Compare_distance_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_squared_radius_3.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_squared_radius_3.h index 3122c301..dd1de4ca 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_squared_radius_3.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_squared_radius_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_squared_radius_3.h $ -// $Id: Compare_squared_radius_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_squared_radius_3.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Compare_squared_radius_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_weighted_squared_radius_3.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_weighted_squared_radius_3.h index 7ba5687f..c9e3c530 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_weighted_squared_radius_3.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_weighted_squared_radius_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_weighted_squared_radius_3.h $ -// $Id: Compare_weighted_squared_radius_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_weighted_squared_radius_3.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Compare_weighted_squared_radius_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_x_2.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_x_2.h index 350945e3..525bd821 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_x_2.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_x_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_x_2.h $ -// $Id: Compare_x_2.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_x_2.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Compare_x_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_y_2.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_y_2.h index 3bfcd19b..5069af84 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_y_2.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_y_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_y_2.h $ -// $Id: Compare_y_2.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_y_2.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Compare_y_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_y_at_x_2.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_y_at_x_2.h index e5e9e07c..7cadab56 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_y_at_x_2.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_y_at_x_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_y_at_x_2.h $ -// $Id: Compare_y_at_x_2.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Compare_y_at_x_2.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Compare_y_at_x_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Meyer diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_3.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_3.h index 17d777fb..b3e1ccc9 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_3.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_3.h $ -// $Id: Coplanar_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_3.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_orientation_3.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_orientation_3.h index 3f35a14b..fb643a25 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_orientation_3.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_orientation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_orientation_3.h $ -// $Id: Coplanar_orientation_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_orientation_3.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_orientation_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_side_of_bounded_circle_3.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_side_of_bounded_circle_3.h index 6ea4ddab..1f504490 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_side_of_bounded_circle_3.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_side_of_bounded_circle_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_side_of_bounded_circle_3.h $ -// $Id: Coplanar_side_of_bounded_circle_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_side_of_bounded_circle_3.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Coplanar_side_of_bounded_circle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_2.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_2.h index 7cc013e7..a0f5bf5a 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_2.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_2.h @@ -5,8 +5,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_2.h $ -// $Id: Do_intersect_2.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_2.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_3.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_3.h index b156811c..af315398 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_3.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_3.h @@ -5,8 +5,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_3.h $ -// $Id: Do_intersect_3.h c573ccb 2022-08-24T16:18:07+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_3.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -26,7 +26,7 @@ #include -// inspired from http://cag.csail.mit.edu/~amy/papers/box-jgt.pdf +// inspired from https://people.csail.mit.edu/amy/papers/box-jgt.pdf namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Equal_2.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Equal_2.h index 4fe6b593..c7b581dc 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Equal_2.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Equal_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Equal_2.h $ -// $Id: Equal_2.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Equal_2.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Equal_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Equal_3.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Equal_3.h index 69596dfa..94916061 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Equal_3.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Equal_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Equal_3.h $ -// $Id: Equal_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Equal_3.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Equal_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Is_degenerate_3.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Is_degenerate_3.h index e718b592..ee0978d2 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Is_degenerate_3.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Is_degenerate_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Is_degenerate_3.h $ -// $Id: Is_degenerate_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Is_degenerate_3.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Is_degenerate_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Orientation_2.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Orientation_2.h index 666a01a3..cafe4303 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Orientation_2.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Orientation_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Orientation_2.h $ -// $Id: Orientation_2.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Orientation_2.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Orientation_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Orientation_3.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Orientation_3.h index b79a5c74..66b2ed4b 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Orientation_3.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Orientation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Orientation_3.h $ -// $Id: Orientation_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Orientation_3.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Orientation_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Power_side_of_oriented_power_circle_2.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Power_side_of_oriented_power_circle_2.h new file mode 100644 index 00000000..d201fc19 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Power_side_of_oriented_power_circle_2.h @@ -0,0 +1,329 @@ +// Copyright (c) 2023 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Power_side_of_oriented_power_circle_2.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Power_side_of_oriented_power_circle_2.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Sebastien Loriot +// This predicates was generated using the fpg tool written by Andreas Meyer. +// + +#ifndef CGAL_INTERNAL_STATIC_FILTERS_POWER_TEST_2_H +#define CGAL_INTERNAL_STATIC_FILTERS_POWER_TEST_2_H + +#include +#include +#include +#include + + +namespace CGAL { namespace internal { namespace Static_filters_predicates { + + template + class Power_side_of_oriented_power_circle_2: + public K_base::Power_side_of_oriented_power_circle_2 + { + typedef typename K_base::Weighted_point_2 Weighted_point_2; + typedef typename K_base::FT FT; + typedef typename K_base::Power_side_of_oriented_power_circle_2 Base; + public: + typedef typename Base::result_type result_type; + + using Base::operator(); + + result_type operator() ( const Weighted_point_2 & p, + const Weighted_point_2 & q, + const Weighted_point_2 & r, + const Weighted_point_2 & t) const + { + CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Power_side_of_power_circle_2 with 3+1 wpoints", tmp); + + double px, py, pwt, qx, qy, qwt, rx, ry, rwt, tx, ty, twt; + init_double(px, py, pwt, qx, qy, qwt, rx, ry, rwt, (FT*)(0)); + init_double(tx, ty, twt, (FT*)(0)); + if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py) && + fit_in_double(p.weight(), pwt) && + fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy) && + fit_in_double(q.weight(), qwt) && + fit_in_double(r.x(), rx) && fit_in_double(r.y(), ry) && + fit_in_double(r.weight(), rwt) && + fit_in_double(t.x(), tx) && fit_in_double(t.y(), ty) && + fit_in_double(t.weight(), twt) + ) + { + CGAL_BRANCH_PROFILER_BRANCH_1(tmp); + double dpx = (px - tx); + double dpy = (py - ty); + double dpz = (((square( dpx ) + square( dpy )) - pwt) + twt); + double dqx = (qx - tx); + double dqy = (qy - ty); + double dqz = (((square( dqx ) + square( dqy )) - qwt) + twt); + double drx = (rx - tx); + double dry = (ry - ty); + double drz = (((square( drx ) + square( dry )) - rwt) + twt); + result_type int_tmp_result; + double RT_tmp_result; + double eps; + RT_tmp_result = CGAL::determinant( dpx, dpy, dpz, dqx, dqy, dqz, drx, dry, drz ); + double max1; + double max3 = CGAL::abs(dpy); + if( (max3 < CGAL::abs(dqy)) ) + { + max3 = CGAL::abs(dqy); + } + if( (max3 < CGAL::abs(dry)) ) + { + max3 = CGAL::abs(dry); + } + max1 = max3; + double max2 = CGAL::abs(dpx); + if( (max2 < CGAL::abs(dqx)) ) + { + max2 = CGAL::abs(dqx); + } + if( (max2 < CGAL::abs(drx)) ) + { + max2 = CGAL::abs(drx); + } + if( (max1 < max2) ) + { + max1 = max2; + } + double max4 = CGAL::abs(pwt); + if( (max4 < CGAL::abs(qwt)) ) + { + max4 = CGAL::abs(qwt); + } + if( (max4 < CGAL::abs(rwt)) ) + { + max4 = CGAL::abs(rwt); + } + if( (max4 < CGAL::abs(twt)) ) + { + max4 = CGAL::abs(twt); + } + double lower_bound_1; + double upper_bound_1; + lower_bound_1 = max3; + upper_bound_1 = max3; + if( (max1 < lower_bound_1) ) + { + lower_bound_1 = max1; + } + else + { + if( (max1 > upper_bound_1) ) + { + upper_bound_1 = max1; + } + } + if( (max2 < lower_bound_1) ) + { + lower_bound_1 = max2; + } + if( ((lower_bound_1 < 2.99168207048872973507e-74) || (max4 < 8.95016161088373414772e-148)) ) + { + CGAL_BRANCH_PROFILER_BRANCH_2(tmp); + return Base::operator()(p,q,r,t); + } + else + { + if( ((upper_bound_1 > 1.44740111546645180002e+76) || (max4 > 2.09496998905352916869e+152)) ) + { + CGAL_BRANCH_PROFILER_BRANCH_2(tmp); + return Base::operator()(p,q,r,t); + } + eps = (2.77768297369183927919e-14 * ((max2 * max3) * (CGAL::max)( max4, (max1 * max1) ))); + if( (RT_tmp_result > eps) ) + { + int_tmp_result = POSITIVE; + } + else + { + if( (RT_tmp_result < -eps) ) + { + int_tmp_result = NEGATIVE; + } + else + { + CGAL_BRANCH_PROFILER_BRANCH_2(tmp); + return Base::operator()(p,q,r,t); + } + } + } + return int_tmp_result; + + } + else + return Base::operator()(p,q,r,t); + } + + + result_type operator() ( const Weighted_point_2 & p, + const Weighted_point_2 & q, + const Weighted_point_2 & t) const + { + + CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Power_side_of_oriented_power_circle_2 with 2+1 wpoints", tmp); + + double px, py, pwt, qx, qy, qwt, tx, ty, twt; + init_double(px, py, pwt, qx, qy, qwt, (FT*)(0)); + init_double( tx, ty, twt, (FT*)(0)); + if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py) && + fit_in_double(p.weight(), pwt) && + fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy) && + fit_in_double(q.weight(), qwt) && + fit_in_double(t.x(), tx) && fit_in_double(t.y(), ty) && + fit_in_double(t.weight(), twt) + ) + { + CGAL_BRANCH_PROFILER_BRANCH_1(tmp); + double dpx = (px - tx); + double dpy = (py - ty); + double dpz = (((square( dpx ) + square( dpy )) - pwt) + twt); + double dqx = (qx - tx); + double dqy = (qy - ty); + double dqz = (((square( dqx ) + square( dqy )) - qwt) + twt); + int cmpx; + cmpx = ((px > qx) ? 1 : ((px < qx) ? -1 : 0)); + double eps; + double max1; + double max4 = CGAL::abs(dpy); + if( (max4 < CGAL::abs(dqy)) ) + { + max4 = CGAL::abs(dqy); + } + max1 = max4; + double max2 = CGAL::abs(dpx); + if( (max2 < CGAL::abs(dqx)) ) + { + max2 = CGAL::abs(dqx); + } + if( (max1 < max2) ) + { + max1 = max2; + } + double max3 = CGAL::abs(pwt); + if( (max3 < CGAL::abs(qwt)) ) + { + max3 = CGAL::abs(qwt); + } + if( (max3 < CGAL::abs(twt)) ) + { + max3 = CGAL::abs(twt); + } + double lower_bound_1; + double upper_bound_1; + if( (cmpx != 0) ) + { + result_type int_tmp_result; + double RT_tmp_result; + RT_tmp_result = CGAL::determinant( dpx, dpz, dqx, dqz ); + lower_bound_1 = max2; + upper_bound_1 = max2; + if( (max1 < lower_bound_1) ) + { + lower_bound_1 = max1; + } + else + { + if( (max1 > upper_bound_1) ) + { + upper_bound_1 = max1; + } + } + if( ((lower_bound_1 < 1.54785988882306922244e-98) || (max3 < 2.39587023542736329316e-196)) ) + { + CGAL_BRANCH_PROFILER_BRANCH_2(tmp); + return Base::operator()(p,q,t); + } + else + { + if( ((upper_bound_1 > 5.59936185544450866143e+101) || (max3 > 3.13528531882069741921e+203)) ) + { + CGAL_BRANCH_PROFILER_BRANCH_2(tmp); + return Base::operator()(p,q,t); + } + eps = (5.99997572250729588410e-15 * (max2 * (CGAL::max)( max3, (max1 * max1) ))); + if( (RT_tmp_result > eps) ) + { + int_tmp_result = POSITIVE; + } + else + { + if( (RT_tmp_result < -eps) ) + { + int_tmp_result = NEGATIVE; + } + else + { + CGAL_BRANCH_PROFILER_BRANCH_2(tmp); + return Base::operator()(p,q,t); + } + } + } + return static_cast(cmpx * int_tmp_result); + } + int cmpy; + cmpy = ((py > qy) ? 1 : ((py < qy) ? -1 : 0)); + result_type int_tmp_result_FFWKCAA; + double RT_tmp_result_k60Ocge = CGAL::determinant( dpy, dpz, dqy, dqz ); + lower_bound_1 = max4; + upper_bound_1 = max4; + if( (max1 < lower_bound_1) ) + { + lower_bound_1 = max1; + } + else + { + if( (max1 > upper_bound_1) ) + { + upper_bound_1 = max1; + } + } + if( ((lower_bound_1 < 1.54785988882306922244e-98) || (max3 < 2.39587023542736329316e-196)) ) + { + CGAL_BRANCH_PROFILER_BRANCH_2(tmp); + return Base::operator()(p,q,t); + } + else + { + if( ((upper_bound_1 > 5.59936185544450866143e+101) || (max3 > 3.13528531882069741921e+203)) ) + { + CGAL_BRANCH_PROFILER_BRANCH_2(tmp); + return Base::operator()(p,q,t); + } + eps = (5.99997572250729588410e-15 * (max4 * (CGAL::max)( max3, (max1 * max1) ))); + if( (RT_tmp_result_k60Ocge > eps) ) + { + int_tmp_result_FFWKCAA = POSITIVE; + } + else + { + if( (RT_tmp_result_k60Ocge < -eps) ) + { + int_tmp_result_FFWKCAA = NEGATIVE; + } + else + { + CGAL_BRANCH_PROFILER_BRANCH_2(tmp); + return Base::operator()(p,q,t); + } + } + } + return static_cast(cmpy * int_tmp_result_FFWKCAA); + + } + else + return Base::operator()(p,q,t); + } + + + }; + + } } }//namespace CGAL::internal::Static_filters_predicates + +#endif //CGAL_INTERNAL_STATIC_FILTERS_POWER_TEST_2_H diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Power_side_of_oriented_power_sphere_3.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Power_side_of_oriented_power_sphere_3.h index 1988cd33..5e20c404 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Power_side_of_oriented_power_sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Power_side_of_oriented_power_sphere_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Power_side_of_oriented_power_sphere_3.h $ -// $Id: Power_side_of_oriented_power_sphere_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Power_side_of_oriented_power_sphere_3.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Power_side_of_oriented_power_sphere_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot @@ -293,7 +293,6 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates { double drt = (((square( drx ) + square( dry )) + square( drz )) + twt_rwt); int cmp; int int_tmp_result; - double eps; double RT_tmp_result = CGAL::determinant( dpx, dpy, dpt, dqx, dqy, dqt, drx, dry, drt ); double max7 = CGAL::abs(dpz); @@ -371,217 +370,45 @@ namespace CGAL { namespace internal { namespace Static_filters_predicates { if( max5 < aqx_rx ) max5 = aqx_rx; double max6 = CGAL::abs(qy_ry); if( max6 < apy_ry ) max6 = apy_ry; - if( (cmp != 0) ) - { - int int_tmp_result_FFWKCAA; - double double_tmp_result; - double_tmp_result = ((px_rx * qy_ry) - (qx_rx * py_ry)); - lower_bound_1 = max5; - upper_bound_1 = max5; - if( (max6 < lower_bound_1) ) lower_bound_1 = max6; - else - { - if( (max6 > upper_bound_1) ) upper_bound_1 = max6; - } - if( (lower_bound_1 < 5.00368081960964690982e-147) ) - { - CGAL_BRANCH_PROFILER_BRANCH_2(tmp); - return Base::operator()(p,q,r,t); - } - else - { - if( (upper_bound_1 > 7.23700557733225980357e+75) ) - { - CGAL_BRANCH_PROFILER_BRANCH_2(tmp); - return Base::operator()(p,q,r,t); - } - double eps = (8.88720573725927976811e-16 * (max5 * max6)); - if( (double_tmp_result > eps) ) int_tmp_result_FFWKCAA = 1; - else - { - if( (double_tmp_result < -eps) ) - { - int_tmp_result_FFWKCAA = -1; - } - else - { - CGAL_BRANCH_PROFILER_BRANCH_2(tmp); - return Base::operator()(p,q,r,t); - } - } - } - return static_cast(cmp * int_tmp_result_FFWKCAA); - } - int int_tmp_result_k60Ocge; - double RT_tmp_result_3SPBwDj = CGAL::determinant( dpx, dpz, dpt, dqx, dqz, dqt, drx, drz, drt ); - lower_bound_1 = max1; - upper_bound_1 = max1; - if( (max7 < lower_bound_1) ) lower_bound_1 = max7; - if( (max2 < lower_bound_1) ) lower_bound_1 = max2; - //handwritten workaround to handle case where all weights are equal - //if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148)) ) - if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148 && max4!=0)) ) - { - CGAL_BRANCH_PROFILER_BRANCH_2(tmp); - return Base::operator()(p,q,r,t); - } - else - { - if( ((upper_bound_1 > 7.23700557733225980357e+75) || (max4 > 5.23742497263382350320e+151)) ) - { - CGAL_BRANCH_PROFILER_BRANCH_2(tmp); - return Base::operator()(p,q,r,t); - } - eps = (3.04426660386257731823e-14 * ((max2 * max7) * (CGAL::max)( max4, (max1 * max1) ))); - if( (RT_tmp_result_3SPBwDj > eps) ) - { - int_tmp_result_k60Ocge = 1; - } - else - { - if( (RT_tmp_result_3SPBwDj < -eps) ) - { - int_tmp_result_k60Ocge = -1; - } - else - { - CGAL_BRANCH_PROFILER_BRANCH_2(tmp); - return Base::operator()(p,q,r,t); - } - } - } - cmp = int_tmp_result_k60Ocge; - double qz_rz = (qz - rz); - double pz_rz = (pz - rz); - double max8 = CGAL::abs(qz_rz); - double apz_rz = CGAL::abs(pz_rz); - if( max8 < apz_rz ) max8 = apz_rz; - if( (cmp != 0) ) - { - int int_tmp_result_k3Lzf6g; - double double_tmp_result_Gx4H; - double_tmp_result_Gx4H = ((px_rx * qz_rz) - (qx_rx * pz_rz)); - lower_bound_1 = max5; - upper_bound_1 = max5; - if( (max8 < lower_bound_1) ) lower_bound_1 = max8; - else - { - if( (max8 > upper_bound_1) ) upper_bound_1 = max8; - } - if( (lower_bound_1 < 5.00368081960964690982e-147) ) - { - CGAL_BRANCH_PROFILER_BRANCH_2(tmp); - return Base::operator()(p,q,r,t); - } - else - { - if( (upper_bound_1 > 7.23700557733225980357e+75) ) - { - CGAL_BRANCH_PROFILER_BRANCH_2(tmp); - return Base::operator()(p,q,r,t); - } - eps = (8.88720573725927976811e-16 * (max5 * max8)); - if( (double_tmp_result_Gx4H > eps) ) - { - int_tmp_result_k3Lzf6g = 1; - } - else - { - if( (double_tmp_result_Gx4H < -eps) ) - { - int_tmp_result_k3Lzf6g = -1; - } - else - { - CGAL_BRANCH_PROFILER_BRANCH_2(tmp); - return Base::operator()(p,q,r,t); - } - } - } - return static_cast(cmp * int_tmp_result_k3Lzf6g); - } - int int_tmp_result_AvrrXBP; - double RT_tmp_result_feLwnHn = CGAL::determinant( dpy, dpz, dpt, dqy, dqz, dqt, dry, drz, drt ); - lower_bound_1 = max1; - upper_bound_1 = max1; - if( (max7 < lower_bound_1) ) lower_bound_1 = max7; - if( (max3 < lower_bound_1) ) lower_bound_1 = max3; - //handwritten workaround to handle case where all weights are equal - //if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148)) ) - if( ((lower_bound_1 < 2.92391967062015793913e-74) || (max4 < 8.54930624023949352313e-148 && max4!=0)) ) - { - CGAL_BRANCH_PROFILER_BRANCH_2(tmp); - return Base::operator()(p,q,r,t); - } - else - { - if( ((upper_bound_1 > 7.23700557733225980357e+75) || (max4 > 5.23742497263382350320e+151)) ) - { - CGAL_BRANCH_PROFILER_BRANCH_2(tmp); - return Base::operator()(p,q,r,t); - } - eps = (3.04426660386257731823e-14 * ((max3 * max7) * (CGAL::max)( max4, (max1 * max1) ))); - if( (RT_tmp_result_feLwnHn > eps) ) - { - int_tmp_result_AvrrXBP = 1; - } - else - { - if( (RT_tmp_result_feLwnHn < -eps) ) - { - int_tmp_result_AvrrXBP = -1; - } - else - { - CGAL_BRANCH_PROFILER_BRANCH_2(tmp); - return Base::operator()(p,q,r,t); - } - } - } - cmp = int_tmp_result_AvrrXBP; - int int_tmp_result_agX3WsT; - double double_tmp_result_Dw20Kqh = ((py_ry * qz_rz) - (qy_ry * pz_rz)); - lower_bound_1 = max8; - upper_bound_1 = max8; - if( (max6 < lower_bound_1) ) - { - lower_bound_1 = max6; - } + + int int_tmp_result_FFWKCAA; + double double_tmp_result; + double_tmp_result = ((px_rx * qy_ry) - (qx_rx * py_ry)); + lower_bound_1 = max5; + upper_bound_1 = max5; + if( (max6 < lower_bound_1) ) lower_bound_1 = max6; else - { + { if( (max6 > upper_bound_1) ) upper_bound_1 = max6; - } + } if( (lower_bound_1 < 5.00368081960964690982e-147) ) - { - CGAL_BRANCH_PROFILER_BRANCH_2(tmp); - return Base::operator()(p,q,r,t); - } + { + CGAL_BRANCH_PROFILER_BRANCH_2(tmp); + return Base::operator()(p,q,r,t); + } else - { + { if( (upper_bound_1 > 7.23700557733225980357e+75) ) - { - CGAL_BRANCH_PROFILER_BRANCH_2(tmp); - return Base::operator()(p,q,r,t); - } - eps = (8.88720573725927976811e-16 * (max6 * max8)); - if( (double_tmp_result_Dw20Kqh > eps) ) - { - int_tmp_result_agX3WsT = 1; - } + { + CGAL_BRANCH_PROFILER_BRANCH_2(tmp); + return Base::operator()(p,q,r,t); + } + double eps = (8.88720573725927976811e-16 * (max5 * max6)); + if( (double_tmp_result > eps) ) int_tmp_result_FFWKCAA = 1; else - { - if( (double_tmp_result_Dw20Kqh < -eps) ) - { - int_tmp_result_agX3WsT = -1; - } + { + if( (double_tmp_result < -eps) ) + { + int_tmp_result_FFWKCAA = -1; + } else - { - CGAL_BRANCH_PROFILER_BRANCH_2(tmp); - return Base::operator()(p,q,r,t); - } - } - } - return static_cast(cmp * int_tmp_result_agX3WsT); + { + CGAL_BRANCH_PROFILER_BRANCH_2(tmp); + return Base::operator()(p,q,r,t); + } + } + } + return static_cast(cmp * int_tmp_result_FFWKCAA); } else return Base::operator()(p,q,r,t); diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_circle_2.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_circle_2.h index 5fca3908..f6698314 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_circle_2.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_circle_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_circle_2.h $ -// $Id: Side_of_oriented_circle_2.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_circle_2.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_circle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_sphere_3.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_sphere_3.h index 1842b380..bc767382 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_sphere_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_sphere_3.h $ -// $Id: Side_of_oriented_sphere_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_sphere_3.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_sphere_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Static_filter_error.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Static_filter_error.h index fc2de371..8976c84e 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Static_filter_error.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Static_filter_error.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Static_filter_error.h $ -// $Id: Static_filter_error.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Static_filter_error.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Static_filter_error.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -129,7 +129,7 @@ struct Static_filter_error // variable. // _e is a bound on the absolute error (difference between _b and the // _real_ value of the variable. - // _d is the degree of the variable, it allows some additionnal checks. + // _d is the degree of the variable, it allows some additional checks. double _b, _e; int _d; }; diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Static_filters.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Static_filters.h index d852d19f..96502acb 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Static_filters.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/Static_filters.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Static_filters.h $ -// $Id: Static_filters.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Static_filters.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/Static_filters.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -70,6 +70,7 @@ #include #include #include +#include #include #include @@ -124,6 +125,7 @@ class Static_filters : public K_base typedef Static_filters_predicates::Coplanar_3 Coplanar_3; typedef Static_filters_predicates::Compare_weighted_squared_radius_3 Compare_weighted_squared_radius_3; + typedef Static_filters_predicates::Power_side_of_oriented_power_circle_2 Power_side_of_oriented_power_circle_2; typedef Static_filters_predicates::Power_side_of_oriented_power_sphere_3 Power_side_of_oriented_power_sphere_3; typedef Static_filters_predicates::Compare_distance_3 Compare_distance_3; @@ -189,6 +191,10 @@ class Static_filters : public K_base coplanar_3_object() const { return Coplanar_3(); } + Power_side_of_oriented_power_circle_2 + power_side_of_oriented_power_circle_2_object() const + { return Power_side_of_oriented_power_circle_2();} + Power_side_of_oriented_power_sphere_3 power_side_of_oriented_power_sphere_3_object() const { return Power_side_of_oriented_power_sphere_3();} diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/tools.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/tools.h index f4467cd2..56654b02 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/tools.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel/internal/Static_filters/tools.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/tools.h $ -// $Id: tools.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/tools.h $ +// $Id: include/CGAL/Filtered_kernel/internal/Static_filters/tools.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel_d.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel_d.h index 6a2ab0ef..b27005aa 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel_d.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Filtered_kernel_d.h $ -// $Id: Filtered_kernel_d.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Filtered_kernel_d.h $ +// $Id: include/CGAL/Filtered_kernel_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus, Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/Filtered_kernel_fwd.h b/thirdparty/CGAL/include/CGAL/Filtered_kernel_fwd.h index a7f33339..f9b01f68 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_kernel_fwd.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_kernel_fwd.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_kernel_fwd.h $ -// $Id: Filtered_kernel_fwd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_kernel_fwd.h $ +// $Id: include/CGAL/Filtered_kernel_fwd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Filtered_predicate.h b/thirdparty/CGAL/include/CGAL/Filtered_predicate.h index 461707d3..c9043bcf 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_predicate.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_predicate.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_predicate.h $ -// $Id: Filtered_predicate.h 6bae0e3 2021-09-09T11:09:16+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_predicate.h $ +// $Id: include/CGAL/Filtered_predicate.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,6 +19,8 @@ #include #include +#include + namespace CGAL { // This template class is a wrapper that implements the filtering for any @@ -84,15 +86,78 @@ class Filtered_predicate template result_type - operator()(const Args&... args) const; + operator()(const Args&... args) const + { + +#ifndef CGAL_EPICK_NO_INTERVALS + CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); + // Protection is outside the try block as VC8 has the CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG + { + Protect_FPU_rounding p; + try + { + Ares res = ap(c2a(args)...); + if (is_certain(res)) + return get_certain(res); + } + catch (Uncertain_conversion_exception&) {} + } + CGAL_BRANCH_PROFILER_BRANCH(tmp); + Protect_FPU_rounding p(CGAL_FE_TONEAREST); + CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); +#endif // CGAL_EPICK_NO_INTERVALS + return ep(c2e(args)...); + } }; -template +template +class Filtered_predicate_RT_FT +{ + C2E_RT c2e_rt; + C2E_FT c2e_ft; + C2A c2a; + EP_RT ep_rt; + EP_FT ep_ft; + AP ap; + + using Ares = typename Remove_needs_FT::Type; + +public: + using result_type = typename Remove_needs_FT::Type; + +private: + template + struct Call_operator_needs_FT + { + using Actual_approx_res = decltype(ap(c2a(std::declval())...)); + using Approx_res = std::remove_cv_t >; + enum { value = std::is_same >::value }; + }; + + template ::value>* = nullptr> + result_type call(const Args&... args) const { return ep_ft(c2e_ft(args)...); } + + template ::value>* = nullptr> + result_type call(const Args&... args) const { return ep_rt(c2e_rt(args)...); } + +public: + // ## Important note + // + // If you want to remove of rename that member function template `needs_FT`, + // please also change the lines with + // `CGAL_GENERATE_MEMBER_DETECTOR(needs_FT);` + // or `has_needs_FT` in + // the file `Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h`. + template + bool needs_FT(const Args&...) const { return Call_operator_needs_FT::value; } + template -typename Filtered_predicate::result_type -Filtered_predicate:: + result_type operator()(const Args&... args) const -{ + { +#ifndef CGAL_EPICK_NO_INTERVALS CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); // Protection is outside the try block as VC8 has the CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG { @@ -108,9 +173,11 @@ Filtered_predicate:: CGAL_BRANCH_PROFILER_BRANCH(tmp); Protect_FPU_rounding p(CGAL_FE_TONEAREST); CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); - return ep(c2e(args)...); -} +#endif // CGAL_EPICK_NO_INTERVALS + return call(args...); + } +}; -} //namespace CGAL +} // namespace CGAL #endif // CGAL_FILTERED_PREDICATE_H diff --git a/thirdparty/CGAL/include/CGAL/Filtered_predicate_with_state.h b/thirdparty/CGAL/include/CGAL/Filtered_predicate_with_state.h index db6decc2..69c34f54 100644 --- a/thirdparty/CGAL/include/CGAL/Filtered_predicate_with_state.h +++ b/thirdparty/CGAL/include/CGAL/Filtered_predicate_with_state.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Filtered_predicate_with_state.h $ -// $Id: Filtered_predicate_with_state.h 74c029c 2021-09-09T11:44:36+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Filtered_predicate_with_state.h $ +// $Id: include/CGAL/Filtered_predicate_with_state.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ #include #include #include -#include +#include namespace CGAL { @@ -31,7 +31,7 @@ class Filtered_predicate_with_state C2E c2e; C2A c2a; O1 o1; - mutable boost::optional oep; + mutable std::optional oep; AP ap; typedef typename AP::result_type Ares; diff --git a/thirdparty/CGAL/include/CGAL/Fixed_alpha_shape_3.h b/thirdparty/CGAL/include/CGAL/Fixed_alpha_shape_3.h index c8bbda65..83c1acfe 100644 --- a/thirdparty/CGAL/include/CGAL/Fixed_alpha_shape_3.h +++ b/thirdparty/CGAL/include/CGAL/Fixed_alpha_shape_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h $ -// $Id: Fixed_alpha_shape_3.h 115fa5a 2021-12-14T14:01:21+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h $ +// $Id: include/CGAL/Fixed_alpha_shape_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -116,7 +115,7 @@ class Fixed_alpha_shape_3 : public Dt // or INTERIOR with respect to the alpha shape. // A $k$ simplex is REGULAR if it is on the boundary // of the alpha_complex and belongs to a $k+1$ simplex in the complex - // and it is SINGULAR simplex if it is a boundary simplex tht is not + // and it is SINGULAR simplex if it is a boundary simplex that is not // included in a $k+1$ simplex of the complex. // Roughly, the Fixed_alpha_shape data structure computes and stores, @@ -255,7 +254,7 @@ class Fixed_alpha_shape_3 : public Dt std::back_inserter(cells), Emptyset_iterator())); - Facet facet=*boost::prior(facets_on_the_boundary_of_the_hole.end()); + Facet facet=*std::prev(facets_on_the_boundary_of_the_hole.end()); // Remember the points that are hidden by the conflicting cells, // as they will be deleted during the insertion. @@ -280,7 +279,7 @@ class Fixed_alpha_shape_3 : public Dt } } // Erase from edge_status_map, edges that will disappear: - // they are not on the boudary of the hole + // they are not on the boundary of the hole std::set hole_edges; std::pair::iterator,bool> it_hedge_and_not_already_seen; for (typename std::vector::iterator it=cells.begin();it!=cells.end();++it){ @@ -598,7 +597,7 @@ private : } private : - // prevent default copy constructor and default assigment + // prevent default copy constructor and default assignment Fixed_alpha_shape_3(const Fixed_alpha_shape_3&); void operator=(const Fixed_alpha_shape_3&); diff --git a/thirdparty/CGAL/include/CGAL/Fixed_alpha_shape_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Fixed_alpha_shape_cell_base_3.h index af07b25b..1b31037c 100644 --- a/thirdparty/CGAL/include/CGAL/Fixed_alpha_shape_cell_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Fixed_alpha_shape_cell_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_cell_base_3.h $ -// $Id: Fixed_alpha_shape_cell_base_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_cell_base_3.h $ +// $Id: include/CGAL/Fixed_alpha_shape_cell_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Fixed_alpha_shape_vertex_base_3.h b/thirdparty/CGAL/include/CGAL/Fixed_alpha_shape_vertex_base_3.h index 9b65b9e3..0e2110db 100644 --- a/thirdparty/CGAL/include/CGAL/Fixed_alpha_shape_vertex_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Fixed_alpha_shape_vertex_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_vertex_base_3.h $ -// $Id: Fixed_alpha_shape_vertex_base_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_vertex_base_3.h $ +// $Id: include/CGAL/Fixed_alpha_shape_vertex_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Flattening_iterator.h b/thirdparty/CGAL/include/CGAL/Flattening_iterator.h index 7d3d220e..b5194495 100644 --- a/thirdparty/CGAL/include/CGAL/Flattening_iterator.h +++ b/thirdparty/CGAL/include/CGAL/Flattening_iterator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Flattening_iterator.h $ -// $Id: Flattening_iterator.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Flattening_iterator.h $ +// $Id: include/CGAL/Flattening_iterator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Arno Eigenwillig diff --git a/thirdparty/CGAL/include/CGAL/Fourtuple.h b/thirdparty/CGAL/include/CGAL/Fourtuple.h index f3934d1a..18ecacc4 100644 --- a/thirdparty/CGAL/include/CGAL/Fourtuple.h +++ b/thirdparty/CGAL/include/CGAL/Fourtuple.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Fourtuple.h $ -// $Id: Fourtuple.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Fourtuple.h $ +// $Id: include/CGAL/Fourtuple.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Fraction_traits.h b/thirdparty/CGAL/include/CGAL/Fraction_traits.h index b2315bd0..891e92e5 100644 --- a/thirdparty/CGAL/include/CGAL/Fraction_traits.h +++ b/thirdparty/CGAL/include/CGAL/Fraction_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_foundations/include/CGAL/Fraction_traits.h $ -// $Id: Fraction_traits.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_foundations/include/CGAL/Fraction_traits.h $ +// $Id: include/CGAL/Fraction_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Fuzzy_iso_box.h b/thirdparty/CGAL/include/CGAL/Fuzzy_iso_box.h index 54134ca5..6ab7f38a 100644 --- a/thirdparty/CGAL/include/CGAL/Fuzzy_iso_box.h +++ b/thirdparty/CGAL/include/CGAL/Fuzzy_iso_box.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Fuzzy_iso_box.h $ -// $Id: Fuzzy_iso_box.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Fuzzy_iso_box.h $ +// $Id: include/CGAL/Fuzzy_iso_box.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,11 +22,7 @@ #include #include -#include -#include -#include -#include -#include +#include namespace CGAL { @@ -34,13 +30,15 @@ namespace CGAL { namespace internal{ template struct Is_from_point_from_adapter_traits{ - typedef boost::false_type type; + typedef std::false_type type; + static const bool value = false; }; template struct Is_from_point_from_adapter_traits,Point>{ - typedef typename boost::is_same type; + typedef typename std::is_same type; + static const bool value = type::value; }; } //namespace internal @@ -61,9 +59,9 @@ namespace CGAL { private: - typename boost::remove_cv< - typename boost::remove_reference< typename Construct_min_vertex_d::result_type >::type - >::type min, max; + std::remove_cv_t< + std::remove_reference_t< typename Construct_min_vertex_d::result_type > + > min, max; Cartesian_const_iterator_d min_begin, max_begin; FT eps; unsigned int dim; @@ -102,7 +100,7 @@ namespace CGAL { //additional constructor if SearchTraits = Search_traits_adapter template Fuzzy_iso_box(const Point& p,const Point&q,FT epsilon=FT(0),const SearchTraits& traits_=SearchTraits(), - typename boost::enable_if::type>::type* = 0) + std::enable_if_t::value>* = 0) : traits(traits_), eps(epsilon) { CGAL_precondition(epsilon >= 0); diff --git a/thirdparty/CGAL/include/CGAL/Fuzzy_sphere.h b/thirdparty/CGAL/include/CGAL/Fuzzy_sphere.h index 798148ff..e9759abe 100644 --- a/thirdparty/CGAL/include/CGAL/Fuzzy_sphere.h +++ b/thirdparty/CGAL/include/CGAL/Fuzzy_sphere.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Fuzzy_sphere.h $ -// $Id: Fuzzy_sphere.h 65cde3c 2019-12-03T19:18:15+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Fuzzy_sphere.h $ +// $Id: include/CGAL/Fuzzy_sphere.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,6 @@ #include #include -#include namespace CGAL { @@ -154,11 +153,10 @@ class Fuzzy_sphere< Search_traits_adapter > Fuzzy_sphere(const SearchTraits& traits_=SearchTraits()):Base(traits_){} // Constructor for any point type that is not `SearchTraits::Point_d` - template // boost::disable_if requires a template argument to work + template // std::enable_if_t requires a template argument to work Fuzzy_sphere(const Point& center, FT radius, FT epsilon=FT(0),const SearchTraits& traits_=SearchTraits(), - typename boost::disable_if< - boost::is_same >::type* = 0) + std::enable_if_t< + !std::is_same::value >* = 0) : Base(center,radius,epsilon,traits_) {} Fuzzy_sphere(const typename SearchTraits::Point_d& center, FT radius, FT epsilon=FT(0), diff --git a/thirdparty/CGAL/include/CGAL/GLPK_mixed_integer_program_traits.h b/thirdparty/CGAL/include/CGAL/GLPK_mixed_integer_program_traits.h index 080a8197..5b63b5a9 100644 --- a/thirdparty/CGAL/include/CGAL/GLPK_mixed_integer_program_traits.h +++ b/thirdparty/CGAL/include/CGAL/GLPK_mixed_integer_program_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Solver_interface/include/CGAL/GLPK_mixed_integer_program_traits.h $ -// $Id: GLPK_mixed_integer_program_traits.h 267a641 2021-05-31T14:01:08+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Solver_interface/include/CGAL/GLPK_mixed_integer_program_traits.h $ +// $Id: include/CGAL/GLPK_mixed_integer_program_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Liangliang Nan @@ -56,7 +56,7 @@ int bound_type(FT lb, FT ub) /// `CGAL::SCIP_mixed_integer_program_traits`, or derive a new /// model from `CGAL::Mixed_integer_program_traits`. /// -/// \cgalModels `MixedIntegerProgramTraits` +/// \cgalModels{MixedIntegerProgramTraits} /// /// \sa `SCIP_mixed_integer_program_traits` template diff --git a/thirdparty/CGAL/include/CGAL/GMP/Gmpfi_type.h b/thirdparty/CGAL/include/CGAL/GMP/Gmpfi_type.h index 8f484363..7a9b91a4 100644 --- a/thirdparty/CGAL/include/CGAL/GMP/Gmpfi_type.h +++ b/thirdparty/CGAL/include/CGAL/GMP/Gmpfi_type.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/GMP/Gmpfi_type.h $ -// $Id: Gmpfi_type.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/GMP/Gmpfi_type.h $ +// $Id: include/CGAL/GMP/Gmpfi_type.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda @@ -303,7 +303,7 @@ CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(Gmpz); Gmpfi::Precision_type get_precision()const; Gmpfi round(Gmpfi::Precision_type)const; - // arithmetics + // arithmetic Gmpfi operator+()const; Gmpfi operator-()const; @@ -427,7 +427,7 @@ Gmpfi Gmpfi::round(Gmpfi::Precision_type p)const{ return Gmpfi(*this,p); } -// arithmetics +// arithmetic inline Gmpfi Gmpfi::operator+()const{ diff --git a/thirdparty/CGAL/include/CGAL/GMP/Gmpfi_type_static.h b/thirdparty/CGAL/include/CGAL/GMP/Gmpfi_type_static.h index 821d2166..1f595100 100644 --- a/thirdparty/CGAL/include/CGAL/GMP/Gmpfi_type_static.h +++ b/thirdparty/CGAL/include/CGAL/GMP/Gmpfi_type_static.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/GMP/Gmpfi_type_static.h $ -// $Id: Gmpfi_type_static.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/GMP/Gmpfi_type_static.h $ +// $Id: include/CGAL/GMP/Gmpfi_type_static.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/GMP/Gmpfr_type.h b/thirdparty/CGAL/include/CGAL/GMP/Gmpfr_type.h index abfdc86f..56c311fa 100644 --- a/thirdparty/CGAL/include/CGAL/GMP/Gmpfr_type.h +++ b/thirdparty/CGAL/include/CGAL/GMP/Gmpfr_type.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/GMP/Gmpfr_type.h $ -// $Id: Gmpfr_type.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/GMP/Gmpfr_type.h $ +// $Id: include/CGAL/GMP/Gmpfr_type.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda @@ -378,7 +378,7 @@ class Gmpfr: #undef CGAL_GMPFR_CONSTRUCTOR_FROM_OBJECT - // When Gmpfr is refence counted, we inherit the assignment + // When Gmpfr is reference counted, we inherit the assignment // operator and the copy constructor from Handle_for. #ifdef CGAL_GMPFR_NO_REFCOUNT Gmpfr& operator=(const Gmpfr &a){ @@ -455,7 +455,7 @@ class Gmpfr: static bool inex_flag(); static bool erange_flag(); - // arithmetics + // arithmetic Gmpfr operator+()const; Gmpfr operator-()const; @@ -620,7 +620,7 @@ bool Gmpfr::erange_flag(){ return mpfr_erangeflag_p()!=0; } -// arithmetics +// arithmetic inline Gmpfr Gmpfr::operator+()const{ diff --git a/thirdparty/CGAL/include/CGAL/GMP/Gmpfr_type_static.h b/thirdparty/CGAL/include/CGAL/GMP/Gmpfr_type_static.h index f595a5d4..cc638056 100644 --- a/thirdparty/CGAL/include/CGAL/GMP/Gmpfr_type_static.h +++ b/thirdparty/CGAL/include/CGAL/GMP/Gmpfr_type_static.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/GMP/Gmpfr_type_static.h $ -// $Id: Gmpfr_type_static.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/GMP/Gmpfr_type_static.h $ +// $Id: include/CGAL/GMP/Gmpfr_type_static.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/GMP/Gmpq_type.h b/thirdparty/CGAL/include/CGAL/GMP/Gmpq_type.h index 3d815fa6..a7a53086 100644 --- a/thirdparty/CGAL/include/CGAL/GMP/Gmpq_type.h +++ b/thirdparty/CGAL/include/CGAL/GMP/Gmpq_type.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/GMP/Gmpq_type.h $ -// $Id: Gmpq_type.h ad758d0 2020-05-20T11:59:03+02:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/GMP/Gmpq_type.h $ +// $Id: include/CGAL/GMP/Gmpq_type.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/GMP/Gmpz_type.h b/thirdparty/CGAL/include/CGAL/GMP/Gmpz_type.h index 59a5057e..6472bbc6 100644 --- a/thirdparty/CGAL/include/CGAL/GMP/Gmpz_type.h +++ b/thirdparty/CGAL/include/CGAL/GMP/Gmpz_type.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/GMP/Gmpz_type.h $ -// $Id: Gmpz_type.h eb81d59 2020-11-18T07:43:12+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/GMP/Gmpz_type.h $ +// $Id: include/CGAL/GMP/Gmpz_type.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -324,9 +324,9 @@ gmpz_new_read(std::istream &is, Gmpz &z) // peek() sets also the failbit, one has to check for EOL twice. // // See the LWG C++ Issue 2036, classified as Not-A-Defect: - // http://lwg.github.com/issues/lwg-closed.html#2036 + // https://lwg.github.io/issues/lwg-closed.html#2036 // and a StackOverflow related question: - // http://stackoverflow.com/a/9020292/1728537 + // https://stackoverflow.com/a/9020292/1728537 // -- // Laurent Rineau, 2013/10/10 while (!is.eof()) { diff --git a/thirdparty/CGAL/include/CGAL/GMP/Gmpzf_type.h b/thirdparty/CGAL/include/CGAL/GMP/Gmpzf_type.h index 777670bf..8283358a 100644 --- a/thirdparty/CGAL/include/CGAL/GMP/Gmpzf_type.h +++ b/thirdparty/CGAL/include/CGAL/GMP/Gmpzf_type.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/GMP/Gmpzf_type.h $ -// $Id: Gmpzf_type.h 45b5fd4 2022-07-06T12:58:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/GMP/Gmpzf_type.h $ +// $Id: include/CGAL/GMP/Gmpzf_type.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -166,8 +166,8 @@ class Gmpzf : canonicalize(); } - // arithmetics - // ----------- + // arithmetic + // ---------- Gmpzf operator+() const; Gmpzf operator-() const; Gmpzf& operator+=( const Gmpzf& b); @@ -203,8 +203,8 @@ class Gmpzf : // implementation // ============== -// arithmetics -// ----------- +// arithmetic +// ---------- inline Gmpzf Gmpzf::operator+() const diff --git a/thirdparty/CGAL/include/CGAL/GMPXX_arithmetic_kernel.h b/thirdparty/CGAL/include/CGAL/GMPXX_arithmetic_kernel.h index 7f0a84fe..156521fc 100644 --- a/thirdparty/CGAL/include/CGAL/GMPXX_arithmetic_kernel.h +++ b/thirdparty/CGAL/include/CGAL/GMPXX_arithmetic_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arithmetic_kernel/include/CGAL/GMPXX_arithmetic_kernel.h $ -// $Id: GMPXX_arithmetic_kernel.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arithmetic_kernel/include/CGAL/GMPXX_arithmetic_kernel.h $ +// $Id: include/CGAL/GMPXX_arithmetic_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/GMP_arithmetic_kernel.h b/thirdparty/CGAL/include/CGAL/GMP_arithmetic_kernel.h index 2aaa9f5a..cd9db47f 100644 --- a/thirdparty/CGAL/include/CGAL/GMP_arithmetic_kernel.h +++ b/thirdparty/CGAL/include/CGAL/GMP_arithmetic_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arithmetic_kernel/include/CGAL/GMP_arithmetic_kernel.h $ -// $Id: GMP_arithmetic_kernel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arithmetic_kernel/include/CGAL/GMP_arithmetic_kernel.h $ +// $Id: include/CGAL/GMP_arithmetic_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Hemmer diff --git a/thirdparty/CGAL/include/CGAL/GMap_cell_const_iterators.h b/thirdparty/CGAL/include/CGAL/GMap_cell_const_iterators.h index c142ca51..138f1f71 100644 --- a/thirdparty/CGAL/include/CGAL/GMap_cell_const_iterators.h +++ b/thirdparty/CGAL/include/CGAL/GMap_cell_const_iterators.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generalized_map/include/CGAL/GMap_cell_const_iterators.h $ -// $Id: GMap_cell_const_iterators.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generalized_map/include/CGAL/GMap_cell_const_iterators.h $ +// $Id: include/CGAL/GMap_cell_const_iterators.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -31,11 +31,11 @@ namespace CGAL { { public: typedef GMap_cell_iterator Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; /// Main constructor. GMap_cell_const_iterator(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /// Constructor from non const version. @@ -53,11 +53,11 @@ namespace CGAL { { public: typedef GMap_one_dart_per_incident_cell_iterator Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; /// Main constructor. GMap_one_dart_per_incident_cell_const_iterator(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap, adart) {} /// Constructor from non const version. @@ -74,14 +74,14 @@ namespace CGAL { { public: typedef GMap_one_dart_per_cell_iterator Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; /// Main constructor. GMap_one_dart_per_cell_const_iterator(const Map_& amap): Base(amap) {} /// Constructor with a dart in parameter (for end iterator). GMap_one_dart_per_cell_const_iterator(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap) { this->set_current_dart(adart); } /// Constructor from non const version. diff --git a/thirdparty/CGAL/include/CGAL/GMap_cell_iterators.h b/thirdparty/CGAL/include/CGAL/GMap_cell_iterators.h index 99e7aede..8b66e54a 100644 --- a/thirdparty/CGAL/include/CGAL/GMap_cell_iterators.h +++ b/thirdparty/CGAL/include/CGAL/GMap_cell_iterators.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generalized_map/include/CGAL/GMap_cell_iterators.h $ -// $Id: GMap_cell_iterators.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generalized_map/include/CGAL/GMap_cell_iterators.h $ +// $Id: include/CGAL/GMap_cell_iterators.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -42,7 +42,7 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_all Base; typedef CMap_cell_iterator Self; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; protected: @@ -70,18 +70,18 @@ namespace CGAL { Base(amap), mmark_number(amap.get_new_mark()) { - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, (*this), mmark_number); } /// Constructor with a dart in parameter (for end iterator). - CMap_cell_iterator(Map& amap, Dart_handle adart): + CMap_cell_iterator(Map& amap, Dart_descriptor adart): Base(amap, adart), mmark_number(amap.get_new_mark()) { - if (adart!=this->mmap->null_handle) + if (adart!=this->mmap->null_descriptor) mark_cell(amap, (*this), mmark_number); } @@ -155,7 +155,7 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_all Base; typedef GMap_cell_iterator Self; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; protected: @@ -183,18 +183,18 @@ namespace CGAL { Base(amap), mmark_number(amap.get_new_mark()) { - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, (*this), mmark_number); } /// Constructor with a dart in parameter (for end iterator). - GMap_cell_iterator(Map& amap, Dart_handle adart): + GMap_cell_iterator(Map& amap, Dart_descriptor adart): Base(amap, adart), mmark_number(amap.get_new_mark()) { - if (adart!=this->mmap->null_handle) + if (adart!=this->mmap->null_descriptor) mark_cell(amap, (*this), mmark_number); } @@ -275,14 +275,14 @@ namespace CGAL { dim,Const>, i,dim,Const> Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef Tag_false Use_mark; typedef Tag_false Basic_iterator; /// Main constructor. - GMap_one_dart_per_incident_cell_iterator(Map& amap, Dart_handle adart): + GMap_one_dart_per_incident_cell_iterator(Map& amap, Dart_descriptor adart): Base(amap, adart) {} }; @@ -302,7 +302,7 @@ namespace CGAL { GMap_dart_iterator_basic_of_all, i,dim,Const> Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef Tag_false Use_mark; @@ -312,7 +312,7 @@ namespace CGAL { GMap_one_dart_per_cell_iterator(Map& amap): Base(amap) {} /// Constructor with a dart in parameter (for end iterator). - GMap_one_dart_per_cell_iterator(Map& amap, Dart_handle adart): + GMap_one_dart_per_cell_iterator(Map& amap, Dart_descriptor adart): Base(amap, adart) {} }; diff --git a/thirdparty/CGAL/include/CGAL/GMap_dart_const_iterators.h b/thirdparty/CGAL/include/CGAL/GMap_dart_const_iterators.h index c47ae0e8..c734eb03 100644 --- a/thirdparty/CGAL/include/CGAL/GMap_dart_const_iterators.h +++ b/thirdparty/CGAL/include/CGAL/GMap_dart_const_iterators.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generalized_map/include/CGAL/GMap_dart_const_iterators.h $ -// $Id: GMap_dart_const_iterators.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generalized_map/include/CGAL/GMap_dart_const_iterators.h $ +// $Id: include/CGAL/GMap_dart_const_iterators.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -36,17 +36,17 @@ namespace CGAL { typedef GMap_dart_const_iterator_basic_of_orbit Self; typedef GMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; typedef typename Map_::size_type size_type; /// Main constructor. GMap_dart_const_iterator_basic_of_orbit(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /// Main constructor. GMap_dart_const_iterator_basic_of_orbit(const Map_& amap, - Dart_const_handle adart, + Dart_const_descriptor adart, size_type amark): Base(amap,adart,amark) {} @@ -67,11 +67,11 @@ namespace CGAL { typedef GMap_dart_const_iterator_of_orbit Self; typedef GMap_dart_iterator_of_orbit_generic Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; /// Main constructor. GMap_dart_const_iterator_of_orbit(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /// Constructor from non const version. @@ -88,17 +88,17 @@ namespace CGAL { { public: typedef GMap_dart_iterator_basic_of_all Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; typedef typename Map_::size_type size_type; /* Main constructor. */ GMap_dart_const_iterator_basic_of_all(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /* Main constructor. */ GMap_dart_const_iterator_basic_of_all(const Map_& amap, - Dart_const_handle adart, + Dart_const_descriptor adart, size_type /*amark*/): Base(amap,adart) {} @@ -116,17 +116,17 @@ namespace CGAL { { public: typedef GMap_dart_iterator_basic_of_cell Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; typedef typename Map_::size_type size_type; /* Main constructor. */ GMap_dart_const_iterator_basic_of_cell(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /* Main constructor. */ GMap_dart_const_iterator_basic_of_cell(const Map_& amap, - Dart_const_handle adart, + Dart_const_descriptor adart, size_type amark): Base(amap,adart,amark) {} @@ -144,11 +144,11 @@ namespace CGAL { { public: typedef GMap_dart_iterator_of_cell Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; /* Main constructor. */ GMap_dart_const_iterator_of_cell(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /// Constructor from non const version. @@ -165,17 +165,17 @@ namespace CGAL { { public: typedef GMap_dart_iterator_basic_of_involution Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; typedef typename Map_::size_type size_type; /* Main constructor. */ GMap_dart_const_iterator_basic_of_involution(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /* Main constructor. */ GMap_dart_const_iterator_basic_of_involution(const Map_& amap, - Dart_const_handle adart, + Dart_const_descriptor adart, size_type amark): Base(amap,adart,amark) {} @@ -193,12 +193,12 @@ namespace CGAL { { public: typedef GMap_dart_iterator_of_involution Base; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; typedef typename Map_::size_type size_type; /* Main constructor. */ GMap_dart_const_iterator_of_involution(const Map_& amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap,adart) {} /// Constructor from non const version. diff --git a/thirdparty/CGAL/include/CGAL/GMap_dart_iterators.h b/thirdparty/CGAL/include/CGAL/GMap_dart_iterators.h index 75db2642..d49bd99f 100644 --- a/thirdparty/CGAL/include/CGAL/GMap_dart_iterators.h +++ b/thirdparty/CGAL/include/CGAL/GMap_dart_iterators.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generalized_map/include/CGAL/GMap_dart_iterators.h $ -// $Id: GMap_dart_iterators.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generalized_map/include/CGAL/GMap_dart_iterators.h $ +// $Id: include/CGAL/GMap_dart_iterators.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -47,7 +47,7 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_orbit_generic Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -55,12 +55,12 @@ namespace CGAL { public: /// Main constructor. - GMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart): + GMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart): Base(amap, adart) {} /// Main constructor. - GMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, + GMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} @@ -69,7 +69,7 @@ namespace CGAL { Self& operator++() { CGAL_assertion(this->cont()); - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); this->mprev_op = OP_END; return *this; } @@ -90,22 +90,22 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_orbit_generic Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; typedef Tag_false Use_mark; ///< True iff this iterator uses mark - CGAL_static_assertion( Ai>=0 && Ai<=Map::dimension ); + static_assert( Ai>=0 && Ai<=Map::dimension ); public: /// Main constructor. - GMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart): + GMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart): Base(amap, adart) {} /// Main constructor. - GMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, + GMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} @@ -116,7 +116,7 @@ namespace CGAL { CGAL_assertion(this->cont()); if ((*this)!=this->mfirst_dart || this->mmap->is_free(*this, Ai)) { - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); this->mprev_op = OP_END; } else @@ -147,24 +147,24 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_two_alpha Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; typedef Tag_false Use_mark; ///< True iff this iterator uses mark typedef Tag_true Basic_iterator; ///< True iff this iterator is basic - CGAL_static_assertion( (0<=Ai && Ai+delta<=Map::dimension && delta>1) ); + static_assert(0<=Ai && Ai+delta<=Map::dimension && delta>1); public: /// Main constructor. - GMap_dart_iterator_basic_of_two_alpha(Map& amap, Dart_handle adart): + GMap_dart_iterator_basic_of_two_alpha(Map& amap, Dart_descriptor adart): Base(amap, adart), mcurdart(0) {} /// Main constructor. - GMap_dart_iterator_basic_of_two_alpha(Map& amap, Dart_handle adart, + GMap_dart_iterator_basic_of_two_alpha(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart), mcurdart(0) @@ -201,7 +201,7 @@ namespace CGAL { else { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } } } @@ -216,7 +216,7 @@ namespace CGAL { else { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } } else if (mcurdart==2) @@ -230,7 +230,7 @@ namespace CGAL { { CGAL_assertion (mcurdart==3); this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } return *this; @@ -262,25 +262,25 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_two_alpha Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; typedef Tag_false Use_mark; ///< True iff this iterator uses mark typedef Tag_true Basic_iterator; ///< True iff this iterator is basic - CGAL_static_assertion(0<=Ai && Ai+1<=Map_::dimension); + static_assert(0<=Ai && Ai+1<=Map_::dimension); public: /// Main constructor. - GMap_dart_iterator_basic_of_two_alpha(Map& amap, Dart_handle adart): + GMap_dart_iterator_basic_of_two_alpha(Map& amap, Dart_descriptor adart): Base(amap, adart), mfirst_dir(true), mnext_try_first_alpha(true) {} /// Main constructor. - GMap_dart_iterator_basic_of_two_alpha(Map& amap, Dart_handle adart, + GMap_dart_iterator_basic_of_two_alpha(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart), mfirst_dir(true), @@ -310,7 +310,7 @@ namespace CGAL { if (this->mmap->template is_free(this->mfirst_dart)) { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } else { @@ -334,7 +334,7 @@ namespace CGAL { if (this->mmap->template is_free(this->mfirst_dart)) { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } else { @@ -350,7 +350,7 @@ namespace CGAL { if ((*this)==this->mfirst_dart) { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } else { @@ -367,7 +367,7 @@ namespace CGAL { if (this->mmap->is_free(*this, Ai)) { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } else { @@ -381,7 +381,7 @@ namespace CGAL { if (this->mmap->template is_free(*this)) { this->mprev_op = OP_END; - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); } else { @@ -420,7 +420,7 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_orbit_generic Self; typedef GMap_dart_iterator_basic_of_two_alpha Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -428,12 +428,12 @@ namespace CGAL { public: /// Main constructor. - GMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart) : + GMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart) : Base(amap, adart) {} /// Main constructor. - GMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, + GMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart, size_type amark): Base(amap, adart, amark) {} @@ -461,25 +461,25 @@ namespace CGAL { delta1,delta2> Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; typedef Tag_false Use_mark; ///< True iff this iterator uses mark typedef Tag_true Basic_iterator; ///< True iff this iterator is basic - CGAL_static_assertion( (0<=Ai && delta11) ); + delta1>1); public: /// Main constructor. - GMap_dart_iterator_basic_of_three_alpha(Map& amap, Dart_handle adart): + GMap_dart_iterator_basic_of_three_alpha(Map& amap, Dart_descriptor adart): Base(amap, adart) {} /// Main constructor. - GMap_dart_iterator_basic_of_three_alpha(Map& amap, Dart_handle adart, + GMap_dart_iterator_basic_of_three_alpha(Map& amap, Dart_descriptor adart, size_type): Base(amap, adart) {} @@ -502,17 +502,17 @@ namespace CGAL { typedef GMap_extend_iterator, Ak> Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; typedef Tag_true Basic_iterator; ///< True iff this iterator is basic - CGAL_static_assertion( Ai, Ai> Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -542,7 +542,7 @@ namespace CGAL { public: /// Main constructor. - GMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, + GMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart, size_type amark): Base(amap, adart, amark) {} @@ -557,18 +557,18 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_orbit Self; typedef GMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Map::Dart_handle Dart_handle; + typedef typename Map::Dart_descriptor Dart_descriptor; typedef typename Base::Use_mark Use_mark; ///< True iff this iterator uses mark typedef typename Map::size_type size_type; typedef Tag_true Basic_iterator; ///< True iff this iterator is basic /// Main constructor. - GMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart): + GMap_dart_iterator_basic_of_orbit(Map& amap,Dart_descriptor adart): Base(amap,adart) {} /// Main constructor. - GMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart,size_type amark): + GMap_dart_iterator_basic_of_orbit(Map& amap,Dart_descriptor adart,size_type amark): Base(amap,adart,amark) {} }; @@ -583,24 +583,24 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_cell Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; typedef Tag_true Use_mark; ///< True iff this iterator uses mark typedef Tag_true Basic_iterator; ///< True iff this iterator is basic - CGAL_static_assertion( i>=0 && i<=Map::dimension+1 ); + static_assert( i>=0 && i<=Map::dimension+1 ); public: /// Main constructor. GMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart), mmark_number(amark) { - if (adart!=this->mmap->null_handle) + if (adart!=this->mmap->null_descriptor) this->mmap->mark(adart, mmark_number); } @@ -609,7 +609,7 @@ namespace CGAL { { CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); - mto_treat = std::queue(); + mto_treat = std::queue(); this->mmap->mark(*this, mmark_number); } @@ -618,7 +618,7 @@ namespace CGAL { { CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); - Dart_handle nd = this->mmap->null_handle; + Dart_descriptor nd = this->mmap->null_descriptor; for ( unsigned int k=0; k<=d; ++k ) { @@ -627,7 +627,7 @@ namespace CGAL { !this->mmap->is_marked(this->mmap->alpha(*this, k), this->mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { CGAL_assertion(!this->mmap->is_free(*this, k)); nd = this->mmap->alpha(*this, k); @@ -642,7 +642,7 @@ namespace CGAL { } } - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { if (!mto_treat.empty()) { @@ -666,7 +666,7 @@ namespace CGAL { protected: /// Queue of darts to process. - std::queue mto_treat; + std::queue mto_treat; /// Index of the used mark. size_type mmark_number; @@ -681,19 +681,19 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_cell Self; typedef GMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; /// Main constructor. GMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} /// Main constructor. GMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} }; @@ -707,20 +707,20 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_cell Self; typedef GMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef Tag_true Basic_iterator; ///< True iff this iterator is basic typedef typename Map::size_type size_type; /// Main constructor. GMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} /// Main constructor. GMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} }; @@ -734,20 +734,20 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_cell Self; typedef GMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef Tag_true Basic_iterator; ///< True iff this iterator is basic typedef typename Map::size_type size_type; /// Main constructor. GMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} /// Main constructor. GMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} @@ -762,7 +762,7 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_cell Self; typedef GMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef Tag_true Basic_iterator; ///< True iff this iterator is basic typedef typename Map::size_type size_type; @@ -772,13 +772,13 @@ namespace CGAL { /// GMap_dart_iterator_basic_of_orbit_generic /// with 3 non consecutive args /*GMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {}*/ /// Main constructor. GMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart, amark) {} }; @@ -792,7 +792,7 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_cell Self; typedef GMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef Tag_true Basic_iterator; ///< True iff this iterator is basic typedef typename Map::size_type size_type; @@ -802,13 +802,13 @@ namespace CGAL { /// GMap_dart_iterator_basic_of_orbit_generic /// with 3 non consecutive args /*GMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {}*/ /// Main constructor. GMap_dart_iterator_basic_of_cell(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart, amark) {} }; @@ -823,7 +823,7 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_all Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -842,11 +842,11 @@ namespace CGAL { {} /// Constructor with a dart in parameter (for end iterator). - GMap_dart_iterator_basic_of_all(Map& amap, Dart_handle adart): + GMap_dart_iterator_basic_of_all(Map& amap, Dart_descriptor adart): Base(amap, adart) {} /// Constructor with a dart in parameter (for end iterator). - GMap_dart_iterator_basic_of_all(Map& amap, Dart_handle adart, + GMap_dart_iterator_basic_of_all(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} @@ -861,7 +861,7 @@ namespace CGAL { { this->mprev_op = OP_POP; } else { - this->set_current_dart(this->mmap->null_handle); + this->set_current_dart(this->mmap->null_descriptor); this->mprev_op = OP_END; } return *this; @@ -887,11 +887,11 @@ namespace CGAL { > Base; typedef typename Base::Map Map; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef Tag_false Basic_iterator; ///< True iff this iterator is basic /// Main constructor. - GMap_dart_iterator_of_orbit_generic(Map& amap, Dart_handle adart1): + GMap_dart_iterator_of_orbit_generic(Map& amap, Dart_descriptor adart1): Base(amap, adart1) {} }; @@ -904,11 +904,11 @@ namespace CGAL { typedef GMap_dart_iterator_of_orbit Self; typedef GMap_dart_iterator_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef Tag_false Basic_iterator; ///< True iff this iterator is basic /// Main constructor. - GMap_dart_iterator_of_orbit(Map_& amap, Dart_handle adart): + GMap_dart_iterator_of_orbit(Map_& amap, Dart_descriptor adart): Base(amap, adart) {} }; @@ -924,12 +924,12 @@ namespace CGAL { GMap_dart_iterator_basic_of_cell > Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef Tag_false Basic_iterator; ///< True iff this iterator is basic /// Main constructor. - GMap_dart_iterator_of_cell(Map& amap, Dart_handle adart1): + GMap_dart_iterator_of_cell(Map& amap, Dart_descriptor adart1): Base(amap, adart1) {} }; @@ -950,7 +950,7 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_involution Self; typedef CMap_dart_iterator Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -960,14 +960,14 @@ namespace CGAL { public: /// Main constructor. GMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type amark): Base(amap, adart), mmark_number(amark) { CGAL_assertion( d<=Map::dimension ); CGAL_assertion( i<=Map::dimension ); - if (adart!=this->mmap->null_handle) + if (adart!=this->mmap->null_descriptor) this->mmap->mark(adart, mmark_number); } @@ -976,7 +976,7 @@ namespace CGAL { { CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); - mto_treat = std::queue(); + mto_treat = std::queue(); this->mmap->mark((*this), mmark_number); } @@ -986,7 +986,7 @@ namespace CGAL { CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); - Dart_handle nd = this->mmap->null_handle; + Dart_descriptor nd = this->mmap->null_descriptor; for ( int k=0; kmmap->is_marked(this->mmap->alpha(*this, k), this->mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { CGAL_assertion(!this->mmap->is_free(*this, k)); nd = this->mmap->alpha(*this, k); @@ -1015,7 +1015,7 @@ namespace CGAL { !this->mmap->is_marked(this->mmap->alpha(*this, k), this->mmark_number) ) { - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { CGAL_assertion(!this->mmap->is_free(*this, k)); nd = this->mmap->alpha(*this, k); @@ -1030,7 +1030,7 @@ namespace CGAL { } } - if (nd == this->mmap->null_handle) + if (nd == this->mmap->null_descriptor) { if (!mto_treat.empty()) { @@ -1054,7 +1054,7 @@ namespace CGAL { protected: /// Queue of darts to process. - std::queue mto_treat; + std::queue mto_treat; /// Index of the used mark. size_type mmark_number; @@ -1070,7 +1070,7 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_involution Self; typedef GMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -1079,13 +1079,13 @@ namespace CGAL { public: /// Main constructor. GMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} /// Main constructor. GMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -1100,7 +1100,7 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_involution Self; typedef GMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -1109,13 +1109,13 @@ namespace CGAL { public: /// Main constructor. GMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} /// Main constructor. GMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -1130,7 +1130,7 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_involution Self; typedef GMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -1139,13 +1139,13 @@ namespace CGAL { public: /// Main constructor. GMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} /// Main constructor. GMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -1160,7 +1160,7 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_involution Self; typedef GMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -1169,13 +1169,13 @@ namespace CGAL { public: /// Main constructor. GMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} /// Main constructor. GMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -1190,7 +1190,7 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_involution Self; typedef GMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -1199,13 +1199,13 @@ namespace CGAL { public: /// Main constructor. GMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} /// Main constructor. GMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -1220,7 +1220,7 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_involution Self; typedef GMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -1229,13 +1229,13 @@ namespace CGAL { public: /// Main constructor. GMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /* amark*/): Base(amap, adart) {} /// Main constructor. GMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -1250,7 +1250,7 @@ namespace CGAL { typedef GMap_dart_iterator_basic_of_involution Self; typedef GMap_dart_iterator_basic_of_orbit_generic Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Map::size_type size_type; @@ -1259,13 +1259,13 @@ namespace CGAL { public: /// Main constructor. GMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart, + Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) {} /// Main constructor. GMap_dart_iterator_basic_of_involution(Map& amap, - Dart_handle adart): + Dart_descriptor adart): Base(amap, adart) {} }; @@ -1284,7 +1284,7 @@ namespace CGAL { /// Main constructor. GMap_dart_iterator_of_involution(typename Base::Map& amap, - typename Base::Dart_handle adart1): + typename Base::Dart_descriptor adart1): Base(amap, adart1) {} }; diff --git a/thirdparty/CGAL/include/CGAL/GMap_linear_cell_complex_storages.h b/thirdparty/CGAL/include/CGAL/GMap_linear_cell_complex_storages.h index 7f18bbb7..283d64ab 100644 --- a/thirdparty/CGAL/include/CGAL/GMap_linear_cell_complex_storages.h +++ b/thirdparty/CGAL/include/CGAL/GMap_linear_cell_complex_storages.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h $ -// $Id: GMap_linear_cell_complex_storages.h e6c767d 2021-05-12T15:45:07+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h $ +// $Id: include/CGAL/GMap_linear_cell_complex_storages.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -13,6 +13,7 @@ #define CGAL_GMAP_LINEAR_CELL_COMPLEX_STORAGES_H 1 #include +#include #include #include #include @@ -33,28 +34,25 @@ namespace CGAL { struct Container_type; } - /** @file GMap_linear_cell_complex_storages.h - * Definition of storages for dD Linear cell complex for generalized map. - */ - // Storage of darts with compact container, alpha with handles // Copy of Generalized_map_storage_1 and add new types related - // to geometry (not possible to inherith because we use Self type + // to geometry (not possible to inherit because we use Self type // as template parameter of Dart_wrapper. If we inherit, Self is not // the correct type). template + class Traits_, class Items_, class Alloc_> class GMap_linear_cell_complex_storage_1 { public: + using Self=GMap_linear_cell_complex_storage_1; + using Use_index=CGAL::Tag_false; + using Concurrent_tag=typename internal::Get_concurrent_tag::type; + typedef typename Traits_::Point Point; typedef typename Traits_::Vector Vector; typedef typename Traits_::FT FT; - typedef GMap_linear_cell_complex_storage_1 Self; - typedef CGAL::Tag_false Use_index; - typedef internal::Combinatorial_map_helper Helper; typedef typename Items_::template Dart_wrapper Dart_wrapper; @@ -71,22 +69,22 @@ namespace CGAL { typedef typename internal::Container_type ::type Dart_container; - - typedef typename Dart_container::iterator Dart_handle; - typedef typename Dart_container::const_iterator Dart_const_handle; + typedef typename Dart_container::iterator Dart_descriptor; + typedef typename Dart_container::const_iterator Dart_const_descriptor; typedef typename Dart_container::size_type size_type; - typedef std::nullptr_t Null_handle_type; - static const Null_handle_type null_handle; + typedef std::nullptr_t Null_descriptor_type; + inline static constexpr Null_descriptor_type null_descriptor=nullptr; + + using Type_for_compact_container=void*; typedef Items_ Items; typedef Alloc_ Alloc; - template struct Container_for_attributes : public internal::Container_type ::template rebind_alloc>::type + typename Allocator_traits::template rebind_alloc>::type {}; /// Typedef for attributes typedef typename internal::template Get_attributes_tuple::type @@ -96,11 +94,11 @@ namespace CGAL { struct Attribute_type: public Helper::template Attribute_type {}; template - struct Attribute_handle: public Helper::template Attribute_handle + struct Attribute_descriptor: public Helper::template Attribute_descriptor {}; template - struct Attribute_const_handle: - public Helper::template Attribute_const_handle + struct Attribute_const_descriptor: + public Helper::template Attribute_const_descriptor {}; template struct Attribute_range: public Helper::template Attribute_range @@ -111,14 +109,27 @@ namespace CGAL { {}; typedef typename Attribute_type<0>::type Vertex_attribute; - typedef typename Attribute_handle<0>::type Vertex_attribute_handle; - typedef typename Attribute_const_handle<0>::type - Vertex_attribute_const_handle; + typedef typename Attribute_descriptor<0>::type Vertex_attribute_descriptor; + typedef typename Attribute_const_descriptor<0>::type + Vertex_attribute_const_descriptor; typedef typename Attribute_range<0>::type Vertex_attribute_range; typedef typename Attribute_const_range<0>::type Vertex_attribute_const_range; + /// Deprecated types, keep for now for backward compatibility + using Dart_handle=Dart_descriptor; + using Dart_const_handle=Dart_const_descriptor; + + template + using Attribute_handle=Attribute_descriptor; + template + using Attribute_const_handle=Attribute_const_descriptor; + using Vertex_attribute_handle=Vertex_attribute_descriptor; + using Vertex_attribute_const_handle=Vertex_attribute_const_descriptor; + + inline static constexpr Null_descriptor_type null_handle=null_descriptor; + /// Number of marks static const size_type NB_MARKS = 32; @@ -127,84 +138,109 @@ namespace CGAL { typedef Handle_hash_function Hash_function; + typedef Dart_container Dart_range; + typedef const Dart_container Dart_const_range; + /// @return a Dart_range (range through all the darts of the map). + Dart_range& darts() { return mdarts;} + Dart_const_range& darts() const { return mdarts; } + // Init void init_storage() - { null_dart_handle=nullptr; } + { + null_dart_descriptor=nullptr; + null_dart_handle=null_dart_descriptor; + } + + void clear_storage() + {} + + /** Test if the map is empty. + * @return true iff the map is empty. + */ + bool is_empty() const + { return mdarts.empty(); } + + /// @return the number of darts. + size_type number_of_darts() const + { return mdarts.size(); } + + size_type upper_bound_on_dart_ids() const + { return 0; } /** Return if this dart is free for adimension. * @param dh a dart handle * @param i the dimension. - * @return true iff dh is linked with nullptr for \em adimension. + * @return true iff dh is linked with itself for \em adimension. */ template - bool is_free(Dart_const_handle dh) const + bool is_free(Dart_const_descriptor dh) const { CGAL_assertion( dh!=nullptr ); CGAL_assertion(i <= dimension); return dh->mf[i]==dh; } - bool is_free(Dart_const_handle dh, unsigned int i) const + bool is_free(Dart_const_descriptor dh, unsigned int i) const { CGAL_assertion( dh!=nullptr ); CGAL_assertion(i <= dimension); return dh->mf[i]==dh; } - bool is_perforated(Dart_const_handle /*dh*/) const + bool is_perforated(Dart_const_descriptor /*dh*/) const { return false; } /// Set simultaneously all the marks of this dart to a given value. - void set_dart_marks(Dart_const_handle ADart, + void set_dart_marks(Dart_const_descriptor ADart, const std::bitset& amarks) const { CGAL_assertion( ADart!=nullptr ); ADart->set_marks(amarks); } /// Return all the marks of a dart. - std::bitset get_dart_marks(Dart_const_handle ADart) const + std::bitset get_dart_marks(Dart_const_descriptor ADart) const { CGAL_assertion( ADart!=nullptr ); return ADart->get_marks(); } /// Return the mark value of dart a given mark number. - bool get_dart_mark(Dart_const_handle ADart, size_type amark) const + bool get_dart_mark(Dart_const_descriptor ADart, size_type amark) const { CGAL_assertion( ADart!=nullptr ); return ADart->get_mark(amark); } /// Set the mark of a given mark number to a given value. - void set_dart_mark(Dart_const_handle ADart, size_type amark, bool avalue) const + void set_dart_mark(Dart_const_descriptor ADart, size_type amark, bool avalue) const { CGAL_assertion( ADart!=nullptr ); ADart->set_mark(amark, avalue); } /// Flip the mark of a given mark number to a given value. - void flip_dart_mark(Dart_const_handle ADart, size_type amark) const + void flip_dart_mark(Dart_const_descriptor ADart, size_type amark) const { CGAL_assertion( ADart!=nullptr ); ADart->flip_mark(amark); } // Access to alpha maps - Dart_handle get_alpha(Dart_handle ADart, int B1) + Dart_descriptor get_alpha(Dart_descriptor ADart, int B1) { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; } - Dart_const_handle get_alpha(Dart_const_handle ADart, int B1) const + Dart_const_descriptor get_alpha(Dart_const_descriptor ADart, int B1) const { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; } template - Dart_handle get_alpha(Dart_handle ADart) + Dart_descriptor get_alpha(Dart_descriptor ADart) { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; } template - Dart_const_handle get_alpha(Dart_const_handle ADart) const + Dart_const_descriptor get_alpha(Dart_const_descriptor ADart) const { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; @@ -212,31 +248,31 @@ namespace CGAL { // return a handle on the i-attribute template - typename Attribute_handle::type attribute(Dart_handle ADart) + typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> - (ADart->mattribute_handles); + (ADart->mattribute_descriptors); } template - typename Attribute_const_handle::type - attribute(Dart_const_handle ADart) const + typename Attribute_const_descriptor::type + attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> - (ADart->mattribute_handles); + (ADart->mattribute_descriptors); } // Copy a given attribute template - typename Attribute_handle::type copy_attribute - (typename Attribute_const_handle::type ah) + typename Attribute_descriptor::type copy_attribute + (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); - typename Attribute_handle::type res= + typename Attribute_descriptor::type res= std::get::value> (mattribute_containers).emplace(*ah); this->template init_attribute_ref_counting(res); @@ -245,7 +281,7 @@ namespace CGAL { // Test if a given attribute is valid template - bool is_valid_attribute(typename Attribute_const_handle::type ah) const + bool is_valid_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->is_valid(); @@ -254,25 +290,25 @@ namespace CGAL { // accessors and modifiers to the attribute ref counting given its handle template std::size_t get_attribute_ref_counting - (typename Attribute_const_handle::type ah) const + (typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->get_nb_refs(); } template - void init_attribute_ref_counting(typename Attribute_handle::type ah) + void init_attribute_ref_counting(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); ah->mrefcounting=0; } template - void inc_attribute_ref_counting(typename Attribute_handle::type ah) + void inc_attribute_ref_counting(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); ah->inc_nb_refs(); } template - void dec_attribute_ref_counting(typename Attribute_handle::type ah) + void dec_attribute_ref_counting(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); ah->dec_nb_refs(); @@ -281,14 +317,14 @@ namespace CGAL { // get the attribute given its handle template typename Attribute_type::type& - get_attribute(typename Attribute_handle::type ah) + get_attribute(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); return *ah; } template const typename Attribute_type::type& - get_attribute(typename Attribute_const_handle::type ah) const + get_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return *ah; @@ -296,14 +332,14 @@ namespace CGAL { // Get the dart of the given attribute template - Dart_handle dart_of_attribute(typename Attribute_handle::type ah) + Dart_descriptor dart_of_attribute(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); return ah->dart(); } template - Dart_const_handle - dart_of_attribute(typename Attribute_const_handle::type ah) const + Dart_const_descriptor + dart_of_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->dart(); @@ -311,30 +347,30 @@ namespace CGAL { // Set the dart of the given attribute template - void set_dart_of_attribute(typename Attribute_handle::type ah, - Dart_handle adart) + void set_dart_of_attribute(typename Attribute_descriptor::type ah, + Dart_descriptor adart) { CGAL_assertion( ah!=nullptr ); ah->set_dart(adart); } // Get the information associated with a given dart - Dart_info& info(Dart_handle adart) + Dart_info& info(Dart_descriptor adart) { return adart->info(); } - const Dart_info& info(Dart_const_handle adart) const + const Dart_info& info(Dart_const_descriptor adart) const { return adart->info(); } // Get the info of the given attribute template typename Attribute_type::type::Info & - info_of_attribute(typename Attribute_handle::type ah) + info_of_attribute(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); return ah->info(); } template const typename Attribute_type::type::Info & - info_of_attribute(typename Attribute_const_handle::type ah) const + info_of_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->info(); @@ -342,7 +378,7 @@ namespace CGAL { // Get the info of the i-cell attribute associated with the given dart template - typename Attribute_type::type::Info & info(Dart_handle adart) + typename Attribute_type::type::Info & info(Dart_descriptor adart) { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); @@ -350,7 +386,7 @@ namespace CGAL { } template const typename Attribute_type::type::Info & - info(Dart_const_handle adart) const + info(Dart_const_descriptor adart) const { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); @@ -359,14 +395,14 @@ namespace CGAL { // Get the dart of the i-cell attribute associated with the given dart template - Dart_handle dart(Dart_handle adart) + Dart_descriptor dart(Dart_descriptor adart) { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); return dart_of_attribute(attribute(adart)); } template - Dart_const_handle dart(Dart_const_handle adart) const + Dart_const_descriptor dart(Dart_const_descriptor adart) const { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); @@ -374,36 +410,40 @@ namespace CGAL { } // Get the dart of the given 0-attribute - Point & point_of_vertex_attribute(typename Attribute_handle<0>::type vh) + Point & point_of_vertex_attribute(typename Attribute_descriptor<0>::type vh) { CGAL_assertion( vh!=nullptr ); return get_attribute<0>(vh).point(); } const Point & point_of_vertex_attribute - (typename Attribute_const_handle<0>::type vh) const + (typename Attribute_const_descriptor<0>::type vh) const { CGAL_assertion( vh!=nullptr ); return get_attribute<0>(vh).point(); } // Debug function - void display_dart(Dart_const_handle ADart) const + void display_dart(Dart_const_descriptor ADart) const { std::cout< - void display_attribute(typename Attribute_const_handle::type ah) const + void display_attribute(typename Attribute_const_descriptor::type ah) const { std::cout<< std::get::value> (mattribute_containers).index(ah); } + template + size_type upper_bound_on_attribute_ids() const + { return 0; } + protected: // Set the handle on the i th attribute template - void basic_set_dart_attribute(Dart_handle dh, - typename Attribute_handle::type ah) + void basic_set_dart_attribute(Dart_descriptor dh, + typename Attribute_descriptor::type ah) { std::get::value> - (dh->mattribute_handles) = ah; + (dh->mattribute_descriptors) = ah; } /** Link a dart with a given dart for a given dimension. @@ -412,13 +452,13 @@ namespace CGAL { * @param i the dimension. */ template - void dart_link_alpha(Dart_handle adart, Dart_handle adart2) + void dart_link_alpha(Dart_descriptor adart, Dart_descriptor adart2) { CGAL_assertion(i <= dimension); CGAL_assertion(adart!=nullptr && adart2!=nullptr); adart->mf[i] = adart2; } - void dart_link_alpha(Dart_handle adart, Dart_handle adart2, unsigned int i) + void dart_link_alpha(Dart_descriptor adart, Dart_descriptor adart2, unsigned int i) { CGAL_assertion(i <= dimension); CGAL_assertion(adart!=nullptr && adart2!=nullptr); @@ -430,20 +470,22 @@ namespace CGAL { * @param i the dimension. */ template - void dart_unlink_alpha(Dart_handle adart) + void dart_unlink_alpha(Dart_descriptor adart) { CGAL_assertion(adart!=nullptr && i <= dimension); adart->mf[i] = adart; } - void dart_unlink_alpha(Dart_handle adart, unsigned int i) + void dart_unlink_alpha(Dart_descriptor adart, unsigned int i) { CGAL_assertion(adart!=nullptr && i <= dimension); adart->mf[i] = adart; } - protected: - Dart_handle null_dart_handle; // To be compatible with combinatorial map + public: + Dart_descriptor null_dart_descriptor; // To be compatible with combinatorial map + Dart_descriptor null_dart_handle; // Deprecated: kept for backward compatibility + protected: /// Dart container. Dart_container mdarts; @@ -451,13 +493,6 @@ namespace CGAL { typename Helper::Attribute_containers mattribute_containers; }; - /// null_handle - template - const typename GMap_linear_cell_complex_storage_1::Null_handle_type - GMap_linear_cell_complex_storage_1::null_handle = nullptr; } // namespace CGAL #if defined(BOOST_GCC) diff --git a/thirdparty/CGAL/include/CGAL/GMap_linear_cell_complex_storages_with_index.h b/thirdparty/CGAL/include/CGAL/GMap_linear_cell_complex_storages_with_index.h new file mode 100644 index 00000000..10450d84 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/GMap_linear_cell_complex_storages_with_index.h @@ -0,0 +1,500 @@ +// Copyright (c) 2016 CNRS and LIRIS' Establishments (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages_with_index.h $ +// $Id: include/CGAL/GMap_linear_cell_complex_storages_with_index.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Guillaume Damiand +// +#ifndef CGAL_GMAP_LINEAR_CELL_COMPLEX_STORAGES_WITH_INDEX_H +#define CGAL_GMAP_LINEAR_CELL_COMPLEX_STORAGES_WITH_INDEX_H 1 + +#include +#include +#include + +#include +#if defined(BOOST_GCC) +_Pragma("GCC diagnostic push") +_Pragma("GCC diagnostic ignored \"-Warray-bounds\"") +#endif + +namespace CGAL { + + namespace internal { + template + struct Combinatorial_map_helper; + + template + struct Container_type; + } + + // Storage of darts with compact container, alpha using index + // Copy of Generalized_map_storage_with_index and add new types related + // to geometry (not possible to inherit because we use Self type + // as template parameter of Dart_wrapper. If we inherit, Self is not + // the correct type). + template + class GMap_linear_cell_complex_storage_with_index + { + public: + using Self=GMap_linear_cell_complex_storage_with_index; + using Use_index=CGAL::Tag_true; + using Concurrent_tag=typename internal::Get_concurrent_tag::type; + + typedef typename Traits_::Point Point; + typedef typename Traits_::Vector Vector; + typedef typename Traits_::FT FT; + + typedef internal::Combinatorial_map_helper Helper; + + using Index_type=typename internal::Get_index_type::type; + + typedef typename Items_::template Dart_wrapper Dart_wrapper; + + typedef typename internal::template Get_dart_info::type + Dart_info; + typedef CGAL::Dart Dart; + + typedef std::allocator_traits Allocator_traits; + typedef typename Allocator_traits::template rebind_alloc Dart_allocator; + + typedef Compact_container_with_index, Index_type> + Dart_container; + + typedef typename Dart_container::Index Dart_index; + + typedef Dart_index Dart_descriptor; + typedef Dart_index Dart_const_descriptor; + typedef typename Dart_container::size_type size_type; + + typedef Dart_index Null_descriptor_type; + static const Index_type null_descriptor=Dart_container::null_descriptor; + + using Type_for_compact_container=Index_type; + + typedef Items_ Items; + typedef Alloc_ Alloc; + template + struct Container_for_attributes : public + Compact_container_with_index, + Multiply_by_two_policy_for_cc_with_size<64>, size_type > + {}; + /// Typedef for attributes + typedef typename internal::template Get_attributes_tuple::type + Attributes; + + template + struct Attribute_type: public Helper::template Attribute_type + {}; + template + struct Attribute_descriptor: public Helper::template Attribute_descriptor + {}; + template + struct Attribute_const_descriptor: + public Helper::template Attribute_const_descriptor + {}; + template + struct Attribute_range: public Helper::template Attribute_range + {}; + template + struct Attribute_const_range: + public Helper::template Attribute_const_range + {}; + + typedef typename Attribute_type<0>::type Vertex_attribute; + typedef typename Attribute_descriptor<0>::type Vertex_attribute_descriptor; + typedef typename Attribute_const_descriptor<0>::type + Vertex_attribute_const_descriptor; + + typedef typename Attribute_range<0>::type Vertex_attribute_range; + typedef typename Attribute_const_range<0>::type + Vertex_attribute_const_range; + + /// Deprecated types, keep for now for backward compatibility + using Dart_handle=Dart_descriptor; + using Dart_const_handle=Dart_const_descriptor; + + template + using Attribute_handle=Attribute_descriptor; + template + using Attribute_const_handle=Attribute_const_descriptor; + + static const Index_type null_handle=null_descriptor; + + /// Number of marks + static const size_type NB_MARKS = 32; + + /// The dimension of the generalized map. + static const unsigned int dimension = d_; + + typedef internal::Index_hash_function Hash_function; + + typedef Dart_container Dart_range; + typedef const Dart_container Dart_const_range; + /// @return a Dart_range (range through all the darts of the map). + Dart_range& darts() { return mdarts;} + Dart_const_range& darts() const { return mdarts; } + + // Init + void init_storage() + {} + + void clear_storage() + {} + + /** Test if the map is empty. + * @return true iff the map is empty. + */ + bool is_empty() const + { return mdarts.empty(); } + + /// @return the number of darts. + size_type number_of_darts() const + { return mdarts.size(); } + + size_type upper_bound_on_dart_ids() const + { return mdarts.upper_bound(); } + + /** Return if this dart is free for adimension. + * @param dh a dart handle + * @param i the dimension. + * @return true iff dh is linked with itself for \em adimension. + */ + template + bool is_free(Dart_const_descriptor dh) const + { + CGAL_assertion(i <= dimension); + return mdarts[dh].mf[i]==dh; + } + bool is_free(Dart_const_descriptor dh, unsigned int i) const + { + CGAL_assertion(i <= dimension); + return mdarts[dh].mf[i]==dh; + } + bool is_perforated(Dart_const_descriptor /*dh*/) const + { return false; } + + /// Set simultaneously all the marks of this dart to a given value. + void set_dart_marks(Dart_const_descriptor ADart, + const std::bitset& amarks) const + { + mdarts[ADart].set_marks(amarks); + } + /// Return all the marks of a dart. + std::bitset get_dart_marks(Dart_const_descriptor ADart) const + { + return mdarts[ADart].get_marks(); + } + /// Return the mark value of dart a given mark number. + bool get_dart_mark(Dart_const_descriptor ADart, size_type amark) const + { + return mdarts[ADart].get_mark(amark); + } + + /// Set the mark of a given mark number to a given value. + void set_dart_mark(Dart_const_descriptor ADart, size_type amark, bool avalue) const + { + mdarts[ADart].set_mark(amark, avalue); + } + + /// Flip the mark of a given mark number to a given value. + void flip_dart_mark(Dart_const_descriptor ADart, size_type amark) const + { + mdarts[ADart].flip_mark(amark); + } + + // Access to alpha maps + Dart_descriptor get_alpha(Dart_descriptor ADart, int B1) + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + Dart_const_descriptor get_alpha(Dart_const_descriptor ADart, int B1) const + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + template + Dart_descriptor get_alpha(Dart_descriptor ADart) + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + template + Dart_const_descriptor get_alpha(Dart_const_descriptor ADart) const + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + + // return a handle on the i-attribute + template + typename Attribute_descriptor::type attribute(Dart_descriptor ADart) + { + static_assert(Helper::template Dimension_index::value>=0, + "attribute called but i-attributes are disabled."); + return std::get::value> + (mdarts[ADart].mattribute_descriptors); + } + template + typename Attribute_const_descriptor::type + attribute(Dart_const_descriptor ADart) const + { + static_assert(Helper::template Dimension_index::value>=0, + "attribute called but i-attributes are disabled."); + return std::get::value> + (mdarts[ADart].mattribute_descriptors); + } + + // Copy a given attribute + template + typename Attribute_descriptor::type copy_attribute + (typename Attribute_const_descriptor::type ah) + { + static_assert(Helper::template Dimension_index::value>=0, + "copy_attribute called but i-attributes are disabled."); + // We need to do a reserve before the emplace in order to avoid a bug of + // invalid reference when the container is reallocated. + std::get::value> + (mattribute_containers).reserve + (std::get::value> + (mattribute_containers).size()+1); + + typename Attribute_descriptor::type res= + std::get::value> + (mattribute_containers).emplace(get_attribute(ah)); + this->template init_attribute_ref_counting(res); + return res; + } + + // Test if a given attribute is valid + template + bool is_valid_attribute(typename Attribute_const_descriptor::type ah) const + { + return get_attribute(ah).is_valid(); + } + + // accessors and modifiers to the attribute ref counting given its handle + template + std::size_t get_attribute_ref_counting + (typename Attribute_const_descriptor::type ah) const + { + return get_attribute(ah).get_nb_refs(); + } + template + void init_attribute_ref_counting(typename Attribute_descriptor::type ah) + { + get_attribute(ah).mrefcounting=0; + } + template + void inc_attribute_ref_counting(typename Attribute_descriptor::type ah) + { + get_attribute(ah).inc_nb_refs(); + } + template + void dec_attribute_ref_counting(typename Attribute_descriptor::type ah) + { + get_attribute(ah).dec_nb_refs(); + } + + // get the attribute given its index + template + typename Attribute_type::type& + get_attribute(typename Attribute_descriptor::type ah) + { + CGAL_assertion( ah!=null_descriptor ); + return std::get::value> + (mattribute_containers)[ah]; + } + template + const typename Attribute_type::type& + get_attribute(typename Attribute_const_descriptor::type ah) const + { + CGAL_assertion( ah!=null_descriptor ); + return std::get::value> + (mattribute_containers)[ah]; + } + + // Get the dart of the given attribute + template + Dart_descriptor dart_of_attribute(typename Attribute_descriptor::type ah) + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).dart(); + } + template + Dart_const_descriptor + dart_of_attribute(typename Attribute_const_descriptor::type ah) const + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).dart(); + } + + // Set the dart of the given attribute + template + void set_dart_of_attribute(typename Attribute_descriptor::type ah, + Dart_descriptor adart) + { + CGAL_assertion( ah!=null_descriptor ); + get_attribute(ah).set_dart(adart); + } + + // Get the information associated with a given dart + Dart_info& info(Dart_descriptor adart) + { return mdarts[adart].info(); } + const Dart_info& info(Dart_const_descriptor adart) const + { return mdarts[adart].info(); } + + // Get the info of the given attribute + template + typename Attribute_type::type::Info & + info_of_attribute(typename Attribute_descriptor::type ah) + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).info(); + } + template + const typename Attribute_type::type::Info & + info_of_attribute(typename Attribute_const_descriptor::type ah) const + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).info(); + } + + // Get the info of the i-cell attribute associated with the given dart + template + typename Attribute_type::type::Info & info(Dart_descriptor adart) + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( this->template attribute(adart)!=null_descriptor ); + return info_of_attribute(attribute(adart)); + } + template + const typename Attribute_type::type::Info & + info(Dart_const_descriptor adart) const + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( attribute(adart)!=null_descriptor ); + return info_of_attribute(attribute(adart)); + } + + // Get the dart of the i-cell attribute associated with the given dart + template + Dart_descriptor dart(Dart_descriptor adart) + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( attribute(adart)!=null_descriptor ); + return dart_of_attribute(attribute(adart)); + } + template + Dart_const_descriptor dart(Dart_const_descriptor adart) const + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( attribute(adart)!=null_descriptor ); + return dart_of_attribute(attribute(adart)); + } + + // Get the dart of the given 0-attribute + Point & point_of_vertex_attribute(typename Attribute_descriptor<0>::type vh) + { + CGAL_assertion( vh!=null_descriptor ); + return get_attribute<0>(vh).point(); + } + + const Point & point_of_vertex_attribute + (typename Attribute_const_descriptor<0>::type vh) const + { + CGAL_assertion( vh!=null_descriptor ); + return get_attribute<0>(vh).point(); + } + + // Debug function + void display_dart(Dart_const_descriptor ADart) const + { std::cout< + void display_attribute(typename Attribute_const_descriptor::type ah) const + { std::cout< + size_type upper_bound_on_attribute_ids() const + { + return std::get::value> + (mattribute_containers).upper_bound(); + } + + protected: + // Set the handle on the i th attribute + template + void basic_set_dart_attribute(Dart_descriptor dh, + typename Attribute_descriptor::type ah) + { + std::get::value> + (mdarts[dh].mattribute_descriptors) = ah; + } + + /** Link a dart with a given dart for a given dimension. + * @param adart the dart to link. + * @param adart2 the dart to link with. + * @param i the dimension. + */ + template + void dart_link_alpha(Dart_descriptor adart, Dart_descriptor adart2) + { + CGAL_assertion(i <= dimension); + CGAL_assertion(adart!=null_descriptor && adart2!=null_descriptor); + mdarts[adart].mf[i] = adart2; + } + void dart_link_alpha(Dart_descriptor adart, Dart_descriptor adart2, unsigned int i) + { + CGAL_assertion(i <= dimension); + CGAL_assertion(adart!=null_descriptor && adart2!=null_descriptor); + mdarts[adart].mf[i] = adart2; + } + + /** Unlink a dart for a given dimension. + * @param adart a dart. + * @param i the dimension. + */ + template + void dart_unlink_alpha(Dart_descriptor adart) + { + CGAL_assertion(adart!=null_descriptor && i <= dimension); + mdarts[adart].mf[i] = adart; + } + void dart_unlink_alpha(Dart_descriptor adart, unsigned int i) + { + CGAL_assertion(adart!=null_descriptor && i <= dimension); + mdarts[adart].mf[i] = adart; + } + + public: + Index_type null_dart_descriptor=0; // To be compatible with combinatorial map + + // Deprecated: kept for backward compatibility + Index_type null_dart_handle=null_dart_descriptor; // To be compatible with combinatorial map + + protected: + /// Dart container. + Dart_container mdarts; + + /// Tuple of attributes containers + typename Helper::Attribute_containers mattribute_containers; + }; + +} // namespace CGAL + +#if defined(BOOST_GCC) + _Pragma("GCC diagnostic pop") +#endif + +#endif // CGAL_GMAP_LINEAR_CELL_COMPLEX_STORAGES_WITH_INDEX_H // +// EOF // diff --git a/thirdparty/CGAL/include/CGAL/General_polygon_2.h b/thirdparty/CGAL/include/CGAL/General_polygon_2.h index 9051c3e4..f1e62eef 100644 --- a/thirdparty/CGAL/include/CGAL/General_polygon_2.h +++ b/thirdparty/CGAL/include/CGAL/General_polygon_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/General_polygon_2.h $ -// $Id: General_polygon_2.h 420f37a 2021-09-23T16:28:23+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/General_polygon_2.h $ +// $Id: include/CGAL/General_polygon_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -38,6 +38,7 @@ class General_polygon_2 typedef std::list Containter; typedef typename Containter::iterator Curve_iterator; typedef typename Containter::const_iterator Curve_const_iterator; + typedef X_monotone_curve_2 value_type; protected: std::list m_xcurves; diff --git a/thirdparty/CGAL/include/CGAL/General_polygon_set_2.h b/thirdparty/CGAL/include/CGAL/General_polygon_set_2.h index 40e8f92e..f6fef323 100644 --- a/thirdparty/CGAL/include/CGAL/General_polygon_set_2.h +++ b/thirdparty/CGAL/include/CGAL/General_polygon_set_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/General_polygon_set_2.h $ -// $Id: General_polygon_set_2.h 76f4465 2021-03-03T11:29:12+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/General_polygon_set_2.h $ +// $Id: include/CGAL/General_polygon_set_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman @@ -47,7 +47,7 @@ class General_polygon_set_2 : public General_polygon_set_on_surface_2 typedef typename Base::Polygon_2 Polygon_2; typedef typename Base::Polygon_with_holes_2 Polygon_with_holes_2; - // default costructor + // default constructor General_polygon_set_2() : Base() {} // constructor from a traits object diff --git a/thirdparty/CGAL/include/CGAL/General_polygon_set_on_surface_2.h b/thirdparty/CGAL/include/CGAL/General_polygon_set_on_surface_2.h index 898de7f6..2cec11df 100644 --- a/thirdparty/CGAL/include/CGAL/General_polygon_set_on_surface_2.h +++ b/thirdparty/CGAL/include/CGAL/General_polygon_set_on_surface_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/General_polygon_set_on_surface_2.h $ -// $Id: General_polygon_set_on_surface_2.h 76f4465 2021-03-03T11:29:12+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/General_polygon_set_on_surface_2.h $ +// $Id: include/CGAL/General_polygon_set_on_surface_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman @@ -68,7 +68,7 @@ template public: - // default costructor + // default constructor General_polygon_set_on_surface_2() : Base() {} diff --git a/thirdparty/CGAL/include/CGAL/General_polygon_with_holes_2.h b/thirdparty/CGAL/include/CGAL/General_polygon_with_holes_2.h index d394d4d5..c155586c 100644 --- a/thirdparty/CGAL/include/CGAL/General_polygon_with_holes_2.h +++ b/thirdparty/CGAL/include/CGAL/General_polygon_with_holes_2.h @@ -7,12 +7,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon/include/CGAL/General_polygon_with_holes_2.h $ -// $Id: General_polygon_with_holes_2.h 2a30075 2022-01-10T11:01:31+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon/include/CGAL/General_polygon_with_holes_2.h $ +// $Id: include/CGAL/General_polygon_with_holes_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // -// Author(s) : Baruch Zukerman +// Author(s): Baruch Zukerman +// Efi Fogel #ifndef CGAL_GENERAL_POLYGON_WITH_HOLES_2_H #define CGAL_GENERAL_POLYGON_WITH_HOLES_2_H @@ -33,7 +34,7 @@ namespace CGAL { * * \tparam Polygon_ must have input and output operators. * - * \cgalModels `GeneralPolygonWithHoles_2` + * \cgalModels{GeneralPolygonWithHoles_2} */ template class General_polygon_with_holes_2 { @@ -63,6 +64,10 @@ class General_polygon_with_holes_2 { m_pgn(pgn_boundary) {} + explicit General_polygon_with_holes_2(Polygon_2&& pgn_boundary) : + m_pgn(std::move(pgn_boundary)) + {} + template General_polygon_with_holes_2(const Polygon_2& pgn_boundary, HolesInputIterator h_begin, @@ -71,6 +76,14 @@ class General_polygon_with_holes_2 { m_holes(h_begin, h_end) {} + template + General_polygon_with_holes_2(Polygon_2&& pgn_boundary, + HolesInputIterator h_begin, + HolesInputIterator h_end) : + m_pgn(std::move(pgn_boundary)), + m_holes(h_begin, h_end) + {} + Holes_container& holes() { return m_holes; } const Holes_container& holes() const { return m_holes; } @@ -91,8 +104,14 @@ class General_polygon_with_holes_2 { void add_hole(const Polygon_2& pgn_hole) { m_holes.push_back(pgn_hole); } + void add_hole(Polygon_2&& pgn_hole) { m_holes.emplace_back(std::move(pgn_hole)); } + void erase_hole(Hole_iterator hit) { m_holes.erase(hit); } + void clear_outer_boundary() { m_pgn.clear(); } + + void clear_holes() { m_holes.clear(); } + bool has_holes() const { return (!m_holes.empty()); } Size number_of_holes() const { return static_cast(m_holes.size()); } @@ -113,10 +132,10 @@ class General_polygon_with_holes_2 { // operator<< //-----------------------------------------------------------------------// /*! -This operator exports a General_polygon_with_holes_2 to the output stream `out`. +This operator exports a `General_polygon_with_holes_2` to the output stream `os`. An \ascii and a binary format exist. The format can be selected with -the \cgal modifiers for streams, `set_ascii_mode(0` and `set_binary_mode()` +the \cgal modifiers for streams, `set_ascii_mode()` and `set_binary_mode()`, respectively. The modifier `set_pretty_mode()` can be used to allow for (a few) structuring comments in the output. Otherwise, the output would be free of comments. The default for writing is \ascii without comments. @@ -164,9 +183,9 @@ operator<<(std::ostream& os, const General_polygon_with_holes_2& p) { //-----------------------------------------------------------------------// /*! -This operator imports a General_polygon_with_holes_2 from the input stream `in`. +This operator imports a `General_polygon_with_holes_2` from the input stream `is`. -Both ASCII and binary formats are supported, and the format is automatically detected. +Both \ascii and binary formats are supported, and the format is automatically detected. The format consists of the number of curves of the outer boundary followed by the curves themselves, followed @@ -187,7 +206,7 @@ operator>>(std::istream& is, General_polygon_with_holes_2& p) { Polygon_ pgn_hole; for (unsigned int i=0; i> pgn_hole; - p.add_hole(pgn_hole); + p.add_hole(std::move(pgn_hole)); } } diff --git a/thirdparty/CGAL/include/CGAL/Generalized_map.h b/thirdparty/CGAL/include/CGAL/Generalized_map.h index cd732451..37f1ff1f 100644 --- a/thirdparty/CGAL/include/CGAL/Generalized_map.h +++ b/thirdparty/CGAL/include/CGAL/Generalized_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generalized_map/include/CGAL/Generalized_map.h $ -// $Id: Generalized_map.h 258d704 2022-02-24T19:57:17+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generalized_map/include/CGAL/Generalized_map.h $ +// $Id: include/CGAL/Generalized_map.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -35,11 +36,9 @@ #include #include #include -#include +#include #include -#include - #if defined( __INTEL_COMPILER ) // Workarounf for warning in function basic_link_beta_0 #pragma warning disable 1017 @@ -93,8 +92,8 @@ namespace CGAL { typedef Generalized_map_base Self; typedef Refs_ Refs; typedef typename Base::Dart Dart; - typedef typename Base::Dart_handle Dart_handle; - typedef typename Base::Dart_const_handle Dart_const_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; + typedef typename Base::Dart_const_descriptor Dart_const_descriptor; typedef typename Base::Dart_container Dart_container; typedef typename Base::size_type size_type; typedef typename Base::Helper Helper; @@ -102,15 +101,18 @@ namespace CGAL { typedef typename Base::Items Items; typedef typename Base::Alloc Alloc; typedef typename Base::Use_index Use_index; + typedef typename Base::Dart_range Dart_range; + typedef typename Base::Dart_const_range Dart_const_range; + using Hash_function=typename Base::Hash_function; static const size_type NB_MARKS = Base::NB_MARKS; static const size_type INVALID_MARK = NB_MARKS; static const unsigned int dimension = Base::dimension; - typedef typename Base::Null_handle_type Null_handle_type; - using Base::null_handle; - using Base::null_dart_handle; + typedef typename Base::Null_descriptor_type Null_descriptor_type; + using Base::null_descriptor; + using Base::null_dart_descriptor; using Base::mdarts; using Base::get_alpha; using Base::is_free; @@ -128,21 +130,20 @@ namespace CGAL { using Base::info_of_attribute; using Base::info; using Base::dart; - - /// Typedef for Dart_range, a range through all the darts of the map. - typedef Dart_container Dart_range; - typedef const Dart_container Dart_const_range; + using Base::darts; + using Base::number_of_darts; + using Base::is_empty; /// Typedef for attributes template struct Attribute_type: public Base::template Attribute_type {}; template - struct Attribute_handle: public Base::template Attribute_handle + struct Attribute_descriptor: public Base::template Attribute_descriptor {}; template - struct Attribute_const_handle: - public Base::template Attribute_const_handle + struct Attribute_const_descriptor: + public Base::template Attribute_const_descriptor {}; template struct Attribute_range: public Base::template Attribute_range @@ -160,7 +161,7 @@ namespace CGAL { */ Generalized_map_base() { - CGAL_static_assertion_msg(Helper::nb_attribs<=dimension+1, + static_assert(Helper::nb_attribs<=dimension+1, "Too many attributes in the tuple Attributes_enabled"); this->init_storage(); @@ -182,7 +183,7 @@ namespace CGAL { /** Copy the given generalized map 'amap' into *this. * Note that both GMap can have different dimensions and/or non void attributes. - * Here GMap2 is necessarily non const; while Dart_handle_2 can be a const or non const handle. + * Here GMap2 is necessarily non const; while Dart_descriptor_2 can be a const or non const handle. * This is the "generic" method, called by the different variants below. * Marks reserved and automatic attributes management are not updated. * @param amap the generalized map to copy. @@ -192,15 +193,15 @@ namespace CGAL { * @param dartinfoconverter functor to transform original information of darts into information of copies * @param pointconverter functor to transform points in original map into points of copies. * @param copy_perforated_darts true to copy also darts marked perforated (if any) - * @param mark_perforated_darts true to mark darts wich are copies of perforated darts (if any) + * @param mark_perforated_darts true to mark darts which are copies of perforated darts (if any) * @post *this is valid. */ - template void generic_copy(GMap2& amap, - std::unordered_map* origin_to_copy, - std::unordered_map* copy_to_origin, + std::unordered_map* origin_to_copy, + std::unordered_map* copy_to_origin, const Converters& converters, const DartInfoConverter& dartinfoconverter, const PointConverter& pointconverter, @@ -231,11 +232,11 @@ namespace CGAL { // Create an mapping between darts of the two maps (originals->copies). // (here we cannot use CGAL::Unique_hash_map because it does not provide // iterators... - std::unordered_map local_dartmap; - if (origin_to_copy==NULL) // Use local_dartmap if user does not provides its own unordered_map + std::unordered_map local_dartmap; + if (origin_to_copy==nullptr) // Use local_dartmap if user does not provides its own unordered_map { origin_to_copy=&local_dartmap; } - Dart_handle new_dart; + Dart_descriptor new_dart; for (typename GMap2::Dart_range::iterator it=amap.darts().begin(), itend=amap.darts().end(); it!=itend; ++it) { @@ -258,18 +259,18 @@ namespace CGAL { } (*origin_to_copy)[it]=new_dart; - if (copy_to_origin!=NULL) { (*copy_to_origin)[new_dart]=it; } + if (copy_to_origin!=nullptr) { (*copy_to_origin)[new_dart]=it; } internal::Copy_dart_info_functor ::run - (static_cast(amap), static_cast(*this), + (static_cast(amap), static_cast(*this), it, new_dart, dartinfoconverter); } } unsigned int min_dim=(dimension::iterator + typename std::unordered_map::iterator dartmap_iter, dartmap_iter_end=origin_to_copy->end(); for (dartmap_iter=origin_to_copy->begin(); dartmap_iter!=dartmap_iter_end; ++dartmap_iter) @@ -305,9 +306,9 @@ namespace CGAL { typename PointConverter> void copy(GMap2& amap, std::unordered_map - * origin_to_copy, + * origin_to_copy, std::unordered_map - * copy_to_origin, + * copy_to_origin, const Converters& converters, const DartInfoConverter& dartinfoconverter, const PointConverter& pointconverter, @@ -315,7 +316,7 @@ namespace CGAL { bool copy_perforated_darts=false, size_type mark_perforated=INVALID_MARK) { - generic_copy (amap, origin_to_copy, copy_to_origin, converters, dartinfoconverter, pointconverter, copy_marks, @@ -327,9 +328,9 @@ namespace CGAL { typename PointConverter> void copy_from_const(const GMap2& amap, std::unordered_map - * origin_to_copy, + * origin_to_copy, std::unordered_map - * copy_to_origin, + * copy_to_origin, const Converters& converters, const DartInfoConverter& dartinfoconverter, const PointConverter& pointconverter, @@ -337,7 +338,7 @@ namespace CGAL { bool copy_perforated_darts=false, size_type mark_perforated=INVALID_MARK) { - generic_copy (const_cast(amap), origin_to_copy, copy_to_origin, converters, dartinfoconverter, pointconverter, copy_marks, @@ -348,9 +349,9 @@ namespace CGAL { template void copy(GMap2& amap, std::unordered_map - * origin_to_copy, + * origin_to_copy, std::unordered_map - * copy_to_origin, + * copy_to_origin, const Converters& converters, const DartInfoConverter& dartinfoconverter, bool copy_marks=true, @@ -368,9 +369,9 @@ namespace CGAL { template void copy_from_const(const GMap2& amap, std::unordered_map - * origin_to_copy, + * origin_to_copy, std::unordered_map - * copy_to_origin, + * copy_to_origin, const Converters& converters, const DartInfoConverter& dartinfoconverter, bool copy_marks=true, @@ -388,9 +389,9 @@ namespace CGAL { template void copy(GMap2& amap, std::unordered_map - * origin_to_copy, + * origin_to_copy, std::unordered_map - * copy_to_origin, + * copy_to_origin, const Converters& converters, bool copy_marks=true, bool copy_perforated_darts=false, @@ -405,9 +406,9 @@ namespace CGAL { template void copy_from_const(const GMap2& amap, std::unordered_map - * origin_to_copy, + * origin_to_copy, std::unordered_map - * copy_to_origin, + * copy_to_origin, const Converters& converters, bool copy_marks=true, bool copy_perforated_darts=false, @@ -422,9 +423,9 @@ namespace CGAL { template void copy(GMap2& amap, std::unordered_map - * origin_to_copy=nullptr, + * origin_to_copy=nullptr, std::unordered_map - * copy_to_origin=nullptr, + * copy_to_origin=nullptr, bool copy_marks=true, bool copy_perforated_darts=false, size_type mark_perforated=INVALID_MARK) @@ -438,9 +439,9 @@ namespace CGAL { template void copy_from_const(const GMap2& amap, std::unordered_map - * origin_to_copy=nullptr, + * origin_to_copy=nullptr, std::unordered_map - * copy_to_origin=nullptr, + * copy_to_origin=nullptr, bool copy_marks=true, bool copy_perforated_darts=false, size_type mark_perforated=INVALID_MARK) @@ -545,6 +546,7 @@ namespace CGAL { */ void clear() { + this->clear_storage(); mdarts.clear(); for ( size_type i = 0; i < NB_MARKS; ++i) this->mnb_marked_darts[i] = 0; @@ -553,12 +555,6 @@ namespace CGAL { this->init_storage(); } - /** Test if the map is empty. - * @return true iff the map is empty. - */ - bool is_empty() const - { return mdarts.empty(); } - friend std::ostream& operator<< (std::ostream& os, const Self& amap) { save_generalized_map(amap, os); @@ -574,12 +570,12 @@ namespace CGAL { /** Create a new dart and add it to the map. * The marks of the darts are initialised with mmask_marks, i.e. the dart * is unmarked for all the marks. - * @return a Dart_handle on the new dart. + * @return a Dart_descriptor on the new dart. */ template < typename... Args > - Dart_handle create_dart(const Args&... args) + Dart_descriptor create_dart(const Args&... args) { - Dart_handle res=mdarts.emplace(args...); + Dart_descriptor res=mdarts.emplace(args...); init_dart(res); return res; } @@ -587,7 +583,7 @@ namespace CGAL { /** Erase a dart from the list of darts. * @param adart the dart to erase. */ - void erase_dart(Dart_handle adart) + void erase_dart(Dart_descriptor adart) { // 1) We update the number of marked darts. for ( size_type i = 0; i < mnb_used_marks; ++i) @@ -604,39 +600,56 @@ namespace CGAL { mdarts.erase(adart); } + /** Erase a dart from the list of darts. Restricted version + * which do not delete attribute having no more dart associated. + * @param adart the dart to erase. + */ + void restricted_erase_dart(Dart_descriptor adart) + { + // 1) We update the number of marked darts. + for ( size_type i = 0; i < mnb_used_marks; ++i) + { + if (is_marked(adart, mused_marks_stack[i])) + --mnb_marked_darts[mused_marks_stack[i]]; + } + + // 2) We update the attribute_ref_counting. + Helper::template Foreach_enabled_attributes + >::run(*this,adart); + + // 3) We erase the dart. + mdarts.erase(adart); + } + /// @return true if dh points to a used dart (i.e. valid). - bool is_dart_used(Dart_const_handle dh) const + bool is_dart_used(Dart_const_descriptor dh) const { return mdarts.is_used(dh); } - /// @return a Dart_range (range through all the darts of the map). - Dart_range& darts() { return mdarts;} - Dart_const_range& darts() const { return mdarts; } - /** Get the first dart of this map. * @return the first dart. */ - Dart_handle first_dart() + Dart_descriptor first_dart() { - if (darts().begin() == darts().end()) return null_handle; - return mdarts.begin(); + if (darts().begin() == darts().end()) return null_descriptor; + return darts().begin(); } - Dart_const_handle first_dart() const + Dart_const_descriptor first_dart() const { - if (darts().begin() == darts().end()) return null_handle; - return mdarts.begin(); + if (darts().begin() == darts().end()) return null_descriptor; + return darts().begin(); } - /// @return the Dart_handle corresponding to the given dart. - Dart_handle dart_handle(Dart& adart) + /// @return the Dart_descriptor corresponding to the given dart. + Dart_descriptor dart_descriptor(Dart& adart) { return mdarts.iterator_to(adart); } - Dart_const_handle dart_handle(const Dart& adart) const + Dart_const_descriptor dart_descriptor(const Dart& adart) const { return mdarts.iterator_to(adart); } - Dart_handle dart_handle(size_type i) + Dart_descriptor dart_descriptor(size_type i) { CGAL_assertion(darts().is_used(i)); return mdarts.iterator_to(darts()[i]); } - Dart_const_handle dart_handle(size_type i) const + Dart_const_descriptor dart_descriptor(size_type i) const { CGAL_assertion(darts().is_used(i)); return mdarts.iterator_to(darts()[i]); @@ -647,7 +660,7 @@ namespace CGAL { * @return the dimension d such that dh is not d-free but k-free for * all k>d. -1 if the dart is free for all d in {0..n} */ - int highest_nonfree_dimension(Dart_const_handle dh) const + int highest_nonfree_dimension(Dart_const_descriptor dh) const { for (int i=(int)dimension; i>=0; --i) { if ( !is_free(dh, i) ) return i; } @@ -655,31 +668,56 @@ namespace CGAL { } /** Return a dart belonging to the same edge and to the second vertex - * of the current edge (nullptr if such a dart does not exist). + * of the current edge (null_descriptor if such a dart does not exist). * @return An handle to a dart belonging to the other extremity. */ - Dart_handle other_extremity(Dart_handle dh) + Dart_descriptor other_extremity(Dart_descriptor dh) { if (!is_free(dh, 0)) return alpha(dh, 0); - return null_handle; + return null_descriptor; } - Dart_const_handle other_extremity(Dart_const_handle dh) const + Dart_const_descriptor other_extremity(Dart_const_descriptor dh) const { if (!is_free(dh, 0)) return alpha(dh, 0); - return null_handle; + return null_descriptor; } // Set the handle on the i th attribute + // Restricted version which do not use delete attributes when their ref + // counting become null, nor that update the dart of attribute. template - void set_dart_attribute(Dart_handle dh, - typename Attribute_handle::type ah) + void restricted_set_dart_attribute(Dart_descriptor dh, + typename Attribute_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "set_dart_attribute called but i-attributes are disabled."); if ( this->template attribute(dh)==ah ) return; - if ( this->template attribute(dh)!=null_handle ) + if ( this->template attribute(dh)!=null_descriptor ) + { + this->template dec_attribute_ref_counting(this->template attribute(dh)); + } + + Base::template basic_set_dart_attribute(dh, ah); + + if ( ah!=null_descriptor ) + { + this->template inc_attribute_ref_counting(ah); + } + } + + // Set the handle on the i th attribute + template + void set_dart_attribute(Dart_descriptor dh, + typename Attribute_descriptor::type ah) + { + static_assert(Helper::template Dimension_index::value>=0, + "set_dart_attribute called but i-attributes are disabled."); + + if ( this->template attribute(dh)==ah ) return; + + if ( this->template attribute(dh)!=null_descriptor ) { this->template dec_attribute_ref_counting(this->template attribute(dh)); if ( this->are_attributes_automatically_managed() && @@ -690,7 +728,7 @@ namespace CGAL { this->template basic_set_dart_attribute(dh, ah); - if ( ah!=null_handle ) + if ( ah!=null_descriptor ) { this->template set_dart_of_attribute(ah, dh); this->template inc_attribute_ref_counting(ah); @@ -701,9 +739,9 @@ namespace CGAL { /// Marks can be modified even for const handle; otherwise it is not /// possible to iterate through const generalized maps. - // Initialize a given dart: all alpha to null_dart_handle and all + // Initialize a given dart: all alpha to null_dart_descriptor and all // attributes to null, all marks unmarked. - void init_dart(Dart_handle adart) + void init_dart(Dart_descriptor adart) { set_dart_marks(adart, mmask_marks); @@ -712,10 +750,12 @@ namespace CGAL { Helper::template Foreach_enabled_attributes >::run(*this, adart); + + internal::Init_id::run(mdarts, adart); } // Initialize a given dart: all alpha to this and all // attributes to null, marks are given. - void init_dart(Dart_handle adart, + void init_dart(Dart_descriptor adart, const std::bitset& amarks) { set_marks(adart, amarks); @@ -725,6 +765,8 @@ namespace CGAL { Helper::template Foreach_enabled_attributes >::run(*this, adart); + + internal::Init_id::run(mdarts, adart); } public: @@ -733,63 +775,63 @@ namespace CGAL { /// they are given as parameters) template - Dart_handle alpha(Dart_handle ADart, Alphas... alphas) - { return CGAL::internal::Alpha_functor:: + Dart_descriptor alpha(Dart_descriptor ADart, Alphas... alphas) + { return CGAL::internal::Alpha_functor:: run(*this, ADart, alphas...); } template - Dart_const_handle alpha(Dart_const_handle ADart, Alphas... alphas) const - { return CGAL::internal::Alpha_functor:: + Dart_const_descriptor alpha(Dart_const_descriptor ADart, Alphas... alphas) const + { return CGAL::internal::Alpha_functor:: run(*this, ADart, alphas...); } template - Dart_handle alpha(Dart_handle ADart) - { return CGAL::internal::Alpha_functor_static:: + Dart_descriptor alpha(Dart_descriptor ADart) + { return CGAL::internal::Alpha_functor_static:: run(*this, ADart); } template - Dart_const_handle alpha(Dart_const_handle ADart) const - { return CGAL::internal::Alpha_functor_static:: + Dart_const_descriptor alpha(Dart_const_descriptor ADart) const + { return CGAL::internal::Alpha_functor_static:: run(*this, ADart); } // Generic function to iterate on CMap or GMap in a generic way - bool is_previous_exist(Dart_const_handle ADart) const + bool is_previous_exist(Dart_const_descriptor ADart) const { return !this->template is_free<1>(ADart) && !this->template is_free<0>(alpha<1>(ADart)); } - bool is_next_exist(Dart_const_handle ADart) const + bool is_next_exist(Dart_const_descriptor ADart) const { return !this->template is_free<0>(ADart) && !this->template is_free<1>(this->template alpha<0>(ADart)); } template - bool is_opposite_exist(Dart_const_handle ADart) const + bool is_opposite_exist(Dart_const_descriptor ADart) const { return !this->template is_free(ADart) && !this->template is_free<0>(this->template alpha(ADart)); } - Dart_handle previous(Dart_handle ADart) + Dart_descriptor previous(Dart_descriptor ADart) { return this->template alpha<1, 0>(ADart); } - Dart_const_handle previous(Dart_const_handle ADart) const + Dart_const_descriptor previous(Dart_const_descriptor ADart) const { return this->template alpha<1, 0>(ADart); } - Dart_handle next(Dart_handle ADart) + Dart_descriptor next(Dart_descriptor ADart) { return this->template alpha<0, 1>(ADart); } - Dart_const_handle next(Dart_const_handle ADart) const + Dart_const_descriptor next(Dart_const_descriptor ADart) const { return this->template alpha<0, 1>(ADart); } - Dart_handle opposite2(Dart_handle ADart) + Dart_descriptor opposite2(Dart_descriptor ADart) { return this->template alpha<0, 2>(ADart); } - Dart_const_handle opposite2(Dart_const_handle ADart) const + Dart_const_descriptor opposite2(Dart_const_descriptor ADart) const { return this->template alpha<0, 2>(ADart); } template - Dart_handle opposite(Dart_handle ADart) + Dart_descriptor opposite(Dart_descriptor ADart) { return this->template alpha<0, dim>(ADart); } template - Dart_const_handle opposite(Dart_const_handle ADart) const + Dart_const_descriptor opposite(Dart_const_descriptor ADart) const { return this->template alpha<0, dim>(ADart); } - void set_next(Dart_handle dh1, Dart_handle dh2) + void set_next(Dart_descriptor dh1, Dart_descriptor dh2) { CGAL_assertion(!this->template is_free<0>(dh1)); this->template link_alpha<1>(this->template alpha<0>(dh1), dh2); } template - void set_opposite(Dart_handle dh1, Dart_handle dh2) + void set_opposite(Dart_descriptor dh1, Dart_descriptor dh2) { CGAL_assertion(!this->template is_free<0>(dh1)); CGAL_assertion(!this->template is_free<0>(dh2)); @@ -797,12 +839,12 @@ namespace CGAL { this->template link_alpha(dh1, this->template alpha<0>(dh2)); } - Dart_handle other_orientation(Dart_handle ADart) + Dart_descriptor other_orientation(Dart_descriptor ADart) { CGAL_assertion(!this->template is_free<0>(ADart)); return this->alpha<0>(ADart); } - Dart_const_handle other_orientation(Dart_const_handle ADart) const + Dart_const_descriptor other_orientation(Dart_const_descriptor ADart) const { CGAL_assertion(!this->template is_free<0>(ADart)); return this->alpha<0>(ADart); @@ -941,7 +983,7 @@ namespace CGAL { * @param amark the given mark. * @return true iff adart is marked for the mark amark. */ - bool is_marked(Dart_const_handle adart, size_type amark) const + bool is_marked(Dart_const_descriptor adart, size_type amark) const { CGAL_assertion( is_reserved(amark) ); @@ -953,7 +995,7 @@ namespace CGAL { * @param amark the given mark. * @param astate the state of the mark (on or off). */ - void set_mark_to(Dart_const_handle adart, size_type amark, + void set_mark_to(Dart_const_descriptor adart, size_type amark, bool astate) const { CGAL_assertion( is_reserved(amark) ); @@ -971,7 +1013,7 @@ namespace CGAL { * @param adart the dart. * @param amark the given mark. */ - void mark(Dart_const_handle adart, size_type amark) const + void mark(Dart_const_descriptor adart, size_type amark) const { CGAL_assertion( is_reserved(amark) ); @@ -985,7 +1027,7 @@ namespace CGAL { * @param adart the dart. * @param amark the given mark. */ - void unmark(Dart_const_handle adart, size_type amark) const + void unmark(Dart_const_descriptor adart, size_type amark) const { CGAL_assertion( is_reserved(amark) ); @@ -996,7 +1038,7 @@ namespace CGAL { } /** Unmark all the darts of the map for a given mark. - * If all the darts are marked or unmarked, this operation takes O(1) + * If all the darts are marked or unmarked, this operation takes \cgalBigO{1} * operations, otherwise it traverses all the darts of the map. * @param amark the given mark. */ @@ -1047,33 +1089,33 @@ namespace CGAL { } template - bool belong_to_same_cell(Dart_const_handle adart1, - Dart_const_handle adart2) const + bool belong_to_same_cell(Dart_const_descriptor adart1, + Dart_const_descriptor adart2) const { return CGAL::belong_to_same_cell(*this, adart1, adart2); } template - bool is_whole_cell_unmarked(Dart_const_handle adart, size_type amark) const + bool is_whole_cell_unmarked(Dart_const_descriptor adart, size_type amark) const { return CGAL::is_whole_cell_unmarked(*this, adart, amark); } template - bool is_whole_cell_marked(Dart_const_handle adart, size_type amark) const + bool is_whole_cell_marked(Dart_const_descriptor adart, size_type amark) const { return CGAL::is_whole_cell_marked(*this, adart, amark); } template - size_type mark_cell(Dart_const_handle adart, size_type amark) const + size_type mark_cell(Dart_const_descriptor adart, size_type amark) const { return CGAL::mark_cell(*this, adart, amark); } template - size_type unmark_cell(Dart_const_handle adart, size_type amark) const + size_type unmark_cell(Dart_const_descriptor adart, size_type amark) const { return CGAL::unmark_cell(*this, adart, amark); } template - size_type mark_oriented_cell(Dart_const_handle adart, size_type amark, + size_type mark_oriented_cell(Dart_const_descriptor adart, size_type amark, size_type amark2=INVALID_MARK) const { return CGAL::mark_oriented_cell(*this, adart, amark, amark2); } template - size_type unmark_oriented_cell(Dart_const_handle adart, size_type amark, + size_type unmark_oriented_cell(Dart_const_descriptor adart, size_type amark, size_type amark2=INVALID_MARK) const { return CGAL::unmark_oriented_cell(*this, adart, amark, amark2); } @@ -1128,7 +1170,7 @@ namespace CGAL { { CGAL_assertion( i<=dimension ); unsigned int res = 0; - Dart_handle d, d2; + Dart_descriptor d, d2; for ( typename Dart_range::iterator it(darts().begin()); it!=darts().end(); ++it) @@ -1168,7 +1210,7 @@ namespace CGAL { /** Test if the map is valid. * @return true iff the map is valid. */ - bool is_valid() const + bool is_valid(bool show_errors=true) const { bool valid = true; unsigned int i = 0, j = 0; @@ -1194,9 +1236,11 @@ namespace CGAL { for ( i = 0; i <= dimension; ++i) if (alpha(it, i, i)!=it) { - std::cerr << "Map not valid: alpha(" << i + if (show_errors) + { std::cerr << "Map not valid: alpha(" << i << ") is not an involution for dart " < std::ostream& display_orbits(std::ostream & aos) const { - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); unsigned int nb = 0; size_type amark = get_new_mark(); for ( typename Dart_range::const_iterator it1(darts().begin()), @@ -1365,25 +1407,27 @@ namespace CGAL { /// Create a new attribute. /// @return a handle on the new attribute. template - typename Attribute_handle::type create_attribute(const Args&... args) + typename Attribute_descriptor::type create_attribute(const Args&... args) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= + typename Attribute_descriptor::type res= std::get::value> (mattribute_containers).emplace(args...); // Reinitialize the ref counting of the new attribute. This is normally - // not required except if create_attribute is used as "copy contructor". + // not required except if create_attribute is used as "copy constructor". this->template init_attribute_ref_counting(res); + internal::Init_id::type>::run + (this->template attributes(), res); return res; } /// Erase an attribute. /// @param h a handle to the attribute to erase. template - void erase_attribute(typename Attribute_handle::type h) + void erase_attribute(typename Attribute_descriptor::type h) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "erase_attribute but i-attributes are disabled"); std::get::value> (mattribute_containers).erase(h); @@ -1391,9 +1435,9 @@ namespace CGAL { /// @return true if ah points to a used i-attribute (i.e. valid). template - bool is_attribute_used(typename Attribute_const_handle< i >::type ah) const + bool is_attribute_used(typename Attribute_const_descriptor< i >::type ah) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "is_attribute_used but i-attributes are disabled"); return std::get::value> (mattribute_containers).is_used(ah); @@ -1403,7 +1447,7 @@ namespace CGAL { template size_type number_of_attributes() const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "number_of_attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers).size(); @@ -1414,17 +1458,20 @@ namespace CGAL { * @param ah the vertex to set. */ template - void set_attribute(Dart_handle dh, - typename Attribute_handle::type ah) + void set_attribute(Dart_descriptor dh, + typename Attribute_descriptor::type ah) { - CGAL_static_assertion(i<=dimension); - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(i<=dimension); + static_assert(Helper::template Dimension_index::value>=0, "set_attribute but i-attributes are disabled"); - for ( typename Dart_of_cell_range::iterator it(*this, dh); - it.cont(); ++it) + for (typename Dart_of_cell_range::iterator it(*this, dh); + it.cont(); ++it) { this->template set_dart_attribute(it, ah); } + if(ah!=null_descriptor) + // To ensure that the dart of this attribute is dh + { this->template set_dart_of_attribute(ah, dh); } } /// @return a Attributes_range (range through all the @@ -1432,7 +1479,7 @@ namespace CGAL { template typename Attribute_range::type & attributes() { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers); @@ -1441,7 +1488,7 @@ namespace CGAL { template typename Attribute_const_range::type & attributes() const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers); @@ -1454,7 +1501,7 @@ namespace CGAL { typename Attribute_type::type&)>& onsplit_functor() { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1470,7 +1517,7 @@ namespace CGAL { typename Attribute_type::type&)>& onsplit_functor() const { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1486,7 +1533,7 @@ namespace CGAL { typename Attribute_type::type&)>& onmerge_functor() { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1501,7 +1548,7 @@ namespace CGAL { typename Attribute_type::type&)>& onmerge_functor() const { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1520,23 +1567,23 @@ namespace CGAL { * @param i the dimension of the alpha. */ template - void basic_link_alpha(Dart_handle dart1, Dart_handle dart2) + void basic_link_alpha(Dart_descriptor dart1, Dart_descriptor dart2) { CGAL_assertion( i<=dimension ); this->template dart_link_alpha(dart1, dart2); this->template dart_link_alpha(dart2, dart1); } - void basic_link_alpha(Dart_handle dart1, Dart_handle dart2, unsigned int i) + void basic_link_alpha(Dart_descriptor dart1, Dart_descriptor dart2, unsigned int i) { CGAL_assertion( i<=dimension ); dart_link_alpha(dart1, dart2, i); dart_link_alpha(dart2, dart1, i); } - /** Double link two darts, and update the nullptr attributes. + /** Double link two darts, and update the null_descriptor attributes. * \em adart1 is i-linked to \em adart2 and \em adart2 is i-linked - * with \em adart1. The nullptr attributes of \em adart1 are updated to - * non nullptr attributes associated to \em adart2, and vice-versa. + * with \em adart1. The null_descriptor attributes of \em adart1 are updated to + * non null_descriptor attributes associated to \em adart2, and vice-versa. * If both darts have an attribute, the attribute of adart1 is * associated to adart2. * We can obtain a non-valid map with darts belonging to a same cell @@ -1547,7 +1594,7 @@ namespace CGAL { * @pre i<=dimension. */ template - void link_alpha(Dart_handle adart1, Dart_handle adart2) + void link_alpha(Dart_descriptor adart1, Dart_descriptor adart2) { CGAL_assertion( i<=dimension ); Helper::template Foreach_enabled_attributes_except @@ -1559,8 +1606,8 @@ namespace CGAL { /** Double link a dart with alphai to a second dart. * \em adart1 is i-linked to \em adart2 and \em adart2 is i^-1-linked - * with \em adart1. The nullptr attributes of \em adart1 are updated to - * non nullptr attributes associated to \em adart2, and vice-versa, + * with \em adart1. The null_descriptor attributes of \em adart1 are updated to + * non null_descriptor attributes associated to \em adart2, and vice-versa, * if both darts have an attribute, the attribute of adart1 is * associated to adart2 (only if update_attributes==true). * @param adart1 a first dart. @@ -1569,7 +1616,7 @@ namespace CGAL { * (deprecated, now we use are_attributes_automatically_managed()) */ template - void link_alpha(Dart_handle adart1, Dart_handle adart2, + void link_alpha(Dart_descriptor adart1, Dart_descriptor adart2, bool update_attributes) { if ( update_attributes ) link_alpha(adart1, adart2); @@ -1585,14 +1632,14 @@ namespace CGAL { * @param i the dimension of the alpha. */ template - void unlink_alpha(Dart_handle adart) + void unlink_alpha(Dart_descriptor adart) { CGAL_assertion(!this->template is_free(adart)); CGAL_assertion(i<=dimension); this->template dart_unlink_alpha(alpha(adart)); this->template dart_unlink_alpha(adart); } - void unlink_alpha(Dart_handle adart, unsigned int i) + void unlink_alpha(Dart_descriptor adart, unsigned int i) { CGAL_assertion(!is_free(adart,i)); CGAL_assertion(i<=dimension); @@ -1606,7 +1653,7 @@ namespace CGAL { * @return true iff \em adart1 can be i-sewn with \em adart2. */ template - bool is_sewable(Dart_const_handle adart1, Dart_const_handle adart2) const + bool is_sewable(Dart_const_descriptor adart1, Dart_const_descriptor adart2) const { return CGAL::internal:: GMap_is_sewable_functor::run(*this, adart1, adart2); @@ -1621,7 +1668,7 @@ namespace CGAL { * @pre is_sewable(adart1, adart2). */ template - void topo_sew(Dart_handle adart1, Dart_handle adart2) + void topo_sew(Dart_descriptor adart1, Dart_descriptor adart2) { CGAL_assertion( i<=Self::dimension ); CGAL_assertion( (is_sewable(adart1,adart2)) ); @@ -1644,7 +1691,7 @@ namespace CGAL { * @post is_valid() */ template - void sew(Dart_handle adart1, Dart_handle adart2) + void sew(Dart_descriptor adart1, Dart_descriptor adart2) { CGAL_assertion( i<=dimension ); CGAL_assertion( (is_sewable(adart1,adart2)) ); @@ -1687,7 +1734,7 @@ namespace CGAL { * @pre is_sewable(adart1, adart2). */ template - void sew(Dart_handle adart1, Dart_handle adart2, bool update_attributes) + void sew(Dart_descriptor adart1, Dart_descriptor adart2, bool update_attributes) { if ( update_attributes ) sew(adart1, adart2); else topo_sew(adart1, adart2); @@ -1701,7 +1748,7 @@ namespace CGAL { * @pre i<=dimension. */ template - void topo_unsew(Dart_handle adart) + void topo_unsew(Dart_descriptor adart) { CGAL_assertion( !(is_free(adart)) ); CGAL_assertion( i<=Self::dimension ); @@ -1720,12 +1767,12 @@ namespace CGAL { * @pre i<=dimension */ template - void unsew(Dart_handle adart) + void unsew(Dart_descriptor adart) { CGAL_assertion(i<=Self::dimension); CGAL_assertion( !this->template is_free(adart) ); - std::deque modified_darts; + std::deque modified_darts; for ( CGAL::GMap_dart_iterator_of_involution it(*this, adart); it.cont(); ++it ) @@ -1751,12 +1798,36 @@ namespace CGAL { * @pre !adart->is_free(i). */ template - void unsew(Dart_handle adart, bool update_attributes) + void unsew(Dart_descriptor adart, bool update_attributes) { if ( update_attributes ) unsew(adart); else topo_unsew(adart); } + /// Keep the biggest connected component. + /// @return the size (in number of darts) of the biggest cc. + std::size_t keep_biggest_connected_component() + { + std::map ccs; + + size_type treated=get_new_mark(); + for (auto it=darts().begin(), itend=darts().end(); it!=itend; ++it) + { + if (!is_marked(it, treated)) + { ccs[mark_cell(it, treated)]=it; } + } + + if (ccs.size()>1) + { // Here all darts are marked + this->template unmark_cell(ccs.rbegin()->second, treated); // Unmark the biggest cc + erase_marked_darts(treated); + } + + free_mark(treated); + + return ccs.rbegin()->first; + } + /** Count the marked cells (at least one marked dart). * @param amark the mark to consider. * @param avector containing the dimensions of the cells to count. @@ -1868,7 +1939,7 @@ namespace CGAL { * @param adart the dart. * @param amarks the marks to set. */ - void set_marks(Dart_const_handle adart, + void set_marks(Dart_const_descriptor adart, const std::bitset & amarks) const { set_dart_marks(adart, amarks ^ mmask_marks); } @@ -1876,7 +1947,7 @@ namespace CGAL { * @param adart the dart. * @return allt the marks of adart. */ - std::bitset get_marks(Dart_const_handle adart) const + std::bitset get_marks(Dart_const_descriptor adart) const { return get_dart_marks(adart) ^ mmask_marks; } /** Get the mask associated to a given mark. @@ -1890,16 +1961,17 @@ namespace CGAL { } public: + /// @return the positive turn between the two given darts. // @pre next(d1) and d2 must belong to the same vertex. - std::size_t positive_turn(Dart_const_handle d1, Dart_const_handle d2) const + std::size_t positive_turn(Dart_const_descriptor d1, Dart_const_descriptor d2) const { CGAL_assertion((!this->template is_free<1>(d1))); /* CGAL_assertion((belong_to_same_cell<0>(this->next(d1), d2))); */ if (d2==opposite2(d1)) { return 0; } - Dart_const_handle dd1=d1; + Dart_const_descriptor dd1=d1; std::size_t res=1; while (next(dd1)!=d2) { @@ -1917,7 +1989,7 @@ namespace CGAL { /// @return the negative turn between the two given darts. // @pre next(d1) and d2 must belong to the same vertex. - std::size_t negative_turn(Dart_const_handle d1, Dart_const_handle d2) const + std::size_t negative_turn(Dart_const_descriptor d1, Dart_const_descriptor d2) const { CGAL_assertion((!this->template is_free<1>(d1))); /* CGAL_assertion((belong_to_same_cell<0>(this->next(d1), d2))); */ @@ -1929,7 +2001,7 @@ namespace CGAL { d1=opposite2(d1); d2=opposite2(d2); - Dart_const_handle dd1=d1; + Dart_const_descriptor dd1=d1; std::size_t res=1; while (previous(dd1)!=d2) { @@ -1956,9 +2028,8 @@ namespace CGAL { unsigned int erase_marked_darts(size_type amark) { unsigned int res = 0, i = 0; - Dart_handle d; - for ( typename Dart_range::iterator it(darts().begin()), - itend(darts().end()); it!=itend; ) + Dart_descriptor d; + for(typename Dart_range::iterator it=darts().begin(); it!=darts().end();) { d = it++; if (is_marked(d, amark)) @@ -1982,7 +2053,7 @@ namespace CGAL { , CGAL::GMap_dart_const_iterator_basic_of_orbit > Base; - Dart_of_orbit_basic_range(Self &amap, Dart_handle adart, size_type amark=INVALID_MARK): + Dart_of_orbit_basic_range(Self &amap, Dart_descriptor adart, size_type amark=INVALID_MARK): Base(amap, adart, amark) {} }; @@ -1996,7 +2067,7 @@ namespace CGAL { > Base; - Dart_of_orbit_basic_const_range(const Self &amap, Dart_const_handle + Dart_of_orbit_basic_const_range(const Self &amap, Dart_const_descriptor adart, size_type amark=INVALID_MARK): Base(amap, adart, amark) {} @@ -2012,7 +2083,7 @@ namespace CGAL { , CGAL::GMap_dart_const_iterator_of_orbit > Base; - Dart_of_orbit_range(Self &amap, Dart_handle adart) : Base(amap,adart) + Dart_of_orbit_range(Self &amap, Dart_descriptor adart) : Base(amap,adart) {} }; //************************************************************************** @@ -2024,29 +2095,29 @@ namespace CGAL { typedef CGAL::CMap_const_range > Base; - Dart_of_orbit_const_range(const Self &amap, Dart_const_handle adart): + Dart_of_orbit_const_range(const Self &amap, Dart_const_descriptor adart): Base(amap,adart) {} }; //************************************************************************** /// @return a range on all the darts of the given orbit template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) + Dart_of_orbit_range darts_of_orbit(Dart_descriptor adart) { return Dart_of_orbit_range(*this,adart); } //-------------------------------------------------------------------------- template Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const + darts_of_orbit(Dart_const_descriptor adart) const { return Dart_of_orbit_const_range(*this,adart); } //-------------------------------------------------------------------------- template - Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_handle adart, + Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_descriptor adart, size_type amark=INVALID_MARK) { return Dart_of_orbit_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const + darts_of_orbit_basic(Dart_const_descriptor adart, size_type amark=INVALID_MARK) const { return Dart_of_orbit_basic_const_range(*this,adart,amark); } //************************************************************************** // Dart_of_cell_basic_range @@ -2059,7 +2130,7 @@ namespace CGAL { , CGAL::GMap_dart_const_iterator_basic_of_cell > Base; - Dart_of_cell_basic_range(Self &amap, Dart_handle adart, size_type amark=INVALID_MARK) : + Dart_of_cell_basic_range(Self &amap, Dart_descriptor adart, size_type amark=INVALID_MARK) : Base(amap, adart, amark) {} }; @@ -2072,7 +2143,7 @@ namespace CGAL { typedef CMap_const_range > Base; - Dart_of_cell_basic_const_range(const Self &amap, Dart_const_handle adart, + Dart_of_cell_basic_const_range(const Self &amap, Dart_const_descriptor adart, size_type amark=INVALID_MARK) : Base(amap, adart, amark) {} @@ -2088,7 +2159,7 @@ namespace CGAL { , CGAL::GMap_dart_const_iterator_of_cell > Base; - Dart_of_cell_range(Self &amap, Dart_handle adart) : + Dart_of_cell_range(Self &amap, Dart_descriptor adart) : Base(amap, adart) {} }; @@ -2101,47 +2172,47 @@ namespace CGAL { typedef CMap_const_range > Base; - Dart_of_cell_const_range(const Self &amap, Dart_const_handle adart) : + Dart_of_cell_const_range(const Self &amap, Dart_const_descriptor adart) : Base(amap, adart) {} }; //-------------------------------------------------------------------------- /// @return a range on all the darts of the given i-cell template - Dart_of_cell_basic_range darts_of_cell_basic(Dart_handle adart, + Dart_of_cell_basic_range darts_of_cell_basic(Dart_descriptor adart, size_type amark=INVALID_MARK) { return Dart_of_cell_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_cell_basic_const_range darts_of_cell_basic - (Dart_const_handle adart, size_type amark=INVALID_MARK) const + (Dart_const_descriptor adart, size_type amark=INVALID_MARK) const { return Dart_of_cell_basic_const_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_cell_basic_range - darts_of_cell_basic(Dart_handle adart, size_type amark=INVALID_MARK) + darts_of_cell_basic(Dart_descriptor adart, size_type amark=INVALID_MARK) { return darts_of_cell_basic(adart,amark); } //-------------------------------------------------------------------------- template Dart_of_cell_basic_const_range - darts_of_cell_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const + darts_of_cell_basic(Dart_const_descriptor adart, size_type amark=INVALID_MARK) const { return darts_of_cell_basic(adart,amark); } //-------------------------------------------------------------------------- template - Dart_of_cell_range darts_of_cell(Dart_handle adart) + Dart_of_cell_range darts_of_cell(Dart_descriptor adart) { return Dart_of_cell_range(*this,adart); } //-------------------------------------------------------------------------- template - Dart_of_cell_const_range darts_of_cell(Dart_const_handle adart) const + Dart_of_cell_const_range darts_of_cell(Dart_const_descriptor adart) const { return Dart_of_cell_const_range(*this,adart); } //-------------------------------------------------------------------------- template - Dart_of_cell_range darts_of_cell(Dart_handle adart) + Dart_of_cell_range darts_of_cell(Dart_descriptor adart) { return darts_of_cell(adart); } //-------------------------------------------------------------------------- template Dart_of_cell_const_range - darts_of_cell(Dart_const_handle adart) const + darts_of_cell(Dart_const_descriptor adart) const { return darts_of_cell(adart); } //************************************************************************** // Dart_of_involution_basic_range @@ -2154,7 +2225,7 @@ namespace CGAL { , CGAL::GMap_dart_const_iterator_basic_of_involution > Base; - Dart_of_involution_basic_range(Self &amap, Dart_handle adart, + Dart_of_involution_basic_range(Self &amap, Dart_descriptor adart, size_type amark=INVALID_MARK): Base(amap, adart, amark) {} @@ -2170,7 +2241,7 @@ namespace CGAL { Base; Dart_of_involution_basic_const_range(const Self &amap, - Dart_const_handle adart, + Dart_const_descriptor adart, size_type amark=INVALID_MARK) : Base(amap, adart, amark) {} @@ -2178,23 +2249,23 @@ namespace CGAL { //************************************************************************** template Dart_of_involution_basic_range - darts_of_involution_basic(Dart_handle adart, size_type amark=INVALID_MARK) + darts_of_involution_basic(Dart_descriptor adart, size_type amark=INVALID_MARK) { return Dart_of_involution_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_involution_basic_const_range - darts_of_involution_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const + darts_of_involution_basic(Dart_const_descriptor adart, size_type amark=INVALID_MARK) const { return Dart_of_involution_basic_const_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_involution_basic_range - darts_of_involution_basic(Dart_handle adart, size_type amark=INVALID_MARK) + darts_of_involution_basic(Dart_descriptor adart, size_type amark=INVALID_MARK) { return Dart_of_involution_basic_range (*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_involution_basic_const_range - darts_of_involution_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const + darts_of_involution_basic(Dart_const_descriptor adart, size_type amark=INVALID_MARK) const { return Dart_of_involution_basic_const_range (*this,adart,amark); } //************************************************************************** @@ -2208,7 +2279,7 @@ namespace CGAL { , CGAL::GMap_dart_const_iterator_of_involution > Base; - Dart_of_involution_range(Self &amap, Dart_handle adart) : + Dart_of_involution_range(Self &amap, Dart_descriptor adart) : Base(amap, adart) {} }; @@ -2222,29 +2293,29 @@ namespace CGAL { > Base; Dart_of_involution_const_range(const Self &amap, - Dart_const_handle adart): + Dart_const_descriptor adart): Base(amap, adart) {} }; //************************************************************************** template Dart_of_involution_range - darts_of_involution(Dart_handle adart) + darts_of_involution(Dart_descriptor adart) { return Dart_of_involution_range(*this,adart); } //-------------------------------------------------------------------------- template Dart_of_involution_const_range - darts_of_involution(Dart_const_handle adart) const + darts_of_involution(Dart_const_descriptor adart) const { return Dart_of_involution_const_range(*this,adart); } //-------------------------------------------------------------------------- template Dart_of_involution_range - darts_of_involution(Dart_handle adart) + darts_of_involution(Dart_descriptor adart) { return Dart_of_involution_range(*this,adart); } //-------------------------------------------------------------------------- template Dart_of_involution_const_range - darts_of_involution(Dart_const_handle adart) const + darts_of_involution(Dart_const_descriptor adart) const { return Dart_of_involution_const_range(*this,adart); } //************************************************************************** // Dart_basic_range @@ -2254,9 +2325,9 @@ namespace CGAL { Dart_basic_range(Self &amap) : mmap(amap) {} iterator begin() { return iterator(mmap); } - iterator end() { return iterator(mmap,mmap.null_handle); } + iterator end() { return iterator(mmap,mmap.null_descriptor); } const_iterator begin() const { return const_iterator(mmap); } - const_iterator end() const { return const_iterator(mmap,mmap.null_handle); } + const_iterator end() const { return const_iterator(mmap,mmap.null_descriptor); } size_type size() const { return mmap.number_of_darts(); } bool empty() const @@ -2271,7 +2342,7 @@ namespace CGAL { Dart_basic_const_range(Self &amap) : mmap(amap) {} const_iterator begin() const { return const_iterator(mmap); } - const_iterator end() const { return const_iterator(mmap,mmap.null_handle); } + const_iterator end() const { return const_iterator(mmap,mmap.null_descriptor); } size_type size() const { return mmap.number_of_darts(); } bool empty() const @@ -2297,7 +2368,7 @@ namespace CGAL { CGAL::GMap_one_dart_per_incident_cell_const_iterator > Base; - One_dart_per_incident_cell_range(Self &amap, Dart_handle adart): + One_dart_per_incident_cell_range(Self &amap, Dart_descriptor adart): Base(amap, adart) {} }; @@ -2312,7 +2383,7 @@ namespace CGAL { > Base; One_dart_per_incident_cell_const_range(const Self &amap, - Dart_const_handle adart) : + Dart_const_descriptor adart) : Base(amap, adart) {} }; @@ -2326,9 +2397,9 @@ namespace CGAL { One_dart_per_cell_range(Self &amap) : mmap(amap), msize(0) {} iterator begin() { return iterator(mmap); } - iterator end() { return iterator(mmap,mmap.null_handle); } + iterator end() { return iterator(mmap,mmap.null_descriptor); } const_iterator begin() const { return const_iterator(mmap); } - const_iterator end() const { return const_iterator(mmap,mmap.null_handle); } + const_iterator end() const { return const_iterator(mmap,mmap.null_descriptor); } size_type size() const { if (msize==0) @@ -2351,7 +2422,7 @@ namespace CGAL { One_dart_per_cell_const_range(const Self &amap) : mmap(amap), msize(0) {} const_iterator begin() const { return const_iterator(mmap); } - const_iterator end() const { return const_iterator(mmap,mmap.null_handle); } + const_iterator end() const { return const_iterator(mmap,mmap.null_descriptor); } size_type size() const { if (msize==0) @@ -2369,22 +2440,22 @@ namespace CGAL { /// @return a range on the i-cells incindent to the given j-cell. template One_dart_per_incident_cell_range - one_dart_per_incident_cell(Dart_handle adart) + one_dart_per_incident_cell(Dart_descriptor adart) { return One_dart_per_incident_cell_range(*this,adart); } //-------------------------------------------------------------------------- template One_dart_per_incident_cell_const_range - one_dart_per_incident_cell(Dart_const_handle adart) const + one_dart_per_incident_cell(Dart_const_descriptor adart) const { return One_dart_per_incident_cell_const_range(*this,adart); } //-------------------------------------------------------------------------- template One_dart_per_incident_cell_range - one_dart_per_incident_cell(Dart_handle adart) + one_dart_per_incident_cell(Dart_descriptor adart) { return one_dart_per_incident_cell(adart); } //-------------------------------------------------------------------------- template One_dart_per_incident_cell_const_range - one_dart_per_incident_cell(Dart_const_handle adart) const + one_dart_per_incident_cell(Dart_const_descriptor adart) const { return one_dart_per_incident_cell(adart); } //-------------------------------------------------------------------------- /// @return a range on all the i-cells @@ -2409,20 +2480,19 @@ namespace CGAL { /** Compute the dual of a Generalized_map. * @param amap the gmap in which we build the dual of this map. - * @param adart a dart of the initial map, nullptr by default. - * @return adart of the dual map, the dual of adart if adart!=nullptr, + * @param adart a dart of the initial map, null_descriptor by default. + * @return adart of the dual map, the dual of adart if adart!=null_descriptor, * any dart otherwise. * As soon as we don't modify this map and amap map, we can iterate * simultaneously through all the darts of the two maps and we have * each time of the iteration two "dual" darts. */ - Dart_handle dual(Self& amap, Dart_handle adart=null_handle) + Dart_descriptor dual(Self& amap, Dart_descriptor adart=null_descriptor) { CGAL_assertion( is_without_boundary(dimension) ); - CGAL::Unique_hash_map< Dart_handle, Dart_handle, - typename Self::Hash_function > dual; - Dart_handle d, d2, res = amap.null_handle; + CGAL::Unique_hash_map< Dart_descriptor, Dart_descriptor,Hash_function > dual; + Dart_descriptor d, d2, res = amap.null_descriptor, newd; // We clear amap. TODO return a new amap ? amap.clear(); @@ -2431,11 +2501,12 @@ namespace CGAL { for ( typename Dart_range::iterator it=darts().begin(); it!=darts().end(); ++it) { - dual[it] = amap.create_dart(); + newd=amap.create_dart(); + dual[it]=newd; internal::Copy_dart_info_functor:: - run(static_cast(amap), static_cast(*this), - it, dual[it]); - if ( it==adart && res==amap.null_handle ) res = dual[it]; + run(static_cast(*this), static_cast(amap), + it, newd); + if ( it==adart && res==amap.null_descriptor ) { res=newd; } } // Then we link the darts by using the dual formula : @@ -2456,7 +2527,7 @@ namespace CGAL { } } - if ( res==amap.null_handle ) res = amap.darts().begin(); + if ( res==amap.null_descriptor ) res = amap.darts().begin(); return res; } @@ -2479,11 +2550,11 @@ namespace CGAL { */ template - bool are_cc_isomorphic(Dart_const_handle dh1, + bool are_cc_isomorphic(Dart_const_descriptor dh1, const Generalized_map_base & map2, typename Generalized_map_base - ::Dart_const_handle dh2, + ::Dart_const_descriptor dh2, bool testDartInfo=true, bool testAttributes=true, bool testPoint=true) const @@ -2493,8 +2564,8 @@ namespace CGAL { bool match = true; // Two stacks used to run through the two maps. - std::deque< Dart_const_handle > toTreat1; - std::deque< typename Map2::Dart_const_handle > toTreat2; + std::deque< Dart_const_descriptor > toTreat1; + std::deque< typename Map2::Dart_const_descriptor > toTreat2; // A dart of this map is marked with m1 if its bijection was set // (and similarly for mark m2 and darts of map2) @@ -2508,13 +2579,13 @@ namespace CGAL { toTreat1.push_back(dh1); toTreat2.push_back(dh2); - Dart_const_handle current; - typename Map2::Dart_const_handle other; + Dart_const_descriptor current; + typename Map2::Dart_const_descriptor other; unsigned int i = 0; - CGAL::Unique_hash_map bijection; + CGAL::Unique_hash_map bijection; while (match && !toTreat1.empty()) { @@ -2527,7 +2598,7 @@ namespace CGAL { if (!is_marked(current, m1)) { if (map2.is_marked(other, m2)) - match=false; + { match=false; } else { bijection[current] = other; @@ -2564,7 +2635,7 @@ namespace CGAL { ::run(*this, map2, current, other); } - // We test if the injection is valid with its neighboors. + // We test if the injection is valid with its neighbors. // We go out as soon as it is not satisfied. for (i = 0; match && i <= dimension; ++i) { @@ -2693,7 +2764,7 @@ namespace CGAL { if (is_empty() && map2.is_empty()) return true; if (is_empty() || map2.is_empty()) return false; - Dart_const_handle d1=darts().begin(); + Dart_const_descriptor d1=darts().begin(); for (typename Generalized_map_base:: Dart_range::const_iterator it(map2.darts().begin()), @@ -2717,7 +2788,7 @@ namespace CGAL { * Note it is not allow to have accmark!=INVALID_MARK and * aorientationmark==INVALID_MARK. */ - bool is_cc_orientable(Dart_const_handle dh, + bool is_cc_orientable(Dart_const_descriptor dh, size_type accmark=INVALID_MARK, size_type aorientationmark=INVALID_MARK) const { @@ -2735,9 +2806,9 @@ namespace CGAL { bool stop_if_nonorientable = (accmark==INVALID_MARK && aorientationmark==INVALID_MARK); - std::queue toTreat; + std::queue toTreat; bool orientable=true; - Dart_const_handle cur; + Dart_const_descriptor cur; // Iterator through the connected component toTreat.push(dh); @@ -2878,9 +2949,9 @@ namespace CGAL { /** Create an half-edge. * @return a dart of the new half-edge. */ - Dart_handle make_half_edge() + Dart_descriptor make_half_edge() { - Dart_handle d1=create_dart(); + Dart_descriptor d1=create_dart(); basic_link_alpha<0>(d1, create_dart()); return d1; } @@ -2889,15 +2960,15 @@ namespace CGAL { * if closed==true, the edge has no 2-free dart. * @return a dart of the new edge. */ - Dart_handle make_edge(bool closed=false) + Dart_descriptor make_edge(bool closed=false) { - Dart_handle d1=create_dart(); - Dart_handle d2=create_dart(); + Dart_descriptor d1=create_dart(); + Dart_descriptor d2=create_dart(); basic_link_alpha<0>(d1, d2); if (closed) { - Dart_handle d3=create_dart(); - Dart_handle d4=create_dart(); + Dart_descriptor d3=create_dart(); + Dart_descriptor d4=create_dart(); basic_link_alpha<0>(d3, d4); basic_link_alpha<2>(d1, d3); basic_link_alpha<2>(d2, d4); @@ -2906,18 +2977,18 @@ namespace CGAL { return d1; } - /** Create an edge given 2 Attribute_handle<0>. + /** Create an edge given 2 Attribute_descriptor<0>. * Note that this function can be used only if 0-attributes are non void * @param h0 the first vertex handle. * @param h1 the second vertex handle. * if closed==true, the edge has no 2-free dart. * @return the dart of the new edge incident to h0. */ - Dart_handle make_segment(typename Attribute_handle<0>::type h0, - typename Attribute_handle<0>::type h1, + Dart_descriptor make_segment(typename Attribute_descriptor<0>::type h0, + typename Attribute_descriptor<0>::type h1, bool closed=false) { - Dart_handle d1 = this->make_edge(closed); + Dart_descriptor d1 = this->make_edge(closed); set_dart_attribute<0>(d1,h0); set_dart_attribute<0>(this->alpha<0>(d1),h1); @@ -2934,15 +3005,15 @@ namespace CGAL { * (a cycle of alg edges alpha1 links together). * @return a new dart. */ - Dart_handle make_combinatorial_polygon(unsigned int alg) + Dart_descriptor make_combinatorial_polygon(unsigned int alg) { CGAL_assertion(alg>0); - Dart_handle start = make_edge(); - Dart_handle prev = alpha<0>(start); + Dart_descriptor start = make_edge(); + Dart_descriptor prev = alpha<0>(start); for ( unsigned int nb=1; nb(prev, cur); prev=alpha<0>(cur); } @@ -2953,16 +3024,16 @@ namespace CGAL { /** Test if a face is a combinatorial polygon of length alg * (a cycle of alg edges alpha1 links together). - * @param adart an intial dart + * @param adart an initial dart * @return true iff the face containing adart is a polygon of length alg. */ - bool is_face_combinatorial_polygon(Dart_const_handle adart, + bool is_face_combinatorial_polygon(Dart_const_descriptor adart, unsigned int alg) const { CGAL_assertion(alg>0); unsigned int nb = 0; - Dart_const_handle cur = adart; + Dart_const_descriptor cur = adart; do { ++nb; @@ -2974,18 +3045,18 @@ namespace CGAL { return (nb==alg); } - /** Create a triangle given 3 Attribute_handle<0>. + /** Create a triangle given 3 Attribute_descriptor<0>. * @param h0 the first handle. * @param h1 the second handle. * @param h2 the third handle. * Note that this function can be used only if 0-attributes are non void * @return the dart of the new triangle incident to h0 and to edge h0h1. */ - Dart_handle make_triangle(typename Attribute_handle<0>::type h0, - typename Attribute_handle<0>::type h1, - typename Attribute_handle<0>::type h2) + Dart_descriptor make_triangle(typename Attribute_descriptor<0>::type h0, + typename Attribute_descriptor<0>::type h1, + typename Attribute_descriptor<0>::type h2) { - Dart_handle d1 = this->make_combinatorial_polygon(3); + Dart_descriptor d1 = this->make_combinatorial_polygon(3); set_dart_attribute<0>(d1,h0); set_dart_attribute<0>(this->alpha<1>(d1),h0); @@ -2997,7 +3068,7 @@ namespace CGAL { return d1; } - /** Create a quadrangle given 4 Vertex_attribute_handle. + /** Create a quadrangle given 4 Vertex_attribute_descriptor. * @param h0 the first vertex handle. * @param h1 the second vertex handle. * @param h2 the third vertex handle. @@ -3005,12 +3076,12 @@ namespace CGAL { * Note that this function can be used only if 0-attributes are non void * @return the dart of the new quadrilateral incident to h0 and to edge h0h1. */ - Dart_handle make_quadrangle(typename Attribute_handle<0>::type h0, - typename Attribute_handle<0>::type h1, - typename Attribute_handle<0>::type h2, - typename Attribute_handle<0>::type h3) + Dart_descriptor make_quadrangle(typename Attribute_descriptor<0>::type h0, + typename Attribute_descriptor<0>::type h1, + typename Attribute_descriptor<0>::type h2, + typename Attribute_descriptor<0>::type h3) { - Dart_handle d1 = this->make_combinatorial_polygon(4); + Dart_descriptor d1 = this->make_combinatorial_polygon(4); set_dart_attribute<0>(d1,h0); set_dart_attribute<0>(this->alpha<1>(d1),h0); @@ -3031,10 +3102,10 @@ namespace CGAL { * @param d4 a dart onto a fourth triangle. * @return d1. */ - Dart_handle make_combinatorial_tetrahedron(Dart_handle d1, - Dart_handle d2, - Dart_handle d3, - Dart_handle d4) + Dart_descriptor make_combinatorial_tetrahedron(Dart_descriptor d1, + Dart_descriptor d2, + Dart_descriptor d3, + Dart_descriptor d4) { topo_sew<2>(d1, alpha(d2, 0)); topo_sew<2>(d3, alpha(d2, 1)); @@ -3047,14 +3118,14 @@ namespace CGAL { } /** Test if a volume is a combinatorial tetrahedron. - * @param adart an intial dart + * @param adart an initial dart * @return true iff the volume containing adart is a combinatorial tetrahedron. */ - bool is_volume_combinatorial_tetrahedron(Dart_const_handle d1) + bool is_volume_combinatorial_tetrahedron(Dart_const_descriptor d1) const { - Dart_const_handle d2 = alpha(d1, 0, 2); - Dart_const_handle d3 = alpha(d2, 1, 2); - Dart_const_handle d4 = alpha(d2, 0, 1, 0, 2); + Dart_const_descriptor d2 = alpha(d1, 0, 2); + Dart_const_descriptor d3 = alpha(d2, 1, 2); + Dart_const_descriptor d4 = alpha(d2, 0, 1, 0, 2); if ( !is_face_combinatorial_polygon(d1, 3) || !is_face_combinatorial_polygon(d2, 3) || @@ -3079,12 +3150,12 @@ namespace CGAL { /** Create a new combinatorial tetrahedron. * @return a new dart. */ - Dart_handle make_combinatorial_tetrahedron() + Dart_descriptor make_combinatorial_tetrahedron() { - Dart_handle d1 = make_combinatorial_polygon(3); - Dart_handle d2 = make_combinatorial_polygon(3); - Dart_handle d3 = make_combinatorial_polygon(3); - Dart_handle d4 = make_combinatorial_polygon(3); + Dart_descriptor d1 = make_combinatorial_polygon(3); + Dart_descriptor d2 = make_combinatorial_polygon(3); + Dart_descriptor d3 = make_combinatorial_polygon(3); + Dart_descriptor d4 = make_combinatorial_polygon(3); return make_combinatorial_tetrahedron(d1, d2, d3, d4); } @@ -3098,12 +3169,12 @@ namespace CGAL { * @param d6 a dart onto a sixth quadrilateral. * @return d1. */ - Dart_handle make_combinatorial_hexahedron(Dart_handle d1, - Dart_handle d2, - Dart_handle d3, - Dart_handle d4, - Dart_handle d5, - Dart_handle d6) + Dart_descriptor make_combinatorial_hexahedron(Dart_descriptor d1, + Dart_descriptor d2, + Dart_descriptor d3, + Dart_descriptor d4, + Dart_descriptor d5, + Dart_descriptor d6) { topo_sew<2>(d1, alpha(d4,1,0,1)); topo_sew<2>(alpha(d1,0,1), alpha(d6,1)); @@ -3124,16 +3195,16 @@ namespace CGAL { } /** Test if a volume is a combinatorial hexahedron. - * @param adart an intial dart + * @param adart an initial dart * @return true iff the volume containing adart is a combinatorial hexahedron. */ - bool is_volume_combinatorial_hexahedron(Dart_const_handle d1) + bool is_volume_combinatorial_hexahedron(Dart_const_descriptor d1) const { - Dart_const_handle d2 = alpha(d1,1,0,1,2); - Dart_const_handle d3 = alpha(d2,1,0,1,2); - Dart_const_handle d4 = alpha(d3,1,0,1,2); - Dart_const_handle d5 = alpha(d1,1,2); - Dart_const_handle d6 = alpha(d4,0,1,0,2); + Dart_const_descriptor d2 = alpha(d1,1,0,1,2); + Dart_const_descriptor d3 = alpha(d2,1,0,1,2); + Dart_const_descriptor d4 = alpha(d3,1,0,1,2); + Dart_const_descriptor d5 = alpha(d1,1,2); + Dart_const_descriptor d6 = alpha(d4,0,1,0,2); if (!is_face_combinatorial_polygon(d1, 4) || !is_face_combinatorial_polygon(d2, 4) || @@ -3174,14 +3245,14 @@ namespace CGAL { /** Create a new combinatorial hexahedron. * @return a new dart. */ - Dart_handle make_combinatorial_hexahedron() + Dart_descriptor make_combinatorial_hexahedron() { - Dart_handle d1 = make_combinatorial_polygon(4); - Dart_handle d2 = make_combinatorial_polygon(4); - Dart_handle d3 = make_combinatorial_polygon(4); - Dart_handle d4 = make_combinatorial_polygon(4); - Dart_handle d5 = make_combinatorial_polygon(4); - Dart_handle d6 = make_combinatorial_polygon(4); + Dart_descriptor d1 = make_combinatorial_polygon(4); + Dart_descriptor d2 = make_combinatorial_polygon(4); + Dart_descriptor d3 = make_combinatorial_polygon(4); + Dart_descriptor d4 = make_combinatorial_polygon(4); + Dart_descriptor d5 = make_combinatorial_polygon(4); + Dart_descriptor d6 = make_combinatorial_polygon(4); return make_combinatorial_hexahedron(d1, d2, d3, d4, d5, d6); } @@ -3193,7 +3264,7 @@ namespace CGAL { * @return true iff the i-cell can be removed. */ template < unsigned int i > - bool is_removable(Dart_const_handle adart) const + bool is_removable(Dart_const_descriptor adart) const { return CGAL::Is_removable_functor_gmap::run(*this, adart); } /** Remove an i-cell, 0<=i<=dimension. @@ -3202,7 +3273,7 @@ namespace CGAL { * @return the number of deleted darts. */ template < unsigned int i > - size_t remove_cell(Dart_handle adart, bool update_attributes = true) + size_t remove_cell(Dart_descriptor adart, bool update_attributes = true) { return CGAL::Remove_cell_functor_gmap:: run(*this,adart,update_attributes); @@ -3215,7 +3286,7 @@ namespace CGAL { * @return true iff the i-cell can be contracted. */ template < unsigned int i > - bool is_contractible(Dart_const_handle adart) const + bool is_contractible(Dart_const_descriptor adart) const { return CGAL::Is_contractible_functor_gmap::run(*this,adart); } /** Contract an i-cell, 1<=i<=dimension. @@ -3223,26 +3294,26 @@ namespace CGAL { * @return the number of deleted darts. */ template < unsigned int i > - size_t contract_cell(Dart_handle adart, bool update_attributes = true) + size_t contract_cell(Dart_descriptor adart, bool update_attributes = true) { return CGAL::Contract_cell_functor_gmap:: run(*this, adart, update_attributes); } /** Insert a vertex in a given edge. - * @param adart a dart of the edge (!=nullptr). + * @param adart a dart of the edge (!=null_descriptor). * @return a dart of the new vertex. */ - Dart_handle insert_cell_0_in_cell_1( Dart_handle adart, - typename Attribute_handle<0>::type - ah=null_handle, + Dart_descriptor insert_cell_0_in_cell_1( Dart_descriptor adart, + typename Attribute_descriptor<0>::type + ah=null_descriptor, bool update_attributes=true ) { - Dart_handle d1; + Dart_descriptor d1; size_type amark=get_new_mark(); // 1) We store all the darts of the edge. - std::deque vect; + std::deque vect; size_type m=get_new_mark(); { for ( typename Dart_of_cell_basic_range<1>::iterator @@ -3252,7 +3323,7 @@ namespace CGAL { } // 2) For each dart of the cell, we modify link of neighbors. - typename std::deque::iterator it = vect.begin(); + typename std::deque::iterator it = vect.begin(); for (; it != vect.end(); ++it) { d1 = create_dart(); @@ -3279,7 +3350,7 @@ namespace CGAL { , 0>:: run(*this,*it,d1); } - if (ah != null_handle) + if (ah != null_descriptor) { // We initialise the 0-atttrib to ah CGAL::internal::Set_i_attribute_of_dart_functor:: @@ -3317,18 +3388,18 @@ namespace CGAL { } /** Insert a vertex in the given 2-cell which is split in triangles, - * once for each inital edge of the facet. + * once for each initial edge of the facet. * @param adart a dart of the facet to triangulate. * @return A dart incident to the new vertex. */ - Dart_handle insert_cell_0_in_cell_2( Dart_handle adart, - typename Attribute_handle<0>::type - ah=null_handle, + Dart_descriptor insert_cell_0_in_cell_2( Dart_descriptor adart, + typename Attribute_descriptor<0>::type + ah=null_descriptor, bool update_attributes=true ) { - CGAL_assertion(adart!=null_handle); + CGAL_assertion(adart!=null_descriptor); - Dart_handle d1=null_handle, d2=null_handle; + Dart_descriptor d1=null_descriptor, d2=null_descriptor; // Mark used to mark darts already treated. size_type treated = get_new_mark(); @@ -3336,7 +3407,7 @@ namespace CGAL { size_type edge_pushed = get_new_mark(); // Stack of darts of the face - std::deque vect; + std::deque vect; { for ( typename Dart_of_cell_basic_range<2>::iterator it=darts_of_cell_basic<2>(adart,m).begin(); @@ -3345,7 +3416,7 @@ namespace CGAL { } // Stack of darts to degroup (one dart per edge of the face) - std::deque todegroup; + std::deque todegroup; if (are_attributes_automatically_managed() && update_attributes) { for ( typename Dart_of_cell_basic_range<2,2>::iterator @@ -3360,7 +3431,7 @@ namespace CGAL { } // 2) For each dart of the cell, we modify link of neighbors. - typename std::deque::iterator it = vect.begin(); + typename std::deque::iterator it = vect.begin(); for (; it != vect.end(); ++it) { d1 = create_dart(); @@ -3441,10 +3512,12 @@ namespace CGAL { * @param adart2 a second dart. * @return true iff an edge can be inserted between adart1 and adart2. */ - bool is_insertable_cell_1_in_cell_2(Dart_const_handle adart1, - Dart_const_handle adart2) + bool is_insertable_cell_1_in_cell_2(Dart_const_descriptor adart1, + Dart_const_descriptor adart2) { - if ( adart1==adart2 || adart1==this->template alpha<0>(adart2) ) + if (adart2==null_descriptor) return true; + if (adart1==adart2 || adart1==this->template alpha<0>(adart2) || + adart1==null_descriptor || this->template is_free<1>(adart2)) return false; for ( CGAL::GMap_dart_const_iterator_of_orbit it(*this,adart1); it.cont(); ++it ) @@ -3455,36 +3528,111 @@ namespace CGAL { } /** Insert an edge in a 2-cell between two given darts. - * @param adart1 a first dart of the facet (!=nullptr && !=null_dart_handle). - * @param adart2 a second dart of the facet. If nullptr insert a dangling edge. + * @param adart1 a first dart of the facet (!=null_descriptor && !=null_dart_descriptor). + * @param adart2 a second dart of the facet. If null_descriptor insert a dangling edge. + * @param update_attributes a boolean to update the enabled attributes * @return a dart of the new edge, and not incident to the * same vertex than adart1. */ - Dart_handle insert_cell_1_in_cell_2(Dart_handle adart1, - Dart_handle adart2, - bool update_attributes=true, - typename Attribute_handle<0>::type - ah=null_handle) + Dart_descriptor insert_cell_1_in_cell_2(Dart_descriptor adart1, + Dart_descriptor adart2, + typename Attribute_descriptor<0>:: + type ah=null_descriptor, + bool update_attributes=true) { - if ( adart2!=null_handle) + CGAL_assertion(is_insertable_cell_1_in_cell_2(adart1, adart2)); + return generic_insert_cell_1(adart1, adart2, false, update_attributes, ah); + } + + /** Test if an edge can be inserted between two different 2-cells + * between two given darts. + * @param adart1 a first dart. + * @param adart2 a second dart. + * @return true iff an edge can be inserted between adart1 and adart2. + */ + bool is_insertable_cell_1_between_two_cells_2(Dart_const_descriptor adart1, + Dart_const_descriptor adart2) const + { + if (adart1==adart2 || adart1==null_descriptor || adart2==null_descriptor) + { return false; } + for ( CGAL::GMap_dart_const_iterator_of_orbit it(*this,adart1); + it.cont(); ++it ) { - CGAL_assertion(is_insertable_cell_1_in_cell_2(adart1, adart2)); + if ( it==adart2 ) return false; } + for(unsigned int d=3; d<=dimension; ++d) + { if(is_free(adart1, d)!=is_free(adart2, d)) { return false; }} + + return true; + } + /** Insert an edge between two different 2-cells, between two given darts. + * @param adart1 a first dart of the first facet (!=null_descriptor && !=null_dart_descriptor). + * @param adart2 a second dart of the second facet (!=null_descriptor && !=null_dart_descriptor). + * @param update_attributes a boolean to update the enabled attributes + * @return a dart of the new edge, and not incident to the + * same vertex than adart1. + */ + Dart_descriptor insert_cell_1_between_two_cells_2(Dart_descriptor adart1, + Dart_descriptor adart2, + bool update_attributes=true) + { + CGAL_assertion(is_insertable_cell_1_between_two_cells_2(adart1, adart2)); + return generic_insert_cell_1(adart1, adart2, true, update_attributes); + } + + /** Insert an edge between two given darts. If the two darts belong to the same facet, call + * insert_cell_1_in_cell_2, otherwise call insert_cell_1_between_two_cells_2. + * @param adart1 a first dart (!=null_descriptor && !=null_dart_descriptor). + * @param adart2 a second dart. + * @param update_attributes a boolean to update the enabled attributes + * @return a dart of the new edge, and not incident to the + * same vertex than adart1. + */ + Dart_descriptor insert_cell_1(Dart_descriptor adart1, + Dart_descriptor adart2, + bool update_attributes=true, + typename Attribute_descriptor<0>::type + ah=null_descriptor) + { + CGAL_assertion(adart1!=null_descriptor); + if(is_insertable_cell_1_in_cell_2(adart1, adart2)) + { return insert_cell_1_in_cell_2(adart1, adart2, update_attributes, ah); } + return insert_cell_1_between_two_cells_2(adart1, adart2, update_attributes); + } + + /** Generic method to insert a 1-cell, either in a 2-cell (cf. insert_cell_1_in_cell_2) + * or between two different 2-cells (cf. insert_cell_1_between_two_cells_2). + * Indeed the code is the same, except for the group/degroup attribute. + * merge is true if adart1 and adart2 belongs to two different facets; in this case + * the two facets should be merged (they are now linked by the new edge); + * merge is false it adart1 and adart2 belongs to the same facet; in this case + * the facet is split in two. + * Internal method not supposed to be called by users. + */ + Dart_descriptor generic_insert_cell_1(Dart_descriptor adart1, + Dart_descriptor adart2, + bool merge, + bool update_attributes=true, + typename Attribute_descriptor<0>::type + ah=null_descriptor) + { /* CGAL::GMap_dart_iterator_basic_of_involution will contain all * alpha_i except alpha_0, alpha_1 and alpha_2, i.e. this is * */ + Dart_descriptor dart2_a1=null_descriptor; + if(adart2!=null_descriptor) { dart2_a1=alpha<1>(adart2); } + size_type m1=get_new_mark(); CGAL::GMap_dart_iterator_basic_of_involution it1(*this, adart1, m1); - size_type m2=get_new_mark(); - CGAL::GMap_dart_iterator_basic_of_involution it2(*this, adart2, m2); + CGAL::GMap_dart_iterator_basic_of_involution it2(*this, dart2_a1, m2); - Dart_handle d1=null_handle; - Dart_handle d2=null_handle; - Dart_handle d3=null_handle; - Dart_handle d4=null_handle; + Dart_descriptor d1=null_descriptor; + Dart_descriptor d2=null_descriptor; + Dart_descriptor d3=null_descriptor; + Dart_descriptor d4=null_descriptor; size_type treated=get_new_mark(); bool isfree1 = (this->template is_free<1>(adart1)); @@ -3497,13 +3645,13 @@ namespace CGAL { if (!isfree1) { - d3 = create_dart(); - d4 = create_dart(); - this->template basic_link_alpha<2>(d1, d3); - this->template basic_link_alpha<2>(d2, d4); + d3 = create_dart(); + d4 = create_dart(); + this->template basic_link_alpha<2>(d1, d3); + this->template basic_link_alpha<2>(d2, d4); } - for ( unsigned int dim=3; dim<=dimension; ++dim) + for (unsigned int dim=3; dim<=dimension; ++dim) { if ( !is_free(it1, dim) && is_marked(alpha(it1, dim), treated) ) @@ -3522,7 +3670,7 @@ namespace CGAL { if (!isfree1) { this->template link_alpha<1>(this->template alpha<1>(it1), d3); - if ( adart2!=null_handle ) + if ( adart2!=null_descriptor ) { CGAL_assertion (it2.cont()); this->template link_alpha<1>(this->template alpha<1>(it2), d4); @@ -3530,7 +3678,7 @@ namespace CGAL { } this->template link_alpha<1>(it1, d1); - if ( adart2!=null_handle ) + if (adart2!=null_descriptor) { CGAL_assertion (it2.cont()); this->template link_alpha<1>(it2, d2); @@ -3539,7 +3687,7 @@ namespace CGAL { else { if (are_attributes_automatically_managed() && - update_attributes && ah!=nullptr) + update_attributes && ah!=null_descriptor) { internal::Set_i_attribute_of_dart_functor::run(*this, d2, ah); if (!isfree1) @@ -3558,22 +3706,38 @@ namespace CGAL { if (are_attributes_automatically_managed() && update_attributes) { - if ( !this->template is_free<2>(d1) && d2!=null_handle ) - CGAL::internal::GMap_degroup_attribute_functor_run:: - run(*this, d1, this->template alpha<2>(d1)); + if(merge) + { // Here we group all enabled attributes starting from 2 to dimension + Helper::template Foreach_enabled_attributes + , 2>:: + run(*this, adart1, adart2); + // And we need to group also alpha_i(adart1) and alpha_i(adart2) for all + // enabled attributes starting from 3 dimension. Indeed when two i-cells + // are grouped for adart1 and adart2, this group also all alpha_j two by two + // except for alpha_i. + Helper::template Foreach_enabled_attributes + , 3>::run(*this, adart1, adart2); + + } + else // Here we degroup 2-attributes + { + if (!this->template is_free<2>(d1) && d2!=null_descriptor) + { CGAL::internal::GMap_degroup_attribute_functor_run:: + run(*this, d1, this->template alpha<2>(d1)); } + } } negate_mark(m1); it1.rewind(); - if ( adart2!=null_handle ) + if ( adart2!=null_descriptor ) { it2.rewind(); negate_mark(m2); } for (; it1.cont(); ++it1) { mark(it1,m1); unmark(it1,treated); - if ( adart2!=null_handle ) + if ( adart2!=null_descriptor ) { mark(it2,m2); ++it2; } } negate_mark(m1); @@ -3582,7 +3746,7 @@ namespace CGAL { free_mark(m1); free_mark(treated); - if ( adart2!=null_handle ) + if ( adart2!=null_descriptor ) { negate_mark(m2); CGAL_assertion( is_whole_map_unmarked(m2) ); @@ -3597,22 +3761,23 @@ namespace CGAL { } /** Insert a dangling edge in a 2-cell between given by a dart. - * @param adart1 a first dart of the facet (!=nullptr && !=null_dart_handle). + * @param adart1 a first dart of the facet (!=null_descriptor && !=null_dart_descriptor). * @param update_attributes a boolean to update the enabled attributes * @return a dart of the new edge, not incident to the vertex of adart1. */ - Dart_handle insert_dangling_cell_1_in_cell_2( Dart_handle adart1, - typename Attribute_handle<0>:: - type ah=null_handle, + Dart_descriptor insert_dangling_cell_1_in_cell_2( Dart_descriptor adart1, + typename Attribute_descriptor<0>:: + type ah=null_descriptor, bool update_attributes=true ) - { return insert_cell_1_in_cell_2(adart1, nullptr, update_attributes, ah); } + { return insert_cell_1_in_cell_2(adart1, null_descriptor, ah, + update_attributes); } /** Test if a 2-cell can be inserted onto a given 3-cell along * a path of edges. * @param afirst iterator on the beginning of the path. * @param alast iterator on the end of the path. * @return true iff a 2-cell can be inserted along the path. - * the path is a sequence of dartd, one per edge + * the path is a sequence of dart, one per edge * where the face will be inserted. */ template @@ -3623,18 +3788,18 @@ namespace CGAL { // The path must have at least one dart. if (afirst==alast) return false; - Dart_const_handle prec = null_handle; + Dart_const_descriptor prec = null_descriptor; for (InputIterator it(afirst); it!=alast; ++it) { // The path must contain only non empty darts. - if (*it == null_handle) return false; + if (*it == null_descriptor) return false; if (this->template is_free<0>(*it)) return false; // Two consecutive darts of the path must belong to two edges // incident to the same vertex of the same volume. - if (prec!=null_handle) + if (prec!=null_descriptor) { // prec and *it must belong to the same vertex of the same volume if ( !belong_to_same_cell<0, 2>(prec, *it) ) @@ -3659,15 +3824,15 @@ namespace CGAL { * @return a dart of the new 2-cell. */ template - Dart_handle insert_cell_2_in_cell_3(InputIterator afirst, + Dart_descriptor insert_cell_2_in_cell_3(InputIterator afirst, InputIterator alast, bool update_attributes=true) { CGAL_assertion(is_insertable_cell_2_in_cell_3(afirst,alast)); - Dart_handle prec = null_handle, d = null_handle, - dd = null_handle, first = null_handle, ddd = null_handle, - dddd = null_handle, it0, d0, oldb2; + Dart_descriptor prec = null_descriptor, d = null_descriptor, + dd = null_descriptor, first = null_descriptor, ddd = null_descriptor, + dddd = null_descriptor, it0, d0, oldb2; bool withAlpha3 = false; @@ -3712,7 +3877,7 @@ namespace CGAL { run(*this,d0, it0); } - if ( prec!=null_handle ) + if ( prec!=null_descriptor ) { basic_link_alpha<1>(prec, d); if (withAlpha3) @@ -3727,7 +3892,7 @@ namespace CGAL { basic_link_alpha<2>(alpha<0>(oldb2), alpha<0>(dd)); } else - oldb2=nullptr; + oldb2=null_descriptor; basic_link_alpha<2>(*it, d); basic_link_alpha<2>(alpha<0>(*it), alpha<0>(d)); @@ -3765,7 +3930,7 @@ namespace CGAL { basic_link_alpha(dd, dddd, dim); basic_link_alpha(alpha<0>(dd), d0, dim); - if (oldb2!=nullptr) + if (oldb2!=null_descriptor) { basic_link_alpha<2>(alpha(oldb2, dim), dddd); basic_link_alpha<2>(alpha(oldb2, 0, dim), d0); @@ -3779,7 +3944,7 @@ namespace CGAL { run(*this, d0, it0); } - if ( prec!=null_handle ) + if ( prec!=null_descriptor ) { basic_link_alpha<1>(alpha(prec, dim), ddd); if (withAlpha3) @@ -3870,8 +4035,8 @@ namespace CGAL { typedef Generalized_map Self; typedef Generalized_map_base Base; - typedef typename Base::Dart_handle Dart_handle; - typedef typename Base::Dart_const_handle Dart_const_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; + typedef typename Base::Dart_const_descriptor Dart_const_descriptor; typedef typename Base::Alloc Alloc; typedef typename Base::Exception_no_more_available_mark Exception_no_more_available_mark; diff --git a/thirdparty/CGAL/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h b/thirdparty/CGAL/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h index 2a95ad22..bcf6381b 100644 --- a/thirdparty/CGAL/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h +++ b/thirdparty/CGAL/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h $ -// $Id: Generalized_map_group_functors.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h $ +// $Id: include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -34,7 +34,7 @@ * GMap_group_attribute_functor to group the -attributes of two * given i-cells (except for j-adim). If one i-attribute is nullptr, we set the * darts of its i-cell to the second attribute. If both i-attributes are - * non nullptr, we overide all the i-attribute of the second i-cell to the + * non nullptr, we override all the i-attribute of the second i-cell to the * first i-attribute. * * GMap_degroup_attribute_functor_run to degroup one i-attributes in two @@ -62,24 +62,24 @@ struct GMap_group_attribute_functor_of_dart_run { /// Group the i-attribute of dh1 and dh2. static void run(GMap& amap, - typename GMap::Dart_handle dh1, - typename GMap::Dart_handle dh2) + typename GMap::Dart_descriptor dh1, + typename GMap::Dart_descriptor dh2) { - CGAL_static_assertion( i<=GMap::dimension ); - CGAL_static_assertion( i!=j ); - CGAL_static_assertion_msg(GMap::Helper::template + static_assert( i<=GMap::dimension ); + static_assert( i!=j ); + static_assert(GMap::Helper::template Dimension_index::value>=0, "GMap_group_attribute_functor_of_dart_run but " "i-attributes are disabled"); - typename GMap::template Attribute_handle::type + typename GMap::template Attribute_descriptor::type a1=amap.template attribute(dh1); - typename GMap::template Attribute_handle::type + typename GMap::template Attribute_descriptor::type a2=amap.template attribute(dh2); // If the two attributes are equal, nothing to do. if ( a1==a2 ) return; - if ( a1==GMap::null_handle ) amap.template set_dart_attribute(dh1, a2); + if ( a1==GMap::null_descriptor ) amap.template set_dart_attribute(dh1, a2); else amap.template set_dart_attribute(dh2, a1); } }; @@ -88,8 +88,8 @@ template struct GMap_group_attribute_functor_of_dart_run { static void run(GMap&, - typename GMap::Dart_handle, - typename GMap::Dart_handle) + typename GMap::Dart_descriptor, + typename GMap::Dart_descriptor) {} }; // Specialization for i=j. Do nothing as j is the dimension to not consider. @@ -97,8 +97,8 @@ template struct GMap_group_attribute_functor_of_dart_run { static void run(GMap&, - typename GMap::Dart_handle, - typename GMap::Dart_handle) + typename GMap::Dart_descriptor, + typename GMap::Dart_descriptor) {} }; // ************************************************************************ @@ -115,8 +115,8 @@ struct GMap_group_attribute_functor_of_dart { template static void run(GMap& amap, - typename GMap::Dart_handle adart1, - typename GMap::Dart_handle adart2) + typename GMap::Dart_descriptor adart1, + typename GMap::Dart_descriptor adart2) { CGAL::internal::GMap_group_attribute_functor_of_dart_run:: run(amap,adart1,adart2); @@ -131,46 +131,56 @@ template::value>=0, "GMap_group_attribute_functor_run but i-attributes are disabled" ); - typename GMap::template Attribute_handle::type + typename GMap::template Attribute_descriptor::type a1=amap.template attribute(adart1); - typename GMap::template Attribute_handle::type + typename GMap::template Attribute_descriptor::type a2=amap.template attribute(adart2); // If the two attributes are equal, nothing to do. - if ( a1 == a2 ) return; + if ( a1 == a2 ) + { + if(a1!=GMap::null_descriptor && dart1_deleted && + amap.template dart_of_attribute(a1)==adart1) + { amap.template set_dart_of_attribute(a1, adart2); } + return; + } - typename GMap::Dart_handle toSet = amap.null_handle; + typename GMap::Dart_descriptor toSet = amap.null_descriptor; // If the attribute associated to adart1 is nullptr, set it with // the attribute associated to adart2 (necessarily != nullptr) - if (a1 == GMap::null_handle) + if (a1 == GMap::null_descriptor) { toSet = adart1; a1 = a2; } else { toSet = adart2; - if (a2 != GMap::null_handle) + if (a2 != GMap::null_descriptor) { CGAL::internal::Call_merge_functor::run(amap, a1, a2); } } amap.template set_attribute(toSet, a1); + if(dart1_deleted && toSet==adart1) + { amap.template set_dart_of_attribute(a1, adart2); } } }; // Specialization for void attributes. template struct GMap_group_attribute_functor_run { - static void run( GMap&, - typename GMap::Dart_handle, - typename GMap::Dart_handle ) + static void run(GMap&, + typename GMap::Dart_descriptor, + typename GMap::Dart_descriptor, + bool=true) {} }; // Specialization for i=j. Do nothing as j is the dimension to not consider. @@ -178,8 +188,9 @@ template struct GMap_group_attribute_functor_run { static void run(GMap&, - typename GMap::Dart_handle, - typename GMap::Dart_handle) + typename GMap::Dart_descriptor, + typename GMap::Dart_descriptor, + bool=true) {} }; // ************************************************************************ @@ -196,8 +207,8 @@ struct GMap_group_attribute_functor { template static void run(GMap& amap, - typename GMap::Dart_handle adart1, - typename GMap::Dart_handle adart2) + typename GMap::Dart_descriptor adart1, + typename GMap::Dart_descriptor adart2) { CGAL::internal::GMap_group_attribute_functor_run:: run(amap,adart1,adart2); } }; @@ -209,25 +220,25 @@ template::value>=0, "GMap_degroup_attribute_functor_run but i-attributes are disabled" ); - typename GMap::template Attribute_handle::type + typename GMap::template Attribute_descriptor::type a1=amap.template attribute(adart1); // If there is no first attribute, nothing to degroup. - if ( a1==GMap::null_handle ) return; + if ( a1==GMap::null_descriptor ) return; // If the second attribute is non null and already different from a1, // nothing to do. if ( a1!=amap.template attribute(adart2) && - amap.template attribute(adart2)!=GMap::null_handle ) return; + amap.template attribute(adart2)!=GMap::null_descriptor ) return; CGAL_assertion( (!CGAL::belong_to_same_cell (amap, adart1, adart2)) ); @@ -236,7 +247,7 @@ struct GMap_degroup_attribute_functor_run // we are sure it belongs to the first i-cell. amap.template set_dart_of_attribute(a1, adart1); - typename GMap::template Attribute_handle::type + typename GMap::template Attribute_descriptor::type a2 = amap.template copy_attribute(a1); amap.template set_attribute(adart2, a2); @@ -248,8 +259,8 @@ template struct GMap_degroup_attribute_functor_run { static void run(GMap&, - typename GMap::Dart_handle, - typename GMap::Dart_handle) + typename GMap::Dart_descriptor, + typename GMap::Dart_descriptor) {} }; // Specialization for i==j. @@ -257,8 +268,8 @@ template struct GMap_degroup_attribute_functor_run { static void run(GMap&, - typename GMap::Dart_handle, - typename GMap::Dart_handle) + typename GMap::Dart_descriptor, + typename GMap::Dart_descriptor) {} }; // ************************************************************************ @@ -271,29 +282,36 @@ struct GMap_degroup_attribute_functor_run // process them exactly once. template void GMap_test_split_attribute_functor_one_dart -( GMap& amap, typename GMap::Dart_handle adart, - CGAL::Unique_hash_map::type, +( GMap& amap, typename GMap::Dart_descriptor adart, + CGAL::Unique_hash_map::type, unsigned int, typename GMap::Hash_function> & found_attributes, typename GMap::size_type mark ) { - CGAL_static_assertion_msg(GMap::Helper::template + static_assert(GMap::Helper::template Dimension_index::value>=0, "GMap_test_split_attribute_functor_one_dart but " "i-attributes are disabled"); - typedef typename GMap::template Attribute_handle::type - Attribute_handle_i; + typedef typename GMap::template Attribute_descriptor::type + Attribute_descriptor_i; // If the current dart has no attribute, or if it is aldready marked, // nothing to do. - if ( amap.template attribute(adart)==GMap::null_handle || + if ( amap.template attribute(adart)==GMap::null_descriptor || amap.is_marked(adart, mark) ) return; - Attribute_handle_i a1 = amap.template attribute(adart); + Attribute_descriptor_i a1 = amap.template attribute(adart); if ( found_attributes.is_defined(a1) ) { // Here the attribute was already present in the hash_map - Attribute_handle_i a2 = amap.template + + // We need to call reserve for the cc with index case. Indeed, if the vector + // is reallocated, the reference returned by get_attribute(a1) will be + // invalidated, and the copy will be wrong. Note that there is no overhead + // since the creation of the attribute need one allocation. + amap.template attributes().reserve(amap.template attributes().size()+1); + + Attribute_descriptor_i a2 = amap.template create_attribute(amap.template get_attribute(a1)); for ( CGAL::GMap_dart_iterator_basic_of_cell @@ -329,25 +347,25 @@ struct GMap_test_split_attribute_functor_run { // modified_darts is the set of modified darts for beta_j static void run( GMap& amap, - const std::deque + const std::deque &modified_darts, typename GMap::size_type mark_modified_darts=GMap::INVALID_MARK) { - CGAL_static_assertion( i<=GMap::dimension ); + static_assert( i<=GMap::dimension ); CGAL_assertion( i!=j ); - CGAL_static_assertion_msg(GMap::Helper::template + static_assert(GMap::Helper::template Dimension_index::value>=0, "GMap_test_split_attribute_functor_run but " "i-attributes are disabled"); - typedef typename GMap::template Attribute_handle::type - Attribute_handle_i; + typedef typename GMap::template Attribute_descriptor::type + Attribute_descriptor_i; - CGAL::Unique_hash_map found_attributes; typename GMap::size_type mark = amap.get_new_mark(); // to mark incident cells. - typename std::deque::const_iterator + typename std::deque::const_iterator it=modified_darts.begin(); for ( ; it!=modified_darts.end(); ++it ) { @@ -370,34 +388,34 @@ struct GMap_test_split_attribute_functor_run amap.free_mark(mark); } static void run( GMap& amap, - const std::deque + const std::deque &modified_darts, - const std::deque + const std::deque &modified_darts2, typename GMap::size_type mark_modified_darts=GMap::INVALID_MARK) { - CGAL_static_assertion( i<=GMap::dimension ); + static_assert( i<=GMap::dimension ); CGAL_assertion( i!=j ); - CGAL_static_assertion_msg(GMap::Helper::template + static_assert(GMap::Helper::template Dimension_index::value>=0, "GMap_test_split_attribute_functor_run but " "i-attributes are disabled"); - typedef typename GMap::template Attribute_handle::type - Attribute_handle_i; + typedef typename GMap::template Attribute_descriptor::type + Attribute_descriptor_i; - CGAL::Unique_hash_map found_attributes; typename GMap::size_type mark = amap.get_new_mark(); // to mark incident cells. - typename std::deque::const_iterator + typename std::deque::const_iterator it=modified_darts.begin(); for ( ; it!=modified_darts.end(); ++it ) { CGAL::internal::GMap_test_split_attribute_functor_one_dart (amap, *it, found_attributes, mark); } - typename std::deque::const_iterator + typename std::deque::const_iterator it2=modified_darts2.begin(); for ( ; it2!=modified_darts2.end(); ++it2 ) { @@ -432,11 +450,11 @@ struct GMap_test_split_attribute_functor_run template struct GMap_test_split_attribute_functor_run { - static void run( GMap&, const std::deque&, + static void run( GMap&, const std::deque&, typename GMap::size_type=GMap::INVALID_MARK) {} - static void run( GMap&, const std::deque&, - const std::deque&, + static void run( GMap&, const std::deque&, + const std::deque&, typename GMap::size_type=GMap::INVALID_MARK) {} }; @@ -444,11 +462,11 @@ struct GMap_test_split_attribute_functor_run template struct GMap_test_split_attribute_functor_run { - static void run( GMap&, const std::deque&, + static void run( GMap&, const std::deque&, typename GMap::size_type=GMap::INVALID_MARK) {} - static void run( GMap&, const std::deque&, - const std::deque&, + static void run( GMap&, const std::deque&, + const std::deque&, typename GMap::size_type=GMap::INVALID_MARK) {} }; @@ -457,11 +475,11 @@ struct GMap_test_split_attribute_functor_run template struct GMap_test_split_attribute_functor_run { - static void run( GMap&, const std::deque&, + static void run( GMap&, const std::deque&, typename GMap::size_type=GMap::INVALID_MARK) {} - static void run( GMap&, const std::deque&, - const std::deque&, + static void run( GMap&, const std::deque&, + const std::deque&, typename GMap::size_type=GMap::INVALID_MARK) {} }; @@ -479,7 +497,7 @@ struct GMap_test_split_attribute_functor // it with the new i-cell and call onsplit functors. template static void run( GMap& amap, - const std::deque + const std::deque &modified_darts, typename GMap::size_type mark_modified_darts=GMap::INVALID_MARK) { @@ -488,9 +506,9 @@ struct GMap_test_split_attribute_functor } template static void run( GMap& amap, - const std::deque + const std::deque &modified_darts, - const std::deque + const std::deque &modified_darts2, typename GMap::size_type mark_modified_darts=GMap::INVALID_MARK) { diff --git a/thirdparty/CGAL/include/CGAL/Generalized_map/internal/Generalized_map_internal_functors.h b/thirdparty/CGAL/include/CGAL/Generalized_map/internal/Generalized_map_internal_functors.h index 783c6b61..d0c926fb 100644 --- a/thirdparty/CGAL/include/CGAL/Generalized_map/internal/Generalized_map_internal_functors.h +++ b/thirdparty/CGAL/include/CGAL/Generalized_map/internal/Generalized_map_internal_functors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_internal_functors.h $ -// $Id: Generalized_map_internal_functors.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_internal_functors.h $ +// $Id: include/CGAL/Generalized_map/internal/Generalized_map_internal_functors.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -31,55 +31,55 @@ namespace internal { // **************************************************************************** // Alpha functor, used to combine several alpha. -template +template struct Alpha_functor; -template -struct Alpha_functor +template +struct Alpha_functor { - static Dart_handle run(GMap& AMap, Dart_handle ADart, int B) + static Dart_descriptor run(GMap& AMap, Dart_descriptor ADart, int B) { return AMap.get_alpha(ADart, B); } }; -template -struct Alpha_functor +template +struct Alpha_functor { - static Dart_handle run(GMap& AMap, Dart_handle ADart, unsigned int B) + static Dart_descriptor run(GMap& AMap, Dart_descriptor ADart, unsigned int B) { return AMap.get_alpha(ADart, B); } }; -template -struct Alpha_functor +template +struct Alpha_functor { - static Dart_handle run(GMap& AMap, Dart_handle ADart, int B, Alphas... alphas) - { return Alpha_functor:: + static Dart_descriptor run(GMap& AMap, Dart_descriptor ADart, int B, Alphas... alphas) + { return Alpha_functor:: run(AMap, AMap.get_alpha(ADart, B), alphas...); } }; -template -struct Alpha_functor +template +struct Alpha_functor { - static Dart_handle run(GMap& AMap, Dart_handle ADart, unsigned int B, + static Dart_descriptor run(GMap& AMap, Dart_descriptor ADart, unsigned int B, Alphas... alphas) - { return Alpha_functor:: + { return Alpha_functor:: run(AMap, AMap.get_alpha(ADart, B), alphas...); } }; // **************************************************************************** -template +template struct Alpha_functor_static; -template -struct Alpha_functor_static +template +struct Alpha_functor_static { - static Dart_handle run(GMap& AMap, Dart_handle ADart) + static Dart_descriptor run(GMap& AMap, Dart_descriptor ADart) { return AMap.template get_alpha(ADart); } }; -template -struct Alpha_functor_static +template +struct Alpha_functor_static { - static Dart_handle run(GMap& AMap, Dart_handle ADart) - { return Alpha_functor_static:: + static Dart_descriptor run(GMap& AMap, Dart_descriptor ADart) + { return Alpha_functor_static:: run(AMap, AMap.template get_alpha(ADart)); } }; // **************************************************************************** diff --git a/thirdparty/CGAL/include/CGAL/Generalized_map/internal/Generalized_map_sewable.h b/thirdparty/CGAL/include/CGAL/Generalized_map/internal/Generalized_map_sewable.h index d1e51ca1..67b26fe0 100644 --- a/thirdparty/CGAL/include/CGAL/Generalized_map/internal/Generalized_map_sewable.h +++ b/thirdparty/CGAL/include/CGAL/Generalized_map/internal/Generalized_map_sewable.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_sewable.h $ -// $Id: Generalized_map_sewable.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_sewable.h $ +// $Id: include/CGAL/Generalized_map/internal/Generalized_map_sewable.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -28,8 +28,8 @@ template struct GMap_is_sewable_functor { static bool run( const GMap& amap, - typename GMap::Dart_const_handle adart1, - typename GMap::Dart_const_handle adart2 ) + typename GMap::Dart_const_descriptor adart1, + typename GMap::Dart_const_descriptor adart2 ) { CGAL_assertion( i<=GMap::dimension ); if ( !amap.template is_free(adart1) || @@ -43,8 +43,8 @@ struct GMap_is_sewable_functor } // hash map to build the isomorphism between the two i-cells. - CGAL::Unique_hash_map bijection; typename GMap::size_type m1 = amap.get_new_mark(); diff --git a/thirdparty/CGAL/include/CGAL/Generalized_map_fwd.h b/thirdparty/CGAL/include/CGAL/Generalized_map_fwd.h index 797e138a..3ac3de96 100644 --- a/thirdparty/CGAL/include/CGAL/Generalized_map_fwd.h +++ b/thirdparty/CGAL/include/CGAL/Generalized_map_fwd.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generalized_map/include/CGAL/Generalized_map_fwd.h $ -// $Id: Generalized_map_fwd.h d6306be 2020-10-22T10:30:38+02:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generalized_map/include/CGAL/Generalized_map_fwd.h $ +// $Id: include/CGAL/Generalized_map_fwd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -14,24 +14,62 @@ #include #include +#include namespace CGAL { -template +template class Generalized_map_storage_1; +template +class Generalized_map_storage_with_index; + struct Generic_map_min_items; -template < unsigned int d_, class Refs, - class Items_=Generic_map_min_items, - class Alloc_=CGAL_ALLOCATOR(int), - class Storage_= Generalized_map_storage_1 > +namespace internal +{ +template +struct Default_storage_for_gmap_when_tag +{ + template + using type=Generalized_map_storage_1; +}; +template<> +struct Default_storage_for_gmap_when_tag +{ + template + using type=Generalized_map_storage_with_index; +}; + +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_use_index_tag_gmap,Use_index,false) +template::value> +struct Default_storage_for_gmap +{ + template + using type=Generalized_map_storage_1; +}; +template +struct Default_storage_for_gmap +{ + template + using type=typename CGAL::internal::template + Default_storage_for_gmap_when_tag:: + template type; +}; +} // namespace internal + +template::template type> class Generalized_map_base; -template < unsigned int d_, - class Items_=Generic_map_min_items, - class Alloc_=CGAL_ALLOCATOR(int), - class Storage_= Generalized_map_storage_1 > +template ::template type> class Generalized_map; } // CGAL diff --git a/thirdparty/CGAL/include/CGAL/Generalized_map_iterators_base.h b/thirdparty/CGAL/include/CGAL/Generalized_map_iterators_base.h index 4c926639..95d160fe 100644 --- a/thirdparty/CGAL/include/CGAL/Generalized_map_iterators_base.h +++ b/thirdparty/CGAL/include/CGAL/Generalized_map_iterators_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generalized_map/include/CGAL/Generalized_map_iterators_base.h $ -// $Id: Generalized_map_iterators_base.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generalized_map/include/CGAL/Generalized_map_iterators_base.h $ +// $Id: include/CGAL/Generalized_map_iterators_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -18,8 +18,7 @@ // Other includes #include #include -#include -#include +#include namespace CGAL { @@ -53,23 +52,23 @@ namespace CGAL { typedef GMap_extend_iterator Self; typedef Ite Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef typename Base::size_type size_type; typedef Tag_true Use_mark; - CGAL_static_assertion( (Ai<=Map::dimension && - boost::is_same::value) ); + static_assert(Ai<=Map::dimension && + std::is_same::value); public: /// Main constructor. - GMap_extend_iterator(Map& amap, Dart_handle adart, size_type amark): + GMap_extend_iterator(Map& amap, Dart_descriptor adart, size_type amark): Base(amap, adart), mmark_number(amark), minitial_dart(adart) { - if ( adart!=amap.null_handle ) + if ( adart!=amap.null_descriptor ) { this->mmap->mark(adart, mmark_number); if (!this->mmap->template is_free(adart)) @@ -84,7 +83,7 @@ namespace CGAL { { CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::operator= ( Base(*this->mmap,minitial_dart) ); - mto_treat = std::queue(); + mto_treat = std::queue(); this->mmap->mark(minitial_dart, mmark_number); if (!this->mmap->template is_free(minitial_dart)) { @@ -147,13 +146,13 @@ namespace CGAL { protected: /// Queue of darts to process. - std::queue mto_treat; + std::queue mto_treat; /// Index of the used mark. size_type mmark_number; /// Initial dart - Dart_handle minitial_dart; + Dart_descriptor minitial_dart; }; //**************************************************************************** /* Class GMap_extend_iterator which extend a given iterator by @@ -167,7 +166,7 @@ namespace CGAL { typedef GMap_extend_iterator Self; typedef Ite Base; - typedef typename Base::Dart_handle Dart_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; typedef typename Base::Map Map; typedef Tag_true Use_mark; @@ -175,10 +174,10 @@ namespace CGAL { typedef typename Map::size_type size_type; /// Main constructor. - GMap_extend_iterator(Map& amap, Dart_handle adart, size_type amark): + GMap_extend_iterator(Map& amap, Dart_descriptor adart, size_type amark): Base(amap, adart, amark) { - if (adart!=amap.null_handle) + if (adart!=amap.null_descriptor) { if (!this->mmap->is_free(adart, Ai) && !this->mmap->is_marked(this->mmap->alpha(amap, Ai), this->mmark_number)) diff --git a/thirdparty/CGAL/include/CGAL/Generalized_map_operations.h b/thirdparty/CGAL/include/CGAL/Generalized_map_operations.h index 58e6edd4..caf5931f 100644 --- a/thirdparty/CGAL/include/CGAL/Generalized_map_operations.h +++ b/thirdparty/CGAL/include/CGAL/Generalized_map_operations.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generalized_map/include/CGAL/Generalized_map_operations.h $ -// $Id: Generalized_map_operations.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generalized_map/include/CGAL/Generalized_map_operations.h $ +// $Id: include/CGAL/Generalized_map_operations.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -33,7 +33,7 @@ namespace CGAL template struct Is_removable_functor_gmap { - static bool run(const GMap& amap, typename GMap::Dart_const_handle adart) + static bool run(const GMap& amap, typename GMap::Dart_const_descriptor adart) { // TODO? Optimisation for dim-2, and to not test all the darts of the cell? bool res = true; @@ -50,14 +50,14 @@ namespace CGAL template struct Is_removable_functor_gmap { - static bool run(const GMap&, typename GMap::Dart_const_handle) + static bool run(const GMap&, typename GMap::Dart_const_descriptor) { return true; } }; // Specialization for i=GMap::dimension-1 template struct Is_removable_functor_gmap { - static bool run(const GMap&, typename GMap::Dart_const_handle) + static bool run(const GMap&, typename GMap::Dart_const_descriptor) { return true; } }; @@ -70,29 +70,30 @@ namespace CGAL template struct Remove_cell_functor_gmap { - static size_t run(GMap& amap, typename GMap::Dart_handle adart, + static size_t run(GMap& amap, typename GMap::Dart_descriptor adart, bool update_attributes) { - CGAL_static_assertion ( i(adart)) ); size_t res = 0; - typename GMap::Dart_handle d1, d2; - typename GMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle; + typename GMap::Dart_descriptor d1, d2; + typename GMap::Dart_descriptor dg1=amap.null_descriptor, dg2=amap.null_descriptor; typename GMap::size_type mark = amap.get_new_mark(); typename GMap::size_type mark_modified_darts = amap.get_new_mark(); - std::deque to_erase; + std::deque to_erase; // First we store and mark all the darts of the i-cell to remove. for ( CGAL::GMap_dart_iterator_basic_of_cell it(amap,adart,mark); it.cont(); ++it ) { to_erase.push_back(it); - if ( !amap.template is_free(it) && dg1==amap.null_handle ) - { dg1=it; dg2=amap.template alpha(it); } + if (dg1==amap.null_descriptor && !amap.template is_free(it) && + !amap.template is_free(amap.template alpha(it))) + { dg1=it; dg2=amap.template alpha(it); } amap.mark(it, mark); ++res; } @@ -100,17 +101,17 @@ namespace CGAL if (amap.are_attributes_automatically_managed()) { // We group the two (i+1)-cells incident if they exist. - if ( dg1!=amap.null_handle ) + if ( dg1!=amap.null_descriptor ) CGAL::internal::GMap_group_attribute_functor_run:: - run(amap, dg1, dg2); + run(amap, dg1, dg2, true); // true because dg1 will be deleted } // During the operation, we store in modified_darts the darts modified // to test after the loop the non void attributes that are split. - std::deque modified_darts; + std::deque modified_darts; // For each dart of the i-cell, we modify i-links of neighbors. - typename std::deque::iterator it = + typename std::deque::iterator it = to_erase.begin(); for ( ; it!=to_erase.end(); ++it ) { @@ -136,6 +137,9 @@ namespace CGAL modified_darts.push_back(d2); amap.mark(d2, mark_modified_darts); } + + internal::Set_dart_of_attribute_if_marked:: + run(amap, d1, mark); } } } @@ -185,14 +189,14 @@ namespace CGAL template struct Remove_cell_functor_gmap { - static size_t run(GMap& amap, typename GMap::Dart_handle adart, + static size_t run(GMap& amap, typename GMap::Dart_descriptor adart, bool update_attributes) { typename GMap::size_type mark = amap.get_new_mark(); - std::deque to_erase; + std::deque to_erase; size_t res = 0; - std::deque modified_darts; + std::deque modified_darts; // We mark all the darts of the d-cell. for ( CGAL::GMap_dart_iterator_basic_of_cell @@ -204,7 +208,7 @@ namespace CGAL } // We unlink all the darts of the volume for alpha-d. - typename std::deque::iterator + typename std::deque::iterator it = to_erase.begin(); for ( it = to_erase.begin(); it != to_erase.end(); ++it ) { @@ -252,7 +256,7 @@ namespace CGAL template struct Is_contractible_functor_gmap { - static bool run(const GMap& amap, typename GMap::Dart_const_handle adart) + static bool run(const GMap& amap, typename GMap::Dart_const_descriptor adart) { // TODO ? Optimisation possible to not test all the darts of the cell ? bool res = true; @@ -269,14 +273,14 @@ namespace CGAL template struct Is_contractible_functor_gmap { - static bool run(const GMap&, typename GMap::Dart_const_handle) + static bool run(const GMap&, typename GMap::Dart_const_descriptor) { return false; } }; // Specialization for i=1 template struct Is_contractible_functor_gmap { - static bool run(const GMap&, typename GMap::Dart_const_handle) + static bool run(const GMap&, typename GMap::Dart_const_descriptor) { return true; } }; @@ -289,27 +293,27 @@ namespace CGAL template struct Contract_cell_functor_gmap { - static size_t run(GMap& amap, typename GMap::Dart_handle adart, + static size_t run(GMap& amap, typename GMap::Dart_descriptor adart, bool update_attributes) { - CGAL_static_assertion ( 1<=i && i<=GMap::dimension ); + static_assert ( 1<=i && i<=GMap::dimension ); CGAL_assertion( (amap.template is_contractible(adart)) ); size_t res = 0; - typename GMap::Dart_handle d1, d2; - typename GMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle; + typename GMap::Dart_descriptor d1, d2; + typename GMap::Dart_descriptor dg1=amap.null_descriptor, dg2=amap.null_descriptor; typename GMap::size_type mark = amap.get_new_mark(); typename GMap::size_type mark_modified_darts = amap.get_new_mark(); // First we store and mark all the darts of the i-cell to contract. - std::deque to_erase; + std::deque to_erase; for ( CGAL::GMap_dart_iterator_basic_of_cell it(amap,adart,mark); it.cont(); ++it ) { to_erase.push_back(it); - if ( !amap.template is_free(it) && dg1==amap.null_handle ) + if ( !amap.template is_free(it) && dg1==amap.null_descriptor ) { dg1=it; dg2=amap.template alpha(it); } amap.mark(it, mark); ++res; @@ -318,17 +322,17 @@ namespace CGAL if ( amap.are_attributes_automatically_managed() ) { // We group the two (i-1)-cells incident if they exist. - if ( dg1!=amap.null_handle ) + if ( dg1!=amap.null_descriptor ) CGAL::internal::GMap_group_attribute_functor_run:: - run(amap, dg1, dg2); + run(amap, dg1, dg2, true); // true because dg1 will be deleted } // During the operation, we store in modified_darts the darts modified // to test after the loop the non void attributes that are split. - std::deque modified_darts; + std::deque modified_darts; // For each dart of the i-cell, we modify i-links of neighbors. - typename std::deque::iterator it = + typename std::deque::iterator it = to_erase.begin(); for ( ; it!=to_erase.end(); ++it ) { diff --git a/thirdparty/CGAL/include/CGAL/Generalized_map_save_load.h b/thirdparty/CGAL/include/CGAL/Generalized_map_save_load.h index bb3082aa..8b0a220e 100644 --- a/thirdparty/CGAL/include/CGAL/Generalized_map_save_load.h +++ b/thirdparty/CGAL/include/CGAL/Generalized_map_save_load.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generalized_map/include/CGAL/Generalized_map_save_load.h $ -// $Id: Generalized_map_save_load.h 5c57f83 2021-10-14T17:19:33+02:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generalized_map/include/CGAL/Generalized_map_save_load.h $ +// $Id: include/CGAL/Generalized_map_save_load.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -70,7 +70,7 @@ namespace CGAL { template < class GMap > boost::property_tree::ptree gmap_save_darts (const GMap& amap, - std::unordered_map& myDarts) { CGAL_assertion( myDarts.empty() ); @@ -119,7 +119,7 @@ namespace CGAL { ptree tree; // map dart => number - std::unordered_map myDarts; + std::unordered_map myDarts; // Save darts ptree pt_darts=gmap_save_darts(amap, myDarts); @@ -145,7 +145,7 @@ namespace CGAL { template < class GMap > bool gmap_load_darts(boost::property_tree::ptree &pt, GMap& amap, - std::vector& myDarts) + std::vector& myDarts) { // use a boost::property_tree using boost::property_tree::ptree; @@ -196,7 +196,7 @@ namespace CGAL { using boost::property_tree::ptree; ptree pt; read_xml(input, pt); - std::vector myDarts; + std::vector myDarts; gmap_load_darts(pt,amap,myDarts); cmap_load_attributes(pt,amap,myDarts); return true; diff --git a/thirdparty/CGAL/include/CGAL/Generalized_map_storages.h b/thirdparty/CGAL/include/CGAL/Generalized_map_storages.h index 8d9630f5..ea15dd8f 100644 --- a/thirdparty/CGAL/include/CGAL/Generalized_map_storages.h +++ b/thirdparty/CGAL/include/CGAL/Generalized_map_storages.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generalized_map/include/CGAL/Generalized_map_storages.h $ -// $Id: Generalized_map_storages.h e6c767d 2021-05-12T15:45:07+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generalized_map/include/CGAL/Generalized_map_storages.h $ +// $Id: include/CGAL/Generalized_map_storages.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -34,17 +34,14 @@ namespace CGAL { struct Container_type; } - /** @file Generalized_map_storages.h - * Definition of storages for dD Generalized map. - */ - // Storage of darts with compact container, alpha with handles - template + template class Generalized_map_storage_1 { public: - typedef Generalized_map_storage_1 Self; - typedef CGAL::Tag_false Use_index; + using Self=Generalized_map_storage_1; + using Use_index=CGAL::Tag_false; + using Concurrent_tag=typename internal::Get_concurrent_tag::type; typedef internal::Combinatorial_map_helper Helper; @@ -62,22 +59,22 @@ namespace CGAL { typedef typename internal::Container_type ::type Dart_container; - - typedef typename Dart_container::iterator Dart_handle; - typedef typename Dart_container::const_iterator Dart_const_handle; + typedef typename Dart_container::iterator Dart_descriptor; + typedef typename Dart_container::const_iterator Dart_const_descriptor; typedef typename Dart_container::size_type size_type; - typedef std::nullptr_t Null_handle_type; - static const Null_handle_type null_handle; + typedef std::nullptr_t Null_descriptor_type; + inline static constexpr Null_descriptor_type null_descriptor=nullptr; + + using Type_for_compact_container=void*; typedef Items_ Items; typedef Alloc_ Alloc; - template struct Container_for_attributes : public internal::Container_type ::template rebind_alloc>::type + typename Allocator_traits::template rebind_alloc>::type {}; /// Typedef for attributes typedef typename internal::template Get_attributes_tuple::type @@ -87,11 +84,11 @@ namespace CGAL { struct Attribute_type: public Helper::template Attribute_type {}; template - struct Attribute_handle: public Helper::template Attribute_handle + struct Attribute_descriptor: public Helper::template Attribute_descriptor {}; template - struct Attribute_const_handle: - public Helper::template Attribute_const_handle + struct Attribute_const_descriptor: + public Helper::template Attribute_const_descriptor {}; template struct Attribute_range: public Helper::template Attribute_range @@ -101,6 +98,17 @@ namespace CGAL { public Helper::template Attribute_const_range {}; + /// Deprecated types, keep for now for backward compatibility + using Dart_handle=Dart_descriptor; + using Dart_const_handle=Dart_const_descriptor; + + template + using Attribute_handle=Attribute_descriptor; + template + using Attribute_const_handle=Attribute_const_descriptor; + + inline static constexpr Null_descriptor_type null_handle=null_descriptor; + /// Number of marks static const size_type NB_MARKS = 32; @@ -109,84 +117,109 @@ namespace CGAL { typedef Handle_hash_function Hash_function; + typedef Dart_container Dart_range; + typedef const Dart_container Dart_const_range; + /// @return a Dart_range (range through all the darts of the map). + Dart_range& darts() { return mdarts;} + Dart_const_range& darts() const { return mdarts; } + // Init void init_storage() - { null_dart_handle=nullptr; } + { + null_dart_descriptor=nullptr; + null_dart_handle=null_dart_descriptor; + } - /** Return if this dart is free for adimension. + void clear_storage() + {} + + /** Test if the map is empty. + * @return true iff the map is empty. + */ + bool is_empty() const + { return mdarts.empty(); } + + /// @return the number of darts. + size_type number_of_darts() const + { return mdarts.size(); } + + size_type upper_bound_on_dart_ids() const + { return 0; } + + /** Return if this dart is free for adimension. * @param dh a dart handle * @param i the dimension. - * @return true iff dh is linked with nullptr for \em adimension. + * @return true iff dh is linked with itself for \em adimension. */ template - bool is_free(Dart_const_handle dh) const + bool is_free(Dart_const_descriptor dh) const { CGAL_assertion( dh!=nullptr ); CGAL_assertion(i <= dimension); return dh->mf[i]==dh; } - bool is_free(Dart_const_handle dh, unsigned int i) const + bool is_free(Dart_const_descriptor dh, unsigned int i) const { CGAL_assertion( dh!=nullptr ); CGAL_assertion(i <= dimension); return dh->mf[i]==dh; } - bool is_perforated(Dart_const_handle /*dh*/) const + bool is_perforated(Dart_const_descriptor /*dh*/) const { return false; } /// Set simultaneously all the marks of this dart to a given value. - void set_dart_marks(Dart_const_handle ADart, + void set_dart_marks(Dart_const_descriptor ADart, const std::bitset& amarks) const { CGAL_assertion( ADart!=nullptr ); ADart->set_marks(amarks); } /// Return all the marks of a dart. - std::bitset get_dart_marks(Dart_const_handle ADart) const + std::bitset get_dart_marks(Dart_const_descriptor ADart) const { CGAL_assertion( ADart!=nullptr ); return ADart->get_marks(); } /// Return the mark value of dart a given mark number. - bool get_dart_mark(Dart_const_handle ADart, size_type amark) const + bool get_dart_mark(Dart_const_descriptor ADart, size_type amark) const { CGAL_assertion( ADart!=nullptr ); return ADart->get_mark(amark); } /// Set the mark of a given mark number to a given value. - void set_dart_mark(Dart_const_handle ADart, size_type amark, bool avalue) const + void set_dart_mark(Dart_const_descriptor ADart, size_type amark, bool avalue) const { CGAL_assertion( ADart!=nullptr ); ADart->set_mark(amark, avalue); } /// Flip the mark of a given mark number to a given value. - void flip_dart_mark(Dart_const_handle ADart, size_type amark) const + void flip_dart_mark(Dart_const_descriptor ADart, size_type amark) const { CGAL_assertion( ADart!=nullptr ); ADart->flip_mark(amark); } // Access to alpha maps - Dart_handle get_alpha(Dart_handle ADart, int B1) + Dart_descriptor get_alpha(Dart_descriptor ADart, int B1) { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; } - Dart_const_handle get_alpha(Dart_const_handle ADart, int B1) const + Dart_const_descriptor get_alpha(Dart_const_descriptor ADart, int B1) const { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; } template - Dart_handle get_alpha(Dart_handle ADart) + Dart_descriptor get_alpha(Dart_descriptor ADart) { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; } template - Dart_const_handle get_alpha(Dart_const_handle ADart) const + Dart_const_descriptor get_alpha(Dart_const_descriptor ADart) const { CGAL_assertion(ADart!=nullptr && B1>=0 && B1<=(int)dimension); return ADart->mf[B1]; @@ -194,31 +227,31 @@ namespace CGAL { // return a handle on the i-attribute template - typename Attribute_handle::type attribute(Dart_handle ADart) + typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> - (ADart->mattribute_handles); + (ADart->mattribute_descriptors); } template - typename Attribute_const_handle::type - attribute(Dart_const_handle ADart) const + typename Attribute_const_descriptor::type + attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> - (ADart->mattribute_handles); + (ADart->mattribute_descriptors); } // Copy a given attribute template - typename Attribute_handle::type copy_attribute - (typename Attribute_const_handle::type ah) + typename Attribute_descriptor::type copy_attribute + (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); - typename Attribute_handle::type res= + typename Attribute_descriptor::type res= std::get::value> (mattribute_containers).emplace(*ah); this->template init_attribute_ref_counting(res); @@ -227,7 +260,7 @@ namespace CGAL { // Test if a given attribute is valid template - bool is_valid_attribute(typename Attribute_const_handle::type ah) const + bool is_valid_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->is_valid(); @@ -236,25 +269,25 @@ namespace CGAL { // accessors and modifiers to the attribute ref counting given its handle template std::size_t get_attribute_ref_counting - (typename Attribute_const_handle::type ah) const + (typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->get_nb_refs(); } template - void init_attribute_ref_counting(typename Attribute_handle::type ah) + void init_attribute_ref_counting(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); ah->mrefcounting=0; } template - void inc_attribute_ref_counting(typename Attribute_handle::type ah) + void inc_attribute_ref_counting(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); ah->inc_nb_refs(); } template - void dec_attribute_ref_counting(typename Attribute_handle::type ah) + void dec_attribute_ref_counting(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); ah->dec_nb_refs(); @@ -263,14 +296,14 @@ namespace CGAL { // get the attribute given its handle template typename Attribute_type::type& - get_attribute(typename Attribute_handle::type ah) + get_attribute(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); return *ah; } template const typename Attribute_type::type& - get_attribute(typename Attribute_const_handle::type ah) const + get_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return *ah; @@ -278,14 +311,14 @@ namespace CGAL { // Get the dart of the given attribute template - Dart_handle dart_of_attribute(typename Attribute_handle::type ah) + Dart_descriptor dart_of_attribute(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); return ah->dart(); } template - Dart_const_handle - dart_of_attribute(typename Attribute_const_handle::type ah) const + Dart_const_descriptor + dart_of_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->dart(); @@ -293,30 +326,30 @@ namespace CGAL { // Set the dart of the given attribute template - void set_dart_of_attribute(typename Attribute_handle::type ah, - Dart_handle adart) + void set_dart_of_attribute(typename Attribute_descriptor::type ah, + Dart_descriptor adart) { CGAL_assertion( ah!=nullptr ); ah->set_dart(adart); } // Get the information associated with a given dart - Dart_info& info(Dart_handle adart) + Dart_info& info(Dart_descriptor adart) { return adart->info(); } - const Dart_info& info(Dart_const_handle adart) const + const Dart_info& info(Dart_const_descriptor adart) const { return adart->info(); } // Get the info of the given attribute template typename Attribute_type::type::Info & - info_of_attribute(typename Attribute_handle::type ah) + info_of_attribute(typename Attribute_descriptor::type ah) { CGAL_assertion( ah!=nullptr ); return ah->info(); } template const typename Attribute_type::type::Info & - info_of_attribute(typename Attribute_const_handle::type ah) const + info_of_attribute(typename Attribute_const_descriptor::type ah) const { CGAL_assertion( ah!=nullptr ); return ah->info(); @@ -324,7 +357,7 @@ namespace CGAL { // Get the info of the i-cell attribute associated with the given dart template - typename Attribute_type::type::Info & info(Dart_handle adart) + typename Attribute_type::type::Info & info(Dart_descriptor adart) { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); @@ -332,7 +365,7 @@ namespace CGAL { } template const typename Attribute_type::type::Info & - info(Dart_const_handle adart) const + info(Dart_const_descriptor adart) const { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); @@ -341,14 +374,14 @@ namespace CGAL { // Get the dart of the i-cell attribute associated with the given dart template - Dart_handle dart(Dart_handle adart) + Dart_descriptor dart(Dart_descriptor adart) { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); return dart_of_attribute(attribute(adart)); } template - Dart_const_handle dart(Dart_const_handle adart) const + Dart_const_descriptor dart(Dart_const_descriptor adart) const { CGAL_assertion( adart!=nullptr ); CGAL_assertion( attribute(adart)!=nullptr ); @@ -356,22 +389,26 @@ namespace CGAL { } // Debug function - void display_dart(Dart_const_handle ADart) const + void display_dart(Dart_const_descriptor ADart) const { std::cout< - void display_attribute(typename Attribute_const_handle::type ah) const + void display_attribute(typename Attribute_const_descriptor::type ah) const { std::cout<< std::get::value> (mattribute_containers).index(ah); } + template + size_type upper_bound_on_attribute_ids() const + { return 0; } + protected: // Set the handle on the i th attribute template - void basic_set_dart_attribute(Dart_handle dh, - typename Attribute_handle::type ah) + void basic_set_dart_attribute(Dart_descriptor dh, + typename Attribute_descriptor::type ah) { std::get::value> - (dh->mattribute_handles) = ah; + (dh->mattribute_descriptors) = ah; } /** Link a dart with a given dart for a given dimension. @@ -380,13 +417,13 @@ namespace CGAL { * @param i the dimension. */ template - void dart_link_alpha(Dart_handle adart, Dart_handle adart2) + void dart_link_alpha(Dart_descriptor adart, Dart_descriptor adart2) { CGAL_assertion(i <= dimension); CGAL_assertion(adart!=nullptr && adart2!=nullptr); adart->mf[i] = adart2; } - void dart_link_alpha(Dart_handle adart, Dart_handle adart2, unsigned int i) + void dart_link_alpha(Dart_descriptor adart, Dart_descriptor adart2, unsigned int i) { CGAL_assertion(i <= dimension); CGAL_assertion(adart!=nullptr && adart2!=nullptr); @@ -398,32 +435,28 @@ namespace CGAL { * @param i the dimension. */ template - void dart_unlink_alpha(Dart_handle adart) + void dart_unlink_alpha(Dart_descriptor adart) { CGAL_assertion(adart!=nullptr && i <= dimension); adart->mf[i] = adart; } - void dart_unlink_alpha(Dart_handle adart, unsigned int i) + void dart_unlink_alpha(Dart_descriptor adart, unsigned int i) { CGAL_assertion(adart!=nullptr && i <= dimension); adart->mf[i] = adart; } - protected: - Dart_handle null_dart_handle; // To be compatible with combinatorial map + public: + Dart_descriptor null_dart_descriptor; // To be compatible with combinatorial map + Dart_descriptor null_dart_handle; // Deprecated: kept for backward compatibility + protected: /// Dart container. Dart_container mdarts; /// Tuple of attributes containers typename Helper::Attribute_containers mattribute_containers; }; - - /// null_handle - template < unsigned int d_, class Items_, class Alloc_, class Concurrent_tag > - const typename Generalized_map_storage_1::Null_handle_type - Generalized_map_storage_1::null_handle = nullptr; - } // namespace CGAL #if defined(BOOST_GCC) diff --git a/thirdparty/CGAL/include/CGAL/Generalized_map_storages_with_index.h b/thirdparty/CGAL/include/CGAL/Generalized_map_storages_with_index.h new file mode 100644 index 00000000..b6f3f13f --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Generalized_map_storages_with_index.h @@ -0,0 +1,467 @@ +// Copyright (c) 2016 CNRS and LIRIS' Establishments (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generalized_map/include/CGAL/Generalized_map_storages_with_index.h $ +// $Id: include/CGAL/Generalized_map_storages_with_index.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Guillaume Damiand +// +#ifndef CGAL_GENERALIZED_MAP_STORAGES_WITH_INDEX_H +#define CGAL_GENERALIZED_MAP_STORAGES_WITH_INDEX_H 1 + +#include +#include +#include + +#include +#if defined(BOOST_GCC) +_Pragma("GCC diagnostic push") +_Pragma("GCC diagnostic ignored \"-Warray-bounds\"") +#endif + +namespace CGAL { + + namespace internal { + template + struct Combinatorial_map_helper; + + template + struct Container_type; + } + + // Storage of darts with compact container, alpha with indices + template + class Generalized_map_storage_with_index + { + public: + using Self=Generalized_map_storage_with_index; + using Use_index=CGAL::Tag_true; + using Concurrent_tag=typename internal::Get_concurrent_tag::type; + + typedef internal::Combinatorial_map_helper Helper; + + using Index_type=typename internal::Get_index_type::type; + + typedef typename Items_::template Dart_wrapper Dart_wrapper; + + typedef typename internal::template Get_dart_info::type + Dart_info; + typedef CGAL::Dart Dart; + + typedef std::allocator_traits Allocator_traits; + typedef typename Allocator_traits::template rebind_alloc Dart_allocator; + + typedef Compact_container_with_index, Index_type> + Dart_container; + + typedef typename Dart_container::Index Dart_index; + + typedef Dart_index Dart_descriptor; + typedef Dart_index Dart_const_descriptor; + typedef typename Dart_container::size_type size_type; + + typedef Dart_index Null_descriptor_type; + static const Index_type null_descriptor=Dart_container::null_descriptor; + + using Type_for_compact_container=Index_type; + + typedef Items_ Items; + typedef Alloc_ Alloc; + template + struct Container_for_attributes : public + Compact_container_with_index, + Multiply_by_two_policy_for_cc_with_size<64>, size_type > + {}; + /// Typedef for attributes + typedef typename internal::template Get_attributes_tuple::type + Attributes; + + template + struct Attribute_type: public Helper::template Attribute_type + {}; + template + struct Attribute_descriptor: public Helper::template Attribute_descriptor + {}; + template + struct Attribute_const_descriptor: + public Helper::template Attribute_const_descriptor + {}; + template + struct Attribute_range: public Helper::template Attribute_range + {}; + template + struct Attribute_const_range: + public Helper::template Attribute_const_range + {}; + + /// Deprecated types, keep for now for backward compatibility + using Dart_handle=Dart_descriptor; + using Dart_const_handle=Dart_const_descriptor; + + template + using Attribute_handle=Attribute_descriptor; + template + using Attribute_const_handle=Attribute_const_descriptor; + + static const Index_type null_handle=null_descriptor; + + /// Number of marks + static const size_type NB_MARKS = 32; + + /// The dimension of the generalized map. + static const unsigned int dimension = d_; + + typedef internal::Index_hash_function Hash_function; + + typedef Dart_container Dart_range; + typedef const Dart_container Dart_const_range; + /// @return a Dart_range (range through all the darts of the map). + Dart_range& darts() { return mdarts;} + Dart_const_range& darts() const { return mdarts; } + + // Init + void init_storage() + {} + + void clear_storage() + {} + + /** Test if the map is empty. + * @return true iff the map is empty. + */ + bool is_empty() const + { return mdarts.empty(); } + + /// @return the number of darts. + size_type number_of_darts() const + { return mdarts.size(); } + + size_type upper_bound_on_dart_ids() const + { return mdarts.upper_bound(); } + + /** Return if this dart is free for adimension. + * @param dh a dart handle + * @param i the dimension. + * @return true iff dh is linked with itself for \em adimension. + */ + template + bool is_free(Dart_const_descriptor dh) const + { + CGAL_assertion(i <= dimension); + return mdarts[dh].mf[i]==dh; + } + bool is_free(Dart_const_descriptor dh, unsigned int i) const + { + CGAL_assertion(i <= dimension); + return mdarts[dh].mf[i]==dh; + } + bool is_perforated(Dart_const_descriptor /*dh*/) const + { return false; } + + /// Set simultaneously all the marks of this dart to a given value. + void set_dart_marks(Dart_const_descriptor ADart, + const std::bitset& amarks) const + { + mdarts[ADart].set_marks(amarks); + } + /// Return all the marks of a dart. + std::bitset get_dart_marks(Dart_const_descriptor ADart) const + { + return mdarts[ADart].get_marks(); + } + /// Return the mark value of dart a given mark number. + bool get_dart_mark(Dart_const_descriptor ADart, size_type amark) const + { + return mdarts[ADart].get_mark(amark); + } + + /// Set the mark of a given mark number to a given value. + void set_dart_mark(Dart_const_descriptor ADart, size_type amark, bool avalue) const + { + mdarts[ADart].set_mark(amark, avalue); + } + + /// Flip the mark of a given mark number to a given value. + void flip_dart_mark(Dart_const_descriptor ADart, size_type amark) const + { + mdarts[ADart].flip_mark(amark); + } + + // Access to alpha maps + Dart_descriptor get_alpha(Dart_descriptor ADart, int B1) + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + Dart_const_descriptor get_alpha(Dart_const_descriptor ADart, int B1) const + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + template + Dart_descriptor get_alpha(Dart_descriptor ADart) + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + template + Dart_const_descriptor get_alpha(Dart_const_descriptor ADart) const + { + CGAL_assertion(B1>=0 && B1<=(int)dimension); + return mdarts[ADart].mf[B1]; + } + + // return a handle on the i-attribute + template + typename Attribute_descriptor::type attribute(Dart_descriptor ADart) + { + static_assert(Helper::template Dimension_index::value>=0, + "attribute called but i-attributes are disabled."); + return std::get::value> + (mdarts[ADart].mattribute_descriptors); + } + template + typename Attribute_const_descriptor::type + attribute(Dart_const_descriptor ADart) const + { + static_assert(Helper::template Dimension_index::value>=0, + "attribute called but i-attributes are disabled."); + return std::get::value> + (mdarts[ADart].mattribute_descriptors); + } + + // Copy a given attribute + template + typename Attribute_descriptor::type copy_attribute + (typename Attribute_const_descriptor::type ah) + { + static_assert(Helper::template Dimension_index::value>=0, + "copy_attribute called but i-attributes are disabled."); + // We need to do a reserve before the emplace in order to avoid a bug of + // invalid reference when the container is reallocated. + std::get::value> + (mattribute_containers).reserve + (std::get::value> + (mattribute_containers).size()+1); + + typename Attribute_descriptor::type res= + std::get::value> + (mattribute_containers).emplace(get_attribute(ah)); + this->template init_attribute_ref_counting(res); + return res; + } + + // Test if a given attribute is valid + template + bool is_valid_attribute(typename Attribute_const_descriptor::type ah) const + { + return get_attribute(ah).is_valid(); + } + + // accessors and modifiers to the attribute ref counting given its handle + template + std::size_t get_attribute_ref_counting + (typename Attribute_const_descriptor::type ah) const + { + return get_attribute(ah).get_nb_refs(); + } + template + void init_attribute_ref_counting(typename Attribute_descriptor::type ah) + { + get_attribute(ah).mrefcounting=0; + } + template + void inc_attribute_ref_counting(typename Attribute_descriptor::type ah) + { + get_attribute(ah).inc_nb_refs(); + } + template + void dec_attribute_ref_counting(typename Attribute_descriptor::type ah) + { + get_attribute(ah).dec_nb_refs(); + } + + // get the attribute given its index + template + typename Attribute_type::type& + get_attribute(typename Attribute_descriptor::type ah) + { + CGAL_assertion( ah!=null_descriptor ); + return std::get::value> + (mattribute_containers)[ah]; + } + template + const typename Attribute_type::type& + get_attribute(typename Attribute_const_descriptor::type ah) const + { + CGAL_assertion( ah!=null_descriptor ); + return std::get::value> + (mattribute_containers)[ah]; + } + + // Get the dart of the given attribute + template + Dart_descriptor dart_of_attribute(typename Attribute_descriptor::type ah) + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).dart(); + } + template + Dart_const_descriptor + dart_of_attribute(typename Attribute_const_descriptor::type ah) const + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).dart(); + } + + // Set the dart of the given attribute + template + void set_dart_of_attribute(typename Attribute_descriptor::type ah, + Dart_descriptor adart) + { + CGAL_assertion( ah!=null_descriptor ); + get_attribute(ah).set_dart(adart); + } + + // Get the information associated with a given dart + Dart_info& info(Dart_descriptor adart) + { return mdarts[adart].info(); } + const Dart_info& info(Dart_const_descriptor adart) const + { return mdarts[adart].info(); } + + // Get the info of the given attribute + template + typename Attribute_type::type::Info & + info_of_attribute(typename Attribute_descriptor::type ah) + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).info(); + } + template + const typename Attribute_type::type::Info & + info_of_attribute(typename Attribute_const_descriptor::type ah) const + { + CGAL_assertion( ah!=null_descriptor ); + return get_attribute(ah).info(); + } + + // Get the info of the i-cell attribute associated with the given dart + template + typename Attribute_type::type::Info & info(Dart_descriptor adart) + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( this->template attribute(adart)!=null_descriptor ); + return info_of_attribute(attribute(adart)); + } + template + const typename Attribute_type::type::Info & + info(Dart_const_descriptor adart) const + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( attribute(adart)!=null_descriptor ); + return info_of_attribute(attribute(adart)); + } + + // Get the dart of the i-cell attribute associated with the given dart + template + Dart_descriptor dart(Dart_descriptor adart) + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( attribute(adart)!=null_descriptor ); + return dart_of_attribute(attribute(adart)); + } + template + Dart_const_descriptor dart(Dart_const_descriptor adart) const + { + CGAL_assertion( adart!=null_descriptor ); + CGAL_assertion( attribute(adart)!=null_descriptor ); + return dart_of_attribute(attribute(adart)); + } + + // Debug function + void display_dart(Dart_const_descriptor ADart) const + { std::cout< + void display_attribute(typename Attribute_const_descriptor::type ah) const + { std::cout< + size_type upper_bound_on_attribute_ids() const + { + return std::get::value> + (mattribute_containers).upper_bound(); + } + + protected: + // Set the handle on the i th attribute + template + void basic_set_dart_attribute(Dart_descriptor dh, + typename Attribute_descriptor::type ah) + { + std::get::value> + (mdarts[dh].mattribute_descriptors) = ah; + } + + /** Link a dart with a given dart for a given dimension. + * @param adart the dart to link. + * @param adart2 the dart to link with. + * @param i the dimension. + */ + template + void dart_link_alpha(Dart_descriptor adart, Dart_descriptor adart2) + { + CGAL_assertion(i <= dimension); + CGAL_assertion(adart!=null_descriptor && adart2!=null_descriptor); + mdarts[adart].mf[i] = adart2; + } + void dart_link_alpha(Dart_descriptor adart, Dart_descriptor adart2, unsigned int i) + { + CGAL_assertion(i <= dimension); + CGAL_assertion(adart!=null_descriptor && adart2!=null_descriptor); + mdarts[adart].mf[i] = adart2; + } + + /** Unlink a dart for a given dimension. + * @param adart a dart. + * @param i the dimension. + */ + template + void dart_unlink_alpha(Dart_descriptor adart) + { + CGAL_assertion(adart!=null_descriptor && i <= dimension); + mdarts[adart].mf[i] = adart; + } + void dart_unlink_alpha(Dart_descriptor adart, unsigned int i) + { + CGAL_assertion(adart!=null_descriptor && i <= dimension); + mdarts[adart].mf[i] = adart; + } + + public: + Index_type null_dart_descriptor=0; // To be compatible with combinatorial map + + // Deprecated: kept for backward compatibility + Index_type null_dart_handle=null_dart_descriptor; // To be compatible with combinatorial map + + protected: + /// Dart container. + Dart_container mdarts; + + /// Tuple of attributes containers + typename Helper::Attribute_containers mattribute_containers; + }; + +} // namespace CGAL + +#if defined(BOOST_GCC) + _Pragma("GCC diagnostic pop") +#endif + +#endif // CGAL_GENERALIZED_MAP_STORAGES_WITH_INDEX_H // +// EOF // diff --git a/thirdparty/CGAL/include/CGAL/Generator/internal/Generic_random_point_generator.h b/thirdparty/CGAL/include/CGAL/Generator/internal/Generic_random_point_generator.h index 190ad0c5..856763c3 100644 --- a/thirdparty/CGAL/include/CGAL/Generator/internal/Generic_random_point_generator.h +++ b/thirdparty/CGAL/include/CGAL/Generator/internal/Generic_random_point_generator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generator/include/CGAL/Generator/internal/Generic_random_point_generator.h $ -// $Id: Generic_random_point_generator.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generator/include/CGAL/Generator/internal/Generic_random_point_generator.h $ +// $Id: include/CGAL/Generator/internal/Generic_random_point_generator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -118,8 +118,8 @@ struct Apply_approx_sqrt Apply_approx_sqrt(const Functor& f) : Functor(f) { } template - typename boost::remove_reference< - typename cpp11::result_of::type>::type + std::remove_reference_t< + typename cpp11::result_of::type> operator()(const T& t) const { return approximate_sqrt( static_cast(*this)(t) ); diff --git a/thirdparty/CGAL/include/CGAL/Generic_map_min_items.h b/thirdparty/CGAL/include/CGAL/Generic_map_min_items.h index 14a3ea4d..e549555d 100644 --- a/thirdparty/CGAL/include/CGAL/Generic_map_min_items.h +++ b/thirdparty/CGAL/include/CGAL/Generic_map_min_items.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Combinatorial_map/include/CGAL/Generic_map_min_items.h $ -// $Id: Generic_map_min_items.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Generic_map_min_items.h $ +// $Id: include/CGAL/Generic_map_min_items.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand diff --git a/thirdparty/CGAL/include/CGAL/Geographical_coordinates_traits_2.h b/thirdparty/CGAL/include/CGAL/Geographical_coordinates_traits_2.h index 4d2c8f20..cc9a7d30 100644 --- a/thirdparty/CGAL/include/CGAL/Geographical_coordinates_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Geographical_coordinates_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_on_sphere_2/include/CGAL/Geographical_coordinates_traits_2.h $ -// $Id: Geographical_coordinates_traits_2.h 00015b0 2021-04-02T09:44:49+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_on_sphere_2/include/CGAL/Geographical_coordinates_traits_2.h $ +// $Id: include/CGAL/Geographical_coordinates_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -16,7 +16,7 @@ #include -#include +#include #include #include diff --git a/thirdparty/CGAL/include/CGAL/Get_arithmetic_kernel.h b/thirdparty/CGAL/include/CGAL/Get_arithmetic_kernel.h index 0a68a2f9..416659ea 100644 --- a/thirdparty/CGAL/include/CGAL/Get_arithmetic_kernel.h +++ b/thirdparty/CGAL/include/CGAL/Get_arithmetic_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arithmetic_kernel/include/CGAL/Get_arithmetic_kernel.h $ -// $Id: Get_arithmetic_kernel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arithmetic_kernel/include/CGAL/Get_arithmetic_kernel.h $ +// $Id: include/CGAL/Get_arithmetic_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Hemmer diff --git a/thirdparty/CGAL/include/CGAL/Gmp_coercion_traits.h b/thirdparty/CGAL/include/CGAL/Gmp_coercion_traits.h index f8c0ce0c..f7eca796 100644 --- a/thirdparty/CGAL/include/CGAL/Gmp_coercion_traits.h +++ b/thirdparty/CGAL/include/CGAL/Gmp_coercion_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Gmp_coercion_traits.h $ -// $Id: Gmp_coercion_traits.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Gmp_coercion_traits.h $ +// $Id: include/CGAL/Gmp_coercion_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Gmpfi.h b/thirdparty/CGAL/include/CGAL/Gmpfi.h index 2962c7a9..a7072ae2 100644 --- a/thirdparty/CGAL/include/CGAL/Gmpfi.h +++ b/thirdparty/CGAL/include/CGAL/Gmpfi.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Gmpfi.h $ -// $Id: Gmpfi.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Gmpfi.h $ +// $Id: include/CGAL/Gmpfi.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/Gmpfr.h b/thirdparty/CGAL/include/CGAL/Gmpfr.h index b53b72c0..cc786e4a 100644 --- a/thirdparty/CGAL/include/CGAL/Gmpfr.h +++ b/thirdparty/CGAL/include/CGAL/Gmpfr.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Gmpfr.h $ -// $Id: Gmpfr.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Gmpfr.h $ +// $Id: include/CGAL/Gmpfr.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/Gmpq.h b/thirdparty/CGAL/include/CGAL/Gmpq.h index a3ac6f0d..d1cd14ba 100644 --- a/thirdparty/CGAL/include/CGAL/Gmpq.h +++ b/thirdparty/CGAL/include/CGAL/Gmpq.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Gmpq.h $ -// $Id: Gmpq.h 152a084 2021-09-21T13:34:58+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Gmpq.h $ +// $Id: include/CGAL/Gmpq.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Gmpz.h b/thirdparty/CGAL/include/CGAL/Gmpz.h index b3585c45..23cf625c 100644 --- a/thirdparty/CGAL/include/CGAL/Gmpz.h +++ b/thirdparty/CGAL/include/CGAL/Gmpz.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Gmpz.h $ -// $Id: Gmpz.h 152a084 2021-09-21T13:34:58+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Gmpz.h $ +// $Id: include/CGAL/Gmpz.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Gmpzf.h b/thirdparty/CGAL/include/CGAL/Gmpzf.h index 1e4026ee..5c0533ac 100644 --- a/thirdparty/CGAL/include/CGAL/Gmpzf.h +++ b/thirdparty/CGAL/include/CGAL/Gmpzf.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Gmpzf.h $ -// $Id: Gmpzf.h 152a084 2021-09-21T13:34:58+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Gmpzf.h $ +// $Id: include/CGAL/Gmpzf.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Gps_circle_segment_traits_2.h b/thirdparty/CGAL/include/CGAL/Gps_circle_segment_traits_2.h index fc225ebb..b4a9ab49 100644 --- a/thirdparty/CGAL/include/CGAL/Gps_circle_segment_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Gps_circle_segment_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Gps_circle_segment_traits_2.h $ -// $Id: Gps_circle_segment_traits_2.h e2a77e5 2020-05-24T11:18:01+02:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Gps_circle_segment_traits_2.h $ +// $Id: include/CGAL/Gps_circle_segment_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Gps_segment_traits_2.h b/thirdparty/CGAL/include/CGAL/Gps_segment_traits_2.h index 782dfc7d..47cc4bca 100644 --- a/thirdparty/CGAL/include/CGAL/Gps_segment_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Gps_segment_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Gps_segment_traits_2.h $ -// $Id: Gps_segment_traits_2.h 04729e8 2021-11-03T18:29:58+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Gps_segment_traits_2.h $ +// $Id: include/CGAL/Gps_segment_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Gps_traits_2.h b/thirdparty/CGAL/include/CGAL/Gps_traits_2.h index 3b6c409b..c32089a0 100644 --- a/thirdparty/CGAL/include/CGAL/Gps_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Gps_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Gps_traits_2.h $ -// $Id: Gps_traits_2.h 4dbf509 2021-11-03T16:47:12+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Gps_traits_2.h $ +// $Id: include/CGAL/Gps_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Gray_level_image_3.h b/thirdparty/CGAL/include/CGAL/Gray_level_image_3.h index 9d82ef0a..98b7e6c3 100644 --- a/thirdparty/CGAL/include/CGAL/Gray_level_image_3.h +++ b/thirdparty/CGAL/include/CGAL/Gray_level_image_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Gray_level_image_3.h $ -// $Id: Gray_level_image_3.h 44df664 2021-10-07T11:38:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Gray_level_image_3.h $ +// $Id: include/CGAL/Gray_level_image_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent RINEAU diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_const_decorator.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_const_decorator.h index 9dc81781..691a92ce 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_const_decorator.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_const_decorator.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_const_decorator.h $ -// $Id: HalfedgeDS_const_decorator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_const_decorator.h $ +// $Id: include/CGAL/HalfedgeDS_const_decorator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_decorator.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_decorator.h index 59fbc44b..0314a9ac 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_decorator.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_decorator.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_decorator.h $ -// $Id: HalfedgeDS_decorator.h 0d66e19 2020-07-24T17:05:10+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_decorator.h $ +// $Id: include/CGAL/HalfedgeDS_decorator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -427,7 +427,7 @@ class HalfedgeDS_decorator : public HalfedgeDS_items_decorator { insert_tip( inew->opposite(), hnew); insert_tip( jnew->opposite(), inew); insert_tip( hnew->opposite(), jnew); - // Make the new incidences with the old stucture. + // Make the new incidences with the old structure. CGAL_assertion_code( std::size_t termination_count = 0;) if ( h->next() != i) { Halfedge_handle g = h->next(); @@ -795,8 +795,7 @@ class HalfedgeDS_decorator : public HalfedgeDS_items_decorator { Assert_compile_time_tag(Supports_vertex_halfedge(), Tag_true()); Assert_compile_time_tag(Supports_halfedge_vertex(), Tag_true()); - unsigned int nb_erased_components = 0, - nb_isolated_vertices = 0; + unsigned int nb_erased_components = 0; // Gets list of connected components, ordered by size (i.e. number of vertices) std::vector components; @@ -818,13 +817,9 @@ class HalfedgeDS_decorator : public HalfedgeDS_items_decorator { else // if isolated vertex { vertices_erase(vertex); - nb_isolated_vertices++; } } -// if (nb_isolated_vertices > 0) -// std::cerr << " Erased " << nb_isolated_vertices << " isolated vertices\n"; - return nb_erased_components; } diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_default.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_default.h index a97f04d9..20bcf31e 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_default.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_default.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_default.h $ -// $Id: HalfedgeDS_default.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_default.h $ +// $Id: include/CGAL/HalfedgeDS_default.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_face_base.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_face_base.h index 3c3b8d77..02c28787 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_face_base.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_face_base.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_face_base.h $ -// $Id: HalfedgeDS_face_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_face_base.h $ +// $Id: include/CGAL/HalfedgeDS_face_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_face_max_base_with_id.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_face_max_base_with_id.h index 3714caf0..3b5aeeec 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_face_max_base_with_id.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_face_max_base_with_id.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_face_max_base_with_id.h $ -// $Id: HalfedgeDS_face_max_base_with_id.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_face_max_base_with_id.h $ +// $Id: include/CGAL/HalfedgeDS_face_max_base_with_id.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_face_min_base.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_face_min_base.h index 6aefe3a8..517ff83b 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_face_min_base.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_face_min_base.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_face_min_base.h $ -// $Id: HalfedgeDS_face_min_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_face_min_base.h $ +// $Id: include/CGAL/HalfedgeDS_face_min_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_halfedge_base.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_halfedge_base.h index 0cc2329b..0949ddc1 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_halfedge_base.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_halfedge_base.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_halfedge_base.h $ -// $Id: HalfedgeDS_halfedge_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_halfedge_base.h $ +// $Id: include/CGAL/HalfedgeDS_halfedge_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_halfedge_max_base_with_id.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_halfedge_max_base_with_id.h index ed031e36..67bb6ca2 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_halfedge_max_base_with_id.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_halfedge_max_base_with_id.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_halfedge_max_base_with_id.h $ -// $Id: HalfedgeDS_halfedge_max_base_with_id.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_halfedge_max_base_with_id.h $ +// $Id: include/CGAL/HalfedgeDS_halfedge_max_base_with_id.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_halfedge_min_base.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_halfedge_min_base.h index e68e2207..1480bb6f 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_halfedge_min_base.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_halfedge_min_base.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_halfedge_min_base.h $ -// $Id: HalfedgeDS_halfedge_min_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_halfedge_min_base.h $ +// $Id: include/CGAL/HalfedgeDS_halfedge_min_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_items_2.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_items_2.h index 2bd5ad0a..4bb6a413 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_items_2.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_items_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_items_2.h $ -// $Id: HalfedgeDS_items_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_items_2.h $ +// $Id: include/CGAL/HalfedgeDS_items_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_items_decorator.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_items_decorator.h index b2687bd1..0b005d17 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_items_decorator.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_items_decorator.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_items_decorator.h $ -// $Id: HalfedgeDS_items_decorator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_items_decorator.h $ +// $Id: include/CGAL/HalfedgeDS_items_decorator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_iterator.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_iterator.h index 8ae80918..2d6c087f 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_iterator.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_iterator.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_iterator.h $ -// $Id: HalfedgeDS_iterator.h 4e4a93d 2021-03-31T15:48:05+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_iterator.h $ +// $Id: include/CGAL/HalfedgeDS_iterator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_iterator_adaptor.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_iterator_adaptor.h index 67febc6b..e9a5b8cf 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_iterator_adaptor.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_iterator_adaptor.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_iterator_adaptor.h $ -// $Id: HalfedgeDS_iterator_adaptor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_iterator_adaptor.h $ +// $Id: include/CGAL/HalfedgeDS_iterator_adaptor.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -33,7 +33,7 @@ namespace CGAL { // Instead, we rely now on a static local variable. Static variables are // first of all zero-initialized (Section 3.6.2), which guarantees that -// pointers and such are set to zero even if the construtor does not +// pointers and such are set to zero even if the constructor does not // initialize them (Section 8.5). With static variables, the order of // initialization could be critical, if the initialization of one // requires another one to be initialized already (I have not seen such a @@ -48,7 +48,7 @@ namespace CGAL { // for weird static initialization situations. Usually the std::vector // class uses a plain C-pointer as iterator, which would be a POD and // thus efficient. However, the std::list iterators might not be POD's if -// they define their own copy contructor. This is the case for +// they define their own copy constructor. This is the case for // std::list::iterator of the current SGI STL, but not for the // std::list::const_iterator, which is a funny side-effect of having // only a single class for both and a constructor that allows iterator to diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_list.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_list.h index b06651da..d2ee5a7e 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_list.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_list.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_list.h $ -// $Id: HalfedgeDS_list.h 1373150 2020-11-29T14:42:55+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_list.h $ +// $Id: include/CGAL/HalfedgeDS_list.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_min_items.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_min_items.h index c2ff1785..9304e864 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_min_items.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_min_items.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_min_items.h $ -// $Id: HalfedgeDS_min_items.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_min_items.h $ +// $Id: include/CGAL/HalfedgeDS_min_items.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_vector.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_vector.h index 3bf709e3..54c0ed6f 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_vector.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_vector.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_vector.h $ -// $Id: HalfedgeDS_vector.h 0d0c5d2 2020-07-15T17:03:18+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_vector.h $ +// $Id: include/CGAL/HalfedgeDS_vector.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -547,7 +547,7 @@ class HalfedgeDS_vector -- --rr; Hiterator rrhv = hvector.end(); -- --rrhv; - // The comments proove the invariant of the partitioning step. + // The comments prove the invariant of the partitioning step. // Note that + 1 or - 1 denotes plus one edge or minus one edge, // so they mean actually + 2 and - 2. // Pivot is in *ll @@ -617,7 +617,7 @@ class HalfedgeDS_vector CGAL_assertion( llhv >= rrhv); // rr + 1 >= ll >= rr // Elements in [rr+1..end) >= pivot - // Elemente in [begin..ll) < pivot + // Elements in [begin..ll) < pivot // Pivot is in a[ll] if ( ll == rr) { // Check for the possibly missed swap. diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_vertex_base.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_vertex_base.h index ac1f6ffb..7007377c 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_vertex_base.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_vertex_base.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_vertex_base.h $ -// $Id: HalfedgeDS_vertex_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_vertex_base.h $ +// $Id: include/CGAL/HalfedgeDS_vertex_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_vertex_max_base_with_id.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_vertex_max_base_with_id.h index 0eb0040e..98bf9c02 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_vertex_max_base_with_id.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_vertex_max_base_with_id.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_vertex_max_base_with_id.h $ -// $Id: HalfedgeDS_vertex_max_base_with_id.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_vertex_max_base_with_id.h $ +// $Id: include/CGAL/HalfedgeDS_vertex_max_base_with_id.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/HalfedgeDS_vertex_min_base.h b/thirdparty/CGAL/include/CGAL/HalfedgeDS_vertex_min_base.h index f7582192..0477cb52 100644 --- a/thirdparty/CGAL/include/CGAL/HalfedgeDS_vertex_min_base.h +++ b/thirdparty/CGAL/include/CGAL/HalfedgeDS_vertex_min_base.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/HalfedgeDS_vertex_min_base.h $ -// $Id: HalfedgeDS_vertex_min_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/HalfedgeDS_vertex_min_base.h $ +// $Id: include/CGAL/HalfedgeDS_vertex_min_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Handle.h b/thirdparty/CGAL/include/CGAL/Handle.h index 871a8d2a..1e661215 100644 --- a/thirdparty/CGAL/include/CGAL/Handle.h +++ b/thirdparty/CGAL/include/CGAL/Handle.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Handle.h $ -// $Id: Handle.h 4d797b5 2022-11-17T19:03:30+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Handle.h $ +// $Id: include/CGAL/Handle.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,6 +18,7 @@ #define CGAL_HANDLE_H #include +#include #include #include #include @@ -122,7 +123,7 @@ class Handle int refs() const noexcept { return PTR->count.load(std::memory_order_relaxed); } - Id_type id() const noexcept { return std::distance(static_cast(0), PTR); } + Id_type id() const noexcept { return static_cast(reinterpret_cast(static_cast(PTR)) / sizeof(Rep)); } bool identical(const Handle& h) const noexcept { return PTR == h.PTR; } diff --git a/thirdparty/CGAL/include/CGAL/Handle_for.h b/thirdparty/CGAL/include/CGAL/Handle_for.h index 2e841528..94bf7595 100644 --- a/thirdparty/CGAL/include/CGAL/Handle_for.h +++ b/thirdparty/CGAL/include/CGAL/Handle_for.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Handle_for.h $ -// $Id: Handle_for.h 8fa0f55 2021-05-27T10:27:38+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Handle_for.h $ +// $Id: include/CGAL/Handle_for.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -30,7 +30,7 @@ #if defined(BOOST_MSVC) # pragma warning(push) -# pragma warning(disable:4345) // Avoid warning http://msdn.microsoft.com/en-us/library/wewb47ee(VS.80).aspx +# pragma warning(disable:4345) // Avoid warning https://learn.microsoft.com/en-us/previous-versions/wewb47ee(v=vs.120) #endif namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Handle_for_virtual.h b/thirdparty/CGAL/include/CGAL/Handle_for_virtual.h index b0a73d51..fa31c78f 100644 --- a/thirdparty/CGAL/include/CGAL/Handle_for_virtual.h +++ b/thirdparty/CGAL/include/CGAL/Handle_for_virtual.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Handle_for_virtual.h $ -// $Id: Handle_for_virtual.h 2ceedcf 2021-01-08T19:44:01+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Handle_for_virtual.h $ +// $Id: include/CGAL/Handle_for_virtual.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Handle_hash_function.h b/thirdparty/CGAL/include/CGAL/Handle_hash_function.h index 0f5b15dc..53cd5448 100644 --- a/thirdparty/CGAL/include/CGAL/Handle_hash_function.h +++ b/thirdparty/CGAL/include/CGAL/Handle_hash_function.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Hash_map/include/CGAL/Handle_hash_function.h $ -// $Id: Handle_hash_function.h cec93d0 2021-05-27T14:36:55+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Hash_map/include/CGAL/Handle_hash_function.h $ +// $Id: include/CGAL/Handle_hash_function.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Handle_with_policy.h b/thirdparty/CGAL/include/CGAL/Handle_with_policy.h index 9a97c44f..806456c5 100644 --- a/thirdparty/CGAL/include/CGAL/Handle_with_policy.h +++ b/thirdparty/CGAL/include/CGAL/Handle_with_policy.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Handle_with_policy.h $ -// $Id: Handle_with_policy.h 521c72d 2021-10-04T13:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Handle_with_policy.h $ +// $Id: include/CGAL/Handle_with_policy.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Seel @@ -21,8 +21,6 @@ #include #include -#include - #include #ifdef CGAL_USE_LEDA @@ -279,7 +277,7 @@ class Reference_counted_hierarchy : public Reference_counted_hierarchy_base { //! pointer. One example would be cleaning up dynamically allocated //! data, or another example would be overwriting a \c leda::real with //! a default constructed value to free its old expression tree. However, - //! this function can also be savely ignored and kept empty. + //! this function can also be safely ignored and kept empty. virtual void clear() {} }; @@ -355,8 +353,8 @@ namespace Intern { typedef ::CGAL::Reference_counted_hierarchy_with_union Reference_counted_hierarchy_with_union; CGAL_USE_TYPE(Reference_counted_hierarchy_with_union); - CGAL_static_assertion(( - ::CGAL::is_same_or_derived< Reference_counted_hierarchy_with_union, T >::value )); + static_assert( + ::CGAL::is_same_or_derived< Reference_counted_hierarchy_with_union, T >::value ); } typedef T Rep; }; @@ -396,7 +394,7 @@ class Handle_policy_no_union { * of representations. * * The base classes can be used directly, but this - * rebind mechamism allows the implementation of handle-rep classes + * rebind mechanism allows the implementation of handle-rep classes * that are parameterized with the policy class only and adapt to * the necessary base class. */ @@ -456,7 +454,7 @@ class Handle_policy_union { * of representations. * * The base classes can be used directly, but this - * rebind mechamism allows the implementation of handle-rep classes + * rebind mechanism allows the implementation of handle-rep classes * that are parameterized with the policy class only and adapt to * the necessary base class. */ @@ -589,7 +587,7 @@ class Handle_policy_union_and_reset { * of representations. * * The base classes can be used directly, but this - * rebind mechamism allows the implementation of handle-rep classes + * rebind mechanism allows the implementation of handle-rep classes * that are parameterized with the policy class only and adapt to * the necessary base class. */ @@ -728,10 +726,10 @@ class Handle_with_policy { static Bind bind; // Define type that is used for function matching - typedef typename ::boost::mpl::if_c< + typedef std::conditional_t< is_class_hierarchy, ::CGAL::Tag_true, - ::CGAL::Tag_false >::type + ::CGAL::Tag_false > Class_hierarchy; //! the internal representation, i.e., \c T plus a reference count @@ -760,7 +758,7 @@ class Handle_with_policy { static Rep_allocator allocator; static Rep* new_rep( const Rep& rep) { - CGAL_static_assertion( !( + static_assert( !( ::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value )); Rep* p = allocator.allocate(1); std::allocator_traits::construct(allocator, p, rep); @@ -855,8 +853,8 @@ class Handle_with_policy { //! argument, and the single argument template constructor no other //! constructor will work for class hierarchies of representations. Handle_with_policy( Rep* p) : ptr_( p) { - CGAL_static_assertion(( - ::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value )); + static_assert( + ::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value ); //Bind bind_; // trigger compile-time check //(void)bind_; (void)Bind(); @@ -869,8 +867,8 @@ class Handle_with_policy { //! version of \c initialize_with is applicable in this case except //! the template version with one argument. void initialize_with( Rep* p) { - CGAL_static_assertion(( - ::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value )); + static_assert( + ::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value ); //Bind bind_; // trigger compile-time check //(void)bind_; (void)Bind(); @@ -1138,7 +1136,7 @@ template class Handle_with_policy { public: - //! first template paramter + //! first template parameter typedef T_ Handled_type; //! the handle type itself. diff --git a/thirdparty/CGAL/include/CGAL/Has_conversion.h b/thirdparty/CGAL/include/CGAL/Has_conversion.h index 2071fef5..26cbfcc5 100644 --- a/thirdparty/CGAL/include/CGAL/Has_conversion.h +++ b/thirdparty/CGAL/include/CGAL/Has_conversion.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Has_conversion.h $ -// $Id: Has_conversion.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Has_conversion.h $ +// $Id: include/CGAL/Has_conversion.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -23,9 +23,9 @@ namespace internal { template struct Converter_selector { - CGAL_static_assertion_msg((boost::is_same::value), - "Kernels must have the same representation"); + static_assert(std::is_same::value, + "Kernels must have the same representation"); typedef CGAL::Cartesian_converter type; }; @@ -33,9 +33,9 @@ struct Converter_selector template struct Converter_selector { - CGAL_static_assertion_msg((boost::is_same::value), - "Kernels must have the same representation"); + static_assert(std::is_same::value, + "Kernels must have the same representation"); typedef CGAL::Homogeneous_converter type; }; diff --git a/thirdparty/CGAL/include/CGAL/Has_member.h b/thirdparty/CGAL/include/CGAL/Has_member.h index 83b31877..61e1c233 100644 --- a/thirdparty/CGAL/include/CGAL/Has_member.h +++ b/thirdparty/CGAL/include/CGAL/Has_member.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Has_member.h $ -// $Id: Has_member.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Has_member.h $ +// $Id: include/CGAL/Has_member.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Clement Jamin diff --git a/thirdparty/CGAL/include/CGAL/Has_timestamp.h b/thirdparty/CGAL/include/CGAL/Has_timestamp.h index 083bc69d..b2118e3c 100644 --- a/thirdparty/CGAL/include/CGAL/Has_timestamp.h +++ b/thirdparty/CGAL/include/CGAL/Has_timestamp.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Has_timestamp.h $ -// $Id: Has_timestamp.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Has_timestamp.h $ +// $Id: include/CGAL/Has_timestamp.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jane Tournois diff --git a/thirdparty/CGAL/include/CGAL/Hash_map/internal/chained_map.h b/thirdparty/CGAL/include/CGAL/Hash_map/internal/chained_map.h index 6bd049fc..f78ab349 100644 --- a/thirdparty/CGAL/include/CGAL/Hash_map/internal/chained_map.h +++ b/thirdparty/CGAL/include/CGAL/Hash_map/internal/chained_map.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Hash_map/include/CGAL/Hash_map/internal/chained_map.h $ -// $Id: chained_map.h 4334028 2022-05-03T18:10:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Hash_map/include/CGAL/Hash_map/internal/chained_map.h $ +// $Id: include/CGAL/Hash_map/internal/chained_map.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h b/thirdparty/CGAL/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h index 66cde9b9..872a4c7e 100644 --- a/thirdparty/CGAL/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h +++ b/thirdparty/CGAL/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h $ -// $Id: Surface_mesh_geodesic_distances_3.h 9ab7e1e 2022-10-20T17:21:43+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h $ +// $Id: include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,9 +21,9 @@ #include #include #include +#include #include #include -#include #include #ifdef CGAL_EIGEN3_ENABLED #include @@ -90,58 +90,56 @@ class Surface_mesh_geodesic_distances_3 Face_id_map face_id_map; public: - /*! \brief Constructor */ - Surface_mesh_geodesic_distances_3(const TriangleMesh& tm) - : vertex_id_map(get(Vertex_property_tag(),tm)), face_id_map(get(Face_property_tag(),tm)), v2v(tm), tm(tm), vpm(get(vertex_point,tm)) + Surface_mesh_geodesic_distances_3(const TriangleMesh& tm, + VertexPointMap vpm) + : vertex_id_map(get(Vertex_property_tag(), tm)), + face_id_map(get(Face_property_tag(), tm)), + v2v(tm), + tm(tm), + vpm(vpm) { build(); } - /*! \brief Constructor */ - Surface_mesh_geodesic_distances_3(const TriangleMesh& tm, VertexPointMap vpm) - : vertex_id_map(get(Vertex_property_tag(),tm)), face_id_map(get(Face_property_tag(),tm)), v2v(tm), tm(tm), vpm(vpm) + Surface_mesh_geodesic_distances_3(const TriangleMesh& tm) + : Surface_mesh_geodesic_distances_3(tm, get(vertex_point, tm)) { build(); } - /** * returns the triangle mesh the algorithm is running on. */ - const TriangleMesh& triangle_mesh() const{ + const TriangleMesh& triangle_mesh() const + { return tm; } - private: - const Matrix& mass_matrix() const { return m_mass_matrix; } - const Matrix& cotan_matrix() const { return m_cotan_matrix; } - const VertexPointMap& vertex_point_map() const { return vpm; } - const Vertex_id_map& get_vertex_id_map() const { @@ -149,7 +147,6 @@ class Surface_mesh_geodesic_distances_3 } public: - /** * adds `vd` to the source set, returning `false` iff `vd` is already in the set. */ @@ -176,7 +173,6 @@ class Surface_mesh_geodesic_distances_3 } } - /** * removes `vd` from the source set, returning `true` iff `vd` was in the set. */ @@ -188,7 +184,6 @@ class Surface_mesh_geodesic_distances_3 return (m_sources.erase(v2v(vd)) == 1); } - /** * clears the current source set. */ @@ -203,7 +198,6 @@ class Surface_mesh_geodesic_distances_3 /** * returns the set of source vertices. */ - const Vertex_const_range& sources() const { @@ -211,7 +205,6 @@ class Surface_mesh_geodesic_distances_3 } private: - double summation_of_edges() const { @@ -237,14 +230,12 @@ class Surface_mesh_geodesic_distances_3 return edge_sum; } - double time_step() const { return m_time_step; } - void update_kronecker_delta() { @@ -263,14 +254,12 @@ class Surface_mesh_geodesic_distances_3 m_kronecker.swap(K); } - const Matrix& kronecker_delta() const { return m_kronecker; } - void factor_cotan_laplace() { Matrix A, A0; @@ -293,7 +282,6 @@ class Surface_mesh_geodesic_distances_3 } } - void compute_unit_gradient() { @@ -352,7 +340,6 @@ class Surface_mesh_geodesic_distances_3 } } - void compute_divergence() { @@ -400,7 +387,6 @@ class Surface_mesh_geodesic_distances_3 indexD.swap(m_index_divergence); } - // modifies m_solved_phi void value_at_source_set(const Vector& phi) @@ -432,7 +418,6 @@ class Surface_mesh_geodesic_distances_3 m_solved_phi.swap(source_set_val); } - void factor_phi() { @@ -443,7 +428,6 @@ class Surface_mesh_geodesic_distances_3 } } - void solve_phi() { @@ -456,7 +440,6 @@ class Surface_mesh_geodesic_distances_3 value_at_source_set(phi); } - // this function returns a (number of vertices)x1 vector where // the ith index has the distance from the first vertex to the ith vertex const Vector& @@ -466,7 +449,6 @@ class Surface_mesh_geodesic_distances_3 } public: - /** * Updates the distance property map after changes in the source set. **/ @@ -494,7 +476,6 @@ class Surface_mesh_geodesic_distances_3 } private: - void build() { @@ -507,13 +488,16 @@ class Surface_mesh_geodesic_distances_3 } m_source_change_flag = false; - CGAL_precondition(is_triangle_mesh(tm)); Index i = 0; for(vertex_descriptor vd : vertices(tm)){ put(vertex_id_map, vd, i++); } Index face_i = 0; for(face_descriptor fd : faces(tm)){ + // Do not use BGL's version because `tm` is not a valid halfedge graph due to its weird vertex descriptor: + // it fails checks such as halfedge(target(h, g), g) == h + CGAL_assertion_code(halfedge_descriptor hd = halfedge(fd, tm);) + CGAL_assertion(hd == next(next(next(hd,tm),tm),tm)); put(face_id_map, fd, face_i++); } dimension = static_cast(num_vertices(tm)); @@ -710,7 +694,7 @@ struct Base_helper /** - * \ingroup PkgHeatMethod + * \ingroup PkgHeatMethodRef * * Class `Surface_mesh_geodesic_distances_3` computes estimated geodesic distances for a set of source vertices where sources can be added and removed. * The class performs a preprocessing step that only depends on the mesh, so that the distance computation takes less @@ -768,8 +752,8 @@ class Surface_mesh_geodesic_distances_3 > #endif { - CGAL_static_assertion((std::is_same::value) || - (std::is_same::value)); + static_assert(std::is_same::value || + std::is_same::value); // extract real types from Default #ifdef CGAL_EIGEN3_ENABLED @@ -784,6 +768,7 @@ class Surface_mesh_geodesic_distances_3 typedef typename Default::Get< VertexPointMap, typename boost::property_map< TriangleMesh, vertex_point_t>::const_type>::type Vertex_point_map; + typedef typename Default::Get::vertex_descriptor vertex_descriptor; #ifndef DOXYGEN_RUNNING @@ -902,7 +886,7 @@ class Surface_mesh_geodesic_distances_3 }; #if defined(DOXYGEN_RUNNING) || defined(CGAL_EIGEN3_ENABLED) -/// \ingroup PkgHeatMethod +/// \ingroup PkgHeatMethodRef /// computes for each vertex of the triangle mesh `tm` the estimated geodesic distance to a given source vertex. /// This function is provided only if \ref thirdpartyEigen "Eigen" 3.3 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined. /// \tparam TriangleMesh a triangulated surface mesh, model of `FaceListGraph` and `HalfedgeListGraph`. @@ -943,7 +927,7 @@ estimate_geodesic_distances(const TriangleMesh& tm, #endif -/// \ingroup PkgHeatMethod +/// \ingroup PkgHeatMethodRef /// computes for each vertex of the triangle mesh `tm` the estimated geodesic distance to a given set of source vertices. /// This function is provided only if \ref thirdpartyEigen "Eigen" 3.3 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined. /// \tparam TriangleMesh a triangulated surface mesh, model of `FaceListGraph` and `HalfedgeListGraph` @@ -964,9 +948,9 @@ estimate_geodesic_distances(const TriangleMesh& tm, const VertexConstRange& sources, Mode #ifndef DOXYGEN_RUNNING - , typename boost::enable_if< - typename boost::has_range_const_iterator - >::type* = 0 + , std::enable_if_t< + boost::has_range_const_iterator::value + >* = 0 #endif ) { @@ -981,9 +965,9 @@ void estimate_geodesic_distances(const TriangleMesh& tm, VertexDistanceMap vdm, const VertexConstRange& sources, - typename boost::enable_if< - typename boost::has_range_const_iterator - >::type* = 0) + std::enable_if_t< + boost::has_range_const_iterator::value + >* = 0) { CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3 hm(tm); hm.add_sources(sources); diff --git a/thirdparty/CGAL/include/CGAL/Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h b/thirdparty/CGAL/include/CGAL/Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h index 1c2ecc18..19bd277f 100644 --- a/thirdparty/CGAL/include/CGAL/Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Heat_method_3/include/CGAL/Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h $ -// $Id: Intrinsic_Delaunay_triangulation_3.h 58d759b 2022-02-04T09:44:36+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Heat_method_3/include/CGAL/Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h $ +// $Id: include/CGAL/Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -57,7 +57,6 @@ namespace internal { template bool has_degenerate_faces(const TriangleMesh& tm, const Traits& traits) { - typedef typename Traits::Point_3 Point; typedef typename Traits::Vector_3 Vector_3; typename Traits::Construct_vector_3 construct_vector = traits.construct_vector_3_object(); @@ -66,13 +65,16 @@ bool has_degenerate_faces(const TriangleMesh& tm, const Traits& traits) typename Traits::Construct_cross_product_vector_3 cross_product = traits.construct_cross_product_vector_3_object(); - typename boost::property_map< TriangleMesh, boost::vertex_point_t>::const_type - vpm = get(boost::vertex_point, tm); + typedef typename boost::property_map< TriangleMesh, boost::vertex_point_t>::const_type VPM; + typedef typename boost::property_traits::reference Point_ref; + + VPM vpm = get(boost::vertex_point, tm); + for (typename boost::graph_traits::face_descriptor f : faces(tm)) { - const Point p1 = get(vpm, target(halfedge(f, tm), tm)); - const Point p2 = get(vpm, target(next(halfedge(f, tm), tm), tm)); - const Point p3 = get(vpm, target(next(next(halfedge(f, tm), tm), tm), tm)); + const Point_ref p1 = get(vpm, target(halfedge(f, tm), tm)); + const Point_ref p2 = get(vpm, target(next(halfedge(f, tm), tm), tm)); + const Point_ref p3 = get(vpm, target(next(next(halfedge(f, tm), tm), tm), tm)); Vector_3 v = cross_product(construct_vector(p1, p2), construct_vector(p1, p3)); if(scalar_product(v, v) == 0.) return true; @@ -82,7 +84,8 @@ bool has_degenerate_faces(const TriangleMesh& tm, const Traits& traits) } template -struct Intrinsic_Delaunay_triangulation_3_vertex_descriptor { +struct Intrinsic_Delaunay_triangulation_3_vertex_descriptor +{ typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; halfedge_descriptor hd; @@ -99,6 +102,16 @@ struct Intrinsic_Delaunay_triangulation_3_vertex_descriptor { explicit Intrinsic_Delaunay_triangulation_3_vertex_descriptor(const vertex_descriptor vd, const TriangleMesh& tm) : hd(halfedge(vd,tm)) {} + + bool operator==(const Intrinsic_Delaunay_triangulation_3_vertex_descriptor& other) const + { + return hd == other.hd; + } + + bool operator!=(const Intrinsic_Delaunay_triangulation_3_vertex_descriptor& other) const + { + return ! (*this == other); + } }; template @@ -121,7 +134,7 @@ struct Intrinsic_Delaunay_triangulation_3_vertex_iterator_functor }; /** - * \ingroup PkgHeatMethod + * \ingroup PkgHeatMethodRef * * Class `Intrinsic_Delaunay_triangulation_3` is a remeshing algorithm to improve the approximation of the `Surface_mesh_geodesic_distances_3`. * It internally makes a copy of the triangle mesh, performs edge flips, and computes 2D vertex coordinates per face @@ -133,7 +146,7 @@ struct Intrinsic_Delaunay_triangulation_3_vertex_iterator_functor * \tparam TriangleMesh a triangulated surface mesh, model of `FaceListGraph` and `HalfedgeListGraph` * \tparam Traits a model of `HeatMethodTraits_3` * - * \cgalModels `FaceListGraph` + * \cgalModels{FaceListGraph} */ template & marked_edges) { - int a = 0; while(!stack.empty()) { edge_descriptor ed = stack.top(); stack.pop(); @@ -351,7 +363,6 @@ class Intrinsic_Delaunay_triangulation_3 //if the edge itself is not locally delaunay, go back if(!(is_edge_locally_delaunay(ed))) { if(!(is_border(ed,m_intrinsic_tm))) { - a++; change_edge_length(edge_i,ed); halfedge_descriptor hd = (halfedge(ed, m_intrinsic_tm)); CGAL::Euler::flip_edge(hd, m_intrinsic_tm); @@ -393,7 +404,8 @@ class Intrinsic_Delaunay_triangulation_3 void build(VertexPointMap vpm) { - CGAL_precondition(is_triangle_mesh(m_intrinsic_tm)); + CGAL_precondition(is_empty(m_intrinsic_tm)); + CGAL_precondition(is_triangle_mesh(m_input_tm)); typename Traits::Compute_squared_distance_3 squared_distance = Traits().compute_squared_distance_3_object(); @@ -549,6 +561,8 @@ struct graph_traits::vertices_size_type vertices_size_type; + static vertex_descriptor null_vertex() { return vertex_descriptor(boost::graph_traits::null_halfedge()); } + static halfedge_descriptor null_halfedge() { return boost::graph_traits::null_halfedge(); } static face_descriptor null_face() { return boost::graph_traits::null_face(); } }; @@ -589,7 +603,7 @@ template Iterator_range >::vertex_iterator> vertices(const Intrinsic_Delaunay_triangulation_3& idt) - { +{ std::pair::vertex_iterator, typename boost::graph_traits::vertex_iterator> p = vertices(idt.triangle_mesh()); @@ -597,7 +611,7 @@ vertices(const Intrinsic_Delaunay_triangulation_3& idt) Fct fct(idt.triangle_mesh()); return make_range(boost::make_transform_iterator(p.first, fct), boost::make_transform_iterator(p.second,fct)); - } +} template Iterator_range::face_iterator> faces(const Intrinsic_Delaunay_triangulation_3& idt) - { - return make_range( faces(idt.triangle_mesh()) ); - } +{ + return make_range( faces(idt.triangle_mesh()) ); +} template @@ -659,7 +673,7 @@ template typename boost::graph_traits >::halfedge_descriptor halfedge(typename boost::graph_traits >::edge_descriptor ed, - const Intrinsic_Delaunay_triangulation_3& idt) + const Intrinsic_Delaunay_triangulation_3& idt) { return halfedge(ed, idt.triangle_mesh()); } @@ -684,6 +698,23 @@ next(typename boost::graph_traits >::ha return next(hd, idt.triangle_mesh()); } +template +typename boost::graph_traits >::halfedge_descriptor +prev(typename boost::graph_traits >::halfedge_descriptor hd, + const Intrinsic_Delaunay_triangulation_3& idt) +{ + return prev(hd, idt.triangle_mesh()); +} + +template +typename boost::graph_traits >::edge_descriptor +edge(typename boost::graph_traits >::halfedge_descriptor hd, + const Intrinsic_Delaunay_triangulation_3& idt) +{ + return edge(hd, idt.triangle_mesh()); +} template @@ -766,11 +797,11 @@ struct IDT_vertex_distance_property_map { friend void put(IDT_vertex_distance_property_map idtpm, key_type vd, - value_type v) + value_type val) { typename boost::graph_traits::vertex_descriptor tm_vd = target(vd.hd, idtpm.idt.triangle_mesh()); - put(idtpm.pm, idtpm.idt.v2v.at(tm_vd), v); + put(idtpm.pm, idtpm.idt.v2v.at(tm_vd), val); } }; diff --git a/thirdparty/CGAL/include/CGAL/Heat_method_3/internal/V2V.h b/thirdparty/CGAL/include/CGAL/Heat_method_3/internal/V2V.h index 092f8989..7d857ba7 100644 --- a/thirdparty/CGAL/include/CGAL/Heat_method_3/internal/V2V.h +++ b/thirdparty/CGAL/include/CGAL/Heat_method_3/internal/V2V.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Heat_method_3/include/CGAL/Heat_method_3/internal/V2V.h $ -// $Id: V2V.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Heat_method_3/include/CGAL/Heat_method_3/internal/V2V.h $ +// $Id: include/CGAL/Heat_method_3/internal/V2V.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Hidden_point_memory_policy.h b/thirdparty/CGAL/include/CGAL/Hidden_point_memory_policy.h index 7043f630..c8d65fbe 100644 --- a/thirdparty/CGAL/include/CGAL/Hidden_point_memory_policy.h +++ b/thirdparty/CGAL/include/CGAL/Hidden_point_memory_policy.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Hidden_point_memory_policy.h $ -// $Id: Hidden_point_memory_policy.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Hidden_point_memory_policy.h $ +// $Id: include/CGAL/Hidden_point_memory_policy.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/Hilbert_policy_tags.h b/thirdparty/CGAL/include/CGAL/Hilbert_policy_tags.h index 3a78c965..a35a5e48 100644 --- a/thirdparty/CGAL/include/CGAL/Hilbert_policy_tags.h +++ b/thirdparty/CGAL/include/CGAL/Hilbert_policy_tags.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Hilbert_policy_tags.h $ -// $Id: Hilbert_policy_tags.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Hilbert_policy_tags.h $ +// $Id: include/CGAL/Hilbert_policy_tags.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/Hilbert_sort_2.h b/thirdparty/CGAL/include/CGAL/Hilbert_sort_2.h index c58261f1..2b7ed39d 100644 --- a/thirdparty/CGAL/include/CGAL/Hilbert_sort_2.h +++ b/thirdparty/CGAL/include/CGAL/Hilbert_sort_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Hilbert_sort_2.h $ -// $Id: Hilbert_sort_2.h 5c41b10 2020-01-02T10:26:44+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Hilbert_sort_2.h $ +// $Id: include/CGAL/Hilbert_sort_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/Hilbert_sort_3.h b/thirdparty/CGAL/include/CGAL/Hilbert_sort_3.h index da5a64e9..7b4e277b 100644 --- a/thirdparty/CGAL/include/CGAL/Hilbert_sort_3.h +++ b/thirdparty/CGAL/include/CGAL/Hilbert_sort_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Hilbert_sort_3.h $ -// $Id: Hilbert_sort_3.h 5c41b10 2020-01-02T10:26:44+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Hilbert_sort_3.h $ +// $Id: include/CGAL/Hilbert_sort_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/Hilbert_sort_base.h b/thirdparty/CGAL/include/CGAL/Hilbert_sort_base.h index 12d18eef..4c84db9c 100644 --- a/thirdparty/CGAL/include/CGAL/Hilbert_sort_base.h +++ b/thirdparty/CGAL/include/CGAL/Hilbert_sort_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Hilbert_sort_base.h $ -// $Id: Hilbert_sort_base.h 5c41b10 2020-01-02T10:26:44+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Hilbert_sort_base.h $ +// $Id: include/CGAL/Hilbert_sort_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Christophe Delage diff --git a/thirdparty/CGAL/include/CGAL/Hilbert_sort_d.h b/thirdparty/CGAL/include/CGAL/Hilbert_sort_d.h index 23424619..f3713ac4 100644 --- a/thirdparty/CGAL/include/CGAL/Hilbert_sort_d.h +++ b/thirdparty/CGAL/include/CGAL/Hilbert_sort_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Hilbert_sort_d.h $ -// $Id: Hilbert_sort_d.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Hilbert_sort_d.h $ +// $Id: include/CGAL/Hilbert_sort_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/Hilbert_sort_median_2.h b/thirdparty/CGAL/include/CGAL/Hilbert_sort_median_2.h index 6d7efe59..ae0703be 100644 --- a/thirdparty/CGAL/include/CGAL/Hilbert_sort_median_2.h +++ b/thirdparty/CGAL/include/CGAL/Hilbert_sort_median_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h $ -// $Id: Hilbert_sort_median_2.h f60dfa8 2022-04-04T10:00:16+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h $ +// $Id: include/CGAL/Hilbert_sort_median_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Christophe Delage @@ -17,8 +17,6 @@ #include #include -#include - #ifdef CGAL_LINKED_WITH_TBB #include #endif @@ -157,8 +155,8 @@ class Hilbert_sort_median_2 #ifndef CGAL_LINKED_WITH_TBB CGAL_USE(begin); CGAL_USE(end); - CGAL_static_assertion_msg (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #else const int y = (x + 1) % 2; if (std::distance(begin,end) <= _limit) diff --git a/thirdparty/CGAL/include/CGAL/Hilbert_sort_median_3.h b/thirdparty/CGAL/include/CGAL/Hilbert_sort_median_3.h index bf622b1a..1bc53c93 100644 --- a/thirdparty/CGAL/include/CGAL/Hilbert_sort_median_3.h +++ b/thirdparty/CGAL/include/CGAL/Hilbert_sort_median_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h $ -// $Id: Hilbert_sort_median_3.h f60dfa8 2022-04-04T10:00:16+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h $ +// $Id: include/CGAL/Hilbert_sort_median_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Christophe Delage @@ -18,8 +18,6 @@ #include #include -#include - #ifdef CGAL_LINKED_WITH_TBB #include #endif @@ -180,8 +178,8 @@ class CGAL_VISIBILITY_MACRO Hilbert_sort_median_3 #ifndef CGAL_LINKED_WITH_TBB CGAL_USE(begin); CGAL_USE(end); - CGAL_static_assertion_msg (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #else const int y = (x + 1) % 3, z = (x + 2) % 3; if ((end - begin) <= _limit) return; diff --git a/thirdparty/CGAL/include/CGAL/Hilbert_sort_median_d.h b/thirdparty/CGAL/include/CGAL/Hilbert_sort_median_d.h index be63e17b..08937acc 100644 --- a/thirdparty/CGAL/include/CGAL/Hilbert_sort_median_d.h +++ b/thirdparty/CGAL/include/CGAL/Hilbert_sort_median_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Hilbert_sort_median_d.h $ -// $Id: Hilbert_sort_median_d.h f60dfa8 2022-04-04T10:00:16+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Hilbert_sort_median_d.h $ +// $Id: include/CGAL/Hilbert_sort_median_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_2.h b/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_2.h index e293cc2f..06f6007e 100644 --- a/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_2.h +++ b/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Hilbert_sort_middle_2.h $ -// $Id: Hilbert_sort_middle_2.h 9144020 2022-04-12T16:35:01+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Hilbert_sort_middle_2.h $ +// $Id: include/CGAL/Hilbert_sort_middle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_3.h b/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_3.h index b8c1d3fb..a91f3c5d 100644 --- a/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_3.h +++ b/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Hilbert_sort_middle_3.h $ -// $Id: Hilbert_sort_middle_3.h f60dfa8 2022-04-04T10:00:16+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Hilbert_sort_middle_3.h $ +// $Id: include/CGAL/Hilbert_sort_middle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_base.h b/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_base.h index 61129891..c4b1763e 100644 --- a/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_base.h +++ b/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Hilbert_sort_middle_base.h $ -// $Id: Hilbert_sort_middle_base.h 5c41b10 2020-01-02T10:26:44+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Hilbert_sort_middle_base.h $ +// $Id: include/CGAL/Hilbert_sort_middle_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_d.h b/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_d.h index 7bdb50ab..7024c7c4 100644 --- a/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_d.h +++ b/thirdparty/CGAL/include/CGAL/Hilbert_sort_middle_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Hilbert_sort_middle_d.h $ -// $Id: Hilbert_sort_middle_d.h f60dfa8 2022-04-04T10:00:16+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Hilbert_sort_middle_d.h $ +// $Id: include/CGAL/Hilbert_sort_middle_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/Hilbert_sort_on_sphere_3.h b/thirdparty/CGAL/include/CGAL/Hilbert_sort_on_sphere_3.h index 0075b062..41bf42c8 100644 --- a/thirdparty/CGAL/include/CGAL/Hilbert_sort_on_sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Hilbert_sort_on_sphere_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Hilbert_sort_on_sphere_3.h $ -// $Id: Hilbert_sort_on_sphere_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Hilbert_sort_on_sphere_3.h $ +// $Id: include/CGAL/Hilbert_sort_on_sphere_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous.h b/thirdparty/CGAL/include/CGAL/Homogeneous.h index 5183fc65..a825687e 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous.h $ -// $Id: Homogeneous.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous.h $ +// $Id: include/CGAL/Homogeneous.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/Aff_transformationH2.h b/thirdparty/CGAL/include/CGAL/Homogeneous/Aff_transformationH2.h index 1d82d914..7f2dee7a 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/Aff_transformationH2.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/Aff_transformationH2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/Aff_transformationH2.h $ -// $Id: Aff_transformationH2.h d370326 2021-10-27T14:45:10+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/Aff_transformationH2.h $ +// $Id: include/CGAL/Homogeneous/Aff_transformationH2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/Aff_transformationH3.h b/thirdparty/CGAL/include/CGAL/Homogeneous/Aff_transformationH3.h index a7544f2e..4341b14b 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/Aff_transformationH3.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/Aff_transformationH3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/Aff_transformationH3.h $ -// $Id: Aff_transformationH3.h d370326 2021-10-27T14:45:10+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/Aff_transformationH3.h $ +// $Id: include/CGAL/Homogeneous/Aff_transformationH3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/CircleH2.h b/thirdparty/CGAL/include/CGAL/Homogeneous/CircleH2.h index 213077e2..273eb4d9 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/CircleH2.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/CircleH2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/CircleH2.h $ -// $Id: CircleH2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/CircleH2.h $ +// $Id: include/CGAL/Homogeneous/CircleH2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sven Schoenherr diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/ConicHPA2.h b/thirdparty/CGAL/include/CGAL/Homogeneous/ConicHPA2.h index 8c49f7df..cc63e94d 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/ConicHPA2.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/ConicHPA2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/ConicHPA2.h $ -// $Id: ConicHPA2.h 29b2957 2020-04-06T21:46:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/ConicHPA2.h $ +// $Id: include/CGAL/Homogeneous/ConicHPA2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/Data_accessorH2.h b/thirdparty/CGAL/include/CGAL/Homogeneous/Data_accessorH2.h index 7e20d8c0..58a81b07 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/Data_accessorH2.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/Data_accessorH2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/Data_accessorH2.h $ -// $Id: Data_accessorH2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/Data_accessorH2.h $ +// $Id: include/CGAL/Homogeneous/Data_accessorH2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/DirectionH2.h b/thirdparty/CGAL/include/CGAL/Homogeneous/DirectionH2.h index f0ab6309..aca95c82 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/DirectionH2.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/DirectionH2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH2.h $ -// $Id: DirectionH2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH2.h $ +// $Id: include/CGAL/Homogeneous/DirectionH2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/DirectionH3.h b/thirdparty/CGAL/include/CGAL/Homogeneous/DirectionH3.h index f78e8d4c..61ca8996 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/DirectionH3.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/DirectionH3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH3.h $ -// $Id: DirectionH3.h d39c774 2022-03-17T12:14:43+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH3.h $ +// $Id: include/CGAL/Homogeneous/DirectionH3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/Homogeneous_base.h b/thirdparty/CGAL/include/CGAL/Homogeneous/Homogeneous_base.h index 2cf2c1eb..48cd82d2 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/Homogeneous_base.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/Homogeneous_base.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/Homogeneous_base.h $ -// $Id: Homogeneous_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/Homogeneous_base.h $ +// $Id: include/CGAL/Homogeneous/Homogeneous_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/Iso_cuboidH3.h b/thirdparty/CGAL/include/CGAL/Homogeneous/Iso_cuboidH3.h index 88febfc8..376808a7 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/Iso_cuboidH3.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/Iso_cuboidH3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_cuboidH3.h $ -// $Id: Iso_cuboidH3.h 22f5d89 2021-06-25T20:15:56+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_cuboidH3.h $ +// $Id: include/CGAL/Homogeneous/Iso_cuboidH3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/Iso_rectangleH2.h b/thirdparty/CGAL/include/CGAL/Homogeneous/Iso_rectangleH2.h index 352daa95..c1244438 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/Iso_rectangleH2.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/Iso_rectangleH2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_rectangleH2.h $ -// $Id: Iso_rectangleH2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_rectangleH2.h $ +// $Id: include/CGAL/Homogeneous/Iso_rectangleH2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/LineH2.h b/thirdparty/CGAL/include/CGAL/Homogeneous/LineH2.h index dc75cecb..cf44cab9 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/LineH2.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/LineH2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/LineH2.h $ -// $Id: LineH2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/LineH2.h $ +// $Id: include/CGAL/Homogeneous/LineH2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/PlaneH3.h b/thirdparty/CGAL/include/CGAL/Homogeneous/PlaneH3.h index bf447b54..5be2fa22 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/PlaneH3.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/PlaneH3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/PlaneH3.h $ -// $Id: PlaneH3.h 71bba3e 2022-03-17T22:35:09+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/PlaneH3.h $ +// $Id: include/CGAL/Homogeneous/PlaneH3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -48,6 +48,7 @@ class PlaneH3 PlaneH3() {} PlaneH3(const Point_3&, const Point_3&, const Point_3& ); + PlaneH3(Origin, const Point_3&, const Point_3& ); PlaneH3(const RT& a, const RT& b, const RT& c, const RT& d ); PlaneH3(const Point_3&, const Ray_3& ); @@ -175,6 +176,16 @@ PlaneH3::PlaneH3(const typename PlaneH3::Point_3& p, const typename PlaneH3::Point_3& r) { new_rep(p,q,r); } +template < class R > +CGAL_KERNEL_INLINE +PlaneH3::PlaneH3(Origin, + const typename PlaneH3::Point_3& q, + const typename PlaneH3::Point_3& r) +{ + typename PlaneH3::Point_3 p(0,0,0); + new_rep(p,q,r); +} + template < class R > CGAL_KERNEL_INLINE PlaneH3::PlaneH3(const RT& a, const RT& b, @@ -190,37 +201,37 @@ PlaneH3::PlaneH3(const typename PlaneH3::Point_3& p , template < class R > CGAL_KERNEL_INLINE PlaneH3::PlaneH3(const typename PlaneH3::Point_3& p, - const typename PlaneH3::Segment_3& s) + const typename PlaneH3::Segment_3& s) { new_rep(p, s.source(), s.target() ); } template < class R > CGAL_KERNEL_INLINE PlaneH3::PlaneH3(const typename PlaneH3::Point_3& p , - const typename PlaneH3::Ray_3& r) + const typename PlaneH3::Ray_3& r) { new_rep(p, r.start(), r.start() + r.direction().to_vector() ); } template < class R > CGAL_KERNEL_INLINE PlaneH3::PlaneH3(const typename PlaneH3::Line_3& l , - const typename PlaneH3::Point_3& p) + const typename PlaneH3::Point_3& p) { new_rep(l.point(0), p, l.point(1) ); } template < class R > CGAL_KERNEL_INLINE PlaneH3::PlaneH3(const typename PlaneH3::Segment_3& s, - const typename PlaneH3::Point_3& p) + const typename PlaneH3::Point_3& p) { new_rep(s.source(), p, s.target() ); } template < class R > CGAL_KERNEL_INLINE PlaneH3::PlaneH3(const typename PlaneH3::Ray_3& r, - const typename PlaneH3::Point_3& p) + const typename PlaneH3::Point_3& p) { new_rep(r.start(), p, r.start() + r.direction().to_vector() ); } template < class R > CGAL_KERNEL_INLINE PlaneH3::PlaneH3(const typename PlaneH3::Point_3& p, - const typename PlaneH3::Direction_3& d) + const typename PlaneH3::Direction_3& d) { Vector_3 ov = d.to_vector(); new_rep( ov.hx()*p.hw(), @@ -232,7 +243,7 @@ PlaneH3::PlaneH3(const typename PlaneH3::Point_3& p, template < class R > CGAL_KERNEL_INLINE PlaneH3::PlaneH3(const typename PlaneH3::Point_3& p, - const typename PlaneH3::Vector_3& ov) + const typename PlaneH3::Vector_3& ov) { new_rep( ov.hx()*p.hw(), ov.hy()*p.hw(), @@ -254,8 +265,8 @@ PlaneH3::PlaneH3(Origin, template < class R > CGAL_KERNEL_INLINE PlaneH3::PlaneH3(const typename PlaneH3::Point_3& p, - const typename PlaneH3::Direction_3& d1, - const typename PlaneH3::Direction_3& d2) + const typename PlaneH3::Direction_3& d1, + const typename PlaneH3::Direction_3& d2) { new_rep( p, p + d1.to_vector(), p + d2.to_vector() ); } template < class R > diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/PointH2.h b/thirdparty/CGAL/include/CGAL/Homogeneous/PointH2.h index 4e5d9462..42548772 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/PointH2.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/PointH2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/PointH2.h $ -// $Id: PointH2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/PointH2.h $ +// $Id: include/CGAL/Homogeneous/PointH2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,11 +18,11 @@ #define CGAL_HOMOGENEOUS_POINT_2_H #include -#include -#include #include #include +#include + namespace CGAL { template < class R_ > @@ -53,8 +53,8 @@ class PointH2 template < typename Tx, typename Ty > PointH2(const Tx & x, const Ty & y, - typename boost::enable_if< boost::mpl::and_, - boost::is_convertible > >::type* = 0) + std::enable_if_t< std::is_convertible_v && + std::is_convertible_v >* = 0) : base(x, y) {} PointH2(const FT& x, const FT& y) diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/PointH3.h b/thirdparty/CGAL/include/CGAL/Homogeneous/PointH3.h index 14f563d0..6de9131e 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/PointH3.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/PointH3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/PointH3.h $ -// $Id: PointH3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/PointH3.h $ +// $Id: include/CGAL/Homogeneous/PointH3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,10 +18,11 @@ #define CGAL_HOMOGENEOUS_POINT_3_H #include -#include #include #include +#include + namespace CGAL { template < class R_ > @@ -51,9 +52,9 @@ class PointH3 template < typename Tx, typename Ty, typename Tz > PointH3(const Tx & x, const Ty & y, const Tz & z, - typename boost::enable_if< boost::mpl::and_< boost::mpl::and_< boost::is_convertible, - boost::is_convertible >, - boost::is_convertible > >::type* = 0) + std::enable_if_t && + std::is_convertible_v && + std::is_convertible_v>* = 0) : base(x, y, z) {} PointH3(const FT& x, const FT& y, const FT& z) diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/RayH3.h b/thirdparty/CGAL/include/CGAL/Homogeneous/RayH3.h index 2d73644f..7e78e673 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/RayH3.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/RayH3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/RayH3.h $ -// $Id: RayH3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/RayH3.h $ +// $Id: include/CGAL/Homogeneous/RayH3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/SphereH3.h b/thirdparty/CGAL/include/CGAL/Homogeneous/SphereH3.h index dabb2a37..1d44a446 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/SphereH3.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/SphereH3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/SphereH3.h $ -// $Id: SphereH3.h 3640099 2021-09-28T15:36:51+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/SphereH3.h $ +// $Id: include/CGAL/Homogeneous/SphereH3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/VectorH2.h b/thirdparty/CGAL/include/CGAL/Homogeneous/VectorH2.h index 9e70a2b5..7ab1e3e8 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/VectorH2.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/VectorH2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH2.h $ -// $Id: VectorH2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH2.h $ +// $Id: include/CGAL/Homogeneous/VectorH2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,8 +23,6 @@ #include #include -#include - namespace CGAL { template < class R_ > @@ -59,8 +57,8 @@ class VectorH2 template < typename Tx, typename Ty > VectorH2(const Tx & x, const Ty & y, - typename boost::enable_if< boost::mpl::and_, - boost::is_convertible > >::type* = 0) + std::enable_if_t && + std::is_convertible_v>* = 0) : base(CGAL::make_array(x, y, RT(1))) {} VectorH2(const FT& x, const FT& y) @@ -101,12 +99,12 @@ class VectorH2 Cartesian_const_iterator cartesian_begin() const { return make_cartesian_const_iterator_begin(CGAL::get_pointee_or_identity(base).begin(), - boost::prior(CGAL::get_pointee_or_identity(base).end())); + std::prev(CGAL::get_pointee_or_identity(base).end())); } Cartesian_const_iterator cartesian_end() const { - return make_cartesian_const_iterator_end(boost::prior(CGAL::get_pointee_or_identity(base).end())); + return make_cartesian_const_iterator_end(std::prev(CGAL::get_pointee_or_identity(base).end())); } int dimension() const; diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/VectorH3.h b/thirdparty/CGAL/include/CGAL/Homogeneous/VectorH3.h index b0e2e4e1..fd43a7f1 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/VectorH3.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/VectorH3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH3.h $ -// $Id: VectorH3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/VectorH3.h $ +// $Id: include/CGAL/Homogeneous/VectorH3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,8 +21,6 @@ #include #include -#include - namespace CGAL { template < class R_ > @@ -69,9 +67,9 @@ class VectorH3 template < typename Tx, typename Ty, typename Tz > VectorH3(const Tx & x, const Ty & y, const Tz & z, - typename boost::enable_if< boost::mpl::and_< boost::mpl::and_< boost::is_convertible, - boost::is_convertible >, - boost::is_convertible > >::type* = 0) + std::enable_if_t< std::is_convertible_v && + std::is_convertible_v && + std::is_convertible_v>* = 0) : base(CGAL::make_array(x, y, z, RT(1))) {} VectorH3(const FT& x, const FT& y, const FT& z) @@ -117,12 +115,12 @@ class VectorH3 Cartesian_const_iterator cartesian_begin() const { return make_cartesian_const_iterator_begin(get_pointee_or_identity(base).begin(), - boost::prior(get_pointee_or_identity(base).end())); + std::prev(get_pointee_or_identity(base).end())); } Cartesian_const_iterator cartesian_end() const { - return make_cartesian_const_iterator_end(boost::prior(get_pointee_or_identity(base).end())); + return make_cartesian_const_iterator_end(std::prev(get_pointee_or_identity(base).end())); } int dimension() const { return 3; }; diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/Weighted_point_2.h b/thirdparty/CGAL/include/CGAL/Homogeneous/Weighted_point_2.h index 7309b9d1..ed575e96 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/Weighted_point_2.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/Weighted_point_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/Weighted_point_2.h $ -// $Id: Weighted_point_2.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/Weighted_point_2.h $ +// $Id: include/CGAL/Homogeneous/Weighted_point_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mariette Yvinec diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/Weighted_point_3.h b/thirdparty/CGAL/include/CGAL/Homogeneous/Weighted_point_3.h index 62aada3c..5c319be9 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/Weighted_point_3.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/Weighted_point_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/Weighted_point_3.h $ -// $Id: Weighted_point_3.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/Weighted_point_3.h $ +// $Id: include/CGAL/Homogeneous/Weighted_point_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mariette Yvinec diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/basic_constructionsH2.h b/thirdparty/CGAL/include/CGAL/Homogeneous/basic_constructionsH2.h index 7dc5788e..91f4b8b0 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/basic_constructionsH2.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/basic_constructionsH2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/basic_constructionsH2.h $ -// $Id: basic_constructionsH2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/basic_constructionsH2.h $ +// $Id: include/CGAL/Homogeneous/basic_constructionsH2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/basic_constructionsH3.h b/thirdparty/CGAL/include/CGAL/Homogeneous/basic_constructionsH3.h index 132733d6..d5b1ac08 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/basic_constructionsH3.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/basic_constructionsH3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/basic_constructionsH3.h $ -// $Id: basic_constructionsH3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/basic_constructionsH3.h $ +// $Id: include/CGAL/Homogeneous/basic_constructionsH3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/distance_predicatesH2.h b/thirdparty/CGAL/include/CGAL/Homogeneous/distance_predicatesH2.h index 4759a19f..ae71cea0 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/distance_predicatesH2.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/distance_predicatesH2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/distance_predicatesH2.h $ -// $Id: distance_predicatesH2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/distance_predicatesH2.h $ +// $Id: include/CGAL/Homogeneous/distance_predicatesH2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/distance_predicatesH3.h b/thirdparty/CGAL/include/CGAL/Homogeneous/distance_predicatesH3.h index ce66a008..f77e4cb4 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/distance_predicatesH3.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/distance_predicatesH3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/distance_predicatesH3.h $ -// $Id: distance_predicatesH3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/distance_predicatesH3.h $ +// $Id: include/CGAL/Homogeneous/distance_predicatesH3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/function_objects.h b/thirdparty/CGAL/include/CGAL/Homogeneous/function_objects.h index 6e5ec474..39dfa47a 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/function_objects.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/function_objects.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h $ -// $Id: function_objects.h d39c774 2022-03-17T12:14:43+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h $ +// $Id: include/CGAL/Homogeneous/function_objects.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -30,7 +30,7 @@ namespace HomogeneousKernelFunctors { using namespace CommonKernelFunctors; - // For lazyness... + // For laziness... using CartesianKernelFunctors::Are_parallel_2; using CartesianKernelFunctors::Are_parallel_3; using CartesianKernelFunctors::Compute_squared_area_3; diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/predicates_on_directionsH2.h b/thirdparty/CGAL/include/CGAL/Homogeneous/predicates_on_directionsH2.h index 00356d9a..1a294dc8 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/predicates_on_directionsH2.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/predicates_on_directionsH2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/predicates_on_directionsH2.h $ -// $Id: predicates_on_directionsH2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/predicates_on_directionsH2.h $ +// $Id: include/CGAL/Homogeneous/predicates_on_directionsH2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/predicates_on_pointsH2.h b/thirdparty/CGAL/include/CGAL/Homogeneous/predicates_on_pointsH2.h index 5aae91c8..b2043263 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/predicates_on_pointsH2.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/predicates_on_pointsH2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/predicates_on_pointsH2.h $ -// $Id: predicates_on_pointsH2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/predicates_on_pointsH2.h $ +// $Id: include/CGAL/Homogeneous/predicates_on_pointsH2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous/predicates_on_pointsH3.h b/thirdparty/CGAL/include/CGAL/Homogeneous/predicates_on_pointsH3.h index d32fb045..8d97d07c 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous/predicates_on_pointsH3.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous/predicates_on_pointsH3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous/predicates_on_pointsH3.h $ -// $Id: predicates_on_pointsH3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous/predicates_on_pointsH3.h $ +// $Id: include/CGAL/Homogeneous/predicates_on_pointsH3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous_converter.h b/thirdparty/CGAL/include/CGAL/Homogeneous_converter.h index d8fdca8f..87aa14ec 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous_converter.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous_converter.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Homogeneous_converter.h $ -// $Id: Homogeneous_converter.h 3a0a4a6 2021-12-17T12:22:40+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Homogeneous_converter.h $ +// $Id: include/CGAL/Homogeneous_converter.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -89,7 +89,7 @@ class Homogeneous_converter : public Enum_converter template T operator()(const T t, - typename std::enable_if::value>::type* = nullptr) const + std::enable_if_t::value>* = nullptr) const { return t; } diff --git a/thirdparty/CGAL/include/CGAL/Homogeneous_d.h b/thirdparty/CGAL/include/CGAL/Homogeneous_d.h index 61e2656d..eee92145 100644 --- a/thirdparty/CGAL/include/CGAL/Homogeneous_d.h +++ b/thirdparty/CGAL/include/CGAL/Homogeneous_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Homogeneous_d.h $ -// $Id: Homogeneous_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Homogeneous_d.h $ +// $Id: include/CGAL/Homogeneous_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -67,6 +67,24 @@ class Homogeneous_d typedef typename Point_d_base::Cartesian_const_iterator Cartesian_const_iterator_d; + // Boolean had originally been Bool. It was renamed to avoid a conflict + // between a macro defined in Xlib.h poorly chosen to have the same name, + // that is 'Bool'. + typedef typename Same_uncertainty_nt::type + Boolean; + typedef typename Same_uncertainty_nt::type + Sign; + typedef typename Same_uncertainty_nt::type + Comparison_result; + typedef typename Same_uncertainty_nt::type + Orientation; + typedef typename Same_uncertainty_nt::type + Oriented_side; + typedef typename Same_uncertainty_nt::type + Bounded_side; + typedef typename Same_uncertainty_nt::type + Angle; + typedef Dynamic_dimension_tag Dimension; template diff --git a/thirdparty/CGAL/include/CGAL/Hyperbola_2.h b/thirdparty/CGAL/include/CGAL/Hyperbola_2.h index 267ea4a0..ece03d6c 100644 --- a/thirdparty/CGAL/include/CGAL/Hyperbola_2.h +++ b/thirdparty/CGAL/include/CGAL/Hyperbola_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Hyperbola_2.h $ -// $Id: Hyperbola_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Hyperbola_2.h $ +// $Id: include/CGAL/Hyperbola_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Hyperbola_ray_2.h b/thirdparty/CGAL/include/CGAL/Hyperbola_ray_2.h index 549d790e..58b4f5ec 100644 --- a/thirdparty/CGAL/include/CGAL/Hyperbola_ray_2.h +++ b/thirdparty/CGAL/include/CGAL/Hyperbola_ray_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Hyperbola_ray_2.h $ -// $Id: Hyperbola_ray_2.h 45b73ad 2021-05-12T15:45:07+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Hyperbola_ray_2.h $ +// $Id: include/CGAL/Hyperbola_ray_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Hyperbola_segment_2.h b/thirdparty/CGAL/include/CGAL/Hyperbola_segment_2.h index 189d32d8..d7602509 100644 --- a/thirdparty/CGAL/include/CGAL/Hyperbola_segment_2.h +++ b/thirdparty/CGAL/include/CGAL/Hyperbola_segment_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Hyperbola_segment_2.h $ -// $Id: Hyperbola_segment_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Hyperbola_segment_2.h $ +// $Id: include/CGAL/Hyperbola_segment_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h b/thirdparty/CGAL/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h index e003ca26..4dc97149 100644 --- a/thirdparty/CGAL/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h $ -// $Id: Hyperbolic_Delaunay_triangulation_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h $ +// $Id: include/CGAL/Hyperbolic_Delaunay_triangulation_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mikhail Bogdanov @@ -18,8 +18,10 @@ #include #include +#include #include #include +#include namespace CGAL { @@ -77,7 +79,7 @@ class Hyperbolic_Delaunay_triangulation_2 Hyperbolic_Delaunay_triangulation_2(const Hyperbolic_Delaunay_triangulation_2 &tr) : Delaunay_triangulation_2(tr), _gt() { - CGAL_triangulation_postcondition(this->is_valid()); + CGAL_postcondition(this->is_valid()); } template @@ -86,8 +88,6 @@ class Hyperbolic_Delaunay_triangulation_2 : Delaunay_triangulation_2(gt), _gt(gt) { insert(first, last); - for(All_vertices_iterator vit=all_vertices_begin(); vit!=all_vertices_end(); ++vit) - ensure_hyperbolic_face_handle(vit); } /************************************* @@ -107,8 +107,7 @@ class Hyperbolic_Delaunay_triangulation_2 bool operator()(const typename Base::All_faces_iterator & fit) const { return !t->is_Delaunay_hyperbolic(fit); } bool operator()(const typename Base::All_edges_iterator & eit) const { - Edge e(eit->first, eit->second); - return !t->is_Delaunay_hyperbolic(e); + return !t->is_Delaunay_hyperbolic(eit->first, eit->second); } }; @@ -194,10 +193,10 @@ class Hyperbolic_Delaunay_triangulation_2 do { _ri = cw(_iv); - if (_tri.is_finite_non_hyperbolic(pos, ccw(_iv))) + if (!_tri.is_Delaunay_hyperbolic(pos, ccw(_iv))) { _ri = ccw(_iv); - if (_tri.is_finite_non_hyperbolic(pos, cw(_iv))) + if (!_tri.is_Delaunay_hyperbolic(pos, cw(_iv))) { pos = pos->neighbor(cw(_iv)); _iv = pos->index(_v); @@ -223,10 +222,10 @@ class Hyperbolic_Delaunay_triangulation_2 do { _ri = cw(_iv); - if (_tri.is_finite_non_hyperbolic(pos, ccw(_iv))) + if (!_tri.is_Delaunay_hyperbolic(pos, ccw(_iv))) { _ri = ccw(_iv); - if (_tri.is_finite_non_hyperbolic(pos, cw(_iv))) + if (!_tri.is_Delaunay_hyperbolic(pos, cw(_iv))) { pos = pos->neighbor(cw(_iv)); _iv = pos->index(_v); @@ -254,10 +253,10 @@ class Hyperbolic_Delaunay_triangulation_2 do { _ri = ccw(_iv); - if (_tri.is_finite_non_hyperbolic(pos, cw(_iv))) + if (!_tri.is_Delaunay_hyperbolic(pos, cw(_iv))) { _ri = cw(_iv); - if (_tri.is_finite_non_hyperbolic(pos, ccw(_iv))) + if (!_tri.is_Delaunay_hyperbolic(pos, ccw(_iv))) { pos = pos->neighbor(ccw(_iv)); _iv = pos->index(_v); @@ -291,13 +290,13 @@ class Hyperbolic_Delaunay_triangulation_2 Vertex& operator*() const { - CGAL_triangulation_precondition(pos != Face_handle() && _v != Vertex_handle()); + CGAL_precondition(pos != Face_handle() && _v != Vertex_handle()); return *(pos->vertex(_ri)); } Vertex* operator->() const { - CGAL_triangulation_precondition(pos != Face_handle() && _v != Vertex_handle()); + CGAL_precondition(pos != Face_handle() && _v != Vertex_handle()); return &*(pos->vertex(_ri)); } @@ -309,10 +308,9 @@ class Hyperbolic_Delaunay_triangulation_2 }; private: - Geom_traits _gt; + Geom_traits _gt; public: - Tds& tds() { return Base::tds(); @@ -345,17 +343,14 @@ class Hyperbolic_Delaunay_triangulation_2 tr.mark_finite_non_hyperbolic_faces(); } - Self& operator=(const Self &tr) { - Self newone = Self(tr); this->swap(newone); return *this; } - bool operator==(const Self& tr ) { if (tr.number_of_vertices() != this->number_of_vertices()) @@ -401,12 +396,6 @@ class Hyperbolic_Delaunay_triangulation_2 void clear() { Base::clear(); } - void mark_star(Vertex_handle v) const - { - if(!is_star_bounded(v)) - mark_star_faces(v); - } - template OutputItFaces find_conflicts(const Point& p, OutputItFaces fit, Face_handle start = Face_handle()) const { @@ -417,18 +406,22 @@ class Hyperbolic_Delaunay_triangulation_2 Face_handle start = Face_handle()) { Vertex_handle v = Base::insert(p, start); - mark_star(v); + mark_star_faces(v); ensure_hyperbolic_face_handle(v); return v; } + // Note that this is _Base::Locate_type_ and not Locate_type. + // Do _not_ use this function with the result of a call to HDT2::locate(), which is a locate + // on the hyperbolic triangulation, and not the underlying Delaunay triangulation (in which + // new points are inserted, and thus it needs to be DT2::locate_type). Vertex_handle insert(const Point& p, typename Base::Locate_type lt, Face_handle loc, int li) { Vertex_handle v = Base::insert(p, lt, loc, li); - mark_star(v); + mark_star_faces(v); ensure_hyperbolic_face_handle(v); return v; @@ -437,9 +430,9 @@ class Hyperbolic_Delaunay_triangulation_2 #ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_base_of::value_type> - >::type* = nullptr) + std::enable_if_t< + std::is_base_of::value_type>::value + >* = nullptr) #else template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last) @@ -454,11 +447,9 @@ class Hyperbolic_Delaunay_triangulation_2 return n; } - - void remove(Vertex_handle v) { - CGAL_triangulation_precondition(tds().is_vertex(v)); + CGAL_precondition(tds().is_vertex(v)); std::vector nbr; bool dim_was_2 = false; if (this->dimension() == 2) @@ -483,7 +474,6 @@ class Hyperbolic_Delaunay_triangulation_2 } } - template void remove(VertexRemoveIterator first, VertexRemoveIterator last) { @@ -493,22 +483,37 @@ class Hyperbolic_Delaunay_triangulation_2 } } - - - /* - Needed by DT_2: do not document! - */ template bool is_infinite(T v) const { return Base::is_infinite(v); } + bool is_infinite(Face_handle f, int i) const { return Base::is_infinite(f, i); } bool is_Delaunay_hyperbolic(Face_handle f) const { - return !Base::is_infinite(f) && !is_finite_non_hyperbolic(f); + if(dimension() <= 1) + return false; + + return f->hyperbolic_data().is_Delaunay_hyperbolic(); } bool is_Delaunay_hyperbolic(Face_handle f, int i) const { - return !Base::is_infinite(f, i) && !is_finite_non_hyperbolic(f, i); + if(dimension() <= 1) + return false; + + if(is_infinite(f, i)) + return false; + + if(f->hyperbolic_data().is_Delaunay_non_hyperbolic(i)) + return false; + + // another incident face and corresponding index + Face_handle f2 = f->neighbor(i); + int i2 = f2->index(f); + + if(f2->hyperbolic_data().is_Delaunay_non_hyperbolic(i2)) + return false; + + return true; } bool is_Delaunay_hyperbolic(const Edge& e) const @@ -527,68 +532,37 @@ class Hyperbolic_Delaunay_triangulation_2 } private: - class Face_data - { - private: - // a finite face is non_hyperbolic if its circumscribing circle intersects the circle at infinity - bool _is_Delaunay_hyperbolic; - - // defined only if the face is finite and non_hyperbolic - unsigned int _non_hyperbolic_edge; - - public: - Face_data() : _is_Delaunay_hyperbolic(true), _non_hyperbolic_edge(UCHAR_MAX) {} - - unsigned int get_non_hyperbolic_edge() const - { - CGAL_triangulation_precondition(!_is_Delaunay_hyperbolic); - CGAL_triangulation_precondition(_non_hyperbolic_edge <= 2); - - return _non_hyperbolic_edge; - } - - void set_non_hyperbolic_edge(unsigned int uschar) - { - CGAL_triangulation_precondition(!_is_Delaunay_hyperbolic); - CGAL_triangulation_precondition(uschar <= 2); - - _non_hyperbolic_edge = uschar; - } - - bool get_is_Delaunay_hyperbolic() const { return _is_Delaunay_hyperbolic; } - void set_is_Delaunay_hyperbolic(bool flag) { _is_Delaunay_hyperbolic = flag; } - }; - /* During the insertion of a new point in the triangulation, the added vertex points to a face. - This function ensures that the face to which the vertex points is hyperbolic. + This function ensures that the face to which the vertex points is hyperbolic (if there exists one). */ void ensure_hyperbolic_face_handle(Vertex_handle v) { - if(dimension() > 2) + if(dimension() <= 1) + return; + + Face_circulator fc = this->incident_faces(v), done(fc); + if(fc != 0) { - Face_circulator fc = this->incident_faces(v), done(fc); - if(fc != 0) + do { - do + if(is_Delaunay_hyperbolic(fc)) { - if(is_Delaunay_hyperbolic(fc)) - { - v->set_face(fc); - break; - } + v->set_face(fc); + break; } - while(++fc != done); } - CGAL_triangulation_postcondition(is_Delaunay_hyperbolic(v->face())); + while(++fc != done); } } Oriented_side side_of_hyperbolic_triangle(const Point& p, const Point& q, const Point& r, const Point& query, Locate_type <, int& li) const { + // The triangle (p,q,r) must be Delaunay hyperbolic - CGAL_triangulation_precondition(geom_traits().is_Delaunay_hyperbolic_2_object()(p, q, r)); + CGAL_precondition(geom_traits().is_Delaunay_hyperbolic_2_object()(p, q, r)); + CGAL_precondition(query != p && query != q && query != r); // Point p is assumed to be at index 0, q at index 1 and r at index 2 in the face. li = -1; @@ -644,186 +618,107 @@ class Hyperbolic_Delaunay_triangulation_2 // Cannot be on the boundary here. lt = FACE; + li = 4; + if(cs1 != cp1 || cs2 != cp2 || cs3 != cp3) return ON_NEGATIVE_SIDE; else return ON_POSITIVE_SIDE; } - int get_finite_non_hyperbolic_edge(Face_handle f) const - { - CGAL_triangulation_precondition(is_finite_non_hyperbolic(f)); - Face_data fd = object_cast(f->tds_data()); - return fd.get_non_hyperbolic_edge(); - } - - bool is_finite_non_hyperbolic(Face_handle f) const - { - if(const Face_data* td = object_cast(&f->tds_data())) - { - return !td->get_is_Delaunay_hyperbolic(); - } - else - { - return false; - } - } - - bool is_finite_non_hyperbolic(Face_handle f, int i) const - { - if(dimension() <= 1) - return false; - - if(is_finite_non_hyperbolic(f) && get_finite_non_hyperbolic_edge(f) == i) - return true; - - // another incident face and corresponding index - Face_handle f2 = f->neighbor(i); - int i2 = f2->index(f); - - if(is_finite_non_hyperbolic(f2) && get_finite_non_hyperbolic_edge(f2) == i2) - return true; - - return false; - } - - bool is_finite_non_hyperbolic(const Edge& e) const - { - return is_finite_non_hyperbolic(e.first, e.second); - } - - // Depth-first search (dfs) and marking the finite non_hyperbolic faces. void mark_finite_non_hyperbolic_faces() const { if(dimension() <= 1) return; - std::set visited_faces; - - // maintain a stack to be able to backtrack - // to the most recent faces which neighbors are not visited - std::stack backtrack; + for(auto fit = Base::all_faces_begin(); fit != Base::all_faces_end(); ++fit) + fit->hyperbolic_data().set_Delaunay_hyperbolic(); // finite & hyperbolic - // start from a face with infinite vertex - Face_handle current = Base::infinite_face(); + Face_handle ifh = Base::infinite_face(); + ifh->hyperbolic_data().set_infinite(); - // mark it as visited - visited_faces.insert(current); + std::stack to_visit; + to_visit.push(ifh); - // put the element whose neighbors we are going to explore. - backtrack.push(current); + std::set visited_faces; // @todo squat tds_data() - Face_handle next; - - while(!backtrack.empty()) + while(!to_visit.empty()) { - // take a face - current = backtrack.top(); + Face_handle fh = to_visit.top(); + to_visit.pop(); + + if(!visited_faces.insert(fh).second) // already visited previously + continue; - // start visiting the neighbors - int i = 0; - for(; i<3; ++i) + for(int i = 0; i<3; ++i) { - next = current->neighbor(i); + Face_handle nfh = fh->neighbor(i); + mark_face(nfh); - // if a neighbor is already visited, then stop going deeper - if(visited_faces.find(next) != visited_faces.end()) + if(is_Delaunay_hyperbolic(nfh)) continue; - visited_faces.insert(next); - mark_face(next); - - // go deeper if the neighbor is non_hyperbolic - if(!is_Delaunay_hyperbolic(next)) - { - backtrack.push(next); - break; - } + to_visit.push(nfh); } - - // if all the neighbors are already visited, then remove "current" face. - if(i == 3) - backtrack.pop(); - } - } - - // check if a star is bounded by finite faces - bool is_star_bounded(Vertex_handle v) const - { - if(dimension() <= 1) - return true; - - Face_handle f = v->face(); - Face_handle next; - int i; - Face_handle start(f); - Face_handle opposite_face; - - do - { - i = f->index(v); - next = f->neighbor(ccw(i)); // turn ccw around v - - opposite_face = f->neighbor(i); - if(!is_Delaunay_hyperbolic(opposite_face)) - return false; - - f = next; } - while(next != start); - - return true; } - void mark_star_faces(Vertex_handle v) const { if(dimension() <= 1) return; Face_handle f = v->face(); - Face_handle start(f), next; - int i; + Face_handle start(f); do { - i = f->index(v); - next = f->neighbor(ccw(i)); // turn ccw around v - mark_face(f); - f = next; - } while(next != start); + int i = f->index(v); + f = f->neighbor(ccw(i)); + } + while(f != start); } void mark_face(const Face_handle f) const { - Is_Delaunay_hyperbolic del; - int idx; - bool flag = del(point(f,0), - point(f,1), - point(f,2), - idx); - - Face_data fd; - fd.set_is_Delaunay_hyperbolic(flag); - - if(!flag) - fd.set_non_hyperbolic_edge(idx); - - f->tds_data() = make_object(fd); + if(is_infinite(f)) + { + f->hyperbolic_data().set_infinite(); + } + else + { + int idx; + bool flag = geom_traits().is_Delaunay_hyperbolic_2_object()(point(f,0), + point(f,1), + point(f,2), + idx); + + if(flag) + f->hyperbolic_data().set_Delaunay_hyperbolic(); // finite & hyperbolic + else + f->hyperbolic_data().set_Delaunay_non_hyperbolic(idx); // finite but not hyperbolic + } } public: - Line_face_circulator line_walk(const Point& p, const Point& q, Face_handle f = Face_handle()) const { return Base::line_walk(p, q, f); } - Hyperbolic_triangle hyperbolic_triangle(const Face_handle f) const { return Base::triangle(f); } + Hyperbolic_triangle hyperbolic_triangle(const Face_handle f) const + { + CGAL_precondition(!is_infinite(f)); + return Base::triangle(f); + } // needed by DT_2: do not document! - Hyperbolic_triangle triangle(const Face_handle f) const { return hyperbolic_triangle(f); } + Hyperbolic_triangle triangle(const Face_handle f) const + { + CGAL_precondition(!is_infinite(f)); + return hyperbolic_triangle(f); + } Hyperbolic_segment hyperbolic_segment(const Face_handle f, const int i) const { @@ -862,7 +757,7 @@ class Hyperbolic_Delaunay_triangulation_2 Hyperbolic_Voronoi_point dual(Face_handle f) const { - CGAL_triangulation_precondition(is_Delaunay_hyperbolic(f)); + CGAL_precondition(is_Delaunay_hyperbolic(f)); return geom_traits().construct_hyperbolic_circumcenter_2_object()(point(f,0), point(f,1), point(f,2)); @@ -872,7 +767,7 @@ class Hyperbolic_Delaunay_triangulation_2 Hyperbolic_segment dual(Face_handle f, int i) const { - CGAL_triangulation_precondition(is_Delaunay_hyperbolic(f, i)); + CGAL_precondition(is_Delaunay_hyperbolic(f, i)); if(dimension() == 1) { @@ -890,7 +785,7 @@ class Hyperbolic_Delaunay_triangulation_2 bool fhyp = is_Delaunay_hyperbolic(f); bool nhyp = is_Delaunay_hyperbolic(n); - // both faces are non_hyperbolic, but the incident edge is hyperbolic + // both faces are non_hyperbolic, but the common edge is hyperbolic if(!fhyp && !nhyp) { const Point& p = point(f,ccw(i)); @@ -930,55 +825,50 @@ class Hyperbolic_Delaunay_triangulation_2 } public: - - const Point point(const Vertex_handle vh) const + const Point& point(const Vertex_handle vh) const { + CGAL_precondition(!is_infinite(vh)); return vh->point(); } - const Point point(const Face_handle fh, const int i) const + const Point& point(const Face_handle fh, const int i) const { - CGAL_triangulation_precondition(0 <= i); - CGAL_triangulation_precondition(i <= 2); + CGAL_precondition(!is_infinite(fh->vertex(i))); + CGAL_precondition(0 <= i && i <= 2); return fh->vertex(i)->point(); } - - Point point(const Vertex_handle vh) + Point& point(const Vertex_handle vh) { + CGAL_precondition(!is_infinite(vh)); return vh->point(); } - Point point(const Face_handle fh, const int i) + Point& point(const Face_handle fh, const int i) { - CGAL_triangulation_precondition(0 <= i); - CGAL_triangulation_precondition(i <= 2); + CGAL_precondition(!is_infinite(fh->vertex(i))); + CGAL_precondition(0 <= i && i <= 2); return fh->vertex(i)->point(); } - - bool is_valid() { - if (Base::is_valid()) + if (!Base::is_valid()) + return false; + + for (Hyperbolic_faces_iterator fit = hyperbolic_faces_begin(); fit != hyperbolic_faces_end(); fit++) { - for (Hyperbolic_faces_iterator fit = hyperbolic_faces_begin(); fit != hyperbolic_faces_end(); fit++) - { - if (!is_Delaunay_hyperbolic(fit)) - { - return false; - } - } - for (Hyperbolic_edges_iterator eit = hyperbolic_edges_begin(); eit != hyperbolic_edges_end(); eit++) - { - if (!is_Delaunay_hyperbolic(eit)) - { - return false; - } - } - return true; + if (!is_Delaunay_hyperbolic(fit)) + return false; + } + + for (Hyperbolic_edges_iterator eit = hyperbolic_edges_begin(); eit != hyperbolic_edges_end(); eit++) + { + if (!is_Delaunay_hyperbolic(eit)) + return false; } - return false; + + return true; } Face_handle locate(const Point& p, const Face_handle hint = Face_handle()) const @@ -990,26 +880,17 @@ class Hyperbolic_Delaunay_triangulation_2 Face_handle locate(const Point& query, Locate_type& lt, int &li, Face_handle hint = Face_handle()) const { - // Perform an Euclidean location first and get close to the hyperbolic face containing the query point + // Perform a Euclidean location first and get close to the hyperbolic face containing the query point typename Base::Locate_type blt; Face_handle fh = Base::locate(query, blt, li, hint); - if(blt == Base::VERTEX) { - lt = VERTEX; - } else { - if(blt == Base::EDGE) { - lt = EDGE; - } else { - if(blt == Base::FACE) { - lt = FACE; - } else { - if(blt == Base::OUTSIDE_CONVEX_HULL) { - lt = OUTSIDE_CONVEX_HULL; - } else { - lt = OUTSIDE_AFFINE_HULL; - } - } - } + switch(blt) + { + case Base::VERTEX: lt = VERTEX; break; + case Base::EDGE: lt = EDGE; break; + case Base::FACE: lt = FACE; break; + case Base::OUTSIDE_CONVEX_HULL: lt = OUTSIDE_CONVEX_HULL; break; + case Base::OUTSIDE_AFFINE_HULL: lt = OUTSIDE_AFFINE_HULL; break; } if(lt == VERTEX) @@ -1018,105 +899,100 @@ class Hyperbolic_Delaunay_triangulation_2 if(lt == OUTSIDE_CONVEX_HULL || lt == OUTSIDE_AFFINE_HULL) return Face_handle(); - // This case corresponds to when the point is located on an Euclidean edge. + CGAL_assertion(!is_infinite(fh)); + + // This case corresponds to when the point is located on a Euclidean edge. if(lt == EDGE) { - Point p = point(fh, 0); - Point q = point(fh, 1); - Point r = point(fh, 2); + // Here because the call to `side_of_hyperbolic_triangle` might change `li` + Face_handle mfh = fh->neighbor(li); - if(geom_traits().is_Delaunay_hyperbolic_2_object()(p, q, r)) + if(is_Delaunay_hyperbolic(fh)) { + const Point& p = point(fh, 0); + const Point& q = point(fh, 1); + const Point& r = point(fh, 2); + Oriented_side side = side_of_hyperbolic_triangle(p, q, r, query, lt, li); - if(side == ON_ORIENTED_BOUNDARY) { - lt = EDGE; + if(side != ON_NEGATIVE_SIDE) return fh; - } else { - if(side == ON_POSITIVE_SIDE) { - lt = FACE; - return fh; - } else { - // do nothing -- we still have to check the neighboring face - } - } } - p = point(fh, ccw(li)); - q = point(Base::mirror_vertex(fh, li)); - r = point(fh, cw(li)); - - if(geom_traits().is_Delaunay_hyperbolic_2_object()(p, q, r)) + if(is_Delaunay_hyperbolic(mfh)) { + const Point& p = point(mfh, 0); + const Point& q = point(mfh, 1); + const Point& r = point(mfh, 2); Oriented_side side = side_of_hyperbolic_triangle(p, q, r, query, lt, li); - if(side == ON_ORIENTED_BOUNDARY) { - lt = EDGE; + + if(side != ON_NEGATIVE_SIDE) { return fh; } else { - if(side == ON_POSITIVE_SIDE) { - lt = FACE; - return fh; - } else { - // There is nothing to be done now -- the point is outside the convex hull of the triangulation - lt = OUTSIDE_CONVEX_HULL; - return Face_handle(); - } + lt = OUTSIDE_CONVEX_HULL; + return Face_handle(); } } + else + { + lt = OUTSIDE_CONVEX_HULL; + return Face_handle(); + } } - // Here, the face has been located in the Euclidean face lh + // Here, the face has been located in the Euclidean face fh const Point& p = point(fh, 0); const Point& q = point(fh, 1); const Point& r = point(fh, 2); - int idx; - if(!geom_traits().is_Delaunay_hyperbolic_2_object()(p, q, r, idx)) + + if(!is_Delaunay_hyperbolic(fh)) { // Need to check if the point lies on one of the sides of the face // Note that at least one side is Delaunay hyperbolic! - if (geom_traits().side_of_oriented_hyperbolic_segment_2_object()(p,q,query) == ON_ORIENTED_BOUNDARY || - geom_traits().side_of_oriented_hyperbolic_segment_2_object()(q,r,query) == ON_ORIENTED_BOUNDARY || - geom_traits().side_of_oriented_hyperbolic_segment_2_object()(r,p,query) == ON_ORIENTED_BOUNDARY ) - lt = EDGE; - else - lt = OUTSIDE_CONVEX_HULL; + if(geom_traits().side_of_oriented_hyperbolic_segment_2_object()(p,q,query) == ON_ORIENTED_BOUNDARY) + { + lt = EDGE; + li = 2; + return fh; + } + else if(geom_traits().side_of_oriented_hyperbolic_segment_2_object()(q,r,query) == ON_ORIENTED_BOUNDARY) + { + lt = EDGE; + li = 0; + return fh; + } + else if(geom_traits().side_of_oriented_hyperbolic_segment_2_object()(r,p,query) == ON_ORIENTED_BOUNDARY) + { + lt = EDGE; + li = 1; + return fh; + } + + lt = OUTSIDE_CONVEX_HULL; return Face_handle(); } Oriented_side side = side_of_hyperbolic_triangle(p, q, r, query, lt, li); - if(side == ON_POSITIVE_SIDE) { - lt = FACE; + if(side != ON_NEGATIVE_SIDE) { return fh; } else { - if(side == ON_ORIENTED_BOUNDARY) { - lt = EDGE; - return fh; - } else { - // Here, the point lies in a face that is a neighbor to fh - for(int i = 0; i < 3; i++) { - Face_handle nfh = fh->neighbor(i); - if(geom_traits().is_Delaunay_hyperbolic_2_object()(point(nfh,0), - point(nfh,1), - point(nfh,2))) - { - Oriented_side nside = side_of_hyperbolic_triangle(point(nfh,0), - point(nfh,1), - point(nfh,2), - query, lt, li); - if(nside == ON_POSITIVE_SIDE) { - lt = FACE; - return nfh; - } else if(nside == ON_ORIENTED_BOUNDARY) { - lt = EDGE; - return nfh; - } - } + // Here, the point lies in a face that is a neighbor to fh + for(int i = 0; i < 3; ++i) { + Face_handle nfh = fh->neighbor(i); + if(is_Delaunay_hyperbolic(nfh)) + { + Oriented_side nside = side_of_hyperbolic_triangle(point(nfh,0), + point(nfh,1), + point(nfh,2), + query, lt, li); + if(nside != ON_NEGATIVE_SIDE) + return nfh; } - - // At this point, the point lies outside of the convex hull of the triangulation, - // since it has not been found in any of the hyperbolic faces adjacent to fh. - lt = OUTSIDE_CONVEX_HULL; - return Face_handle(); } + + // At this point, the point lies outside of the convex hull of the triangulation, + // since it has not been found in any of the hyperbolic faces adjacent to fh. + lt = OUTSIDE_CONVEX_HULL; + return Face_handle(); } // We never reach this point, but we have to make the compiler happy diff --git a/thirdparty/CGAL/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h b/thirdparty/CGAL/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h index 23f85cb4..701b1254 100644 --- a/thirdparty/CGAL/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h $ -// $Id: Hyperbolic_Delaunay_triangulation_CK_traits_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h $ +// $Id: include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mikhail Bogdanov @@ -20,11 +20,11 @@ #include #include #include -#include +#include #include #include -#include +#include #include @@ -69,48 +69,48 @@ namespace internal { Euclidean_line_2* l; Circle_2* c; - if(Circle_2* c_pq = boost::get(&bis_pq)) + if(Circle_2* c_pq = std::get_if(&bis_pq)) { - if(Circle_2* c_qr = boost::get(&bis_qr)) + if(Circle_2* c_qr = std::get_if(&bis_qr)) { typedef typename CK2_Intersection_traits::type Intersection_result; std::vector< Intersection_result > inters; intersection(*c_pq, *c_qr, std::back_inserter(inters)); - CGAL_triangulation_assertion(assign(pair, inters[0])); + CGAL_assertion(assign(pair, inters[0])); if(pair.second == 1) { if(_gt.has_on_bounded_side_2_object()(l_inf, pair.first)) return pair.first; - CGAL_triangulation_assertion(assign(pair, inters[1])); + CGAL_assertion(assign(pair, inters[1])); return pair.first; } return pair.first; } // here bis_qr is a line - l = boost::get(&bis_qr); + l = std::get_if(&bis_qr); c = c_pq; } else { // here bis_pq is a line, and bis_qr is necessarily a circle - l = boost::get(&bis_pq); - c = boost::get(&bis_qr); + l = std::get_if(&bis_pq); + c = std::get_if(&bis_qr); } typedef typename CK2_Intersection_traits::type Intersection_result; std::vector< Intersection_result > inters; intersection(*l, *c, std::back_inserter(inters)); - CGAL_triangulation_assertion(assign(pair,inters[0])); + CGAL_assertion(assign(pair,inters[0])); if(pair.second == 1) { if(_gt.has_on_bounded_side_2_object()(l_inf, pair.first)) return pair.first; - CGAL_triangulation_assertion(assign(pair, inters[1])); + CGAL_assertion(assign(pair, inters[1])); return pair.first; } return pair.first; @@ -157,7 +157,7 @@ namespace internal { } Euclidean_circle_or_line_2 bis_pq = cclsb(p, q); - Circle_2* c = boost::get(&bis_pq); + Circle_2* c = std::get_if(&bis_pq); if(_gt.less_y_2_object()(po, c->center())) return Circular_arc_2(*c, l_inf, true, l_inf, false); @@ -177,9 +177,9 @@ namespace internal { const Hyperbolic_point_2& r, const Hyperbolic_point_2& s) const { - CGAL_triangulation_precondition((_gt.orientation_2_object()(p, q, r) == ON_POSITIVE_SIDE) && + CGAL_precondition((_gt.orientation_2_object()(p, q, r) == ON_POSITIVE_SIDE) && (_gt.orientation_2_object()(p, s, q) == ON_POSITIVE_SIDE)); - CGAL_triangulation_precondition((_gt.side_of_oriented_circle_2_object()(p, q, r,s) == ON_NEGATIVE_SIDE) && + CGAL_precondition((_gt.side_of_oriented_circle_2_object()(p, q, r,s) == ON_NEGATIVE_SIDE) && (_gt.side_of_oriented_circle_2_object()(p, s, q, r) == ON_NEGATIVE_SIDE)); Construct_circle_or_line_supporting_bisector cclsb(_gt); @@ -200,7 +200,7 @@ namespace internal { Euclidean_circle_or_line_2 bis_pq = cclsb(p, q); - Circle_2* c_pq = boost::get(&bis_pq); + Circle_2* c_pq = std::get_if(&bis_pq); if(_gt.compare_distance_2_object()(po, p, q) == POSITIVE) { @@ -218,7 +218,7 @@ namespace internal { const Hyperbolic_point_2& q, const Hyperbolic_point_2& r) const { - CGAL_triangulation_precondition(_gt.orientation_2_object()(p, q, r) == POSITIVE); + CGAL_precondition(_gt.orientation_2_object()(p, q, r) == POSITIVE); Construct_circle_or_line_supporting_bisector cclsb(_gt); Construct_hyperbolic_circumcenter_CK_2 chc(_gt); @@ -240,18 +240,18 @@ namespace internal { intersection(bis_pq, l_inf, std::back_inserter(inters)); std::pair pair; - CGAL_triangulation_assertion(assign(pair,inters[0])); - CGAL_triangulation_assertion(pair.second == 1); + CGAL_assertion(assign(pair,inters[0])); + CGAL_assertion(pair.second == 1); if(_gt.less_y_2_object()(p, q)) return Line_arc_2(bis_pq,a,pair.first); - CGAL_triangulation_assertion(assign(pair,inters[1])); - CGAL_triangulation_assertion(pair.second == 1); + CGAL_assertion(assign(pair,inters[1])); + CGAL_assertion(pair.second == 1); return Line_arc_2(bis_pq,a,pair.first); } Euclidean_circle_or_line_2 bis_pq = cclsb(p, q); - Circle_2* c_pq = boost::get(&bis_pq); + Circle_2* c_pq = std::get_if(&bis_pq); Hyperbolic_point_2 approx_a(to_double(a.x()),to_double(a.y())); @@ -261,8 +261,8 @@ namespace internal { intersection(*c_pq, l_inf, std::back_inserter(inters)); std::pair pair; - CGAL_triangulation_assertion(assign(pair,inters[0])); - CGAL_triangulation_assertion(pair.second == 1); + CGAL_assertion(assign(pair,inters[0])); + CGAL_assertion(pair.second == 1); Hyperbolic_point_2 approx_pinf(to_double(pair.first.x()), to_double(pair.first.y())); Hyperbolic_point_2 approx_c(to_double(c_pq->center().x()), @@ -275,7 +275,7 @@ namespace internal { return Circular_arc_2(*c_pq, pair.first, a); } - CGAL_triangulation_assertion(assign(pair,inters[1])); + CGAL_assertion(assign(pair,inters[1])); if(_gt.orientation_2_object()(approx_c,approx_a,approx_pinf) == POSITIVE) return Circular_arc_2(*c_pq, pair.first, a); @@ -311,14 +311,14 @@ class Hyperbolic_Delaunay_triangulation_CK_traits_2 typedef typename R::Point_2 Hyperbolic_point_2; typedef typename R::Circle_2 Circle_2; typedef typename R::Line_2 Euclidean_line_2; - typedef boost::variant Euclidean_circle_or_line_2; + typedef std::variant Euclidean_circle_or_line_2; typedef typename R::Circular_arc_2 Circular_arc_2; typedef typename R::Line_arc_2 Line_arc_2; typedef typename R::Circular_arc_point_2 Circular_arc_point_2; typedef Circular_arc_point_2 Hyperbolic_Voronoi_point_2; typedef typename R::Segment_2 Euclidean_segment_2; // only used internally here - typedef boost::variant Hyperbolic_segment_2; + typedef std::variant Hyperbolic_segment_2; typedef typename R::Triangle_2 Hyperbolic_triangle_2; diff --git a/thirdparty/CGAL/include/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h b/thirdparty/CGAL/include/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h index 62e88906..03acce18 100644 --- a/thirdparty/CGAL/include/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h $ -// $Id: Hyperbolic_Delaunay_triangulation_traits_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h $ +// $Id: include/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Iordan Iordanov @@ -24,11 +24,11 @@ #include #include #include -#include +#include #include #include -#include +#include #include @@ -187,9 +187,9 @@ class Construct_intersection_2 Hyperbolic_point_2 operator()(Hyperbolic_segment_2 s1, Hyperbolic_segment_2 s2) { - if(Circular_arc_2* c1 = boost::get(&s1)) + if(Circular_arc_2* c1 = std::get_if(&s1)) { - if(Circular_arc_2* c2 = boost::get(&s2)) + if(Circular_arc_2* c2 = std::get_if(&s2)) { std::pair res = operator()(c1->supporting_circle(), c2->supporting_circle()); Hyperbolic_point_2 p1 = res.first; @@ -202,7 +202,7 @@ class Construct_intersection_2 } else { - Euclidean_segment_2* ell2 = boost::get(&s2); + Euclidean_segment_2* ell2 = std::get_if(&s2); std::pair res = operator()(c1->supporting_circle(), ell2->supporting_line()); Hyperbolic_point_2 p1 = res.first; @@ -216,8 +216,8 @@ class Construct_intersection_2 } else { - Euclidean_segment_2* ell1 = boost::get(&s1); - if(Circular_arc_2* c2 = boost::get(&s2)) + Euclidean_segment_2* ell1 = std::get_if(&s1); + if(Circular_arc_2* c2 = std::get_if(&s2)) { std::pair res = operator()(ell1->supporting_line(), c2->supporting_circle()); @@ -231,7 +231,7 @@ class Construct_intersection_2 } else { - Euclidean_segment_2* ell2 = boost::get(&s2); + Euclidean_segment_2* ell2 = std::get_if(&s2); Hyperbolic_point_2 p1 = operator()(ell1->supporting_line(), ell2->supporting_line()); CGAL_assertion(p1.x()*p1.x() + p1.y()*p1.y() < FT(1)); return p1; @@ -279,9 +279,9 @@ class Construct_hyperbolic_circumcenter_2 Euclidean_line_2* l; Circle_2* c; - if(Circle_2* c_pq = boost::get(&bis_pq)) + if(Circle_2* c_pq = std::get_if(&bis_pq)) { - if(Circle_2* c_qr = boost::get(&bis_qr)) + if(Circle_2* c_qr = std::get_if(&bis_qr)) { std::pair inters = ci(*c_pq, *c_qr); @@ -291,14 +291,14 @@ class Construct_hyperbolic_circumcenter_2 return inters.second; } - l = boost::get(&bis_qr); + l = std::get_if(&bis_qr); c = c_pq; } else { // here bis_pq is a line - l = boost::get(&bis_pq); - c = boost::get(&bis_qr); + l = std::get_if(&bis_pq); + c = std::get_if(&bis_qr); } std::pair inters = ci(*c, *l); @@ -348,7 +348,7 @@ class Construct_hyperbolic_bisector_2 } Euclidean_circle_or_line_2 bis_pq = cclsb(p, q); - Circle_2* c = boost::get(&bis_pq); + Circle_2* c = std::get_if(&bis_pq); std::pair inters = ci(*c, l_inf); if(_gt.orientation_2_object()(c->center(), inters.first, inters.second) == POSITIVE) @@ -365,9 +365,9 @@ class Construct_hyperbolic_bisector_2 const Hyperbolic_point_2& r, const Hyperbolic_point_2& s) const { - CGAL_triangulation_precondition((_gt.orientation_2_object()(p, q, r) == ON_POSITIVE_SIDE) && + CGAL_precondition((_gt.orientation_2_object()(p, q, r) == ON_POSITIVE_SIDE) && (_gt.orientation_2_object()(p, s, q) == ON_POSITIVE_SIDE)); - CGAL_triangulation_precondition((_gt.side_of_oriented_circle_2_object()(p, q, r,s) == ON_NEGATIVE_SIDE) && + CGAL_precondition((_gt.side_of_oriented_circle_2_object()(p, q, r,s) == ON_NEGATIVE_SIDE) && (_gt.side_of_oriented_circle_2_object()(p, s, q, r) == ON_NEGATIVE_SIDE)); Construct_hyperbolic_circumcenter_2 chc(_gt); @@ -388,7 +388,7 @@ class Construct_hyperbolic_bisector_2 } Euclidean_circle_or_line_2 bis_pq = cclsb(p, q); - Circle_2* c_pq = boost::get(&bis_pq); + Circle_2* c_pq = std::get_if(&bis_pq); if(_gt.compare_distance_2_object()(po, p, q) == POSITIVE) { // then p is inside the supporting circle @@ -405,7 +405,7 @@ class Construct_hyperbolic_bisector_2 const Hyperbolic_point_2& q, const Hyperbolic_point_2& r) const { - CGAL_triangulation_precondition(_gt.orientation_2_object()(p, q, r) == POSITIVE); + CGAL_precondition(_gt.orientation_2_object()(p, q, r) == POSITIVE); Construct_circle_or_line_supporting_bisector cclsb(_gt); Construct_hyperbolic_circumcenter_2 chc(_gt); @@ -430,7 +430,7 @@ class Construct_hyperbolic_bisector_2 } Euclidean_circle_or_line_2 bis_pq = cclsb(p, q); - Circle_2* c_pq = boost::get(&bis_pq); + Circle_2* c_pq = std::get_if(&bis_pq); std::pair inters = ci(*c_pq, l_inf); Hyperbolic_point_2 approx_pinf = inters.first; @@ -468,10 +468,10 @@ class Hyperbolic_Delaunay_triangulation_traits_2 typedef Hyperbolic_point_2 Hyperbolic_Voronoi_point_2; typedef typename Kernel::Circle_2 Circle_2; typedef typename Kernel::Line_2 Euclidean_line_2; - typedef boost::variant Euclidean_circle_or_line_2; + typedef std::variant Euclidean_circle_or_line_2; typedef internal::HDT_2_Circular_arc_2 Circular_arc_2; typedef typename Kernel::Segment_2 Euclidean_segment_2; // only used internally here - typedef boost::variant Hyperbolic_segment_2; + typedef std::variant Hyperbolic_segment_2; typedef typename Kernel::Triangle_2 Hyperbolic_triangle_2; diff --git a/thirdparty/CGAL/include/CGAL/Hyperbolic_octagon_translation.h b/thirdparty/CGAL/include/CGAL/Hyperbolic_octagon_translation.h index a33c6962..762581ac 100644 --- a/thirdparty/CGAL/include/CGAL/Hyperbolic_octagon_translation.h +++ b/thirdparty/CGAL/include/CGAL/Hyperbolic_octagon_translation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Hyperbolic_octagon_translation.h $ -// $Id: Hyperbolic_octagon_translation.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Hyperbolic_octagon_translation.h $ +// $Id: include/CGAL/Hyperbolic_octagon_translation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Iordan Iordanov diff --git a/thirdparty/CGAL/include/CGAL/Hyperbolic_triangulation_2/internal/Exact_complex.h b/thirdparty/CGAL/include/CGAL/Hyperbolic_triangulation_2/internal/Exact_complex.h index 09aa435e..6862656b 100644 --- a/thirdparty/CGAL/include/CGAL/Hyperbolic_triangulation_2/internal/Exact_complex.h +++ b/thirdparty/CGAL/include/CGAL/Hyperbolic_triangulation_2/internal/Exact_complex.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_2/internal/Exact_complex.h $ -// $Id: Exact_complex.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_2/internal/Exact_complex.h $ +// $Id: include/CGAL/Hyperbolic_triangulation_2/internal/Exact_complex.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Iordan Iordanov diff --git a/thirdparty/CGAL/include/CGAL/Hyperbolic_triangulation_2/internal/Hyperbolic_Delaunay_triangulation_traits_2_functions.h b/thirdparty/CGAL/include/CGAL/Hyperbolic_triangulation_2/internal/Hyperbolic_Delaunay_triangulation_traits_2_functions.h index 98b8ecf2..99327bf0 100644 --- a/thirdparty/CGAL/include/CGAL/Hyperbolic_triangulation_2/internal/Hyperbolic_Delaunay_triangulation_traits_2_functions.h +++ b/thirdparty/CGAL/include/CGAL/Hyperbolic_triangulation_2/internal/Hyperbolic_Delaunay_triangulation_traits_2_functions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_2/internal/Hyperbolic_Delaunay_triangulation_traits_2_functions.h $ -// $Id: Hyperbolic_Delaunay_triangulation_traits_2_functions.h 440a8df 2022-02-03T08:41:04+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_2/internal/Hyperbolic_Delaunay_triangulation_traits_2_functions.h $ +// $Id: include/CGAL/Hyperbolic_triangulation_2/internal/Hyperbolic_Delaunay_triangulation_traits_2_functions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mikhail Bogdanov @@ -33,7 +33,6 @@ class Construct_circle_or_line_supporting_bisector typedef typename Traits::Euclidean_line_2 Euclidean_line_2; typedef typename Traits::Euclidean_circle_or_line_2 Euclidean_circle_or_line_2; typedef typename Traits::Circle_2 Circle_2; - typedef typename Traits::Point_3 Point_3; public: Construct_circle_or_line_supporting_bisector(const Traits& gt = Traits()) : _gt(gt) {} @@ -41,19 +40,13 @@ class Construct_circle_or_line_supporting_bisector Euclidean_circle_or_line_2 operator()(const Hyperbolic_point_2& p, const Hyperbolic_point_2& q) const { - Hyperbolic_point_2 po = CGAL::ORIGIN; - + const Hyperbolic_point_2 po = CGAL::ORIGIN; if(_gt.compare_distance_2_object()(po, p, q) == EQUAL) return _gt.construct_bisector_2_object()(p, q); - FT dop2 = p.x()*p.x() + p.y()*p.y(); - FT doq2 = q.x()*q.x() + q.y()*q.y(); - Point_3 p3(p.x(), p.y(), dop2); - Point_3 q3(q.x(), q.y(), doq2); - // TODO MT improve - // The cirle belongs to the pencil with limit points p and q + // The circle belongs to the pencil with limit points p and q // p, q are zero-circles // (x, y, xˆ2 + yˆ2 - rˆ2) = alpha*(xp, yp, xpˆ2 + ypˆ2) + (1-alpha)*(xq, yq, xqˆ2 + yqˆ2) // xˆ2 + yˆ2 - rˆ2 = 1 (= radius of the Poincare disc) @@ -87,8 +80,6 @@ class Construct_circle_or_line_supporting_bisector const Traits& _gt; }; // end Construct_supporting_circle_of_bisector - - template class Construct_hyperbolic_segment_2 { @@ -136,8 +127,6 @@ class Construct_hyperbolic_segment_2 const Traits& _gt; }; // end Construct_hyperbolic_segment_2 - - // For details see the JoCG paper (5:56-85, 2014) template class Is_Delaunay_hyperbolic @@ -146,7 +135,6 @@ class Is_Delaunay_hyperbolic typedef typename Traits::FT FT; typedef typename Traits::Hyperbolic_point_2 Hyperbolic_point_2; typedef typename Traits::Direction_2 Direction_2; - typedef typename Traits::Point_3 Point_3; typedef typename Traits::Vector_3 Vector_3; Is_Delaunay_hyperbolic(const Traits& gt = Traits()) @@ -178,7 +166,7 @@ class Is_Delaunay_hyperbolic const Hyperbolic_point_2& p2, int& ind) const { - if(this->operator()(p0, p1, p2) == false) + if(!this->operator()(p0, p1, p2)) { ind = find_non_hyperbolic_edge(p0, p1, p2); return false; @@ -188,7 +176,7 @@ class Is_Delaunay_hyperbolic } private: - // assume the face (p0, p1, p2) is non-hyperbolic + // assumes that the face (p0, p1, p2) is non-hyperbolic int find_non_hyperbolic_edge(const Hyperbolic_point_2& p0, const Hyperbolic_point_2& p1, const Hyperbolic_point_2& p2) const @@ -253,18 +241,7 @@ class Side_of_oriented_hyperbolic_segment_2 { Euclidean_line_2 seg(p, q); Orientation qori = _gt.orientation_2_object()(p, q, query); - if(qori == COLLINEAR) - { - return ON_ORIENTED_BOUNDARY; - } - else - { - // It is sufficient that these are consistent. - if(qori == LEFT_TURN) - return ON_POSITIVE_SIDE; - else - return ON_NEGATIVE_SIDE; - } + return qori; } Weighted_point_2 wp(p); @@ -276,17 +253,7 @@ class Side_of_oriented_hyperbolic_segment_2 Circle_2 circle = _gt.construct_circle_2_object()(center, sq_radius); Bounded_side bs = _gt.bounded_side_2_object()(circle, query); - if(bs == ON_BOUNDARY) - { - return ON_ORIENTED_BOUNDARY; - } - else - { - if(bs == ON_BOUNDED_SIDE) - return ON_POSITIVE_SIDE; - else - return ON_NEGATIVE_SIDE; - } + return enum_cast(bs); } private: diff --git a/thirdparty/CGAL/include/CGAL/Hyperbolic_triangulation_face_base_2.h b/thirdparty/CGAL/include/CGAL/Hyperbolic_triangulation_face_base_2.h index 31474c7f..cced15c9 100644 --- a/thirdparty/CGAL/include/CGAL/Hyperbolic_triangulation_face_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Hyperbolic_triangulation_face_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_face_base_2.h $ -// $Id: Hyperbolic_triangulation_face_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_face_base_2.h $ +// $Id: include/CGAL/Hyperbolic_triangulation_face_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -16,12 +16,45 @@ #include #include -#include #include #include namespace CGAL { +class Hyperbolic_data +{ + typedef std::int8_t Id; + +private: + // - 2 for infinite face + // - 1 for finite, hyperbolic face + // 0 for finite, non hyperbolic with non-hyperbolic edge at index 0 + // 2 for finite, non hyperbolic with non-hyperbolic edge at index 1 + // 1 for finite, non hyperbolic with non-hyperbolic edge at index 2 + Id _hyperbolic_tag; + +public: + Hyperbolic_data(Id id = -2) : _hyperbolic_tag(id) { } + + void set_infinite() { _hyperbolic_tag = -2; } + + // a finite face is non_hyperbolic if its circumscribing circle intersects the circle at infinity + void set_Delaunay_hyperbolic() { _hyperbolic_tag = -1; } + + bool is_Delaunay_hyperbolic() const + { + return (_hyperbolic_tag == -1); + } + + // set and get the non-hyperbolic property of the edge #i + void set_Delaunay_non_hyperbolic(int i) { _hyperbolic_tag = i; } + + bool is_Delaunay_non_hyperbolic(int i) const + { + return (_hyperbolic_tag == i); + } +}; + template > class Hyperbolic_triangulation_face_base_2 @@ -60,11 +93,11 @@ class Hyperbolic_triangulation_face_base_2 static int ccw(int i) {return Triangulation_cw_ccw_2::ccw(i);} static int cw(int i) {return Triangulation_cw_ccw_2::cw(i);} - CGAL::Object& tds_data() { return this->_tds_data; } - const CGAL::Object& tds_data() const { return this->_tds_data; } + Hyperbolic_data& hyperbolic_data() { return this->_hyperbolic_data; } + const Hyperbolic_data& hyperbolic_data() const { return this->_hyperbolic_data; } private: - CGAL::Object _tds_data; + Hyperbolic_data _hyperbolic_data; }; } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/IEEE_754_unions.h b/thirdparty/CGAL/include/CGAL/IEEE_754_unions.h index 2a5bceca..bc5d6246 100644 --- a/thirdparty/CGAL/include/CGAL/IEEE_754_unions.h +++ b/thirdparty/CGAL/include/CGAL/IEEE_754_unions.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/IEEE_754_unions.h $ -// $Id: IEEE_754_unions.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/IEEE_754_unions.h $ +// $Id: include/CGAL/IEEE_754_unions.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/3MF.h b/thirdparty/CGAL/include/CGAL/IO/3MF.h index af1a40ce..a8640c04 100644 --- a/thirdparty/CGAL/include/CGAL/IO/3MF.h +++ b/thirdparty/CGAL/include/CGAL/IO/3MF.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/3MF.h $ -// $Id: 3MF.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/3MF.h $ +// $Id: include/CGAL/IO/3MF.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno @@ -23,12 +23,12 @@ #endif #include -#include #include #include #include #include +#include #if defined(CGAL_LINKED_WITH_3MF) || defined(DOXYGEN_RUNNING) @@ -447,7 +447,7 @@ bool read_3MF(const std::string& fname, * \param fname the name of the 3mf file to write * \param all_points a `PointRanges` that contains the points of the soups to write * \param all_triangles a `TriangleRanges` that contains the triangles of the soups in `fname` - * \param names a range of std::string` associating a name to each soup, which will appear in the output + * \param names a range of `std::string` associating a name to each soup, which will appear in the output * * \return `true` if the writing is successful, `false` otherwise. */ @@ -504,7 +504,7 @@ bool write_3MF(const std::string& fname, template bool write_3MF(const std::string& fname, const PointRange& points, const TriangleRange& triangles, - typename boost::enable_if >::type* = nullptr) + std::enable_if_t::value>* = nullptr) { return write_triangle_soup_to_3mf(fname, points, triangles, "anonymous"); } diff --git a/thirdparty/CGAL/include/CGAL/IO/3MF/read_3mf.h b/thirdparty/CGAL/include/CGAL/IO/3MF/read_3mf.h index 34bd0c84..a8c4790f 100644 --- a/thirdparty/CGAL/include/CGAL/IO/3MF/read_3mf.h +++ b/thirdparty/CGAL/include/CGAL/IO/3MF/read_3mf.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/3MF/read_3mf.h $ -// $Id: read_3mf.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/3MF/read_3mf.h $ +// $Id: include/CGAL/IO/3MF/read_3mf.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno diff --git a/thirdparty/CGAL/include/CGAL/IO/3MF/write_3mf.h b/thirdparty/CGAL/include/CGAL/IO/3MF/write_3mf.h index 5987ac68..895482f6 100644 --- a/thirdparty/CGAL/include/CGAL/IO/3MF/write_3mf.h +++ b/thirdparty/CGAL/include/CGAL/IO/3MF/write_3mf.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/3MF/write_3mf.h $ -// $Id: write_3mf.h 1f45360 2021-01-26T09:05:24+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/3MF/write_3mf.h $ +// $Id: include/CGAL/IO/3MF/write_3mf.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno diff --git a/thirdparty/CGAL/include/CGAL/IO/Arr_iostream.h b/thirdparty/CGAL/include/CGAL/IO/Arr_iostream.h index 27c5f3d1..6015cce7 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Arr_iostream.h +++ b/thirdparty/CGAL/include/CGAL/IO/Arr_iostream.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/IO/Arr_iostream.h $ -// $Id: Arr_iostream.h 755693b 2021-05-03T13:25:26+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/IO/Arr_iostream.h $ +// $Id: include/CGAL/IO/Arr_iostream.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/IO/Arr_text_formatter.h b/thirdparty/CGAL/include/CGAL/IO/Arr_text_formatter.h index 49fac498..d6367672 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Arr_text_formatter.h +++ b/thirdparty/CGAL/include/CGAL/IO/Arr_text_formatter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h $ -// $Id: Arr_text_formatter.h 5e73fe1 2021-08-04T12:22:09+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h $ +// $Id: include/CGAL/IO/Arr_text_formatter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -524,7 +524,7 @@ class Arr_face_extended_text_formatter : /*! \class * A class defining a textual (\ascii) input/output format for arrangements * that store auxiliary dat with all their DCEL records, as they are templated - * by a extended DCEL class. + * by an extended DCEL class. */ template class Arr_extended_dcel_text_formatter : @@ -549,56 +549,56 @@ class Arr_extended_dcel_text_formatter : typedef typename Base::Face_const_handle Face_const_handle; /*! Default constructor.*/ - Arr_extended_dcel_text_formatter() : - Base() - {} + Arr_extended_dcel_text_formatter() : Base() {} /*! Construct an output formatter. */ - Arr_extended_dcel_text_formatter(std::ostream& os) : - Base(os) - {} + Arr_extended_dcel_text_formatter(std::ostream& os) : Base(os) {} /*! Construct an input formatter. */ - Arr_extended_dcel_text_formatter(std::istream& is) : - Base(is) - {} + Arr_extended_dcel_text_formatter(std::istream& is) : Base(is) {} /*! Write the auxiliary data associated with the given vertex. */ virtual void write_vertex_data(Vertex_const_handle v) - { - this->out() << '\n' << v->data(); - } + { this->out() << '\n' << v->data(); } /*! Read a vertex-data object and attach it to the given vertex. */ - virtual void read_vertex_data(Vertex_handle v) - { - this->in() >> v->data(); + virtual void read_vertex_data(Vertex_handle v) { + using Vertex = typename Arrangement_2::Vertex; + using Type = decltype(std::declval().data()); + using Data_type = typename std::remove_reference::type; + Data_type data; + this->in() >> data; + v->set_data(data); this->_skip_until_EOL(); } /*! Write the auxiliary data associated with the given halfedge. */ virtual void write_halfedge_data(Halfedge_const_handle he) - { - this->out() << '\n' << he->data(); - } + { this->out() << '\n' << he->data(); } /*! Read a halfedge-data object and attach it to the given halfedge. */ - virtual void read_halfedge_data(Halfedge_handle he) - { - this->in() >> he->data(); + virtual void read_halfedge_data(Halfedge_handle he) { + using Halfedge = typename Arrangement_2::Halfedge; + using Type = decltype(std::declval().data()); + using Data_type = typename std::remove_reference::type; + Data_type data; + this->in() >> data; + he->set_data(data); this->_skip_until_EOL(); } /*! Write the auxiliary data associated with the given face. */ virtual void write_face_data(Face_const_handle f) - { - this->out() << f->data() << '\n'; - } + { this->out() << f->data() << '\n'; } /*! Read a face-data object and attach it to the given face. */ - virtual void read_face_data(Face_handle f) - { - this->in() >> f->data(); + virtual void read_face_data(Face_handle f) { + using Face = typename Arrangement_2::Face; + using Type = decltype(std::declval().data()); + using Data_type = typename std::remove_reference::type; + Data_type data; + this->in() >> data; + f->set_data(data); this->_skip_until_EOL(); } }; diff --git a/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_2_reader.h b/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_2_reader.h index 047c0cd0..40c0d210 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_2_reader.h +++ b/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_2_reader.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_2_reader.h $ -// $Id: Arr_with_history_2_reader.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_2_reader.h $ +// $Id: include/CGAL/IO/Arr_with_history_2_reader.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_2_writer.h b/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_2_writer.h index 071e88c7..fb25b46e 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_2_writer.h +++ b/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_2_writer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_2_writer.h $ -// $Id: Arr_with_history_2_writer.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_2_writer.h $ +// $Id: include/CGAL/IO/Arr_with_history_2_writer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_iostream.h b/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_iostream.h index 99d2f904..2b003f3a 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_iostream.h +++ b/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_iostream.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_iostream.h $ -// $Id: Arr_with_history_iostream.h 755693b 2021-05-03T13:25:26+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_iostream.h $ +// $Id: include/CGAL/IO/Arr_with_history_iostream.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_text_formatter.h b/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_text_formatter.h index b663c590..caec4382 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_text_formatter.h +++ b/thirdparty/CGAL/include/CGAL/IO/Arr_with_history_text_formatter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_text_formatter.h $ -// $Id: Arr_with_history_text_formatter.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_text_formatter.h $ +// $Id: include/CGAL/IO/Arr_with_history_text_formatter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Arrangement_2_reader.h b/thirdparty/CGAL/include/CGAL/IO/Arrangement_2_reader.h index 3cd3d229..3be2bbe0 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Arrangement_2_reader.h +++ b/thirdparty/CGAL/include/CGAL/IO/Arrangement_2_reader.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h $ -// $Id: Arrangement_2_reader.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h $ +// $Id: include/CGAL/IO/Arrangement_2_reader.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -90,7 +90,7 @@ namespace CGAL { template void operator()(Formatter& formatter) { - // Clear the exisiting arrangement so it contains no DCEL features. + // Clear the existing arrangement so it contains no DCEL features. m_arr_access.clear_all(); // Read the arrangement dimensions. @@ -197,7 +197,7 @@ namespace CGAL { // Read the x-monotone curve associated with the edge. formatter.read_x_monotone_curve(m_curve); - // Allocate a pair of new DCEL halfegdes and associate them with the + // Allocate a pair of new DCEL halfedges and associate them with the // x-monotone curve we read. new_he = m_arr_access.new_edge(&m_curve); } diff --git a/thirdparty/CGAL/include/CGAL/IO/Arrangement_2_writer.h b/thirdparty/CGAL/include/CGAL/IO/Arrangement_2_writer.h index 2aa32ee1..cde29a71 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Arrangement_2_writer.h +++ b/thirdparty/CGAL/include/CGAL/IO/Arrangement_2_writer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h $ -// $Id: Arrangement_2_writer.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h $ +// $Id: include/CGAL/IO/Arrangement_2_writer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein @@ -63,7 +63,7 @@ namespace CGAL { typedef std::map Vertex_index_map; typedef std::map Halfedge_index_map; - // Data memebrs: + // Data members: const Arrangement_2& m_arr; const Dcel* m_dcel; int m_curr_v; @@ -307,7 +307,7 @@ namespace CGAL { return (pos->second); } - /*! Get the mapped index of a given halfegde. */ + /*! Get the mapped index of a given halfedge. */ int _index(const DHalfedge* he) const { typename Halfedge_index_map::const_iterator pos = m_he_index.find(he); diff --git a/thirdparty/CGAL/include/CGAL/IO/Color.h b/thirdparty/CGAL/include/CGAL/IO/Color.h index f5d0f209..d21d1ae1 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Color.h +++ b/thirdparty/CGAL/include/CGAL/IO/Color.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/Color.h $ -// $Id: Color.h 98ee8d7 2022-02-25T14:54:48+01:00 Charrière Maxime +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/Color.h $ +// $Id: include/CGAL/IO/Color.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,12 +19,13 @@ #include #include + +#include + #include #include #include - - namespace CGAL { namespace IO { @@ -287,7 +288,6 @@ class Color } /// @} - }; @@ -375,6 +375,22 @@ using IO::white; using IO::yellow; #endif -} //namespace CGAL +} // namespace CGAL + +namespace std { + +template <> +struct hash +{ + std::size_t operator()(const CGAL::IO::Color& c) const + { + std::size_t result = boost::hash_value(c[0]); + for(std::size_t i=1; i<4; ++i) + boost::hash_combine(result, c[i]); + return result; + } +}; + +} // namespace std #endif // CGAL_COLOR_H diff --git a/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h b/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h index 588c5267..3f30613b 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h +++ b/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h $ -// $Id: Complex_2_in_triangulation_3_file_writer.h 580a1ef 2020-05-22T15:31:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h $ +// $Id: include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h b/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h index 2633f959..3381545b 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h +++ b/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h $ -// $Id: Complex_2_in_triangulation_3_polyhedron_builder.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h $ +// $Id: include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_to_medit.h b/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_to_medit.h index fc561081..6f598fbe 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_to_medit.h +++ b/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_to_medit.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_medit.h $ -// $Id: Complex_2_in_triangulation_3_to_medit.h 2402f3f 2020-09-10T16:14:58+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_medit.h $ +// $Id: include/CGAL/IO/Complex_2_in_triangulation_3_to_medit.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h b/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h index 45f6eb1a..a51b71f4 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h +++ b/thirdparty/CGAL/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h $ -// $Id: Complex_2_in_triangulation_3_to_vtk.h 2402f3f 2020-09-10T16:14:58+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h $ +// $Id: include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h b/thirdparty/CGAL/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h index 4a7e5f84..f146a1b8 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h +++ b/thirdparty/CGAL/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h $ -// $Id: Complex_3_in_triangulation_3_to_vtk.h 70058db 2021-05-03T15:30:52+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h $ +// $Id: include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Dxf_bsop_reader.h b/thirdparty/CGAL/include/CGAL/IO/Dxf_bsop_reader.h index 631af196..26fb1413 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Dxf_bsop_reader.h +++ b/thirdparty/CGAL/include/CGAL/IO/Dxf_bsop_reader.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/IO/Dxf_bsop_reader.h $ -// $Id: Dxf_bsop_reader.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/IO/Dxf_bsop_reader.h $ +// $Id: include/CGAL/IO/Dxf_bsop_reader.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -25,6 +25,7 @@ #include #include #include +#include namespace CGAL { @@ -97,29 +98,19 @@ class Dxf_bsop_reader typename Traits_2::Make_x_monotone_2 make_x_monotone = traits.make_x_monotone_2_object(); typename Dxf_circles_list::iterator circ_it; - CGAL::Object obj_vec[3]; - CGAL::Object *obj_begin = (obj_vec + 0); - CGAL::Object *obj_end; - X_monotone_curve_2 cv1, cv2; for (circ_it = circles.begin(); circ_it != circles.end(); ++circ_it) { // Break the circle into two x-monotone circular arcs. const Dxf_circle_2& dxf_circ = *circ_it; Curve_2 circ (dxf_circ.first, dxf_circ.second); + Circ_polygon_2 pgn; - obj_end = make_x_monotone (circ, obj_begin); - CGAL_assertion(obj_end - obj_begin == 2); - - CGAL::assign(cv1, obj_vec[0]); - CGAL::assign(cv2, obj_vec[1]); + make_x_monotone (circ, + CGAL::dispatch_or_drop_output(std::back_inserter(pgn))); + CGAL_assertion(pgn.size() == 2); - // Generate the corresponding polygon. - Circ_polygon_2 pgn; - pgn.push_back (cv1); - pgn.push_back (cv2); - *pgns = pgn; - ++pgns; + *pgns++ = pgn; } circles.clear(); @@ -131,8 +122,6 @@ class Dxf_bsop_reader typename Dxf_polygon_2::iterator curr, next; Point_2 ps, pt; Circle_2 supp_circ; - std::size_t n_subarcs; - std::size_t i; for (pgn_it = polygons.begin(); pgn_it != polygons.end(); ++pgn_it) { @@ -184,15 +173,8 @@ class Dxf_bsop_reader // Break the arc into x-monotone subarcs (there can be at most // three subarcs) and add them to the polygon. - obj_end = make_x_monotone (circ_arc, obj_begin); - n_subarcs = (obj_end - obj_begin); - CGAL_assertion (n_subarcs <= 3); - - for (i = 0; i < n_subarcs; i++) - { - if (CGAL::assign (cv1, obj_vec[i])) - pgn.push_back (cv1); - } + make_x_monotone (circ_arc, + CGAL::dispatch_or_drop_output(std::back_inserter(pgn))); } else { diff --git a/thirdparty/CGAL/include/CGAL/IO/Dxf_reader.h b/thirdparty/CGAL/include/CGAL/IO/Dxf_reader.h index ce4386fe..3b1ac66d 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Dxf_reader.h +++ b/thirdparty/CGAL/include/CGAL/IO/Dxf_reader.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/IO/Dxf_reader.h $ -// $Id: Dxf_reader.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/IO/Dxf_reader.h $ +// $Id: include/CGAL/IO/Dxf_reader.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Andreas Fabri @@ -16,7 +16,7 @@ // (ACS -- Algorithms for Complex Shapes) // Description of the file format can be found at the following address: -// http://www.autodesk.com/techpubs/autocad/acad2000/dxf/ +// https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf #ifndef CGAL_IO_DXF_READER_H #define CGAL_IO_DXF_READER_H diff --git a/thirdparty/CGAL/include/CGAL/IO/Dxf_reader_doubles.h b/thirdparty/CGAL/include/CGAL/IO/Dxf_reader_doubles.h index 060524ec..bcf61629 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Dxf_reader_doubles.h +++ b/thirdparty/CGAL/include/CGAL/IO/Dxf_reader_doubles.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/IO/Dxf_reader_doubles.h $ -// $Id: Dxf_reader_doubles.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/IO/Dxf_reader_doubles.h $ +// $Id: include/CGAL/IO/Dxf_reader_doubles.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Andreas Fabri @@ -16,8 +16,7 @@ // (ACS -- Algorithms for Complex Shapes) // Descriptions of the file format can be found at -// http://www.autodesk.com/techpubs/autocad/acad2000/dxf/ -// http://www.tnt.uni-hannover.de/soft/compgraph/fileformats/docs/DXF.ascii +// https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf #ifndef CGAL_IO_DXF_READER_DOUBLES_H #define CGAL_IO_DXF_READER_DOUBLES_H diff --git a/thirdparty/CGAL/include/CGAL/IO/Dxf_variant_reader.h b/thirdparty/CGAL/include/CGAL/IO/Dxf_variant_reader.h index cebf2ca7..8353ce49 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Dxf_variant_reader.h +++ b/thirdparty/CGAL/include/CGAL/IO/Dxf_variant_reader.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h $ -// $Id: Dxf_variant_reader.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h $ +// $Id: include/CGAL/IO/Dxf_variant_reader.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion @@ -17,7 +17,7 @@ // (ACS -- Algorithms for Complex Shapes) // Description of the file format can be found at the following address: -// http://www.autodesk.com/techpubs/autocad/acad2000/dxf/ +// https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf #ifndef CGAL_IO_DXF_VARIANT_READER_H #define CGAL_IO_DXF_VARIANT_READER_H @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include @@ -47,7 +47,7 @@ template typedef typename CK::Line_2 Line_2; typedef typename CK::Point_2 Point_2; typedef typename CK::Circle_2 Circle_2; - typedef typename boost::variant< Circular_arc_2, Line_arc_2 > Arc; + typedef typename std::variant< Circular_arc_2, Line_arc_2 > Arc; typedef std::list Polygon; typedef std::list Polygons; typedef std::list Circles; diff --git a/thirdparty/CGAL/include/CGAL/IO/Fig_stream.h b/thirdparty/CGAL/include/CGAL/IO/Fig_stream.h index 9ccb98e5..1f91b764 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Fig_stream.h +++ b/thirdparty/CGAL/include/CGAL/IO/Fig_stream.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h $ -// $Id: Fig_stream.h c3d4306 2021-09-15T14:23:46+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h $ +// $Id: include/CGAL/IO/Fig_stream.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein @@ -164,7 +164,7 @@ enum Fig_depth /*! * \class A class for writing geometric objects in a FIG format (version 3.2). - * For more details, see: http://www.xfig.org/userman/fig-format.html + * For more details, see: https://mcj.sourceforge.net/ */ template class Fig_stream @@ -310,7 +310,7 @@ class Fig_stream } //@} - /// \name Openning and closing the file. + /// \name Opening and closing the file. //@{ /*! @@ -731,7 +731,7 @@ class Fig_stream /*! * Add a user-defined color. - * Use this function after openning the FIG stream and before writing any + * Use this function after opening the FIG stream and before writing any * other object (i.e. before calling the write_ () functions). * \param color The color. * \param r The red component (0 - 255). @@ -750,7 +750,7 @@ class Fig_stream if (color_defined (color)) return; - // Prepare a string desribing the color. + // Prepare a string describing the color. std::stringstream out; out << "0x" << std::hex @@ -1401,7 +1401,7 @@ class Fig_stream } /*! - * Write a polygon, reprsented as a range of points. + * Write a polygon, represented as a range of points. */ template void _write_polygon (const int n_points, diff --git a/thirdparty/CGAL/include/CGAL/IO/Fig_stream_Conic_arc_2.h b/thirdparty/CGAL/include/CGAL/IO/Fig_stream_Conic_arc_2.h index a2db649b..c079c39f 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Fig_stream_Conic_arc_2.h +++ b/thirdparty/CGAL/include/CGAL/IO/Fig_stream_Conic_arc_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream_Conic_arc_2.h $ -// $Id: Fig_stream_Conic_arc_2.h 625848e 2021-10-04T13:21:47+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream_Conic_arc_2.h $ +// $Id: include/CGAL/IO/Fig_stream_Conic_arc_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/IO/File_avizo.h b/thirdparty/CGAL/include/CGAL/IO/File_avizo.h index eadb479a..7109558f 100644 --- a/thirdparty/CGAL/include/CGAL/IO/File_avizo.h +++ b/thirdparty/CGAL/include/CGAL/IO/File_avizo.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/IO/File_avizo.h $ -// $Id: File_avizo.h 70058db 2021-05-03T15:30:52+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/IO/File_avizo.h $ +// $Id: include/CGAL/IO/File_avizo.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -13,23 +13,120 @@ #ifndef CGAL_IO_FILE_AVIZO_H #define CGAL_IO_FILE_AVIZO_H -#include - +#include #include +#include + #include #include +#include +#include +#include +#include + +#include + #include #include namespace CGAL { +// --------------------------------- +// Output C3t3 to Avizo tetra file format +// --------------------------------- + namespace IO { +namespace internal { + + //a material is composed of an material Id and a material name. + typedef std::pair material; + + struct MaterialData + { + material innerRegion; + material outerRegion; + }; + + template + bool get_material_metadata(std::istream& input, + std::string& line, + material& _material, + MaterialIdType material_id) + { + std::istringstream iss; + iss.str(line); + + iss >> _material.second;//name + + while (std::getline(input, line)) + { + std::string prop; //property + iss.clear(); + iss.str(line); + iss >> prop; + + if (prop.compare("Id") == 0) + { + int tmp_id; + iss >> tmp_id; + _material.first = material_id; + + std::string mat = _material.second; + boost::algorithm::to_lower(mat); + if ((0 == mat.compare("exterior")) + && _material.first != 0) + { + std::cerr << "Exterior should have index 0. "; + std::cerr << "In this file it has index " << _material.first << "." << std::endl; + std::cerr << "Reader failed, because Meshing will fail to terminate." << std::endl; + return false; + } + } + else if (prop.compare("}") == 0) + return true; //end of this material + } + return false; + } + + bool line_starts_with(const std::string& line, const char* cstr) + { + const std::size_t fnws = line.find_first_not_of(" \t"); + if (fnws != std::string::npos) + return (line.compare(fnws, strlen(cstr), cstr) == 0); + return false; + } + + template + bool treat_surf_materials(std::istream& input, + std::vector& materials, + IdType& material_id) + { + std::string line; + while (std::getline(input, line)) + { + if (line_starts_with(line, "}")) + break; + else + { + material _material; + if (!get_material_metadata(input, line, _material, material_id++)) + return false; + materials.push_back(_material); + } + } + return true; + } + +} + /** - * @brief outputs mesh to avizo format - * @param os the stream - * @param c3t3 the mesh + * @ingroup PkgSMDS3ExportFunctions + * @brief exports a mesh complex to the Avizo (`.am`) file format + * @tparam C3T3 a class model of `MeshComplex_3InTriangulation_3` + * @param os the output stream + * @param c3t3 the mesh complex * \see \ref IOStreamAvizo */ template @@ -142,12 +239,297 @@ output_to_avizo(std::ostream& os, } // end output_to_avizo(...) -} // end namespace IO #ifndef CGAL_NO_DEPRECATED_CODE using IO::output_to_avizo; #endif +// --------------------------------- +// Read C3t3 from Avizo file format +// --------------------------------- + +namespace internal { + template + void read_points(std::istream& input, + std::vector& points, + const int& nb_points, + const bool binary) + { + points.clear(); + points.reserve(nb_points); + + if (binary) + { + std::vector data(3 * nb_points); + input.read(reinterpret_cast(&data[0]), + 3 * nb_points * sizeof(float)); + for (int i = 0; i < nb_points; ++i) + points.push_back(Point_3(data[3 * i], data[3 * i + 1], data[3 * i + 2])); + } + else + { + for (int i = 0; i < nb_points; ++i) + { + float x, y, z; + input >> x >> y >> z; + points.push_back(Point_3(x, y, z)); + } + } + } + + void read_tetrahedra(std::istream& input, + std::vector >& tetrahedra, + const int& nb_tets, + const bool binary) + { + tetrahedra.clear(); + tetrahedra.reserve(nb_tets); + + if (binary) + { + std::vector data(4 * nb_tets); + input.read(reinterpret_cast(&data[0]), + 4 * nb_tets * sizeof(int)); + for (int i = 0; i < nb_tets; ++i) + { + tetrahedra.push_back({ data[4 * i] - 1, + data[4 * i + 1] - 1, + data[4 * i + 2] - 1, + data[4 * i + 3] - 1 }); + } + } + else + { + for (int n = 0; n < nb_tets; ++n) + { + int i, j, k, l; + input >> i >> j >> k >> l; + tetrahedra.push_back({ {i - 1, + j - 1, + k - 1, + l - 1} }); + } + } + } + + template + void read_materials(std::istream& input, + std::vector& materials, + const int& nb_tets, + const bool binary) + { + materials.clear(); + materials.reserve(nb_tets); + + if (binary) + { + std::vector data(nb_tets); + input.read(reinterpret_cast(&data[0]), + nb_tets * sizeof(Material_type)); + for (int i = 0; i < nb_tets; ++i) + materials.push_back(data[i]); + } + else + { + for (int i = 0; i < nb_tets; ++i) + { + Material_type m; + input >> m; + materials.push_back(m); + } + } + } + + + struct Data_def + { + std::string name; + std::string type; + std::string description; + std::string at_label; + }; + + void go_to_at_label(std::istream& input, + std::string& line, + const char* at_label)// "@1" + { + if (line_starts_with(line, at_label)) + return; + + while (std::getline(input, line)) + { + if (line_starts_with(line, at_label)) + return; + } + } + + bool is_avizo_tetra_format(std::istream& in, const char* binary_or_ascii) + { + std::string format(binary_or_ascii); + boost::algorithm::to_lower(format); + + std::string line; + while (std::getline(in, line)) + { + if (line.find("# AmiraMesh") != std::string::npos + || line.find("# Avizo 3D") != std::string::npos) + { + std::cout << "Amira format : " << line << std::endl; + boost::algorithm::to_lower(line); + + return line.find(format.c_str()) != std::string::npos; + } + } + return false; + } + + template + bool read_tetra_am(std::istream& input, Tr& tr) + { + using Material_type = unsigned char; + using Point_3 = typename Tr::Geom_traits::Point_3; + + int n_nodes, n_tets, n_edges; + std::vector data; + std::vector materials; //material = std::pair + + Material_type material_id = 0;//byte + bool materials_done = false; + + std::vector points; + std::vector > tetrahedra; + std::vector labels; + + bool binary = true; + + std::string line; + while (std::getline(input, line)) + { + if (line.find("# AmiraMesh") != std::string::npos + || line.find("# Avizo 3D") != std::string::npos) + { + std::cout << "Amira format : " << line << std::endl; + boost::algorithm::to_lower(line); + if (line.find("ascii") != std::string::npos) + binary = false; + + continue; + } + if (line_starts_with(line, "nNodes")) + { + std::string nnodes; + std::istringstream iss; + iss.str(line); + iss >> nnodes >> n_nodes; + } + else if (line_starts_with(line, "nTetrahedra")) + { + std::string ntetra; + std::istringstream iss; + iss.str(line); + iss >> ntetra >> n_tets; + } + else if (line_starts_with(line, "nEdges")) + { + std::string nedges; + std::istringstream iss; + iss.str(line); + iss >> nedges >> n_edges; + } + else if (!materials_done && line.find("Materials") != std::string::npos) + { + if (!IO::internal::treat_surf_materials(input, materials, material_id)) + return false; + materials_done = true; + } + else if (line_starts_with(line, "Nodes")) + { + //Nodes { float[3] Coordinates } @1 + Data_def d; + d.name = "Nodes"; + d.type = "float[3]"; + d.description = "Coordinates"; + + std::size_t i = line.find("@"); + d.at_label = line.substr(i); + + data.push_back(d); + } + else if (line_starts_with(line, "Tetrahedra")) + { + //Tetrahedra{ int[4] Nodes } @3 + Data_def d; + d.name = "Tetrahedra"; + d.type = "int[4]"; + d.description = "Nodes"; + + std::size_t i = line.find("@"); + d.at_label = line.substr(i); + + data.push_back(d); + } + else if (line_starts_with(line, "TetrahedronData")) + { + //TetrahedronData{ byte Materials } @4 + Data_def d; + d.name = "TetrahedronData"; + d.type = "byte"; + d.description = "Materials"; + + std::size_t i = line.find("@"); + d.at_label = line.substr(i); + + data.push_back(d); + } + else if (line.find("Data section follows") != std::string::npos) + { + std::getline(input, line); + for (auto d : data) + { + go_to_at_label(input, line, d.at_label.c_str()); + CGAL_assertion(line_starts_with(line, d.at_label.c_str())); + + if (d.name.compare("Nodes") == 0) + read_points(input, points, n_nodes, binary); + else if (d.name.compare("Tetrahedra") == 0) + read_tetrahedra(input, tetrahedra, n_tets, binary); + else if (d.name.compare("TetrahedronData") == 0) + read_materials(input, labels, n_tets, binary); + } + } + } + + boost::unordered_map, + typename Tr::Cell::Surface_patch_index> empty_facets_map; + + CGAL::SMDS_3::build_triangulation_with_subdomains_range(tr, + points, + tetrahedra, + labels, + empty_facets_map, + true,//verbose + false,//replace subdomain 0 + true);//allow non manifold + + return true; + } + +}// end namespace internal + + + template + bool read_AVIZO_TETRA(std::istream& in, T3& tr) + { + if (!in) + { + std::cerr << "Cannot open file " << std::endl; + return false; + } + return CGAL::IO::internal::read_tetra_am(in, tr); + } + +} // end namespace IO + } // end namespace CGAL #endif // CGAL_IO_FILE_AVIZO_H diff --git a/thirdparty/CGAL/include/CGAL/IO/File_binary_mesh_3.h b/thirdparty/CGAL/include/CGAL/IO/File_binary_mesh_3.h index bedb1db2..465b987a 100644 --- a/thirdparty/CGAL/include/CGAL/IO/File_binary_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/IO/File_binary_mesh_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/IO/File_binary_mesh_3.h $ -// $Id: File_binary_mesh_3.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/IO/File_binary_mesh_3.h $ +// $Id: include/CGAL/IO/File_binary_mesh_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -13,23 +13,38 @@ #ifndef CGAL_IO_FILE_BINARY_MESH_3_H #define CGAL_IO_FILE_BINARY_MESH_3_H -#include +#include #include #include #include -#include +#include namespace CGAL { namespace IO { + /** + * @ingroup PkgSMDS3IOFunctions + * @brief outputs a mesh complex to the CGAL binary file format (`.binary.cgal`). + * + * @tparam C3T3 Type of mesh complex, model of `MeshComplex_3InTriangulation_3` + * + * @param os the output stream, opened in binary mode + * @param c3t3 the mesh complex + * + * @sa `CGAL::IO::load_binary_file()` + */ template bool save_binary_file(std::ostream& os, - const C3T3& c3t3, - bool binary = true) + const C3T3& c3t3 +#ifdef DOXYGEN_RUNNING + ) +#else + , bool binary = true) +#endif { typedef typename C3T3::Triangulation::Geom_traits::FT FT; if(binary) os << "binary "; @@ -44,6 +59,17 @@ save_binary_file(std::ostream& os, // call operator!() twice, because operator bool() is C++11 } +/** + * @ingroup PkgSMDS3IOFunctions + * @brief loads a mesh complex from a file written in CGAL binary file format (`.binary.cgal`). + * + * @tparam C3T3 Type of mesh complex, model of `MeshComplex_3InTriangulation_3` + * + * @param is the input stream, opened in binary mode + * @param c3t3 the mesh complex + * + * @sa `CGAL::IO::save_binary_file()` + */ template bool load_binary_file(std::istream& is, C3T3& c3t3) { diff --git a/thirdparty/CGAL/include/CGAL/IO/File_maya.h b/thirdparty/CGAL/include/CGAL/IO/File_maya.h index d0f8b216..fa52aeae 100644 --- a/thirdparty/CGAL/include/CGAL/IO/File_maya.h +++ b/thirdparty/CGAL/include/CGAL/IO/File_maya.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/IO/File_maya.h $ -// $Id: File_maya.h 70058db 2021-05-03T15:30:52+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/IO/File_maya.h $ +// $Id: include/CGAL/IO/File_maya.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Clement Jamin @@ -12,7 +12,7 @@ #ifndef CGAL_IO_FILE_MAYA_H #define CGAL_IO_FILE_MAYA_H -#include +#include #include #include diff --git a/thirdparty/CGAL/include/CGAL/IO/File_medit.h b/thirdparty/CGAL/include/CGAL/IO/File_medit.h index c109ecc9..7ff1ef8d 100644 --- a/thirdparty/CGAL/include/CGAL/IO/File_medit.h +++ b/thirdparty/CGAL/include/CGAL/IO/File_medit.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/IO/File_medit.h $ -// $Id: File_medit.h 70058db 2021-05-03T15:30:52+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/IO/File_medit.h $ +// $Id: include/CGAL/IO/File_medit.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,17 +14,18 @@ #ifndef CGAL_IO_FILE_MEDIT_H #define CGAL_IO_FILE_MEDIT_H -#include +#include -#include -#include +#include +#include +#include #include #include +#include +#include -#include #include -#include #include #include @@ -32,10 +33,12 @@ #include #include #include +#include +#include namespace CGAL { -namespace Mesh_3 { +namespace SMDS_3 { //------------------------------------------------------- // Needed in verbose mode @@ -65,14 +68,9 @@ class Rebind_cell_pmap Rebind_cell_pmap(const C3T3& c3t3) : r_c3t3_(c3t3) { - typedef typename C3T3::Cells_in_complex_iterator Cell_iterator; + int index_counter = 1; - int first_index = 0; - int index_counter = first_index + 1; - - for( Cell_iterator cell_it = r_c3t3_.cells_in_complex_begin(); - cell_it != r_c3t3_.cells_in_complex_end(); - ++cell_it) + for( Cell_handle cell_it : r_c3t3_.cells_in_complex()) { // Add subdomain index in internal map if needed std::pair is_insert_successful = @@ -84,7 +82,7 @@ class Rebind_cell_pmap } // Rebind indices in alphanumeric order - index_counter = first_index + 1; + index_counter = 1; for ( typename Subdomain_map::iterator mit = subdomain_map_.begin() ; mit != subdomain_map_.end() ; ++mit ) @@ -125,7 +123,7 @@ class Rebind_cell_pmap if ( elt_it != subdomain_map_.end() ) return elt_it->second; else - return -1; + return 0; } private: @@ -170,12 +168,9 @@ class No_rebind_cell_pmap size_type subdomain_number() const { - typedef typename C3T3::Cells_in_complex_iterator Cell_iterator; std::set subdomain_set; - for( Cell_iterator cell_it = r_c3t3_.cells_in_complex_begin(); - cell_it != r_c3t3_.cells_in_complex_end(); - ++cell_it) + for( Cell_handle cell_it : r_c3t3_.cells_in_complex()) { // Add subdomain index in set subdomain_set.insert(subdomain_index(cell_it)); @@ -214,30 +209,23 @@ class Rebind_facet_pmap : r_c3t3_(c3t3) , cell_pmap_(cell_pmap) { - typedef typename C3T3::Facets_in_complex_iterator Facet_iterator; - int first_index = 1; int index_counter = first_index; - for( Facet_iterator facet_it = r_c3t3_.facets_in_complex_begin(); - facet_it != r_c3t3_.facets_in_complex_end(); - ++facet_it) + for( Facet facet_it : r_c3t3_.facets_in_complex()) { // Add surface index in internal map if needed std::pair is_insert_successful = - surface_map_.insert(std::make_pair(r_c3t3_.surface_patch_index(*facet_it), + surface_map_.insert(std::make_pair(r_c3t3_.surface_patch_index(facet_it), index_counter)); if(is_insert_successful.second) ++index_counter; } // Find cell_pmap_ unused indices - typedef typename C3T3::Cells_in_complex_iterator Cell_iterator; std::set cell_label_set; - for( Cell_iterator cell_it = r_c3t3_.cells_in_complex_begin(); - cell_it != r_c3t3_.cells_in_complex_end(); - ++cell_it) + for( typename C3T3::Cell_handle cell_it : r_c3t3_.cells_in_complex()) { // Add subdomain index in set cell_label_set.insert(get(cell_pmap_, cell_it)); @@ -588,7 +576,7 @@ class Default_vertex_pmap break; default: - // should not happen + // must not happen return -1; break; } @@ -703,7 +691,9 @@ struct Medit_pmap_generator template void output_to_medit(std::ostream& os, - const C3T3& c3t3) + const C3T3& c3t3, + const bool all_vertices, + const bool all_cells) { #ifdef CGAL_MESH_3_IO_VERBOSE std::cerr << "Output to medit:\n"; @@ -726,7 +716,9 @@ output_to_medit(std::ostream& os, facet_pmap, cell_pmap, facet_pmap_twice, - Generator().print_twice()); + Generator().print_twice(), + all_vertices, + all_cells); #ifdef CGAL_MESH_3_IO_VERBOSE std::cerr << "done.\n"; @@ -747,14 +739,14 @@ output_to_medit(std::ostream& os, const Facet_index_property_map& facet_pmap, const Cell_index_property_map& cell_pmap, const Facet_index_property_map_twice& facet_twice_pmap = Facet_index_property_map_twice(), - const bool print_each_facet_twice = false) + const bool print_each_facet_twice = false, + const bool all_vertices = true, + const bool all_cells = false) { typedef typename C3T3::Triangulation Tr; - typedef typename C3T3::Facets_in_complex_iterator Facet_iterator; - typedef typename C3T3::Cells_in_complex_iterator Cell_iterator; - typedef typename Tr::Finite_vertices_iterator Finite_vertices_iterator; typedef typename Tr::Vertex_handle Vertex_handle; + typedef typename Tr::Cell_handle Cell_handle; typedef typename Tr::Point Point; //can be weighted or not const Tr& tr = c3t3.triangulation(); @@ -770,32 +762,61 @@ output_to_medit(std::ostream& os, os << "MeshVersionFormatted 1\n" << "Dimension 3\n"; - + os << "# CGAL::Mesh_complex_3_in_triangulation_3\n"; //------------------------------------------------------- // Vertices //------------------------------------------------------- - os << "Vertices\n" << tr.number_of_vertices() << '\n'; - boost::unordered_map V; + std::unordered_map V; int inum = 1; - for( Finite_vertices_iterator vit = tr.finite_vertices_begin(); - vit != tr.finite_vertices_end(); - ++vit) + if (all_vertices || all_cells) { - V[vit] = inum++; - Point p = tr.point(vit); - os << CGAL::to_double(p.x()) << ' ' - << CGAL::to_double(p.y()) << ' ' - << CGAL::to_double(p.z()) << ' ' - << get(vertex_pmap, vit) - << '\n'; + os << "Vertices\n" << tr.number_of_vertices() << '\n'; + + for (typename Tr::Finite_vertices_iterator vit = tr.finite_vertices_begin(); + vit != tr.finite_vertices_end(); + ++vit) + { + V[vit] = inum++; + const Point& p = tr.point(vit); + os << CGAL::to_double(p.x()) << ' ' + << CGAL::to_double(p.y()) << ' ' + << CGAL::to_double(p.z()) << ' ' + << get(vertex_pmap, vit) + << '\n'; + } + } + else + { + std::ostringstream oss; + for (Cell_handle c : c3t3.cells_in_complex()) + { + for (int i = 0; i < 4; ++i) + { + Vertex_handle vit = c->vertex(i); + if (V.find(vit) == V.end()) + { + V[vit] = inum++; + const Point& p = tr.point(vit); + oss << CGAL::to_double(p.x()) << ' ' + << CGAL::to_double(p.y()) << ' ' + << CGAL::to_double(p.z()) << ' ' + << get(vertex_pmap, vit) + << '\n'; + } + } + } + os << "Vertices\n" << V.size() << "\n"; + os << oss.str(); } //------------------------------------------------------- // Facets //------------------------------------------------------- - typename C3T3::size_type number_of_triangles = c3t3.number_of_facets_in_complex(); + typename C3T3::size_type number_of_triangles + = std::distance(c3t3.facets_in_complex_begin(), + c3t3.facets_in_complex_end()); if ( print_each_facet_twice ) number_of_triangles += number_of_triangles; @@ -803,12 +824,8 @@ output_to_medit(std::ostream& os, os << "Triangles\n" << number_of_triangles << '\n'; - for( Facet_iterator fit = c3t3.facets_in_complex_begin(); - fit != c3t3.facets_in_complex_end(); - ++fit) + for(typename C3T3::Facet f : c3t3.facets_in_complex()) { - typename C3T3::Facet f = (*fit); - // Apply priority among subdomains, to get consistent facet orientation per subdomain-pair interface. if ( print_each_facet_twice ) { @@ -827,30 +844,47 @@ output_to_medit(std::ostream& os, std::swap(vh2, vh3); os << V[vh1] << ' ' << V[vh2] << ' ' << V[vh3] << ' '; - os << get(facet_pmap, *fit) << '\n'; + os << get(facet_pmap, f) << '\n'; // Print triangle again if needed, with opposite orientation if ( print_each_facet_twice ) { os << V[vh3] << ' ' << V[vh2] << ' ' << V[vh1] << ' '; - os << get(facet_twice_pmap, *fit) << '\n'; + os << get(facet_twice_pmap, f) << '\n'; } } //------------------------------------------------------- // Tetrahedra //------------------------------------------------------- + typename C3T3::size_type number_of_cells + = all_cells + ? c3t3.triangulation().number_of_finite_cells() + : std::distance(c3t3.cells_in_complex_begin(), c3t3.cells_in_complex_end());; os << "Tetrahedra\n" - << c3t3.number_of_cells_in_complex() << '\n'; + << number_of_cells << '\n'; + + if (all_cells) + { + for (auto cit = c3t3.triangulation().finite_cells_begin(); + cit != c3t3.triangulation().finite_cells_end(); + ++cit) + { + for (int i = 0; i < 4; i++) + os << V[cit->vertex(i)] << ' '; - for( Cell_iterator cit = c3t3.cells_in_complex_begin() ; - cit != c3t3.cells_in_complex_end() ; - ++cit ) + os << get(cell_pmap, cit) << '\n'; + } + } + else { - for (int i=0; i<4; i++) - os << V[cit->vertex(i)] << ' '; + for (Cell_handle cit : c3t3.cells_in_complex()) + { + for (int i = 0; i < 4; i++) + os << V[cit->vertex(i)] << ' '; - os << get(cell_pmap, cit) << '\n'; + os << get(cell_pmap, cit) << '\n'; + } } //------------------------------------------------------- @@ -865,53 +899,248 @@ output_to_medit(std::ostream& os, namespace IO { /** - * @brief outputs mesh to medit format - * @param os the stream - * @param c3t3 the mesh - * @param rebind if true, labels of cells are rebinded into [1..nb_of_labels] - * @param show_patches if true, patches are labeled with different labels than - * cells. If false, each surface facet is written twice, using label of - * each adjacent cell. + * @ingroup PkgSMDS3IOFunctions + * @deprecated This function is deprecated. Users should instead use `CGAL::IO::write_MEDIT()` + * @brief outputs a mesh complex to the medit (`.mesh`) file format. + See \cgalCite{frey:inria-00069921} for a comprehensive description of this file format. + * @param os the output stream + * @param c3t3 the mesh complex + * @param rebind if `true`, labels of cells are rebinded into `[1..nb_of_labels]` + * @param show_patches if `true`, patches are labeled with different labels than + * cells. If `false`, each surface facet is written twice, + * using the label of each adjacent cell. * \see \ref IOStreamMedit */ template void output_to_medit(std::ostream& os, const C3T3& c3t3, - bool rebind = false, - bool show_patches = false) + bool rebind, // = false, + bool show_patches // = false +#ifndef DOXYGEN_RUNNING + , bool all_vertices // = true + , bool all_cells // = false +#endif +) { if ( rebind ) { if ( show_patches ) - Mesh_3::output_to_medit(os,c3t3); + CGAL::SMDS_3::output_to_medit(os, c3t3, + all_vertices, all_cells); else - Mesh_3::output_to_medit(os,c3t3); + CGAL::SMDS_3::output_to_medit(os, c3t3, + all_vertices, all_cells); } else { if ( show_patches ) - Mesh_3::output_to_medit(os,c3t3); + CGAL::SMDS_3::output_to_medit(os, c3t3, + all_vertices, all_cells); else - Mesh_3::output_to_medit(os,c3t3); + CGAL::SMDS_3::output_to_medit(os, c3t3, + all_vertices, all_cells); } } - -template -void write_MEDIT(std::ostream& os, const T3& t3) +/** + * @ingroup PkgSMDS3IOFunctions + * @brief outputs a mesh complex to the medit (`.mesh`) file format. + * See \cgalCite{frey:inria-00069921} for a comprehensive description of this file format. + * @tparam T3 can be instantiated with any 3D triangulation of \cgal provided that its + * vertex and cell base class are models of the concepts `SimplicialMeshVertexBase_3` + * and `SimplicialMeshCellBase_3`, respectively. + * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * @param os the output stream + * @param t3 the triangulation + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{all_cells} + * \cgalParamDescription{If `true`, all the cells in `t3` are written in `os`, + * whether they belong to the complex or not. + * Otherwise, only the cells `c` for which + * `c->subdomain_index() != Subdomain_index()` are written.} + * \cgalParamType{Boolean} + * \cgalParamDefault{`true`} + * \cgalParamExtra{This parameter must be set to `true` for the file to be readable by `read_MEDIT()`.} + * \cgalParamNEnd + * + * \cgalParamNBegin{all_vertices} + * \cgalParamDescription{If `true`, all the finite vertices in `t3` are written in `os`. + * Otherwise, only the vertices that belong to a cell `c` for which + * `c->subdomain_index() != Subdomain_index()` are written} + * \cgalParamType{Boolean} + * \cgalParamDefault{`true`} + * \cgalParamExtra{If `all_cells` is `true`, the value of this parameter is ignored and + all vertices are written in `os`. It must be + * set to `true` for the file to be readable by `read_MEDIT()`.} + * \cgalParamNEnd + * + * \cgalParamNBegin{rebind_labels} + * \cgalParamDescription{If `true`, labels of cells are rebinded into `[1..nb_of_labels]`} + * \cgalParamType{Boolean} + * \cgalParamDefault{`false`} + * \cgalParamNEnd + * + * \cgalParamNBegin{show_patches} + * \cgalParamDescription{If `true`, patches are labeled with different labels than + * cells. If `false`, each surface facet is written twice, + * using the label of each adjacent cell.} + * \cgalParamType{Boolean} + * \cgalParamDefault{`true`} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * \see \ref IOStreamMedit + */ +template +void write_MEDIT(std::ostream& os, + const T3& t3, + const NamedParameters& np = parameters::default_values()) { CGAL::Mesh_complex_3_in_triangulation_3 c3t3; c3t3.triangulation() = t3; c3t3.rescan_after_load_of_triangulation(); - output_to_medit(os, c3t3); + + using parameters::get_parameter; + using parameters::choose_parameter; + + bool rebind = choose_parameter(get_parameter(np, internal_np::rebind_labels), false);; + bool show_patches = choose_parameter(get_parameter(np, internal_np::show_patches), true); + bool all_c = choose_parameter(get_parameter(np, internal_np::all_cells), true); + bool all_v = all_c || choose_parameter(get_parameter(np, internal_np::all_vertices), true); + + output_to_medit(os, c3t3, rebind, show_patches, all_v, all_c); +} + +/** + * @ingroup PkgSMDS3IOFunctions + * @brief outputs a mesh complex to the medit (`.mesh`) file format. + * See \cgalCite{frey:inria-00069921} for a comprehensive description of this file format. + * @tparam T3 can be instantiated with any 3D triangulation of \cgal provided that its + * vertex and cell base class are models of the concepts `MeshVertexBase_3` and `MeshCellBase_3`, respectively. + * @tparam CornerIndex is the type of the indices for corners + * @tparam CurveIndex is the type of the indices for curves + * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + + * @param os the output stream + * @param c3t3 the mesh complex + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{all_cells} + * \cgalParamDescription{If `true`, all the cells in `t3` are written in `os`, + * whether they belong to the complex or not. + * Otherwise, only the cells `c` for which + * `c->subdomain_index() != Subdomain_index()` are written.} + * \cgalParamType{Boolean} + * \cgalParamDefault{`true`} + * \cgalParamExtra{If the complex does not form a topological sphere, + * this parameter must be set to `true` for the file to be readable by `read_MEDIT()`. + * Otherwise the underlying triangulation data structure will not be valid.} + * \cgalParamNEnd + * + * \cgalParamNBegin{all_vertices} + * \cgalParamDescription{If `true`, all the vertices in `t3` are written in `os`. + * Otherwise, only the vertices that belong to a cell `c` for which + * `c->subdomain_index() != Subdomain_index()` are written} + * \cgalParamType{Boolean} + * \cgalParamDefault{`true`} + * \cgalParamExtra{If `all_cells` is `true`, the value of this parameter is ignored + and all vertices are written in `os`. If the complex does not + form a topological sphere, it must be + * set to `true` for the file to be readable by `read_MEDIT()`. + * Otherwise the underlying triangulation data structure will not be valid.} + * \cgalParamNEnd + * + * \cgalParamNBegin{rebind_labels} + * \cgalParamDescription{If `true`, labels of cells are rebinded into `[1..nb_of_labels]`} + * \cgalParamType{Boolean} + * \cgalParamDefault{`false`} + * \cgalParamNEnd + * + * \cgalParamNBegin{show_patches} + * \cgalParamDescription{If `true`, patches are labeled with different labels than + * cells. If `false`, each surface facet is written twice, + * using the label of each adjacent cell.} + * \cgalParamType{Boolean} + * \cgalParamDefault{`true`} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + * \see \ref IOStreamMedit + */ +template +void write_MEDIT(std::ostream& os, + const CGAL::Mesh_complex_3_in_triangulation_3& c3t3, + const NamedParameters& np = parameters::default_values()) +{ + return write_MEDIT(os, c3t3.triangulation(), np); } -template -bool read_MEDIT(std::istream& in, T3& t3) +/** + * @ingroup PkgSMDS3IOFunctions + * @brief reads a mesh complex written in the medit (`.mesh`) file format. + * See \cgalCite{frey:inria-00069921} for a comprehensive description of this file format. + * @tparam T3 can be instantiated with any 3D triangulation of \cgal provided that its + * vertex and cell base class are models of the concepts `MeshVertexBase_3` and `MeshCellBase_3`, + * respectively. + * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * @param in the input stream + * @param t3 the triangulation + * @param np optional \ref bgl_namedparameters "Named Parameters" described below + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{verbose} + * \cgalParamDescription{indicates whether output warnings and error messages should be printed or not.} + * \cgalParamType{Boolean} + * \cgalParamDefault{`false`} + * \cgalParamNEnd + * \cgalParamNBegin{allow_non_manifold} + * \cgalParamDescription{allows the construction of a triangulation with non-manifold edges + * and non manifold vertices. The triangulation is invalid if this situation is met, + * so it should be used only in advanced cases, and the triangulation will be hardly usable.} + * \cgalParamType{bool} + * \cgalParamDefault{false} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + * @returns `true` if the connectivity of the triangulation could be built consistently + * from \p in, + * and `false` if the triangulation is empty, or if the connectivity + * of \p t3 could not be built. + * If `false` is returned, \p t3 is empty when the function returns. + * + * This function reads the data about vertices, surface facets, and + * triangulation cells from `in`, and builds a valid `T3` from it. + * + * Note that a valid 3D triangulation of \cgal must have a valid + * data structure (see `TriangulationDataStructure_3 `), + * positively oriented cells, + * and cover the geometric convex hull of all points in `t3`. + */ +template +bool read_MEDIT(std::istream& in, + T3& t3, + const CGAL_NP_CLASS& np = parameters::default_values()) { - CGAL_assertion(!(!in)); - return CGAL::build_triangulation_from_file(in, t3); + using parameters::choose_parameter; + using parameters::get_parameter; + + // Default non_manifold value is true if the triangulation periodic, false otherwise + const bool non_manifold = choose_parameter(get_parameter(np, internal_np::allow_non_manifold), + std::is_same::value); + const bool verbose = choose_parameter(get_parameter(np, internal_np::verbose), false); + + bool b = CGAL::SMDS_3::build_triangulation_from_file(in, t3, verbose, false /*replace_domain_0*/, non_manifold); + if(!b) + t3.clear(); + return b; } } // namespace IO diff --git a/thirdparty/CGAL/include/CGAL/IO/File_poly.h b/thirdparty/CGAL/include/CGAL/IO/File_poly.h index d2e41f1c..6f86bc17 100644 --- a/thirdparty/CGAL/include/CGAL/IO/File_poly.h +++ b/thirdparty/CGAL/include/CGAL/IO/File_poly.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/IO/File_poly.h $ -// $Id: File_poly.h 625a335 2021-05-06T09:38:31+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/IO/File_poly.h $ +// $Id: include/CGAL/IO/File_poly.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -43,7 +43,7 @@ read_triangle_poly_file(CDT& t, std::istream &f, { unsigned int j; double x, y; - f >> j >> iformat(x) >> iformat(y); + f >> j >> IO::iformat(x) >> IO::iformat(y); Point p(x, y); skip_until_EOL(f); skip_comment_OFF(f); vertices[--j] = t.insert(p); diff --git a/thirdparty/CGAL/include/CGAL/IO/File_tetgen.h b/thirdparty/CGAL/include/CGAL/IO/File_tetgen.h index 88a3664a..0f6e0759 100644 --- a/thirdparty/CGAL/include/CGAL/IO/File_tetgen.h +++ b/thirdparty/CGAL/include/CGAL/IO/File_tetgen.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/IO/File_tetgen.h $ -// $Id: File_tetgen.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/IO/File_tetgen.h $ +// $Id: include/CGAL/IO/File_tetgen.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -13,7 +13,7 @@ #ifndef CGAL_IO_FILE_TETGEN_H #define CGAL_IO_FILE_TETGEN_H -#include +#include #include #include @@ -25,7 +25,7 @@ namespace CGAL { -namespace Mesh_3 { +namespace SMDS_3 { template void @@ -185,10 +185,22 @@ output_to_tetgen(std::string filename, //------------------------------------------------------- } // end output_to_tetgen(...) -} // end namespace Mesh_3 +} // end namespace SMDS_3 namespace IO { + +/** + * \ingroup PkgSMDS3ExportFunctions + * @brief exports a mesh complex to tetgen format + * @param filename the path to the output files, without the extension. + * @param c3t3 the mesh complex + * @param rebind if true, labels of cells are rebinded into [1..nb_of_labels] + * @param show_patches if true, patches are labeled with different labels than + * cells. If false, each surface facet is written twice, using the label of + * each adjacent cell. + * \see \ref IOStreamTetgen + */ template void output_to_tetgen(std::string filename, @@ -199,16 +211,16 @@ output_to_tetgen(std::string filename, if ( rebind ) { if ( show_patches ) - Mesh_3::output_to_tetgen(filename,c3t3); + SMDS_3::output_to_tetgen(filename,c3t3); else - Mesh_3::output_to_tetgen(filename,c3t3); + SMDS_3::output_to_tetgen(filename,c3t3); } else { if ( show_patches ) - Mesh_3::output_to_tetgen(filename,c3t3); + SMDS_3::output_to_tetgen(filename,c3t3); else - Mesh_3::output_to_tetgen(filename,c3t3); + SMDS_3::output_to_tetgen(filename,c3t3); } } diff --git a/thirdparty/CGAL/include/CGAL/IO/GOCAD.h b/thirdparty/CGAL/include/CGAL/IO/GOCAD.h index d61578a1..aa0df5ee 100644 --- a/thirdparty/CGAL/include/CGAL/IO/GOCAD.h +++ b/thirdparty/CGAL/include/CGAL/IO/GOCAD.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/GOCAD.h $ -// $Id: GOCAD.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/GOCAD.h $ +// $Id: include/CGAL/IO/GOCAD.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -24,11 +24,11 @@ #include #include -#include #include #include #include +#include namespace CGAL { @@ -195,7 +195,7 @@ bool read_GOCAD(std::istream& is, PolygonRange& polygons, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -240,7 +240,7 @@ bool read_GOCAD(const std::string& fname, PolygonRange& polygons, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -348,7 +348,7 @@ bool write_GOCAD(std::ostream& os, const PolygonRange& polygons, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -390,7 +390,7 @@ bool write_GOCAD(const std::string& fname, const PolygonRange& polygons, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/IO/Generic_writer.h b/thirdparty/CGAL/include/CGAL/IO/Generic_writer.h index a70ef6ff..4d4b4950 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Generic_writer.h +++ b/thirdparty/CGAL/include/CGAL/IO/Generic_writer.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/Generic_writer.h $ -// $Id: Generic_writer.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/Generic_writer.h $ +// $Id: include/CGAL/IO/Generic_writer.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Gps_iostream.h b/thirdparty/CGAL/include/CGAL/IO/Gps_iostream.h index 3ec8fec6..d3a4b83a 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Gps_iostream.h +++ b/thirdparty/CGAL/include/CGAL/IO/Gps_iostream.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/IO/Gps_iostream.h $ -// $Id: Gps_iostream.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/IO/Gps_iostream.h $ +// $Id: include/CGAL/IO/Gps_iostream.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,30 +19,61 @@ #include #include +#include #include #include namespace CGAL { -template -std::ostream & operator<< (std::ostream& os, - const CGAL::General_polygon_set_2 & pgn_set) -{ - typedef typename CGAL::General_polygon_set_2::Polygon_with_holes_2 - Polygon_with_holes_2; - typedef std::list Pgn_with_holes_container; - - Pgn_with_holes_container res; - pgn_set.polygons_with_holes (std::back_inserter (res)); +/*! Inserter operator for general polygons sets. + * Inserts a general polygon set into an output stream. + * \param os the output stream. + * \param pgn_set the general polygon set. + * \return the output stream. + */ +template +std::ostream& +operator<<(std::ostream& os, + const CGAL::General_polygon_set_2& pgn_set) { + using Geometry_traits_2 = GeomTraits_; + using Dcel = Dcel_; + using Gps = CGAL::General_polygon_set_2; + using Pwh_2 = typename Gps::Polygon_with_holes_2; + using Pgn_with_holes_container = std::list; + Pgn_with_holes_container pwhs; + pgn_set.polygons_with_holes(std::back_inserter(pwhs)); std::cout << pgn_set.number_of_polygons_with_holes() << std::endl; - std::copy(res.begin(), res.end(), - std::ostream_iterator(std::cout, "\n")); - + std::copy(pwhs.begin(), pwhs.end(), std::ostream_iterator(os, "\n")); return os; } +/*! Extractor operator for general polygons sets. + * Extracts a general polygon set from an input stream. + * \param is the input stream. + * \param pgn_set the general polygon set. + * \return the input stream. + */ +template +std::istream& +operator>>(std::istream& is, + CGAL::General_polygon_set_2& pgn_set) { + using Geometry_traits_2 = GeomTraits_; + using Dcel = Dcel_; + using Gps = CGAL::General_polygon_set_2; + using Pwh_2 = typename Gps::Polygon_with_holes_2; + + int n; + is >> n; + for (int i = 0; i < n; ++i) { + Pwh_2 pwh; + is >> pwh; + pgn_set.insert(pwh); + } + return is; +} + } //namespace CGAL #include diff --git a/thirdparty/CGAL/include/CGAL/IO/Istream_iterator.h b/thirdparty/CGAL/include/CGAL/IO/Istream_iterator.h index 02d5d449..03b98da6 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Istream_iterator.h +++ b/thirdparty/CGAL/include/CGAL/IO/Istream_iterator.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/Istream_iterator.h $ -// $Id: Istream_iterator.h 580a1ef 2020-05-22T15:31:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/Istream_iterator.h $ +// $Id: include/CGAL/IO/Istream_iterator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -28,7 +28,7 @@ The class `Istream_iterator` is an input iterator adaptor for the input stream class `Stream` and value type `T`. It is particularly useful for classes that are similar but not compatible to `std::istream`. -\cgalModels `InputIterator` +\cgalModels{InputIterator} */ template class Istream_iterator diff --git a/thirdparty/CGAL/include/CGAL/IO/Nef_polyhedron_2_PS_stream.h b/thirdparty/CGAL/include/CGAL/IO/Nef_polyhedron_2_PS_stream.h index 5aa617e3..7769e947 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Nef_polyhedron_2_PS_stream.h +++ b/thirdparty/CGAL/include/CGAL/IO/Nef_polyhedron_2_PS_stream.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/IO/Nef_polyhedron_2_PS_stream.h $ -// $Id: Nef_polyhedron_2_PS_stream.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/IO/Nef_polyhedron_2_PS_stream.h $ +// $Id: include/CGAL/IO/Nef_polyhedron_2_PS_stream.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Nef_polyhedron_iostream_3.h b/thirdparty/CGAL/include/CGAL/IO/Nef_polyhedron_iostream_3.h index 1d792b66..1e85d888 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Nef_polyhedron_iostream_3.h +++ b/thirdparty/CGAL/include/CGAL/IO/Nef_polyhedron_iostream_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/IO/Nef_polyhedron_iostream_3.h $ -// $Id: Nef_polyhedron_iostream_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/IO/Nef_polyhedron_iostream_3.h $ +// $Id: include/CGAL/IO/Nef_polyhedron_iostream_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/OBJ.h b/thirdparty/CGAL/include/CGAL/IO/OBJ.h index cc8bf08d..5105927f 100644 --- a/thirdparty/CGAL/include/CGAL/IO/OBJ.h +++ b/thirdparty/CGAL/include/CGAL/IO/OBJ.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/OBJ.h $ -// $Id: OBJ.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/OBJ.h $ +// $Id: include/CGAL/IO/OBJ.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Lutz Kettner @@ -22,14 +22,15 @@ #include #include -#include #include +#include #include #include #include #include #include +#include namespace CGAL { @@ -67,12 +68,30 @@ bool read_OBJ(std::istream& is, bool tex_found(false), norm_found(false); while(getline(is, line)) { - if(line.empty()) - continue; + // get last non-whitespace, non-null character + auto last = std::find_if(line.rbegin(), line.rend(), [](char c) { return c != '\0' && !std::isspace(c); }); + if(last == line.rend()) + continue; // line is empty or only whitespace + + // keep reading lines as long as the last non-whitespace, non-null character is a backslash + while(last != line.rend() && *last == '\\') + { + // remove everything from the backslash (included) + line = line.substr(0, line.size() - (last - line.rbegin()) - 1); + + std::string next_line; + if(!getline(is, next_line)) + break; + + line += next_line; + last = std::find_if(line.rbegin(), line.rend(), [](char c) { return c != '\0' && !std::isspace(c); }); + } + + CGAL_assertion(!line.empty()); std::istringstream iss(line); if(!(iss >> s)) - continue; // can't read anything on the line, whitespace only? + continue; if(s == "v") { @@ -122,7 +141,11 @@ bool read_OBJ(std::istream& is, } if(iss.bad()) + { + if(verbose) + std::cerr << "error while reading OBJ face." << std::endl; return false; + } } else if(s.front() == '#') { @@ -140,7 +163,7 @@ bool read_OBJ(std::istream& is, s == "scrv" || s == "sp" || s == "end" || s == "con" || s == "surf_1" || s == "q0_1" || s == "q1_1" || s == "curv2d_1" || s == "surf_2" || s == "q0_2" || s == "q1_2" || s == "curv2d_2" || - // supersed statements + // superseded statements s == "bsp" || s == "bzp" || s == "cdc" || s == "cdp" || s == "res") { // valid, but unsupported @@ -148,15 +171,15 @@ bool read_OBJ(std::istream& is, else { if(verbose) - std::cerr << "error: unrecognized line: " << s << std::endl; + std::cerr << "Error: unrecognized line: " << s << std::endl; return false; } } if(norm_found && verbose) - std::cout<<"NOTE: normals were found in this file, but were discarded."< >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -257,7 +280,7 @@ bool read_OBJ(const std::string& fname, PolygonRange& polygons, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -305,7 +328,7 @@ bool write_OBJ(std::ostream& os, const PolygonRange& polygons, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -349,7 +372,7 @@ bool write_OBJ(const std::string& fname, const PolygonRange& polygons, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/IO/OBJ/File_writer_wavefront.h b/thirdparty/CGAL/include/CGAL/IO/OBJ/File_writer_wavefront.h index 457b6f05..fe0ae9c2 100644 --- a/thirdparty/CGAL/include/CGAL/IO/OBJ/File_writer_wavefront.h +++ b/thirdparty/CGAL/include/CGAL/IO/OBJ/File_writer_wavefront.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/OBJ/File_writer_wavefront.h $ -// $Id: File_writer_wavefront.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/OBJ/File_writer_wavefront.h $ +// $Id: include/CGAL/IO/OBJ/File_writer_wavefront.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/OFF.h b/thirdparty/CGAL/include/CGAL/IO/OFF.h index 9d70cb48..ff0f5a90 100644 --- a/thirdparty/CGAL/include/CGAL/IO/OFF.h +++ b/thirdparty/CGAL/include/CGAL/IO/OFF.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/OFF.h $ -// $Id: OFF.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/OFF.h $ +// $Id: include/CGAL/IO/OFF.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau and Sebastien Loriot @@ -26,11 +26,11 @@ #include #include -#include #include #include #include +#include namespace CGAL { @@ -184,7 +184,7 @@ bool read_OFF(std::istream& is, PolygonRange& polygons, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -237,7 +237,7 @@ bool read_OFF(const std::string& fname, PolygonRange& polygons, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -282,7 +282,7 @@ bool write_OFF(std::ostream& os, const PolygonRange& polygons, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -323,7 +323,7 @@ bool write_OFF(const std::string& fname, const PolygonRange& polygons, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_OFF.h b/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_OFF.h index dc283d26..392d8d77 100644 --- a/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_OFF.h +++ b/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_OFF.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/OFF/File_header_OFF.h $ -// $Id: File_header_OFF.h 277b8cc 2020-11-25T13:20:26+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/OFF/File_header_OFF.h $ +// $Id: include/CGAL/IO/OFF/File_header_OFF.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -29,7 +29,7 @@ class CGAL_EXPORT File_header_OFF : public File_header_extended_OFF { private: - // Publicly accessible file informations. + // Publicly accessible file information. std::size_t n_vertices; std::size_t n_facets; bool m_skel; // SKEL format instead of OFF. @@ -37,7 +37,7 @@ class CGAL_EXPORT File_header_OFF bool m_no_comments; // no comments in output. std::size_t m_offset; // index offset for vertices, usually 0. - // Publicly accessible but not that well supported file informations. + // Publicly accessible but not that well supported file information. bool m_textures; // STOFF detected. bool m_colors; // COFF detected. protected: @@ -46,7 +46,7 @@ class CGAL_EXPORT File_header_OFF private: bool m_normals; // NOFF format stores also normals at vertices. - // More privately used file informations to scan the file. + // More privately used file information to scan the file. bool m_tag4; // 4OFF detected. bool m_tagDim; // nOFF detected (will not be supported). int m_dim; // dimension for nOFF (will not be supported). diff --git a/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_OFF_impl.h b/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_OFF_impl.h index 9b8b939f..6a53fdb5 100644 --- a/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_OFF_impl.h +++ b/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_OFF_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/OFF/File_header_OFF_impl.h $ -// $Id: File_header_OFF_impl.h ab49226 2021-04-09T13:13:56+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/OFF/File_header_OFF_impl.h $ +// $Id: include/CGAL/IO/OFF/File_header_OFF_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -348,7 +348,7 @@ std::istream& operator>>( std::istream& in, File_header_OFF& h) { // Read remaining size value(s). int n_h; if ( h.binary()) { - boost::int32_t a, b, c; + std::int32_t a, b, c; I_Binary_read_big_endian_integer32( in, a); if ( h.n_dimensional()) { h.set_dimension( a); diff --git a/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_extended_OFF.h b/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_extended_OFF.h index 7fc4b532..1b960f4d 100644 --- a/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_extended_OFF.h +++ b/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_extended_OFF.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/OFF/File_header_extended_OFF.h $ -// $Id: File_header_extended_OFF.h 580a1ef 2020-05-22T15:31:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/OFF/File_header_extended_OFF.h $ +// $Id: include/CGAL/IO/OFF/File_header_extended_OFF.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_extended_OFF_impl.h b/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_extended_OFF_impl.h index 347b42e2..760bf0de 100644 --- a/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_extended_OFF_impl.h +++ b/thirdparty/CGAL/include/CGAL/IO/OFF/File_header_extended_OFF_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/OFF/File_header_extended_OFF_impl.h $ -// $Id: File_header_extended_OFF_impl.h ae75594 2021-03-10T13:54:09+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/OFF/File_header_extended_OFF_impl.h $ +// $Id: include/CGAL/IO/OFF/File_header_extended_OFF_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/OFF/File_scanner_OFF.h b/thirdparty/CGAL/include/CGAL/IO/OFF/File_scanner_OFF.h index 80b50d4d..98773b0f 100644 --- a/thirdparty/CGAL/include/CGAL/IO/OFF/File_scanner_OFF.h +++ b/thirdparty/CGAL/include/CGAL/IO/OFF/File_scanner_OFF.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h $ -// $Id: File_scanner_OFF.h ec00fa3 2023-02-16T10:21:09+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h $ +// $Id: include/CGAL/IO/OFF/File_scanner_OFF.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -656,7 +656,7 @@ class File_scanner_OFF if(has_colors()) { - boost::int32_t k; + std::int32_t k; I_Binary_read_big_endian_integer32(m_in, k); if(k<0 || k>4) { @@ -688,7 +688,7 @@ class File_scanner_OFF CGAL_assertion(current_facet < size_of_facets()); if(binary()) { - boost::int32_t i32; + std::int32_t i32; I_Binary_read_big_endian_integer32(m_in, i32); size = i32; } @@ -735,7 +735,7 @@ class File_scanner_OFF std::size_t current_facet) { if(binary()){ - boost::int32_t i32; + std::int32_t i32; I_Binary_read_big_endian_integer32(m_in, i32); index = i32; } @@ -790,10 +790,10 @@ class File_scanner_OFF void skip_to_next_facet(std::size_t current_facet) { - // Take care of trailing informations like color triples. + // Take care of trailing information like color triples. if(binary()) { - boost::int32_t k; + std::int32_t k; I_Binary_read_big_endian_integer32(m_in, k); if(k<0 || k>4) { diff --git a/thirdparty/CGAL/include/CGAL/IO/OFF/File_writer_OFF.h b/thirdparty/CGAL/include/CGAL/IO/OFF/File_writer_OFF.h index 0dafe472..2ab28014 100644 --- a/thirdparty/CGAL/include/CGAL/IO/OFF/File_writer_OFF.h +++ b/thirdparty/CGAL/include/CGAL/IO/OFF/File_writer_OFF.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/OFF/File_writer_OFF.h $ -// $Id: File_writer_OFF.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/OFF/File_writer_OFF.h $ +// $Id: include/CGAL/IO/OFF/File_writer_OFF.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -129,7 +129,7 @@ class File_writer_OFF void write_facet_begin(std::size_t no) { if(m_header.binary()) - I_Binary_write_big_endian_integer32(out(), static_cast(no)); + I_Binary_write_big_endian_integer32(out(), static_cast(no)); else out() << no << ' '; } @@ -137,7 +137,7 @@ class File_writer_OFF void write_facet_vertex_index(std::size_t index) { if(m_header.binary()) - I_Binary_write_big_endian_integer32(out(), static_cast(index)); + I_Binary_write_big_endian_integer32(out(), static_cast(index)); else out() << ' ' << index; } diff --git a/thirdparty/CGAL/include/CGAL/IO/OFF/Scanner_OFF.h b/thirdparty/CGAL/include/CGAL/IO/OFF/Scanner_OFF.h index 59666074..c819210f 100644 --- a/thirdparty/CGAL/include/CGAL/IO/OFF/Scanner_OFF.h +++ b/thirdparty/CGAL/include/CGAL/IO/OFF/Scanner_OFF.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/OFF/Scanner_OFF.h $ -// $Id: Scanner_OFF.h 277b8cc 2020-11-25T13:20:26+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/OFF/Scanner_OFF.h $ +// $Id: include/CGAL/IO/OFF/Scanner_OFF.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/OFF/generic_copy_OFF.h b/thirdparty/CGAL/include/CGAL/IO/OFF/generic_copy_OFF.h index 4a6d8bec..6cee1afe 100644 --- a/thirdparty/CGAL/include/CGAL/IO/OFF/generic_copy_OFF.h +++ b/thirdparty/CGAL/include/CGAL/IO/OFF/generic_copy_OFF.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/OFF/generic_copy_OFF.h $ -// $Id: generic_copy_OFF.h 32f40d8 2021-11-11T15:19:28+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/OFF/generic_copy_OFF.h $ +// $Id: include/CGAL/IO/OFF/generic_copy_OFF.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/OI.h b/thirdparty/CGAL/include/CGAL/IO/OI.h index 96f8a217..f79758e1 100644 --- a/thirdparty/CGAL/include/CGAL/IO/OI.h +++ b/thirdparty/CGAL/include/CGAL/IO/OI.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/OI.h $ -// $Id: OI.h 220a445 2020-01-17T17:10:02+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/OI.h $ +// $Id: include/CGAL/IO/OI.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Lutz Kettner diff --git a/thirdparty/CGAL/include/CGAL/IO/OI/File_writer_inventor.h b/thirdparty/CGAL/include/CGAL/IO/OI/File_writer_inventor.h index 3813c6c2..7e37ddcd 100644 --- a/thirdparty/CGAL/include/CGAL/IO/OI/File_writer_inventor.h +++ b/thirdparty/CGAL/include/CGAL/IO/OI/File_writer_inventor.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/OI/File_writer_inventor.h $ -// $Id: File_writer_inventor.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/OI/File_writer_inventor.h $ +// $Id: include/CGAL/IO/OI/File_writer_inventor.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/OI/Inventor_ostream.h b/thirdparty/CGAL/include/CGAL/IO/OI/Inventor_ostream.h index b6ef654a..c1a905b4 100644 --- a/thirdparty/CGAL/include/CGAL/IO/OI/Inventor_ostream.h +++ b/thirdparty/CGAL/include/CGAL/IO/OI/Inventor_ostream.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h $ -// $Id: Inventor_ostream.h 2dac31f 2021-02-05T14:14:11+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h $ +// $Id: include/CGAL/IO/OI/Inventor_ostream.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -61,7 +61,7 @@ class Inventor_ostream_base { // The behaviour if m_os == nullptr could be changed to return // cerr or a file handle to /dev/null. The latter one would - // mimick the behaviour that one can still use a stream with + // mimic the behaviour that one can still use a stream with // an invalid stream, but without producing any output. CGAL_assertion( m_os != nullptr ); return *m_os; diff --git a/thirdparty/CGAL/include/CGAL/IO/Ostream_iterator.h b/thirdparty/CGAL/include/CGAL/IO/Ostream_iterator.h index 094eb0cc..e2deef12 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Ostream_iterator.h +++ b/thirdparty/CGAL/include/CGAL/IO/Ostream_iterator.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/Ostream_iterator.h $ -// $Id: Ostream_iterator.h 580a1ef 2020-05-22T15:31:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/Ostream_iterator.h $ +// $Id: include/CGAL/IO/Ostream_iterator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -46,7 +46,7 @@ class Ostream_proxy The class `Ostream_iterator` is an output iterator adaptor for the output stream class `Stream` and value type `T`. -\cgalModels `OutputIterator` +\cgalModels{OutputIterator} \cgalHeading{Implementation} diff --git a/thirdparty/CGAL/include/CGAL/IO/PLY.h b/thirdparty/CGAL/include/CGAL/IO/PLY.h index e693e427..5a98f132 100644 --- a/thirdparty/CGAL/include/CGAL/IO/PLY.h +++ b/thirdparty/CGAL/include/CGAL/IO/PLY.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/PLY.h $ -// $Id: PLY.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/PLY.h $ +// $Id: include/CGAL/IO/PLY.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -31,6 +30,7 @@ #include #include #include +#include namespace CGAL { @@ -41,7 +41,7 @@ namespace CGAL { namespace IO { namespace internal { -// HEdgesRange" = range of std::pair +// HEdgesRange = range of std::pair // HUVRange = range of std::pair template bool read_PLY(std::istream& is, @@ -52,7 +52,7 @@ bool read_PLY(std::istream& is, ColorOutputIterator vc_out, HUVOutputIterator huvs_out, const bool verbose = false, - typename std::enable_if::value>::type* = nullptr) + std::enable_if_t::value>* = nullptr) { typedef typename boost::range_value::type Point_3; typedef CGAL::IO::Color Color_rgb; @@ -81,13 +81,13 @@ bool read_PLY(std::istream& is, bool has_colors = false; std::string rtag = "r", gtag = "g", btag = "b"; - if((element.has_property("red") || element.has_property("r")) && - (element.has_property("green") || element.has_property("g")) && - (element.has_property("blue") || element.has_property("b"))) + if((element.has_property("red") || element.has_property("r")) && + (element.has_property("green") || element.has_property("g")) && + (element.has_property("blue") || element.has_property("b"))) { has_colors = true; - if(element.has_property("red")) + if(element.has_property("red")) { rtag = "red"; gtag = "green"; @@ -106,17 +106,17 @@ bool read_PLY(std::istream& is, return false; } - std::tuple new_vertex; + std::tuple new_vertex; if(has_colors) { internal::process_properties(element, new_vertex, make_ply_point_reader(CGAL::make_nth_of_tuple_property_map<0>(new_vertex)), std::make_pair(CGAL::make_nth_of_tuple_property_map<1>(new_vertex), - PLY_property(rtag.c_str())), + PLY_property(rtag.c_str())), std::make_pair(CGAL::make_nth_of_tuple_property_map<2>(new_vertex), - PLY_property(gtag.c_str())), + PLY_property(gtag.c_str())), std::make_pair(CGAL::make_nth_of_tuple_property_map<3>(new_vertex), - PLY_property(btag.c_str()))); + PLY_property(btag.c_str()))); *vc_out++ = Color_rgb(get<1>(new_vertex), get<2>(new_vertex), get<3>(new_vertex)); } @@ -131,21 +131,21 @@ bool read_PLY(std::istream& is, } else if(element.name() == "face" || element.name() == "faces") { - if(element.has_property >("vertex_indices")) + if(element.has_property >("vertex_indices")) { - internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_indices"); + internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_indices"); } - else if(element.has_property >("vertex_indices")) + else if(element.has_property >("vertex_indices")) { - internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_indices"); + internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_indices"); } - else if(element.has_property >("vertex_index")) + else if(element.has_property >("vertex_index")) { - internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_index"); + internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_index"); } - else if(element.has_property >("vertex_index")) + else if(element.has_property >("vertex_index")) { - internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_index"); + internal::read_PLY_faces(is, element, polygons, fc_out, "vertex_index"); } else { @@ -233,7 +233,7 @@ bool read_PLY(std::istream& is, ColorRange& vcolors, HUVRange& huvs, const bool verbose = false, - typename boost::enable_if >::type* = nullptr) + std::enable_if_t::value>* = nullptr) { return internal::read_PLY(is, points, polygons, std::back_inserter(hedges), @@ -309,7 +309,7 @@ bool read_PLY(std::istream& is, PolygonRange& polygons, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -369,7 +369,7 @@ bool read_PLY(const std::string& fname, PolygonRange& polygons, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -432,7 +432,7 @@ bool write_PLY(std::ostream& out, const PolygonRange& polygons, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -511,7 +511,7 @@ bool write_PLY(const std::string& fname, const PolygonRange& polygons, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/IO/PLY/PLY_reader.h b/thirdparty/CGAL/include/CGAL/IO/PLY/PLY_reader.h index 664ba437..df68f6c3 100644 --- a/thirdparty/CGAL/include/CGAL/IO/PLY/PLY_reader.h +++ b/thirdparty/CGAL/include/CGAL/IO/PLY/PLY_reader.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/PLY/PLY_reader.h $ -// $Id: PLY_reader.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/PLY/PLY_reader.h $ +// $Id: include/CGAL/IO/PLY/PLY_reader.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include @@ -37,12 +37,12 @@ m_elements.back().add_property(new PLY_read_typed_list_with_typed_size< SIZE_TYPE , INDEX_TYPE >(name, format)) #define TRY_TO_GENERATE_LIST_PROPERTY(STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE) \ - TRY_TO_GENERATE_SIZED_LIST_PROPERTY("uchar", "uint8", boost::uint8_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ - else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("char", "int8", boost::int8_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ - else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("ushort", "uint16", boost::uint16_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ - else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("short", "int16", boost::int16_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ - else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("uint", "uint32", boost::uint32_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ - else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("int", "int32", boost::int32_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE) + TRY_TO_GENERATE_SIZED_LIST_PROPERTY("uchar", "uint8", std::uint8_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ + else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("char", "int8", std::int8_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ + else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("ushort", "uint16", std::uint16_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ + else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("short", "int16", std::int16_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ + else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("uint", "uint32", std::uint32_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE); \ + else TRY_TO_GENERATE_SIZED_LIST_PROPERTY("int", "int32", std::int32_t, STD_INDEX_TYPE, T_INDEX_TYPE, INDEX_TYPE) namespace CGAL { @@ -156,7 +156,7 @@ class PLY_read_number // The two following functions prevent the stream to only extract // ONE character (= what the types char imply) by requiring - // explicitely an integer object when reading the stream + // explicitly an integer object when reading the stream void read_ascii(std::istream& stream, char& c) const { short s; @@ -201,7 +201,7 @@ class PLY_read_number void read_ascii(std::istream& stream, double& t) const { - if(!(stream >> iformat(t))) + if(!(stream >> IO::iformat(t))) stream.clear(std::ios::badbit); } @@ -529,23 +529,23 @@ class PLY_reader return false; } - TRY_TO_GENERATE_LIST_PROPERTY("char", "int8", boost::int8_t); - else TRY_TO_GENERATE_LIST_PROPERTY("uchar", "uint8", boost::uint8_t); - else TRY_TO_GENERATE_LIST_PROPERTY("short", "int16", boost::int16_t); - else TRY_TO_GENERATE_LIST_PROPERTY("ushort", "uint16", boost::uint16_t); - else TRY_TO_GENERATE_LIST_PROPERTY("int", "int32", boost::int32_t); - else TRY_TO_GENERATE_LIST_PROPERTY("uint", "uint32", boost::uint32_t); + TRY_TO_GENERATE_LIST_PROPERTY("char", "int8", std::int8_t); + else TRY_TO_GENERATE_LIST_PROPERTY("uchar", "uint8", std::uint8_t); + else TRY_TO_GENERATE_LIST_PROPERTY("short", "int16", std::int16_t); + else TRY_TO_GENERATE_LIST_PROPERTY("ushort", "uint16", std::uint16_t); + else TRY_TO_GENERATE_LIST_PROPERTY("int", "int32", std::int32_t); + else TRY_TO_GENERATE_LIST_PROPERTY("uint", "uint32", std::uint32_t); else TRY_TO_GENERATE_LIST_PROPERTY("float", "float32", float); else TRY_TO_GENERATE_LIST_PROPERTY("double", "float64", double); } else { - TRY_TO_GENERATE_PROPERTY("char", "int8", boost::int8_t); - else TRY_TO_GENERATE_PROPERTY("uchar", "uint8", boost::uint8_t); - else TRY_TO_GENERATE_PROPERTY("short", "int16", boost::int16_t); - else TRY_TO_GENERATE_PROPERTY("ushort", "uint16", boost::uint16_t); - else TRY_TO_GENERATE_PROPERTY("int", "int32", boost::int32_t); - else TRY_TO_GENERATE_PROPERTY("uint", "uint32", boost::uint32_t); + TRY_TO_GENERATE_PROPERTY("char", "int8", std::int8_t); + else TRY_TO_GENERATE_PROPERTY("uchar", "uint8", std::uint8_t); + else TRY_TO_GENERATE_PROPERTY("short", "int16", std::int16_t); + else TRY_TO_GENERATE_PROPERTY("ushort", "uint16", std::uint16_t); + else TRY_TO_GENERATE_PROPERTY("int", "int32", std::int32_t); + else TRY_TO_GENERATE_PROPERTY("uint", "uint32", std::uint32_t); else TRY_TO_GENERATE_PROPERTY("float", "float32", float); else TRY_TO_GENERATE_PROPERTY("double", "float64", double); } @@ -704,21 +704,19 @@ bool read_PLY_faces(std::istream& in, PolygonRange& polygons, ColorOutputIterator fc_out, const char* vertex_indices_tag, - typename std::enable_if< - CGAL::is_iterator::value - >::type* = nullptr) + std::enable_if_t::value>* = nullptr) { typedef CGAL::IO::Color Color_rgb; bool has_colors = false; std::string rtag = "r", gtag = "g", btag = "b"; - if((element.has_property("red") || element.has_property("r")) && - (element.has_property("green") || element.has_property("g")) && - (element.has_property("blue") || element.has_property("b"))) + if((element.has_property("red") || element.has_property("r")) && + (element.has_property("green") || element.has_property("g")) && + (element.has_property("blue") || element.has_property("b"))) { has_colors = true; - if(element.has_property("red")) + if(element.has_property("red")) { rtag = "red"; gtag = "green"; @@ -737,7 +735,7 @@ bool read_PLY_faces(std::istream& in, return false; } - std::tuple, boost::uint8_t, boost::uint8_t, boost::uint8_t> new_face; + std::tuple, std::uint8_t, std::uint8_t, std::uint8_t> new_face; if(has_colors) { @@ -745,11 +743,11 @@ bool read_PLY_faces(std::istream& in, std::make_pair(CGAL::make_nth_of_tuple_property_map<0>(new_face), PLY_property >(vertex_indices_tag)), std::make_pair(CGAL::make_nth_of_tuple_property_map<1>(new_face), - PLY_property(rtag.c_str())), + PLY_property(rtag.c_str())), std::make_pair(CGAL::make_nth_of_tuple_property_map<2>(new_face), - PLY_property(gtag.c_str())), + PLY_property(gtag.c_str())), std::make_pair(CGAL::make_nth_of_tuple_property_map<3>(new_face), - PLY_property(btag.c_str()))); + PLY_property(btag.c_str()))); *fc_out++ = Color_rgb(get<1>(new_face), get<2>(new_face), get<3>(new_face)); } @@ -775,9 +773,9 @@ bool read_PLY_faces(std::istream& in, PolygonRange& polygons, ColorRange& fcolors, const char* vertex_indices_tag, - typename boost::enable_if< - typename boost::has_range_const_iterator::type - >::type* = nullptr) + std::enable_if_t< + boost::has_range_const_iterator::value + >* = nullptr) { return read_PLY_faces(in, element, polygons, std::back_inserter(fcolors), vertex_indices_tag); } diff --git a/thirdparty/CGAL/include/CGAL/IO/PLY/PLY_writer.h b/thirdparty/CGAL/include/CGAL/IO/PLY/PLY_writer.h index f248773e..f9822bb4 100644 --- a/thirdparty/CGAL/include/CGAL/IO/PLY/PLY_writer.h +++ b/thirdparty/CGAL/include/CGAL/IO/PLY/PLY_writer.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/PLY/PLY_writer.h $ -// $Id: PLY_writer.h 4eb1464 2021-11-09T11:21:24+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/PLY/PLY_writer.h $ +// $Id: include/CGAL/IO/PLY/PLY_writer.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -275,25 +275,37 @@ class Simple_property_printer } }; -template -class Char_property_printer +template ::value_type, + typename ElementType = typename VectorType::value_type> +class Simple_property_vector_printer : public Abstract_property_printer { - typedef typename boost::property_traits::value_type Type; - PropertyMap m_pmap; - public: - Char_property_printer(const PropertyMap& pmap) : m_pmap(pmap) { } + Simple_property_vector_printer(const PropertyMap& pmap) : m_pmap(pmap) { } virtual void print(std::ostream& stream, const Index& index) { + const VectorType& vec = get(m_pmap, index); if(get_mode(stream) == CGAL::IO::ASCII) - stream << int(get(m_pmap, index)); + { + stream << vec.size(); + for(const ElementType& v : vec) + { + stream << " " << v; + } + } else { - Type t = get(m_pmap, index); - stream.write(reinterpret_cast(&t), sizeof(t)); + unsigned char size = (unsigned char)(vec.size()); + stream.write(reinterpret_cast(&size), sizeof(size)); + for(const ElementType& v : vec) + { + ElementType t = ElementType(v); + stream.write(reinterpret_cast(&t), sizeof(t)); + } } } }; diff --git a/thirdparty/CGAL/include/CGAL/IO/Polyhedron_OFF_iostream.h b/thirdparty/CGAL/include/CGAL/IO/Polyhedron_OFF_iostream.h index e5c96b50..8107cbd7 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Polyhedron_OFF_iostream.h +++ b/thirdparty/CGAL/include/CGAL/IO/Polyhedron_OFF_iostream.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/IO/Polyhedron_OFF_iostream.h $ -// $Id: Polyhedron_OFF_iostream.h 477353d 2022-04-20T15:55:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/IO/Polyhedron_OFF_iostream.h $ +// $Id: include/CGAL/IO/Polyhedron_OFF_iostream.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Polyhedron_VRML_1_ostream.h b/thirdparty/CGAL/include/CGAL/IO/Polyhedron_VRML_1_ostream.h index e2bfef79..88411e81 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Polyhedron_VRML_1_ostream.h +++ b/thirdparty/CGAL/include/CGAL/IO/Polyhedron_VRML_1_ostream.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/IO/Polyhedron_VRML_1_ostream.h $ -// $Id: Polyhedron_VRML_1_ostream.h 580a1ef 2020-05-22T15:31:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/IO/Polyhedron_VRML_1_ostream.h $ +// $Id: include/CGAL/IO/Polyhedron_VRML_1_ostream.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Polyhedron_VRML_2_ostream.h b/thirdparty/CGAL/include/CGAL/IO/Polyhedron_VRML_2_ostream.h index a104b6ad..627459d4 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Polyhedron_VRML_2_ostream.h +++ b/thirdparty/CGAL/include/CGAL/IO/Polyhedron_VRML_2_ostream.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/IO/Polyhedron_VRML_2_ostream.h $ -// $Id: Polyhedron_VRML_2_ostream.h 135595c 2020-01-24T23:17:20+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/IO/Polyhedron_VRML_2_ostream.h $ +// $Id: include/CGAL/IO/Polyhedron_VRML_2_ostream.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Lutz Kettner diff --git a/thirdparty/CGAL/include/CGAL/IO/Polyhedron_inventor_ostream.h b/thirdparty/CGAL/include/CGAL/IO/Polyhedron_inventor_ostream.h index 54625fc4..8661a485 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Polyhedron_inventor_ostream.h +++ b/thirdparty/CGAL/include/CGAL/IO/Polyhedron_inventor_ostream.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/IO/Polyhedron_inventor_ostream.h $ -// $Id: Polyhedron_inventor_ostream.h 580a1ef 2020-05-22T15:31:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/IO/Polyhedron_inventor_ostream.h $ +// $Id: include/CGAL/IO/Polyhedron_inventor_ostream.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Polyhedron_iostream.h b/thirdparty/CGAL/include/CGAL/IO/Polyhedron_iostream.h index 9369fa29..f34d46bf 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Polyhedron_iostream.h +++ b/thirdparty/CGAL/include/CGAL/IO/Polyhedron_iostream.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/IO/Polyhedron_iostream.h $ -// $Id: Polyhedron_iostream.h 115fa5a 2021-12-14T14:01:21+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/IO/Polyhedron_iostream.h $ +// $Id: include/CGAL/IO/Polyhedron_iostream.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Polyhedron_scan_OFF.h b/thirdparty/CGAL/include/CGAL/IO/Polyhedron_scan_OFF.h index c7433181..d58c1a99 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Polyhedron_scan_OFF.h +++ b/thirdparty/CGAL/include/CGAL/IO/Polyhedron_scan_OFF.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/IO/Polyhedron_scan_OFF.h $ -// $Id: Polyhedron_scan_OFF.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/IO/Polyhedron_scan_OFF.h $ +// $Id: include/CGAL/IO/Polyhedron_scan_OFF.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Progress_bar.h b/thirdparty/CGAL/include/CGAL/IO/Progress_bar.h new file mode 100644 index 00000000..6b5c8b6d --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/IO/Progress_bar.h @@ -0,0 +1,85 @@ +// +// Created by Ivan Pađen on 07/07/2023. +// + +#ifndef WRAPWRAP_PROGRESS_BAR_H +#define WRAPWRAP_PROGRESS_BAR_H + +#include +#include + +namespace CGAL { + +namespace IO { + +class Progress_bar { +public: + Progress_bar(const int size, const int print_nth) + : m_size(size), m_print_nth(print_nth), m_current(0) + {} + + void increment_progress() {++m_current;} + + void print_progress(const bool finished = false) const + { + double percent; + if (finished) + percent = 100; + else + { + if ((m_current % m_print_nth) != 0) return; + percent = 100. * double(m_current) / double(m_size); + } + + std::string bar; + +#ifdef CGAL_PROGRESS_BAR_DEBUG + std::cout << std::endl; + std::cout << percent << std::endl; + std::cout << m_current << std::endl; + std::cout << m_size << std::endl; +#endif + + for (int i = 0; i < 50; i++) { + if (i < (percent / 2)) { + bar.replace(i, 1, "="); + } + else if (i == (percent / 2)) { + bar.replace(i, 1, ">"); + } + else { + bar.replace(i, 1, " "); + } + } + std::clog << "\r" " [" << bar << "] "; + std::clog.width(3); + std::clog << percent << std::fixed << std::setprecision(0) << "% " << std::flush; + } + + void increment_and_print() + { + increment_progress(); + print_progress(); + } + + void finish() + { + print_progress(true); + std::cout << std::endl; + } + + int get_current() const + { + return m_current; + } + +private: + const int m_size; + const int m_print_nth; + int m_current; +}; + +} //namespace IO + +} //namespace CGAL +#endif //WRAPWRAP_PROGRESS_BAR_H diff --git a/thirdparty/CGAL/include/CGAL/IO/STL.h b/thirdparty/CGAL/include/CGAL/IO/STL.h index ed4f7ce8..f7183ebd 100644 --- a/thirdparty/CGAL/include/CGAL/IO/STL.h +++ b/thirdparty/CGAL/include/CGAL/IO/STL.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/STL.h $ -// $Id: STL.h fd950da 2022-03-15T12:27:10+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/STL.h $ +// $Id: include/CGAL/IO/STL.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno @@ -23,8 +23,8 @@ #include #include -#include +#include #include #include #include @@ -74,7 +74,7 @@ bool read_STL(std::istream& is, TriangleRange& facets, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -193,7 +193,7 @@ bool read_STL(const std::string& fname, TriangleRange& facets, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -282,7 +282,7 @@ bool write_STL(std::ostream& os, const TriangleRange& facets, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -308,7 +308,7 @@ bool write_STL(std::ostream& os, if(get_mode(os) == BINARY) { os << "FileType: Binary "; - const boost::uint32_t N32 = static_cast(facets.size()); + const std::uint32_t N32 = static_cast(facets.size()); os.write(reinterpret_cast(&N32), sizeof(N32)); for(const Triangle& face : facets) @@ -392,7 +392,7 @@ bool write_STL(const std::string& fname, const TriangleRange& facets, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/IO/STL/STL_reader.h b/thirdparty/CGAL/include/CGAL/IO/STL/STL_reader.h index e8f77f34..17bd17c0 100644 --- a/thirdparty/CGAL/include/CGAL/IO/STL/STL_reader.h +++ b/thirdparty/CGAL/include/CGAL/IO/STL/STL_reader.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/STL/STL_reader.h $ -// $Id: STL_reader.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/STL/STL_reader.h $ +// $Id: include/CGAL/IO/STL/STL_reader.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri, @@ -75,7 +75,7 @@ bool read_ASCII_facet(std::istream& is, return false; } - if(!(is >> iformat(x) >> iformat(y) >> iformat(z))) + if(!(is >> IO::iformat(x) >> IO::iformat(y) >> IO::iformat(z))) { if(verbose) std::cerr << "Error while reading point coordinates (premature end of file)" << std::endl; @@ -209,7 +209,7 @@ bool parse_binary_STL(std::istream& is, int index = 0; std::map index_map; - boost::uint32_t N32; + std::uint32_t N32; if(!(is.read(reinterpret_cast(&N32), sizeof(N32)))) { if(verbose) diff --git a/thirdparty/CGAL/include/CGAL/IO/Tee_for_output_iterator.h b/thirdparty/CGAL/include/CGAL/IO/Tee_for_output_iterator.h index 83b0df60..b8c59ef0 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Tee_for_output_iterator.h +++ b/thirdparty/CGAL/include/CGAL/IO/Tee_for_output_iterator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/IO/Tee_for_output_iterator.h $ -// $Id: Tee_for_output_iterator.h 319383c 2020-05-20T09:47:58+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/IO/Tee_for_output_iterator.h $ +// $Id: include/CGAL/IO/Tee_for_output_iterator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Triangulation_off_ostream.h b/thirdparty/CGAL/include/CGAL/IO/Triangulation_off_ostream.h index 1f4b316b..fbf129c6 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Triangulation_off_ostream.h +++ b/thirdparty/CGAL/include/CGAL/IO/Triangulation_off_ostream.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/IO/Triangulation_off_ostream.h $ -// $Id: Triangulation_off_ostream.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/IO/Triangulation_off_ostream.h $ +// $Id: include/CGAL/IO/Triangulation_off_ostream.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Clement Jamin @@ -13,6 +13,9 @@ #ifndef CGAL_TRIANGULATION_IO_H #define CGAL_TRIANGULATION_IO_H +#include + + #include #include #include diff --git a/thirdparty/CGAL/include/CGAL/IO/Triangulation_off_ostream_2.h b/thirdparty/CGAL/include/CGAL/IO/Triangulation_off_ostream_2.h index d47f7285..fda1041d 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Triangulation_off_ostream_2.h +++ b/thirdparty/CGAL/include/CGAL/IO/Triangulation_off_ostream_2.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/IO/Triangulation_off_ostream_2.h $ -// $Id: Triangulation_off_ostream_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/IO/Triangulation_off_ostream_2.h $ +// $Id: include/CGAL/IO/Triangulation_off_ostream_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Clement Jamin @@ -13,6 +13,9 @@ #ifndef CGAL_TRIANGULATION_OFF_OSTREAM_2_H #define CGAL_TRIANGULATION_OFF_OSTREAM_2_H +#include + + #include #include #include diff --git a/thirdparty/CGAL/include/CGAL/IO/Triangulation_off_ostream_3.h b/thirdparty/CGAL/include/CGAL/IO/Triangulation_off_ostream_3.h index 1bb38f6e..7a081c54 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Triangulation_off_ostream_3.h +++ b/thirdparty/CGAL/include/CGAL/IO/Triangulation_off_ostream_3.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/IO/Triangulation_off_ostream_3.h $ -// $Id: Triangulation_off_ostream_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/IO/Triangulation_off_ostream_3.h $ +// $Id: include/CGAL/IO/Triangulation_off_ostream_3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Clement Jamin @@ -13,6 +13,9 @@ #ifndef CGAL_TRIANGULATION_OFF_OSTREAM_3_H #define CGAL_TRIANGULATION_OFF_OSTREAM_3_H +#include + + #include #include #include diff --git a/thirdparty/CGAL/include/CGAL/IO/Triangulation_ps_stream.h b/thirdparty/CGAL/include/CGAL/IO/Triangulation_ps_stream.h index 9de5db9b..848db9dd 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Triangulation_ps_stream.h +++ b/thirdparty/CGAL/include/CGAL/IO/Triangulation_ps_stream.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/IO/Triangulation_ps_stream.h $ -// $Id: Triangulation_ps_stream.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/IO/Triangulation_ps_stream.h $ +// $Id: include/CGAL/IO/Triangulation_ps_stream.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/VRML.h b/thirdparty/CGAL/include/CGAL/IO/VRML.h index c352e024..3cc135a1 100644 --- a/thirdparty/CGAL/include/CGAL/IO/VRML.h +++ b/thirdparty/CGAL/include/CGAL/IO/VRML.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/VRML.h $ -// $Id: VRML.h 6a5972c 2020-01-23T16:33:23+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/VRML.h $ +// $Id: include/CGAL/IO/VRML.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno diff --git a/thirdparty/CGAL/include/CGAL/IO/VRML/File_writer_VRML_2.h b/thirdparty/CGAL/include/CGAL/IO/VRML/File_writer_VRML_2.h index bf47b441..cad4144e 100644 --- a/thirdparty/CGAL/include/CGAL/IO/VRML/File_writer_VRML_2.h +++ b/thirdparty/CGAL/include/CGAL/IO/VRML/File_writer_VRML_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/VRML/File_writer_VRML_2.h $ -// $Id: File_writer_VRML_2.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/VRML/File_writer_VRML_2.h $ +// $Id: include/CGAL/IO/VRML/File_writer_VRML_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/VRML/VRML_1_ostream.h b/thirdparty/CGAL/include/CGAL/IO/VRML/VRML_1_ostream.h index 4f2deb94..20b4af03 100644 --- a/thirdparty/CGAL/include/CGAL/IO/VRML/VRML_1_ostream.h +++ b/thirdparty/CGAL/include/CGAL/IO/VRML/VRML_1_ostream.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/VRML/VRML_1_ostream.h $ -// $Id: VRML_1_ostream.h 1ef61f1 2020-10-13T18:13:01+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/VRML/VRML_1_ostream.h $ +// $Id: include/CGAL/IO/VRML/VRML_1_ostream.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/IO/VRML/VRML_2_ostream.h b/thirdparty/CGAL/include/CGAL/IO/VRML/VRML_2_ostream.h index 0302400f..33c9f048 100644 --- a/thirdparty/CGAL/include/CGAL/IO/VRML/VRML_2_ostream.h +++ b/thirdparty/CGAL/include/CGAL/IO/VRML/VRML_2_ostream.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h $ -// $Id: VRML_2_ostream.h 5ecd852 2021-04-26T21:37:02+01:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h $ +// $Id: include/CGAL/IO/VRML/VRML_2_ostream.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -57,7 +57,7 @@ class VRML_2_ostream { // The behaviour if m_os == nullptr could be changed to return // cerr or a file handle to /dev/null. The latter one would - // mimick the behaviour that one can still use a stream with + // mimic the behaviour that one can still use a stream with // an invalid stream, but without producing any output. CGAL_assertion( m_os != nullptr ); return *m_os; diff --git a/thirdparty/CGAL/include/CGAL/IO/VTK.h b/thirdparty/CGAL/include/CGAL/IO/VTK.h index ba3520c8..57875a65 100644 --- a/thirdparty/CGAL/include/CGAL/IO/VTK.h +++ b/thirdparty/CGAL/include/CGAL/IO/VTK.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/VTK.h $ -// $Id: VTK.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/VTK.h $ +// $Id: include/CGAL/IO/VTK.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno @@ -26,8 +26,10 @@ #include #include #include +#include #include #include +#include #endif #if defined(CGAL_USE_VTK) || defined(DOXYGEN_RUNNING) @@ -114,14 +116,14 @@ bool read_VTP(const std::string& fname, } /*! - * \ingroup PkgStreamSupportIoFuncsVTP + * \ingroup PkgStreamSupportIoFuncsVTK * * \brief reads the content of the input file into `points` and `polygons`, using the \ref IOStreamVTK. * * \attention The polygon soup is not cleared, and the data from the file are appended. * * \tparam PointRange a model of the concepts `RandomAccessContainer` and `BackInsertionSequence` - * whose value type is the point type + * whose `value_type` is the point type * \tparam PolygonRange a model of the concepts `SequenceContainer` and `BackInsertionSequence` * whose `value_type` is itself a model of the concept `SequenceContainer` * and `BackInsertionSequence` whose `value_type` is an unsigned integer type @@ -140,6 +142,62 @@ bool read_VTP(const std::string& fname, PointRange& points, PolygonRange& polygo return read_VTP(fname, points, polygons, parameters::default_values()); } + +template +bool read_VTK(const std::string& fname, + PointRange& points, + PolygonRange& polygons, + const NamedParameters& np) +{ + std::ifstream test(fname); + if(!test.good()) + { + std::cerr<<"File doesn't exist."< data; + vtkSmartPointer obs = + vtkSmartPointer::New(); + vtkSmartPointer reader = + CGAL::IO::internal::read_vtk_file(fname,obs); + data = vtkPolyData::SafeDownCast(reader->GetOutput()); + if (!data) + data = vtkUnstructuredGrid::SafeDownCast(reader->GetOutput()); + + if (obs->GetError()) + return false; + + return internal::vtkPointSet_to_polygon_soup(data, points, polygons, np); +} + +/*! + * \ingroup PkgStreamSupportIoFuncsVTK + * + * \brief reads the content of the input file into `points` and `polygons`, using the legacy file format of the \ref IOStreamVTK. + * + * \attention The polygon soup is not cleared, and the data from the file are appended. + * + * \tparam PointRange a model of the concepts `RandomAccessContainer` and `BackInsertionSequence` + * whose `value_type` is the point type + * \tparam PolygonRange a model of the concepts `SequenceContainer` and `BackInsertionSequence` + * whose `value_type` is itself a model of the concept `SequenceContainer` + * and `BackInsertionSequence` whose `value_type` is an unsigned integer type + * convertible to `std::size_t` + * + * \param fname the path to the input file + * \param points points of the soup of polygons + * \param polygons a range of polygons. Each element in it describes a polygon + * using the indices of the points in `points`. + * + * \returns `true` if the reading was successful, `false` otherwise. + */ +template +bool read_VTK(const std::string& fname, PointRange& points, PolygonRange& polygons) +{ + return read_VTK(fname, points, polygons, parameters::default_values()); +} + //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// // Write @@ -199,7 +257,7 @@ void write_soup_points_tag(std::ostream& os, { os << "\">\n"; for(const Point& p : points) - os << oformat(p.x()) << " " << oformat(p.y()) << " " << oformat(p.z()) << " "; + os << IO::oformat(p.x()) << " " << IO::oformat(p.y()) << " " << IO::oformat(p.z()) << " "; os << " \n"; } os << " \n"; @@ -340,11 +398,11 @@ void write_soup_polys_points(std::ostream& os, } // namespace internal /*! - * \ingroup PkgStreamSupportIoFuncsVTP + * \ingroup PkgStreamSupportIoFuncsVTK * * \brief writes the content of `points` and `polygons` in `out`, using the \ref IOStreamVTK. * - * \tparam PointRange a model of the concept `RandomAccessContainer` whose value type is the point type + * \tparam PointRange a model of the concept `RandomAccessContainer` whose `value_type` is the point type * \tparam PolygonRange a model of the concept `SequenceContainer` * whose `value_type` is itself a model of the concept `SequenceContainer` * whose `value_type` is an unsigned integer type convertible to `std::size_t` @@ -428,11 +486,11 @@ bool write_VTP(std::ostream& os, } /*! - * \ingroup PkgStreamSupportIoFuncsVTP + * \ingroup PkgStreamSupportIoFuncsVTK * * \brief writes the content of `points` and `polygons` in a file named `fname`, using the \ref IOStreamVTK. * - * \tparam PointRange a model of the concept `RandomAccessContainer` whose value type is the point type + * \tparam PointRange a model of the concept `RandomAccessContainer` whose `valuetype` is the point type * \tparam PolygonRange a model of the concept `SequenceContainer` * whose `value_type` is itself a model of the concept `SequenceContainer` * whose `value_type` is an unsigned integer type convertible to `std::size_t` diff --git a/thirdparty/CGAL/include/CGAL/IO/VTK/VTK_reader.h b/thirdparty/CGAL/include/CGAL/IO/VTK/VTK_reader.h index ced44470..6a371c7c 100644 --- a/thirdparty/CGAL/include/CGAL/IO/VTK/VTK_reader.h +++ b/thirdparty/CGAL/include/CGAL/IO/VTK/VTK_reader.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/VTK/VTK_reader.h $ -// $Id: VTK_reader.h 71413eb 2020-05-29T12:03:25+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/VTK/VTK_reader.h $ +// $Id: include/CGAL/IO/VTK/VTK_reader.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/VTK/VTK_writer.h b/thirdparty/CGAL/include/CGAL/IO/VTK/VTK_writer.h index 73f7372b..c1dfcee3 100644 --- a/thirdparty/CGAL/include/CGAL/IO/VTK/VTK_writer.h +++ b/thirdparty/CGAL/include/CGAL/IO/VTK/VTK_writer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/VTK/VTK_writer.h $ -// $Id: VTK_writer.h 423ae6e 2020-01-24T17:48:02+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/VTK/VTK_writer.h $ +// $Id: include/CGAL/IO/VTK/VTK_writer.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/Verbose_ostream.h b/thirdparty/CGAL/include/CGAL/IO/Verbose_ostream.h index ead579c4..b67f7f85 100644 --- a/thirdparty/CGAL/include/CGAL/IO/Verbose_ostream.h +++ b/thirdparty/CGAL/include/CGAL/IO/Verbose_ostream.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/Verbose_ostream.h $ -// $Id: Verbose_ostream.h 3c83367 2020-01-20T12:02:06+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/Verbose_ostream.h $ +// $Id: include/CGAL/IO/Verbose_ostream.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/WKT.h b/thirdparty/CGAL/include/CGAL/IO/WKT.h index a1beba5f..5bc633ea 100644 --- a/thirdparty/CGAL/include/CGAL/IO/WKT.h +++ b/thirdparty/CGAL/include/CGAL/IO/WKT.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/WKT.h $ -// $Id: WKT.h aa8da89 2022-12-08T16:23:10+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/WKT.h $ +// $Id: include/CGAL/IO/WKT.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno diff --git a/thirdparty/CGAL/include/CGAL/IO/WKT/traits_linestring.h b/thirdparty/CGAL/include/CGAL/IO/WKT/traits_linestring.h index 3c5642dd..3bbf43d0 100644 --- a/thirdparty/CGAL/include/CGAL/IO/WKT/traits_linestring.h +++ b/thirdparty/CGAL/include/CGAL/IO/WKT/traits_linestring.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/WKT/traits_linestring.h $ -// $Id: traits_linestring.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/WKT/traits_linestring.h $ +// $Id: include/CGAL/IO/WKT/traits_linestring.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno diff --git a/thirdparty/CGAL/include/CGAL/IO/WKT/traits_multilinestring.h b/thirdparty/CGAL/include/CGAL/IO/WKT/traits_multilinestring.h index 8657a4d7..664b25b2 100644 --- a/thirdparty/CGAL/include/CGAL/IO/WKT/traits_multilinestring.h +++ b/thirdparty/CGAL/include/CGAL/IO/WKT/traits_multilinestring.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/WKT/traits_multilinestring.h $ -// $Id: traits_multilinestring.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/WKT/traits_multilinestring.h $ +// $Id: include/CGAL/IO/WKT/traits_multilinestring.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno diff --git a/thirdparty/CGAL/include/CGAL/IO/WKT/traits_multipoint.h b/thirdparty/CGAL/include/CGAL/IO/WKT/traits_multipoint.h index dbbbd6c6..cc600959 100644 --- a/thirdparty/CGAL/include/CGAL/IO/WKT/traits_multipoint.h +++ b/thirdparty/CGAL/include/CGAL/IO/WKT/traits_multipoint.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/WKT/traits_multipoint.h $ -// $Id: traits_multipoint.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/WKT/traits_multipoint.h $ +// $Id: include/CGAL/IO/WKT/traits_multipoint.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno diff --git a/thirdparty/CGAL/include/CGAL/IO/WKT/traits_multipolygon.h b/thirdparty/CGAL/include/CGAL/IO/WKT/traits_multipolygon.h index c33dad95..cecbdfd2 100644 --- a/thirdparty/CGAL/include/CGAL/IO/WKT/traits_multipolygon.h +++ b/thirdparty/CGAL/include/CGAL/IO/WKT/traits_multipolygon.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/WKT/traits_multipolygon.h $ -// $Id: traits_multipolygon.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/WKT/traits_multipolygon.h $ +// $Id: include/CGAL/IO/WKT/traits_multipolygon.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno diff --git a/thirdparty/CGAL/include/CGAL/IO/WKT/traits_point.h b/thirdparty/CGAL/include/CGAL/IO/WKT/traits_point.h index d03b0421..6bd32831 100644 --- a/thirdparty/CGAL/include/CGAL/IO/WKT/traits_point.h +++ b/thirdparty/CGAL/include/CGAL/IO/WKT/traits_point.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/WKT/traits_point.h $ -// $Id: traits_point.h e6c767d 2021-05-12T15:45:07+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/WKT/traits_point.h $ +// $Id: include/CGAL/IO/WKT/traits_point.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno diff --git a/thirdparty/CGAL/include/CGAL/IO/WKT/traits_point_3.h b/thirdparty/CGAL/include/CGAL/IO/WKT/traits_point_3.h index 91896651..f9c80343 100644 --- a/thirdparty/CGAL/include/CGAL/IO/WKT/traits_point_3.h +++ b/thirdparty/CGAL/include/CGAL/IO/WKT/traits_point_3.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/WKT/traits_point_3.h $ -// $Id: traits_point_3.h e6c767d 2021-05-12T15:45:07+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/WKT/traits_point_3.h $ +// $Id: include/CGAL/IO/WKT/traits_point_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno diff --git a/thirdparty/CGAL/include/CGAL/IO/WKT/traits_polygon.h b/thirdparty/CGAL/include/CGAL/IO/WKT/traits_polygon.h index c8c76057..8ef18d92 100644 --- a/thirdparty/CGAL/include/CGAL/IO/WKT/traits_polygon.h +++ b/thirdparty/CGAL/include/CGAL/IO/WKT/traits_polygon.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/WKT/traits_polygon.h $ -// $Id: traits_polygon.h e6c767d 2021-05-12T15:45:07+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/WKT/traits_polygon.h $ +// $Id: include/CGAL/IO/WKT/traits_polygon.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno diff --git a/thirdparty/CGAL/include/CGAL/IO/binary_file_io.h b/thirdparty/CGAL/include/CGAL/IO/binary_file_io.h index 1a80f440..8b3e0e38 100644 --- a/thirdparty/CGAL/include/CGAL/IO/binary_file_io.h +++ b/thirdparty/CGAL/include/CGAL/IO/binary_file_io.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/binary_file_io.h $ -// $Id: binary_file_io.h a34debc 2021-06-23T22:56:35+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/binary_file_io.h $ +// $Id: include/CGAL/IO/binary_file_io.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/facets_in_complex_2_to_triangle_mesh.h b/thirdparty/CGAL/include/CGAL/IO/facets_in_complex_2_to_triangle_mesh.h index 9ad63020..a784c728 100644 --- a/thirdparty/CGAL/include/CGAL/IO/facets_in_complex_2_to_triangle_mesh.h +++ b/thirdparty/CGAL/include/CGAL/IO/facets_in_complex_2_to_triangle_mesh.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/IO/facets_in_complex_2_to_triangle_mesh.h $ -// $Id: facets_in_complex_2_to_triangle_mesh.h e7bf5b6 2022-02-04T10:22:26+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/IO/facets_in_complex_2_to_triangle_mesh.h $ +// $Id: include/CGAL/IO/facets_in_complex_2_to_triangle_mesh.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno, Pierre Alliez diff --git a/thirdparty/CGAL/include/CGAL/IO/facets_in_complex_3_to_triangle_mesh.h b/thirdparty/CGAL/include/CGAL/IO/facets_in_complex_3_to_triangle_mesh.h index 4cd98e3a..3ad89068 100644 --- a/thirdparty/CGAL/include/CGAL/IO/facets_in_complex_3_to_triangle_mesh.h +++ b/thirdparty/CGAL/include/CGAL/IO/facets_in_complex_3_to_triangle_mesh.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/IO/facets_in_complex_3_to_triangle_mesh.h $ -// $Id: facets_in_complex_3_to_triangle_mesh.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/IO/facets_in_complex_3_to_triangle_mesh.h $ +// $Id: include/CGAL/IO/facets_in_complex_3_to_triangle_mesh.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,7 +14,7 @@ #ifndef CGAL_IO_FACETS_IN_COMPLEX_3_TO_TRIANGLE_MESH_H #define CGAL_IO_FACETS_IN_COMPLEX_3_TO_TRIANGLE_MESH_H -#include +#include #ifndef CGAL_NO_DEPRECATED_CODE #include diff --git a/thirdparty/CGAL/include/CGAL/IO/helpers.h b/thirdparty/CGAL/include/CGAL/IO/helpers.h index 5b0b6723..119b89df 100644 --- a/thirdparty/CGAL/include/CGAL/IO/helpers.h +++ b/thirdparty/CGAL/include/CGAL/IO/helpers.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/helpers.h $ -// $Id: helpers.h 31a0557 2021-08-13T16:45:28+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/helpers.h $ +// $Id: include/CGAL/IO/helpers.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include @@ -54,7 +54,10 @@ static inline std::string get_file_extension(const std::string fname) return std::string(); std::string ext = fname.substr(dot+1, fname.length() - dot - 1); - std::transform(ext.begin(), ext.end(), ext.begin(), ::tolower); + std::transform(ext.begin(), ext.end(), ext.begin(), + [](char c) { + return static_cast(std::tolower(static_cast(c))); + }); return ext; } @@ -74,18 +77,24 @@ struct is_Point_set_3 : has_Point_set { }; // Point_set_3 and strings also functions as ranges, but we want to match polygon soups here template struct is_Range - : public boost::mpl::and_< - boost::has_range_const_iterator, // should be a range - boost::mpl::not_ >, // but not a Point_set_3 - boost::mpl::not_ > > // or a std::string / char [x] + : public std::bool_constant< + boost::has_range_const_iterator::value && // should be a range + !is_Point_set_3::value && // but not a Point_set_3 + !std::is_convertible_v > // or a std::string / char [x] { }; +template +inline constexpr bool is_Range_v = is_Range::value; + // For polygon meshes template struct is_Point_set_or_Range_or_Iterator - : public boost::mpl::or_, is_Range, is_iterator > + : public std::bool_constant::value || is_Range::value || is_iterator::value > { }; +template +inline constexpr bool is_Point_set_or_Range_or_Iterator_v = is_Point_set_or_Range_or_Iterator::value; + } // end namespace internal } // end namespace IO } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/IO/io.h b/thirdparty/CGAL/include/CGAL/IO/io.h index 723412a8..7df684f3 100644 --- a/thirdparty/CGAL/include/CGAL/IO/io.h +++ b/thirdparty/CGAL/include/CGAL/IO/io.h @@ -8,8 +8,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/io.h $ -// $Id: io.h 01b2f07 2021-07-06T10:37:07+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/io.h $ +// $Id: include/CGAL/IO/io.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -32,6 +32,8 @@ #include #include #include +#include +#include namespace CGAL { @@ -186,6 +188,34 @@ class Output_rep std::ostream& operator()( std::ostream& os) const { return (os << t); } }; +template +class Output_rep, F> +{ + const std::optional& t; + +public: + Output_rep( const std::optional& tt) : t(tt) {} + std::ostream& operator()( std::ostream& os) const + { + if (t==std::nullopt) return (os << "--"); + return (os << t.value()); + } +}; + +template +class Output_rep, F> +{ + const std::variant& t; + +public: + Output_rep( const std::variant& tt) : t(tt) {} + std::ostream& operator()( std::ostream& os) const + { + std::visit([&os](auto&& v) { os << v; }, t); + return os; + } +}; + /*! \relates Output_rep \brief stream output of the \c Output_rep calls its \c operator(). @@ -241,6 +271,23 @@ class Input_rep std::istream& operator()( std::istream& is) const { return (is >> t); } }; +template +class Input_rep> +{ + std::optional& t; + +public: + //! initialize with a reference to \a t. + Input_rep( std::optional& tt) : t(tt) {} + + //! perform the input, calls \c operator\>\> by default. + std::istream& operator()( std::istream& is) const { + T v; + if(is >> v) t = v; + return is; + } +}; + #if CGAL_FORCE_IFORMAT_DOUBLE || \ ( ( _MSC_VER > 1600 ) && ( _MSC_VER < 1910 ) && (! defined( CGAL_NO_IFORMAT_DOUBLE )) ) @@ -698,6 +745,25 @@ inline const char* mode_name( IO::Mode m ) return names[m]; } +namespace internal { + +template constexpr auto has_exact(int) -> decltype(exact(P()), bool()) { return true; } +template constexpr bool has_exact(...) { return false; } + +} + +template +auto +serialize(const P& p) { + if constexpr (internal::has_exact

    (0)) { + return exact(p); + } else { + return p; + } +} + + + } // IO namespace #ifndef CGAL_NO_DEPRECATED_CODE diff --git a/thirdparty/CGAL/include/CGAL/IO/io_tags.h b/thirdparty/CGAL/include/CGAL/IO/io_tags.h index 0128b051..302cb42b 100644 --- a/thirdparty/CGAL/include/CGAL/IO/io_tags.h +++ b/thirdparty/CGAL/include/CGAL/IO/io_tags.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/io_tags.h $ -// $Id: io_tags.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/io_tags.h $ +// $Id: include/CGAL/IO/io_tags.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/output_surface_facets_to_polyhedron.h b/thirdparty/CGAL/include/CGAL/IO/output_surface_facets_to_polyhedron.h index f2da56ff..3c600aa3 100644 --- a/thirdparty/CGAL/include/CGAL/IO/output_surface_facets_to_polyhedron.h +++ b/thirdparty/CGAL/include/CGAL/IO/output_surface_facets_to_polyhedron.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/IO/output_surface_facets_to_polyhedron.h $ -// $Id: output_surface_facets_to_polyhedron.h 4968d21 2022-05-17T10:31:07+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/IO/output_surface_facets_to_polyhedron.h $ +// $Id: include/CGAL/IO/output_surface_facets_to_polyhedron.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez diff --git a/thirdparty/CGAL/include/CGAL/IO/output_surface_facets_to_triangle_soup.h b/thirdparty/CGAL/include/CGAL/IO/output_surface_facets_to_triangle_soup.h index 7a8ce872..27e66cdf 100644 --- a/thirdparty/CGAL/include/CGAL/IO/output_surface_facets_to_triangle_soup.h +++ b/thirdparty/CGAL/include/CGAL/IO/output_surface_facets_to_triangle_soup.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Poisson_surface_reconstruction_3/include/CGAL/IO/output_surface_facets_to_triangle_soup.h $ -// $Id: output_surface_facets_to_triangle_soup.h 47f0eb4 2022-05-26T19:06:01+02:00 albert-github +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Poisson_surface_reconstruction_3/include/CGAL/IO/output_surface_facets_to_triangle_soup.h $ +// $Id: include/CGAL/IO/output_surface_facets_to_triangle_soup.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez diff --git a/thirdparty/CGAL/include/CGAL/IO/output_to_vtu.h b/thirdparty/CGAL/include/CGAL/IO/output_to_vtu.h index 451ed61c..032e5884 100644 --- a/thirdparty/CGAL/include/CGAL/IO/output_to_vtu.h +++ b/thirdparty/CGAL/include/CGAL/IO/output_to_vtu.h @@ -5,8 +5,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/IO/output_to_vtu.h $ -// $Id: output_to_vtu.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/IO/output_to_vtu.h $ +// $Id: include/CGAL/IO/output_to_vtu.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent RINEAU, Stephane Tayeb, Maxime Gimeno @@ -14,13 +14,13 @@ #ifndef CGAL_OUTPUT_TO_VTU_H #define CGAL_OUTPUT_TO_VTU_H -#include +#include #include #include #include -#include +#include #include #include @@ -273,7 +273,7 @@ enum VTU_ATTRIBUTE_TYPE{ SIZE_TYPE }; -typedef boost::variant*, const std::vector*, const std::vector* > Vtu_attributes; +typedef std::variant*, const std::vector*, const std::vector* > Vtu_attributes; template void output_to_vtu_with_attributes(std::ostream& os, @@ -314,15 +314,15 @@ void output_to_vtu_with_attributes(std::ostream& os, os << " \n"; for(std::size_t i = 0; i< attributes.size(); ++i) { - switch(attributes[i].second.which()){ + switch(attributes[i].second.index()){ case 0: - write_attribute_tag(os,attributes[i].first, *boost::get* >(attributes[i].second), binary,offset); + write_attribute_tag(os,attributes[i].first, *std::get* >(attributes[i].second), binary,offset); break; case 1: - write_attribute_tag(os,attributes[i].first, *boost::get* >(attributes[i].second), binary,offset); + write_attribute_tag(os,attributes[i].first, *std::get* >(attributes[i].second), binary,offset); break; default: - write_attribute_tag(os,attributes[i].first, *boost::get* >(attributes[i].second), binary,offset); + write_attribute_tag(os,attributes[i].first, *std::get* >(attributes[i].second), binary,offset); break; } } @@ -333,25 +333,39 @@ void output_to_vtu_with_attributes(std::ostream& os, os << "\n_"; write_c3t3_points(os,tr,V); // fills V if the mode is BINARY write_cells(os,c3t3,V); - for(std::size_t i = 0; i< attributes.size(); ++i) - switch(attributes[i].second.which()){ + for(std::size_t i = 0; i< attributes.size(); ++i) { + switch(attributes[i].second.index()){ case 0: - write_attributes(os, *boost::get* >(attributes[i].second)); + write_attributes(os, *std::get* >(attributes[i].second)); break; case 1: - write_attributes(os, *boost::get* >(attributes[i].second)); + write_attributes(os, *std::get* >(attributes[i].second)); break; default: - write_attributes(os, *boost::get* >(attributes[i].second)); + write_attributes(os, *std::get* >(attributes[i].second)); break; } + } + os << "\n\n"; } os << "\n"; } } // namespace internal -//public API +//! \ingroup PkgSMDS3ExportFunctions +//! +//! \brief exports a tetrahedral mesh complex using the `UnstructuredGrid` XML format. +//! +//! \tparam C3T3 a model of `MeshComplexWithFeatures_3InTriangulation_3`. +//! +//! \param os the stream used for writing +//! \param c3t3 the mesh complex +//! \param mode decides if the data should be written in binary (`IO::BINARY`) +//! or in ASCII (`IO::ASCII`). +//! If the mode is binary, then the stream `os` must be opened in binary mode. +//! \see \ref IOStreamVTK +//! template void output_to_vtu(std::ostream& os, const C3T3& c3t3, diff --git a/thirdparty/CGAL/include/CGAL/IO/polygon_mesh_io.h b/thirdparty/CGAL/include/CGAL/IO/polygon_mesh_io.h new file mode 100644 index 00000000..6f2f18ab --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/IO/polygon_mesh_io.h @@ -0,0 +1,264 @@ +// Copyright (c) 2020 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/IO/polygon_mesh_io.h $ +// $Id: include/CGAL/IO/polygon_mesh_io.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Maxime Gimeno +// Mael Rouxel-Labbé + +#ifndef CGAL_IO_POLYGON_MESH_IO_H +#define CGAL_IO_POLYGON_MESH_IO_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace CGAL { + +namespace IO { + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Read + +//not for now : some readers will return "ok" despite not managing to read anything +/* +template +bool read_polygon_mesh(std::istream& is, + Graph& g, + const NamedParameters& np = parameters::default_values()) +{ + bool ok = false; + ok = read_OFF(is, g, np, false); + if(ok) + return true; + g.clear(); + is.clear();//reset the error state + is.seekg (0, is.beg); + ok = read_OBJ(is, g, np, false); + if(ok) + return true; + g.clear(); + is.clear(); + is.seekg (0, is.beg); + ok = read_PLY(is, g, np, false); + if(ok) + return true; + g.clear(); + is.clear(); + is.seekg (0, is.beg); + ok = read_STL(is, g, np, false); + if(ok) + return true; + g.clear(); + is.clear(); + is.seekg (0, is.beg); + ok = read_GOCAD(is, g, np, false); + return ok; +} + +*/ + +/*! + * \ingroup PkgBGLIOFct + * + * \brief reads a polygon mesh from a file. + * + * Supported file formats are the following: + * - \ref IOStreamOFF (`.off`) + * - \ref IOStreamOBJ (`.obj`) + * - \ref IOStreamSTL (`.stl`) + * - \ref IOStreamPLY (`.ply`) + * - \ref IOStreamGocad (`.ts`) + * - \ref IOStreamVTK (`.vtp`) + * + * The format is detected from the filename extension (letter case is not important). + * + * The data is expected to represent a 2-manifold (possibly with borders). + * + * \tparam Graph a model of `MutableFaceGraph` + * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * \param fname the name of the file + * \param g the mesh + * \param np optional \ref bgl_namedparameters "Named Parameters" described below + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{vertex_point_map} + * \cgalParamDescription{a property map associating points to the vertices of `g`} + * \cgalParamType{a class model of `WritablePropertyMap` with `boost::graph_traits::%vertex_descriptor` + * as key type and `%Point_3` as value type} + * \cgalParamDefault{`boost::get(CGAL::vertex_point, g)`} + * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + * must be available in `Graph`.} + * \cgalParamNEnd + * + * \cgalParamNBegin{verbose} + * \cgalParamDescription{whether extra information is printed when an incident occurs during reading} + * \cgalParamType{Boolean} + * \cgalParamDefault{`false`} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + * Other named parameters may be used according to the file extension, see \ref PkgBGLIOFct for an exhaustive list. + * + * \return `true` if reading was successful, `false` otherwise. + * + * \sa \link PMP_IO_grp `CGAL::Polygon_mesh_processing::IO::read_polygon_mesh()`\endlink if the data is not 2-manifold +*/ +template +bool read_polygon_mesh(const std::string& fname, + Graph& g, + const NamedParameters& np = parameters::default_values()) +{ + const bool verbose = parameters::choose_parameter(parameters::get_parameter(np, internal_np::verbose), false); + + const std::string ext = internal::get_file_extension(fname); + if(ext == std::string()) + { + if(verbose) + std::cerr << "Error: cannot read from file without extension" << std::endl; + return false; + } + + if(ext == "obj") + return read_OBJ(fname, g, np); + else if(ext == "off") + return read_OFF(fname, g, np); + else if(ext == "ply") + return read_PLY(fname, g, np); + else if(ext == "stl") + return read_STL(fname, g, np); + else if(ext == "ts") + return read_GOCAD(fname, g, np); +#ifdef CGAL_USE_VTK + else if(ext == "vtp") + return read_VTP(fname, g, np); +#endif + + if(verbose) + { + std::cerr << "Error: unknown input file extension: " << ext << "\n" + << "Please refer to the documentation for the list of supported file formats" << std::endl; + } + + return false; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Write + +/*! + * \ingroup PkgBGLIOFct + * + * \brief writes a polygon mesh in a file. + * + * Supported file formats are the following: + * - \ref IOStreamOFF (`.off`) + * - \ref IOStreamOBJ (`.obj`) + * - \ref IOStreamSTL (`.stl`) + * - \ref IOStreamPLY (`.ply`) + * - \ref IOStreamGocad (`.ts`) + * - \ref IOStreamVTK (`.vtp`) + * + * The format is detected from the filename extension (letter case is not important). + * + * \tparam Graph a model of `FaceListGraph` and `HalfedgeListGraph` + * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * \param fname the name of the file + * \param g the mesh to be output + * \param np optional \ref bgl_namedparameters "Named Parameters" described below + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{vertex_point_map} + * \cgalParamDescription{a property map associating points to the vertices of `g`} + * \cgalParamType{a class model of `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` + * as key type and `%Point_3` as value type} + * \cgalParamDefault{`boost::get(CGAL::vertex_point, g)`} + * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + * must be available in `Graph`.} + * \cgalParamNEnd + * + * \cgalParamNBegin{stream_precision} + * \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} + * \cgalParamType{int} + * \cgalParamDefault{`6`} + * \cgalParamExtra{This parameter is only meaningful while using \ascii encoding.} + * \cgalParamNEnd + * + * \cgalParamNBegin{use_binary_mode} + * \cgalParamDescription{indicates whether data should be written in binary (`true`) or in \ascii (`false`)} + * \cgalParamType{Boolean} + * \cgalParamDefault{`true`} + * \cgalParamExtra{This parameter is only meaningful for formats that support binary encoding.} + * \cgalParamNEnd + * + * \cgalParamNBegin{verbose} + * \cgalParamDescription{whether extra information is printed when an incident occurs during reading} + * \cgalParamType{Boolean} + * \cgalParamDefault{`false`} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + * Other named parameters may be used according to the file extension, see \ref PkgBGLIOFct for an exhaustive list. + * + * \return `true` if writing was successful, `false` otherwise. + */ +template +bool write_polygon_mesh(const std::string& fname, + Graph& g, + const NamedParameters& np = parameters::default_values()) +{ + const bool verbose = parameters::choose_parameter(parameters::get_parameter(np, internal_np::verbose), false); + + const std::string ext = internal::get_file_extension(fname); + if(ext == std::string()) + { + if(verbose) + std::cerr << "Error: trying to output to file without extension" << std::endl; + return false; + } + + if(ext == "obj") + return write_OBJ(fname, g, np); + else if(ext == "off") + return write_OFF(fname, g, np); + else if(ext == "ply") + return write_PLY(fname, g, np); + else if(ext == "stl") + return write_STL(fname, g, np); + else if(ext == "ts") + return write_GOCAD(fname, g, np); +#ifdef CGAL_USE_VTK + else if(ext == "vtp") + return write_VTP(fname, g, np); +#endif + + if(verbose) + { + std::cerr << "Error: unknown output file extension: " << ext << "\n" + << "Please refer to the documentation for the list of supported file formats" << std::endl; + } + + return false; +} + +} // namespace IO +} // namespace CGAL + +#endif // CGAL_IO_POLYGON_MESH_IO_H diff --git a/thirdparty/CGAL/include/CGAL/IO/polygon_soup_io.h b/thirdparty/CGAL/include/CGAL/IO/polygon_soup_io.h index a1972244..82a8fbe5 100644 --- a/thirdparty/CGAL/include/CGAL/IO/polygon_soup_io.h +++ b/thirdparty/CGAL/include/CGAL/IO/polygon_soup_io.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/polygon_soup_io.h $ -// $Id: polygon_soup_io.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/polygon_soup_io.h $ +// $Id: include/CGAL/IO/polygon_soup_io.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -100,7 +100,7 @@ bool read_polygon_soup(const std::string& fname, else if(ext == "ts") return read_GOCAD(fname, points, polygons, np); #ifdef CGAL_USE_VTK - else if(ext == "ts") + else if(ext == "vtp") return read_VTP(fname, points, polygons, np); #endif diff --git a/thirdparty/CGAL/include/CGAL/IO/print_OFF.h b/thirdparty/CGAL/include/CGAL/IO/print_OFF.h index 944f0cd5..42db6416 100644 --- a/thirdparty/CGAL/include/CGAL/IO/print_OFF.h +++ b/thirdparty/CGAL/include/CGAL/IO/print_OFF.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/IO/print_OFF.h $ -// $Id: print_OFF.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/IO/print_OFF.h $ +// $Id: include/CGAL/IO/print_OFF.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/read_las_points.h b/thirdparty/CGAL/include/CGAL/IO/read_las_points.h index 305185b9..a6ba2e7b 100644 --- a/thirdparty/CGAL/include/CGAL/IO/read_las_points.h +++ b/thirdparty/CGAL/include/CGAL/IO/read_las_points.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/IO/read_las_points.h $ -// $Id: read_las_points.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/IO/read_las_points.h $ +// $Id: include/CGAL/IO/read_las_points.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -18,12 +18,11 @@ #include #include -#include #include #include #include -#include +#include #include #include @@ -476,7 +475,7 @@ bool read_LAS(std::istream& is, template bool read_LAS(std::istream& is, OutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values(), - typename std::enable_if::value>::type* = nullptr) + std::enable_if_t::value>* = nullptr) { return read_LAS::type>(is, output, np); } diff --git a/thirdparty/CGAL/include/CGAL/IO/read_off_points.h b/thirdparty/CGAL/include/CGAL/IO/read_off_points.h index b2ee3f7d..faf6096f 100644 --- a/thirdparty/CGAL/include/CGAL/IO/read_off_points.h +++ b/thirdparty/CGAL/include/CGAL/IO/read_off_points.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/IO/read_off_points.h $ -// $Id: read_off_points.h 6555faf 2022-11-07T14:14:16+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/IO/read_off_points.h $ +// $Id: include/CGAL/IO/read_off_points.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Laurent Saboret @@ -18,10 +18,9 @@ #include #include #include -#include #include #include -#include +#include #include #include @@ -82,7 +81,7 @@ bool read_OFF(std::istream& is, PointOutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename std::enable_if::value>::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -241,7 +240,7 @@ bool read_OFF(const std::string& fname, PointOutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename std::enable_if::value>::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -255,14 +254,14 @@ bool read_OFF(const std::string& fname, template bool read_OFF(std::istream& is, OutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values(), - typename std::enable_if::value>::type* = nullptr) + std::enable_if_t::value>* = nullptr) { return read_OFF::type>(is, output, np); } template bool read_OFF(const std::string& fname, OutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values(), - typename std::enable_if::value>::type* = nullptr) + std::enable_if_t::value>* = nullptr) { std::ifstream is(fname); return read_OFF::type>(is, output, np); diff --git a/thirdparty/CGAL/include/CGAL/IO/read_ply_points.h b/thirdparty/CGAL/include/CGAL/IO/read_ply_points.h index 9e25b456..9455f462 100644 --- a/thirdparty/CGAL/include/CGAL/IO/read_ply_points.h +++ b/thirdparty/CGAL/include/CGAL/IO/read_ply_points.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/IO/read_ply_points.h $ -// $Id: read_ply_points.h 826b2a1 2022-11-07T13:15:55+00:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/IO/read_ply_points.h $ +// $Id: include/CGAL/IO/read_ply_points.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -244,7 +243,7 @@ bool read_PLY(std::istream& is, PointOutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename std::enable_if::value>::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -321,7 +320,7 @@ bool read_PLY(const std::string& fname, PointOutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename std::enable_if::value>::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -345,14 +344,14 @@ bool read_PLY(const std::string& fname, // variants with default output iterator value type template bool read_PLY(std::istream& is, OutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values(), - typename std::enable_if::value>::type* = nullptr) + std::enable_if_t::value>* = nullptr) { return read_PLY::type>(is, output, np); } template bool read_PLY(const std::string& fname, OutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values(), - typename std::enable_if::value>::type* = nullptr) + std::enable_if_t::value>* = nullptr) { return read_PLY::type>(fname, output, np); } diff --git a/thirdparty/CGAL/include/CGAL/IO/read_points.h b/thirdparty/CGAL/include/CGAL/IO/read_points.h index 8b425fcc..8e2570f9 100644 --- a/thirdparty/CGAL/include/CGAL/IO/read_points.h +++ b/thirdparty/CGAL/include/CGAL/IO/read_points.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/IO/read_points.h $ -// $Id: read_points.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/IO/read_points.h $ +// $Id: include/CGAL/IO/read_points.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno diff --git a/thirdparty/CGAL/include/CGAL/IO/read_vtk_image_data.h b/thirdparty/CGAL/include/CGAL/IO/read_vtk_image_data.h index 47dc7cd4..28947bb0 100644 --- a/thirdparty/CGAL/include/CGAL/IO/read_vtk_image_data.h +++ b/thirdparty/CGAL/include/CGAL/IO/read_vtk_image_data.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h $ -// $Id: read_vtk_image_data.h 22be867 2021-05-04T14:59:28+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h $ +// $Id: include/CGAL/IO/read_vtk_image_data.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -69,26 +69,57 @@ read_vtk_image_data(vtkImageData* vtk_image, Image_3::Own owning = Image_3::OWN_ image->ty = static_cast(offset[1]); image->tz = static_cast(offset[2]); image->endianness = ::_getEndianness(); + int vtk_type = vtk_image->GetScalarType(); if(vtk_type == VTK_SIGNED_CHAR) vtk_type = VTK_CHAR; - if(vtk_type < 0 || vtk_type > VTK_DOUBLE) - vtk_type = VTK_DOUBLE; - const VTK_to_ImageIO_type_mapper& imageio_type = - VTK_to_ImageIO_type[vtk_type]; + if(vtk_type < 0 || vtk_type > VTK_DOUBLE) vtk_type = VTK_DOUBLE; + const VTK_to_ImageIO_type_mapper& imageio_type = VTK_to_ImageIO_type[vtk_type]; image->wdim = imageio_type.wdim; image->wordKind = imageio_type.wordKind; image->sign = imageio_type.sign; + + const int cn = vtk_image->GetNumberOfScalarComponents(); + if (!vtk_image->GetPointData() || !vtk_image->GetPointData()->GetScalars()) { ::_freeImage(image); return Image_3(); } + + // If there is more than a scalar per point, vtk_image->data is not immediately + // interpretable in Image_3->data + CGAL_assertion(owning == Image_3::OWN_THE_DATA || cn == 1); + CGAL_assertion(vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() == dims[0]*dims[1]*dims[2]); + if(owning == Image_3::OWN_THE_DATA) { - image->data = ::ImageIO_alloc(dims[0]*dims[1]*dims[2]*image->wdim); - // std::cerr << "GetNumberOfTuples()=" << vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() - // << "\nimage->size()=" << dims[0]*dims[1]*dims[2] - // << "\nwdim=" << image->wdim << '\n'; - vtk_image->GetPointData()->GetScalars()->ExportToVoidPointer(image->data); + int dims_n = dims[0]*dims[1]*dims[2]; + image->data = ::ImageIO_alloc(dims_n * image->wdim); + + // std::cerr << "GetNumberOfTuples() = " << vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() << "\n" + // << "components = " << cn << "\n" + // << "wdim = " << image->wdim << "\n" + // << "image->size() = " << dims_n << std::endl; + + if(cn == 1) { + vtk_image->GetPointData()->GetScalars()->ExportToVoidPointer(image->data); + } else { + std::cerr << "Warning: input has " << cn << " components; only the value of the first component will be used." << std::endl; + CGAL_assertion(cn >= 3); // if it's more than 1, it needs to be at least 3 + + // cast the data void pointers to make it possible to do pointer arithmetic + char* src = static_cast(vtk_image->GetPointData()->GetScalars()->GetVoidPointer(0)); + char* dest = static_cast(image->data); + + for(int i=0; iwdim because we casted to char* and not the actual data type + memcpy(dest + image->wdim*i, src + cn*image->wdim*i, image->wdim); + + // Check that we are not discarding useful data (i.e., green & blue are identical to red) + CGAL_assertion(memcmp(src + cn*image->wdim*i, src + cn*image->wdim*i + image->wdim, image->wdim) == 0); + CGAL_assertion(memcmp(src + cn*image->wdim*i, src + cn*image->wdim*i + 2*image->wdim, image->wdim) == 0); + } + } } else { image->data = vtk_image->GetPointData()->GetScalars()->GetVoidPointer(0); } diff --git a/thirdparty/CGAL/include/CGAL/IO/read_xyz_points.h b/thirdparty/CGAL/include/CGAL/IO/read_xyz_points.h index 2a55f107..7b381c25 100644 --- a/thirdparty/CGAL/include/CGAL/IO/read_xyz_points.h +++ b/thirdparty/CGAL/include/CGAL/IO/read_xyz_points.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h $ -// $Id: read_xyz_points.h 6555faf 2022-11-07T14:14:16+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h $ +// $Id: include/CGAL/IO/read_xyz_points.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Laurent Saboret @@ -16,10 +16,9 @@ #include #include -#include #include #include -#include +#include #include #include @@ -135,15 +134,15 @@ bool read_XYZ(std::istream& is, { iss.clear(); iss.str(line); - if (iss >> iformat(x) >> iformat(y) >> iformat(z)) + if (iss >> IO::iformat(x) >> IO::iformat(y) >> IO::iformat(z)) { Point point(x,y,z); Vector normal = CGAL::NULL_VECTOR; // ... + normal... - if (iss >> iformat(nx)) + if (iss >> IO::iformat(nx)) { // In case we could read one number, we expect that there are two more - if(iss >> iformat(ny) >> iformat(nz)){ + if(iss >> IO::iformat(ny) >> IO::iformat(nz)){ normal = Vector(nx,ny,nz); } else { std::cerr << "Error line " << lineNumber << " of file (incomplete normal coordinates)" << std::endl; @@ -234,7 +233,7 @@ bool read_XYZ(const std::string& fname, // variants with default output iterator value type template bool read_XYZ(std::istream& is, OutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values(), - typename std::enable_if::value>::type* = nullptr) + std::enable_if_t::value>* = nullptr) { return read_XYZ::type>(is, output, np); } diff --git a/thirdparty/CGAL/include/CGAL/IO/scan_OFF.h b/thirdparty/CGAL/include/CGAL/IO/scan_OFF.h index 94b1f4fb..a7b516c7 100644 --- a/thirdparty/CGAL/include/CGAL/IO/scan_OFF.h +++ b/thirdparty/CGAL/include/CGAL/IO/scan_OFF.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/IO/scan_OFF.h $ -// $Id: scan_OFF.h 00ca021 2020-08-04T12:59:08+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/IO/scan_OFF.h $ +// $Id: include/CGAL/IO/scan_OFF.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/IO/trace.h b/thirdparty/CGAL/include/CGAL/IO/trace.h index 426d3764..e22a5256 100644 --- a/thirdparty/CGAL/include/CGAL/IO/trace.h +++ b/thirdparty/CGAL/include/CGAL/IO/trace.h @@ -2,8 +2,8 @@ // All rights reserved. // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/IO/trace.h $ -// $Id: trace.h 3b7754f 2021-09-20T12:44:38+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/IO/trace.h $ +// $Id: include/CGAL/IO/trace.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret diff --git a/thirdparty/CGAL/include/CGAL/IO/write_VTU.h b/thirdparty/CGAL/include/CGAL/IO/write_VTU.h index a6865a8d..234840a7 100644 --- a/thirdparty/CGAL/include/CGAL/IO/write_VTU.h +++ b/thirdparty/CGAL/include/CGAL/IO/write_VTU.h @@ -5,8 +5,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/IO/write_VTU.h $ -// $Id: write_VTU.h e0a4dd0 2021-05-18T17:31:40+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/IO/write_VTU.h $ +// $Id: include/CGAL/IO/write_VTU.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -35,10 +36,11 @@ namespace internal { // writes the cells tags before binary data is appended -template + template void write_cells_tag_2(std::ostream& os, const CDT & tr, + InDomainPmap in_domain, std::size_t number_of_triangles, std::map & V, bool binary, @@ -73,8 +75,8 @@ write_cells_tag_2(std::ostream& os, fit = tr.finite_faces_begin(), end = tr.finite_faces_end(); fit != end; ++fit) - { - if(fit->is_in_domain()) + { + if(get(in_domain, fit)) { os << V[fit->vertex(0)] << " "; os << V[fit->vertex(2)] << " "; @@ -114,7 +116,7 @@ write_cells_tag_2(std::ostream& os, fit != tr.finite_faces_end() ; ++fit ) { - if(fit->is_in_domain()) + if(get(in_domain, fit)) { cells_offset += 3; os << cells_offset << " "; @@ -149,7 +151,7 @@ write_cells_tag_2(std::ostream& os, fit != tr.finite_faces_end() ; ++fit ) { - if(fit->is_in_domain()) + if(get(in_domain, fit)) { os << "5 "; } @@ -166,10 +168,11 @@ write_cells_tag_2(std::ostream& os, } // writes the cells appended data at the end of the .vtu file -template + template void write_cells_2(std::ostream& os, const CDT & tr, + InDomainPmap in_domain, std::size_t number_of_triangles, std::map & V) { @@ -185,7 +188,7 @@ write_cells_2(std::ostream& os, end = tr.finite_faces_end(); fit != end; ++fit) { - if(fit->is_in_domain()) + if(get(in_domain, fit)) { off += 3; offsets.push_back(off); @@ -324,11 +327,12 @@ write_attributes_2(std::ostream& os, write_vector(os,att); } -template +template void write_VTU_with_attributes(std::ostream& os, - const CDT& tr, - std::vector*> >& attributes, - Mode mode = BINARY) + const CDT& tr, + InDomainPmap in_domain, + std::vector*> >& attributes, + Mode mode = BINARY) { typedef typename CDT::Vertex_handle Vertex_handle; std::map V; @@ -355,14 +359,14 @@ void write_VTU_with_attributes(std::ostream& os, end = tr.finite_faces_end(); fit != end; ++fit) { - if(fit->is_in_domain()) ++number_of_triangles; + if(get(in_domain, fit)) ++number_of_triangles; } os << " \n"; std::size_t offset = 0; const bool binary = (mode == BINARY); write_cdt_points_tag(os,tr,V,binary,offset); - write_cells_tag_2(os,tr,number_of_triangles, V,binary,offset); + write_cells_tag_2(os,tr, in_domain, number_of_triangles, V,binary,offset); if(attributes.empty()) os << " \n"; else @@ -377,7 +381,7 @@ void write_VTU_with_attributes(std::ostream& os, if (binary) { os << "\n_"; write_cdt_points(os,tr,V); // write points before cells to fill the std::map V - write_cells_2(os,tr, number_of_triangles, V); + write_cells_2(os, tr, in_domain, number_of_triangles, V); for(std::size_t i = 0; i< attributes.size(); ++i) write_attributes_2(os, *attributes[i].second); } @@ -386,15 +390,26 @@ void write_VTU_with_attributes(std::ostream& os, } // namespace internal -template +template void write_VTU(std::ostream& os, const CDT& tr, + InDomainPmap ipm, Mode mode = BINARY) { std::vector*> > dummy_atts; - internal::write_VTU_with_attributes(os, tr, dummy_atts, mode); + internal::write_VTU_with_attributes(os, tr, ipm, dummy_atts, mode); } +template +void write_VTU(std::ostream& os, + const CDT& tr, + Mode mode = BINARY) +{ + CGAL::internal::In_domain in_domain; + write_VTU(os, tr, in_domain, mode); +} + + } // namespace IO #ifndef CGAL_NO_DEPRECATED_CODE diff --git a/thirdparty/CGAL/include/CGAL/IO/write_las_points.h b/thirdparty/CGAL/include/CGAL/IO/write_las_points.h index 0ecb8bdd..dd3b45c8 100644 --- a/thirdparty/CGAL/include/CGAL/IO/write_las_points.h +++ b/thirdparty/CGAL/include/CGAL/IO/write_las_points.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/IO/write_las_points.h $ -// $Id: write_las_points.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/IO/write_las_points.h $ +// $Id: include/CGAL/IO/write_las_points.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -21,12 +21,11 @@ #include #include #include -#include #include +#include #include #include -#include #ifdef BOOST_MSVC # pragma warning(push) @@ -57,6 +56,7 @@ #include #include #include +#include namespace CGAL { @@ -164,7 +164,7 @@ namespace LAS { handlers. A `PropertyHandle` is a `std::pair` used to write a scalar value `LAS_property::Tag::type` as a %LAS property (for example, - writing an `int` vairable as an `int` %LAS property). An exception + writing an `int` variable as an `int` %LAS property). An exception is used for points that are written using a `std::tuple` object. See documentation of `read_LAS_with_properties()` for the @@ -193,7 +193,7 @@ bool write_LAS_with_properties(std::ostream& os, ///< output stream. LAS_property::Z> point_property, ///< property handler for points PropertyHandler&& ... properties) ///< parameter pack of property handlers { - CGAL_point_set_processing_precondition(points.begin() != points.end()); + CGAL_precondition(points.begin() != points.end()); if(!os) { @@ -282,7 +282,7 @@ bool write_LAS(std::ostream& os, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -337,7 +337,7 @@ bool write_LAS(const std::string& filename, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/IO/write_off_points.h b/thirdparty/CGAL/include/CGAL/IO/write_off_points.h index cc593083..80ef609a 100644 --- a/thirdparty/CGAL/include/CGAL/IO/write_off_points.h +++ b/thirdparty/CGAL/include/CGAL/IO/write_off_points.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/IO/write_off_points.h $ -// $Id: write_off_points.h 38fd07d 2022-11-08T10:24:43+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/IO/write_off_points.h $ +// $Id: include/CGAL/IO/write_off_points.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Laurent Saboret @@ -20,15 +20,14 @@ #include #include #include -#include #include - -#include +#include #include #include #include #include +#include namespace CGAL { namespace Point_set_processing_3 { @@ -51,7 +50,7 @@ bool write_OFF_PSP(std::ostream& os, PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); - CGAL_point_set_processing_precondition(points.begin() != points.end()); + CGAL_precondition(points.begin() != points.end()); if(!os) { @@ -133,7 +132,7 @@ bool write_OFF(std::ostream& os, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -189,7 +188,7 @@ bool write_OFF(const std::string& filename, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/IO/write_ply_points.h b/thirdparty/CGAL/include/CGAL/IO/write_ply_points.h index e83be2ca..50be1cc4 100644 --- a/thirdparty/CGAL/include/CGAL/IO/write_ply_points.h +++ b/thirdparty/CGAL/include/CGAL/IO/write_ply_points.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/IO/write_ply_points.h $ -// $Id: write_ply_points.h 38fd07d 2022-11-08T10:24:43+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/IO/write_ply_points.h $ +// $Id: include/CGAL/IO/write_ply_points.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -18,19 +18,19 @@ #include #include -#include +#include #include #include #include -#include #include #include #include #include #include +#include namespace CGAL { @@ -111,7 +111,7 @@ template >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -277,7 +277,7 @@ bool write_PLY(const std::string& filename, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/IO/write_points.h b/thirdparty/CGAL/include/CGAL/IO/write_points.h index c4f813e2..57724a99 100644 --- a/thirdparty/CGAL/include/CGAL/IO/write_points.h +++ b/thirdparty/CGAL/include/CGAL/IO/write_points.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/IO/write_points.h $ -// $Id: write_points.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/IO/write_points.h $ +// $Id: include/CGAL/IO/write_points.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno @@ -93,7 +93,7 @@ bool write_points(const std::string& fname, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values(), #ifndef DOXYGEN_RUNNING - typename boost::enable_if >::type* = nullptr + std::enable_if_t::value>* = nullptr #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/IO/write_xyz_points.h b/thirdparty/CGAL/include/CGAL/IO/write_xyz_points.h index 5ee2aeaf..5e63fb2b 100644 --- a/thirdparty/CGAL/include/CGAL/IO/write_xyz_points.h +++ b/thirdparty/CGAL/include/CGAL/IO/write_xyz_points.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h $ -// $Id: write_xyz_points.h 38fd07d 2022-11-08T10:24:43+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h $ +// $Id: include/CGAL/IO/write_xyz_points.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Laurent Saboret @@ -17,18 +17,17 @@ #include #include -#include +#include #include #include #include #include -#include - #include #include #include +#include namespace CGAL { namespace Point_set_processing_3 { @@ -52,7 +51,7 @@ bool write_XYZ_PSP(std::ostream& os, PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); - CGAL_point_set_processing_precondition(points.begin() != points.end()); + CGAL_precondition(points.begin() != points.end()); if(!os) { @@ -127,7 +126,7 @@ bool write_XYZ(std::ostream& os, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -180,7 +179,7 @@ bool write_XYZ(const std::string& filename, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/Identity_policy_2.h b/thirdparty/CGAL/include/CGAL/Identity_policy_2.h index deee3e65..dc118791 100644 --- a/thirdparty/CGAL/include/CGAL/Identity_policy_2.h +++ b/thirdparty/CGAL/include/CGAL/Identity_policy_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Identity_policy_2.h $ -// $Id: Identity_policy_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Identity_policy_2.h $ +// $Id: include/CGAL/Identity_policy_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/ImageIO.h b/thirdparty/CGAL/include/CGAL/ImageIO.h index 29dd6a89..81a1e5a1 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO.h @@ -5,8 +5,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO.h $ -// $Id: ImageIO.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO.h $ +// $Id: include/CGAL/ImageIO.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // @@ -20,11 +20,11 @@ #include #include -#include // for uint32_t, etc. +#include // for uint32_t, etc. #ifdef CGAL_USE_ZLIB #include -/* see http://www.gzip.org/zlib/ +/* see https://zlib.net/ for details and documentation */ #endif @@ -191,7 +191,7 @@ typedef struct imformat { WRITE_IMAGE writeImage; /* the file extension of format (including a dot ".": if several - extensions may be used, they should be separed with a + extensions may be used, they should be separated with a comma ".inr,.inr.gz" */ char fileExtension[IMAGE_FORMAT_NAME_LENGTH]; @@ -342,8 +342,8 @@ CGAL_IMAGEIO_EXPORT _image *_createImage(std::size_t x, std::size_t y, std::size GIS (CEA, IRISA, ENST 3D image format). See also: - http://www.dcs.ed.ac.uk/home/mxr/gfx/2d-hi.html and - http://www.gzip.org/zlib/ + https://www.martinreddy.net/gfx/2d-hi.html and + https://zlib.net/ @param name image file name or nullptr for stdin */ @@ -394,7 +394,7 @@ CGAL_IMAGEIO_EXPORT int _writeImage(_image *im, const char *name); File descriptor is let at the beginning of next slice and closed
    when end of file is encountered.
    If data buffer is nullptr, it is allocated for one slice only.
    - This funtion is dedicated to read huge inrimages. + This function is dedicated to read huge inrimages. @param im image descriptor */ CGAL_IMAGEIO_EXPORT void _getNextSlice(_image *im); @@ -437,7 +437,7 @@ CGAL_IMAGEIO_EXPORT int _readNonInterlacedFileData(_image *im); /** given an initialized file descriptor and a file name, open file - from stdout (if name == nullptr), a gziped pipe (if file is gziped) + from stdout (if name == nullptr), a gzipped pipe (if file is gzipped) or a standard file otherwise. @param im initialized image descriptor @param name image file name */ @@ -562,38 +562,50 @@ struct Word_type_generator template <> struct Word_type_generator { -// typedef boost::int8_t type; +// typedef std::int8_t type; typedef char type; }; template <> struct Word_type_generator { - typedef boost::uint8_t type; + typedef std::uint8_t type; }; template <> struct Word_type_generator { - typedef boost::int16_t type; + typedef std::int16_t type; }; template <> struct Word_type_generator { - typedef boost::uint16_t type; + typedef std::uint16_t type; }; template <> struct Word_type_generator { - typedef boost::int32_t type; + typedef std::int32_t type; }; template <> struct Word_type_generator { - typedef boost::uint32_t type; + typedef std::uint32_t type; +}; + +template <> +struct Word_type_generator +{ + typedef std::int64_t type; +}; + +template <> +struct Word_type_generator +{ + typedef std::uint64_t type; }; template diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/analyze.h b/thirdparty/CGAL/include/CGAL/ImageIO/analyze.h index 6789d1e7..9769766f 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/analyze.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/analyze.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/analyze.h $ -// $Id: analyze.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/analyze.h $ +// $Id: include/CGAL/ImageIO/analyze.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/analyze_impl.h b/thirdparty/CGAL/include/CGAL/ImageIO/analyze_impl.h index 2fe90d30..e8bc5b2f 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/analyze_impl.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/analyze_impl.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/analyze_impl.h $ -// $Id: analyze_impl.h 6acef1b 2020-10-20T14:18:12+02:00 Raphael Grimm +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/analyze_impl.h $ +// $Id: include/CGAL/ImageIO/analyze_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -463,60 +463,79 @@ int _readAnalyzeHeader( _image* im, const char* name, for ( i=0; inuser; i++ ) im->user[i] = nullptr; i = 0 ; - im->user[i] = (char *) ImageIO_alloc((strlen("Data lost in the Analyze -> ImageIO conversion:") + 1)); - sprintf( im->user[i++], "Data lost in the Analyze -> ImageIO conversion:" ); + size_t buffer_size; + buffer_size = strlen("Data lost in the Analyze -> ImageIO conversion:") + 1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, "Data lost in the Analyze -> ImageIO conversion:" ); - im->user[i] = (char *) ImageIO_alloc((strlen(" descrip: ") + 1 + strlen(analyzeHeader->hist.descrip) )); - sprintf( im->user[i++], " descrip: %s", analyzeHeader->hist.descrip ); + buffer_size = snprintf(nullptr, 0, " descrip: %s", analyzeHeader->hist.descrip) + 1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " descrip: %s", analyzeHeader->hist.descrip ); - im->user[i] = (char *) ImageIO_alloc((strlen(" aux_file: ") + 1 + strlen(analyzeHeader->hist.descrip) )); - sprintf( im->user[i++], " aux_file: %s", analyzeHeader->hist.descrip ); + buffer_size = snprintf(nullptr, 0, " aux_file: %s", analyzeHeader->hist.descrip ) + 1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " aux_file: %s", analyzeHeader->hist.descrip ); - im->user[i] = (char *) ImageIO_alloc((strlen(" orient: ") + 1+ 2)); - sprintf( im->user[i++], " orient: %d", analyzeHeader->hist.orient ); + buffer_size = snprintf(nullptr, 0, " orient: %d", analyzeHeader->hist.orient ) + 1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " orient: %d", analyzeHeader->hist.orient ); - im->user[i] = (char *) ImageIO_alloc((strlen(" originator: ") + 1 + strlen(analyzeHeader->hist.originator) )); - sprintf( im->user[i++], " originator: %s", analyzeHeader->hist.originator ); + buffer_size = snprintf(nullptr, 0, " originator: %s", analyzeHeader->hist.originator ) + 1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " originator: %s", analyzeHeader->hist.originator ); - im->user[i] = (char *) ImageIO_alloc((strlen(" generated: ") + 1 + strlen(analyzeHeader->hist.generated) )); - sprintf( im->user[i++], " generated: %s", analyzeHeader->hist.generated ); + buffer_size = snprintf(nullptr, 0, " generated: %s", analyzeHeader->hist.generated ) + 1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " generated: %s", analyzeHeader->hist.generated ); - im->user[i] = (char *) ImageIO_alloc((strlen(" scannum: ") + 1 + strlen(analyzeHeader->hist.scannum) )); - sprintf( im->user[i++], " scannum: %s", analyzeHeader->hist.scannum ); + buffer_size = snprintf(nullptr, 0, " scannum: %s", analyzeHeader->hist.scannum ) + 1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " scannum: %s", analyzeHeader->hist.scannum ); - im->user[i] = (char *) ImageIO_alloc((strlen(" patient_id: ") + 1 + strlen(analyzeHeader->hist.patient_id) )); - sprintf( im->user[i++], " patient_id: %s", analyzeHeader->hist.patient_id ); + buffer_size = snprintf(nullptr, 0, " patient_id: %s", analyzeHeader->hist.patient_id ) +1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " patient_id: %s", analyzeHeader->hist.patient_id ); - im->user[i] = (char *) ImageIO_alloc((strlen(" exp_date: ") + 1 + strlen(analyzeHeader->hist.exp_date) )); - sprintf( im->user[i++], " exp_date: %s", analyzeHeader->hist.exp_date ); + buffer_size = snprintf(nullptr, 0, " exp_date: %s", analyzeHeader->hist.exp_date ) + 1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " exp_date: %s", analyzeHeader->hist.exp_date ); - im->user[i] = (char *) ImageIO_alloc((strlen(" exp_time: ") + 1 + strlen(analyzeHeader->hist.exp_time) )); - sprintf( im->user[i++], " exp_time: %s", analyzeHeader->hist.exp_time ); + buffer_size = snprintf(nullptr, 0, " exp_time: %s", analyzeHeader->hist.exp_time ) + 1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " exp_time: %s", analyzeHeader->hist.exp_time ); + buffer_size = snprintf(nullptr, 0, " views: %d", analyzeHeader->hist.views ) + 1; /* A 32 bit int doesn't print on more than 11 chars */ - im->user[i] = (char *) ImageIO_alloc((strlen(" views: ") + 11 + 1)); - sprintf( im->user[i++], " views: %d", analyzeHeader->hist.views ); + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " views: %d", analyzeHeader->hist.views ); - im->user[i] = (char *) ImageIO_alloc((strlen(" vols_added: ") + 11 + 1)); - sprintf( im->user[i++], " vols_added: %d", analyzeHeader->hist.vols_added ); + buffer_size = snprintf(nullptr, 0, " vols_added: %d", analyzeHeader->hist.vols_added ) + 1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " vols_added: %d", analyzeHeader->hist.vols_added ); - im->user[i] = (char *) ImageIO_alloc((strlen(" start_field: ") + 11 + 1)); - sprintf( im->user[i++], " start_field: %d", analyzeHeader->hist.start_field ); + buffer_size = snprintf(nullptr, 0, " start_field: %d", analyzeHeader->hist.start_field ) + 1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " start_field: %d", analyzeHeader->hist.start_field ); - im->user[i] = (char *) ImageIO_alloc((strlen(" field_skip: ") + 11 + 1)); - sprintf( im->user[i++], " field_skip: %d", analyzeHeader->hist.field_skip ); + buffer_size = snprintf(nullptr, 0, " field_skip: %d", analyzeHeader->hist.field_skip ) + 1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " field_skip: %d", analyzeHeader->hist.field_skip ); - im->user[i] = (char *) ImageIO_alloc((strlen(" omax: ") + 11 + 1)); - sprintf( im->user[i++], " omax: %d", analyzeHeader->hist.omax ); + buffer_size = snprintf(nullptr, 0, " omax: %d", analyzeHeader->hist.omax ) + 1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " omax: %d", analyzeHeader->hist.omax ); - im->user[i] = (char *) ImageIO_alloc((strlen(" omin: ") + 11 + 1)); - sprintf( im->user[i++], " omin: %d", analyzeHeader->hist.omin ); + buffer_size = snprintf(nullptr, 0, " omin: %d", analyzeHeader->hist.omin ) + 1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " omin: %d", analyzeHeader->hist.omin ); - im->user[i] = (char *) ImageIO_alloc((strlen(" smax: ") + 11 + 1)); - sprintf( im->user[i++], " smax: %d", analyzeHeader->hist.smax ); + buffer_size = snprintf(nullptr, 0, " smax: %d", analyzeHeader->hist.smax ) + 1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " smax: %d", analyzeHeader->hist.smax ); - im->user[i] = (char *) ImageIO_alloc((strlen(" smin: ") + 11 + 1)); - sprintf( im->user[i++], " smin: %d", analyzeHeader->hist.smin ); + buffer_size = snprintf(nullptr, 0, " smin: %d", analyzeHeader->hist.smin ) +1; + im->user[i] = (char *) ImageIO_alloc(buffer_size); + snprintf( im->user[i++], buffer_size, " smin: %d", analyzeHeader->hist.smin ); /* header is read. close header file and open data file. */ diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/bmp.h b/thirdparty/CGAL/include/CGAL/ImageIO/bmp.h index d9c9cb37..7cf89432 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/bmp.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/bmp.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/bmp.h $ -// $Id: bmp.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/bmp.h $ +// $Id: include/CGAL/ImageIO/bmp.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -13,7 +13,7 @@ /************************************************************************* * iobmp.h - I procedures for BMP raw images * - * $Id: bmp.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $Id: include/CGAL/ImageIO/bmp.h a484bfa $ * * Copyright INRIA * diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/bmp_impl.h b/thirdparty/CGAL/include/CGAL/ImageIO/bmp_impl.h index 5b152593..57b7d40c 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/bmp_impl.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/bmp_impl.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/bmp_impl.h $ -// $Id: bmp_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/bmp_impl.h $ +// $Id: include/CGAL/ImageIO/bmp_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -200,7 +200,7 @@ void *_readBmpImage( const char *name, numImages = 1; /* - * Now that we have our arrays allocted, read the image into them. + * Now that we have our arrays allocated, read the image into them. */ switch (fileType) { case TYPE_BMP: diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/bmpendian.h b/thirdparty/CGAL/include/CGAL/ImageIO/bmpendian.h index ba544647..ce4220ce 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/bmpendian.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/bmpendian.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/bmpendian.h $ -// $Id: bmpendian.h 07c4ada 2019-10-19T15:50:09+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/bmpendian.h $ +// $Id: include/CGAL/ImageIO/bmpendian.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/bmpendian_impl.h b/thirdparty/CGAL/include/CGAL/ImageIO/bmpendian_impl.h index 549110f2..70f11815 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/bmpendian_impl.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/bmpendian_impl.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/bmpendian_impl.h $ -// $Id: bmpendian_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/bmpendian_impl.h $ +// $Id: include/CGAL/ImageIO/bmpendian_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/bmpread.h b/thirdparty/CGAL/include/CGAL/ImageIO/bmpread.h index 9013caf2..05e86fe2 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/bmpread.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/bmpread.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/bmpread.h $ -// $Id: bmpread.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/bmpread.h $ +// $Id: include/CGAL/ImageIO/bmpread.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/bmpread_impl.h b/thirdparty/CGAL/include/CGAL/ImageIO/bmpread_impl.h index b2d7270e..7384c0fb 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/bmpread_impl.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/bmpread_impl.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/bmpread_impl.h $ -// $Id: bmpread_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/bmpread_impl.h $ +// $Id: include/CGAL/ImageIO/bmpread_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -699,7 +699,7 @@ void reflectYchar(char *image, int width, int height) * start of a BITMAPARRAYHEADER. These functions will leave the file pointer * on the byte after the image's color table. * - * The coordinate speaces in the returned arrays will have an upper-left + * The coordinate spaces in the returned arrays will have an upper-left * origin. As before, a non-zero return value indicates that something went * wrong. * diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/bmptypes.h b/thirdparty/CGAL/include/CGAL/ImageIO/bmptypes.h index a37c63dc..9b6f0fd3 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/bmptypes.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/bmptypes.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h $ -// $Id: bmptypes.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h $ +// $Id: include/CGAL/ImageIO/bmptypes.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -39,10 +39,10 @@ typedef char CGAL_INT8; typedef short CGAL_INT16; -typedef boost::int32_t CGAL_INT32; +typedef std::int32_t CGAL_INT32; typedef unsigned char CGAL_UINT8; typedef unsigned short CGAL_UINT16; -typedef boost::uint32_t CGAL_UINT32; +typedef std::uint32_t CGAL_UINT32; /***************************************************************************** * @@ -129,7 +129,7 @@ typedef struct Bitmapfileheader * BITMAPARRAYHEADER is used to establish a linked list of Bitmapfileheader * structures for a bitmap file with multiple images in it. There is no * equivalent structure in the Windows SDK. Its analogues in the OS/2 toolkit - * are the BITMAPARRAYFILEHEADER and BITMAPARRAYFILEHEADER2 strucutres. + * are the BITMAPARRAYFILEHEADER and BITMAPARRAYFILEHEADER2 structures. * * A Bitmapfileheader structure is always concatenated to the end of a * BITMAPARRAYHEADER structure. diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/convert.h b/thirdparty/CGAL/include/CGAL/ImageIO/convert.h index 37a96c59..6eadc794 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/convert.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/convert.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/convert.h $ -// $Id: convert.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/convert.h $ +// $Id: include/CGAL/ImageIO/convert.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -13,13 +13,13 @@ /************************************************************************* * convert.h - conversion between types * - * $Id: convert.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $Id: include/CGAL/ImageIO/convert.h a484bfa $ * * Copyright©INRIA 1998 * * AUTHOR: * Gregoire Malandain (greg@sophia.inria.fr) - * http://www.inria.fr/epidaure/personnel/malandain/ + * https://www-sop.inria.fr/members/Gregoire.Malandain/ * * CREATION DATE: * June, 9 1998 diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/convert_impl.h b/thirdparty/CGAL/include/CGAL/ImageIO/convert_impl.h index 554d6d7e..ba373582 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/convert_impl.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/convert_impl.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/convert_impl.h $ -// $Id: convert_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/convert_impl.h $ +// $Id: include/CGAL/ImageIO/convert_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -13,7 +13,7 @@ /************************************************************************* * convert.c - conversion between types * - * $Id: convert_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $Id: include/CGAL/ImageIO/convert_impl.h a484bfa $ * * Copyright©INRIA 1999 * diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/fgetns.h b/thirdparty/CGAL/include/CGAL/ImageIO/fgetns.h index 92801e19..20e5b8bd 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/fgetns.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/fgetns.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/fgetns.h $ -// $Id: fgetns.h 07c4ada 2019-10-19T15:50:09+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/fgetns.h $ +// $Id: include/CGAL/ImageIO/fgetns.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/fgetns_impl.h b/thirdparty/CGAL/include/CGAL/ImageIO/fgetns_impl.h index 05d781f0..eb30cc75 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/fgetns_impl.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/fgetns_impl.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/fgetns_impl.h $ -// $Id: fgetns_impl.h 07c4ada 2019-10-19T15:50:09+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/fgetns_impl.h $ +// $Id: include/CGAL/ImageIO/fgetns_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/gif.h b/thirdparty/CGAL/include/CGAL/ImageIO/gif.h index e24660b6..1bb1efde 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/gif.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/gif.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/gif.h $ -// $Id: gif.h 07c4ada 2019-10-19T15:50:09+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/gif.h $ +// $Id: include/CGAL/ImageIO/gif.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/gif_impl.h b/thirdparty/CGAL/include/CGAL/ImageIO/gif_impl.h index 8fce8233..5c924538 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/gif_impl.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/gif_impl.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/gif_impl.h $ -// $Id: gif_impl.h bdecbc9 2020-10-16T10:47:54+02:00 Raphael Grimm +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/gif_impl.h $ +// $Id: include/CGAL/ImageIO/gif_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -413,7 +413,7 @@ int gif89 = 0; - /* Start reading the raster data. First we get the intial code size + /* Start reading the raster data. First we get the initial code size * and compute decompressor constant values, based on this code size. */ diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/gis.h b/thirdparty/CGAL/include/CGAL/ImageIO/gis.h index 80cd2cfa..38a4400a 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/gis.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/gis.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/gis.h $ -// $Id: gis.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/gis.h $ +// $Id: include/CGAL/ImageIO/gis.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -23,7 +23,7 @@ Format du fichier texte associe aux fichiers binaires (images) -exemple : +example : 512 512 100 2 -type U16 -dx 1. diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/gis_impl.h b/thirdparty/CGAL/include/CGAL/ImageIO/gis_impl.h index 7003a5b9..15fb308b 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/gis_impl.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/gis_impl.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/gis_impl.h $ -// $Id: gis_impl.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/gis_impl.h $ +// $Id: include/CGAL/ImageIO/gis_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -130,10 +130,10 @@ int writeGis( char *name, _image* im) { do { memset( str, 0, _LGTH_STRING_ ); for ( j=0; jwordKind) { case WK_FLOAT: - sprintf(type, "float"); + snprintf(type, 30, "float"); scale[0] = '\0'; break; case WK_FIXED: switch(im->sign) { case SGN_SIGNED: - sprintf(type, "signed fixed"); + snprintf(type, 30, "signed fixed"); break; case SGN_UNSIGNED: - sprintf(type, "unsigned fixed"); + snprintf(type, 30, "unsigned fixed"); break; default: return -1; } - sprintf(scale, "SCALE=2**0\n"); + snprintf(scale, 20, "SCALE=2**0\n"); break; default: @@ -101,17 +101,17 @@ int _writeInrimageHeader(const _image *im, ENDIANNESS end) { switch(end) { case END_LITTLE: - sprintf(endianness, "decm"); + snprintf(endianness, 5, "decm"); break; case END_BIG: - sprintf(endianness, "sun"); + snprintf(endianness, 5, "sun"); break; default: /* fix architecture endianness */ if( _getEndianness() == END_LITTLE) - sprintf(endianness, "decm"); + snprintf(endianness, 5, "decm"); else - sprintf(endianness, "sun"); + snprintf(endianness, 5, "sun"); break; } diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/iris.h b/thirdparty/CGAL/include/CGAL/ImageIO/iris.h index de7bb465..dfe17caf 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/iris.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/iris.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/iris.h $ -// $Id: iris.h 07c4ada 2019-10-19T15:50:09+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/iris.h $ +// $Id: include/CGAL/ImageIO/iris.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/iris_impl.h b/thirdparty/CGAL/include/CGAL/ImageIO/iris_impl.h index 8ad60456..05f20308 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/iris_impl.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/iris_impl.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/iris_impl.h $ -// $Id: iris_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/iris_impl.h $ +// $Id: include/CGAL/ImageIO/iris_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/mincio.h b/thirdparty/CGAL/include/CGAL/ImageIO/mincio.h index 610ff9a5..de03eb57 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/mincio.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/mincio.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/mincio.h $ -// $Id: mincio.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/mincio.h $ +// $Id: include/CGAL/ImageIO/mincio.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/mincio_impl.h b/thirdparty/CGAL/include/CGAL/ImageIO/mincio_impl.h index 9221ddda..12a0af90 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/mincio_impl.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/mincio_impl.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/mincio_impl.h $ -// $Id: mincio_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/mincio_impl.h $ +// $Id: include/CGAL/ImageIO/mincio_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -357,7 +357,7 @@ int writeMincFile( const _image* im, const char *filename, strcat(newname, filename + i + 1); } else - sprintf(newname, "#TMP#%s", filename); + snprintf(newname,strlen(filename) + 10, "#TMP#%s", filename); } } diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/pnm.h b/thirdparty/CGAL/include/CGAL/ImageIO/pnm.h index 1c4554e3..88098bd0 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/pnm.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/pnm.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/pnm.h $ -// $Id: pnm.h 07c4ada 2019-10-19T15:50:09+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/pnm.h $ +// $Id: include/CGAL/ImageIO/pnm.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/pnm_impl.h b/thirdparty/CGAL/include/CGAL/ImageIO/pnm_impl.h index 150701ba..20cbcebe 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/pnm_impl.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/pnm_impl.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/pnm_impl.h $ -// $Id: pnm_impl.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/pnm_impl.h $ +// $Id: include/CGAL/ImageIO/pnm_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -524,14 +524,14 @@ int writePgmImage(char *name,_image *im ) } if ( im->dataMode == DM_ASCII ) - sprintf( string, "%s\n", PGM_ASCII_MAGIC ); + snprintf( string, 256, "%s\n", PGM_ASCII_MAGIC ); else - sprintf( string, "%s\n", PGM_MAGIC ); + snprintf( string, 256, "%s\n", PGM_MAGIC ); ImageIO_write( im, string, strlen( string ) ); - sprintf( string, "# CREATOR: pnm.c $Revision$ $Date$\n" ); + snprintf( string, 256, "# CREATOR: pnm.c $Revision$ $Date$\n" ); ImageIO_write( im, string, strlen( string ) ); - sprintf( string, "%zu %zu\n", im->xdim, im->ydim ); + snprintf( string, 256, "%zu %zu\n", im->xdim, im->ydim ); ImageIO_write( im, string, strlen( string ) ); max = 0; switch ( im->wdim ) { @@ -552,7 +552,7 @@ int writePgmImage(char *name,_image *im ) } /* max == 0 causes problems for xv */ if ( max == 0 ) max = 1; - sprintf( string, "%d\n", max ); + snprintf( string, 256, "%d\n", max ); ImageIO_write( im, string, strlen( string ) ); if ( im->dataMode == DM_ASCII ) { @@ -574,10 +574,10 @@ int writePgmImage(char *name,_image *im ) do { memset( str, 0, _LGTH_STRING_ ); for ( j=0; jopenMode = OM_CLOSE; return 1; } - - - diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/recbuffer.h b/thirdparty/CGAL/include/CGAL/ImageIO/recbuffer.h index 8c05d3f6..61922d0c 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/recbuffer.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/recbuffer.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/recbuffer.h $ -// $Id: recbuffer.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/recbuffer.h $ +// $Id: include/CGAL/ImageIO/recbuffer.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -13,7 +13,7 @@ /************************************************************************* * recbuffer.h - tools for recursive filtering of 3D and 2D image buffers * - * $Id: recbuffer.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $Id: include/CGAL/ImageIO/recbuffer.h a484bfa $ * * Copyright©INRIA 1999 * @@ -23,7 +23,7 @@ * * AUTHOR: * Gregoire Malandain (greg@sophia.inria.fr) - * http://www.inria.fr/epidaure/personnel/malandain/ + * https://www-sop.inria.fr/members/Gregoire.Malandain/ * * CREATION DATE: * June, 9 1998 diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/recbuffer_impl.h b/thirdparty/CGAL/include/CGAL/ImageIO/recbuffer_impl.h index b08ac804..18af0586 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/recbuffer_impl.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/recbuffer_impl.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/recbuffer_impl.h $ -// $Id: recbuffer_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/recbuffer_impl.h $ +// $Id: include/CGAL/ImageIO/recbuffer_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -13,7 +13,7 @@ /************************************************************************* * recbuffer.c - tools for recursive filtering of 3D and 2D image buffers * - * $Id: recbuffer_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $Id: include/CGAL/ImageIO/recbuffer_impl.h a484bfa $ * * Copyright©INRIA 1999 * diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/recline.h b/thirdparty/CGAL/include/CGAL/ImageIO/recline.h index e19f305e..a70cf7e3 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/recline.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/recline.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/recline.h $ -// $Id: recline.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/recline.h $ +// $Id: include/CGAL/ImageIO/recline.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -13,7 +13,7 @@ /************************************************************************* * recline.h - tools for recursive filtering of 1D lines * - * $Id: recline.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $Id: include/CGAL/ImageIO/recline.h a484bfa $ * * Copyright©INRIA 1998 * @@ -23,7 +23,7 @@ * * AUTHOR: * Gregoire Malandain (greg@sophia.inria.fr) - * http://www.inria.fr/epidaure/personnel/malandain/ + * https://www-sop.inria.fr/members/Gregoire.Malandain/ * * CREATION DATE: * June, 9 1998 diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/recline_impl.h b/thirdparty/CGAL/include/CGAL/ImageIO/recline_impl.h index d4abc708..958875cc 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/recline_impl.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/recline_impl.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/recline_impl.h $ -// $Id: recline_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/recline_impl.h $ +// $Id: include/CGAL/ImageIO/recline_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -13,7 +13,7 @@ /************************************************************************* * recline.c - tools for recursive filtering of 1D lines * - * $Id: recline_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $Id: include/CGAL/ImageIO/recline_impl.h a484bfa $ * * Copyright©INRIA 1999 * diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/reech4x4.h b/thirdparty/CGAL/include/CGAL/ImageIO/reech4x4.h index 63bca20d..1fd68822 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/reech4x4.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/reech4x4.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/reech4x4.h $ -// $Id: reech4x4.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/reech4x4.h $ +// $Id: include/CGAL/ImageIO/reech4x4.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -13,7 +13,7 @@ /************************************************************************* * reech4x4.h - * - * $Id: reech4x4.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $Id: include/CGAL/ImageIO/reech4x4.h a484bfa $ * * Copyright©INRIA 1999 * diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/reech4x4_impl.h b/thirdparty/CGAL/include/CGAL/ImageIO/reech4x4_impl.h index a0fdad89..aa4ddd95 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/reech4x4_impl.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/reech4x4_impl.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/reech4x4_impl.h $ -// $Id: reech4x4_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/reech4x4_impl.h $ +// $Id: include/CGAL/ImageIO/reech4x4_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -13,7 +13,7 @@ /************************************************************************* * reech4x4.c - * - * $Id: reech4x4_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $Id: include/CGAL/ImageIO/reech4x4_impl.h a484bfa $ * * Copyright©INRIA 1999 * diff --git a/thirdparty/CGAL/include/CGAL/ImageIO/typedefs.h b/thirdparty/CGAL/include/CGAL/ImageIO/typedefs.h index 6d94acab..71045208 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO/typedefs.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO/typedefs.h @@ -3,8 +3,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO/typedefs.h $ -// $Id: typedefs.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO/typedefs.h $ +// $Id: include/CGAL/ImageIO/typedefs.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // // @@ -13,13 +13,13 @@ /************************************************************************* * typedefs.h - * - * $Id: typedefs.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $Id: include/CGAL/ImageIO/typedefs.h a484bfa $ * * Copyright©INRIA 1998 * * AUTHOR: * Gregoire Malandain (greg@sophia.inria.fr) - * http://www.inria.fr/epidaure/personnel/malandain/ + * https://www-sop.inria.fr/members/Gregoire.Malandain/ * * CREATION DATE: * June, 9 1998 @@ -35,7 +35,7 @@ -/* Differents type coding for images and buffers. +/* Different type coding for images and buffers. */ typedef enum { TYPE_UNKNOWN /* unknown type */, @@ -63,7 +63,7 @@ typedef double r64; -/* Typedef Booleen +/* Typedef Boolean */ typedef enum { False = 0, diff --git a/thirdparty/CGAL/include/CGAL/ImageIO_impl.h b/thirdparty/CGAL/include/CGAL/ImageIO_impl.h index 0cc02f37..b4fec6db 100644 --- a/thirdparty/CGAL/include/CGAL/ImageIO_impl.h +++ b/thirdparty/CGAL/include/CGAL/ImageIO_impl.h @@ -5,8 +5,8 @@ // // This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/ImageIO_impl.h $ -// $Id: ImageIO_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/ImageIO_impl.h $ +// $Id: include/CGAL/ImageIO_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later // @@ -887,7 +887,7 @@ _image* _readNonInterlacedImage(const char *name) { /* Write inrimage given in inr in file name. If file name's suffix is - .gz, the image is gziped. If file name's suffix is .hdr, the image + .gz, the image is gzipped. If file name's suffix is .hdr, the image is written in ANALYZE format. If file name is nullptr, image is written on stdout */ CGAL_INLINE_FUNCTION @@ -1242,7 +1242,7 @@ static void _swapImageData( _image *im ) Swap bytes depending on the endianness and the current architecture */ CGAL_INLINE_FUNCTION int _readImageData(_image *im) { - unsigned long size, nread; + std::size_t size, nread; if(im->openMode != OM_CLOSE) { size = im->xdim * im->ydim * im->zdim * im->vdim * im->wdim; @@ -1279,7 +1279,7 @@ int _readImageData(_image *im) { Swap bytes depending on the endianness and the current architecture. */ CGAL_INLINE_FUNCTION int _readNonInterlacedImageData(_image *im) { - unsigned long size, nread; + std::size_t size, nread; unsigned char **vp, *buf; unsigned int i, j, k, v, w; @@ -1356,7 +1356,7 @@ int _readNonInterlacedImageData(_image *im) { been read by _readImageHeader. The image buffer is interlaced. */ CGAL_INLINE_FUNCTION int _readNonInterlacedFileData(_image *im) { - unsigned long size, nread; + std::size_t size, nread; unsigned char *ptr1, *vp, *buf; unsigned int i, j, k, v, w; diff --git a/thirdparty/CGAL/include/CGAL/Image_3.h b/thirdparty/CGAL/include/CGAL/Image_3.h index 137fbada..5d914921 100644 --- a/thirdparty/CGAL/include/CGAL/Image_3.h +++ b/thirdparty/CGAL/include/CGAL/Image_3.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/Image_3.h $ -// $Id: Image_3.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/Image_3.h $ +// $Id: include/CGAL/Image_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -87,7 +87,7 @@ class CGAL_IMAGEIO_EXPORT Image_3 protected: Image_shared_ptr image_ptr; - // implementation in src/CGAL_ImageIO/Image_3.cpp + // implementation in Image_3_impl.h bool private_read(_image* im, Own own_the_data = OWN_THE_DATA); public: @@ -150,6 +150,10 @@ class CGAL_IMAGEIO_EXPORT Image_3 float ty() const { return image_ptr->ty; } float tz() const { return image_ptr->tz; } + float& tx(){ return image_ptr->tx; } + float& ty(){ return image_ptr->ty; } + float& tz(){ return image_ptr->tz; } + float value(const std::size_t i, const std::size_t j, const std::size_t k) const diff --git a/thirdparty/CGAL/include/CGAL/Image_3_impl.h b/thirdparty/CGAL/include/CGAL/Image_3_impl.h index 3cecc305..2c884e07 100644 --- a/thirdparty/CGAL/include/CGAL/Image_3_impl.h +++ b/thirdparty/CGAL/include/CGAL/Image_3_impl.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/Image_3_impl.h $ -// $Id: Image_3_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/Image_3_impl.h $ +// $Id: include/CGAL/Image_3_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau, Pierre Alliez diff --git a/thirdparty/CGAL/include/CGAL/Image_3_vtk_interface.h b/thirdparty/CGAL/include/CGAL/Image_3_vtk_interface.h index f95d6a01..8ea06fa9 100644 --- a/thirdparty/CGAL/include/CGAL/Image_3_vtk_interface.h +++ b/thirdparty/CGAL/include/CGAL/Image_3_vtk_interface.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/Image_3_vtk_interface.h $ -// $Id: Image_3_vtk_interface.h 91d6635 2021-06-16T15:04:45+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/Image_3_vtk_interface.h $ +// $Id: include/CGAL/Image_3_vtk_interface.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau @@ -55,31 +55,31 @@ struct VTK_type_generator { }; template <> -struct VTK_type_generator { +struct VTK_type_generator { static const int type = VTK_UNSIGNED_CHAR; typedef vtkUnsignedCharArray ArrayType; }; template <> -struct VTK_type_generator { +struct VTK_type_generator { static const int type = VTK_SHORT; typedef vtkShortArray ArrayType; }; template <> -struct VTK_type_generator { +struct VTK_type_generator { static const int type = VTK_UNSIGNED_SHORT; typedef vtkUnsignedShortArray ArrayType; }; template <> -struct VTK_type_generator { +struct VTK_type_generator { static const int type = VTK_INT; typedef vtkIntArray ArrayType; }; template <> -struct VTK_type_generator { +struct VTK_type_generator { static const int type = VTK_UNSIGNED_INT; typedef vtkUnsignedIntArray ArrayType; }; diff --git a/thirdparty/CGAL/include/CGAL/Implicit_surface_3.h b/thirdparty/CGAL/include/CGAL/Implicit_surface_3.h index 7b313313..eb07117e 100644 --- a/thirdparty/CGAL/include/CGAL/Implicit_surface_3.h +++ b/thirdparty/CGAL/include/CGAL/Implicit_surface_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Implicit_surface_3.h $ -// $Id: Implicit_surface_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Implicit_surface_3.h $ +// $Id: include/CGAL/Implicit_surface_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent RINEAU diff --git a/thirdparty/CGAL/include/CGAL/Implicit_to_labeled_subdomains_function_wrapper.h b/thirdparty/CGAL/include/CGAL/Implicit_to_labeled_subdomains_function_wrapper.h index b7572260..2e92f6b5 100644 --- a/thirdparty/CGAL/include/CGAL/Implicit_to_labeled_subdomains_function_wrapper.h +++ b/thirdparty/CGAL/include/CGAL/Implicit_to_labeled_subdomains_function_wrapper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_mesh_3/include/CGAL/Implicit_to_labeled_subdomains_function_wrapper.h $ -// $Id: Implicit_to_labeled_subdomains_function_wrapper.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_mesh_3/include/CGAL/Implicit_to_labeled_subdomains_function_wrapper.h $ +// $Id: include/CGAL/Implicit_to_labeled_subdomains_function_wrapper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mikhail Bogdanov @@ -15,7 +15,6 @@ #include #include -#include #if defined(BOOST_MSVC) # pragma warning(push) @@ -47,9 +46,9 @@ class Implicit_to_labeled_subdomains_function_wrapper } private: - typedef typename boost::mpl::if_, - Function_*, - Function_>::type Stored_function; + typedef std::conditional_t, + Function_*, + Function_> Stored_function; /// Function to wrap Stored_function f_; diff --git a/thirdparty/CGAL/include/CGAL/Implicit_to_labeling_function_wrapper.h b/thirdparty/CGAL/include/CGAL/Implicit_to_labeling_function_wrapper.h index 07e938ff..9a28fd9a 100644 --- a/thirdparty/CGAL/include/CGAL/Implicit_to_labeling_function_wrapper.h +++ b/thirdparty/CGAL/include/CGAL/Implicit_to_labeling_function_wrapper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h $ -// $Id: Implicit_to_labeling_function_wrapper.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h $ +// $Id: include/CGAL/Implicit_to_labeling_function_wrapper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -32,10 +32,7 @@ #endif #include -#include -#include #include -#include #include #include @@ -69,9 +66,9 @@ class Implicit_to_labeling_function_wrapper } private: - typedef typename boost::mpl::if_, - Function_*, - Function_>::type Stored_function; + typedef std::conditional_t, + Function_*, + Function_> Stored_function; /// Function to wrap Stored_function f_; @@ -142,7 +139,32 @@ class Implicit_vector_to_labeling_function_wrapper }; // end class Implicit_to_labeling_function_wrapper + + /*! +\ingroup PkgMesh3Domains + +The class `Implicit_multi_domain_to_labeling_function_wrapper` is a helping class to get a function with integer values +labeling the components of a multidomain. The multidomain is described through a set of functions {fi(p), i=1, ...n}. +Each component corresponds to a sign vector [s1, s2, ..., sn] where si is the sign of the function fi(p) at a point p of the component. +This wrapper class can be passed to `Labeled_mesh_domain_3` as first template parameter. + +\par Example +For example, the multidomain described by the three functions [f1,f2,f3] and the two sign vectors [-,-,+] and [+,-,+] + includes two components.
    +The first one matches the locus of points satisfying f1(p)<0 and f2(p)<0 and f3(p)>0.
    +The second one matches the locus of points satisfying f1(p)>0 and f2(p)<0 and f3(p)>0.
    + +\tparam Function provides the definition of the function. +This parameter stands for a model of the concept `ImplicitFunction` described in the surface mesh generation package. +The number types `Function::FT` and `BGT::FT` are required to match. + +\sa `CGAL::Labeled_mesh_domain_3`. +*/ +#ifdef DOXYGEN_RUNNING +template +#else template +#endif class Implicit_multi_domain_to_labeling_function_wrapper { template @@ -156,15 +178,25 @@ class Implicit_multi_domain_to_labeling_function_wrapper class Implicit_function_traits { public: - typedef typename boost::remove_reference< - typename boost::remove_cv< Point_ >::type>::type Point; + typedef std::remove_reference_t< + std::remove_cv_t< Point_ >> Point; }; public: - typedef int return_type; - typedef ImplicitFunction Function; - typedef typename Implicit_function_traits::Point Point_3; - typedef std::vector Function_vector; + /// \name Types + /// @{ + +#ifdef DOXYGEN_RUNNING + typedef typename Function::Point Point_3; +#else + typedef ImplicitFunction Function; + typedef typename Implicit_function_traits::Point Point_3; + typedef int return_type; +#endif + + typedef std::vector Function_vector; + + /// @} private: std::vector funcs; @@ -172,13 +204,24 @@ class Implicit_multi_domain_to_labeling_function_wrapper std::vector bmasks; public: - Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf, const std::vector >& vps) - : funcs(vf), bmasks(vps.size(), Bmask(funcs.size() * 2, false)) + /// \name Creation + /// @{ + + /*! + * \brief Construction from a vector of implicit functions and a vector of vector of signs. + * + * \param implicit_functions the vector of implicit functions. + * \param position_vectors the vector of vector of signs. Each vector of positions describes a component. + * + * \sa `Sign` + */ + Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& implicit_functions, const std::vector >& position_vectors) + : funcs(implicit_functions), bmasks(position_vectors.size(), Bmask(funcs.size() * 2, false)) { CGAL_assertion(funcs.size() != 0); std::size_t mask_index = 0; - for (std::vector >::const_iterator mask_iter = vps.begin(), mask_end_iter = vps.end(); + for (std::vector >::const_iterator mask_iter = position_vectors.begin(), mask_end_iter = position_vectors.end(); mask_iter != mask_end_iter; ++mask_iter) { @@ -200,9 +243,15 @@ class Implicit_multi_domain_to_labeling_function_wrapper } std::sort(bmasks.begin(), bmasks.end()); } - - Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf) - : funcs(vf) + /*! + * \brief Construction from a vector of implicit functions. + + * \param implicit_functions the vector of implicit functions. + * + * Position vectors are built automatically so that the union of components equals the union of the functions. + */ + Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& implicit_functions) + : funcs(implicit_functions) { CGAL_assertion(funcs.size() != 0); @@ -227,13 +276,19 @@ class Implicit_multi_domain_to_labeling_function_wrapper std::sort(bmasks.begin(), bmasks.end()); } - Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& vf, const std::vector& vps) - : funcs(vf), bmasks(vps.size(), Bmask(funcs.size() * 2, false)) + /*! + * \brief Construction from a vector of implicit functions and a vector of strings. + * + * \param implicit_functions the vector of implicit functions. + * \param position_strings the vector of strings. The strings contained in this vector must contain '+' or '-' only. Each string (vector of positions) describes a component. + */ + Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& implicit_functions, const std::vector& position_strings) + : funcs(implicit_functions), bmasks(position_strings.size(), Bmask(funcs.size() * 2, false)) { CGAL_assertion(funcs.size() != 0); std::size_t mask_index = 0; - for (std::vector::const_iterator mask_iter = vps.begin(), mask_end_iter = vps.end(); + for (std::vector::const_iterator mask_iter = position_strings.begin(), mask_end_iter = position_strings.end(); mask_iter != mask_end_iter; ++mask_iter) { @@ -256,6 +311,8 @@ class Implicit_multi_domain_to_labeling_function_wrapper std::sort(bmasks.begin(), bmasks.end()); } + /// @} + return_type operator() (const Point_3& p) const { Bmask bmask(funcs.size() * 2, false); @@ -281,9 +338,7 @@ class Implicit_multi_domain_to_labeling_function_wrapper } }; -} // end namespace CGAL - - +} // end namespace CGAL #if defined(BOOST_MSVC) # pragma warning(pop) diff --git a/thirdparty/CGAL/include/CGAL/In_place_list.h b/thirdparty/CGAL/include/CGAL/In_place_list.h index 4cbaa781..22749d1f 100644 --- a/thirdparty/CGAL/include/CGAL/In_place_list.h +++ b/thirdparty/CGAL/include/CGAL/In_place_list.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/In_place_list.h $ -// $Id: In_place_list.h 18ca811 2021-05-27T12:36:17+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/In_place_list.h $ +// $Id: include/CGAL/In_place_list.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,7 +27,6 @@ #include #include #include -#include namespace CGAL { @@ -175,7 +174,6 @@ namespace internal { }; - template std::size_t hash_value(const In_place_list_iterator& i) { @@ -189,7 +187,7 @@ template { const T* ptr = i.operator->(); return reinterpret_cast(ptr)/ sizeof(T); - } + } } @@ -575,14 +573,14 @@ class In_place_list { void merge(Self& x); // merges the list x into the list `l' and x becomes empty. It is - // stable. Precondition: Both lists are increasingly sorted. A - // suitable `operator<' for the type T. + // stable. Precondition: Both lists are sorted in increasing order + // by means of a suitable `operator<` for the type `T`. template < class StrictWeakOrdering > void merge(Self& x, StrictWeakOrdering ord) // merges the list x into the list `l' and x becomes empty. // It is stable. - // Precondition: Both lists are increasingly sorted wrt. ord. + // Precondition: Both lists are sorted in increasing order wrt. `ord`. { iterator first1 = begin(); iterator last1 = end(); @@ -792,8 +790,7 @@ namespace std { std::size_t operator()(const CGAL::internal::In_place_list_iterator& i) const { - const T* ptr = i.operator->(); - return reinterpret_cast(ptr)/ sizeof(T); + return CGAL::internal::hash_value(i); } }; @@ -803,8 +800,7 @@ namespace std { std::size_t operator()(const CGAL::internal::In_place_list_const_iterator& i) const { - const T* ptr =i.operator->(); - return reinterpret_cast(ptr)/ sizeof(T); + return CGAL::internal::hash_value(i); } }; #endif // CGAL_CFG_NO_STD_HASH diff --git a/thirdparty/CGAL/include/CGAL/Incremental_neighbor_search.h b/thirdparty/CGAL/include/CGAL/Incremental_neighbor_search.h index 8f77dd7e..69d93e2f 100644 --- a/thirdparty/CGAL/include/CGAL/Incremental_neighbor_search.h +++ b/thirdparty/CGAL/include/CGAL/Incremental_neighbor_search.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Incremental_neighbor_search.h $ -// $Id: Incremental_neighbor_search.h 9888d44 2022-01-31T09:44:04+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Incremental_neighbor_search.h $ +// $Id: include/CGAL/Incremental_neighbor_search.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -264,7 +264,7 @@ namespace CGAL { FT distance_to_root; - bool search_nearest_neighbour; + bool search_nearest_neighbor; FT rd; @@ -278,8 +278,8 @@ namespace CGAL { bool search_nearest; - Priority_higher(bool search_the_nearest_neighbour) - : search_nearest(search_the_nearest_neighbour) + Priority_higher(bool search_the_nearest_neighbor) + : search_nearest(search_the_nearest_neighbor) {} //highest priority is smallest distance @@ -296,8 +296,8 @@ namespace CGAL { bool search_nearest; - Distance_smaller(bool search_the_nearest_neighbour) - :search_nearest(search_the_nearest_neighbour) + Distance_smaller(bool search_the_nearest_neighbor) + :search_nearest(search_the_nearest_neighbor) {} //highest priority is smallest distance @@ -325,19 +325,19 @@ namespace CGAL { int number_of_internal_nodes_visited; int number_of_leaf_nodes_visited; int number_of_items_visited; - int number_of_neighbours_computed; + int number_of_neighbors_computed; // constructor Iterator_implementation(const Tree& tree, const Query_item& q,const Distance& tr, FT Eps, bool search_nearest) - : query_point(q), search_nearest_neighbour(search_nearest), + : query_point(q), search_nearest_neighbor(search_nearest), m_distance_helper(tr, tree.traits()), m_tree(tree), PriorityQueue(Priority_higher(search_nearest)), Item_PriorityQueue(Distance_smaller(search_nearest)), distance(tr), reference_count(1), number_of_internal_nodes_visited(0), number_of_leaf_nodes_visited(0), number_of_items_visited(0), - number_of_neighbours_computed(0) + number_of_neighbors_computed(0) { if (tree.empty()) return; @@ -365,7 +365,7 @@ namespace CGAL { // rd is the distance of the top of the priority queue to q rd=The_Root->second; - Compute_the_next_nearest_neighbour(); + Compute_the_next_nearest_neighbor(); } // * operator @@ -380,7 +380,7 @@ namespace CGAL { operator++() { Delete_the_current_item_top(); - Compute_the_next_nearest_neighbour(); + Compute_the_next_nearest_neighbor(); return *this; } @@ -404,8 +404,8 @@ namespace CGAL { number_of_leaf_nodes_visited << std::endl; s << "Number of points visited:" << number_of_items_visited << std::endl; - s << "Number of neighbours computed:" << - number_of_neighbours_computed << std::endl; + s << "Number of neighbors computed:" << + number_of_neighbors_computed << std::endl; return s; } @@ -459,21 +459,21 @@ namespace CGAL { // old top of PriorityQueue has been processed, // hence update rd - bool next_neighbour_found; + bool next_neighbor_found; if (!(PriorityQueue.empty())) { rd = PriorityQueue.top()->second; - next_neighbour_found = (search_furthest ? + next_neighbor_found = (search_furthest ? multiplication_factor*rd < Item_PriorityQueue.top()->second : multiplication_factor*rd > Item_PriorityQueue.top()->second); } - else // priority queue empty => last neighbour found + else // priority queue empty => last neighbor found { - next_neighbour_found = true; + next_neighbor_found = true; } - number_of_neighbours_computed++; - return next_neighbour_found; + number_of_neighbors_computed++; + return next_neighbor_found; } // Without cache @@ -494,37 +494,37 @@ namespace CGAL { // old top of PriorityQueue has been processed, // hence update rd - bool next_neighbour_found; + bool next_neighbor_found; if (!(PriorityQueue.empty())) { rd = PriorityQueue.top()->second; - next_neighbour_found = (search_furthest ? + next_neighbor_found = (search_furthest ? multiplication_factor*rd < Item_PriorityQueue.top()->second : multiplication_factor*rd > Item_PriorityQueue.top()->second); } - else // priority queue empty => last neighbour found + else // priority queue empty => last neighbor found { - next_neighbour_found = true; + next_neighbor_found = true; } - number_of_neighbours_computed++; - return next_neighbour_found; + number_of_neighbors_computed++; + return next_neighbor_found; } void - Compute_the_next_nearest_neighbour() + Compute_the_next_nearest_neighbor() { // compute the next item - bool next_neighbour_found=false; + bool next_neighbor_found=false; if (!(Item_PriorityQueue.empty())) { - if (search_nearest_neighbour) - next_neighbour_found = + if (search_nearest_neighbor) + next_neighbor_found = (multiplication_factor*rd > Item_PriorityQueue.top()->second); else - next_neighbour_found = + next_neighbor_found = (rd < multiplication_factor*Item_PriorityQueue.top()->second); } - while ((!next_neighbour_found) && (!PriorityQueue.empty())) { + while ((!next_neighbor_found) && (!PriorityQueue.empty())) { Cell_with_distance* The_node_top = PriorityQueue.top(); Node_const_handle N = The_node_top->first->node(); @@ -544,7 +544,7 @@ namespace CGAL { Node_box* upper_box = new Node_box(*B); lower_box->split(*upper_box,new_cut_dim, new_cut_val); delete B; - if (search_nearest_neighbour) { + if (search_nearest_neighbor) { FT distance_to_box_lower = distance.min_distance_to_rectangle(query_point, *lower_box); FT distance_to_box_upper = @@ -597,12 +597,15 @@ namespace CGAL { number_of_leaf_nodes_visited++; if (node->size() > 0) { typename internal::Has_points_cache::type::value>::type dummy; - next_neighbour_found = search_in_leaf(node, dummy, !search_nearest_neighbour); + next_neighbor_found = search_in_leaf(node, dummy, !search_nearest_neighbor); } - } // next_neighbour_found or priority queue is empty + } // next_neighbor_found or priority queue is empty // in the latter case also the item priority queue is empty } + + CGAL_DEPRECATED void Compute_the_next_nearest_neighbour() + { void Compute_the_next_nearest_neighbor(); } }; // class Iterator_implementation }; // class iterator }; // class diff --git a/thirdparty/CGAL/include/CGAL/Index_property_map.h b/thirdparty/CGAL/include/CGAL/Index_property_map.h index 0fe00e09..2e9c0c14 100644 --- a/thirdparty/CGAL/include/CGAL/Index_property_map.h +++ b/thirdparty/CGAL/include/CGAL/Index_property_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Property_map/include/CGAL/Index_property_map.h $ -// $Id: Index_property_map.h 8166579 2021-10-11T19:58:07+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Property_map/include/CGAL/Index_property_map.h $ +// $Id: include/CGAL/Index_property_map.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret diff --git a/thirdparty/CGAL/include/CGAL/Info_for_cell_attribute.h b/thirdparty/CGAL/include/CGAL/Info_for_cell_attribute.h new file mode 100644 index 00000000..4b58f2fc --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Info_for_cell_attribute.h @@ -0,0 +1,45 @@ +// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Combinatorial_map/include/CGAL/Info_for_cell_attribute.h $ +// $Id: include/CGAL/Info_for_cell_attribute.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Guillaume Damiand +// +#ifndef CGAL_INFO_FOR_CELL_ATTRIBUTE_H +#define CGAL_INFO_FOR_CELL_ATTRIBUTE_H 1 + +namespace CGAL { + + /// Info associated with a cell_attribute. + template + class Info_for_cell_attribute + { + public: + /// Constructor without parameter. + Info_for_cell_attribute()=default; // default => zero-initializing built-in types + + /// Constructor with an info in parameter. + Info_for_cell_attribute(const Info& ainfo) : minfo(ainfo) + {} + + /// Get the info associated with the cell_attribute. + Info& info() + { return minfo; } + + /// Get the info associated with the cell_attribute. + const Info& info() const + { return minfo; } + + protected: + /// The info associated with the cell_attribute. + Info minfo; + }; + +} // namespace CGAL + +#endif // CGAL_INFO_FOR_CELL_ATTRIBUTE_H // +// EOF // diff --git a/thirdparty/CGAL/include/CGAL/Installation/internal/deprecation_warning.h b/thirdparty/CGAL/include/CGAL/Installation/internal/deprecation_warning.h index fb59bc3b..088b7c82 100644 --- a/thirdparty/CGAL/include/CGAL/Installation/internal/deprecation_warning.h +++ b/thirdparty/CGAL/include/CGAL/Installation/internal/deprecation_warning.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/Installation/internal/deprecation_warning.h $ -// $Id: deprecation_warning.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/Installation/internal/deprecation_warning.h $ +// $Id: include/CGAL/Installation/internal/deprecation_warning.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Philipp Möller, Mael Rouxel-Labbé @@ -71,7 +71,7 @@ #endif #if defined(CGAL_NO_DEPRECATED_CODE) // No deprecated code. -CGAL_static_assertion_msg(false, CGAL_INTERNAL_DEPRECATED_MESSAGE); +static_assert(false, CGAL_INTERNAL_DEPRECATED_MESSAGE); #elif !defined(CGAL_NO_DEPRECATION_WARNINGS) // don't trigger on NO_DEPRECATION_WARNINGS # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__) # pragma message (CGAL_INTERNAL_DEPRECATED_MESSAGE) diff --git a/thirdparty/CGAL/include/CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h b/thirdparty/CGAL/include/CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h index e67aeb23..8a7c8f37 100644 --- a/thirdparty/CGAL/include/CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h +++ b/thirdparty/CGAL/include/CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h @@ -2,14 +2,14 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h $ -// $Id: disable_deprecation_warnings_and_errors.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h $ +// $Id: include/CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Mael Rouxel-Labbé -// Some tests are explicitely used to check the sanity of deprecated code and should not -// give warnings/errors on plateforms that defined CGAL_NO_DEPRECATED_CODE CGAL-wide +// Some tests are explicitly used to check the sanity of deprecated code and should not +// give warnings/errors on platforms that defined CGAL_NO_DEPRECATED_CODE CGAL-wide // (or did not disable deprecation warnings). #if !defined(CGAL_NO_DEPRECATION_WARNINGS) diff --git a/thirdparty/CGAL/include/CGAL/Installation/internal/enable_third_party_libraries.h b/thirdparty/CGAL/include/CGAL/Installation/internal/enable_third_party_libraries.h index 0936ea0f..6141cf7a 100644 --- a/thirdparty/CGAL/include/CGAL/Installation/internal/enable_third_party_libraries.h +++ b/thirdparty/CGAL/include/CGAL/Installation/internal/enable_third_party_libraries.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/Installation/internal/enable_third_party_libraries.h $ -// $Id: enable_third_party_libraries.h 2455db6 2022-01-18T11:39:00+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/Installation/internal/enable_third_party_libraries.h $ +// $Id: include/CGAL/Installation/internal/enable_third_party_libraries.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,11 +27,9 @@ #if defined(__has_include) && ( ! defined _MSC_VER || _MSC_VER > 1900) # if CGAL_USE_GMP && ! __has_include() -# pragma CGAL_WARNING(" cannot be found. Less efficient number types will be used instead. Define CGAL_NO_GMP=1 if that is on purpose.") # undef CGAL_USE_GMP # undef CGAL_USE_MPFR # elif CGAL_USE_MPFR && ! __has_include() -# pragma CGAL_WARNING(" cannot be found and the GMP support in CGAL requires it. Less efficient number types will be used instead. Define CGAL_NO_GMP=1 if that is on purpose.") # undef CGAL_USE_GMP # undef CGAL_USE_MPFR # endif // CGAL_USE_MPFR and no diff --git a/thirdparty/CGAL/include/CGAL/Interpolation/internal/helpers.h b/thirdparty/CGAL/include/CGAL/Interpolation/internal/helpers.h index 9e9560ec..ca5d943d 100644 --- a/thirdparty/CGAL/include/CGAL/Interpolation/internal/helpers.h +++ b/thirdparty/CGAL/include/CGAL/Interpolation/internal/helpers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interpolation/include/CGAL/Interpolation/internal/helpers.h $ -// $Id: helpers.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interpolation/include/CGAL/Interpolation/internal/helpers.h $ +// $Id: include/CGAL/Interpolation/internal/helpers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Julia Floetotto diff --git a/thirdparty/CGAL/include/CGAL/Interpolation_gradient_fitting_traits_2.h b/thirdparty/CGAL/include/CGAL/Interpolation_gradient_fitting_traits_2.h index 3d0530a1..83adb1a7 100644 --- a/thirdparty/CGAL/include/CGAL/Interpolation_gradient_fitting_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Interpolation_gradient_fitting_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interpolation/include/CGAL/Interpolation_gradient_fitting_traits_2.h $ -// $Id: Interpolation_gradient_fitting_traits_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interpolation/include/CGAL/Interpolation_gradient_fitting_traits_2.h $ +// $Id: include/CGAL/Interpolation_gradient_fitting_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Julia Floetotto diff --git a/thirdparty/CGAL/include/CGAL/Interpolation_traits_2.h b/thirdparty/CGAL/include/CGAL/Interpolation_traits_2.h index 999bc696..672507de 100644 --- a/thirdparty/CGAL/include/CGAL/Interpolation_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Interpolation_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interpolation/include/CGAL/Interpolation_traits_2.h $ -// $Id: Interpolation_traits_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interpolation/include/CGAL/Interpolation_traits_2.h $ +// $Id: include/CGAL/Interpolation_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Julia Floetotto diff --git a/thirdparty/CGAL/include/CGAL/Intersection_traits.h b/thirdparty/CGAL/include/CGAL/Intersection_traits.h index b8c9f291..c3b8138a 100644 --- a/thirdparty/CGAL/include/CGAL/Intersection_traits.h +++ b/thirdparty/CGAL/include/CGAL/Intersection_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersection_traits.h $ -// $Id: Intersection_traits.h 1d01b0d 2022-01-18T09:20:03+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersection_traits.h $ +// $Id: include/CGAL/Intersection_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,23 +18,24 @@ #include #include -#include -#include +#include + +#include #define CGAL_INTERSECTION_TRAITS_2(A, B, R1, R2) \ template \ struct Intersection_traits { \ - typedef typename boost::variant \ + typedef typename std::variant \ variant_type; \ - typedef typename boost::optional< variant_type > result_type; \ + typedef typename std::optional< variant_type > result_type; \ }; #define CGAL_INTERSECTION_TRAITS_3(A, B, R1, R2, R3) \ template \ struct Intersection_traits { \ - typedef typename boost::variant variant_type; \ - typedef typename boost::optional< variant_type > result_type; \ + typedef typename std::optional< variant_type > result_type; \ }; #define CGAL_INTERSECTION_FUNCTION(A, B, DIM) \ @@ -61,19 +62,19 @@ #define CGAL_DO_INTERSECT_FUNCTION(A, B, DIM) \ template \ - inline bool \ + inline typename K::Boolean \ do_intersect(const A& a, const B& b) { \ return BOOST_PP_CAT(K().do_intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \ } \ template \ - inline bool \ + inline typename K::Boolean \ do_intersect(const B& b, const A& a) { \ return BOOST_PP_CAT(K().do_intersect_, BOOST_PP_CAT(DIM, _object()(b, a))); \ } #define CGAL_DO_INTERSECT_FUNCTION_SELF(A, DIM) \ template \ - inline bool \ + inline typename K::Boolean \ do_intersect(const A & a, const A & b) { \ return BOOST_PP_CAT(K().do_intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \ } @@ -117,16 +118,16 @@ const T* intersect_get(const CGAL::Object& o) { return CGAL::object_cast(&o); } -template +template inline -const T* intersect_get(const boost::optional< boost::variant >& v) { - return boost::get(&*v); +const T* intersect_get(const std::optional< std::variant >& v) { + return std::get_if(&*v); } -template +template inline -const T* intersect_get(const boost::variant & v) { - return boost::get(&v); +const T* intersect_get(const std::variant & v) { + return std::get_if(&v); } template @@ -151,21 +152,21 @@ intersection_impl(const A& a, const B& b, Dynamic_dimension_tag) { } template -inline bool +inline auto // K::Boolean do_intersect_impl(const A& a, const B& b, CGAL::Dimension_tag<2>) { typedef typename CGAL::Kernel_traits::Kernel Kernel; return Kernel().do_intersect_2_object()(a, b); } template -inline bool +inline auto // K::Boolean do_intersect_impl(const A& a, const B& b, Dimension_tag<3>) { typedef typename CGAL::Kernel_traits::Kernel Kernel; return Kernel().do_intersect_3_object()(a, b); } template -inline bool +inline auto // K::Boolean do_intersect_impl(const A& a, const B& b, Dynamic_dimension_tag) { typedef typename CGAL::Kernel_traits::Kernel Kernel; return Kernel().do_intersect_d_object()(a, b); @@ -180,16 +181,16 @@ do_intersect_impl(const A& a, const B& b, Dynamic_dimension_tag) { // inline // typename Intersection_traits< typename Kernel_traits::Kernel, A, B>::result_type >::type // intersection(const A& a, const B& b) { -// CGAL_static_assertion_msg( (boost::is_same::value), -// "intersection with objects of different dimensions not supported"); +// static_assert(std::is_same::value), +// "intersection with objects of different dimensions not supported"; // return internal::intersection_impl(a, b, typename A::Ambient_dimension()); // } // template // inline -// bool +// auto // K::Boolean // do_intersect(const A& a, const B& b) { -// CGAL_static_assertion_msg((boost::is_same::value), +// static_assert(std::is_same::value, // "do_intersect with objects of different dimensions not supported"); // return internal::do_intersect_impl(a, b, typename A::Ambient_dimension()); // } diff --git a/thirdparty/CGAL/include/CGAL/Intersection_traits_2.h b/thirdparty/CGAL/include/CGAL/Intersection_traits_2.h index ec32f138..e89a6516 100644 --- a/thirdparty/CGAL/include/CGAL/Intersection_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersection_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersection_traits_2.h $ -// $Id: Intersection_traits_2.h 1491983 2022-01-18T11:36:56+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersection_traits_2.h $ +// $Id: include/CGAL/Intersection_traits_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -16,8 +16,8 @@ #include #include -#include -#include +#include +#include #include namespace CGAL { @@ -49,9 +49,9 @@ CGAL_INTERSECTION_TRAITS_2(Ray_2, Triangle_2, Point_2, Segment_2) template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_2, typename K::Segment_2, + std::variant< typename K::Point_2, typename K::Segment_2, typename K::Triangle_2, typename std::vector< typename K::Point_2 > > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; @@ -69,37 +69,37 @@ CGAL_INTERSECTION_TRAITS_2(Ray_2, Iso_rectangle_2, Point_2, Segment_2) // Variants of one for backwards compatibility template struct Intersection_traits { - typedef typename boost::variant variant_type; - typedef boost::optional result_type; + typedef typename std::variant variant_type; + typedef std::optional result_type; }; // Point_2 is special template struct Intersection_traits { - typedef typename boost::variant variant_type; - typedef boost::optional result_type; + typedef typename std::variant variant_type; + typedef std::optional result_type; }; template struct Intersection_traits { - typedef typename boost::variant variant_type; - typedef boost::optional result_type; + typedef typename std::variant variant_type; + typedef std::optional result_type; }; template struct Intersection_traits { - typedef typename boost::variant variant_type; - typedef boost::optional result_type; + typedef typename std::variant variant_type; + typedef std::optional result_type; }; template struct Intersection_traits { - typedef typename boost::variant > variant_type; - typedef typename boost::optional < variant_type > result_type; + typedef typename std::optional < variant_type > result_type; }; template @@ -118,14 +118,14 @@ struct Intersection_traits { template struct Intersection_traits { - typedef typename boost::variant variant_type; - typedef boost::optional result_type; + typedef typename std::variant variant_type; + typedef std::optional result_type; }; template struct Intersection_traits { - typedef typename boost::variant variant_type; - typedef boost::optional result_type; + typedef typename std::variant variant_type; + typedef std::optional result_type; }; } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Intersection_traits_3.h b/thirdparty/CGAL/include/CGAL/Intersection_traits_3.h index acb6a9c4..64eb327f 100644 --- a/thirdparty/CGAL/include/CGAL/Intersection_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersection_traits_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersection_traits_3.h $ -// $Id: Intersection_traits_3.h 1491983 2022-01-18T11:36:56+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersection_traits_3.h $ +// $Id: include/CGAL/Intersection_traits_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include @@ -84,9 +84,9 @@ CGAL_INTERSECTION_TRAITS_3(Sphere_3, Sphere_3, Point_3, Circle_3, Sphere_3) template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, typename std::vector< typename K::Point_3 > > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; @@ -108,8 +108,8 @@ CGAL_INTERSECTION_TRAITS_2(Iso_cuboid_3, Ray_3, Point_3, Segment_3) template struct Intersection_traits { typedef typename - boost::variant< typename K::Iso_cuboid_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Iso_cuboid_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; @@ -118,8 +118,8 @@ struct Intersection_traits struct Intersection_traits { typedef typename - boost::variant< typename K::Segment_3, typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Segment_3, typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; template @@ -148,23 +148,23 @@ struct Intersection_traits : template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Bbox_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; @@ -172,8 +172,8 @@ struct Intersection_traits { template struct Intersection_traits { typedef typename - boost::variant< typename K::Iso_cuboid_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Iso_cuboid_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; template @@ -184,204 +184,204 @@ struct Intersection_traits template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Iso_cuboid_3 Plane_3, variant of 4 template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; // Iso_cuboid_3 Triangle_3, variant of 4 template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; // Bbox_3 Plane_3, variant of 4 template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; // Bbox_3 Triangle_3, variant of 4 template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3, typename K::Segment_3, + std::variant< typename K::Point_3, typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Line_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Line_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Ray_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Ray_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Segment_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Segment_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Plane_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Plane_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Triangle_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Triangle_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Tetrahedron_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Tetrahedron_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Point_3 Sphere_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; // Sphere_3 Point_3, variant of one template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 > variant_type; - typedef typename boost::optional< variant_type > result_type; + std::variant< typename K::Point_3 > variant_type; + typedef typename std::optional< variant_type > result_type; }; //Tetrahedron_3 Plane_3, variant of 4 @@ -389,9 +389,9 @@ template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 , typename K::Segment_3, + std::variant< typename K::Point_3 , typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; //Plane_3 Tetrahedron_3, variant of 4 @@ -399,9 +399,9 @@ template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 , typename K::Segment_3, + std::variant< typename K::Point_3 , typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; //Triangle_3 Tetrahedron_3, variant of 4 @@ -409,9 +409,9 @@ template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 , typename K::Segment_3, + std::variant< typename K::Point_3 , typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; // Tetrahedron_3 Triangle_3, variant of 4 @@ -419,9 +419,9 @@ template struct Intersection_traits { typedef typename - boost::variant< typename K::Point_3 , typename K::Segment_3, + std::variant< typename K::Point_3 , typename K::Segment_3, typename K::Triangle_3, std::vector > variant_type; - typedef typename boost::optional< variant_type > result_type; + typedef typename std::optional< variant_type > result_type; }; diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Bbox_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Bbox_2.h index d60ea40c..3ecaf7d2 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Bbox_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Bbox_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Bbox_2.h $ -// $Id: Bbox_2_Bbox_2.h ce4cbe6 2020-03-19T11:41:57+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Bbox_2.h $ +// $Id: include/CGAL/Intersections_2/Bbox_2_Bbox_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -25,13 +25,13 @@ do_intersect(const CGAL::Bbox_2& c, return CGAL::do_overlap(c, bbox); } -typename boost::optional< typename boost::variant > +typename std::optional< typename std::variant > inline intersection(const CGAL::Bbox_2& a, const CGAL::Bbox_2& b) { - typedef typename boost::variant variant_type; - typedef typename boost::optional result_type; + typedef typename std::variant variant_type; + typedef typename std::optional result_type; if(!do_intersect(a, b)) return result_type(); diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Circle_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Circle_2.h index b9f2b35c..42d87ac1 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Circle_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Circle_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Circle_2.h $ -// $Id: Bbox_2_Circle_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Circle_2.h $ +// $Id: include/CGAL/Intersections_2/Bbox_2_Circle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,18 +24,19 @@ namespace Intersections { namespace internal { template -bool do_intersect(const CGAL::Bbox_2& bbox, - const typename K::Circle_2& circle, - const K&) +typename K::Boolean +do_intersect(const CGAL::Bbox_2& bbox, + const typename K::Circle_2& circle, + const K&) { return do_intersect_circle_iso_rectangle_2(circle, bbox, K()); } - template -bool do_intersect(const typename K::Circle_2& circle, - const CGAL::Bbox_2& bbox, - const K&) +typename K::Boolean +do_intersect(const typename K::Circle_2& circle, + const CGAL::Bbox_2& bbox, + const K&) { return do_intersect_circle_iso_rectangle_2(circle, bbox, K()); } @@ -44,15 +45,17 @@ bool do_intersect(const typename K::Circle_2& circle, } // namespace Intersections template -bool do_intersect(const CGAL::Bbox_2& a, - const Circle_2& b) +typename K::Boolean +do_intersect(const CGAL::Bbox_2& a, + const Circle_2& b) { return K().do_intersect_2_object()(a, b); } template -bool do_intersect(const Circle_2& a, - const CGAL::Bbox_2& b) +typename K::Boolean +do_intersect(const Circle_2& a, + const CGAL::Bbox_2& b) { return K().do_intersect_2_object()(a, b); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Iso_rectangle_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Iso_rectangle_2.h index 7c50c17a..3f79abff 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Iso_rectangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Iso_rectangle_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Iso_rectangle_2.h $ -// $Id: Bbox_2_Iso_rectangle_2.h ce4cbe6 2020-03-19T11:41:57+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Iso_rectangle_2.h $ +// $Id: include/CGAL/Intersections_2/Bbox_2_Iso_rectangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,15 +21,19 @@ namespace CGAL { template -inline bool do_intersect(const Iso_rectangle_2 &rect, - const Bbox_2 &box) +inline +typename K::Boolean +do_intersect(const Iso_rectangle_2& rect, + const Bbox_2& box) { return do_intersect(K::Iso_rectangle_2(box), rect); } template -inline bool do_intersect(const Bbox_2 &box, - const Iso_rectangle_2 &rect) +inline +typename K::Boolean +do_intersect(const Bbox_2 &box, + const Iso_rectangle_2 &rect) { return do_intersect(rect, box); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Line_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Line_2.h index 116daef8..3e85dbca 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Line_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Line_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Line_2.h $ -// $Id: Bbox_2_Line_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Line_2.h $ +// $Id: include/CGAL/Intersections_2/Bbox_2_Line_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,18 +27,20 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Line_2& line, - const CGAL::Bbox_2& bbox, - const K& k) +typename K::Boolean +do_intersect(const typename K::Line_2& line, + const CGAL::Bbox_2& bbox, + const K& k) { typedef typename K::Iso_rectangle_2 Iso_rectangle_2; return Intersections::internal::do_intersect(line, Iso_rectangle_2(bbox), k); } template -bool do_intersect(const CGAL::Bbox_2& bbox, - const typename K::Line_2& line, - const K& k) +typename K::Boolean +do_intersect(const CGAL::Bbox_2& bbox, + const typename K::Line_2& line, + const K& k) { return Intersections::internal::do_intersect(line, bbox, k); } @@ -47,13 +49,17 @@ bool do_intersect(const CGAL::Bbox_2& bbox, } // namespace Intersections template -bool do_intersect(const CGAL::Bbox_2& bbox, const Line_2& line) +typename K::Boolean +do_intersect(const CGAL::Bbox_2& bbox, + const Line_2& line) { return K().do_intersect_2_object()(bbox, line); } template -bool do_intersect(const Line_2& line, const CGAL::Bbox_2& bbox) +typename K::Boolean +do_intersect(const Line_2& line, + const CGAL::Bbox_2& bbox) { return K().do_intersect_2_object()(line, bbox); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Point_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Point_2.h index 20741c1c..a8dc9745 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Point_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Point_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Point_2.h $ -// $Id: Bbox_2_Point_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Point_2.h $ +// $Id: include/CGAL/Intersections_2/Bbox_2_Point_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,9 +24,11 @@ namespace Intersections { namespace internal { template -inline bool do_intersect(const Bbox_2 &bbox, - const Point_2 &pt, - const K& k) +inline +typename K::Boolean +do_intersect(const Bbox_2 &bbox, + const Point_2 &pt, + const K& k) { Point_2 bl(bbox.xmin(), bbox.ymin()), tr(bbox.xmax(), bbox.ymax()); @@ -36,9 +38,11 @@ inline bool do_intersect(const Bbox_2 &bbox, } template -inline bool do_intersect(const Point_2 &pt, - const Bbox_2& bbox, - const K& k) +inline +typename K::Boolean +do_intersect(const Point_2 &pt, + const Bbox_2& bbox, + const K& k) { return do_intersect(bbox, pt, k); } @@ -69,15 +73,17 @@ intersection(const CGAL::Bbox_2& b, } // namespace Intersections template -bool do_intersect(const CGAL::Bbox_2& a, - const Point_2& b) +typename K::Boolean +do_intersect(const CGAL::Bbox_2& a, + const Point_2& b) { return Intersections::internal::do_intersect(a,b,K()); } template -bool do_intersect(const Point_2& a, - const CGAL::Bbox_2& b) +typename K::Boolean +do_intersect(const Point_2& a, + const CGAL::Bbox_2& b) { return Intersections::internal::do_intersect(b,a,K()); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Ray_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Ray_2.h index bd9082fa..a5cf7d06 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Ray_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Ray_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Ray_2.h $ -// $Id: Bbox_2_Ray_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Ray_2.h $ +// $Id: include/CGAL/Intersections_2/Bbox_2_Ray_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,18 +27,20 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Ray_2& ray, - const CGAL::Bbox_2& bbox, - const K& k) +typename K::Boolean +do_intersect(const typename K::Ray_2& ray, + const CGAL::Bbox_2& bbox, + const K& k) { typedef typename K::Iso_rectangle_2 Iso_rectangle_2; return Intersections::internal::do_intersect(ray, Iso_rectangle_2(bbox), k); } template -bool do_intersect(const CGAL::Bbox_2& bbox, - const typename K::Ray_2& ray, - const K& k) +typename K::Boolean +do_intersect(const CGAL::Bbox_2& bbox, + const typename K::Ray_2& ray, + const K& k) { return Intersections::internal::do_intersect(ray, bbox, k); } @@ -47,13 +49,17 @@ bool do_intersect(const CGAL::Bbox_2& bbox, } // namespace Intersections template -bool do_intersect(const CGAL::Bbox_2& bbox, const Ray_2& ray) +typename K::Boolean +do_intersect(const CGAL::Bbox_2& bbox, + const Ray_2& ray) { return K().do_intersect_2_object()(bbox, ray); } template -bool do_intersect(const Ray_2& ray, const CGAL::Bbox_2& bbox) +typename K::Boolean +do_intersect(const Ray_2& ray, + const CGAL::Bbox_2& bbox) { return K().do_intersect_2_object()(ray, bbox); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Segment_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Segment_2.h index a35e4625..1cf43986 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Segment_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Segment_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Segment_2.h $ -// $Id: Bbox_2_Segment_2.h ce4cbe6 2020-03-19T11:41:57+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Segment_2.h $ +// $Id: include/CGAL/Intersections_2/Bbox_2_Segment_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,20 +20,21 @@ namespace CGAL { - template -inline bool do_intersect( - const Segment_2 &seg, - const Bbox_2 &box) +inline +typename K::Boolean +do_intersect(const Segment_2& seg, + const Bbox_2& box) { typename K::Iso_rectangle_2 rec(box.xmin(), box.ymin(), box.xmax(), box.ymax()); return do_intersect(rec, seg); } template -inline bool do_intersect( - const Bbox_2 &box, - const Segment_2 &seg) +inline +typename K::Boolean +do_intersect(const Bbox_2& box, + const Segment_2& seg) { return do_intersect(seg, box); } @@ -41,7 +42,8 @@ inline bool do_intersect( template typename Intersection_traits::result_type intersection(const CGAL::Bbox_2& box, - const Segment_2& seg) { + const Segment_2& seg) + { typename K::Iso_rectangle_2 rec(box.xmin(), box.ymin(), box.xmax(), box.ymax()); return intersection(rec, seg); } @@ -49,9 +51,11 @@ intersection(const CGAL::Bbox_2& box, template typename Intersection_traits::result_type intersection(const Segment_2& seg, - const CGAL::Bbox_2& box) { + const CGAL::Bbox_2& box) +{ return intersection(box, seg); } -} +} // namespace CGAL + #endif // CGAL_INTERSECTIONS_BBOX_2_SEGMENT_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h index c6509c90..32cbd235 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h $ -// $Id: Bbox_2_Triangle_2.h ce4cbe6 2020-03-19T11:41:57+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h $ +// $Id: include/CGAL/Intersections_2/Bbox_2_Triangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,20 +20,21 @@ namespace CGAL { - template -inline bool do_intersect( - const Triangle_2 &tr, - const Bbox_2 &box) +inline +typename K::Boolean +do_intersect(const Triangle_2& tr, + const Bbox_2& box) { typename K::Iso_rectangle_2 rec(box.xmin(), box.ymin(), box.xmax(), box.ymax()); return do_intersect(rec, tr); } template -inline bool do_intersect( - const Bbox_2 &box, - const Triangle_2 &tr) +inline +typename K::Boolean +do_intersect(const Bbox_2& box, + const Triangle_2& tr) { return do_intersect(tr, box); } @@ -41,7 +42,8 @@ inline bool do_intersect( template typename Intersection_traits::result_type intersection(const Bbox_2& box, - const Triangle_2& tr) { + const Triangle_2& tr) +{ typename K::Iso_rectangle_2 rec(box.xmin(), box.ymin(), box.xmax(), box.ymax()); return intersection(rec, tr); } @@ -49,9 +51,11 @@ intersection(const Bbox_2& box, template typename Intersection_traits::result_type intersection(const Triangle_2& tr, - const Bbox_2& box) { + const Bbox_2& box) +{ return intersection(box, tr); } -} +} // namespace CGAL + #endif // CGAL_INTERSECTIONS_BBOX_2_TRIANGLE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Circle_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Circle_2.h index 15d86b93..aea6148c 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Circle_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Circle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Circle_2_Circle_2.h $ -// $Id: Circle_2_Circle_2.h 7e62c02 2021-04-12T14:02:37+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Circle_2_Circle_2.h $ +// $Id: include/CGAL/Intersections_2/Circle_2_Circle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,9 +27,9 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Circle_2 & circ1, - const typename K::Circle_2& circ2, - const K&) +typename K::Boolean do_intersect(const typename K::Circle_2& circ1, + const typename K::Circle_2& circ2, + const K&) { typedef typename K::FT FT; diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Iso_rectangle_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Iso_rectangle_2.h index 75b011d6..c3b8959c 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Iso_rectangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Iso_rectangle_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Circle_2_Iso_rectangle_2.h $ -// $Id: Circle_2_Iso_rectangle_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Circle_2_Iso_rectangle_2.h $ +// $Id: include/CGAL/Intersections_2/Circle_2_Iso_rectangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,9 +24,9 @@ namespace internal { // Circle_2 is not a disk, thus if the box is contained within the circle, there is no intersection. template -bool do_intersect_circle_iso_rectangle_2(const typename K::Circle_2& circle, - const typename K::Iso_rectangle_2& rec, - const K&) +typename K::Boolean do_intersect_circle_iso_rectangle_2(const typename K::Circle_2& circle, + const typename K::Iso_rectangle_2& rec, + const K&) { typedef typename K::FT FT; typedef typename K::Point_2 Point; @@ -92,18 +92,17 @@ bool do_intersect_circle_iso_rectangle_2(const typename K::Circle_2& circle, } template -bool do_intersect(const typename K::Iso_rectangle_2& rec, - const typename K::Circle_2& circle, - const K&) +typename K::Boolean do_intersect(const typename K::Iso_rectangle_2& rec, + const typename K::Circle_2& circle, + const K&) { return do_intersect_circle_iso_rectangle_2(circle, rec, K()); } - template -bool do_intersect(const typename K::Circle_2& circle, - const typename K::Iso_rectangle_2& rec, - const K&) +typename K::Boolean do_intersect(const typename K::Circle_2& circle, + const typename K::Iso_rectangle_2& rec, + const K&) { return do_intersect_circle_iso_rectangle_2(circle, rec, K()); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Line_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Line_2.h index 517ce09c..2be7f381 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Line_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Line_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Circle_2_Line_2.h $ -// $Id: Circle_2_Line_2.h 7e62c02 2021-04-12T14:02:37+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Circle_2_Line_2.h $ +// $Id: include/CGAL/Intersections_2/Circle_2_Line_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -29,8 +29,8 @@ namespace Intersections { namespace internal { template -bool -do_intersect(const typename K::Circle_2 & c, +typename K::Boolean +do_intersect(const typename K::Circle_2& c, const typename K::Line_2& l, const K&) { @@ -38,9 +38,9 @@ do_intersect(const typename K::Circle_2 & c, } template -bool +typename K::Boolean do_intersect(const typename K::Line_2& l, - const typename K::Circle_2 & c, + const typename K::Circle_2& c, const K&) { return squared_distance(c.center(), l) <= c.squared_radius(); @@ -53,4 +53,4 @@ CGAL_DO_INTERSECT_FUNCTION(Circle_2, Line_2, 2) } // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_CIRCLE_2_LINE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Point_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Point_2.h index a2151395..b8284a1a 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Point_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Point_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Circle_2_Point_2.h $ -// $Id: Circle_2_Point_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Circle_2_Point_2.h $ +// $Id: include/CGAL/Intersections_2/Circle_2_Point_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -25,20 +25,19 @@ namespace internal { template inline -bool -do_intersect(const typename K::Point_2 &pt, - const typename K::Circle_2 &circle, +typename K::Boolean +do_intersect(const typename K::Point_2& pt, + const typename K::Circle_2& circle, const K&) { return circle.has_on_boundary(pt); } - template inline -bool -do_intersect(const typename K::Circle_2 &circle, - const typename K::Point_2 &pt, +typename K::Boolean +do_intersect(const typename K::Circle_2& circle, + const typename K::Point_2& pt, const K&) { return circle.has_on_boundary(pt); @@ -48,8 +47,8 @@ do_intersect(const typename K::Circle_2 &circle, template typename CGAL::Intersection_traits ::result_type -intersection(const typename K::Point_2 &pt, - const typename K::Circle_2 &circle, +intersection(const typename K::Point_2& pt, + const typename K::Circle_2& circle, const K& k) { if (do_intersect(pt,circle, k)) @@ -60,8 +59,8 @@ intersection(const typename K::Point_2 &pt, template typename CGAL::Intersection_traits ::result_type -intersection(const typename K::Circle_2 &circle, - const typename K::Point_2 &pt, +intersection(const typename K::Circle_2& circle, + const typename K::Point_2& pt, const K& k) { return internal::intersection(pt, circle, k); @@ -73,5 +72,6 @@ intersection(const typename K::Circle_2 &circle, CGAL_INTERSECTION_FUNCTION(Point_2, Circle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Circle_2, Point_2, 2) -} //namespace CGAL +} // namespace CGAL + #endif // CGAL_INTERSECTIONS_2_POINT_2_CIRCLE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Ray_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Ray_2.h index fd36b8ee..236fa517 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Ray_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Ray_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Circle_2_Ray_2.h $ -// $Id: Circle_2_Ray_2.h 7e62c02 2021-04-12T14:02:37+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Circle_2_Ray_2.h $ +// $Id: include/CGAL/Intersections_2/Circle_2_Ray_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,8 +24,8 @@ namespace Intersections { namespace internal { template -bool -do_intersect(const typename K::Circle_2 & c, +typename K::Boolean +do_intersect(const typename K::Circle_2& c, const typename K::Ray_2& r, const K&) { @@ -33,9 +33,9 @@ do_intersect(const typename K::Circle_2 & c, } template -bool +typename K::Boolean do_intersect(const typename K::Ray_2& r, - const typename K::Circle_2 & c, + const typename K::Circle_2& c, const K&) { return squared_distance(c.center(), r) <= c.squared_radius(); @@ -47,4 +47,5 @@ do_intersect(const typename K::Ray_2& r, CGAL_DO_INTERSECT_FUNCTION(Circle_2, Ray_2, 2) } // namespace CGAL + #endif // CGAL_INTERSECTIONS_2_CIRCLE_2_RAY_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Segment_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Segment_2.h index bf9d871e..5e577332 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Segment_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Segment_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Circle_2_Segment_2.h $ -// $Id: Circle_2_Segment_2.h 7e62c02 2021-04-12T14:02:37+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Circle_2_Segment_2.h $ +// $Id: include/CGAL/Intersections_2/Circle_2_Segment_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,8 +24,8 @@ namespace Intersections { namespace internal { template -bool -do_intersect(const typename K::Circle_2 & c, +typename K::Boolean +do_intersect(const typename K::Circle_2& c, const typename K::Segment_2& s, const K&) { @@ -33,9 +33,9 @@ do_intersect(const typename K::Circle_2 & c, } template -bool +typename K::Boolean do_intersect(const typename K::Segment_2& s, - const typename K::Circle_2 & c, + const typename K::Circle_2& c, const K&) { return squared_distance(c.center(), s) <= c.squared_radius(); @@ -47,4 +47,5 @@ do_intersect(const typename K::Segment_2& s, CGAL_DO_INTERSECT_FUNCTION(Circle_2, Segment_2, 2) } // namespace CGAL + #endif // CGAL_INTERSECTIONS_2_CIRCLE_2_SEGMENT_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Triangle_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Triangle_2.h index 458d0ab6..c7dd228e 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Triangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Circle_2_Triangle_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Circle_2_Triangle_2.h $ -// $Id: Circle_2_Triangle_2.h 7e62c02 2021-04-12T14:02:37+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Circle_2_Triangle_2.h $ +// $Id: include/CGAL/Intersections_2/Circle_2_Triangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -25,7 +25,7 @@ namespace Intersections { namespace internal { template -bool +typename K::Boolean do_intersect(const typename K::Circle_2 & c, const typename K::Triangle_2& t, const K&) @@ -48,9 +48,9 @@ do_intersect(const typename K::Circle_2 & c, } template -bool +typename K::Boolean do_intersect(const typename K::Triangle_2& t, - const typename K::Circle_2 & c, + const typename K::Circle_2& c, const K&) { return do_intersect(c,t); @@ -62,4 +62,5 @@ do_intersect(const typename K::Triangle_2& t, CGAL_DO_INTERSECT_FUNCTION(Circle_2, Triangle_2, 2) } // namespace CGAL + #endif // CGAL_INTERSECTIONS_2_CIRCLE_2_TRIANGLE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h index 8dd0e86c..9221e5d6 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h $ -// $Id: Iso_rectangle_2_Iso_rectangle_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h $ +// $Id: include/CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -74,20 +74,20 @@ intersection( } template -inline bool -do_intersect(const typename K::Iso_rectangle_2 &irect1, - const typename K::Iso_rectangle_2 &irect2, - const K&) { +typename K::Boolean +do_intersect(const typename K::Iso_rectangle_2& irect1, + const typename K::Iso_rectangle_2& irect2, + const K&) +{ return bool(intersection(irect1, irect2)); } } // namespace internal } // namespace Intersections - CGAL_INTERSECTION_FUNCTION_SELF(Iso_rectangle_2, 2) CGAL_DO_INTERSECT_FUNCTION_SELF(Iso_rectangle_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_ISO_RECTANGLE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Line_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Line_2.h index 56dcbd4c..e5c33199 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Line_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Line_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Line_2.h $ -// $Id: Iso_rectangle_2_Line_2.h fb37f69 2021-09-23T13:15:28+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Line_2.h $ +// $Id: include/CGAL/Intersections_2/Iso_rectangle_2_Line_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -58,25 +58,27 @@ class Line_2_Iso_rectangle_2_pair { }; template -inline bool do_intersect(const typename K::Line_2 &p1, - const typename K::Iso_rectangle_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Line_2& l, + const typename K::Iso_rectangle_2& ir, + const K&) { - typedef Line_2_Iso_rectangle_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Line_2_Iso_rectangle_2_pair pair_t; + pair_t pair(&l, &ir); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } template -inline bool do_intersect(const typename K::Iso_rectangle_2 &p2, - const typename K::Line_2 &p1, - const K& k) +inline +typename K::Boolean +do_intersect(const typename K::Iso_rectangle_2& ir, + const typename K::Line_2& l, + const K& k) { - return internal::do_intersect(p1, p2, k); + return internal::do_intersect(l, ir, k); } - - template typename Line_2_Iso_rectangle_2_pair::Intersection_results Line_2_Iso_rectangle_2_pair::intersection_type() const @@ -217,4 +219,4 @@ CGAL_DO_INTERSECT_FUNCTION(Line_2, Iso_rectangle_2, 2) #include -#endif +#endif // CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_LINE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Point_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Point_2.h index e1d21379..ebb2a8bd 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Point_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Point_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Point_2.h $ -// $Id: Iso_rectangle_2_Point_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Point_2.h $ +// $Id: include/CGAL/Intersections_2/Iso_rectangle_2_Point_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -30,22 +30,22 @@ namespace internal { template inline -bool -do_intersect(const typename K::Point_2 &pt, - const typename K::Iso_rectangle_2 &iso, +typename K::Boolean +do_intersect(const typename K::Point_2& pt, + const typename K::Iso_rectangle_2& iso, const K&) { - return !iso.has_on_unbounded_side(pt); + return !iso.has_on_unbounded_side(pt); } template inline -bool -do_intersect(const typename K::Iso_rectangle_2 &iso, - const typename K::Point_2 &pt, +typename K::Boolean +do_intersect(const typename K::Iso_rectangle_2& iso, + const typename K::Point_2& pt, const K&) { - return !iso.has_on_unbounded_side(pt); + return !iso.has_on_unbounded_side(pt); } template @@ -77,6 +77,6 @@ intersection(const typename K::Iso_rectangle_2 &iso, CGAL_INTERSECTION_FUNCTION(Point_2, Iso_rectangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Point_2, Iso_rectangle_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_POINT_2_ISO_RECTANGLE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h index f05408de..d6428fe6 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h $ -// $Id: Iso_rectangle_2_Ray_2.h fb37f69 2021-09-23T13:15:28+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h $ +// $Id: include/CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -55,21 +55,25 @@ class Ray_2_Iso_rectangle_2_pair { }; template -inline bool do_intersect(const typename K::Ray_2 &p1, - const typename K::Iso_rectangle_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Ray_2& r, + const typename K::Iso_rectangle_2& ir, + const K&) { - typedef Ray_2_Iso_rectangle_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Ray_2_Iso_rectangle_2_pair pair_t; + pair_t pair(&r, &ir); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } template -inline bool do_intersect(const typename K::Iso_rectangle_2 &p2, - const typename K::Ray_2 &p1, - const K& k) +inline +typename K::Boolean +do_intersect(const typename K::Iso_rectangle_2& ir, + const typename K::Ray_2& r, + const K& k) { - return do_intersect(p1, p2, k); + return do_intersect(r, ir, k); } template @@ -200,9 +204,8 @@ Ray_2_Iso_rectangle_2_pair::intersection_point() const CGAL_INTERSECTION_FUNCTION(Ray_2, Iso_rectangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Ray_2, Iso_rectangle_2, 2) - -} //namespace CGAL +} // namespace CGAL #include -#endif // CGAL_RAY_2_iSO_RECTANGLE_2_INTERSECTION_H +#endif // CGAL_RAY_2_ISO_RECTANGLE_2_INTERSECTION_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h index e9923c83..cd7f660d 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h $ -// $Id: Iso_rectangle_2_Segment_2.h fb37f69 2021-09-23T13:15:28+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h $ +// $Id: include/CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -54,21 +54,6 @@ class Segment_2_Iso_rectangle_2_pair { _max; }; -template -inline bool do_intersect( - const typename K::Segment_2 &p1, - const typename K::Iso_rectangle_2 &p2, - const K&) -{ - typedef Segment_2_Iso_rectangle_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; -} - - - - - template typename CGAL::Intersection_traits ::result_type @@ -208,17 +193,26 @@ intersection_point() const return translated_point(_ref_point, construct_scaled_vector(_dir,_min)); } - +template +inline +typename K::Boolean +do_intersect(const typename K::Segment_2& s, + const typename K::Iso_rectangle_2& ir, + const K&) +{ + typedef Segment_2_Iso_rectangle_2_pair pair_t; + pair_t pair(&s, &ir); + return pair.intersection_type() != pair_t::NO_INTERSECTION; +} template -inline bool do_intersect( - const typename K::Iso_rectangle_2 &p1, - const typename K::Segment_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Iso_rectangle_2& ir, + const typename K::Segment_2& s, + const K& k) { - typedef Segment_2_Iso_rectangle_2_pair pair_t; - pair_t pair(&p2, &p1); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + return do_intersect(s, ir, k); } } // namespace internal @@ -227,7 +221,7 @@ inline bool do_intersect( CGAL_INTERSECTION_FUNCTION(Segment_2, Iso_rectangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Segment_2, Iso_rectangle_2, 2) -} //namespace CGAL +} // namespace CGAL #include diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h index 2a7ec98d..8cb36862 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h $ -// $Id: Iso_rectangle_2_Triangle_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h $ +// $Id: include/CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -292,10 +292,10 @@ namespace internal { } template - bool do_intersect( - const typename K::Triangle_2 &tr, - const typename K::Iso_rectangle_2 &ir, - const K& k) + typename K::Boolean + do_intersect(const typename K::Triangle_2& tr, + const typename K::Iso_rectangle_2& ir, + const K& k) { //1) check if at least one vertex of tr is not outside ir //2) if not, check if at least on vertex of tr is not outside tr @@ -318,20 +318,21 @@ namespace internal { } template - inline bool do_intersect( - const typename K::Iso_rectangle_2 &ir, - const typename K::Triangle_2 &tr, - const K& k) + inline + typename K::Boolean + do_intersect(const typename K::Iso_rectangle_2& ir, + const typename K::Triangle_2& tr, + const K& k) { - return do_intersect(tr,ir,k); + return do_intersect(tr, ir, k); } -} //namespace internal +} // namespace internal } // namespace Intersections CGAL_INTERSECTION_FUNCTION(Triangle_2, Iso_rectangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Triangle_2, Iso_rectangle_2, 2) -}//end namespace +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_TRIANGLE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Line_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Line_2.h index 0f7f98a2..8ac03e7a 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Line_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Line_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Line_2_Line_2.h $ -// $Id: Line_2_Line_2.h 9b19c5f 2021-09-23T15:11:18+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Line_2_Line_2.h $ +// $Id: include/CGAL/Intersections_2/Line_2_Line_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -52,19 +52,20 @@ class Line_2_Line_2_pair { mutable typename K::Point_2 _intersection_point; }; + template -inline bool do_intersect( - const typename K::Line_2 &p1, - const typename K::Line_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Line_2& l1, + const typename K::Line_2& l2, + const K&) { - typedef Line_2_Line_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Line_2_Line_2_pair pair_t; + pair_t pair(&l1, &l2); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } - template typename CGAL::Intersection_traits ::result_type @@ -200,7 +201,6 @@ Line_2_Line_2_pair::intersection_line() const CGAL_INTERSECTION_FUNCTION_SELF(Line_2, 2) CGAL_DO_INTERSECT_FUNCTION_SELF(Line_2, 2) +} // namespace CGAL -} //namespace CGAL - -#endif +#endif // CGAL_INTERSECTIONS_2_LINE_2_LINE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Point_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Point_2.h index 94b7d6d1..978546a5 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Point_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Point_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Line_2_Point_2.h $ -// $Id: Line_2_Point_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Line_2_Point_2.h $ +// $Id: include/CGAL/Intersections_2/Line_2_Point_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -29,21 +29,23 @@ namespace Intersections { namespace internal { template -inline bool -do_intersect(const typename K::Point_2 &pt, - const typename K::Line_2 &line, +inline +typename K::Boolean +do_intersect(const typename K::Point_2& pt, + const typename K::Line_2& line, const K&) { - return line.has_on(pt); + return line.has_on(pt); } template -inline bool -do_intersect(const typename K::Line_2 &line, - const typename K::Point_2 &pt, +inline +typename K::Boolean +do_intersect(const typename K::Line_2& line, + const typename K::Point_2& pt, const K&) { - return line.has_on(pt); + return line.has_on(pt); } template @@ -76,6 +78,6 @@ intersection(const typename K::Line_2 &line, CGAL_INTERSECTION_FUNCTION(Point_2, Line_2, 2) CGAL_DO_INTERSECT_FUNCTION(Point_2, Line_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_POINT_2_LINE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Ray_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Ray_2.h index dfaa5324..e4b3614d 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Ray_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Ray_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Line_2_Ray_2.h $ -// $Id: Line_2_Ray_2.h 9b19c5f 2021-09-23T15:11:18+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Line_2_Ray_2.h $ +// $Id: include/CGAL/Intersections_2/Line_2_Ray_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -55,17 +55,26 @@ class Ray_2_Line_2_pair { }; template -inline bool do_intersect( - const typename K::Ray_2 &p1, - const typename K::Line_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Ray_2& r, + const typename K::Line_2& l, + const K&) { - typedef Ray_2_Line_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Ray_2_Line_2_pair pair_t; + pair_t pair(&r, &l); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } - +template +inline +typename K::Boolean +do_intersect(const typename K::Line_2& l, + const typename K::Ray_2& r, + const K& k) +{ + return do_intersect(r, l, k); +} template typename Intersection_traits @@ -99,20 +108,6 @@ intersection(const typename K::Line_2 &line, return internal::intersection(ray, line, k); } - -template -inline bool do_intersect( - const typename K::Line_2 &p1, - const typename K::Ray_2 &p2, - const K&) -{ - typedef Ray_2_Line_2_pair pair_t; - pair_t pair(&p2, &p1); - return pair.intersection_type() != pair_t::NO_INTERSECTION; -} - - - template typename Ray_2_Line_2_pair::Intersection_results Ray_2_Line_2_pair::intersection_type() const diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Segment_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Segment_2.h index 6d641792..140056b7 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Segment_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Segment_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Line_2_Segment_2.h $ -// $Id: Line_2_Segment_2.h d370326 2021-10-27T14:45:10+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Line_2_Segment_2.h $ +// $Id: include/CGAL/Intersections_2/Line_2_Segment_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -51,14 +51,25 @@ class Segment_2_Line_2_pair { }; template -inline bool do_intersect( - const typename K::Segment_2 &p1, - const typename K::Line_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Segment_2& s, + const typename K::Line_2& l, + const K& ) { - typedef Segment_2_Line_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Segment_2_Line_2_pair pair_t; + pair_t pair(&s, &l); + return pair.intersection_type() != pair_t::NO_INTERSECTION; +} + +template +inline +typename K::Boolean +do_intersect(const typename K::Line_2& l, + const typename K::Segment_2& s, + const K& k) +{ + return internal::do_intersect(s, l, k); } template @@ -92,17 +103,6 @@ intersection(const typename K::Line_2 &line, return internal::intersection(seg, line, k); } - -template -inline bool do_intersect( - const typename K::Line_2 &line, - const typename K::Segment_2 &seg, - const K& k) -{ - return internal::do_intersect(seg, line, k); -} - - template typename Segment_2_Line_2_pair::Intersection_results Segment_2_Line_2_pair::intersection_type() const @@ -156,7 +156,6 @@ Segment_2_Line_2_pair::intersection_segment() const CGAL_INTERSECTION_FUNCTION(Segment_2, Line_2, 2) CGAL_DO_INTERSECT_FUNCTION(Segment_2, Line_2, 2) +} // namespace CGAL -} //namespace CGAL - -#endif +#endif // CGAL_INTERSECTIONS_2_SEGMENT_2_LINE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Triangle_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Triangle_2.h index afbf0553..183b2e1b 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Triangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Line_2_Triangle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Line_2_Triangle_2.h $ -// $Id: Line_2_Triangle_2.h fb37f69 2021-09-23T13:15:28+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Line_2_Triangle_2.h $ +// $Id: include/CGAL/Intersections_2/Line_2_Triangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -55,24 +55,24 @@ class Line_2_Triangle_2_pair { template inline -bool -do_intersect(const typename K::Line_2 &p1, - const typename K::Triangle_2 &p2, +typename K::Boolean +do_intersect(const typename K::Line_2& l, + const typename K::Triangle_2& tr, const K&) { - typedef Line_2_Triangle_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Line_2_Triangle_2_pair pair_t; + pair_t pair(&l, &tr); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } template inline -bool -do_intersect(const typename K::Triangle_2 &p2, - const typename K::Line_2 &p1, +typename K::Boolean +do_intersect(const typename K::Triangle_2& tr, + const typename K::Line_2& l, const K& k) { - return internal::do_intersect(p1, p2, k); + return internal::do_intersect(l, tr, k); } template @@ -190,6 +190,6 @@ intersection(const typename K::Triangle_2 &tr, CGAL_INTERSECTION_FUNCTION(Line_2, Triangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Line_2, Triangle_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_LINE_2_TRIANGLE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Point_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Point_2.h index c054464b..658e679b 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Point_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Point_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h $ -// $Id: Point_2_Point_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h $ +// $Id: include/CGAL/Intersections_2/Point_2_Point_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -28,34 +28,33 @@ namespace Intersections { namespace internal { template -inline bool -do_intersect(const typename K::Point_2 &pt1, - const typename K::Point_2 &pt2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Point_2& pt1, + const typename K::Point_2& pt2, + const K& k) { - return pt1 == pt2; + return k.equal_2_object()(pt1, pt2); } template -typename CGAL::Intersection_traits -::result_type -intersection(const typename K::Point_2 &pt1, - const typename K::Point_2 &pt2, - const K&) +typename CGAL::Intersection_traits::result_type +intersection(const typename K::Point_2& pt1, + const typename K::Point_2& pt2, + const K& k) { - if (pt1 == pt2) { - return intersection_return(pt1); - } - return intersection_return(); + if (k.equal_2_object()(pt1, pt2)) + return intersection_return(pt1); + + return intersection_return(); } -}// namespace internal +} // namespace internal } // namespace Intersections CGAL_INTERSECTION_FUNCTION_SELF(Point_2, 2) CGAL_DO_INTERSECT_FUNCTION_SELF(Point_2, 2) +} // namespace CGAL -} //namespace CGAL - -#endif +#endif // CGAL_INTERSECTIONS_2_POINT_2_POINT_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Ray_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Ray_2.h index 3878e2c8..9abf528b 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Ray_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Ray_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Point_2_Ray_2.h $ -// $Id: Point_2_Ray_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Point_2_Ray_2.h $ +// $Id: include/CGAL/Intersections_2/Point_2_Ray_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -30,9 +30,9 @@ namespace internal { template inline -bool -do_intersect(const typename K::Point_2 &pt, - const typename K::Ray_2 &ray, +typename K::Boolean +do_intersect(const typename K::Point_2& pt, + const typename K::Ray_2& ray, const K&) { return ray.has_on(pt); @@ -41,9 +41,9 @@ do_intersect(const typename K::Point_2 &pt, template inline -bool -do_intersect(const typename K::Ray_2 &ray, - const typename K::Point_2 &pt, +typename K::Boolean +do_intersect(const typename K::Ray_2& ray, + const typename K::Point_2& pt, const K&) { return ray.has_on(pt); @@ -51,8 +51,7 @@ do_intersect(const typename K::Ray_2 &ray, template -typename CGAL::Intersection_traits -::result_type +typename CGAL::Intersection_traits::result_type intersection(const typename K::Point_2 &pt, const typename K::Ray_2 &ray, const K& k) @@ -64,8 +63,7 @@ intersection(const typename K::Point_2 &pt, } template -typename CGAL::Intersection_traits -::result_type +typename CGAL::Intersection_traits::result_type intersection(const typename K::Ray_2 &ray, const typename K::Point_2 &pt, const K& k) @@ -79,7 +77,6 @@ intersection(const typename K::Ray_2 &ray, CGAL_INTERSECTION_FUNCTION(Point_2, Ray_2, 2) CGAL_DO_INTERSECT_FUNCTION(Point_2, Ray_2, 2) +} // namespace CGAL -} //namespace CGAL - -#endif +#endif // CGAL_INTERSECTIONS_2_POINT_2_RAY_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Segment_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Segment_2.h index 08354fd9..12cb20f6 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Segment_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Segment_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Point_2_Segment_2.h $ -// $Id: Point_2_Segment_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Point_2_Segment_2.h $ +// $Id: include/CGAL/Intersections_2/Point_2_Segment_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -30,7 +30,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Point_2 &pt, const typename K::Segment_2 &seg, const K&) @@ -40,7 +40,7 @@ do_intersect(const typename K::Point_2 &pt, template inline -bool +typename K::Boolean do_intersect(const typename K::Segment_2 &seg, const typename K::Point_2 &pt, const K&) @@ -77,10 +77,9 @@ intersection( const typename K::Segment_2 &seg, } // namespace internal } // namespace Intersections - CGAL_INTERSECTION_FUNCTION(Point_2, Segment_2, 2) CGAL_DO_INTERSECT_FUNCTION(Point_2, Segment_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_POINT_2_SEGMENT_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Triangle_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Triangle_2.h index 332edac2..a5d2bbcc 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Triangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Point_2_Triangle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Point_2_Triangle_2.h $ -// $Id: Point_2_Triangle_2.h fb37f69 2021-09-23T13:15:28+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Point_2_Triangle_2.h $ +// $Id: include/CGAL/Intersections_2/Point_2_Triangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -50,9 +50,11 @@ class Point_2_Triangle_2_pair { }; template -inline bool do_intersect(const typename K::Point_2 &p1, - const typename K::Triangle_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Point_2& p1, + const typename K::Triangle_2& p2, + const K&) { typedef Point_2_Triangle_2_pair pair_t; pair_t pair(&p1, &p2); @@ -60,9 +62,11 @@ inline bool do_intersect(const typename K::Point_2 &p1, } template -inline bool do_intersect(const typename K::Triangle_2 &p2, - const typename K::Point_2 &p1, - const K& k) +inline +typename K::Boolean +do_intersect(const typename K::Triangle_2& p2, + const typename K::Point_2& p1, + const K& k) { return internal::do_intersect(p1, p2, k); } @@ -133,6 +137,6 @@ intersection(const typename K::Triangle_2 &tr, CGAL_INTERSECTION_FUNCTION(Point_2, Triangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Point_2, Triangle_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_POINT_2_TRIANGLE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Ray_2_Ray_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Ray_2_Ray_2.h index e840e280..d2bdece3 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Ray_2_Ray_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Ray_2_Ray_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Ray_2_Ray_2.h $ -// $Id: Ray_2_Ray_2.h fb37f69 2021-09-23T13:15:28+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Ray_2_Ray_2.h $ +// $Id: include/CGAL/Intersections_2/Ray_2_Ray_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -54,14 +54,15 @@ class Ray_2_Ray_2_pair { }; template -inline bool do_intersect( - const typename K::Ray_2 &p1, - const typename K::Ray_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Ray_2& r1, + const typename K::Ray_2& r2, + const K&) { - typedef Ray_2_Ray_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Ray_2_Ray_2_pair pair_t; + pair_t pair(&r1, &r2); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } @@ -252,7 +253,6 @@ intersection(const typename K::Ray_2 &ray1, CGAL_INTERSECTION_FUNCTION_SELF(Ray_2, 2) CGAL_DO_INTERSECT_FUNCTION_SELF(Ray_2, 2) +} // namespace CGAL -} //namespace CGAL - -#endif +#endif // CGAL_INTERSECTIONS_2_RAY_2_RAY_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Ray_2_Segment_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Ray_2_Segment_2.h index f6760beb..ad03d80e 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Ray_2_Segment_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Ray_2_Segment_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Ray_2_Segment_2.h $ -// $Id: Ray_2_Segment_2.h fb37f69 2021-09-23T13:15:28+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Ray_2_Segment_2.h $ +// $Id: include/CGAL/Intersections_2/Ray_2_Segment_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -54,21 +54,25 @@ class Ray_2_Segment_2_pair { }; template -inline bool do_intersect(const typename K::Ray_2 &p1, - const typename K::Segment_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Ray_2& r, + const typename K::Segment_2& s, + const K&) { - typedef Ray_2_Segment_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Ray_2_Segment_2_pair pair_t; + pair_t pair(&r, &s); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } template -inline bool do_intersect(const typename K::Segment_2 &p2, - const typename K::Ray_2 &p1, - const K& k) +inline +typename K::Boolean +do_intersect(const typename K::Segment_2& s, + const typename K::Ray_2& r, + const K& k) { - return internal::do_intersect(p1, p2, k); + return internal::do_intersect(r, s, k); } template @@ -265,6 +269,6 @@ intersection(const typename K::Segment_2 &seg, CGAL_INTERSECTION_FUNCTION(Ray_2, Segment_2, 2) CGAL_DO_INTERSECT_FUNCTION(Ray_2, Segment_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_RAY_2_SEGMENT_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Ray_2_Triangle_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Ray_2_Triangle_2.h index 238f3dbb..f61845b7 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Ray_2_Triangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Ray_2_Triangle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Ray_2_Triangle_2.h $ -// $Id: Ray_2_Triangle_2.h fb37f69 2021-09-23T13:15:28+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Ray_2_Triangle_2.h $ +// $Id: include/CGAL/Intersections_2/Ray_2_Triangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -165,26 +165,26 @@ intersection(const typename K::Triangle_2&tr, template -inline bool do_intersect( - const typename K::Ray_2 &p1, - const typename K::Triangle_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Ray_2& r, + const typename K::Triangle_2& tr, + const K&) { - typedef Ray_2_Triangle_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Ray_2_Triangle_2_pair pair_t; + pair_t pair(&r, &tr); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } template -inline bool do_intersect( - const typename K::Triangle_2 &p1, - const typename K::Ray_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Triangle_2& tr, + const typename K::Ray_2& r, + const K& k) { - typedef Ray_2_Triangle_2_pair pair_t; - pair_t pair(&p2, &p1); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + return do_intersect(r, tr, k); } } // namespace internal @@ -193,7 +193,6 @@ inline bool do_intersect( CGAL_INTERSECTION_FUNCTION(Ray_2, Triangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Ray_2, Triangle_2, 2) +} // namespace CGAL -} //namespace CGAL - -#endif +#endif // CGAL_INTERSECTIONS_2_RAY_2_TRIANGLE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Segment_2_Segment_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Segment_2_Segment_2.h index ef0d7df9..110be231 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Segment_2_Segment_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Segment_2_Segment_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h $ -// $Id: Segment_2_Segment_2.h 397620e 2022-12-13T19:03:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h $ +// $Id: include/CGAL/Intersections_2/Segment_2_Segment_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -25,7 +25,6 @@ #include #include #include -#include #include namespace CGAL { @@ -326,7 +325,7 @@ do_intersect_with_info(const typename K::Segment_2 &seg1, template -bool +typename K::Boolean do_intersect(const typename K::Segment_2 &seg1, const typename K::Segment_2 &seg2, const K& k) @@ -508,6 +507,6 @@ intersection(const typename K::Segment_2 &seg1, CGAL_INTERSECTION_FUNCTION_SELF(Segment_2, 2) CGAL_DO_INTERSECT_FUNCTION_SELF(Segment_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_SEGMENT_2_SEGMENT_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Segment_2_Triangle_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Segment_2_Triangle_2.h index 38b33822..8dc304b4 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Segment_2_Triangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Segment_2_Triangle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Segment_2_Triangle_2.h $ -// $Id: Segment_2_Triangle_2.h fb37f69 2021-09-23T13:15:28+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Segment_2_Triangle_2.h $ +// $Id: include/CGAL/Intersections_2/Segment_2_Triangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -52,19 +52,26 @@ class Segment_2_Triangle_2_pair { }; template -inline bool do_intersect( - const typename K::Segment_2 &p1, - const typename K::Triangle_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Segment_2& s, + const typename K::Triangle_2& tr, + const K&) { - typedef Segment_2_Triangle_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Segment_2_Triangle_2_pair pair_t; + pair_t pair(&s, &tr); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } - - - +template +inline +typename K::Boolean +do_intersect(const typename K::Triangle_2& tr, + const typename K::Segment_2& s, + const K& k) +{ + return do_intersect(s, tr, k); +} template typename Segment_2_Triangle_2_pair::Intersection_results @@ -174,24 +181,12 @@ intersection(const typename K::Triangle_2&tr, return internal::intersection(seg, tr, k); } - -template -inline bool do_intersect( - const typename K::Triangle_2 &p1, - const typename K::Segment_2 &p2, - const K&) -{ - typedef Segment_2_Triangle_2_pair pair_t; - pair_t pair(&p2, &p1); - return pair.intersection_type() != pair_t::NO_INTERSECTION; -} - } // namespace internal } // namespace Intersections CGAL_INTERSECTION_FUNCTION(Segment_2, Triangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Segment_2, Triangle_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_SEGMENT_2_TRIANGLE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/Triangle_2_Triangle_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/Triangle_2_Triangle_2.h index 736ec352..ddacca1b 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/Triangle_2_Triangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/Triangle_2_Triangle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/Triangle_2_Triangle_2.h $ -// $Id: Triangle_2_Triangle_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/Triangle_2_Triangle_2.h $ +// $Id: include/CGAL/Intersections_2/Triangle_2_Triangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,8 +22,10 @@ #include namespace CGAL { + CGAL_DO_INTERSECT_FUNCTION_SELF(Triangle_2, 2) CGAL_INTERSECTION_FUNCTION_SELF(Triangle_2, 2) + } // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_TRIANGLE_2_TRIANGLE_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/internal/Straight_2.h b/thirdparty/CGAL/include/CGAL/Intersections_2/internal/Straight_2.h index 92dab763..6f7b7671 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/internal/Straight_2.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/internal/Straight_2.h @@ -7,14 +7,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/internal/Straight_2.h $ -// $Id: Straight_2.h 7e62c02 2021-04-12T14:02:37+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/internal/Straight_2.h $ +// $Id: include/CGAL/Intersections_2/internal/Straight_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Geert-Jan Giezeman - #ifndef CGAL_INTERSECTIONS_2_INTERNAL_STRAIGHT_2_H #define CGAL_INTERSECTIONS_2_INTERNAL_STRAIGHT_2_H @@ -346,6 +345,6 @@ collinear_order(typename K::Point_2 const &pt1, typename K::Point_2 const & pt2) } // namespace internal } // namespace Intersections -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_INTERNAL_STRAIGHT_2_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h b/thirdparty/CGAL/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h index 222ff1b2..53ec1360 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h $ -// $Id: Triangle_2_Triangle_2_do_intersect_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h $ +// $Id: include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,15 +23,15 @@ namespace Intersections { namespace internal { template -bool intersection_test_vertex(const typename K::Point_2 * P1, - const typename K::Point_2 * Q1, - const typename K::Point_2 * R1, - const typename K::Point_2 * P2, - const typename K::Point_2 * Q2, - const typename K::Point_2 * R2, - const K & k ){ - - +typename K::Boolean +intersection_test_vertex(const typename K::Point_2* P1, + const typename K::Point_2* Q1, + const typename K::Point_2* R1, + const typename K::Point_2* P2, + const typename K::Point_2* Q2, + const typename K::Point_2* R2, + const K& k) +{ CGAL_kernel_precondition( k.orientation_2_object() (*P1,*Q1,*R1) == POSITIVE); CGAL_kernel_precondition( k.orientation_2_object() (*P2,*Q2,*R2) @@ -65,16 +65,15 @@ bool intersection_test_vertex(const typename K::Point_2 * P1, template -bool intersection_test_edge(const typename K::Point_2 * P1, - const typename K::Point_2 * Q1, - const typename K::Point_2 * R1, - const typename K::Point_2 * P2, - const typename K::Point_2 * - CGAL_kernel_precondition_code(Q2), - const typename K::Point_2 * R2, - const K & k ){ - - +typename K::Boolean +intersection_test_edge(const typename K::Point_2* P1, + const typename K::Point_2* Q1, + const typename K::Point_2* R1, + const typename K::Point_2* P2, + const typename K::Point_2* CGAL_kernel_precondition_code(Q2), + const typename K::Point_2* R2, + const K& k) +{ CGAL_kernel_precondition( k.orientation_2_object() (*P1,*Q1,*R1) == POSITIVE); CGAL_kernel_precondition( k.orientation_2_object() (*P2,*Q2,*R2) @@ -99,12 +98,12 @@ bool intersection_test_edge(const typename K::Point_2 * P1, } - template -bool do_intersect(const typename K::Triangle_2 &t1, - const typename K::Triangle_2 &t2, - const K & k ){ - +typename K::Boolean +do_intersect(const typename K::Triangle_2& t1, + const typename K::Triangle_2& t2, + const K& k) +{ CGAL_kernel_precondition( ! k.is_degenerate_2_object() (t1) ); CGAL_kernel_precondition( ! k.is_degenerate_2_object() (t2) ); @@ -164,6 +163,6 @@ bool do_intersect(const typename K::Triangle_2 &t1, } // namespace internal } // namespace Intersections -} //namespace CGAL +} // namespace CGAL -#endif //CGAL_TRIANGLE_2_TRIANGLE_2_DO_INTERSECT_H +#endif // CGAL_TRIANGLE_2_TRIANGLE_2_DO_INTERSECT_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_intersection_impl.h b/thirdparty/CGAL/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_intersection_impl.h index fddc4638..a1a414b8 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_intersection_impl.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_intersection_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_intersection_impl.h $ -// $Id: Triangle_2_Triangle_2_intersection_impl.h fb37f69 2021-09-23T13:15:28+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_intersection_impl.h $ +// $Id: include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_intersection_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Bbox_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Bbox_3.h index 4b69cfbf..faa4d0b5 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Bbox_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Bbox_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Bbox_3.h $ -// $Id: Bbox_3_Bbox_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Bbox_3.h $ +// $Id: include/CGAL/Intersections_3/Bbox_3_Bbox_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,8 +24,8 @@ #include -#include -#include +#include +#include #include @@ -39,13 +39,13 @@ do_intersect(const CGAL::Bbox_3& c, return CGAL::do_overlap(c, bbox); } -typename boost::optional< typename boost::variant< Bbox_3> > +typename std::optional< typename std::variant< Bbox_3> > inline intersection(const CGAL::Bbox_3& a, const CGAL::Bbox_3& b) { - typedef typename boost::variant variant_type; - typedef typename boost::optional result_type; + typedef typename std::variant variant_type; + typedef typename std::optional result_type; if(!do_intersect(a,b)) return result_type(); @@ -64,7 +64,7 @@ namespace Intersections { namespace internal { template -bool +typename K::Boolean inline do_intersect(const CGAL::Bbox_3& c, const CGAL::Bbox_3& bbox, diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Iso_cuboid_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Iso_cuboid_3.h index b39fec6b..2a5030f1 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Iso_cuboid_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Iso_cuboid_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Iso_cuboid_3.h $ -// $Id: Bbox_3_Iso_cuboid_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Iso_cuboid_3.h $ +// $Id: include/CGAL/Intersections_3/Bbox_3_Iso_cuboid_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -30,15 +30,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Iso_cuboid_3& ic) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Iso_cuboid_3& ic) { return K().do_intersect_3_object()(box, ic); } template -bool do_intersect(const Iso_cuboid_3& ic, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Iso_cuboid_3& ic, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(ic, box); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Line_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Line_3.h index 7bc228e0..ff05e99c 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Line_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Line_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Line_3.h $ -// $Id: Bbox_3_Line_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Line_3.h $ +// $Id: include/CGAL/Intersections_3/Bbox_3_Line_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,15 +24,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Line_3& l) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Line_3& l) { return K().do_intersect_3_object()(box, l); } template -bool do_intersect(const Line_3& l, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Line_3& l, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(l, box); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Plane_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Plane_3.h index f31656dd..f4e28532 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Plane_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Plane_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Plane_3.h $ -// $Id: Bbox_3_Plane_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Plane_3.h $ +// $Id: include/CGAL/Intersections_3/Bbox_3_Plane_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -30,15 +30,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Plane_3& pl) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Plane_3& pl) { return K().do_intersect_3_object()(box, pl); } template -bool do_intersect(const Plane_3& pl, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Plane_3& pl, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(pl, box); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Point_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Point_3.h index aad569e9..0664785d 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Point_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Point_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Point_3.h $ -// $Id: Bbox_3_Point_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Point_3.h $ +// $Id: include/CGAL/Intersections_3/Bbox_3_Point_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -30,8 +30,9 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Point_3& p) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Point_3& p) { Point_3 bl(box.xmin(), box.ymin(), box.zmin()), tr(box.xmax(), box.ymax(), box.zmax()); @@ -40,8 +41,9 @@ bool do_intersect(const CGAL::Bbox_3& box, } template -bool do_intersect(const Point_3& a, - const CGAL::Bbox_3& b) +typename K::Boolean +do_intersect(const Point_3& a, + const CGAL::Bbox_3& b) { return do_intersect(b,a); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Ray_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Ray_3.h index 157da2bc..5e55df44 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Ray_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Ray_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Ray_3.h $ -// $Id: Bbox_3_Ray_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Ray_3.h $ +// $Id: include/CGAL/Intersections_3/Bbox_3_Ray_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -30,15 +30,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Ray_3& r) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Ray_3& r) { return K().do_intersect_3_object()(box, r); } template -bool do_intersect(const Ray_3& r, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Ray_3& r, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(r, box); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Segment_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Segment_3.h index 7900096e..81198674 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Segment_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Segment_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Segment_3.h $ -// $Id: Bbox_3_Segment_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Segment_3.h $ +// $Id: include/CGAL/Intersections_3/Bbox_3_Segment_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -30,15 +30,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Segment_3& s) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Segment_3& s) { return K().do_intersect_3_object()(box, s); } template -bool do_intersect(const Segment_3& s, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Segment_3& s, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(s, box); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Sphere_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Sphere_3.h index 66da8b3e..856cafb1 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Sphere_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Sphere_3.h $ -// $Id: Bbox_3_Sphere_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Sphere_3.h $ +// $Id: include/CGAL/Intersections_3/Bbox_3_Sphere_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -28,15 +28,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Sphere_3& s) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Sphere_3& s) { return K().do_intersect_3_object()(box, s); } template -bool do_intersect(const Sphere_3& s, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Sphere_3& s, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(s, box); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Tetrahedron_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Tetrahedron_3.h index 9f8688ed..0ee23259 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Tetrahedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Tetrahedron_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Tetrahedron_3.h $ -// $Id: Bbox_3_Tetrahedron_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Tetrahedron_3.h $ +// $Id: include/CGAL/Intersections_3/Bbox_3_Tetrahedron_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -28,15 +28,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Tetrahedron_3& t) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Tetrahedron_3& t) { return K().do_intersect_3_object()(box, t); } template -bool do_intersect(const Tetrahedron_3& t, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Tetrahedron_3& t, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(t, box); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Triangle_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Triangle_3.h index 86245f51..2ac524af 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Triangle_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Bbox_3_Triangle_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Triangle_3.h $ -// $Id: Bbox_3_Triangle_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Triangle_3.h $ +// $Id: include/CGAL/Intersections_3/Bbox_3_Triangle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -29,15 +29,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Triangle_3& tr) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Triangle_3& tr) { return K().do_intersect_3_object()(box, tr); } template -bool do_intersect(const Triangle_3& tr, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Triangle_3& tr, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(tr, box); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Iso_cuboid_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Iso_cuboid_3.h index 11bac784..4904d795 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Iso_cuboid_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Iso_cuboid_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Iso_cuboid_3.h $ -// $Id: Iso_cuboid_3_Iso_cuboid_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Iso_cuboid_3.h $ +// $Id: include/CGAL/Intersections_3/Iso_cuboid_3_Iso_cuboid_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Line_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Line_3.h index 9c863618..0edcf7d0 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Line_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Line_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Line_3.h $ -// $Id: Iso_cuboid_3_Line_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Line_3.h $ +// $Id: include/CGAL/Intersections_3/Iso_cuboid_3_Line_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Plane_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Plane_3.h index d067b934..8e32d758 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Plane_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Plane_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Plane_3.h $ -// $Id: Iso_cuboid_3_Plane_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Plane_3.h $ +// $Id: include/CGAL/Intersections_3/Iso_cuboid_3_Plane_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Point_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Point_3.h index 8ff18c94..8cdf3140 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Point_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Point_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Point_3.h $ -// $Id: Iso_cuboid_3_Point_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Point_3.h $ +// $Id: include/CGAL/Intersections_3/Iso_cuboid_3_Point_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Ray_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Ray_3.h index c7776aa5..87c2f9a7 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Ray_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Ray_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Ray_3.h $ -// $Id: Iso_cuboid_3_Ray_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Ray_3.h $ +// $Id: include/CGAL/Intersections_3/Iso_cuboid_3_Ray_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Segment_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Segment_3.h index b2db1eee..79f71f89 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Segment_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Segment_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Segment_3.h $ -// $Id: Iso_cuboid_3_Segment_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Segment_3.h $ +// $Id: include/CGAL/Intersections_3/Iso_cuboid_3_Segment_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Sphere_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Sphere_3.h index fc7278a0..bdce81b4 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Sphere_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Sphere_3.h $ -// $Id: Iso_cuboid_3_Sphere_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Sphere_3.h $ +// $Id: include/CGAL/Intersections_3/Iso_cuboid_3_Sphere_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Tetrahedron_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Tetrahedron_3.h index 11f06a21..01d3c74f 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Tetrahedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Tetrahedron_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Tetrahedron_3.h $ -// $Id: Iso_cuboid_3_Tetrahedron_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Tetrahedron_3.h $ +// $Id: include/CGAL/Intersections_3/Iso_cuboid_3_Tetrahedron_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Triangle_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Triangle_3.h index 3fb0f65e..7c7f185c 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Triangle_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Iso_cuboid_3_Triangle_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Triangle_3.h $ -// $Id: Iso_cuboid_3_Triangle_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Triangle_3.h $ +// $Id: include/CGAL/Intersections_3/Iso_cuboid_3_Triangle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -34,4 +34,4 @@ CGAL_INTERSECTION_FUNCTION(Iso_cuboid_3, Triangle_3, 3) } // namespace CGAL -#endif // CGAL_INTERSECTIONS_3_BBOX_3_TRIANGLE_3_H +#endif // CGAL_INTERSECTIONS_3_ISO_CUBOID_3_TRIANGLE_3_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Line_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Line_3.h index e32ad5fc..0916a12a 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Line_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Line_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Line_3_Line_3.h $ -// $Id: Line_3_Line_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Line_3_Line_3.h $ +// $Id: include/CGAL/Intersections_3/Line_3_Line_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Plane_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Plane_3.h index af0b05ed..f36f9515 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Plane_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Plane_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Line_3_Plane_3.h $ -// $Id: Line_3_Plane_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Line_3_Plane_3.h $ +// $Id: include/CGAL/Intersections_3/Line_3_Plane_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,7 +27,7 @@ #include #include -#include +#include namespace CGAL { @@ -36,7 +36,7 @@ CGAL_INTERSECTION_FUNCTION(Line_3, Plane_3, 3) template inline -boost::optional +std::optional intersection_point_for_polyhedral_envelope(const Plane_3& plane, const Line_3& line) { @@ -45,7 +45,7 @@ intersection_point_for_polyhedral_envelope(const Plane_3& plane, template inline -boost::optional +std::optional intersection_point_for_polyhedral_envelope(const Line_3& line, const Plane_3& plane) { diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Point_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Point_3.h index 85c468d8..0ce98351 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Point_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Point_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Line_3_Point_3.h $ -// $Id: Line_3_Point_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Line_3_Point_3.h $ +// $Id: include/CGAL/Intersections_3/Line_3_Point_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Ray_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Ray_3.h index f89442f4..4d4b0c80 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Ray_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Ray_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Line_3_Ray_3.h $ -// $Id: Line_3_Ray_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Line_3_Ray_3.h $ +// $Id: include/CGAL/Intersections_3/Line_3_Ray_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Segment_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Segment_3.h index faff7476..630929b8 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Segment_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Segment_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Line_3_Segment_3.h $ -// $Id: Line_3_Segment_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Line_3_Segment_3.h $ +// $Id: include/CGAL/Intersections_3/Line_3_Segment_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Sphere_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Sphere_3.h index 2051fad8..545116b9 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Sphere_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Line_3_Sphere_3.h $ -// $Id: Line_3_Sphere_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Line_3_Sphere_3.h $ +// $Id: include/CGAL/Intersections_3/Line_3_Sphere_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Tetrahedron_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Tetrahedron_3.h index 70691a14..fdd8dd39 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Tetrahedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Tetrahedron_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Line_3_Tetrahedron_3.h $ -// $Id: Line_3_Tetrahedron_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Line_3_Tetrahedron_3.h $ +// $Id: include/CGAL/Intersections_3/Line_3_Tetrahedron_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Triangle_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Triangle_3.h index 4f8a8469..e2843fcf 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Triangle_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Line_3_Triangle_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Line_3_Triangle_3.h $ -// $Id: Line_3_Triangle_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Line_3_Triangle_3.h $ +// $Id: include/CGAL/Intersections_3/Line_3_Triangle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Plane_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Plane_3.h index 0bd1abb4..94fb384a 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Plane_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Plane_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3.h $ -// $Id: Plane_3_Plane_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3.h $ +// $Id: include/CGAL/Intersections_3/Plane_3_Plane_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Plane_3_Plane_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Plane_3_Plane_3.h index e0634c48..27f80605 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Plane_3_Plane_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Plane_3_Plane_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3_Plane_3.h $ -// $Id: Plane_3_Plane_3_Plane_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3_Plane_3.h $ +// $Id: include/CGAL/Intersections_3/Plane_3_Plane_3_Plane_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -30,7 +30,8 @@ namespace CGAL { template -inline bool +inline +typename K::Boolean do_intersect(const Plane_3& plane1, const Plane_3& plane2, const Plane_3& plane3) @@ -51,7 +52,7 @@ intersection(const Plane_3& plane1, template inline -boost::optional +std::optional intersection_point_for_polyhedral_envelope(const Plane_3& p0, const Plane_3& p1, const Plane_3& p2) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Point_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Point_3.h index 59c0d0da..2b0551e5 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Point_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Point_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Plane_3_Point_3.h $ -// $Id: Plane_3_Point_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Plane_3_Point_3.h $ +// $Id: include/CGAL/Intersections_3/Plane_3_Point_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Ray_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Ray_3.h index fc38135a..7192797c 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Ray_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Ray_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Plane_3_Ray_3.h $ -// $Id: Plane_3_Ray_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Plane_3_Ray_3.h $ +// $Id: include/CGAL/Intersections_3/Plane_3_Ray_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Segment_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Segment_3.h index 0b65bc23..a2475f2c 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Segment_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Segment_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Plane_3_Segment_3.h $ -// $Id: Plane_3_Segment_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Plane_3_Segment_3.h $ +// $Id: include/CGAL/Intersections_3/Plane_3_Segment_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Sphere_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Sphere_3.h index e1676a68..18135ed7 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Sphere_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Plane_3_Sphere_3.h $ -// $Id: Plane_3_Sphere_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Plane_3_Sphere_3.h $ +// $Id: include/CGAL/Intersections_3/Plane_3_Sphere_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Tetrahedron_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Tetrahedron_3.h index 634b03c9..06741038 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Tetrahedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Tetrahedron_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Plane_3_Tetrahedron_3.h $ -// $Id: Plane_3_Tetrahedron_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Plane_3_Tetrahedron_3.h $ +// $Id: include/CGAL/Intersections_3/Plane_3_Tetrahedron_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Triangle_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Triangle_3.h index 0f21b825..e64d4007 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Triangle_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Plane_3_Triangle_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Plane_3_Triangle_3.h $ -// $Id: Plane_3_Triangle_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Plane_3_Triangle_3.h $ +// $Id: include/CGAL/Intersections_3/Plane_3_Triangle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Point_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Point_3.h index 4f0d3aef..f94eb296 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Point_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Point_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Point_3_Point_3.h $ -// $Id: Point_3_Point_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Point_3_Point_3.h $ +// $Id: include/CGAL/Intersections_3/Point_3_Point_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Ray_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Ray_3.h index 3f3e19c6..1b9a9c96 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Ray_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Ray_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Point_3_Ray_3.h $ -// $Id: Point_3_Ray_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Point_3_Ray_3.h $ +// $Id: include/CGAL/Intersections_3/Point_3_Ray_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Segment_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Segment_3.h index b9394fdb..800ec5d2 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Segment_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Segment_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Point_3_Segment_3.h $ -// $Id: Point_3_Segment_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Point_3_Segment_3.h $ +// $Id: include/CGAL/Intersections_3/Point_3_Segment_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Sphere_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Sphere_3.h index 7a03e47d..30ea4649 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Sphere_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Point_3_Sphere_3.h $ -// $Id: Point_3_Sphere_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Point_3_Sphere_3.h $ +// $Id: include/CGAL/Intersections_3/Point_3_Sphere_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Tetrahedron_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Tetrahedron_3.h index 9928b9fe..76ef4c8a 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Tetrahedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Tetrahedron_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Point_3_Tetrahedron_3.h $ -// $Id: Point_3_Tetrahedron_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Point_3_Tetrahedron_3.h $ +// $Id: include/CGAL/Intersections_3/Point_3_Tetrahedron_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Triangle_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Triangle_3.h index 8c4b2f8a..f99b28eb 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Triangle_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Point_3_Triangle_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Point_3_Triangle_3.h $ -// $Id: Point_3_Triangle_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Point_3_Triangle_3.h $ +// $Id: include/CGAL/Intersections_3/Point_3_Triangle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Ray_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Ray_3.h index ea012af8..db6f8c03 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Ray_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Ray_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Ray_3_Ray_3.h $ -// $Id: Ray_3_Ray_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Ray_3_Ray_3.h $ +// $Id: include/CGAL/Intersections_3/Ray_3_Ray_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Segment_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Segment_3.h index e5b4e58c..f4a35a6f 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Segment_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Segment_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Ray_3_Segment_3.h $ -// $Id: Ray_3_Segment_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Ray_3_Segment_3.h $ +// $Id: include/CGAL/Intersections_3/Ray_3_Segment_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Sphere_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Sphere_3.h index bfe863ab..5a3df917 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Sphere_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Ray_3_Sphere_3.h $ -// $Id: Ray_3_Sphere_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Ray_3_Sphere_3.h $ +// $Id: include/CGAL/Intersections_3/Ray_3_Sphere_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Tetrahedron_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Tetrahedron_3.h index f0dc4453..235d66cb 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Tetrahedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Tetrahedron_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Ray_3_Tetrahedron_3.h $ -// $Id: Ray_3_Tetrahedron_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Ray_3_Tetrahedron_3.h $ +// $Id: include/CGAL/Intersections_3/Ray_3_Tetrahedron_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Triangle_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Triangle_3.h index 1bbf4658..533f9fe6 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Triangle_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Ray_3_Triangle_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Ray_3_Triangle_3.h $ -// $Id: Ray_3_Triangle_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Ray_3_Triangle_3.h $ +// $Id: include/CGAL/Intersections_3/Ray_3_Triangle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Segment_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Segment_3.h index afcf83d1..ae51c160 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Segment_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Segment_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Segment_3_Segment_3.h $ -// $Id: Segment_3_Segment_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Segment_3_Segment_3.h $ +// $Id: include/CGAL/Intersections_3/Segment_3_Segment_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Sphere_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Sphere_3.h index f2b91fe2..57899b0e 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Sphere_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Segment_3_Sphere_3.h $ -// $Id: Segment_3_Sphere_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Segment_3_Sphere_3.h $ +// $Id: include/CGAL/Intersections_3/Segment_3_Sphere_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Tetrahedron_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Tetrahedron_3.h index ea53f353..023f2111 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Tetrahedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Tetrahedron_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Segment_3_Tetrahedron_3.h $ -// $Id: Segment_3_Tetrahedron_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Segment_3_Tetrahedron_3.h $ +// $Id: include/CGAL/Intersections_3/Segment_3_Tetrahedron_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Triangle_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Triangle_3.h index 793ac059..d1156dfd 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Triangle_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Segment_3_Triangle_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Segment_3_Triangle_3.h $ -// $Id: Segment_3_Triangle_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Segment_3_Triangle_3.h $ +// $Id: include/CGAL/Intersections_3/Segment_3_Triangle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Sphere_3_Sphere_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Sphere_3_Sphere_3.h index f67d8e79..0a652754 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Sphere_3_Sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Sphere_3_Sphere_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Sphere_3_Sphere_3.h $ -// $Id: Sphere_3_Sphere_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Sphere_3_Sphere_3.h $ +// $Id: include/CGAL/Intersections_3/Sphere_3_Sphere_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Sphere_3_Tetrahedron_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Sphere_3_Tetrahedron_3.h index c5d9a450..fedbc7fb 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Sphere_3_Tetrahedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Sphere_3_Tetrahedron_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Sphere_3_Tetrahedron_3.h $ -// $Id: Sphere_3_Tetrahedron_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Sphere_3_Tetrahedron_3.h $ +// $Id: include/CGAL/Intersections_3/Sphere_3_Tetrahedron_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Sphere_3_Triangle_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Sphere_3_Triangle_3.h index 59d27552..5af69d91 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Sphere_3_Triangle_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Sphere_3_Triangle_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Sphere_3_Triangle_3.h $ -// $Id: Sphere_3_Triangle_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Sphere_3_Triangle_3.h $ +// $Id: include/CGAL/Intersections_3/Sphere_3_Triangle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Tetrahedron_3_Tetrahedron_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Tetrahedron_3_Tetrahedron_3.h index b02eb808..737ab30c 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Tetrahedron_3_Tetrahedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Tetrahedron_3_Tetrahedron_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Tetrahedron_3_Tetrahedron_3.h $ -// $Id: Tetrahedron_3_Tetrahedron_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Tetrahedron_3_Tetrahedron_3.h $ +// $Id: include/CGAL/Intersections_3/Tetrahedron_3_Tetrahedron_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Tetrahedron_3_Triangle_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Tetrahedron_3_Triangle_3.h index b525a71f..c210c515 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Tetrahedron_3_Triangle_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Tetrahedron_3_Triangle_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Tetrahedron_3_Triangle_3.h $ -// $Id: Tetrahedron_3_Triangle_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Tetrahedron_3_Triangle_3.h $ +// $Id: include/CGAL/Intersections_3/Tetrahedron_3_Triangle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/Triangle_3_Triangle_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/Triangle_3_Triangle_3.h index 90f7a1c7..323a7cae 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/Triangle_3_Triangle_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/Triangle_3_Triangle_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/Triangle_3_Triangle_3.h $ -// $Id: Triangle_3_Triangle_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/Triangle_3_Triangle_3.h $ +// $Id: include/CGAL/Intersections_3/Triangle_3_Triangle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_do_intersect.h index 5993e077..57107c13 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_do_intersect.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_do_intersect.h $ -// $Id: Bbox_3_Iso_cuboid_3_do_intersect.h 9c6456f 2021-07-29T14:23:40+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,9 +23,10 @@ namespace Intersections { namespace internal { template -bool do_intersect(const CGAL::Bbox_3& bb, - const typename K::Iso_cuboid_3& ic, - const K& /* k */) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& bb, + const typename K::Iso_cuboid_3& ic, + const K& /* k */) { // use CGAL::compare to access the Coercion_traits between K::FT and double if(compare(bb.xmax(), ic.xmin()) == SMALLER || compare(ic.xmax(), bb.xmin()) == SMALLER) @@ -38,9 +39,10 @@ bool do_intersect(const CGAL::Bbox_3& bb, } template -bool do_intersect(const typename K::Iso_cuboid_3& ic, - const CGAL::Bbox_3& bb, - const K& k) +typename K::Boolean +do_intersect(const typename K::Iso_cuboid_3& ic, + const CGAL::Bbox_3& bb, + const K& k) { return do_intersect(bb, ic, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_intersection.h index dc2cb7b4..abd405a3 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_intersection.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_intersection.h $ -// $Id: Bbox_3_Iso_cuboid_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h index a4cbe150..99877377 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h $ -// $Id: Bbox_3_Line_3_do_intersect.h a7ff075 2022-02-03T13:21:11+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,7 +14,7 @@ #ifndef CGAL_INTERNAL_INTERSECTIONS_3_BBOX_3_LINE_3_DO_INTERSECT_H #define CGAL_INTERNAL_INTERSECTIONS_3_BBOX_3_LINE_3_DO_INTERSECT_H -// inspired from http://cag.csail.mit.edu/~amy/papers/box-jgt.pdf +// inspired from https://people.csail.mit.edu/amy/papers/box-jgt.pdf #include #include @@ -25,9 +25,9 @@ namespace CGAL { namespace Intersections { namespace internal { -template +template inline -bool +typename K::Boolean bbox_line_do_intersect_aux(const LFT px, const LFT py, const LFT pz, const LFT vx, const LFT vy, const LFT vz, const BFT bxmin, const BFT bymin, const BFT bzmin, @@ -135,9 +135,10 @@ bbox_line_do_intersect_aux(const LFT px, const LFT py, const LFT pz, } template -bool do_intersect(const typename K::Line_3& line, - const CGAL::Bbox_3& bbox, - const K&) +typename K::Boolean +do_intersect(const typename K::Line_3& line, + const CGAL::Bbox_3& bbox, + const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; @@ -145,16 +146,17 @@ bool do_intersect(const typename K::Line_3& line, const Point_3& point = line.point(); const Vector_3& v = line.to_vector(); - return bbox_line_do_intersect_aux(point.x(), point.y(), point.z(), - v.x(), v.y(), v.z(), - bbox.xmin(), bbox.ymin(), bbox.zmin(), - bbox.xmax(), bbox.ymax(), bbox.zmax()); + return bbox_line_do_intersect_aux(point.x(), point.y(), point.z(), + v.x(), v.y(), v.z(), + bbox.xmin(), bbox.ymin(), bbox.zmin(), + bbox.xmax(), bbox.ymax(), bbox.zmax()); } template -bool do_intersect(const CGAL::Bbox_3& bbox, - const typename K::Line_3& line, - const K& k) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& bbox, + const typename K::Line_3& line, + const K& k) { return do_intersect(line, bbox, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_intersection.h index 5e814eb9..3b5ead2f 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_intersection.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_intersection.h $ -// $Id: Bbox_3_Line_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Bbox_3_Line_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Plane_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Plane_3_do_intersect.h index 638c6865..42e6bbbc 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Plane_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Plane_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Plane_3_do_intersect.h $ -// $Id: Bbox_3_Plane_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Plane_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Bbox_3_Plane_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,17 +22,19 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Plane_3& plane, - const Bbox_3& bbox, - const K& k) +typename K::Boolean +do_intersect(const typename K::Plane_3& plane, + const Bbox_3& bbox, + const K& k) { return do_intersect_plane_box(plane, bbox, k); } template -bool do_intersect(const Bbox_3& bbox, - const typename K::Plane_3& plane, - const K& k) +typename K::Boolean +do_intersect(const Bbox_3& bbox, + const typename K::Plane_3& plane, + const K& k) { return do_intersect_plane_box(plane, bbox, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h index be40f50a..c57741ed 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h $ -// $Id: Bbox_3_Ray_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,7 +14,7 @@ #ifndef CGAL_INTERNAL_INTERSECTIONS_3_BBOX_3_RAY_3_DO_INTERSECT_H #define CGAL_INTERNAL_INTERSECTIONS_3_BBOX_3_RAY_3_DO_INTERSECT_H -// inspired from http://cag.csail.mit.edu/~amy/papers/box-jgt.pdf +// inspired from https://people.csail.mit.edu/amy/papers/box-jgt.pdf #include // for CGAL::internal::do_intersect_bbox_segment_aux @@ -26,9 +26,10 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Ray_3& ray, - const CGAL::Bbox_3& bbox, - const K&) +typename K::Boolean +do_intersect(const typename K::Ray_3& ray, + const CGAL::Bbox_3& bbox, + const K&) { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; @@ -49,9 +50,10 @@ bool do_intersect(const typename K::Ray_3& ray, } template -bool do_intersect(const CGAL::Bbox_3& bbox, - const typename K::Ray_3& ray, - const K& k) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& bbox, + const typename K::Ray_3& ray, + const K& k) { return do_intersect(ray, bbox, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_intersection.h index 1c2877da..dd042fa8 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_intersection.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_intersection.h $ -// $Id: Bbox_3_Ray_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h index fb78eadb..0aa78cc4 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h $ -// $Id: Bbox_3_Segment_3_do_intersect.h 35eee1b 2022-02-03T15:47:17+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,9 +20,9 @@ #include #include -#include +#include -// inspired from http://cag.csail.mit.edu/~amy/papers/box-jgt.pdf +// inspired from https://people.csail.mit.edu/amy/papers/box-jgt.pdf // This algorithm intersects the line with the x-, y-, and z-slabs of the // bounding box, and computes the interval [t1, t2], in the @@ -66,7 +66,7 @@ class Do_intersect_bbox_segment_aux_is_greater double dmax; public: - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); Do_intersect_bbox_segment_aux_is_greater() : error(0.), tmax(0.), dmax(0.) {} @@ -224,10 +224,10 @@ do_intersect_bbox_segment_aux(const FT& px, const FT& py, const FT& pz, CGAL_assertion(! is_negative(dmin)); CGAL_assertion(! is_negative(dmax)); - if(bounded_0) { + CGAL_assertion_code(if(bounded_0) {) CGAL_assertion(! is_negative(tmin)); CGAL_assertion(! is_negative(tmax)); - } + CGAL_assertion_code(}) // ----------------------------------- // treat y coord @@ -365,11 +365,10 @@ do_intersect_bbox_segment_aux(const FT& px, const FT& py, const FT& pz, CGAL_assertion(! is_negative(dzmin)); CGAL_assertion(! is_negative(dzmax)); - if(bounded_0) - { + CGAL_assertion_code(if(bounded_0) {) CGAL_assertion(! is_negative(tzmin)); CGAL_assertion(! is_negative(tzmax)); - } + CGAL_assertion_code(}) typedef Do_intersect_bbox_segment_aux_is_greater Is_greater; typedef typename Is_greater::result_type Is_greater_value; @@ -454,10 +453,9 @@ template inline typename Do_intersect_bbox_segment_aux_is_greater::result_type -do_intersect_bbox_segment_aux( - const FT& px, const FT& py, const FT& pz, - const FT& qx, const FT& qy, const FT& qz, - const Bbox_3& bb) +do_intersect_bbox_segment_aux(const FT& px, const FT& py, const FT& pz, + const FT& qx, const FT& qy, const FT& qz, + const Bbox_3& bb) { return do_intersect_bbox_segment_aux(px, py, pz, @@ -467,9 +465,10 @@ do_intersect_bbox_segment_aux( } template -bool do_intersect(const typename K::Segment_3& segment, - const CGAL::Bbox_3& bbox, - const K&) +typename K::Boolean +do_intersect(const typename K::Segment_3& segment, + const CGAL::Bbox_3& bbox, + const K&) { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; @@ -483,9 +482,10 @@ bool do_intersect(const typename K::Segment_3& segment, } template -bool do_intersect(const CGAL::Bbox_3& bbox, - const typename K::Segment_3& segment, - const K& k) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& bbox, + const typename K::Segment_3& segment, + const K& k) { return do_intersect(segment, bbox, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_intersection.h index 573686bf..7bd413eb 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_intersection.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_intersection.h $ -// $Id: Bbox_3_Segment_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include namespace CGAL { namespace Intersections { @@ -34,7 +34,7 @@ namespace internal { // But it must be a template function since the original kernel must be // taken into account. template -typename boost::optional< boost::variant > +typename std::optional< std::variant > intersection_bl(const Bbox_3& box, double lpx, double lpy, double lpz, double ldx, double ldy, double ldz, @@ -45,7 +45,7 @@ intersection_bl(const Bbox_3& box, typedef typename K::Vector_3 Vector_3; typedef typename K::Segment_3 Segment_3; - typedef typename boost::optional > result_type; + typedef typename std::optional > result_type; double seg_min = 0.0, seg_max = 1.0; // first on x value diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Sphere_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Sphere_3_do_intersect.h index 894c1eba..1ca0a46f 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Sphere_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Sphere_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Sphere_3_do_intersect.h $ -// $Id: Bbox_3_Sphere_3_do_intersect.h 9c6456f 2021-07-29T14:23:40+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Sphere_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Bbox_3_Sphere_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,9 +23,10 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Sphere_3& sphere, - const CGAL::Bbox_3& bbox, - const K& k) +typename K::Boolean +do_intersect(const typename K::Sphere_3& sphere, + const CGAL::Bbox_3& bbox, + const K& k) { return do_intersect_sphere_box_3(sphere, bbox.xmin(), bbox.ymin(), bbox.zmin(), @@ -34,9 +35,10 @@ bool do_intersect(const typename K::Sphere_3& sphere, } template -bool do_intersect(const CGAL::Bbox_3& bbox, - const typename K::Sphere_3& sphere, - const K& k) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& bbox, + const typename K::Sphere_3& sphere, + const K& k) { return do_intersect(sphere, bbox, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Tetrahedron_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Tetrahedron_3_do_intersect.h index 2f98adfc..45649bae 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Tetrahedron_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Tetrahedron_3_do_intersect.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Tetrahedron_3_do_intersect.h $ -// $Id: Bbox_3_Tetrahedron_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Tetrahedron_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Bbox_3_Tetrahedron_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,9 +24,11 @@ namespace Intersections { namespace internal { template -inline typename K::Boolean do_intersect(const CGAL::Bbox_3& aabb, - const typename K::Tetrahedron_3& tet, - const K& k) +inline +typename K::Boolean +do_intersect(const CGAL::Bbox_3& aabb, + const typename K::Tetrahedron_3& tet, + const K& k) { typename K::Construct_triangle_3 tr = k.construct_triangle_3_object(); typename K::Boolean result = false; @@ -57,9 +59,11 @@ inline typename K::Boolean do_intersect(const CGAL::Bbox_3& aabb, } template -inline typename K::Boolean do_intersect(const typename K::Tetrahedron_3& tet, - const CGAL::Bbox_3& bb, - const K &k) +inline +typename K::Boolean +do_intersect(const typename K::Tetrahedron_3& tet, + const CGAL::Bbox_3& bb, + const K &k) { return do_intersect(bb, tet, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Triangle_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Triangle_3_do_intersect.h index 7b5ba63b..f9b43e46 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Triangle_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Bbox_3_Triangle_3_do_intersect.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Triangle_3_do_intersect.h $ -// $Id: Bbox_3_Triangle_3_do_intersect.h c61e3a9 2022-08-24T16:18:26+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Triangle_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Bbox_3_Triangle_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -397,9 +397,10 @@ do_intersect_bbox_or_iso_cuboid_impl(const std::array< std::array, 3>& tr } template -bool do_intersect_bbox_or_iso_cuboid(const typename K::Triangle_3& a_triangle, - const Box3& a_bbox, - const K& k) +typename K::Boolean +do_intersect_bbox_or_iso_cuboid(const typename K::Triangle_3& a_triangle, + const Box3& a_bbox, + const K& k) { if(certainly_not(do_bbox_intersect(a_triangle, a_bbox))) return false; @@ -423,22 +424,23 @@ bool do_intersect_bbox_or_iso_cuboid(const typename K::Triangle_3& a_triangle, { a_triangle[2][0], a_triangle[2][1], a_triangle[2][2] } }}; - // exception will be thrown in case the output is indeterminate return do_intersect_bbox_or_iso_cuboid_impl(triangle, a_bbox, do_axis_intersect_aux_impl); } template -bool do_intersect(const typename K::Triangle_3& triangle, - const CGAL::Bbox_3& bbox, - const K& k) +typename K::Boolean +do_intersect(const typename K::Triangle_3& triangle, + const CGAL::Bbox_3& bbox, + const K& k) { return do_intersect_bbox_or_iso_cuboid(triangle, bbox, k); } template -bool do_intersect(const CGAL::Bbox_3& bbox, - const typename K::Triangle_3& triangle, - const K& k) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& bbox, + const typename K::Triangle_3& triangle, + const K& k) { return do_intersect_bbox_or_iso_cuboid(triangle, bbox, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_do_intersect.h index a561ed8b..81c60de8 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_do_intersect.h $ -// $Id: Iso_cuboid_3_Iso_cuboid_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,8 @@ namespace Intersections { namespace internal { template -inline bool +inline +typename K::Boolean do_intersect(const typename K::Iso_cuboid_3& icub1, const typename K::Iso_cuboid_3& icub2, const K&) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_intersection.h index f5b09079..229e0207 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_intersection.h $ -// $Id: Iso_cuboid_3_Iso_cuboid_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_do_intersect.h index bd0de7f3..a59b6ca0 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_do_intersect.h $ -// $Id: Iso_cuboid_3_Line_3_do_intersect.h e70a62a 2021-06-25T20:16:29+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,8 @@ namespace Intersections { namespace internal { template -inline bool +inline +typename K::Boolean do_intersect(const typename K::Line_3& line, const typename K::Iso_cuboid_3& ic, const K&) @@ -34,14 +35,15 @@ do_intersect(const typename K::Line_3& line, const Point_3& point = line.point(); const Vector_3& v = line.to_vector(); - return bbox_line_do_intersect_aux(point.x(), point.y(), point.z(), - v.x(), v.y(), v.z(), - (ic.min)().x(), (ic.min)().y(), (ic.min)().z(), - (ic.max)().x(), (ic.max)().y(), (ic.max)().z()); + return bbox_line_do_intersect_aux(point.x(), point.y(), point.z(), + v.x(), v.y(), v.z(), + (ic.min)().x(), (ic.min)().y(), (ic.min)().z(), + (ic.max)().x(), (ic.max)().y(), (ic.max)().z()); } template -inline bool +inline +typename K::Boolean do_intersect(const typename K::Iso_cuboid_3& ic, const typename K::Line_3& l, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_intersection.h index 08b5ea58..d43e8193 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_intersection.h $ -// $Id: Iso_cuboid_3_Line_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_do_intersect.h index 85184fb2..805a0fd1 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_do_intersect.h $ -// $Id: Iso_cuboid_3_Plane_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -79,15 +79,16 @@ Uncertain get_min_max(const typename K::Vector_3& p, } template // Iso_cuboid_3 or Bbox_3 -bool do_intersect_plane_box(const typename K::Plane_3& plane, - const Box3& bbox, - const K&) +typename K::Boolean do_intersect_plane_box(const typename K::Plane_3& plane, + const Box3& bbox, + const K&) { typedef typename K::Point_3 Point_3; Point_3 p_max, p_min; Uncertain b = get_min_max(plane.orthogonal_vector(), bbox, p_min, p_max); - if(is_certain(b)){ + if(is_certain(b)) + { return ! (plane.oriented_side(p_max) == ON_NEGATIVE_SIDE || plane.oriented_side(p_min) == ON_POSITIVE_SIDE); } @@ -114,17 +115,19 @@ bool do_intersect_plane_box(const typename K::Plane_3& plane, } template -bool do_intersect(const typename K::Plane_3& plane, - const typename K::Iso_cuboid_3& bbox, - const K& k) +typename K::Boolean +do_intersect(const typename K::Plane_3& plane, + const typename K::Iso_cuboid_3& bbox, + const K& k) { return do_intersect_plane_box(plane, bbox, k); } template -bool do_intersect(const typename K::Iso_cuboid_3& bbox, - const typename K::Plane_3& plane, - const K& k) +typename K::Boolean +do_intersect(const typename K::Iso_cuboid_3& bbox, + const typename K::Plane_3& plane, + const K& k) { return do_intersect_plane_box(plane, bbox, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_intersection.h index 17cfa904..cbbefbf3 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_intersection.h $ -// $Id: Iso_cuboid_3_Plane_3_intersection.h ba00534 2022-02-24T09:49:38+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -180,7 +180,7 @@ intersection(const typename K::Iso_cuboid_3& cub, } if (all_in || all_out) - return boost::none; + return std::nullopt; if (start_id == -1) return { result_type(corners[solo_id]) }; diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_do_intersect.h index 95410e78..e5f956b4 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_do_intersect.h $ -// $Id: Iso_cuboid_3_Point_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Point_3& pt, const typename K::Iso_cuboid_3& iso, const K& k) @@ -29,7 +29,7 @@ do_intersect(const typename K::Point_3& pt, template inline -bool +typename K::Boolean do_intersect(const typename K::Iso_cuboid_3& iso, const typename K::Point_3& pt, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_intersection.h index 0e10b4c5..ef273d23 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_intersection.h $ -// $Id: Iso_cuboid_3_Point_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h index 526dd25a..1c7f29c9 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h $ -// $Id: Iso_cuboid_3_Ray_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,16 +20,17 @@ #include // for CGAL::internal::do_intersect_bbox_segment_aux -// inspired from http://cag.csail.mit.edu/~amy/papers/box-jgt.pdf +// inspired from https://people.csail.mit.edu/amy/papers/box-jgt.pdf namespace CGAL { namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Ray_3& ray, - const typename K::Iso_cuboid_3& ic, - const K&) +typename K::Boolean +do_intersect(const typename K::Ray_3& ray, + const typename K::Iso_cuboid_3& ic, + const K&) { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; @@ -51,9 +52,11 @@ bool do_intersect(const typename K::Ray_3& ray, } template -bool do_intersect(const typename K::Iso_cuboid_3& ic, - const typename K::Ray_3& ray, - const K& k) { +typename K::Boolean +do_intersect(const typename K::Iso_cuboid_3& ic, + const typename K::Ray_3& ray, + const K& k) +{ return do_intersect(ray, ic, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_intersection.h index 19a99ee6..f636f235 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_intersection.h $ -// $Id: Iso_cuboid_3_Ray_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h index aee75aa6..726eefe1 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h $ -// $Id: Iso_cuboid_3_Segment_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,7 +14,7 @@ #ifndef CGAL_INTERNAL_INTERSECTIONS_3_ISO_CUBOID_3_SEGMENT_3_DO_INTERSECT_H #define CGAL_INTERNAL_INTERSECTIONS_3_ISO_CUBOID_3_SEGMENT_3_DO_INTERSECT_H -// inspired from http://cag.csail.mit.edu/~amy/papers/box-jgt.pdf +// inspired from https://people.csail.mit.edu/amy/papers/box-jgt.pdf #include // for CGAL::internal::do_intersect_bbox_segment_aux @@ -24,9 +24,10 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Segment_3& seg, - const typename K::Iso_cuboid_3& ic, - const K&) +typename K::Boolean +do_intersect(const typename K::Segment_3& seg, + const typename K::Iso_cuboid_3& ic, + const K&) { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; @@ -48,9 +49,10 @@ bool do_intersect(const typename K::Segment_3& seg, } template -bool do_intersect(const typename K::Iso_cuboid_3& ic, - const typename K::Segment_3& seg, - const K& k) +typename K::Boolean +do_intersect(const typename K::Iso_cuboid_3& ic, + const typename K::Segment_3& seg, + const K& k) { return do_intersect(seg, ic, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_intersection.h index 1218525d..5e9f9ebd 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_intersection.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_intersection.h $ -// $Id: Iso_cuboid_3_Segment_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Sphere_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Sphere_3_do_intersect.h index f69593f3..efb84a6f 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Sphere_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Sphere_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Sphere_3_do_intersect.h $ -// $Id: Iso_cuboid_3_Sphere_3_do_intersect.h a7ff075 2022-02-03T13:21:11+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Sphere_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Sphere_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,10 +22,11 @@ namespace Intersections { namespace internal { template // Iso_cuboid_3 or Bbox_3 -bool do_intersect_sphere_box_3(const typename K::Sphere_3& sphere, - const BFT bxmin, const BFT bymin, const BFT bzmin, - const BFT bxmax, const BFT bymax, const BFT bzmax, - const K&) +typename K::Boolean +do_intersect_sphere_box_3(const typename K::Sphere_3& sphere, + const BFT bxmin, const BFT bymin, const BFT bzmin, + const BFT bxmax, const BFT bymax, const BFT bzmax, + const K&) { typedef typename K::FT SFT; typedef typename Coercion_traits::Type FT; @@ -94,9 +95,10 @@ bool do_intersect_sphere_box_3(const typename K::Sphere_3& sphere, } template -bool do_intersect(const typename K::Sphere_3& sphere, - const typename K::Iso_cuboid_3& ic, - const K& k) +typename K::Boolean +do_intersect(const typename K::Sphere_3& sphere, + const typename K::Iso_cuboid_3& ic, + const K& k) { return do_intersect_sphere_box_3(sphere, (ic.min)().x(), (ic.min)().y(), (ic.min)().z(), @@ -105,9 +107,10 @@ bool do_intersect(const typename K::Sphere_3& sphere, } template -bool do_intersect(const typename K::Iso_cuboid_3& ic, - const typename K::Sphere_3& sphere, - const K& k) +typename K::Boolean +do_intersect(const typename K::Iso_cuboid_3& ic, + const typename K::Sphere_3& sphere, + const K& k) { return do_intersect(sphere, ic, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Tetrahedron_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Tetrahedron_3_do_intersect.h index 739d3200..7dc24264 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Tetrahedron_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Tetrahedron_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Tetrahedron_3_do_intersect.h $ -// $Id: Iso_cuboid_3_Tetrahedron_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Tetrahedron_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Tetrahedron_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h index 42188261..c2c0517f 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h $ -// $Id: Iso_cuboid_3_Triangle_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,26 +21,25 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Triangle_3& triangle, - const typename K::Iso_cuboid_3& bbox, - const K& k) +typename K::Boolean +do_intersect(const typename K::Triangle_3& triangle, + const typename K::Iso_cuboid_3& bbox, + const K& k) { return do_intersect_bbox_or_iso_cuboid(triangle, bbox, k); } template -bool do_intersect(const typename K::Iso_cuboid_3& bbox, - const typename K::Triangle_3& triangle, - const K& k) +typename K::Boolean +do_intersect(const typename K::Iso_cuboid_3& bbox, + const typename K::Triangle_3& triangle, + const K& k) { return do_intersect_bbox_or_iso_cuboid(triangle, bbox, k); } } // namespace internal } // namespace Intersections - - - } // namespace CGAL #endif // CGAL_INTERNAL_INTERSECTIONS_3_ISO_CUBOID_3_TRIANGLE_3_DO_INTERSECT_H diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_intersection.h index 845621cd..dc7e2585 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_intersection.h $ -// $Id: Iso_cuboid_3_Triangle_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -67,7 +67,7 @@ void clip_poly_halfspace( SP_type inter = k.intersect_3_object()(seg, pl); if(inter) { - Point* p_inter = boost::get(&*inter); + Point* p_inter = std::get_if(&*inter); if(p_inter && !(k.equal_3_object()(*p_inter, p1)) && !(k.equal_3_object()(*p_inter, p2))) @@ -90,7 +90,7 @@ void clip_poly_halfspace( SP_type inter = typename K::Intersect_3()(seg, pl); if(inter) { - Point* p_inter = boost::get(&*inter); + Point* p_inter = std::get_if(&*inter); if(p_inter && !(k.equal_3_object()(*p_inter, p1)) && !(k.equal_3_object()(*p_inter, p2))) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Line_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Line_3_do_intersect.h index 41cf8b0d..48766135 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Line_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Line_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Line_3_do_intersect.h $ -// $Id: Line_3_Line_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Line_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Line_3_Line_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ namespace Intersections { namespace internal { template -bool +typename K::Boolean do_intersect(const typename K::Line_3& l1, const typename K::Line_3& l2, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Line_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Line_3_intersection.h index 76c8ef18..79d70f8d 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Line_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Line_3_intersection.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Line_3_intersection.h $ -// $Id: Line_3_Line_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Line_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Line_3_Line_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Plane_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Plane_3_do_intersect.h index 19cd1d21..5c60bb18 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Plane_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Plane_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Plane_3_do_intersect.h $ -// $Id: Line_3_Plane_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Plane_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Line_3_Plane_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,7 @@ namespace Intersections { namespace internal { template -bool +typename K::Boolean do_intersect(const typename K::Plane_3& plane, const typename K::Line_3& line, const K&) @@ -48,7 +48,7 @@ do_intersect(const typename K::Plane_3& plane, template inline -bool +typename K::Boolean do_intersect(const typename K::Line_3& line, const typename K::Plane_3& plane, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Plane_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Plane_3_intersection.h index d5d15440..7e022fab 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Plane_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Plane_3_intersection.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Plane_3_intersection.h $ -// $Id: Line_3_Plane_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Plane_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Line_3_Plane_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,7 +24,7 @@ namespace Intersections { namespace internal { template -boost::optional +std::optional intersection_point(const typename K::Plane_3& plane, const typename K::Line_3& line, const K& /*k*/) @@ -41,9 +41,9 @@ intersection_point(const typename K::Plane_3& plane, RT den = plane.a()*line_dir.dx() + plane.b()*line_dir.dy() + plane.c()*line_dir.dz(); if(den == 0) - return boost::none; + return std::nullopt; - return boost::make_optional(Point_3(den*line_pt.hx()-num*line_dir.dx(), + return std::make_optional(Point_3(den*line_pt.hx()-num*line_dir.dx(), den*line_pt.hy()-num*line_dir.dy(), den*line_pt.hz()-num*line_dir.dz(), wmult_hw((K*)0, den, line_pt))); diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Point_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Point_3_do_intersect.h index 2b55ce42..59a11459 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Point_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Point_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Point_3_do_intersect.h $ -// $Id: Line_3_Point_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Point_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Line_3_Point_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ namespace Intersections { namespace internal { template -inline bool +inline typename K::Boolean do_intersect(const typename K::Point_3& pt, const typename K::Line_3& line, const K& k) @@ -27,7 +27,7 @@ do_intersect(const typename K::Point_3& pt, } template -inline bool +inline typename K::Boolean do_intersect(const typename K::Line_3& line, const typename K::Point_3& pt, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Point_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Point_3_intersection.h index 2e0735c0..bb4cd8f1 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Point_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Point_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Point_3_intersection.h $ -// $Id: Line_3_Point_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Point_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Line_3_Point_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Ray_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Ray_3_do_intersect.h index bb790040..a2104d3d 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Ray_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Ray_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Ray_3_do_intersect.h $ -// $Id: Line_3_Ray_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Ray_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Line_3_Ray_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Line_3& l, const typename K::Ray_3& r, const K& k) @@ -47,7 +47,7 @@ do_intersect(const typename K::Line_3& l, template inline -bool +typename K::Boolean do_intersect(const typename K::Ray_3& r, const typename K::Line_3& l, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Ray_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Ray_3_intersection.h index 075f592c..d6b5b8cc 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Ray_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Ray_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Ray_3_intersection.h $ -// $Id: Line_3_Ray_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Ray_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Line_3_Ray_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Segment_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Segment_3_do_intersect.h index ae84bc04..c8736728 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Segment_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Segment_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Segment_3_do_intersect.h $ -// $Id: Line_3_Segment_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Segment_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Line_3_Segment_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,7 +24,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Line_3& l, const typename K::Segment_3& s, const K& k) @@ -52,7 +52,7 @@ do_intersect(const typename K::Line_3& l, template inline -bool +typename K::Boolean do_intersect(const typename K::Segment_3& s, const typename K::Line_3& l, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Segment_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Segment_3_intersection.h index 3cf8ab5c..c3de8bb2 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Segment_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Segment_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Segment_3_intersection.h $ -// $Id: Line_3_Segment_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Segment_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Line_3_Segment_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Sphere_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Sphere_3_do_intersect.h index 9b4ed30c..c145696a 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Sphere_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Sphere_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Sphere_3_do_intersect.h $ -// $Id: Line_3_Sphere_3_do_intersect.h 9f32bd1 2021-09-02T17:36:44+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Sphere_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Line_3_Sphere_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Tetrahedron_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Tetrahedron_3_do_intersect.h index 3719b905..7d55f60a 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Tetrahedron_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Tetrahedron_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Tetrahedron_3_do_intersect.h $ -// $Id: Line_3_Tetrahedron_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Tetrahedron_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Line_3_Tetrahedron_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Tetrahedron_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Tetrahedron_3_intersection.h index ec294a60..13ca2835 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Tetrahedron_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Tetrahedron_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Tetrahedron_3_intersection.h $ -// $Id: Line_3_Tetrahedron_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Tetrahedron_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Line_3_Tetrahedron_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_do_intersect.h index ee76b8b8..03b9b3ad 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_do_intersect.h $ -// $Id: Line_3_Triangle_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Line_3_Triangle_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,9 +21,10 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Triangle_3& t, - const typename K::Line_3& l, - const K& k) +typename K::Boolean +do_intersect(const typename K::Triangle_3& t, + const typename K::Line_3& l, + const K& k) { CGAL_kernel_precondition(!k.is_degenerate_3_object()(t)); CGAL_kernel_precondition(!k.is_degenerate_3_object()(l)); @@ -73,9 +74,10 @@ bool do_intersect(const typename K::Triangle_3& t, template inline -bool do_intersect(const typename K::Line_3& l, - const typename K::Triangle_3& t, - const K& k) +typename K::Boolean + do_intersect(const typename K::Line_3& l, + const typename K::Triangle_3& t, + const K& k) { return do_intersect(t, l, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_intersection.h index e68ec59b..b969f46c 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_intersection.h $ -// $Id: Line_3_Triangle_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Line_3_Triangle_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_do_intersect.h index 214d780a..4656ca1a 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_do_intersect.h $ -// $Id: Plane_3_Plane_3_Plane_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,7 @@ namespace Intersections { namespace internal { template -inline bool +inline typename K::Boolean do_intersect(const typename K::Plane_3& plane1, const typename K::Plane_3& plane2, const typename K::Plane_3& plane3, diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_intersection.h index 4b746baa..a344ae3b 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_intersection.h $ -// $Id: Plane_3_Plane_3_Plane_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include namespace CGAL { namespace Intersections { @@ -27,7 +27,7 @@ namespace internal { // triple plane intersection template -boost::optional +std::optional intersection_point(const typename K::Plane_3& plane1, const typename K::Plane_3& plane2, const typename K::Plane_3& plane3, @@ -56,7 +56,7 @@ intersection_point(const typename K::Plane_3& plane1, const FT den = minor_0*m22 - minor_1*m12 + minor_2*m02; // determinant of M if(is_zero(den)){ - return boost::none; + return std::nullopt; } const FT num3 = minor_0*b2 - minor_1*b1 + minor_2*b0; // determinant of M with M[x:2] swapped with [b0,b1,b2] @@ -70,24 +70,27 @@ intersection_point(const typename K::Plane_3& plane1, const FT num1 = - minor_3*m21 + minor_4*m11 - minor_5*m01; // determinant of M with M[x:0] swapped with [b0,b1,b2] const FT num2 = minor_3*m20 - minor_4*m10 + minor_5*m00; // determinant of M with M[x:1] swapped with [b0,b1,b2] - return boost::make_optional(typename K::Point_3(num1/den, num2/den, num3/den)); + return std::make_optional(typename K::Point_3(num1/den, num2/den, num3/den)); } template -boost::optional > +std::optional > intersection(const typename K::Plane_3& plane1, const typename K::Plane_3& plane2, const typename K::Plane_3& plane3, const K& k) { - typedef typename boost::optional > result_type; - typedef typename K::Point_3 Point_3; typedef typename K::Line_3 Line_3; typedef typename K::Plane_3 Plane_3; + auto res = intersection_point(plane1,plane2,plane3, k); + if (res) + return result_type(*res); + // Intersection between plane1 and plane2 can either be // a line, a plane, or empty. typename Intersection_traits::result_type @@ -97,26 +100,19 @@ intersection(const typename K::Plane_3& plane1, { if(const Line_3* l = intersect_get(o12)) { - // either point or line - typename Intersection_traits::result_type - v = internal::intersection(plane3, *l, k); - if(v) - { - if(const Point_3* p = intersect_get(v)) - return result_type(*p); - else if(const Line_3* l = intersect_get(v)) - return result_type(*l); - } + if (internal::do_intersect(*l, plane3, k)) + return result_type(*l); } - else if(const Plane_3 *pl = intersect_get(o12)) + else { + CGAL_assertion(intersect_get(o12) != nullptr); // either line or plane typename Intersection_traits::result_type - v = internal::intersection(plane3, *pl, k); + v = internal::intersection(plane3, plane1, k); if(v) { - if(const Plane_3* p = intersect_get(v)) - return result_type(*p); + if( intersect_get(v)!=nullptr) + return result_type(plane1); else if(const Line_3* l = intersect_get(v)) return result_type(*l); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_do_intersect.h index 66cd4ee9..b6258192 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_do_intersect.h $ -// $Id: Plane_3_Plane_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Plane_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ namespace Intersections { namespace internal { template -inline bool +inline typename K::Boolean do_intersect(const typename K::Plane_3& plane1, const typename K::Plane_3& plane2, const K&) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_intersection.h index 702b085b..97c2d7f5 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_intersection.h $ -// $Id: Plane_3_Plane_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Plane_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Point_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Point_3_do_intersect.h index 69c7ec81..4c70a801 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Point_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Point_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Point_3_do_intersect.h $ -// $Id: Plane_3_Point_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Point_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Point_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ namespace Intersections { namespace internal { template -inline bool +inline typename K::Boolean do_intersect(const typename K::Point_3& pt, const typename K::Plane_3& plane, const K& k) @@ -27,7 +27,7 @@ do_intersect(const typename K::Point_3& pt, } template -inline bool +inline typename K::Boolean do_intersect(const typename K::Plane_3& plane, const typename K::Point_3& pt, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Point_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Point_3_intersection.h index e8c1376c..d8b857d9 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Point_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Point_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Point_3_intersection.h $ -// $Id: Plane_3_Point_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Point_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Point_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_do_intersect.h index 19d7f57c..4bcb852e 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_do_intersect.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_do_intersect.h $ -// $Id: Plane_3_Ray_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Ray_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -25,7 +25,7 @@ namespace Intersections { namespace internal { template -bool +typename K::Boolean do_intersect(const typename K::Plane_3& plane, const typename K::Ray_3& ray, const K& k) @@ -40,7 +40,7 @@ do_intersect(const typename K::Plane_3& plane, template inline -bool +typename K::Boolean do_intersect(const typename K::Ray_3& ray, const typename K::Plane_3& plane, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_intersection.h index 1c4eba43..b68c0a7f 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_intersection.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_intersection.h $ -// $Id: Plane_3_Ray_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Ray_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_do_intersect.h index 94d6a264..d692ef0b 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_do_intersect.h $ -// $Id: Plane_3_Segment_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Segment_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ namespace Intersections { namespace internal { template -bool +typename K::Boolean do_intersect(const typename K::Plane_3& plane, const typename K::Segment_3& seg, const K&) @@ -41,7 +41,7 @@ do_intersect(const typename K::Plane_3& plane, template inline -bool +typename K::Boolean do_intersect(const typename K::Segment_3& seg, const typename K::Plane_3& plane, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_intersection.h index 100ecd6c..5288c77e 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_intersection.h $ -// $Id: Plane_3_Segment_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Segment_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_do_intersect.h index 0eedf77d..51cdaf93 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_do_intersect.h $ -// $Id: Plane_3_Sphere_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Plane_3& p, const typename K::Sphere_3& s, const K&) @@ -37,7 +37,7 @@ do_intersect(const typename K::Plane_3& p, template inline -bool +typename K::Boolean do_intersect(const typename K::Sphere_3& s, const typename K::Plane_3& p, const K&) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_intersection.h index 1dab7bb6..8301658a 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_intersection.h $ -// $Id: Plane_3_Sphere_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_do_intersect.h index a54aa616..f01042b7 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_do_intersect.h $ -// $Id: Plane_3_Tetrahedron_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_intersection.h index 54a387dd..469adbde 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_intersection.h $ -// $Id: Plane_3_Tetrahedron_3_intersection.h ba00534 2022-02-24T09:49:38+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Tetrahedron_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -164,7 +164,7 @@ intersection(const typename K::Tetrahedron_3& tet, } if (all_in || all_out) - return boost::none; + return std::nullopt; if (start_id == -1) return { result_type(corners[solo_id]) }; diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_do_intersect.h index dd1d152a..e2fb8cac 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_do_intersect.h $ -// $Id: Plane_3_Triangle_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,9 +21,10 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Triangle_3& t, - const typename K::Plane_3& h, - const K& k) +typename K::Boolean +do_intersect(const typename K::Triangle_3& t, + const typename K::Plane_3& h, + const K& k) { CGAL_kernel_precondition(!k.is_degenerate_3_object()(t)); CGAL_kernel_precondition(!k.is_degenerate_3_object()(h)); @@ -49,9 +50,10 @@ bool do_intersect(const typename K::Triangle_3& t, template inline -bool do_intersect(const typename K::Plane_3& h, - const typename K::Triangle_3& t, - const K& k) +typename K::Boolean +do_intersect(const typename K::Plane_3& h, + const typename K::Triangle_3& t, + const K& k) { return do_intersect(t, h, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_intersection.h index bf6d6683..845cf2a9 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_intersection.h $ -// $Id: Plane_3_Triangle_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,6 +18,7 @@ #include #include +#include namespace CGAL { namespace Intersections { @@ -141,7 +142,7 @@ intersection(const typename K::Plane_3& plane, CGAL_kernel_assertion(pts.size() == 2); return intersection_return( - k.construct_segment_3_object()(*pts.begin(), *boost::prior(pts.end()))); + k.construct_segment_3_object()(*pts.begin(), *std::prev(pts.end()))); } template diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Point_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Point_3_do_intersect.h index 801038d4..16c37367 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Point_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Point_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Point_3_do_intersect.h $ -// $Id: Point_3_Point_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Point_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Point_3_Point_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Point_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Point_3_intersection.h index 0c061dc4..244d17d2 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Point_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Point_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Point_3_intersection.h $ -// $Id: Point_3_Point_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Point_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Point_3_Point_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Ray_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Ray_3_do_intersect.h index ed010b0c..36326eba 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Ray_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Ray_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Ray_3_do_intersect.h $ -// $Id: Point_3_Ray_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Ray_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Point_3_Ray_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Point_3& pt, const typename K::Ray_3& ray, const K& k) @@ -29,7 +29,7 @@ do_intersect(const typename K::Point_3& pt, template inline -bool +typename K::Boolean do_intersect(const typename K::Ray_3& ray, const typename K::Point_3& pt, const K& k) @@ -39,7 +39,7 @@ do_intersect(const typename K::Ray_3& ray, template -bool +typename K::Boolean Ray_3_has_on_collinear_Point_3(const typename K::Ray_3& r, const typename K::Point_3& p, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Ray_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Ray_3_intersection.h index 978ad006..3ca46ea1 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Ray_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Ray_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Ray_3_intersection.h $ -// $Id: Point_3_Ray_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Ray_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Point_3_Ray_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Segment_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Segment_3_do_intersect.h index d2552117..0ccdf30c 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Segment_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Segment_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Segment_3_do_intersect.h $ -// $Id: Point_3_Segment_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Segment_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Point_3_Segment_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Point_3& pt, const typename K::Segment_3& seg, const K& k) @@ -29,7 +29,7 @@ do_intersect(const typename K::Point_3& pt, template inline -bool +typename K::Boolean do_intersect(const typename K::Segment_3& seg, const typename K::Point_3& pt, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Segment_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Segment_3_intersection.h index fec87cc4..d44c8daf 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Segment_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Segment_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Segment_3_intersection.h $ -// $Id: Point_3_Segment_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Segment_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Point_3_Segment_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_do_intersect.h index c450e391..6aa9572d 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_do_intersect.h $ -// $Id: Point_3_Sphere_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Point_3_Sphere_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Point_3& pt, const typename K::Sphere_3& sphere, const K& k) @@ -29,7 +29,7 @@ do_intersect(const typename K::Point_3& pt, template inline -bool +typename K::Boolean do_intersect(const typename K::Sphere_3& sphere, const typename K::Point_3& pt, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_intersection.h index 9d9f73fd..5a84f673 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_intersection.h $ -// $Id: Point_3_Sphere_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Point_3_Sphere_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_do_intersect.h index 943e9c25..5cc7ca4f 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_do_intersect.h $ -// $Id: Point_3_Tetrahedron_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Point_3& pt, const typename K::Tetrahedron_3& tetrahedron, const K& k) @@ -29,7 +29,7 @@ do_intersect(const typename K::Point_3& pt, template inline -bool +typename K::Boolean do_intersect(const typename K::Tetrahedron_3& tetrahedron, const typename K::Point_3& pt, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_intersection.h index 32b09421..83cd3ce3 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_intersection.h $ -// $Id: Point_3_Tetrahedron_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_do_intersect.h index d1eebf89..10caff59 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_do_intersect.h $ -// $Id: Point_3_Triangle_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Point_3_Triangle_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,9 +21,10 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Triangle_3& t, - const typename K::Point_3& p, - const K& k) +typename K::Boolean +do_intersect(const typename K::Triangle_3& t, + const typename K::Point_3& p, + const K& k) { CGAL_kernel_precondition(!k.is_degenerate_3_object()(t)); @@ -68,9 +69,10 @@ bool do_intersect(const typename K::Triangle_3& t, } template -bool do_intersect(const typename K::Point_3& p, - const typename K::Triangle_3& t, - const K& k) +typename K::Boolean +do_intersect(const typename K::Point_3& p, + const typename K::Triangle_3& t, + const K& k) { return do_intersect(t, p, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_intersection.h index 3d35f804..e9b8a427 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_intersection.h $ -// $Id: Point_3_Triangle_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Point_3_Triangle_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_do_intersect.h index beed21e4..0b7517c2 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_do_intersect.h $ -// $Id: Ray_3_Ray_3_do_intersect.h 3afa3b5 2021-06-29T09:25:40+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Ray_3_Ray_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,7 +24,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Ray_3& r1, const typename K::Ray_3& r2, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_intersection.h index a915ea54..6799b0a6 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_intersection.h $ -// $Id: Ray_3_Ray_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Ray_3_Ray_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_do_intersect.h index f92438b7..1e50e36d 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_do_intersect.h $ -// $Id: Ray_3_Segment_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Ray_3_Segment_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,7 +24,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Segment_3& s, const typename K::Ray_3& r, const K& k) @@ -56,7 +56,7 @@ do_intersect(const typename K::Segment_3& s, template inline -bool +typename K::Boolean do_intersect(const typename K::Ray_3& r, const typename K::Segment_3& s, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_intersection.h index 205d67a5..22dc4dae 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_intersection.h $ -// $Id: Ray_3_Segment_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Ray_3_Segment_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Sphere_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Sphere_3_do_intersect.h index 0987850c..d1ee0f70 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Sphere_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Sphere_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Sphere_3_do_intersect.h $ -// $Id: Ray_3_Sphere_3_do_intersect.h 9f32bd1 2021-09-02T17:36:44+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Sphere_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Ray_3_Sphere_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Tetrahedron_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Tetrahedron_3_do_intersect.h index ec84b3d3..5e1f67ac 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Tetrahedron_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Tetrahedron_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Tetrahedron_3_do_intersect.h $ -// $Id: Ray_3_Tetrahedron_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Tetrahedron_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Ray_3_Tetrahedron_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Tetrahedron_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Tetrahedron_3_intersection.h index e5f438a4..f1f604bc 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Tetrahedron_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Tetrahedron_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Tetrahedron_3_intersection.h $ -// $Id: Ray_3_Tetrahedron_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Tetrahedron_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Ray_3_Tetrahedron_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_do_intersect.h index 8b7d315c..288a160b 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_do_intersect.h $ -// $Id: Ray_3_Triangle_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -64,7 +64,7 @@ struct r3t3_do_intersect_endpoint_position_visitor void end_point_in_triangle(){ m_intersection_type = 4; } }; -//the template parameter Visitor here is used to offer the posibility to use +//the template parameter Visitor here is used to offer the possibility to use //r3t3_do_intersect_endpoint_position_visitor to track whether the endpoint of //the ray lies inside the plane of the triangle or not. It is used for example //in the function that checks whether a point is inside a polyhedron; if the ray @@ -328,18 +328,20 @@ do_intersect(const typename K::Triangle_3& t, } template -bool do_intersect(const typename K::Triangle_3& t, - const typename K::Ray_3& r, - const K& k) +typename K::Boolean +do_intersect(const typename K::Triangle_3& t, + const typename K::Ray_3& r, + const K& k) { return do_intersect(t, r, k, r3t3_do_intersect_empty_visitor()); } template inline -bool do_intersect(const typename K::Ray_3& r, - const typename K::Triangle_3& t, - const K& k) +typename K::Boolean +do_intersect(const typename K::Ray_3& r, + const typename K::Triangle_3& t, + const K& k) { return do_intersect(t, r, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_intersection.h index 9f2bf155..6f1b0d37 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_intersection.h $ -// $Id: Ray_3_Triangle_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -90,13 +90,13 @@ t3r3_intersection_coplanar_aux(const typename K::Point_3& a, const Point_3& p = point_on(r,0); - // A ray is not symetric, 2 cases depending on isolated side of c + // A ray is not symmetric, 2 cases depending on isolated side of c Orientation cap = negative_side ? coplanar_orientation(c,a,p) : coplanar_orientation(b,c,p); switch ( cap ) { case NEGATIVE: - // p is bellow [c,a] + // p is below [c,a] return intersection_return(); case COLLINEAR: @@ -111,7 +111,7 @@ t3r3_intersection_coplanar_aux(const typename K::Point_3& a, Point_3 p_side_end_point(p); Point_3 q_side_end_point; - // A ray is not symetric, 2 cases depending on isolated side of c + // A ray is not symmetric, 2 cases depending on isolated side of c if ( negative_side ) { if ( NEGATIVE == coplanar_orientation(b,c,p) ) @@ -396,7 +396,7 @@ intersection_coplanar(const typename K::Triangle_3& t, template inline -typename boost::optional +typename std::optional t3r3_intersection_aux(const typename K::Triangle_3& t, const typename K::Ray_3& r, const K& k) @@ -410,7 +410,7 @@ t3r3_intersection_aux(const typename K::Triangle_3& t, return *p; } - return boost::optional(); + return std::optional(); } template @@ -455,7 +455,7 @@ intersection(const typename K::Triangle_3& t, if ( orientation(p,q,a,b) != POSITIVE && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE ) { - boost::optional op = t3r3_intersection_aux(t,r,k); + std::optional op = t3r3_intersection_aux(t,r,k); if(op) return intersection_return(*op); else return intersection_return(); } @@ -476,7 +476,7 @@ intersection(const typename K::Triangle_3& t, if ( orientation(q,p,a,b) != POSITIVE && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE ) { - boost::optional op = t3r3_intersection_aux(t,r,k); + std::optional op = t3r3_intersection_aux(t,r,k); if(op) return intersection_return(*op); else return intersection_return(); } @@ -502,7 +502,7 @@ intersection(const typename K::Triangle_3& t, && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE ) { - boost::optional op = t3r3_intersection_aux(t,r,k); + std::optional op = t3r3_intersection_aux(t,r,k); if(op) return intersection_return(*op); else return intersection_return(); } @@ -515,7 +515,7 @@ intersection(const typename K::Triangle_3& t, && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE ) { - boost::optional op = t3r3_intersection_aux(t,r,k); + std::optional op = t3r3_intersection_aux(t,r,k); if(op) return intersection_return(*op); else return intersection_return(); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_do_intersect.h index d6aaf3a8..1a2feeb1 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_do_intersect.h $ -// $Id: Segment_3_Segment_3_do_intersect.h 45c5ef7 2022-06-04T13:17:02+09:00 Brian Spilsbury +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Segment_3_Segment_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Segment_3& s1, const typename K::Segment_3& s2, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_intersection.h index 2fb938c8..1c3c286f 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_intersection.h $ -// $Id: Segment_3_Segment_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Segment_3_Segment_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -76,8 +76,6 @@ intersection_collinear_segments(const typename K::Segment_3& s1, template struct L_p_visitor - : public boost::static_visitor< - typename Intersection_traits::result_type> { typedef typename Intersection_traits::result_type result_type; @@ -117,7 +115,7 @@ intersection(const typename K::Segment_3& s1, v = internal::intersection(s1.supporting_line(), s2.supporting_line(), k); if(v) - return apply_visitor(L_p_visitor(s1, s2) , *v); + return std::visit(L_p_visitor(s1, s2) , *v); return intersection_return(); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Sphere_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Sphere_3_do_intersect.h index 5264bc43..888ca105 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Sphere_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Sphere_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Sphere_3_do_intersect.h $ -// $Id: Segment_3_Sphere_3_do_intersect.h 9f32bd1 2021-09-02T17:36:44+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Sphere_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Segment_3_Sphere_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Tetrahedron_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Tetrahedron_3_do_intersect.h index 9c104e9a..57fa07d5 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Tetrahedron_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Tetrahedron_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Tetrahedron_3_do_intersect.h $ -// $Id: Segment_3_Tetrahedron_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Tetrahedron_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Segment_3_Tetrahedron_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Tetrahedron_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Tetrahedron_3_intersection.h index 3fb9c569..96ed30bb 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Tetrahedron_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Tetrahedron_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Tetrahedron_3_intersection.h $ -// $Id: Segment_3_Tetrahedron_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Tetrahedron_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Segment_3_Tetrahedron_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_do_intersect.h index ec696f26..76402429 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_do_intersect.h $ -// $Id: Segment_3_Triangle_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -25,7 +25,8 @@ bool do_intersect_coplanar(const typename K::Point_3& A, const typename K::Point_3& B, const typename K::Point_3& C, const typename K::Point_3& p, - const typename K::Point_3& q, const K& k) + const typename K::Point_3& q, + const K& k) { typedef typename K::Point_3 Point_3; @@ -173,9 +174,10 @@ bool do_intersect_coplanar(const typename K::Triangle_3& t, } template -bool do_intersect(const typename K::Triangle_3& t, - const typename K::Segment_3& s, - const K& k) +typename K::Boolean +do_intersect(const typename K::Triangle_3& t, + const typename K::Segment_3& s, + const K& k) { CGAL_kernel_precondition(!k.is_degenerate_3_object()(t) ); CGAL_kernel_precondition(!k.is_degenerate_3_object()(s) ); @@ -269,9 +271,10 @@ bool do_intersect(const typename K::Triangle_3& t, template inline -bool do_intersect(const typename K::Segment_3& s, - const typename K::Triangle_3& t, - const K& k) +typename K::Boolean +do_intersect(const typename K::Segment_3& s, + const typename K::Triangle_3& t, + const K& k) { return do_intersect(t, s, k); } diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_intersection.h index 4adfcdff..76d0d1df 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_intersection.h $ -// $Id: Segment_3_Triangle_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_do_intersect.h index 738ed5bf..8dd10dae 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_do_intersect.h $ -// $Id: Sphere_3_Sphere_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Sphere_3& s1, const typename K::Sphere_3& s2, const K& k) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_intersection.h index 3cfe85a0..307f5a46 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_intersection.h $ -// $Id: Sphere_3_Sphere_3_intersection.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Tetrahedron_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Tetrahedron_3_do_intersect.h index 77f1d396..89271b49 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Tetrahedron_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Tetrahedron_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Sphere_3_Tetrahedron_3_do_intersect.h $ -// $Id: Sphere_3_Tetrahedron_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Sphere_3_Tetrahedron_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Sphere_3_Tetrahedron_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Triangle_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Triangle_3_do_intersect.h index d987b56f..687a7405 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Triangle_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Sphere_3_Triangle_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Sphere_3_Triangle_3_do_intersect.h $ -// $Id: Sphere_3_Triangle_3_do_intersect.h 9f32bd1 2021-09-02T17:36:44+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Sphere_3_Triangle_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Sphere_3_Triangle_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h index db765b9a..baebf324 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h $ -// $Id: Tetrahedron_3_Bounded_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Tetrahedron_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Tetrahedron_3_do_intersect.h index 6c5a1656..42645d75 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Tetrahedron_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Tetrahedron_3_do_intersect.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Tetrahedron_3_do_intersect.h $ -// $Id: Tetrahedron_3_Tetrahedron_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Tetrahedron_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Tetrahedron_3_Tetrahedron_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_do_intersect.h index d0dbcb06..5564748a 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_do_intersect.h $ -// $Id: Tetrahedron_3_Triangle_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_intersection.h index 551716f7..c9e4cc21 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_intersection.h $ -// $Id: Tetrahedron_3_Triangle_3_intersection.h d896940 2022-09-07T16:08:58+02:00 Sebastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -148,7 +148,7 @@ intersection(const typename K::Tetrahedron_3& tet, supporting_planes.swap(current_sp); if (res.empty()) - return boost::none; + return std::nullopt; } switch(res.size()) diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Unbounded_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Unbounded_3_do_intersect.h index b7747909..a189c0f0 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Unbounded_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Tetrahedron_3_Unbounded_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Unbounded_3_do_intersect.h $ -// $Id: Tetrahedron_3_Unbounded_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Tetrahedron_3_Unbounded_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Tetrahedron_3_Unbounded_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_do_intersect.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_do_intersect.h index 962c616f..ed4f0d6d 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_do_intersect.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_do_intersect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_do_intersect.h $ -// $Id: Triangle_3_Triangle_3_do_intersect.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_do_intersect.h $ +// $Id: include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_do_intersect.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,13 +22,14 @@ namespace Intersections { namespace internal { template -bool _intersection_test_vertex(const typename K::Point_3* p, - const typename K::Point_3* q, - const typename K::Point_3* r, - const typename K::Point_3* a, - const typename K::Point_3* b, - const typename K::Point_3* c, - const K& k) +typename K::Boolean +_intersection_test_vertex(const typename K::Point_3* p, + const typename K::Point_3* q, + const typename K::Point_3* r, + const typename K::Point_3* a, + const typename K::Point_3* b, + const typename K::Point_3* c, + const K& k) { CGAL_kernel_precondition(k.coplanar_orientation_3_object()(*p,*q,*r) == POSITIVE); CGAL_kernel_precondition(k.coplanar_orientation_3_object()(*a,*b,*c) == POSITIVE); @@ -64,13 +65,14 @@ bool _intersection_test_vertex(const typename K::Point_3* p, } template -bool _intersection_test_edge(const typename K::Point_3* p, - const typename K::Point_3* q, - const typename K::Point_3* r, - const typename K::Point_3* a, - const typename K::Point_3* CGAL_kernel_precondition_code(b), - const typename K::Point_3* c, - const K& k) +typename K::Boolean +_intersection_test_edge(const typename K::Point_3* p, + const typename K::Point_3* q, + const typename K::Point_3* r, + const typename K::Point_3* a, + const typename K::Point_3* CGAL_kernel_precondition_code(b), + const typename K::Point_3* c, + const K& k) { CGAL_kernel_precondition(k.coplanar_orientation_3_object() (*p,*q,*r) == POSITIVE); CGAL_kernel_precondition(k.coplanar_orientation_3_object() (*a,*b,*c) == POSITIVE); @@ -97,9 +99,10 @@ bool _intersection_test_edge(const typename K::Point_3* p, } template -bool do_intersect_coplanar(const typename K::Triangle_3& t1, - const typename K::Triangle_3& t2, - const K& k) +typename K::Boolean +do_intersect_coplanar(const typename K::Triangle_3& t1, + const typename K::Triangle_3& t2, + const K& k) { typedef typename K::Point_3 Point_3; diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h index bd52a0c2..675b5a83 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h $ -// $Id: Triangle_3_Triangle_3_intersection.h c17c14f 2023-01-24T10:55:29+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h $ +// $Id: include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,6 +14,8 @@ #ifndef CGAL_INTERNAL_INTERSECTIONS_TRIANGLE_3_TRIANGLE_3_INTERSECTION_H #define CGAL_INTERNAL_INTERSECTIONS_TRIANGLE_3_TRIANGLE_3_INTERSECTION_H +//#define CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + #include #include #include @@ -22,6 +24,7 @@ #include #include +#include #include #include @@ -32,53 +35,338 @@ namespace Intersections { namespace internal{ template -void intersection_coplanar_triangles_cutoff(const typename Kernel::Point_3& p, - const typename Kernel::Point_3& q, - const typename Kernel::Point_3& r, +struct Point_on_triangle +{ + // triangle points are not stored in this class but are expected + // to always be passed in the same order. For a triangle pqr, + // edge 0 is pq, edge 1 qr and edge 2 rp. Point 0 is p, 1 is q and 2 is r. + // + // (id, -1) point on t1 + // (-1, id) point on t2 + // (id1, id2) intersection of edges + std::pair t1_t2_ids; + boost::container::flat_set extra_t1; // store other ids of edges containing the point + typename Kernel::FT alpha; // + +////// + + static + inline + const typename Kernel::Point_3& + point_from_id(const typename Kernel::Point_3& p, + const typename Kernel::Point_3& q, + const typename Kernel::Point_3& r, + int id) + { + switch(id) + { + case 0: + return p; + case 1: + return q; + default: + return r; + } + } + + Point_on_triangle(int i1, int i2=-1, typename Kernel::FT alpha = 0.) // TODO add global zero()? + : t1_t2_ids(i1,i2) + , alpha(alpha) + {} + + // orientation of the current point wrt to edge id1 (p1q1) + Orientation + orientation (const typename Kernel::Point_3& p1, // source of edge edge_id1 + const typename Kernel::Point_3& q1, // target of edge edge_id1 + const typename Kernel::Point_3& r1, + int edge_id1, + const typename Kernel::Point_3& p2, + const typename Kernel::Point_3& q2, + const typename Kernel::Point_3& r2, + const Kernel& k) const + { + if (t1_t2_ids.first!=-1) + { + if (t1_t2_ids.second==-1) + return (edge_id1==t1_t2_ids.first || (edge_id1+1)%3==t1_t2_ids.first) ? ZERO:POSITIVE; // it is a point on t1 + // this is an intersection point + + if (t1_t2_ids.first==edge_id1) + return ZERO; + if (t1_t2_ids.first==(edge_id1+1)%3) + { + if (alpha==0) return ZERO; + return alpha>=0 ? POSITIVE:NEGATIVE; + } + CGAL_assertion((t1_t2_ids.first+1)%3==edge_id1); + if (alpha==1) return ZERO; + return alpha<=1?POSITIVE:NEGATIVE; + } + else + { + //this is an input point of t2 + typename Kernel::Coplanar_orientation_3 orient = k.coplanar_orientation_3_object(); + const typename Kernel::Point_3& query = point_from_id(p2,q2,r2,t1_t2_ids.second); + return orient(p1,q1,r1,query); + } + } + + int id1() const { return t1_t2_ids.first; } + int id2() const { return t1_t2_ids.second; } + + // construct the intersection point from the info stored + typename Kernel::Point_3 + point(const typename Kernel::Point_3& p1, + const typename Kernel::Point_3& q1, + const typename Kernel::Point_3& r1, + const typename Kernel::Point_3& p2, + const typename Kernel::Point_3& q2, + const typename Kernel::Point_3& r2, + const Kernel& k) const + { + if (t1_t2_ids.first==-1) + return point_from_id(p2,q2,r2,t1_t2_ids.second); + if (t1_t2_ids.second==-1) + return point_from_id(p1,q1,r1,t1_t2_ids.first); + + return k.construct_barycenter_3_object()(point_from_id(p1,q1,r1,(t1_t2_ids.first+1)%3), alpha, point_from_id(p1,q1,r1,t1_t2_ids.first)) ; + } +}; + +// the intersection of two triangles is computed by interatively intersection t2 +// with halfspaces defined by edges of t1. The following function is called +// for each each on t1 on edge of the current intersection. +// pq is such an edge and p1q1 from t1 defines the halfspace intersection +// we are currently interseted in. We return the intersection point of +// pq with p1q1 +template +Point_on_triangle +intersection(const Point_on_triangle& p, + const Point_on_triangle& q, + int edge_id_t1, + const typename Kernel::Point_3& p1, + const typename Kernel::Point_3& q1, +// const typename Kernel::Point_3& r1, + const typename Kernel::Point_3& p2, + const typename Kernel::Point_3& q2, + const typename Kernel::Point_3& r2, + const Kernel& k) +{ +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " calling intersection: "; + std::cout << " (" << p.id1() << "," << p.id2() << ",[" << p.alpha << "]) -"; + std::cout << " (" << q.id1() << "," << q.id2() << ",[" << q.alpha << "]) || e" << edge_id_t1; +#endif + typename Kernel::Compute_alpha_for_coplanar_triangle_intersection_3 compute_alpha + = k.compute_alpha_for_coplanar_triangle_intersection_3_object(); + typedef Point_on_triangle Pot; + switch(p.id1()) + { + case -1: + { + switch(q.id1()) + { + case -1: // A: (-1, ip2) - (-1, iq2) + { + CGAL_assertion((p.id2()+1)%3 == q.id2() || (q.id2()+1)%3 == p.id2()); +// CGAL_assertion(p.extra_t1.empty() && q.extra_t1.empty()); // TMP to see if it's worth implementing special case +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 1\n"; +#endif + typename Kernel::FT alpha = compute_alpha(p1, q1, + Pot::point_from_id(p2, q2, r2, p.id2()), + Pot::point_from_id(p2, q2, r2, q.id2())); + int id2 = (p.id2()+1)%3 == q.id2() ? p.id2() : q.id2(); + return Point_on_triangle(edge_id_t1, id2, alpha); // intersection with an original edge of t2 + } + default: + if (q.id2()!=-1) // B: (-1, ip2) - (iq1, iq2) + { + if (p.id2() == q.id2() || p.id2() == (q.id2()+1)%3) + { +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 2\n"; +#endif + // points are on the same edge of t2 --> we shorten an already cut edge + typename Kernel::FT alpha = compute_alpha(p1, q1, + Pot::point_from_id(p2, q2, r2, q.id2()), + Pot::point_from_id(p2, q2, r2, (q.id2()+1)%3)); + + return Point_on_triangle(edge_id_t1, q.id2(), alpha); + } +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 3\n"; +#endif + // point of t1: look for an edge of t1 containing both points + CGAL_assertion( p.extra_t1.count(q.id1())!=0 || p.extra_t1.count(3-q.id1()-edge_id_t1)!=0 ); + int eid1 = p.extra_t1.count(q.id1())!=0 ? q.id1() : 3-q.id1()-edge_id_t1; + return Point_on_triangle((eid1+1)%3==edge_id_t1?edge_id_t1:(edge_id_t1+1)%3, -1); // vertex of t1 + } + // C: (-1, ip2) - (iq1, -1) + //vertex of t1, special case t1 edge passed thru a vertex of t2 + CGAL_assertion(edge_id_t1 == 2); +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 4\n"; +#endif + CGAL_assertion(q.id1()==1); + CGAL_assertion(!p.extra_t1.empty()); + return Point_on_triangle(p.extra_t1.count(0)==1?0:2,-1); + } + } + default: + { + switch(p.id2()) + { + case -1: + { + switch(q.id1()) + { + case -1: // G: (ip1, -1) - (-1, iq2) + //vertex of t1, special case t1 edge passed thru a vertex of t2 +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 5\n"; +#endif + CGAL_assertion(edge_id_t1 == 2); + CGAL_assertion(p.id1()==1); + CGAL_assertion(!q.extra_t1.empty()); + return Point_on_triangle(q.extra_t1.count(0)==1?0:2,-1); + default: + { +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 6\n"; +#endif + CGAL_assertion(q.id2()!=-1); // I: (ip1, -1) - (iq2, -1) + //H: (ip1,-1), (iq1, iq2) + CGAL_assertion(edge_id_t1==2); + // p and q are on the same edge of t1 + CGAL_assertion(p.id1()==q.id1() || p.id1()==(q.id1()+1)%3); + return Point_on_triangle((q.id1()+1)%3==edge_id_t1?edge_id_t1:(edge_id_t1+1)%3 , -1); + } + } + } + default: + { + switch(q.id1()) + { + case -1: // D: (ip1, ip2) - (-1, iq2) + { + if (q.id2() == p.id2() || q.id2() == (p.id2()+1)%3) + { +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 7\n"; +#endif + // points are on the same edge of t2 --> we shorten an already cut edge + typename Kernel::FT alpha = compute_alpha(p1, q1, + Pot::point_from_id(p2, q2, r2, p.id2()), + Pot::point_from_id(p2, q2, r2, (p.id2()+1)%3)); + + return Point_on_triangle(edge_id_t1, p.id2(), alpha); + } +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 8\n"; +#endif + // point of t1 + //std::cout << "q.extra_t1: "; for(int qet1 : q.extra_t1) std::cout << " " << qet1; std::cout << "\n"; + CGAL_assertion( q.extra_t1.count(p.id1())!=0 || q.extra_t1.count(3-p.id1()-edge_id_t1)!=0 ); + int eid1 = q.extra_t1.count(p.id1())!=0 ? p.id1() : 3-p.id1()-edge_id_t1; + return Point_on_triangle((eid1+1)%3==edge_id_t1?edge_id_t1:(edge_id_t1+1)%3, -1); // vertex of t1 + } + default: + { + switch(q.id2()) + { + case -1: // F: (ip1, ip2) - (iq1, -1) + { + // p and q are on the same edge of t1 + CGAL_assertion(q.id1()==p.id1() || q.id1()==(p.id1()+1)%3); +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 9\n"; +#endif + return Point_on_triangle((p.id1()+1)%3==edge_id_t1?edge_id_t1:(edge_id_t1+1)%3 , -1); + } + default: // E: (ip1, ip2) - (iq1, iq2) + { + if (p.id2()==q.id2()) + { +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " -- case 10\n"; +#endif + typename Kernel::FT alpha = compute_alpha(p1, q1, + Pot::point_from_id(p2, q2, r2, q.id2()), + Pot::point_from_id(p2, q2, r2, (q.id2()+1)%3)); + return Point_on_triangle(edge_id_t1, q.id2(), alpha); + } + // we are intersecting an edge of t1 + CGAL_assertion(p.id1()==q.id1() || edge_id_t1==2); + int eid1 = p.id1()==q.id1() ? p.id1() : 1; + return Point_on_triangle((eid1+1)%3==edge_id_t1?edge_id_t1:(edge_id_t1+1)%3, -1); // vertex of t1 + } + } + } + } + } + } + } + } +} + +template +void intersection_coplanar_triangles_cutoff(const typename Kernel::Point_3& p1, + const typename Kernel::Point_3& q1, + const typename Kernel::Point_3& r1, + int edge_id, + const typename Kernel::Point_3& p2, + const typename Kernel::Point_3& q2, + const typename Kernel::Point_3& r2, const Kernel& k, - std::list& inter_pts) + std::list>& inter_pts) { - typedef typename std::list::iterator Iterator; +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " cutoff using e" << edge_id << ": " + << to_double(p1.x()) << " " << to_double(p1.y()) << " " << to_double(p1.z()) << " " + << to_double(q1.x()) << " " << to_double(q1.y()) << " " << to_double(q1.z()) << "\n"; +#endif + typedef typename std::list>::iterator Iterator; if(inter_pts.empty()) return; - typename Kernel::Coplanar_orientation_3 orient = k.coplanar_orientation_3_object(); - typename Kernel::Construct_line_3 line = k.construct_line_3_object(); + //orient(p1,q1,r1,r1) is POSITIVE + std::map*,Orientation> orientations; // TODO skip map + for (Point_on_triangle& pot : inter_pts) + { + orientations[ &pot ]=pot.orientation(p1,q1,r1,edge_id,p2,q2,r2,k); + if (pot.id1()==-1 && orientations[ &pot ]==COLLINEAR) + pot.extra_t1.insert(edge_id); + } - //orient(p,q,r,r) is POSITIVE - std::map orientations; - for (Iterator it=inter_pts.begin();it!=inter_pts.end();++it) - orientations[ &(*it) ]=orient(p,q,r,*it); +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " Orientations:"; + for (const Point_on_triangle& pot : inter_pts) + std::cout << " " << orientations[ &pot ]; + std::cout << "\n"; +#endif + CGAL_kernel_assertion_code(int pt_added = 0); - CGAL_kernel_assertion_code(int pt_added = 0;) + Iterator prev = std::prev(inter_pts.end()); - const typename Kernel::Point_3* prev = &(*boost::prior(inter_pts.end())); - Iterator stop = inter_pts.size() > 2 ? inter_pts.end() : boost::prior(inter_pts.end()); + Iterator stop = inter_pts.size() > 2 ? inter_pts.end() : std::prev(inter_pts.end()); for(Iterator it=inter_pts.begin(); it!=stop; ++it) { - const typename Kernel::Point_3& curr = *it; - Orientation or_prev = orientations[prev], - or_curr = orientations[&curr]; + Orientation or_prev = orientations[&(*prev)], + or_curr = orientations[&(*it)]; if((or_prev == POSITIVE && or_curr == NEGATIVE) || (or_prev == NEGATIVE && or_curr == POSITIVE)) { - typename Intersection_traits::result_type - obj = intersection(line(p,q), line(*prev,curr), k); - - // assert "not empty" - CGAL_kernel_assertion(bool(obj)); - - const typename Kernel::Point_3* inter = intersect_get(obj); - CGAL_kernel_assertion(inter != nullptr); + Point_on_triangle new_pt = intersection(*prev, *it, edge_id, p1, q1, p2, q2, r2, k); - prev = &(*inter_pts.insert(it,*inter)); - orientations[prev] = COLLINEAR; - CGAL_kernel_assertion_code(++pt_added;) + prev = inter_pts.insert(it,new_pt); + orientations[&(*prev)] = COLLINEAR; + CGAL_kernel_assertion_code(++pt_added); } - prev = &(*it); + prev = it; } CGAL_kernel_assertion(pt_added<3); @@ -98,35 +386,77 @@ intersection_coplanar_triangles(const typename K::Triangle_3& t1, const typename K::Triangle_3& t2, const K& k) { - const typename K::Point_3& p = t1.vertex(0), - q = t1.vertex(1), - r = t1.vertex(2); - - std::list inter_pts; - inter_pts.push_back(t2.vertex(0)); - inter_pts.push_back(t2.vertex(1)); - inter_pts.push_back(t2.vertex(2)); - +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + auto to_string = [](const typename K::Triangle_3& t) + { + std::stringstream sstr; + sstr << "4 " + << to_double(t[0].x()) << " " << to_double(t[0].y()) << " " << to_double(t[0].z()) << " " + << to_double(t[1].x()) << " " << to_double(t[1].y()) << " " << to_double(t[1].z()) << " " + << to_double(t[2].x()) << " " << to_double(t[2].y()) << " " << to_double(t[2].z()) << " " + << to_double(t[0].x()) << " " << to_double(t[0].y()) << " " << to_double(t[0].z()) << "\n"; + return sstr.str(); + }; + + std::cout << "intersection_coplanar_triangles\n"; + std::ofstream("/tmp/t1.polylines.txt") << std::setprecision(17) << to_string(t1) << "\n"; + std::ofstream("/tmp/t2.polylines.txt") << std::setprecision(17) << to_string(t2) << "\n"; +#endif + const typename K::Point_3& p1 = t1.vertex(0), + q1 = t1.vertex(1), + r1 = t1.vertex(2); + + const typename K::Point_3& p2 = t2.vertex(0), + q2 = t2.vertex(1), + r2 = t2.vertex(2); + + std::list> inter_pts; + inter_pts.push_back(Point_on_triangle(-1,0)); + inter_pts.push_back(Point_on_triangle(-1,1)); + inter_pts.push_back(Point_on_triangle(-1,2)); + +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + auto print_points = [&]() + { + for(auto p : inter_pts) std::cout << " (" << p.id1() << "," << p.id2() << ",[" << p.alpha << "]) "; std::cout <<"\n"; + }; + std::cout << " ipts size: " << inter_pts.size() << "\n"; + print_points(); +#endif //intersect t2 with the three half planes which intersection defines t1 - intersection_coplanar_triangles_cutoff(p,q,r,k,inter_pts); //line pq - intersection_coplanar_triangles_cutoff(q,r,p,k,inter_pts); //line qr - intersection_coplanar_triangles_cutoff(r,p,q,k,inter_pts); //line rp - + intersection_coplanar_triangles_cutoff(p1,q1,r1,0,p2,q2,r2,k,inter_pts); //line pq +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " ipts size: " << inter_pts.size() << "\n"; + print_points(); +#endif + intersection_coplanar_triangles_cutoff(q1,r1,p1,1,p2,q2,r2,k,inter_pts); //line qr +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " ipts size: " << inter_pts.size() << "\n"; + print_points(); +#endif + intersection_coplanar_triangles_cutoff(r1,p1,q1,2,p2,q2,r2,k,inter_pts); //line rp +#ifdef CGAL_DEBUG_COPLANAR_T3_T3_INTERSECTION + std::cout << " ipts size: " << inter_pts.size() << "\n"; + print_points(); +#endif + + auto point = [&](const Point_on_triangle& pot){ return pot.point(p1,q1,r1,p2,q2,r2,k); }; switch(inter_pts.size()) { case 0: return intersection_return(); case 1: - return intersection_return(*inter_pts.begin()); + return intersection_return(point(*inter_pts.begin())); case 2: return intersection_return( - k.construct_segment_3_object()(*inter_pts.begin(), *boost::next(inter_pts.begin())) ); + k.construct_segment_3_object()(point(*inter_pts.begin()), point(*std::next(inter_pts.begin()))) ); case 3: return intersection_return( - k.construct_triangle_3_object()(*inter_pts.begin(), *boost::next(inter_pts.begin()), *boost::prior(inter_pts.end())) ); + k.construct_triangle_3_object()(point(*inter_pts.begin()), point(*std::next(inter_pts.begin())), point(*std::prev(inter_pts.end()))) ); default: return intersection_return( - std::vector(inter_pts.begin(),inter_pts.end())); + std::vector(boost::make_transform_iterator(inter_pts.begin(), point), + boost::make_transform_iterator(inter_pts.end(), point))); } } @@ -209,7 +539,7 @@ intersection(const typename K::Triangle_3& t1, return intersection_return(); } - return boost::apply_visitor(Triangle_Line_visitor(), *inter1, *inter2); + return std::visit(Triangle_Line_visitor(), *inter1, *inter2); } return intersection_return(); diff --git a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/tetrahedron_lines_intersections_3.h b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/tetrahedron_lines_intersections_3.h index 6ea7c4bc..cdb17ea3 100644 --- a/thirdparty/CGAL/include/CGAL/Intersections_3/internal/tetrahedron_lines_intersections_3.h +++ b/thirdparty/CGAL/include/CGAL/Intersections_3/internal/tetrahedron_lines_intersections_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/Intersections_3/internal/tetrahedron_lines_intersections_3.h $ -// $Id: tetrahedron_lines_intersections_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/Intersections_3/internal/tetrahedron_lines_intersections_3.h $ +// $Id: include/CGAL/Intersections_3/internal/tetrahedron_lines_intersections_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -68,7 +68,7 @@ struct Tetrahedron_lines_intersection_3_base if(do_intersect(o, triangle)) { tr_seg[i] = typename K::Intersect_3()(o, triangle); - if(boost::get(&*tr_seg[i]) != nullptr) + if(std::get_if(&*tr_seg[i]) != nullptr) { res_id = i; break; @@ -91,7 +91,7 @@ struct Tetrahedron_lines_intersection_3_base { if(tr_seg[i]) { - if(const typename K::Point_3* p = boost::get(&*tr_seg[i])) + if(const typename K::Point_3* p = std::get_if(&*tr_seg[i])) { if(res_points.empty()) { diff --git a/thirdparty/CGAL/include/CGAL/Interval_arithmetic.h b/thirdparty/CGAL/include/CGAL/Interval_arithmetic.h index 6303e26d..cadc565f 100644 --- a/thirdparty/CGAL/include/CGAL/Interval_arithmetic.h +++ b/thirdparty/CGAL/include/CGAL/Interval_arithmetic.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Interval_arithmetic.h $ -// $Id: Interval_arithmetic.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Interval_arithmetic.h $ +// $Id: include/CGAL/Interval_arithmetic.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Interval_arithmetic_impl.h b/thirdparty/CGAL/include/CGAL/Interval_arithmetic_impl.h index 5a9f008a..7f9de465 100644 --- a/thirdparty/CGAL/include/CGAL/Interval_arithmetic_impl.h +++ b/thirdparty/CGAL/include/CGAL/Interval_arithmetic_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Interval_arithmetic_impl.h $ -// $Id: Interval_arithmetic_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Interval_arithmetic_impl.h $ +// $Id: include/CGAL/Interval_arithmetic_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Interval_nt.h b/thirdparty/CGAL/include/CGAL/Interval_nt.h index e4d10341..60cccdf1 100644 --- a/thirdparty/CGAL/include/CGAL/Interval_nt.h +++ b/thirdparty/CGAL/include/CGAL/Interval_nt.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Interval_nt.h $ -// $Id: Interval_nt.h 6486844 2022-05-10T11:30:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Interval_nt.h $ +// $Id: include/CGAL/Interval_nt.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -1463,6 +1463,7 @@ class Interval_traits< Interval_nt > typedef double Bound; typedef CGAL::Tag_false With_empty_interval; typedef CGAL::Tag_true Is_interval; + static constexpr bool is_interval_v = true; struct Construct :public CGAL::cpp98::binary_function{ Interval operator()( const Bound& l,const Bound& r) const { diff --git a/thirdparty/CGAL/include/CGAL/Interval_skip_list.h b/thirdparty/CGAL/include/CGAL/Interval_skip_list.h index 2b88a8fd..6ada5d16 100644 --- a/thirdparty/CGAL/include/CGAL/Interval_skip_list.h +++ b/thirdparty/CGAL/include/CGAL/Interval_skip_list.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interval_skip_list/include/CGAL/Interval_skip_list.h $ -// $Id: Interval_skip_list.h d1a323c 2020-03-26T19:24:14+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interval_skip_list/include/CGAL/Interval_skip_list.h $ +// $Id: include/CGAL/Interval_skip_list.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Interval_skip_list_interval.h b/thirdparty/CGAL/include/CGAL/Interval_skip_list_interval.h index 062a8202..49aae5c8 100644 --- a/thirdparty/CGAL/include/CGAL/Interval_skip_list_interval.h +++ b/thirdparty/CGAL/include/CGAL/Interval_skip_list_interval.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interval_skip_list/include/CGAL/Interval_skip_list_interval.h $ -// $Id: Interval_skip_list_interval.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interval_skip_list/include/CGAL/Interval_skip_list_interval.h $ +// $Id: include/CGAL/Interval_skip_list_interval.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Interval_traits.h b/thirdparty/CGAL/include/CGAL/Interval_traits.h index 3211dbd1..cb7f2af7 100644 --- a/thirdparty/CGAL/include/CGAL/Interval_traits.h +++ b/thirdparty/CGAL/include/CGAL/Interval_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interval_support/include/CGAL/Interval_traits.h $ -// $Id: Interval_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interval_support/include/CGAL/Interval_traits.h $ +// $Id: include/CGAL/Interval_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -45,8 +45,8 @@ #include #include -#include -#include + +#include namespace CGAL { @@ -75,6 +75,7 @@ template class Interval_traits_base{ typedef CGAL::Null_functor Proper_Subset; typedef CGAL::Null_functor Intersection; typedef CGAL::Null_functor Hull; + static constexpr bool is_interval_v = false; }; } @@ -186,15 +187,15 @@ proper_subset(Interval interval1, Interval interval2) { } -// Set operations, functions returing Interval +// Set operations, functions returning Interval //the enable_if is need for MSVC as it is not able to eliminate //the function if Interval_traits::Intersection has no result_type //(like Null_functor) template inline typename Interval_traits::Intersection::result_type -intersection(Interval interval1, Interval interval2, typename boost::enable_if< - typename Interval_traits::Is_interval - >::type* = nullptr +intersection(Interval interval1, Interval interval2, std::enable_if_t< + Interval_traits::is_interval_v + >* = nullptr ) { typename Interval_traits::Intersection intersection; return intersection(interval1, interval2); @@ -202,10 +203,10 @@ intersection(Interval interval1, Interval interval2, typename boost::enable_if< template inline typename Interval_traits::Hull::result_type -hull(Interval interval1, Interval interval2, typename boost::enable_if< - boost::is_same< +hull(Interval interval1, Interval interval2, std::enable_if_t< + std::is_same< typename Interval_traits::Is_interval, - Tag_true > >::type* = nullptr) + Tag_true >::value >* = nullptr) { typename Interval_traits::Hull hull; return hull(interval1, interval2); diff --git a/thirdparty/CGAL/include/CGAL/Inverse_index.h b/thirdparty/CGAL/include/CGAL/Inverse_index.h index a403cb4d..98a616b9 100644 --- a/thirdparty/CGAL/include/CGAL/Inverse_index.h +++ b/thirdparty/CGAL/include/CGAL/Inverse_index.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Inverse_index.h $ -// $Id: Inverse_index.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Inverse_index.h $ +// $Id: include/CGAL/Inverse_index.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Is_a_predicate.h b/thirdparty/CGAL/include/CGAL/Is_a_predicate.h index 0bc57a80..b54af3e1 100644 --- a/thirdparty/CGAL/include/CGAL/Is_a_predicate.h +++ b/thirdparty/CGAL/include/CGAL/Is_a_predicate.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Is_a_predicate.h $ -// $Id: Is_a_predicate.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Is_a_predicate.h $ +// $Id: include/CGAL/Is_a_predicate.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Is_extended_kernel.h b/thirdparty/CGAL/include/CGAL/Is_extended_kernel.h index 1dfd4d13..2b58b915 100644 --- a/thirdparty/CGAL/include/CGAL/Is_extended_kernel.h +++ b/thirdparty/CGAL/include/CGAL/Is_extended_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Is_extended_kernel.h $ -// $Id: Is_extended_kernel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Is_extended_kernel.h $ +// $Id: include/CGAL/Is_extended_kernel.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Iso_cuboid_3.h b/thirdparty/CGAL/include/CGAL/Iso_cuboid_3.h index 31e12418..ab4002ee 100644 --- a/thirdparty/CGAL/include/CGAL/Iso_cuboid_3.h +++ b/thirdparty/CGAL/include/CGAL/Iso_cuboid_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Iso_cuboid_3.h $ -// $Id: Iso_cuboid_3.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Iso_cuboid_3.h $ +// $Id: include/CGAL/Iso_cuboid_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,22 +18,24 @@ #define CGAL_ISO_CUBOID_3_H #include -#include #include #include #include +#include + namespace CGAL { template class Iso_cuboid_3 : public R_::Kernel_base::Iso_cuboid_3 { typedef typename R_::RT RT; + typedef typename R_::FT FT; typedef typename R_::Point_3 Point_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Iso_cuboid_3 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: @@ -83,8 +85,9 @@ class Iso_cuboid_3 : public R_::Kernel_base::Iso_cuboid_3 max_hx, max_hy, max_hz)) {} Iso_cuboid_3(const Bbox_3& bbox) - : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), bbox.xmin(), bbox.ymin(), bbox.zmin(), - bbox.xmax(), bbox.ymax(), bbox.zmax())) {} + : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), + typename R::Construct_point_3()(FT(bbox.xmin()), FT(bbox.ymin()), FT(bbox.zmin())), + typename R::Construct_point_3()(FT(bbox.xmax()), FT(bbox.ymax()), FT(bbox.zmax())))) {} decltype(auto) min BOOST_PREVENT_MACRO_SUBSTITUTION () const diff --git a/thirdparty/CGAL/include/CGAL/Iso_rectangle_2.h b/thirdparty/CGAL/include/CGAL/Iso_rectangle_2.h index 367f7e67..106420fe 100644 --- a/thirdparty/CGAL/include/CGAL/Iso_rectangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Iso_rectangle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Iso_rectangle_2.h $ -// $Id: Iso_rectangle_2.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Iso_rectangle_2.h $ +// $Id: include/CGAL/Iso_rectangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,6 @@ #define CGAL_ISO_RECTANGLE_2_H #include -#include #include #include #include @@ -34,7 +33,7 @@ class Iso_rectangle_2 : public R_::Kernel_base::Iso_rectangle_2 typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef Iso_rectangle_2 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: @@ -79,7 +78,9 @@ class Iso_rectangle_2 : public R_::Kernel_base::Iso_rectangle_2 : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), min_hx, min_hy, max_hx, max_hy, hw)) {} Iso_rectangle_2(const Bbox_2& bbox) - : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), bbox.xmin(), bbox.ymin(), bbox.xmax(), bbox.ymax())) {} + : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), + typename R::Construct_point_2()(FT(bbox.xmin()), FT(bbox.ymin())), + typename R::Construct_point_2()(FT(bbox.xmax()), FT(bbox.ymax())))) {} decltype(auto) min BOOST_PREVENT_MACRO_SUBSTITUTION () const diff --git a/thirdparty/CGAL/include/CGAL/Iso_rectangle_d.h b/thirdparty/CGAL/include/CGAL/Iso_rectangle_d.h index a722db2b..d69d1027 100644 --- a/thirdparty/CGAL/include/CGAL/Iso_rectangle_d.h +++ b/thirdparty/CGAL/include/CGAL/Iso_rectangle_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Iso_rectangle_d.h $ -// $Id: Iso_rectangle_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Iso_rectangle_d.h $ +// $Id: include/CGAL/Iso_rectangle_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Iterator_project.h b/thirdparty/CGAL/include/CGAL/Iterator_project.h index d1650322..8d6a9f12 100644 --- a/thirdparty/CGAL/include/CGAL/Iterator_project.h +++ b/thirdparty/CGAL/include/CGAL/Iterator_project.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Iterator_project.h $ -// $Id: Iterator_project.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Iterator_project.h $ +// $Id: include/CGAL/Iterator_project.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Iterator_range.h b/thirdparty/CGAL/include/CGAL/Iterator_range.h index 0b39d2cd..9a5901ed 100644 --- a/thirdparty/CGAL/include/CGAL/Iterator_range.h +++ b/thirdparty/CGAL/include/CGAL/Iterator_range.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Iterator_range.h $ -// $Id: Iterator_range.h a88a84b 2021-08-13T15:46:50+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Iterator_range.h $ +// $Id: include/CGAL/Iterator_range.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -78,6 +78,13 @@ namespace CGAL { { return std::tuple{this->first, this->second}; } + + template class Container> + auto to() const + { + using V = std::remove_cv_t>; + return Container(begin(), end()); + } }; template diff --git a/thirdparty/CGAL/include/CGAL/Iterator_transform.h b/thirdparty/CGAL/include/CGAL/Iterator_transform.h index 6cd889b7..8622aaca 100644 --- a/thirdparty/CGAL/include/CGAL/Iterator_transform.h +++ b/thirdparty/CGAL/include/CGAL/Iterator_transform.h @@ -8,8 +8,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Iterator_transform.h $ -// $Id: Iterator_transform.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Iterator_transform.h $ +// $Id: include/CGAL/Iterator_transform.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Join_input_iterator.h b/thirdparty/CGAL/include/CGAL/Join_input_iterator.h index 6bab4eb6..df26f591 100644 --- a/thirdparty/CGAL/include/CGAL/Join_input_iterator.h +++ b/thirdparty/CGAL/include/CGAL/Join_input_iterator.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Join_input_iterator.h $ -// $Id: Join_input_iterator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Join_input_iterator.h $ +// $Id: include/CGAL/Join_input_iterator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/K_neighbor_search.h b/thirdparty/CGAL/include/CGAL/K_neighbor_search.h index 0124e599..a43158d5 100644 --- a/thirdparty/CGAL/include/CGAL/K_neighbor_search.h +++ b/thirdparty/CGAL/include/CGAL/K_neighbor_search.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/K_neighbor_search.h $ -// $Id: K_neighbor_search.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/K_neighbor_search.h $ +// $Id: include/CGAL/K_neighbor_search.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kd_tree.h b/thirdparty/CGAL/include/CGAL/Kd_tree.h index 07aa927c..f6c1d0d2 100644 --- a/thirdparty/CGAL/include/CGAL/Kd_tree.h +++ b/thirdparty/CGAL/include/CGAL/Kd_tree.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Kd_tree.h $ -// $Id: Kd_tree.h c53ae08 2022-06-30T19:01:43+02:00 Niklas Hambüchen +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Kd_tree.h $ +// $Id: include/CGAL/Kd_tree.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Hans Tangelder (), @@ -31,7 +31,7 @@ #include #include -#include +#include #ifdef CGAL_HAS_THREADS #include @@ -137,7 +137,7 @@ class Kd_tree { mutable CGAL_MUTEX building_mutex;//mutex used to protect const calls inducing build() #endif bool built_; - bool removed_; + std::size_t removed_=0; // protected copy constructor Kd_tree(const Tree& tree) @@ -175,7 +175,7 @@ class Kd_tree { #endif } - // TODO: Similiar to the leaf_init function above, a part of the code should be + // TODO: Similar to the leaf_init function above, a part of the code should be // moved to a the class Kd_tree_node. // It is not proper yet, but the goal was to see if there is // a potential performance gain through the Compact_container @@ -278,13 +278,13 @@ class Kd_tree { public: Kd_tree(Splitter s = Splitter(),const SearchTraits traits=SearchTraits()) - : traits_(traits),split(s), built_(false), removed_(false) + : traits_(traits),split(s), built_(false) {} template Kd_tree(InputIterator first, InputIterator beyond, Splitter s = Splitter(),const SearchTraits traits=SearchTraits()) - : traits_(traits), split(s), pts(first, beyond), built_(false), removed_(false) + : traits_(traits), split(s), pts(first, beyond), built_(false) { } bool empty() const { @@ -324,7 +324,7 @@ class Kd_tree { // must call invalidate_build() first. CGAL_assertion(!is_built()); CGAL_assertion(!pts.empty()); - CGAL_assertion(!removed_); + CGAL_assertion(removed_==0); const Point_d& p = *pts.begin(); typename SearchTraits::Construct_cartesian_const_iterator_d ccci=traits_.construct_cartesian_const_iterator_d_object(); dim_ = static_cast(std::distance(ccci(p), ccci(p,0))); @@ -335,7 +335,7 @@ class Kd_tree { } #ifndef CGAL_TBB_STRUCTURE_IN_KD_TREE - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #endif @@ -432,14 +432,14 @@ class Kd_tree { void invalidate_build() { - if(removed_){ + if(removed_!=0){ // Walk the tree to collect the remaining points. // Writing directly to pts would likely work, but better be safe. std::vector ptstmp; //ptstmp.resize(root()->num_items()); root()->tree_items(std::back_inserter(ptstmp)); pts.swap(ptstmp); - removed_=false; + removed_=0; CGAL_assertion(is_built()); // the rest of the cleanup must happen } if(is_built()){ @@ -455,7 +455,7 @@ class Kd_tree { { invalidate_build(); pts.clear(); - removed_ = false; + removed_ = 0; } void @@ -512,8 +512,8 @@ class Kd_tree { CGAL_assertion(success); // Do not set the flag is the tree has been cleared. - if(is_built()) - removed_ |= success; + if(is_built() && success) + ++removed_; } private: template @@ -594,7 +594,7 @@ class Kd_tree { template - boost::optional + std::optional search_any_point(const FuzzyQueryItem& q) const { if(! pts.empty()){ @@ -605,7 +605,7 @@ class Kd_tree { Kd_tree_rectangle b(*bbox); return tree_root->search_any_point(q,b,begin(),cache_begin(),dim_); } - return boost::none; + return std::nullopt; } @@ -684,7 +684,7 @@ class Kd_tree { size_type size() const { - return pts.size(); + return pts.size()-removed_; } // Print statistics of the tree. diff --git a/thirdparty/CGAL/include/CGAL/Kd_tree_node.h b/thirdparty/CGAL/include/CGAL/Kd_tree_node.h index 910d7b4d..d8eeaf3d 100644 --- a/thirdparty/CGAL/include/CGAL/Kd_tree_node.h +++ b/thirdparty/CGAL/include/CGAL/Kd_tree_node.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Kd_tree_node.h $ -// $Id: Kd_tree_node.h c4e816e 2021-11-23T14:17:39+01:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Kd_tree_node.h $ +// $Id: include/CGAL/Kd_tree_node.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -175,14 +175,14 @@ namespace CGAL { } - boost::optional + std::optional any_tree_item() const { - boost::optional result = boost::none; + std::optional result = std::nullopt; if (is_leaf()) { Leaf_node_const_handle node = static_cast(this); if (node->size()>0){ - return boost::make_optional(*(node->begin())); + return std::make_optional(*(node->begin())); } } else { @@ -273,14 +273,14 @@ namespace CGAL { template - boost::optional + std::optional search_any_point(const FuzzyQueryItem& q, Kd_tree_rectangle& b, typename Kdt::const_iterator tree_points_begin, typename std::vector::const_iterator cache_begin, int dim) const { - boost::optional result = boost::none; + std::optional result = std::nullopt; if (is_leaf()) { Leaf_node_const_handle node = static_cast(this); @@ -376,7 +376,7 @@ namespace CGAL { // With cache template - boost::optional search_any_point_in_leaf( + std::optional search_any_point_in_leaf( Leaf_node_const_handle node, const FuzzyQueryItem &q, typename Kdt::const_iterator tree_points_begin, @@ -384,7 +384,7 @@ namespace CGAL { int dim, Tag_true /*has_points_cache*/) const { - boost::optional result = boost::none; + std::optional result = std::nullopt; typename Kdt::iterator it_node_point = node->begin(), it_node_point_end = node->end(); typename std::vector::const_iterator cache_point_it = cache_begin + dim*(it_node_point - tree_points_begin); for (; it_node_point != it_node_point_end; ++it_node_point, cache_point_it += dim) @@ -401,7 +401,7 @@ namespace CGAL { // Without cache template - boost::optional search_any_point_in_leaf( + std::optional search_any_point_in_leaf( Leaf_node_const_handle node, const FuzzyQueryItem &q, typename Kdt::const_iterator /*tree_points_begin*/, @@ -409,7 +409,7 @@ namespace CGAL { int /*dim*/, Tag_false /*has_points_cache*/) const { - boost::optional result = boost::none; + std::optional result = std::nullopt; for (iterator i = node->begin(); i != node->end(); ++i) { if (q.contains(*i)) @@ -435,7 +435,7 @@ namespace CGAL { private: // private variables for leaf nodes - boost::int32_t n; // denotes number of items in a leaf node + std::int32_t n; // denotes number of items in a leaf node iterator data; // iterator to data in leaf node @@ -503,7 +503,7 @@ namespace CGAL { private: // private variables for internal nodes - boost::int32_t cut_dim; + std::int32_t cut_dim; FT cut_val; Node_handle lower_ch, upper_ch; @@ -653,7 +653,7 @@ namespace CGAL { private: // private variables for internal nodes - boost::uint8_t cut_dim; + std::uint8_t cut_dim; FT cut_val; Node_handle lower_ch, upper_ch; @@ -714,7 +714,7 @@ namespace CGAL { inline void set_separator(Separator& sep){ - cut_dim = static_cast(sep.cutting_dimension()); + cut_dim = static_cast(sep.cutting_dimension()); cut_val = sep.cutting_value(); } diff --git a/thirdparty/CGAL/include/CGAL/Kd_tree_rectangle.h b/thirdparty/CGAL/include/CGAL/Kd_tree_rectangle.h index 581204dc..f9a5a154 100644 --- a/thirdparty/CGAL/include/CGAL/Kd_tree_rectangle.h +++ b/thirdparty/CGAL/include/CGAL/Kd_tree_rectangle.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Kd_tree_rectangle.h $ -// $Id: Kd_tree_rectangle.h 2e180ac 2020-03-26T19:29:44+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Kd_tree_rectangle.h $ +// $Id: include/CGAL/Kd_tree_rectangle.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -40,7 +40,7 @@ namespace CGAL { operator()(P p) { T h; - typename Construct_cartesian_const_iterator_d::result_type pit = construct_it(*p); + auto pit = construct_it(*p); for (int i = 0; i < dim; ++i, ++pit) { h=(*pit); if (h < lower[i]) lower[i] = h; @@ -126,7 +126,7 @@ namespace CGAL { if (begin ==end) return; // initialize with values of first point - typename Construct_cartesian_const_iterator_d::result_type bit = construct_it(**begin); + auto bit = construct_it(**begin); for (int i=0; i < D::value; ++i, ++bit) { lower_[i]= *bit; upper_[i]=lower_[i]; diff --git a/thirdparty/CGAL/include/CGAL/Kernel/Conic_misc.h b/thirdparty/CGAL/include/CGAL/Kernel/Conic_misc.h index b7e87325..cb98cf1a 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/Conic_misc.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/Conic_misc.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/Conic_misc.h $ -// $Id: Conic_misc.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/Conic_misc.h $ +// $Id: include/CGAL/Kernel/Conic_misc.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel/Dimension_utils.h b/thirdparty/CGAL/include/CGAL/Kernel/Dimension_utils.h index 8c8bb9a6..e8ce0c29 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/Dimension_utils.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/Dimension_utils.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/Dimension_utils.h $ -// $Id: Dimension_utils.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/Dimension_utils.h $ +// $Id: include/CGAL/Kernel/Dimension_utils.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Kernel/Return_base_tag.h b/thirdparty/CGAL/include/CGAL/Kernel/Return_base_tag.h index ed00c75e..10e8cd15 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/Return_base_tag.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/Return_base_tag.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/Return_base_tag.h $ -// $Id: Return_base_tag.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/Return_base_tag.h $ +// $Id: include/CGAL/Kernel/Return_base_tag.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel/Same_uncertainty.h b/thirdparty/CGAL/include/CGAL/Kernel/Same_uncertainty.h index c6bbb9e1..2209fd46 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/Same_uncertainty.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/Same_uncertainty.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/Same_uncertainty.h $ -// $Id: Same_uncertainty.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/Same_uncertainty.h $ +// $Id: include/CGAL/Kernel/Same_uncertainty.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel/Type_equality_wrapper.h b/thirdparty/CGAL/include/CGAL/Kernel/Type_equality_wrapper.h index b6df5b2c..819d264a 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/Type_equality_wrapper.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/Type_equality_wrapper.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/Type_equality_wrapper.h $ -// $Id: Type_equality_wrapper.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/Type_equality_wrapper.h $ +// $Id: include/CGAL/Kernel/Type_equality_wrapper.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel/Type_mapper.h b/thirdparty/CGAL/include/CGAL/Kernel/Type_mapper.h index e4c1f6a4..acfe1386 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/Type_mapper.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/Type_mapper.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/Type_mapper.h $ -// $Id: Type_mapper.h 3127190 2020-12-08T12:48:04+01:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/Type_mapper.h $ +// $Id: include/CGAL/Kernel/Type_mapper.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,14 +21,11 @@ #include -#include -#include - #include #include -#include -#include +#include +#include #include #include @@ -54,8 +51,8 @@ struct Type_mapper_impl, K1, K2 > { }; template < typename T, typename K1, typename K2 > -struct Type_mapper_impl, K1, K2 > { - typedef boost::optional< typename Type_mapper_impl::type > type; +struct Type_mapper_impl, K1, K2 > { + typedef std::optional< typename Type_mapper_impl::type > type; }; @@ -66,9 +63,9 @@ struct Type_mapper_impl, K1, K2 > { #define CGAL_VARIANT_TYPEMAP(z, n, d) \ template< typename K1, typename K2, BOOST_PP_ENUM_PARAMS(n, class T) > \ -struct Type_mapper_impl, K1, K2> { \ +struct Type_mapper_impl, K1, K2> { \ BOOST_PP_REPEAT(n, CGAL_TYPEMAP_TYPEDEFS, T) \ - typedef boost::variant type; \ + typedef std::variant type; \ }; BOOST_PP_REPEAT_FROM_TO(1, 10, CGAL_VARIANT_TYPEMAP, _) @@ -76,16 +73,6 @@ BOOST_PP_REPEAT_FROM_TO(1, 10, CGAL_VARIANT_TYPEMAP, _) #undef CGAL_TYPEMAP_TYPEDEFS #undef CGAL_VARIANT_TYPEMAP -// CODE_TAG -//template -//struct Type_mapper_impl, K1, K2 > { -// typedef typename boost::make_variant_over< -// typename boost::mpl::transform< -// typename boost::variant::types, -// Type_mapper_impl >::type -// >::type type; -//}; - // Then we specialize for all kernel objects. // More details on why it is like that are here: https://github.com/CGAL/cgal/pull/4878#discussion_r459986501 #define CGAL_Kernel_obj(X) \ @@ -111,9 +98,9 @@ struct Type_mapper_impl < typename K1::FT, K1, K2 > template < typename T, typename K1, typename K2 > struct Type_mapper : - internal::Type_mapper_impl< typename boost::remove_cv< - typename boost::remove_reference < T >::type - >::type, K1, K2 > + internal::Type_mapper_impl< std::remove_cv_t< + std::remove_reference_t< T > + >, K1, K2 > { }; } //namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Kernel/Wutils.h b/thirdparty/CGAL/include/CGAL/Kernel/Wutils.h index 471d225a..506522e6 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/Wutils.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/Wutils.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/Wutils.h $ -// $Id: Wutils.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/Wutils.h $ +// $Id: include/CGAL/Kernel/Wutils.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel/function_objects.h b/thirdparty/CGAL/include/CGAL/Kernel/function_objects.h index c3a65d10..0a67d96d 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/function_objects.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/function_objects.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/function_objects.h $ -// $Id: function_objects.h ebf9fb0 2022-05-26T18:13:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/function_objects.h $ +// $Id: include/CGAL/Kernel/function_objects.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,6 +20,7 @@ #ifndef CGAL_KERNEL_FUNCTION_OBJECTS_H #define CGAL_KERNEL_FUNCTION_OBJECTS_H +#include #include #include #include @@ -30,7 +31,6 @@ #include #include - #include // for Compute_dihedral_angle namespace CGAL { @@ -196,6 +196,49 @@ namespace CommonKernelFunctors { { return assign(t, o); } }; + template + class Compare_angle_3 + { + typedef typename K::Point_3 Point_3; + typedef typename K::Vector_3 Vector_3; + typedef typename K::FT FT; + public: + typedef typename K::Comparison_result result_type; + + result_type + operator()(const Point_3& a, const Point_3& b, const Point_3& c, + const FT& cosine) const + { + typename K::Compute_scalar_product_3 scalar_product = K().compute_scalar_product_3_object(); + typename K::Construct_vector_3 vector = K().construct_vector_3_object(); + typename K::Compute_squared_length_3 sq_length = K().compute_squared_length_3_object(); + + const Vector_3 ba = vector(b, a); + const Vector_3 bc = vector(b, c); + + typename K::FT sc_prod = scalar_product(ba, bc); + + if (sc_prod >= 0) + { + if (cosine >= 0) + return CGAL::compare(CGAL::square(cosine) + * sq_length(ba)*sq_length(bc), + CGAL::square(sc_prod)); + else + return SMALLER; + } + else + { + if (cosine >= 0) + return LARGER; + else + return CGAL::compare(CGAL::square(sc_prod), + CGAL::square(cosine) + * sq_length(ba)*sq_length(bc)); + } + } + }; + template class Compare_dihedral_angle_3 { @@ -244,6 +287,7 @@ namespace CommonKernelFunctors { const Vector_3 abac1 = xproduct(ab1, ac1); const Vector_3 abad1 = xproduct(ab1, ad1); + if (abac1==NULL_VECTOR || abad1==NULL_VECTOR) return SMALLER; const FT sc_prod_1 = abac1 * abad1; CGAL_kernel_assertion_msg( abac1 != NULL_VECTOR, @@ -736,11 +780,12 @@ namespace CommonKernelFunctors { typedef Comparison_result result_type; - result_type operator()(const Weighted_point_3 & p, - const Weighted_point_3 & q, - const Weighted_point_3 & r, - const Weighted_point_3 & s, - const FT& w) const + Needs_FT + operator()(const Weighted_point_3 & p, + const Weighted_point_3 & q, + const Weighted_point_3 & r, + const Weighted_point_3 & s, + const FT& w) const { return CGAL::compare(squared_radius_orthogonal_sphereC3( p.x(),p.y(),p.z(),p.weight(), @@ -750,10 +795,11 @@ namespace CommonKernelFunctors { w); } - result_type operator()(const Weighted_point_3 & p, - const Weighted_point_3 & q, - const Weighted_point_3 & r, - const FT& w) const + Needs_FT + operator()(const Weighted_point_3 & p, + const Weighted_point_3 & q, + const Weighted_point_3 & r, + const FT& w) const { return CGAL::compare(squared_radius_smallest_orthogonal_sphereC3( p.x(),p.y(),p.z(),p.weight(), @@ -762,9 +808,10 @@ namespace CommonKernelFunctors { w); } - result_type operator()(const Weighted_point_3 & p, - const Weighted_point_3 & q, - const FT& w) const + Needs_FT + operator()(const Weighted_point_3 & p, + const Weighted_point_3 & q, + const FT& w) const { return CGAL::compare(squared_radius_smallest_orthogonal_sphereC3( p.x(),p.y(),p.z(),p.weight(), @@ -817,17 +864,18 @@ namespace CommonKernelFunctors { typedef typename K::Comparison_result result_type; template - result_type + Needs_FT operator()(const T1& p, const T2& q, const FT& d2) const { - return CGAL::compare(squared_distance(p, q), d2); + return CGAL::compare(internal::squared_distance(p, q, K()), d2); } template - result_type + Needs_FT operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { - return CGAL::compare(squared_distance(p, q), squared_distance(r, s)); + return CGAL::compare(internal::squared_distance(p, q, K()), + internal::squared_distance(r, s, K())); } }; @@ -839,17 +887,18 @@ namespace CommonKernelFunctors { typedef typename K::Comparison_result result_type; template - result_type + Needs_FT operator()(const T1& p, const T2& q, const FT& d2) const { - return CGAL::compare(squared_distance(p, q), d2); + return CGAL::compare(internal::squared_distance(p, q, K()), d2); } template - result_type + Needs_FT operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { - return CGAL::compare(squared_distance(p, q), squared_distance(r, s)); + return CGAL::compare(internal::squared_distance(p, q, K()), + internal::squared_distance(r, s, K())); } }; @@ -929,11 +978,42 @@ namespace CommonKernelFunctors { const Vector_3 ad = vector(a,d); const Vector_3 abad = cross_product(ab,ad); - const double x = CGAL::to_double(scalar_product(cross_product(ab,ac), abad)); + const Vector_3 abac = cross_product(ab,ac); + + // The dihedral angle we are interested in is the angle around the oriented + // edge ab which is the same (in absolute value) as the angle between the + // vectors ab^ac and ab^ad (cross-products). + // (abac points inside the tetra abcd if its orientation is positive and outside otherwise) + // + // We consider the vector abad in the basis defined by the three vectors + // (, , ) + // where denote the normalized vector u/|u|. + // + // In this orthonormal basis, the vector adab has the coordinates + // x = * abad + // y = * abad + // z = * abad + // We have x == 0, because abad and ab are orthogonal, and thus abad is in + // the plane (yz) of the new basis. + // + // In that basis, the dihedral angle is the angle between the y axis and abad + // which is the arctan of y/z, or atan2(z, y). + // + // (Note that ab^abac is in the plane abc, pointing outside the tetra if + // its orientation is positive and inside otherwise). + // + // For the normalization, abad appears in both scalar products + // in the quotient so we can ignore its norm. For the second + // terms of the scalar products, we are left with ab^abac and abac. + // Since ab and abac are orthogonal, the sinus of the angle between the + // two vectors is 1. + // So the norms are |ab|.|abac| vs |abac|, which is why we have a + // multiplication by |ab| in y below. const double l_ab = CGAL::sqrt(CGAL::to_double(sq_distance(a,b))); - const double y = l_ab * CGAL::to_double(scalar_product(ac,abad)); + const double y = l_ab * CGAL::to_double(scalar_product(abac, abad)); + const double z = CGAL::to_double(scalar_product(cross_product(ab,abac),abad)); - return FT(std::atan2(y, x) * 180 / CGAL_PI ); + return FT(std::atan2(z, y) * 180 / CGAL_PI ); } }; @@ -1042,7 +1122,7 @@ namespace CommonKernelFunctors { public: typedef RT result_type; - RT + const RT& operator()(const Line_2& l) const { return l.rep().a(); @@ -1058,7 +1138,7 @@ namespace CommonKernelFunctors { public: typedef RT result_type; - RT + const RT& operator()(const Plane_3& l) const { return l.rep().a(); @@ -1075,7 +1155,7 @@ namespace CommonKernelFunctors { public: typedef RT result_type; - RT + const RT& operator()(const Line_2& l) const { return l.rep().b(); @@ -1091,7 +1171,7 @@ namespace CommonKernelFunctors { public: typedef RT result_type; - RT + const RT& operator()(const Plane_3& l) const { return l.rep().b(); @@ -1108,7 +1188,7 @@ namespace CommonKernelFunctors { public: typedef RT result_type; - RT + const RT& operator()(const Line_2& l) const { return l.rep().c(); @@ -1124,7 +1204,7 @@ namespace CommonKernelFunctors { public: typedef RT result_type; - RT + const RT& operator()(const Plane_3& l) const { return l.rep().c(); @@ -1140,7 +1220,7 @@ namespace CommonKernelFunctors { public: typedef RT result_type; - RT + const RT& operator()(const Plane_3& l) const { return l.rep().d(); @@ -1716,8 +1796,8 @@ namespace CommonKernelFunctors { Line l2 = construct_line(l21, l22); const auto res = typename K::Intersect_3()(l1,l2); - CGAL_assertion(res!=boost::none); - const Point* e_pt = boost::get(&(*res)); + CGAL_assertion(res!=std::nullopt); + const Point* e_pt = std::get_if(&(*res)); CGAL_assertion(e_pt!=nullptr); return *e_pt; } @@ -2039,6 +2119,10 @@ namespace CommonKernelFunctors { operator()(Return_base_tag, const Point_3& p, const Point_3& q, const Point_3& r) const { return Rep(p, q, r); } + Rep // Plane_3 + operator()(Return_base_tag, Origin o, const Point_3& q, const Point_3& r) const + { return Rep(o, q, r); } + Rep // Plane_3 operator()(Return_base_tag, const Point_3& p, const Direction_3& d) const { return Rep(p, d); } @@ -2120,8 +2204,8 @@ namespace CommonKernelFunctors { Line line = construct_line( l1, l2 ); const auto res = typename K::Intersect_3()(plane,line); - CGAL_assertion(res!=boost::none); - const Point* e_pt = boost::get(&(*res)); + CGAL_assertion(res!=std::nullopt); + const Point* e_pt = std::get_if(&(*res)); CGAL_assertion(e_pt!=nullptr); return *e_pt; } @@ -2133,13 +2217,114 @@ namespace CommonKernelFunctors { Line line = construct_line( l1, l2 ); const auto res = typename K::Intersect_3()(plane,line); - CGAL_assertion(res!=boost::none); - const Point* e_pt = boost::get(&(*res)); + CGAL_assertion(res!=std::nullopt); + const Point* e_pt = std::get_if(&(*res)); CGAL_assertion(e_pt!=nullptr); return *e_pt; } }; + template + class Construct_planes_intersection_point_3 + { + typedef typename K::Plane_3 Plane; + typedef typename K::Point_3 Point; + typename K::Construct_plane_3 construct_plane; + public: + typedef Point result_type; + + Point + operator()(const Point& p1, const Point& q1, const Point& r1, + const Point& p2, const Point& q2, const Point& r2, + const Point& p3, const Point& q3, const Point& r3) const + { + Plane plane1 = construct_plane(p1, q1, r1); + Plane plane2 = construct_plane(p2, q2, r2); + Plane plane3 = construct_plane(p3, q3, r3); + + const auto res = typename K::Intersect_3()(plane1, plane2, plane3); + CGAL_assertion(res!=std::nullopt); + const Point* e_pt = std::get_if(&(*res)); + CGAL_assertion(e_pt!=nullptr); + return *e_pt; + } + + Point + operator()(const Plane& plane1, const Plane& plane2, const Plane& plane3) const + { + const auto res = typename K::Intersect_3()(plane1, plane2, plane3); + CGAL_assertion(res!=std::nullopt); + const Point* e_pt = std::get_if(&(*res)); + CGAL_assertion(e_pt!=nullptr); + return *e_pt; + } + }; + + template + class Construct_coplanar_segments_intersection_point_3 + { + typedef typename K::Segment_3 Segment; + typedef typename K::Point_3 Point; + typename K::Construct_segment_3 construct_segment; + public: + typedef Point result_type; + + Point + operator()(const Point& p1, const Point& q1, + const Point& p2, const Point& q2) const + { + Segment s1 = construct_segment(p1, q1); + Segment s2 = construct_segment(p2, q2); + + const auto res = typename K::Intersect_3()(s1, s2); + CGAL_assertion(res!=std::nullopt); + const Point* e_pt = std::get_if(&(*res)); + CGAL_assertion(e_pt!=nullptr); + return *e_pt; + } + + Point + operator()(const Segment& s1, const Segment& s2) const + { + const auto res = typename K::Intersect_3()(s1, s2); + CGAL_assertion(res!=std::nullopt); + const Point* e_pt = std::get_if(&(*res)); + CGAL_assertion(e_pt!=nullptr); + return *e_pt; + } + }; + + template + class Compute_alpha_for_coplanar_triangle_intersection_3 + { + typedef typename K::Point_3 Point_3; + typedef typename K::Vector_3 Vector_3; + public: + typedef typename K::FT result_type; + result_type + operator()(const Point_3& p1, const Point_3& p2, // segment 1 + const Point_3& p3, const Point_3& p4) const // segment 2 + { + typename K::Construct_vector_3 vector = K().construct_vector_3_object(); + typename K::Construct_cross_product_vector_3 cross_product = + K().construct_cross_product_vector_3_object(); + + const Vector_3 v1 = vector(p1, p2); + const Vector_3 v2 = vector(p3, p4); + + CGAL_assertion(K().coplanar_3_object()(p1,p2,p3,p4)); + + const Vector_3 v3 = vector(p1, p3); + const Vector_3 v3v2 = cross_product(v3,v2); + const Vector_3 v1v2 = cross_product(v1,v2); + const typename K::FT sl = K().compute_squared_length_3_object()(v1v2); + CGAL_assertion(!certainly(is_zero(sl))); + + const typename K::FT t = ((v3v2.x()*v1v2.x()) + (v3v2.y()*v1v2.y()) + (v3v2.z()*v1v2.z())) / sl; + return t; // p1 + (p2-p1) * t + } + }; + template class Construct_point_on_2 { @@ -2176,6 +2361,10 @@ namespace CommonKernelFunctors { public: typedef Point_3 result_type; + const Point_3& + operator()( const Line_3& l) const + { return l.rep().point(); } + Point_3 operator()( const Line_3& l, const FT i) const { return l.rep().point(i); } @@ -3018,10 +3207,11 @@ namespace CommonKernelFunctors { public: typedef typename K::Boolean result_type; + // Needs_FT because Line/Line (and variations) as well as Circle_2/X compute intersections template - result_type + Needs_FT operator()(const T1& t1, const T2& t2) const - { return Intersections::internal::do_intersect(t1, t2, K()); } + { return { Intersections::internal::do_intersect(t1, t2, K())}; } }; template @@ -3035,10 +3225,12 @@ namespace CommonKernelFunctors { operator()(const T1& t1, const T2& t2) const { return Intersections::internal::do_intersect(t1, t2, K()); } - result_type - operator()(const typename K::Plane_3& pl1, const typename K::Plane_3& pl2, const typename K::Plane_3& pl3) const - { return Intersections::internal::do_intersect(pl1, pl2, pl3, K() ); } - + result_type operator()(const typename K::Plane_3& pl1, + const typename K::Plane_3& pl2, + const typename K::Plane_3& pl3) const + { + return Intersections::internal::do_intersect(pl1, pl2, pl3, K()); + } }; template @@ -3328,8 +3520,10 @@ namespace CommonKernelFunctors { return c.rep().has_on_bounded_side(p); } - result_type operator()(const Sphere_3& s1, const Sphere_3& s2, - const Point_3& a, const Point_3& b) const + // returns true iff the line segment ab is inside the union of the bounded sides of s1 and s2. + Needs_FT + operator()(const Sphere_3& s1, const Sphere_3& s2, + const Point_3& a, const Point_3& b) const { typedef typename K::Circle_3 Circle_3; typedef typename K::Point_3 Point_3; @@ -3341,27 +3535,23 @@ namespace CommonKernelFunctors { const bool a_in_s1 = has_on_bounded_side(s1, a); const bool a_in_s2 = has_on_bounded_side(s2, a); - if(!(a_in_s1 || a_in_s2)) return false; + if(!(a_in_s1 || a_in_s2)) return {false}; const bool b_in_s1 = has_on_bounded_side(s1, b); const bool b_in_s2 = has_on_bounded_side(s2, b); - if(!(b_in_s1 || b_in_s2)) return false; + if(!(b_in_s1 || b_in_s2)) return {false}; - if(a_in_s1 && b_in_s1) return true; - if(a_in_s2 && b_in_s2) return true; + if(a_in_s1 && b_in_s1) return {true}; + if(a_in_s2 && b_in_s2) return {true}; - if(!K().do_intersect_3_object()(s1, s2)) return false; + if(!K().do_intersect_3_object()(s1, s2)) return {false}; const Circle_3 circ(s1, s2); const Plane_3& plane = circ.supporting_plane(); const auto optional = K().intersect_3_object()(plane, Segment_3(a, b)); - CGAL_kernel_assertion_msg(bool(optional) == true, - "the segment does not intersect the supporting" - " plane"); - const Point_3* p = boost::get(&*optional); - CGAL_kernel_assertion_msg(p != 0, - "the segment intersection with the plane is " - "not a point"); + CGAL_kernel_assertion_msg(bool(optional) == true, "the segment does not intersect the supporting plane"); + const Point_3* p = std::get_if(&*optional); + CGAL_kernel_assertion_msg(p != 0, "the segment intersection with the plane is not a point"); return squared_distance(circ.center(), *p) < circ.squared_radius(); } @@ -3565,7 +3755,7 @@ namespace CommonKernelFunctors { operator()(const T1& t1, const T2& t2) const { return Intersections::internal::intersection(t1, t2, K() ); } - boost::optional > + std::optional > operator()(const Plane_3& pl1, const Plane_3& pl2, const Plane_3& pl3)const { return Intersections::internal::intersection(pl1, pl2, pl3, K() ); } }; @@ -3582,7 +3772,7 @@ namespace CommonKernelFunctors { typedef typename K::Point_3 Point_3; typedef typename K::Line_3 Line_3; typedef typename K::Plane_3 Plane_3; - typedef typename boost::optional result_type; + typedef typename std::optional result_type; result_type operator()(const Plane_3& pl1, const Plane_3& pl2, const Plane_3& pl3) const diff --git a/thirdparty/CGAL/include/CGAL/Kernel/global_functions.h b/thirdparty/CGAL/include/CGAL/Kernel/global_functions.h index be99fdd3..997d528b 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/global_functions.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/global_functions.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/global_functions.h $ -// $Id: global_functions.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/global_functions.h $ +// $Id: include/CGAL/Kernel/global_functions.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel/global_functions_2.h b/thirdparty/CGAL/include/CGAL/Kernel/global_functions_2.h index a61a16ab..d83a9152 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/global_functions_2.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/global_functions_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/global_functions_2.h $ -// $Id: global_functions_2.h 92d90a4 2021-08-12T10:12:26+02:00 Sebastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/global_functions_2.h $ +// $Id: include/CGAL/Kernel/global_functions_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel/global_functions_3.h b/thirdparty/CGAL/include/CGAL/Kernel/global_functions_3.h index a0de9348..8e293940 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/global_functions_3.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/global_functions_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/global_functions_3.h $ -// $Id: global_functions_3.h d3b26a6 2021-04-22T17:35:27+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/global_functions_3.h $ +// $Id: include/CGAL/Kernel/global_functions_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -309,6 +309,15 @@ collinear_are_strictly_ordered_along_line(const Point_3 &p, return internal::collinear_are_strictly_ordered_along_line(p, q, r, K()); } +template < class K > +inline +typename K::Comparison_result +compare_angle(const Point_3& a, const Point_3& b, const Point_3& c, + const typename K::FT& cosine) +{ + return internal::compare_angle(a, b, c, cosine, K()); +} + template < class K > inline typename K::Comparison_result diff --git a/thirdparty/CGAL/include/CGAL/Kernel/global_functions_internal_2.h b/thirdparty/CGAL/include/CGAL/Kernel/global_functions_internal_2.h index a529630a..0e8ef05d 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/global_functions_internal_2.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/global_functions_internal_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h $ -// $Id: global_functions_internal_2.h 92d90a4 2021-08-12T10:12:26+02:00 Sebastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h $ +// $Id: include/CGAL/Kernel/global_functions_internal_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,11 +24,12 @@ #include #include -#include #include "boost/mpl/equal_to.hpp" #include #include +#include + namespace CGAL { namespace internal { @@ -273,12 +274,11 @@ compare_angle_with_x_axis(const typename K::Direction_2& d1, template inline -typename boost::enable_if< +std::enable_if_t< boost::mpl::equal_to::type::value>, - boost::mpl::integral_c >, + boost::mpl::integral_c >::value, typename K::Comparison_result> -::type compare_distance(const T1 &o1, const T2 &o2, const T3 &o3, const K& k) @@ -288,12 +288,11 @@ compare_distance(const T1 &o1, template inline -typename boost::enable_if< +std::enable_if_t< boost::mpl::equal_to::type::value>, - boost::mpl::integral_c >, + boost::mpl::integral_c >::value, typename K::Comparison_result> -::type compare_distance(const T1 &o1, const T2 &o2, const T3 &o3, diff --git a/thirdparty/CGAL/include/CGAL/Kernel/global_functions_internal_3.h b/thirdparty/CGAL/include/CGAL/Kernel/global_functions_internal_3.h index 26c73033..4cd49479 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/global_functions_internal_3.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/global_functions_internal_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/global_functions_internal_3.h $ -// $Id: global_functions_internal_3.h d3b26a6 2021-04-22T17:35:27+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/global_functions_internal_3.h $ +// $Id: include/CGAL/Kernel/global_functions_internal_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,9 +22,9 @@ #include #include -#include #include #include +#include namespace CGAL { @@ -321,6 +321,17 @@ collinear_are_strictly_ordered_along_line( return k.collinear_are_strictly_ordered_along_line_3_object()(p, q, r); } +template < class K > +inline +typename K::Comparison_result +compare_angle(const typename K::Point_3& a, + const typename K::Point_3& b, + const typename K::Point_3& c, + const typename K::FT& cosine, + const K& k) +{ + return k.compare_angle_3_object()(a, b, c, cosine); +} template < class K > inline @@ -379,12 +390,11 @@ compare_dihedral_angle(const typename K::Vector_3& ab1, template inline -typename boost::enable_if< +std::enable_if_t< boost::mpl::equal_to::type::value>, - boost::mpl::integral_c >, + boost::mpl::integral_c >::value, typename K::Comparison_result> -::type // boost::mpl::equal_to::type, // boost::mpl::int_<3> >, // typename K::Comparison_result>::type @@ -397,12 +407,11 @@ compare_distance(const T1 &o1, template inline -typename boost::enable_if< +std::enable_if_t< boost::mpl::equal_to::type::value>, - boost::mpl::integral_c >, + boost::mpl::integral_c >::value, typename K::Comparison_result> -::type // boost::mpl::equal_to::type, // boost::mpl::int_<3> >, // typename K::Comparison_result>::type diff --git a/thirdparty/CGAL/include/CGAL/Kernel/hash_functions.h b/thirdparty/CGAL/include/CGAL/Kernel/hash_functions.h index b9784e8d..376c5673 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/hash_functions.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/hash_functions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/hash_functions.h $ -// $Id: hash_functions.h 9bf61b7 2020-04-22T11:02:16+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/hash_functions.h $ +// $Id: include/CGAL/Kernel/hash_functions.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel/interface_macros.h b/thirdparty/CGAL/include/CGAL/Kernel/interface_macros.h index a8d3bd46..78f00360 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/interface_macros.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/interface_macros.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/interface_macros.h $ -// $Id: interface_macros.h d0ed658 2021-11-03T17:39:21+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/interface_macros.h $ +// $Id: include/CGAL/Kernel/interface_macros.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ // It's aimed at being included from within a kernel traits class, this // way we share more code. -// It is the responsability of the including file to correctly set the 2 +// It is the responsibility of the including file to correctly set the 2 // macros CGAL_Kernel_pred, CGAL_Kernel_cons and CGAL_Kernel_obj. // And they are #undefed at the end of this file. @@ -26,12 +26,6 @@ # define CGAL_Kernel_pred(X, Y) #endif -// Those predicates for which Simple_cartesian is guaranteed not to use -// any division. -#ifndef CGAL_Kernel_pred_RT -# define CGAL_Kernel_pred_RT(X, Y) CGAL_Kernel_pred(X, Y) -#endif - #ifndef CGAL_Kernel_cons # define CGAL_Kernel_cons(X, Y) #endif @@ -100,10 +94,12 @@ CGAL_Kernel_pred(Collinear_are_strictly_ordered_along_line_3, collinear_are_strictly_ordered_along_line_3_object) CGAL_Kernel_pred(Collinear_has_on_2, collinear_has_on_2_object) -CGAL_Kernel_pred_RT(Collinear_2, - collinear_2_object) -CGAL_Kernel_pred_RT(Collinear_3, - collinear_3_object) +CGAL_Kernel_pred(Collinear_2, + collinear_2_object) +CGAL_Kernel_pred(Collinear_3, + collinear_3_object) +CGAL_Kernel_pred(Compare_angle_3, + compare_angle_3_object) CGAL_Kernel_pred(Compare_angle_with_x_axis_2, compare_angle_with_x_axis_2_object) CGAL_Kernel_pred(Compare_dihedral_angle_3, @@ -112,10 +108,10 @@ CGAL_Kernel_pred(Compare_distance_2, compare_distance_2_object) CGAL_Kernel_pred(Compare_distance_3, compare_distance_3_object) -CGAL_Kernel_pred_RT(Compare_power_distance_2, - compare_power_distance_2_object) -CGAL_Kernel_pred_RT(Compare_power_distance_3, - compare_power_distance_3_object) +CGAL_Kernel_pred(Compare_power_distance_2, + compare_power_distance_2_object) +CGAL_Kernel_pred(Compare_power_distance_3, + compare_power_distance_3_object) CGAL_Kernel_pred(Compare_signed_distance_to_line_2, compare_signed_distance_to_line_2_object) CGAL_Kernel_pred(Compare_slope_2, @@ -402,6 +398,12 @@ CGAL_Kernel_cons(Construct_plane_3, construct_plane_3_object) CGAL_Kernel_cons(Construct_plane_line_intersection_point_3, construct_plane_line_intersection_point_3_object) +CGAL_Kernel_cons(Construct_planes_intersection_point_3, + construct_planes_intersection_point_3_object) +CGAL_Kernel_cons(Construct_coplanar_segments_intersection_point_3, + construct_coplanar_segments_intersection_point_3_object) +CGAL_Kernel_cons(Compute_alpha_for_coplanar_triangle_intersection_3, + compute_alpha_for_coplanar_triangle_intersection_3_object) CGAL_Kernel_cons(Construct_point_on_2, construct_point_on_2_object) CGAL_Kernel_cons(Construct_point_on_3, @@ -486,18 +488,18 @@ CGAL_Kernel_cons(Construct_cartesian_const_iterator_2, construct_cartesian_const_iterator_2_object) CGAL_Kernel_cons(Construct_cartesian_const_iterator_3, construct_cartesian_const_iterator_3_object) -CGAL_Kernel_pred_RT(Coplanar_orientation_3, - coplanar_orientation_3_object) -CGAL_Kernel_pred_RT(Coplanar_side_of_bounded_circle_3, - coplanar_side_of_bounded_circle_3_object) -CGAL_Kernel_pred_RT(Coplanar_3, +CGAL_Kernel_pred(Coplanar_orientation_3, + coplanar_orientation_3_object) +CGAL_Kernel_pred(Coplanar_side_of_bounded_circle_3, + coplanar_side_of_bounded_circle_3_object) +CGAL_Kernel_pred(Coplanar_3, coplanar_3_object) CGAL_Kernel_pred(Counterclockwise_in_between_2, counterclockwise_in_between_2_object) CGAL_Kernel_pred(Do_intersect_2, do_intersect_2_object) -CGAL_Kernel_pred_RT(Do_intersect_3, - do_intersect_3_object) +CGAL_Kernel_pred(Do_intersect_3, + do_intersect_3_object) CGAL_Kernel_pred(Equal_xy_3, equal_xy_3_object) CGAL_Kernel_pred(Equal_x_2, @@ -546,8 +548,8 @@ CGAL_Kernel_cons(Intersect_point_3_for_polyhedral_envelope, intersect_point_3_for_polyhedral_envelope_object) CGAL_Kernel_pred(Is_degenerate_2, is_degenerate_2_object) -CGAL_Kernel_pred_RT(Is_degenerate_3, - is_degenerate_3_object) +CGAL_Kernel_pred(Is_degenerate_3, + is_degenerate_3_object) CGAL_Kernel_pred(Is_horizontal_2, is_horizontal_2_object) CGAL_Kernel_pred(Is_vertical_2, @@ -584,10 +586,10 @@ CGAL_Kernel_pred(Less_z_3, less_z_3_object) CGAL_Kernel_pred(Non_zero_coordinate_index_3, non_zero_coordinate_index_3_object) -CGAL_Kernel_pred_RT(Orientation_2, - orientation_2_object) -CGAL_Kernel_pred_RT(Orientation_3, - orientation_3_object) +CGAL_Kernel_pred(Orientation_2, + orientation_2_object) +CGAL_Kernel_pred(Orientation_3, + orientation_3_object) CGAL_Kernel_pred(Oriented_side_2, oriented_side_2_object) CGAL_Kernel_pred(Oriented_side_3, @@ -596,20 +598,19 @@ CGAL_Kernel_pred(Power_side_of_bounded_power_circle_2, power_side_of_bounded_power_circle_2_object) CGAL_Kernel_pred(Power_side_of_bounded_power_sphere_3, power_side_of_bounded_power_sphere_3_object) -CGAL_Kernel_pred_RT(Power_side_of_oriented_power_circle_2, - power_side_of_oriented_power_circle_2_object) -CGAL_Kernel_pred_RT(Power_side_of_oriented_power_sphere_3, - power_side_of_oriented_power_sphere_3_object) -CGAL_Kernel_pred_RT(Side_of_bounded_circle_2, - side_of_bounded_circle_2_object) -CGAL_Kernel_pred_RT(Side_of_bounded_sphere_3, - side_of_bounded_sphere_3_object) -CGAL_Kernel_pred_RT(Side_of_oriented_circle_2, - side_of_oriented_circle_2_object) -CGAL_Kernel_pred_RT(Side_of_oriented_sphere_3, - side_of_oriented_sphere_3_object) +CGAL_Kernel_pred(Power_side_of_oriented_power_circle_2, + power_side_of_oriented_power_circle_2_object) +CGAL_Kernel_pred(Power_side_of_oriented_power_sphere_3, + power_side_of_oriented_power_sphere_3_object) +CGAL_Kernel_pred(Side_of_bounded_circle_2, + side_of_bounded_circle_2_object) +CGAL_Kernel_pred(Side_of_bounded_sphere_3, + side_of_bounded_sphere_3_object) +CGAL_Kernel_pred(Side_of_oriented_circle_2, + side_of_oriented_circle_2_object) +CGAL_Kernel_pred(Side_of_oriented_sphere_3, + side_of_oriented_sphere_3_object) -#undef CGAL_Kernel_pred_RT #undef CGAL_Kernel_pred #undef CGAL_Kernel_cons #undef CGAL_Kernel_obj diff --git a/thirdparty/CGAL/include/CGAL/Kernel/mpl.h b/thirdparty/CGAL/include/CGAL/Kernel/mpl.h index 900d5e15..8bbd8c0e 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/mpl.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/mpl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/mpl.h $ -// $Id: mpl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/mpl.h $ +// $Id: include/CGAL/Kernel/mpl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,7 +24,7 @@ namespace CGAL { -// The additionnal int parameter is to obtain different types. +// The additional int parameter is to obtain different types. template < typename A, typename B, int = 0 > struct First_if_different { typedef A Type; diff --git a/thirdparty/CGAL/include/CGAL/Kernel/solve.h b/thirdparty/CGAL/include/CGAL/Kernel/solve.h index af941649..ef99c306 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel/solve.h +++ b/thirdparty/CGAL/include/CGAL/Kernel/solve.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel/solve.h $ -// $Id: solve.h be39ec0 2021-03-18T14:11:57+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel/solve.h $ +// $Id: include/CGAL/Kernel/solve.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Filtered_projection_traits_3.h b/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Filtered_projection_traits_3.h index d00d78e9..e77cd1d5 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Filtered_projection_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Filtered_projection_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel_23/internal/Filtered_projection_traits_3.h $ -// $Id: Filtered_projection_traits_3.h 561cc66 2022-06-29T12:30:35+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel_23/internal/Filtered_projection_traits_3.h $ +// $Id: include/CGAL/Kernel_23/internal/Filtered_projection_traits_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Has_boolean_tags.h b/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Has_boolean_tags.h index dea84f10..88838ecb 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Has_boolean_tags.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Has_boolean_tags.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel_23/internal/Has_boolean_tags.h $ -// $Id: Has_boolean_tags.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel_23/internal/Has_boolean_tags.h $ +// $Id: include/CGAL/Kernel_23/internal/Has_boolean_tags.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Projection_traits_3.h b/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Projection_traits_3.h index a0a3be69..e63ced35 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Projection_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Projection_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_3.h $ -// $Id: Projection_traits_3.h 12795ba 2022-07-12T18:21:16+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_3.h $ +// $Id: include/CGAL/Kernel_23/internal/Projection_traits_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mariette Yvinec, Sebastien Loriot, Mael Rouxel-Labbé @@ -13,7 +13,7 @@ #define CGAL_INTERNAL_PROJECTION_TRAITS_3_H #include - +#include #include #include #include @@ -250,6 +250,32 @@ class Collinear_are_ordered_along_line_projected_3 } }; +template +class Compare_signed_distance_to_line_projected_3 +{ +public: + typedef typename R::Point_3 Point_3; + typedef typename R::Point_2 Point_2; + typedef typename R::FT RT; + typename R::FT x(const Point_3 &p) const { return Projector::x(p); } + typename R::FT y(const Point_3 &p) const { return Projector::y(p); } + typedef typename R::Comparison_result result_type; + + Point_2 project(const Point_3& p) const + { + return Point_2(x(p),y(p)); + } + + result_type operator()(const Point_3& p, + const Point_3& q, + const Point_3& r, + const Point_3& s) const + { + return typename R::Compare_signed_distance_to_line_2() + ( project(p), project(q), project(r), project(s) ); + } +}; + template class Less_signed_distance_to_line_projected_3 { @@ -259,7 +285,7 @@ class Less_signed_distance_to_line_projected_3 typedef typename R::FT RT; typename R::FT x(const Point_3 &p) const { return Projector::x(p); } typename R::FT y(const Point_3 &p) const { return Projector::y(p); } - typedef bool result_type; + typedef typename R::Boolean result_type; Point_2 project(const Point_3& p) const { @@ -267,16 +293,15 @@ class Less_signed_distance_to_line_projected_3 } result_type operator()(const Point_3& p, - const Point_3& q, - const Point_3& r, - const Point_3& s) const + const Point_3& q, + const Point_3& r, + const Point_3& s) const { return typename R::Less_signed_distance_to_line_2() ( project(p), project(q), project(r), project(s) ); } }; - template class Squared_distance_projected_3 { @@ -403,10 +428,10 @@ class Intersect_projected_3 - boost::optional< boost::variant > + std::optional< std::variant > operator()(const Segment_3& s1, const Segment_3& s2) const { - typedef boost::variant variant_type; + typedef std::variant variant_type; Point_2 s1_source = project(s1.source()); Point_2 s1_target = project(s1.target()); @@ -422,10 +447,10 @@ class Intersect_projected_3 auto o = intersection(s1_2,s2_2); if(! o){ - return boost::none; + return std::nullopt; } - if(const Segment_2* si = boost::get(&*o)){ + if(const Segment_2* si = std::get_if(&*o)){ FT src[3],tgt[3]; //the third coordinate is the midpoint between the points on s1 and s2 FT z1 = s1.source()[dim] + ( alpha(si->source(), s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] )); @@ -443,11 +468,11 @@ class Intersect_projected_3 src[Projector::y_index] = si->source().y(); tgt[Projector::x_index] = si->target().x(); tgt[Projector::y_index] = si->target().y(); - return boost::make_optional(variant_type(Segment_3( Point_3(src[0],src[1],src[2]),Point_3(tgt[0],tgt[1],tgt[2]) ) ) ); + return std::make_optional(variant_type(Segment_3( Point_3(src[0],src[1],src[2]),Point_3(tgt[0],tgt[1],tgt[2]) ) ) ); } - const Point_2* pi = boost::get(&*o); + const Point_2* pi = std::get_if(&*o); FT coords[3]; //compute the third coordinate of the projected intersection point onto 3D segments FT z1 = s1.source()[dim] + ( alpha(*pi, s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] )); @@ -459,7 +484,7 @@ class Intersect_projected_3 Point_3 res(coords[0],coords[1],coords[2]); CGAL_assertion(x(res)==pi->x() && y(res)==pi->y()); - return boost::make_optional(variant_type(res)); + return std::make_optional(variant_type(res)); } }; @@ -910,6 +935,7 @@ class Projection_traits_3 typedef Oriented_side_projected_3 Oriented_side_2; typedef Angle_projected_3 Angle_2; typedef Side_of_oriented_circle_projected_3 Side_of_oriented_circle_2; + typedef Compare_signed_distance_to_line_projected_3 Compare_signed_distance_to_line_2; typedef Less_signed_distance_to_line_projected_3 Less_signed_distance_to_line_2; typedef Side_of_bounded_circle_projected_3 Side_of_bounded_circle_2; typedef Compare_distance_projected_3 Compare_distance_2; @@ -946,7 +972,7 @@ class Projection_traits_3 struct Less_xy_2 { - typedef bool result_type; + typedef typename R::Boolean result_type; bool operator()(const Point_2& p, const Point_2& q) const { Compare_x_2 cx; @@ -960,7 +986,7 @@ class Projection_traits_3 struct Less_yx_2 { - typedef bool result_type; + typedef typename R::Boolean result_type; bool operator()(const Point_2& p, const Point_2& q) const { Compare_y_2 cy; @@ -973,7 +999,7 @@ class Projection_traits_3 }; struct Equal_2 { - typedef bool result_type; + typedef typename R::Boolean result_type; bool operator()(const Point_2& p, const Point_2& q) const { @@ -984,7 +1010,7 @@ class Projection_traits_3 }; struct Left_turn_2 { - typedef bool result_type; + typedef typename R::Boolean result_type; bool operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { @@ -994,7 +1020,7 @@ class Projection_traits_3 }; struct Collinear_2 { - typedef bool result_type; + typedef typename R::Boolean result_type; bool operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { Orientation_2 ori; @@ -1046,6 +1072,10 @@ class Projection_traits_3 less_yx_2_object() const { return Less_yx_2();} + Compare_signed_distance_to_line_2 + compare_signed_distance_to_line_2_object() const + {return Compare_signed_distance_to_line_2();} + Less_signed_distance_to_line_2 less_signed_distance_to_line_2_object() const {return Less_signed_distance_to_line_2();} diff --git a/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Projection_traits_base_3.h b/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Projection_traits_base_3.h index 18532056..3697c9c5 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Projection_traits_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_23/internal/Projection_traits_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_base_3.h $ -// $Id: Projection_traits_base_3.h 561cc66 2022-06-29T12:30:35+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_base_3.h $ +// $Id: include/CGAL/Kernel_23/internal/Projection_traits_base_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -182,12 +182,12 @@ class Projected_intersect_3 CGAL_TIME_PROFILER("Construct Projected_intersect_3") } - boost::optional > + std::optional > operator()(const Segment& s1, const Segment& s2) { CGAL_PROFILER("Projected_intersect_3::operator()") CGAL_TIME_PROFILER("Projected_intersect_3::operator()") - typedef boost::variant variant_type; + typedef std::variant variant_type; const Vector_3 u1 = cross_product(s1.to_vector(), normal); if(u1 == NULL_VECTOR) return K().intersect_3_object()(s1.supporting_line(), s2); @@ -204,9 +204,9 @@ class Projected_intersect_3 #ifdef CGAL_T2_PTB_3_DEBUG std::cerr << "planes_intersection is empty\n"; #endif - return boost::none; + return std::nullopt; } - if(const Line* line = boost::get(&*planes_intersection)) + if(const Line* line = std::get_if(&*planes_intersection)) { // check if the intersection line intersects both segments by // checking if a point on the intersection line is between @@ -222,7 +222,7 @@ class Projected_intersect_3 #ifdef CGAL_T2_PTB_3_DEBUG std::cerr << "intersection not inside\n"; #endif - return boost::none; + return std::nullopt; } else { @@ -233,14 +233,14 @@ class Projected_intersect_3 cross_product(s1.to_vector(), s2.to_vector()))); if(! inter){ - return boost::none; + return std::nullopt; } - if(const Point* point = boost::get(&*inter)){ - return boost::make_optional(variant_type(*point)); + if(const Point* point = std::get_if(&*inter)){ + return std::make_optional(variant_type(*point)); } } } - if(boost::get(&*planes_intersection)) + if(std::get_if(&*planes_intersection)) { #ifdef CGAL_T2_PTB_3_DEBUG std::cerr << "coplanar supporting lines\n"; @@ -255,50 +255,50 @@ class Projected_intersect_3 bool src1_in_s2 = is_inside_segment(s2, s1.source()); bool tgt1_in_s2 = is_inside_segment(s2, s1.target()); - if (src1_in_s2 && tgt1_in_s2) return boost::make_optional(variant_type(s1)); - if (src2_in_s1 && tgt2_in_s1) return boost::make_optional(variant_type(s2)); + if (src1_in_s2 && tgt1_in_s2) return std::make_optional(variant_type(s1)); + if (src2_in_s1 && tgt2_in_s1) return std::make_optional(variant_type(s2)); if (src1_in_s2) { if (src2_in_s1) { if (cross_product(normal, Vector_3(s1.source(), s2.source())) != NULL_VECTOR) - return boost::make_optional(variant_type(Segment(s1.source(), s2.source()))); + return std::make_optional(variant_type(Segment(s1.source(), s2.source()))); else - return boost::make_optional(variant_type((s1.source()))); + return std::make_optional(variant_type((s1.source()))); } if (tgt2_in_s1) { if (cross_product(normal, Vector_3(s1.source(), s2.target())) != NULL_VECTOR) - return boost::make_optional(variant_type(Segment(s1.source(), s2.target()))); + return std::make_optional(variant_type(Segment(s1.source(), s2.target()))); else - return boost::make_optional(variant_type(s1.source())); + return std::make_optional(variant_type(s1.source())); } // should never get here with a Kernel with exact constructions - return boost::make_optional(variant_type(s1.source())); + return std::make_optional(variant_type(s1.source())); } if (tgt1_in_s2) { if (src2_in_s1) { if (cross_product(normal, Vector_3(s1.target(), s2.source())) != NULL_VECTOR) - return boost::make_optional(variant_type(Segment(s1.target(), s2.source()))); + return std::make_optional(variant_type(Segment(s1.target(), s2.source()))); else - return boost::make_optional(variant_type(s1.target())); + return std::make_optional(variant_type(s1.target())); } if (tgt2_in_s1) { if (cross_product(normal, Vector_3(s1.target(), s2.target())) != NULL_VECTOR) - return boost::make_optional(variant_type(Segment(s1.target(), s2.target()))); + return std::make_optional(variant_type(Segment(s1.target(), s2.target()))); else - return boost::make_optional(variant_type(s1.target())); + return std::make_optional(variant_type(s1.target())); } // should never get here with a Kernel with exact constructions - return boost::make_optional(variant_type(s1.target())); + return std::make_optional(variant_type(s1.target())); } - return boost::none; + return std::nullopt; } - return boost::none; + return std::nullopt; } }; // end class Projected_intersect_3 @@ -567,7 +567,7 @@ class Projection_traits_base_3 // Special functor, not in the Kernel concept class Projection_to_plan { - // Remeber: Point_2 is K::Point_3 + // Remember: Point_2 is K::Point_3 const Point_2& plane_point; const Vector_3& normal; public: diff --git a/thirdparty/CGAL/include/CGAL/Kernel_checker.h b/thirdparty/CGAL/include/CGAL/Kernel_checker.h index dae95a0b..1f272a4a 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_checker.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_checker.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel_checker.h $ -// $Id: Kernel_checker.h 371db97 2020-08-20T14:12:16+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel_checker.h $ +// $Id: include/CGAL/Kernel_checker.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Aff_transformationCd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Aff_transformationCd.h index 331f6fd5..f12eb3ee 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Aff_transformationCd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Aff_transformationCd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Aff_transformationCd.h $ -// $Id: Aff_transformationCd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Aff_transformationCd.h $ +// $Id: include/CGAL/Kernel_d/Aff_transformationCd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Seel diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Aff_transformationHd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Aff_transformationHd.h index 53b450e1..4304d02f 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Aff_transformationHd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Aff_transformationHd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Aff_transformationHd.h $ -// $Id: Aff_transformationHd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Aff_transformationHd.h $ +// $Id: include/CGAL/Kernel_d/Aff_transformationHd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Aff_transformation_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Aff_transformation_d.h index e1dab9a7..589012e7 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Aff_transformation_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Aff_transformation_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Aff_transformation_d.h $ -// $Id: Aff_transformation_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Aff_transformation_d.h $ +// $Id: include/CGAL/Kernel_d/Aff_transformation_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Seel diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Cartesian_const_iterator_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Cartesian_const_iterator_d.h index bd19f37c..9b49da6e 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Cartesian_const_iterator_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Cartesian_const_iterator_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Cartesian_const_iterator_d.h $ -// $Id: Cartesian_const_iterator_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Cartesian_const_iterator_d.h $ +// $Id: include/CGAL/Kernel_d/Cartesian_const_iterator_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Seel, Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Cartesian_converter_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Cartesian_converter_d.h index bdc6a34e..e6c7da9b 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Cartesian_converter_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Cartesian_converter_d.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Cartesian_converter_d.h $ -// $Id: Cartesian_converter_d.h 3a0a4a6 2021-12-17T12:22:40+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Cartesian_converter_d.h $ +// $Id: include/CGAL/Kernel_d/Cartesian_converter_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion @@ -102,7 +102,7 @@ class Cartesian_converter_d : public Enum_converter template T operator()(const T t, - typename std::enable_if::value>::type* = nullptr) const + std::enable_if_t::value>* = nullptr) const { return t; } diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionCd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionCd.h index e1b73c07..97a6a558 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionCd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionCd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/DirectionCd.h $ -// $Id: DirectionCd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/DirectionCd.h $ +// $Id: include/CGAL/Kernel_d/DirectionCd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionCd_impl.h b/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionCd_impl.h index d9e85806..8b6b77de 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionCd_impl.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionCd_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/DirectionCd_impl.h $ -// $Id: DirectionCd_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/DirectionCd_impl.h $ +// $Id: include/CGAL/Kernel_d/DirectionCd_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionHd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionHd.h index b8f66c0a..1a7955f7 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionHd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionHd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/DirectionHd.h $ -// $Id: DirectionHd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/DirectionHd.h $ +// $Id: include/CGAL/Kernel_d/DirectionHd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionHd_impl.h b/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionHd_impl.h index 37d64bf9..e43f259d 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionHd_impl.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/DirectionHd_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/DirectionHd_impl.h $ -// $Id: DirectionHd_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/DirectionHd_impl.h $ +// $Id: include/CGAL/Kernel_d/DirectionHd_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Direction_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Direction_d.h index 0c7d2192..99b2e2e4 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Direction_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Direction_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Direction_d.h $ -// $Id: Direction_d.h 127d76c 2020-06-10T17:57:54+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Direction_d.h $ +// $Id: include/CGAL/Kernel_d/Direction_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneCd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneCd.h index da368ac4..ba255029 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneCd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneCd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/HyperplaneCd.h $ -// $Id: HyperplaneCd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/HyperplaneCd.h $ +// $Id: include/CGAL/Kernel_d/HyperplaneCd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Seel diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneCd_impl.h b/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneCd_impl.h index b58ccff7..b54cf991 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneCd_impl.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneCd_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/HyperplaneCd_impl.h $ -// $Id: HyperplaneCd_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/HyperplaneCd_impl.h $ +// $Id: include/CGAL/Kernel_d/HyperplaneCd_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneHd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneHd.h index 1bffafae..acdfb84c 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneHd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneHd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/HyperplaneHd.h $ -// $Id: HyperplaneHd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/HyperplaneHd.h $ +// $Id: include/CGAL/Kernel_d/HyperplaneHd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Seel diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneHd_impl.h b/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneHd_impl.h index 59429e37..97a47769 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneHd_impl.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/HyperplaneHd_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/HyperplaneHd_impl.h $ -// $Id: HyperplaneHd_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/HyperplaneHd_impl.h $ +// $Id: include/CGAL/Kernel_d/HyperplaneHd_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Hyperplane_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Hyperplane_d.h index 2c3ae620..de722c9a 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Hyperplane_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Hyperplane_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Hyperplane_d.h $ -// $Id: Hyperplane_d.h 489e853 2020-06-10T18:25:33+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Hyperplane_d.h $ +// $Id: include/CGAL/Kernel_d/Hyperplane_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Interface_classes.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Interface_classes.h index d1d8c0a0..2e8f2086 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Interface_classes.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Interface_classes.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Interface_classes.h $ -// $Id: Interface_classes.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Interface_classes.h $ +// $Id: include/CGAL/Kernel_d/Interface_classes.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Interval_linear_algebra.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Interval_linear_algebra.h index 4076d840..f7150f8d 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Interval_linear_algebra.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Interval_linear_algebra.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Interval_linear_algebra.h $ -// $Id: Interval_linear_algebra.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Interval_linear_algebra.h $ +// $Id: include/CGAL/Kernel_d/Interval_linear_algebra.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus, Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Iso_box_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Iso_box_d.h index f5ebbe45..6aba826c 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Iso_box_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Iso_box_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Iso_box_d.h $ -// $Id: Iso_box_d.h ab5517e 2021-02-09T09:27:30+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Iso_box_d.h $ +// $Id: include/CGAL/Kernel_d/Iso_box_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Kernel_classesCd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Kernel_classesCd.h index 6e00f055..9a6a1c36 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Kernel_classesCd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Kernel_classesCd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Kernel_classesCd.h $ -// $Id: Kernel_classesCd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Kernel_classesCd.h $ +// $Id: include/CGAL/Kernel_d/Kernel_classesCd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Kernel_classesHd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Kernel_classesHd.h index 4505378b..de464b23 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Kernel_classesHd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Kernel_classesHd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Kernel_classesHd.h $ -// $Id: Kernel_classesHd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Kernel_classesHd.h $ +// $Id: include/CGAL/Kernel_d/Kernel_classesHd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Line_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Line_d.h index 8935bbc2..1d4a9cbe 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Line_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Line_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Line_d.h $ -// $Id: Line_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Line_d.h $ +// $Id: include/CGAL/Kernel_d/Line_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -44,7 +44,7 @@ class Line_d : public Handle_for< Pair_d > { /*{\Mdefinition An instance of data type |Line_d| is an oriented line in -$d$-dimensional Euclidian space.}*/ +$d$-dimensional Euclidean space.}*/ public: diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Line_d_impl.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Line_d_impl.h index fd09b72f..66370909 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Line_d_impl.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Line_d_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Line_d_impl.h $ -// $Id: Line_d_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Line_d_impl.h $ +// $Id: include/CGAL/Kernel_d/Line_d_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Linear_algebraCd_impl.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Linear_algebraCd_impl.h index eb04a11c..fde2180f 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Linear_algebraCd_impl.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Linear_algebraCd_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Linear_algebraCd_impl.h $ -// $Id: Linear_algebraCd_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Linear_algebraCd_impl.h $ +// $Id: include/CGAL/Kernel_d/Linear_algebraCd_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Linear_algebraHd_impl.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Linear_algebraHd_impl.h index e7f6fb17..41fa5d47 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Linear_algebraHd_impl.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Linear_algebraHd_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Linear_algebraHd_impl.h $ -// $Id: Linear_algebraHd_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Linear_algebraHd_impl.h $ +// $Id: include/CGAL/Kernel_d/Linear_algebraHd_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Matrix__.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Matrix__.h index 26d258fb..ba4f7255 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Matrix__.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Matrix__.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Matrix__.h $ -// $Id: Matrix__.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Matrix__.h $ +// $Id: include/CGAL/Kernel_d/Matrix__.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Pair_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Pair_d.h index 4cf607c5..85328205 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Pair_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Pair_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Pair_d.h $ -// $Id: Pair_d.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Pair_d.h $ +// $Id: include/CGAL/Kernel_d/Pair_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/PointCd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/PointCd.h index 2c7ab900..cc35a603 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/PointCd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/PointCd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/PointCd.h $ -// $Id: PointCd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/PointCd.h $ +// $Id: include/CGAL/Kernel_d/PointCd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/PointCd_impl.h b/thirdparty/CGAL/include/CGAL/Kernel_d/PointCd_impl.h index 9ae32655..ee98b22e 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/PointCd_impl.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/PointCd_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/PointCd_impl.h $ -// $Id: PointCd_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/PointCd_impl.h $ +// $Id: include/CGAL/Kernel_d/PointCd_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/PointHd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/PointHd.h index 6251adde..f3e74e72 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/PointHd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/PointHd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/PointHd.h $ -// $Id: PointHd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/PointHd.h $ +// $Id: include/CGAL/Kernel_d/PointHd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Seel diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/PointHd_impl.h b/thirdparty/CGAL/include/CGAL/Kernel_d/PointHd_impl.h index bfa293f4..34acb951 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/PointHd_impl.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/PointHd_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/PointHd_impl.h $ -// $Id: PointHd_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/PointHd_impl.h $ +// $Id: include/CGAL/Kernel_d/PointHd_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Point_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Point_d.h index e0a2bba8..3c45be72 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Point_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Point_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Point_d.h $ -// $Id: Point_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Point_d.h $ +// $Id: include/CGAL/Kernel_d/Point_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Ray_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Ray_d.h index b78b4060..d420e0a4 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Ray_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Ray_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Ray_d.h $ -// $Id: Ray_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Ray_d.h $ +// $Id: include/CGAL/Kernel_d/Ray_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -45,7 +45,7 @@ class Ray_d : public Handle_for< Pair_d > { /*{\Mdefinition An instance of data type |Ray_d| is a ray in $d$-dimensional -Euclidian space. It starts in a point called the source of |\Mvar| and +Euclidean space. It starts in a point called the source of |\Mvar| and it goes to infinity.}*/ public: diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Segment_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Segment_d.h index 9da6435e..4f18163e 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Segment_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Segment_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Segment_d.h $ -// $Id: Segment_d.h 152a084 2021-09-21T13:34:58+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Segment_d.h $ +// $Id: include/CGAL/Kernel_d/Segment_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -45,7 +45,7 @@ class Segment_d : public Handle_for< Pair_d > { /*{\Mdefinition An instance $s$ of the data type |Segment_d| is a directed straight -line segment in $d$-dimensional Euclidian space connecting two points +line segment in $d$-dimensional Euclidean space connecting two points $p$ and $q$. $p$ is called the source point and $q$ is called the target point of $s$, both points are called endpoints of $s$. A segment whose endpoints are equal is called \emph{degenerate}.}*/ diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Sphere_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Sphere_d.h index 66ce7adc..40708ae4 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Sphere_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Sphere_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Sphere_d.h $ -// $Id: Sphere_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Sphere_d.h $ +// $Id: include/CGAL/Kernel_d/Sphere_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -47,6 +47,7 @@ class Sphere_d_rep { public: Sphere_d_rep() : cp(0) {} Sphere_d_rep(int d) : P(d), cp(0) {} + Sphere_d_rep(int d, Orientation orient) : P(d), orient(orient), cp(0) {} template Sphere_d_rep(int d, ForwardIterator first, ForwardIterator last) : @@ -109,14 +110,13 @@ typedef typename std::vector< Point_d >::const_iterator point_iterator; /*{\Mcreation 4}*/ -Sphere_d(int d = 0) : Base( Rep(d+1) ) + Sphere_d(int d = 0) : Base( Rep(d+1, ZERO) ) /*{\Mcreate introduces a variable |\Mvar| of type |\Mname|. |\Mvar| is initialized to the empty sphere centered at the origin of $d$-dimensional space. }*/ { Point_d p(d); for (int i = 0; i <= d; i++) ptr()->P[i] = p; - ptr()->orient = ZERO; ptr()->cp = new Point_d(p); } @@ -148,7 +148,7 @@ point_iterator points_end() const { return ptr()->P.end(); } /*{\Mop returns an iterator pointing beyond the last defining point.}*/ bool is_degenerate() const { return (ptr()->orient == CGAL::ZERO); } -/*{\Mop returns true iff the defining points are not full dimenional.}*/ +/*{\Mop returns true iff the defining points are not full dimensional.}*/ bool is_legal() const /*{\Mop returns true iff the set of defining points is legal. diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Tuple_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Tuple_d.h index 4fb288c4..2c230c3c 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Tuple_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Tuple_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Tuple_d.h $ -// $Id: Tuple_d.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Tuple_d.h $ +// $Id: include/CGAL/Kernel_d/Tuple_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Seel diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/VectorCd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/VectorCd.h index 4a791b0f..c6f9db91 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/VectorCd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/VectorCd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/VectorCd.h $ -// $Id: VectorCd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/VectorCd.h $ +// $Id: include/CGAL/Kernel_d/VectorCd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Seel diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/VectorCd_impl.h b/thirdparty/CGAL/include/CGAL/Kernel_d/VectorCd_impl.h index ba9ace19..f2fd6dc2 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/VectorCd_impl.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/VectorCd_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/VectorCd_impl.h $ -// $Id: VectorCd_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/VectorCd_impl.h $ +// $Id: include/CGAL/Kernel_d/VectorCd_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/VectorHd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/VectorHd.h index ec48c745..2934f8ce 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/VectorHd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/VectorHd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/VectorHd.h $ -// $Id: VectorHd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/VectorHd.h $ +// $Id: include/CGAL/Kernel_d/VectorHd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/VectorHd_impl.h b/thirdparty/CGAL/include/CGAL/Kernel_d/VectorHd_impl.h index f15b858d..8d5414a1 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/VectorHd_impl.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/VectorHd_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/VectorHd_impl.h $ -// $Id: VectorHd_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/VectorHd_impl.h $ +// $Id: include/CGAL/Kernel_d/VectorHd_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Vector__.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Vector__.h index 9193ae9a..7414597a 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Vector__.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Vector__.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Vector__.h $ -// $Id: Vector__.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Vector__.h $ +// $Id: include/CGAL/Kernel_d/Vector__.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/Vector_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/Vector_d.h index 170a77a3..3d3a9d45 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/Vector_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/Vector_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/Vector_d.h $ -// $Id: Vector_d.h 127d76c 2020-06-10T17:57:54+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/Vector_d.h $ +// $Id: include/CGAL/Kernel_d/Vector_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Seel diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/debug.h b/thirdparty/CGAL/include/CGAL/Kernel_d/debug.h index 365d6770..ecf4078a 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/debug.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/debug.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/debug.h $ -// $Id: debug.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/debug.h $ +// $Id: include/CGAL/Kernel_d/debug.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/function_objects.h b/thirdparty/CGAL/include/CGAL/Kernel_d/function_objects.h index c1dba81a..56318d92 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/function_objects.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/function_objects.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/function_objects.h $ -// $Id: function_objects.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/function_objects.h $ +// $Id: include/CGAL/Kernel_d/function_objects.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -76,22 +76,22 @@ class Intersect template struct result - { typedef boost::optional< boost::variant< Point_d, Line_d > > type; }; + { typedef std::optional< std::variant< Point_d, Line_d > > type; }; template struct result - { typedef boost::optional< boost::variant< Point_d, Segment_d > > type; }; + { typedef std::optional< std::variant< Point_d, Segment_d > > type; }; template struct result : result { }; template struct result - { typedef boost::optional< boost::variant< Point_d, Segment_d > > type; }; + { typedef std::optional< std::variant< Point_d, Segment_d > > type; }; template struct result - { typedef boost::optional< boost::variant< Point_d, Ray_d > > type; }; + { typedef std::optional< std::variant< Point_d, Ray_d > > type; }; template struct result : result @@ -99,7 +99,7 @@ class Intersect template struct result - { typedef boost::optional< boost::variant< Point_d, Segment_d > > type; }; + { typedef std::optional< std::variant< Point_d, Segment_d > > type; }; template struct result : result @@ -107,25 +107,25 @@ class Intersect template struct result - { typedef boost::optional< boost::variant< Point_d, Segment_d, Ray_d > > type; }; + { typedef std::optional< std::variant< Point_d, Segment_d, Ray_d > > type; }; template struct result - { typedef boost::optional< boost::variant< Point_d, Line_d > > type; }; + { typedef std::optional< std::variant< Point_d, Line_d > > type; }; template struct result : result { }; template struct result - { typedef boost::optional< boost::variant< Point_d, Ray_d > > type; }; + { typedef std::optional< std::variant< Point_d, Ray_d > > type; }; template struct result : result { }; template struct result - { typedef boost::optional< boost::variant< Point_d, Segment_d > > type; }; + { typedef std::optional< std::variant< Point_d, Segment_d > > type; }; template struct result : result { }; diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/function_objectsCd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/function_objectsCd.h index 6cecc3f0..54032b54 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/function_objectsCd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/function_objectsCd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/function_objectsCd.h $ -// $Id: function_objectsCd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/function_objectsCd.h $ +// $Id: include/CGAL/Kernel_d/function_objectsCd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -279,7 +279,7 @@ class OrientationCd * subspace on which the (full k-dim) predicates answers POSITIVE or NEGATIVE. * If no such subspace is found, return COPLANAR. * IMPORTANT TODO: Current implementation is VERY bad with filters: if one - * determinant fails in the filtering step, then all the subsequent ones wil be + * determinant fails in the filtering step, then all the subsequent ones will be * in exact arithmetic :-( * TODO: store the axis-aligned subspace that was found in order to avoid * re-searching for it for subsequent calls to operator() diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/function_objectsHd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/function_objectsHd.h index a30a81c3..ff7f4b93 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/function_objectsHd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/function_objectsHd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/function_objectsHd.h $ -// $Id: function_objectsHd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/function_objectsHd.h $ +// $Id: include/CGAL/Kernel_d/function_objectsHd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/interface_macros_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/interface_macros_d.h index 923d40e2..53832439 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/interface_macros_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/interface_macros_d.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/interface_macros_d.h $ -// $Id: interface_macros_d.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/interface_macros_d.h $ +// $Id: include/CGAL/Kernel_d/interface_macros_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Herve Bronnimann, Sylvain Pion, Susan Hert @@ -16,7 +16,7 @@ // It's aimed at being included from within a kernel traits class, this // way we share more code. -// It is the responsability of the including file to correctly set the 2 +// It is the responsibility of the including file to correctly set the 2 // macros CGAL_Kernel_pred, CGAL_Kernel_cons and CGAL_Kernel_obj. // And they are #undefed at the end of this file. diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/intersection_objectsCd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/intersection_objectsCd.h index ea60839c..2224dd81 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/intersection_objectsCd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/intersection_objectsCd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/intersection_objectsCd.h $ -// $Id: intersection_objectsCd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/intersection_objectsCd.h $ +// $Id: include/CGAL/Kernel_d/intersection_objectsCd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/intersection_objectsHd.h b/thirdparty/CGAL/include/CGAL/Kernel_d/intersection_objectsHd.h index 3759965c..0bb1acb0 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/intersection_objectsHd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/intersection_objectsHd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/intersection_objectsHd.h $ -// $Id: intersection_objectsHd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/intersection_objectsHd.h $ +// $Id: include/CGAL/Kernel_d/intersection_objectsHd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/intersection_objects_d.h b/thirdparty/CGAL/include/CGAL/Kernel_d/intersection_objects_d.h index 86631343..443b7624 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/intersection_objects_d.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/intersection_objects_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/intersection_objects_d.h $ -// $Id: intersection_objects_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/intersection_objects_d.h $ +// $Id: include/CGAL/Kernel_d/intersection_objects_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_d/simple_objects.h b/thirdparty/CGAL/include/CGAL/Kernel_d/simple_objects.h index b812ed73..75c75a09 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_d/simple_objects.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_d/simple_objects.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Kernel_d/simple_objects.h $ -// $Id: simple_objects.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Kernel_d/simple_objects.h $ +// $Id: include/CGAL/Kernel_d/simple_objects.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_profiler.h b/thirdparty/CGAL/include/CGAL/Kernel_profiler.h index 1511becc..da8d496e 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_profiler.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_profiler.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Kernel_profiler.h $ -// $Id: Kernel_profiler.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Kernel_profiler.h $ +// $Id: include/CGAL/Kernel_profiler.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Kernel_traits.h b/thirdparty/CGAL/include/CGAL/Kernel_traits.h index 4cc94a4d..2cd72301 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_traits.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_traits.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Kernel_traits.h $ -// $Id: Kernel_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Kernel_traits.h $ +// $Id: include/CGAL/Kernel_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,6 @@ #include #include -#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Kernel_traits_fwd.h b/thirdparty/CGAL/include/CGAL/Kernel_traits_fwd.h index de318295..b4ddef80 100644 --- a/thirdparty/CGAL/include/CGAL/Kernel_traits_fwd.h +++ b/thirdparty/CGAL/include/CGAL/Kernel_traits_fwd.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/Kernel_traits_fwd.h $ -// $Id: Kernel_traits_fwd.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/Kernel_traits_fwd.h $ +// $Id: include/CGAL/Kernel_traits_fwd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // diff --git a/thirdparty/CGAL/include/CGAL/LEDA_arithmetic_kernel.h b/thirdparty/CGAL/include/CGAL/LEDA_arithmetic_kernel.h index f74ee5aa..17c660f2 100644 --- a/thirdparty/CGAL/include/CGAL/LEDA_arithmetic_kernel.h +++ b/thirdparty/CGAL/include/CGAL/LEDA_arithmetic_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arithmetic_kernel/include/CGAL/LEDA_arithmetic_kernel.h $ -// $Id: LEDA_arithmetic_kernel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arithmetic_kernel/include/CGAL/LEDA_arithmetic_kernel.h $ +// $Id: include/CGAL/LEDA_arithmetic_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Hemmer diff --git a/thirdparty/CGAL/include/CGAL/LEDA_basic.h b/thirdparty/CGAL/include/CGAL/LEDA_basic.h index 0c698508..a58146fc 100644 --- a/thirdparty/CGAL/include/CGAL/LEDA_basic.h +++ b/thirdparty/CGAL/include/CGAL/LEDA_basic.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/LEDA/include/CGAL/LEDA_basic.h $ -// $Id: LEDA_basic.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/LEDA/include/CGAL/LEDA_basic.h $ +// $Id: include/CGAL/LEDA_basic.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Labeled_mesh_domain_3.h b/thirdparty/CGAL/include/CGAL/Labeled_mesh_domain_3.h index b68019b1..35f59a14 100644 --- a/thirdparty/CGAL/include/CGAL/Labeled_mesh_domain_3.h +++ b/thirdparty/CGAL/include/CGAL/Labeled_mesh_domain_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h $ -// $Id: Labeled_mesh_domain_3.h 61e3637 2022-04-25T14:04:11+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h $ +// $Id: include/CGAL/Labeled_mesh_domain_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -26,15 +26,15 @@ #include #include -#include #include #include #include #include +#include -#include -#include +#include +#include // support for `CGAL::Image_3` #include @@ -43,14 +43,16 @@ // support for implicit functions #include - -#include -#include -#include +#include #ifdef CGAL_MESH_3_VERBOSE # include #endif -#include +#include + +#include +#include + +#include namespace CGAL { namespace Mesh_3 { @@ -76,7 +78,7 @@ namespace internal { template void operator()(T*) const { } }; - /// Returns a box enclosing image \c im + // Returns a box enclosing image `im` inline Bbox_3 compute_bounding_box(const Image_3& im) { return Bbox_3(-1+im.tx(),-1+im.ty(),-1+im.tz(), @@ -121,14 +123,75 @@ namespace internal { } }; + // Detect_features_in_domain + template + struct Detect_features_in_domain { + + std::vector> + operator()(const CGAL::Image_3& image, CGAL::Image_3& weights, DetectFunctor functor) const { +#if defined(BOOST_MSVC) && (BOOST_MSVC < 1910) //before msvc2017 + if(weights.is_valid()) + return functor.operator()(image, weights); + else + return functor.operator()(image); +#else + if(weights.is_valid()) + return functor.template operator()(image, weights); + else + return functor.template operator()(image); +#endif + } + }; + // specialization for `Null_functor`: create the default functor + template + struct Detect_features_in_domain { + std::vector> + operator()(const CGAL::Image_3&, CGAL::Image_3&, Null_functor) const { + return std::vector>(); + } + }; + + template + std::vector> + detect_features(const CGAL::Image_3& image, CGAL::Image_3& weights, DetectFunctor functor) + { + Detect_features_in_domain detector; + return detector(image, weights, functor); + } + + template + struct Add_features_in_domain { + template + void operator()(const CGAL::Image_3&, CGAL::Image_3&, MeshDomain&, const InputFeatureRange&, DetectFunctor) + {} + }; + + template<> + struct Add_features_in_domain + { + template + void operator()(const CGAL::Image_3& image, + CGAL::Image_3& weights, + MeshDomain& domain, + const InputFeatureRange& input_features, + DetectFunctor functor) + { + using P = typename MeshDomain::Point_3; + auto detected_feature_range + = CGAL::Mesh_3::internal::detect_features

    (image, weights, functor); + + CGAL::merge_and_snap_polylines(image, detected_feature_range, input_features); + + if (!input_features.empty()) + domain.add_features(input_features.begin(), input_features.end()); + domain.add_features(detected_feature_range.begin(), detected_feature_range.end()); + } + }; + } // end namespace CGAL::Mesh_3::internal } // end namespace CGAL::Mesh_3 -struct Null_subdomain_index { - template - bool operator()(const T& x) const { return 0 == x; } -}; - +#ifndef DOXYGEN_RUNNING template struct Construct_pair_from_subdomain_indices { typedef std::pair result_type; @@ -137,11 +200,15 @@ struct Construct_pair_from_subdomain_indices { return result_type(a, b); } }; // end class template Construct_pair_from_subdomain_indices +#endif + +namespace details +{ template -class Labeled_mesh_domain_3_impl_details +class Labeled_mesh_domain_3_impl { protected: typedef Surface_patch_index_ Surface_patch_index; @@ -150,7 +217,7 @@ class Labeled_mesh_domain_3_impl_details typedef typename Geom_traits::Iso_cuboid_3 Iso_cuboid_3; typedef typename Geom_traits::FT FT; typedef std::shared_ptr CGAL_Random_share_ptr_t; - /// Returns squared error bound from \c bbox and \c error + // Returns squared error bound from `bbox` and `error` FT squared_error_bound(const Iso_cuboid_3& bbox, const FT& error) const { typename Geom_traits::Compute_squared_distance_3 squared_distance = @@ -181,28 +248,11 @@ class Labeled_mesh_domain_3_impl_details return Construct_pair_from_subdomain_indices(); } - template - Labeled_mesh_domain_3_impl_details(ArgumentPack const& args) - : function_(args[parameters::function]) - , bbox_(iso_cuboid(args[parameters::bounding_object])) - , cstr_s_p_index(args[parameters::construct_surface_patch_index | - construct_pair_functor()]) - , null(args[parameters::null_subdomain_index | Null_subdomain_index()]) - , p_rng_(args[parameters::p_rng|0] == 0 ? - CGAL_Random_share_ptr_t(new CGAL::Random(0)) : - CGAL_Random_share_ptr_t(args[parameters::p_rng|(CGAL::Random*)(0)], - Mesh_3::internal::Do_not_delete())) - , squared_error_bound_ - ( squared_error_bound(bbox_, - args[parameters::relative_error_bound|FT(1e-3)])) - { - } - template - Labeled_mesh_domain_3_impl_details(const Function& f, + Labeled_mesh_domain_3_impl(const Function& f, const Bounding_object& bounding, const FT& error_bound, Construct_surface_patch_index cstr_s_p_i, @@ -218,68 +268,137 @@ class Labeled_mesh_domain_3_impl_details , squared_error_bound_(squared_error_bound(bbox_,error_bound)) {} - /// The function which answers subdomain queries + // The function which answers subdomain queries typedef std::function Function; Function function_; - /// The bounding box + // The bounding box const Iso_cuboid_3 bbox_; typedef std::function< Surface_patch_index(Subdomain_index, Subdomain_index)> Construct_surface_patch_index; Construct_surface_patch_index cstr_s_p_index; - /// The functor that decides which sub-domain indices correspond to the - /// outside of the domain. + // The functor that decides which sub-domain indices correspond to the + // outside of the domain. typedef std::function Null; Null null; - /// The random number generator used by Construct_initial_points + // The random number generator used by Construct_initial_points CGAL_Random_share_ptr_t p_rng_; - /// Error bound relative to sphere radius + // Error bound relative to sphere radius FT squared_error_bound_; -}; // Labeled_mesh_domain_3_impl_details - -/** - * \class Labeled_mesh_domain_3 - * - * Function f must take his values into N. - * Let p be a Point. - * - f(p)=0 means that p is outside domain. - * - f(p)=a, a!=0 means that p is inside subdomain a. - * - * Any boundary facet is labelled , with a, where b!=0. - */ +}; // Labeled_mesh_domain_3_impl + +} // namespace details + +/*! +\ingroup PkgMesh3Domains + +\brief The class `Labeled_mesh_domain_3` implements indexed domains. + +This class is a model of concept `MeshDomain_3`. + +Any boundary facet is labeled , with a, where b!=0. + +This class includes a labeling function that provides the index of the subdomain in which any +query point lies. An intersection between a segment and bounding +surfaces is detected when both segment endpoints are associated with different +values of subdomain indices. The intersection is then constructed by bisection. +The bisection stops when the query segment is shorter than an error bound +`e` given by the product of the +length of the diagonal of the bounding box (in world coordinates), or the radius of the bounding sphere, and +a relative error bound passed as argument to the constructor of `Labeled_mesh_domain_3`. + +This class has a constructor taking a labeling function. It has also three +static template member functions that act as named constructors: +

    + +\tparam BGT is a geometric traits class that provides +the basic operations to implement +intersection tests and intersection computations +through a bisection method. This parameter must be instantiated +with a model of the concept `BisectionGeometricTraits_3`. + +\cgalHeading{Labeling function} + +A labeling function `f` must return `0` if the point isn't located in any subdomain. The return type of labeling functions is an integer. + +Let `p` be a Point. +
      +
    • `f(p)=0` means that `p` is outside domain.
    • +
    • `f(p)=a`, `a!=0` means that `p` is inside subdomain `a`.
    • +
    +`CGAL::Implicit_multi_domain_to_labeling_function_wrapper` is a good candidate for this template parameter +if there are several components to mesh. + +The function type can be any model of the concept `Callable` compatible with the signature +`Subdomain_index(const %Point_3&)`: it can be a function, a function object, a lambda expression... +that takes a `%Point_3` as argument, and returns a type convertible to `Subdomain_index`. + +\cgalModels{MeshDomain_3} + +\sa `CGAL::Implicit_multi_domain_to_labeling_function_wrapper` +\sa `CGAL::make_mesh_3()` + +*/ template > -class Labeled_mesh_domain_3 : - protected Labeled_mesh_domain_3_impl_details +class Labeled_mesh_domain_3 +#ifndef DOXYGEN_RUNNING + : protected details::Labeled_mesh_domain_3_impl +#endif { public: //------------------------------------------------------- // Index Types //------------------------------------------------------- - /// Type of indexes for cells of the input complex + // Type of indexes for cells of the input complex +/// \name Types +///@{ + /// The subdomain index of this model of `MeshDomain_3` typedef Subdomain_index_ Subdomain_index; - typedef boost::optional Subdomain; + // +#ifdef DOXYGEN_RUNNING + /// The type of object that stores the function using type-erasure. + typedef std::function< Subdomain_index(const Point_3 &)> Labeling_function; +///@} + +/// \name Types imported from the geometric traits class +///@{ + /// The point type of the geometric traits class + typedef typename Geom_traits::Point_3 Point_3; + /// The sphere type of the geometric traits class + typedef typename Geom_traits::Sphere_3 Sphere_3; + /// The iso-cuboid type of the geometric traits class + typedef typename Geom_traits::Iso_cuboid_3 Iso_cuboid_3; + /// The number type (a field type) of the geometric traits class + typedef typename Geom_traits::FT FT; +///@} +#else // DOXYGEN_RUNNING + typedef std::optional Subdomain; - /// Type of indexes for cells of the input complex + // Type of indexes for cells of the input complex typedef Surface_patch_index_ Surface_patch_index; - typedef boost::optional Surface_patch; + typedef std::optional Surface_patch; - /// Type of indexes to characterize the lowest dimensional face of the input - /// complex on which a vertex lie + // Type of indexes to characterize the lowest dimensional face of the input + // complex on which a vertex lie typedef typename CGAL::Mesh_3::internal:: Index_generator::Index Index; private: - typedef Labeled_mesh_domain_3_impl_details Impl_details; typedef typename Impl_details::Null Null; typedef typename Impl_details::Construct_surface_patch_index @@ -287,7 +406,7 @@ class Labeled_mesh_domain_3 : typedef typename Impl_details::Function Function; public: - /// Geometric object types + // Geometric object types typedef typename BGT::Point_3 Point_3; typedef typename BGT::Segment_3 Segment_3; typedef typename BGT::Ray_3 Ray_3; @@ -310,208 +429,588 @@ class Labeled_mesh_domain_3 : typedef typename BGT::FT FT; typedef BGT Geom_traits; - - - BOOST_PARAMETER_CONSTRUCTOR(Labeled_mesh_domain_3, - (Impl_details), - parameters::tag, - (required - (function_,(Function)) - (bounding_object_,*) - ) - (optional - (relative_error_bound_, (const FT&)) - (p_rng_, (CGAL::Random*)) - (null_subdomain_index_,(Null)) - (construct_surface_patch_index_, - (Construct_surface_patch_index)) - ) - ) using Impl_details::construct_pair_functor; - /** - * Backward-compatibility constructors, with `null_subdomain_index` as - * fourth parameter. - * @{ +#endif // DOXYGEN_RUNNING + +/// \name Creation +/// @{ + /*! \brief Construction from a function, a bounding object and a relative error bound. + * + * \tparam Function a type compatible with `Labeling_function` + * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * \tparam Bounding_object either a bounding sphere (of type `Sphere_3`), a bounding box (type `Bbox_3`), + * or a bounding `Iso_cuboid_3` + * + * \param function the labeling function + * \param bounding_object the bounding object bounding the meshable space. + * \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{relative_error_bound} + * \cgalParamDescription{the relative error bound used to compute intersection points between the implicit surface and query segments. + * The bisection is stopped when the length of the intersected segment is less than the product + * of `relative_error_bound` by the diameter of the bounding object.} + * \cgalParamDefault{FT(1e-3)} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + * \cgalHeading{Example} + * From the example (\ref Mesh_3/mesh_implicit_domains_2.cpp): + * \snippet Mesh_3/mesh_implicit_domains_2.cpp Domain creation */ - Labeled_mesh_domain_3(const Function& f, - const Sphere_3& bounding_sphere, - const FT& error_bound = FT(1e-3), - Null null = Null_subdomain_index(), - CGAL::Random* p_rng = nullptr) - : Impl_details(f, bounding_sphere, - error_bound, - construct_pair_functor(), - null, p_rng) {} - - Labeled_mesh_domain_3(const Function& f, - const Bbox_3& bbox, - const FT& error_bound = FT(1e-3), - Null null = Null_subdomain_index(), - CGAL::Random* p_rng = nullptr) - : Impl_details(f, bbox, - error_bound, - construct_pair_functor(), - null, p_rng) {} - - Labeled_mesh_domain_3(const Function& f, - const Iso_cuboid_3& bbox, - const FT& error_bound = FT(1e-3), - Null null = Null_subdomain_index(), - CGAL::Random* p_rng = nullptr) - : Impl_details(f, bbox, error_bound, - construct_pair_functor(), - null, p_rng) + template + Labeled_mesh_domain_3(const Function& function, + const Bounding_object& bounding_object, + const CGAL_NP_CLASS& np = parameters::default_values() +#ifndef DOXYGEN_RUNNING + , typename std::enable_if>::type* = nullptr +#endif // DOXYGEN_RUNNING + ) + :Impl_details(function, + bounding_object, + parameters::choose_parameter(parameters::get_parameter(np, internal_np::error_bound), FT(1e-3)), + parameters::choose_parameter(parameters::get_parameter(np, internal_np::surface_patch_index), construct_pair_functor()), + parameters::choose_parameter(parameters::get_parameter(np, internal_np::null_subdomain_index_param), Null_subdomain_index()), + parameters::choose_parameter(parameters::get_parameter(np, internal_np::rng), nullptr)) + {} +///@} + +#ifndef DOXYGEN_RUNNING + template + Labeled_mesh_domain_3(const CGAL_NP_CLASS& np) + :Impl_details(parameters::get_parameter(np, internal_np::function_param), + parameters::get_parameter(np, internal_np::bounding_object_param), + parameters::choose_parameter(parameters::get_parameter(np, internal_np::error_bound), FT(1e-3)), + parameters::choose_parameter(parameters::get_parameter(np, internal_np::surface_patch_index), construct_pair_functor()), + parameters::choose_parameter(parameters::get_parameter(np, internal_np::null_subdomain_index_param), Null_subdomain_index()), + parameters::choose_parameter(parameters::get_parameter(np, internal_np::rng), nullptr)) + {} + + // Overload handling parameters passed with operator= + template + Labeled_mesh_domain_3(const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) + : Labeled_mesh_domain_3(internal_np::combine_named_parameters(np1, np2, nps...)) {} - /** - * @} - */ - /// Named constructors - /// @{ -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable: 4003) -#endif - // see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS - - - BOOST_PARAMETER_MEMBER_FUNCTION( - (Labeled_mesh_domain_3), - static create_gray_image_mesh_domain, - parameters::tag, - (required - (image_, (const CGAL::Image_3&)) - ) - (optional - (iso_value_, *, 0) - (value_outside_, *, 0) - (relative_error_bound_, (const FT&), - FT(1e-3)) - (p_rng_, (CGAL::Random*), (CGAL::Random*)(0)) - (image_values_to_subdomain_indices_, *, - Null_functor()) - (null_subdomain_index_,*,Null_functor()) - (construct_surface_patch_index_, *, - Null_functor()) - ) - ) +#ifndef CGAL_NO_DEPRECATED_CODE + template +#if !defined(BOOST_MSVC) + CGAL_DEPRECATED +#endif // BOOST_MSVC + Labeled_mesh_domain_3(const Function& function, + const Bounding_object& bounding_object, + double error_bound, + typename std::enable_if>::type* = nullptr) + : Labeled_mesh_domain_3(function, + bounding_object, + parameters::relative_error_bound(error_bound)) + {} +#endif // CGAL_NO_DEPRECATED_CODE +#endif // DOXYGEN_RUNNING + +/// \name Creation of domains from 3D images +/// @{ + /*! + * \brief Construction from a 3D gray image + * + * This static method is a named constructor. It constructs a domain + * described by a 3D gray image. A 3D gray image is a grid of voxels, + * where each voxel is associated with a gray level value. Unless otherwise specified by the parameter `image_values_to_subdom_indices`, the domain to + * be discretized is the union of voxels that lie inside a surface + * described by an isolevel value, called \a isovalue. The voxels lying + * inside the domain have gray level values that are larger than the + * isovalue. + * + * The value of voxels is interpolated to a gray level value at any query point. + * + * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * \param image_ the input 3D image. + * \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{iso_value} + * \cgalParamDescription{the isovalue, inside + * `image`, of the surface describing the boundary of the object to be + * meshed.} + * \cgalParamDefault{0} + * \cgalParamNEnd + * \cgalParamNBegin{image_values_to_subdomain_indices} + * \cgalParamDescription{a function or a function object, compatible with the signature + * `Subdomain_index(double)`. This function returns the subdomain index + * corresponding to a pixel value. If this parameter is used, then the + * parameter `iso_value` is ignored.} + * \cgalParamDefault{Null_functor()} + * \cgalParamNEnd + * \cgalParamNBegin{value_outside} + * \cgalParamDescription{the value attached to voxels + * outside of the domain to be meshed. It should be lower than + * `iso_value`.} + * \cgalParamDefault{0} + * \cgalParamNEnd + * \cgalParamNBegin{relative_error_bound} + * \cgalParamDescription{ is the relative error + * bound, relative to the diameter of the box of the image.} + * \cgalParamDefault{FT(1e-3)} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + * \cgalHeading{Examples} + * + * From the example (\ref Mesh_3/mesh_3D_gray_image.cpp): + * + * \snippet Mesh_3/mesh_3D_gray_image.cpp Domain creation + * + * From the example (\ref Mesh_3/mesh_3D_gray_vtk_image.cpp): + * + * \snippet Mesh_3/mesh_3D_gray_vtk_image.cpp Domain creation + * + */ + template + static Labeled_mesh_domain_3 create_gray_image_mesh_domain(const CGAL::Image_3& image_, const CGAL_NP_CLASS& np = parameters::default_values()) { + using parameters::get_parameter; + using parameters::choose_parameter; + auto iso_value_ = choose_parameter(get_parameter(np, internal_np::iso_value_param), 0); + auto value_outside_ = choose_parameter(get_parameter(np, internal_np::voxel_value), 0); + FT relative_error_bound_ = choose_parameter(get_parameter(np, internal_np::error_bound), FT(1e-3)); + auto image_values_to_subdomain_indices_ = choose_parameter(get_parameter(np, internal_np::image_subdomain_index), Null_functor()); + CGAL::Random* p_rng_ = choose_parameter(get_parameter(np, internal_np::rng), nullptr); + auto null_subdomain_index_ = choose_parameter(get_parameter(np, internal_np::null_subdomain_index_param), Null_functor()); + auto construct_surface_patch_index_ = choose_parameter(get_parameter(np, internal_np::surface_patch_index), Null_functor()); namespace p = CGAL::parameters; return Labeled_mesh_domain_3 - (create_gray_image_wrapper - (image_, - iso_value_, - image_values_to_subdomain_indices_, - value_outside_), - Mesh_3::internal::compute_bounding_box(image_), + (p::function = create_gray_image_wrapper + (image_, + iso_value_, + image_values_to_subdomain_indices_, + value_outside_), + p::bounding_object = Mesh_3::internal::compute_bounding_box(image_), + p::relative_error_bound = relative_error_bound_, + p::p_rng = p_rng_, + p::null_subdomain_index = + create_null_subdomain_index(null_subdomain_index_), + p::construct_surface_patch_index = + create_construct_surface_patch_index(construct_surface_patch_index_)); + + } + + /*! + * \brief Construction from a 3D labeled image + * + * This static method is a named constructor. It constructs a + * domain described by a 3D labeled image. A 3D labeled image is a grid + * of voxels, where each voxel is associated with an index (a subdomain + * index) characterizing the subdomain in which the voxel lies. The + * domain to be discretized is the union of voxels that have non-zero + * values. + * + * \returns either a `Labeled_mesh_domain_3`, + * or a `Mesh_domain_with_polyline_features_3` + * depending on whether one or more of the named parameters + * `features_detector` and `input_features` are provided. + * + * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * \param image_ the input 3D image. + * \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{weights} + * \cgalParamDescription{a reference to an input 3D image that provides + * weights associated to each voxel (the word type is `unsigned char`, + * and the voxels values are integers between 0 and 255). + * The weights image can be generated with `CGAL::Mesh_3::generate_label_weights()`. + * Its dimensions must be the same as the dimensions of `parameters::image`.} + * \cgalParamDefault{CGAL::Image_3()} + * \cgalParamType{CGAL::Image_3&} + * \cgalParamExtra{if `features_detector` is provided, `weights` should be modified accordingly. + * The available functors described in See \ref PkgMesh3FeatureDetection + * implement the necessary modifications.} + * \cgalParamExtra{if `input_features` is provided, `weights` should be modified accordingly + * to keep consistency of the output `MeshDomainWithFeatures_3`} + * \cgalParamNEnd + * \cgalParamNBegin{value_outside} + * \cgalParamDescription{the value attached to voxels + * outside of the domain to be meshed. It should be lower than + * `iso_value`.} + * \cgalParamDefault{0} + * \cgalParamNEnd + * + * \cgalParamNBegin{relative_error_bound} + * \cgalParamDescription{ is the relative error + * bound, relative to the diameter of the box of the image.} + * \cgalParamDefault{FT(1e-3)} + * \cgalParamNEnd + * + * \cgalParamNBegin{features_detector} + * \cgalParamDescription{ a functor that implements + * `std::vector> operator()(const Image_3& img) const`, + * and `std::vector> operator()(const Image_3& img, Image_3& weights) const`, + * where `%Point` matches the mesh domain point type, + * that both return a range of detected polyline features for feature protection. + * Only one implementation is used, depending on whether the named parameter `weights` + * is provided or not. + * Polyline features are added to the domain for further feature protection. + * See \ref PkgMesh3FeatureDetection for available functors.} + * \cgalParamDefault{CGAL::Null_functor()} + * \cgalParamExtra{The return type of the function depends on whether this parameter + * or `input_features` are provided or not.} + * \cgalParamExtra{If `weights` is provided, it must either be adapted to the detected features, + * or post-processed during feature detection to keep consistency + * of the output `MeshDomainWithFeatures_3`. + * Available functors implement the necessary modifications.} + * \cgalParamNEnd + * + * \cgalParamNBegin{input_features} + * \cgalParamDescription{ a `Range` of polyline features, represented as `Range`s of `Point_3`. + * Polyline features are added to the domain for further feature protection. + * Input polyline features must be different from the detected features + * and can intersect only at vertices, if they do. Otherwise, + * the meshing process may not terminate.} + * \cgalParamDefault{`std::vector>()`} + * \cgalParamExtra{The return type of the function depends on whether this parameter + or `input_features` are provided or not.} + * \cgalParamExtra{It is recommended to pass a const-reference for this parameter, + * possibly using `std::cref(polylines_range)` to avoid useless copies.} + * \cgalParamExtra{If `weights` is provided, it must be adapted to the input features, + * to keep consistency of the output `MeshDomainWithFeatures_3`} + * \cgalParamNEnd + * + * \cgalNamedParamsEnd + * + * \cgalHeading{Example} + * + * From the example (\ref Mesh_3/mesh_3D_image.cpp): + * + * \snippet Mesh_3/mesh_3D_image.cpp Domain creation + * + * From the example (\ref Mesh_3/mesh_3D_weighted_image.cpp), + * where the labeled image is used with a precomputed 3D image of weights : + * + * \snippet Mesh_3/mesh_3D_weighted_image.cpp Domain creation + * + * From the example (\ref Mesh_3/mesh_3D_image_with_detection_of_features.cpp) + * where the features are detected in `image`: + * + * \snippet Mesh_3/mesh_3D_image_with_detection_of_features.cpp Domain creation + * + * From the example (\ref Mesh_3/mesh_3D_image_with_input_features.cpp) + * where the features are provided by the user: + * + * \snippet Mesh_3/mesh_3D_image_with_input_features.cpp Domain creation + * + */ + template + static auto + create_labeled_image_mesh_domain(const CGAL::Image_3& image_, const CGAL_NP_CLASS& np = parameters::default_values()) + { + using parameters::get_parameter; + using parameters::get_parameter_reference; + using parameters::choose_parameter; + + auto iso_value_ = choose_parameter(get_parameter(np, internal_np::iso_value_param), 0); + auto value_outside_ = choose_parameter(get_parameter(np, internal_np::voxel_value), 0); + FT relative_error_bound_ = choose_parameter(get_parameter(np, internal_np::error_bound), FT(1e-3)); + auto image_values_to_subdomain_indices_ = choose_parameter(get_parameter(np, internal_np::image_subdomain_index), Null_functor()); + CGAL::Random* p_rng_ = choose_parameter(get_parameter(np, internal_np::rng), nullptr); + auto null_subdomain_index_ = choose_parameter(get_parameter(np, internal_np::null_subdomain_index_param), Null_functor()); + auto construct_surface_patch_index_ = choose_parameter(get_parameter(np, internal_np::surface_patch_index), Null_functor()); + + using Image_ref_type = typename internal_np::Lookup_named_param_def::reference; + CGAL::Image_3 no_weights_; + Image_ref_type weights_ = choose_parameter(get_parameter_reference(np, internal_np::weights_param), no_weights_); + auto features_detector_ = choose_parameter(get_parameter(np, internal_np::features_detector_param), Null_functor()); + + using Default_input_features = std::vector>; + using Input_features_ref_type = typename internal_np::Lookup_named_param_def::reference; + Default_input_features empty_vec; + Input_features_ref_type input_features_ + = choose_parameter(get_parameter_reference(np, internal_np::input_features_param), empty_vec); + + CGAL_USE(iso_value_); + namespace p = CGAL::parameters; + + const bool use_weights = weights_.is_valid(); + auto image_wrapper = use_weights + ? create_weighted_labeled_image_wrapper(image_, + weights_, + image_values_to_subdomain_indices_, + value_outside_) + : create_labeled_image_wrapper(image_, + image_values_to_subdomain_indices_, + value_outside_); + + // warning : keep Return_type consistent with actual return type + const bool no_features + = CGAL::parameters::is_default_parameter::value + && CGAL::parameters::is_default_parameter::value; + using Return_type = std::conditional_t < + no_features, + Labeled_mesh_domain_3, + Mesh_domain_with_polyline_features_3 + >; + + Return_type domain + (p::function = image_wrapper, + p::bounding_object = Mesh_3::internal::compute_bounding_box(image_), p::relative_error_bound = relative_error_bound_, p::p_rng = p_rng_, p::null_subdomain_index = - create_null_subdomain_index(null_subdomain_index_), + create_null_subdomain_index(null_subdomain_index_), p::construct_surface_patch_index = - create_construct_surface_patch_index(construct_surface_patch_index_)); + create_construct_surface_patch_index(construct_surface_patch_index_)); + + // features + Mesh_3::internal::Add_features_in_domain() + (image_, weights_, domain, input_features_, features_detector_); + + return domain; } +/// @} - BOOST_PARAMETER_MEMBER_FUNCTION( - (Labeled_mesh_domain_3), - static create_labeled_image_mesh_domain, - parameters::tag, - (required - (image_, (const CGAL::Image_3&)) - ) - (optional - (relative_error_bound_, (const FT&), - FT(1e-3)) - (weights_, (const CGAL::Image_3&), CGAL::Image_3()) - (value_outside_, *, 0) - (p_rng_, (CGAL::Random*), (CGAL::Random*)(0)) - (image_values_to_subdomain_indices_, *, - Null_functor()) - (null_subdomain_index_,*,Null_functor()) - (construct_surface_patch_index_, *, - Null_functor()) - ) - ) +#ifndef DOXYGEN_RUNNING + template + static Labeled_mesh_domain_3 create_gray_image_mesh_domain(const CGAL_NP_CLASS& np) { + static_assert(!parameters::is_default_parameter::value, "Value for required parameter not found"); + using parameters::get_parameter; + using parameters::get_parameter_reference; + using parameters::choose_parameter; + const CGAL::Image_3& image_ = get_parameter_reference(np,internal_np::image_3_param); + auto iso_value_ = choose_parameter(get_parameter(np, internal_np::iso_value_param), 0); + auto value_outside_ = choose_parameter(get_parameter(np, internal_np::voxel_value), 0); + FT relative_error_bound_ = choose_parameter(get_parameter(np, internal_np::error_bound), FT(1e-3)); + auto image_values_to_subdomain_indices_ = choose_parameter(get_parameter(np, internal_np::image_subdomain_index), Null_functor()); + CGAL::Random* p_rng_ = choose_parameter(get_parameter(np, internal_np::rng), nullptr); + auto null_subdomain_index_ = choose_parameter(get_parameter(np, internal_np::null_subdomain_index_param), Null_functor()); + auto construct_surface_patch_index_ = choose_parameter(get_parameter(np, internal_np::surface_patch_index), Null_functor()); namespace p = CGAL::parameters; - if (weights_.is_valid()) - { - return Labeled_mesh_domain_3 - (create_weighted_labeled_image_wrapper - (image_, - weights_, - image_values_to_subdomain_indices_, - value_outside_), - Mesh_3::internal::compute_bounding_box(image_), - p::relative_error_bound = relative_error_bound_, - p::p_rng = p_rng_, - p::null_subdomain_index = - create_null_subdomain_index(null_subdomain_index_), - p::construct_surface_patch_index = - create_construct_surface_patch_index(construct_surface_patch_index_)); - } - else - { - return Labeled_mesh_domain_3 - (create_labeled_image_wrapper - (image_, - image_values_to_subdomain_indices_, - value_outside_), - Mesh_3::internal::compute_bounding_box(image_), - p::relative_error_bound = relative_error_bound_, - p::p_rng = p_rng_, - p::null_subdomain_index = - create_null_subdomain_index(null_subdomain_index_), - p::construct_surface_patch_index = - create_construct_surface_patch_index(construct_surface_patch_index_)); - } + return Labeled_mesh_domain_3 + (p::function = create_gray_image_wrapper + (image_, + iso_value_, + image_values_to_subdomain_indices_, + value_outside_), + p::bounding_object = Mesh_3::internal::compute_bounding_box(image_), + p::relative_error_bound = relative_error_bound_, + p::p_rng = p_rng_, + p::null_subdomain_index = + create_null_subdomain_index(null_subdomain_index_), + p::construct_surface_patch_index = + create_construct_surface_patch_index(construct_surface_patch_index_)); + + } + + // Overload handling parameters passed with operator= + template + static Labeled_mesh_domain_3 create_gray_image_mesh_domain(const CGAL::Image_3& image_, + const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) + { + return create_gray_image_mesh_domain(image_, internal_np::combine_named_parameters(np1, np2, nps...)); + } + // Overload handling parameters passed with operator= + template + static Labeled_mesh_domain_3 create_gray_image_mesh_domain(const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) + { + return create_gray_image_mesh_domain(internal_np::combine_named_parameters(np1, np2, nps...)); + } + + template + static auto create_labeled_image_mesh_domain(const CGAL_NP_CLASS& np) + { + static_assert(!parameters::is_default_parameter::value, "Value for required parameter not found"); + using parameters::get_parameter_reference; + const CGAL::Image_3& image_ = get_parameter_reference(np,internal_np::image_3_param); + return create_labeled_image_mesh_domain(image_, np); + } + + // Overload handling parameters passed with operator= + template + static auto create_labeled_image_mesh_domain(const CGAL::Image_3& image_, + const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) + { + return create_labeled_image_mesh_domain(image_, internal_np::combine_named_parameters(np1, np2, nps...)); } + // Overload handling parameters passed with operator= + template + static auto create_labeled_image_mesh_domain(const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) + { + return create_labeled_image_mesh_domain(internal_np::combine_named_parameters(np1, np2, nps...)); + } +#endif - BOOST_PARAMETER_MEMBER_FUNCTION( - (Labeled_mesh_domain_3), - static create_implicit_mesh_domain, - parameters::tag, - (required - (function_, *) - (bounding_object_,*) - ) - (optional - (relative_error_bound_, (const FT&), - FT(1e-3)) - (p_rng_, (CGAL::Random*), (CGAL::Random*)(0)) - (null_subdomain_index_,*,Null_functor()) - (construct_surface_patch_index_, *, - Null_functor()) - ) - ) +/// \name Creation of domains from implicit functions +/// @{ + + /*! + * \brief Construction from an implicit function + * + * This static method is a named constructor. It constructs a domain + * whose bounding surface is described implicitly as the zero level set of a + * function. The domain to be discretized is assumed to be the domain where + * the function has negative values. + * + * The method takes as argument a bounding sphere which is required to + * circumscribe the surface and to have its center inside the domain. + * + * \tparam Function a type compatible with the signature `FT(Point_3)`: it takes a point as argument, + * and returns a scalar value. That object must be model of `CopyConstructible` + * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * \tparam Bounding_object either a bounding sphere (of type `Sphere_3`), a bounding box (type `Bbox_3`), + * or a bounding `Iso_cuboid_3` + * + * \param function the implicit function + * \param bounding_object object boundint the meshable domain and its center is inside the domain. + * \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{relative_error_bound} + * \cgalParamDescription{ is the relative error + * bound, relative to the diameter of the box of the image.} + * \cgalParamDefault{FT(1e-3)} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + * \cgalHeading{Examples} + * + * From the example (\ref Mesh_3/mesh_implicit_sphere.cpp): + * + * \snippet Mesh_3/mesh_implicit_sphere.cpp Domain creation + * + * From the example (\ref Mesh_3/mesh_implicit_sphere_variable_size.cpp): + * + * \snippet Mesh_3/mesh_implicit_sphere_variable_size.cpp Domain creation + * + */ + template + static Labeled_mesh_domain_3 create_implicit_mesh_domain(const Function& function, + const Bounding_object& bounding_object, + const CGAL_NP_CLASS& np = parameters::default_values() +#ifndef DOXYGEN_RUNNING + , typename std::enable_if>::type* = nullptr +#endif +) { + using parameters::get_parameter; + using parameters::choose_parameter; + FT relative_error_bound_ = choose_parameter(get_parameter(np, internal_np::error_bound), FT(1e-3)); + CGAL::Random* p_rng_ = choose_parameter(get_parameter(np, internal_np::rng), nullptr); + auto null_subdomain_index_ = choose_parameter(get_parameter(np, internal_np::null_subdomain_index_param), Null_functor()); + auto construct_surface_patch_index_ = choose_parameter(get_parameter(np, internal_np::surface_patch_index), Null_functor()); namespace p = CGAL::parameters; return Labeled_mesh_domain_3 - (make_implicit_to_labeling_function_wrapper(function_), - bounding_object_, - p::relative_error_bound = relative_error_bound_, - p::p_rng = p_rng_, - p::null_subdomain_index = - create_null_subdomain_index(null_subdomain_index_), - p::construct_surface_patch_index = - create_construct_surface_patch_index(construct_surface_patch_index_)); + (p::function = make_implicit_to_labeling_function_wrapper(function), + p::bounding_object = bounding_object, + p::relative_error_bound = relative_error_bound_, + p::p_rng = p_rng_, + p::null_subdomain_index = + create_null_subdomain_index(null_subdomain_index_), + p::construct_surface_patch_index = + create_construct_surface_patch_index(construct_surface_patch_index_)); } +/// @} +#ifndef DOXYGEN_RUNNING + template + static Labeled_mesh_domain_3 create_implicit_mesh_domain(const CGAL_NP_CLASS& np = parameters::default_values()) + { + static_assert(!parameters::is_default_parameter::value, "Value for required parameter not found"); + static_assert(!parameters::is_default_parameter::value, "Value for required parameter not found"); -CGAL_PRAGMA_DIAG_POP + using parameters::get_parameter; + return create_implicit_mesh_domain(parameters::get_parameter(np, internal_np::function_param), + parameters::get_parameter(np, internal_np::bounding_object_param), + np); + } + + // Overload handling parameters passed with operator= + template + static Labeled_mesh_domain_3 create_implicit_mesh_domain(const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) + { + return create_implicit_mesh_domain(internal_np::combine_named_parameters(np1, np2, nps...)); + } -#if defined(BOOST_MSVC) -# pragma warning(pop) + +#ifndef CGAL_NO_DEPRECATED_CODE + template + CGAL_DEPRECATED + static Labeled_mesh_domain_3 + create_gray_image_mesh_domain(const CGAL::Image_3& image_, + double iso_value, + double value_outside=0, + double relative_error_bound = 1e-3, + CGAL::Random* rng = nullptr, + SubdomainIndex image_values_to_subdom_indices = SubdomainIndex(), + NullSubdomainIndex null_subdomain_index_ = NullSubdomainIndex(), + ConstructSurfacePatchIndex construct_surface_patch_index_ = ConstructSurfacePatchIndex()) + { + return create_gray_image_mesh_domain(image_, parameters::iso_value(iso_value) + .image_values_to_subdomain_indices(image_values_to_subdom_indices) + .value_outside(value_outside) + .relative_error_bound(relative_error_bound) + .p_rng(rng).null_subdomain_index(null_subdomain_index_) + .construct_surface_patch_index(construct_surface_patch_index_)); + } + + template + CGAL_DEPRECATED + static Labeled_mesh_domain_3 + create_labeled_image_mesh_domain(const CGAL::Image_3& image_, + double relative_error_bound, + const CGAL::Image_3& weights_ = CGAL::Image_3(), + int value_outside=0, + CGAL::Random* rng = nullptr, + SubdomainIndex image_values_to_subdom_indices = SubdomainIndex(), + NullSubdomainIndex null_subdomain_index_ = NullSubdomainIndex(), + ConstructSurfacePatchIndex construct_surface_patch_index_ = ConstructSurfacePatchIndex()) + { + return create_labeled_image_mesh_domain(image_, parameters::weights(weights_) + .image_values_to_subdomain_indices(image_values_to_subdom_indices) + .value_outside(value_outside) + .relative_error_bound(relative_error_bound) + .p_rng(rng) + .null_subdomain_index(null_subdomain_index_) + .construct_surface_patch_index(construct_surface_patch_index_)); + } #endif - /// @} - /** - * Constructs a set of \ccc{n} points on the surface, and output them to - * the output iterator \ccc{pts} whose value type is required to be - * \ccc{std::pair}. + + /* + * Constructs a set of `n` points on the surface, and output them to + * the output iterator `pts` whose value type is required to be + * `std::pair`. */ struct Construct_initial_points { @@ -525,21 +1024,21 @@ CGAL_PRAGMA_DIAG_POP const Labeled_mesh_domain_3& r_domain_; }; - /// Returns Construct_initial_points object + // Returns Construct_initial_points object Construct_initial_points construct_initial_points_object() const { return Construct_initial_points(*this); } - /** + /* * Returns a bounding box of the domain */ Bbox_3 bbox() const { return this->bbox_.bbox(); } - /** - * Returns true if point~\ccc{p} is in the domain. If \ccc{p} is in the + /* + * Returns true if point `p` is in the domain. If `p` is in the * domain, the parameter index is set to the index of the subdomain * including $p$. It is set to the default value otherwise. */ @@ -552,24 +1051,24 @@ CGAL_PRAGMA_DIAG_POP // null(f(p)) means p is outside the domain Subdomain_index index = (r_domain_.function_)(p); if ( r_domain_.null(index) ) - return Subdomain(); + return Subdomain{}; else - return Subdomain(index); + return Subdomain{ index }; } private: const Labeled_mesh_domain_3& r_domain_; }; - /// Returns Is_in_domain object + // Returns Is_in_domain object Is_in_domain is_in_domain_object() const { return Is_in_domain(*this); } - /** - * Returns true is the element \ccc{type} intersect properly any of the + /* + * Returns `true` if the element `type` intersect properly any of the * surface patches describing the either the domain boundary or some * subdomain boundary. - * \ccc{Type} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}. + * `Type` is either `Segment_3`, `Ray_3` or `Line_3`. * Parameter index is set to the index of the intersected surface patch - * if \ccc{true} is returned and to the default \ccc{Surface_patch_index} + * if `true` is returned and to the default `Surface_patch_index` * value otherwise. */ struct Do_intersect_surface @@ -593,8 +1092,8 @@ CGAL_PRAGMA_DIAG_POP } private: - /// Returns true if points \c a & \c b do not belong to the same subdomain - /// \c index is set to the surface index of subdomains f(a), f(b) + // Returns true if points `a` and `b` do not belong to the same subdomain + // `index` is set to the surface index of subdomains f(a), f(b) Surface_patch operator()(const Point_3& a, const Point_3& b) const { // If f(a) != f(b), then [a,b] intersects some surface. Here we consider @@ -613,15 +1112,15 @@ CGAL_PRAGMA_DIAG_POP return Surface_patch(); } - /** - * Clips \c query to a segment \c s, and call operator()(s) + /* + * Clips `query` to a segment `s`, and call `operator()(s)` */ template Surface_patch clip_to_segment(const Query& query) const { const auto clipped = CGAL::intersection(query, r_domain_.bbox_); if(clipped) - if(const Segment_3* s = boost::get(&*clipped)) + if(const Segment_3* s = std::get_if(&*clipped)) return this->operator()(*s); return Surface_patch(); @@ -631,19 +1130,19 @@ CGAL_PRAGMA_DIAG_POP const Labeled_mesh_domain_3& r_domain_; }; - /// Returns Do_intersect_surface object + // Returns Do_intersect_surface object Do_intersect_surface do_intersect_surface_object() const { return Do_intersect_surface(*this); } - /** - * Returns a point in the intersection of the primitive \ccc{type} + /* + * Returns a point in the intersection of the primitive `type` * with some boundary surface. - * \ccc{Type1} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}. - * The integer \ccc{dimension} is set to the dimension of the lowest + * `Type1` is either `Segment_3`, `Ray_3` or `Line_3`. + * The integer `dimension` is set to the dimension of the lowest * dimensional face in the input complex containing the returned point, and - * \ccc{index} is set to the index to be stored at a mesh vertex lying + * `index` is set to the index to be stored at a mesh vertex lying * on this face. */ struct Construct_intersection @@ -654,7 +1153,7 @@ CGAL_PRAGMA_DIAG_POP Intersection operator()(const Segment_3& s) const { #ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 - CGAL_precondition(r_domain_.do_intersect_surface_object()(s)); + CGAL_precondition(r_domain_.do_intersect_surface_object()(s) != std::nullopt); #endif // NOT CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 return this->operator()(s.source(),s.target()); } @@ -670,11 +1169,11 @@ CGAL_PRAGMA_DIAG_POP } private: - /** + /* * Returns a point in the intersection of [a,b] with the surface - * \c a must be the source point, and \c b the out point. It's important + * `a` must be the source point, and `b` the out point. It's important * because it drives bisection cuts. - * Indeed, the returned point is the first intersection from \c [a,b] + * Indeed, the returned point is the first intersection from `[a,b]` * with a subdomain surface. */ Intersection operator()(const Point_3& a, const Point_3& b) const @@ -743,13 +1242,13 @@ CGAL_PRAGMA_DIAG_POP } } - /// Clips \c query to a segment \c s, and call operator()(s) + // Clips `query` to a segment `s`, and call `operator()(s)` template Intersection clip_to_segment(const Query& query) const { const auto clipped = CGAL::intersection(query, r_domain_.bbox_); if(clipped) - if(const Segment_3* s = boost::get(&*clipped)) + if(const Segment_3* s = std::get_if(&*clipped)) return this->operator()(*s); return Intersection(); @@ -759,39 +1258,39 @@ CGAL_PRAGMA_DIAG_POP const Labeled_mesh_domain_3& r_domain_; }; - /// Returns Construct_intersection object + // Returns Construct_intersection object Construct_intersection construct_intersection_object() const { return Construct_intersection(*this); } - /** + /* * Returns the index to be stored in a vertex lying on the surface identified - * by \c index. + * by `index`. */ Index index_from_surface_patch_index(const Surface_patch_index& index) const { return Index(index); } - /** + /* * Returns the index to be stored in a vertex lying in the subdomain - * identified by \c index. + * identified by `index`. */ Index index_from_subdomain_index(const Subdomain_index& index) const { return Index(index); } - /** - * Returns the \c Surface_patch_index of the surface patch - * where lies a vertex with dimension 2 and index \c index. + /* + * Returns the `Surface_patch_index` of the surface patch + * where lies a vertex with dimension 2 and index `index`. */ Surface_patch_index surface_patch_index(const Index& index) const - { return boost::get(index); } + { return Mesh_3::internal::get_index(index); } - /** + /* * Returns the index of the subdomain containing a vertex - * with dimension 3 and index \c index. + * with dimension 3 and index `index`. */ Subdomain_index subdomain_index(const Index& index) const - { return boost::get(index); } + { return Mesh_3::internal::get_index(index); } // ----------------------------------- // Backward Compatibility @@ -810,7 +1309,7 @@ CGAL_PRAGMA_DIAG_POP // ----------------------------------- protected: - /// Returns Surface_patch_index from \c i and \c j + // Returns Surface_patch_index from `i` and `j` Surface_patch_index make_surface_index(const Subdomain_index i, const Subdomain_index j) const { @@ -820,7 +1319,7 @@ CGAL_PRAGMA_DIAG_POP return this->cstr_s_p_index(j, i); } - /// Returns the bounding sphere of an Iso_cuboid_3 + // Returns the bounding sphere of an Iso_cuboid_3 Sphere_3 bounding_sphere(const Iso_cuboid_3& bbox) const { typename BGT::Construct_sphere_3 sphere = BGT().construct_sphere_3_object(); @@ -986,11 +1485,13 @@ CGAL_PRAGMA_DIAG_POP } public: - /// Returns bounding box + // Returns bounding box const Iso_cuboid_3& bounding_box() const { return this->bbox_; } +#endif //DOXYGEN_RUNNING }; // end class Labeled_mesh_domain_3 +#ifndef DOXYGEN_RUNNING //------------------------------------------------------- // Method implementation //------------------------------------------------------- @@ -1072,7 +1573,7 @@ Construct_initial_points::operator()(OutputIterator pts, #endif return pts; } - +#endif } // end namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Largest_empty_iso_rectangle_2.h b/thirdparty/CGAL/include/CGAL/Largest_empty_iso_rectangle_2.h index 855c110c..2eb62e78 100644 --- a/thirdparty/CGAL/include/CGAL/Largest_empty_iso_rectangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Largest_empty_iso_rectangle_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h $ -// $Id: Largest_empty_iso_rectangle_2.h 9dbf5c8 2023-01-27T13:37:34+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h $ +// $Id: include/CGAL/Largest_empty_iso_rectangle_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -46,7 +46,7 @@ namespace CGAL { The algorithm checks all the empty rectangles that are bounded by either points or edges of the bounding box (other empty rectangles can be enlarged - and remain empty). There are O(n^2) such rectangles. It is done in three + and remain empty). There are \cgalBigO{n^2} such rectangles. It is done in three phases. In the first one empty rectangles that are bounded by two opposite edges of the bounding box are checked. In the second one, other empty rectangles that are bounded by one or two edges of the bounding box are @@ -265,8 +265,8 @@ class Largest_empty_iso_rectangle_2 { std::set *right_tent; std::set *left_tent; - /* detemine whether the point is a bounding box corner - (thus not implicitely inserted as a point, or not. + /* determine whether the point is a bounding box corner + (thus not implicitly inserted as a point, or not). */ Point_type type; @@ -893,7 +893,7 @@ Largest_empty_iso_rectangle_2::phase_1_on_x() } // traverse over all possibilities for finding a larger empty rectangle - // rectangles here touch the top and the buttom of the bounding box + // rectangles here touch the top and the bottom of the bounding box while(iter != last_iter) { // filter false points if((*iter)->type != TOP_RIGHT && (*iter)->type != TOP_LEFT) { diff --git a/thirdparty/CGAL/include/CGAL/Lazy.h b/thirdparty/CGAL/include/CGAL/Lazy.h index 365dc8c4..bb74d985 100644 --- a/thirdparty/CGAL/include/CGAL/Lazy.h +++ b/thirdparty/CGAL/include/CGAL/Lazy.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Lazy.h $ -// $Id: Lazy.h 97e99cb 2022-04-27T16:32:08+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Lazy.h $ +// $Id: include/CGAL/Lazy.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,24 +27,17 @@ #include #include #include -#include +#include #include -#include -#include +#include +#include #ifdef CGAL_LAZY_KERNEL_DEBUG # include #endif #include -#include -#include -#include -#include -#include -#include - #include #include #include @@ -781,7 +774,7 @@ class Lazy_rep_0 final : public Lazy_rep // E2A()(e) and std::forward(e) could be evaluated in any order, but // that's ok, "forward" itself does not modify e, it may only mark it as - // modifyable by the outer call, which is obviously sequenced after the inner + // modifiable by the outer call, which is obviously sequenced after the inner // call E2A()(e). template Lazy_rep_0(E&& e) @@ -797,13 +790,6 @@ class Lazy_rep_0 final : public Lazy_rep } }; -// Macro helpers to build the kernel objects -#define CGAL_PARAM(z, n, t) std::declval() -#define CGAL_TYPEMAP_AC(z, n, t) typedef typename Type_mapper< t##n, LK, AK >::type A##n; -#define CGAL_TYPEMAP_EC(z, n, t) typedef typename Type_mapper< t##n, LK, EK >::type E##n; -#define CGAL_LEXACT(z,n,t) CGAL::exact( l##n ) -#define CGAL_LARGS(z, n, t) L##n const& l##n - #undef CGAL_LAZY_PRINT_TYPEID template < typename K1, typename K2 > @@ -1210,7 +1196,7 @@ struct Lazy_construction_optional_for_polygonal_envelope typedef typename LK::Approximate_kernel AK; typedef typename LK::Exact_kernel EK; typedef typename LK::E2A E2A; - typedef boost::optional result_type; + typedef std::optional result_type; CGAL_NO_UNIQUE_ADDRESS AC ac; CGAL_NO_UNIQUE_ADDRESS EC ec; @@ -1223,9 +1209,9 @@ struct Lazy_construction_optional_for_polygonal_envelope { Protect_FPU_rounding P; try { - boost::optional oap = ac(CGAL::approx(l1),CGAL::approx(l2),CGAL::approx(l3)); - if(oap == boost::none){ - return boost::none; + std::optional oap = ac(CGAL::approx(l1),CGAL::approx(l2),CGAL::approx(l3)); + if(oap == std::nullopt){ + return std::nullopt; } // Now we have to construct a rep for a lazy point with the three lazy planes. typedef Lazy_rep_optional_n LazyPointRep; @@ -1235,21 +1221,21 @@ struct Lazy_construction_optional_for_polygonal_envelope // rep = LazyPointRep(2,ap, ec, l1, l2, l3); rep.~LazyPointRep(); new (&rep) LazyPointRep(2, ap, ec, l1, l2, l3); typename LK::Point_3 lp(&rep); - return boost::make_optional(lp); + return std::make_optional(lp); } catch (Uncertain_conversion_exception&) {} } Protect_FPU_rounding P2(CGAL_FE_TONEAREST); CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); - boost::optional oep = ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3)); - if(oep == boost::none){ - return boost::none; + std::optional oep = ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3)); + if(oep == std::nullopt){ + return std::nullopt; } typedef Lazy_rep_0 LazyPointRep; const typename EK::Point_3 ep = *oep; LazyPointRep *rep = new LazyPointRep(ep); typename LK::Point_3 lp(rep); - return boost::make_optional(lp); + return std::make_optional(lp); } // for Intersect_point_3 with Plane_3 Line_3 @@ -1260,9 +1246,9 @@ struct Lazy_construction_optional_for_polygonal_envelope { Protect_FPU_rounding P; try { - boost::optional oap = ac(CGAL::approx(l1),CGAL::approx(l2)); - if(oap == boost::none){ - return boost::none; + std::optional oap = ac(CGAL::approx(l1),CGAL::approx(l2)); + if(oap == std::nullopt){ + return std::nullopt; } // Now we have to construct a rep for a lazy point with the line and the plane. typedef Lazy_rep_optional_n LazyPointRep; @@ -1272,21 +1258,21 @@ struct Lazy_construction_optional_for_polygonal_envelope // rep = LazyPointRep(2, ap, ec, l1, l2); rep.~LazyPointRep(); new (&rep) LazyPointRep(2, ap, ec, l1, l2); typename LK::Point_3 lp(&rep); - return boost::make_optional(lp); + return std::make_optional(lp); } catch (Uncertain_conversion_exception&) {} } Protect_FPU_rounding P2(CGAL_FE_TONEAREST); CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); - boost::optional oep = ec(CGAL::exact(l1), CGAL::exact(l2)); - if(oep == boost::none){ - return boost::none; + std::optional oep = ec(CGAL::exact(l1), CGAL::exact(l2)); + if(oep == std::nullopt){ + return std::nullopt; } typedef Lazy_rep_0 LazyPointRep; const typename EK::Point_3 ep = *oep; LazyPointRep *rep = new LazyPointRep(ep); typename LK::Point_3 lp(rep); - return boost::make_optional(lp); + return std::make_optional(lp); } }; @@ -1439,19 +1425,19 @@ struct Ith_for_intersection_with_variant { : i(i_) {} - template< BOOST_VARIANT_ENUM_PARAMS(typename U) > + template< typename ... U > const T2& - operator()(const boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >& o) const + operator()(const std::optional< std::variant< U ... > >& o) const { - const std::vector* ptr = (boost::get >(&(*o))); + const std::vector* ptr = (std::get_if >(&(*o))); return (*ptr)[i]; } - template< BOOST_VARIANT_ENUM_PARAMS(typename U) > + template< typename ... U > const T2& - operator()(const boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) >& o) const + operator()(const std::variant< U ... >& o) const { - const std::vector* ptr = (boost::get >(&o)); + const std::vector* ptr = (std::get_if >(&o)); return (*ptr)[i]; } }; @@ -1870,26 +1856,26 @@ template struct Variant_cast { typedef T result_type; - template + template const T& - operator()(const boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >& o) const { + operator()(const std::optional< std::variant< U ... > >& o) const { // can throw but should never because we always build it inside // a static visitor with the right type - return boost::get(*o); + return std::get(*o); } - template + template T& - operator()(boost::optional< boost::variant< BOOST_VARIANT_ENUM_PARAMS(U) > >& o) const { + operator()(std::optional< std::variant< U ... > >& o) const { // can throw but should never because we always build it inside // a static visitor with the right type, if it throws bad_get - return boost::get(*o); + return std::get(*o); } }; template -struct Fill_lazy_variant_visitor_2 : boost::static_visitor<> { +struct Fill_lazy_variant_visitor_2 { Fill_lazy_variant_visitor_2(Result& r, Origin& o) : r(&r), o(&o) {} Result* r; Origin* o; @@ -1926,7 +1912,7 @@ struct Fill_lazy_variant_visitor_2 : boost::static_visitor<> { }; template -struct Fill_lazy_variant_visitor_0 : boost::static_visitor<> { +struct Fill_lazy_variant_visitor_0 { Fill_lazy_variant_visitor_0(Result& r) : r(&r) {} Result* r; @@ -1973,15 +1959,11 @@ struct Lazy_construction_variant { // you are on your own }; - #define CGAL_RESULT(z, n, d) \ - template< typename F, BOOST_PP_ENUM_PARAMS(n, class T) > \ - struct result { \ - BOOST_PP_REPEAT(n, CGAL_TYPEMAP_AC, T) \ - typedef typename Type_mapper< \ - decltype(std::declval()(BOOST_PP_ENUM(n, CGAL_PARAM, A))), AK, LK>::type type; \ - }; - - BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_RESULT, _) + template + struct result + { + typedef typename Type_mapper()(std::declval::type>()...)),AK,LK>::type type; + }; template decltype(auto) @@ -2016,7 +1998,7 @@ struct Lazy_construction_variant { // the static visitor fills the result_type with the correct unwrapped type internal::Fill_lazy_variant_visitor_2< result_type, AK, LK, EK, Lazy > visitor(res, lazy); - boost::apply_visitor(visitor, *approx_v); + std::visit(visitor, *approx_v); return res; } catch (Uncertain_conversion_exception&) {} @@ -2032,7 +2014,7 @@ struct Lazy_construction_variant { } internal::Fill_lazy_variant_visitor_0 visitor(res); - boost::apply_visitor(visitor, *exact_v); + std::visit(visitor, *exact_v); return res; } @@ -2070,7 +2052,7 @@ struct Lazy_construction_variant { // the static visitor fills the result_type with the correct unwrapped type internal::Fill_lazy_variant_visitor_2< result_type, AK, LK, EK, Lazy > visitor(res, lazy); - boost::apply_visitor(visitor, *approx_v); + std::visit(visitor, *approx_v); return res; } catch (Uncertain_conversion_exception&) {} @@ -2086,7 +2068,7 @@ struct Lazy_construction_variant { } internal::Fill_lazy_variant_visitor_0< result_type, AK, LK, EK> visitor(res); - boost::apply_visitor(visitor, *exact_v); + std::visit(visitor, *exact_v); return res; } }; @@ -2106,10 +2088,10 @@ struct Lazy_construction { typedef typename LK::Approximate_kernel AK; typedef typename LK::Exact_kernel EK; - typedef typename boost::remove_cv< - typename boost::remove_reference < typename AC::result_type >::type >::type AT; - typedef typename boost::remove_cv< - typename boost::remove_reference < typename EC::result_type >::type >::type ET; + typedef std::remove_cv_t< + std::remove_reference_t < typename AC::result_type > > AT; + typedef std::remove_cv_t< + std::remove_reference_t < typename EC::result_type > > ET; typedef typename Default::Get::type E2A; @@ -2120,26 +2102,23 @@ struct Lazy_construction { CGAL_NO_UNIQUE_ADDRESS AC ac; CGAL_NO_UNIQUE_ADDRESS EC ec; -#define CGAL_CONSTRUCTION_OPERATOR(z, n, d ) \ - template \ - decltype(auto) \ - operator()( BOOST_PP_ENUM(n, CGAL_LARGS, _) ) const { \ - typedef Lazy< AT, ET, E2A> Handle; \ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); \ - { \ - Protect_FPU_rounding P; \ - try { \ - return result_type( Handle(new Lazy_rep_n(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)))); \ - } catch (Uncertain_conversion_exception&) {} \ - } \ - CGAL_BRANCH_PROFILER_BRANCH(tmp); \ - Protect_FPU_rounding P2(CGAL_FE_TONEAREST); \ - CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); \ - return result_type( Handle(new Lazy_rep_0(ec( BOOST_PP_ENUM(n, CGAL_LEXACT, _) ))) ); \ - } - - // arity 1-8 - BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_CONSTRUCTION_OPERATOR, _) + template + decltype(auto) + operator()(const L&... l) const { + typedef Lazy < AT, ET, E2A > Handle; + CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); + { + Protect_FPU_rounding P; + try { + return result_type(Handle(new Lazy_rep_n< AT, ET, AC, EC, E2A, noprune, L...>(ac, ec, l...))); + } catch (Uncertain_conversion_exception&) {} + } + CGAL_BRANCH_PROFILER_BRANCH(tmp); + Protect_FPU_rounding P2(CGAL_FE_TONEAREST); + CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); + return result_type(Handle(new Lazy_rep_0< AT, ET, E2A >(ec(CGAL::exact(l)...)))); + } + // nullary decltype(auto) @@ -2149,8 +2128,6 @@ struct Lazy_construction { return result_type( Handle() ); } -#undef CGAL_CONSTRUCTION_OPERATOR - }; @@ -2174,34 +2151,31 @@ struct Lazy_construction CGAL_NO_UNIQUE_ADDRESS AC ac; CGAL_NO_UNIQUE_ADDRESS EC ec; - // acquire the result_type of the approximate kernel, map it back to the lazy kernel object - BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_RESULT, _) - -#define CGAL_CONSTRUCTION_OPERATOR(z, n, d) \ - template \ - decltype(auto) \ - operator()( BOOST_PP_ENUM(n, CGAL_LARGS, _) ) const { \ - BOOST_PP_REPEAT(n, CGAL_TYPEMAP_EC, L) \ - BOOST_PP_REPEAT(n, CGAL_TYPEMAP_AC, L) \ - typedef typename Type_mapper()(BOOST_PP_ENUM(n, CGAL_PARAM, E))),EK,EK>::type ET; \ - typedef typename Type_mapper()(BOOST_PP_ENUM(n, CGAL_PARAM, A))),AK,AK>::type AT; \ - typedef Lazy< AT, ET, E2A> Handle; \ - typedef typename result::type result_type; \ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); \ - { \ - Protect_FPU_rounding P; \ - try { \ - return result_type( Handle(new Lazy_rep_n(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)))); \ - } catch (Uncertain_conversion_exception&) {} \ - } \ - CGAL_BRANCH_PROFILER_BRANCH(tmp); \ - Protect_FPU_rounding P2(CGAL_FE_TONEAREST); \ - CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); \ - return result_type( Handle(new Lazy_rep_0(ec( BOOST_PP_ENUM(n, CGAL_LEXACT, _) ))) ); \ - } - - // arity 1-8 - BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_CONSTRUCTION_OPERATOR, _) + template + struct result + { + typedef typename Type_mapper()(std::declval::type>()...)),AK,LK>::type type; + }; + + template + decltype(auto) + operator()(const L&... l) const { + typedef typename Type_mapper()(std::declval::type>()...)),EK,EK>::type ET; + typedef typename Type_mapper()(std::declval::type>()...)),AK,AK>::type AT; + typedef Lazy Handle; + typedef typename result::type result_type; + CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); + { + Protect_FPU_rounding P; + try { + return result_type(Handle(new Lazy_rep_n (ac, ec, l...))); + } catch (Uncertain_conversion_exception&) {} + } + CGAL_BRANCH_PROFILER_BRANCH(tmp); + Protect_FPU_rounding P2(CGAL_FE_TONEAREST); + CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); + return result_type(Handle(new Lazy_rep_0 (ec(CGAL::exact(l)...)))); + } // nullary decltype(auto) @@ -2218,10 +2192,6 @@ struct Lazy_construction } //namespace CGAL -#undef CGAL_TYPEMAP_AC -#undef CGAL_TYPEMAP_EC -#undef CGAL_LEXACT -#undef CGAL_LARGS #include diff --git a/thirdparty/CGAL/include/CGAL/Lazy_exact_nt.h b/thirdparty/CGAL/include/CGAL/Lazy_exact_nt.h index 5af75b97..16f4ecd9 100644 --- a/thirdparty/CGAL/include/CGAL/Lazy_exact_nt.h +++ b/thirdparty/CGAL/include/CGAL/Lazy_exact_nt.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Lazy_exact_nt.h $ -// $Id: Lazy_exact_nt.h 52b0779 2021-02-17T00:25:16+01:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Lazy_exact_nt.h $ +// $Id: include/CGAL/Lazy_exact_nt.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,11 +18,7 @@ #include // for Root_of functor #include -#include -#include -#include -#include #include #include @@ -36,6 +32,10 @@ #include #include #include +#include + + +#include #include @@ -68,7 +68,7 @@ * TODO : * - Generalize it for constructions at the kernel level. * - Add mixed operations with ET too ? - * - Interval refinement functionnality ? + * - Interval refinement functionality ? * - Separate the handle and the representation(s) in 2 files (?) * maybe not a good idea, better if everything related to one operation is * close together. @@ -174,7 +174,7 @@ struct Lazy_exact_Ex_Cst final : public Lazy_exact_nt_rep } }; -// Construction from a Lazy_exact_nt (which keeps the lazyness). +// Construction from a Lazy_exact_nt (which keeps the laziness). template class Lazy_lazy_exact_Cst final : public Lazy_exact_nt_rep { @@ -382,9 +382,9 @@ public : // Also check that ET and AT are constructible from T? template - Lazy_exact_nt (T i, typename boost::enable_if, std::is_enum >, - boost::mpl::not_ > >,void*>::type=0) + Lazy_exact_nt (T i, std::enable_if_t< + (std::is_arithmetic_v || std::is_enum_v) && + !std::is_same_v,void*> = 0) : Base(new Lazy_exact_Cst(i)) {} Lazy_exact_nt (const ET & e) @@ -394,12 +394,12 @@ public : template Lazy_exact_nt (const Lazy_exact_nt &x, - typename boost::enable_if,int>::type=0) + std::enable_if_t::value,int> = 0) : Base(new Lazy_lazy_exact_Cst(x)){} template explicit Lazy_exact_nt (const Lazy_exact_nt &x, - typename boost::disable_if,int>::type=0) + typename std::enable_if_t::value,int> = 0) : Base(new Lazy_lazy_exact_Cst(x)){} friend void swap(Lazy_exact_nt& a, Lazy_exact_nt& b) noexcept @@ -944,9 +944,9 @@ struct Div_mod_selector { void operator()( const NT1& x, const NT2& y, NT& q, NT& r ) const { - CGAL_static_assertion((::boost::is_same< + static_assert(::std::is_same< typename Coercion_traits< NT1, NT2 >::Type, NT - >::value)); + >::value); typename Coercion_traits< NT1, NT2 >::Cast cast; operator()( cast(x), cast(y), q, r ); @@ -1029,8 +1029,8 @@ template < typename ET > class Real_embeddable_traits< Lazy_exact_nt > : public INTERN_RET::Real_embeddable_traits_base< Lazy_exact_nt , CGAL::Tag_true > { // Every type ET of Lazy_exact_nt has to be real embeddable. - CGAL_static_assertion((::boost::is_same< typename Real_embeddable_traits< ET > - ::Is_real_embeddable, Tag_true >::value)); + static_assert(::std::is_same< typename Real_embeddable_traits< ET > + ::Is_real_embeddable, Tag_true >::value); public: typedef Lazy_exact_nt Type; @@ -1178,12 +1178,11 @@ struct Coercion_traits< Lazy_exact_nt, Lazy_exact_nt > Are_implicit_interoperable; \ private: \ static const bool interoperable \ - =boost::is_same< Are_implicit_interoperable, Tag_false>::value; \ + =std::is_same< Are_implicit_interoperable, Tag_false>::value; \ public: \ - typedef typename boost::mpl::if_c \ - ::type Type; \ - typedef typename boost::mpl::if_c >::type Cast; \ + typedef std::conditional_t Type; \ + typedef std::conditional_t > Cast; \ }; \ \ template \ @@ -1427,7 +1426,24 @@ class Modular_traits > #undef CGAL_int #undef CGAL_To_interval -} //namespace CGAL +namespace internal { + +template < typename ET > +struct Exact_field_selector > +: Exact_field_selector +{ + // We have a choice here : + // - using ET gets rid of the DAG computation as well as redoing the interval + // - using Lazy_exact_nt might use sharper intervals. + // typedef ET Type; + // typedef Lazy_exact_nt Type; +}; +template < typename ET > +struct Exact_ring_selector > +: Exact_ring_selector +{}; + +} } //namespace CGAL::internal namespace Eigen { template struct NumTraits; diff --git a/thirdparty/CGAL/include/CGAL/Lazy_kernel.h b/thirdparty/CGAL/include/CGAL/Lazy_kernel.h index 7f58e481..f11d6d19 100644 --- a/thirdparty/CGAL/include/CGAL/Lazy_kernel.h +++ b/thirdparty/CGAL/include/CGAL/Lazy_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Lazy_kernel.h $ -// $Id: Lazy_kernel.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Lazy_kernel.h $ +// $Id: include/CGAL/Lazy_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,10 +27,8 @@ #include #include #include -#include #include -#include -#include +#include #if defined(BOOST_MSVC) # pragma warning(push) @@ -63,8 +61,8 @@ class Has_result_type_helper template struct Has_result_type - : boost::integral_constant< bool, - Has_result_type_helper< typename boost::remove_cv::type>::value> + : std::integral_constant< bool, + Has_result_type_helper< std::remove_cv_t>::value> {}; template @@ -89,7 +87,7 @@ class Enum_holder { // Exact_kernel = exact kernel that will be made lazy // Kernel = lazy kernel -// the Generic base simplies applies the generic magic functor stupidly. +// the Generic base simply applies the generic magic functor stupidly. // then the real base fixes up a few special cases. template < typename EK_, typename AK_, typename E2A_, typename Kernel_ > class Lazy_kernel_generic_base : protected internal::Enum_holder @@ -178,7 +176,7 @@ class Lazy_kernel_generic_base : protected internal::Enum_holder // The case distinction goes as follows: // result_type == FT => NT // result_type == Object => Object - // result_type == boost::optional => OPTIONAL_ Only for Intersect_point_3_for_polyhedral_envelope which returns a handle for a singleton + // result_type == std::optional => OPTIONAL_ Only for Intersect_point_3_for_polyhedral_envelope which returns a handle for a singleton // result_type == Bbox_2 || result_type == Bbox_3 => BBOX // default => NONE // no result_type => NONE @@ -188,21 +186,21 @@ class Lazy_kernel_generic_base : protected internal::Enum_holder // specializations inside a non-namespace scope. // The default implementation does some default handling, // the special cases are filtered by partial specializations. - template + template struct Lazy_wrapper_traits : boost::mpl::eval_if< internal::Has_result_type, - boost::mpl::eval_if< boost::is_same< typename boost::remove_cv< - typename boost::remove_reference< - typename internal::Lazy_result_type::type - >::type >::type, - typename Approximate_kernel::FT>, + boost::mpl::eval_if< std::is_same< std::remove_cv_t< + std::remove_reference_t< + typename internal::Lazy_result_type::type + > >, + typename Approximate_kernel::FT>, boost::mpl::int_, - boost::mpl::eval_if< boost::is_same< typename internal::Lazy_result_type::type, + boost::mpl::eval_if< std::is_same< typename internal::Lazy_result_type::type, CGAL::Object >, boost::mpl::int_, - boost::mpl::eval_if< boost::mpl::or_< - boost::is_same< typename internal::Lazy_result_type::type, CGAL::Bbox_2 >, - boost::is_same< typename internal::Lazy_result_type::type, CGAL::Bbox_3 > >, + boost::mpl::eval_if< std::bool_constant< + std::is_same_v< typename internal::Lazy_result_type::type, CGAL::Bbox_2 > || + std::is_same_v< typename internal::Lazy_result_type::type, CGAL::Bbox_3 > >, boost::mpl::int_, boost::mpl::int_ > > >, boost::mpl::int_ >::type {}; diff --git a/thirdparty/CGAL/include/CGAL/Level_interval.h b/thirdparty/CGAL/include/CGAL/Level_interval.h index 8b057d6f..531ac578 100644 --- a/thirdparty/CGAL/include/CGAL/Level_interval.h +++ b/thirdparty/CGAL/include/CGAL/Level_interval.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interval_skip_list/include/CGAL/Level_interval.h $ -// $Id: Level_interval.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interval_skip_list/include/CGAL/Level_interval.h $ +// $Id: include/CGAL/Level_interval.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Lightweight_vector_3.h b/thirdparty/CGAL/include/CGAL/Lightweight_vector_3.h index b6b9dff5..fe734c6d 100644 --- a/thirdparty/CGAL/include/CGAL/Lightweight_vector_3.h +++ b/thirdparty/CGAL/include/CGAL/Lightweight_vector_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Poisson_surface_reconstruction_3/include/CGAL/Lightweight_vector_3.h $ -// $Id: Lightweight_vector_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Poisson_surface_reconstruction_3/include/CGAL/Lightweight_vector_3.h $ +// $Id: include/CGAL/Lightweight_vector_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,7 +27,7 @@ namespace CGAL { /// The purpose of this class is to save memory as the actual vector /// is allocated only when needed. /// -/// \cgalModels `Kernel::Vector_3` +/// \cgalModels{Kernel::Vector_3} /// /// @tparam Gt Geometric traits class. template diff --git a/thirdparty/CGAL/include/CGAL/Line_2.h b/thirdparty/CGAL/include/CGAL/Line_2.h index f85c3c35..62ce2585 100644 --- a/thirdparty/CGAL/include/CGAL/Line_2.h +++ b/thirdparty/CGAL/include/CGAL/Line_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Line_2.h $ -// $Id: Line_2.h e7357ac 2021-07-19T14:53:27+02:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Line_2.h $ +// $Id: include/CGAL/Line_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,12 +18,13 @@ #define CGAL_LINE_2_H #include -#include #include #include #include #include +#include + namespace CGAL { template @@ -40,7 +41,7 @@ class Line_2 : public R_::Kernel_base::Line_2 typedef typename R_::Kernel_base::Line_2 RLine_2; typedef Line_2 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: @@ -88,18 +89,17 @@ class Line_2 : public R_::Kernel_base::Line_2 : RLine_2(typename R::Construct_line_2()(Return_base_tag(), p,v)) {} - // FIXME : Use Qrt<> here. - RT a() const + decltype(auto) a() const { return R().compute_a_2_object()(*this); } - RT b() const + decltype(auto) b() const { return R().compute_b_2_object()(*this); } - RT c() const + decltype(auto) c() const { return R().compute_c_2_object()(*this); } diff --git a/thirdparty/CGAL/include/CGAL/Line_3.h b/thirdparty/CGAL/include/CGAL/Line_3.h index 08ba651b..e93b3051 100644 --- a/thirdparty/CGAL/include/CGAL/Line_3.h +++ b/thirdparty/CGAL/include/CGAL/Line_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Line_3.h $ -// $Id: Line_3.h 8fa0f55 2021-05-27T10:27:38+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Line_3.h $ +// $Id: include/CGAL/Line_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,6 @@ #define CGAL_LINE_3_H #include -#include #include #include #include @@ -39,7 +38,7 @@ class Line_3 : public R_::Kernel_base::Line_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Line_3 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: @@ -107,7 +106,7 @@ class Line_3 : public R_::Kernel_base::Line_3 Point_3 point() const { - return R().construct_point_on_3_object()(*this, 0); + return R().construct_point_on_3_object()(*this); } Point_3 point(const FT i) const diff --git a/thirdparty/CGAL/include/CGAL/Line_arc_2.h b/thirdparty/CGAL/include/CGAL/Line_arc_2.h index f62c63dc..c8e5663f 100644 --- a/thirdparty/CGAL/include/CGAL/Line_arc_2.h +++ b/thirdparty/CGAL/include/CGAL/Line_arc_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Line_arc_2.h $ -// $Id: Line_arc_2.h 059bc60 2020-07-22T15:13:09+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Line_arc_2.h $ +// $Id: include/CGAL/Line_arc_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Julien Hazebrouck, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Line_arc_3.h b/thirdparty/CGAL/include/CGAL/Line_arc_3.h index 651e146f..b7e45827 100644 --- a/thirdparty/CGAL/include/CGAL/Line_arc_3.h +++ b/thirdparty/CGAL/include/CGAL/Line_arc_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Line_arc_3.h $ -// $Id: Line_arc_3.h acdf4c6 2020-07-22T15:23:09+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Line_arc_3.h $ +// $Id: include/CGAL/Line_arc_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, diff --git a/thirdparty/CGAL/include/CGAL/Linear_algebraCd.h b/thirdparty/CGAL/include/CGAL/Linear_algebraCd.h index c8b02b9a..1ec5f9d4 100644 --- a/thirdparty/CGAL/include/CGAL/Linear_algebraCd.h +++ b/thirdparty/CGAL/include/CGAL/Linear_algebraCd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Linear_algebraCd.h $ -// $Id: Linear_algebraCd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Linear_algebraCd.h $ +// $Id: include/CGAL/Linear_algebraCd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Linear_algebraHd.h b/thirdparty/CGAL/include/CGAL/Linear_algebraHd.h index 86e9ee65..b850156f 100644 --- a/thirdparty/CGAL/include/CGAL/Linear_algebraHd.h +++ b/thirdparty/CGAL/include/CGAL/Linear_algebraHd.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Linear_algebraHd.h $ -// $Id: Linear_algebraHd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Linear_algebraHd.h $ +// $Id: include/CGAL/Linear_algebraHd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -184,7 +184,7 @@ linear algebra functionality on matrices and vectors. Operations bounds ignore the cost for multiprecision arithmetic operations. All functions on integer matrices compute the exact result, i.e., -there is no rounding error. The implemenation follows a proposal of +there is no rounding error. The implementation follows a proposal of J. Edmonds (J. Edmonds, Systems of distinct representatives and linear algebra, Journal of Research of the Bureau of National Standards, (B), 71, 241 - 245). Most functions of linear algebra are { \em checkable diff --git a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_base.h b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_base.h index 4f68231d..65fae020 100644 --- a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_base.h +++ b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h $ -// $Id: Linear_cell_complex_base.h 849b477 2022-02-11T07:38:46+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h $ +// $Id: include/CGAL/Linear_cell_complex_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -64,8 +64,8 @@ namespace CGAL { static const unsigned int ambient_dimension = ambient_dim; static const unsigned int dimension = Base::dimension; - typedef typename Storage::Dart_handle Dart_handle; - typedef typename Storage::Dart_const_handle Dart_const_handle; + typedef typename Storage::Dart_descriptor Dart_descriptor; + typedef typename Storage::Dart_const_descriptor Dart_const_descriptor; typedef typename Storage::Helper Helper; typedef typename Storage::Point Point; @@ -79,11 +79,11 @@ namespace CGAL { struct Attribute_type: public Base::template Attribute_type {}; template - struct Attribute_handle: public Base::template Attribute_handle + struct Attribute_descriptor: public Base::template Attribute_descriptor {}; template - struct Attribute_const_handle: - public Base::template Attribute_const_handle + struct Attribute_const_descriptor: + public Base::template Attribute_const_descriptor {}; template struct Attribute_range: public Base::template Attribute_range @@ -94,10 +94,10 @@ namespace CGAL { {}; typedef typename Base::template Attribute_type<0>::type Vertex_attribute; - typedef typename Base::template Attribute_handle<0>::type - Vertex_attribute_handle; - typedef typename Base::template Attribute_const_handle<0>::type - Vertex_attribute_const_handle; + typedef typename Base::template Attribute_descriptor<0>::type + Vertex_attribute_descriptor; + typedef typename Base::template Attribute_const_descriptor<0>::type + Vertex_attribute_const_descriptor; typedef typename Base::template Attribute_range<0>::type Vertex_attribute_range; @@ -112,8 +112,8 @@ namespace CGAL { /// To use previous definition of create_dart methods. using Base::create_dart; using Base::attribute; - using Base::null_handle; - using Base::null_dart_handle; + using Base::null_descriptor; + using Base::null_dart_descriptor; using Base::point_of_vertex_attribute; using Base::other_extremity; using Base::darts; @@ -217,40 +217,40 @@ namespace CGAL { * @return an handle on the new attribute. */ template - Vertex_attribute_handle create_vertex_attribute(const Args&... args) + Vertex_attribute_descriptor create_vertex_attribute(const Args&... args) { return Base::template create_attribute<0>(args...); } /** * Create a new dart associated with an handle through an attribute. * @param ahandle the point handle to associated with the dart. - * @return a Dart_handle on the new dart. + * @return a Dart_descriptor on the new dart. */ - Dart_handle create_dart(Vertex_attribute_handle ahandle) + Dart_descriptor create_dart(Vertex_attribute_descriptor ahandle) { - Dart_handle res = create_dart(); + Dart_descriptor res = create_dart(); set_vertex_attribute_of_dart(res,ahandle); return res; } /** Create a new dart associated with a point. * @param apoint the point to associated with the dart. - * @return a Dart_handle on the new dart. + * @return a Dart_descriptor on the new dart. */ - Dart_handle create_dart(const Point& apoint) + Dart_descriptor create_dart(const Point& apoint) { return create_dart(create_vertex_attribute(apoint)); } /** Erase a given vertex attribute. * @param ahandle the handle to the vertex attribute to erase. */ - void erase_vertex_attribute(Vertex_attribute_handle ahandle) + void erase_vertex_attribute(Vertex_attribute_descriptor ahandle) { Base::template erase_attribute<0>(ahandle); } /** Set the vertex attribute of the given dart. * @param adart a dart. * @param ah the attribute to set. */ - void set_vertex_attribute_of_dart(Dart_handle adart, - Vertex_attribute_handle ah) + void set_vertex_attribute_of_dart(Dart_descriptor adart, + Vertex_attribute_descriptor ah) { return CGAL::internal::Set_i_attribute_of_dart_functor:: run(*this, adart, ah); @@ -260,8 +260,8 @@ namespace CGAL { * @param adart a dart of the vertex. * @param ah the attribute to set. */ - void set_vertex_attribute(Dart_handle adart, - Vertex_attribute_handle ah) + void set_vertex_attribute(Dart_descriptor adart, + Vertex_attribute_descriptor ah) { return CGAL::Set_i_attribute_functor::run(*this, adart, ah); } /// @return the Vertex_attribute_range for all vertex_attributes. @@ -279,31 +279,31 @@ namespace CGAL { /// Get the vertex_attribute associated with a dart. /// @param a dart /// @return the vertex_attribute. - Vertex_attribute_handle vertex_attribute(Dart_handle adart) + Vertex_attribute_descriptor vertex_attribute(Dart_descriptor adart) { return this->template attribute<0>(adart); } /// Get the vertex_attribute associated with a const dart. /// @param a dart /// @return the vertex_const_attribute. - Vertex_attribute_const_handle - vertex_attribute(Dart_const_handle adart) const + Vertex_attribute_const_descriptor + vertex_attribute(Dart_const_descriptor adart) const { return this->template attribute<0>(adart); } /// Get the point associated with a dart. /// @param a dart /// @return the point. - Point& point(Dart_handle adart) + Point& point(Dart_descriptor adart) { - CGAL_assertion(this->template attribute<0>(adart)!=null_handle ); + CGAL_assertion(this->template attribute<0>(adart)!=null_descriptor ); return point_of_vertex_attribute(this->template attribute<0>(adart)); } /// Get the point associated with a const dart. /// @param a dart /// @return the point. - const Point& point(Dart_const_handle adart) const + const Point& point(Dart_const_descriptor adart) const { - CGAL_assertion(this->template attribute<0>(adart)!=null_handle ); + CGAL_assertion(this->template attribute<0>(adart)!=null_descriptor ); return point_of_vertex_attribute(this->template attribute<0>(adart)); } @@ -318,7 +318,7 @@ namespace CGAL { for (typename Dart_range::const_iterator it(darts().begin()), itend(darts().end()); valid && it != itend; ++it) { - if ( vertex_attribute(it)==null_handle ) + if (vertex_attribute(it)==null_descriptor) { std::cerr << "Map not valid: dart "<<&(*it) <<" does not have a vertex."<< std::endl; @@ -350,7 +350,7 @@ namespace CGAL { >:: run(*this, it, marks); - if ( vertex_attribute(it)==null_handle ) + if ( vertex_attribute(it)==null_descriptor ) { // If a dart don't have a 0-attribute, we create a Point at the origin set_vertex_attribute(it, create_vertex_attribute(CGAL::ORIGIN)); @@ -372,11 +372,11 @@ namespace CGAL { /** test if the two given facets have the same geometry * @return true iff the two facets have the same geometry. */ - bool are_facets_same_geometry(Dart_const_handle d1, - Dart_const_handle d2) const + bool are_facets_same_geometry(Dart_const_descriptor d1, + Dart_const_descriptor d2) const { - Dart_const_handle s1=d1; - Dart_const_handle s2=d2; + Dart_const_descriptor s1=d1; + Dart_const_descriptor s2=d2; while (is_previous_exist(d1) && previous(s1)!=d1) { s1=previous(s1); @@ -412,11 +412,11 @@ namespace CGAL { * @return true iff the two facets have the same geometry with opposite * orientation. */ - bool are_facets_opposite_and_same_geometry(Dart_const_handle d1, - Dart_const_handle d2) const + bool are_facets_opposite_and_same_geometry(Dart_const_descriptor d1, + Dart_const_descriptor d2) const { - Dart_const_handle s1=d1; - Dart_const_handle s2=d2; + Dart_const_descriptor s1=d1; + Dart_const_descriptor s2=d2; while (is_previous_exist(d1) && previous(s1)!=d1) { s1=previous(s1); @@ -431,7 +431,7 @@ namespace CGAL { if (is_next_exist(d1)!=is_previous_exist(d2)) return false; - if (other_extremity(d2)!=null_handle && + if (other_extremity(d2)!=null_descriptor && point(d1)!=point(other_extremity(d2))) return false; @@ -463,7 +463,7 @@ namespace CGAL { // We store one dart per face, the face being accessed through its // minimal and maximal points. - std::map>> one_dart_per_facet; + std::map>> one_dart_per_facet; size_type mymark = get_new_mark(); // First we fill the std::map by one dart per facet, and by using @@ -475,7 +475,7 @@ namespace CGAL { { Point min_point=point(it); Point max_point=min_point; - Dart_handle min_dart=it; + Dart_descriptor min_dart=it; auto it2=this->template darts_of_cell_basic<2>(it, mymark).begin(); this->mark(it2, mymark); ++it2; @@ -505,7 +505,7 @@ namespace CGAL { for (auto itmap2=(itmap->second).begin(), itmap2end=(itmap->second).end(); itmap2!=itmap2end; ++itmap2) { - for (typename std::vector::iterator + for (typename std::vector::iterator it1=(itmap2->second).begin(), it1end=(itmap2->second).end(); it1!=it1end; ++it1) { @@ -513,7 +513,7 @@ namespace CGAL { if (!this->template is_opposite_exist<3>(*it1) && is_marked(*it1, AMark)) { - typename std::vector::iterator it2=it1; + typename std::vector::iterator it2=it1; { for (++it2; it2!=it1end; ) { @@ -556,7 +556,7 @@ namespace CGAL { * if closed==true, the edge has no 2-free dart. * @return the dart of the new segment incident to p0. */ - Dart_handle make_segment(const Point& p0,const Point& p1, + Dart_descriptor make_segment(const Point& p0,const Point& p1, bool closed=false) { return make_segment(create_vertex_attribute(p0), @@ -570,7 +570,7 @@ namespace CGAL { * @param p2 the third point. * @return the dart of the new triangle incident to p0 and edge p0p1. */ - Dart_handle make_triangle(const Point& p0, + Dart_descriptor make_triangle(const Point& p0, const Point& p1, const Point& p2) { @@ -586,7 +586,7 @@ namespace CGAL { * @param p3 the fourth point. * @return the dart of the new quadrangle incident to p0 and edge p0p1. */ - Dart_handle make_quadrangle(const Point& p0, + Dart_descriptor make_quadrangle(const Point& p0, const Point& p1, const Point& p2, const Point& p3) @@ -598,7 +598,7 @@ namespace CGAL { } - /** Create a tetrahedron given 4 Vertex_attribute_handle. + /** Create a tetrahedron given 4 Vertex_attribute_descriptor. * @param h0 the first vertex handle. * @param h1 the second vertex handle. * @param h2 the third vertex handle. @@ -606,15 +606,15 @@ namespace CGAL { * @return the dart of the new tetrahedron incident to h0, to edge * h0,h1 and to facet h0,h1,h2. */ - Dart_handle make_tetrahedron(Vertex_attribute_handle h0, - Vertex_attribute_handle h1, - Vertex_attribute_handle h2, - Vertex_attribute_handle h3) + Dart_descriptor make_tetrahedron(Vertex_attribute_descriptor h0, + Vertex_attribute_descriptor h1, + Vertex_attribute_descriptor h2, + Vertex_attribute_descriptor h3) { - Dart_handle d1 = make_triangle(h0, h1, h2); - Dart_handle d2 = make_triangle(h1, h0, h3); - Dart_handle d3 = make_triangle(h1, h3, h2); - Dart_handle d4 = make_triangle(h3, h0, h2); + Dart_descriptor d1 = make_triangle(h0, h1, h2); + Dart_descriptor d2 = make_triangle(h1, h0, h3); + Dart_descriptor d3 = make_triangle(h1, h3, h2); + Dart_descriptor d4 = make_triangle(h3, h0, h2); return this->make_combinatorial_tetrahedron(d1, d2, d3, d4); } @@ -627,7 +627,7 @@ namespace CGAL { * @return the dart of the new tetrahedron incident to p0, to edge * p0,p1 and to facet p0,p1,p2. */ - Dart_handle make_tetrahedron(const Point& p0, + Dart_descriptor make_tetrahedron(const Point& p0, const Point& p1, const Point& p2, const Point& p3) @@ -638,7 +638,7 @@ namespace CGAL { create_vertex_attribute(p3)); } - /** Create an hexahedron given 8 Vertex_attribute_handle. + /** Create an hexahedron given 8 Vertex_attribute_descriptor. * (8 vertices, 12 edges and 6 facets) * \verbatim * 4----7 @@ -659,21 +659,21 @@ namespace CGAL { * @return the dart of the new hexahedron incident to h0, to edge * h0,h5 and to the facet (h0,h5,h6,h1). */ - Dart_handle make_hexahedron(Vertex_attribute_handle h0, - Vertex_attribute_handle h1, - Vertex_attribute_handle h2, - Vertex_attribute_handle h3, - Vertex_attribute_handle h4, - Vertex_attribute_handle h5, - Vertex_attribute_handle h6, - Vertex_attribute_handle h7) + Dart_descriptor make_hexahedron(Vertex_attribute_descriptor h0, + Vertex_attribute_descriptor h1, + Vertex_attribute_descriptor h2, + Vertex_attribute_descriptor h3, + Vertex_attribute_descriptor h4, + Vertex_attribute_descriptor h5, + Vertex_attribute_descriptor h6, + Vertex_attribute_descriptor h7) { - Dart_handle d1 = make_quadrangle(h0, h5, h6, h1); - Dart_handle d2 = make_quadrangle(h1, h6, h7, h2); - Dart_handle d3 = make_quadrangle(h2, h7, h4, h3); - Dart_handle d4 = make_quadrangle(h3, h4, h5, h0); - Dart_handle d5 = make_quadrangle(h0, h1, h2, h3); - Dart_handle d6 = make_quadrangle(h5, h4, h7, h6); + Dart_descriptor d1 = make_quadrangle(h0, h5, h6, h1); + Dart_descriptor d2 = make_quadrangle(h1, h6, h7, h2); + Dart_descriptor d3 = make_quadrangle(h2, h7, h4, h3); + Dart_descriptor d4 = make_quadrangle(h3, h4, h5, h0); + Dart_descriptor d5 = make_quadrangle(h0, h1, h2, h3); + Dart_descriptor d6 = make_quadrangle(h5, h4, h7, h6); return this->make_combinatorial_hexahedron(d1, d2, d3, d4, d5, d6); } @@ -698,7 +698,7 @@ namespace CGAL { * @return the dart of the new hexahedron incident to p0, to edge * p0,p5 and to the facet (p0,p5,p6,p1). */ - Dart_handle make_hexahedron(const Point& p0, + Dart_descriptor make_hexahedron(const Point& p0, const Point& p1, const Point& p2, const Point& p3, @@ -723,7 +723,7 @@ namespace CGAL { * @return the barycenter of the cell. */ template - Point barycenter(Dart_const_handle adart) const + Point barycenter(Dart_const_descriptor adart) const { return CGAL::Barycenter_functor::run(*this, adart); } @@ -734,7 +734,7 @@ namespace CGAL { * @param update_attributes a boolean to update the enabled attributes * @return a dart handle to the new vertex containing p. */ - Dart_handle insert_point_in_cell_1(Dart_handle dh, const Point& p, + Dart_descriptor insert_point_in_cell_1(Dart_descriptor dh, const Point& p, bool update_attributes=true) { return this->insert_cell_0_in_cell_1(dh, @@ -748,14 +748,14 @@ namespace CGAL { * @param update_attributes a boolean to update the enabled attributes * @return a dart handle to the new vertex containing p. */ - Dart_handle insert_point_in_cell_2(Dart_handle dh, const Point& p, + Dart_descriptor insert_point_in_cell_2(Dart_descriptor dh, const Point& p, bool update_attributes=true) { - Vertex_attribute_handle v = create_vertex_attribute(p); + Vertex_attribute_descriptor v = create_vertex_attribute(p); - Dart_handle first = this->insert_cell_0_in_cell_2(dh, v, update_attributes); + Dart_descriptor first = this->insert_cell_0_in_cell_2(dh, v, update_attributes); - if ( first==null_handle ) // If the triangulated facet was made of one dart + if ( first==null_descriptor ) // If the triangulated facet was made of one dart erase_vertex_attribute(v); #ifdef CGAL_CMAP_TEST_VALID_INSERTIONS @@ -772,10 +772,10 @@ namespace CGAL { * @return a dart handle to the new vertex containing p. */ template - Dart_handle insert_point_in_cell(Dart_handle dh, const Point& p, + Dart_descriptor insert_point_in_cell(Dart_descriptor dh, const Point& p, bool update_attributes=true) { - CGAL_static_assertion(1<=i && i<=2); + static_assert(1<=i && i<=2); if (i==1) return insert_point_in_cell_1(dh, p, update_attributes); return insert_point_in_cell_2(dh, p, update_attributes); } @@ -786,7 +786,7 @@ namespace CGAL { * @param update_attributes a boolean to update the enabled attributes * @return a dart of the new edge, incident to the new vertex. */ - Dart_handle insert_dangling_cell_1_in_cell_2(Dart_handle dh, + Dart_descriptor insert_dangling_cell_1_in_cell_2(Dart_descriptor dh, const Point& p, bool update_attributes=true) { @@ -801,7 +801,7 @@ namespace CGAL { * @return a dart handle to the new vertex containing p. */ template - Dart_handle insert_barycenter_in_cell(Dart_handle dh, bool update_attributes=true) + Dart_descriptor insert_barycenter_in_cell(Dart_descriptor dh, bool update_attributes=true) { return insert_point_in_cell(dh, barycenter(dh), update_attributes); } /** Compute the dual of a Linear_cell_complex. @@ -813,28 +813,28 @@ namespace CGAL { * simultaneously through all the darts of the two lcc and we have * each time of the iteration two "dual" darts. */ - Dart_handle dual_points_at_barycenter(Self & alcc, Dart_handle adart=null_handle) + Dart_descriptor dual_points_at_barycenter(Self & alcc, Dart_descriptor adart=null_descriptor) { - Dart_handle res = Base::dual(alcc, adart); + Dart_descriptor res=Base::dual(alcc, adart); // Now the lcc alcc is topologically correct, we just need to add // its geometry to each vertex (the barycenter of the corresponding // dim-cell in the initial map). - typename Dart_range::iterator it2 = alcc.darts().begin(); + typename Dart_range::iterator it2=alcc.darts().begin(); for (typename Dart_range::iterator it(darts().begin()); it!=darts().end(); ++it, ++it2) { - if (vertex_attribute(it2)==null_handle) + if (alcc.vertex_attribute(it2)==null_descriptor) { alcc.set_vertex_attribute(it2, alcc.create_vertex_attribute (barycenter(it))); } } - + CGAL_expensive_assertion(alcc.is_valid()); return res; } - /** Set the status of the managment of the attributes of the Map + /** Set the status of the management of the attributes of the Map */ void set_update_attributes(bool newval) { diff --git a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_bgl_min_items.h b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_bgl_min_items.h index b1a25cbf..23b975fa 100644 --- a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_bgl_min_items.h +++ b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_bgl_min_items.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/Linear_cell_complex_bgl_min_items.h $ -// $Id: Linear_cell_complex_bgl_min_items.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/Linear_cell_complex_bgl_min_items.h $ +// $Id: include/CGAL/Linear_cell_complex_bgl_min_items.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand diff --git a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_constructors.h b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_constructors.h index 1b7885c9..c42c23c0 100644 --- a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_constructors.h +++ b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_constructors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h $ -// $Id: Linear_cell_complex_constructors.h 440a8df 2022-02-03T08:41:04+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h $ +// $Id: include/CGAL/Linear_cell_complex_constructors.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -13,7 +13,8 @@ #define CGAL_LINEAR_CELL_COMPLEX_CONSTRUCTORS_H 1 #include -#include +#include +#include #include #include @@ -35,22 +36,22 @@ namespace CGAL { * Imports a plane-embedded graph from a list of points and edges represented as pairs of vertex indices */ template< class LCC > - typename LCC::Dart_handle import_from_plane_graph(LCC& alcc, + typename LCC::Dart_descriptor import_from_plane_graph(LCC& alcc, const std::vector& vertices, const std::vector& edge_indices) { typedef typename LCC::Traits::Construct_direction_2 Construct_direction_2; typedef typename LCC::Traits::Construct_vector Construct_vector; - typedef typename LCC::Dart_handle Dart_handle; + typedef typename LCC::Dart_descriptor Dart_descriptor; typedef typename LCC::Traits::Direction_2 Direction; - typedef typename std::map::iterator LCC_iterator; - typedef typename std::list::iterator List_iterator; + typedef typename std::map::iterator LCC_iterator; + typedef typename std::list::iterator List_iterator; typedef typename LCC::Point Point; - CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==2 ); + static_assert( LCC::dimension>=2 && LCC::ambient_dimension==2 ); CGAL_assertion(edge_indices.size() % 2 == 0); - std::vector< typename LCC::Vertex_attribute_handle > initVertices; + std::vector< typename LCC::Vertex_attribute_descriptor > initVertices; initVertices.reserve(vertices.size()); std::transform(vertices.begin(), vertices.end(), @@ -59,9 +60,9 @@ namespace CGAL { return alcc.create_vertex_attribute(point); }); - std::vector< std::list > testVertices{vertices.size(), std::list()}; + std::vector< std::list > testVertices{vertices.size(), std::list()}; - Dart_handle d1 = alcc.null_handle; + Dart_descriptor d1 = alcc.null_descriptor; for (std::size_t i = 0; (i + 1) < edge_indices.size(); i += 2) { const auto& v1 = edge_indices[i]; const auto& v2 = edge_indices[i + 1]; @@ -75,12 +76,12 @@ namespace CGAL { } // LCC associating directions and darts. - std::map tabDart; + std::map tabDart; List_iterator it; LCC_iterator it2; - Dart_handle first = alcc.null_handle; - Dart_handle prec = alcc.null_handle; + Dart_descriptor first = alcc.null_descriptor; + Dart_descriptor prec = alcc.null_descriptor; for (unsigned int i=0; i + tabDart.insert(std::pair (Construct_direction_2() (Construct_vector() (vertex1,vertex2)), *it)); @@ -102,7 +103,7 @@ namespace CGAL { while (it!=testVertices[i].end()) { vertex2 = alcc.point(alcc.other_extremity(*it)); - tabDart.insert(std::pair + tabDart.insert(std::pair (Construct_direction_2() (Construct_vector() (vertex1,vertex2)), *it)); @@ -134,10 +135,10 @@ namespace CGAL { * * @param alcc the linear cell complex where the graph will be imported. * @param ais the istream where read the graph. - * @return A dart created during the convertion. + * @return A dart created during the conversion. */ template< class LCC > - typename LCC::Dart_handle import_from_plane_graph(LCC& alcc, + typename LCC::Dart_descriptor import_from_plane_graph(LCC& alcc, std::istream& ais) { using FT = typename LCC::FT; @@ -153,7 +154,7 @@ namespace CGAL { { std::cout << "Problem: file does not contain enough vertices." << std::endl; - return alcc.null_handle; + return alcc.null_descriptor; } FT x, y; @@ -169,7 +170,7 @@ namespace CGAL { { std::cout << "Problem: file does not contain enough edges." << std::endl; - return alcc.null_handle; + return alcc.null_descriptor; } // We read an edge (given by the number of its two vertices). @@ -188,11 +189,11 @@ namespace CGAL { } template < class LCC > - typename LCC::Dart_handle + typename LCC::Dart_descriptor import_from_plane_graph(LCC& alcc, const char* filename) { std::ifstream input(filename); - if (!input.is_open()) return alcc.null_handle; + if (!input.is_open()) return alcc.null_descriptor; return import_from_plane_graph(alcc, input); } @@ -251,7 +252,7 @@ namespace CGAL { if(! in){ return false; } - B.add_vertex_to_facet(index); + B.add_vertex_to_facet(static_cast(index)); } B.end_facet(); scanner.skip_to_next_facet(i); @@ -316,20 +317,22 @@ namespace CGAL { alcc.number_of_halfedges(), alcc.template one_dart_per_cell<2>().size()); - typedef typename LCC::Vertex_attribute_range::iterator VCI; + typedef typename LCC::Vertex_attribute_range::const_iterator VCI; VCI vit, vend = alcc.vertex_attributes().end(); + + // TODO FOR index we do not need the Unique_hash_map. + size_t i=0; + CGAL::Unique_hash_map< typename LCC::Vertex_attribute_const_descriptor, + size_t, typename LCC::Hash_function > index; for (vit=alcc.vertex_attributes().begin(); vit!=vend; ++vit) { writer.write_vertex(::CGAL::to_double(vit->point().x()), ::CGAL::to_double(vit->point().y()), ::CGAL::to_double(vit->point().z())); + index[vit]=i++; // TODO for index } - typedef Inverse_index< VCI > Index; - Index index( alcc.vertex_attributes().begin(), - alcc.vertex_attributes().end()); writer.write_facet_header(); - typename LCC::size_type m = alcc.get_new_mark(); for (typename LCC::Dart_range::iterator itall = alcc.darts().begin(), @@ -338,7 +341,7 @@ namespace CGAL { if (!alcc.is_marked(itall, m)) { std::size_t n = 0; - typename LCC::Dart_handle cur=itall; + typename LCC::Dart_descriptor cur=itall; do { ++n; @@ -353,8 +356,7 @@ namespace CGAL { // Second we write the indices of vertices. do { - // TODO case with index - writer.write_facet_vertex_index(index[VCI(alcc.vertex_attribute(cur))]); + writer.write_facet_vertex_index(index[alcc.vertex_attribute(cur)]); // TODO for index alcc.mark(cur, m); alcc.mark(alcc.other_orientation(cur), m); // for GMap only, for CMap CGAL_assertion(alcc.is_next_exist(cur)); // marks the same dart twice diff --git a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h index 117e073e..8a5dc526 100644 --- a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h +++ b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h $ -// $Id: Linear_cell_complex_for_bgl_combinatorial_map_helper.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h $ +// $Id: include/CGAL/Linear_cell_complex_for_bgl_combinatorial_map_helper.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand diff --git a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_for_combinatorial_map.h b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_for_combinatorial_map.h index 0cdd4e6f..f8b7db0d 100644 --- a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_for_combinatorial_map.h +++ b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_for_combinatorial_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_combinatorial_map.h $ -// $Id: Linear_cell_complex_for_combinatorial_map.h 54142fd 2022-01-27T15:16:16+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_combinatorial_map.h $ +// $Id: include/CGAL/Linear_cell_complex_for_combinatorial_map.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -28,38 +29,32 @@ namespace CGAL { * points associated to all vertices. */ - // Linear_cell_complex_for_combinatorial_map class. - // No difference with class Linear_cell_complex_base except the default - // template parameters for Refs class which is a combinatorial map. + // Linear_cell_complex_for_combinatorial_map_base class. template < unsigned int d_, unsigned int ambient_dim, class Traits_, class Items_, class Alloc_, template class CMap, - class Storage_ > - class Linear_cell_complex_for_combinatorial_map: + class Refs_, class Storage_ > + class Linear_cell_complex_for_combinatorial_map_base: public Linear_cell_complex_base, - Storage_> + Items_, Alloc_, CMap, Refs_, Storage_> { public: - typedef Linear_cell_complex_for_combinatorial_map Self; + typedef Linear_cell_complex_for_combinatorial_map_base Self; typedef Linear_cell_complex_base Base; + Traits_, Items_, Alloc_, CMap, Refs_, Storage_> Base; typedef Traits_ Traits; typedef Items_ Items; typedef Alloc_ Alloc; + typedef Refs_ Refs; static const unsigned int ambient_dimension = Base::ambient_dimension; static const unsigned int dimension = Base::dimension; - typedef typename Base::Dart_handle Dart_handle; - typedef typename Base::Dart_const_handle Dart_const_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; + typedef typename Base::Dart_const_descriptor Dart_const_descriptor; typedef typename Base::Helper Helper; typedef typename Base::Point Point; @@ -69,10 +64,10 @@ namespace CGAL { typedef typename Base::Dart_range Dart_range; typedef typename Base::template Attribute_type<0>::type Vertex_attribute; - typedef typename Base::template Attribute_handle<0>::type - Vertex_attribute_handle; - typedef typename Base::template Attribute_const_handle<0>::type - Vertex_attribute_const_handle; + typedef typename Base::template Attribute_descriptor<0>::type + Vertex_attribute_descriptor; + typedef typename Base::template Attribute_const_descriptor<0>::type + Vertex_attribute_const_descriptor; typedef typename Base::template Attribute_range<0>::type Vertex_attribute_range; @@ -86,7 +81,7 @@ namespace CGAL { typedef typename Base::Exception_no_more_available_mark Exception_no_more_available_mark; - Linear_cell_complex_for_combinatorial_map() : Base() + Linear_cell_complex_for_combinatorial_map_base() : Base() {} /** Copy the given linear cell complex into *this. @@ -94,38 +89,38 @@ namespace CGAL { * @param alcc the linear cell complex to copy. * @post *this is valid. */ - Linear_cell_complex_for_combinatorial_map(const Self& alcc) : Base(alcc) + Linear_cell_complex_for_combinatorial_map_base(const Self& alcc) : Base(alcc) {} - Linear_cell_complex_for_combinatorial_map(Self&& alcc) : Base(alcc) + Linear_cell_complex_for_combinatorial_map_base(Self&& alcc) : Base(alcc) {} template class CMap2, - class Storage2> - Linear_cell_complex_for_combinatorial_map - (const Linear_cell_complex_for_combinatorial_map& alcc) : Base(alcc) + class Ref2, class Storage2> + Linear_cell_complex_for_combinatorial_map_base + (const Linear_cell_complex_for_combinatorial_map_base& alcc) : Base(alcc) {} template class CMap2, - class Storage2, typename Converters> - Linear_cell_complex_for_combinatorial_map - (const Linear_cell_complex_for_combinatorial_map& alcc, + class Ref2, class Storage2, typename Converters> + Linear_cell_complex_for_combinatorial_map_base + (const Linear_cell_complex_for_combinatorial_map_base& alcc, const Converters& converters) : Base(alcc, converters) {} template class CMap2, - class Storage2, typename Converters, typename DartInfoConverter> - Linear_cell_complex_for_combinatorial_map - (const Linear_cell_complex_for_combinatorial_map& alcc, + class Ref2, class Storage2, typename Converters, typename DartInfoConverter> + Linear_cell_complex_for_combinatorial_map_base + (const Linear_cell_complex_for_combinatorial_map_base& alcc, const Converters& converters, const DartInfoConverter& dartinfoconverter) : Base(alcc, converters, dartinfoconverter) @@ -134,11 +129,11 @@ namespace CGAL { template class CMap2, - class Storage2, typename Converters, + class Ref2, class Storage2, typename Converters, typename DartInfoConverter, typename PointConverter> - Linear_cell_complex_for_combinatorial_map - (const Linear_cell_complex_for_combinatorial_map& alcc, + Linear_cell_complex_for_combinatorial_map_base + (const Linear_cell_complex_for_combinatorial_map_base& alcc, const Converters& converters, const DartInfoConverter& dartinfoconverter, const PointConverter& pointconverter) : Base(alcc, converters, dartinfoconverter, pointconverter) @@ -168,16 +163,16 @@ namespace CGAL { const PointConverter& pointconverter, std::unordered_map ::halfedge_descriptor, - Dart_handle>* origin_to_copy=NULL, + Dart_descriptor>* origin_to_copy=NULL, std::unordered_map - ::halfedge_descriptor>* copy_to_origin=NULL) { std::unordered_map ::halfedge_descriptor, - Dart_handle> local_dartmap; + Dart_descriptor> local_dartmap; if (origin_to_copy==NULL) // Used local_dartmap if user does not provides its own unordered_map { origin_to_copy=&local_dartmap; } @@ -189,7 +184,7 @@ namespace CGAL { typename std::unordered_map ::halfedge_descriptor, - Dart_handle>::iterator dartmap_iter, dartmap_iter_end=origin_to_copy->end(); + Dart_descriptor>::iterator dartmap_iter, dartmap_iter_end=origin_to_copy->end(); for (dartmap_iter=origin_to_copy->begin(); dartmap_iter!=dartmap_iter_end; ++dartmap_iter) { @@ -208,9 +203,9 @@ namespace CGAL { void import_from_halfedge_graph(const HEG& heg, std::unordered_map ::halfedge_descriptor, - Dart_handle>* origin_to_copy=NULL, + Dart_descriptor>* origin_to_copy=NULL, std::unordered_map - ::halfedge_descriptor>* copy_to_origin=NULL) { @@ -225,6 +220,94 @@ namespace CGAL { void clear() { Base::clear(); } //need explicit definition for Has_member_clear in bgl helpers }; + template < unsigned int d_, unsigned int ambient_dim, + class Traits_, class Items_, class Alloc_, + template class CMap, + class Storage_ > + class Linear_cell_complex_for_combinatorial_map: + public Linear_cell_complex_for_combinatorial_map_base + , Storage_> + { + public: + typedef Linear_cell_complex_for_combinatorial_map Self; + + typedef Linear_cell_complex_for_combinatorial_map_base Base; + + typedef Traits_ Traits; + typedef Items_ Items; + typedef Alloc_ Alloc; + + Linear_cell_complex_for_combinatorial_map() : Base() + {} + + /** Copy the given linear cell complex into *this. + * Note that both LCC can have different dimensions and/or non void attributes. + * @param alcc the linear cell complex to copy. + * @post *this is valid. + */ + Linear_cell_complex_for_combinatorial_map(const Self& alcc) : Base(alcc) + {} + + Linear_cell_complex_for_combinatorial_map(Self&& alcc) : Base(alcc) + {} + + template class CMap2, + class Storage2> + Linear_cell_complex_for_combinatorial_map + (const Linear_cell_complex_for_combinatorial_map& alcc) : Base(alcc) + {} + + template class CMap2, + class Storage2, typename Converters> + Linear_cell_complex_for_combinatorial_map + (const Linear_cell_complex_for_combinatorial_map& alcc, + const Converters& converters) : Base(alcc, converters) + {} + + template class CMap2, + class Storage2, typename Converters, typename DartInfoConverter> + Linear_cell_complex_for_combinatorial_map + (const Linear_cell_complex_for_combinatorial_map& alcc, + const Converters& converters, + const DartInfoConverter& dartinfoconverter) : + Base(alcc, converters, dartinfoconverter) + {} + + template class CMap2, + class Storage2, typename Converters, + typename DartInfoConverter, typename PointConverter> + Linear_cell_complex_for_combinatorial_map + (const Linear_cell_complex_for_combinatorial_map& alcc, + const Converters& converters, const DartInfoConverter& dartinfoconverter, + const PointConverter& pointconverter) : + Base(alcc, converters, dartinfoconverter, pointconverter) + {} + + Self & operator= (const Self & alcc) + { + Base::operator=(alcc); + return *this; + } + + void clear() { Base::clear(); } //need explicit definition for Has_member_clear in bgl helpers +}; + } // namespace CGAL #endif // CGAL_LINEAR_CELL_COMPLEX_FOR_COMBINATORIAL_MAP_H // diff --git a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_for_generalized_map.h b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_for_generalized_map.h index 0ccbb28a..7858ea82 100644 --- a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_for_generalized_map.h +++ b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_for_generalized_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_generalized_map.h $ -// $Id: Linear_cell_complex_for_generalized_map.h 54142fd 2022-01-27T15:16:16+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_generalized_map.h $ +// $Id: include/CGAL/Linear_cell_complex_for_generalized_map.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -18,6 +18,7 @@ #include #include #include +#include namespace CGAL { @@ -26,38 +27,32 @@ namespace CGAL { * points associated to all vertices. */ - // Linear_cell_complex_for_generalized_map class. - // No difference with class Linear_cell_complex_base except the default - // template parameters for Refs class which is a generalized map. + // Linear_cell_complex_for_generalized_map class_base. template < unsigned int d_, unsigned int ambient_dim, class Traits_, class Items_, class Alloc_, template class CMap, - class Storage_ > - class Linear_cell_complex_for_generalized_map: + class Refs_, class Storage_ > + class Linear_cell_complex_for_generalized_map_base: public Linear_cell_complex_base, - Storage_> + Items_, Alloc_, CMap, Refs_, Storage_> { public: - typedef Linear_cell_complex_for_generalized_map Self; + typedef Linear_cell_complex_for_generalized_map_base Self; typedef Linear_cell_complex_base Base; + Traits_, Items_, Alloc_, CMap, Refs_, Storage_> Base; typedef Traits_ Traits; typedef Items_ Items; typedef Alloc_ Alloc; + typedef Refs_ Refs; static const unsigned int ambient_dimension = Base::ambient_dimension; static const unsigned int dimension = Base::dimension; - typedef typename Base::Dart_handle Dart_handle; - typedef typename Base::Dart_const_handle Dart_const_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; + typedef typename Base::Dart_const_descriptor Dart_const_descriptor; typedef typename Base::Helper Helper; typedef typename Base::Point Point; @@ -67,10 +62,10 @@ namespace CGAL { typedef typename Base::Dart_range Dart_range; typedef typename Base::template Attribute_type<0>::type Vertex_attribute; - typedef typename Base::template Attribute_handle<0>::type - Vertex_attribute_handle; - typedef typename Base::template Attribute_const_handle<0>::type - Vertex_attribute_const_handle; + typedef typename Base::template Attribute_descriptor<0>::type + Vertex_attribute_descriptor; + typedef typename Base::template Attribute_const_descriptor<0>::type + Vertex_attribute_const_descriptor; typedef typename Base::template Attribute_range<0>::type Vertex_attribute_range; @@ -84,6 +79,105 @@ namespace CGAL { typedef typename Base::Exception_no_more_available_mark Exception_no_more_available_mark; + Linear_cell_complex_for_generalized_map_base() : Base() + {} + + /** Copy the given linear cell complex into *this. + * Note that both LCC can have different dimensions and/or non void attributes. + * @param alcc the linear cell complex to copy. + * @post *this is valid. + */ + Linear_cell_complex_for_generalized_map_base(const Self & alcc) : Base(alcc) + {} + + Linear_cell_complex_for_generalized_map_base(Self && alcc) : Base(alcc) + {} + + template class CMap2, + class Ref2, class Storage2> + Linear_cell_complex_for_generalized_map_base + (const Linear_cell_complex_for_generalized_map_base& alcc) : Base(alcc) + {} + + template class CMap2, + class Ref2, class Storage2, typename Converters> + Linear_cell_complex_for_generalized_map_base + (const Linear_cell_complex_for_generalized_map_base& alcc, + const Converters& converters) : Base(alcc, converters) + {} + + template class CMap2, + class Ref2, class Storage2, typename Converters, typename DartInfoConverter> + Linear_cell_complex_for_generalized_map_base + (const Linear_cell_complex_for_generalized_map_base& alcc, + const Converters& converters, + const DartInfoConverter& dartinfoconverter) : + Base(alcc, converters, dartinfoconverter) + {} + + template class CMap2, + class Ref2, class Storage2, typename Converters, typename DartInfoConverter, + typename PointConverter> + Linear_cell_complex_for_generalized_map_base + (const Linear_cell_complex_for_generalized_map_base& alcc, + const Converters& converters, + const DartInfoConverter& dartinfoconverter, + const PointConverter& pointconverter) : + Base(alcc, converters, dartinfoconverter, pointconverter) + {} + + Self & operator= (const Self & alcc) + { + Base::operator=(alcc); + return *this; + } + + friend std::ostream& operator<< (std::ostream& os, const Self& amap) + { + save_generalized_map(amap, os); + return os; + } + + friend std::ifstream& operator>> (std::ifstream& is, Self& amap) + { + load_generalized_map(is, amap); + return is; + } + }; + + template < unsigned int d_, unsigned int ambient_dim, + class Traits_, class Items_, class Alloc_, + template class CMap, + class Storage_ > + class Linear_cell_complex_for_generalized_map: + public Linear_cell_complex_for_generalized_map_base + , Storage_> + { + public: + typedef Linear_cell_complex_for_generalized_map Self; + + typedef Linear_cell_complex_for_generalized_map_base Base; + + typedef Traits_ Traits; + typedef Items_ Items; + typedef Alloc_ Alloc; + Linear_cell_complex_for_generalized_map() : Base() {} @@ -92,10 +186,10 @@ namespace CGAL { * @param alcc the linear cell complex to copy. * @post *this is valid. */ - Linear_cell_complex_for_generalized_map(const Self & alcc) : Base(alcc) + Linear_cell_complex_for_generalized_map(const Self& alcc) : Base(alcc) {} - Linear_cell_complex_for_generalized_map(Self && alcc) : Base(alcc) + Linear_cell_complex_for_generalized_map(Self&& alcc) : Base(alcc) {} template class CMap2, - class Storage2, typename Converters, typename DartInfoConverter, - typename PointConverter> + class Storage2, typename Converters, + typename DartInfoConverter, typename PointConverter> Linear_cell_complex_for_generalized_map (const Linear_cell_complex_for_generalized_map& alcc, - const Converters& converters, - const DartInfoConverter& dartinfoconverter, + const Converters& converters, const DartInfoConverter& dartinfoconverter, const PointConverter& pointconverter) : Base(alcc, converters, dartinfoconverter, pointconverter) {} @@ -149,18 +242,8 @@ namespace CGAL { return *this; } - friend std::ostream& operator<< (std::ostream& os, const Self& amap) - { - save_generalized_map(amap, os); - return os; - } - - friend std::ifstream& operator>> (std::ifstream& is, Self& amap) - { - load_generalized_map(is, amap); - return is; - } - }; + void clear() { Base::clear(); } //need explicit definition for Has_member_clear in bgl helpers +}; } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_fwd.h b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_fwd.h index 1ae7cf64..43e946b3 100644 --- a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_fwd.h +++ b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_fwd.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/Linear_cell_complex_fwd.h $ -// $Id: Linear_cell_complex_fwd.h 46f5325 2022-01-27T10:36:22+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/Linear_cell_complex_fwd.h $ +// $Id: include/CGAL/Linear_cell_complex_fwd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -12,20 +12,27 @@ #ifndef LINEAR_CELL_COMPLEX_FWD_H #define LINEAR_CELL_COMPLEX_FWD_H 1 -#include #include #include namespace CGAL { template + class Traits_, class Items_, class Alloc_> class CMap_linear_cell_complex_storage_1; template + class Traits_, class Items_, class Alloc_> class GMap_linear_cell_complex_storage_1; +template +class CMap_linear_cell_complex_storage_with_index; + +template +class GMap_linear_cell_complex_storage_with_index; + template struct LCC_default_kernel; @@ -35,6 +42,80 @@ struct Linear_cell_complex_traits; struct Linear_cell_complex_min_items; +namespace internal +{ +template +struct Default_storage_for_lcc_cmap_when_tag +{ + template + using type=CMap_linear_cell_complex_storage_1; +}; +template<> +struct Default_storage_for_lcc_cmap_when_tag +{ + template + using type=CMap_linear_cell_complex_storage_with_index; +}; + +template::value> +struct Default_storage_for_lcc_cmap +{ + template + using type=CMap_linear_cell_complex_storage_1; +}; +template +struct Default_storage_for_lcc_cmap +{ + template + using type=typename CGAL::internal::template + Default_storage_for_lcc_cmap_when_tag:: + template type; +}; + +template +struct Default_storage_for_lcc_gmap_when_tag +{ + template + using type=GMap_linear_cell_complex_storage_1; +}; +template<> +struct Default_storage_for_lcc_gmap_when_tag +{ + template + using type=GMap_linear_cell_complex_storage_with_index; +}; + +template::value> +struct Default_storage_for_lcc_gmap +{ + template + using type=GMap_linear_cell_complex_storage_1; +}; +template +struct Default_storage_for_lcc_gmap +{ + template + using type=typename CGAL::internal::template + Default_storage_for_lcc_gmap_when_tag:: + template type; +}; + +} // namespace internal + template < unsigned int d_, unsigned int ambient_dim, class Traits_, class Items_, @@ -45,26 +126,28 @@ template < unsigned int d_, unsigned int ambient_dim, class Storage_> class Linear_cell_complex_base; -template < unsigned int d_, unsigned int ambient_dim = d_, - class Traits_ = Linear_cell_complex_traits, - class Items_ = Linear_cell_complex_min_items, - class Alloc_ = CGAL_ALLOCATOR(int), - template - class CMap = Combinatorial_map_base, - class Storage_ = CMap_linear_cell_complex_storage_1 > +template, + class Items_=Linear_cell_complex_min_items, + class Alloc_=CGAL_ALLOCATOR(int), + template + class CMap=Combinatorial_map_base, + class Storage_=typename internal::template + Default_storage_for_lcc_cmap::template type> class Linear_cell_complex_for_combinatorial_map; -template < unsigned int d_, unsigned int ambient_dim = d_, - class Traits_ = Linear_cell_complex_traits, - class Items_ = Linear_cell_complex_min_items, - class Alloc_ = CGAL_ALLOCATOR(int), - template - class CMap = Generalized_map_base, - class Storage_ = GMap_linear_cell_complex_storage_1 > +template, + class Items_=Linear_cell_complex_min_items, + class Alloc_=CGAL_ALLOCATOR(int), + template + class CMap=Generalized_map_base, + class Storage_=typename internal::template + Default_storage_for_lcc_gmap::template type> class Linear_cell_complex_for_generalized_map; } // CGAL diff --git a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_incremental_builder_3.h b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_incremental_builder_3.h new file mode 100644 index 00000000..479b34d9 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_incremental_builder_3.h @@ -0,0 +1,408 @@ +// Copyright (c) 2011 CNRS and LIRIS' Establishments (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/Linear_cell_complex_incremental_builder_3.h $ +// $Id: include/CGAL/Linear_cell_complex_incremental_builder_3.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Guillaume Damiand +// +#ifndef CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_3_H +#define CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_3_H 1 + +#include +#include +#include +#include +#include +#include + +namespace CGAL { +/////////////////////////////////////////////////////////////////////////////// + template + struct Add_vertex_to_face + { + static typename LCC::Dart_descriptor run(LCC&, + typename LCC::Vertex_attribute_descriptor, + typename LCC::Dart_descriptor) + {} + }; + template + struct Add_vertex_to_face + { + static typename LCC::Dart_descriptor run(LCC& lcc, + typename LCC::Vertex_attribute_descriptor vh, + typename LCC::Dart_descriptor prev_dart) + { + typename LCC::Dart_descriptor res=lcc.create_dart(vh); + if (prev_dart!=lcc.null_descriptor) + { + lcc.template link_beta<1>(prev_dart, res); + } + return res; + } + static void run_for_last(LCC&, + typename LCC::Vertex_attribute_descriptor, + typename LCC::Dart_descriptor) + { // here nothing to do, all darts were already created. + } + }; + template + struct Add_vertex_to_face + { + static typename LCC::Dart_descriptor run(LCC& lcc, + typename LCC::Vertex_attribute_descriptor vh, + typename LCC::Dart_descriptor prev_dart) + { + typename LCC::Dart_descriptor res=lcc.create_dart(vh); + if (prev_dart!=lcc.null_descriptor) + { + lcc.template link_alpha<0>(prev_dart, res); + lcc.template link_alpha<1>(res, lcc.create_dart(vh)); + res=lcc.template alpha<1>(res); + } + return res; + } + static void run_for_last(LCC& lcc, + typename LCC::Vertex_attribute_descriptor vh, + typename LCC::Dart_descriptor prev_dart) + { + // here we need to create a last dart and 0-link it + CGAL_assertion(prev_dart!=lcc.null_descriptor); + lcc.template link_alpha<0>(prev_dart, lcc.create_dart(vh)); + } + }; +/////////////////////////////////////////////////////////////////////////////// +template +struct Find_opposite_2_no_control // No difference for CMap and GMap +{ + typedef typename LCC::Dart_descriptor DH; + typedef typename LCC::Vertex_attribute_descriptor VAH; + static DH run(LCC& lcc, + std::unordered_map>& + vertex_to_dart_map_in_surface, + VAH vah1, VAH vah2) + { + // We are searching edge vah2->vah1 (the opposite of edge vah1->vah2) + auto it2=vertex_to_dart_map_in_surface.find(vah2); + if (it2!=vertex_to_dart_map_in_surface.end()) + { + auto it1=it2->second.find(vah1); + if (it1!=it2->second.end()) + { return it1->second; } + } + return lcc.null_descriptor; + } +}; +/////////////////////////////////////////////////////////////////////////////// +template +struct Find_opposite_2_with_control +{ + typedef typename LCC::Dart_descriptor DH; + typedef typename LCC::Vertex_attribute_descriptor VAH; + static DH run(LCC& lcc, + std::unordered_map>&, + VAH, VAH) + { return lcc.null_descriptor; } +}; +template +struct Find_opposite_2_with_control +{ + typedef typename LCC::Dart_descriptor DH; + typedef typename LCC::Vertex_attribute_descriptor VAH; + static DH run(LCC& lcc, + std::unordered_map>& + vertex_to_dart_map_in_surface, + VAH vah1, VAH vah2) + { + DH res=Find_opposite_2_no_control::run(lcc, + vertex_to_dart_map_in_surface, + vah1, vah2); + if (res!=lcc.null_descriptor) + { + if (!lcc.template is_free<2>(res)) + { // Here a dart vah1->vah2 already exists, and it was already 2-sewn. + std::cerr<<"ERROR in Linear_cell_complex_incremental_builder_3: try to use a same oriented edge twice."<::run(lcc, + vertex_to_dart_map_in_surface, + vah2, vah1)!=lcc.null_descriptor) + { // Here a dart vah1->vah2 already exists (but it was not already 2-sewn). + std::cerr<<"ERROR in Linear_cell_complex_incremental_builder_3: try to use a same oriented edge twice."< +struct Find_opposite_2_with_control +{ + typedef typename LCC::Dart_descriptor DH; + typedef typename LCC::Vertex_attribute_descriptor VAH; + static DH run(LCC& lcc, + std::unordered_map>& + vertex_to_dart_map_in_surface, + VAH vah1, VAH vah2) + { + DH res=Find_opposite_2_no_control::run(lcc, + vertex_to_dart_map_in_surface, + vah1, vah2); + if (res!=lcc.null_descriptor) + { + if (!lcc.template is_free<2>(res)) + { // Here a dart vah1->vah2 already exists, and it was already 2-sewn. + std::cerr<<"ERROR in Linear_cell_complex_incremental_builder_3: try to use a same oriented edge twice."< +struct Add_edge_in_associative_array +{ + typedef typename LCC::Dart_descriptor DH; + typedef typename LCC::Vertex_attribute_descriptor VAH; + static void run(LCC&, DH, + std::unordered_map>&) + {} +}; +template +struct Add_edge_in_associative_array +{ + typedef typename LCC::Dart_descriptor DH; + typedef typename LCC::Vertex_attribute_descriptor VAH; + static void run(LCC& lcc, DH dh, + std::unordered_map>& + vertex_to_dart_map_in_surface) + { + vertex_to_dart_map_in_surface[lcc.vertex_attribute(dh)].insert + (std::make_pair(lcc.vertex_attribute(lcc.next(dh)), dh)); + } +}; +template +struct Add_edge_in_associative_array +{ + typedef typename LCC::Dart_descriptor DH; + typedef typename LCC::Vertex_attribute_descriptor VAH; + static void run(LCC& lcc, DH dh, + std::unordered_map>& + vertex_to_dart_map_in_surface) + { + vertex_to_dart_map_in_surface[lcc.vertex_attribute(dh)].insert + (std::make_pair(lcc.vertex_attribute(lcc.template alpha<0>(dh)), dh)); + + vertex_to_dart_map_in_surface + [lcc.vertex_attribute(lcc.template alpha<0>(dh))].insert + (std::make_pair(lcc.vertex_attribute(dh), lcc.template alpha<0>(dh))); + } +}; +/////////////////////////////////////////////////////////////////////////////// +template +struct Sew3_for_LCC_incremental_builder_3 +{ + static void run(LCC_& lcc, + typename LCC_::Dart_descriptor dh1, typename LCC_::Dart_descriptor dh2) + { + if(dh1!=lcc.null_descriptor) + { + if(!lcc.template is_free<3>(dh1)) + { + std::cerr<<"ERROR in Linear_cell_complex_incremental_builder_3: " + <<"it exist more than 2 faces with same indices."<(lcc.other_orientation(dh1), dh2); } + } + } +}; +template +struct Sew3_for_LCC_incremental_builder_3 +{ + static void run(LCC_&, typename LCC_::Dart_descriptor, typename LCC_::Dart_descriptor) + {} +}; +/////////////////////////////////////////////////////////////////////////////// +// Incremental builder +template < class LCC_ > +class Linear_cell_complex_incremental_builder_3 +{ +public: + typedef LCC_ LCC; + typedef typename LCC::Dart_descriptor DH; + typedef typename LCC::Vertex_attribute_descriptor VAH; + typedef typename LCC::Point Point_3; + typedef typename LCC::size_type size_type; + + Linear_cell_complex_incremental_builder_3(LCC & alcc) : + lcc(alcc) + {} + + VAH add_vertex(const Point_3& p) + { + VAH res=lcc.create_vertex_attribute(p); + vertex_map.push_back(res); + return res; + } + + void begin_facet() + { // std::cout<<"Begin facet: "<::run(lcc, vertex_map[i], prev_dart); + if ( prev_dart!=lcc.null_descriptor ) + { + DH opposite=Find_opposite_2_with_control:: + run(lcc, + vertex_to_dart_map_in_surface, + lcc.vertex_attribute(prev_dart), + lcc.vertex_attribute(cur_dart)); + if ( opposite!=lcc.null_descriptor ) + { + CGAL_assertion( lcc.template is_free<2>(opposite) ); + lcc.template set_opposite<2>(prev_dart, opposite); + } + + Add_edge_in_associative_array::run(lcc, prev_dart, + vertex_to_dart_map_in_surface); + + if (imax_vertex) { max_vertex=i; } + } + else + { first_dart=cur_dart; min_vertex=max_vertex=i; min_dart=cur_dart; } + + prev_dart=cur_dart; + } + + // End of the facet. Return the first dart of this facet. + DH end_facet() + { + CGAL_assertion( first_dart!=lcc.null_descriptor && prev_dart!=lcc.null_descriptor ); + + Add_vertex_to_face::run_for_last(lcc, + lcc.vertex_attribute(first_dart), + prev_dart); + + lcc.set_next(prev_dart, first_dart); + + DH opposite=Find_opposite_2_with_control:: + run(lcc, + vertex_to_dart_map_in_surface, + lcc.vertex_attribute(prev_dart), + lcc.vertex_attribute(first_dart)); + if ( opposite!=lcc.null_descriptor ) + { + CGAL_assertion( lcc.template is_free<2>(opposite) ); + lcc.template set_opposite<2>(prev_dart, opposite); + } + + Add_edge_in_associative_array::run(lcc, prev_dart, + vertex_to_dart_map_in_surface); + + if(LCC::dimension>2) + { + opposite=opposite_face(); + Sew3_for_LCC_incremental_builder_3::run(lcc, opposite, min_dart); + add_face_in_array(); + } + return first_dart; + } + + DH add_facet(std::initializer_list l) + { + begin_facet(); + for (size_type i:l) + { add_vertex_to_facet(i); } + return end_facet(); + } + + void begin_surface() + { + vertex_to_dart_map_in_surface.clear(); + } + + // End of the surface. Return one dart of the created surface. + DH end_surface() + { return first_dart; } + + protected: + /** test if the two given facets have the same vertex handle but with + * opposite orientations. For closed facets. + * @return true iff the two facets have the same vertex handle with opposite + * orientation. + */ + bool are_facets_opposite_and_same_vertex_descriptors(DH d1, DH d2) const + { + DH s1=d1; + DH s2=d2; + do + { + CGAL_assertion(lcc.is_next_exist(d1) && lcc.is_previous_exist(d2)); + CGAL_assertion(lcc.other_extremity(d2)!=lcc.null_descriptor); + + if (lcc.vertex_attribute(d1)!=lcc.vertex_attribute(d2)) + { return false; } + d1=lcc.next(d1); + d2=lcc.previous(d2); + } + while(d1!=s1); + + if (d2!=s2) { return false; } + return true; + } + + DH opposite_face() + { + auto it1=faces.find(min_vertex); + if(it1==faces.end()) { return lcc.null_descriptor; } + auto it2=it1->second.find(max_vertex); + if(it2==it1->second.end()) { return lcc.null_descriptor; } + for(auto it3=it2->second.begin(), it3end=it2->second.end(); it3!=it3end; ++it3) + { + if (are_facets_opposite_and_same_vertex_descriptors(*it3, min_dart)) + { return lcc.previous(*it3); } + } + return lcc.null_descriptor; + } + + void add_face_in_array() + { + faces[min_vertex][max_vertex].push_back(min_dart); + } + +private: + LCC& lcc; + std::vector vertex_map; // Map each index to the corresponding vertex handle + + // A map to associate to each edge of a surface its dart. The edge is given + // by its two vertex handles (source-target). + std::unordered_map> vertex_to_dart_map_in_surface; + std::unordered_map>> faces; + + DH first_dart; /// First dart of the current face + DH prev_dart; /// Prev dart of the current face + DH min_dart; /// dart with the min vertex of the current facet. + size_type min_vertex, max_vertex; /// min and max indices of vertices of the current face +}; + +} //namespace CGAL + +#endif // CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_3_H // +// EOF // diff --git a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_min_items.h b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_min_items.h index e9edbff3..80a26f76 100644 --- a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_min_items.h +++ b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_min_items.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/Linear_cell_complex_min_items.h $ -// $Id: Linear_cell_complex_min_items.h 46f5325 2022-01-27T10:36:22+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/Linear_cell_complex_min_items.h $ +// $Id: include/CGAL/Linear_cell_complex_min_items.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand diff --git a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_operations.h b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_operations.h index 6f017207..2641b224 100644 --- a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_operations.h +++ b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_operations.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/Linear_cell_complex_operations.h $ -// $Id: Linear_cell_complex_operations.h 440a8df 2022-02-03T08:41:04+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/Linear_cell_complex_operations.h $ +// $Id: include/CGAL/Linear_cell_complex_operations.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -48,12 +48,12 @@ namespace CGAL { */ template typename LCC::Vector compute_normal_of_cell_2 - (const LCC& amap, typename LCC::Dart_const_handle adart) + (const LCC& amap, typename LCC::Dart_const_descriptor adart) { typedef typename LCC::Point Point; typedef typename LCC::Vector Vector; - typename LCC::Dart_const_handle start=adart; + typename LCC::Dart_const_descriptor start=adart; Vector normal(CGAL::NULL_VECTOR); // We go to the beginning of the face (first dart) @@ -67,7 +67,7 @@ namespace CGAL { adart=start; do { - if (amap.other_extremity(adart)==LCC::null_handle) + if (amap.other_extremity(adart)==LCC::null_descriptor) adart=start; // To leave the loop, because we know that adart has no next dart else { @@ -95,7 +95,7 @@ namespace CGAL { */ template typename LCC::Vector compute_normal_of_cell_0 - (const LCC& amap, typename LCC::Dart_const_handle adart) + (const LCC& amap, typename LCC::Dart_const_descriptor adart) { typedef typename LCC::Vector Vector; Vector normal(CGAL::NULL_VECTOR); @@ -118,10 +118,10 @@ namespace CGAL { struct Barycenter_functor { static typename LCC::Point run(const LCC& amap, - typename LCC::Dart_const_handle adart) + typename LCC::Dart_const_descriptor adart) { - CGAL_static_assertion(0 { static typename LCC::Point run(const LCC& amap, - typename LCC::Dart_const_handle adart) + typename LCC::Dart_const_descriptor adart) { - CGAL_static_assertion(1<=LCC::dimension); - CGAL_assertion(adart != LCC::null_handle); - typename LCC::Dart_const_handle d2=amap.other_extremity(adart); - if (d2==amap.null_handle) return amap.point(adart); + static_assert(1<=LCC::dimension); + CGAL_assertion(adart != LCC::null_descriptor); + typename LCC::Dart_const_descriptor d2=amap.other_extremity(adart); + if (d2==amap.null_descriptor) return amap.point(adart); return typename LCC::Traits::Construct_midpoint() (amap.point(adart), amap.point(d2)); @@ -166,13 +166,13 @@ namespace CGAL { struct Barycenter_functor { static typename LCC::Point run(const LCC& amap, - typename LCC::Dart_const_handle adart) + typename LCC::Dart_const_descriptor adart) { - CGAL_static_assertion(2<=LCC::dimension); - CGAL_assertion(adart != LCC::null_handle); + static_assert(2<=LCC::dimension); + CGAL_assertion(adart != LCC::null_descriptor); // We go to the beginning of the face (first dart, case of open face) - typename LCC::Dart_const_handle start=adart; + typename LCC::Dart_const_descriptor start=adart; while ( amap.is_previous_exist(start) && amap.previous(start)!=adart ) start = amap.previous(start); diff --git a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_traits.h b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_traits.h index e6bf67e9..ce81e00f 100644 --- a/thirdparty/CGAL/include/CGAL/Linear_cell_complex_traits.h +++ b/thirdparty/CGAL/include/CGAL/Linear_cell_complex_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/Linear_cell_complex_traits.h $ -// $Id: Linear_cell_complex_traits.h 0308d1a 2020-03-27T18:35:15+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/Linear_cell_complex_traits.h $ +// $Id: include/CGAL/Linear_cell_complex_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand diff --git a/thirdparty/CGAL/include/CGAL/Location_policy.h b/thirdparty/CGAL/include/CGAL/Location_policy.h index 752a7948..e64d1c30 100644 --- a/thirdparty/CGAL/include/CGAL/Location_policy.h +++ b/thirdparty/CGAL/include/CGAL/Location_policy.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Location_policy.h $ -// $Id: Location_policy.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Location_policy.h $ +// $Id: include/CGAL/Location_policy.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/MP_Float.h b/thirdparty/CGAL/include/CGAL/MP_Float.h index cd3b7324..9a9642eb 100644 --- a/thirdparty/CGAL/include/CGAL/MP_Float.h +++ b/thirdparty/CGAL/include/CGAL/MP_Float.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/MP_Float.h $ -// $Id: MP_Float.h 45b5fd4 2022-07-06T12:58:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/MP_Float.h $ +// $Id: include/CGAL/MP_Float.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -324,7 +324,7 @@ class MP_Float : boost::totally_ordered1 INTERN_MP_FLOAT::trunc_max) { diff --git a/thirdparty/CGAL/include/CGAL/Manhattan_distance_iso_box_point.h b/thirdparty/CGAL/include/CGAL/Manhattan_distance_iso_box_point.h index 3a4e5460..a2375792 100644 --- a/thirdparty/CGAL/include/CGAL/Manhattan_distance_iso_box_point.h +++ b/thirdparty/CGAL/include/CGAL/Manhattan_distance_iso_box_point.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Manhattan_distance_iso_box_point.h $ -// $Id: Manhattan_distance_iso_box_point.h d6398b5 2022-02-02T09:27:30+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Manhattan_distance_iso_box_point.h $ +// $Id: include/CGAL/Manhattan_distance_iso_box_point.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Marching_tetrahedra_observer_default_3.h b/thirdparty/CGAL/include/CGAL/Marching_tetrahedra_observer_default_3.h index 313a9c01..22ca030d 100644 --- a/thirdparty/CGAL/include/CGAL/Marching_tetrahedra_observer_default_3.h +++ b/thirdparty/CGAL/include/CGAL/Marching_tetrahedra_observer_default_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/Marching_tetrahedra_observer_default_3.h $ -// $Id: Marching_tetrahedra_observer_default_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/Marching_tetrahedra_observer_default_3.h $ +// $Id: include/CGAL/Marching_tetrahedra_observer_default_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Marching_tetrahedra_traits_skin_surface_3.h b/thirdparty/CGAL/include/CGAL/Marching_tetrahedra_traits_skin_surface_3.h index 68fac6a2..9cbf215f 100644 --- a/thirdparty/CGAL/include/CGAL/Marching_tetrahedra_traits_skin_surface_3.h +++ b/thirdparty/CGAL/include/CGAL/Marching_tetrahedra_traits_skin_surface_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/Marching_tetrahedra_traits_skin_surface_3.h $ -// $Id: Marching_tetrahedra_traits_skin_surface_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/Marching_tetrahedra_traits_skin_surface_3.h $ +// $Id: include/CGAL/Marching_tetrahedra_traits_skin_surface_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mean_curvature_flow_skeletonization.h b/thirdparty/CGAL/include/CGAL/Mean_curvature_flow_skeletonization.h index df40a4e4..ab2962bf 100644 --- a/thirdparty/CGAL/include/CGAL/Mean_curvature_flow_skeletonization.h +++ b/thirdparty/CGAL/include/CGAL/Mean_curvature_flow_skeletonization.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h $ -// $Id: Mean_curvature_flow_skeletonization.h 7564b76 2022-11-07T14:11:10+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h $ +// $Id: include/CGAL/Mean_curvature_flow_skeletonization.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Xiang Gao @@ -19,9 +19,13 @@ #include #include -#include -#include -#include +#include +#include +#include +#include + +#include +#include #include #include @@ -91,12 +95,20 @@ struct Skel_HDS_vertex_type : public HalfedgeDS_vertex_max_base_with_id -struct Skel_polyhedron_items_3: CGAL::Polyhedron_items_with_id_3 { +struct Skel_polyhedron_items_3 { template < class Refs, class Traits> struct Vertex_wrapper { typedef typename Traits::Point_3 Point; typedef Skel_HDS_vertex_type< Refs, Point, std::size_t, vertex_descriptor> Vertex; }; + template < class Refs, class Traits> + struct Halfedge_wrapper { + typedef HalfedgeDS_halfedge_max_base_with_id Halfedge; + }; + template < class Refs, class Traits> + struct Face_wrapper { + typedef HalfedgeDS_face_max_base_with_id< Refs, Tag_false, std::size_t> Face; + }; }; } //end of namespace internal @@ -192,7 +204,7 @@ class Mean_curvature_flow_skeletonization typedef typename Traits::Vector_3 Vector; typedef typename boost::graph_traits::vertex_descriptor Input_vertex_descriptor; - typedef CGAL::Polyhedron_3 > mTriangleMesh; + typedef CGAL::HalfedgeDS_default > mTriangleMesh; typedef typename boost::property_map::type mVertexPointMap; typedef typename boost::property_map::type VertexIndexMap; typedef typename boost::property_map::type HalfedgeIndexMap; @@ -222,6 +234,10 @@ class Mean_curvature_flow_skeletonization typedef typename boost::graph_traits::edge_descriptor edge_descriptor; typedef typename boost::graph_traits::edge_iterator edge_iterator; + struct Less_id { + bool operator()(const edge_descriptor& x, const edge_descriptor& y) const { return x.id() < y.id(); } + }; + // Get weight from the weight interface. typedef CGAL::Weights::Cotangent_weight Weight_calculator; @@ -257,9 +273,9 @@ class Mean_curvature_flow_skeletonization /** Traits class. */ Traits m_traits; - /** Controling the velocity of movement and approximation quality. */ + /** Controlling the velocity of movement and approximation quality. */ double m_omega_H; - /** Controling the smoothness of the medial approximation. */ + /** Controlling the smoothness of the medial approximation. */ double m_omega_P; /** Edges with length less than `min_edge_length` will be collapsed. */ double m_min_edge_length; @@ -503,6 +519,29 @@ std::size_t collapse_short_edges(); m_omega_P = value; } + /// \cgalAdvancedFunction + /// \cgalAdvancedBegin + /// sets the vertices in the range `[begin, end)` as fixed. Fixed vertices will not be moved + /// during contraction and this will therefore prevent convergence + /// towards the skeleton if `contract_until_convergence()` is used. + /// It is useful only if the end goal is to retrieve the meso-skeleton + /// after a number of `contract_geometry()`, keeping the specified + /// vertices fixed in place. + /// \tparam InputIterator a model of `InputIterator` with `boost::graph_traits::%vertex_descriptor` as value type. + /// \cgalAdvancedEnd + template + void set_fixed_vertices(InputIterator begin, InputIterator end) + { + std::unordered_set set(begin, end); + + for(vertex_descriptor vd : vertices(m_tmesh)) + { + if (set.find(vd->vertices[0]) != set.end()) { + vd->is_fixed = true; + } + } + } + /// \cond SKIP_FROM_MANUAL void set_zero_TH(double value) { @@ -1194,7 +1233,7 @@ std::size_t collapse_short_edges(); vertex_descriptor vk = target(ek, m_tmesh); // split the edge - halfedge_descriptor en = m_tmesh.split_edge(ei); + halfedge_descriptor en = Euler::split_edge(ei, m_tmesh); // split the incident faces Euler::split_face(en, next(ei,m_tmesh), m_tmesh); if (! is_border(ej,m_tmesh)) @@ -1390,7 +1429,7 @@ std::size_t Mean_curvature_flow_skeletonization edges_to_collapse, non_topologically_valid_collapses; + std::set edges_to_collapse, non_topologically_valid_collapses; for(edge_descriptor ed : edges(m_tmesh)) if ( edge_should_be_collapsed(ed) ) diff --git a/thirdparty/CGAL/include/CGAL/Memory_sizer.h b/thirdparty/CGAL/include/CGAL/Memory_sizer.h index 5a27d047..43030ad5 100644 --- a/thirdparty/CGAL/include/CGAL/Memory_sizer.h +++ b/thirdparty/CGAL/include/CGAL/Memory_sizer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Profiling_tools/include/CGAL/Memory_sizer.h $ -// $Id: Memory_sizer.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Profiling_tools/include/CGAL/Memory_sizer.h $ +// $Id: include/CGAL/Memory_sizer.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion, Andreas Fabri @@ -125,7 +125,7 @@ struct Memory_sizer #else // __APPLE__ is defined - // http://miknight.blogspot.com/2005/11/resident-set-size-in-mac-os-x.html + // https://miknight.blogspot.com/2005/11/resident-set-size-in-mac-os-x.html // This is highly experimental. But still better than returning 0. // It appears that we might need certain 'rights' to get access to the kernel // task... It works if you have admin rights apparently diff --git a/thirdparty/CGAL/include/CGAL/Mesh_2/Clusters.h b/thirdparty/CGAL/include/CGAL/Mesh_2/Clusters.h index 0c9e48f0..f99ba535 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_2/Clusters.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_2/Clusters.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Mesh_2/Clusters.h $ -// $Id: Clusters.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Mesh_2/Clusters.h $ +// $Id: include/CGAL/Mesh_2/Clusters.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -70,10 +70,10 @@ class Clusters /** \name Clusters public types */ /** - * \c Cluster register several informations about clusters. + * `Cluster` register information about clusters. * A cluster is a set of vertices v_i incident to one vertice * v_0, so that angles between segments [v_0, v_i] is less than 60 - * degres. + * degrees. */ struct Cluster { bool reduced ; /**< Is the cluster reduced? */ @@ -122,12 +122,12 @@ class Clusters typedef typename Cluster::Vertices_map Cluster_vertices_map; private: - /* --- protected datas --- */ + /* --- protected data --- */ Tr& tr; /**< The triangulation itself. */ /** - * Multimap \c Vertex_handle -> \c Cluster + * Multimap `Vertex_handle -> Cluster` * Each vertex can have several clusters. */ Cluster_map cluster_map; @@ -178,14 +178,14 @@ class Clusters private: /** - * Computes clusters of the vertex \c v, using the auxiliary function + * Computes clusters of the vertex `v`, using the auxiliary function * construct_cluster(). */ void create_clusters_of_vertex(const Vertex_handle v); /** - * Adds the sequence [\c begin, \c end] to the cluster \c c and adds it - * to the clusters of the vertex \c v. + * Adds the sequence `[begin, end]` to the cluster `c` and adds it + * to the clusters of the vertex `v`. */ void construct_cluster(const Vertex_handle v, const Constrained_edge_circulator& begin, @@ -196,7 +196,7 @@ class Clusters /** \name Functions to manage clusters during the refinement process. */ /** - * Update the cluster of [\c va,\c vb], putting \c vm instead of \c vb. + * Updates the cluster of `[va,vb]`, putting `vm` instead of `vb`. * If reduction=false, the edge [va,vm] is not set reduced. */ void update_cluster(Cluster& c, iterator it, @@ -205,8 +205,8 @@ class Clusters bool reduction = true); /** - * Returns the cluster of [\c va,\c vb] in \c c and return true - * if it is in a cluster. Returns also a const_iterator in \c it. + * Returns the cluster of `[va,vb]` in `c` and return true + * if it is in a cluster. Returns also a const_iterator in `it`. */ bool get_cluster(const Vertex_handle va, const Vertex_handle vb, Cluster& c, iterator& it); @@ -218,7 +218,7 @@ class Clusters /** \name Auxiliary functions that return a boolean. */ /** - * Tells if the angle is less than 60 degres. + * Tells if the angle is less than 60 degrees. * Uses squared_cosine_of_angle_times_4() and used by * create_clusters_of_vertex(). */ diff --git a/thirdparty/CGAL/include/CGAL/Mesh_2/Do_not_refine_edges.h b/thirdparty/CGAL/include/CGAL/Mesh_2/Do_not_refine_edges.h index 93593871..cb4deb43 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_2/Do_not_refine_edges.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_2/Do_not_refine_edges.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Mesh_2/Do_not_refine_edges.h $ -// $Id: Do_not_refine_edges.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Mesh_2/Do_not_refine_edges.h $ +// $Id: include/CGAL/Mesh_2/Do_not_refine_edges.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -54,7 +54,7 @@ class Do_not_refine_edges : Do_not_refine_edges(Tr& tr_) : Super(tr_) {} - /** \name FUNCTIONS NEEDED BY Mesher_level OVERIDDEN BY THIS CLASS. */ + /** \name FUNCTIONS NEEDED BY Mesher_level OVERRIDDEN BY THIS CLASS. */ void scan_triangulation_impl() { diff --git a/thirdparty/CGAL/include/CGAL/Mesh_2/Face_badness.h b/thirdparty/CGAL/include/CGAL/Mesh_2/Face_badness.h index 9c271a61..8eabd49f 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_2/Face_badness.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_2/Face_badness.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Mesh_2/Face_badness.h $ -// $Id: Face_badness.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Mesh_2/Face_badness.h $ +// $Id: include/CGAL/Mesh_2/Face_badness.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_2/Lipschitz_sizing_field_2.h b/thirdparty/CGAL/include/CGAL/Mesh_2/Lipschitz_sizing_field_2.h index fab09164..0603b1c9 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_2/Lipschitz_sizing_field_2.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_2/Lipschitz_sizing_field_2.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Mesh_2/Lipschitz_sizing_field_2.h $ -// $Id: Lipschitz_sizing_field_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Mesh_2/Lipschitz_sizing_field_2.h $ +// $Id: include/CGAL/Mesh_2/Lipschitz_sizing_field_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -54,6 +54,7 @@ class Lipschitz_sizing_field_2 typedef Apollonius_graph_traits_2 Apollonius_traits; typedef Apollonius_graph_2 Apollonius_graph; typedef typename Apollonius_traits::Site_2 Site; + typedef typename Sizing_field_2::FT FT; public: typedef std::list Site_set_2; @@ -144,12 +145,12 @@ class Lipschitz_sizing_field_2 return *this; } - double operator()(const Point& p) const + FT operator()(const Point& p) const override { if(points.empty() || points.size() == 1) - return K; + return FT(K); Site ns = (*ag.nearest_neighbor(p)).site(); - return K * weighted_distance(p, ns); + return FT(K * weighted_distance(p, ns)); } void set_K(double k) diff --git a/thirdparty/CGAL/include/CGAL/Mesh_2/Lloyd_move_2.h b/thirdparty/CGAL/include/CGAL/Mesh_2/Lloyd_move_2.h index abfc5ee3..d6e2ebd5 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_2/Lloyd_move_2.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_2/Lloyd_move_2.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Mesh_2/Lloyd_move_2.h $ -// $Id: Lloyd_move_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Mesh_2/Lloyd_move_2.h $ +// $Id: include/CGAL/Mesh_2/Lloyd_move_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jane Tournois, Raul Gallegos, Pierre Alliez diff --git a/thirdparty/CGAL/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h b/thirdparty/CGAL/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h index ff928d24..741aa653 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h $ -// $Id: Mesh_global_optimizer_2.h 0ac4bf6 2021-09-10T11:28:13+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h $ +// $Id: include/CGAL/Mesh_2/Mesh_global_optimizer_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jane Tournois, Raul Gallegos, Pierre Alliez, Stéphane Tayeb @@ -21,7 +21,7 @@ #define CGAL_MESH_2_OPTIMIZER_VERBOSE #endif -#include +#include #include #include #include @@ -33,8 +33,6 @@ #include #include -#include -#include #include #include @@ -92,7 +90,7 @@ class Mesh_global_optimizer_2 void set_time_limit(double time) { time_limit_ = time; } double time_limit() const { return time_limit_; } - /** The value type of \a InputIterator should be \c Point, and represents + /** The value type of \a InputIterator should be `Point`, and represents seeds. */ template @@ -108,7 +106,7 @@ class Mesh_global_optimizer_2 } } - Mesh_optimization_return_code operator()(const int nb_iterations) + Mesh_optimization_return_code operator()(const std::size_t nb_iterations) { running_time_.reset(); running_time_.start(); @@ -141,7 +139,7 @@ class Mesh_global_optimizer_2 bool convergence_stop = false; // Iterate - int i = -1; + std::size_t i = -1; while ( ++i < nb_iterations && ! is_time_limit_reached() ) { this->before_move(); @@ -222,7 +220,7 @@ class Mesh_global_optimizer_2 private: /** - * Returns moves for vertices of set \c moving_vertices + * Returns moves for vertices of set `moving_vertices`. */ Moves_vector compute_moves(Vertex_set& moving_vertices) { @@ -260,7 +258,7 @@ class Mesh_global_optimizer_2 } /** - * Returns the move for vertex \c v + * Returns the move for vertex `v`. */ Vector_2 compute_move(const Vertex_handle& v) { @@ -273,7 +271,7 @@ class Mesh_global_optimizer_2 FT local_move_sq_ratio = (move * move) / local_sq_size; - // Move point only if displacement is big enough w.r.t local size + // Move point only if displacement is big enough w.r.t. local size if ( local_move_sq_ratio < sq_freeze_ratio_ ) return CGAL::NULL_VECTOR; @@ -284,7 +282,7 @@ class Mesh_global_optimizer_2 } /** - * Returns the minimum cicumradius length of faces incident to \c v + * Returns the minimum cicumradius length of faces incident to `v`. */ FT min_sq_circumradius(const Vertex_handle& v) const { @@ -329,7 +327,7 @@ class Mesh_global_optimizer_2 typename FT_list::iterator pos = std::find_if( big_moves_.begin(), big_moves_.end(), - boost::lambda::_1 < new_sq_move ); + [&](const FT& v) { return v< new_sq_move; } ); big_moves_.insert(pos, new_sq_move); } @@ -343,8 +341,6 @@ class Mesh_global_optimizer_2 bool check_convergence() const { - namespace bl = boost::lambda; - FT sum(0); for(typename FT_list::const_iterator it = big_moves_.begin(); it != big_moves_.end(); @@ -395,8 +391,8 @@ class Mesh_global_optimizer_2 seeds_.end(), seeds_mark_/*faces that are not in domain are tagged false*/); //Connected components of seeds are marked with the value of - // \a mark. Other components are marked with \c !mark. The connected - // component of infinite faces is always marked with \c false. + // \a mark. Other components are marked with `!mark`. The connected + // component of infinite faces is always marked with `false`. } void after_all_moves() @@ -464,7 +460,7 @@ class Mesh_global_optimizer_2 bool seeds_mark_; double time_limit_; - CGAL::Timer running_time_; + CGAL::Real_timer running_time_; std::list big_moves_; diff --git a/thirdparty/CGAL/include/CGAL/Mesh_2/Mesh_sizing_field.h b/thirdparty/CGAL/include/CGAL/Mesh_2/Mesh_sizing_field.h index 41e9e100..0feb0a1d 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_2/Mesh_sizing_field.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_2/Mesh_sizing_field.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Mesh_2/Mesh_sizing_field.h $ -// $Id: Mesh_sizing_field.h 0ac4bf6 2021-09-10T11:28:13+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Mesh_2/Mesh_sizing_field.h $ +// $Id: include/CGAL/Mesh_2/Mesh_sizing_field.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -57,20 +57,20 @@ class Mesh_sizing_field } /** - * Returns size at point \c p. + * Returns size at point `p`. */ FT operator()(const Point_2& p) const { return this->operator()(p, last_face_); } /** - * Returns size at point \c p, using \c v to accelerate \c p location + * Returns size at point `p`, using `v` to accelerate `p` location * in triangulation */ FT operator()(const Point_2& p, const Vertex_handle& v) const { return this->operator()(p, v->face()); } /** - * Returns size at point \c p. + * Returns size at point `p`. */ FT operator()(const Point_2& p, const Face_handle& c) const { @@ -99,7 +99,7 @@ class Mesh_sizing_field private: /** - * Returns size at point \c p, by interpolation inside facet + * Returns size at point `p`, by interpolation inside facet. */ FT interpolate_on_face_vertices(const Point_2& #ifdef CGAL_MESH_2_SIZING_FIELD_USE_BARYCENTRIC_COORDINATES @@ -128,8 +128,8 @@ class Mesh_sizing_field } /** - * Returns size at point \c p, by interpolation inside edge - * (\c e f is assumed to be an infinite face) + * Returns size at point `p`, by interpolation inside edge + * (`f` is assumed to be an infinite face) */ FT interpolate_on_edge_vertices(const Point_2& #ifdef CGAL_MESH_2_SIZING_FIELD_USE_BARYCENTRIC_COORDINATES diff --git a/thirdparty/CGAL/include/CGAL/Mesh_2/Output_stream.h b/thirdparty/CGAL/include/CGAL/Mesh_2/Output_stream.h index 34c68b5f..e7cddf93 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_2/Output_stream.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_2/Output_stream.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesher_level/include/CGAL/Mesh_2/Output_stream.h $ -// $Id: Output_stream.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesher_level/include/CGAL/Mesh_2/Output_stream.h $ +// $Id: include/CGAL/Mesh_2/Output_stream.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_edges.h b/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_edges.h index 3c4f7a21..bea78865 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_edges.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_edges.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h $ -// $Id: Refine_edges.h e3934f1 2021-05-12T15:20:27+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h $ +// $Id: include/CGAL/Mesh_2/Refine_edges.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -41,7 +41,7 @@ namespace Mesh_2 { namespace details { - /** This class defines several auxiliary types for \c Refine_edges. */ + /** This class defines several auxiliary types for `Refine_edges`. */ template struct Refine_edges_base_types { @@ -50,7 +50,7 @@ namespace Mesh_2 { typedef std::pair Constrained_edge; - /** Object predicate that tests if a given \c Constrained_Edge is + /** Object predicate that tests if a given `Constrained_Edge` is really an edge of the triangulation and is constrained. */ class Is_a_constrained_edge { @@ -98,7 +98,7 @@ namespace Mesh_2 { typedef typename Tr::Point Point; typedef typename Tr::Geom_traits Geom_traits; - /** Operator that takes an edge (\c fh, \c index). */ + /** Operator that takes an edge (`fh`, `index`). */ bool operator()(const Tr& tr, const Face_handle& fh, const int i) const @@ -117,7 +117,7 @@ namespace Mesh_2 { ); } - /** Operator that takes an edge (\c va, \c vb). */ + /** Operator that takes an edge (`va`, `vb`). */ bool operator()(const Tr& tr, const Vertex_handle& va, const Vertex_handle& vb) const @@ -132,7 +132,7 @@ namespace Mesh_2 { } /** - * Operator that takes an edge (\c fh, \c index) and a point \c p. + * Operator that takes an edge (`fh`, `index`) and a point `p`. * Tests if the point encroached the edge. */ bool operator()(const Tr& tr, @@ -147,7 +147,7 @@ namespace Mesh_2 { } /** - * Operator that takes an edge (\c va, \c vb) and a point \c p. + * Operator that takes an edge (`va`, `vb`) and a point `p`. * Tests if the point encroached the edge. */ bool operator()(const Tr& tr, @@ -179,7 +179,7 @@ namespace Mesh_2 { typedef typename Tr::Point Point; typedef typename Tr::Geom_traits Geom_traits; - /** Operator that takes an edge (\c fh, \c index). */ + /** Operator that takes an edge (`fh`, `index`). */ bool operator()(const Tr& tr, const Face_handle& fh, const int i) const @@ -197,7 +197,7 @@ namespace Mesh_2 { return aux_outside_of_circle(tr, vi, vb, va, mvi); } - /** Operator that takes an edge (\c va, \c vb). */ + /** Operator that takes an edge (`va`, `vb`). */ bool operator()(const Tr& tr, const Vertex_handle& va, const Vertex_handle& vb) const @@ -269,7 +269,7 @@ namespace Mesh_2 { * \param Is_locally_conform defines the locally conform criterion: Gabriel * or Delaunay. It defaults to the Garbriel criterion. * \param Container is the type of container. It defaults to a filtered - * queue of \c Vertex_handle pair (see \c Filtered_queue_container). + * queue of `Vertex_handle` pair (see `Filtered_queue_container`). */ template < class Tr, @@ -301,7 +301,7 @@ class Refine_edges_base : template friend class Refine_edges_visitor; protected: - /* --- protected datas --- */ + /* --- protected data --- */ Tr& tr; /**< The triangulation itself. */ @@ -569,7 +569,7 @@ class Refine_edges_base : std::cerr << "E"; #endif // @todo Perhaps we should remove destroyed edges too. - // @warning This code has been rewroten! + // @warning This code has been rewritten! Face_circulator fc = tr.incident_faces(v), fcbegin(fc); if( fc == 0 ) return; @@ -586,7 +586,7 @@ class Refine_edges_base : Face_handle fh; int index = 0; // Avoids a warning. // We know that is_edge must return true, and is_edge will assign something to index - // but the compiler does not so it will issue a maybe uninitialized warning + // but the compiler does not so it will issue a maybe-uninitialized warning CGAL_assume_code(bool is_edge = ) tr.is_edge(va, v, fh, index); @@ -615,7 +615,7 @@ class Refine_edges_base : protected: /** \name Auxiliary functions */ - /** Add an \c Edge \c e in the queue. */ + /** Add an edge `e` in the queue. */ void add_constrained_edge_to_be_conformed(const Edge& e) { const Vertex_handle& va = e.first->vertex(tr. cw(e.second)); @@ -624,7 +624,7 @@ class Refine_edges_base : // base class } - /** Add an edge (\c va,\c vb) in the queue. */ + /** Add an edge `(va, vb)` in the queue. */ void add_constrained_edge_to_be_conformed(const Vertex_handle& va, const Vertex_handle& vb) { @@ -632,7 +632,7 @@ class Refine_edges_base : // base class } -private: /** \name DEBUGGING TYPES AND DATAS */ +private: /** \name DEBUGGING TYPES AND DATA */ class From_pair_of_vertex_to_edge : public CGAL::cpp98::unary_function { diff --git a/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_edges_visitor.h b/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_edges_visitor.h index f2de2ea9..848d99f0 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_edges_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_edges_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Mesh_2/Refine_edges_visitor.h $ -// $Id: Refine_edges_visitor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Mesh_2/Refine_edges_visitor.h $ +// $Id: include/CGAL/Mesh_2/Refine_edges_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,7 +24,7 @@ namespace Mesh_2 { /** * This class is the visitor needed when Refine_edges if called from * Refine_faces. - * \param Faces_mesher should be instanciated with Refine_face_base. + * \param Faces_mesher should be instantiated with Refine_face_base. */ template class Refine_edges_visitor : public ::CGAL::Null_mesh_visitor @@ -65,7 +65,7 @@ class Refine_edges_visitor : public ::CGAL::Null_mesh_visitor Null_mesh_visitor previous_level() const { return null_mesh_visitor; } /** - * Store vertex handles and markers at left and right of the edge \c e. + * Store vertex handles and markers at left and right of the edge `e`. */ void before_conflicts(const Edge& e, const Point&) { @@ -84,7 +84,7 @@ class Refine_edges_visitor : public ::CGAL::Null_mesh_visitor faces_mesher.before_insertion_impl(Face_handle(), p, z); } - /** Restore markers in the star of \c v. */ + /** Restore markers in the star of `v`. */ void after_insertion(const Vertex_handle& v) { Tr& tr = faces_mesher.triangulation_ref_impl(); diff --git a/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_edges_with_clusters.h b/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_edges_with_clusters.h index 6455b076..6a64b89b 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_edges_with_clusters.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_edges_with_clusters.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Mesh_2/Refine_edges_with_clusters.h $ -// $Id: Refine_edges_with_clusters.h e3934f1 2021-05-12T15:20:27+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Mesh_2/Refine_edges_with_clusters.h $ +// $Id: include/CGAL/Mesh_2/Refine_edges_with_clusters.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,13 +27,13 @@ namespace Mesh_2 { /** * This class is the base for the first level of Mesh_2: the edge * conforming level. It \e does handle clusters. - * To handle clusters, an helping \c Clusters object is used. + * To handle clusters, an helping `Clusters` object is used. * * \param Tr is the type of triangulation on which the level acts. * \param Is_locally_conform defines the locally conform criterion: Gabriel * or Delaunay. It defaults to the Garbriel criterion. * \param Container is the type of container. It defaults to a filtered - * queue of \c Vertex_handle pair (see \c Filtered_queue_container). + * queue of `Vertex_handle` pair (see `Filtered_queue_container`). */ template < class Tr, @@ -82,7 +82,7 @@ class Refine_edges_base_with_clusters : } - /** \name FUNCTIONS NEEDED BY Mesher_level OVERIDDEN BY THIS CLASS. */ + /** \name FUNCTIONS NEEDED BY Mesher_level OVERRIDDEN BY THIS CLASS. */ Point refinement_point_impl(const Edge& edge) { @@ -104,7 +104,7 @@ class Refine_edges_base_with_clusters : vb_has_a_cluster = false; cluster_splitted = false; - // true bellow to remove ca and cb because they will + // true below to remove ca and cb because they will // be restored by update_cluster(...). if( clusters.get_cluster(this->va,this->vb,ca,ca_it) ) { if( clusters.get_cluster(this->vb,this->va,cb,cb_it) ) diff --git a/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_faces.h b/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_faces.h index 1bf6702b..351b3d27 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_faces.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_2/Refine_faces.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Mesh_2/Refine_faces.h $ -// $Id: Refine_faces.h e3934f1 2021-05-12T15:20:27+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Mesh_2/Refine_faces.h $ +// $Id: include/CGAL/Mesh_2/Refine_faces.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -212,7 +212,7 @@ class Refine_faces_base : } } - /** Restore markers in the star of \c v. */ + /** Restore markers in the star of `v`. */ void after_insertion_impl(const Vertex_handle& v) { #ifdef CGAL_MESH_2_VERBOSE @@ -254,11 +254,11 @@ class Refine_faces_base : Mesh_2::Face_badness is_bad(Quality q) const; /** - * Adds the sequence [\c begin, \c end[ to the list + * Adds the sequence `[begin, end[` to the list * of bad faces. - * Use this overriden function if the list of bad faces can be + * Use this overridden function if the list of bad faces can be * computed easily without testing all faces. - * \param Fh_it is an iterator of \c Face_Handle. + * \param Fh_it is an iterator of `Face_Handle`. */ template void set_bad_faces(Fh_it begin, Fh_it end) diff --git a/thirdparty/CGAL/include/CGAL/Mesh_2/Sizing_field_2.h b/thirdparty/CGAL/include/CGAL/Mesh_2/Sizing_field_2.h index bbffa1ad..0830b3e4 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_2/Sizing_field_2.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_2/Sizing_field_2.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Mesh_2/Sizing_field_2.h $ -// $Id: Sizing_field_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Mesh_2/Sizing_field_2.h $ +// $Id: include/CGAL/Mesh_2/Sizing_field_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_2/Uniform_sizing_field_2.h b/thirdparty/CGAL/include/CGAL/Mesh_2/Uniform_sizing_field_2.h index f3ca02d1..e1a13c40 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_2/Uniform_sizing_field_2.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_2/Uniform_sizing_field_2.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Mesh_2/Uniform_sizing_field_2.h $ -// $Id: Uniform_sizing_field_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Mesh_2/Uniform_sizing_field_2.h $ +// $Id: include/CGAL/Mesh_2/Uniform_sizing_field_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/C3T3_helpers.h b/thirdparty/CGAL/include/CGAL/Mesh_3/C3T3_helpers.h index 8aa88999..50c3f9b4 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/C3T3_helpers.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/C3T3_helpers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h $ -// $Id: C3T3_helpers.h a9318b3 2021-10-15T09:48:54+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h $ +// $Id: include/CGAL/Mesh_3/C3T3_helpers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -36,14 +36,10 @@ #include #endif -#include -#include -#include #include #include -#include -#include #include +#include #ifdef CGAL_LINKED_WITH_TBB # include @@ -379,10 +375,10 @@ template class C3T3_helpers_base { protected: - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Gt::FT FT; + typedef typename GT::FT FT; typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Cell_handle Cell_handle; typedef typename Tr::Facet Facet; @@ -451,7 +447,7 @@ template class C3T3_helpers_base { protected: - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; typedef typename Tr::Vertex_handle Vertex_handle; @@ -626,14 +622,14 @@ class C3T3_helpers typedef typename Base::Lock_data_structure Lock_data_structure; typedef typename C3T3::Triangulation Tr; typedef Tr Triangulation; - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; - typedef typename Gt::FT FT; + typedef typename GT::FT FT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Gt::Vector_3 Vector_3; - typedef typename Gt::Plane_3 Plane_3; - typedef typename Gt::Tetrahedron_3 Tetrahedron; + typedef typename GT::Vector_3 Vector_3; + typedef typename GT::Plane_3 Plane_3; + typedef typename GT::Tetrahedron_3 Tetrahedron; typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Facet Facet; @@ -644,8 +640,8 @@ class C3T3_helpers typedef typename C3T3::Subdomain_index Subdomain_index; typedef typename C3T3::Index Index; - typedef boost::optional Surface_patch; - typedef boost::optional Subdomain; + typedef std::optional Surface_patch; + typedef std::optional Subdomain; typedef std::vector Cell_vector; typedef std::set Cell_set; @@ -684,7 +680,7 @@ class C3T3_helpers // ----------------------------------- // Public interface // ----------------------------------- - typedef boost::optional Update_mesh; + typedef std::optional Update_mesh; using Base::try_lock_point; using Base::try_lock_vertex; @@ -713,18 +709,18 @@ class C3T3_helpers { } /** - * @brief tries to move \c old_vertex to \c new_position in the mesh + * @brief tries to move `old_vertex` to `new_position` in the mesh * @param old_vertex the old vertex * @param move the translation from the old position to the new - * @param new_position the new position of \c old_vertex + * @param new_position the new position of `old_vertex` * @param criterion the criterion which will be used to verify the new * position is ok. c3t3 minimal value of new criterion shall not decrease. * @param modified_vertices contains the vertices incident to cells which * may have been impacted by relocation * @return a pair which contains: - * - a bool which is \c true if the move has been done. + * - a bool which is `true` if the move has been done. * - a Vertex_handle which is always filled and may be the new vertex (if - * the move is a success), or the vertex which lies at \c v's position in + * the move is a success), or the vertex which lies at `v`'s position in * the updated c3t3. */ template @@ -736,7 +732,7 @@ class C3T3_helpers OutputIterator modified_vertices, bool *could_lock_zone = nullptr); - /** @brief tries to move \c old_vertex to \c new_position in the mesh + /** @brief tries to move `old_vertex` to `new_position` in the mesh * * Same as update_mesh, but with the precondition that * Th().no_topological_change(tr_, old_vertex, new_position, @@ -751,7 +747,7 @@ class C3T3_helpers bool *could_lock_zone = nullptr); /** - * Updates mesh moving vertex \c old_vertex to \c new_position. Returns the + * Updates mesh moving vertex `old_vertex` to `new_position`. Returns the * new vertex of the triangulation. * * Insert into modified vertices the vertices which are impacted by to move. @@ -763,7 +759,7 @@ class C3T3_helpers bool fill_modified_vertices = true); /** - * Updates mesh moving vertex \c old_vertex to \c new_position. Returns the + * Updates mesh moving vertex `old_vertex` to `new_position`. Returns the * new vertex of the triangulation. */ Vertex_handle update_mesh(const Vertex_handle& old_vertex, @@ -792,6 +788,7 @@ class C3T3_helpers Moving_vertices_set& moving_vertices); void update_restricted_facets(); + void update_restricted_cells(); #ifdef CGAL_INTRUSIVE_LIST template @@ -800,14 +797,14 @@ class C3T3_helpers #endif /** - * @brief Project \c p on surface, using incident facets of \c v + * @brief Project `p` on surface, using incident facets of `v` * @param v The vertex from which p was moved * @param p The point to project * @param index The index of the surface patch where v lies, if known. * @return the projected point * - * \c p is projected as follows using normal of least square fitting plane - * on \c v incident surface points. If \c index is specified, only + * `p` is projected as follows using normal of least square fitting plane + * on `v` incident surface points. If `index` is specified, only * surface points that are on the same surface patch are used to compute * the fitting plane. */ @@ -816,16 +813,16 @@ class C3T3_helpers Surface_patch_index index = Surface_patch_index()) const; /** - * Returns the minimum value for criterion for incident cells of \c vh + * Returns the minimum value for criterion for incident cells of `vh` */ template FT min_incident_value(const Vertex_handle& vh, const SliverCriterion& criterion) const; /** - * Moves \c old_vertex to \c new_position - * Stores the cells which have to be updated in \c outdated_cells - * Updates the Vertex_handle old_vertex to its new value in \c moving_vertices + * Moves `old_vertex` to `new_position` + * Stores the cells which have to be updated in `outdated_cells` + * Updates the Vertex_handle old_vertex to its new value in `moving_vertices` * The second one (with the could_lock_zone param) is for the parallel version */ Vertex_handle move_point(const Vertex_handle& old_vertex, @@ -840,11 +837,11 @@ class C3T3_helpers bool *could_lock_zone) const; /** - * Try to lock ALL the incident cells and return in \c cells the ones - * whose \c filter says "true". + * Try to lock ALL the incident cells and return in `cells` the ones + * whose `filter` says `true`. * Return value: - * - false: everything is unlocked and \c cells is empty - * - true: ALL incident cells are locked and \c cells is filled + * - false: everything is unlocked and `cells` is empty + * - true: ALL incident cells are locked and `cells` is filled */ template bool @@ -853,10 +850,10 @@ class C3T3_helpers const Filter &filter) const; /** - * Try to lock ALL the incident cells and return in \c cells the slivers + * Try to lock ALL the incident cells and return in `cells` the slivers * Return value: - * - false: everything is unlocked and \c cells is empty - * - true: incident cells are locked and \c cells contains all slivers + * - false: everything is unlocked and `cells` is empty + * - true: incident cells are locked and `cells` contains all slivers */ template bool @@ -873,8 +870,8 @@ class C3T3_helpers Cell_vector &slivers) const; /** - * Outputs to out the sliver (wrt \c criterion and \c sliver_bound) incident - * to \c v + * Outputs to out the sliver (wrt `criterion` and `sliver_bound`) incident + * to `v` */ template OutputIterator @@ -892,7 +889,7 @@ class C3T3_helpers OutputIterator out) const; /** - * Returns the sliver (wrt \c criterion and \c sliver_bound) incident to \c v + * Returns the sliver (wrt `criterion` and `sliver_bound`) incident to `v` */ template Cell_vector @@ -918,7 +915,7 @@ class C3T3_helpers /** - * Returns the number of slivers incident to \c v + * Returns the number of slivers incident to `v` */ template std::size_t @@ -933,8 +930,8 @@ class C3T3_helpers const FT& sliver_bound) const; /** - * Returns the minimum criterion value of cells contained in \c cells - * Precondition: cells of \c cells must not be infinite. + * Returns the minimum criterion value of cells contained in `cells` + * Precondition: cells of `cells` must not be infinite. * Warning: Here we don't check if cells are in c3t3 */ template @@ -1093,10 +1090,10 @@ class C3T3_helpers , c3t3_(c3t3) {} /** - * @brief Updates facet \c facet in c3t3 + * @brief Updates facet `facet` in c3t3 * @param facet the facet to update - * @param update if set to \c false, checking only is done - * @return true if \c facet is in c3t3 + * @param update if set to `false`, checking only is done + * @return true if `facet` is in c3t3 */ Surface_patch operator()(const Facet& facet, const bool update = true) const { @@ -1104,31 +1101,31 @@ class C3T3_helpers } /** - * @brief Updates facet \c facet in c3t3 + * @brief Updates facet `facet` in c3t3 * @param facet the facet to update - * @param update_c3t3 if set to \c false, checking only is done - * @param update_surface_center if set to \c true, the facet surface + * @param update_c3t3 if set to `false`, checking only is done + * @param update_surface_center if set to `true`, the facet surface * center is updated. - * @return true if \c facet is in c3t3 + * @return true if `facet` is in c3t3 * - * By default, \c update_c3t3 is \c true, and \c update_surface_center - * is equal to \c update_c3t3. + * By default, `update_c3t3` is `true`, and `update_surface_center` + * is equal to `update_c3t3`. */ Surface_patch operator()(const Facet& facet, const bool update_c3t3, const bool update_surface_center) const { - typedef typename C3T3::Triangulation::Geom_traits Gt; - typedef typename Gt::Segment_3 Segment_3; - typedef typename Gt::Ray_3 Ray_3; - typedef typename Gt::Line_3 Line_3; + typedef typename C3T3::Triangulation::Geom_traits GT; + typedef typename GT::Segment_3 Segment_3; + typedef typename GT::Ray_3 Ray_3; + typedef typename GT::Line_3 Line_3; // Nothing to do for infinite facets if ( c3t3_.triangulation().is_infinite(facet) ) return Surface_patch(); // Functors - typename Gt::Is_degenerate_3 is_degenerate = + typename GT::Is_degenerate_3 is_degenerate = c3t3_.triangulation().geom_traits().is_degenerate_3_object(); // Get dual of facet @@ -1163,10 +1160,10 @@ class C3T3_helpers } /** - * @brief Updates cell \c ch in c3t3 + * @brief Updates cell `ch` in c3t3 * @param ch the cell to update - * @param update if set to \c false, checking only is done - * @return true if \c ch is in c3t3 + * @param update if set to `false`, checking only is done + * @return true if `ch` is in c3t3 */ Subdomain operator()(const Cell_handle& ch, const bool update = true) const { @@ -1557,7 +1554,7 @@ class C3T3_helpers // Private methods // ----------------------------------- /** - * Returns the minimum criterion value of c3t3 cells contained in \c cells. + * Returns the minimum criterion value of c3t3 cells contained in `cells`. */ template FT min_sliver_in_c3t3_value(const Cell_vector& cells, @@ -1572,22 +1569,15 @@ class C3T3_helpers Cell_vector c3t3_cells(const Cell_vector& cells) const { Cell_vector c3t3_cells; -#ifdef CGAL_CXX17 std::remove_copy_if(cells.begin(), cells.end(), std::back_inserter(c3t3_cells), std::not_fn(Is_in_c3t3(c3t3_))); -#else - std::remove_copy_if(cells.begin(), - cells.end(), - std::back_inserter(c3t3_cells), - std::not1(Is_in_c3t3(c3t3_)) ); -#endif return c3t3_cells; } /** - * Removes objects of [begin,end[ range from \c c3t3_ + * Removes objects of [begin,end[ range from `c3t3_` */ template void remove_from_c3t3(ForwardIterator begin, ForwardIterator end) const @@ -1597,7 +1587,7 @@ class C3T3_helpers } /** - * Remove cells and facets of \c cells from c3t3 + * Remove cells and facets of `cells` from c3t3 */ template < typename ForwardIterator > void remove_cells_and_facets_from_c3t3(ForwardIterator cells_begin, @@ -1609,7 +1599,7 @@ class C3T3_helpers } /** - * Insert into \c out the vertices of range [cells_begin,cells_end[ + * Insert into `out` the vertices of range [cells_begin,cells_end[ */ template void fill_modified_vertices(InputIterator cells_begin, @@ -1684,31 +1674,31 @@ class C3T3_helpers /** * Returns the least square plane from v, using adjacent surface points */ - std::pair, Bare_point> + std::pair, Bare_point> get_least_square_surface_plane(const Vertex_handle& v, Surface_patch_index index = Surface_patch_index()) const; /** - * @brief Project \c p on surface, using incident facets of \c v + * @brief Project `p` on surface, using incident facets of `v` * @param v The vertex from which p was moved * @param p The point to project * @param index The index of the surface patch where v lies, if known. - * @return a `boost::optional` with the projected point if the projection - * was possible, or `boost::none`. + * @return a `std::optional` with the projected point if the projection + * was possible, or `std::nullopt`. * - * \c p is projected using the normal of least square fitting plane - * on \c v incident surface points. If \c index is specified, only + * `p` is projected using the normal of least square fitting plane + * on `v` incident surface points. If `index` is specified, only * surface points that are on the same surface patch are used to compute * the fitting plane. */ - boost::optional + std::optional project_on_surface_if_possible(const Vertex_handle& v, const Bare_point& p, Surface_patch_index index = Surface_patch_index()) const; /** - * @brief Returns the projection of \c p, using direction of - * \c projection_vector + * @brief Returns the projection of `p`, using direction of + * `projection_vector` */ Bare_point project_on_surface_aux(const Bare_point& p, @@ -1716,8 +1706,8 @@ class C3T3_helpers const Vector_3& projection_vector) const; /** - * Reverts the move from \c old_point to \c new_vertex. Returns the inserted - * vertex located at \c old_point + * Reverts the move from `old_point` to `new_vertex`. Returns the inserted + * vertex located at `old_point` * and an output iterator on outdated cells */ template @@ -1737,7 +1727,7 @@ class C3T3_helpers } /** - * Returns the boundary of restricted facets of \c facets, + * Returns the boundary of restricted facets of `facets`, and the list of vertices of all restricted facets, which should not contain the vertex that is moving */ @@ -1747,7 +1737,7 @@ class C3T3_helpers Vertex_set& incident_surface_vertices) const; /** - * Returns the boundary of restricted facets of \c cells + * Returns the boundary of restricted facets of `cells` and the list of vertices of all restricted facets. */ Facet_boundary @@ -1761,13 +1751,13 @@ class C3T3_helpers } /** - * Returns false if there is a vertex belonging to one facet of \c facets + * Returns false if there is a vertex belonging to one facet of `facets` * which has not his dimension < 3 */ bool check_no_inside_vertices(const Facet_vector& facets) const; /** - * Returns the impacted cells when moving \c vertex to \c conflict_point + * Returns the impacted cells when moving `vertex` to `conflict_point` */ template OutputIterator @@ -1776,15 +1766,15 @@ class C3T3_helpers template OutputIterator - get_conflict_zone_topo_change(const Vertex_handle& vertex, - const Weighted_point& conflict_point, - OutputIterator conflict_cells) const; + get_conflict_zone_after_move_topo_change(const Vertex_handle& new_vertex, + const Weighted_point& old_position, + OutputIterator conflict_cells) const; template void - get_conflict_zone_topo_change(const Vertex_handle& v, - const Weighted_point& conflict_point, + get_conflict_zone_topo_change(const Vertex_handle& old_vertex, + const Weighted_point& new_position, CellsOutputIterator insertion_conflict_cells, FacetsOutputIterator insertion_conflict_boundary, CellsOutputIterator removal_conflict_cells, @@ -1806,7 +1796,7 @@ class C3T3_helpers DeletedCellsOutputIterator deleted_cells) const; /** - * Updates \c boundary wrt \c edge: if edge is already in boundary we remove + * Updates `boundary` wrt `edge`: if edge is already in boundary we remove * it, else we add it. */ void update_boundary(Facet_boundary& boundary, @@ -1832,7 +1822,7 @@ class C3T3_helpers } /** - * Returns the facets of \c cells (returns each facet only once i.e. use + * Returns the facets of `cells` (returns each facet only once i.e. use * canonical facet) */ Facet_vector get_facets(const Cell_vector& cells) const @@ -1901,7 +1891,7 @@ class C3T3_helpers } #else /** - * Returns the facets of \c cells (returns each facet only once i.e. use + * Returns the facets of `cells` (returns each facet only once i.e. use * canonical facet) */ template @@ -1938,7 +1928,7 @@ class C3T3_helpers { # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tbb::parallel_for_each( outdated_cells.begin(), outdated_cells.end(), @@ -1966,7 +1956,7 @@ class C3T3_helpers { # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tbb::parallel_for ( @@ -1992,7 +1982,7 @@ class C3T3_helpers /** - * Returns the facets of \c cells (returns each facet only once i.e. use + * Returns the facets of `cells` (returns each facet only once i.e. use * canonical facet) */ template @@ -2061,7 +2051,7 @@ class C3T3_helpers } /** - * Restore mesh for cells and facets of \c cells, using domain_ + * Restore mesh for cells and facets of `cells`, using domain_ */ template void restore_mesh(ForwardIterator first_cell, ForwardIterator last_cell) @@ -2071,7 +2061,7 @@ class C3T3_helpers } /** - * Restore mesh for cells of \c cells and facets of \c facets, using domain_ + * Restore mesh for cells of `cells` and facets of `facets`, using domain_ */ template void restore_mesh(CellForwardIterator first_cell, @@ -2086,8 +2076,8 @@ class C3T3_helpers } /** - * Returns true if facets of \c facets have the same boundary as - * \c old_boundary, and if the list of vertices has not changed. + * Returns true if facets of `facets` have the same boundary as + * `old_boundary`, and if the list of vertices has not changed. */ bool check_surface_mesh(const Vertex_handle& moving_vertex, const Facet_vector& facets, @@ -2114,7 +2104,7 @@ class C3T3_helpers } /** - * Orders handles \c h1, \c h2 & \c h3 + * Orders handles `h1`, `h2` & `h3` */ template void order_handles(Handle& h1, Handle& h2, Handle& h3) const @@ -2136,8 +2126,8 @@ class C3T3_helpers template void reset_sliver_cache(CellRange& cell_range) const { - reset_sliver_cache(boost::begin(cell_range), - boost::end(cell_range)); + reset_sliver_cache(std::begin(cell_range), + std::end(cell_range)); } template @@ -2153,8 +2143,8 @@ class C3T3_helpers template void reset_circumcenter_cache(CellRange& cell_range) const { - reset_circumcenter_cache(boost::begin(cell_range), - boost::end(cell_range)); + reset_circumcenter_cache(std::begin(cell_range), + std::end(cell_range)); } template @@ -2476,7 +2466,7 @@ update_mesh_no_topo_change(const Vertex_handle& old_vertex, << " " << new_position << ")" << std::endl; #endif - typename Gt::Construct_opposite_vector_3 cov = tr_.geom_traits().construct_opposite_vector_3_object(); + typename GT::Construct_opposite_vector_3 cov = tr_.geom_traits().construct_opposite_vector_3_object(); //backup metadata std::set cells_backup; @@ -2617,12 +2607,11 @@ update_mesh_topo_change(const Vertex_handle& old_vertex, } else { - // Removing from c3t3 cells which will be destroyed by revert_move + // Removing from c3t3 the cells which will be destroyed by revert_move // is done by move_point_topo_change_conflict_zone_known, called by revert_move #ifdef CGAL_MESH_3_C3T3_HELPERS_VERBOSE - std::cerr << "update_mesh_topo_change: revert move to " - << old_position << "\n"; + std::cerr << "update_mesh_topo_change: revert move to " << old_position << "\n"; #endif //reset caches in case cells are re-used by the compact container @@ -2632,7 +2621,7 @@ update_mesh_topo_change(const Vertex_handle& old_vertex, // Revert move Vertex_handle revert_vertex = revert_move(new_vertex, old_position, - std::inserter(outdated_cells, outdated_cells.end())); + std::inserter(outdated_cells, outdated_cells.end())); //restore meta-data (cells should have same connectivity as before move) //cells should be the same (connectivity-wise) as before initial move @@ -2662,13 +2651,13 @@ update_mesh(const Vertex_handle& old_vertex, Vertex_handle new_vertex = move_point(old_vertex, move, std::back_inserter(outdated_cells), CGAL::Emptyset_iterator()); - // move_point has invalidated caches + // move_point has invalidated caches restore_mesh(outdated_cells.begin(), outdated_cells.end()); // Fill modified vertices if ( fill_vertices - && !(boost::is_same::value)) + && !(std::is_same::value)) { fill_modified_vertices(outdated_cells.begin(), outdated_cells.end(), new_vertex, modified_vertices); @@ -2685,7 +2674,7 @@ C3T3_helpers:: rebuild_restricted_delaunay(OutdatedCells& outdated_cells, Moving_vertices_set& moving_vertices) { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); typename OutdatedCells::iterator first_cell = outdated_cells.begin(); typename OutdatedCells::iterator last_cell = outdated_cells.end(); @@ -2704,7 +2693,7 @@ rebuild_restricted_delaunay(OutdatedCells& outdated_cells, # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { std::vector outdated_cells_vector; outdated_cells_vector.reserve(outdated_cells.size()); @@ -2785,7 +2774,7 @@ rebuild_restricted_delaunay(OutdatedCells& outdated_cells, ++it ) { const Weighted_point& initial_position = tr_.point(*it); - boost::optional opt_new_pos = project_on_surface(*it, cp(initial_position)); + std::optional opt_new_pos = project_on_surface(*it, cp(initial_position)); if ( opt_new_pos ) { @@ -2815,9 +2804,9 @@ rebuild_restricted_delaunay(ForwardIterator first_cell, ForwardIterator last_cell, Moving_vertices_set& moving_vertices) { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Construct_vector_3 vector = tr_.geom_traits().construct_vector_3_object(); - typename Gt::Equal_3 equal = tr_.geom_traits().equal_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_vector_3 vector = tr_.geom_traits().construct_vector_3_object(); + typename GT::Equal_3 equal = tr_.geom_traits().equal_3_object(); Update_c3t3 updater(domain_,c3t3_); @@ -2828,7 +2817,7 @@ rebuild_restricted_delaunay(ForwardIterator first_cell, // Note: ~58% of rebuild_restricted_delaunay time #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tbb::parallel_for_each(first_cell, last_cell, Update_cell(c3t3_, updater)); @@ -2850,7 +2839,7 @@ rebuild_restricted_delaunay(ForwardIterator first_cell, #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tbb::parallel_for_each( facets.begin(), facets.end(), @@ -2897,7 +2886,7 @@ rebuild_restricted_delaunay(ForwardIterator first_cell, { Vertex_handle vh = it->first; const Weighted_point& initial_position = tr_.point(vh); - boost::optional opt_new_pos = project_on_surface(vh, cp(initial_position), it->second); + std::optional opt_new_pos = project_on_surface(vh, cp(initial_position), it->second); if ( opt_new_pos ) { @@ -2925,6 +2914,18 @@ update_restricted_facets() updater(*fit); } +template +void +C3T3_helpers:: +update_restricted_cells() +{ + Update_c3t3 updater(domain_, c3t3_); + for (typename C3T3::Triangulation::Finite_cells_iterator + cit = tr_.finite_cells_begin(); + cit != tr_.finite_cells_end(); ++cit) + updater(cit); +} + template template @@ -2941,16 +2942,16 @@ move_point(const Vertex_handle& old_vertex, << " " << move << ")\n"; #endif - typename Gt::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); + typename GT::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); Cell_vector incident_cells_; incident_cells_.reserve(64); # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tr_.incident_cells_threadsafe(old_vertex, std::back_inserter(incident_cells_)); } @@ -2992,9 +2993,9 @@ move_point(const Vertex_handle& old_vertex, << " " << move << ")\n"; #endif - typename Gt::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); + typename GT::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); Cell_vector incident_cells_; incident_cells_.reserve(64); @@ -3056,9 +3057,9 @@ move_point(const Vertex_handle& old_vertex, } //======= /Get incident cells ========== - typename Gt::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); + typename GT::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); const Weighted_point& position = tr_.point(old_vertex); const Weighted_point& new_position = cwp(translate(cp(position), move)); @@ -3138,7 +3139,8 @@ move_point_topo_change(const Vertex_handle& old_vertex, could_lock_zone); if (insertion_conflict_cells.empty()) return old_vertex;//new_position coincides with an existing vertex (not old_vertex) - //and old_vertex should not be removed of the nb_vertices will change + //and old_vertex should not be removed if the nb_vertices will change + reset_circumcenter_cache(removal_conflict_cells); reset_sliver_cache(removal_conflict_cells); reset_circumcenter_cache(insertion_conflict_cells); @@ -3248,7 +3250,9 @@ move_point_topo_change_conflict_zone_known( // Remove conflict zone cells from c3t3 (they will be deleted by insert/remove) remove_cells_and_facets_from_c3t3(conflict_zone.begin(), conflict_zone.end()); -// Start Move point // Insert new_vertex, remove old_vertex +// Start Move point + + // Insert new_vertex, remove old_vertex int dimension = c3t3_.in_dimension(old_vertex); Index vertex_index = c3t3_.index(old_vertex); FT meshing_info = old_vertex->meshing_info(); @@ -3273,18 +3277,20 @@ move_point_topo_change_conflict_zone_known( c3t3_.set_dimension(new_vertex,dimension); c3t3_.set_index(new_vertex,vertex_index); new_vertex->set_meshing_info(meshing_info); - // End Move point + +// End Move point //// Fill outdated_cells - // Get conflict zone in new triangulation and set cells outdated + // Get the union of the cells impacted by the insertion and the removal Cell_vector new_conflict_cells; new_conflict_cells.reserve(64); - get_conflict_zone_topo_change(new_vertex, old_position, - std::back_inserter(new_conflict_cells)); + get_conflict_zone_after_move_topo_change(new_vertex, old_position, + std::back_inserter(new_conflict_cells)); + std::copy(new_conflict_cells.begin(),new_conflict_cells.end(),outdated_cells); // Fill deleted_cells - if(! boost::is_same::value) + if(! std::is_same::value) std::copy(conflict_zone.begin(), conflict_zone.end(), deleted_cells); return new_vertex; @@ -3350,8 +3356,8 @@ move_point_no_topo_change(const Vertex_handle& old_vertex, /** - * @brief Returns the projection of \c p, using direction of - * \c projection_vector + * @brief Returns the projection of `p`, using direction of + * `projection_vector` */ template typename C3T3_helpers::Bare_point @@ -3360,14 +3366,14 @@ project_on_surface_aux(const Bare_point& p, const Bare_point& ref_point, const Vector_3& projection_vector) const { - typedef typename Gt::Segment_3 Segment_3; + typedef typename GT::Segment_3 Segment_3; // Build a segment directed as projection_direction, - typename Gt::Compute_squared_distance_3 sq_distance = tr_.geom_traits().compute_squared_distance_3_object(); - typename Gt::Compute_squared_length_3 sq_length = tr_.geom_traits().compute_squared_length_3_object(); - typename Gt::Construct_scaled_vector_3 scale = tr_.geom_traits().construct_scaled_vector_3_object(); - typename Gt::Is_degenerate_3 is_degenerate = tr_.geom_traits().is_degenerate_3_object(); - typename Gt::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); + typename GT::Compute_squared_distance_3 sq_distance = tr_.geom_traits().compute_squared_distance_3_object(); + typename GT::Compute_squared_length_3 sq_length = tr_.geom_traits().compute_squared_length_3_object(); + typename GT::Construct_scaled_vector_3 scale = tr_.geom_traits().construct_scaled_vector_3_object(); + typename GT::Is_degenerate_3 is_degenerate = tr_.geom_traits().is_degenerate_3_object(); + typename GT::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); typename MD::Construct_intersection construct_intersection = domain_.construct_intersection_object(); @@ -3413,20 +3419,21 @@ project_on_surface_aux(const Bare_point& p, template -std::pair::Plane_3>, +std::pair::Plane_3>, typename C3T3_helpers::Bare_point> C3T3_helpers:: get_least_square_surface_plane(const Vertex_handle& v, Surface_patch_index patch_index) const { typedef typename C3T3::Triangulation::Triangle Triangle; - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); // Get incident facets Facet_vector facets; # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tr_.finite_incident_facets_threadsafe(v, std::back_inserter(facets)); } @@ -3449,43 +3456,35 @@ get_least_square_surface_plane(const Vertex_handle& v, (patch_index == Surface_patch_index() || c3t3_.surface_patch_index(f) == patch_index) ) { - ref_facet = f; + if(ref_facet.first == Cell_handle()) + ref_facet = f; - // In the case of a periodic triangulation, the incident facets of a point - // do not necessarily have the same offsets. Worse, the surface centers - // might not have the same offset as their facet. Thus, no solution except - // calling a function 'get_closest_triangle(p, t)' that simply returns t - // for a non-periodic triangulation, and checks all possible offsets for - // periodic triangulations - - Triangle t = c3t3_.triangulation().triangle(f); - Triangle ct = tr_.get_closest_triangle(cp(position), t); + const Triangle ct = tr_.get_incident_triangle(f, v); triangles.push_back(ct); } } // In some cases point is not a real surface point if ( triangles.empty() ) - return std::make_pair(boost::none, Bare_point()); + return std::make_pair(std::nullopt, Bare_point(ORIGIN)); // Compute least square fitting plane Plane_3 plane; Bare_point point; - CGAL::linear_least_squares_fitting_3(triangles.begin(), triangles.end(), plane, point, Dimension_tag<2>(), tr_.geom_traits(), - Default_diagonalize_traits()); + Default_diagonalize_traits()); - return std::make_pair(plane, - ref_facet.first->get_facet_surface_center(ref_facet.second)); + // The surface center of a facet might have an offset in periodic triangulations + const Bare_point& ref_facet_scp = ref_facet.first->get_facet_surface_center(ref_facet.second); + const Bare_point& ref_point = tr_.get_closest_point(cp(position), ref_facet_scp); + return std::make_pair(plane, ref_point); } - - template typename C3T3_helpers::Bare_point C3T3_helpers:: @@ -3493,7 +3492,7 @@ project_on_surface(const Vertex_handle& v, const Bare_point& p, Surface_patch_index index) const { - boost::optional opt_point = + std::optional opt_point = project_on_surface_if_possible(v, p, index); if(opt_point) return *opt_point; else return p; @@ -3501,23 +3500,24 @@ project_on_surface(const Vertex_handle& v, template -boost::optional::Bare_point> +std::optional::Bare_point> C3T3_helpers:: project_on_surface_if_possible(const Vertex_handle& v, const Bare_point& p, Surface_patch_index index) const { + // @todo should call below if it's available... // return domain_.project_on_surface(p); - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Equal_3 equal = tr_.geom_traits().equal_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Equal_3 equal = tr_.geom_traits().equal_3_object(); // Get plane - std::pair, Bare_point> pl_rp + std::pair, Bare_point> pl_rp = get_least_square_surface_plane(v, index); - boost::optional opt_plane = pl_rp.first; - if(!opt_plane) return boost::none; + std::optional opt_plane = pl_rp.first; + if(!opt_plane) return std::nullopt; // Project const Weighted_point& position = tr_.point(v); @@ -3653,17 +3653,10 @@ incident_slivers(const Vertex_handle& v, std::vector incident_cells_; tr_.incident_cells(v, std::back_inserter(incident_cells_)); -#ifdef CGAL_CXX17 std::remove_copy_if(incident_cells_.begin(), incident_cells_.end(), out, std::not_fn(Is_sliver(c3t3_, criterion, sliver_bound))); -#else - std::remove_copy_if(incident_cells_.begin(), - incident_cells_.end(), - out, - std::not1(Is_sliver(c3t3_,criterion,sliver_bound))); -#endif return out; } @@ -3747,7 +3740,7 @@ min_sliver_value(const Cell_vector& cells, it != cells.end(); ++it) { - min_value = (std::min)(criterion(*it), min_value); + min_value = (std::min)(criterion(*it), min_value); } return min_value; } @@ -3836,8 +3829,8 @@ template void C3T3_helpers:: -get_conflict_zone_topo_change(const Vertex_handle& v, - const Weighted_point& conflict_point, +get_conflict_zone_topo_change(const Vertex_handle& old_vertex, + const Weighted_point& new_position, CellsOutputIterator insertion_conflict_cells, FacetsOutputIterator insertion_conflict_boundary, CellsOutputIterator removal_conflict_cells, @@ -3849,23 +3842,22 @@ get_conflict_zone_topo_change(const Vertex_handle& v, # ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { - tr_.incident_cells_threadsafe(v, removal_conflict_cells); + tr_.incident_cells_threadsafe(old_vertex, removal_conflict_cells); } // Sequential else # endif // CGAL_LINKED_WITH_TBB { - tr_.incident_cells(v, removal_conflict_cells); + tr_.incident_cells(old_vertex, removal_conflict_cells); } // Get conflict_point conflict zone int li=0; int lj=0; typename Tr::Locate_type lt; - Cell_handle cell = tr_.locate( - conflict_point, lt, li, lj, v->cell(), could_lock_zone); + Cell_handle cell = tr_.locate(new_position, lt, li, lj, old_vertex->cell(), could_lock_zone); if (could_lock_zone && *could_lock_zone == false) return; @@ -3874,7 +3866,7 @@ get_conflict_zone_topo_change(const Vertex_handle& v, return; // Find conflict zone - tr_.find_conflicts(conflict_point, + tr_.find_conflicts(new_position, cell, insertion_conflict_boundary, insertion_conflict_cells, @@ -3885,34 +3877,45 @@ template template OutputIterator C3T3_helpers:: -get_conflict_zone_topo_change(const Vertex_handle& vertex, - const Weighted_point& conflict_point, - OutputIterator conflict_cells) const +get_conflict_zone_after_move_topo_change(const Vertex_handle& new_vertex, + const Weighted_point& old_position, + OutputIterator conflict_cells) const { - // Get triangulation_vertex incident cells + // Gather the impacted cells: the union of `old_point` conflict zone and `new_vertex` incident cells + + // Get the incident cells of `new_vertex` Cell_vector incident_cells_; incident_cells_.reserve(64); - tr_.incident_cells(vertex, std::back_inserter(incident_cells_)); + tr_.incident_cells(new_vertex, std::back_inserter(incident_cells_)); - // Get conflict_point conflict zone + // Get the conflict zone of `old_point` Cell_vector deleted_cells; deleted_cells.reserve(64); - // Vertex removal is forbidden int li=0; int lj=0; - typename Tr::Locate_type locate_type; - Cell_handle cell = tr_.locate(conflict_point, locate_type, li, lj, vertex->cell()); + typename Tr::Locate_type lt; + Cell_handle cell = tr_.locate(old_position, lt, li, lj, new_vertex->cell()); - if ( Tr::VERTEX == locate_type ) - return conflict_cells; + // `Periodic_mesh_triangulation::remove()` can refuse to remove a point if this removal + // would compromise the 1-cover property (i.e., no too-long edges). + // The cells incident to `old_vertex` have not been modified at the TDS level if removal + // was rejected, but they still must be gathered here because of the call to + // `remove_cells_and_facets_from_c3t3()` + if (lt == Tr::VERTEX) + { + CGAL_assertion((std::is_same::value)); + tr_.incident_cells(cell->vertex(li), std::back_inserter(deleted_cells)); + } + else + { + tr_.find_conflicts(old_position, + cell, + CGAL::Emptyset_iterator(), + std::back_inserter(deleted_cells), + CGAL::Emptyset_iterator()); + } - // Find conflict zone - tr_.find_conflicts(conflict_point, - cell, - CGAL::Emptyset_iterator(), - std::back_inserter(deleted_cells), - CGAL::Emptyset_iterator()); // Compute union of conflict_point conflict zone and triangulation_vertex // incident cells @@ -3926,7 +3929,6 @@ get_conflict_zone_topo_change(const Vertex_handle& vertex, return conflict_cells; } - template typename C3T3_helpers::Facet_boundary C3T3_helpers:: diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h index 57fafc0e..d0ab9608 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h $ -// $Id: Cell_criteria_visitor_with_balls.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h $ +// $Id: include/CGAL/Mesh_3/Cell_criteria_visitor_with_balls.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -45,8 +45,8 @@ class Cell_criteria_visitor_with_balls typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; int nb_weighted_points; std::vector points; @@ -59,9 +59,9 @@ class Cell_criteria_visitor_with_balls Cell_criteria_visitor_with_balls(const Tr& tr, const Cell_handle& ch) : Base(tr, ch) { - typename Gt::Compare_weighted_squared_radius_3 compare_sq_radius = + typename GT::Compare_weighted_squared_radius_3 compare_sq_radius = tr.geom_traits().compare_weighted_squared_radius_3_object(); - typename Gt::Squared_radius_orthogonal_sphere sq_radius_ortho_sphere = + typename GT::Squared_radius_orthogonal_sphere sq_radius_ortho_sphere = tr.geom_traits().compute_squared_radius_smallest_orthogonal_sphere_3_object(); const Weighted_point& p = tr.point(ch, 0); diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Concurrent_mesher_config.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Concurrent_mesher_config.h index 9669f4d5..8b13dfc1 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Concurrent_mesher_config.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Concurrent_mesher_config.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Concurrent_mesher_config.h $ -// $Id: Concurrent_mesher_config.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Concurrent_mesher_config.h $ +// $Id: include/CGAL/Mesh_3/Concurrent_mesher_config.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Detect_features_in_image.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Detect_features_in_image.h new file mode 100644 index 00000000..17cf3eec --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Detect_features_in_image.h @@ -0,0 +1,327 @@ +// Copyright (c) 2022 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Detect_features_in_image.h $ +// $Id: include/CGAL/Mesh_3/Detect_features_in_image.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Sebastien Loriot, Jane Tournois +// +//****************************************************************************** +// +//****************************************************************************** + +#ifndef CGAL_MESH_3_DETECT_FEATURES_IN_IMAGE_H +#define CGAL_MESH_3_DETECT_FEATURES_IN_IMAGE_H + +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#ifdef CGAL_DEBUG_TRIPLE_LINES +#include +#endif + +namespace CGAL +{ +namespace Mesh_3 +{ +namespace internal +{ + +// Protect the intersection of the object with the box of the image, +// by declaring 1D-features. Note that `CGAL::polylines_to_protect` is +// not documented. +template +std::vector> +detect_features_in_image_with_know_word_type(const CGAL::Image_3& image, + CGAL::Image_3& weights) +{ + using GT = typename CGAL::Kernel_traits

    ::Kernel; + using Point_3 = P; + using Vector_3 = typename GT::Vector_3; + using Polyline_type = std::vector; + using Polylines = std::vector; + + CGAL::Mesh_3::Triple_line_extractor lines; + + Polylines features_inside; + + const double vx = image.vx(); + const double vy = image.vy(); + const double vz = image.vz(); + const double dist_bound = (std::min)(vx, (std::min)(vy, vz)) / 256; + const double sq_dist_bound = dist_bound * dist_bound; + + const std::size_t xdim = image.xdim(); + const std::size_t ydim = image.ydim(); + const std::size_t zdim = image.zdim(); + + const float tx = image.tx(); + const float ty = image.ty(); + const float tz = image.tz(); + + const bool postprocess_weights = weights.is_valid(); + std::vector> black_voxels; + + using CGAL::IMAGEIO::static_evaluate; + + using Del = CGAL::Delaunay_triangulation_3; + using Cell_handle = typename Del::Cell_handle; + using Vertex_handle = typename Del::Vertex_handle; + Del triangulation; + Cell_handle start_cell; + + using Word //use unsigned integral Word type to use it as an index + = typename CGAL::IMAGEIO::Word_type_generator::type; + + using Color_transform = internal::Color_transformation_helper; + typename Color_transform::type color_transformation; + std::array inv_color_transformation; + + using Permutation = internal::Permutation; + using Coord = internal::Coordinates; + + for (std::size_t k = 0, end_k = zdim - 1; k < end_k; ++k) + for (std::size_t j = 0, end_j = ydim - 1; j < end_j; ++j) + for (std::size_t i = 0, end_i = xdim - 1; i < end_i; ++i) + { + Vector_3 translation{ i * vx + tx, + j * vy + ty, + k * vz + tz }; + + const std::array cube = { + static_evaluate(image.image(), i , j , k), + static_evaluate(image.image(), i + 1, j , k), + static_evaluate(image.image(), i , j + 1, k), + static_evaluate(image.image(), i + 1, j + 1, k), + static_evaluate(image.image(), i , j , k + 1), + static_evaluate(image.image(), i + 1, j , k + 1), + static_evaluate(image.image(), i , j + 1, k + 1), + static_evaluate(image.image(), i + 1, j + 1, k + 1), + }; /// TODO: optimize the access to the image data + bool monocolor = (cube[0] == cube[1]); + for (int i = 2; i < 8; ++i) monocolor = monocolor && (cube[0] == cube[i]); + if (monocolor) continue; + + Color_transform::reset(color_transformation); + + std::uint8_t nb_color = 0; + for (int i = 0; i < 8; ++i) { + if (!Color_transform::is_valid(color_transformation, cube[i])) + { + color_transformation[cube[i]] = nb_color; + inv_color_transformation[nb_color] = cube[i]; + ++nb_color; + } + } + std::array reference_cube = { + color_transformation[cube[0]], + color_transformation[cube[1]], + color_transformation[cube[2]], + color_transformation[cube[3]], + color_transformation[cube[4]], + color_transformation[cube[5]], + color_transformation[cube[6]], + color_transformation[cube[7]] + }; + auto case_it = internal::find_case(internal::cases, reference_cube); + const bool case_found = (case_it != std::end(internal::cases)); + if (case_found) reference_cube = internal::combinations[(*case_it)[8]]; + else { + //std::cerr << "Warning: case not found: " << reference_cube << '\n'; + CGAL_error(); + }; +#ifdef CGAL_DEBUG_TRIPLE_LINES + CGAL::Mesh_3::internal::debug_cerr("Cube", cube); + CGAL::Mesh_3::internal::debug_cerr("reference cube", reference_cube); + CGAL::Mesh_3::internal::debug_cerr("with transformation", internal::cube_isometries[(*case_it)[9]]); +#endif // CGAL_DEBUG_TRIPLE_LINES + + auto fct_it = lines.create_polylines_fcts.find(reference_cube); + if (fct_it != lines.create_polylines_fcts.end()) + { +#ifdef CGAL_DEBUG_TRIPLE_LINES + CGAL::Mesh_3::internal::debug_cerr("Using the function of", Cube(fct_it->first)); +#endif // CGAL_DEBUG_TRIPLE_LINES + + if (postprocess_weights) + black_voxels.push_back({ i, j, k }); + + Polylines cube_features = (fct_it->second)(10); + if (case_found) + { + const Permutation& transformation = internal::cube_isometries[(*case_it)[9]]; + + Coord a1 = internal::coordinates[transformation[0]]; + Coord u = internal::minus(internal::coordinates[transformation[1]], a1); + Coord v = internal::minus(internal::coordinates[transformation[2]], a1); + Coord w = internal::minus(internal::coordinates[transformation[4]], a1); + + const Point_3 pa{ a1[0], a1[1], a1[2] }; + const Vector_3 vu{ u[0], u[1], u[2] }; + const Vector_3 vv{ v[0], v[1], v[2] }; + const Vector_3 vw{ w[0], w[1], w[2] }; +#ifdef CGAL_DEBUG_TRIPLE_LINES + std::cerr << "pa: " << pa << "\n"; + std::cerr << "vu: " << vu << "\n"; + std::cerr << "vv: " << vv << "\n"; + std::cerr << "vw: " << vw << "\n"; +#endif // CGAL_DEBUG_TRIPLE_LINES + for (auto& polyline : cube_features) { + for (auto& point : polyline) { + point = pa + + point.x() * vu + + point.y() * vv + + point.z() * vw; + point = { vx * point.x(), + vy * point.y(), + vz * point.z(), }; + point = point + translation; + } + for (int i = 0; i < 2; ++i) { + Point_3& extremity = (i == 0) ? polyline.front() : polyline.back(); + Vertex_handle vh = triangulation.nearest_vertex(extremity, start_cell); + if (Vertex_handle() != vh) { + if (squared_distance(vh->point(), extremity) < sq_dist_bound) { + extremity = vh->point(); + } + } + vh = triangulation.insert(extremity, start_cell); + start_cell = vh->cell(); + } + features_inside.push_back(std::move(polyline)); + } // end loop on polylines + } // end case where the transformation is not the identity + } // end if the reference_cube has polylines + } + + // call the split_graph_into_polylines, to create long polylines from the + // short polylines that were generated per voxel. + Polylines polylines_inside; + CGAL::polylines_to_protect(polylines_inside, + features_inside.begin(), + features_inside.end()); + + Polylines polylines_on_bbox; + CGAL::polylines_to_protect_on_bbox(image, polylines_on_bbox, + polylines_inside.begin(), + polylines_inside.end()); + + polylines_inside.insert(polylines_inside.end(), + polylines_on_bbox.begin(), + polylines_on_bbox.end()); + + if (postprocess_weights) + { + internal::feature_voxels_on_image_bbox(image, black_voxels); + internal::set_voxels(weights, black_voxels, 0/*black*/); + } + +#ifdef CGAL_DEBUG_TRIPLE_LINES + std::ofstream output_polylines("out-generated.polylines.txt"); + output_polylines.precision(17); + for (auto poly : boost::range::join(polylines_on_bbox, polylines_inside)) { + output_polylines << poly.size(); + for (auto p : poly) output_polylines << " " << p; + output_polylines << std::endl; + } +#endif + + return polylines_inside; +} + + +}// namespace internal + +/*! +* \ingroup PkgMesh3FeatureDetection +* +* Functor for feature detection in labeled images. +*/ +struct Detect_features_in_image +{ +public: + /*! + * detects and constructs the polylines that lie at the + * intersection of three or more subdomains. + * + * Each subdomain inside the bounding box + * of the input labeled image is defined as the set of voxels + * with the same value. The outside of the bounding box + * of the image is considered as a subdomain with voxel value + * `value_outside` (see \link CGAL::Labeled_mesh_domain_3::create_labeled_image_mesh_domain `create_labeled_image_mesh_domain()` \endlink + * parameters description). Hence, this function also computes + * intersections with the image bounding box. + * + * \tparam Point class model of `Kernel::Point_3`. It + * must match the triangulation point type. + * + * \param image the input image + * + * \returns a `std::vector>` + * containing the constructed polylines for later feature protection. + */ + template + std::vector> + operator()(const CGAL::Image_3& image) const + { + CGAL::Image_3 no_weights; + CGAL_IMAGE_IO_CASE(image.image(), + return (internal::detect_features_in_image_with_know_word_type(image, no_weights)); + ); + CGAL_error_msg("This place should never be reached, because it would mean " + "the image word type is a type that is not handled by " + "CGAL_ImageIO."); + + return std::vector>(); + } + + /*! + * Similar to the above function, + * but modifies `weights` to set the voxels that are + * part of a polyline feature to 0. + */ + template + std::vector> + operator()(const CGAL::Image_3& image, CGAL::Image_3& weights) const + { + CGAL_assertion(weights.is_valid()); + + CGAL_IMAGE_IO_CASE(image.image(), + return (internal::detect_features_in_image_with_know_word_type(image, weights)); + ); + CGAL_error_msg("This place should never be reached, because it would mean " + "the image word type is a type that is not handled by " + "CGAL_ImageIO."); + + return std::vector>(); + } +}; + + +}//end namespace Mesh_3 +}//end namespace CGAL + + +#endif //CGAL_MESH_3_DETECT_FEATURES_IN_IMAGE_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Detect_features_on_image_bbox.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Detect_features_on_image_bbox.h new file mode 100644 index 00000000..37ce04d0 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Detect_features_on_image_bbox.h @@ -0,0 +1,128 @@ +// Copyright (c) 2022 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Detect_features_on_image_bbox.h $ +// $Id: include/CGAL/Mesh_3/Detect_features_on_image_bbox.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Laurent Rineau, Jane Tournois +// +//****************************************************************************** +// +//****************************************************************************** + +#ifndef CGAL_MESH_3_DETECT_FEATURES_ON_IMAGE_BBOX_H +#define CGAL_MESH_3_DETECT_FEATURES_ON_IMAGE_BBOX_H + +#include + +#include + +#include +#include + +#include + + +namespace CGAL +{ +namespace Mesh_3 +{ +namespace internal +{ + +template +std::vector> +detect_features_on_bbox(const CGAL::Image_3& image, CGAL::Image_3& weights) +{ + using Point_3 = Point; + using Polyline_type = std::vector; + using Polylines = std::vector; + + const bool postprocess_weights = weights.is_valid(); + std::vector> black_voxels; + + Polylines polylines_on_bbox; + + CGAL_IMAGE_IO_CASE(image.image(), + { + if (postprocess_weights) + { + internal::feature_voxels_on_image_bbox(image, black_voxels); + internal::set_voxels(weights, black_voxels, 0/*black*/); + } + + (CGAL::polylines_to_protect(image, polylines_on_bbox)); + return polylines_on_bbox; + } + ); + CGAL_error_msg("This place should never be reached, because it would mean " + "the image word type is a type that is not handled by " + "CGAL_ImageIO."); + return Polylines(); +} + +}// namespace internal + +/*! +* \ingroup PkgMesh3FeatureDetection +* +* Functor for feature detection in labeled images. +*/ +struct Detect_features_on_image_bbox +{ +public: + + /*! + * detects and constructs the polylines that lie at the + * intersection of two or more subdomains and the bounding box + * of the input labeled image. + * + * Each subdomain inside the bounding box + * of the input labeled image is defined as the set of voxels + * with the same value. The outside of the bounding box + * of the image is considered as a subdomain with voxel value + * `value_outside` (see \link CGAL::Labeled_mesh_domain_3::create_labeled_image_mesh_domain `create_labeled_image_mesh_domain()` \endlink + * parameters description). Hence, this function computes + * intersections of "internal" subdomains with the image bounding box. + * + * \tparam Point class model of `Kernel::Point_3`. The point type + * must match the triangulation point type. + * + * \param image the input image + * + * \returns a `std::vector>` + * containing the constructed polylines for later feature protection. + */ + template + std::vector> + operator()(const CGAL::Image_3& image) const + { + CGAL::Image_3 no_weights; + return internal::detect_features_on_bbox(image, no_weights); + } + + /*! + * Similar to the above function, + * but modifies `weights` to set the voxels that are + * part of a polyline feature to 0. + */ + template + std::vector> + operator()(const CGAL::Image_3& image, CGAL::Image_3& weights) const + { + CGAL_assertion(weights.is_valid()); + + return internal::detect_features_on_bbox(image, weights); + } + +}; + +}//end namespace Mesh_3 +}//end namespace CGAL + + +#endif //CGAL_MESH_3_DETECT_FEATURES_ON_IMAGE_BBOX_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Dump_c3t3.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Dump_c3t3.h index cac92216..c49ffe10 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Dump_c3t3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Dump_c3t3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h $ -// $Id: Dump_c3t3.h 71e452a 2022-12-12T17:55:41+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h $ +// $Id: include/CGAL/Mesh_3/Dump_c3t3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -13,132 +13,8 @@ #ifndef CGAL_MESH_3_DUMP_C3T3_H #define CGAL_MESH_3_DUMP_C3T3_H -#include +#include -#include - -#include -#include -#include - -#include - -#include -#include - -namespace CGAL { - -template ::value && - is_streamable::value - && - (is_streamable::value || - Output_rep::is_specialized) - && - (is_streamable::value || - Output_rep::is_specialized) - > -struct Dump_c3t3 { - void dump_c3t3(const C3t3& c3t3, std::string prefix, bool verbose) const - { - if (verbose) - std::clog<<"======dump c3t3===== to: " << prefix << std::endl; - std::ofstream medit_file((prefix+".mesh").c_str()); - medit_file.precision(17); - CGAL::IO::output_to_medit(medit_file, c3t3, false /*rebind*/, true /*show_patches*/); - medit_file.close(); - - std::string bin_filename = prefix; - bin_filename += ".binary.cgal"; - std::ofstream bin_file(bin_filename.c_str(), - std::ios_base::binary | std::ios_base::out); - std::string signature = CGAL::Get_io_signature()(); - CGAL_assertion(signature != std::string()); - bin_file << "binary CGAL c3t3 " << signature << "\n"; - CGAL::IO::set_binary_mode(bin_file); - bin_file << c3t3; - } -}; // end struct template Dump_c3t3 - -template -struct Dump_c3t3 -{ - void dump_c3t3(const C3t3&, std::string, bool) { - std::cerr << "Warning " << __FILE__ << ":" << __LINE__ << "\n" - << " the c3t3 object of following type:\n" - << typeid(C3t3).name() << std::endl - << " cannot be dumped because some types are not streamable:\n"; - if(!is_streamable::value) { - std::cerr << " - C3t3::Triangulation::Vertex is not streamble\n"; - std::cerr << " " - << typeid(typename C3t3::Triangulation::Vertex).name() - << "\n"; - } - - if(!is_streamable::value) { - std::cerr << " - C3t3::Triangulation::Cell is not streamble\n"; - std::cerr << " " - << typeid(typename C3t3::Triangulation::Cell).name() - << "\n"; - } - - if(!is_streamable::value && - !CGAL::Output_rep::is_specialized) - { - std::cerr << " - C3t3::Surface_patch_index is not streamable\n"; - std::cerr << " " - << typeid(typename C3t3::Surface_patch_index).name() - << "\n"; - } - if(!is_streamable::value && - !CGAL::Output_rep::is_specialized) - { - std::cerr << " - C3t3::Subdomain_index is not streamable\n"; - std::cerr << " " - << typeid(typename C3t3::Subdomain_index).name() - << "\n"; - } - } -}; // end struct template specialization Dump_c3t3 - -template -void dump_c3t3_edges(const C3t3& c3t3, std::string prefix) -{ - typename C3t3::Triangulation::Geom_traits::Construct_point_3 cp = - c3t3.triangulation().geom_traits().construct_point_3_object(); - - std::ofstream file((prefix+".polylines.txt").c_str()); - file.precision(17); - for(typename C3t3::Edges_in_complex_iterator - edge_it = c3t3.edges_in_complex_begin(), - end = c3t3.edges_in_complex_end(); - edge_it != end; ++edge_it) - { - const typename C3t3::Triangulation::Cell_handle c = edge_it->first; - const int i = edge_it->second; - const int j = edge_it->third; - const typename C3t3::Triangulation::Weighted_point& ei = c3t3.triangulation().point(c, i); - const typename C3t3::Triangulation::Weighted_point& ej = c3t3.triangulation().point(c, j); - file << "2 " << cp(ei) << " " << cp(ej) << "\n"; - } -} -template -void dump_c3t3(const C3t3& c3t3, std::string prefix, -#ifdef CGAL_MESH_3_VERBOSE - bool verbose = true) -#else - bool verbose = false) -#endif -{ - if(!prefix.empty()) { - Dump_c3t3 dump; - dump.dump_c3t3(c3t3, prefix, verbose); - } -} - -} // end namespace CGAL - -#include +#include #endif // CGAL_MESH_3_DUMP_C3T3_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Facet_criteria_visitor_with_balls.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Facet_criteria_visitor_with_balls.h index c8718b2a..b9ecd539 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Facet_criteria_visitor_with_balls.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Facet_criteria_visitor_with_balls.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Facet_criteria_visitor_with_balls.h $ -// $Id: Facet_criteria_visitor_with_balls.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Facet_criteria_visitor_with_balls.h $ +// $Id: include/CGAL/Mesh_3/Facet_criteria_visitor_with_balls.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -50,8 +50,8 @@ class Facet_criterion_visitor_with_balls typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; int wp_nb_; double radius_ortho_shpere; @@ -68,13 +68,13 @@ class Facet_criterion_visitor_with_balls , radius_ortho_shpere(0.) , ratio(0.) { - typename Gt::Compare_weighted_squared_radius_3 compare_sq_radius = + typename GT::Compare_weighted_squared_radius_3 compare_sq_radius = tr.geom_traits().compare_weighted_squared_radius_3_object(); - typename Gt::Compute_weight_3 cw = + typename GT::Compute_weight_3 cw = tr.geom_traits().compute_weight_3_object(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); - typename Gt::Squared_radius_orthogonal_sphere sq_radius_ortho_sphere = + typename GT::Squared_radius_orthogonal_sphere sq_radius_ortho_sphere = tr.geom_traits().compute_squared_radius_smallest_orthogonal_sphere_3_object(); Weighted_point wp1 = tr.point(fh.first, (fh.second+1)&3); diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Facet_on_same_surface_criterion.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Facet_on_same_surface_criterion.h index 89404e9e..3a625d97 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Facet_on_same_surface_criterion.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Facet_on_same_surface_criterion.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Facet_on_same_surface_criterion.h $ -// $Id: Facet_on_same_surface_criterion.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Facet_on_same_surface_criterion.h $ +// $Id: include/CGAL/Mesh_3/Facet_on_same_surface_criterion.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Image_plus_weights_to_labeled_function_wrapper.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Image_plus_weights_to_labeled_function_wrapper.h index 69911dcb..9543c0cf 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Image_plus_weights_to_labeled_function_wrapper.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Image_plus_weights_to_labeled_function_wrapper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Image_plus_weights_to_labeled_function_wrapper.h $ -// $Id: Image_plus_weights_to_labeled_function_wrapper.h ac7b637 2021-10-05T10:27:03+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Image_plus_weights_to_labeled_function_wrapper.h $ +// $Id: include/CGAL/Mesh_3/Image_plus_weights_to_labeled_function_wrapper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -107,18 +107,18 @@ class Image_plus_weights_to_labeled_function_wrapper ~Image_plus_weights_to_labeled_function_wrapper() {} /** - * Returns an int corresponding to the label at point \c p + * Returns an int corresponding to the label at point `p`. * @param p the input point - * @return the label at point \c p + * @return the label at point `p` */ template return_type operator()(const Point_3& p) const { return static_cast(transform( r_im_.template labellized_trilinear_interpolation( - CGAL::to_double(p.x()), - CGAL::to_double(p.y()), - CGAL::to_double(p.z()), + CGAL::to_double(p.x() - r_im_.image()->tx), + CGAL::to_double(p.y() - r_im_.image()->ty), + CGAL::to_double(p.z() - r_im_.image()->tz), value_outside, indicator_factory))); } diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h index 95881a2c..5eed5e99 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h $ -// $Id: Image_to_labeled_function_wrapper.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h $ +// $Id: include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -26,7 +26,6 @@ #include #include #include -#include namespace CGAL { @@ -72,9 +71,9 @@ class Image_to_labeled_function_wrapper ~Image_to_labeled_function_wrapper() {} /** - * Returns an int corresponding to the label at point \c p + * Returns an int corresponding to the label at point `p`. * @param p the input point - * @return the label at point \c p + * @return the label at point `p` */ template return_type operator()(const Point_3& p) const diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Implicit_surface_mesher_visitor.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Implicit_surface_mesher_visitor.h index a09ecc96..66e3584b 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Implicit_surface_mesher_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Implicit_surface_mesher_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Implicit_surface_mesher_visitor.h $ -// $Id: Implicit_surface_mesher_visitor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Implicit_surface_mesher_visitor.h $ +// $Id: include/CGAL/Mesh_3/Implicit_surface_mesher_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Is_mesh_domain_field_3.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Is_mesh_domain_field_3.h index b75889a0..405e0970 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Is_mesh_domain_field_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Is_mesh_domain_field_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Is_mesh_domain_field_3.h $ -// $Id: Is_mesh_domain_field_3.h 393ae7d 2021-05-12T15:03:53+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Is_mesh_domain_field_3.h $ +// $Id: include/CGAL/Mesh_3/Is_mesh_domain_field_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Lloyd_move.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Lloyd_move.h index da96e045..de2665c0 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Lloyd_move.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Lloyd_move.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Lloyd_move.h $ -// $Id: Lloyd_move.h 2d73ef3 2020-12-04T17:18:04+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Lloyd_move.h $ +// $Id: include/CGAL/Mesh_3/Lloyd_move.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -44,7 +44,7 @@ template Facet_vector; typedef typename std::vector Cell_vector; - typedef typename Gt::FT FT; - typedef typename Gt::Point_2 Point_2; - typedef typename Gt::Vector_3 Vector_3; - typedef typename Gt::Tetrahedron_3 Tetrahedron_3; - typedef typename Gt::Plane_3 Plane_3; - typedef typename Gt::Aff_transformation_3 Aff_transformation_3; + typedef typename GT::FT FT; + typedef typename GT::Point_2 Point_2; + typedef typename GT::Vector_3 Vector_3; + typedef typename GT::Tetrahedron_3 Tetrahedron_3; + typedef typename GT::Plane_3 Plane_3; + typedef typename GT::Aff_transformation_3 Aff_transformation_3; public: typedef SizingField Sizing_field; /** - * @brief Return the move to apply on \c v according to Lloyd optimization + * @brief Returns the move to apply on `v` according to Lloyd optimization * function. */ Vector_3 operator()(const Vertex_handle& v, @@ -162,7 +162,7 @@ class Lloyd_move /** - * Return the move for the inside vertex \c v. + * Returns the move for the inside vertex `v`. */ Vector_3 lloyd_move_inside_domain(const Vertex_handle& v, const Cell_vector& incident_cells, @@ -210,7 +210,7 @@ class Lloyd_move } /** - * Return the move for the on-boundary vertex \c v. + * Returns the move for the on-boundary vertex `v`. */ Vector_3 lloyd_move_on_boundary(const Vertex_handle& v, const C3T3& c3t3, @@ -254,14 +254,14 @@ class Lloyd_move /** * Returns a vector containing the surface delaunay ball centers of the surface - * facets that are incident to vertex \c v. + * facets that are incident to vertex `v`. */ std::vector extract_lloyd_boundary_points(const Vertex_handle& v, const C3T3& c3t3) const { const Tr& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); Facet_vector incident_facets; incident_facets.reserve(64); @@ -298,7 +298,7 @@ class Lloyd_move } /** - * Return the move from \c v to the centroid of the segment [a,b]. + * Returns the move from `v` to the centroid of the segment `[a,b]`. */ Vector_3 centroid_segment_move(const Vertex_handle& v, const Bare_point& a, @@ -306,8 +306,8 @@ class Lloyd_move const C3T3& c3t3, const Sizing_field& sizing_field) const { - typename Gt::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); - typename Gt::Construct_vector_3 vector = c3t3.triangulation().geom_traits().construct_vector_3_object(); + typename GT::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); + typename GT::Construct_vector_3 vector = c3t3.triangulation().geom_traits().construct_vector_3_object(); const Weighted_point position = c3t3.triangulation().point(v); const Bare_point& p = cp(position); @@ -320,7 +320,7 @@ class Lloyd_move } /** - * Return the move from \c v to the centroid of triangle [a,b,c]. + * Returns the move from `v` to the centroid of triangle `[a,b,c]`. */ Vector_3 centroid_triangle_move(const Vertex_handle& v, const Bare_point& a, @@ -329,8 +329,8 @@ class Lloyd_move const C3T3& c3t3, const Sizing_field& sizing_field) const { - typename Gt::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); - typename Gt::Construct_vector_3 vector = c3t3.triangulation().geom_traits().construct_vector_3_object(); + typename GT::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); + typename GT::Construct_vector_3 vector = c3t3.triangulation().geom_traits().construct_vector_3_object(); const Weighted_point& position = c3t3.triangulation().point(v); const Bare_point& p = cp(position); @@ -397,7 +397,7 @@ class Lloyd_move } /** - * Return the move from \c v to the centroid of polygon[first,last]. + * Returns the move from `v` to the centroid of polygon `[first,last]`. * The polygon has to be convex. */ template @@ -409,10 +409,10 @@ class Lloyd_move { CGAL_precondition(std::distance(first,last) >= 3); - typename Gt::Compute_area_3 area = c3t3.triangulation().geom_traits().compute_area_3_object(); - typename Gt::Construct_centroid_3 centroid = c3t3.triangulation().geom_traits().construct_centroid_3_object(); - typename Gt::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); - typename Gt::Construct_vector_3 vector = c3t3.triangulation().geom_traits().construct_vector_3_object(); + typename GT::Compute_area_3 area = c3t3.triangulation().geom_traits().compute_area_3_object(); + typename GT::Construct_centroid_3 centroid = c3t3.triangulation().geom_traits().construct_centroid_3_object(); + typename GT::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); + typename GT::Construct_vector_3 vector = c3t3.triangulation().geom_traits().construct_vector_3_object(); // Vertex current position const Weighted_point& vertex_weighted_position = c3t3.triangulation().point(v); @@ -460,8 +460,8 @@ class Lloyd_move const Bare_point& reference_point, const C3T3& c3t3) const { - typename Gt::Construct_base_vector_3 base = c3t3.triangulation().geom_traits().construct_base_vector_3_object(); - typename Gt::Construct_orthogonal_vector_3 orthogonal_vector = c3t3.triangulation().geom_traits().construct_orthogonal_vector_3_object(); + typename GT::Construct_base_vector_3 base = c3t3.triangulation().geom_traits().construct_base_vector_3_object(); + typename GT::Construct_orthogonal_vector_3 orthogonal_vector = c3t3.triangulation().geom_traits().construct_orthogonal_vector_3_object(); Vector_3 u = base(plane, 1); u = u / CGAL::sqrt(u*u); @@ -523,8 +523,8 @@ class Lloyd_move } /** - * Turn around the edge \c edge and add the values computed from tets made by - * `v` and the circumcenters of cells incident to \c edge. + * Turns around the edge `edge` and adds the values computed from tets made by + * `v` and the circumcenters of cells incident to `edge`. * * Note that this function abundantly uses dual() calls and using a cell base * which stores the circumcenter thus improves its efficiency. @@ -542,12 +542,12 @@ class Lloyd_move const Tr& tr = c3t3.triangulation(); - typename Gt::Construct_centroid_3 centroid = tr.geom_traits().construct_centroid_3_object(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); - typename Gt::Construct_tetrahedron_3 tetrahedron = tr.geom_traits().construct_tetrahedron_3_object(); - typename Gt::Construct_translated_point_3 translate = tr.geom_traits().construct_translated_point_3_object(); - typename Gt::Construct_vector_3 vector = tr.geom_traits().construct_vector_3_object(); - typename Gt::Compute_volume_3 volume = tr.geom_traits().compute_volume_3_object(); + typename GT::Construct_centroid_3 centroid = tr.geom_traits().construct_centroid_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Construct_tetrahedron_3 tetrahedron = tr.geom_traits().construct_tetrahedron_3_object(); + typename GT::Construct_translated_point_3 translate = tr.geom_traits().construct_translated_point_3_object(); + typename GT::Construct_vector_3 vector = tr.geom_traits().construct_vector_3_object(); + typename GT::Compute_volume_3 volume = tr.geom_traits().compute_volume_3_object(); Cell_circulator current_cell = tr.incident_cells(edge); Cell_circulator done = current_cell; diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h index e057d842..d6f1a910 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h $ -// $Id: Mesh_complex_3_in_triangulation_3_fwd.h c863ee6 2021-05-04T17:28:52+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h $ +// $Id: include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_fwd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_global_optimizer.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_global_optimizer.h index 8052b476..d33c3286 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_global_optimizer.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_global_optimizer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h $ -// $Id: Mesh_global_optimizer.h fc7f672 2022-02-24T15:41:47+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h $ +// $Id: include/CGAL/Mesh_3/Mesh_global_optimizer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -44,8 +44,6 @@ #include #include -#include - #ifdef CGAL_LINKED_WITH_TBB # include # include @@ -68,9 +66,9 @@ template class Mesh_global_optimizer_base { protected: - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Lock_data_structure Lock_data_structure; // The sizing field info is stored inside the move vector because it is computed @@ -127,9 +125,9 @@ class Mesh_global_optimizer_base { protected: - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Lock_data_structure Lock_data_structure; typedef tbb::concurrent_vector > Moves_vector; @@ -240,7 +238,7 @@ class Mesh_global_optimizer using Base::increment_frozen_points; typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; @@ -249,8 +247,8 @@ class Mesh_global_optimizer typedef typename Tr::Edge Edge; typedef typename Tr::Vertex Vertex; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename std::vector Cell_vector; typedef typename std::vector Vertex_vector; @@ -313,19 +311,19 @@ class Mesh_global_optimizer private: /** - * Returns moves for vertices of set \c moving_vertices + * Returns moves for vertices of set `moving_vertices`. */ Moves_vector compute_moves(Moving_vertices_set& moving_vertices); /** - * Returns the move for vertex \c v + * Returns the move for vertex `v`. * \warning This function should be called only on moving vertices * even for frozen vertices, it could return a non-zero vector */ Vector_3 compute_move(const Vertex_handle& v); /** - * Updates mesh using moves of \c moves vector. Updates moving_vertices with + * Updates mesh using moves of `moves` vector. Updates moving_vertices with * the new set of moving vertices after the move. */ void update_mesh(const Moves_vector& moves, @@ -343,17 +341,17 @@ class Mesh_global_optimizer bool check_convergence() const; /** - * Returns the average circumradius length of cells incident to \c v + * Returns the average circumradius length of cells incident to `v`. */ FT average_circumradius_length(const Vertex_handle& v) const; /** - * Returns the minimum cicumradius length of cells incident to \c v + * Returns the minimum cicumradius length of cells incident to `v`. */ FT min_circumradius_sq_length(const Vertex_handle& v, const Cell_vector& incident_cells) const; /** - * Returns the squared circumradius length of cell \c cell + * Returns the squared circumradius length of cell `cell`. */ FT sq_circumradius_length(const Cell_handle& cell, const Vertex_handle& v) const; @@ -380,7 +378,7 @@ class Mesh_global_optimizer Moves_vector_ & m_moves; bool m_do_freeze; Vertex_conc_vector & m_vertices_not_moving_any_more; - const Gt & m_gt; + const GT & m_gt; public: // Constructor @@ -389,7 +387,7 @@ class Mesh_global_optimizer Moves_vector_ &moves, bool do_freeze, Vertex_conc_vector &vertices_not_moving_any_more, - const Gt >) + const GT >) : m_mgo(mgo), m_sizing_field(sizing_field), m_moves(moves), @@ -411,8 +409,8 @@ class Mesh_global_optimizer // operator() void operator()(const Vertex_handle& oldv) const { - typename Gt::Construct_point_3 cp = m_gt.construct_point_3_object(); - typename Gt::Construct_translated_point_3 translate = m_gt.construct_translated_point_3_object(); + typename GT::Construct_point_3 cp = m_gt.construct_point_3_object(); + typename GT::Construct_translated_point_3 translate = m_gt.construct_translated_point_3_object(); Vector_3 move = m_mgo.compute_move(oldv); if ( CGAL::NULL_VECTOR != move ) @@ -451,13 +449,13 @@ class Mesh_global_optimizer class Compute_sizing_field_value { MGO & m_mgo; - const Gt & m_gt; + const GT & m_gt; Local_list_ & m_local_lists; public: // Constructor Compute_sizing_field_value(MGO &mgo, - const Gt >, + const GT >, Local_list_ &local_lists) : m_mgo(mgo), m_gt(gt), @@ -474,7 +472,7 @@ class Mesh_global_optimizer // operator() void operator()(Vertex& v) const { - typename Gt::Construct_point_3 cp = m_gt.construct_point_3_object(); + typename GT::Construct_point_3 cp = m_gt.construct_point_3_object(); Vertex_handle vh = Tr::Triangulation_data_structure::Vertex_range::s_iterator_to(v); @@ -802,7 +800,7 @@ compute_moves(Moving_vertices_set& moving_vertices) #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tbb::concurrent_vector vertices_not_moving_any_more; @@ -827,8 +825,8 @@ compute_moves(Moving_vertices_set& moving_vertices) else #endif // CGAL_LINKED_WITH_TBB { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); // Get move for each moving vertex typename Moving_vertices_set::iterator vit = moving_vertices.begin(); @@ -879,16 +877,16 @@ typename Mesh_global_optimizer::Vector_3 Mesh_global_optimizer:: compute_move(const Vertex_handle& v) { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Compute_squared_length_3 sq_length = tr_.geom_traits().compute_squared_length_3_object(); - typename Gt::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); - typename Gt::Construct_vector_3 vector = tr_.geom_traits().construct_vector_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Compute_squared_length_3 sq_length = tr_.geom_traits().compute_squared_length_3_object(); + typename GT::Construct_translated_point_3 translate = tr_.geom_traits().construct_translated_point_3_object(); + typename GT::Construct_vector_3 vector = tr_.geom_traits().construct_vector_3_object(); Cell_vector incident_cells; incident_cells.reserve(64); #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tr_.incident_cells_threadsafe(v, std::back_inserter(incident_cells)); } @@ -947,7 +945,7 @@ update_mesh(const Moves_vector& moves, #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { // Apply moves in triangulation tbb::parallel_for(tbb::blocked_range(0, moves.size()), @@ -974,7 +972,7 @@ update_mesh(const Moves_vector& moves, { FT size = std::get<2>(*it); -#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE +#ifdef CGAL_MESH_3_OPTIMIZER_VERY_VERBOSE std::cerr << "Moving #" << it - moves.begin() << " addr: " << &*v << " pt: " << tr_.point(v) @@ -1040,7 +1038,7 @@ fill_sizing_field() #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { typedef tbb::enumerable_thread_specific< std::vector< std::pair > > Local_list; @@ -1061,7 +1059,7 @@ fill_sizing_field() else #endif //CGAL_LINKED_WITH_TBB { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); // Fill map with local size for(typename Tr::Finite_vertices_iterator vit = tr_.finite_vertices_begin(); @@ -1111,7 +1109,7 @@ average_circumradius_length(const Vertex_handle& v) const incident_cells.reserve(64); #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { tr_.incident_cells_threadsafe(v, std::back_inserter(incident_cells)); } @@ -1195,8 +1193,8 @@ typename Mesh_global_optimizer::FT Mesh_global_optimizer:: sq_circumradius_length(const Cell_handle& cell, const Vertex_handle& v) const { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Compute_squared_distance_3 sq_distance = tr_.geom_traits().compute_squared_distance_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Compute_squared_distance_3 sq_distance = tr_.geom_traits().compute_squared_distance_3_object(); const Bare_point circumcenter = tr_.dual(cell); const Weighted_point& position = tr_.point(cell, cell->index(v)); diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_sizing_field.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_sizing_field.h index 50022057..e029c65e 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_sizing_field.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_sizing_field.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Mesh_sizing_field.h $ -// $Id: Mesh_sizing_field.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Mesh_sizing_field.h $ +// $Id: include/CGAL/Mesh_3/Mesh_sizing_field.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -88,10 +88,10 @@ class Mesh_sizing_field typename Tr::Concurrency_tag> { // Types - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Gt::FT FT; + typedef typename GT::FT FT; typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Cell_handle Cell_handle; @@ -107,42 +107,42 @@ class Mesh_sizing_field Mesh_sizing_field(Tr& tr); /** - * Fill sizing field, using size associated to point in \c value_map + * Fills sizing field, using size associated to point in `value_map` */ void fill(const std::map& value_map); /** - * Returns size at point \c p. + * Returns size at point `p`. */ FT operator()(const Bare_point& p) const { return this->operator()(p, this->get_last_cell()); } /** - * Returns size at point \c p, using \c v to accelerate \c p location + * Returns size at point `p`, using `v` to accelerate `p` location * in triangulation */ FT operator()(const Bare_point& p, const Vertex_handle& v) const { return this->operator()(p, v->cell()); } /** - * Returns size at point \c p. + * Returns size at point `p`. */ FT operator()(const Bare_point& p, const Cell_handle& c) const; /** - * Returns size at point \c p. Assumes that p is the centroid of c. + * Returns size at point `p`. Assumes that p is the centroid of c. */ FT operator()(const Bare_point& p, const std::pair& c) const; private: /** - * Returns size at point \c p, by interpolation into tetrahedron. + * Returns size at point `p`, by interpolation into tetrahedron. */ FT interpolate_on_cell_vertices(const Bare_point& p, const Cell_handle& cell) const; /** - * Returns size at point \c p, by interpolation into facet (\c cell is assumed + * Returns size at point `p`, by interpolation into facet (`cell` is assumed * to be an infinite cell). */ FT interpolate_on_facet_vertices(const Bare_point& p, @@ -169,7 +169,7 @@ fill(const std::map& value_map) { typedef typename Tr::Finite_vertices_iterator Fvi; - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); for ( Fvi vit = tr_.finite_vertices_begin(); vit != tr_.finite_vertices_end(); ++ vit ) { @@ -196,7 +196,7 @@ typename Mesh_sizing_field::FT Mesh_sizing_field:: operator()(const Bare_point& p, const Cell_handle& c) const { - typename Gt::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); + typename GT::Construct_weighted_point_3 cwp = tr_.geom_traits().construct_weighted_point_3_object(); #ifdef CGAL_MESH_3_SIZING_FIELD_INEXACT_LOCATE //use the inexact locate (much faster than locate) to get a hint @@ -239,8 +239,8 @@ typename Mesh_sizing_field::FT Mesh_sizing_field:: interpolate_on_cell_vertices(const Bare_point& p, const Cell_handle& cell) const { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - typename Gt::Compute_volume_3 volume = tr_.geom_traits().compute_volume_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Compute_volume_3 volume = tr_.geom_traits().compute_volume_3_object(); // Interpolate value using tet vertices values const FT& va = cell->vertex(0)->meshing_info(); @@ -275,9 +275,9 @@ typename Mesh_sizing_field::FT Mesh_sizing_field:: interpolate_on_facet_vertices(const Bare_point& p, const Cell_handle& cell) const { - typename Gt::Compute_area_3 area = tr_.geom_traits().compute_area_3_object(); + typename GT::Compute_area_3 area = tr_.geom_traits().compute_area_3_object(); - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); // Find infinite vertex and put it in k0 int k0 = 0; int k1 = 1; diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_surface_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_surface_cell_base_3.h index 78bef2d3..82b522c1 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_surface_cell_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Mesh_surface_cell_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Mesh_surface_cell_base_3.h $ -// $Id: Mesh_surface_cell_base_3.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Mesh_surface_cell_base_3.h $ +// $Id: include/CGAL/Mesh_3/Mesh_surface_cell_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,13 +18,13 @@ #ifndef CGAL_MESH_3_MESH_SURFACE_CELL_BASE_3_H #define CGAL_MESH_3_MESH_SURFACE_CELL_BASE_3_H -#include +#include #include #include -#include +#include #ifdef CGAL_LINKED_WITH_TBB # include @@ -55,21 +55,21 @@ class Mesh_surface_cell_base_3_base Mesh_surface_cell_base_3_base() : bits_(0) {} - /// Marks \c facet as visited + /// Marks `facet` as visited. void set_facet_visited (const int facet) { CGAL_precondition(facet>=0 && facet <4); bits_ |= (1 << facet); } - /// Marks \c facet as not visited + /// Marks `facet` as not visited. void reset_visited (const int facet) { CGAL_precondition(facet>=0 && facet<4); bits_ &= (15 & ~(1 << facet)); } - /// Returns \c true if \c facet is marked as visited + /// Returns `true` if `facet` is marked as visited. bool is_facet_visited (const int facet) const { CGAL_precondition(facet>=0 && facet<4); @@ -92,7 +92,7 @@ class Mesh_surface_cell_base_3_base bits_ = 0; } - /// Marks \c facet as visited + /// Marks `facet` as visited. void set_facet_visited (const int facet) { CGAL_precondition(facet>=0 && facet<4); @@ -103,7 +103,7 @@ class Mesh_surface_cell_base_3_base } } - /// Marks \c facet as not visited + /// Marks `facet` as not visited. void reset_visited (const int facet) { CGAL_precondition(facet>=0 && facet<4); @@ -114,7 +114,7 @@ class Mesh_surface_cell_base_3_base } } - /// Returns \c true if \c facet is marked as visited + /// Returns `true` if `facet` is marked as visited. bool is_facet_visited (const int facet) const { CGAL_precondition(facet>=0 && facet<4); @@ -187,42 +187,42 @@ class Mesh_surface_cell_base_3 // Default copy constructor and assignment operator are ok - /// Set surface index of \c facet to \c index + /// Sets surface index of `facet` to `index` void set_surface_patch_index(const int facet, const Surface_patch_index& index) { CGAL_precondition(facet>=0 && facet<4); surface_index_table_[facet] = index; } - /// Returns surface index of facet \c facet + /// Returns surface index of facet `facet`. Surface_patch_index surface_patch_index(const int facet) const { CGAL_precondition(facet>=0 && facet<4); return surface_index_table_[facet]; } - /// Sets surface center of \c facet to \c point + /// Sets surface center of `facet` to `point`. void set_facet_surface_center(const int facet, const Point& point) { CGAL_precondition(facet>=0 && facet<4); surface_center_table_[facet] = point; } - /// Returns surface center of \c facet + /// Returns surface center of `facet`. Point get_facet_surface_center(const int facet) const { CGAL_precondition(facet>=0 && facet<4); return surface_center_table_[facet]; } - /// Sets surface center index of \c facet to \c index + /// Sets surface center index of `facet` to `index`. void set_facet_surface_center_index(const int facet, const Index& index) { CGAL_precondition(facet>=0 && facet<4); surface_center_index_table_[facet] = index; } - /// Returns surface center of \c facet + /// Returns surface center of `facet`. Index get_facet_surface_center_index(const int facet) const { CGAL_precondition(facet>=0 && facet<4); @@ -245,7 +245,7 @@ class Mesh_surface_cell_base_3 void set_surface_index(const int facet, const Surface_index& index) { set_surface_patch_index(facet,index); } - /// Returns surface index of facet \c facet + /// Returns surface index of facet `facet`. Surface_index surface_index(const int facet) const { return surface_patch_index(facet); } #endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Mesher_3.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Mesher_3.h index a93d423a..ea0ba676 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Mesher_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Mesher_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h $ -// $Id: Mesher_3.h 932639e 2021-09-30T11:24:21+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h $ +// $Id: include/CGAL/Mesh_3/Mesher_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -36,7 +36,7 @@ #include -#include +#include #include #include @@ -63,7 +63,6 @@ #endif #include -#include #include #include @@ -568,14 +567,14 @@ refine_mesh(std::string dump_after_refine_surface_prefix) std::cerr << "Total refining surface time: " << timer.time() << "s" << std::endl; std::cerr << std::endl; - CGAL_triangulation_postcondition(r_tr.is_valid()); + CGAL_postcondition(r_tr.is_valid()); elapsed_time += timer.time(); timer.stop(); timer.reset(); timer.start(); nbsteps = 0; facets_visitor_.activate(); - dump_c3t3(r_c3t3_, dump_after_refine_surface_prefix); + std::cerr << "Start volume scan..."; CGAL_MESH_3_TASK_BEGIN(scan_cells_task_handle); cells_mesher_.scan_triangulation(); @@ -584,6 +583,7 @@ refine_mesh(std::string dump_after_refine_surface_prefix) std::cerr << "end scan. [Bad tets:" << cells_mesher_.size() << "]"; std::cerr << std::endl << std::endl; elapsed_time += timer.time(); + dump_c3t3(r_c3t3_, dump_after_refine_surface_prefix); timer.stop(); timer.reset(); timer.start(); std::cerr << "Refining...\n"; @@ -613,7 +613,7 @@ refine_mesh(std::string dump_after_refine_surface_prefix) std::cerr << "Total refining time: " << timer.time()+elapsed_time << "s" << std::endl; std::cerr << std::endl; - CGAL_triangulation_postcondition(r_tr.is_valid()); + CGAL_postcondition(r_tr.is_valid()); #endif (void)(forced_stop()); // sets *error_code @@ -652,7 +652,7 @@ initialize() defined(CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE) #ifndef CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE - if(boost::is_convertible::value) + if(std::is_convertible::value) #endif // If that macro is defined, then estimated_bbox must be initialized { Base::set_bbox(r_oracle_.bbox()); @@ -665,7 +665,7 @@ initialize() #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { // we're not multi-thread, yet r_c3t3_.triangulation().set_lock_data_structure(0); @@ -690,7 +690,8 @@ initialize() # ifdef CGAL_CONCURRENT_MESH_3_VERBOSE std::cerr << "Adding points on a far sphere (radius = " << radius <<")..."; # endif - Random_points_on_sphere_3 random_point(radius); + CGAL::Random rnd(0); + Random_points_on_sphere_3 random_point(radius, rnd); const int NUM_PSEUDO_INFINITE_VERTICES = static_cast( float(std::thread::hardware_concurrency()) * Concurrent_mesher_config::get().num_pseudo_infinite_vertices_per_core); @@ -859,7 +860,7 @@ Mesher_3:: status() const { #ifdef CGAL_LINKED_WITH_TBB - if(boost::is_convertible::value) { + if(std::is_convertible::value) { return Mesher_status( # if CGAL_CONCURRENT_COMPACT_CONTAINER_APPROXIMATE_SIZE approximate_number_of_vertices(Concurrency_tag()), diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Mesher_level.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Mesher_level.h index 4aa501dd..5d1c2f8b 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Mesher_level.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Mesher_level.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Mesher_level.h $ -// $Id: Mesher_level.h 5439dbd 2021-08-24T18:04:50+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Mesher_level.h $ +// $Id: include/CGAL/Mesh_3/Mesher_level.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -120,7 +120,7 @@ template < class Element, /**< Type of elements that this level refines. */ class Previous, /* = Null_mesher_level, */ /**< Previous level type, defaults to - \c Null_mesher_level. */ + `Null_mesher_level`. */ class Triangulation_traits /** Traits class that defines types for the triangulation. */ > @@ -175,7 +175,7 @@ class Mesher_level_base return derived().debug_info_element_impl(e); } - /** \name Private member datas */ + /** \name Private member data */ Previous_level& previous_level; /**< The previous level of the refinement process. */ @@ -198,7 +198,7 @@ class Mesher_level_base { } - /** \name FUNCTIONS IMPLEMENTED IN THE CLASS \c Derived */ + /** \name FUNCTIONS IMPLEMENTED IN THE CLASS `Derived` */ /** Access to the triangulation */ Triangulation& triangulation() @@ -248,7 +248,7 @@ class Mesher_level_base return derived().number_of_bad_elements_impl(); } - /** Tells if, as regards the elements of type \c Element, the refinement is + /** Tells if, as regards the elements of type `Element`, the refinement is done. */ bool no_longer_element_to_refine() { @@ -292,13 +292,13 @@ class Mesher_level_base visitor.previous_level()); } - /** Gives the point that should be inserted to refine the element \c e */ + /** Gives the point that should be inserted to refine the element `e` */ Bare_point refinement_point(const Element& e) { return derived().refinement_point_impl(e); } - /** Actions before testing conflicts for point \c p and element \c e */ + /** Actions before testing conflicts for point `p` and element `e` */ template void before_conflicts(const Element& e, const Point& p, Mesh_visitor visitor) @@ -311,7 +311,7 @@ class Mesher_level_base point conflicts with something, and do what is needed. The return type is made of two booleans: - the first one tells if the point can be inserted, - - in case of, the first one is \c false, the second one tells if + - in case of, the first one is `false`, the second one tells if the tested element should be reconsidered latter. */ Mesher_level_conflict_status private_test_point_conflict(const Point& p, @@ -321,8 +321,8 @@ class Mesher_level_base } /** - * Actions before inserting the point \c p in order to refine the - * element \c e. The zone of conflicts is \c zone. + * Actions before inserting the point `p` in order to refine the + * element `e`. The zone of conflicts is `zone`. */ template void before_insertion(Element& e, const Point& p, Zone& zone, @@ -343,7 +343,7 @@ class Mesher_level_base visitor.after_insertion(vh); } - /** Actions after testing conflicts for point \c p and element \c e + /** Actions after testing conflicts for point `p` and element `e` * if no point is inserted. */ template void after_no_insertion(const Element& e, const Point& p, Zone& zone, @@ -361,7 +361,7 @@ class Mesher_level_base */ /** - * Tells it the algorithm is done, regarding elements of type \c Element + * Tells it the algorithm is done, regarding elements of type `Element` * or elements of previous levels. */ bool is_algorithm_done() @@ -383,7 +383,7 @@ class Mesher_level_base /** * This function takes one element from the queue, and try to refine - * it. It returns \c true if one point has been inserted. + * it. It returns `true` if one point has been inserted. * @todo Merge with try_to_refine_element(). */ template @@ -426,7 +426,7 @@ class Mesher_level_base /** \name STEP BY STEP FUNCTIONS */ /** - * Inserts exactly one point, if possible, and returns \c false if no + * Inserts exactly one point, if possible, and returns `false` if no * point has been inserted because the algorithm is done. */ template @@ -457,7 +457,7 @@ template < class Element, /**< Type of elements that this level refines. */ class Previous, /* = Null_mesher_level, */ /**< Previous level type, defaults to - \c Null_mesher_level. */ + `Null_mesher_level`. */ class Triangulation_traits, /** Traits class that defines types for the triangulation. */ typename Concurrency_tag> @@ -519,8 +519,8 @@ class Mesher_level point conflicts with something, and do what is needed. The return type is made of two booleans: - the first one tells if the point can be inserted, - - in case of, the first one is \c false, the second one tells if - the tested element should be reconsidered latter. + - in case of, the first one is `false`, the second one tells if + the tested element should be reconsidered later. This function is called by the superior level, if any. */ Mesher_level_conflict_status @@ -648,7 +648,7 @@ class Mesher_level /** * Applies one step of the algorithm: tries to refine one element of - * previous level or one element of this level. Return \c false iff + * previous level or one element of this level. Return `false` iff * is_algorithm_done()==true . */ template @@ -681,7 +681,7 @@ template < class Element, /**< Type of elements that this level refines. */ class Previous, /* = Null_mesher_level, */ /**< Previous level type, defaults to - \c Null_mesher_level. */ + `Null_mesher_level`. */ class Triangulation_traits> /** Traits class that defines types for the triangulation. */ class Mesher_level @@ -1109,7 +1109,7 @@ class Mesher_level is_algorithm_done()==true . * Note that when parallelism is activated, this is not "one step" * but the full refinement. diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Mesher_level_default_implementations.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Mesher_level_default_implementations.h index cc12a8f6..9ca2de9e 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Mesher_level_default_implementations.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Mesher_level_default_implementations.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Mesher_level_default_implementations.h $ -// $Id: Mesher_level_default_implementations.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Mesher_level_default_implementations.h $ +// $Id: include/CGAL/Mesh_3/Mesher_level_default_implementations.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Null_exuder_visitor.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Null_exuder_visitor.h index 21df6fae..3e902896 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Null_exuder_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Null_exuder_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Null_exuder_visitor.h $ -// $Id: Null_exuder_visitor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Null_exuder_visitor.h $ +// $Id: include/CGAL/Mesh_3/Null_exuder_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Null_global_optimizer_visitor.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Null_global_optimizer_visitor.h index b79ad2c2..17bd3abf 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Null_global_optimizer_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Null_global_optimizer_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Null_global_optimizer_visitor.h $ -// $Id: Null_global_optimizer_visitor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Null_global_optimizer_visitor.h $ +// $Id: include/CGAL/Mesh_3/Null_global_optimizer_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Null_perturber_visitor.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Null_perturber_visitor.h index 20e08c16..edbbc9c3 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Null_perturber_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Null_perturber_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Null_perturber_visitor.h $ -// $Id: Null_perturber_visitor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Null_perturber_visitor.h $ +// $Id: include/CGAL/Mesh_3/Null_perturber_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Null_subdomain_index.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Null_subdomain_index.h new file mode 100644 index 00000000..d1a0d393 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Null_subdomain_index.h @@ -0,0 +1,29 @@ +// Copyright (c) 2015 GeometryFactory +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Null_subdomain_index.h $ +// $Id: include/CGAL/Mesh_3/Null_subdomain_index.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Laurent Rineau + +#ifndef CGAL_MESH_3_NULL_SUBDOMAIN_INDEX +#define CGAL_MESH_3_NULL_SUBDOMAIN_INDEX + +#include + +#ifndef DOXYGEN_RUNNING + +namespace CGAL { + struct Null_subdomain_index { + template + bool operator()(const T& x) const { return 0 == x; } + }; +} + +#endif + +#endif //CGAL_MESH_3_NULL_SUBDOMAIN_INDEX diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Odt_move.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Odt_move.h index d4a03404..1f040359 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Odt_move.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Odt_move.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Odt_move.h $ -// $Id: Odt_move.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Odt_move.h $ +// $Id: include/CGAL/Mesh_3/Odt_move.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -34,7 +34,7 @@ template Facet_vector; typedef typename std::vector Cell_vector; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; public: typedef SizingField Sizing_field; @@ -66,8 +66,8 @@ class Odt_move // Compute move const Tr& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); - typename Gt::Construct_vector_3 vector = tr.geom_traits().construct_vector_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Construct_vector_3 vector = tr.geom_traits().construct_vector_3_object(); Vector_3 move = CGAL::NULL_VECTOR; FT sum_volume(0); @@ -117,8 +117,8 @@ class Odt_move const Tr& tr, const Sizing_field& sizing_field) const { - typename Gt::Construct_centroid_3 centroid = tr.geom_traits().construct_centroid_3_object(); - typename Gt::Compute_volume_3 volume = tr.geom_traits().compute_volume_3_object(); + typename GT::Construct_centroid_3 centroid = tr.geom_traits().construct_centroid_3_object(); + typename GT::Compute_volume_3 volume = tr.geom_traits().compute_volume_3_object(); Bare_point c = centroid(tr.tetrahedron(cell)); FT s = sizing_field(c, std::make_pair(cell, true)); @@ -195,8 +195,8 @@ class Odt_move // const Tr& tr, // const Sizing_field& sizing_field) const // { -// typename Gt::Compute_area_3 area = tr.geom_traits().compute_area_3_object(); -// typename Gt::Construct_centroid_3 centroid = tr.geom_traits().construct_centroid_3_object(); +// typename GT::Compute_area_3 area = tr.geom_traits().compute_area_3_object(); +// typename GT::Construct_centroid_3 centroid = tr.geom_traits().construct_centroid_3_object(); // // Bare_point c = centroid(tr.triangle(facet)); // FT s = sizing_field(c, facet.first->vertex(0)); @@ -211,9 +211,9 @@ class Odt_move // const Tr& tr, // const Sizing_field& sizing_field) const // { -// typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); -// typename Gt::Construct_midpoint_3 midpoint = tr.geom_traits().construct_midpoint_3_object(); -// typename Gt::Compute_squared_distance_3 sq_distance = tr.geom_traits().compute_squared_distance_3_object(); +// typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); +// typename GT::Construct_midpoint_3 midpoint = tr.geom_traits().construct_midpoint_3_object(); +// typename GT::Compute_squared_distance_3 sq_distance = tr.geom_traits().compute_squared_distance_3_object(); // // const Weighted_point& wp1 = tr.point(cell, vertex_index_1); // const Weighted_point& wp2 = tr.point(cell, vertex_index_2); @@ -251,8 +251,8 @@ class Odt_move // // Vector_3 normal_outside(const Facet& f, const C3T3& c3t3) const // { -// typename Gt::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); -// typename Gt::Construct_normal_3 normal = c3t3.triangulation().geom_traits().construct_normal_3_object(); +// typename GT::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); +// typename GT::Construct_normal_3 normal = c3t3.triangulation().geom_traits().construct_normal_3_object(); // // const Cell_handle& cell = f.first; // const int& i = f.second; diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Poisson_refine_cells_3.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Poisson_refine_cells_3.h index 3434b9aa..06d33754 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Poisson_refine_cells_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Poisson_refine_cells_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Poisson_surface_reconstruction_3/include/CGAL/Mesh_3/Poisson_refine_cells_3.h $ -// $Id: Poisson_refine_cells_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Poisson_surface_reconstruction_3/include/CGAL/Mesh_3/Poisson_refine_cells_3.h $ +// $Id: include/CGAL/Mesh_3/Poisson_refine_cells_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -70,7 +70,7 @@ class Poisson_refine_tets_base : : Triangulation_mesher_level_traits_3(t), criteria(crit) {} protected: - /* --- protected datas --- */ + /* --- protected data --- */ // Tr& tr; /**< The triangulation itself. */ Criteria criteria; /**< Meshing criteria for tetrahedra. */ @@ -187,7 +187,7 @@ class Poisson_refine_tets_with_oracle_base : Base(t, crit), surface(s), oracle(o) {} public: - /* \name Overriden functions of this level */ + /* \name Overridden functions of this level */ Zone conflicts_zone_impl(const Point& p, Cell_handle c) const { Zone zone; @@ -256,7 +256,7 @@ class Poisson_refine_tets_with_oracle_base } protected: - /* --- protected datas --- */ + /* --- protected data --- */ Surface& surface; Oracle& oracle; diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Polyline_with_context.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Polyline_with_context.h index b264ccb5..677b3cd4 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Polyline_with_context.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Polyline_with_context.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Polyline_with_context.h $ -// $Id: Polyline_with_context.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Polyline_with_context.h $ +// $Id: include/CGAL/Mesh_3/Polyline_with_context.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Profile_counter.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Profile_counter.h index b4b532b8..60c691cc 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Profile_counter.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Profile_counter.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Profile_counter.h $ -// $Id: Profile_counter.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Profile_counter.h $ +// $Id: include/CGAL/Mesh_3/Profile_counter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion, Laurent Rineau diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Profiling_tools.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Profiling_tools.h index 77985a63..32786b42 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Profiling_tools.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Profiling_tools.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Profiling_tools.h $ -// $Id: Profiling_tools.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Profiling_tools.h $ +// $Id: include/CGAL/Mesh_3/Profiling_tools.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Protect_edges_sizing_field.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Protect_edges_sizing_field.h index c20eb4e1..12e564b6 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Protect_edges_sizing_field.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Protect_edges_sizing_field.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h $ -// $Id: Protect_edges_sizing_field.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h $ +// $Id: include/CGAL/Mesh_3/Protect_edges_sizing_field.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -28,11 +28,11 @@ #include #include -#include +#include #ifdef CGAL_MESH_3_DUMP_FEATURES_PROTECTION_ITERATIONS # include #endif -#include +#include #include #include #include @@ -53,7 +53,7 @@ #ifndef CGAL_NO_ASSERTIONS # include // for float_prior #endif -#include +#include #include #include #include @@ -108,7 +108,7 @@ void debug_dump_c3t3(const std::string filename, const C3t3& c3t3) template class Protect_edges_sizing_field - : public CGAL::Mesh_3::internal::Debug_messages_tools + : public CGAL::SMDS_3::internal::Debug_messages_tools { typedef Protect_edges_sizing_field Self; @@ -118,8 +118,8 @@ class Protect_edges_sizing_field typedef typename Tr::Weighted_point Weighted_point; typedef typename Weighted_point::Weight Weight; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename C3T3::Cell_handle Cell_handle; typedef typename C3T3::Vertex_handle Vertex_handle; @@ -139,8 +139,8 @@ class Protect_edges_sizing_field Protect_edges_sizing_field(C3T3& c3t3, const MeshDomain& domain, SizingFunction size=SizingFunction(), - const FT minimal_size = FT(), - std::size_t maximal_number_of_vertices = 0, + const FT minimal_size = FT(-1), + const std::size_t maximal_number_of_vertices = 0, Mesh_error_code* error_code = 0 #ifndef CGAL_NO_ATOMIC , std::atomic* stop_ptr = 0 @@ -196,8 +196,8 @@ class Protect_edges_sizing_field Vertex_handle get_vertex_corner_from_point(const Bare_point& p, const Index& p_index) const; - /// Insert point(p,w) into the triangulation and set its dimension to \c dim - /// and its index to \c index. + /// Inserts `point(p,w)` into the triangulation and set its dimension to `dim` + /// and its index to `index`. /// The handle of the newly created vertex is returned. Vertex_handle insert_point(const Bare_point& p, const Weight& w, @@ -206,8 +206,8 @@ class Protect_edges_sizing_field const bool special_ball = false); /** - * Insert point(p,w) into the triangulation and set its dimension to \c dim and - * its index to \c index. + * Inserts `point(p,w)` into the triangulation and set its dimension to `dim` and + * its index to `index`. * The handle of the newly created vertex is returned. * * This function also ensures that `point(p,w)` will not be inside a @@ -223,12 +223,12 @@ class Protect_edges_sizing_field const Index& index, ErasedVeOutIt out); - /// Insert balls between the points identified by the handles \c vp and \c vq - /// on the curve identified by \c curve_index. + /// Inserts balls between the points identified by the handles `vp` and `vq` + /// on the curve identified by `curve_index`. /// - /// \param orientation Orientation of the curve segment between \c vp and - /// \c vq, given the orientation of the curve of index - /// \c curve_index + /// \param orientation Orientation of the curve segment between `vp` and + /// `vq`, given the orientation of the curve of index + /// `curve_index` template ErasedVeOutIt insert_balls(const Vertex_handle& vp, const Vertex_handle& vq, @@ -251,25 +251,25 @@ class Protect_edges_sizing_field const Curve_index& curve_index, ErasedVeOutIt out); - /// Return `true` if the balls of \c va and \c vb intersect, and (va,vb) is not + /// Returns `true` if the balls of `va` and `vb` intersect, and `(va,vb)` is not /// an edge of the complex. bool non_adjacent_but_intersect(const Vertex_handle& va, const Vertex_handle& vb) const; - /// Return `true` if the balls of \c va and \c vb intersect. + /// Returns `true` if the balls of `va` and `vb` intersect. bool do_balls_intersect(const Vertex_handle& va, const Vertex_handle& vb) const; - /// Change the size of the ball of the vertex \c v. + /// Changes the size of the ball of the vertex `v`. Vertex_handle change_ball_size(const Vertex_handle& v, const FT squared_size, const bool special_ball = false); - /// Return `true` if balls of v1 and v2 intersect "enough". - /// \param orientation Orientation of the curve segment between \c v1 and - /// \c v2, given the orientation of the curve of index - /// \c curve_index + /// Returns `true` if balls of v1 and v2 intersect "enough". + /// \param orientation Orientation of the curve segment between `v1` and + /// `v2`, given the orientation of the curve of index + /// `curve_index` /// \pre `c3t3.curve_index(v1, v2) == curve_index` bool is_sampling_dense_enough(const Vertex_handle& v1, const Vertex_handle& v2, @@ -280,17 +280,17 @@ class Protect_edges_sizing_field /// of those vertices is ok. If not, fix it. void check_and_repopulate_edges(); - /// Check if the vertex \c v is well sampled, and if its not the case, fix it. - /// Fill `out` with deleted vertices during this process. The value type of `out` + /// Checks if the vertex `v` is well sampled, and if its not the case, fix it. + /// Fills `out` with deleted vertices during this process. The value type of `out` /// is `Vertex_handle`. template ErasedVeOutIt check_and_fix_vertex_along_edge(const Vertex_handle& v, ErasedVeOutIt out); - /// Given two vertices \c start and \c next inserted on the curve with - /// index \c curve_index, return `CGAL::POSITIVE` if the curve arc from - /// \c start to \c next is oriented in the same orientation as the curve - /// segment with index \c curve_index, or `CGAL::NEGATIVE` otherwise. + /// Given two vertices `start` and `next` inserted on the curve with + /// index `curve_index`, returns `CGAL::POSITIVE` if the curve arc from + /// `start` to `next` is oriented in the same orientation as the curve + /// segment with index `curve_index`, or `CGAL::NEGATIVE` otherwise. /// /// \pre `c3t3.curve_index(v1, v2) == curve_index` CGAL::Orientation @@ -298,13 +298,13 @@ class Protect_edges_sizing_field const Vertex_handle& next, Curve_index curve_index) const; - /// Walk along the edge from \c start, following the direction \c start to - /// \c next, and fills \c out with the vertices which do not fulfill + /// Walks along the edge from `start`, following the direction `start` to + /// `next`, and fills `out` with the vertices which do not fulfill /// the sampling conditions. /// - /// \param orientation Orientation of the curve segment between \c v1 and - /// \c v2, given the orientation of the curve of index - /// \c curve_index + /// \param orientation Orientation of the curve segment between `v1` and + /// `v2`, given the orientation of the curve of index + /// `curve_index` /// /// \pre `c3t3.curve_index(v1, v2) == curve_index` template @@ -315,8 +315,8 @@ class Protect_edges_sizing_field const CGAL::Orientation orientation, ErasedVeOutIt out) const; - /// Return the next vertex along edge, i.e the vertex after \c start, following - /// the direction from \c previous to \c start. + /// Returns the next vertex along edge, i.e the vertex after `start`, following + /// the direction from `previous` to `start`. /// \pre (previous,start) is in c3t3 /// \pre `c3t3.curve_index(start, previous) == curve_index` Vertex_handle @@ -324,13 +324,13 @@ class Protect_edges_sizing_field const Vertex_handle& previous, const Curve_index& curve_index) const; - /// Replace the vertices between ]begin,last[ with new vertices, along the curve - /// identified by \c curve_index. + /// Replaces the vertices within `]begin,last[` with new vertices, along the curve + /// identified by `curve_index`. /// The value type of `InputIterator` is `Vertex_handle`. /// - /// \param orientation Orientation of the curve segment between \c begin and - /// \c last, given the orientation of the curve of index - /// \c curve_index + /// \param orientation Orientation of the curve segment between `begin` and + /// `last`, given the orientation of the curve of index + /// `curve_index` /// template ErasedVeOutIt repopulate(InputIterator begin, @@ -346,33 +346,33 @@ class Protect_edges_sizing_field const CGAL::Orientation orientation, ErasedVeOutIt out); - /// Check if the size of \c v2 is compatible (i.e. greater) with the linear - /// interpolation of the sizes of \c v1 and \c v3. + /// Checks if the size of `v2` is compatible (i.e. greater) with the linear + /// interpolation of the sizes of `v1` and `v3`. bool is_sizing_field_correct(const Vertex_handle& v1, const Vertex_handle& v2, const Vertex_handle& v3, const Curve_index& index, const CGAL::Orientation orientation) const; - /// Repopulate all incident curves around the corner \c v. - /// \pre \c v is a corner of c3t3 + /// Repopulates all incident curves around the corner `v`. + /// \pre `v` is a corner of c3t3 template ErasedVeOutIt repopulate_edges_around_corner(const Vertex_handle& v, ErasedVeOutIt out); - /// Return `true` if the edge with index \c curve_index is already treated. + /// Returns `true` if the edge with index `curve_index` is already treated. bool is_treated(const Curve_index& curve_index) const { return ( treated_edges_.find(curve_index) != treated_edges_.end() ); } - /// Set the edge with index \c curve_index as treated. + /// Sets the edge with index `curve_index` as treated. void set_treated(const Curve_index& curve_index) { treated_edges_.insert(curve_index); } - /// Compute the Euclidean distance between the bare points of \c va and \c vb. + /// Computes the Euclidean distance between the bare points of `va` and `vb`. FT compute_distance(const Vertex_handle& va, const Vertex_handle& vb) const { typename C3T3::Triangulation::Geom_traits::Construct_point_3 cp = @@ -384,17 +384,17 @@ class Protect_edges_sizing_field return compute_distance(cp(wpa), cp(wpb)); } - /// Compute the Euclidean distance between the bare points \c and \c q. + /// Computes the Euclidean distance between the bare points `p` and `q`. FT compute_distance(const Bare_point& p, const Bare_point& q) const { return CGAL::sqrt(c3t3_.triangulation().geom_traits(). compute_squared_distance_3_object()(p,q)); } - /// Return the radius of the ball of vertex \c v. + /// Returns the radius of the ball of vertex `v`. FT get_radius(const Vertex_handle& v) const { - typename Gt::Compute_weight_3 cw = + typename GT::Compute_weight_3 cw = c3t3_.triangulation().geom_traits().compute_weight_3_object(); const Weighted_point& v_wp = c3t3_.triangulation().point(v); @@ -455,17 +455,29 @@ class Protect_edges_sizing_field return s; } + bool use_minimal_size() const + { + return minimal_size_ != FT(-1); + } + Weight minimal_weight() const + { + if (use_minimal_size()) + return minimal_weight_; + else + return Weight(0); + } + private: C3T3& c3t3_; const MeshDomain& domain_; SizingFunction size_; - FT minimal_size_; - Weight minimal_weight_; + const FT minimal_size_; + const Weight minimal_weight_; std::set treated_edges_; Vertex_set unchecked_vertices_; int refine_balls_iteration_nb; bool nonlinear_growth_of_balls; - std::size_t maximal_number_of_vertices_; + const std::size_t maximal_number_of_vertices_; Mesh_error_code* const error_code_; #ifndef CGAL_NO_ATOMIC /// Pointer to the atomic Boolean that can stop the process @@ -478,7 +490,7 @@ template Protect_edges_sizing_field:: Protect_edges_sizing_field(C3T3& c3t3, const MD& domain, Sf size, const FT minimal_size, - std::size_t maximal_number_of_vertices, + const std::size_t maximal_number_of_vertices, Mesh_error_code* error_code #ifndef CGAL_NO_ATOMIC , std::atomic* stop_ptr @@ -509,7 +521,7 @@ Protect_edges_sizing_field:: operator()(const bool refine) { // This class is only meant to be used with non-periodic triangulations - CGAL_assertion(!(boost::is_same::value)); + CGAL_assertion(!(std::is_same::value)); #ifdef CGAL_MESH_3_VERBOSE std::cerr << "Inserting protection balls..." << std::endl @@ -540,7 +552,7 @@ operator()(const bool refine) std::cerr << "refine_balls() done. Nb of points in triangulation: " << c3t3_.triangulation().number_of_vertices() << std::endl; #endif - CGAL_assertion(minimal_size_ > 0 || c3t3_.is_valid()); + CGAL_assertion(use_minimal_size() || c3t3_.is_valid()); } // debug_dump_c3t3("dump-mesh-after-protect_edges.binary.cgal", c3t3_); @@ -561,6 +573,12 @@ insert_corners() Initial_corners corners; domain_.get_corners(std::back_inserter(corners)); +#if CGAL_MESH_3_PROTECTION_DEBUG & 1 + std::cout << corners.size() << " corners to treat" << std::endl; + for(const auto& e : corners) + std::cout << "Corner #" << CGAL::IO::oformat(e.first) << ", " << e.second << std::endl; +#endif + Dt dt; for ( typename Initial_corners::iterator it = corners.begin(), end = corners.end() ; it != end ; ++it ) @@ -578,7 +596,7 @@ insert_corners() Index p_index = domain_.index_from_corner_index(cit->first); #if CGAL_MESH_3_PROTECTION_DEBUG & 1 - std::cerr << "** treat corner #" << CGAL::IO::oformat(p_index) << std::endl; + std::cerr << "\n** treat corner #" << CGAL::IO::oformat(p_index) << std::endl; #endif // Get weight (the ball radius is given by the 'query_size' function) @@ -633,6 +651,13 @@ insert_point(const Bare_point& p, const Weight& w, int dim, const Index& index, { using CGAL::Mesh_3::internal::weight_modifier; +#if CGAL_MESH_3_PROTECTION_DEBUG & 1 + std::cerr << "insert_point( (" << p + << "), w=" << w + << ", dim=" << dim + << ", index=" << CGAL::IO::oformat(index) << ")\n"; +#endif + // Convert the dimension if it was set to a negative value (marker for special balls). if(dim < 0) dim = -1 - dim; @@ -643,7 +668,7 @@ insert_point(const Bare_point& p, const Weight& w, int dim, const Index& index, // Insert point CGAL_assertion_code(size_type nb_vertices_before = c3t3_.triangulation().number_of_vertices()); - typename Gt::Construct_weighted_point_3 cwp = + typename GT::Construct_weighted_point_3 cwp = c3t3_.triangulation().geom_traits().construct_weighted_point_3_object(); const Weighted_point wp = cwp(p,w*weight_modifier); @@ -709,16 +734,17 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, << "), w=" << w << ", dim=" << dim << ", index=" << CGAL::IO::oformat(index) << ")\n"; + std::cerr << "triangulation dimension is " << c3t3_.triangulation().dimension() << std::endl; #endif const Tr& tr = c3t3_.triangulation(); - typename Gt::Compute_squared_distance_3 sq_distance = + typename GT::Compute_squared_distance_3 sq_distance = tr.geom_traits().compute_squared_distance_3_object(); - typename Gt::Compare_weighted_squared_radius_3 cwsr = + typename GT::Compare_weighted_squared_radius_3 cwsr = tr.geom_traits().compare_weighted_squared_radius_3_object(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); - typename Gt::Construct_weighted_point_3 cwp = + typename GT::Construct_weighted_point_3 cwp = tr.geom_traits().construct_weighted_point_3_object(); bool add_handle_to_unchecked = false; // add or not the new vertex to the set 'unchecked_vertices' @@ -743,13 +769,13 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, #endif // if sq_d < nearest_vh's weight - while ( cwsr(c3t3_.triangulation().point(nearest_vh), - sq_d) == CGAL::SMALLER && - ! is_special(nearest_vh) ) + while ( ! is_special(nearest_vh) && + cwsr(c3t3_.triangulation().point(nearest_vh), - sq_d) == CGAL::SMALLER ) { - CGAL_assertion( minimal_size_ > 0 || sq_d > 0 ); + CGAL_assertion( use_minimal_size() || sq_d > 0); bool special_ball = false; - if(minimal_weight_ != Weight() && sq_d < minimal_weight_) + if(use_minimal_size() && sq_d < minimal_weight_) { sq_d = minimal_weight_; w = minimal_weight_; @@ -803,16 +829,16 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, const FT sq_d = tr.min_squared_distance(p, cp(c3t3_.triangulation().point(v))); - if(minimal_weight_ != Weight() && sq_d < minimal_weight_) { + if(use_minimal_size() && sq_d < minimal_weight()) { insert_a_special_ball = true; #if CGAL_MESH_3_PROTECTION_DEBUG & 1 nearest_point = c3t3_.triangulation().point(v); #endif - min_sq_d = minimal_weight_; + min_sq_d = minimal_weight(); if(! is_special(v)) { *out++ = v; - ch = change_ball_size(v, minimal_weight_, true)->cell(); // special ball + ch = change_ball_size(v, minimal_weight(), true)->cell(); // special ball } } else @@ -833,7 +859,7 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, #if CGAL_MESH_3_PROTECTION_DEBUG & 1 std::cerr << "smart_insert_point: weight " << w << " reduced to " << min_sq_d - << "\n (near existing point: " << nearest_point << " )\n"; + << " (near existing point: " << nearest_point << " )\n"; #endif w = min_sq_d; add_handle_to_unchecked = true; @@ -854,38 +880,35 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, else // tr.dimension() <= 2 { // change size of existing balls which include p - bool restart = true; - while ( restart ) + for ( typename Tr::Finite_vertices_iterator it = tr.finite_vertices_begin(), + end = tr.finite_vertices_end() ; it != end ; ++it ) { - restart = false; - for ( typename Tr::Finite_vertices_iterator it = tr.finite_vertices_begin(), - end = tr.finite_vertices_end() ; it != end ; ++it ) + const Weighted_point& it_wp = tr.point(it); + FT sq_d = tr.min_squared_distance(p, cp(it_wp)); + if ( cwsr(it_wp, - sq_d) == CGAL::SMALLER ) { - const Weighted_point& it_wp = tr.point(it); - FT sq_d = tr.min_squared_distance(p, cp(it_wp)); - if ( cwsr(it_wp, - sq_d) == CGAL::SMALLER ) + bool special_ball = false; + if(use_minimal_size() && sq_d < minimal_weight()) { - bool special_ball = false; - if(minimal_weight_ != Weight() && sq_d > minimal_weight_) { - sq_d = minimal_weight_; - w = minimal_weight_; - special_ball = true; - insert_a_special_ball = true; - } - if( ! is_special(it) ) { - *out++ = it; - change_ball_size(it, sq_d, special_ball); - restart = true; - } - break; + sq_d = minimal_weight(); + w = minimal_weight(); + special_ball = true; + insert_a_special_ball = true; + } + + if( ! is_special(it) ) { + *out++ = it; + change_ball_size(it, sq_d, special_ball); } } } + // Change w in order to be sure that no existing point will be included in (p,w) FT min_sq_d = w; +#if CGAL_MESH_3_PROTECTION_DEBUG & 1 typename Tr::Point nearest_point; - // Change w in order to be sure that no existing point will be included - // in (p,w) +#endif + for ( typename Tr::Finite_vertices_iterator it = tr.finite_vertices_begin(), end = tr.finite_vertices_end() ; it != end ; ++it ) { @@ -893,7 +916,9 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, FT sq_d = tr.min_squared_distance(p, cp(it_wp)); if(sq_d < min_sq_d) { min_sq_d = sq_d; +#if CGAL_MESH_3_PROTECTION_DEBUG & 1 nearest_point = c3t3_.triangulation().point(it); +#endif } } @@ -902,7 +927,7 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, #if CGAL_MESH_3_PROTECTION_DEBUG & 1 std::cerr << "smart_insert_point: weight " << w << " reduced to " << min_sq_d - << "\n (near existing point: " << nearest_point << " )\n"; + << " (near existing point: " << nearest_point << " )\n"; #endif w = min_sq_d; add_handle_to_unchecked = true; @@ -920,8 +945,13 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, add_handle_to_unchecked = true; } - if( w < minimal_weight_) { - w = minimal_weight_; + if( w < minimal_weight()) { +#if CGAL_MESH_3_PROTECTION_DEBUG & 1 + std::cerr << "smart_insert_point: weight " << w + << " was smaller than minimal weight (" << minimal_weight() << ")\n"; +#endif + + w = minimal_weight(); insert_a_special_ball = true; } Vertex_handle v = insert_point(p,w,dim,index, insert_a_special_ball); @@ -947,7 +977,7 @@ insert_balls_on_edges() Input_features input_features; domain_.get_curves(std::back_inserter(input_features)); - // Interate on edges + // Iterate on edges for ( typename Input_features::iterator fit = input_features.begin(), end = input_features.end() ; fit != end ; ++fit ) { @@ -956,7 +986,7 @@ insert_balls_on_edges() if ( ! is_treated(curve_index) ) { #if CGAL_MESH_3_PROTECTION_DEBUG & 1 - std::cerr << "** treat curve #" << curve_index << std::endl; + std::cerr << "\n** treat curve #" << curve_index << std::endl; #endif const Bare_point& p = std::get<1>(*fit).first; const Bare_point& q = std::get<2>(*fit).first; @@ -972,7 +1002,7 @@ insert_balls_on_edges() } else { - typename Gt::Construct_weighted_point_3 cwp = + typename GT::Construct_weighted_point_3 cwp = c3t3_.triangulation().geom_traits().construct_weighted_point_3_object(); // Even if the curve is a cycle, it can intersect other curves at @@ -1026,7 +1056,7 @@ typename Protect_edges_sizing_field::Vertex_handle Protect_edges_sizing_field:: get_vertex_corner_from_point(const Bare_point& p, const Index&) const { - typename Gt::Construct_weighted_point_3 cwp = + typename GT::Construct_weighted_point_3 cwp = c3t3_.triangulation().geom_traits().construct_weighted_point_3_object(); // Get vertex_handle associated to corner (dim=0) point @@ -1156,7 +1186,7 @@ insert_balls(const Vertex_handle& vp, const FT d_signF = static_cast(d_sign); int n = static_cast(std::floor(FT(2)*(d-sq) / (sp+sq))+.5); - // if( minimal_weight_ != 0 && n == 0 ) return; + // if( minimal_weight() != 0 && n == 0 ) return; if(nonlinear_growth_of_balls && refine_balls_iteration_nb < 3) { @@ -1165,7 +1195,7 @@ insert_balls(const Vertex_handle& vp, // balls at corner. When the curve segment is long enough, pick a point // at the middle and choose a new size. if(n >= internal::max_nb_vertices_to_reevaluate_size && - d >= (internal::max_nb_vertices_to_reevaluate_size * minimal_weight_)) { + d >= (internal::max_nb_vertices_to_reevaluate_size * minimal_weight())) { #if CGAL_MESH_3_PROTECTION_DEBUG & 1 const Weighted_point& vq_wp = c3t3_.triangulation().point(vq); std::cerr << "Number of to-be-inserted balls is: " @@ -1366,8 +1396,8 @@ refine_balls() FT ra = get_radius(va); FT rb = get_radius(vb); - FT sa_new = (std::min)(ab/distance_divisor, ra); - FT sb_new = (std::min)(ab/distance_divisor, rb); + FT sa_new = (std::min)(FT(ab/distance_divisor), ra); + FT sb_new = (std::min)(FT(ab/distance_divisor), rb); // In case of va or vb have already been in conflict, keep minimal size if ( new_sizes.find(va) != new_sizes.end() ) @@ -1418,9 +1448,9 @@ refine_balls() const Vertex_handle v = it->first; const FT new_size = it->second; // Set size of the ball to new value - if(minimal_size_ != FT() && new_size < minimal_size_) { + if(use_minimal_size() && new_size < minimal_size_) { if(!is_special(v)) { - change_ball_size(v, minimal_weight_, true); // special ball + change_ball_size(v, minimal_weight(), true); // special ball // Loop will have to be run again restart = true; @@ -1470,13 +1500,13 @@ bool Protect_edges_sizing_field:: do_balls_intersect(const Vertex_handle& va, const Vertex_handle& vb) const { - typename Gt::Construct_sphere_3 sphere = + typename GT::Construct_sphere_3 sphere = c3t3_.triangulation().geom_traits().construct_sphere_3_object(); - typename Gt::Do_intersect_3 do_intersect = + typename GT::Do_intersect_3 do_intersect = c3t3_.triangulation().geom_traits().do_intersect_3_object(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = c3t3_.triangulation().geom_traits().construct_point_3_object(); - typename Gt::Compute_weight_3 cw = + typename GT::Compute_weight_3 cw = c3t3_.triangulation().geom_traits().compute_weight_3_object(); const Weighted_point& wa = c3t3_.triangulation().point(va); @@ -1516,7 +1546,7 @@ change_ball_size(const Vertex_handle& v, const FT squared_size, const bool speci } // Store point data - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = c3t3_.triangulation().geom_traits().construct_point_3_object(); Index index = c3t3_.index(v); @@ -1524,7 +1554,7 @@ change_ball_size(const Vertex_handle& v, const FT squared_size, const bool speci Bare_point p = cp(c3t3_.triangulation().point(v)); // intentional copy // Remove v from the set of corners - boost::optional corner_index = boost::make_optional(false, Corner_index()); + std::optional corner_index; if ( c3t3_.is_in_complex(v) ) { corner_index = c3t3_.corner_index(v); @@ -1535,7 +1565,7 @@ change_ball_size(const Vertex_handle& v, const FT squared_size, const bool speci // Change v size c3t3_.triangulation().remove(v); - CGAL_assertion_code(typename Gt::Construct_weighted_point_3 cwp = + CGAL_assertion_code(typename GT::Construct_weighted_point_3 cwp = c3t3_.triangulation().geom_traits().construct_weighted_point_3_object();) CGAL_assertion_code(const Weighted_point wp = cwp(p,w);) CGAL_assertion_code(Tr& tr = c3t3_.triangulation()); @@ -1724,27 +1754,42 @@ is_sampling_dense_enough(const Vertex_handle& v1, const Vertex_handle& v2, using CGAL::Mesh_3::internal::min_intersection_factor; CGAL_precondition(c3t3_.curve_index(v1,v2) == curve_index); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = c3t3_.triangulation().geom_traits().construct_point_3_object(); - typename Gt::Compute_weight_3 cw = + typename GT::Compute_weight_3 cw = c3t3_.triangulation().geom_traits().compute_weight_3_object(); // Get sizes FT size_v1 = get_radius(v1); FT size_v2 = get_radius(v2); - CGAL_assertion(get_dimension(v1) != 1 || - curve_index == domain_.curve_index(v1->index())); - CGAL_assertion(get_dimension(v2) != 1 || - curve_index == domain_.curve_index(v2->index())); + bool v1_valid_curve_index = true; + bool v2_valid_curve_index = true; + + if(use_minimal_size()) + { + v1_valid_curve_index = (get_dimension(v1) != 1 + || curve_index == domain_.curve_index(v1->index())); + v2_valid_curve_index = (get_dimension(v2) != 1 + || curve_index == domain_.curve_index(v2->index())); + } + else + { + CGAL_assertion(get_dimension(v1) != 1 || + curve_index == domain_.curve_index(v1->index())); + CGAL_assertion(get_dimension(v2) != 1 || + curve_index == domain_.curve_index(v2->index())); + } const Weighted_point& v1_wp = c3t3_.triangulation().point(v1); const Weighted_point& v2_wp = c3t3_.triangulation().point(v2); - FT arc_length = domain_.curve_segment_length(cp(v1_wp), + FT arc_length = (v1_valid_curve_index && v2_valid_curve_index) + ? domain_.curve_segment_length(cp(v1_wp), cp(v2_wp), curve_index, - orientation); + orientation) + : compute_distance(v1, v2); //curve polyline may not be consistent // Sufficient condition so that the curve portion between v1 and v2 is // inside the union of the two balls. @@ -2098,7 +2143,7 @@ repopulate_edges_around_corner(const Vertex_handle& v, ErasedVeOutIt out) // `check_and_repopulate_edges()::vertices` before it is passed itself // to `repopulate_edges_around_corner()`. if(c3t3_.is_in_complex(to_repopulate.back())) - std::copy(to_repopulate.begin(), boost::prior(to_repopulate.end()), out); + std::copy(to_repopulate.begin(), std::prev(to_repopulate.end()), out); else std::copy(to_repopulate.begin(), to_repopulate.end(), out); diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_cells_3.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_cells_3.h index 15d4bc71..86cd7696 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_cells_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_cells_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h $ -// $Id: Refine_cells_3.h 59a0da4 2021-05-19T17:23:53+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Refine_cells_3.h $ +// $Id: include/CGAL/Mesh_3/Refine_cells_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau, Stéphane Tayeb @@ -37,8 +37,6 @@ #include #include -#include -#include #include #include @@ -173,9 +171,9 @@ template::value, + std::is_convertible_v, // Parallel # ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE @@ -210,7 +208,7 @@ template # endif - >::type // boost::if (parallel/sequential) + > // std::conditional (parallel/sequential) #else // !CGAL_LINKED_WITH_TBB @@ -438,7 +436,7 @@ class Refine_cells_3 // Parallel: it's always lazy, so do nothing void remove_element_from_refinement_queue(Cell_handle, Parallel_tag) {} - /// Handle cells contained in \c zone (before their destruction by insertion) + /// Handles cells contained in `zone` (before their destruction by insertion) void before_insertion_handle_cells_in_conflict_zone(Zone& zone); bool try_lock_element(const Cell_handle &ch, int lock_radius = 0) const @@ -469,6 +467,7 @@ class Refine_cells_3 std::string debug_info_element_impl(const Cell_handle &ch) const { std::stringstream sstr; + sstr.precision(17); sstr << "Cell " << (void*)(ch.operator->()) << " { " << std::endl << " " << *ch->vertex(0) << std::endl << " " << *ch->vertex(1) << std::endl @@ -479,7 +478,7 @@ class Refine_cells_3 return sstr.str(); } - /// Adds \c cell to the refinement queue if needed + /// Adds `cell` to the refinement queue if needed. void treat_new_cell(const Cell_handle& cell); #ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED @@ -531,20 +530,20 @@ class Refine_cells_3 // Updates cells incident to vertex, and add them to queue if needed void update_star_self(const Vertex_handle& vertex); - /// Set \c cell to domain, with subdomain index \c index + /// Sets `cell` to domain, with subdomain index `index`. void set_cell_in_domain(const Cell_handle& cell, const Subdomain_index& index) { r_c3t3_.add_to_complex(cell, index); } - /// Removes \c cell from domain + /// Removes `cell` from domain. void remove_cell_from_domain(const Cell_handle& cell) { r_c3t3_.remove_from_complex(cell); } - /// Sets index and dimension of vertex \c v + /// Sets index and dimension of vertex `v`. void set_vertex_properties(Vertex_handle& v, const Index& index) { r_c3t3_.set_index(v, index); @@ -662,7 +661,7 @@ scan_triangulation_impl() #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { # if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING) std::cerr << "Scanning triangulation for bad cells (in parallel)"; @@ -672,7 +671,7 @@ scan_triangulation_impl() typedef typename Tr::All_cells_iterator All_cells_iterator; // WITH PARALLEL_FOR - // Copy cells into an std::vector to allow the use of tbb::parallel_for + // Copy cells into an std::vector to enable the use of tbb::parallel_for // which requires random-access. // Note that we're using all_cells_begin() instead of finite_cells_begin() // because it's faster to do the is_infinite() test in parallel. @@ -702,15 +701,18 @@ scan_triangulation_impl() { #if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING) std::cerr << "Scanning triangulation for bad cells (sequential)... "; + int count = 0; #endif - int count = 0; + for(Finite_cell_iterator cell_it = r_tr_.finite_cells_begin(); cell_it != r_tr_.finite_cells_end(); ++cell_it) { treat_new_cell(cell_it); +#if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING) ++count; +#endif } #if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING) std::cerr << count << " cells scanned, "; @@ -746,8 +748,9 @@ int Refine_cells_3:: number_of_bad_elements_impl() { - typedef typename MD::Subdomain Subdomain; - typedef typename Tr::Finite_cells_iterator Finite_cell_iterator; + typedef typename MD::Subdomain_index Subdomain_index; + typedef std::optional Subdomain; + typedef typename Tr::Finite_cells_iterator Finite_cell_iterator; int count = 0; #if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING) @@ -923,7 +926,7 @@ void Refine_cells_3:: treat_new_cell(const Cell_handle& cell) { - typedef boost::optional Subdomain; + typedef std::optional Subdomain; // treat cell const Subdomain subdomain = r_oracle_.is_in_domain_object()(r_tr_.dual(cell)); diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_facets_3.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_facets_3.h index b20ef257..cd60b0a0 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_facets_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_facets_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h $ -// $Id: Refine_facets_3.h f8a2878 2021-07-13T11:38:43+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h $ +// $Id: include/CGAL/Mesh_3/Refine_facets_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -38,17 +38,15 @@ #ifdef CGAL_MESH_3_PROFILING #include #endif -#include +#include #include #include -#include +#include #include #include -#include #include -#include #include #include @@ -244,10 +242,10 @@ class Refine_facets_3_base typedef typename Tr::Cell_handle Cell_handle; typedef typename Triangulation_mesher_level_traits_3::Zone Zone; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::Segment_3 Segment_3; - typedef typename Gt::Ray_3 Ray_3; - typedef typename Gt::Line_3 Line_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::Segment_3 Segment_3; + typedef typename GT::Ray_3 Ray_3; + typedef typename GT::Line_3 Line_3; public: Refine_facets_3_base(Tr& tr, Complex3InTriangulation3& c3t3, @@ -348,6 +346,7 @@ class Refine_facets_3_base std::string debug_info_element_impl(const Facet &facet) const { std::stringstream sstr; + sstr.precision(17); sstr << "Facet { " << std::endl << " " << *facet.first->vertex((facet.second+1)%4) << std::endl << " " << *facet.first->vertex((facet.second+2)%4) << std::endl @@ -397,7 +396,7 @@ class Refine_facets_3_base typedef typename MeshDomain::Surface_patch_index Surface_patch_index; typedef typename MeshDomain::Index Index; - typedef typename boost::optional< + typedef typename std::optional< std::tuple > Facet_properties; @@ -409,19 +408,19 @@ class Refine_facets_3_base return ( (facet < mirror)?facet:mirror ); } - /// Returns true if \c f has already been visited + /// Returns true if `f` has already been visited. bool is_facet_visited(const Facet& f) const { return f.first->is_facet_visited(f.second); } - /// Sets facet \c f to visited + /// Sets facet `f` to visited. void set_facet_visited(Facet& f) const { f.first->set_facet_visited(f.second); } - /// Sets the facet \c f and its mirrored facet's surface centers to \c p + /// Sets the facet `f` and its mirrored facet's surface centers to `p`. void set_facet_surface_center(const Facet& f, const Bare_point& p, const Index& index) const @@ -435,32 +434,32 @@ class Refine_facets_3_base mirror.first->set_facet_surface_center_index(mirror.second,index); } - /// Returns facet surface center of \c f + /// Returns facet surface center of `f`. Bare_point get_facet_surface_center(const Facet& f) const { return f.first->get_facet_surface_center(f.second); } - /// Returns index of surface center of facet \c f + /// Returns index of surface center of facet `f`. Index get_facet_surface_center_index(const Facet& f) const { return f.first->get_facet_surface_center_index(f.second); } - /// Sets \c f to surface facets, with index \c index + /// Sets `f` to surface facets, with index `index`. void set_facet_on_surface(const Facet& f, const Surface_patch_index& index) { r_c3t3_.add_to_complex(f, index); } - /// Returns index of facet \c f + /// Returns index of facet `f`. Surface_patch_index get_facet_surface_index(const Facet& f) const { return r_c3t3_.surface_patch_index(f.first, f.second); } - /// Sets index and dimension of vertex \c v + /// Sets index and dimension of vertex `v`. void set_vertex_properties(Vertex_handle& v, const Index& index) { r_c3t3_.set_index(v, index); @@ -477,7 +476,7 @@ class Refine_facets_3_base /// Insert facet into refinement queue void insert_bad_facet(Facet facet, const Quality& quality) { -#if CGAL_MESH_3_VERY_VERBOSE +#ifdef CGAL_MESH_3_VERY_VERBOSE std::stringstream s; s << "insert_bad_facet(" << debug_info_element_impl(facet) << ", ...) by thread " << std::this_thread::get_id() << '\n'; @@ -554,13 +553,13 @@ class Refine_facets_3_base return stream.str(); } - /// Returns to if \c f is on surface + /// Returns to if `f` is on surface bool is_facet_on_surface(const Facet& f) const { return r_c3t3_.is_in_complex(f) ; } - /// Removes \c f from surface facets + /// Removes `f` from surface facets. void remove_facet_from_surface(const Facet& f) { r_c3t3_.remove_from_complex(f); @@ -595,9 +594,9 @@ class Refine_facets_3_base void treat_new_facet(Facet& facet); /** - * Computes at once is_facet_on_surface and facet_surface_center. + * Computes simultaneously `is_facet_on_surface` and `facet_surface_center`. * @param facet The input facet - * @return \c true if \c facet is on surface, \c false otherwise + * @return `true` if `facet` is on surface, `false` otherwise */ void compute_facet_properties(const Facet& facet, Facet_properties& fp, bool force_exact = false ) const; @@ -640,9 +639,9 @@ template class Base_ = Refine_facets_3_base, #ifdef CGAL_LINKED_WITH_TBB - class Container_ = typename boost::mpl::if_c // (parallel/sequential?) + class Container_ = std::conditional_t // (parallel/sequential?) < - boost::is_convertible::value, + std::is_convertible_v, // Parallel # ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE Meshes::Filtered_deque_container @@ -679,7 +678,7 @@ template # endif - >::type // boost::if (parallel/sequential) + > // std::conditional (parallel/sequential) #else // !CGAL_LINKED_WITH_TBB @@ -835,12 +834,12 @@ class Refine_facets_3 Container_::get_next_local_element_impl()); } - /// Tests if \c p encroaches facet from zone + /// Tests if `p` encroaches facet from `zone`. // For sequential Mesher_level_conflict_status test_point_conflict_from_superior_impl(const Weighted_point& p, Zone& zone); - /// Tests if \c p encroaches facet from zone + /// Tests if `p` encroaches facet from `zone`. // For parallel template Mesher_level_conflict_status @@ -875,7 +874,7 @@ class Refine_facets_3 , bool &facet_is_in_its_cz , bool &could_lock_zone); - /// Insert \c p into the triangulation + /// Inserts `p` into the triangulation. Vertex_handle insert_impl(const Weighted_point& p, const Zone& zone); bool try_lock_element(const Facet &f, int lock_radius = 0) const @@ -892,8 +891,8 @@ class Refine_facets_3 typedef typename Tr::Cell_handle Cell_handle; typedef typename MeshDomain::Surface_patch_index Surface_patch_index; typedef typename MeshDomain::Index Index; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::Ray_3 Ray_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::Ray_3 Ray_3; private: // Disabled copy constructor @@ -983,7 +982,7 @@ scan_triangulation_impl() #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { # if defined(CGAL_MESH_3_VERBOSE) || defined(CGAL_MESH_3_PROFILING) std::cerr << "Scanning triangulation for bad facets (in parallel) - " @@ -1051,7 +1050,8 @@ int Refine_facets_3:: number_of_bad_elements_impl() { - typedef typename MD::Subdomain Subdomain; + typedef typename MD::Subdomain_index Subdomain_index; + typedef std::optional Subdomain; typedef typename Tr::Finite_facets_iterator Finite_facet_iterator; int count = 0, count_num_bad_surface_facets = 0; @@ -1147,9 +1147,9 @@ number_of_bad_elements_impl() const Subdomain mc_subdomain = this->r_oracle_.is_in_domain_object()(this->r_tr_.dual(mc)); std::cerr << "*** Is in complex? c is marked in domain: " << this->r_c3t3_.is_in_complex(c) - << " / c is really in subdomain: " << c_subdomain + << " / c is really in subdomain: " << IO::oformat(c_subdomain) << " / mc is marked in domain: " << this->r_c3t3_.is_in_complex(mc) - << " / mc is really in subdomain: " << mc_subdomain + << " / mc is really in subdomain: " << IO::oformat(mc_subdomain) << std::endl; @@ -1471,7 +1471,7 @@ before_insertion_impl(const Facet& facet, error_msg << boost::format("Mesh_3 ERROR: " "A facet is not in conflict with its refinement point!\n" - "Debugging informations:\n" + "Debugging information:\n" " Facet: (%1%, %2%) = (%6%, %7%, %8%)\n" " Dual: %3%\n" " Refinement point: %5%\n" @@ -1624,15 +1624,15 @@ compute_facet_properties(const Facet& facet, CGAL_assertion( r_tr_.dimension() == 3 ); // types - typedef boost::optional Surface_patch; + typedef std::optional Surface_patch; typedef typename MD::Intersection Intersection; // Functor - typename Gt::Is_degenerate_3 is_degenerate = + typename GT::Is_degenerate_3 is_degenerate = r_tr_.geom_traits().is_degenerate_3_object(); - typename Gt::Compare_xyz_3 compare_xyz = + typename GT::Compare_xyz_3 compare_xyz = r_tr_.geom_traits().compare_xyz_3_object(); - typename Gt::Construct_segment_3 construct_segment = + typename GT::Construct_segment_3 construct_segment = r_tr_.geom_traits().construct_segment_3_object(); #ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 typename MD::Do_intersect_surface do_intersect_surface = @@ -1732,6 +1732,9 @@ Refine_facets_3_base:: is_facet_encroached(const Facet& facet, const Weighted_point& point) const { + typedef typename MD::Subdomain_index Subdomain_index; + typedef std::optional Subdomain; + if ( r_tr_.is_infinite(facet) || ! this->is_facet_on_surface(facet) ) return false; @@ -1741,9 +1744,40 @@ is_facet_encroached(const Facet& facet, const Bare_point& center = get_facet_surface_center(facet); const Weighted_point& reference_point = r_tr_.point(cell, (facet_index+1)&3); +#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS + std::cout << "---------------------------------------------------" << std::endl; + std::cout << "Facet " << r_tr_.point(cell, (facet_index+1)%4) << " " + << r_tr_.point(cell, (facet_index+2)%4) << " " + << r_tr_.point(cell, (facet_index+3)%4) << std::endl; + std::cout << "center: " << center << std::endl; + std::cout << "cell point: " << reference_point << std::endl; + std::cout << "refinement point: " << point << std::endl; + std::cout << "greater or equal? " << r_tr_.greater_or_equal_power_distance(center, reference_point, point) << std::endl; + std::cout << "greater or equal (other way)? " << r_tr_.greater_or_equal_power_distance(center, point, reference_point) << std::endl; + std::cout << "index of cell " << r_c3t3_.subdomain_index(cell) << std::endl; +#endif + // the facet is encroached if the new point is closer to the center than // any vertex of the facet - return r_tr_.greater_or_equal_power_distance(center, reference_point, point); + if(r_tr_.greater_or_equal_power_distance(center, reference_point, point)) + return true; + + // In an ideal (exact) world, when the predicate above returns true then the insertion + // of the refinement point will shorten the dual of the facet but that dual will + // still intersects the surface (domain), otherwise the power distance to the surface + // center would be shorter. + // + // In the real world, we can make an error both when we switch back to the inexact kernel + // and when we evaluate the domain (e.g. trigonometry-based implicit functions). + // + // An issue can then arise when we update the restricted Delaunay due to the insertion + // of another point, and we do not notice that a facet should in fact have been encroached + // by a previous insertion. + Bare_point cc; + r_tr_.dual_exact(facet, point, cc); + + const Subdomain subdomain = r_oracle_.is_in_domain_object()(cc); + return (!subdomain || *subdomain != r_c3t3_.subdomain_index(cell)); } template @@ -1752,13 +1786,13 @@ Refine_facets_3_base:: is_encroached_facet_refinable(Facet& facet) const { typedef typename Tr::Weighted_point Weighted_point; - typedef typename Gt::FT FT; + typedef typename GT::FT FT; - typename Gt::Compute_squared_radius_smallest_orthogonal_sphere_3 sq_radius = + typename GT::Compute_squared_radius_smallest_orthogonal_sphere_3 sq_radius = r_tr_.geom_traits().compute_squared_radius_smallest_orthogonal_sphere_3_object(); - typename Gt::Compute_weight_3 cw = + typename GT::Compute_weight_3 cw = r_tr_.geom_traits().compute_weight_3_object(); - typename Gt::Compare_weighted_squared_radius_3 compare = + typename GT::Compare_weighted_squared_radius_3 compare = r_tr_.geom_traits().compare_weighted_squared_radius_3_object(); const Cell_handle& c = facet.first; @@ -1836,8 +1870,8 @@ is_encroached_facet_refinable(Facet& facet) const } /** - * \c facet is an internal facet we are going to remove - * \c source_facet is the facet we want to refine by inserting a new point + * `facet` is an internal facet we are going to remove + * `source_facet` is the facet we want to refine by inserting a new point */ template bool diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_facets_manifold_base.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_facets_manifold_base.h index b8a66946..0e88fd4a 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_facets_manifold_base.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_facets_manifold_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h $ -// $Id: Refine_facets_manifold_base.h 17ac255 2021-05-18T15:43:59+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h $ +// $Id: include/CGAL/Mesh_3/Refine_facets_manifold_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -95,6 +95,7 @@ class Refine_facets_manifold_base mutable bool m_bad_vertices_initialized; bool m_with_manifold_criterion; bool m_with_boundary; + std::optional m_squared_facet_min_size ; private: // computes and return an ordered pair of Vertex @@ -141,7 +142,7 @@ class Refine_facets_manifold_base return this->r_tr_.min_squared_distance(fcenter, cp(wp)) - cw(wp); } - Facet + std::pair biggest_incident_facet_in_complex(const Vertex_handle v) const { #ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS @@ -195,10 +196,12 @@ class Refine_facets_manifold_base << std::endl; #endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS - return biggest_facet; + return { biggest_facet, biggest_sq_dist }; } - Facet biggest_incident_facet_in_complex(const Edge& arete) const { + std::pair + biggest_incident_facet_in_complex(const Edge& arete) const + { // Find the first facet in the incident facets // of the edge which is in the Complex // use the list of incident facets in the complex @@ -239,7 +242,20 @@ class Refine_facets_manifold_base << biggest_sq_dist << std::endl; #endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS - return biggest_facet; + return { biggest_facet, biggest_sq_dist }; + } + + bool is_smaller_than_min_size(const FT& sq_dist) const + { + if(!m_squared_facet_min_size ) + return false; + return sq_dist < *m_squared_facet_min_size; + } + + template //T may be Edge or Vertex_handle + bool biggest_incident_facet_is_smaller_than_min_size(const T& t) const + { + return is_smaller_than_min_size(biggest_incident_facet_in_complex(t).second); } /////////////////////// @@ -251,7 +267,7 @@ class Refine_facets_manifold_base { #ifdef CGAL_LINKED_WITH_TBB // Sequential only - if (!boost::is_convertible::value) + if (!std::is_convertible::value) #endif // CGAL_LINKED_WITH_TBB { //Sequential @@ -280,7 +296,7 @@ class Refine_facets_manifold_base #ifdef CGAL_LINKED_WITH_TBB // Sequential only - if (!boost::is_convertible::value) + if (!std::is_convertible::value) #endif // CGAL_LINKED_WITH_TBB { if(m_bad_vertices_initialized) { @@ -324,6 +340,7 @@ class Refine_facets_manifold_base , m_bad_vertices_initialized(false) , m_with_manifold_criterion((mesh_topology & MANIFOLD_WITH_BOUNDARY) != 0) , m_with_boundary((mesh_topology & NO_BOUNDARY) == 0) + , m_squared_facet_min_size(criteria.squared_min_radius_bound()) { #ifdef CGAL_MESH_3_DEBUG_CONSTRUCTORS std::cerr << "CONS: Refine_facets_manifold_base"; @@ -357,12 +374,15 @@ class Refine_facets_manifold_base ( (!m_with_boundary) && (this->r_c3t3_.face_status(*eit) == C3t3::BOUNDARY) ) ) { + const auto [biggest_f, sq_dist] = biggest_incident_facet_in_complex(*eit); + if (is_smaller_than_min_size(sq_dist)) + continue; + #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { - this->insert_bad_facet(biggest_incident_facet_in_complex(*eit), - typename Base::Quality()); + this->insert_bad_facet(biggest_f, typename Base::Quality()); } else #endif // CGAL_LINKED_WITH_TBB { // Sequential @@ -395,17 +415,21 @@ class Refine_facets_manifold_base end = this->r_tr_.finite_vertices_end(); vit != end; ++vit) { - if( this->r_c3t3_.face_status(vit) == C3t3::SINGULAR ) { + if( this->r_c3t3_.face_status(vit) == C3t3::SINGULAR ) + { + const auto [biggest_f, sq_dist] = biggest_incident_facet_in_complex(vit); + if (is_smaller_than_min_size(sq_dist)) + continue; + #ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS std::cerr << "m_bad_vertices.insert(" << this->r_tr_.point(vit) << ")\n"; #endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { - this->insert_bad_facet(biggest_incident_facet_in_complex(vit), - typename Base::Quality()); + this->insert_bad_facet(biggest_f, typename Base::Quality()); } else #endif // CGAL_LINKED_WITH_TBB { // Sequential @@ -471,7 +495,7 @@ class Refine_facets_manifold_base Facet get_next_element_impl() { #ifdef CGAL_LINKED_WITH_TBB - if (boost::is_convertible::value) + if (std::is_convertible::value) return Base::get_next_element_impl(); else #endif @@ -489,7 +513,7 @@ class Refine_facets_manifold_base << this->r_tr_.point(edgevv.second) << "\n"; #endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS - return biggest_incident_facet_in_complex(first_bad_edge); + return biggest_incident_facet_in_complex(first_bad_edge).first; } else { CGAL_assertion(!m_bad_vertices.empty()); const Vertex_handle& v = *m_bad_vertices.begin(); @@ -506,7 +530,7 @@ class Refine_facets_manifold_base dump_c3t3(this->r_c3t3_, "dump-crash"); CGAL_error_msg("this->r_c3t3_.face_status(v) != C3t3::SINGULAR"); } - return biggest_incident_facet_in_complex(v); + return biggest_incident_facet_in_complex(v).first; } } //end Sequential } @@ -568,13 +592,17 @@ class Refine_facets_manifold_base (this->r_c3t3_.face_status(edge) == C3t3::BOUNDARY) ) ) { + const auto [biggest_f, sq_dist] = biggest_incident_facet_in_complex(edge); + if (is_smaller_than_min_size(sq_dist)) + continue; + #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { - this->insert_bad_facet(biggest_incident_facet_in_complex(edge), - typename Base::Quality()); - } else + this->insert_bad_facet(biggest_f, typename Base::Quality()); + } + else #endif // CGAL_LINKED_WITH_TBB { // Sequential m_bad_edges.insert(Bad_edge(edge_to_edgevv(edge), @@ -585,7 +613,7 @@ class Refine_facets_manifold_base else { #ifdef CGAL_LINKED_WITH_TBB // Sequential only - if (!boost::is_convertible::value) + if (!std::is_convertible::value) #endif // CGAL_LINKED_WITH_TBB { m_bad_edges.left.erase( edge_to_edgevv(edge) ); // @TODO: pourquoi?! @@ -616,17 +644,21 @@ class Refine_facets_manifold_base // !this->r_c3t3_.is_regular_or_boundary_for_vertices(*vit) ) { + const auto [biggest_f, sq_dist] = biggest_incident_facet_in_complex(*vit); + if (is_smaller_than_min_size(sq_dist)) + continue; + #ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS std::cerr << "m_bad_vertices.insert(" << this->r_tr_.point(*vit) << ")\n"; #endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { - this->insert_bad_facet(biggest_incident_facet_in_complex(*vit), - typename Base::Quality()); - } else + this->insert_bad_facet(biggest_f, typename Base::Quality()); + } + else #endif // CGAL_LINKED_WITH_TBB { // Sequential m_bad_vertices.insert(*vit); @@ -639,17 +671,21 @@ class Refine_facets_manifold_base // !this->r_c3t3_.is_regular_or_boundary_for_vertices(v) ) { + const auto [biggest_f, sq_dist] = biggest_incident_facet_in_complex(v); + if (is_smaller_than_min_size(sq_dist)) + return; + #ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS std::cerr << "m_bad_vertices.insert(" << this->r_tr_.point(v) << ")\n"; #endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { - this->insert_bad_facet(biggest_incident_facet_in_complex(v), - typename Base::Quality()); - } else + this->insert_bad_facet(biggest_f, typename Base::Quality()); + } + else #endif // CGAL_LINKED_WITH_TBB { // Sequential m_bad_vertices.insert(v); diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_tets_visitor.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_tets_visitor.h index 48ac2321..391b5ea6 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_tets_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Refine_tets_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Refine_tets_visitor.h $ -// $Id: Refine_tets_visitor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Refine_tets_visitor.h $ +// $Id: include/CGAL/Mesh_3/Refine_tets_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Robust_intersection_kernel.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Robust_intersection_kernel.h index bbe2628a..88a71735 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Robust_intersection_kernel.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Robust_intersection_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_kernel.h $ -// $Id: Robust_intersection_kernel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_kernel.h $ +// $Id: include/CGAL/Mesh_3/Robust_intersection_kernel.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Stephane Tayeb diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Robust_intersection_traits_3.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Robust_intersection_traits_3.h index 043d1c0d..33eb69dc 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Robust_intersection_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Robust_intersection_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_traits_3.h $ -// $Id: Robust_intersection_traits_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_traits_3.h $ +// $Id: include/CGAL/Mesh_3/Robust_intersection_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -94,7 +94,7 @@ struct Vector_plane_orientation_3_static_filter : fit_in_double(get_approx(b).z(), bz) && fit_in_double(get_approx(c).x(), cx) && fit_in_double(get_approx(c).y(), cy) && fit_in_double(get_approx(c).z(), cz)) - { // This bloc is not indented because it was added in a second step, + { // This block is not indented because it was added in a second step, // and one wants to avoid the reindentation of the whole code double abx = bx - ax; @@ -418,14 +418,14 @@ tr_intersection(const typename K::Triangle_3 &t, typedef typename K::Point_3 Point_3; - typename K::Construct_vertex_3 vertex_on = - k.construct_vertex_3_object(); - + typename K::Do_intersect_3 do_intersect = + k.do_intersect_3_object(); typename K::Orientation_3 orientation = k.orientation_3_object(); - typename K::Construct_point_on_3 point_on = k.construct_point_on_3_object(); + typename K::Construct_vertex_3 vertex_on = + k.construct_vertex_3_object(); typename Mesh_3::Vector_plane_orientation_3_static_filter vector_plane_orient; @@ -439,17 +439,24 @@ tr_intersection(const typename K::Triangle_3 &t, const Point_3& q = point_on(r,1); const Orientation ray_direction = vector_plane_orient(p, q, a, b, c); - - if(ray_direction == COPLANAR) return result_type(); + if(ray_direction == COPLANAR) + return result_type(); const Orientation abcp = orientation(a,b,c,p); + if(abcp == COPLANAR) // p belongs to the triangle's supporting plane + { + if(do_intersect(t, p)) + return result_type(p); + else + return result_type(); + } - if(abcp == COPLANAR) return result_type(); // p belongs to the triangle's - // supporting plane - - if(ray_direction == abcp) return result_type(); - // The ray lies entirely in one of the two open halfspaces defined by the - // triangle's supporting plane. + if(ray_direction == abcp) + { + // The ray lies entirely in one of the two open halfspaces defined by the + // triangle's supporting plane. + return result_type(); + } // Here we know that the ray crosses the plane (abc) diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Sizing_grid.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Sizing_grid.h index 743ab5c0..55ecedc4 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Sizing_grid.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Sizing_grid.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Sizing_grid.h $ -// $Id: Sizing_grid.h e9d41d7 2020-04-21T10:03:00+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Sizing_grid.h $ +// $Id: include/CGAL/Mesh_3/Sizing_grid.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -31,12 +31,12 @@ namespace CGAL { namespace Mesh_3 { -template +template class Sizing_grid_node { public: - typedef typename Gt::Point_3 Point; - typedef typename Gt::FT FT; + typedef typename GT::Point_3 Point; + typedef typename GT::FT FT; FT m_init_size; FT m_size; @@ -108,14 +108,14 @@ template class Sizing_grid { public: - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename Tr::Weighted_point Weighted_point; typedef typename Tr::Bare_point Bare_point; - typedef typename Gt::Vector_3 Vector; - typedef Sizing_grid_node Node; + typedef typename GT::Vector_3 Vector; + typedef Sizing_grid_node Node; typedef typename std::pair Constraint; private: diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Sliver_perturber.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Sliver_perturber.h index f1f8c129..519b6f49 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Sliver_perturber.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Sliver_perturber.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h $ -// $Id: Sliver_perturber.h f26de8e 2021-11-30T13:20:15+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h $ +// $Id: include/CGAL/Mesh_3/Sliver_perturber.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -59,7 +59,6 @@ #include #include #include -#include #include @@ -71,7 +70,7 @@ namespace Mesh_3 { /** * @class PVertex -* Vertex with associated perturbation datas +* Vertex with associated perturbation data */ // Sequential template< typename FT @@ -171,7 +170,7 @@ void update_saved_erase_counter() {} bool is_zombie() { return false; } private: -/// Private datas +/// Private data Vertex_handle vertex_handle_; unsigned int incident_sliver_nb_; FT min_value_; @@ -294,7 +293,7 @@ bool operator<(const Self& pv) const } private: -/// Private datas +/// Private data Vertex_handle vertex_handle_; unsigned int vh_erase_counter_when_added_; int in_dimension_; @@ -317,8 +316,8 @@ class Sliver_perturber_base { protected: typedef typename Tr::Vertex_handle Vertex_handle; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename std::vector Bad_vertices_vector; typedef typename Tr::Lock_data_structure Lock_data_structure; @@ -345,8 +344,8 @@ class Sliver_perturber_base { protected: typedef typename Tr::Vertex_handle Vertex_handle; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename tbb::concurrent_vector Bad_vertices_vector; typedef typename Tr::Lock_data_structure Lock_data_structure; @@ -437,7 +436,7 @@ class Sliver_perturber typename C3T3::Triangulation, Concurrency_tag> Base; typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Cell_handle Cell_handle; typedef typename Base::Vertex_handle Vertex_handle; @@ -450,7 +449,7 @@ class Sliver_perturber typedef typename std::vector Vertex_vector; typedef typename Base::Bad_vertices_vector Bad_vertices_vector; - typedef typename Gt::FT FT; + typedef typename GT::FT FT; // Helper typedef class C3T3_helpers C3T3_helpers; @@ -553,7 +552,7 @@ class Sliver_perturber int build_priority_queue(const FT& sliver_bound, PQueue& pqueue) const; /** - * Updates priority queue for all vertices of \c vertices + * Updates priority queue for all vertices of `vertices`. */ // Sequential int update_priority_queue(const Vertex_vector& vertices, @@ -568,7 +567,7 @@ class Sliver_perturber #endif /** - * Updates \c pv in priority queue + * Updates `pv` in priority queue. */ int update_priority_queue(const PVertex& pv, PQueue& pqueue) const; @@ -582,7 +581,7 @@ class Sliver_perturber ) const; /** - * Returns a pvertex from a vertex handle \c vh, using id \c pv_id + * Returns a pvertex from a vertex handle `vh`, using the id `pv_id`. */ PVertex make_pvertex(const Vertex_handle& vh, @@ -595,13 +594,13 @@ class Sliver_perturber const typename PVertex::id_type& pv_id) const; /** - * Updates a pvertex \c pv + * Updates a pvertex `pv`. */ void update_pvertex(PVertex& pv, const FT& sliver_bound) const; void update_pvertex__concurrent(PVertex& pv, const FT& sliver_bound) const; /** - * Returns \c vh pvertex id + * Returns `vh` pvertex id. */ typename PVertex::id_type get_pvertex_id(const Vertex_handle& vh) const { @@ -609,7 +608,7 @@ class Sliver_perturber } /** - * Update bad vertices vector, wrt \c sliver_bound + * Updates bad vertices vector, wrt. `sliver_bound`. */ // Sequential void update_bad_vertices(std::vector &bad_vertices, @@ -928,7 +927,7 @@ perturb(const FT& sliver_bound, PQueue& pqueue, Visitor& visitor) const #ifdef CGAL_LINKED_WITH_TBB // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->create_task_group(); @@ -1032,7 +1031,7 @@ perturb(const FT& sliver_bound, PQueue& pqueue, Visitor& visitor) const } } - // Update pqueue in every cases, because pv was poped + // Update pqueue in every cases, because pv was popped pqueue_size += update_priority_queue(pv, pqueue); visitor.end_of_perturbation_iteration(pqueue_size); @@ -1261,7 +1260,7 @@ perturb_vertex( PVertex pv , bool *could_lock_zone ) const { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); #ifdef CGAL_CONCURRENT_MESH_3_PROFILING static Profile_branch_counter_3 bcounter( @@ -1378,7 +1377,7 @@ perturb_vertex( PVertex pv ++bcounter; #endif - // Update pqueue in every cases, because pv was poped + // Update pqueue in every cases, because pv was popped if (pv.is_perturbable()) { enqueue_task(pv, sliver_bound, visitor, bad_vertices); diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Slivers_exuder.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Slivers_exuder.h index b33e61d1..e5453f92 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Slivers_exuder.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Slivers_exuder.h @@ -5,8 +5,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h $ -// $Id: Slivers_exuder.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h $ +// $Id: include/CGAL/Mesh_3/Slivers_exuder.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -38,9 +38,8 @@ #include #include -#include -#include +#include #include #include // std::setprecision #include // std::cerr/cout @@ -107,8 +106,8 @@ class Slivers_exuder_base typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Cell_handle Cell_handle; typedef std::vector Cell_vector; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename std::vector Bad_vertices_vector; typedef typename Tr::Lock_data_structure Lock_data_structure; @@ -157,7 +156,7 @@ class Slivers_exuder_base } /** - * A functor to remove one \c Cell_handle from a priority queue + * A functor to remove one `Cell_handle` from a priority queue */ class Erase_from_queue { @@ -172,7 +171,7 @@ class Slivers_exuder_base }; /** - * Delete cells of \c cells from \c cells_queue + * Deletes cells of `cells` from `cells_queue`. */ void delete_cells_from_queue(const Cell_vector& cells) { @@ -197,8 +196,8 @@ class Slivers_exuder_base typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Cell_handle Cell_handle; typedef std::vector Cell_vector; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename tbb::concurrent_vector Bad_vertices_vector; typedef typename Tr::Lock_data_structure Lock_data_structure; @@ -288,7 +287,7 @@ class Slivers_exuder_base } /** - * A functor to remove one \c Cell_handle from a priority queue + * A functor to remove one `Cell_handle` from a priority queue */ class Erase_from_queue { @@ -300,7 +299,7 @@ class Slivers_exuder_base }; /** - * Delete cells of \c cells from \c cells_queue + * Deletes cells of `cells` from `cells_queue`. */ void delete_cells_from_queue(const Cell_vector& cells) { @@ -353,9 +352,9 @@ class Slivers_exuder typedef typename Base::Queue_value_type Queue_value_type; typedef typename Base::Cell_vector Cell_vector; - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Base::FT FT; - typedef typename Gt::Tetrahedron_3 Tetrahedron_3; + typedef typename GT::Tetrahedron_3 Tetrahedron_3; typedef typename C3T3::Cells_in_complex_iterator Cell_iterator; typedef std::vector Facet_vector; @@ -498,7 +497,7 @@ class Slivers_exuder /** * Returns the umbrella of internal_facets vector */ - boost::optional + std::optional get_umbrella(const Facet_vector& internal_facets, const Vertex_handle& v) const; @@ -525,7 +524,7 @@ class Slivers_exuder const Vertex_handle& new_vertex); /** - * Orders handles \c h1 & \c h2 + * Orders handles `h1` & `h2` */ template static @@ -563,7 +562,7 @@ class Slivers_exuder /** - * Initialize cells_queue w.r.t sliver_bound_ + * Initialize cells_queue w.r.t. sliver_bound_ */ void initialize_cells_priority_queue() { @@ -594,8 +593,8 @@ class Slivers_exuder /** - * Returns the \c Boundary_facets_from_outside object containing mirror facets - * of \c facets + * Returns the `Boundary_facets_from_outside` object containing mirror facets + * of `facets`. */ Boundary_facets_from_outside get_boundary_facets_from_outside(const Facet_vector& facets) const @@ -616,14 +615,14 @@ class Slivers_exuder } /** - * Add a cell \c ch to \c cells_queue + * Adds a cell `ch` to `cells_queue`. */ template void add_cell_to_queue(Cell_handle ch, FT criterion_value) { #if defined( CGAL_LINKED_WITH_TBB ) && ( !defined (BOOST_MSVC) || !defined( _DEBUG ) || !defined (CGAL_TEST_SUITE) ) // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) enqueue_task( ch, this->erase_counter(ch), criterion_value); // Sequential @@ -651,7 +650,7 @@ class Slivers_exuder }; /** - * Removes objects of [begin,end[ range from \c c3t3_ + * Removes objects of [begin,end[ range from `c3t3_`. */ template void remove_from_c3t3(ForwardIterator begin, ForwardIterator end) @@ -852,8 +851,8 @@ class Slivers_exuder const Vertex_handle& vh) const; /** - * Checks if the sliver criterion values from \c criterion_values are the same as - * those that will be found if wp is inserted in the triangulation + * Checks if the sliver criterion values from `criterion_values` are the same as + * those that will be found if wp is inserted in the triangulation. */ bool check_ratios(const Sliver_values& criterion_values, const Weighted_point& wp, @@ -920,7 +919,7 @@ pump_vertices(FT sliver_criterion_limit, #if defined( CGAL_LINKED_WITH_TBB ) && ( !defined (BOOST_MSVC) || !defined( _DEBUG ) || !defined (CGAL_TEST_SUITE) ) // Parallel - if (boost::is_convertible::value) + if (std::is_convertible::value) { this->create_task_group(); @@ -964,9 +963,9 @@ pump_vertices(FT sliver_criterion_limit, bool vertex_pumped = false; for( int i = 0; i < 4; ++i ) { - // pump_vertices_on_surfaces is a boolean template parameter. The - // following condition is pruned at compiled time, if - // pump_vertices_on_surfaces==false. + // pump_vertices_on_surfaces is a Boolean template parameter. + // The following condition is pruned at compile time, + // if pump_vertices_on_surfaces is `false`. if( pump_vertices_on_surfaces || c3t3_.in_dimension(c->vertex(i)) > 2 ) { if( pump_vertex(c->vertex(i)) ) @@ -976,7 +975,9 @@ pump_vertices(FT sliver_criterion_limit, break; } else + { ++num_of_ignored_vertices_; + } ++num_of_treated_vertices_; } @@ -987,14 +988,14 @@ pump_vertices(FT sliver_criterion_limit, this->cells_queue_pop_front(); visitor.after_cell_pumped(this->cells_queue_size()); - #ifdef CGAL_MESH_3_EXUDER_VERBOSE +#ifdef CGAL_MESH_3_EXUDER_VERBOSE std::cerr << boost::format("\r \r" "(%1%,%2%,%3%) (%|4$.1f| vertices/s)") % this->cells_queue_size() % num_of_pumped_vertices_ % num_of_ignored_vertices_ % (num_of_treated_vertices_ / running_time_.time()); - #endif // CGAL_MESH_3_EXUDER_VERBOSE +#endif // CGAL_MESH_3_EXUDER_VERBOSE } } @@ -1045,21 +1046,21 @@ pump_vertex(const Vertex_handle& pumped_vertex, if (could_lock_zone && *could_lock_zone == false) return false; - typename Gt::Compare_weighted_squared_radius_3 compare_sq_radius = + typename GT::Compare_weighted_squared_radius_3 compare_sq_radius = tr_.geom_traits().compare_weighted_squared_radius_3_object(); // If best_weight <= pumped_vertex weight, nothing to do const Weighted_point& pumped_vertex_wp = tr_.point(pumped_vertex); if ( compare_sq_radius(pumped_vertex_wp, - best_weight) == CGAL::LARGER ) // best_weight > v's weight { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); - const Weighted_point& pwp = tr_.point(pumped_vertex); - Weighted_point wp(cp(pwp), best_weight); + const Weighted_point& old_position = tr_.point(pumped_vertex); + Weighted_point new_point(cp(old_position), best_weight); // Insert weighted point into mesh // note it can fail if the mesh is non-manifold at pumped_vertex - return update_mesh(wp, + return update_mesh(new_point, pumped_vertex, could_lock_zone); } @@ -1115,8 +1116,8 @@ expand_prestar(const Cell_handle& cell_to_add, Pre_star& pre_star, Sliver_values& criterion_values) const { - typename Gt::Compute_weight_3 cw = tr_.geom_traits().compute_weight_3_object(); - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Compute_weight_3 cw = tr_.geom_traits().compute_weight_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); // Delete first facet of pre_star Facet start_facet = pre_star.front()->second; @@ -1332,13 +1333,13 @@ get_best_weight(const Vertex_handle& v, bool *could_lock_zone) const } // end while(... can pump...) #ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER - typename Gt::Compare_weighted_squared_radius_3 compare_sq_radius = + typename GT::Compare_weighted_squared_radius_3 compare_sq_radius = tr_.geom_traits().compare_weighted_squared_radius_3_object(); const Weighted_point& vwp = tr_.point(v); if ( compare_sq_radius(vwp, - best_weight) == CGAL::LARGER ) // best_weight > v's weight { - typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); const Weighted_point& wpv = tr_.point(v); Weighted_point wp(cp(wpv), best_weight); check_pre_star(pre_star_copy, wp, v); @@ -1351,7 +1352,7 @@ get_best_weight(const Vertex_handle& v, bool *could_lock_zone) const template -boost::optional::Umbrella > +std::optional::Umbrella > Slivers_exuder:: get_umbrella(const Facet_vector& facets, // internal_facets of conflict zone const Vertex_handle& /* v, no longer used */) const @@ -1387,7 +1388,7 @@ get_umbrella(const Facet_vector& facets, // internal_facets of conflict zone { std::size_t count = (*uit).second.second; if(count == 2) //there will be more than 3 after insertion - return boost::none; //non-manifold configuration + return std::nullopt; //non-manifold configuration umbrella.insert(uit, std::make_pair(oe, @@ -1559,12 +1560,12 @@ update_mesh(const Weighted_point& new_point, if (could_lock_zone && *could_lock_zone == false) return false; - // Get some datas to restore mesh + // Get some data to restore mesh Boundary_facets_from_outside boundary_facets_from_outside = get_boundary_facets_from_outside(boundary_facets); - boost::optional umbrella = get_umbrella(internal_facets, old_vertex); - if(umbrella == boost::none) + std::optional umbrella = get_umbrella(internal_facets, old_vertex); + if(umbrella == std::nullopt) return false; //abort pumping this vertex // Delete old cells from queue (they aren't in the triangulation anymore) diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Slivers_exuder_cell_attributes_traits.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Slivers_exuder_cell_attributes_traits.h index 47ffc3d3..d72d5ee8 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Slivers_exuder_cell_attributes_traits.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Slivers_exuder_cell_attributes_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder_cell_attributes_traits.h $ -// $Id: Slivers_exuder_cell_attributes_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder_cell_attributes_traits.h $ +// $Id: include/CGAL/Mesh_3/Slivers_exuder_cell_attributes_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Triangle_accessor_primitive.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Triangle_accessor_primitive.h index 103fadd4..bb4e16c2 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Triangle_accessor_primitive.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Triangle_accessor_primitive.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Triangle_accessor_primitive.h $ -// $Id: Triangle_accessor_primitive.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Triangle_accessor_primitive.h $ +// $Id: include/CGAL/Mesh_3/Triangle_accessor_primitive.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,13 +24,13 @@ namespace CGAL { namespace Mesh_3 { -template +template class Triangle_accessor_primitive { public: typedef typename TriangleAccessor::Triangle_handle Id; - typedef typename Gt::Triangle_3 Datum; - typedef typename Gt::Point_3 Point; + typedef typename GT::Triangle_3 Datum; + typedef typename GT::Point_3 Point; Triangle_accessor_primitive(const Id& h) : handle_(h) {} @@ -55,15 +55,15 @@ class Triangle_accessor_primitive Id handle_; }; -//template -//class Triangle_accessor_primitive,Gt>, Gt> +//template +//class Triangle_accessor_primitive,GT>, GT> //{ -// typedef class Triangle_accessor,Gt> Triangle_accessor; +// typedef class Triangle_accessor,GT> Triangle_accessor; // //public: // typedef typename Triangle_accessor::Triangle_iterator Id; -// typedef typename Gt::Triangle_3 Datum; -// typedef typename Gt::Point_3 Point; +// typedef typename GT::Triangle_3 Datum; +// typedef typename GT::Point_3 Point; // // Triangle_accessor_primitive(const Id& h) // : handle_(h) {} diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Triangulation_helpers.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Triangulation_helpers.h index eb8ab4f3..8f756386 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Triangulation_helpers.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Triangulation_helpers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Triangulation_helpers.h $ -// $Id: Triangulation_helpers.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Triangulation_helpers.h $ +// $Id: include/CGAL/Mesh_3/Triangulation_helpers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,11 +23,8 @@ #include #include -#include #include -#include #include -#include #include #include @@ -35,6 +32,8 @@ #include #include #include +#include + namespace CGAL { @@ -43,17 +42,17 @@ namespace Mesh_3 { template class Triangulation_helpers { - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; // If `Tr` is not a triangulation that has defined Bare_point, // use Point_3 as defined in the traits class. typedef typename boost::mpl::eval_if_c< CGAL::internal::Has_nested_type_Bare_point::value, typename CGAL::internal::Bare_point_type, - boost::mpl::identity + boost::mpl::identity >::type Bare_point; // 'Point' is either a bare point or a weighted point, depending on the triangulation. @@ -109,8 +108,8 @@ class Triangulation_helpers ~Triangulation_helpers() {} /** - * Returns true if moving \c v to \c p makes no topological - * change in \c tr + * Returns `true` if moving `v` to `p` makes no topological + * change in `tr`. */ bool no_topological_change(Tr& tr, const Vertex_handle v, @@ -137,7 +136,7 @@ class Triangulation_helpers const Bare_point& p) const; /** - * Returns the squared distance from \c vh to its closest vertex + * Returns the squared distance from `vh` to its closest vertex. * * \pre `vh` is not the infinite vertex */ @@ -145,18 +144,18 @@ class Triangulation_helpers FT get_sq_distance_to_closest_vertex(const Tr& tr, const Vertex_handle& vh, const Cell_vector& incident_cells, - typename boost::enable_if_c::type* = nullptr) const; + typename std::enable_if_t* = nullptr) const; // @todo are the two versions really worth it, I can't tell the difference from a time POV... template FT get_sq_distance_to_closest_vertex(const Tr& tr, const Vertex_handle& vh, const Cell_vector& incident_cells, - typename boost::disable_if_c::type* = nullptr) const; + typename std::enable_if_t* = nullptr) const; private: /** - * Returns true if \c v is well_oriented on each cell of \c cell_tos + * Returns `true` if `v` is well_oriented on each cell of `cell_tos`. */ // For sequential version bool well_oriented(const Tr& tr, @@ -187,10 +186,10 @@ no_topological_change(Tr& tr, // // Note that the function was nevertheless adapted to work with periodic triangulation // so this hack can be disabled if one day 'side_of_power_sphere()' is improved. - if(boost::is_same::value) + if(std::is_same::value) return false; - typename Gt::Construct_opposite_vector_3 cov = + typename GT::Construct_opposite_vector_3 cov = tr.geom_traits().construct_opposite_vector_3_object(); bool np = true; @@ -382,7 +381,7 @@ inside_protecting_balls(const Tr& tr, const Vertex_handle v, const Bare_point& p) const { - typename Gt::Compare_weighted_squared_radius_3 cwsr = + typename GT::Compare_weighted_squared_radius_3 cwsr = tr.geom_traits().compare_weighted_squared_radius_3_object(); Vertex_handle nv = tr.nearest_power_vertex(p, v->cell()); @@ -407,17 +406,17 @@ Triangulation_helpers:: get_sq_distance_to_closest_vertex(const Tr& tr, const Vertex_handle& vh, const Cell_vector& incident_cells, - typename boost::enable_if_c::type*) const + typename std::enable_if_t*) const { CGAL_precondition(!tr.is_infinite(vh)); typedef std::vector Vertex_container; // There is no need to use tr.min_squared_distance() here because we are computing - // distances between 'v' and a neighbor within their common cell, which means + // distances between 'v' and a neighboring vertex within a common cell, which means // that even if we are using a periodic triangulation, the distance is correctly computed. - typename Gt::Compute_squared_distance_3 csqd = tr.geom_traits().compute_squared_distance_3_object(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Compute_squared_distance_3 csqd = tr.geom_traits().compute_squared_distance_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); Vertex_container treated_vertices; FT min_sq_dist = std::numeric_limits::infinity(); @@ -466,7 +465,7 @@ Triangulation_helpers:: get_sq_distance_to_closest_vertex(const Tr& tr, const Vertex_handle& vh, const Cell_vector& incident_cells, - typename boost::disable_if_c::type*) const + typename std::enable_if_t*) const { CGAL_precondition(!tr.is_infinite(vh)); @@ -475,10 +474,10 @@ get_sq_distance_to_closest_vertex(const Tr& tr, typedef typename Vertex_container::iterator VC_it; // There is no need to use tr.min_squared_distance() here because we are computing - // distances between 'v' and a neighbor within their common cell, which means + // distances between 'v' and a neighboring vertex within a common cell, which means // that even if we are using a periodic triangulation, the distance is correctly computed. - typename Gt::Compute_squared_distance_3 csqd = tr.geom_traits().compute_squared_distance_3_object(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Compute_squared_distance_3 csqd = tr.geom_traits().compute_squared_distance_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); Vertex_container treated_vertices; FT min_sq_dist = std::numeric_limits::infinity(); @@ -524,9 +523,9 @@ Triangulation_helpers:: well_oriented(const Tr& tr, const Cell_vector& cells_tos) const { - typedef typename Tr::Geom_traits Gt; - typename Gt::Orientation_3 orientation = tr.geom_traits().orientation_3_object(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typedef typename Tr::Geom_traits GT; + typename GT::Orientation_3 orientation = tr.geom_traits().orientation_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); typename Cell_vector::const_iterator it = cells_tos.begin(); for( ; it != cells_tos.end() ; ++it) @@ -570,9 +569,9 @@ well_oriented(const Tr& tr, const Cell_vector& cells_tos, const Point_getter& pg) const { - typedef typename Tr::Geom_traits Gt; - typename Gt::Orientation_3 orientation = tr.geom_traits().orientation_3_object(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typedef typename Tr::Geom_traits GT; + typename GT::Orientation_3 orientation = tr.geom_traits().orientation_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); typename Cell_vector::const_iterator it = cells_tos.begin(); for( ; it != cells_tos.end() ; ++it) diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Triangulation_sizing_field.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Triangulation_sizing_field.h index 0b73eb68..46e4217f 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Triangulation_sizing_field.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Triangulation_sizing_field.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Triangulation_sizing_field.h $ -// $Id: Triangulation_sizing_field.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Triangulation_sizing_field.h $ +// $Id: include/CGAL/Mesh_3/Triangulation_sizing_field.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -43,18 +43,18 @@ template class Triangulation_sizing_field { // Types - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Gt::FT FT; + typedef typename GT::FT FT; - typedef Triangulation_vertex_base_with_info_3 Vbb; - typedef Regular_triangulation_vertex_base_3 Vb; - typedef Triangulation_cell_base_3 Cbb; + typedef Triangulation_vertex_base_with_info_3 Vbb; + typedef Regular_triangulation_vertex_base_3 Vb; + typedef Triangulation_cell_base_3 Cbb; typedef Regular_triangulation_cell_base_3< - Gt, Cbb, Discard_hidden_points> Cb; + GT, Cbb, Discard_hidden_points> Cb; typedef Triangulation_data_structure_3 Tds; - typedef Regular_triangulation_3 Compact_triangulation; + typedef Regular_triangulation_3 Compact_triangulation; typedef Compact_triangulation Ctr; typedef typename Tr::Vertex_handle Vertex_handle; @@ -73,17 +73,17 @@ class Triangulation_sizing_field Triangulation_sizing_field(const Tr& tr); /** - * Fill sizing field, using size associated to point in \c value_map. + * Fills the sizing field, using size associated to point in `value_map`. */ void fill(const std::map& value_map); /** - * Returns size at point \c p. + * Returns size at point `p`. */ FT operator()(const Weighted_point& p) const; /** - * Returns size at point \c p. (needed for compatibility) + * Returns size at point `p`. (needed for compatibility) */ template FT operator()(const Weighted_point& p, const Handle&) const @@ -91,20 +91,20 @@ class Triangulation_sizing_field private: /** - * Returns size at point \c p, by interpolation into tetrahedron. + * Returns size at point `p`, by interpolation into tetrahedron. */ FT interpolate_on_cell_vertices(const Weighted_point& p, const CCell_handle& cell) const; /** - * Returns size at point \c p, by interpolation into facet (\c cell is assumed + * Returns size at point `p`, by interpolation into facet (`cell` is assumed * to be an infinite cell). */ FT interpolate_on_facet_vertices(const Weighted_point& p, const CCell_handle& cell) const; /** - * Returns a hint for \c p location. + * Returns a hint for `p` location. */ CCell_handle get_hint(const Weighted_point& p) const { return last_cell_; } @@ -181,8 +181,8 @@ typename Triangulation_sizing_field::FT Triangulation_sizing_field:: interpolate_on_cell_vertices(const Weighted_point& p, const CCell_handle& cell) const { - typename Gt::Construct_point_3 cp = ctr_.geom_traits().construct_point_3_object(); - typename Gt::Compute_volume_3 volume = ctr_.geom_traits().compute_volume_3_object(); + typename GT::Construct_point_3 cp = ctr_.geom_traits().construct_point_3_object(); + typename GT::Compute_volume_3 volume = ctr_.geom_traits().compute_volume_3_object(); // Interpolate value using tet vertices values const FT& va = cell->vertex(0)->info(); @@ -217,8 +217,8 @@ typename Triangulation_sizing_field::FT Triangulation_sizing_field:: interpolate_on_facet_vertices(const Weighted_point& p, const CCell_handle& cell) const { - typename Gt::Construct_point_3 cp = ctr_.geom_traits().construct_point_3_object(); - typename Gt::Compute_area_3 area = ctr_.geom_traits().compute_area_3_object(); + typename GT::Construct_point_3 cp = ctr_.geom_traits().construct_point_3_object(); + typename GT::Compute_area_3 area = ctr_.geom_traits().compute_area_3_object(); // Find infinite vertex and put it in k0 int k0 = 0; diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Uniform_sizing_field.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Uniform_sizing_field.h index b47c0664..67675855 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Uniform_sizing_field.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Uniform_sizing_field.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Uniform_sizing_field.h $ -// $Id: Uniform_sizing_field.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Uniform_sizing_field.h $ +// $Id: include/CGAL/Mesh_3/Uniform_sizing_field.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,9 +27,9 @@ namespace Mesh_3 { template class Uniform_sizing_field { - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Gt::FT FT; + typedef typename GT::FT FT; public: // Vertices of mesh triangulation do not need to be updated diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/Worksharing_data_structures.h b/thirdparty/CGAL/include/CGAL/Mesh_3/Worksharing_data_structures.h index fcd2d143..63a1650b 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/Worksharing_data_structures.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/Worksharing_data_structures.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/Worksharing_data_structures.h $ -// $Id: Worksharing_data_structures.h 8fddaa6 2022-10-03T17:15:27+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/Worksharing_data_structures.h $ +// $Id: include/CGAL/Mesh_3/Worksharing_data_structures.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Clement Jamin diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/config.h b/thirdparty/CGAL/include/CGAL/Mesh_3/config.h index c194c3c3..65cbbda0 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/config.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/config.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/config.h $ -// $Id: config.h 4dda7b6 2020-05-27T15:53:05+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/config.h $ +// $Id: include/CGAL/Mesh_3/config.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau @@ -12,21 +12,20 @@ #ifndef CGAL_MESH_3_CONFIG_H #define CGAL_MESH_3_CONFIG_H 1 -#include - +#include #include //#define CGAL_MESH_3_VERBOSE 1 // Use optimisations of Mesh_3 -# define CGAL_INTRUSIVE_LIST 1 # define CGAL_CONSTRUCT_INTRUSIVE_LIST_RANGE_CONSTRUCTOR 1 # define CGAL_MESH_3_NEW_GET_FACETS 1 # define CGAL_MESH_3_GET_FACETS_USING_INTRUSIVE_LIST 1 # define CGAL_MESH_3_SIZING_FIELD_INEXACT_LOCATE 1 # define FORCE_STRUCTURAL_FILTERING 1 # define CGAL_NEW_INCIDENT_SLIVERS 1 +# define CGAL_INTRUSIVE_LIST 1 //experimental # define CGAL_FASTER_BUILD_QUEUE 1 @@ -58,4 +57,10 @@ # endif #endif +#ifdef CGAL_MESH_3_VERY_VERBOSE +# ifndef CGAL_MESH_3_OPTIMIZER_VERY_VERBOSE +# define CGAL_MESH_3_OPTIMIZER_VERY_VERBOSE 1 +# endif +#endif + #endif // CGAL_MESH_3_CONFIG_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/dihedral_angle_3.h b/thirdparty/CGAL/include/CGAL/Mesh_3/dihedral_angle_3.h index 74de818f..e7e2ffe9 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/dihedral_angle_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/dihedral_angle_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h $ -// $Id: dihedral_angle_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h $ +// $Id: include/CGAL/Mesh_3/dihedral_angle_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/AABB_filtered_projection_traits.h b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/AABB_filtered_projection_traits.h index 49a26548..98976d1c 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/AABB_filtered_projection_traits.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/AABB_filtered_projection_traits.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/experimental/AABB_filtered_projection_traits.h $ -// $Id: AABB_filtered_projection_traits.h 1af4f93 2021-10-08T16:24:51+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/experimental/AABB_filtered_projection_traits.h $ +// $Id: include/CGAL/Mesh_3/experimental/AABB_filtered_projection_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -57,25 +57,40 @@ class Filtered_projection_traits IndexToIgnoreIterator end, const AABBTraits& aabb_traits, IndexPropertyMap index_map = IndexPropertyMap()) - : m_closest_point(hint), - m_closest_point_initialized(true), - set_of_indices(begin, end), - aabb_traits(aabb_traits), - index_map(index_map) + : Filtered_projection_traits(begin, end, aabb_traits, index_map) { + m_closest_point = hint; + m_closest_point_initialized = true; } Filtered_projection_traits(const Point_3& hint, Index_type index, const AABBTraits& aabb_traits, IndexPropertyMap index_map = IndexPropertyMap()) - : m_closest_point(hint), - m_closest_point_initialized(true), - set_of_indices(), - aabb_traits(aabb_traits), - index_map(index_map) + : Filtered_projection_traits(index, aabb_traits, index_map) + { + m_closest_point = hint; + m_closest_point_initialized = true; + } + + template + Filtered_projection_traits(const Point_and_primitive_id& hint, + IndexToIgnoreIterator begin, + IndexToIgnoreIterator end, + const AABBTraits& aabb_traits, + IndexPropertyMap index_map = IndexPropertyMap()) + : Filtered_projection_traits(hint.first, begin, end, aabb_traits, index_map) + { + m_closest_primitive = hint.second; + } + + Filtered_projection_traits(const Point_and_primitive_id& hint, + Index_type index, + const AABBTraits& aabb_traits, + IndexPropertyMap index_map = IndexPropertyMap()) + : Filtered_projection_traits(hint.first, index, aabb_traits, index_map) { - set_of_indices.insert(index); + m_closest_primitive = hint.second; } template @@ -83,8 +98,7 @@ class Filtered_projection_traits IndexToIgnoreIterator end, const AABBTraits& aabb_traits, IndexPropertyMap index_map = IndexPropertyMap()) - : m_closest_point_initialized(false), - set_of_indices(begin, end), + : set_of_indices(begin, end), aabb_traits(aabb_traits), index_map(index_map) { @@ -93,12 +107,10 @@ class Filtered_projection_traits Filtered_projection_traits(Index_type index, const AABBTraits& aabb_traits, IndexPropertyMap index_map = IndexPropertyMap()) - : m_closest_point_initialized(false), - set_of_indices(), + : set_of_indices({index}), aabb_traits(aabb_traits), index_map(index_map) { - set_of_indices.insert(index); } bool go_further() const { return true; } @@ -151,7 +163,7 @@ class Filtered_projection_traits private: Point_3 m_closest_point; typename Primitive::Id m_closest_primitive; - bool m_closest_point_initialized; + bool m_closest_point_initialized = false; Set_of_indices set_of_indices; const AABBTraits& aabb_traits; IndexPropertyMap index_map; diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h index 6f947806..724c764d 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h $ -// $Id: Facet_patch_id_map.h 5835698 2021-02-10T15:42:29+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h $ +// $Id: include/CGAL/Mesh_3/experimental/Facet_patch_id_map.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ #include #include -#include +#include namespace CGAL { namespace Mesh_3 { diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Facet_topological_criterion_with_adjacency.h b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Facet_topological_criterion_with_adjacency.h index 4c8366cc..e864afdb 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Facet_topological_criterion_with_adjacency.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Facet_topological_criterion_with_adjacency.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/experimental/Facet_topological_criterion_with_adjacency.h $ -// $Id: Facet_topological_criterion_with_adjacency.h 58b10a3 2020-03-26T18:58:50+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/experimental/Facet_topological_criterion_with_adjacency.h $ +// $Id: include/CGAL/Mesh_3/experimental/Facet_topological_criterion_with_adjacency.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Get_curve_index.h b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Get_curve_index.h index f512da94..e2eb82c0 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Get_curve_index.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Get_curve_index.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/experimental/Get_curve_index.h $ -// $Id: Get_curve_index.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/experimental/Get_curve_index.h $ +// $Id: include/CGAL/Mesh_3/experimental/Get_curve_index.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -57,14 +57,12 @@ get(Get_curve_index, const typename Primitive::Id id) { }} // end namespace CGAL::Mesh_3 -#include - namespace boost { // specialization for using pointers as property maps template struct property_traits > { typedef typename std::iterator_traits::value_type ConstPair; - typedef typename boost::remove_const::type value_type; + typedef std::remove_const_t value_type; typedef value_type& reference; typedef typename Primitive::Id key_type; typedef readable_property_map_tag category; diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Get_facet_patch_id.h b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Get_facet_patch_id.h index 942e2366..63655415 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Get_facet_patch_id.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Get_facet_patch_id.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/experimental/Get_facet_patch_id.h $ -// $Id: Get_facet_patch_id.h a2abc9b 2022-02-15T15:29:56+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/experimental/Get_facet_patch_id.h $ +// $Id: include/CGAL/Mesh_3/experimental/Get_facet_patch_id.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_experimental.h b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_experimental.h index dd49357a..d3c9ce6a 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_experimental.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_experimental.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_experimental.h $ -// $Id: Lipschitz_sizing_experimental.h 2c14df7 2022-02-15T15:29:31+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_experimental.h $ +// $Id: include/CGAL/Mesh_3/experimental/Lipschitz_sizing_experimental.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_parameters.h b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_parameters.h index fed498b9..1c715ca0 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_parameters.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_parameters.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_parameters.h $ -// $Id: Lipschitz_sizing_parameters.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_parameters.h $ +// $Id: include/CGAL/Mesh_3/experimental/Lipschitz_sizing_parameters.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_polyhedron.h b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_polyhedron.h index a847a3bf..c77bf059 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_polyhedron.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_polyhedron.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_polyhedron.h $ -// $Id: Lipschitz_sizing_polyhedron.h 1faa0e2 2021-04-28T10:55:26+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/experimental/Lipschitz_sizing_polyhedron.h $ +// $Id: include/CGAL/Mesh_3/experimental/Lipschitz_sizing_polyhedron.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Sizing_field_minimum.h b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Sizing_field_minimum.h index 25eea315..82c461e8 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Sizing_field_minimum.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/experimental/Sizing_field_minimum.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/experimental/Sizing_field_minimum.h $ -// $Id: Sizing_field_minimum.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/experimental/Sizing_field_minimum.h $ +// $Id: include/CGAL/Mesh_3/experimental/Sizing_field_minimum.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,9 +22,6 @@ #include -#include -#include - namespace CGAL { template @@ -36,15 +33,15 @@ namespace CGAL typedef typename SizingField1::Index Index; BOOST_STATIC_ASSERT_MSG(( - boost::is_same::value), "FT type should be the same for both sizing fields"); BOOST_STATIC_ASSERT_MSG(( - boost::is_same::value), "Point_3 type should be the same for both sizing fields"); BOOST_STATIC_ASSERT_MSG(( - boost::is_same::value), "Index type should be the same for both sizing fields"); diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/cases_table.h b/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/cases_table.h new file mode 100644 index 00000000..407b60a0 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/cases_table.h @@ -0,0 +1,4204 @@ +// Copyright (c) 2022 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/features_detection/cases_table.h $ +// $Id: include/CGAL/Mesh_3/features_detection/cases_table.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Sebastien Loriot +// +//****************************************************************************** +// +//****************************************************************************** + +#ifndef CGAL_MESH_3_FEATURES_DETECTION_CASES_TABLES_H +#define CGAL_MESH_3_FEATURES_DETECTION_CASES_TABLES_H + +#include + +#include +#include +#include +#include +#include + +namespace CGAL +{ +namespace Mesh_3 +{ +namespace internal +{ + +using Combination = std::array; +using Hash_combination = boost::hash; + +using Cases = std::array[4140]; + +inline auto find_case(const Cases& cases, Combination comb) { + using std::begin; + using std::end; + return std::lower_bound(begin(cases), end(cases), + std::array{ + comb[0], + comb[1], + comb[2], + comb[3], + comb[4], + comb[5], + comb[6], + comb[7], + 0, + 0 + }); +}; +const Cases cases = { +{ {0,0,0,0,0,0,0,0, 0,0} }, +{ {0,0,0,0,0,0,0,1, 1,0} }, +{ {0,0,0,0,0,0,1,0, 1,1} }, +{ {0,0,0,0,0,0,1,1, 2,0} }, +{ {0,0,0,0,0,0,1,2, 3,0} }, +{ {0,0,0,0,0,1,0,0, 1,6} }, +{ {0,0,0,0,0,1,0,1, 2,18} }, +{ {0,0,0,0,0,1,0,2, 3,19} }, +{ {0,0,0,0,0,1,1,0, 4,0} }, +{ {0,0,0,0,0,1,1,1, 5,0} }, +{ {0,0,0,0,0,1,1,2, 6,0} }, +{ {0,0,0,0,0,1,2,0, 7,0} }, +{ {0,0,0,0,0,1,2,1, 8,0} }, +{ {0,0,0,0,0,1,2,2, 8,19} }, +{ {0,0,0,0,0,1,2,3, 58,0} }, +{ {0,0,0,0,1,0,0,0, 1,7} }, +{ {0,0,0,0,1,0,0,1, 4,1} }, +{ {0,0,0,0,1,0,0,2, 7,1} }, +{ {0,0,0,0,1,0,1,0, 2,15} }, +{ {0,0,0,0,1,0,1,1, 5,1} }, +{ {0,0,0,0,1,0,1,2, 8,1} }, +{ {0,0,0,0,1,0,2,0, 3,14} }, +{ {0,0,0,0,1,0,2,1, 6,1} }, +{ {0,0,0,0,1,0,2,2, 8,14} }, +{ {0,0,0,0,1,0,2,3, 58,1} }, +{ {0,0,0,0,1,1,0,0, 2,6} }, +{ {0,0,0,0,1,1,0,1, 5,18} }, +{ {0,0,0,0,1,1,0,2, 8,18} }, +{ {0,0,0,0,1,1,1,0, 5,15} }, +{ {0,0,0,0,1,1,1,1, 9,0} }, +{ {0,0,0,0,1,1,1,2, 10,0} }, +{ {0,0,0,0,1,1,2,0, 8,15} }, +{ {0,0,0,0,1,1,2,1, 10,1} }, +{ {0,0,0,0,1,1,2,2, 11,0} }, +{ {0,0,0,0,1,1,2,3, 59,0} }, +{ {0,0,0,0,1,2,0,0, 3,6} }, +{ {0,0,0,0,1,2,0,1, 6,18} }, +{ {0,0,0,0,1,2,0,2, 8,17} }, +{ {0,0,0,0,1,2,0,3, 58,18} }, +{ {0,0,0,0,1,2,1,0, 8,16} }, +{ {0,0,0,0,1,2,1,1, 10,18} }, +{ {0,0,0,0,1,2,1,2, 11,18} }, +{ {0,0,0,0,1,2,1,3, 59,19} }, +{ {0,0,0,0,1,2,2,0, 6,15} }, +{ {0,0,0,0,1,2,2,1, 12,0} }, +{ {0,0,0,0,1,2,2,2, 10,15} }, +{ {0,0,0,0,1,2,2,3, 60,0} }, +{ {0,0,0,0,1,2,3,0, 58,15} }, +{ {0,0,0,0,1,2,3,1, 60,1} }, +{ {0,0,0,0,1,2,3,2, 59,14} }, +{ {0,0,0,0,1,2,3,3, 59,17} }, +{ {0,0,0,0,1,2,3,4, 124,0} }, +{ {0,0,0,1,0,0,0,0, 1,2} }, +{ {0,0,0,1,0,0,0,1, 2,12} }, +{ {0,0,0,1,0,0,0,2, 3,13} }, +{ {0,0,0,1,0,0,1,0, 4,3} }, +{ {0,0,0,1,0,0,1,1, 5,21} }, +{ {0,0,0,1,0,0,1,2, 6,21} }, +{ {0,0,0,1,0,0,2,0, 7,21} }, +{ {0,0,0,1,0,0,2,1, 8,21} }, +{ {0,0,0,1,0,0,2,2, 8,32} }, +{ {0,0,0,1,0,0,2,3, 58,21} }, +{ {0,0,0,1,0,1,0,0, 4,13} }, +{ {0,0,0,1,0,1,0,1, 5,13} }, +{ {0,0,0,1,0,1,0,2, 6,13} }, +{ {0,0,0,1,0,1,1,0, 13,0} }, +{ {0,0,0,1,0,1,1,1, 14,0} }, +{ {0,0,0,1,0,1,1,2, 15,0} }, +{ {0,0,0,1,0,1,2,0, 16,0} }, +{ {0,0,0,1,0,1,2,1, 17,0} }, +{ {0,0,0,1,0,1,2,2, 18,0} }, +{ {0,0,0,1,0,1,2,3, 61,0} }, +{ {0,0,0,1,0,2,0,0, 7,27} }, +{ {0,0,0,1,0,2,0,1, 8,40} }, +{ {0,0,0,1,0,2,0,2, 8,13} }, +{ {0,0,0,1,0,2,0,3, 58,40} }, +{ {0,0,0,1,0,2,1,0, 16,19} }, +{ {0,0,0,1,0,2,1,1, 17,19} }, +{ {0,0,0,1,0,2,1,2, 18,19} }, +{ {0,0,0,1,0,2,1,3, 61,19} }, +{ {0,0,0,1,0,2,2,0, 16,13} }, +{ {0,0,0,1,0,2,2,1, 18,13} }, +{ {0,0,0,1,0,2,2,2, 17,13} }, +{ {0,0,0,1,0,2,2,3, 61,13} }, +{ {0,0,0,1,0,2,3,0, 62,0} }, +{ {0,0,0,1,0,2,3,1, 63,0} }, +{ {0,0,0,1,0,2,3,2, 63,21} }, +{ {0,0,0,1,0,2,3,3, 63,40} }, +{ {0,0,0,1,0,2,3,4, 125,0} }, +{ {0,0,0,1,1,0,0,0, 19,0} }, +{ {0,0,0,1,1,0,0,1, 20,0} }, +{ {0,0,0,1,1,0,0,2, 21,0} }, +{ {0,0,0,1,1,0,1,0, 20,20} }, +{ {0,0,0,1,1,0,1,1, 22,0} }, +{ {0,0,0,1,1,0,1,2, 23,0} }, +{ {0,0,0,1,1,0,2,0, 21,20} }, +{ {0,0,0,1,1,0,2,1, 23,20} }, +{ {0,0,0,1,1,0,2,2, 24,0} }, +{ {0,0,0,1,1,0,2,3, 64,0} }, +{ {0,0,0,1,1,1,0,0, 20,26} }, +{ {0,0,0,1,1,1,0,1, 22,19} }, +{ {0,0,0,1,1,1,0,2, 23,19} }, +{ {0,0,0,1,1,1,1,0, 25,0} }, +{ {0,0,0,1,1,1,1,1, 5,5} }, +{ {0,0,0,1,1,1,1,2, 26,0} }, +{ {0,0,0,1,1,1,2,0, 27,0} }, +{ {0,0,0,1,1,1,2,1, 28,0} }, +{ {0,0,0,1,1,1,2,2, 29,0} }, +{ {0,0,0,1,1,1,2,3, 65,0} }, +{ {0,0,0,1,1,2,0,0, 21,26} }, +{ {0,0,0,1,1,2,0,1, 23,41} }, +{ {0,0,0,1,1,2,0,2, 24,19} }, +{ {0,0,0,1,1,2,0,3, 64,19} }, +{ {0,0,0,1,1,2,1,0, 27,19} }, +{ {0,0,0,1,1,2,1,1, 28,19} }, +{ {0,0,0,1,1,2,1,2, 29,19} }, +{ {0,0,0,1,1,2,1,3, 65,19} }, +{ {0,0,0,1,1,2,2,0, 30,0} }, +{ {0,0,0,1,1,2,2,1, 31,0} }, +{ {0,0,0,1,1,2,2,2, 32,0} }, +{ {0,0,0,1,1,2,2,3, 66,0} }, +{ {0,0,0,1,1,2,3,0, 67,0} }, +{ {0,0,0,1,1,2,3,1, 68,0} }, +{ {0,0,0,1,1,2,3,2, 69,0} }, +{ {0,0,0,1,1,2,3,3, 69,19} }, +{ {0,0,0,1,1,2,3,4, 126,0} }, +{ {0,0,0,1,2,0,0,0, 33,0} }, +{ {0,0,0,1,2,0,0,1, 34,0} }, +{ {0,0,0,1,2,0,0,2, 35,0} }, +{ {0,0,0,1,2,0,0,3, 70,0} }, +{ {0,0,0,1,2,0,1,0, 35,20} }, +{ {0,0,0,1,2,0,1,1, 28,39} }, +{ {0,0,0,1,2,0,1,2, 36,0} }, +{ {0,0,0,1,2,0,1,3, 71,0} }, +{ {0,0,0,1,2,0,2,0, 34,20} }, +{ {0,0,0,1,2,0,2,1, 37,0} }, +{ {0,0,0,1,2,0,2,2, 28,29} }, +{ {0,0,0,1,2,0,2,3, 72,0} }, +{ {0,0,0,1,2,0,3,0, 70,20} }, +{ {0,0,0,1,2,0,3,1, 72,20} }, +{ {0,0,0,1,2,0,3,2, 71,20} }, +{ {0,0,0,1,2,0,3,3, 73,0} }, +{ {0,0,0,1,2,0,3,4, 127,0} }, +{ {0,0,0,1,2,1,0,0, 35,26} }, +{ {0,0,0,1,2,1,0,1, 28,22} }, +{ {0,0,0,1,2,1,0,2, 36,19} }, +{ {0,0,0,1,2,1,0,3, 71,19} }, +{ {0,0,0,1,2,1,1,0, 38,0} }, +{ {0,0,0,1,2,1,1,1, 17,22} }, +{ {0,0,0,1,2,1,1,2, 39,0} }, +{ {0,0,0,1,2,1,1,3, 74,0} }, +{ {0,0,0,1,2,1,2,0, 40,0} }, +{ {0,0,0,1,2,1,2,1, 41,0} }, +{ {0,0,0,1,2,1,2,2, 42,0} }, +{ {0,0,0,1,2,1,2,3, 75,0} }, +{ {0,0,0,1,2,1,3,0, 76,0} }, +{ {0,0,0,1,2,1,3,1, 77,0} }, +{ {0,0,0,1,2,1,3,2, 78,0} }, +{ {0,0,0,1,2,1,3,3, 79,0} }, +{ {0,0,0,1,2,1,3,4, 128,0} }, +{ {0,0,0,1,2,2,0,0, 34,26} }, +{ {0,0,0,1,2,2,0,1, 37,19} }, +{ {0,0,0,1,2,2,0,2, 28,10} }, +{ {0,0,0,1,2,2,0,3, 72,19} }, +{ {0,0,0,1,2,2,1,0, 40,19} }, +{ {0,0,0,1,2,2,1,1, 41,19} }, +{ {0,0,0,1,2,2,1,2, 42,19} }, +{ {0,0,0,1,2,2,1,3, 75,19} }, +{ {0,0,0,1,2,2,2,0, 26,11} }, +{ {0,0,0,1,2,2,2,1, 43,0} }, +{ {0,0,0,1,2,2,2,2, 10,11} }, +{ {0,0,0,1,2,2,2,3, 80,0} }, +{ {0,0,0,1,2,2,3,0, 81,0} }, +{ {0,0,0,1,2,2,3,1, 82,0} }, +{ {0,0,0,1,2,2,3,2, 83,0} }, +{ {0,0,0,1,2,2,3,3, 84,0} }, +{ {0,0,0,1,2,2,3,4, 129,0} }, +{ {0,0,0,1,2,3,0,0, 70,26} }, +{ {0,0,0,1,2,3,0,1, 72,41} }, +{ {0,0,0,1,2,3,0,2, 71,41} }, +{ {0,0,0,1,2,3,0,3, 73,19} }, +{ {0,0,0,1,2,3,0,4, 127,19} }, +{ {0,0,0,1,2,3,1,0, 76,19} }, +{ {0,0,0,1,2,3,1,1, 77,19} }, +{ {0,0,0,1,2,3,1,2, 78,19} }, +{ {0,0,0,1,2,3,1,3, 79,19} }, +{ {0,0,0,1,2,3,1,4, 128,19} }, +{ {0,0,0,1,2,3,2,0, 81,19} }, +{ {0,0,0,1,2,3,2,1, 82,19} }, +{ {0,0,0,1,2,3,2,2, 83,19} }, +{ {0,0,0,1,2,3,2,3, 84,19} }, +{ {0,0,0,1,2,3,2,4, 129,19} }, +{ {0,0,0,1,2,3,3,0, 85,0} }, +{ {0,0,0,1,2,3,3,1, 86,0} }, +{ {0,0,0,1,2,3,3,2, 87,0} }, +{ {0,0,0,1,2,3,3,3, 88,0} }, +{ {0,0,0,1,2,3,3,4, 130,0} }, +{ {0,0,0,1,2,3,4,0, 131,0} }, +{ {0,0,0,1,2,3,4,1, 132,0} }, +{ {0,0,0,1,2,3,4,2, 133,0} }, +{ {0,0,0,1,2,3,4,3, 134,0} }, +{ {0,0,0,1,2,3,4,4, 134,19} }, +{ {0,0,0,1,2,3,4,5, 167,0} }, +{ {0,0,1,0,0,0,0,0, 1,3} }, +{ {0,0,1,0,0,0,0,1, 4,2} }, +{ {0,0,1,0,0,0,0,2, 7,20} }, +{ {0,0,1,0,0,0,1,0, 2,9} }, +{ {0,0,1,0,0,0,1,1, 5,20} }, +{ {0,0,1,0,0,0,1,2, 8,20} }, +{ {0,0,1,0,0,0,2,0, 3,8} }, +{ {0,0,1,0,0,0,2,1, 6,20} }, +{ {0,0,1,0,0,0,2,2, 8,43} }, +{ {0,0,1,0,0,0,2,3, 58,20} }, +{ {0,0,1,0,0,1,0,0, 19,1} }, +{ {0,0,1,0,0,1,0,1, 20,21} }, +{ {0,0,1,0,0,1,0,2, 21,21} }, +{ {0,0,1,0,0,1,1,0, 20,1} }, +{ {0,0,1,0,0,1,1,1, 22,1} }, +{ {0,0,1,0,0,1,1,2, 23,21} }, +{ {0,0,1,0,0,1,2,0, 21,1} }, +{ {0,0,1,0,0,1,2,1, 23,1} }, +{ {0,0,1,0,0,1,2,2, 24,1} }, +{ {0,0,1,0,0,1,2,3, 64,21} }, +{ {0,0,1,0,0,2,0,0, 33,1} }, +{ {0,0,1,0,0,2,0,1, 35,21} }, +{ {0,0,1,0,0,2,0,2, 34,21} }, +{ {0,0,1,0,0,2,0,3, 70,21} }, +{ {0,0,1,0,0,2,1,0, 34,1} }, +{ {0,0,1,0,0,2,1,1, 28,44} }, +{ {0,0,1,0,0,2,1,2, 37,1} }, +{ {0,0,1,0,0,2,1,3, 72,21} }, +{ {0,0,1,0,0,2,2,0, 35,1} }, +{ {0,0,1,0,0,2,2,1, 36,1} }, +{ {0,0,1,0,0,2,2,2, 28,30} }, +{ {0,0,1,0,0,2,2,3, 71,21} }, +{ {0,0,1,0,0,2,3,0, 70,1} }, +{ {0,0,1,0,0,2,3,1, 71,1} }, +{ {0,0,1,0,0,2,3,2, 72,1} }, +{ {0,0,1,0,0,2,3,3, 73,1} }, +{ {0,0,1,0,0,2,3,4, 127,21} }, +{ {0,0,1,0,1,0,0,0, 4,8} }, +{ {0,0,1,0,1,0,0,1, 13,1} }, +{ {0,0,1,0,1,0,0,2, 16,1} }, +{ {0,0,1,0,1,0,1,0, 5,8} }, +{ {0,0,1,0,1,0,1,1, 14,1} }, +{ {0,0,1,0,1,0,1,2, 17,1} }, +{ {0,0,1,0,1,0,2,0, 6,8} }, +{ {0,0,1,0,1,0,2,1, 15,1} }, +{ {0,0,1,0,1,0,2,2, 18,1} }, +{ {0,0,1,0,1,0,2,3, 61,1} }, +{ {0,0,1,0,1,1,0,0, 20,23} }, +{ {0,0,1,0,1,1,0,1, 25,1} }, +{ {0,0,1,0,1,1,0,2, 27,1} }, +{ {0,0,1,0,1,1,1,0, 22,14} }, +{ {0,0,1,0,1,1,1,1, 5,4} }, +{ {0,0,1,0,1,1,1,2, 28,1} }, +{ {0,0,1,0,1,1,2,0, 23,14} }, +{ {0,0,1,0,1,1,2,1, 26,1} }, +{ {0,0,1,0,1,1,2,2, 29,1} }, +{ {0,0,1,0,1,1,2,3, 65,1} }, +{ {0,0,1,0,1,2,0,0, 35,23} }, +{ {0,0,1,0,1,2,0,1, 38,1} }, +{ {0,0,1,0,1,2,0,2, 40,1} }, +{ {0,0,1,0,1,2,0,3, 76,1} }, +{ {0,0,1,0,1,2,1,0, 28,27} }, +{ {0,0,1,0,1,2,1,1, 17,27} }, +{ {0,0,1,0,1,2,1,2, 41,1} }, +{ {0,0,1,0,1,2,1,3, 77,1} }, +{ {0,0,1,0,1,2,2,0, 36,14} }, +{ {0,0,1,0,1,2,2,1, 39,1} }, +{ {0,0,1,0,1,2,2,2, 42,1} }, +{ {0,0,1,0,1,2,2,3, 78,1} }, +{ {0,0,1,0,1,2,3,0, 71,14} }, +{ {0,0,1,0,1,2,3,1, 74,1} }, +{ {0,0,1,0,1,2,3,2, 75,1} }, +{ {0,0,1,0,1,2,3,3, 79,1} }, +{ {0,0,1,0,1,2,3,4, 128,1} }, +{ {0,0,1,0,2,0,0,0, 7,22} }, +{ {0,0,1,0,2,0,0,1, 16,14} }, +{ {0,0,1,0,2,0,0,2, 16,8} }, +{ {0,0,1,0,2,0,0,3, 62,1} }, +{ {0,0,1,0,2,0,1,0, 8,35} }, +{ {0,0,1,0,2,0,1,1, 17,14} }, +{ {0,0,1,0,2,0,1,2, 18,8} }, +{ {0,0,1,0,2,0,1,3, 63,1} }, +{ {0,0,1,0,2,0,2,0, 8,8} }, +{ {0,0,1,0,2,0,2,1, 18,14} }, +{ {0,0,1,0,2,0,2,2, 17,8} }, +{ {0,0,1,0,2,0,2,3, 63,20} }, +{ {0,0,1,0,2,0,3,0, 58,35} }, +{ {0,0,1,0,2,0,3,1, 61,14} }, +{ {0,0,1,0,2,0,3,2, 61,8} }, +{ {0,0,1,0,2,0,3,3, 63,35} }, +{ {0,0,1,0,2,0,3,4, 125,1} }, +{ {0,0,1,0,2,1,0,0, 21,23} }, +{ {0,0,1,0,2,1,0,1, 27,14} }, +{ {0,0,1,0,2,1,0,2, 30,1} }, +{ {0,0,1,0,2,1,0,3, 67,1} }, +{ {0,0,1,0,2,1,1,0, 23,34} }, +{ {0,0,1,0,2,1,1,1, 28,14} }, +{ {0,0,1,0,2,1,1,2, 31,1} }, +{ {0,0,1,0,2,1,1,3, 68,1} }, +{ {0,0,1,0,2,1,2,0, 24,14} }, +{ {0,0,1,0,2,1,2,1, 29,14} }, +{ {0,0,1,0,2,1,2,2, 32,1} }, +{ {0,0,1,0,2,1,2,3, 69,1} }, +{ {0,0,1,0,2,1,3,0, 64,14} }, +{ {0,0,1,0,2,1,3,1, 65,14} }, +{ {0,0,1,0,2,1,3,2, 66,1} }, +{ {0,0,1,0,2,1,3,3, 69,14} }, +{ {0,0,1,0,2,1,3,4, 126,1} }, +{ {0,0,1,0,2,2,0,0, 34,23} }, +{ {0,0,1,0,2,2,0,1, 40,14} }, +{ {0,0,1,0,2,2,0,2, 26,10} }, +{ {0,0,1,0,2,2,0,3, 81,1} }, +{ {0,0,1,0,2,2,1,0, 37,14} }, +{ {0,0,1,0,2,2,1,1, 41,14} }, +{ {0,0,1,0,2,2,1,2, 43,1} }, +{ {0,0,1,0,2,2,1,3, 82,1} }, +{ {0,0,1,0,2,2,2,0, 28,11} }, +{ {0,0,1,0,2,2,2,1, 42,14} }, +{ {0,0,1,0,2,2,2,2, 10,10} }, +{ {0,0,1,0,2,2,2,3, 83,1} }, +{ {0,0,1,0,2,2,3,0, 72,14} }, +{ {0,0,1,0,2,2,3,1, 75,14} }, +{ {0,0,1,0,2,2,3,2, 80,1} }, +{ {0,0,1,0,2,2,3,3, 84,1} }, +{ {0,0,1,0,2,2,3,4, 129,1} }, +{ {0,0,1,0,2,3,0,0, 70,23} }, +{ {0,0,1,0,2,3,0,1, 76,14} }, +{ {0,0,1,0,2,3,0,2, 85,1} }, +{ {0,0,1,0,2,3,0,3, 81,14} }, +{ {0,0,1,0,2,3,0,4, 131,1} }, +{ {0,0,1,0,2,3,1,0, 72,34} }, +{ {0,0,1,0,2,3,1,1, 77,44} }, +{ {0,0,1,0,2,3,1,2, 86,1} }, +{ {0,0,1,0,2,3,1,3, 82,14} }, +{ {0,0,1,0,2,3,1,4, 132,1} }, +{ {0,0,1,0,2,3,2,0, 73,14} }, +{ {0,0,1,0,2,3,2,1, 79,14} }, +{ {0,0,1,0,2,3,2,2, 88,1} }, +{ {0,0,1,0,2,3,2,3, 84,14} }, +{ {0,0,1,0,2,3,2,4, 134,1} }, +{ {0,0,1,0,2,3,3,0, 71,34} }, +{ {0,0,1,0,2,3,3,1, 78,14} }, +{ {0,0,1,0,2,3,3,2, 87,1} }, +{ {0,0,1,0,2,3,3,3, 83,14} }, +{ {0,0,1,0,2,3,3,4, 133,1} }, +{ {0,0,1,0,2,3,4,0, 127,14} }, +{ {0,0,1,0,2,3,4,1, 128,14} }, +{ {0,0,1,0,2,3,4,2, 130,1} }, +{ {0,0,1,0,2,3,4,3, 129,14} }, +{ {0,0,1,0,2,3,4,4, 134,14} }, +{ {0,0,1,0,2,3,4,5, 167,1} }, +{ {0,0,1,1,0,0,0,0, 2,2} }, +{ {0,0,1,1,0,0,0,1, 5,2} }, +{ {0,0,1,1,0,0,0,2, 8,33} }, +{ {0,0,1,1,0,0,1,0, 5,3} }, +{ {0,0,1,1,0,0,1,1, 9,2} }, +{ {0,0,1,1,0,0,1,2, 10,21} }, +{ {0,0,1,1,0,0,2,0, 8,42} }, +{ {0,0,1,1,0,0,2,1, 10,20} }, +{ {0,0,1,1,0,0,2,2, 11,20} }, +{ {0,0,1,1,0,0,2,3, 59,21} }, +{ {0,0,1,1,0,1,0,0, 20,12} }, +{ {0,0,1,1,0,1,0,1, 22,12} }, +{ {0,0,1,1,0,1,0,2, 23,32} }, +{ {0,0,1,1,0,1,1,0, 25,21} }, +{ {0,0,1,1,0,1,1,1, 5,24} }, +{ {0,0,1,1,0,1,1,2, 26,21} }, +{ {0,0,1,1,0,1,2,0, 27,21} }, +{ {0,0,1,1,0,1,2,1, 28,21} }, +{ {0,0,1,1,0,1,2,2, 29,21} }, +{ {0,0,1,1,0,1,2,3, 65,21} }, +{ {0,0,1,1,0,2,0,0, 34,12} }, +{ {0,0,1,1,0,2,0,1, 28,7} }, +{ {0,0,1,1,0,2,0,2, 37,12} }, +{ {0,0,1,1,0,2,0,3, 72,32} }, +{ {0,0,1,1,0,2,1,0, 26,6} }, +{ {0,0,1,1,0,2,1,1, 10,6} }, +{ {0,0,1,1,0,2,1,2, 43,21} }, +{ {0,0,1,1,0,2,1,3, 80,21} }, +{ {0,0,1,1,0,2,2,0, 40,32} }, +{ {0,0,1,1,0,2,2,1, 42,32} }, +{ {0,0,1,1,0,2,2,2, 41,32} }, +{ {0,0,1,1,0,2,2,3, 75,32} }, +{ {0,0,1,1,0,2,3,0, 81,21} }, +{ {0,0,1,1,0,2,3,1, 83,21} }, +{ {0,0,1,1,0,2,3,2, 82,21} }, +{ {0,0,1,1,0,2,3,3, 84,21} }, +{ {0,0,1,1,0,2,3,4, 129,21} }, +{ {0,0,1,1,1,0,0,0, 20,9} }, +{ {0,0,1,1,1,0,0,1, 25,20} }, +{ {0,0,1,1,1,0,0,2, 27,20} }, +{ {0,0,1,1,1,0,1,0, 22,9} }, +{ {0,0,1,1,1,0,1,1, 5,25} }, +{ {0,0,1,1,1,0,1,2, 28,20} }, +{ {0,0,1,1,1,0,2,0, 23,43} }, +{ {0,0,1,1,1,0,2,1, 26,20} }, +{ {0,0,1,1,1,0,2,2, 29,20} }, +{ {0,0,1,1,1,0,2,3, 65,20} }, +{ {0,0,1,1,1,1,0,0, 44,0} }, +{ {0,0,1,1,1,1,0,1, 20,22} }, +{ {0,0,1,1,1,1,0,2, 45,0} }, +{ {0,0,1,1,1,1,1,0, 20,27} }, +{ {0,0,1,1,1,1,1,1, 2,4} }, +{ {0,0,1,1,1,1,1,2, 34,27} }, +{ {0,0,1,1,1,1,2,0, 45,1} }, +{ {0,0,1,1,1,1,2,1, 34,22} }, +{ {0,0,1,1,1,1,2,2, 46,0} }, +{ {0,0,1,1,1,1,2,3, 89,0} }, +{ {0,0,1,1,1,2,0,0, 45,6} }, +{ {0,0,1,1,1,2,0,1, 27,7} }, +{ {0,0,1,1,1,2,0,2, 47,0} }, +{ {0,0,1,1,1,2,0,3, 90,0} }, +{ {0,0,1,1,1,2,1,0, 23,45} }, +{ {0,0,1,1,1,2,1,1, 8,44} }, +{ {0,0,1,1,1,2,1,2, 37,27} }, +{ {0,0,1,1,1,2,1,3, 72,45} }, +{ {0,0,1,1,1,2,2,0, 48,0} }, +{ {0,0,1,1,1,2,2,1, 40,38} }, +{ {0,0,1,1,1,2,2,2, 29,5} }, +{ {0,0,1,1,1,2,2,3, 91,0} }, +{ {0,0,1,1,1,2,3,0, 92,0} }, +{ {0,0,1,1,1,2,3,1, 81,7} }, +{ {0,0,1,1,1,2,3,2, 93,0} }, +{ {0,0,1,1,1,2,3,3, 94,0} }, +{ {0,0,1,1,1,2,3,4, 135,0} }, +{ {0,0,1,1,2,0,0,0, 34,9} }, +{ {0,0,1,1,2,0,0,1, 26,7} }, +{ {0,0,1,1,2,0,0,2, 40,43} }, +{ {0,0,1,1,2,0,0,3, 81,20} }, +{ {0,0,1,1,2,0,1,0, 28,6} }, +{ {0,0,1,1,2,0,1,1, 10,7} }, +{ {0,0,1,1,2,0,1,2, 42,43} }, +{ {0,0,1,1,2,0,1,3, 83,20} }, +{ {0,0,1,1,2,0,2,0, 37,9} }, +{ {0,0,1,1,2,0,2,1, 43,20} }, +{ {0,0,1,1,2,0,2,2, 41,43} }, +{ {0,0,1,1,2,0,2,3, 82,20} }, +{ {0,0,1,1,2,0,3,0, 72,43} }, +{ {0,0,1,1,2,0,3,1, 80,20} }, +{ {0,0,1,1,2,0,3,2, 75,43} }, +{ {0,0,1,1,2,0,3,3, 84,20} }, +{ {0,0,1,1,2,0,3,4, 129,20} }, +{ {0,0,1,1,2,1,0,0, 45,7} }, +{ {0,0,1,1,2,1,0,1, 23,38} }, +{ {0,0,1,1,2,1,0,2, 48,1} }, +{ {0,0,1,1,2,1,0,3, 92,1} }, +{ {0,0,1,1,2,1,1,0, 27,6} }, +{ {0,0,1,1,2,1,1,1, 8,39} }, +{ {0,0,1,1,2,1,1,2, 40,45} }, +{ {0,0,1,1,2,1,1,3, 81,6} }, +{ {0,0,1,1,2,1,2,0, 47,1} }, +{ {0,0,1,1,2,1,2,1, 37,22} }, +{ {0,0,1,1,2,1,2,2, 29,4} }, +{ {0,0,1,1,2,1,2,3, 93,1} }, +{ {0,0,1,1,2,1,3,0, 90,1} }, +{ {0,0,1,1,2,1,3,1, 72,38} }, +{ {0,0,1,1,2,1,3,2, 91,1} }, +{ {0,0,1,1,2,1,3,3, 94,1} }, +{ {0,0,1,1,2,1,3,4, 135,1} }, +{ {0,0,1,1,2,2,0,0, 46,6} }, +{ {0,0,1,1,2,2,0,1, 29,7} }, +{ {0,0,1,1,2,2,0,2, 29,10} }, +{ {0,0,1,1,2,2,0,3, 94,17} }, +{ {0,0,1,1,2,2,1,0, 29,6} }, +{ {0,0,1,1,2,2,1,1, 11,6} }, +{ {0,0,1,1,2,2,1,2, 41,45} }, +{ {0,0,1,1,2,2,1,3, 84,6} }, +{ {0,0,1,1,2,2,2,0, 29,11} }, +{ {0,0,1,1,2,2,2,1, 41,38} }, +{ {0,0,1,1,2,2,2,2, 11,10} }, +{ {0,0,1,1,2,2,2,3, 84,11} }, +{ {0,0,1,1,2,2,3,0, 94,16} }, +{ {0,0,1,1,2,2,3,1, 84,7} }, +{ {0,0,1,1,2,2,3,2, 84,10} }, +{ {0,0,1,1,2,2,3,3, 95,0} }, +{ {0,0,1,1,2,2,3,4, 136,0} }, +{ {0,0,1,1,2,3,0,0, 89,6} }, +{ {0,0,1,1,2,3,0,1, 65,7} }, +{ {0,0,1,1,2,3,0,2, 91,17} }, +{ {0,0,1,1,2,3,0,3, 93,17} }, +{ {0,0,1,1,2,3,0,4, 135,17} }, +{ {0,0,1,1,2,3,1,0, 65,6} }, +{ {0,0,1,1,2,3,1,1, 59,6} }, +{ {0,0,1,1,2,3,1,2, 75,45} }, +{ {0,0,1,1,2,3,1,3, 82,6} }, +{ {0,0,1,1,2,3,1,4, 129,6} }, +{ {0,0,1,1,2,3,2,0, 93,16} }, +{ {0,0,1,1,2,3,2,1, 82,7} }, +{ {0,0,1,1,2,3,2,2, 84,4} }, +{ {0,0,1,1,2,3,2,3, 96,0} }, +{ {0,0,1,1,2,3,2,4, 137,0} }, +{ {0,0,1,1,2,3,3,0, 91,16} }, +{ {0,0,1,1,2,3,3,1, 75,38} }, +{ {0,0,1,1,2,3,3,2, 97,0} }, +{ {0,0,1,1,2,3,3,3, 84,5} }, +{ {0,0,1,1,2,3,3,4, 138,0} }, +{ {0,0,1,1,2,3,4,0, 135,16} }, +{ {0,0,1,1,2,3,4,1, 129,7} }, +{ {0,0,1,1,2,3,4,2, 138,1} }, +{ {0,0,1,1,2,3,4,3, 137,1} }, +{ {0,0,1,1,2,3,4,4, 136,17} }, +{ {0,0,1,1,2,3,4,5, 168,0} }, +{ {0,0,1,2,0,0,0,0, 3,2} }, +{ {0,0,1,2,0,0,0,1, 6,2} }, +{ {0,0,1,2,0,0,0,2, 8,2} }, +{ {0,0,1,2,0,0,0,3, 58,33} }, +{ {0,0,1,2,0,0,1,0, 8,3} }, +{ {0,0,1,2,0,0,1,1, 10,2} }, +{ {0,0,1,2,0,0,1,2, 11,33} }, +{ {0,0,1,2,0,0,1,3, 59,32} }, +{ {0,0,1,2,0,0,2,0, 6,3} }, +{ {0,0,1,2,0,0,2,1, 12,3} }, +{ {0,0,1,2,0,0,2,2, 10,3} }, +{ {0,0,1,2,0,0,2,3, 60,21} }, +{ {0,0,1,2,0,0,3,0, 58,42} }, +{ {0,0,1,2,0,0,3,1, 60,20} }, +{ {0,0,1,2,0,0,3,2, 59,43} }, +{ {0,0,1,2,0,0,3,3, 59,2} }, +{ {0,0,1,2,0,0,3,4, 124,21} }, +{ {0,0,1,2,0,1,0,0, 21,12} }, +{ {0,0,1,2,0,1,0,1, 23,12} }, +{ {0,0,1,2,0,1,0,2, 24,12} }, +{ {0,0,1,2,0,1,0,3, 64,32} }, +{ {0,0,1,2,0,1,1,0, 27,32} }, +{ {0,0,1,2,0,1,1,1, 28,32} }, +{ {0,0,1,2,0,1,1,2, 29,32} }, +{ {0,0,1,2,0,1,1,3, 65,32} }, +{ {0,0,1,2,0,1,2,0, 30,21} }, +{ {0,0,1,2,0,1,2,1, 31,21} }, +{ {0,0,1,2,0,1,2,2, 32,21} }, +{ {0,0,1,2,0,1,2,3, 66,21} }, +{ {0,0,1,2,0,1,3,0, 67,21} }, +{ {0,0,1,2,0,1,3,1, 68,21} }, +{ {0,0,1,2,0,1,3,2, 69,21} }, +{ {0,0,1,2,0,1,3,3, 69,32} }, +{ {0,0,1,2,0,1,3,4, 126,21} }, +{ {0,0,1,2,0,2,0,0, 35,12} }, +{ {0,0,1,2,0,2,0,1, 36,12} }, +{ {0,0,1,2,0,2,0,2, 28,37} }, +{ {0,0,1,2,0,2,0,3, 71,32} }, +{ {0,0,1,2,0,2,1,0, 40,21} }, +{ {0,0,1,2,0,2,1,1, 42,21} }, +{ {0,0,1,2,0,2,1,2, 41,21} }, +{ {0,0,1,2,0,2,1,3, 75,21} }, +{ {0,0,1,2,0,2,2,0, 38,21} }, +{ {0,0,1,2,0,2,2,1, 39,21} }, +{ {0,0,1,2,0,2,2,2, 17,30} }, +{ {0,0,1,2,0,2,2,3, 74,21} }, +{ {0,0,1,2,0,2,3,0, 76,21} }, +{ {0,0,1,2,0,2,3,1, 78,21} }, +{ {0,0,1,2,0,2,3,2, 77,21} }, +{ {0,0,1,2,0,2,3,3, 79,21} }, +{ {0,0,1,2,0,2,3,4, 128,21} }, +{ {0,0,1,2,0,3,0,0, 70,12} }, +{ {0,0,1,2,0,3,0,1, 71,12} }, +{ {0,0,1,2,0,3,0,2, 73,12} }, +{ {0,0,1,2,0,3,0,3, 72,12} }, +{ {0,0,1,2,0,3,0,4, 127,32} }, +{ {0,0,1,2,0,3,1,0, 81,32} }, +{ {0,0,1,2,0,3,1,1, 83,44} }, +{ {0,0,1,2,0,3,1,2, 84,32} }, +{ {0,0,1,2,0,3,1,3, 82,32} }, +{ {0,0,1,2,0,3,1,4, 129,32} }, +{ {0,0,1,2,0,3,2,0, 85,21} }, +{ {0,0,1,2,0,3,2,1, 87,21} }, +{ {0,0,1,2,0,3,2,2, 88,24} }, +{ {0,0,1,2,0,3,2,3, 86,21} }, +{ {0,0,1,2,0,3,2,4, 130,21} }, +{ {0,0,1,2,0,3,3,0, 76,32} }, +{ {0,0,1,2,0,3,3,1, 78,32} }, +{ {0,0,1,2,0,3,3,2, 79,32} }, +{ {0,0,1,2,0,3,3,3, 77,32} }, +{ {0,0,1,2,0,3,3,4, 128,32} }, +{ {0,0,1,2,0,3,4,0, 131,21} }, +{ {0,0,1,2,0,3,4,1, 133,21} }, +{ {0,0,1,2,0,3,4,2, 134,21} }, +{ {0,0,1,2,0,3,4,3, 132,21} }, +{ {0,0,1,2,0,3,4,4, 134,32} }, +{ {0,0,1,2,0,3,4,5, 167,21} }, +{ {0,0,1,2,1,0,0,0, 35,9} }, +{ {0,0,1,2,1,0,0,1, 38,20} }, +{ {0,0,1,2,1,0,0,2, 40,20} }, +{ {0,0,1,2,1,0,0,3, 76,20} }, +{ {0,0,1,2,1,0,1,0, 28,46} }, +{ {0,0,1,2,1,0,1,1, 17,29} }, +{ {0,0,1,2,1,0,1,2, 41,20} }, +{ {0,0,1,2,1,0,1,3, 77,20} }, +{ {0,0,1,2,1,0,2,0, 36,43} }, +{ {0,0,1,2,1,0,2,1, 39,20} }, +{ {0,0,1,2,1,0,2,2, 42,20} }, +{ {0,0,1,2,1,0,2,3, 78,20} }, +{ {0,0,1,2,1,0,3,0, 71,43} }, +{ {0,0,1,2,1,0,3,1, 74,20} }, +{ {0,0,1,2,1,0,3,2, 75,20} }, +{ {0,0,1,2,1,0,3,3, 79,20} }, +{ {0,0,1,2,1,0,3,4, 128,20} }, +{ {0,0,1,2,1,1,0,0, 45,2} }, +{ {0,0,1,2,1,1,0,1, 27,10} }, +{ {0,0,1,2,1,1,0,2, 47,21} }, +{ {0,0,1,2,1,1,0,3, 90,21} }, +{ {0,0,1,2,1,1,1,0, 23,28} }, +{ {0,0,1,2,1,1,1,1, 8,29} }, +{ {0,0,1,2,1,1,1,2, 37,46} }, +{ {0,0,1,2,1,1,1,3, 72,28} }, +{ {0,0,1,2,1,1,2,0, 48,21} }, +{ {0,0,1,2,1,1,2,1, 40,31} }, +{ {0,0,1,2,1,1,2,2, 29,24} }, +{ {0,0,1,2,1,1,2,3, 91,21} }, +{ {0,0,1,2,1,1,3,0, 92,21} }, +{ {0,0,1,2,1,1,3,1, 81,10} }, +{ {0,0,1,2,1,1,3,2, 93,21} }, +{ {0,0,1,2,1,1,3,3, 94,21} }, +{ {0,0,1,2,1,1,3,4, 135,21} }, +{ {0,0,1,2,1,2,0,0, 49,0} }, +{ {0,0,1,2,1,2,0,1, 50,0} }, +{ {0,0,1,2,1,2,0,2, 31,22} }, +{ {0,0,1,2,1,2,0,3, 98,0} }, +{ {0,0,1,2,1,2,1,0, 31,27} }, +{ {0,0,1,2,1,2,1,1, 18,4} }, +{ {0,0,1,2,1,2,1,2, 43,27} }, +{ {0,0,1,2,1,2,1,3, 86,27} }, +{ {0,0,1,2,1,2,2,0, 50,1} }, +{ {0,0,1,2,1,2,2,1, 51,0} }, +{ {0,0,1,2,1,2,2,2, 18,5} }, +{ {0,0,1,2,1,2,2,3, 99,0} }, +{ {0,0,1,2,1,2,3,0, 98,1} }, +{ {0,0,1,2,1,2,3,1, 99,1} }, +{ {0,0,1,2,1,2,3,2, 86,22} }, +{ {0,0,1,2,1,2,3,3, 100,0} }, +{ {0,0,1,2,1,2,3,4, 139,0} }, +{ {0,0,1,2,1,3,0,0, 101,0} }, +{ {0,0,1,2,1,3,0,1, 102,0} }, +{ {0,0,1,2,1,3,0,2, 103,0} }, +{ {0,0,1,2,1,3,0,3, 103,21} }, +{ {0,0,1,2,1,3,0,4, 140,0} }, +{ {0,0,1,2,1,3,1,0, 68,27} }, +{ {0,0,1,2,1,3,1,1, 63,27} }, +{ {0,0,1,2,1,3,1,2, 82,27} }, +{ {0,0,1,2,1,3,1,3, 82,46} }, +{ {0,0,1,2,1,3,1,4, 132,27} }, +{ {0,0,1,2,1,3,2,0, 104,0} }, +{ {0,0,1,2,1,3,2,1, 105,0} }, +{ {0,0,1,2,1,3,2,2, 79,24} }, +{ {0,0,1,2,1,3,2,3, 106,0} }, +{ {0,0,1,2,1,3,2,4, 141,0} }, +{ {0,0,1,2,1,3,3,0, 104,21} }, +{ {0,0,1,2,1,3,3,1, 105,21} }, +{ {0,0,1,2,1,3,3,2, 106,21} }, +{ {0,0,1,2,1,3,3,3, 79,5} }, +{ {0,0,1,2,1,3,3,4, 141,21} }, +{ {0,0,1,2,1,3,4,0, 142,0} }, +{ {0,0,1,2,1,3,4,1, 143,0} }, +{ {0,0,1,2,1,3,4,2, 144,0} }, +{ {0,0,1,2,1,3,4,3, 144,21} }, +{ {0,0,1,2,1,3,4,4, 145,0} }, +{ {0,0,1,2,1,3,4,5, 169,0} }, +{ {0,0,1,2,2,0,0,0, 21,9} }, +{ {0,0,1,2,2,0,0,1, 30,20} }, +{ {0,0,1,2,2,0,0,2, 27,43} }, +{ {0,0,1,2,2,0,0,3, 67,20} }, +{ {0,0,1,2,2,0,1,0, 24,9} }, +{ {0,0,1,2,2,0,1,1, 32,20} }, +{ {0,0,1,2,2,0,1,2, 29,43} }, +{ {0,0,1,2,2,0,1,3, 69,20} }, +{ {0,0,1,2,2,0,2,0, 23,9} }, +{ {0,0,1,2,2,0,2,1, 31,20} }, +{ {0,0,1,2,2,0,2,2, 28,43} }, +{ {0,0,1,2,2,0,2,3, 68,20} }, +{ {0,0,1,2,2,0,3,0, 64,43} }, +{ {0,0,1,2,2,0,3,1, 66,20} }, +{ {0,0,1,2,2,0,3,2, 65,43} }, +{ {0,0,1,2,2,0,3,3, 69,43} }, +{ {0,0,1,2,2,0,3,4, 126,20} }, +{ {0,0,1,2,2,1,0,0, 52,0} }, +{ {0,0,1,2,2,1,0,1, 53,0} }, +{ {0,0,1,2,2,1,0,2, 53,21} }, +{ {0,0,1,2,2,1,0,3, 107,0} }, +{ {0,0,1,2,2,1,1,0, 53,20} }, +{ {0,0,1,2,2,1,1,1, 24,5} }, +{ {0,0,1,2,2,1,1,2, 47,44} }, +{ {0,0,1,2,2,1,1,3, 108,0} }, +{ {0,0,1,2,2,1,2,0, 53,1} }, +{ {0,0,1,2,2,1,2,1, 47,30} }, +{ {0,0,1,2,2,1,2,2, 24,4} }, +{ {0,0,1,2,2,1,2,3, 108,21} }, +{ {0,0,1,2,2,1,3,0, 107,20} }, +{ {0,0,1,2,2,1,3,1, 108,20} }, +{ {0,0,1,2,2,1,3,2, 108,1} }, +{ {0,0,1,2,2,1,3,3, 109,0} }, +{ {0,0,1,2,2,1,3,4, 146,0} }, +{ {0,0,1,2,2,2,0,0, 45,3} }, +{ {0,0,1,2,2,2,0,1, 48,20} }, +{ {0,0,1,2,2,2,0,2, 23,31} }, +{ {0,0,1,2,2,2,0,3, 92,20} }, +{ {0,0,1,2,2,2,1,0, 47,20} }, +{ {0,0,1,2,2,2,1,1, 29,25} }, +{ {0,0,1,2,2,2,1,2, 37,37} }, +{ {0,0,1,2,2,2,1,3, 93,20} }, +{ {0,0,1,2,2,2,2,0, 27,11} }, +{ {0,0,1,2,2,2,2,1, 40,28} }, +{ {0,0,1,2,2,2,2,2, 8,30} }, +{ {0,0,1,2,2,2,2,3, 81,11} }, +{ {0,0,1,2,2,2,3,0, 90,20} }, +{ {0,0,1,2,2,2,3,1, 91,20} }, +{ {0,0,1,2,2,2,3,2, 72,31} }, +{ {0,0,1,2,2,2,3,3, 94,20} }, +{ {0,0,1,2,2,2,3,4, 135,20} }, +{ {0,0,1,2,2,3,0,0, 110,0} }, +{ {0,0,1,2,2,3,0,1, 111,0} }, +{ {0,0,1,2,2,3,0,2, 112,0} }, +{ {0,0,1,2,2,3,0,3, 108,36} }, +{ {0,0,1,2,2,3,0,4, 147,0} }, +{ {0,0,1,2,2,3,1,0, 108,26} }, +{ {0,0,1,2,2,3,1,1, 69,44} }, +{ {0,0,1,2,2,3,1,2, 93,44} }, +{ {0,0,1,2,2,3,1,3, 113,0} }, +{ {0,0,1,2,2,3,1,4, 148,0} }, +{ {0,0,1,2,2,3,2,0, 112,46} }, +{ {0,0,1,2,2,3,2,1, 103,46} }, +{ {0,0,1,2,2,3,2,2, 73,24} }, +{ {0,0,1,2,2,3,2,3, 93,30} }, +{ {0,0,1,2,2,3,2,4, 149,0} }, +{ {0,0,1,2,2,3,3,0, 111,20} }, +{ {0,0,1,2,2,3,3,1, 114,0} }, +{ {0,0,1,2,2,3,3,2, 103,22} }, +{ {0,0,1,2,2,3,3,3, 69,30} }, +{ {0,0,1,2,2,3,3,4, 150,0} }, +{ {0,0,1,2,2,3,4,0, 147,20} }, +{ {0,0,1,2,2,3,4,1, 150,20} }, +{ {0,0,1,2,2,3,4,2, 149,20} }, +{ {0,0,1,2,2,3,4,3, 148,20} }, +{ {0,0,1,2,2,3,4,4, 151,0} }, +{ {0,0,1,2,2,3,4,5, 170,0} }, +{ {0,0,1,2,3,0,0,0, 70,9} }, +{ {0,0,1,2,3,0,0,1, 85,20} }, +{ {0,0,1,2,3,0,0,2, 81,43} }, +{ {0,0,1,2,3,0,0,3, 76,43} }, +{ {0,0,1,2,3,0,0,4, 131,20} }, +{ {0,0,1,2,3,0,1,0, 73,9} }, +{ {0,0,1,2,3,0,1,1, 88,25} }, +{ {0,0,1,2,3,0,1,2, 84,43} }, +{ {0,0,1,2,3,0,1,3, 79,43} }, +{ {0,0,1,2,3,0,1,4, 134,20} }, +{ {0,0,1,2,3,0,2,0, 71,9} }, +{ {0,0,1,2,3,0,2,1, 87,20} }, +{ {0,0,1,2,3,0,2,2, 83,39} }, +{ {0,0,1,2,3,0,2,3, 78,43} }, +{ {0,0,1,2,3,0,2,4, 133,20} }, +{ {0,0,1,2,3,0,3,0, 72,9} }, +{ {0,0,1,2,3,0,3,1, 86,20} }, +{ {0,0,1,2,3,0,3,2, 82,43} }, +{ {0,0,1,2,3,0,3,3, 77,43} }, +{ {0,0,1,2,3,0,3,4, 132,20} }, +{ {0,0,1,2,3,0,4,0, 127,43} }, +{ {0,0,1,2,3,0,4,1, 130,20} }, +{ {0,0,1,2,3,0,4,2, 129,43} }, +{ {0,0,1,2,3,0,4,3, 128,43} }, +{ {0,0,1,2,3,0,4,4, 134,43} }, +{ {0,0,1,2,3,0,4,5, 167,20} }, +{ {0,0,1,2,3,1,0,0, 110,1} }, +{ {0,0,1,2,3,1,0,1, 112,37} }, +{ {0,0,1,2,3,1,0,2, 108,23} }, +{ {0,0,1,2,3,1,0,3, 111,21} }, +{ {0,0,1,2,3,1,0,4, 147,21} }, +{ {0,0,1,2,3,1,1,0, 112,1} }, +{ {0,0,1,2,3,1,1,1, 73,25} }, +{ {0,0,1,2,3,1,1,2, 93,39} }, +{ {0,0,1,2,3,1,1,3, 103,27} }, +{ {0,0,1,2,3,1,1,4, 149,21} }, +{ {0,0,1,2,3,1,2,0, 111,1} }, +{ {0,0,1,2,3,1,2,1, 103,37} }, +{ {0,0,1,2,3,1,2,2, 69,39} }, +{ {0,0,1,2,3,1,2,3, 114,1} }, +{ {0,0,1,2,3,1,2,4, 150,21} }, +{ {0,0,1,2,3,1,3,0, 108,47} }, +{ {0,0,1,2,3,1,3,1, 93,29} }, +{ {0,0,1,2,3,1,3,2, 113,1} }, +{ {0,0,1,2,3,1,3,3, 69,29} }, +{ {0,0,1,2,3,1,3,4, 148,21} }, +{ {0,0,1,2,3,1,4,0, 147,1} }, +{ {0,0,1,2,3,1,4,1, 149,1} }, +{ {0,0,1,2,3,1,4,2, 148,1} }, +{ {0,0,1,2,3,1,4,3, 150,1} }, +{ {0,0,1,2,3,1,4,4, 151,1} }, +{ {0,0,1,2,3,1,4,5, 170,1} }, +{ {0,0,1,2,3,2,0,0, 101,1} }, +{ {0,0,1,2,3,2,0,1, 104,1} }, +{ {0,0,1,2,3,2,0,2, 68,22} }, +{ {0,0,1,2,3,2,0,3, 104,20} }, +{ {0,0,1,2,3,2,0,4, 142,1} }, +{ {0,0,1,2,3,2,1,0, 103,1} }, +{ {0,0,1,2,3,2,1,1, 79,25} }, +{ {0,0,1,2,3,2,1,2, 82,22} }, +{ {0,0,1,2,3,2,1,3, 106,20} }, +{ {0,0,1,2,3,2,1,4, 144,1} }, +{ {0,0,1,2,3,2,2,0, 102,1} }, +{ {0,0,1,2,3,2,2,1, 105,1} }, +{ {0,0,1,2,3,2,2,2, 63,22} }, +{ {0,0,1,2,3,2,2,3, 105,20} }, +{ {0,0,1,2,3,2,2,4, 143,1} }, +{ {0,0,1,2,3,2,3,0, 103,20} }, +{ {0,0,1,2,3,2,3,1, 106,1} }, +{ {0,0,1,2,3,2,3,2, 82,37} }, +{ {0,0,1,2,3,2,3,3, 79,4} }, +{ {0,0,1,2,3,2,3,4, 144,20} }, +{ {0,0,1,2,3,2,4,0, 140,1} }, +{ {0,0,1,2,3,2,4,1, 141,1} }, +{ {0,0,1,2,3,2,4,2, 132,22} }, +{ {0,0,1,2,3,2,4,3, 141,20} }, +{ {0,0,1,2,3,2,4,4, 145,1} }, +{ {0,0,1,2,3,2,4,5, 169,1} }, +{ {0,0,1,2,3,3,0,0, 89,2} }, +{ {0,0,1,2,3,3,0,1, 91,2} }, +{ {0,0,1,2,3,3,0,2, 93,2} }, +{ {0,0,1,2,3,3,0,3, 65,10} }, +{ {0,0,1,2,3,3,0,4, 135,2} }, +{ {0,0,1,2,3,3,1,0, 93,3} }, +{ {0,0,1,2,3,3,1,1, 84,25} }, +{ {0,0,1,2,3,3,1,2, 96,45} }, +{ {0,0,1,2,3,3,1,3, 82,10} }, +{ {0,0,1,2,3,3,1,4, 137,21} }, +{ {0,0,1,2,3,3,2,0, 91,3} }, +{ {0,0,1,2,3,3,2,1, 97,21} }, +{ {0,0,1,2,3,3,2,2, 84,24} }, +{ {0,0,1,2,3,3,2,3, 75,31} }, +{ {0,0,1,2,3,3,2,4, 138,21} }, +{ {0,0,1,2,3,3,3,0, 65,11} }, +{ {0,0,1,2,3,3,3,1, 75,28} }, +{ {0,0,1,2,3,3,3,2, 82,11} }, +{ {0,0,1,2,3,3,3,3, 59,11} }, +{ {0,0,1,2,3,3,3,4, 129,11} }, +{ {0,0,1,2,3,3,4,0, 135,3} }, +{ {0,0,1,2,3,3,4,1, 138,20} }, +{ {0,0,1,2,3,3,4,2, 137,20} }, +{ {0,0,1,2,3,3,4,3, 129,10} }, +{ {0,0,1,2,3,3,4,4, 136,2} }, +{ {0,0,1,2,3,3,4,5, 168,21} }, +{ {0,0,1,2,3,4,0,0, 152,0} }, +{ {0,0,1,2,3,4,0,1, 153,0} }, +{ {0,0,1,2,3,4,0,2, 149,38} }, +{ {0,0,1,2,3,4,0,3, 153,21} }, +{ {0,0,1,2,3,4,0,4, 149,31} }, +{ {0,0,1,2,3,4,0,5, 171,0} }, +{ {0,0,1,2,3,4,1,0, 149,45} }, +{ {0,0,1,2,3,4,1,1, 134,44} }, +{ {0,0,1,2,3,4,1,2, 137,45} }, +{ {0,0,1,2,3,4,1,3, 144,27} }, +{ {0,0,1,2,3,4,1,4, 154,0} }, +{ {0,0,1,2,3,4,1,5, 172,0} }, +{ {0,0,1,2,3,4,2,0, 153,1} }, +{ {0,0,1,2,3,4,2,1, 155,0} }, +{ {0,0,1,2,3,4,2,2, 134,39} }, +{ {0,0,1,2,3,4,2,3, 156,0} }, +{ {0,0,1,2,3,4,2,4, 144,37} }, +{ {0,0,1,2,3,4,2,5, 173,0} }, +{ {0,0,1,2,3,4,3,0, 149,28} }, +{ {0,0,1,2,3,4,3,1, 144,46} }, +{ {0,0,1,2,3,4,3,2, 154,1} }, +{ {0,0,1,2,3,4,3,3, 134,29} }, +{ {0,0,1,2,3,4,3,4, 137,28} }, +{ {0,0,1,2,3,4,3,5, 172,21} }, +{ {0,0,1,2,3,4,4,0, 153,20} }, +{ {0,0,1,2,3,4,4,1, 156,1} }, +{ {0,0,1,2,3,4,4,2, 144,22} }, +{ {0,0,1,2,3,4,4,3, 155,21} }, +{ {0,0,1,2,3,4,4,4, 134,30} }, +{ {0,0,1,2,3,4,4,5, 173,21} }, +{ {0,0,1,2,3,4,5,0, 171,1} }, +{ {0,0,1,2,3,4,5,1, 173,1} }, +{ {0,0,1,2,3,4,5,2, 172,1} }, +{ {0,0,1,2,3,4,5,3, 173,20} }, +{ {0,0,1,2,3,4,5,4, 172,20} }, +{ {0,0,1,2,3,4,5,5, 174,0} }, +{ {0,0,1,2,3,4,5,6, 182,0} }, +{ {0,1,0,0,0,0,0,0, 1,4} }, +{ {0,1,0,0,0,0,0,1, 4,12} }, +{ {0,1,0,0,0,0,0,2, 7,12} }, +{ {0,1,0,0,0,0,1,0, 19,7} }, +{ {0,1,0,0,0,0,1,1, 20,13} }, +{ {0,1,0,0,0,0,1,2, 21,13} }, +{ {0,1,0,0,0,0,2,0, 33,2} }, +{ {0,1,0,0,0,0,2,1, 35,13} }, +{ {0,1,0,0,0,0,2,2, 34,13} }, +{ {0,1,0,0,0,0,2,3, 70,13} }, +{ {0,1,0,0,0,1,0,0, 2,27} }, +{ {0,1,0,0,0,1,0,1, 5,26} }, +{ {0,1,0,0,0,1,0,2, 8,41} }, +{ {0,1,0,0,0,1,1,0, 20,18} }, +{ {0,1,0,0,0,1,1,1, 22,18} }, +{ {0,1,0,0,0,1,1,2, 23,40} }, +{ {0,1,0,0,0,1,2,0, 34,18} }, +{ {0,1,0,0,0,1,2,1, 28,9} }, +{ {0,1,0,0,0,1,2,2, 37,18} }, +{ {0,1,0,0,0,1,2,3, 72,40} }, +{ {0,1,0,0,0,2,0,0, 3,26} }, +{ {0,1,0,0,0,2,0,1, 6,26} }, +{ {0,1,0,0,0,2,0,2, 8,26} }, +{ {0,1,0,0,0,2,0,3, 58,41} }, +{ {0,1,0,0,0,2,1,0, 21,18} }, +{ {0,1,0,0,0,2,1,1, 23,18} }, +{ {0,1,0,0,0,2,1,2, 24,18} }, +{ {0,1,0,0,0,2,1,3, 64,40} }, +{ {0,1,0,0,0,2,2,0, 35,18} }, +{ {0,1,0,0,0,2,2,1, 36,18} }, +{ {0,1,0,0,0,2,2,2, 28,5} }, +{ {0,1,0,0,0,2,2,3, 71,40} }, +{ {0,1,0,0,0,2,3,0, 70,18} }, +{ {0,1,0,0,0,2,3,1, 71,18} }, +{ {0,1,0,0,0,2,3,2, 73,18} }, +{ {0,1,0,0,0,2,3,3, 72,18} }, +{ {0,1,0,0,0,2,3,4, 127,40} }, +{ {0,1,0,0,1,0,0,0, 4,6} }, +{ {0,1,0,0,1,0,0,1, 13,6} }, +{ {0,1,0,0,1,0,0,2, 16,18} }, +{ {0,1,0,0,1,0,1,0, 20,7} }, +{ {0,1,0,0,1,0,1,1, 25,18} }, +{ {0,1,0,0,1,0,1,2, 27,18} }, +{ {0,1,0,0,1,0,2,0, 35,7} }, +{ {0,1,0,0,1,0,2,1, 38,18} }, +{ {0,1,0,0,1,0,2,2, 40,18} }, +{ {0,1,0,0,1,0,2,3, 76,18} }, +{ {0,1,0,0,1,1,0,0, 5,6} }, +{ {0,1,0,0,1,1,0,1, 14,6} }, +{ {0,1,0,0,1,1,0,2, 17,18} }, +{ {0,1,0,0,1,1,1,0, 22,7} }, +{ {0,1,0,0,1,1,1,1, 5,10} }, +{ {0,1,0,0,1,1,1,2, 28,18} }, +{ {0,1,0,0,1,1,2,0, 28,42} }, +{ {0,1,0,0,1,1,2,1, 17,9} }, +{ {0,1,0,0,1,1,2,2, 41,18} }, +{ {0,1,0,0,1,1,2,3, 77,18} }, +{ {0,1,0,0,1,2,0,0, 6,6} }, +{ {0,1,0,0,1,2,0,1, 15,6} }, +{ {0,1,0,0,1,2,0,2, 18,18} }, +{ {0,1,0,0,1,2,0,3, 61,18} }, +{ {0,1,0,0,1,2,1,0, 23,17} }, +{ {0,1,0,0,1,2,1,1, 26,18} }, +{ {0,1,0,0,1,2,1,2, 29,18} }, +{ {0,1,0,0,1,2,1,3, 65,18} }, +{ {0,1,0,0,1,2,2,0, 36,17} }, +{ {0,1,0,0,1,2,2,1, 39,18} }, +{ {0,1,0,0,1,2,2,2, 42,18} }, +{ {0,1,0,0,1,2,2,3, 78,18} }, +{ {0,1,0,0,1,2,3,0, 71,17} }, +{ {0,1,0,0,1,2,3,1, 74,18} }, +{ {0,1,0,0,1,2,3,2, 79,18} }, +{ {0,1,0,0,1,2,3,3, 75,18} }, +{ {0,1,0,0,1,2,3,4, 128,18} }, +{ {0,1,0,0,2,0,0,0, 7,6} }, +{ {0,1,0,0,2,0,0,1, 16,6} }, +{ {0,1,0,0,2,0,0,2, 16,26} }, +{ {0,1,0,0,2,0,0,3, 62,18} }, +{ {0,1,0,0,2,0,1,0, 21,7} }, +{ {0,1,0,0,2,0,1,1, 27,17} }, +{ {0,1,0,0,2,0,1,2, 30,18} }, +{ {0,1,0,0,2,0,1,3, 67,18} }, +{ {0,1,0,0,2,0,2,0, 34,7} }, +{ {0,1,0,0,2,0,2,1, 40,17} }, +{ {0,1,0,0,2,0,2,2, 26,4} }, +{ {0,1,0,0,2,0,2,3, 81,18} }, +{ {0,1,0,0,2,0,3,0, 70,7} }, +{ {0,1,0,0,2,0,3,1, 76,17} }, +{ {0,1,0,0,2,0,3,2, 85,18} }, +{ {0,1,0,0,2,0,3,3, 81,17} }, +{ {0,1,0,0,2,0,3,4, 131,18} }, +{ {0,1,0,0,2,1,0,0, 8,6} }, +{ {0,1,0,0,2,1,0,1, 17,6} }, +{ {0,1,0,0,2,1,0,2, 18,26} }, +{ {0,1,0,0,2,1,0,3, 63,18} }, +{ {0,1,0,0,2,1,1,0, 23,7} }, +{ {0,1,0,0,2,1,1,1, 28,17} }, +{ {0,1,0,0,2,1,1,2, 31,18} }, +{ {0,1,0,0,2,1,1,3, 68,18} }, +{ {0,1,0,0,2,1,2,0, 37,17} }, +{ {0,1,0,0,2,1,2,1, 41,17} }, +{ {0,1,0,0,2,1,2,2, 43,18} }, +{ {0,1,0,0,2,1,2,3, 82,18} }, +{ {0,1,0,0,2,1,3,0, 72,7} }, +{ {0,1,0,0,2,1,3,1, 77,9} }, +{ {0,1,0,0,2,1,3,2, 86,18} }, +{ {0,1,0,0,2,1,3,3, 82,17} }, +{ {0,1,0,0,2,1,3,4, 132,18} }, +{ {0,1,0,0,2,2,0,0, 8,45} }, +{ {0,1,0,0,2,2,0,1, 18,6} }, +{ {0,1,0,0,2,2,0,2, 17,26} }, +{ {0,1,0,0,2,2,0,3, 63,41} }, +{ {0,1,0,0,2,2,1,0, 24,7} }, +{ {0,1,0,0,2,2,1,1, 29,17} }, +{ {0,1,0,0,2,2,1,2, 32,18} }, +{ {0,1,0,0,2,2,1,3, 69,18} }, +{ {0,1,0,0,2,2,2,0, 28,28} }, +{ {0,1,0,0,2,2,2,1, 42,17} }, +{ {0,1,0,0,2,2,2,2, 10,4} }, +{ {0,1,0,0,2,2,2,3, 83,18} }, +{ {0,1,0,0,2,2,3,0, 73,17} }, +{ {0,1,0,0,2,2,3,1, 79,17} }, +{ {0,1,0,0,2,2,3,2, 88,18} }, +{ {0,1,0,0,2,2,3,3, 84,17} }, +{ {0,1,0,0,2,2,3,4, 134,18} }, +{ {0,1,0,0,2,3,0,0, 58,6} }, +{ {0,1,0,0,2,3,0,1, 61,6} }, +{ {0,1,0,0,2,3,0,2, 61,26} }, +{ {0,1,0,0,2,3,0,3, 63,6} }, +{ {0,1,0,0,2,3,0,4, 125,18} }, +{ {0,1,0,0,2,3,1,0, 64,17} }, +{ {0,1,0,0,2,3,1,1, 65,17} }, +{ {0,1,0,0,2,3,1,2, 66,18} }, +{ {0,1,0,0,2,3,1,3, 69,17} }, +{ {0,1,0,0,2,3,1,4, 126,18} }, +{ {0,1,0,0,2,3,2,0, 72,17} }, +{ {0,1,0,0,2,3,2,1, 75,17} }, +{ {0,1,0,0,2,3,2,2, 80,18} }, +{ {0,1,0,0,2,3,2,3, 84,18} }, +{ {0,1,0,0,2,3,2,4, 129,18} }, +{ {0,1,0,0,2,3,3,0, 71,7} }, +{ {0,1,0,0,2,3,3,1, 78,17} }, +{ {0,1,0,0,2,3,3,2, 87,18} }, +{ {0,1,0,0,2,3,3,3, 83,17} }, +{ {0,1,0,0,2,3,3,4, 133,18} }, +{ {0,1,0,0,2,3,4,0, 127,17} }, +{ {0,1,0,0,2,3,4,1, 128,17} }, +{ {0,1,0,0,2,3,4,2, 130,18} }, +{ {0,1,0,0,2,3,4,3, 134,17} }, +{ {0,1,0,0,2,3,4,4, 129,17} }, +{ {0,1,0,0,2,3,4,5, 167,18} }, +{ {0,1,0,1,0,0,0,0, 2,28} }, +{ {0,1,0,1,0,0,0,1, 5,12} }, +{ {0,1,0,1,0,0,0,2, 8,12} }, +{ {0,1,0,1,0,0,1,0, 20,2} }, +{ {0,1,0,1,0,0,1,1, 22,13} }, +{ {0,1,0,1,0,0,1,2, 23,13} }, +{ {0,1,0,1,0,0,2,0, 34,2} }, +{ {0,1,0,1,0,0,2,1, 28,34} }, +{ {0,1,0,1,0,0,2,2, 37,33} }, +{ {0,1,0,1,0,0,2,3, 72,13} }, +{ {0,1,0,1,0,1,0,0, 5,27} }, +{ {0,1,0,1,0,1,0,1, 9,12} }, +{ {0,1,0,1,0,1,0,2, 10,13} }, +{ {0,1,0,1,0,1,1,0, 25,13} }, +{ {0,1,0,1,0,1,1,1, 5,22} }, +{ {0,1,0,1,0,1,1,2, 26,13} }, +{ {0,1,0,1,0,1,2,0, 26,8} }, +{ {0,1,0,1,0,1,2,1, 10,8} }, +{ {0,1,0,1,0,1,2,2, 43,13} }, +{ {0,1,0,1,0,1,2,3, 80,13} }, +{ {0,1,0,1,0,2,0,0, 8,27} }, +{ {0,1,0,1,0,2,0,1, 10,26} }, +{ {0,1,0,1,0,2,0,2, 11,40} }, +{ {0,1,0,1,0,2,0,3, 59,40} }, +{ {0,1,0,1,0,2,1,0, 27,40} }, +{ {0,1,0,1,0,2,1,1, 28,40} }, +{ {0,1,0,1,0,2,1,2, 29,40} }, +{ {0,1,0,1,0,2,1,3, 65,40} }, +{ {0,1,0,1,0,2,2,0, 40,13} }, +{ {0,1,0,1,0,2,2,1, 42,13} }, +{ {0,1,0,1,0,2,2,2, 41,13} }, +{ {0,1,0,1,0,2,2,3, 75,13} }, +{ {0,1,0,1,0,2,3,0, 81,40} }, +{ {0,1,0,1,0,2,3,1, 83,34} }, +{ {0,1,0,1,0,2,3,2, 84,40} }, +{ {0,1,0,1,0,2,3,3, 82,40} }, +{ {0,1,0,1,0,2,3,4, 129,40} }, +{ {0,1,0,1,1,0,0,0, 20,25} }, +{ {0,1,0,1,1,0,0,1, 25,26} }, +{ {0,1,0,1,1,0,0,2, 27,41} }, +{ {0,1,0,1,1,0,1,0, 44,18} }, +{ {0,1,0,1,1,0,1,1, 20,24} }, +{ {0,1,0,1,1,0,1,2, 45,19} }, +{ {0,1,0,1,1,0,2,0, 45,14} }, +{ {0,1,0,1,1,0,2,1, 27,34} }, +{ {0,1,0,1,1,0,2,2, 47,19} }, +{ {0,1,0,1,1,0,2,3, 90,19} }, +{ {0,1,0,1,1,1,0,0, 22,26} }, +{ {0,1,0,1,1,1,0,1, 5,9} }, +{ {0,1,0,1,1,1,0,2, 28,41} }, +{ {0,1,0,1,1,1,1,0, 20,3} }, +{ {0,1,0,1,1,1,1,1, 2,31} }, +{ {0,1,0,1,1,1,1,2, 34,3} }, +{ {0,1,0,1,1,1,2,0, 23,8} }, +{ {0,1,0,1,1,1,2,1, 8,9} }, +{ {0,1,0,1,1,1,2,2, 37,42} }, +{ {0,1,0,1,1,1,2,3, 72,8} }, +{ {0,1,0,1,1,2,0,0, 23,26} }, +{ {0,1,0,1,1,2,0,1, 26,26} }, +{ {0,1,0,1,1,2,0,2, 29,41} }, +{ {0,1,0,1,1,2,0,3, 65,41} }, +{ {0,1,0,1,1,2,1,0, 45,18} }, +{ {0,1,0,1,1,2,1,1, 34,24} }, +{ {0,1,0,1,1,2,1,2, 46,18} }, +{ {0,1,0,1,1,2,1,3, 89,19} }, +{ {0,1,0,1,1,2,2,0, 48,19} }, +{ {0,1,0,1,1,2,2,1, 40,23} }, +{ {0,1,0,1,1,2,2,2, 29,30} }, +{ {0,1,0,1,1,2,2,3, 91,19} }, +{ {0,1,0,1,1,2,3,0, 92,15} }, +{ {0,1,0,1,1,2,3,1, 81,34} }, +{ {0,1,0,1,1,2,3,2, 94,19} }, +{ {0,1,0,1,1,2,3,3, 93,19} }, +{ {0,1,0,1,1,2,3,4, 135,19} }, +{ {0,1,0,1,2,0,0,0, 34,25} }, +{ {0,1,0,1,2,0,0,1, 26,23} }, +{ {0,1,0,1,2,0,0,2, 40,26} }, +{ {0,1,0,1,2,0,0,3, 81,41} }, +{ {0,1,0,1,2,0,1,0, 45,15} }, +{ {0,1,0,1,2,0,1,1, 23,23} }, +{ {0,1,0,1,2,0,1,2, 48,18} }, +{ {0,1,0,1,2,0,1,3, 92,18} }, +{ {0,1,0,1,2,0,2,0, 46,15} }, +{ {0,1,0,1,2,0,2,1, 29,34} }, +{ {0,1,0,1,2,0,2,2, 29,29} }, +{ {0,1,0,1,2,0,2,3, 94,14} }, +{ {0,1,0,1,2,0,3,0, 89,14} }, +{ {0,1,0,1,2,0,3,1, 65,34} }, +{ {0,1,0,1,2,0,3,2, 91,14} }, +{ {0,1,0,1,2,0,3,3, 93,14} }, +{ {0,1,0,1,2,0,3,4, 135,14} }, +{ {0,1,0,1,2,1,0,0, 28,35} }, +{ {0,1,0,1,2,1,0,1, 10,23} }, +{ {0,1,0,1,2,1,0,2, 42,26} }, +{ {0,1,0,1,2,1,0,3, 83,41} }, +{ {0,1,0,1,2,1,1,0, 27,35} }, +{ {0,1,0,1,2,1,1,1, 8,22} }, +{ {0,1,0,1,2,1,1,2, 40,8} }, +{ {0,1,0,1,2,1,1,3, 81,35} }, +{ {0,1,0,1,2,1,2,0, 29,35} }, +{ {0,1,0,1,2,1,2,1, 11,35} }, +{ {0,1,0,1,2,1,2,2, 41,8} }, +{ {0,1,0,1,2,1,2,3, 84,35} }, +{ {0,1,0,1,2,1,3,0, 65,35} }, +{ {0,1,0,1,2,1,3,1, 59,35} }, +{ {0,1,0,1,2,1,3,2, 75,8} }, +{ {0,1,0,1,2,1,3,3, 82,35} }, +{ {0,1,0,1,2,1,3,4, 129,35} }, +{ {0,1,0,1,2,2,0,0, 37,44} }, +{ {0,1,0,1,2,2,0,1, 43,26} }, +{ {0,1,0,1,2,2,0,2, 41,26} }, +{ {0,1,0,1,2,2,0,3, 82,41} }, +{ {0,1,0,1,2,2,1,0, 47,18} }, +{ {0,1,0,1,2,2,1,1, 37,39} }, +{ {0,1,0,1,2,2,1,2, 29,31} }, +{ {0,1,0,1,2,2,1,3, 93,18} }, +{ {0,1,0,1,2,2,2,0, 29,28} }, +{ {0,1,0,1,2,2,2,1, 41,23} }, +{ {0,1,0,1,2,2,2,2, 11,28} }, +{ {0,1,0,1,2,2,2,3, 84,28} }, +{ {0,1,0,1,2,2,3,0, 93,15} }, +{ {0,1,0,1,2,2,3,1, 82,34} }, +{ {0,1,0,1,2,2,3,2, 84,31} }, +{ {0,1,0,1,2,2,3,3, 96,19} }, +{ {0,1,0,1,2,2,3,4, 137,19} }, +{ {0,1,0,1,2,3,0,0, 72,26} }, +{ {0,1,0,1,2,3,0,1, 80,26} }, +{ {0,1,0,1,2,3,0,2, 75,26} }, +{ {0,1,0,1,2,3,0,3, 84,41} }, +{ {0,1,0,1,2,3,0,4, 129,41} }, +{ {0,1,0,1,2,3,1,0, 90,18} }, +{ {0,1,0,1,2,3,1,1, 72,23} }, +{ {0,1,0,1,2,3,1,2, 91,18} }, +{ {0,1,0,1,2,3,1,3, 94,18} }, +{ {0,1,0,1,2,3,1,4, 135,18} }, +{ {0,1,0,1,2,3,2,0, 94,15} }, +{ {0,1,0,1,2,3,2,1, 84,34} }, +{ {0,1,0,1,2,3,2,2, 84,29} }, +{ {0,1,0,1,2,3,2,3, 95,18} }, +{ {0,1,0,1,2,3,2,4, 136,19} }, +{ {0,1,0,1,2,3,3,0, 91,15} }, +{ {0,1,0,1,2,3,3,1, 75,23} }, +{ {0,1,0,1,2,3,3,2, 97,19} }, +{ {0,1,0,1,2,3,3,3, 84,30} }, +{ {0,1,0,1,2,3,3,4, 138,19} }, +{ {0,1,0,1,2,3,4,0, 135,15} }, +{ {0,1,0,1,2,3,4,1, 129,34} }, +{ {0,1,0,1,2,3,4,2, 138,14} }, +{ {0,1,0,1,2,3,4,3, 136,14} }, +{ {0,1,0,1,2,3,4,4, 137,18} }, +{ {0,1,0,1,2,3,4,5, 168,19} }, +{ {0,1,0,2,0,0,0,0, 3,28} }, +{ {0,1,0,2,0,0,0,1, 6,12} }, +{ {0,1,0,2,0,0,0,2, 8,47} }, +{ {0,1,0,2,0,0,0,3, 58,12} }, +{ {0,1,0,2,0,0,1,0, 21,2} }, +{ {0,1,0,2,0,0,1,1, 23,33} }, +{ {0,1,0,2,0,0,1,2, 24,13} }, +{ {0,1,0,2,0,0,1,3, 64,13} }, +{ {0,1,0,2,0,0,2,0, 35,2} }, +{ {0,1,0,2,0,0,2,1, 36,33} }, +{ {0,1,0,2,0,0,2,2, 28,24} }, +{ {0,1,0,2,0,0,2,3, 71,13} }, +{ {0,1,0,2,0,0,3,0, 70,2} }, +{ {0,1,0,2,0,0,3,1, 71,33} }, +{ {0,1,0,2,0,0,3,2, 73,33} }, +{ {0,1,0,2,0,0,3,3, 72,33} }, +{ {0,1,0,2,0,0,3,4, 127,13} }, +{ {0,1,0,2,0,1,0,0, 8,46} }, +{ {0,1,0,2,0,1,0,1, 10,12} }, +{ {0,1,0,2,0,1,0,2, 11,12} }, +{ {0,1,0,2,0,1,0,3, 59,13} }, +{ {0,1,0,2,0,1,1,0, 27,13} }, +{ {0,1,0,2,0,1,1,1, 28,13} }, +{ {0,1,0,2,0,1,1,2, 29,13} }, +{ {0,1,0,2,0,1,1,3, 65,13} }, +{ {0,1,0,2,0,1,2,0, 40,40} }, +{ {0,1,0,2,0,1,2,1, 42,40} }, +{ {0,1,0,2,0,1,2,2, 41,40} }, +{ {0,1,0,2,0,1,2,3, 75,40} }, +{ {0,1,0,2,0,1,3,0, 81,13} }, +{ {0,1,0,2,0,1,3,1, 83,9} }, +{ {0,1,0,2,0,1,3,2, 84,13} }, +{ {0,1,0,2,0,1,3,3, 82,13} }, +{ {0,1,0,2,0,1,3,4, 129,13} }, +{ {0,1,0,2,0,2,0,0, 6,27} }, +{ {0,1,0,2,0,2,0,1, 12,13} }, +{ {0,1,0,2,0,2,0,2, 10,27} }, +{ {0,1,0,2,0,2,0,3, 60,13} }, +{ {0,1,0,2,0,2,1,0, 30,13} }, +{ {0,1,0,2,0,2,1,1, 31,13} }, +{ {0,1,0,2,0,2,1,2, 32,13} }, +{ {0,1,0,2,0,2,1,3, 66,13} }, +{ {0,1,0,2,0,2,2,0, 38,13} }, +{ {0,1,0,2,0,2,2,1, 39,13} }, +{ {0,1,0,2,0,2,2,2, 17,5} }, +{ {0,1,0,2,0,2,2,3, 74,13} }, +{ {0,1,0,2,0,2,3,0, 85,13} }, +{ {0,1,0,2,0,2,3,1, 87,13} }, +{ {0,1,0,2,0,2,3,2, 88,22} }, +{ {0,1,0,2,0,2,3,3, 86,13} }, +{ {0,1,0,2,0,2,3,4, 130,13} }, +{ {0,1,0,2,0,3,0,0, 58,27} }, +{ {0,1,0,2,0,3,0,1, 60,26} }, +{ {0,1,0,2,0,3,0,2, 59,26} }, +{ {0,1,0,2,0,3,0,3, 59,47} }, +{ {0,1,0,2,0,3,0,4, 124,40} }, +{ {0,1,0,2,0,3,1,0, 67,40} }, +{ {0,1,0,2,0,3,1,1, 68,40} }, +{ {0,1,0,2,0,3,1,2, 69,40} }, +{ {0,1,0,2,0,3,1,3, 69,13} }, +{ {0,1,0,2,0,3,1,4, 126,40} }, +{ {0,1,0,2,0,3,2,0, 76,40} }, +{ {0,1,0,2,0,3,2,1, 78,40} }, +{ {0,1,0,2,0,3,2,2, 77,40} }, +{ {0,1,0,2,0,3,2,3, 79,40} }, +{ {0,1,0,2,0,3,2,4, 128,40} }, +{ {0,1,0,2,0,3,3,0, 76,13} }, +{ {0,1,0,2,0,3,3,1, 78,13} }, +{ {0,1,0,2,0,3,3,2, 79,13} }, +{ {0,1,0,2,0,3,3,3, 77,13} }, +{ {0,1,0,2,0,3,3,4, 128,13} }, +{ {0,1,0,2,0,3,4,0, 131,40} }, +{ {0,1,0,2,0,3,4,1, 133,40} }, +{ {0,1,0,2,0,3,4,2, 134,40} }, +{ {0,1,0,2,0,3,4,3, 134,13} }, +{ {0,1,0,2,0,3,4,4, 132,40} }, +{ {0,1,0,2,0,3,4,5, 167,40} }, +{ {0,1,0,2,1,0,0,0, 35,25} }, +{ {0,1,0,2,1,0,0,1, 38,26} }, +{ {0,1,0,2,1,0,0,2, 40,41} }, +{ {0,1,0,2,1,0,0,3, 76,41} }, +{ {0,1,0,2,1,0,1,0, 45,28} }, +{ {0,1,0,2,1,0,1,1, 27,29} }, +{ {0,1,0,2,1,0,1,2, 47,40} }, +{ {0,1,0,2,1,0,1,3, 90,40} }, +{ {0,1,0,2,1,0,2,0, 49,19} }, +{ {0,1,0,2,1,0,2,1, 50,19} }, +{ {0,1,0,2,1,0,2,2, 31,24} }, +{ {0,1,0,2,1,0,2,3, 98,19} }, +{ {0,1,0,2,1,0,3,0, 101,19} }, +{ {0,1,0,2,1,0,3,1, 102,19} }, +{ {0,1,0,2,1,0,3,2, 103,19} }, +{ {0,1,0,2,1,0,3,3, 103,40} }, +{ {0,1,0,2,1,0,3,4, 140,19} }, +{ {0,1,0,2,1,1,0,0, 28,3} }, +{ {0,1,0,2,1,1,0,1, 17,3} }, +{ {0,1,0,2,1,1,0,2, 41,41} }, +{ {0,1,0,2,1,1,0,3, 77,41} }, +{ {0,1,0,2,1,1,1,0, 23,11} }, +{ {0,1,0,2,1,1,1,1, 8,10} }, +{ {0,1,0,2,1,1,1,2, 37,3} }, +{ {0,1,0,2,1,1,1,3, 72,11} }, +{ {0,1,0,2,1,1,2,0, 31,3} }, +{ {0,1,0,2,1,1,2,1, 18,31} }, +{ {0,1,0,2,1,1,2,2, 43,3} }, +{ {0,1,0,2,1,1,2,3, 86,3} }, +{ {0,1,0,2,1,1,3,0, 68,42} }, +{ {0,1,0,2,1,1,3,1, 63,42} }, +{ {0,1,0,2,1,1,3,2, 82,42} }, +{ {0,1,0,2,1,1,3,3, 82,3} }, +{ {0,1,0,2,1,1,3,4, 132,42} }, +{ {0,1,0,2,1,2,0,0, 36,26} }, +{ {0,1,0,2,1,2,0,1, 39,26} }, +{ {0,1,0,2,1,2,0,2, 42,41} }, +{ {0,1,0,2,1,2,0,3, 78,41} }, +{ {0,1,0,2,1,2,1,0, 48,40} }, +{ {0,1,0,2,1,2,1,1, 40,4} }, +{ {0,1,0,2,1,2,1,2, 29,37} }, +{ {0,1,0,2,1,2,1,3, 91,40} }, +{ {0,1,0,2,1,2,2,0, 50,18} }, +{ {0,1,0,2,1,2,2,1, 51,19} }, +{ {0,1,0,2,1,2,2,2, 18,30} }, +{ {0,1,0,2,1,2,2,3, 99,19} }, +{ {0,1,0,2,1,2,3,0, 104,19} }, +{ {0,1,0,2,1,2,3,1, 105,19} }, +{ {0,1,0,2,1,2,3,2, 79,37} }, +{ {0,1,0,2,1,2,3,3, 106,19} }, +{ {0,1,0,2,1,2,3,4, 141,19} }, +{ {0,1,0,2,1,3,0,0, 71,26} }, +{ {0,1,0,2,1,3,0,1, 74,26} }, +{ {0,1,0,2,1,3,0,2, 75,41} }, +{ {0,1,0,2,1,3,0,3, 79,41} }, +{ {0,1,0,2,1,3,0,4, 128,41} }, +{ {0,1,0,2,1,3,1,0, 92,40} }, +{ {0,1,0,2,1,3,1,1, 81,29} }, +{ {0,1,0,2,1,3,1,2, 93,40} }, +{ {0,1,0,2,1,3,1,3, 94,40} }, +{ {0,1,0,2,1,3,1,4, 135,40} }, +{ {0,1,0,2,1,3,2,0, 98,18} }, +{ {0,1,0,2,1,3,2,1, 99,18} }, +{ {0,1,0,2,1,3,2,2, 86,24} }, +{ {0,1,0,2,1,3,2,3, 100,19} }, +{ {0,1,0,2,1,3,2,4, 139,19} }, +{ {0,1,0,2,1,3,3,0, 104,40} }, +{ {0,1,0,2,1,3,3,1, 105,40} }, +{ {0,1,0,2,1,3,3,2, 106,40} }, +{ {0,1,0,2,1,3,3,3, 79,30} }, +{ {0,1,0,2,1,3,3,4, 141,40} }, +{ {0,1,0,2,1,3,4,0, 142,19} }, +{ {0,1,0,2,1,3,4,1, 143,19} }, +{ {0,1,0,2,1,3,4,2, 144,19} }, +{ {0,1,0,2,1,3,4,3, 145,19} }, +{ {0,1,0,2,1,3,4,4, 144,40} }, +{ {0,1,0,2,1,3,4,5, 169,19} }, +{ {0,1,0,2,2,0,0,0, 21,25} }, +{ {0,1,0,2,2,0,0,1, 30,26} }, +{ {0,1,0,2,2,0,0,2, 27,26} }, +{ {0,1,0,2,2,0,0,3, 67,41} }, +{ {0,1,0,2,2,0,1,0, 52,19} }, +{ {0,1,0,2,2,0,1,1, 53,19} }, +{ {0,1,0,2,2,0,1,2, 53,40} }, +{ {0,1,0,2,2,0,1,3, 107,19} }, +{ {0,1,0,2,2,0,2,0, 45,29} }, +{ {0,1,0,2,2,0,2,1, 48,41} }, +{ {0,1,0,2,2,0,2,2, 23,4} }, +{ {0,1,0,2,2,0,2,3, 92,41} }, +{ {0,1,0,2,2,0,3,0, 110,19} }, +{ {0,1,0,2,2,0,3,1, 111,19} }, +{ {0,1,0,2,2,0,3,2, 112,19} }, +{ {0,1,0,2,2,0,3,3, 108,25} }, +{ {0,1,0,2,2,0,3,4, 147,19} }, +{ {0,1,0,2,2,1,0,0, 24,26} }, +{ {0,1,0,2,2,1,0,1, 32,26} }, +{ {0,1,0,2,2,1,0,2, 29,26} }, +{ {0,1,0,2,2,1,0,3, 69,41} }, +{ {0,1,0,2,2,1,1,0, 53,41} }, +{ {0,1,0,2,2,1,1,1, 24,30} }, +{ {0,1,0,2,2,1,1,2, 47,9} }, +{ {0,1,0,2,2,1,1,3, 108,19} }, +{ {0,1,0,2,2,1,2,0, 47,41} }, +{ {0,1,0,2,2,1,2,1, 29,36} }, +{ {0,1,0,2,2,1,2,2, 37,24} }, +{ {0,1,0,2,2,1,2,3, 93,41} }, +{ {0,1,0,2,2,1,3,0, 108,43} }, +{ {0,1,0,2,2,1,3,1, 69,9} }, +{ {0,1,0,2,2,1,3,2, 93,9} }, +{ {0,1,0,2,2,1,3,3, 113,19} }, +{ {0,1,0,2,2,1,3,4, 148,19} }, +{ {0,1,0,2,2,2,0,0, 23,44} }, +{ {0,1,0,2,2,2,0,1, 31,26} }, +{ {0,1,0,2,2,2,0,2, 28,26} }, +{ {0,1,0,2,2,2,0,3, 68,41} }, +{ {0,1,0,2,2,2,1,0, 53,18} }, +{ {0,1,0,2,2,2,1,1, 47,5} }, +{ {0,1,0,2,2,2,1,2, 24,31} }, +{ {0,1,0,2,2,2,1,3, 108,40} }, +{ {0,1,0,2,2,2,2,0, 27,28} }, +{ {0,1,0,2,2,2,2,1, 40,11} }, +{ {0,1,0,2,2,2,2,2, 8,5} }, +{ {0,1,0,2,2,2,2,3, 81,28} }, +{ {0,1,0,2,2,2,3,0, 112,3} }, +{ {0,1,0,2,2,2,3,1, 103,3} }, +{ {0,1,0,2,2,2,3,2, 73,37} }, +{ {0,1,0,2,2,2,3,3, 93,5} }, +{ {0,1,0,2,2,2,3,4, 149,19} }, +{ {0,1,0,2,2,3,0,0, 64,26} }, +{ {0,1,0,2,2,3,0,1, 66,26} }, +{ {0,1,0,2,2,3,0,2, 65,26} }, +{ {0,1,0,2,2,3,0,3, 69,26} }, +{ {0,1,0,2,2,3,0,4, 126,41} }, +{ {0,1,0,2,2,3,1,0, 107,41} }, +{ {0,1,0,2,2,3,1,1, 108,41} }, +{ {0,1,0,2,2,3,1,2, 108,18} }, +{ {0,1,0,2,2,3,1,3, 109,19} }, +{ {0,1,0,2,2,3,1,4, 146,19} }, +{ {0,1,0,2,2,3,2,0, 90,41} }, +{ {0,1,0,2,2,3,2,1, 91,41} }, +{ {0,1,0,2,2,3,2,2, 72,4} }, +{ {0,1,0,2,2,3,2,3, 94,41} }, +{ {0,1,0,2,2,3,2,4, 135,41} }, +{ {0,1,0,2,2,3,3,0, 111,41} }, +{ {0,1,0,2,2,3,3,1, 114,19} }, +{ {0,1,0,2,2,3,3,2, 103,39} }, +{ {0,1,0,2,2,3,3,3, 69,5} }, +{ {0,1,0,2,2,3,3,4, 150,19} }, +{ {0,1,0,2,2,3,4,0, 147,41} }, +{ {0,1,0,2,2,3,4,1, 150,41} }, +{ {0,1,0,2,2,3,4,2, 149,41} }, +{ {0,1,0,2,2,3,4,3, 151,19} }, +{ {0,1,0,2,2,3,4,4, 148,41} }, +{ {0,1,0,2,2,3,4,5, 170,19} }, +{ {0,1,0,2,3,0,0,0, 70,25} }, +{ {0,1,0,2,3,0,0,1, 85,26} }, +{ {0,1,0,2,3,0,0,2, 81,26} }, +{ {0,1,0,2,3,0,0,3, 76,26} }, +{ {0,1,0,2,3,0,0,4, 131,41} }, +{ {0,1,0,2,3,0,1,0, 110,18} }, +{ {0,1,0,2,3,0,1,1, 112,24} }, +{ {0,1,0,2,3,0,1,2, 108,38} }, +{ {0,1,0,2,3,0,1,3, 111,40} }, +{ {0,1,0,2,3,0,1,4, 147,40} }, +{ {0,1,0,2,3,0,2,0, 101,18} }, +{ {0,1,0,2,3,0,2,1, 104,18} }, +{ {0,1,0,2,3,0,2,2, 68,39} }, +{ {0,1,0,2,3,0,2,3, 104,41} }, +{ {0,1,0,2,3,0,2,4, 142,18} }, +{ {0,1,0,2,3,0,3,0, 89,28} }, +{ {0,1,0,2,3,0,3,1, 91,47} }, +{ {0,1,0,2,3,0,3,2, 93,47} }, +{ {0,1,0,2,3,0,3,3, 65,29} }, +{ {0,1,0,2,3,0,3,4, 135,47} }, +{ {0,1,0,2,3,0,4,0, 152,19} }, +{ {0,1,0,2,3,0,4,1, 153,19} }, +{ {0,1,0,2,3,0,4,2, 149,23} }, +{ {0,1,0,2,3,0,4,3, 153,40} }, +{ {0,1,0,2,3,0,4,4, 149,4} }, +{ {0,1,0,2,3,0,4,5, 171,19} }, +{ {0,1,0,2,3,1,0,0, 73,44} }, +{ {0,1,0,2,3,1,0,1, 88,9} }, +{ {0,1,0,2,3,1,0,2, 84,26} }, +{ {0,1,0,2,3,1,0,3, 79,26} }, +{ {0,1,0,2,3,1,0,4, 134,41} }, +{ {0,1,0,2,3,1,1,0, 112,18} }, +{ {0,1,0,2,3,1,1,1, 73,36} }, +{ {0,1,0,2,3,1,1,2, 93,22} }, +{ {0,1,0,2,3,1,1,3, 103,42} }, +{ {0,1,0,2,3,1,1,4, 149,40} }, +{ {0,1,0,2,3,1,2,0, 103,18} }, +{ {0,1,0,2,3,1,2,1, 79,36} }, +{ {0,1,0,2,3,1,2,2, 82,39} }, +{ {0,1,0,2,3,1,2,3, 106,41} }, +{ {0,1,0,2,3,1,2,4, 144,18} }, +{ {0,1,0,2,3,1,3,0, 93,46} }, +{ {0,1,0,2,3,1,3,1, 84,36} }, +{ {0,1,0,2,3,1,3,2, 96,8} }, +{ {0,1,0,2,3,1,3,3, 82,29} }, +{ {0,1,0,2,3,1,3,4, 137,40} }, +{ {0,1,0,2,3,1,4,0, 149,8} }, +{ {0,1,0,2,3,1,4,1, 134,9} }, +{ {0,1,0,2,3,1,4,2, 137,8} }, +{ {0,1,0,2,3,1,4,3, 144,42} }, +{ {0,1,0,2,3,1,4,4, 154,19} }, +{ {0,1,0,2,3,1,4,5, 172,19} }, +{ {0,1,0,2,3,2,0,0, 71,44} }, +{ {0,1,0,2,3,2,0,1, 87,26} }, +{ {0,1,0,2,3,2,0,2, 83,22} }, +{ {0,1,0,2,3,2,0,3, 78,26} }, +{ {0,1,0,2,3,2,0,4, 133,41} }, +{ {0,1,0,2,3,2,1,0, 111,18} }, +{ {0,1,0,2,3,2,1,1, 103,24} }, +{ {0,1,0,2,3,2,1,2, 69,22} }, +{ {0,1,0,2,3,2,1,3, 114,18} }, +{ {0,1,0,2,3,2,1,4, 150,40} }, +{ {0,1,0,2,3,2,2,0, 102,18} }, +{ {0,1,0,2,3,2,2,1, 105,18} }, +{ {0,1,0,2,3,2,2,2, 63,39} }, +{ {0,1,0,2,3,2,2,3, 105,41} }, +{ {0,1,0,2,3,2,2,4, 143,18} }, +{ {0,1,0,2,3,2,3,0, 91,46} }, +{ {0,1,0,2,3,2,3,1, 97,40} }, +{ {0,1,0,2,3,2,3,2, 84,37} }, +{ {0,1,0,2,3,2,3,3, 75,4} }, +{ {0,1,0,2,3,2,3,4, 138,40} }, +{ {0,1,0,2,3,2,4,0, 153,18} }, +{ {0,1,0,2,3,2,4,1, 155,19} }, +{ {0,1,0,2,3,2,4,2, 134,22} }, +{ {0,1,0,2,3,2,4,3, 156,19} }, +{ {0,1,0,2,3,2,4,4, 144,24} }, +{ {0,1,0,2,3,2,4,5, 173,19} }, +{ {0,1,0,2,3,3,0,0, 72,44} }, +{ {0,1,0,2,3,3,0,1, 86,26} }, +{ {0,1,0,2,3,3,0,2, 82,26} }, +{ {0,1,0,2,3,3,0,3, 77,26} }, +{ {0,1,0,2,3,3,0,4, 132,41} }, +{ {0,1,0,2,3,3,1,0, 108,2} }, +{ {0,1,0,2,3,3,1,1, 93,10} }, +{ {0,1,0,2,3,3,1,2, 113,18} }, +{ {0,1,0,2,3,3,1,3, 69,10} }, +{ {0,1,0,2,3,3,1,4, 148,40} }, +{ {0,1,0,2,3,3,2,0, 103,41} }, +{ {0,1,0,2,3,3,2,1, 106,18} }, +{ {0,1,0,2,3,3,2,2, 82,24} }, +{ {0,1,0,2,3,3,2,3, 79,31} }, +{ {0,1,0,2,3,3,2,4, 144,41} }, +{ {0,1,0,2,3,3,3,0, 65,28} }, +{ {0,1,0,2,3,3,3,1, 75,11} }, +{ {0,1,0,2,3,3,3,2, 82,28} }, +{ {0,1,0,2,3,3,3,3, 59,28} }, +{ {0,1,0,2,3,3,3,4, 129,28} }, +{ {0,1,0,2,3,3,4,0, 149,11} }, +{ {0,1,0,2,3,3,4,1, 144,3} }, +{ {0,1,0,2,3,3,4,2, 154,18} }, +{ {0,1,0,2,3,3,4,3, 134,10} }, +{ {0,1,0,2,3,3,4,4, 137,11} }, +{ {0,1,0,2,3,3,4,5, 172,40} }, +{ {0,1,0,2,3,4,0,0, 127,26} }, +{ {0,1,0,2,3,4,0,1, 130,26} }, +{ {0,1,0,2,3,4,0,2, 129,26} }, +{ {0,1,0,2,3,4,0,3, 128,26} }, +{ {0,1,0,2,3,4,0,4, 134,26} }, +{ {0,1,0,2,3,4,0,5, 167,41} }, +{ {0,1,0,2,3,4,1,0, 147,18} }, +{ {0,1,0,2,3,4,1,1, 149,18} }, +{ {0,1,0,2,3,4,1,2, 148,18} }, +{ {0,1,0,2,3,4,1,3, 150,18} }, +{ {0,1,0,2,3,4,1,4, 151,18} }, +{ {0,1,0,2,3,4,1,5, 170,18} }, +{ {0,1,0,2,3,4,2,0, 140,18} }, +{ {0,1,0,2,3,4,2,1, 141,18} }, +{ {0,1,0,2,3,4,2,2, 132,39} }, +{ {0,1,0,2,3,4,2,3, 141,41} }, +{ {0,1,0,2,3,4,2,4, 145,18} }, +{ {0,1,0,2,3,4,2,5, 169,18} }, +{ {0,1,0,2,3,4,3,0, 135,46} }, +{ {0,1,0,2,3,4,3,1, 138,41} }, +{ {0,1,0,2,3,4,3,2, 137,41} }, +{ {0,1,0,2,3,4,3,3, 129,29} }, +{ {0,1,0,2,3,4,3,4, 136,47} }, +{ {0,1,0,2,3,4,3,5, 168,40} }, +{ {0,1,0,2,3,4,4,0, 153,41} }, +{ {0,1,0,2,3,4,4,1, 156,18} }, +{ {0,1,0,2,3,4,4,2, 144,39} }, +{ {0,1,0,2,3,4,4,3, 155,40} }, +{ {0,1,0,2,3,4,4,4, 134,5} }, +{ {0,1,0,2,3,4,4,5, 173,40} }, +{ {0,1,0,2,3,4,5,0, 171,18} }, +{ {0,1,0,2,3,4,5,1, 173,18} }, +{ {0,1,0,2,3,4,5,2, 172,18} }, +{ {0,1,0,2,3,4,5,3, 173,41} }, +{ {0,1,0,2,3,4,5,4, 174,19} }, +{ {0,1,0,2,3,4,5,5, 172,41} }, +{ {0,1,0,2,3,4,5,6, 182,19} }, +{ {0,1,1,0,0,0,0,0, 4,5} }, +{ {0,1,1,0,0,0,0,1, 13,2} }, +{ {0,1,1,0,0,0,0,2, 16,12} }, +{ {0,1,1,0,0,0,1,0, 20,10} }, +{ {0,1,1,0,0,0,1,1, 25,2} }, +{ {0,1,1,0,0,0,1,2, 27,33} }, +{ {0,1,1,0,0,0,2,0, 35,10} }, +{ {0,1,1,0,0,0,2,1, 38,2} }, +{ {0,1,1,0,0,0,2,2, 40,33} }, +{ {0,1,1,0,0,0,2,3, 76,33} }, +{ {0,1,1,0,0,1,0,0, 20,4} }, +{ {0,1,1,0,0,1,0,1, 25,12} }, +{ {0,1,1,0,0,1,0,2, 27,12} }, +{ {0,1,1,0,0,1,1,0, 44,12} }, +{ {0,1,1,0,0,1,1,1, 20,5} }, +{ {0,1,1,0,0,1,1,2, 45,13} }, +{ {0,1,1,0,0,1,2,0, 45,8} }, +{ {0,1,1,0,0,1,2,1, 27,9} }, +{ {0,1,1,0,0,1,2,2, 47,32} }, +{ {0,1,1,0,0,1,2,3, 90,32} }, +{ {0,1,1,0,0,2,0,0, 35,4} }, +{ {0,1,1,0,0,2,0,1, 38,12} }, +{ {0,1,1,0,0,2,0,2, 40,12} }, +{ {0,1,1,0,0,2,0,3, 76,12} }, +{ {0,1,1,0,0,2,1,0, 45,26} }, +{ {0,1,1,0,0,2,1,1, 27,44} }, +{ {0,1,1,0,0,2,1,2, 47,13} }, +{ {0,1,1,0,0,2,1,3, 90,13} }, +{ {0,1,1,0,0,2,2,0, 49,13} }, +{ {0,1,1,0,0,2,2,1, 50,13} }, +{ {0,1,1,0,0,2,2,2, 31,5} }, +{ {0,1,1,0,0,2,2,3, 98,13} }, +{ {0,1,1,0,0,2,3,0, 101,23} }, +{ {0,1,1,0,0,2,3,1, 102,32} }, +{ {0,1,1,0,0,2,3,2, 103,32} }, +{ {0,1,1,0,0,2,3,3, 103,13} }, +{ {0,1,1,0,0,2,3,4, 140,32} }, +{ {0,1,1,0,1,0,0,0, 13,5} }, +{ {0,1,1,0,1,0,0,1, 54,0} }, +{ {0,1,1,0,1,0,0,2, 55,0} }, +{ {0,1,1,0,1,0,1,0, 25,22} }, +{ {0,1,1,0,1,0,1,1, 13,4} }, +{ {0,1,1,0,1,0,1,2, 38,27} }, +{ {0,1,1,0,1,0,2,0, 38,22} }, +{ {0,1,1,0,1,0,2,1, 55,1} }, +{ {0,1,1,0,1,0,2,2, 51,5} }, +{ {0,1,1,0,1,0,2,3, 115,0} }, +{ {0,1,1,0,1,1,0,0, 25,24} }, +{ {0,1,1,0,1,1,0,1, 13,3} }, +{ {0,1,1,0,1,1,0,2, 38,3} }, +{ {0,1,1,0,1,1,1,0, 20,11} }, +{ {0,1,1,0,1,1,1,1, 4,4} }, +{ {0,1,1,0,1,1,1,2, 35,11} }, +{ {0,1,1,0,1,1,2,0, 27,42} }, +{ {0,1,1,0,1,1,2,1, 16,9} }, +{ {0,1,1,0,1,1,2,2, 40,42} }, +{ {0,1,1,0,1,1,2,3, 76,42} }, +{ {0,1,1,0,1,2,0,0, 38,24} }, +{ {0,1,1,0,1,2,0,1, 55,6} }, +{ {0,1,1,0,1,2,0,2, 51,30} }, +{ {0,1,1,0,1,2,0,3, 115,19} }, +{ {0,1,1,0,1,2,1,0, 27,27} }, +{ {0,1,1,0,1,2,1,1, 16,27} }, +{ {0,1,1,0,1,2,1,2, 40,27} }, +{ {0,1,1,0,1,2,1,3, 76,27} }, +{ {0,1,1,0,1,2,2,0, 50,23} }, +{ {0,1,1,0,1,2,2,1, 56,0} }, +{ {0,1,1,0,1,2,2,2, 39,5} }, +{ {0,1,1,0,1,2,2,3, 116,0} }, +{ {0,1,1,0,1,2,3,0, 102,23} }, +{ {0,1,1,0,1,2,3,1, 117,0} }, +{ {0,1,1,0,1,2,3,2, 105,36} }, +{ {0,1,1,0,1,2,3,3, 105,25} }, +{ {0,1,1,0,1,2,3,4, 157,0} }, +{ {0,1,1,0,2,0,0,0, 16,22} }, +{ {0,1,1,0,2,0,0,1, 55,7} }, +{ {0,1,1,0,2,0,0,2, 56,1} }, +{ {0,1,1,0,2,0,0,3, 117,1} }, +{ {0,1,1,0,2,0,1,0, 27,22} }, +{ {0,1,1,0,2,0,1,1, 38,25} }, +{ {0,1,1,0,2,0,1,2, 50,26} }, +{ {0,1,1,0,2,0,1,3, 102,26} }, +{ {0,1,1,0,2,0,2,0, 40,22} }, +{ {0,1,1,0,2,0,2,1, 51,28} }, +{ {0,1,1,0,2,0,2,2, 39,4} }, +{ {0,1,1,0,2,0,2,3, 105,47} }, +{ {0,1,1,0,2,0,3,0, 76,22} }, +{ {0,1,1,0,2,0,3,1, 115,14} }, +{ {0,1,1,0,2,0,3,2, 116,1} }, +{ {0,1,1,0,2,0,3,3, 105,24} }, +{ {0,1,1,0,2,0,3,4, 157,1} }, +{ {0,1,1,0,2,1,0,0, 27,39} }, +{ {0,1,1,0,2,1,0,1, 38,9} }, +{ {0,1,1,0,2,1,0,2, 50,8} }, +{ {0,1,1,0,2,1,0,3, 102,43} }, +{ {0,1,1,0,2,1,1,0, 45,23} }, +{ {0,1,1,0,2,1,1,1, 35,5} }, +{ {0,1,1,0,2,1,1,2, 49,8} }, +{ {0,1,1,0,2,1,1,3, 101,26} }, +{ {0,1,1,0,2,1,2,0, 47,23} }, +{ {0,1,1,0,2,1,2,1, 40,9} }, +{ {0,1,1,0,2,1,2,2, 31,4} }, +{ {0,1,1,0,2,1,2,3, 103,43} }, +{ {0,1,1,0,2,1,3,0, 90,8} }, +{ {0,1,1,0,2,1,3,1, 76,9} }, +{ {0,1,1,0,2,1,3,2, 98,8} }, +{ {0,1,1,0,2,1,3,3, 103,8} }, +{ {0,1,1,0,2,1,3,4, 140,43} }, +{ {0,1,1,0,2,2,0,0, 40,39} }, +{ {0,1,1,0,2,2,0,1, 51,2} }, +{ {0,1,1,0,2,2,0,2, 39,10} }, +{ {0,1,1,0,2,2,0,3, 105,2} }, +{ {0,1,1,0,2,2,1,0, 47,38} }, +{ {0,1,1,0,2,2,1,1, 40,44} }, +{ {0,1,1,0,2,2,1,2, 31,10} }, +{ {0,1,1,0,2,2,1,3, 103,26} }, +{ {0,1,1,0,2,2,2,0, 31,11} }, +{ {0,1,1,0,2,2,2,1, 39,11} }, +{ {0,1,1,0,2,2,2,2, 12,5} }, +{ {0,1,1,0,2,2,2,3, 87,11} }, +{ {0,1,1,0,2,2,3,0, 103,23} }, +{ {0,1,1,0,2,2,3,1, 105,3} }, +{ {0,1,1,0,2,2,3,2, 87,10} }, +{ {0,1,1,0,2,2,3,3, 97,11} }, +{ {0,1,1,0,2,2,3,4, 155,2} }, +{ {0,1,1,0,2,3,0,0, 76,39} }, +{ {0,1,1,0,2,3,0,1, 115,6} }, +{ {0,1,1,0,2,3,0,2, 116,18} }, +{ {0,1,1,0,2,3,0,3, 105,37} }, +{ {0,1,1,0,2,3,0,4, 157,18} }, +{ {0,1,1,0,2,3,1,0, 90,45} }, +{ {0,1,1,0,2,3,1,1, 76,44} }, +{ {0,1,1,0,2,3,1,2, 98,26} }, +{ {0,1,1,0,2,3,1,3, 103,45} }, +{ {0,1,1,0,2,3,1,4, 140,26} }, +{ {0,1,1,0,2,3,2,0, 103,38} }, +{ {0,1,1,0,2,3,2,1, 105,46} }, +{ {0,1,1,0,2,3,2,2, 87,4} }, +{ {0,1,1,0,2,3,2,3, 97,28} }, +{ {0,1,1,0,2,3,2,4, 155,47} }, +{ {0,1,1,0,2,3,3,0, 98,23} }, +{ {0,1,1,0,2,3,3,1, 116,15} }, +{ {0,1,1,0,2,3,3,2, 118,0} }, +{ {0,1,1,0,2,3,3,3, 87,5} }, +{ {0,1,1,0,2,3,3,4, 158,0} }, +{ {0,1,1,0,2,3,4,0, 140,23} }, +{ {0,1,1,0,2,3,4,1, 157,15} }, +{ {0,1,1,0,2,3,4,2, 158,1} }, +{ {0,1,1,0,2,3,4,3, 155,36} }, +{ {0,1,1,0,2,3,4,4, 155,25} }, +{ {0,1,1,0,2,3,4,5, 175,0} }, +{ {0,1,1,1,0,0,0,0, 5,11} }, +{ {0,1,1,1,0,0,0,1, 14,2} }, +{ {0,1,1,1,0,0,0,2, 17,12} }, +{ {0,1,1,1,0,0,1,0, 22,2} }, +{ {0,1,1,1,0,0,1,1, 5,7} }, +{ {0,1,1,1,0,0,1,2, 28,33} }, +{ {0,1,1,1,0,0,2,0, 28,15} }, +{ {0,1,1,1,0,0,2,1, 17,15} }, +{ {0,1,1,1,0,0,2,2, 41,33} }, +{ {0,1,1,1,0,0,2,3, 77,33} }, +{ {0,1,1,1,0,1,0,0, 22,29} }, +{ {0,1,1,1,0,1,0,1, 5,23} }, +{ {0,1,1,1,0,1,0,2, 28,12} }, +{ {0,1,1,1,0,1,1,0, 20,15} }, +{ {0,1,1,1,0,1,1,1, 2,22} }, +{ {0,1,1,1,0,1,1,2, 34,15} }, +{ {0,1,1,1,0,1,2,0, 23,35} }, +{ {0,1,1,1,0,1,2,1, 8,34} }, +{ {0,1,1,1,0,1,2,2, 37,15} }, +{ {0,1,1,1,0,1,2,3, 72,35} }, +{ {0,1,1,1,0,2,0,0, 28,16} }, +{ {0,1,1,1,0,2,0,1, 17,7} }, +{ {0,1,1,1,0,2,0,2, 41,12} }, +{ {0,1,1,1,0,2,0,3, 77,12} }, +{ {0,1,1,1,0,2,1,0, 23,6} }, +{ {0,1,1,1,0,2,1,1, 8,7} }, +{ {0,1,1,1,0,2,1,2, 37,16} }, +{ {0,1,1,1,0,2,1,3, 72,6} }, +{ {0,1,1,1,0,2,2,0, 31,15} }, +{ {0,1,1,1,0,2,2,1, 18,23} }, +{ {0,1,1,1,0,2,2,2, 43,15} }, +{ {0,1,1,1,0,2,2,3, 86,15} }, +{ {0,1,1,1,0,2,3,0, 68,15} }, +{ {0,1,1,1,0,2,3,1, 63,15} }, +{ {0,1,1,1,0,2,3,2, 82,15} }, +{ {0,1,1,1,0,2,3,3, 82,16} }, +{ {0,1,1,1,0,2,3,4, 132,15} }, +{ {0,1,1,1,1,0,0,0, 25,5} }, +{ {0,1,1,1,1,0,0,1, 13,7} }, +{ {0,1,1,1,1,0,0,2, 38,15} }, +{ {0,1,1,1,1,0,1,0, 20,6} }, +{ {0,1,1,1,1,0,1,1, 4,7} }, +{ {0,1,1,1,1,0,1,2, 35,6} }, +{ {0,1,1,1,1,0,2,0, 27,15} }, +{ {0,1,1,1,1,0,2,1, 16,15} }, +{ {0,1,1,1,1,0,2,2, 40,15} }, +{ {0,1,1,1,1,0,2,3, 76,15} }, +{ {0,1,1,1,1,1,0,0, 20,8} }, +{ {0,1,1,1,1,1,0,1, 4,9} }, +{ {0,1,1,1,1,1,0,2, 35,8} }, +{ {0,1,1,1,1,1,1,0, 19,6} }, +{ {0,1,1,1,1,1,1,1, 1,5} }, +{ {0,1,1,1,1,1,1,2, 33,3} }, +{ {0,1,1,1,1,1,2,0, 21,8} }, +{ {0,1,1,1,1,1,2,1, 7,9} }, +{ {0,1,1,1,1,1,2,2, 34,8} }, +{ {0,1,1,1,1,1,2,3, 70,8} }, +{ {0,1,1,1,1,2,0,0, 27,16} }, +{ {0,1,1,1,1,2,0,1, 16,7} }, +{ {0,1,1,1,1,2,0,2, 40,16} }, +{ {0,1,1,1,1,2,0,3, 76,16} }, +{ {0,1,1,1,1,2,1,0, 21,6} }, +{ {0,1,1,1,1,2,1,1, 7,7} }, +{ {0,1,1,1,1,2,1,2, 34,6} }, +{ {0,1,1,1,1,2,1,3, 70,6} }, +{ {0,1,1,1,1,2,2,0, 30,15} }, +{ {0,1,1,1,1,2,2,1, 16,23} }, +{ {0,1,1,1,1,2,2,2, 26,5} }, +{ {0,1,1,1,1,2,2,3, 85,15} }, +{ {0,1,1,1,1,2,3,0, 67,15} }, +{ {0,1,1,1,1,2,3,1, 62,15} }, +{ {0,1,1,1,1,2,3,2, 81,15} }, +{ {0,1,1,1,1,2,3,3, 81,16} }, +{ {0,1,1,1,1,2,3,4, 131,15} }, +{ {0,1,1,1,2,0,0,0, 26,15} }, +{ {0,1,1,1,2,0,0,1, 15,7} }, +{ {0,1,1,1,2,0,0,2, 39,15} }, +{ {0,1,1,1,2,0,0,3, 74,15} }, +{ {0,1,1,1,2,0,1,0, 23,16} }, +{ {0,1,1,1,2,0,1,1, 6,7} }, +{ {0,1,1,1,2,0,1,2, 36,16} }, +{ {0,1,1,1,2,0,1,3, 71,16} }, +{ {0,1,1,1,2,0,2,0, 29,15} }, +{ {0,1,1,1,2,0,2,1, 18,15} }, +{ {0,1,1,1,2,0,2,2, 42,15} }, +{ {0,1,1,1,2,0,2,3, 79,15} }, +{ {0,1,1,1,2,0,3,0, 65,15} }, +{ {0,1,1,1,2,0,3,1, 61,15} }, +{ {0,1,1,1,2,0,3,2, 78,15} }, +{ {0,1,1,1,2,0,3,3, 75,15} }, +{ {0,1,1,1,2,0,3,4, 128,15} }, +{ {0,1,1,1,2,1,0,0, 23,15} }, +{ {0,1,1,1,2,1,0,1, 6,23} }, +{ {0,1,1,1,2,1,0,2, 36,15} }, +{ {0,1,1,1,2,1,0,3, 71,15} }, +{ {0,1,1,1,2,1,1,0, 21,15} }, +{ {0,1,1,1,2,1,1,1, 3,23} }, +{ {0,1,1,1,2,1,1,2, 35,15} }, +{ {0,1,1,1,2,1,1,3, 70,15} }, +{ {0,1,1,1,2,1,2,0, 24,15} }, +{ {0,1,1,1,2,1,2,1, 8,23} }, +{ {0,1,1,1,2,1,2,2, 28,4} }, +{ {0,1,1,1,2,1,2,3, 73,15} }, +{ {0,1,1,1,2,1,3,0, 64,35} }, +{ {0,1,1,1,2,1,3,1, 58,34} }, +{ {0,1,1,1,2,1,3,2, 71,35} }, +{ {0,1,1,1,2,1,3,3, 72,15} }, +{ {0,1,1,1,2,1,3,4, 127,15} }, +{ {0,1,1,1,2,2,0,0, 29,16} }, +{ {0,1,1,1,2,2,0,1, 18,7} }, +{ {0,1,1,1,2,2,0,2, 42,16} }, +{ {0,1,1,1,2,2,0,3, 79,16} }, +{ {0,1,1,1,2,2,1,0, 24,6} }, +{ {0,1,1,1,2,2,1,1, 8,38} }, +{ {0,1,1,1,2,2,1,2, 28,31} }, +{ {0,1,1,1,2,2,1,3, 73,16} }, +{ {0,1,1,1,2,2,2,0, 32,15} }, +{ {0,1,1,1,2,2,2,1, 17,23} }, +{ {0,1,1,1,2,2,2,2, 10,5} }, +{ {0,1,1,1,2,2,2,3, 88,15} }, +{ {0,1,1,1,2,2,3,0, 69,15} }, +{ {0,1,1,1,2,2,3,1, 63,34} }, +{ {0,1,1,1,2,2,3,2, 83,15} }, +{ {0,1,1,1,2,2,3,3, 84,16} }, +{ {0,1,1,1,2,2,3,4, 134,15} }, +{ {0,1,1,1,2,3,0,0, 65,16} }, +{ {0,1,1,1,2,3,0,1, 61,7} }, +{ {0,1,1,1,2,3,0,2, 78,16} }, +{ {0,1,1,1,2,3,0,3, 75,16} }, +{ {0,1,1,1,2,3,0,4, 128,16} }, +{ {0,1,1,1,2,3,1,0, 64,6} }, +{ {0,1,1,1,2,3,1,1, 58,7} }, +{ {0,1,1,1,2,3,1,2, 71,6} }, +{ {0,1,1,1,2,3,1,3, 72,16} }, +{ {0,1,1,1,2,3,1,4, 127,16} }, +{ {0,1,1,1,2,3,2,0, 69,16} }, +{ {0,1,1,1,2,3,2,1, 63,7} }, +{ {0,1,1,1,2,3,2,2, 83,16} }, +{ {0,1,1,1,2,3,2,3, 84,15} }, +{ {0,1,1,1,2,3,2,4, 134,16} }, +{ {0,1,1,1,2,3,3,0, 66,15} }, +{ {0,1,1,1,2,3,3,1, 61,23} }, +{ {0,1,1,1,2,3,3,2, 87,15} }, +{ {0,1,1,1,2,3,3,3, 80,15} }, +{ {0,1,1,1,2,3,3,4, 130,15} }, +{ {0,1,1,1,2,3,4,0, 126,15} }, +{ {0,1,1,1,2,3,4,1, 125,15} }, +{ {0,1,1,1,2,3,4,2, 133,15} }, +{ {0,1,1,1,2,3,4,3, 129,15} }, +{ {0,1,1,1,2,3,4,4, 129,16} }, +{ {0,1,1,1,2,3,4,5, 167,15} }, +{ {0,1,1,2,0,0,0,0, 6,11} }, +{ {0,1,1,2,0,0,0,1, 15,2} }, +{ {0,1,1,2,0,0,0,2, 18,12} }, +{ {0,1,1,2,0,0,0,3, 61,12} }, +{ {0,1,1,2,0,0,1,0, 23,2} }, +{ {0,1,1,2,0,0,1,1, 26,2} }, +{ {0,1,1,2,0,0,1,2, 29,33} }, +{ {0,1,1,2,0,0,1,3, 65,33} }, +{ {0,1,1,2,0,0,2,0, 36,2} }, +{ {0,1,1,2,0,0,2,1, 39,2} }, +{ {0,1,1,2,0,0,2,2, 42,33} }, +{ {0,1,1,2,0,0,2,3, 78,33} }, +{ {0,1,1,2,0,0,3,0, 71,2} }, +{ {0,1,1,2,0,0,3,1, 74,2} }, +{ {0,1,1,2,0,0,3,2, 79,33} }, +{ {0,1,1,2,0,0,3,3, 75,33} }, +{ {0,1,1,2,0,0,3,4, 128,33} }, +{ {0,1,1,2,0,1,0,0, 23,47} }, +{ {0,1,1,2,0,1,0,1, 26,12} }, +{ {0,1,1,2,0,1,0,2, 29,12} }, +{ {0,1,1,2,0,1,0,3, 65,12} }, +{ {0,1,1,2,0,1,1,0, 45,12} }, +{ {0,1,1,2,0,1,1,1, 34,5} }, +{ {0,1,1,2,0,1,1,2, 46,12} }, +{ {0,1,1,2,0,1,1,3, 89,13} }, +{ {0,1,1,2,0,1,2,0, 48,32} }, +{ {0,1,1,2,0,1,2,1, 40,36} }, +{ {0,1,1,2,0,1,2,2, 29,39} }, +{ {0,1,1,2,0,1,2,3, 91,32} }, +{ {0,1,1,2,0,1,3,0, 92,42} }, +{ {0,1,1,2,0,1,3,1, 81,9} }, +{ {0,1,1,2,0,1,3,2, 94,32} }, +{ {0,1,1,2,0,1,3,3, 93,32} }, +{ {0,1,1,2,0,1,3,4, 135,32} }, +{ {0,1,1,2,0,2,0,0, 36,47} }, +{ {0,1,1,2,0,2,0,1, 39,12} }, +{ {0,1,1,2,0,2,0,2, 42,12} }, +{ {0,1,1,2,0,2,0,3, 78,12} }, +{ {0,1,1,2,0,2,1,0, 48,13} }, +{ {0,1,1,2,0,2,1,1, 40,25} }, +{ {0,1,1,2,0,2,1,2, 29,22} }, +{ {0,1,1,2,0,2,1,3, 91,13} }, +{ {0,1,1,2,0,2,2,0, 50,12} }, +{ {0,1,1,2,0,2,2,1, 51,13} }, +{ {0,1,1,2,0,2,2,2, 18,22} }, +{ {0,1,1,2,0,2,2,3, 99,13} }, +{ {0,1,1,2,0,2,3,0, 104,32} }, +{ {0,1,1,2,0,2,3,1, 105,32} }, +{ {0,1,1,2,0,2,3,2, 79,22} }, +{ {0,1,1,2,0,2,3,3, 106,32} }, +{ {0,1,1,2,0,2,3,4, 141,32} }, +{ {0,1,1,2,0,3,0,0, 71,47} }, +{ {0,1,1,2,0,3,0,1, 74,12} }, +{ {0,1,1,2,0,3,0,2, 79,12} }, +{ {0,1,1,2,0,3,0,3, 75,12} }, +{ {0,1,1,2,0,3,0,4, 128,12} }, +{ {0,1,1,2,0,3,1,0, 92,27} }, +{ {0,1,1,2,0,3,1,1, 81,44} }, +{ {0,1,1,2,0,3,1,2, 94,13} }, +{ {0,1,1,2,0,3,1,3, 93,13} }, +{ {0,1,1,2,0,3,1,4, 135,13} }, +{ {0,1,1,2,0,3,2,0, 104,13} }, +{ {0,1,1,2,0,3,2,1, 105,13} }, +{ {0,1,1,2,0,3,2,2, 79,39} }, +{ {0,1,1,2,0,3,2,3, 106,13} }, +{ {0,1,1,2,0,3,2,4, 141,13} }, +{ {0,1,1,2,0,3,3,0, 98,12} }, +{ {0,1,1,2,0,3,3,1, 99,12} }, +{ {0,1,1,2,0,3,3,2, 100,13} }, +{ {0,1,1,2,0,3,3,3, 86,5} }, +{ {0,1,1,2,0,3,3,4, 139,13} }, +{ {0,1,1,2,0,3,4,0, 142,32} }, +{ {0,1,1,2,0,3,4,1, 143,32} }, +{ {0,1,1,2,0,3,4,2, 145,32} }, +{ {0,1,1,2,0,3,4,3, 144,32} }, +{ {0,1,1,2,0,3,4,4, 144,13} }, +{ {0,1,1,2,0,3,4,5, 169,32} }, +{ {0,1,1,2,1,0,0,0, 38,5} }, +{ {0,1,1,2,1,0,0,1, 55,2} }, +{ {0,1,1,2,1,0,0,2, 51,22} }, +{ {0,1,1,2,1,0,0,3, 115,13} }, +{ {0,1,1,2,1,0,1,0, 27,46} }, +{ {0,1,1,2,1,0,1,1, 16,29} }, +{ {0,1,1,2,1,0,1,2, 40,46} }, +{ {0,1,1,2,1,0,1,3, 76,46} }, +{ {0,1,1,2,1,0,2,0, 50,31} }, +{ {0,1,1,2,1,0,2,1, 56,3} }, +{ {0,1,1,2,1,0,2,2, 39,24} }, +{ {0,1,1,2,1,0,2,3, 116,21} }, +{ {0,1,1,2,1,0,3,0, 102,36} }, +{ {0,1,1,2,1,0,3,1, 117,21} }, +{ {0,1,1,2,1,0,3,2, 105,23} }, +{ {0,1,1,2,1,0,3,3, 105,4} }, +{ {0,1,1,2,1,0,3,4, 157,21} }, +{ {0,1,1,2,1,1,0,0, 27,3} }, +{ {0,1,1,2,1,1,0,1, 16,3} }, +{ {0,1,1,2,1,1,0,2, 40,3} }, +{ {0,1,1,2,1,1,0,3, 76,3} }, +{ {0,1,1,2,1,1,1,0, 21,11} }, +{ {0,1,1,2,1,1,1,1, 7,10} }, +{ {0,1,1,2,1,1,1,2, 34,11} }, +{ {0,1,1,2,1,1,1,3, 70,11} }, +{ {0,1,1,2,1,1,2,0, 30,3} }, +{ {0,1,1,2,1,1,2,1, 16,31} }, +{ {0,1,1,2,1,1,2,2, 26,24} }, +{ {0,1,1,2,1,1,2,3, 85,3} }, +{ {0,1,1,2,1,1,3,0, 67,42} }, +{ {0,1,1,2,1,1,3,1, 62,42} }, +{ {0,1,1,2,1,1,3,2, 81,42} }, +{ {0,1,1,2,1,1,3,3, 81,3} }, +{ {0,1,1,2,1,1,3,4, 131,42} }, +{ {0,1,1,2,1,2,0,0, 50,4} }, +{ {0,1,1,2,1,2,0,1, 56,13} }, +{ {0,1,1,2,1,2,0,2, 39,22} }, +{ {0,1,1,2,1,2,0,3, 116,13} }, +{ {0,1,1,2,1,2,1,0, 30,27} }, +{ {0,1,1,2,1,2,1,1, 16,4} }, +{ {0,1,1,2,1,2,1,2, 26,22} }, +{ {0,1,1,2,1,2,1,3, 85,27} }, +{ {0,1,1,2,1,2,2,0, 57,0} }, +{ {0,1,1,2,1,2,2,1, 55,5} }, +{ {0,1,1,2,1,2,2,2, 15,5} }, +{ {0,1,1,2,1,2,2,3, 119,0} }, +{ {0,1,1,2,1,2,3,0, 120,0} }, +{ {0,1,1,2,1,2,3,1, 117,9} }, +{ {0,1,1,2,1,2,3,2, 74,22} }, +{ {0,1,1,2,1,2,3,3, 99,5} }, +{ {0,1,1,2,1,2,3,4, 159,0} }, +{ {0,1,1,2,1,3,0,0, 102,25} }, +{ {0,1,1,2,1,3,0,1, 117,27} }, +{ {0,1,1,2,1,3,0,2, 105,38} }, +{ {0,1,1,2,1,3,0,3, 105,31} }, +{ {0,1,1,2,1,3,0,4, 157,40} }, +{ {0,1,1,2,1,3,1,0, 67,27} }, +{ {0,1,1,2,1,3,1,1, 62,27} }, +{ {0,1,1,2,1,3,1,2, 81,27} }, +{ {0,1,1,2,1,3,1,3, 81,46} }, +{ {0,1,1,2,1,3,1,4, 131,27} }, +{ {0,1,1,2,1,3,2,0, 120,19} }, +{ {0,1,1,2,1,3,2,1, 117,7} }, +{ {0,1,1,2,1,3,2,2, 74,24} }, +{ {0,1,1,2,1,3,2,3, 99,30} }, +{ {0,1,1,2,1,3,2,4, 159,19} }, +{ {0,1,1,2,1,3,3,0, 120,13} }, +{ {0,1,1,2,1,3,3,1, 117,10} }, +{ {0,1,1,2,1,3,3,2, 99,22} }, +{ {0,1,1,2,1,3,3,3, 74,5} }, +{ {0,1,1,2,1,3,3,4, 159,13} }, +{ {0,1,1,2,1,3,4,0, 160,0} }, +{ {0,1,1,2,1,3,4,1, 161,0} }, +{ {0,1,1,2,1,3,4,2, 143,23} }, +{ {0,1,1,2,1,3,4,3, 143,36} }, +{ {0,1,1,2,1,3,4,4, 143,25} }, +{ {0,1,1,2,1,3,4,5, 176,0} }, +{ {0,1,1,2,2,0,0,0, 30,5} }, +{ {0,1,1,2,2,0,0,1, 57,2} }, +{ {0,1,1,2,2,0,0,2, 50,22} }, +{ {0,1,1,2,2,0,0,3, 120,12} }, +{ {0,1,1,2,2,0,1,0, 53,36} }, +{ {0,1,1,2,2,0,1,1, 30,25} }, +{ {0,1,1,2,2,0,1,2, 48,44} }, +{ {0,1,1,2,2,0,1,3, 111,26} }, +{ {0,1,1,2,2,0,2,0, 48,30} }, +{ {0,1,1,2,2,0,2,1, 50,29} }, +{ {0,1,1,2,2,0,2,2, 36,4} }, +{ {0,1,1,2,2,0,2,3, 104,47} }, +{ {0,1,1,2,2,0,3,0, 111,36} }, +{ {0,1,1,2,2,0,3,1, 120,15} }, +{ {0,1,1,2,2,0,3,2, 104,23} }, +{ {0,1,1,2,2,0,3,3, 114,5} }, +{ {0,1,1,2,2,0,3,4, 162,0} }, +{ {0,1,1,2,2,1,0,0, 53,25} }, +{ {0,1,1,2,2,1,0,1, 30,9} }, +{ {0,1,1,2,2,1,0,2, 48,9} }, +{ {0,1,1,2,2,1,0,3, 111,43} }, +{ {0,1,1,2,2,1,1,0, 52,9} }, +{ {0,1,1,2,2,1,1,1, 21,5} }, +{ {0,1,1,2,2,1,1,2, 45,22} }, +{ {0,1,1,2,2,1,1,3, 110,26} }, +{ {0,1,1,2,2,1,2,0, 53,8} }, +{ {0,1,1,2,2,1,2,1, 27,36} }, +{ {0,1,1,2,2,1,2,2, 23,24} }, +{ {0,1,1,2,2,1,2,3, 112,43} }, +{ {0,1,1,2,2,1,3,0, 107,43} }, +{ {0,1,1,2,2,1,3,1, 67,9} }, +{ {0,1,1,2,2,1,3,2, 92,9} }, +{ {0,1,1,2,2,1,3,3, 108,5} }, +{ {0,1,1,2,2,1,3,4, 147,43} }, +{ {0,1,1,2,2,2,0,0, 48,5} }, +{ {0,1,1,2,2,2,0,1, 50,3} }, +{ {0,1,1,2,2,2,0,2, 36,31} }, +{ {0,1,1,2,2,2,0,3, 104,2} }, +{ {0,1,1,2,2,2,1,0, 53,45} }, +{ {0,1,1,2,2,2,1,1, 27,25} }, +{ {0,1,1,2,2,2,1,2, 23,37} }, +{ {0,1,1,2,2,2,1,3, 112,26} }, +{ {0,1,1,2,2,2,2,0, 30,11} }, +{ {0,1,1,2,2,2,2,1, 38,11} }, +{ {0,1,1,2,2,2,2,2, 6,5} }, +{ {0,1,1,2,2,2,2,3, 85,11} }, +{ {0,1,1,2,2,2,3,0, 111,3} }, +{ {0,1,1,2,2,2,3,1, 102,3} }, +{ {0,1,1,2,2,2,3,2, 71,37} }, +{ {0,1,1,2,2,2,3,3, 91,5} }, +{ {0,1,1,2,2,2,3,4, 153,3} }, +{ {0,1,1,2,2,3,0,0, 111,25} }, +{ {0,1,1,2,2,3,0,1, 120,7} }, +{ {0,1,1,2,2,3,0,2, 104,38} }, +{ {0,1,1,2,2,3,0,3, 114,30} }, +{ {0,1,1,2,2,3,0,4, 162,19} }, +{ {0,1,1,2,2,3,1,0, 107,26} }, +{ {0,1,1,2,2,3,1,1, 67,44} }, +{ {0,1,1,2,2,3,1,2, 92,44} }, +{ {0,1,1,2,2,3,1,3, 108,30} }, +{ {0,1,1,2,2,3,1,4, 147,26} }, +{ {0,1,1,2,2,3,2,0, 111,46} }, +{ {0,1,1,2,2,3,2,1, 102,46} }, +{ {0,1,1,2,2,3,2,2, 71,24} }, +{ {0,1,1,2,2,3,2,3, 91,30} }, +{ {0,1,1,2,2,3,2,4, 153,46} }, +{ {0,1,1,2,2,3,3,0, 121,0} }, +{ {0,1,1,2,2,3,3,1, 120,23} }, +{ {0,1,1,2,2,3,3,2, 98,22} }, +{ {0,1,1,2,2,3,3,3, 66,5} }, +{ {0,1,1,2,2,3,3,4, 163,0} }, +{ {0,1,1,2,2,3,4,0, 164,0} }, +{ {0,1,1,2,2,3,4,1, 160,15} }, +{ {0,1,1,2,2,3,4,2, 142,23} }, +{ {0,1,1,2,2,3,4,3, 150,30} }, +{ {0,1,1,2,2,3,4,4, 150,5} }, +{ {0,1,1,2,2,3,4,5, 177,0} }, +{ {0,1,1,2,3,0,0,0, 85,5} }, +{ {0,1,1,2,3,0,0,1, 119,7} }, +{ {0,1,1,2,3,0,0,2, 99,23} }, +{ {0,1,1,2,3,0,0,3, 116,11} }, +{ {0,1,1,2,3,0,0,4, 159,12} }, +{ {0,1,1,2,3,0,1,0, 112,45} }, +{ {0,1,1,2,3,0,1,1, 85,25} }, +{ {0,1,1,2,3,0,1,2, 91,38} }, +{ {0,1,1,2,3,0,1,3, 104,27} }, +{ {0,1,1,2,3,0,1,4, 153,26} }, +{ {0,1,1,2,3,0,2,0, 104,37} }, +{ {0,1,1,2,3,0,2,1, 116,7} }, +{ {0,1,1,2,3,0,2,2, 78,39} }, +{ {0,1,1,2,3,0,2,3, 122,0} }, +{ {0,1,1,2,3,0,2,4, 165,0} }, +{ {0,1,1,2,3,0,3,0, 91,28} }, +{ {0,1,1,2,3,0,3,1, 99,28} }, +{ {0,1,1,2,3,0,3,2, 106,23} }, +{ {0,1,1,2,3,0,3,3, 78,29} }, +{ {0,1,1,2,3,0,3,4, 141,47} }, +{ {0,1,1,2,3,0,4,0, 153,36} }, +{ {0,1,1,2,3,0,4,1, 159,15} }, +{ {0,1,1,2,3,0,4,2, 141,23} }, +{ {0,1,1,2,3,0,4,3, 165,20} }, +{ {0,1,1,2,3,0,4,4, 156,24} }, +{ {0,1,1,2,3,0,4,5, 178,0} }, +{ {0,1,1,2,3,1,0,0, 112,8} }, +{ {0,1,1,2,3,1,0,1, 85,9} }, +{ {0,1,1,2,3,1,0,2, 91,23} }, +{ {0,1,1,2,3,1,0,3, 104,42} }, +{ {0,1,1,2,3,1,0,4, 153,43} }, +{ {0,1,1,2,3,1,1,0, 110,8} }, +{ {0,1,1,2,3,1,1,1, 70,5} }, +{ {0,1,1,2,3,1,1,2, 89,23} }, +{ {0,1,1,2,3,1,1,3, 101,27} }, +{ {0,1,1,2,3,1,1,4, 152,26} }, +{ {0,1,1,2,3,1,2,0, 111,8} }, +{ {0,1,1,2,3,1,2,1, 76,36} }, +{ {0,1,1,2,3,1,2,2, 65,39} }, +{ {0,1,1,2,3,1,2,3, 104,9} }, +{ {0,1,1,2,3,1,2,4, 153,8} }, +{ {0,1,1,2,3,1,3,0, 108,28} }, +{ {0,1,1,2,3,1,3,1, 81,36} }, +{ {0,1,1,2,3,1,3,2, 93,23} }, +{ {0,1,1,2,3,1,3,3, 68,29} }, +{ {0,1,1,2,3,1,3,4, 149,47} }, +{ {0,1,1,2,3,1,4,0, 147,8} }, +{ {0,1,1,2,3,1,4,1, 131,9} }, +{ {0,1,1,2,3,1,4,2, 135,23} }, +{ {0,1,1,2,3,1,4,3, 142,42} }, +{ {0,1,1,2,3,1,4,4, 149,24} }, +{ {0,1,1,2,3,1,4,5, 171,43} }, +{ {0,1,1,2,3,2,0,0, 104,24} }, +{ {0,1,1,2,3,2,0,1, 116,23} }, +{ {0,1,1,2,3,2,0,2, 78,22} }, +{ {0,1,1,2,3,2,0,3, 122,19} }, +{ {0,1,1,2,3,2,0,4, 165,19} }, +{ {0,1,1,2,3,2,1,0, 111,45} }, +{ {0,1,1,2,3,2,1,1, 76,25} }, +{ {0,1,1,2,3,2,1,2, 65,22} }, +{ {0,1,1,2,3,2,1,3, 104,44} }, +{ {0,1,1,2,3,2,1,4, 153,45} }, +{ {0,1,1,2,3,2,2,0, 120,22} }, +{ {0,1,1,2,3,2,2,1, 115,23} }, +{ {0,1,1,2,3,2,2,2, 61,22} }, +{ {0,1,1,2,3,2,2,3, 116,5} }, +{ {0,1,1,2,3,2,2,4, 159,22} }, +{ {0,1,1,2,3,2,3,0, 114,46} }, +{ {0,1,1,2,3,2,3,1, 105,29} }, +{ {0,1,1,2,3,2,3,2, 75,22} }, +{ {0,1,1,2,3,2,3,3, 78,4} }, +{ {0,1,1,2,3,2,3,4, 156,47} }, +{ {0,1,1,2,3,2,4,0, 162,35} }, +{ {0,1,1,2,3,2,4,1, 157,34} }, +{ {0,1,1,2,3,2,4,2, 128,22} }, +{ {0,1,1,2,3,2,4,3, 165,35} }, +{ {0,1,1,2,3,2,4,4, 141,24} }, +{ {0,1,1,2,3,2,4,5, 178,35} }, +{ {0,1,1,2,3,3,0,0, 91,11} }, +{ {0,1,1,2,3,3,0,1, 99,2} }, +{ {0,1,1,2,3,3,0,2, 106,38} }, +{ {0,1,1,2,3,3,0,3, 78,10} }, +{ {0,1,1,2,3,3,0,4, 141,2} }, +{ {0,1,1,2,3,3,1,0, 108,11} }, +{ {0,1,1,2,3,3,1,1, 81,25} }, +{ {0,1,1,2,3,3,1,2, 93,38} }, +{ {0,1,1,2,3,3,1,3, 68,10} }, +{ {0,1,1,2,3,3,1,4, 149,2} }, +{ {0,1,1,2,3,3,2,0, 114,3} }, +{ {0,1,1,2,3,3,2,1, 105,10} }, +{ {0,1,1,2,3,3,2,2, 75,39} }, +{ {0,1,1,2,3,3,2,3, 78,31} }, +{ {0,1,1,2,3,3,2,4, 156,2} }, +{ {0,1,1,2,3,3,3,0, 66,11} }, +{ {0,1,1,2,3,3,3,1, 74,11} }, +{ {0,1,1,2,3,3,3,2, 86,11} }, +{ {0,1,1,2,3,3,3,3, 60,11} }, +{ {0,1,1,2,3,3,3,4, 130,11} }, +{ {0,1,1,2,3,3,4,0, 150,11} }, +{ {0,1,1,2,3,3,4,1, 143,3} }, +{ {0,1,1,2,3,3,4,2, 144,23} }, +{ {0,1,1,2,3,3,4,3, 133,10} }, +{ {0,1,1,2,3,3,4,4, 138,11} }, +{ {0,1,1,2,3,3,4,5, 173,2} }, +{ {0,1,1,2,3,4,0,0, 153,25} }, +{ {0,1,1,2,3,4,0,1, 159,7} }, +{ {0,1,1,2,3,4,0,2, 141,38} }, +{ {0,1,1,2,3,4,0,3, 165,41} }, +{ {0,1,1,2,3,4,0,4, 156,37} }, +{ {0,1,1,2,3,4,0,5, 178,19} }, +{ {0,1,1,2,3,4,1,0, 147,45} }, +{ {0,1,1,2,3,4,1,1, 131,44} }, +{ {0,1,1,2,3,4,1,2, 135,38} }, +{ {0,1,1,2,3,4,1,3, 142,27} }, +{ {0,1,1,2,3,4,1,4, 149,37} }, +{ {0,1,1,2,3,4,1,5, 171,26} }, +{ {0,1,1,2,3,4,2,0, 162,6} }, +{ {0,1,1,2,3,4,2,1, 157,7} }, +{ {0,1,1,2,3,4,2,2, 128,39} }, +{ {0,1,1,2,3,4,2,3, 165,6} }, +{ {0,1,1,2,3,4,2,4, 141,37} }, +{ {0,1,1,2,3,4,2,5, 178,6} }, +{ {0,1,1,2,3,4,3,0, 150,28} }, +{ {0,1,1,2,3,4,3,1, 143,46} }, +{ {0,1,1,2,3,4,3,2, 144,38} }, +{ {0,1,1,2,3,4,3,3, 133,29} }, +{ {0,1,1,2,3,4,3,4, 138,28} }, +{ {0,1,1,2,3,4,3,5, 173,47} }, +{ {0,1,1,2,3,4,4,0, 163,15} }, +{ {0,1,1,2,3,4,4,1, 159,23} }, +{ {0,1,1,2,3,4,4,2, 139,23} }, +{ {0,1,1,2,3,4,4,3, 158,11} }, +{ {0,1,1,2,3,4,4,4, 130,5} }, +{ {0,1,1,2,3,4,4,5, 179,0} }, +{ {0,1,1,2,3,4,5,0, 177,15} }, +{ {0,1,1,2,3,4,5,1, 176,15} }, +{ {0,1,1,2,3,4,5,2, 169,23} }, +{ {0,1,1,2,3,4,5,3, 180,0} }, +{ {0,1,1,2,3,4,5,4, 173,37} }, +{ {0,1,1,2,3,4,5,5, 173,24} }, +{ {0,1,1,2,3,4,5,6, 183,0} }, +{ {0,1,2,0,0,0,0,0, 7,11} }, +{ {0,1,2,0,0,0,0,1, 16,2} }, +{ {0,1,2,0,0,0,0,2, 16,28} }, +{ {0,1,2,0,0,0,0,3, 62,33} }, +{ {0,1,2,0,0,0,1,0, 21,10} }, +{ {0,1,2,0,0,0,1,1, 27,2} }, +{ {0,1,2,0,0,0,1,2, 30,2} }, +{ {0,1,2,0,0,0,1,3, 67,33} }, +{ {0,1,2,0,0,0,2,0, 34,10} }, +{ {0,1,2,0,0,0,2,1, 40,2} }, +{ {0,1,2,0,0,0,2,2, 26,25} }, +{ {0,1,2,0,0,0,2,3, 81,33} }, +{ {0,1,2,0,0,0,3,0, 70,10} }, +{ {0,1,2,0,0,0,3,1, 76,2} }, +{ {0,1,2,0,0,0,3,2, 85,2} }, +{ {0,1,2,0,0,0,3,3, 81,2} }, +{ {0,1,2,0,0,0,3,4, 131,33} }, +{ {0,1,2,0,0,1,0,0, 34,4} }, +{ {0,1,2,0,0,1,0,1, 26,9} }, +{ {0,1,2,0,0,1,0,2, 40,47} }, +{ {0,1,2,0,0,1,0,3, 81,12} }, +{ {0,1,2,0,0,1,1,0, 45,9} }, +{ {0,1,2,0,0,1,1,1, 23,36} }, +{ {0,1,2,0,0,1,1,2, 48,33} }, +{ {0,1,2,0,0,1,1,3, 92,33} }, +{ {0,1,2,0,0,1,2,0, 46,9} }, +{ {0,1,2,0,0,1,2,1, 29,9} }, +{ {0,1,2,0,0,1,2,2, 29,44} }, +{ {0,1,2,0,0,1,2,3, 94,43} }, +{ {0,1,2,0,0,1,3,0, 89,8} }, +{ {0,1,2,0,0,1,3,1, 65,9} }, +{ {0,1,2,0,0,1,3,2, 91,43} }, +{ {0,1,2,0,0,1,3,3, 93,43} }, +{ {0,1,2,0,0,1,3,4, 135,43} }, +{ {0,1,2,0,0,2,0,0, 21,4} }, +{ {0,1,2,0,0,2,0,1, 30,12} }, +{ {0,1,2,0,0,2,0,2, 27,47} }, +{ {0,1,2,0,0,2,0,3, 67,12} }, +{ {0,1,2,0,0,2,1,0, 52,12} }, +{ {0,1,2,0,0,2,1,1, 53,32} }, +{ {0,1,2,0,0,2,1,2, 53,13} }, +{ {0,1,2,0,0,2,1,3, 107,32} }, +{ {0,1,2,0,0,2,2,0, 45,27} }, +{ {0,1,2,0,0,2,2,1, 48,12} }, +{ {0,1,2,0,0,2,2,2, 23,25} }, +{ {0,1,2,0,0,2,2,3, 92,12} }, +{ {0,1,2,0,0,2,3,0, 110,23} }, +{ {0,1,2,0,0,2,3,1, 111,32} }, +{ {0,1,2,0,0,2,3,2, 112,32} }, +{ {0,1,2,0,0,2,3,3, 108,4} }, +{ {0,1,2,0,0,2,3,4, 147,32} }, +{ {0,1,2,0,0,3,0,0, 70,4} }, +{ {0,1,2,0,0,3,0,1, 85,12} }, +{ {0,1,2,0,0,3,0,2, 76,47} }, +{ {0,1,2,0,0,3,0,3, 81,47} }, +{ {0,1,2,0,0,3,0,4, 131,12} }, +{ {0,1,2,0,0,3,1,0, 110,13} }, +{ {0,1,2,0,0,3,1,1, 112,13} }, +{ {0,1,2,0,0,3,1,2, 111,13} }, +{ {0,1,2,0,0,3,1,3, 108,31} }, +{ {0,1,2,0,0,3,1,4, 147,13} }, +{ {0,1,2,0,0,3,2,0, 89,26} }, +{ {0,1,2,0,0,3,2,1, 91,26} }, +{ {0,1,2,0,0,3,2,2, 65,44} }, +{ {0,1,2,0,0,3,2,3, 93,26} }, +{ {0,1,2,0,0,3,2,4, 135,26} }, +{ {0,1,2,0,0,3,3,0, 101,22} }, +{ {0,1,2,0,0,3,3,1, 104,33} }, +{ {0,1,2,0,0,3,3,2, 104,12} }, +{ {0,1,2,0,0,3,3,3, 68,30} }, +{ {0,1,2,0,0,3,3,4, 142,33} }, +{ {0,1,2,0,0,3,4,0, 152,23} }, +{ {0,1,2,0,0,3,4,1, 153,32} }, +{ {0,1,2,0,0,3,4,2, 153,13} }, +{ {0,1,2,0,0,3,4,3, 149,36} }, +{ {0,1,2,0,0,3,4,4, 149,25} }, +{ {0,1,2,0,0,3,4,5, 171,32} }, +{ {0,1,2,0,1,0,0,0, 16,30} }, +{ {0,1,2,0,1,0,0,1, 55,3} }, +{ {0,1,2,0,1,0,0,2, 56,2} }, +{ {0,1,2,0,1,0,0,3, 117,20} }, +{ {0,1,2,0,1,0,1,0, 27,37} }, +{ {0,1,2,0,1,0,1,1, 38,4} }, +{ {0,1,2,0,1,0,1,2, 50,28} }, +{ {0,1,2,0,1,0,1,3, 102,47} }, +{ {0,1,2,0,1,0,2,0, 40,37} }, +{ {0,1,2,0,1,0,2,1, 51,26} }, +{ {0,1,2,0,1,0,2,2, 39,25} }, +{ {0,1,2,0,1,0,2,3, 105,26} }, +{ {0,1,2,0,1,0,3,0, 76,37} }, +{ {0,1,2,0,1,0,3,1, 115,8} }, +{ {0,1,2,0,1,0,3,2, 116,20} }, +{ {0,1,2,0,1,0,3,3, 105,5} }, +{ {0,1,2,0,1,0,3,4, 157,20} }, +{ {0,1,2,0,1,1,0,0, 26,3} }, +{ {0,1,2,0,1,1,0,1, 15,3} }, +{ {0,1,2,0,1,1,0,2, 39,3} }, +{ {0,1,2,0,1,1,0,3, 74,3} }, +{ {0,1,2,0,1,1,1,0, 23,3} }, +{ {0,1,2,0,1,1,1,1, 6,10} }, +{ {0,1,2,0,1,1,1,2, 36,3} }, +{ {0,1,2,0,1,1,1,3, 71,3} }, +{ {0,1,2,0,1,1,2,0, 29,42} }, +{ {0,1,2,0,1,1,2,1, 18,9} }, +{ {0,1,2,0,1,1,2,2, 42,42} }, +{ {0,1,2,0,1,1,2,3, 79,42} }, +{ {0,1,2,0,1,1,3,0, 65,42} }, +{ {0,1,2,0,1,1,3,1, 61,9} }, +{ {0,1,2,0,1,1,3,2, 78,42} }, +{ {0,1,2,0,1,1,3,3, 75,42} }, +{ {0,1,2,0,1,1,3,4, 128,42} }, +{ {0,1,2,0,1,2,0,0, 30,24} }, +{ {0,1,2,0,1,2,0,1, 57,6} }, +{ {0,1,2,0,1,2,0,2, 50,30} }, +{ {0,1,2,0,1,2,0,3, 120,18} }, +{ {0,1,2,0,1,2,1,0, 53,23} }, +{ {0,1,2,0,1,2,1,1, 30,4} }, +{ {0,1,2,0,1,2,1,2, 48,29} }, +{ {0,1,2,0,1,2,1,3, 111,47} }, +{ {0,1,2,0,1,2,2,0, 48,39} }, +{ {0,1,2,0,1,2,2,1, 50,27} }, +{ {0,1,2,0,1,2,2,2, 36,25} }, +{ {0,1,2,0,1,2,2,3, 104,26} }, +{ {0,1,2,0,1,2,3,0, 111,23} }, +{ {0,1,2,0,1,2,3,1, 120,9} }, +{ {0,1,2,0,1,2,3,2, 104,36} }, +{ {0,1,2,0,1,2,3,3, 114,24} }, +{ {0,1,2,0,1,2,3,4, 162,21} }, +{ {0,1,2,0,1,3,0,0, 85,24} }, +{ {0,1,2,0,1,3,0,1, 119,6} }, +{ {0,1,2,0,1,3,0,2, 116,6} }, +{ {0,1,2,0,1,3,0,3, 99,31} }, +{ {0,1,2,0,1,3,0,4, 159,18} }, +{ {0,1,2,0,1,3,1,0, 112,38} }, +{ {0,1,2,0,1,3,1,1, 85,4} }, +{ {0,1,2,0,1,3,1,2, 104,46} }, +{ {0,1,2,0,1,3,1,3, 91,31} }, +{ {0,1,2,0,1,3,1,4, 153,47} }, +{ {0,1,2,0,1,3,2,0, 91,45} }, +{ {0,1,2,0,1,3,2,1, 99,26} }, +{ {0,1,2,0,1,3,2,2, 78,44} }, +{ {0,1,2,0,1,3,2,3, 106,26} }, +{ {0,1,2,0,1,3,2,4, 141,26} }, +{ {0,1,2,0,1,3,3,0, 104,22} }, +{ {0,1,2,0,1,3,3,1, 116,10} }, +{ {0,1,2,0,1,3,3,2, 122,1} }, +{ {0,1,2,0,1,3,3,3, 78,30} }, +{ {0,1,2,0,1,3,3,4, 165,21} }, +{ {0,1,2,0,1,3,4,0, 153,23} }, +{ {0,1,2,0,1,3,4,1, 159,9} }, +{ {0,1,2,0,1,3,4,2, 165,1} }, +{ {0,1,2,0,1,3,4,3, 141,36} }, +{ {0,1,2,0,1,3,4,4, 156,25} }, +{ {0,1,2,0,1,3,4,5, 178,21} }, +{ {0,1,2,0,2,0,0,0, 16,5} }, +{ {0,1,2,0,2,0,0,1, 56,8} }, +{ {0,1,2,0,2,0,0,2, 55,4} }, +{ {0,1,2,0,2,0,0,3, 117,12} }, +{ {0,1,2,0,2,0,1,0, 30,22} }, +{ {0,1,2,0,2,0,1,1, 50,5} }, +{ {0,1,2,0,2,0,1,2, 57,1} }, +{ {0,1,2,0,2,0,1,3, 120,1} }, +{ {0,1,2,0,2,0,2,0, 26,27} }, +{ {0,1,2,0,2,0,2,1, 39,27} }, +{ {0,1,2,0,2,0,2,2, 15,4} }, +{ {0,1,2,0,2,0,2,3, 74,27} }, +{ {0,1,2,0,2,0,3,0, 85,22} }, +{ {0,1,2,0,2,0,3,1, 116,8} }, +{ {0,1,2,0,2,0,3,2, 119,1} }, +{ {0,1,2,0,2,0,3,3, 99,4} }, +{ {0,1,2,0,2,0,3,4, 159,1} }, +{ {0,1,2,0,2,1,0,0, 40,24} }, +{ {0,1,2,0,2,1,0,1, 39,9} }, +{ {0,1,2,0,2,1,0,2, 51,8} }, +{ {0,1,2,0,2,1,0,3, 105,43} }, +{ {0,1,2,0,2,1,1,0, 48,22} }, +{ {0,1,2,0,2,1,1,1, 36,36} }, +{ {0,1,2,0,2,1,1,2, 50,9} }, +{ {0,1,2,0,2,1,1,3, 104,43} }, +{ {0,1,2,0,2,1,2,0, 29,27} }, +{ {0,1,2,0,2,1,2,1, 42,9} }, +{ {0,1,2,0,2,1,2,2, 18,27} }, +{ {0,1,2,0,2,1,2,3, 79,27} }, +{ {0,1,2,0,2,1,3,0, 91,8} }, +{ {0,1,2,0,2,1,3,1, 78,9} }, +{ {0,1,2,0,2,1,3,2, 99,8} }, +{ {0,1,2,0,2,1,3,3, 106,43} }, +{ {0,1,2,0,2,1,3,4, 141,43} }, +{ {0,1,2,0,2,2,0,0, 27,24} }, +{ {0,1,2,0,2,2,0,1, 50,2} }, +{ {0,1,2,0,2,2,0,2, 38,10} }, +{ {0,1,2,0,2,2,0,3, 102,2} }, +{ {0,1,2,0,2,2,1,0, 53,38} }, +{ {0,1,2,0,2,2,1,1, 48,4} }, +{ {0,1,2,0,2,2,1,2, 30,10} }, +{ {0,1,2,0,2,2,1,3, 111,2} }, +{ {0,1,2,0,2,2,2,0, 23,46} }, +{ {0,1,2,0,2,2,2,1, 36,46} }, +{ {0,1,2,0,2,2,2,2, 6,4} }, +{ {0,1,2,0,2,2,2,3, 71,46} }, +{ {0,1,2,0,2,2,3,0, 112,23} }, +{ {0,1,2,0,2,2,3,1, 104,3} }, +{ {0,1,2,0,2,2,3,2, 85,10} }, +{ {0,1,2,0,2,2,3,3, 91,4} }, +{ {0,1,2,0,2,2,3,4, 153,2} }, +{ {0,1,2,0,2,3,0,0, 76,24} }, +{ {0,1,2,0,2,3,0,1, 116,26} }, +{ {0,1,2,0,2,3,0,2, 115,26} }, +{ {0,1,2,0,2,3,0,3, 105,30} }, +{ {0,1,2,0,2,3,0,4, 157,41} }, +{ {0,1,2,0,2,3,1,0, 111,38} }, +{ {0,1,2,0,2,3,1,1, 104,25} }, +{ {0,1,2,0,2,3,1,2, 120,27} }, +{ {0,1,2,0,2,3,1,3, 114,37} }, +{ {0,1,2,0,2,3,1,4, 162,40} }, +{ {0,1,2,0,2,3,2,0, 65,27} }, +{ {0,1,2,0,2,3,2,1, 78,27} }, +{ {0,1,2,0,2,3,2,2, 61,27} }, +{ {0,1,2,0,2,3,2,3, 75,27} }, +{ {0,1,2,0,2,3,2,4, 128,27} }, +{ {0,1,2,0,2,3,3,0, 104,39} }, +{ {0,1,2,0,2,3,3,1, 122,14} }, +{ {0,1,2,0,2,3,3,2, 116,4} }, +{ {0,1,2,0,2,3,3,3, 78,5} }, +{ {0,1,2,0,2,3,3,4, 165,40} }, +{ {0,1,2,0,2,3,4,0, 153,38} }, +{ {0,1,2,0,2,3,4,1, 165,14} }, +{ {0,1,2,0,2,3,4,2, 159,27} }, +{ {0,1,2,0,2,3,4,3, 156,36} }, +{ {0,1,2,0,2,3,4,4, 141,25} }, +{ {0,1,2,0,2,3,4,5, 178,40} }, +{ {0,1,2,0,3,0,0,0, 62,22} }, +{ {0,1,2,0,3,0,0,1, 117,22} }, +{ {0,1,2,0,3,0,0,2, 117,6} }, +{ {0,1,2,0,3,0,0,3, 117,11} }, +{ {0,1,2,0,3,0,0,4, 161,1} }, +{ {0,1,2,0,3,0,1,0, 67,22} }, +{ {0,1,2,0,3,0,1,1, 102,24} }, +{ {0,1,2,0,3,0,1,2, 120,14} }, +{ {0,1,2,0,3,0,1,3, 120,8} }, +{ {0,1,2,0,3,0,1,4, 160,1} }, +{ {0,1,2,0,3,0,2,0, 81,22} }, +{ {0,1,2,0,3,0,2,1, 105,45} }, +{ {0,1,2,0,3,0,2,2, 74,25} }, +{ {0,1,2,0,3,0,2,3, 99,27} }, +{ {0,1,2,0,3,0,2,4, 143,26} }, +{ {0,1,2,0,3,0,3,0, 81,37} }, +{ {0,1,2,0,3,0,3,1, 105,28} }, +{ {0,1,2,0,3,0,3,2, 99,29} }, +{ {0,1,2,0,3,0,3,3, 74,4} }, +{ {0,1,2,0,3,0,3,4, 143,47} }, +{ {0,1,2,0,3,0,4,0, 131,22} }, +{ {0,1,2,0,3,0,4,1, 157,35} }, +{ {0,1,2,0,3,0,4,2, 159,14} }, +{ {0,1,2,0,3,0,4,3, 159,8} }, +{ {0,1,2,0,3,0,4,4, 143,24} }, +{ {0,1,2,0,3,0,4,5, 176,1} }, +{ {0,1,2,0,3,1,0,0, 81,39} }, +{ {0,1,2,0,3,1,0,1, 74,9} }, +{ {0,1,2,0,3,1,0,2, 105,8} }, +{ {0,1,2,0,3,1,0,3, 99,9} }, +{ {0,1,2,0,3,1,0,4, 143,43} }, +{ {0,1,2,0,3,1,1,0, 92,22} }, +{ {0,1,2,0,3,1,1,1, 71,36} }, +{ {0,1,2,0,3,1,1,2, 104,8} }, +{ {0,1,2,0,3,1,1,3, 98,9} }, +{ {0,1,2,0,3,1,1,4, 142,43} }, +{ {0,1,2,0,3,1,2,0, 94,8} }, +{ {0,1,2,0,3,1,2,1, 79,9} }, +{ {0,1,2,0,3,1,2,2, 79,44} }, +{ {0,1,2,0,3,1,2,3, 100,8} }, +{ {0,1,2,0,3,1,2,4, 145,43} }, +{ {0,1,2,0,3,1,3,0, 93,8} }, +{ {0,1,2,0,3,1,3,1, 75,9} }, +{ {0,1,2,0,3,1,3,2, 106,8} }, +{ {0,1,2,0,3,1,3,3, 86,4} }, +{ {0,1,2,0,3,1,3,4, 144,43} }, +{ {0,1,2,0,3,1,4,0, 135,8} }, +{ {0,1,2,0,3,1,4,1, 128,9} }, +{ {0,1,2,0,3,1,4,2, 141,8} }, +{ {0,1,2,0,3,1,4,3, 139,8} }, +{ {0,1,2,0,3,1,4,4, 144,8} }, +{ {0,1,2,0,3,1,4,5, 169,43} }, +{ {0,1,2,0,3,2,0,0, 67,39} }, +{ {0,1,2,0,3,2,0,1, 120,6} }, +{ {0,1,2,0,3,2,0,2, 102,37} }, +{ {0,1,2,0,3,2,0,3, 120,26} }, +{ {0,1,2,0,3,2,0,4, 160,18} }, +{ {0,1,2,0,3,2,1,0, 107,23} }, +{ {0,1,2,0,3,2,1,1, 111,24} }, +{ {0,1,2,0,3,2,1,2, 111,37} }, +{ {0,1,2,0,3,2,1,3, 121,1} }, +{ {0,1,2,0,3,2,1,4, 164,1} }, +{ {0,1,2,0,3,2,2,0, 92,39} }, +{ {0,1,2,0,3,2,2,1, 104,45} }, +{ {0,1,2,0,3,2,2,2, 71,25} }, +{ {0,1,2,0,3,2,2,3, 98,27} }, +{ {0,1,2,0,3,2,2,4, 142,26} }, +{ {0,1,2,0,3,2,3,0, 108,29} }, +{ {0,1,2,0,3,2,3,1, 114,47} }, +{ {0,1,2,0,3,2,3,2, 91,29} }, +{ {0,1,2,0,3,2,3,3, 66,4} }, +{ {0,1,2,0,3,2,3,4, 150,29} }, +{ {0,1,2,0,3,2,4,0, 147,23} }, +{ {0,1,2,0,3,2,4,1, 162,14} }, +{ {0,1,2,0,3,2,4,2, 153,37} }, +{ {0,1,2,0,3,2,4,3, 163,1} }, +{ {0,1,2,0,3,2,4,4, 150,4} }, +{ {0,1,2,0,3,2,4,5, 177,1} }, +{ {0,1,2,0,3,3,0,0, 81,24} }, +{ {0,1,2,0,3,3,0,1, 99,3} }, +{ {0,1,2,0,3,3,0,2, 105,11} }, +{ {0,1,2,0,3,3,0,3, 74,10} }, +{ {0,1,2,0,3,3,0,4, 143,2} }, +{ {0,1,2,0,3,3,1,0, 108,10} }, +{ {0,1,2,0,3,3,1,1, 91,10} }, +{ {0,1,2,0,3,3,1,2, 114,2} }, +{ {0,1,2,0,3,3,1,3, 66,10} }, +{ {0,1,2,0,3,3,1,4, 150,10} }, +{ {0,1,2,0,3,3,2,0, 93,45} }, +{ {0,1,2,0,3,3,2,1, 106,45} }, +{ {0,1,2,0,3,3,2,2, 75,44} }, +{ {0,1,2,0,3,3,2,3, 86,10} }, +{ {0,1,2,0,3,3,2,4, 144,26} }, +{ {0,1,2,0,3,3,3,0, 68,11} }, +{ {0,1,2,0,3,3,3,1, 78,11} }, +{ {0,1,2,0,3,3,3,2, 78,28} }, +{ {0,1,2,0,3,3,3,3, 60,10} }, +{ {0,1,2,0,3,3,3,4, 133,11} }, +{ {0,1,2,0,3,3,4,0, 149,3} }, +{ {0,1,2,0,3,3,4,1, 141,3} }, +{ {0,1,2,0,3,3,4,2, 156,3} }, +{ {0,1,2,0,3,3,4,3, 130,10} }, +{ {0,1,2,0,3,3,4,4, 138,10} }, +{ {0,1,2,0,3,3,4,5, 173,3} }, +{ {0,1,2,0,3,4,0,0, 131,39} }, +{ {0,1,2,0,3,4,0,1, 159,6} }, +{ {0,1,2,0,3,4,0,2, 157,6} }, +{ {0,1,2,0,3,4,0,3, 159,26} }, +{ {0,1,2,0,3,4,0,4, 143,37} }, +{ {0,1,2,0,3,4,0,5, 176,18} }, +{ {0,1,2,0,3,4,1,0, 147,38} }, +{ {0,1,2,0,3,4,1,1, 153,24} }, +{ {0,1,2,0,3,4,1,2, 162,17} }, +{ {0,1,2,0,3,4,1,3, 163,18} }, +{ {0,1,2,0,3,4,1,4, 150,31} }, +{ {0,1,2,0,3,4,1,5, 177,18} }, +{ {0,1,2,0,3,4,2,0, 135,45} }, +{ {0,1,2,0,3,4,2,1, 141,45} }, +{ {0,1,2,0,3,4,2,2, 128,44} }, +{ {0,1,2,0,3,4,2,3, 139,26} }, +{ {0,1,2,0,3,4,2,4, 144,45} }, +{ {0,1,2,0,3,4,2,5, 169,26} }, +{ {0,1,2,0,3,4,3,0, 149,46} }, +{ {0,1,2,0,3,4,3,1, 156,46} }, +{ {0,1,2,0,3,4,3,2, 141,46} }, +{ {0,1,2,0,3,4,3,3, 130,4} }, +{ {0,1,2,0,3,4,3,4, 138,29} }, +{ {0,1,2,0,3,4,3,5, 173,46} }, +{ {0,1,2,0,3,4,4,0, 142,22} }, +{ {0,1,2,0,3,4,4,1, 165,34} }, +{ {0,1,2,0,3,4,4,2, 165,7} }, +{ {0,1,2,0,3,4,4,3, 158,10} }, +{ {0,1,2,0,3,4,4,4, 133,30} }, +{ {0,1,2,0,3,4,4,5, 180,1} }, +{ {0,1,2,0,3,4,5,0, 171,23} }, +{ {0,1,2,0,3,4,5,1, 178,34} }, +{ {0,1,2,0,3,4,5,2, 178,7} }, +{ {0,1,2,0,3,4,5,3, 179,1} }, +{ {0,1,2,0,3,4,5,4, 173,36} }, +{ {0,1,2,0,3,4,5,5, 173,25} }, +{ {0,1,2,0,3,4,5,6, 183,1} }, +{ {0,1,2,1,0,0,0,0, 8,11} }, +{ {0,1,2,1,0,0,0,1, 17,2} }, +{ {0,1,2,1,0,0,0,2, 18,28} }, +{ {0,1,2,1,0,0,0,3, 63,33} }, +{ {0,1,2,1,0,0,1,0, 23,10} }, +{ {0,1,2,1,0,0,1,1, 28,2} }, +{ {0,1,2,1,0,0,1,2, 31,2} }, +{ {0,1,2,1,0,0,1,3, 68,33} }, +{ {0,1,2,1,0,0,2,0, 37,2} }, +{ {0,1,2,1,0,0,2,1, 41,2} }, +{ {0,1,2,1,0,0,2,2, 43,2} }, +{ {0,1,2,1,0,0,2,3, 82,33} }, +{ {0,1,2,1,0,0,3,0, 72,10} }, +{ {0,1,2,1,0,0,3,1, 77,34} }, +{ {0,1,2,1,0,0,3,2, 86,2} }, +{ {0,1,2,1,0,0,3,3, 82,2} }, +{ {0,1,2,1,0,0,3,4, 132,33} }, +{ {0,1,2,1,0,1,0,0, 28,8} }, +{ {0,1,2,1,0,1,0,1, 10,9} }, +{ {0,1,2,1,0,1,0,2, 42,47} }, +{ {0,1,2,1,0,1,0,3, 83,12} }, +{ {0,1,2,1,0,1,1,0, 27,8} }, +{ {0,1,2,1,0,1,1,1, 8,37} }, +{ {0,1,2,1,0,1,1,2, 40,35} }, +{ {0,1,2,1,0,1,1,3, 81,8} }, +{ {0,1,2,1,0,1,2,0, 29,8} }, +{ {0,1,2,1,0,1,2,1, 11,9} }, +{ {0,1,2,1,0,1,2,2, 41,35} }, +{ {0,1,2,1,0,1,2,3, 84,8} }, +{ {0,1,2,1,0,1,3,0, 65,8} }, +{ {0,1,2,1,0,1,3,1, 59,8} }, +{ {0,1,2,1,0,1,3,2, 75,35} }, +{ {0,1,2,1,0,1,3,3, 82,8} }, +{ {0,1,2,1,0,1,3,4, 129,8} }, +{ {0,1,2,1,0,2,0,0, 24,29} }, +{ {0,1,2,1,0,2,0,1, 32,12} }, +{ {0,1,2,1,0,2,0,2, 29,47} }, +{ {0,1,2,1,0,2,0,3, 69,12} }, +{ {0,1,2,1,0,2,1,0, 53,12} }, +{ {0,1,2,1,0,2,1,1, 24,23} }, +{ {0,1,2,1,0,2,1,2, 47,34} }, +{ {0,1,2,1,0,2,1,3, 108,32} }, +{ {0,1,2,1,0,2,2,0, 47,12} }, +{ {0,1,2,1,0,2,2,1, 29,23} }, +{ {0,1,2,1,0,2,2,2, 37,5} }, +{ {0,1,2,1,0,2,2,3, 93,12} }, +{ {0,1,2,1,0,2,3,0, 108,14} }, +{ {0,1,2,1,0,2,3,1, 69,34} }, +{ {0,1,2,1,0,2,3,2, 93,34} }, +{ {0,1,2,1,0,2,3,3, 113,32} }, +{ {0,1,2,1,0,2,3,4, 148,32} }, +{ {0,1,2,1,0,3,0,0, 73,47} }, +{ {0,1,2,1,0,3,0,1, 88,12} }, +{ {0,1,2,1,0,3,0,2, 79,47} }, +{ {0,1,2,1,0,3,0,3, 84,47} }, +{ {0,1,2,1,0,3,0,4, 134,12} }, +{ {0,1,2,1,0,3,1,0, 112,15} }, +{ {0,1,2,1,0,3,1,1, 73,39} }, +{ {0,1,2,1,0,3,1,2, 103,15} }, +{ {0,1,2,1,0,3,1,3, 93,37} }, +{ {0,1,2,1,0,3,1,4, 149,13} }, +{ {0,1,2,1,0,3,2,0, 93,27} }, +{ {0,1,2,1,0,3,2,1, 84,23} }, +{ {0,1,2,1,0,3,2,2, 82,44} }, +{ {0,1,2,1,0,3,2,3, 96,13} }, +{ {0,1,2,1,0,3,2,4, 137,13} }, +{ {0,1,2,1,0,3,3,0, 103,33} }, +{ {0,1,2,1,0,3,3,1, 79,23} }, +{ {0,1,2,1,0,3,3,2, 106,34} }, +{ {0,1,2,1,0,3,3,3, 82,30} }, +{ {0,1,2,1,0,3,3,4, 144,33} }, +{ {0,1,2,1,0,3,4,0, 149,35} }, +{ {0,1,2,1,0,3,4,1, 134,34} }, +{ {0,1,2,1,0,3,4,2, 144,15} }, +{ {0,1,2,1,0,3,4,3, 137,35} }, +{ {0,1,2,1,0,3,4,4, 154,14} }, +{ {0,1,2,1,0,3,4,5, 172,32} }, +{ {0,1,2,1,1,0,0,0, 27,30} }, +{ {0,1,2,1,1,0,0,1, 38,23} }, +{ {0,1,2,1,1,0,0,2, 50,14} }, +{ {0,1,2,1,1,0,0,3, 102,14} }, +{ {0,1,2,1,1,0,1,0, 45,31} }, +{ {0,1,2,1,1,0,1,1, 35,24} }, +{ {0,1,2,1,1,0,1,2, 49,14} }, +{ {0,1,2,1,1,0,1,3, 101,14} }, +{ {0,1,2,1,1,0,2,0, 47,36} }, +{ {0,1,2,1,1,0,2,1, 40,34} }, +{ {0,1,2,1,1,0,2,2, 31,25} }, +{ {0,1,2,1,1,0,2,3, 103,14} }, +{ {0,1,2,1,1,0,3,0, 90,35} }, +{ {0,1,2,1,1,0,3,1, 76,34} }, +{ {0,1,2,1,1,0,3,2, 98,14} }, +{ {0,1,2,1,1,0,3,3, 103,35} }, +{ {0,1,2,1,1,0,3,4, 140,14} }, +{ {0,1,2,1,1,1,0,0, 23,42} }, +{ {0,1,2,1,1,1,0,1, 6,9} }, +{ {0,1,2,1,1,1,0,2, 36,42} }, +{ {0,1,2,1,1,1,0,3, 71,42} }, +{ {0,1,2,1,1,1,1,0, 21,3} }, +{ {0,1,2,1,1,1,1,1, 3,31} }, +{ {0,1,2,1,1,1,1,2, 35,3} }, +{ {0,1,2,1,1,1,1,3, 70,3} }, +{ {0,1,2,1,1,1,2,0, 24,8} }, +{ {0,1,2,1,1,1,2,1, 8,36} }, +{ {0,1,2,1,1,1,2,2, 28,25} }, +{ {0,1,2,1,1,1,2,3, 73,42} }, +{ {0,1,2,1,1,1,3,0, 64,8} }, +{ {0,1,2,1,1,1,3,1, 58,9} }, +{ {0,1,2,1,1,1,3,2, 71,8} }, +{ {0,1,2,1,1,1,3,3, 72,42} }, +{ {0,1,2,1,1,1,3,4, 127,42} }, +{ {0,1,2,1,1,2,0,0, 53,4} }, +{ {0,1,2,1,1,2,0,1, 30,23} }, +{ {0,1,2,1,1,2,0,2, 48,34} }, +{ {0,1,2,1,1,2,0,3, 111,14} }, +{ {0,1,2,1,1,2,1,0, 52,14} }, +{ {0,1,2,1,1,2,1,1, 21,24} }, +{ {0,1,2,1,1,2,1,2, 45,30} }, +{ {0,1,2,1,1,2,1,3, 110,14} }, +{ {0,1,2,1,1,2,2,0, 53,35} }, +{ {0,1,2,1,1,2,2,1, 27,23} }, +{ {0,1,2,1,1,2,2,2, 23,5} }, +{ {0,1,2,1,1,2,2,3, 112,14} }, +{ {0,1,2,1,1,2,3,0, 107,14} }, +{ {0,1,2,1,1,2,3,1, 67,34} }, +{ {0,1,2,1,1,2,3,2, 92,34} }, +{ {0,1,2,1,1,2,3,3, 108,24} }, +{ {0,1,2,1,1,2,3,4, 147,14} }, +{ {0,1,2,1,1,3,0,0, 112,25} }, +{ {0,1,2,1,1,3,0,1, 85,23} }, +{ {0,1,2,1,1,3,0,2, 104,15} }, +{ {0,1,2,1,1,3,0,3, 91,36} }, +{ {0,1,2,1,1,3,0,4, 153,14} }, +{ {0,1,2,1,1,3,1,0, 110,15} }, +{ {0,1,2,1,1,3,1,1, 70,24} }, +{ {0,1,2,1,1,3,1,2, 101,15} }, +{ {0,1,2,1,1,3,1,3, 89,31} }, +{ {0,1,2,1,1,3,1,4, 152,14} }, +{ {0,1,2,1,1,3,2,0, 108,45} }, +{ {0,1,2,1,1,3,2,1, 81,23} }, +{ {0,1,2,1,1,3,2,2, 68,44} }, +{ {0,1,2,1,1,3,2,3, 93,36} }, +{ {0,1,2,1,1,3,2,4, 149,26} }, +{ {0,1,2,1,1,3,3,0, 111,35} }, +{ {0,1,2,1,1,3,3,1, 76,23} }, +{ {0,1,2,1,1,3,3,2, 104,34} }, +{ {0,1,2,1,1,3,3,3, 65,30} }, +{ {0,1,2,1,1,3,3,4, 153,35} }, +{ {0,1,2,1,1,3,4,0, 147,35} }, +{ {0,1,2,1,1,3,4,1, 131,34} }, +{ {0,1,2,1,1,3,4,2, 142,15} }, +{ {0,1,2,1,1,3,4,3, 135,36} }, +{ {0,1,2,1,1,3,4,4, 149,5} }, +{ {0,1,2,1,1,3,4,5, 171,14} }, +{ {0,1,2,1,2,0,0,0, 40,5} }, +{ {0,1,2,1,2,0,0,1, 39,23} }, +{ {0,1,2,1,2,0,0,2, 51,14} }, +{ {0,1,2,1,2,0,0,3, 105,14} }, +{ {0,1,2,1,2,0,1,0, 48,37} }, +{ {0,1,2,1,2,0,1,1, 36,23} }, +{ {0,1,2,1,2,0,1,2, 50,15} }, +{ {0,1,2,1,2,0,1,3, 104,14} }, +{ {0,1,2,1,2,0,2,0, 29,46} }, +{ {0,1,2,1,2,0,2,1, 42,34} }, +{ {0,1,2,1,2,0,2,2, 18,29} }, +{ {0,1,2,1,2,0,2,3, 79,46} }, +{ {0,1,2,1,2,0,3,0, 91,35} }, +{ {0,1,2,1,2,0,3,1, 78,34} }, +{ {0,1,2,1,2,0,3,2, 99,14} }, +{ {0,1,2,1,2,0,3,3, 106,14} }, +{ {0,1,2,1,2,0,3,4, 141,14} }, +{ {0,1,2,1,2,1,0,0, 31,8} }, +{ {0,1,2,1,2,1,0,1, 12,8} }, +{ {0,1,2,1,2,1,0,2, 39,8} }, +{ {0,1,2,1,2,1,0,3, 87,8} }, +{ {0,1,2,1,2,1,1,0, 30,8} }, +{ {0,1,2,1,2,1,1,1, 6,22} }, +{ {0,1,2,1,2,1,1,2, 38,8} }, +{ {0,1,2,1,2,1,1,3, 85,8} }, +{ {0,1,2,1,2,1,2,0, 32,8} }, +{ {0,1,2,1,2,1,2,1, 10,22} }, +{ {0,1,2,1,2,1,2,2, 17,4} }, +{ {0,1,2,1,2,1,2,3, 88,27} }, +{ {0,1,2,1,2,1,3,0, 66,8} }, +{ {0,1,2,1,2,1,3,1, 60,8} }, +{ {0,1,2,1,2,1,3,2, 74,8} }, +{ {0,1,2,1,2,1,3,3, 86,8} }, +{ {0,1,2,1,2,1,3,4, 130,8} }, +{ {0,1,2,1,2,2,0,0, 47,4} }, +{ {0,1,2,1,2,2,0,1, 31,23} }, +{ {0,1,2,1,2,2,0,2, 40,10} }, +{ {0,1,2,1,2,2,0,3, 103,2} }, +{ {0,1,2,1,2,2,1,0, 53,15} }, +{ {0,1,2,1,2,2,1,1, 23,39} }, +{ {0,1,2,1,2,2,1,2, 27,31} }, +{ {0,1,2,1,2,2,1,3, 112,2} }, +{ {0,1,2,1,2,2,2,0, 24,28} }, +{ {0,1,2,1,2,2,2,1, 28,23} }, +{ {0,1,2,1,2,2,2,2, 8,4} }, +{ {0,1,2,1,2,2,2,3, 73,46} }, +{ {0,1,2,1,2,2,3,0, 108,35} }, +{ {0,1,2,1,2,2,3,1, 68,34} }, +{ {0,1,2,1,2,2,3,2, 81,31} }, +{ {0,1,2,1,2,2,3,3, 93,4} }, +{ {0,1,2,1,2,2,3,4, 149,14} }, +{ {0,1,2,1,2,3,0,0, 103,25} }, +{ {0,1,2,1,2,3,0,1, 87,23} }, +{ {0,1,2,1,2,3,0,2, 105,15} }, +{ {0,1,2,1,2,3,0,3, 97,35} }, +{ {0,1,2,1,2,3,0,4, 155,14} }, +{ {0,1,2,1,2,3,1,0, 111,15} }, +{ {0,1,2,1,2,3,1,1, 71,39} }, +{ {0,1,2,1,2,3,1,2, 102,15} }, +{ {0,1,2,1,2,3,1,3, 91,37} }, +{ {0,1,2,1,2,3,1,4, 153,15} }, +{ {0,1,2,1,2,3,2,0, 69,27} }, +{ {0,1,2,1,2,3,2,1, 83,27} }, +{ {0,1,2,1,2,3,2,2, 63,44} }, +{ {0,1,2,1,2,3,2,3, 84,46} }, +{ {0,1,2,1,2,3,2,4, 134,27} }, +{ {0,1,2,1,2,3,3,0, 114,15} }, +{ {0,1,2,1,2,3,3,1, 78,23} }, +{ {0,1,2,1,2,3,3,2, 105,34} }, +{ {0,1,2,1,2,3,3,3, 75,5} }, +{ {0,1,2,1,2,3,3,4, 156,14} }, +{ {0,1,2,1,2,3,4,0, 150,35} }, +{ {0,1,2,1,2,3,4,1, 133,34} }, +{ {0,1,2,1,2,3,4,2, 143,15} }, +{ {0,1,2,1,2,3,4,3, 138,35} }, +{ {0,1,2,1,2,3,4,4, 144,25} }, +{ {0,1,2,1,2,3,4,5, 173,14} }, +{ {0,1,2,1,3,0,0,0, 81,30} }, +{ {0,1,2,1,3,0,0,1, 74,23} }, +{ {0,1,2,1,3,0,0,2, 99,15} }, +{ {0,1,2,1,3,0,0,3, 105,35} }, +{ {0,1,2,1,3,0,0,4, 143,14} }, +{ {0,1,2,1,3,0,1,0, 92,35} }, +{ {0,1,2,1,3,0,1,1, 71,23} }, +{ {0,1,2,1,3,0,1,2, 98,15} }, +{ {0,1,2,1,3,0,1,3, 104,35} }, +{ {0,1,2,1,3,0,1,4, 142,14} }, +{ {0,1,2,1,3,0,2,0, 93,35} }, +{ {0,1,2,1,3,0,2,1, 75,34} }, +{ {0,1,2,1,3,0,2,2, 86,25} }, +{ {0,1,2,1,3,0,2,3, 106,35} }, +{ {0,1,2,1,3,0,2,4, 144,14} }, +{ {0,1,2,1,3,0,3,0, 94,35} }, +{ {0,1,2,1,3,0,3,1, 79,34} }, +{ {0,1,2,1,3,0,3,2, 100,14} }, +{ {0,1,2,1,3,0,3,3, 79,29} }, +{ {0,1,2,1,3,0,3,4, 145,14} }, +{ {0,1,2,1,3,0,4,0, 135,35} }, +{ {0,1,2,1,3,0,4,1, 128,34} }, +{ {0,1,2,1,3,0,4,2, 139,14} }, +{ {0,1,2,1,3,0,4,3, 141,35} }, +{ {0,1,2,1,3,0,4,4, 144,35} }, +{ {0,1,2,1,3,0,4,5, 169,14} }, +{ {0,1,2,1,3,1,0,0, 68,35} }, +{ {0,1,2,1,3,1,0,1, 60,23} }, +{ {0,1,2,1,3,1,0,2, 78,35} }, +{ {0,1,2,1,3,1,0,3, 78,8} }, +{ {0,1,2,1,3,1,0,4, 133,35} }, +{ {0,1,2,1,3,1,1,0, 67,35} }, +{ {0,1,2,1,3,1,1,1, 58,22} }, +{ {0,1,2,1,3,1,1,2, 76,35} }, +{ {0,1,2,1,3,1,1,3, 76,8} }, +{ {0,1,2,1,3,1,1,4, 131,35} }, +{ {0,1,2,1,3,1,2,0, 69,35} }, +{ {0,1,2,1,3,1,2,1, 59,23} }, +{ {0,1,2,1,3,1,2,2, 77,35} }, +{ {0,1,2,1,3,1,2,3, 79,8} }, +{ {0,1,2,1,3,1,2,4, 134,35} }, +{ {0,1,2,1,3,1,3,0, 69,8} }, +{ {0,1,2,1,3,1,3,1, 59,36} }, +{ {0,1,2,1,3,1,3,2, 79,35} }, +{ {0,1,2,1,3,1,3,3, 77,8} }, +{ {0,1,2,1,3,1,3,4, 134,8} }, +{ {0,1,2,1,3,1,4,0, 126,35} }, +{ {0,1,2,1,3,1,4,1, 124,35} }, +{ {0,1,2,1,3,1,4,2, 128,35} }, +{ {0,1,2,1,3,1,4,3, 128,8} }, +{ {0,1,2,1,3,1,4,4, 132,35} }, +{ {0,1,2,1,3,1,4,5, 167,35} }, +{ {0,1,2,1,3,2,0,0, 108,34} }, +{ {0,1,2,1,3,2,0,1, 66,23} }, +{ {0,1,2,1,3,2,0,2, 91,34} }, +{ {0,1,2,1,3,2,0,3, 114,14} }, +{ {0,1,2,1,3,2,0,4, 150,34} }, +{ {0,1,2,1,3,2,1,0, 107,34} }, +{ {0,1,2,1,3,2,1,1, 64,23} }, +{ {0,1,2,1,3,2,1,2, 90,34} }, +{ {0,1,2,1,3,2,1,3, 111,34} }, +{ {0,1,2,1,3,2,1,4, 147,34} }, +{ {0,1,2,1,3,2,2,0, 108,15} }, +{ {0,1,2,1,3,2,2,1, 65,23} }, +{ {0,1,2,1,3,2,2,2, 72,5} }, +{ {0,1,2,1,3,2,2,3, 103,44} }, +{ {0,1,2,1,3,2,2,4, 149,34} }, +{ {0,1,2,1,3,2,3,0, 109,14} }, +{ {0,1,2,1,3,2,3,1, 69,23} }, +{ {0,1,2,1,3,2,3,2, 94,34} }, +{ {0,1,2,1,3,2,3,3, 69,4} }, +{ {0,1,2,1,3,2,3,4, 151,14} }, +{ {0,1,2,1,3,2,4,0, 146,14} }, +{ {0,1,2,1,3,2,4,1, 126,34} }, +{ {0,1,2,1,3,2,4,2, 135,34} }, +{ {0,1,2,1,3,2,4,3, 150,14} }, +{ {0,1,2,1,3,2,4,4, 148,34} }, +{ {0,1,2,1,3,2,4,5, 170,14} }, +{ {0,1,2,1,3,3,0,0, 93,11} }, +{ {0,1,2,1,3,3,0,1, 86,23} }, +{ {0,1,2,1,3,3,0,2, 106,15} }, +{ {0,1,2,1,3,3,0,3, 75,10} }, +{ {0,1,2,1,3,3,0,4, 144,2} }, +{ {0,1,2,1,3,3,1,0, 108,3} }, +{ {0,1,2,1,3,3,1,1, 72,39} }, +{ {0,1,2,1,3,3,1,2, 103,34} }, +{ {0,1,2,1,3,3,1,3, 65,31} }, +{ {0,1,2,1,3,3,1,4, 149,10} }, +{ {0,1,2,1,3,3,2,0, 113,15} }, +{ {0,1,2,1,3,3,2,1, 82,23} }, +{ {0,1,2,1,3,3,2,2, 82,25} }, +{ {0,1,2,1,3,3,2,3, 82,31} }, +{ {0,1,2,1,3,3,2,4, 154,15} }, +{ {0,1,2,1,3,3,3,0, 69,11} }, +{ {0,1,2,1,3,3,3,1, 77,23} }, +{ {0,1,2,1,3,3,3,2, 79,28} }, +{ {0,1,2,1,3,3,3,3, 59,31} }, +{ {0,1,2,1,3,3,3,4, 134,11} }, +{ {0,1,2,1,3,3,4,0, 148,35} }, +{ {0,1,2,1,3,3,4,1, 132,34} }, +{ {0,1,2,1,3,3,4,2, 144,34} }, +{ {0,1,2,1,3,3,4,3, 129,31} }, +{ {0,1,2,1,3,3,4,4, 137,10} }, +{ {0,1,2,1,3,3,4,5, 172,35} }, +{ {0,1,2,1,3,4,0,0, 149,15} }, +{ {0,1,2,1,3,4,0,1, 130,23} }, +{ {0,1,2,1,3,4,0,2, 141,15} }, +{ {0,1,2,1,3,4,0,3, 156,15} }, +{ {0,1,2,1,3,4,0,4, 138,34} }, +{ {0,1,2,1,3,4,0,5, 173,15} }, +{ {0,1,2,1,3,4,1,0, 147,15} }, +{ {0,1,2,1,3,4,1,1, 127,39} }, +{ {0,1,2,1,3,4,1,2, 140,15} }, +{ {0,1,2,1,3,4,1,3, 153,34} }, +{ {0,1,2,1,3,4,1,4, 135,37} }, +{ {0,1,2,1,3,4,1,5, 171,15} }, +{ {0,1,2,1,3,4,2,0, 148,45} }, +{ {0,1,2,1,3,4,2,1, 129,23} }, +{ {0,1,2,1,3,4,2,2, 132,44} }, +{ {0,1,2,1,3,4,2,3, 144,44} }, +{ {0,1,2,1,3,4,2,4, 137,34} }, +{ {0,1,2,1,3,4,2,5, 172,15} }, +{ {0,1,2,1,3,4,3,0, 151,15} }, +{ {0,1,2,1,3,4,3,1, 134,23} }, +{ {0,1,2,1,3,4,3,2, 145,15} }, +{ {0,1,2,1,3,4,3,3, 134,4} }, +{ {0,1,2,1,3,4,3,4, 136,36} }, +{ {0,1,2,1,3,4,3,5, 174,14} }, +{ {0,1,2,1,3,4,4,0, 150,15} }, +{ {0,1,2,1,3,4,4,1, 128,23} }, +{ {0,1,2,1,3,4,4,2, 141,34} }, +{ {0,1,2,1,3,4,4,3, 155,34} }, +{ {0,1,2,1,3,4,4,4, 129,30} }, +{ {0,1,2,1,3,4,4,5, 173,34} }, +{ {0,1,2,1,3,4,5,0, 170,15} }, +{ {0,1,2,1,3,4,5,1, 167,34} }, +{ {0,1,2,1,3,4,5,2, 169,15} }, +{ {0,1,2,1,3,4,5,3, 173,35} }, +{ {0,1,2,1,3,4,5,4, 168,35} }, +{ {0,1,2,1,3,4,5,5, 172,34} }, +{ {0,1,2,1,3,4,5,6, 182,14} }, +{ {0,1,2,2,0,0,0,0, 8,28} }, +{ {0,1,2,2,0,0,0,1, 18,2} }, +{ {0,1,2,2,0,0,0,2, 17,28} }, +{ {0,1,2,2,0,0,0,3, 63,12} }, +{ {0,1,2,2,0,0,1,0, 24,2} }, +{ {0,1,2,2,0,0,1,1, 29,2} }, +{ {0,1,2,2,0,0,1,2, 32,2} }, +{ {0,1,2,2,0,0,1,3, 69,33} }, +{ {0,1,2,2,0,0,2,0, 28,45} }, +{ {0,1,2,2,0,0,2,1, 42,2} }, +{ {0,1,2,2,0,0,2,2, 10,25} }, +{ {0,1,2,2,0,0,2,3, 83,33} }, +{ {0,1,2,2,0,0,3,0, 73,2} }, +{ {0,1,2,2,0,0,3,1, 79,2} }, +{ {0,1,2,2,0,0,3,2, 88,2} }, +{ {0,1,2,2,0,0,3,3, 84,2} }, +{ {0,1,2,2,0,0,3,4, 134,33} }, +{ {0,1,2,2,0,1,0,0, 37,29} }, +{ {0,1,2,2,0,1,0,1, 43,12} }, +{ {0,1,2,2,0,1,0,2, 41,47} }, +{ {0,1,2,2,0,1,0,3, 82,12} }, +{ {0,1,2,2,0,1,1,0, 47,33} }, +{ {0,1,2,2,0,1,1,1, 37,30} }, +{ {0,1,2,2,0,1,1,2, 29,38} }, +{ {0,1,2,2,0,1,1,3, 93,33} }, +{ {0,1,2,2,0,1,2,0, 29,45} }, +{ {0,1,2,2,0,1,2,1, 41,36} }, +{ {0,1,2,2,0,1,2,2, 11,44} }, +{ {0,1,2,2,0,1,2,3, 84,45} }, +{ {0,1,2,2,0,1,3,0, 93,42} }, +{ {0,1,2,2,0,1,3,1, 82,9} }, +{ {0,1,2,2,0,1,3,2, 84,38} }, +{ {0,1,2,2,0,1,3,3, 96,32} }, +{ {0,1,2,2,0,1,3,4, 137,32} }, +{ {0,1,2,2,0,2,0,0, 23,29} }, +{ {0,1,2,2,0,2,0,1, 31,12} }, +{ {0,1,2,2,0,2,0,2, 28,47} }, +{ {0,1,2,2,0,2,0,3, 68,12} }, +{ {0,1,2,2,0,2,1,0, 53,33} }, +{ {0,1,2,2,0,2,1,1, 47,24} }, +{ {0,1,2,2,0,2,1,2, 24,22} }, +{ {0,1,2,2,0,2,1,3, 108,13} }, +{ {0,1,2,2,0,2,2,0, 27,45} }, +{ {0,1,2,2,0,2,2,1, 40,6} }, +{ {0,1,2,2,0,2,2,2, 8,24} }, +{ {0,1,2,2,0,2,2,3, 81,45} }, +{ {0,1,2,2,0,2,3,0, 112,16} }, +{ {0,1,2,2,0,2,3,1, 103,16} }, +{ {0,1,2,2,0,2,3,2, 73,22} }, +{ {0,1,2,2,0,2,3,3, 93,24} }, +{ {0,1,2,2,0,2,3,4, 149,32} }, +{ {0,1,2,2,0,3,0,0, 72,29} }, +{ {0,1,2,2,0,3,0,1, 86,12} }, +{ {0,1,2,2,0,3,0,2, 77,7} }, +{ {0,1,2,2,0,3,0,3, 82,47} }, +{ {0,1,2,2,0,3,0,4, 132,12} }, +{ {0,1,2,2,0,3,1,0, 108,17} }, +{ {0,1,2,2,0,3,1,1, 93,7} }, +{ {0,1,2,2,0,3,1,2, 69,7} }, +{ {0,1,2,2,0,3,1,3, 113,13} }, +{ {0,1,2,2,0,3,1,4, 148,13} }, +{ {0,1,2,2,0,3,2,0, 65,45} }, +{ {0,1,2,2,0,3,2,1, 75,6} }, +{ {0,1,2,2,0,3,2,2, 59,45} }, +{ {0,1,2,2,0,3,2,3, 82,45} }, +{ {0,1,2,2,0,3,2,4, 129,45} }, +{ {0,1,2,2,0,3,3,0, 103,12} }, +{ {0,1,2,2,0,3,3,1, 106,7} }, +{ {0,1,2,2,0,3,3,2, 79,38} }, +{ {0,1,2,2,0,3,3,3, 82,5} }, +{ {0,1,2,2,0,3,3,4, 144,12} }, +{ {0,1,2,2,0,3,4,0, 149,6} }, +{ {0,1,2,2,0,3,4,1, 144,16} }, +{ {0,1,2,2,0,3,4,2, 134,7} }, +{ {0,1,2,2,0,3,4,3, 154,17} }, +{ {0,1,2,2,0,3,4,4, 137,6} }, +{ {0,1,2,2,0,3,4,5, 172,13} }, +{ {0,1,2,2,1,0,0,0, 40,30} }, +{ {0,1,2,2,1,0,0,1, 51,6} }, +{ {0,1,2,2,1,0,0,2, 39,7} }, +{ {0,1,2,2,1,0,0,3, 105,17} }, +{ {0,1,2,2,1,0,1,0, 47,31} }, +{ {0,1,2,2,1,0,1,1, 40,29} }, +{ {0,1,2,2,1,0,1,2, 31,7} }, +{ {0,1,2,2,1,0,1,3, 103,47} }, +{ {0,1,2,2,1,0,2,0, 31,6} }, +{ {0,1,2,2,1,0,2,1, 39,6} }, +{ {0,1,2,2,1,0,2,2, 12,6} }, +{ {0,1,2,2,1,0,2,3, 87,6} }, +{ {0,1,2,2,1,0,3,0, 103,36} }, +{ {0,1,2,2,1,0,3,1, 105,16} }, +{ {0,1,2,2,1,0,3,2, 87,7} }, +{ {0,1,2,2,1,0,3,3, 97,6} }, +{ {0,1,2,2,1,0,3,4, 155,17} }, +{ {0,1,2,2,1,1,0,0, 29,3} }, +{ {0,1,2,2,1,1,0,1, 18,3} }, +{ {0,1,2,2,1,1,0,2, 42,3} }, +{ {0,1,2,2,1,1,0,3, 79,3} }, +{ {0,1,2,2,1,1,1,0, 24,3} }, +{ {0,1,2,2,1,1,1,1, 8,31} }, +{ {0,1,2,2,1,1,1,2, 28,38} }, +{ {0,1,2,2,1,1,1,3, 73,3} }, +{ {0,1,2,2,1,1,2,0, 32,3} }, +{ {0,1,2,2,1,1,2,1, 17,31} }, +{ {0,1,2,2,1,1,2,2, 10,24} }, +{ {0,1,2,2,1,1,2,3, 88,3} }, +{ {0,1,2,2,1,1,3,0, 69,42} }, +{ {0,1,2,2,1,1,3,1, 63,9} }, +{ {0,1,2,2,1,1,3,2, 83,42} }, +{ {0,1,2,2,1,1,3,3, 84,3} }, +{ {0,1,2,2,1,1,3,4, 134,42} }, +{ {0,1,2,2,1,2,0,0, 48,24} }, +{ {0,1,2,2,1,2,0,1, 50,7} }, +{ {0,1,2,2,1,2,0,2, 36,38} }, +{ {0,1,2,2,1,2,0,3, 104,17} }, +{ {0,1,2,2,1,2,1,0, 53,28} }, +{ {0,1,2,2,1,2,1,1, 27,4} }, +{ {0,1,2,2,1,2,1,2, 23,22} }, +{ {0,1,2,2,1,2,1,3, 112,47} }, +{ {0,1,2,2,1,2,2,0, 30,6} }, +{ {0,1,2,2,1,2,2,1, 38,6} }, +{ {0,1,2,2,1,2,2,2, 6,24} }, +{ {0,1,2,2,1,2,2,3, 85,6} }, +{ {0,1,2,2,1,2,3,0, 111,16} }, +{ {0,1,2,2,1,2,3,1, 102,16} }, +{ {0,1,2,2,1,2,3,2, 71,22} }, +{ {0,1,2,2,1,2,3,3, 91,24} }, +{ {0,1,2,2,1,2,3,4, 153,16} }, +{ {0,1,2,2,1,3,0,0, 91,6} }, +{ {0,1,2,2,1,3,0,1, 99,6} }, +{ {0,1,2,2,1,3,0,2, 78,7} }, +{ {0,1,2,2,1,3,0,3, 106,17} }, +{ {0,1,2,2,1,3,0,4, 141,17} }, +{ {0,1,2,2,1,3,1,0, 108,6} }, +{ {0,1,2,2,1,3,1,1, 81,4} }, +{ {0,1,2,2,1,3,1,2, 68,7} }, +{ {0,1,2,2,1,3,1,3, 93,31} }, +{ {0,1,2,2,1,3,1,4, 149,17} }, +{ {0,1,2,2,1,3,2,0, 66,6} }, +{ {0,1,2,2,1,3,2,1, 74,6} }, +{ {0,1,2,2,1,3,2,2, 60,6} }, +{ {0,1,2,2,1,3,2,3, 86,6} }, +{ {0,1,2,2,1,3,2,4, 130,6} }, +{ {0,1,2,2,1,3,3,0, 114,16} }, +{ {0,1,2,2,1,3,3,1, 105,7} }, +{ {0,1,2,2,1,3,3,2, 78,38} }, +{ {0,1,2,2,1,3,3,3, 75,30} }, +{ {0,1,2,2,1,3,3,4, 156,17} }, +{ {0,1,2,2,1,3,4,0, 150,6} }, +{ {0,1,2,2,1,3,4,1, 143,16} }, +{ {0,1,2,2,1,3,4,2, 133,7} }, +{ {0,1,2,2,1,3,4,3, 144,36} }, +{ {0,1,2,2,1,3,4,4, 138,6} }, +{ {0,1,2,2,1,3,4,5, 173,17} }, +{ {0,1,2,2,2,0,0,0, 27,5} }, +{ {0,1,2,2,2,0,0,1, 50,6} }, +{ {0,1,2,2,2,0,0,2, 38,7} }, +{ {0,1,2,2,2,0,0,3, 102,17} }, +{ {0,1,2,2,2,0,1,0, 53,31} }, +{ {0,1,2,2,2,0,1,1, 48,25} }, +{ {0,1,2,2,2,0,1,2, 30,7} }, +{ {0,1,2,2,2,0,1,3, 111,17} }, +{ {0,1,2,2,2,0,2,0, 23,27} }, +{ {0,1,2,2,2,0,2,1, 36,27} }, +{ {0,1,2,2,2,0,2,2, 6,25} }, +{ {0,1,2,2,2,0,2,3, 71,27} }, +{ {0,1,2,2,2,0,3,0, 112,36} }, +{ {0,1,2,2,2,0,3,1, 104,16} }, +{ {0,1,2,2,2,0,3,2, 85,7} }, +{ {0,1,2,2,2,0,3,3, 91,25} }, +{ {0,1,2,2,2,0,3,4, 153,17} }, +{ {0,1,2,2,2,1,0,0, 47,25} }, +{ {0,1,2,2,2,1,0,1, 31,9} }, +{ {0,1,2,2,2,1,0,2, 40,7} }, +{ {0,1,2,2,2,1,0,3, 103,17} }, +{ {0,1,2,2,2,1,1,0, 53,42} }, +{ {0,1,2,2,2,1,1,1, 23,30} }, +{ {0,1,2,2,2,1,1,2, 27,38} }, +{ {0,1,2,2,2,1,1,3, 112,17} }, +{ {0,1,2,2,2,1,2,0, 24,27} }, +{ {0,1,2,2,2,1,2,1, 28,36} }, +{ {0,1,2,2,2,1,2,2, 8,25} }, +{ {0,1,2,2,2,1,2,3, 73,27} }, +{ {0,1,2,2,2,1,3,0, 108,8} }, +{ {0,1,2,2,2,1,3,1, 68,9} }, +{ {0,1,2,2,2,1,3,2, 81,38} }, +{ {0,1,2,2,2,1,3,3, 93,25} }, +{ {0,1,2,2,2,1,3,4, 149,43} }, +{ {0,1,2,2,2,2,0,0, 45,4} }, +{ {0,1,2,2,2,2,0,1, 49,6} }, +{ {0,1,2,2,2,2,0,2, 35,22} }, +{ {0,1,2,2,2,2,0,3, 101,2} }, +{ {0,1,2,2,2,2,1,0, 52,7} }, +{ {0,1,2,2,2,2,1,1, 45,5} }, +{ {0,1,2,2,2,2,1,2, 21,22} }, +{ {0,1,2,2,2,2,1,3, 110,2} }, +{ {0,1,2,2,2,2,2,0, 21,27} }, +{ {0,1,2,2,2,2,2,1, 35,27} }, +{ {0,1,2,2,2,2,2,2, 3,4} }, +{ {0,1,2,2,2,2,2,3, 70,27} }, +{ {0,1,2,2,2,2,3,0, 110,3} }, +{ {0,1,2,2,2,2,3,1, 101,3} }, +{ {0,1,2,2,2,2,3,2, 70,22} }, +{ {0,1,2,2,2,2,3,3, 89,4} }, +{ {0,1,2,2,2,2,3,4, 152,2} }, +{ {0,1,2,2,2,3,0,0, 90,6} }, +{ {0,1,2,2,2,3,0,1, 98,6} }, +{ {0,1,2,2,2,3,0,2, 76,7} }, +{ {0,1,2,2,2,3,0,3, 103,6} }, +{ {0,1,2,2,2,3,0,4, 140,17} }, +{ {0,1,2,2,2,3,1,0, 107,17} }, +{ {0,1,2,2,2,3,1,1, 92,7} }, +{ {0,1,2,2,2,3,1,2, 67,7} }, +{ {0,1,2,2,2,3,1,3, 108,37} }, +{ {0,1,2,2,2,3,1,4, 147,17} }, +{ {0,1,2,2,2,3,2,0, 64,45} }, +{ {0,1,2,2,2,3,2,1, 71,45} }, +{ {0,1,2,2,2,3,2,2, 58,44} }, +{ {0,1,2,2,2,3,2,3, 72,27} }, +{ {0,1,2,2,2,3,2,4, 127,27} }, +{ {0,1,2,2,2,3,3,0, 111,6} }, +{ {0,1,2,2,2,3,3,1, 104,7} }, +{ {0,1,2,2,2,3,3,2, 76,38} }, +{ {0,1,2,2,2,3,3,3, 65,5} }, +{ {0,1,2,2,2,3,3,4, 153,6} }, +{ {0,1,2,2,2,3,4,0, 147,6} }, +{ {0,1,2,2,2,3,4,1, 142,16} }, +{ {0,1,2,2,2,3,4,2, 131,7} }, +{ {0,1,2,2,2,3,4,3, 149,30} }, +{ {0,1,2,2,2,3,4,4, 135,25} }, +{ {0,1,2,2,2,3,4,5, 171,17} }, +{ {0,1,2,2,3,0,0,0, 81,5} }, +{ {0,1,2,2,3,0,0,1, 99,7} }, +{ {0,1,2,2,3,0,0,2, 74,7} }, +{ {0,1,2,2,3,0,0,3, 105,6} }, +{ {0,1,2,2,3,0,0,4, 143,17} }, +{ {0,1,2,2,3,0,1,0, 108,7} }, +{ {0,1,2,2,3,0,1,1, 91,7} }, +{ {0,1,2,2,3,0,1,2, 66,7} }, +{ {0,1,2,2,3,0,1,3, 114,17} }, +{ {0,1,2,2,3,0,1,4, 150,7} }, +{ {0,1,2,2,3,0,2,0, 68,6} }, +{ {0,1,2,2,3,0,2,1, 78,6} }, +{ {0,1,2,2,3,0,2,2, 60,7} }, +{ {0,1,2,2,3,0,2,3, 78,45} }, +{ {0,1,2,2,3,0,2,4, 133,6} }, +{ {0,1,2,2,3,0,3,0, 93,28} }, +{ {0,1,2,2,3,0,3,1, 106,16} }, +{ {0,1,2,2,3,0,3,2, 86,7} }, +{ {0,1,2,2,3,0,3,3, 75,29} }, +{ {0,1,2,2,3,0,3,4, 144,47} }, +{ {0,1,2,2,3,0,4,0, 149,16} }, +{ {0,1,2,2,3,0,4,1, 141,16} }, +{ {0,1,2,2,3,0,4,2, 130,7} }, +{ {0,1,2,2,3,0,4,3, 156,16} }, +{ {0,1,2,2,3,0,4,4, 138,7} }, +{ {0,1,2,2,3,0,4,5, 173,16} }, +{ {0,1,2,2,3,1,0,0, 93,6} }, +{ {0,1,2,2,3,1,0,1, 86,9} }, +{ {0,1,2,2,3,1,0,2, 75,7} }, +{ {0,1,2,2,3,1,0,3, 106,6} }, +{ {0,1,2,2,3,1,0,4, 144,17} }, +{ {0,1,2,2,3,1,1,0, 108,16} }, +{ {0,1,2,2,3,1,1,1, 72,30} }, +{ {0,1,2,2,3,1,1,2, 65,38} }, +{ {0,1,2,2,3,1,1,3, 103,9} }, +{ {0,1,2,2,3,1,1,4, 149,7} }, +{ {0,1,2,2,3,1,2,0, 69,6} }, +{ {0,1,2,2,3,1,2,1, 77,6} }, +{ {0,1,2,2,3,1,2,2, 59,38} }, +{ {0,1,2,2,3,1,2,3, 79,45} }, +{ {0,1,2,2,3,1,2,4, 134,6} }, +{ {0,1,2,2,3,1,3,0, 113,8} }, +{ {0,1,2,2,3,1,3,1, 82,36} }, +{ {0,1,2,2,3,1,3,2, 82,38} }, +{ {0,1,2,2,3,1,3,3, 82,4} }, +{ {0,1,2,2,3,1,3,4, 154,16} }, +{ {0,1,2,2,3,1,4,0, 148,8} }, +{ {0,1,2,2,3,1,4,1, 132,9} }, +{ {0,1,2,2,3,1,4,2, 129,38} }, +{ {0,1,2,2,3,1,4,3, 144,9} }, +{ {0,1,2,2,3,1,4,4, 137,7} }, +{ {0,1,2,2,3,1,4,5, 172,8} }, +{ {0,1,2,2,3,2,0,0, 92,6} }, +{ {0,1,2,2,3,2,0,1, 98,7} }, +{ {0,1,2,2,3,2,0,2, 71,38} }, +{ {0,1,2,2,3,2,0,3, 104,6} }, +{ {0,1,2,2,3,2,0,4, 142,17} }, +{ {0,1,2,2,3,2,1,0, 107,7} }, +{ {0,1,2,2,3,2,1,1, 90,7} }, +{ {0,1,2,2,3,2,1,2, 64,38} }, +{ {0,1,2,2,3,2,1,3, 111,7} }, +{ {0,1,2,2,3,2,1,4, 147,7} }, +{ {0,1,2,2,3,2,2,0, 67,6} }, +{ {0,1,2,2,3,2,2,1, 76,6} }, +{ {0,1,2,2,3,2,2,2, 58,39} }, +{ {0,1,2,2,3,2,2,3, 76,45} }, +{ {0,1,2,2,3,2,2,4, 131,6} }, +{ {0,1,2,2,3,2,3,0, 108,46} }, +{ {0,1,2,2,3,2,3,1, 103,7} }, +{ {0,1,2,2,3,2,3,2, 72,22} }, +{ {0,1,2,2,3,2,3,3, 65,4} }, +{ {0,1,2,2,3,2,3,4, 149,29} }, +{ {0,1,2,2,3,2,4,0, 147,16} }, +{ {0,1,2,2,3,2,4,1, 140,16} }, +{ {0,1,2,2,3,2,4,2, 127,22} }, +{ {0,1,2,2,3,2,4,3, 153,7} }, +{ {0,1,2,2,3,2,4,4, 135,24} }, +{ {0,1,2,2,3,2,4,5, 171,16} }, +{ {0,1,2,2,3,3,0,0, 94,6} }, +{ {0,1,2,2,3,3,0,1, 100,6} }, +{ {0,1,2,2,3,3,0,2, 79,7} }, +{ {0,1,2,2,3,3,0,3, 79,10} }, +{ {0,1,2,2,3,3,0,4, 145,17} }, +{ {0,1,2,2,3,3,1,0, 109,7} }, +{ {0,1,2,2,3,3,1,1, 94,7} }, +{ {0,1,2,2,3,3,1,2, 69,38} }, +{ {0,1,2,2,3,3,1,3, 69,31} }, +{ {0,1,2,2,3,3,1,4, 151,17} }, +{ {0,1,2,2,3,3,2,0, 69,45} }, +{ {0,1,2,2,3,3,2,1, 79,6} }, +{ {0,1,2,2,3,3,2,2, 59,25} }, +{ {0,1,2,2,3,3,2,3, 77,45} }, +{ {0,1,2,2,3,3,2,4, 134,45} }, +{ {0,1,2,2,3,3,3,0, 69,28} }, +{ {0,1,2,2,3,3,3,1, 79,11} }, +{ {0,1,2,2,3,3,3,2, 77,38} }, +{ {0,1,2,2,3,3,3,3, 59,4} }, +{ {0,1,2,2,3,3,3,4, 134,28} }, +{ {0,1,2,2,3,3,4,0, 151,16} }, +{ {0,1,2,2,3,3,4,1, 145,16} }, +{ {0,1,2,2,3,3,4,2, 134,38} }, +{ {0,1,2,2,3,3,4,3, 134,31} }, +{ {0,1,2,2,3,3,4,4, 136,25} }, +{ {0,1,2,2,3,3,4,5, 174,17} }, +{ {0,1,2,2,3,4,0,0, 135,6} }, +{ {0,1,2,2,3,4,0,1, 139,6} }, +{ {0,1,2,2,3,4,0,2, 128,7} }, +{ {0,1,2,2,3,4,0,3, 141,6} }, +{ {0,1,2,2,3,4,0,4, 144,6} }, +{ {0,1,2,2,3,4,0,5, 169,17} }, +{ {0,1,2,2,3,4,1,0, 146,17} }, +{ {0,1,2,2,3,4,1,1, 135,7} }, +{ {0,1,2,2,3,4,1,2, 126,7} }, +{ {0,1,2,2,3,4,1,3, 150,17} }, +{ {0,1,2,2,3,4,1,4, 148,7} }, +{ {0,1,2,2,3,4,1,5, 170,17} }, +{ {0,1,2,2,3,4,2,0, 126,6} }, +{ {0,1,2,2,3,4,2,1, 128,6} }, +{ {0,1,2,2,3,4,2,2, 124,6} }, +{ {0,1,2,2,3,4,2,3, 128,45} }, +{ {0,1,2,2,3,4,2,4, 132,6} }, +{ {0,1,2,2,3,4,2,5, 167,6} }, +{ {0,1,2,2,3,4,3,0, 148,6} }, +{ {0,1,2,2,3,4,3,1, 144,7} }, +{ {0,1,2,2,3,4,3,2, 132,7} }, +{ {0,1,2,2,3,4,3,3, 129,4} }, +{ {0,1,2,2,3,4,3,4, 137,29} }, +{ {0,1,2,2,3,4,3,5, 172,6} }, +{ {0,1,2,2,3,4,4,0, 150,16} }, +{ {0,1,2,2,3,4,4,1, 141,7} }, +{ {0,1,2,2,3,4,4,2, 128,38} }, +{ {0,1,2,2,3,4,4,3, 155,7} }, +{ {0,1,2,2,3,4,4,4, 129,5} }, +{ {0,1,2,2,3,4,4,5, 173,7} }, +{ {0,1,2,2,3,4,5,0, 170,16} }, +{ {0,1,2,2,3,4,5,1, 169,16} }, +{ {0,1,2,2,3,4,5,2, 167,7} }, +{ {0,1,2,2,3,4,5,3, 173,6} }, +{ {0,1,2,2,3,4,5,4, 172,7} }, +{ {0,1,2,2,3,4,5,5, 168,6} }, +{ {0,1,2,2,3,4,5,6, 182,17} }, +{ {0,1,2,3,0,0,0,0, 58,11} }, +{ {0,1,2,3,0,0,0,1, 61,2} }, +{ {0,1,2,3,0,0,0,2, 61,28} }, +{ {0,1,2,3,0,0,0,3, 63,11} }, +{ {0,1,2,3,0,0,0,4, 125,33} }, +{ {0,1,2,3,0,0,1,0, 64,2} }, +{ {0,1,2,3,0,0,1,1, 65,2} }, +{ {0,1,2,3,0,0,1,2, 66,2} }, +{ {0,1,2,3,0,0,1,3, 69,2} }, +{ {0,1,2,3,0,0,1,4, 126,33} }, +{ {0,1,2,3,0,0,2,0, 72,2} }, +{ {0,1,2,3,0,0,2,1, 75,2} }, +{ {0,1,2,3,0,0,2,2, 80,2} }, +{ {0,1,2,3,0,0,2,3, 84,33} }, +{ {0,1,2,3,0,0,2,4, 129,33} }, +{ {0,1,2,3,0,0,3,0, 71,10} }, +{ {0,1,2,3,0,0,3,1, 78,2} }, +{ {0,1,2,3,0,0,3,2, 87,2} }, +{ {0,1,2,3,0,0,3,3, 83,2} }, +{ {0,1,2,3,0,0,3,4, 133,33} }, +{ {0,1,2,3,0,0,4,0, 127,2} }, +{ {0,1,2,3,0,0,4,1, 128,2} }, +{ {0,1,2,3,0,0,4,2, 130,2} }, +{ {0,1,2,3,0,0,4,3, 134,2} }, +{ {0,1,2,3,0,0,4,4, 129,2} }, +{ {0,1,2,3,0,0,4,5, 167,33} }, +{ {0,1,2,3,0,1,0,0, 72,47} }, +{ {0,1,2,3,0,1,0,1, 80,12} }, +{ {0,1,2,3,0,1,0,2, 75,47} }, +{ {0,1,2,3,0,1,0,3, 84,12} }, +{ {0,1,2,3,0,1,0,4, 129,12} }, +{ {0,1,2,3,0,1,1,0, 90,33} }, +{ {0,1,2,3,0,1,1,1, 72,36} }, +{ {0,1,2,3,0,1,1,2, 91,33} }, +{ {0,1,2,3,0,1,1,3, 94,33} }, +{ {0,1,2,3,0,1,1,4, 135,33} }, +{ {0,1,2,3,0,1,2,0, 94,42} }, +{ {0,1,2,3,0,1,2,1, 84,9} }, +{ {0,1,2,3,0,1,2,2, 84,44} }, +{ {0,1,2,3,0,1,2,3, 95,33} }, +{ {0,1,2,3,0,1,2,4, 136,32} }, +{ {0,1,2,3,0,1,3,0, 91,42} }, +{ {0,1,2,3,0,1,3,1, 75,36} }, +{ {0,1,2,3,0,1,3,2, 97,32} }, +{ {0,1,2,3,0,1,3,3, 84,39} }, +{ {0,1,2,3,0,1,3,4, 138,32} }, +{ {0,1,2,3,0,1,4,0, 135,42} }, +{ {0,1,2,3,0,1,4,1, 129,9} }, +{ {0,1,2,3,0,1,4,2, 138,43} }, +{ {0,1,2,3,0,1,4,3, 136,43} }, +{ {0,1,2,3,0,1,4,4, 137,33} }, +{ {0,1,2,3,0,1,4,5, 168,32} }, +{ {0,1,2,3,0,2,0,0, 64,47} }, +{ {0,1,2,3,0,2,0,1, 66,12} }, +{ {0,1,2,3,0,2,0,2, 65,47} }, +{ {0,1,2,3,0,2,0,3, 69,47} }, +{ {0,1,2,3,0,2,0,4, 126,12} }, +{ {0,1,2,3,0,2,1,0, 107,12} }, +{ {0,1,2,3,0,2,1,1, 108,12} }, +{ {0,1,2,3,0,2,1,2, 108,33} }, +{ {0,1,2,3,0,2,1,3, 109,12} }, +{ {0,1,2,3,0,2,1,4, 146,32} }, +{ {0,1,2,3,0,2,2,0, 90,12} }, +{ {0,1,2,3,0,2,2,1, 91,12} }, +{ {0,1,2,3,0,2,2,2, 72,25} }, +{ {0,1,2,3,0,2,2,3, 94,12} }, +{ {0,1,2,3,0,2,2,4, 135,12} }, +{ {0,1,2,3,0,2,3,0, 111,12} }, +{ {0,1,2,3,0,2,3,1, 114,32} }, +{ {0,1,2,3,0,2,3,2, 103,30} }, +{ {0,1,2,3,0,2,3,3, 69,24} }, +{ {0,1,2,3,0,2,3,4, 150,32} }, +{ {0,1,2,3,0,2,4,0, 147,12} }, +{ {0,1,2,3,0,2,4,1, 150,12} }, +{ {0,1,2,3,0,2,4,2, 149,12} }, +{ {0,1,2,3,0,2,4,3, 151,32} }, +{ {0,1,2,3,0,2,4,4, 148,12} }, +{ {0,1,2,3,0,2,4,5, 170,32} }, +{ {0,1,2,3,0,3,0,0, 71,29} }, +{ {0,1,2,3,0,3,0,1, 87,12} }, +{ {0,1,2,3,0,3,0,2, 78,47} }, +{ {0,1,2,3,0,3,0,3, 83,47} }, +{ {0,1,2,3,0,3,0,4, 133,12} }, +{ {0,1,2,3,0,3,1,0, 111,33} }, +{ {0,1,2,3,0,3,1,1, 103,5} }, +{ {0,1,2,3,0,3,1,2, 114,13} }, +{ {0,1,2,3,0,3,1,3, 69,37} }, +{ {0,1,2,3,0,3,1,4, 150,13} }, +{ {0,1,2,3,0,3,2,0, 91,27} }, +{ {0,1,2,3,0,3,2,1, 97,13} }, +{ {0,1,2,3,0,3,2,2, 75,25} }, +{ {0,1,2,3,0,3,2,3, 84,22} }, +{ {0,1,2,3,0,3,2,4, 138,13} }, +{ {0,1,2,3,0,3,3,0, 102,33} }, +{ {0,1,2,3,0,3,3,1, 105,33} }, +{ {0,1,2,3,0,3,3,2, 105,12} }, +{ {0,1,2,3,0,3,3,3, 63,30} }, +{ {0,1,2,3,0,3,3,4, 143,33} }, +{ {0,1,2,3,0,3,4,0, 153,33} }, +{ {0,1,2,3,0,3,4,1, 155,32} }, +{ {0,1,2,3,0,3,4,2, 156,32} }, +{ {0,1,2,3,0,3,4,3, 134,37} }, +{ {0,1,2,3,0,3,4,4, 144,5} }, +{ {0,1,2,3,0,3,4,5, 173,32} }, +{ {0,1,2,3,0,4,0,0, 127,47} }, +{ {0,1,2,3,0,4,0,1, 130,12} }, +{ {0,1,2,3,0,4,0,2, 128,47} }, +{ {0,1,2,3,0,4,0,3, 134,47} }, +{ {0,1,2,3,0,4,0,4, 129,47} }, +{ {0,1,2,3,0,4,0,5, 167,12} }, +{ {0,1,2,3,0,4,1,0, 147,33} }, +{ {0,1,2,3,0,4,1,1, 149,33} }, +{ {0,1,2,3,0,4,1,2, 150,33} }, +{ {0,1,2,3,0,4,1,3, 151,13} }, +{ {0,1,2,3,0,4,1,4, 148,33} }, +{ {0,1,2,3,0,4,1,5, 170,13} }, +{ {0,1,2,3,0,4,2,0, 135,27} }, +{ {0,1,2,3,0,4,2,1, 138,26} }, +{ {0,1,2,3,0,4,2,2, 129,44} }, +{ {0,1,2,3,0,4,2,3, 136,26} }, +{ {0,1,2,3,0,4,2,4, 137,12} }, +{ {0,1,2,3,0,4,2,5, 168,13} }, +{ {0,1,2,3,0,4,3,0, 153,12} }, +{ {0,1,2,3,0,4,3,1, 156,13} }, +{ {0,1,2,3,0,4,3,2, 155,13} }, +{ {0,1,2,3,0,4,3,3, 134,24} }, +{ {0,1,2,3,0,4,3,4, 144,30} }, +{ {0,1,2,3,0,4,3,5, 173,13} }, +{ {0,1,2,3,0,4,4,0, 140,33} }, +{ {0,1,2,3,0,4,4,1, 141,33} }, +{ {0,1,2,3,0,4,4,2, 141,12} }, +{ {0,1,2,3,0,4,4,3, 145,33} }, +{ {0,1,2,3,0,4,4,4, 132,30} }, +{ {0,1,2,3,0,4,4,5, 169,33} }, +{ {0,1,2,3,0,4,5,0, 171,33} }, +{ {0,1,2,3,0,4,5,1, 173,33} }, +{ {0,1,2,3,0,4,5,2, 173,12} }, +{ {0,1,2,3,0,4,5,3, 174,32} }, +{ {0,1,2,3,0,4,5,4, 172,33} }, +{ {0,1,2,3,0,4,5,5, 172,12} }, +{ {0,1,2,3,0,4,5,6, 182,32} }, +{ {0,1,2,3,1,0,0,0, 76,30} }, +{ {0,1,2,3,1,0,0,1, 115,2} }, +{ {0,1,2,3,1,0,0,2, 116,2} }, +{ {0,1,2,3,1,0,0,3, 105,22} }, +{ {0,1,2,3,1,0,0,4, 157,33} }, +{ {0,1,2,3,1,0,1,0, 90,28} }, +{ {0,1,2,3,1,0,1,1, 76,29} }, +{ {0,1,2,3,1,0,1,2, 98,28} }, +{ {0,1,2,3,1,0,1,3, 103,28} }, +{ {0,1,2,3,1,0,1,4, 140,47} }, +{ {0,1,2,3,1,0,2,0, 103,31} }, +{ {0,1,2,3,1,0,2,1, 105,27} }, +{ {0,1,2,3,1,0,2,2, 87,25} }, +{ {0,1,2,3,1,0,2,3, 97,45} }, +{ {0,1,2,3,1,0,2,4, 155,26} }, +{ {0,1,2,3,1,0,3,0, 98,31} }, +{ {0,1,2,3,1,0,3,1, 116,3} }, +{ {0,1,2,3,1,0,3,2, 118,3} }, +{ {0,1,2,3,1,0,3,3, 87,24} }, +{ {0,1,2,3,1,0,3,4, 158,21} }, +{ {0,1,2,3,1,0,4,0, 140,36} }, +{ {0,1,2,3,1,0,4,1, 157,42} }, +{ {0,1,2,3,1,0,4,2, 158,20} }, +{ {0,1,2,3,1,0,4,3, 155,23} }, +{ {0,1,2,3,1,0,4,4, 155,4} }, +{ {0,1,2,3,1,0,4,5, 175,21} }, +{ {0,1,2,3,1,1,0,0, 65,3} }, +{ {0,1,2,3,1,1,0,1, 61,3} }, +{ {0,1,2,3,1,1,0,2, 78,3} }, +{ {0,1,2,3,1,1,0,3, 75,3} }, +{ {0,1,2,3,1,1,0,4, 128,3} }, +{ {0,1,2,3,1,1,1,0, 64,11} }, +{ {0,1,2,3,1,1,1,1, 58,10} }, +{ {0,1,2,3,1,1,1,2, 71,11} }, +{ {0,1,2,3,1,1,1,3, 72,3} }, +{ {0,1,2,3,1,1,1,4, 127,3} }, +{ {0,1,2,3,1,1,2,0, 69,3} }, +{ {0,1,2,3,1,1,2,1, 63,10} }, +{ {0,1,2,3,1,1,2,2, 83,3} }, +{ {0,1,2,3,1,1,2,3, 84,42} }, +{ {0,1,2,3,1,1,2,4, 134,3} }, +{ {0,1,2,3,1,1,3,0, 66,3} }, +{ {0,1,2,3,1,1,3,1, 61,31} }, +{ {0,1,2,3,1,1,3,2, 87,3} }, +{ {0,1,2,3,1,1,3,3, 80,3} }, +{ {0,1,2,3,1,1,3,4, 130,3} }, +{ {0,1,2,3,1,1,4,0, 126,42} }, +{ {0,1,2,3,1,1,4,1, 125,42} }, +{ {0,1,2,3,1,1,4,2, 133,42} }, +{ {0,1,2,3,1,1,4,3, 129,42} }, +{ {0,1,2,3,1,1,4,4, 129,3} }, +{ {0,1,2,3,1,1,4,5, 167,42} }, +{ {0,1,2,3,1,2,0,0, 111,4} }, +{ {0,1,2,3,1,2,0,1, 120,3} }, +{ {0,1,2,3,1,2,0,2, 104,31} }, +{ {0,1,2,3,1,2,0,3, 114,39} }, +{ {0,1,2,3,1,2,0,4, 162,32} }, +{ {0,1,2,3,1,2,1,0, 107,47} }, +{ {0,1,2,3,1,2,1,1, 67,29} }, +{ {0,1,2,3,1,2,1,2, 92,29} }, +{ {0,1,2,3,1,2,1,3, 108,39} }, +{ {0,1,2,3,1,2,1,4, 147,47} }, +{ {0,1,2,3,1,2,2,0, 111,27} }, +{ {0,1,2,3,1,2,2,1, 102,27} }, +{ {0,1,2,3,1,2,2,2, 71,5} }, +{ {0,1,2,3,1,2,2,3, 91,39} }, +{ {0,1,2,3,1,2,2,4, 153,27} }, +{ {0,1,2,3,1,2,3,0, 121,21} }, +{ {0,1,2,3,1,2,3,1, 120,31} }, +{ {0,1,2,3,1,2,3,2, 98,30} }, +{ {0,1,2,3,1,2,3,3, 66,24} }, +{ {0,1,2,3,1,2,3,4, 163,21} }, +{ {0,1,2,3,1,2,4,0, 164,21} }, +{ {0,1,2,3,1,2,4,1, 160,42} }, +{ {0,1,2,3,1,2,4,2, 142,36} }, +{ {0,1,2,3,1,2,4,3, 150,39} }, +{ {0,1,2,3,1,2,4,4, 150,24} }, +{ {0,1,2,3,1,2,4,5, 177,21} }, +{ {0,1,2,3,1,3,0,0, 104,5} }, +{ {0,1,2,3,1,3,0,1, 116,9} }, +{ {0,1,2,3,1,3,0,2, 122,12} }, +{ {0,1,2,3,1,3,0,3, 78,37} }, +{ {0,1,2,3,1,3,0,4, 165,32} }, +{ {0,1,2,3,1,3,1,0, 111,28} }, +{ {0,1,2,3,1,3,1,1, 76,4} }, +{ {0,1,2,3,1,3,1,2, 104,29} }, +{ {0,1,2,3,1,3,1,3, 65,37} }, +{ {0,1,2,3,1,3,1,4, 153,28} }, +{ {0,1,2,3,1,3,2,0, 114,27} }, +{ {0,1,2,3,1,3,2,1, 105,44} }, +{ {0,1,2,3,1,3,2,2, 78,25} }, +{ {0,1,2,3,1,3,2,3, 75,37} }, +{ {0,1,2,3,1,3,2,4, 156,26} }, +{ {0,1,2,3,1,3,3,0, 120,30} }, +{ {0,1,2,3,1,3,3,1, 115,30} }, +{ {0,1,2,3,1,3,3,2, 116,24} }, +{ {0,1,2,3,1,3,3,3, 61,30} }, +{ {0,1,2,3,1,3,3,4, 159,30} }, +{ {0,1,2,3,1,3,4,0, 162,8} }, +{ {0,1,2,3,1,3,4,1, 157,9} }, +{ {0,1,2,3,1,3,4,2, 165,8} }, +{ {0,1,2,3,1,3,4,3, 128,37} }, +{ {0,1,2,3,1,3,4,4, 141,5} }, +{ {0,1,2,3,1,3,4,5, 178,8} }, +{ {0,1,2,3,1,4,0,0, 153,4} }, +{ {0,1,2,3,1,4,0,1, 159,3} }, +{ {0,1,2,3,1,4,0,2, 165,26} }, +{ {0,1,2,3,1,4,0,3, 156,38} }, +{ {0,1,2,3,1,4,0,4, 141,31} }, +{ {0,1,2,3,1,4,0,5, 178,32} }, +{ {0,1,2,3,1,4,1,0, 147,28} }, +{ {0,1,2,3,1,4,1,1, 131,29} }, +{ {0,1,2,3,1,4,1,2, 142,46} }, +{ {0,1,2,3,1,4,1,3, 149,22} }, +{ {0,1,2,3,1,4,1,4, 135,31} }, +{ {0,1,2,3,1,4,1,5, 171,47} }, +{ {0,1,2,3,1,4,2,0, 150,45} }, +{ {0,1,2,3,1,4,2,1, 143,27} }, +{ {0,1,2,3,1,4,2,2, 133,44} }, +{ {0,1,2,3,1,4,2,3, 138,45} }, +{ {0,1,2,3,1,4,2,4, 144,31} }, +{ {0,1,2,3,1,4,2,5, 173,26} }, +{ {0,1,2,3,1,4,3,0, 163,6} }, +{ {0,1,2,3,1,4,3,1, 159,31} }, +{ {0,1,2,3,1,4,3,2, 158,6} }, +{ {0,1,2,3,1,4,3,3, 130,24} }, +{ {0,1,2,3,1,4,3,4, 139,31} }, +{ {0,1,2,3,1,4,3,5, 179,21} }, +{ {0,1,2,3,1,4,4,0, 162,11} }, +{ {0,1,2,3,1,4,4,1, 157,10} }, +{ {0,1,2,3,1,4,4,2, 165,11} }, +{ {0,1,2,3,1,4,4,3, 141,22} }, +{ {0,1,2,3,1,4,4,4, 128,30} }, +{ {0,1,2,3,1,4,4,5, 178,11} }, +{ {0,1,2,3,1,4,5,0, 177,42} }, +{ {0,1,2,3,1,4,5,1, 176,42} }, +{ {0,1,2,3,1,4,5,2, 180,21} }, +{ {0,1,2,3,1,4,5,3, 173,22} }, +{ {0,1,2,3,1,4,5,4, 169,36} }, +{ {0,1,2,3,1,4,5,5, 173,5} }, +{ {0,1,2,3,1,4,5,6, 183,21} }, +{ {0,1,2,3,2,0,0,0, 76,5} }, +{ {0,1,2,3,2,0,0,1, 116,12} }, +{ {0,1,2,3,2,0,0,2, 115,28} }, +{ {0,1,2,3,2,0,0,3, 105,39} }, +{ {0,1,2,3,2,0,0,4, 157,12} }, +{ {0,1,2,3,2,0,1,0, 111,31} }, +{ {0,1,2,3,2,0,1,1, 104,4} }, +{ {0,1,2,3,2,0,1,2, 120,29} }, +{ {0,1,2,3,2,0,1,3, 114,22} }, +{ {0,1,2,3,2,0,1,4, 162,13} }, +{ {0,1,2,3,2,0,2,0, 65,46} }, +{ {0,1,2,3,2,0,2,1, 78,46} }, +{ {0,1,2,3,2,0,2,2, 61,29} }, +{ {0,1,2,3,2,0,2,3, 75,46} }, +{ {0,1,2,3,2,0,2,4, 128,46} }, +{ {0,1,2,3,2,0,3,0, 104,30} }, +{ {0,1,2,3,2,0,3,1, 122,43} }, +{ {0,1,2,3,2,0,3,2, 116,25} }, +{ {0,1,2,3,2,0,3,3, 78,24} }, +{ {0,1,2,3,2,0,3,4, 165,13} }, +{ {0,1,2,3,2,0,4,0, 153,31} }, +{ {0,1,2,3,2,0,4,1, 165,43} }, +{ {0,1,2,3,2,0,4,2, 159,29} }, +{ {0,1,2,3,2,0,4,3, 156,23} }, +{ {0,1,2,3,2,0,4,4, 141,4} }, +{ {0,1,2,3,2,0,4,5, 178,13} }, +{ {0,1,2,3,2,1,0,0, 103,4} }, +{ {0,1,2,3,2,1,0,1, 87,9} }, +{ {0,1,2,3,2,1,0,2, 105,42} }, +{ {0,1,2,3,2,1,0,3, 97,8} }, +{ {0,1,2,3,2,1,0,4, 155,43} }, +{ {0,1,2,3,2,1,1,0, 111,42} }, +{ {0,1,2,3,2,1,1,1, 71,30} }, +{ {0,1,2,3,2,1,1,2, 102,42} }, +{ {0,1,2,3,2,1,1,3, 91,22} }, +{ {0,1,2,3,2,1,1,4, 153,42} }, +{ {0,1,2,3,2,1,2,0, 69,46} }, +{ {0,1,2,3,2,1,2,1, 83,46} }, +{ {0,1,2,3,2,1,2,2, 63,29} }, +{ {0,1,2,3,2,1,2,3, 84,27} }, +{ {0,1,2,3,2,1,2,4, 134,46} }, +{ {0,1,2,3,2,1,3,0, 114,42} }, +{ {0,1,2,3,2,1,3,1, 78,36} }, +{ {0,1,2,3,2,1,3,2, 105,9} }, +{ {0,1,2,3,2,1,3,3, 75,24} }, +{ {0,1,2,3,2,1,3,4, 156,43} }, +{ {0,1,2,3,2,1,4,0, 150,8} }, +{ {0,1,2,3,2,1,4,1, 133,9} }, +{ {0,1,2,3,2,1,4,2, 143,42} }, +{ {0,1,2,3,2,1,4,3, 138,8} }, +{ {0,1,2,3,2,1,4,4, 144,4} }, +{ {0,1,2,3,2,1,4,5, 173,43} }, +{ {0,1,2,3,2,2,0,0, 90,11} }, +{ {0,1,2,3,2,2,0,1, 98,2} }, +{ {0,1,2,3,2,2,0,2, 76,10} }, +{ {0,1,2,3,2,2,0,3, 103,11} }, +{ {0,1,2,3,2,2,0,4, 140,2} }, +{ {0,1,2,3,2,2,1,0, 107,2} }, +{ {0,1,2,3,2,2,1,1, 92,10} }, +{ {0,1,2,3,2,2,1,2, 67,10} }, +{ {0,1,2,3,2,2,1,3, 108,22} }, +{ {0,1,2,3,2,2,1,4, 147,2} }, +{ {0,1,2,3,2,2,2,0, 64,28} }, +{ {0,1,2,3,2,2,2,1, 71,28} }, +{ {0,1,2,3,2,2,2,2, 58,29} }, +{ {0,1,2,3,2,2,2,3, 72,46} }, +{ {0,1,2,3,2,2,2,4, 127,46} }, +{ {0,1,2,3,2,2,3,0, 111,11} }, +{ {0,1,2,3,2,2,3,1, 104,10} }, +{ {0,1,2,3,2,2,3,2, 76,31} }, +{ {0,1,2,3,2,2,3,3, 65,24} }, +{ {0,1,2,3,2,2,3,4, 153,11} }, +{ {0,1,2,3,2,2,4,0, 147,11} }, +{ {0,1,2,3,2,2,4,1, 142,3} }, +{ {0,1,2,3,2,2,4,2, 131,10} }, +{ {0,1,2,3,2,2,4,3, 149,39} }, +{ {0,1,2,3,2,2,4,4, 135,4} }, +{ {0,1,2,3,2,2,4,5, 171,2} }, +{ {0,1,2,3,2,3,0,0, 98,4} }, +{ {0,1,2,3,2,3,0,1, 118,13} }, +{ {0,1,2,3,2,3,0,2, 116,27} }, +{ {0,1,2,3,2,3,0,3, 87,22} }, +{ {0,1,2,3,2,3,0,4, 158,13} }, +{ {0,1,2,3,2,3,1,0, 121,13} }, +{ {0,1,2,3,2,3,1,1, 98,5} }, +{ {0,1,2,3,2,3,1,2, 120,4} }, +{ {0,1,2,3,2,3,1,3, 66,22} }, +{ {0,1,2,3,2,3,1,4, 163,13} }, +{ {0,1,2,3,2,3,2,0, 66,27} }, +{ {0,1,2,3,2,3,2,1, 87,27} }, +{ {0,1,2,3,2,3,2,2, 61,4} }, +{ {0,1,2,3,2,3,2,3, 80,27} }, +{ {0,1,2,3,2,3,2,4, 130,27} }, +{ {0,1,2,3,2,3,3,0, 120,5} }, +{ {0,1,2,3,2,3,3,1, 116,22} }, +{ {0,1,2,3,2,3,3,2, 115,5} }, +{ {0,1,2,3,2,3,3,3, 61,5} }, +{ {0,1,2,3,2,3,3,4, 159,5} }, +{ {0,1,2,3,2,3,4,0, 163,8} }, +{ {0,1,2,3,2,3,4,1, 158,8} }, +{ {0,1,2,3,2,3,4,2, 159,4} }, +{ {0,1,2,3,2,3,4,3, 130,22} }, +{ {0,1,2,3,2,3,4,4, 139,4} }, +{ {0,1,2,3,2,3,4,5, 179,13} }, +{ {0,1,2,3,2,4,0,0, 140,25} }, +{ {0,1,2,3,2,4,0,1, 158,26} }, +{ {0,1,2,3,2,4,0,2, 157,27} }, +{ {0,1,2,3,2,4,0,3, 155,38} }, +{ {0,1,2,3,2,4,0,4, 155,31} }, +{ {0,1,2,3,2,4,0,5, 175,40} }, +{ {0,1,2,3,2,4,1,0, 164,40} }, +{ {0,1,2,3,2,4,1,1, 142,25} }, +{ {0,1,2,3,2,4,1,2, 160,27} }, +{ {0,1,2,3,2,4,1,3, 150,22} }, +{ {0,1,2,3,2,4,1,4, 150,37} }, +{ {0,1,2,3,2,4,1,5, 177,40} }, +{ {0,1,2,3,2,4,2,0, 126,27} }, +{ {0,1,2,3,2,4,2,1, 133,27} }, +{ {0,1,2,3,2,4,2,2, 125,27} }, +{ {0,1,2,3,2,4,2,3, 129,27} }, +{ {0,1,2,3,2,4,2,4, 129,46} }, +{ {0,1,2,3,2,4,2,5, 167,27} }, +{ {0,1,2,3,2,4,3,0, 162,45} }, +{ {0,1,2,3,2,4,3,1, 165,45} }, +{ {0,1,2,3,2,4,3,2, 157,44} }, +{ {0,1,2,3,2,4,3,3, 128,24} }, +{ {0,1,2,3,2,4,3,4, 141,30} }, +{ {0,1,2,3,2,4,3,5, 178,45} }, +{ {0,1,2,3,2,4,4,0, 162,28} }, +{ {0,1,2,3,2,4,4,1, 165,28} }, +{ {0,1,2,3,2,4,4,2, 157,29} }, +{ {0,1,2,3,2,4,4,3, 141,39} }, +{ {0,1,2,3,2,4,4,4, 128,5} }, +{ {0,1,2,3,2,4,4,5, 178,28} }, +{ {0,1,2,3,2,4,5,0, 177,27} }, +{ {0,1,2,3,2,4,5,1, 180,40} }, +{ {0,1,2,3,2,4,5,2, 176,27} }, +{ {0,1,2,3,2,4,5,3, 173,39} }, +{ {0,1,2,3,2,4,5,4, 173,30} }, +{ {0,1,2,3,2,4,5,5, 169,25} }, +{ {0,1,2,3,2,4,5,6, 183,40} }, +{ {0,1,2,3,3,0,0,0, 67,30} }, +{ {0,1,2,3,3,0,0,1, 120,2} }, +{ {0,1,2,3,3,0,0,2, 120,28} }, +{ {0,1,2,3,3,0,0,3, 102,22} }, +{ {0,1,2,3,3,0,0,4, 160,33} }, +{ {0,1,2,3,3,0,1,0, 107,36} }, +{ {0,1,2,3,3,0,1,1, 111,5} }, +{ {0,1,2,3,3,0,1,2, 121,20} }, +{ {0,1,2,3,3,0,1,3, 111,22} }, +{ {0,1,2,3,3,0,1,4, 164,20} }, +{ {0,1,2,3,3,0,2,0, 108,44} }, +{ {0,1,2,3,3,0,2,1, 114,26} }, +{ {0,1,2,3,3,0,2,2, 66,25} }, +{ {0,1,2,3,3,0,2,3, 91,44} }, +{ {0,1,2,3,3,0,2,4, 150,44} }, +{ {0,1,2,3,3,0,3,0, 92,30} }, +{ {0,1,2,3,3,0,3,1, 104,28} }, +{ {0,1,2,3,3,0,3,2, 98,29} }, +{ {0,1,2,3,3,0,3,3, 71,4} }, +{ {0,1,2,3,3,0,3,4, 142,47} }, +{ {0,1,2,3,3,0,4,0, 147,36} }, +{ {0,1,2,3,3,0,4,1, 162,43} }, +{ {0,1,2,3,3,0,4,2, 163,20} }, +{ {0,1,2,3,3,0,4,3, 153,22} }, +{ {0,1,2,3,3,0,4,4, 150,25} }, +{ {0,1,2,3,3,0,4,5, 177,20} }, +{ {0,1,2,3,3,1,0,0, 108,9} }, +{ {0,1,2,3,3,1,0,1, 66,9} }, +{ {0,1,2,3,3,1,0,2, 114,43} }, +{ {0,1,2,3,3,1,0,3, 91,9} }, +{ {0,1,2,3,3,1,0,4, 150,9} }, +{ {0,1,2,3,3,1,1,0, 107,9} }, +{ {0,1,2,3,3,1,1,1, 64,36} }, +{ {0,1,2,3,3,1,1,2, 111,9} }, +{ {0,1,2,3,3,1,1,3, 90,9} }, +{ {0,1,2,3,3,1,1,4, 147,9} }, +{ {0,1,2,3,3,1,2,0, 109,9} }, +{ {0,1,2,3,3,1,2,1, 69,36} }, +{ {0,1,2,3,3,1,2,2, 69,25} }, +{ {0,1,2,3,3,1,2,3, 94,9} }, +{ {0,1,2,3,3,1,2,4, 151,43} }, +{ {0,1,2,3,3,1,3,0, 108,42} }, +{ {0,1,2,3,3,1,3,1, 65,36} }, +{ {0,1,2,3,3,1,3,2, 103,29} }, +{ {0,1,2,3,3,1,3,3, 72,24} }, +{ {0,1,2,3,3,1,3,4, 149,9} }, +{ {0,1,2,3,3,1,4,0, 146,43} }, +{ {0,1,2,3,3,1,4,1, 126,9} }, +{ {0,1,2,3,3,1,4,2, 150,43} }, +{ {0,1,2,3,3,1,4,3, 135,9} }, +{ {0,1,2,3,3,1,4,4, 148,9} }, +{ {0,1,2,3,3,1,4,5, 170,43} }, +{ {0,1,2,3,3,2,0,0, 107,25} }, +{ {0,1,2,3,3,2,0,1, 121,26} }, +{ {0,1,2,3,3,2,0,2, 111,30} }, +{ {0,1,2,3,3,2,0,3, 111,39} }, +{ {0,1,2,3,3,2,0,4, 164,41} }, +{ {0,1,2,3,3,2,1,0, 123,0} }, +{ {0,1,2,3,3,2,1,1, 107,5} }, +{ {0,1,2,3,3,2,1,2, 107,30} }, +{ {0,1,2,3,3,2,1,3, 107,39} }, +{ {0,1,2,3,3,2,1,4, 166,0} }, +{ {0,1,2,3,3,2,2,0, 107,44} }, +{ {0,1,2,3,3,2,2,1, 111,44} }, +{ {0,1,2,3,3,2,2,2, 64,25} }, +{ {0,1,2,3,3,2,2,3, 90,44} }, +{ {0,1,2,3,3,2,2,4, 147,44} }, +{ {0,1,2,3,3,2,3,0, 107,29} }, +{ {0,1,2,3,3,2,3,1, 111,29} }, +{ {0,1,2,3,3,2,3,2, 90,30} }, +{ {0,1,2,3,3,2,3,3, 64,4} }, +{ {0,1,2,3,3,2,3,4, 147,29} }, +{ {0,1,2,3,3,2,4,0, 166,20} }, +{ {0,1,2,3,3,2,4,1, 164,9} }, +{ {0,1,2,3,3,2,4,2, 147,30} }, +{ {0,1,2,3,3,2,4,3, 147,39} }, +{ {0,1,2,3,3,2,4,4, 146,25} }, +{ {0,1,2,3,3,2,4,5, 181,0} }, +{ {0,1,2,3,3,3,0,0, 92,5} }, +{ {0,1,2,3,3,3,0,1, 98,3} }, +{ {0,1,2,3,3,3,0,2, 104,11} }, +{ {0,1,2,3,3,3,0,3, 71,31} }, +{ {0,1,2,3,3,3,0,4, 142,2} }, +{ {0,1,2,3,3,3,1,0, 107,10} }, +{ {0,1,2,3,3,3,1,1, 90,5} }, +{ {0,1,2,3,3,3,1,2, 111,10} }, +{ {0,1,2,3,3,3,1,3, 64,31} }, +{ {0,1,2,3,3,3,1,4, 147,10} }, +{ {0,1,2,3,3,3,2,0, 108,27} }, +{ {0,1,2,3,3,3,2,1, 103,10} }, +{ {0,1,2,3,3,3,2,2, 65,25} }, +{ {0,1,2,3,3,3,2,3, 72,37} }, +{ {0,1,2,3,3,3,2,4, 149,44} }, +{ {0,1,2,3,3,3,3,0, 67,11} }, +{ {0,1,2,3,3,3,3,1, 76,11} }, +{ {0,1,2,3,3,3,3,2, 76,28} }, +{ {0,1,2,3,3,3,3,3, 58,30} }, +{ {0,1,2,3,3,3,3,4, 131,11} }, +{ {0,1,2,3,3,3,4,0, 147,3} }, +{ {0,1,2,3,3,3,4,1, 140,3} }, +{ {0,1,2,3,3,3,4,2, 153,10} }, +{ {0,1,2,3,3,3,4,3, 127,37} }, +{ {0,1,2,3,3,3,4,4, 135,5} }, +{ {0,1,2,3,3,3,4,5, 171,3} }, +{ {0,1,2,3,3,4,0,0, 147,25} }, +{ {0,1,2,3,3,4,0,1, 163,26} }, +{ {0,1,2,3,3,4,0,2, 162,26} }, +{ {0,1,2,3,3,4,0,3, 153,39} }, +{ {0,1,2,3,3,4,0,4, 150,36} }, +{ {0,1,2,3,3,4,0,5, 177,41} }, +{ {0,1,2,3,3,4,1,0, 166,41} }, +{ {0,1,2,3,3,4,1,1, 147,5} }, +{ {0,1,2,3,3,4,1,2, 164,44} }, +{ {0,1,2,3,3,4,1,3, 147,22} }, +{ {0,1,2,3,3,4,1,4, 146,36} }, +{ {0,1,2,3,3,4,1,5, 181,19} }, +{ {0,1,2,3,3,4,2,0, 146,26} }, +{ {0,1,2,3,3,4,2,1, 150,26} }, +{ {0,1,2,3,3,4,2,2, 126,44} }, +{ {0,1,2,3,3,4,2,3, 135,44} }, +{ {0,1,2,3,3,4,2,4, 148,44} }, +{ {0,1,2,3,3,4,2,5, 170,26} }, +{ {0,1,2,3,3,4,3,0, 147,46} }, +{ {0,1,2,3,3,4,3,1, 153,29} }, +{ {0,1,2,3,3,4,3,2, 140,46} }, +{ {0,1,2,3,3,4,3,3, 127,24} }, +{ {0,1,2,3,3,4,3,4, 135,30} }, +{ {0,1,2,3,3,4,3,5, 171,46} }, +{ {0,1,2,3,3,4,4,0, 164,30} }, +{ {0,1,2,3,3,4,4,1, 162,30} }, +{ {0,1,2,3,3,4,4,2, 162,5} }, +{ {0,1,2,3,3,4,4,3, 140,22} }, +{ {0,1,2,3,3,4,4,4, 126,30} }, +{ {0,1,2,3,3,4,4,5, 177,30} }, +{ {0,1,2,3,3,4,5,0, 181,43} }, +{ {0,1,2,3,3,4,5,1, 177,9} }, +{ {0,1,2,3,3,4,5,2, 177,44} }, +{ {0,1,2,3,3,4,5,3, 171,22} }, +{ {0,1,2,3,3,4,5,4, 170,36} }, +{ {0,1,2,3,3,4,5,5, 170,25} }, +{ {0,1,2,3,3,4,5,6, 184,0} }, +{ {0,1,2,3,4,0,0,0, 131,30} }, +{ {0,1,2,3,4,0,0,1, 159,2} }, +{ {0,1,2,3,4,0,0,2, 159,28} }, +{ {0,1,2,3,4,0,0,3, 143,22} }, +{ {0,1,2,3,4,0,0,4, 157,11} }, +{ {0,1,2,3,4,0,0,5, 176,33} }, +{ {0,1,2,3,4,0,1,0, 147,31} }, +{ {0,1,2,3,4,0,1,1, 153,5} }, +{ {0,1,2,3,4,0,1,2, 163,7} }, +{ {0,1,2,3,4,0,1,3, 150,38} }, +{ {0,1,2,3,4,0,1,4, 162,10} }, +{ {0,1,2,3,4,0,1,5, 177,33} }, +{ {0,1,2,3,4,0,2,0, 149,27} }, +{ {0,1,2,3,4,0,2,1, 156,45} }, +{ {0,1,2,3,4,0,2,2, 130,25} }, +{ {0,1,2,3,4,0,2,3, 138,38} }, +{ {0,1,2,3,4,0,2,4, 141,27} }, +{ {0,1,2,3,4,0,2,5, 173,27} }, +{ {0,1,2,3,4,0,3,0, 142,37} }, +{ {0,1,2,3,4,0,3,1, 165,23} }, +{ {0,1,2,3,4,0,3,2, 158,7} }, +{ {0,1,2,3,4,0,3,3, 133,39} }, +{ {0,1,2,3,4,0,3,4, 165,10} }, +{ {0,1,2,3,4,0,3,5, 180,20} }, +{ {0,1,2,3,4,0,4,0, 135,28} }, +{ {0,1,2,3,4,0,4,1, 141,28} }, +{ {0,1,2,3,4,0,4,2, 139,28} }, +{ {0,1,2,3,4,0,4,3, 144,28} }, +{ {0,1,2,3,4,0,4,4, 128,29} }, +{ {0,1,2,3,4,0,4,5, 169,47} }, +{ {0,1,2,3,4,0,5,0, 171,36} }, +{ {0,1,2,3,4,0,5,1, 178,9} }, +{ {0,1,2,3,4,0,5,2, 179,20} }, +{ {0,1,2,3,4,0,5,3, 173,23} }, +{ {0,1,2,3,4,0,5,4, 178,10} }, +{ {0,1,2,3,4,0,5,5, 173,4} }, +{ {0,1,2,3,4,0,5,6, 183,20} }, +{ {0,1,2,3,4,1,0,0, 149,42} }, +{ {0,1,2,3,4,1,0,1, 130,9} }, +{ {0,1,2,3,4,1,0,2, 156,8} }, +{ {0,1,2,3,4,1,0,3, 138,23} }, +{ {0,1,2,3,4,1,0,4, 141,42} }, +{ {0,1,2,3,4,1,0,5, 173,42} }, +{ {0,1,2,3,4,1,1,0, 147,42} }, +{ {0,1,2,3,4,1,1,1, 127,36} }, +{ {0,1,2,3,4,1,1,2, 153,9} }, +{ {0,1,2,3,4,1,1,3, 135,22} }, +{ {0,1,2,3,4,1,1,4, 140,42} }, +{ {0,1,2,3,4,1,1,5, 171,42} }, +{ {0,1,2,3,4,1,2,0, 151,8} }, +{ {0,1,2,3,4,1,2,1, 134,36} }, +{ {0,1,2,3,4,1,2,2, 134,25} }, +{ {0,1,2,3,4,1,2,3, 136,23} }, +{ {0,1,2,3,4,1,2,4, 145,42} }, +{ {0,1,2,3,4,1,2,5, 174,43} }, +{ {0,1,2,3,4,1,3,0, 150,42} }, +{ {0,1,2,3,4,1,3,1, 128,36} }, +{ {0,1,2,3,4,1,3,2, 155,8} }, +{ {0,1,2,3,4,1,3,3, 129,39} }, +{ {0,1,2,3,4,1,3,4, 141,9} }, +{ {0,1,2,3,4,1,3,5, 173,9} }, +{ {0,1,2,3,4,1,4,0, 148,42} }, +{ {0,1,2,3,4,1,4,1, 129,36} }, +{ {0,1,2,3,4,1,4,2, 144,29} }, +{ {0,1,2,3,4,1,4,3, 137,9} }, +{ {0,1,2,3,4,1,4,4, 132,29} }, +{ {0,1,2,3,4,1,4,5, 172,42} }, +{ {0,1,2,3,4,1,5,0, 170,8} }, +{ {0,1,2,3,4,1,5,1, 167,9} }, +{ {0,1,2,3,4,1,5,2, 173,8} }, +{ {0,1,2,3,4,1,5,3, 168,8} }, +{ {0,1,2,3,4,1,5,4, 169,42} }, +{ {0,1,2,3,4,1,5,5, 172,9} }, +{ {0,1,2,3,4,1,5,6, 182,43} }, +{ {0,1,2,3,4,2,0,0, 147,4} }, +{ {0,1,2,3,4,2,0,1, 163,23} }, +{ {0,1,2,3,4,2,0,2, 153,30} }, +{ {0,1,2,3,4,2,0,3, 150,23} }, +{ {0,1,2,3,4,2,0,4, 162,29} }, +{ {0,1,2,3,4,2,0,5, 177,12} }, +{ {0,1,2,3,4,2,1,0, 166,23} }, +{ {0,1,2,3,4,2,1,1, 147,24} }, +{ {0,1,2,3,4,2,1,2, 147,37} }, +{ {0,1,2,3,4,2,1,3, 146,23} }, +{ {0,1,2,3,4,2,1,4, 164,29} }, +{ {0,1,2,3,4,2,1,5, 181,32} }, +{ {0,1,2,3,4,2,2,0, 147,27} }, +{ {0,1,2,3,4,2,2,1, 153,44} }, +{ {0,1,2,3,4,2,2,2, 127,25} }, +{ {0,1,2,3,4,2,2,3, 135,39} }, +{ {0,1,2,3,4,2,2,4, 140,27} }, +{ {0,1,2,3,4,2,2,5, 171,27} }, +{ {0,1,2,3,4,2,3,0, 164,39} }, +{ {0,1,2,3,4,2,3,1, 162,23} }, +{ {0,1,2,3,4,2,3,2, 140,37} }, +{ {0,1,2,3,4,2,3,3, 126,39} }, +{ {0,1,2,3,4,2,3,4, 162,4} }, +{ {0,1,2,3,4,2,3,5, 177,39} }, +{ {0,1,2,3,4,2,4,0, 146,47} }, +{ {0,1,2,3,4,2,4,1, 150,47} }, +{ {0,1,2,3,4,2,4,2, 135,29} }, +{ {0,1,2,3,4,2,4,3, 148,39} }, +{ {0,1,2,3,4,2,4,4, 126,29} }, +{ {0,1,2,3,4,2,4,5, 170,47} }, +{ {0,1,2,3,4,2,5,0, 181,14} }, +{ {0,1,2,3,4,2,5,1, 177,34} }, +{ {0,1,2,3,4,2,5,2, 171,37} }, +{ {0,1,2,3,4,2,5,3, 170,23} }, +{ {0,1,2,3,4,2,5,4, 177,29} }, +{ {0,1,2,3,4,2,5,5, 170,24} }, +{ {0,1,2,3,4,2,5,6, 184,21} }, +{ {0,1,2,3,4,3,0,0, 142,24} }, +{ {0,1,2,3,4,3,0,1, 158,23} }, +{ {0,1,2,3,4,3,0,2, 165,38} }, +{ {0,1,2,3,4,3,0,3, 133,22} }, +{ {0,1,2,3,4,3,0,4, 165,29} }, +{ {0,1,2,3,4,3,0,5, 180,35} }, +{ {0,1,2,3,4,3,1,0, 164,22} }, +{ {0,1,2,3,4,3,1,1, 140,24} }, +{ {0,1,2,3,4,3,1,2, 162,38} }, +{ {0,1,2,3,4,3,1,3, 126,22} }, +{ {0,1,2,3,4,3,1,4, 162,31} }, +{ {0,1,2,3,4,3,1,5, 177,22} }, +{ {0,1,2,3,4,3,2,0, 150,27} }, +{ {0,1,2,3,4,3,2,1, 155,45} }, +{ {0,1,2,3,4,3,2,2, 128,25} }, +{ {0,1,2,3,4,3,2,3, 129,22} }, +{ {0,1,2,3,4,3,2,4, 141,44} }, +{ {0,1,2,3,4,3,2,5, 173,44} }, +{ {0,1,2,3,4,3,3,0, 160,22} }, +{ {0,1,2,3,4,3,3,1, 157,22} }, +{ {0,1,2,3,4,3,3,2, 157,39} }, +{ {0,1,2,3,4,3,3,3, 125,22} }, +{ {0,1,2,3,4,3,3,4, 157,30} }, +{ {0,1,2,3,4,3,3,5, 176,22} }, +{ {0,1,2,3,4,3,4,0, 150,46} }, +{ {0,1,2,3,4,3,4,1, 155,29} }, +{ {0,1,2,3,4,3,4,2, 141,29} }, +{ {0,1,2,3,4,3,4,3, 129,37} }, +{ {0,1,2,3,4,3,4,4, 128,4} }, +{ {0,1,2,3,4,3,4,5, 173,29} }, +{ {0,1,2,3,4,3,5,0, 177,35} }, +{ {0,1,2,3,4,3,5,1, 175,35} }, +{ {0,1,2,3,4,3,5,2, 178,22} }, +{ {0,1,2,3,4,3,5,3, 167,22} }, +{ {0,1,2,3,4,3,5,4, 178,31} }, +{ {0,1,2,3,4,3,5,5, 169,24} }, +{ {0,1,2,3,4,3,5,6, 183,35} }, +{ {0,1,2,3,4,4,0,0, 135,11} }, +{ {0,1,2,3,4,4,0,1, 139,2} }, +{ {0,1,2,3,4,4,0,2, 141,11} }, +{ {0,1,2,3,4,4,0,3, 144,11} }, +{ {0,1,2,3,4,4,0,4, 128,10} }, +{ {0,1,2,3,4,4,0,5, 169,2} }, +{ {0,1,2,3,4,4,1,0, 146,2} }, +{ {0,1,2,3,4,4,1,1, 135,10} }, +{ {0,1,2,3,4,4,1,2, 150,2} }, +{ {0,1,2,3,4,4,1,3, 148,22} }, +{ {0,1,2,3,4,4,1,4, 126,10} }, +{ {0,1,2,3,4,4,1,5, 170,2} }, +{ {0,1,2,3,4,4,2,0, 148,27} }, +{ {0,1,2,3,4,4,2,1, 144,10} }, +{ {0,1,2,3,4,4,2,2, 129,25} }, +{ {0,1,2,3,4,4,2,3, 137,44} }, +{ {0,1,2,3,4,4,2,4, 132,10} }, +{ {0,1,2,3,4,4,2,5, 172,27} }, +{ {0,1,2,3,4,4,3,0, 150,3} }, +{ {0,1,2,3,4,4,3,1, 141,10} }, +{ {0,1,2,3,4,4,3,2, 155,10} }, +{ {0,1,2,3,4,4,3,3, 129,24} }, +{ {0,1,2,3,4,4,3,4, 128,31} }, +{ {0,1,2,3,4,4,3,5, 173,10} }, +{ {0,1,2,3,4,4,4,0, 126,11} }, +{ {0,1,2,3,4,4,4,1, 128,11} }, +{ {0,1,2,3,4,4,4,2, 128,28} }, +{ {0,1,2,3,4,4,4,3, 132,11} }, +{ {0,1,2,3,4,4,4,4, 124,11} }, +{ {0,1,2,3,4,4,4,5, 167,11} }, +{ {0,1,2,3,4,4,5,0, 170,3} }, +{ {0,1,2,3,4,4,5,1, 169,3} }, +{ {0,1,2,3,4,4,5,2, 173,11} }, +{ {0,1,2,3,4,4,5,3, 172,22} }, +{ {0,1,2,3,4,4,5,4, 167,10} }, +{ {0,1,2,3,4,4,5,5, 168,11} }, +{ {0,1,2,3,4,4,5,6, 182,2} }, +{ {0,1,2,3,4,5,0,0, 171,25} }, +{ {0,1,2,3,4,5,0,1, 179,26} }, +{ {0,1,2,3,4,5,0,2, 178,44} }, +{ {0,1,2,3,4,5,0,3, 173,38} }, +{ {0,1,2,3,4,5,0,4, 178,29} }, +{ {0,1,2,3,4,5,0,5, 173,31} }, +{ {0,1,2,3,4,5,0,6, 183,41} }, +{ {0,1,2,3,4,5,1,0, 181,17} }, +{ {0,1,2,3,4,5,1,1, 171,24} }, +{ {0,1,2,3,4,5,1,2, 177,7} }, +{ {0,1,2,3,4,5,1,3, 170,38} }, +{ {0,1,2,3,4,5,1,4, 177,10} }, +{ {0,1,2,3,4,5,1,5, 170,37} }, +{ {0,1,2,3,4,5,1,6, 184,40} }, +{ {0,1,2,3,4,5,2,0, 170,45} }, +{ {0,1,2,3,4,5,2,1, 173,45} }, +{ {0,1,2,3,4,5,2,2, 167,44} }, +{ {0,1,2,3,4,5,2,3, 168,45} }, +{ {0,1,2,3,4,5,2,4, 169,27} }, +{ {0,1,2,3,4,5,2,5, 172,44} }, +{ {0,1,2,3,4,5,2,6, 182,26} }, +{ {0,1,2,3,4,5,3,0, 177,6} }, +{ {0,1,2,3,4,5,3,1, 178,39} }, +{ {0,1,2,3,4,5,3,2, 175,6} }, +{ {0,1,2,3,4,5,3,3, 167,39} }, +{ {0,1,2,3,4,5,3,4, 178,4} }, +{ {0,1,2,3,4,5,3,5, 169,37} }, +{ {0,1,2,3,4,5,3,6, 183,6} }, +{ {0,1,2,3,4,5,4,0, 170,46} }, +{ {0,1,2,3,4,5,4,1, 173,28} }, +{ {0,1,2,3,4,5,4,2, 169,46} }, +{ {0,1,2,3,4,5,4,3, 172,39} }, +{ {0,1,2,3,4,5,4,4, 167,29} }, +{ {0,1,2,3,4,5,4,5, 168,28} }, +{ {0,1,2,3,4,5,4,6, 182,47} }, +{ {0,1,2,3,4,5,5,0, 177,11} }, +{ {0,1,2,3,4,5,5,1, 178,30} }, +{ {0,1,2,3,4,5,5,2, 178,5} }, +{ {0,1,2,3,4,5,5,3, 169,22} }, +{ {0,1,2,3,4,5,5,4, 175,11} }, +{ {0,1,2,3,4,5,5,5, 167,30} }, +{ {0,1,2,3,4,5,5,6, 183,11} }, +{ {0,1,2,3,4,5,6,0, 184,35} }, +{ {0,1,2,3,4,5,6,1, 183,34} }, +{ {0,1,2,3,4,5,6,2, 183,7} }, +{ {0,1,2,3,4,5,6,3, 182,23} }, +{ {0,1,2,3,4,5,6,4, 183,10} }, +{ {0,1,2,3,4,5,6,5, 182,36} }, +{ {0,1,2,3,4,5,6,6, 182,25} }, +{ {0,1,2,3,4,5,6,7, 185,0} } +}; + +}//end namespace internal +}//end namespace Mesh_3 +}//end namespace CGAL + +#endif // CGAL_MESH_3_FEATURES_DETECTION_CASES_TABLES_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/combinations.h b/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/combinations.h new file mode 100644 index 00000000..afa9aabf --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/combinations.h @@ -0,0 +1,235 @@ +// Copyright (c) 2022 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/features_detection/combinations.h $ +// $Id: include/CGAL/Mesh_3/features_detection/combinations.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Sebastien Loriot +// +//****************************************************************************** +// +//****************************************************************************** + + +#ifndef CGAL_MESH_3_FEATURES_DETECTION_COMBINATIONS_H +#define CGAL_MESH_3_FEATURES_DETECTION_COMBINATIONS_H + +#include + +#include + +namespace CGAL +{ +namespace Mesh_3 +{ +namespace internal +{ + const std::array combinations[] + = { + // 1 color + {0,0,0,0,0,0,0,0}, //0 + // 2 colors + {0,0,0,0,0,0,0,1}, //1 + {0,0,0,0,0,0,1,1}, //2 + // 3 colors + {0,0,0,0,0,0,1,2}, //3 + {0,0,0,0,0,1,1,0}, + {0,0,0,0,0,1,1,1}, + {0,0,0,0,0,1,1,2}, + {0,0,0,0,0,1,2,0}, + {0,0,0,0,0,1,2,1}, + {0,0,0,0,1,1,1,1}, + {0,0,0,0,1,1,1,2}, + {0,0,0,0,1,1,2,2}, + {0,0,0,0,1,2,2,1}, + {0,0,0,1,0,1,1,0}, + {0,0,0,1,0,1,1,1}, + {0,0,0,1,0,1,1,2}, + {0,0,0,1,0,1,2,0}, + {0,0,0,1,0,1,2,1}, + {0,0,0,1,0,1,2,2}, + {0,0,0,1,1,0,0,0}, + {0,0,0,1,1,0,0,1}, + {0,0,0,1,1,0,0,2}, + {0,0,0,1,1,0,1,1}, + {0,0,0,1,1,0,1,2}, + {0,0,0,1,1,0,2,2}, + {0,0,0,1,1,1,1,0}, + {0,0,0,1,1,1,1,2}, + {0,0,0,1,1,1,2,0}, + {0,0,0,1,1,1,2,1}, + {0,0,0,1,1,1,2,2}, + {0,0,0,1,1,2,2,0}, + {0,0,0,1,1,2,2,1}, + {0,0,0,1,1,2,2,2}, + {0,0,0,1,2,0,0,0}, + {0,0,0,1,2,0,0,1}, + {0,0,0,1,2,0,0,2}, + {0,0,0,1,2,0,1,2}, + {0,0,0,1,2,0,2,1}, + {0,0,0,1,2,1,1,0}, + {0,0,0,1,2,1,1,2}, + {0,0,0,1,2,1,2,0}, + {0,0,0,1,2,1,2,1}, + {0,0,0,1,2,1,2,2}, + {0,0,0,1,2,2,2,1}, + {0,0,1,1,1,1,0,0}, + {0,0,1,1,1,1,0,2}, + {0,0,1,1,1,1,2,2}, + {0,0,1,1,1,2,0,2}, + {0,0,1,1,1,2,2,0}, + {0,0,1,2,1,2,0,0}, + {0,0,1,2,1,2,0,1}, + {0,0,1,2,1,2,2,1}, + {0,0,1,2,2,1,0,0}, + {0,0,1,2,2,1,0,1}, + {0,1,1,0,1,0,0,1}, + {0,1,1,0,1,0,0,2}, + {0,1,1,0,1,2,2,1}, + {0,1,1,2,1,2,2,0}, //57 + // 4 colors + {0,0,0,0,0,1,2,3}, //58 + {0,0,0,0,1,1,2,3}, + {0,0,0,0,1,2,2,3}, + {0,0,0,1,0,1,2,3}, + {0,0,0,1,0,2,3,0}, + {0,0,0,1,0,2,3,1}, + {0,0,0,1,1,0,2,3}, + {0,0,0,1,1,1,2,3}, + {0,0,0,1,1,2,2,3}, + {0,0,0,1,1,2,3,0}, + {0,0,0,1,1,2,3,1}, + {0,0,0,1,1,2,3,2}, + {0,0,0,1,2,0,0,3}, + {0,0,0,1,2,0,1,3}, + {0,0,0,1,2,0,2,3}, + {0,0,0,1,2,0,3,3}, + {0,0,0,1,2,1,1,3}, + {0,0,0,1,2,1,2,3}, + {0,0,0,1,2,1,3,0}, + {0,0,0,1,2,1,3,1}, + {0,0,0,1,2,1,3,2}, + {0,0,0,1,2,1,3,3}, + {0,0,0,1,2,2,2,3}, + {0,0,0,1,2,2,3,0}, + {0,0,0,1,2,2,3,1}, + {0,0,0,1,2,2,3,2}, + {0,0,0,1,2,2,3,3}, + {0,0,0,1,2,3,3,0}, + {0,0,0,1,2,3,3,1}, + {0,0,0,1,2,3,3,2}, + {0,0,0,1,2,3,3,3}, + {0,0,1,1,1,1,2,3}, + {0,0,1,1,1,2,0,3}, + {0,0,1,1,1,2,2,3}, + {0,0,1,1,1,2,3,0}, + {0,0,1,1,1,2,3,2}, + {0,0,1,1,1,2,3,3}, + {0,0,1,1,2,2,3,3}, + {0,0,1,1,2,3,2,3}, + {0,0,1,1,2,3,3,2}, + {0,0,1,2,1,2,0,3}, + {0,0,1,2,1,2,2,3}, + {0,0,1,2,1,2,3,3}, + {0,0,1,2,1,3,0,0}, + {0,0,1,2,1,3,0,1}, + {0,0,1,2,1,3,0,2}, + {0,0,1,2,1,3,2,0}, + {0,0,1,2,1,3,2,1}, + {0,0,1,2,1,3,2,3}, + {0,0,1,2,2,1,0,3}, + {0,0,1,2,2,1,1,3}, + {0,0,1,2,2,1,3,3}, + {0,0,1,2,2,3,0,0}, + {0,0,1,2,2,3,0,1}, + {0,0,1,2,2,3,0,2}, + {0,0,1,2,2,3,1,3}, + {0,0,1,2,2,3,3,1}, + {0,1,1,0,1,0,2,3}, + {0,1,1,0,1,2,2,3}, + {0,1,1,0,1,2,3,1}, + {0,1,1,0,2,3,3,2}, + {0,1,1,2,1,2,2,3}, + {0,1,1,2,1,2,3,0}, + {0,1,1,2,2,3,3,0}, + {0,1,1,2,3,0,2,3}, + {0,1,2,3,3,2,1,0}, //123 + // 5 colors + {0,0,0,0,1,2,3,4}, //124 + {0,0,0,1,0,2,3,4}, + {0,0,0,1,1,2,3,4}, + {0,0,0,1,2,0,3,4}, + {0,0,0,1,2,1,3,4}, + {0,0,0,1,2,2,3,4}, + {0,0,0,1,2,3,3,4}, + {0,0,0,1,2,3,4,0}, + {0,0,0,1,2,3,4,1}, + {0,0,0,1,2,3,4,2}, + {0,0,0,1,2,3,4,3}, + {0,0,1,1,1,2,3,4}, + {0,0,1,1,2,2,3,4}, + {0,0,1,1,2,3,2,4}, + {0,0,1,1,2,3,3,4}, + {0,0,1,2,1,2,3,4}, + {0,0,1,2,1,3,0,4}, + {0,0,1,2,1,3,2,4}, + {0,0,1,2,1,3,4,0}, + {0,0,1,2,1,3,4,1}, + {0,0,1,2,1,3,4,2}, + {0,0,1,2,1,3,4,4}, + {0,0,1,2,2,1,3,4}, + {0,0,1,2,2,3,0,4}, + {0,0,1,2,2,3,1,4}, + {0,0,1,2,2,3,2,4}, + {0,0,1,2,2,3,3,4}, + {0,0,1,2,2,3,4,4}, + {0,0,1,2,3,4,0,0}, + {0,0,1,2,3,4,0,1}, + {0,0,1,2,3,4,1,4}, + {0,0,1,2,3,4,2,1}, + {0,0,1,2,3,4,2,3}, + {0,1,1,0,1,2,3,4}, + {0,1,1,0,2,3,3,4}, + {0,1,1,2,1,2,3,4}, + {0,1,1,2,1,3,4,0}, + {0,1,1,2,1,3,4,1}, + {0,1,1,2,2,0,3,4}, + {0,1,1,2,2,3,3,4}, + {0,1,1,2,2,3,4,0}, + {0,1,1,2,3,0,2,4}, + {0,1,2,3,3,2,1,4}, //166 + // 6 colors + {0,0,0,1,2,3,4,5}, //167 + {0,0,1,1,2,3,4,5}, + {0,0,1,2,1,3,4,5}, + {0,0,1,2,2,3,4,5}, + {0,0,1,2,3,4,0,5}, + {0,0,1,2,3,4,1,5}, + {0,0,1,2,3,4,2,5}, + {0,0,1,2,3,4,5,5}, + {0,1,1,0,2,3,4,5}, + {0,1,1,2,1,3,4,5}, + {0,1,1,2,2,3,4,5}, + {0,1,1,2,3,0,4,5}, + {0,1,1,2,3,4,4,5}, + {0,1,1,2,3,4,5,3}, + {0,1,2,3,3,2,4,5}, //181 + // 7 colors + {0,0,1,2,3,4,5,6}, //182 + {0,1,1,2,3,4,5,6}, + {0,1,2,3,3,4,5,6}, //184 + // 8 colors + {0,1,2,3,4,5,6,7} //185 + + }; + +}//end namespace internal +}//end namespace Mesh_3 +}//end namespace CGAL + + +#endif // CGAL_MESH_3_FEATURES_DETECTION_COMBINATIONS_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/coordinates.h b/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/coordinates.h new file mode 100644 index 00000000..3403f17c --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/coordinates.h @@ -0,0 +1,62 @@ +// Copyright (c) 2022 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/features_detection/coordinates.h $ +// $Id: include/CGAL/Mesh_3/features_detection/coordinates.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Sebastien Loriot +// +//****************************************************************************** +// +//****************************************************************************** + + +#ifndef CGAL_MESH_3_FEATURES_DETECTION_COORDINATES_H +#define CGAL_MESH_3_FEATURES_DETECTION_COORDINATES_H + +#include + +#include + +namespace CGAL +{ +namespace Mesh_3 +{ +namespace internal +{ + using Coordinates = std::array; + constexpr Coordinates coordinates[8] = { {0, 0, 0}, + {1, 0, 0}, + {0, 1, 0}, + {1, 1, 0}, + {0, 0, 1}, + {1, 0, 1}, + {0, 1, 1}, + {1, 1, 1} }; + + inline Coordinates minus(const Coordinates& b, const Coordinates& a) { + return { b[0] - a[0], b[1] - a[1], b[2] - a[2] }; + } + + inline Coordinates cross(Coordinates a, Coordinates b) { + return { a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0] }; + } + + inline Coordinates square(Coordinates c) { + return { c[0] * c[0], c[1] * c[1], c[2] * c[2] }; + } + + inline int dist(Coordinates a, Coordinates b) { + auto s = square(minus(b, a)); + return s[0] + s[1] + s[2]; + } + +}//end namespace internal +}//end namespace Mesh_3 +}//end namespace CGAL + +#endif // CGAL_MESH_3_FEATURES_DETECTION_COORDINATES_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/cube_isometries.h b/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/cube_isometries.h new file mode 100644 index 00000000..1f48ab05 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/cube_isometries.h @@ -0,0 +1,89 @@ +// Copyright (c) 2022 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/features_detection/cube_isometries.h $ +// $Id: include/CGAL/Mesh_3/features_detection/cube_isometries.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Sebastien Loriot +// +//****************************************************************************** +// +//****************************************************************************** + +#ifndef CGAL_MESH_3_FEATURES_DETECTION_CUBE_ISOMETRIES_H +#define CGAL_MESH_3_FEATURES_DETECTION_CUBE_ISOMETRIES_H + +#include + +#include + +namespace CGAL +{ +namespace Mesh_3 +{ +namespace internal +{ + using Permutation = std::array; + + constexpr Permutation cube_isometries[] = { + {0,1,2,3,4,5,6,7}, + {1,0,3,2,5,4,7,6}, + {4,5,0,1,6,7,2,3}, + {5,4,1,0,7,6,3,2}, + {6,7,4,5,2,3,0,1}, + {7,6,5,4,3,2,1,0}, + {2,3,6,7,0,1,4,5}, + {3,2,7,6,1,0,5,4}, + {1,5,3,7,0,4,2,6}, + {5,1,7,3,4,0,6,2}, + {5,4,7,6,1,0,3,2}, + {4,5,6,7,0,1,2,3}, + {4,0,6,2,5,1,7,3}, + {0,4,2,6,1,5,3,7}, + {1,3,0,2,5,7,4,6}, + {3,1,2,0,7,5,6,4}, + {3,2,1,0,7,6,5,4}, + {2,3,0,1,6,7,4,5}, + {2,0,3,1,6,4,7,5}, + {0,2,1,3,4,6,5,7}, + {1,0,5,4,3,2,7,6}, + {0,1,4,5,2,3,6,7}, + {7,3,5,1,6,2,4,0}, + {3,7,1,5,2,6,0,4}, + {7,6,3,2,5,4,1,0}, + {6,7,2,3,4,5,0,1}, + {2,6,0,4,3,7,1,5}, + {6,2,4,0,7,3,5,1}, + {4,6,5,7,0,2,1,3}, + {6,4,7,5,2,0,3,1}, + {7,5,6,4,3,1,2,0}, + {5,7,4,6,1,3,0,2}, + {0,4,1,5,2,6,3,7}, + {4,0,5,1,6,2,7,3}, + {3,1,7,5,2,0,6,4}, + {1,3,5,7,0,2,4,6}, + {5,7,1,3,4,6,0,2}, + {7,5,3,1,6,4,2,0}, + {3,7,2,6,1,5,0,4}, + {7,3,6,2,5,1,4,0}, + {0,2,4,6,1,3,5,7}, + {2,0,6,4,3,1,7,5}, + {5,1,4,0,7,3,6,2}, + {1,5,0,4,3,7,2,6}, + {6,2,7,3,4,0,5,1}, + {2,6,3,7,0,4,1,5}, + {6,4,2,0,7,5,3,1}, + {4,6,0,2,5,7,1,3} + }; + + constexpr int num_isometries = 48; + +}//end namespace internal +}//end namespace Mesh_3 +}//end namespace CGAL + +#endif // CGAL_MESH_3_FEATURES_DETECTION_CUBE_ISOMETRIES_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/features_detection.h b/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/features_detection.h new file mode 100644 index 00000000..ff0ae97b --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/features_detection.h @@ -0,0 +1,4017 @@ +// Copyright (c) 2022 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/features_detection/features_detection.h $ +// $Id: include/CGAL/Mesh_3/features_detection/features_detection.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Sebastien Loriot, Christopher Nicol +// +//****************************************************************************** +// +//****************************************************************************** + + +#ifndef CGAL_MESH_3_FEATURES_DETECTION_H +#define CGAL_MESH_3_FEATURES_DETECTION_H + +#include + +#include + +#include +#include + +#include +#include //std::sqrt + +namespace CGAL +{ +namespace Mesh_3 +{ + +#define CGAL_SQRT65 8.06225774829854965236661323030 +#define CGAL_SQRT17 4.12310562561766054982140985597 + +template +std::vector

    create_polyline(const double start, + const double end, + P starting_point, + P ending_point, + Functor f, + const int prec) +{ + using Polyline = std::vector

    ; + Polyline poly; + poly.reserve(prec + 1); + poly.push_back(std::move(starting_point)); +#ifdef CGAL_DEBUG_TRIPLE_LINES + std::cerr << "new poly\n"; + std::cerr << " poly.push_back(" << poly.back() << "\n"; +#endif // CGAL_DEBUG_TRIPLE_LINES + const double step = (end - start) / prec; + const double stop = end - step / 2; + const bool step_is_positive = (step > 0); + for (double t = start + step; + (step_is_positive ? t < stop : t > stop); + t += step) + { + poly.push_back(f(t)); +#ifdef CGAL_DEBUG_TRIPLE_LINES + std::cerr << " poly.push_back(" << poly.back() << ")\n"; +#endif // CGAL_DEBUG_TRIPLE_LINES + } + poly.push_back(std::move(ending_point)); +#ifdef CGAL_DEBUG_TRIPLE_LINES + std::cerr << " poly.push_back(" << poly.back() << ")\n"; +#endif // CGAL_DEBUG_TRIPLE_LINES + return poly; +} + +template +std::vector

    create_polyline(const double start, + const double end, + P starting_point, + Functor f, + const int prec) +{ + return create_polyline(start, end, starting_point, f(end), f, prec); +} + +template +std::vector

    create_polyline(const double start, + const double end, + Functor f, + const int prec) +{ + return create_polyline

    (start, end, f(start), f(end), f, prec); +} + + +/* + c6 ------- c7 + /| /| + / | / | + / | / | + c4 ------- c5 | + | c2 ----|-- c3 + | / | / + | / | / + |/ |/ + c0 ------- c1 + + ci = color at the corner + + The coordinates of the unit cube are given by: + + for(int z = 0; z <=1 ; ++z) + for(int y = 0; y <=1 ; ++y) + for(int x = 0; x <=1 ; ++x) + cube.emplace_back(x, y, z); +*/ + + +// +// One internal corner +// + + // 00001221 + // corner is (1/2,1/2,2/3) + // curve_1 : x=1/2, y=[0,1/2], z=2/3 + // curve_1' : x=1/2, y=[1/2,1], z=2/3 + // curve_2 : x=[0,1/2], y=1/2, z=2/3 + // curve_2' : x=[1/2,1], y=1/2, z=2/3 + // curve_3 : x=1/2, y=1/2, z=[2/3,1] +template +std::vector> poly00001221(const int /* no sampling for segments */) +{ + P corner{ 1. / 2, 1. / 2, 2. / 3 }; + P a{ 1. / 2, 0, 2. / 3 }; + P b{ 1. / 2, 1, 2. / 3 }; + P c{ 0, 1. / 2, 2. / 3 }; + P d{ 1, 1. / 2, 2. / 3 }; + P e{ 1. / 2, 1. / 2, 1 }; + + return + { + { a, corner}, // segment curve_1 + { corner, b}, // segment curve_1' + { corner, c}, // segment curve_2 + { corner, d}, // segment curve_2' + { corner, e}, // segment curve_3 + }; +} +// 00111202 +// corner is (1/2,1/2,2/3) +// curve_1 : x=1/2,y=[0,1/2],z=2/3 +// curve_1' : x=1/2,y=[1/2,1],z=2/3 +// curve_2 : x=1/(3*z),y=1/2,z=[2/3,1] +// ADDED curve_2' : x=1/(3*z),y=1/2,z=[1/3,2/3] +// curve_3 : x=(2*z−1)/z,y=1/2, z=[1/2,2/3] +// REMOVED curve_3' : x=(2*z−1)/z,y=1/2, z=[2/3,1] +template +std::vector> poly00111202(const int prec = 10) +{ + P a{ 1. / 2, 0. , 2. / 3 }; + P corner{ 1. / 2, 1. / 2, 2. / 3 }; + P b{ 1. / 2, 1. , 2. / 3 }; + + auto f_curve_2 = [](double z) { return P(1. / (3 * z), 1. / 2, z); }; + auto f_curve_3 = [](double z) { return P((2. * z - 1) / z, 1. / 2, z); }; + + return + { + { a, corner}, // segment curve_1 + { corner, b}, // segment curve_1' + create_polyline(2. / 3, 1 , corner, f_curve_2, prec), // curve_2 + create_polyline(2. / 3, 1. / 3, corner, f_curve_2, prec), // curve_2' ADDED + create_polyline(2. / 3, 1. / 2, corner, f_curve_3, prec), // curve_3 + // create_polyline(2./3, 1. , corner, f_curve_3, prec), // curve_3' REMOVED + }; +} + +// 01101001 +// corner is (1/2,1/2,1/2) +// curve_1 : x=1/2, y=1/2, z=[0,1/2] +// curve_1' : x=1/2, y=1/2, z=[1/2,1] +// curve_2 : x=1/2, y=[0,1/2], z=1/2 +// curve_2' : x=1/2, y=[1/2,1], z=1/2 +// curve_3 : x=[0,1/2], y=1/2, z=1/2 +// curve_3' : x=[1/2,1], y=1/2, z=1/2 +template +std::vector> poly01101001(const int /* no sampling for segments */) +{ + P corner{ 1. / 2, 1. / 2, 1. / 2 }; + P a{ 1. / 2, 1. / 2, 0 }; + P b{ 1. / 2, 1. / 2, 1 }; + P c{ 1. / 2, 0, 1. / 2 }; + P d{ 1. / 2, 1, 1. / 2 }; + P e{ 0, 1. / 2, 1. / 2 }; + P f{ 1, 1. / 2, 1. / 2 }; + + return + { + { a, corner}, // segment curve_1 + { corner, b}, // segment curve_1' + { corner, c}, // segment curve_2 + { corner, d}, // segment curve_2' + { corner, e}, // segment curve_3 + { corner, f}, // segment curve_3' + }; +} + +// +// Two curves +// +template +std::vector> poly00011022(const int prec = 10) +{ + // x = (3*z^2-2*z)/(3*z^2-1), y = 1/(3*z), z = [1/3,1/2] + // x = (3*z^2-2*z)/(3*z^2-1), y = 1/(3*z), z = [2/3,1] + auto f = [](double z) {return P(z * (3 * z - 2) / (3 * z * z - 1), + 1 / (3 * z), + z); }; + return { + create_polyline

    (1. / 3, 1. / 2, f, prec), + create_polyline

    (2. / 3, 1. , f, prec), + }; +} + +// 00011221 +// curve_1 : x = ]1/2,1], y = (3 * x * x - sqrt(9 * x * x * x * x - 30 * x * x * x + 45 * x * x - 24 * x + 4) + 3 * x - 2)/(6 * x * (2 * x - 1)), z = 1./(3*x+3*y-6*x*y) +// point limit x = 1/2, y = 0, z = 2/3 +// curve_2 : x = ]0,1/3], y = (3 * x * x + sqrt(9 * x * x * x * x - 30 * x * x * x + 45 * x * x - 24 * x + 4) + 3 * x - 2)/(6 * x * (2 * x - 1)), z = 1./(3*x+3*y-6*x*y) +// point limit x = 0, y = 1/2, z = 2/3 +template +std::vector> poly00011221(const int prec = 10) +{ + auto sq_exp = [](double x) { + return std::sqrt(9 * x * x * x * x - 30 * x * x * x + 45 * x * x - 24 * x + 4); + }; + auto y1 = [sq_exp](double x) { return (3 * x * x - sq_exp(x) + 3 * x - 2) / (6 * x * (2 * x - 1)); }; + P corner1 = { 1. / 2, 0, 2. / 3 }; + auto y2 = [sq_exp](double x) { return (3 * x * x + sq_exp(x) + 3 * x - 2) / (6 * x * (2 * x - 1)); }; + P corner2 = { 0, 1. / 2, 2. / 3 }; + auto z = [](double x, double y) { return 1. / (3 * x + 3 * y - 6 * x * y); }; + return { + create_polyline(1. / 2, 1, corner1, + [y1, z](double x) { return P(x, y1(x), z(x, y1(x))); }, + prec), + create_polyline(0, 1. / 3, corner2, + [y2, z](double x) { return P(x, y2(x), z(x, y2(x))); }, + prec) + }; +} + +// 00011222 +// curve_1 : x = ]1/2,1[, y = (3 * x * x - sqrt(9 * x * x * x * x - 18 * x * x * x + 25 *x * x - 16 * x + 4) + x - 2)/(6 * (x - 1) * x), z = 1./(3*x+3*y-3*x*y) +// point limit x = 1/2, y = 1, z=1/3 +// point limit x = 1, y = 1/2, z=1/3 +// curve_2 : x = ]0,1/2], y = (3 * x * x + sqrt(9 * x * x * x * x - 18 * x * x * x + 25 *x * x - 16 * x + 4) + x - 2)/(6 * (x - 1) * x), z = 1./(3*x+3*y-3*x*y) +// point limit x = 0, y=1/2, z=2/3 +template +std::vector> poly00011222(const int prec = 10) +{ + auto sq_exp = [](double x) { + return std::sqrt(9 * x * x * x * x - 18 * x * x * x + 25 * x * x - 16 * x + 4); + }; + auto y1 = [sq_exp](double x) { return (3 * x * x - sq_exp(x) + x - 2) / (6 * (x - 1) * x); }; + P corner1 = { 1. / 2, 1, 1. / 3 }; + P corner1_bis = { 1, 1. / 2, 1. / 3 }; + auto y2 = [sq_exp](double x) { return (3 * x * x + sq_exp(x) + x - 2) / (6 * (x - 1) * x); }; + P corner2 = { 0, 1. / 2, 2. / 3 }; + auto z = [](double x, double y) { return 1. / (3 * x + 3 * y - 3 * x * y); }; + return { + create_polyline(1. / 2, 1, corner1, corner1_bis, + [y1, z](double x) { return P(x, y1(x), z(x, y1(x))); }, + prec), + create_polyline(0, 1. / 2, corner2, + [y2, z](double x) { return P(x, y2(x), z(x, y2(x))); }, + prec) + }; +} + +// 00121200 +// curve_1 : x = 1/2, y = (3*z-2)/(6*z-3), z = [0,1/3] +// curve_1' : x = 1/2, y = (3*z-2)/(6*z-3), z = [2/3,1] +template +std::vector> poly00121200(const int prec = 10) +{ + auto y = [](double z) { return (3 * z - 2) / (6 * z - 3); }; + return { + create_polyline

    (0, 1. / 3, + [y](double z) { return P(1. / 2, y(z), z); }, + prec), + create_polyline

    (2. / 3, 1, + [y](double z) { return P(1. / 2, y(z), z); }, + prec) + }; +} + +// 00121221 +// curve_1 : x = 1/2, y = (3*z-2)/(3*z-3), z = [0,2/3] +// curve_2 : x = 1/2, y = z/(3*z-1), z = [1/2,1] +template +std::vector> poly00121221(const int prec = 10) +{ + auto y1 = [](double z) { return (3 * z - 2) / (3 * z - 3); }; + auto y2 = [](double z) { return z / (3 * z - 1); }; + return { + create_polyline

    (0, 2. / 3, + [y1](double z) { return P(1. / 2, y1(z), z); }, + prec), + create_polyline

    (1. / 2, 1, + [y2](double z) { return P(1. / 2, y2(z), z); }, + prec) + }; +} + +// 00122100 +// curve_1 : x = 1/2, y = (3*z-2)/(6*z-3), z = [0,1/3] +// curve_1' : x = 1/2, y = (3*z-2)/(6*z-3), z = [2/3,1] +template +std::vector> poly00122100(const int prec = 10) +{ + auto y = [](double z) { return (3 * z - 2) / (6 * z - 3); }; + return { + create_polyline

    (0, 1. / 3, + [y](double z) { return P(1. / 2, y(z), z); }, + prec), + create_polyline

    (2. / 3, 1, + [y](double z) { return P(1. / 2, y(z), z); }, + prec) + }; +} + +// 00122101 +// curve_1 : x = [1/3,1/2] , y = (-sqrt(24 x^3 - 35 x^2 + 18 x - 3) - 5 x + 3)/(6 (x - 1)^2), x^2 - 3 x + 1!=0, +// z = (-sqrt(24 x^3 - 35 x^2 + 18 x - 3) - 7 x + 3)/(6 (x^2 - 3 x + 1)) +// curve_2 : x = [1./2,1[ , y = ( sqrt(24 x^3 - 35 x^2 + 18 x - 3) - 5 x + 3)/(6 (x - 1)^2), +// z = ( sqrt(24 x^3 - 35 x^2 + 18 x - 3) - 7 x + 3)/(6 (x^2 - 3 x + 1)) +// point limit of curve_2 when x -> 1 x = 1, y = 1/2, z = 1/3 +template +std::vector> poly00122101(const int prec = 10) +{ + auto sq_exp = [](double x) { + return std::sqrt(24 * x * x * x - 35 * x * x + 18 * x - 3); + }; +auto y1 = [sq_exp](double x) { return (-sq_exp(x) - 5*x + 3)/(6 * CGAL::square(x-1)); }; +auto z1 = [sq_exp](double x) { return (-sq_exp(x) - 7*x + 3)/(6 * (x*x - 3*x+1)); }; +auto y2 = [sq_exp](double x) { return ( sq_exp(x) - 5*x + 3)/(6 * CGAL::square(x-1)); }; +auto z2 = [sq_exp](double x) { return ( sq_exp(x) - 7*x + 3)/(6 * (x*x - 3*x+1)); }; + P corner{ 1., .5, 1. / 3 }; + return { + create_polyline

    (1. / 3, 1. / 2, + [y1, z1](double x) { return P(x, y1(x), z1(x)); }, + prec), + create_polyline

    (1., 1. / 2, corner, + [y2, z2](double x) { return P(x, y2(x), z2(x)); }, + prec), + }; +} + +// +// One curve +// +template +std::vector> poly00000012(const int prec = 10) +{ + // curve : x = 1/2, y = 2/(3*z), z = [2/3,1] + return { create_polyline

    (2. / 3, 1., + [](double z) { return P(0.5, 2. / (3. * z), z); }, + prec) }; +} + +// 00000112 +// x =[1/2,1], y = x/(3 * x - 1), z = (3 * x - 1)/(3 * x * x) +template +std::vector> poly00000112(const int prec = 10) +{ + return { create_polyline

    (1. / 2, 1, + [](double x) { return P(x, x / (3 * x - 1), (3 * x - 1) / (3 * x * x)); }, + prec) }; +} + +// 00000121 +// curve : x = 1/(3*z), y = 1/(3*z-1), z = [2/3,1] +template +std::vector> poly00000121(const int prec = 10) +{ + return { create_polyline

    (2. / 3, 1, + [](double z) { return P(1 / (3 * z), 1 / (3 * z - 1), z); }, + prec) }; +} + +// 00001112 +// curve : x = 1/(2*y), y = [1/2, 1],z = 2/3 +template +std::vector> poly00001112(const int prec = 10) +{ + return { create_polyline

    (1. / 2, 1, + [](double y) { return P(1 / (2 * y), y, 2. / 3); }, + prec) }; +} + +// 00001122 +// curve : x = [0,1], y = 1/2, z = 2/3 +template +std::vector> poly00001122(const int prec = 10) +{ + return { create_polyline

    (0, 1, + [](double x) { return P(x, 1. / 2, 2. / 3); }, + prec) }; +} + +// 00010121 +// curve : x =y * z / (z+y), y = ((3 * z * z - 1) - sqrt(CGAL::square(1 - 3 * z * z) - 12 * (z - 1) * z * z))/(6 * (z - 1) * z), z=[1,1/2[ +// point limit = (1/3, 1/2, 1) +template +std::vector> poly00010121(const int prec = 10) +{ + auto y = [](double z){ return ((3 * z * z - 1) - std::sqrt(CGAL::square(1 - 3 * z * z) - 12 * (z - 1) * z * z))/(6 * (z - 1) * z); }; + auto x = [](double y, double z) { return y * z / (z + y); }; + P corner(1. / 3, 1. / 2, 1); + return { create_polyline

    (1, 1. / 2, corner, + [x, y](double z) { return P(x(y(z), z), y(z), z); }, + prec) }; +} + +// 00010122 +// curve : x = z/(3*z^2-2*z+1), y = 1/(3*z), z = [1/3,1] +template +std::vector> poly00010122(const int prec = 10) +{ + return { create_polyline

    (1. / 3, 1, + [](double z) { return P(z / (3 * z * z - 2 * z + 1), 1. / (3 * z), z); }, + prec) }; +} +// 00011002 +// curve : x = (y+1)/(4*y-1), y = [2/3,1], z = 1/2 +template +std::vector> poly00011002(const int prec = 10) +{ + return { create_polyline

    (2. / 3, 1, + [](double y) { return P((y + 1) / (4 * y - 1), y, 1. / 2); }, + prec) }; +} +// 00011012 +// curve : x = (3*z^2-2*z+1)/(3*z^2), y = z/(3*z^2-2*z+1), z = [1/2, 1] +template +std::vector> poly00011012(const int prec = 10) +{ + return { create_polyline

    (1. / 2, 1, + [](double z) { return P((3 * z * z - 2 * z + 1) / (3 * z * z), z / (3 * z * z - 2 * z + 1), z); }, + prec) }; +} +// 00011110 +// curve : x = 1/(2*y), y = [1/2,1], z = 1/2 +template +std::vector> poly00011110(const int prec = 10) +{ + return { create_polyline

    (1. / 2, 1, + [](double y) { return P(1. / (2 * y), y, 1. / 2); }, + prec) }; +} +// 00011120 +// curve : x = (3*z^2-2*z)/(3*z^2-1), y = (3*z^2-1)/(6*z^2-3*z), z = [2/3,1] +template +std::vector> poly00011120(const int prec = 10) +{ + return { create_polyline

    (2. / 3, 1, + [](double z) { return P((3 * z * z - 2 * z) / (3 * z * z - 1), (3 * z * z - 1) / (6 * z * z - 3 * z), z); }, + prec) }; +} +// 00011121 +// curve : x = (3*z^2-2*z)/(3*z^2-z-1), y = (3*z^2-z-1)/(3*z^2-3*z), z =[1/2,2./3] +template +std::vector> poly00011121(const int prec = 10) +{ + return { create_polyline

    (1. / 2, 2. / 3, + [](double z) { return P((3 * z * z - 2 * z) / (3 * z * z - z - 1), (3 * z * z - z - 1) / (3 * z * z - 3 * z), z); }, + prec) }; +} +// 00011122 +// curve : x = (3*z*z-2*z)/(z-1),y = 1/(3*z),z = [1/3, 2/3] +// +template +std::vector> poly00011122(const int prec = 10) +{ + return { create_polyline

    (1. / 3,2. / 3, + [](double z) { return P((3 * z * z - 2 * z) / (z - 1), 1 / (3 * z), z); }, + prec) }; +} + +// 00011220 +// curve : x=[0,1/2], y = (2 * x - 1)/(3 * x - 2), z = (2 * (x^2 - 2 * x + 1))/(5 * x^2 - 7 * x + 3) +template +std::vector> poly00011220(const int prec = 10) +{ + return { create_polyline

    (0, 1. / 2, + [](double x) { return P(x, (2 * x - 1) / (3 * x - 2), (2 * (x * x - 2 * x + 1)) / (5 * x * x - 7 * x + 3)); }, + prec) }; +} +// 00012002 +// curve_1 : x = [2/3,1], y = (3 * x*x + sqrt(9 * x*x*x*x - 24 * x*x*x + 30 * x*x - 12 * x + 1) - 1)/(6 * x * (2 * x - 1)), z = 1 - 1./(3*x*y) +template +std::vector> poly00012002(const int prec = 10) +{ + auto y = [](double x) { return (3 * x * x + std::sqrt(9 * x * x * x * x - 24 * x * x * x + 30 * x * x - 12 * x + 1) - 1) / (6 * x * (2 * x - 1)); }; + return { create_polyline

    (2. / 3, 1, + [y](double x) { return P(x, y(x), 1 - 1. / (3 * x * y(x))); }, + prec) }; +} +// 00012012 +// curve_1 : x = [0, 1/2[ , y = 1./(-6*x*z+3*x+3*z), z = (3 *x*x + sqrt(9 *x*x*x*x - 18 *x*x*x + 25 *x*x - 16 * x + 4) - 7 * x + 2)/(6 *(x - 1) * (2 * x - 1)) +// curve_1 : x = ]1/2,1[, y = 1./(-6*x*z+3*x+3*z), z = (3 *x*x + sqrt(9 *x*x*x*x - 18 *x*x*x + 25 *x*x - 16 * x + 4) - 7 * x + 2)/(6 *(x - 1) * (2 * x - 1)) +// point limit x = 1, y = 2/3, z = 1/2 +// point limit x = 1/2, y= 2./3, z = 2./3); +// +template +std::vector> poly00012012(const int prec = 10) +{ + auto y = [](double x, double z) { return 1. / (-6 * x * z + 3 * x + 3 * z); }; + auto z = [](double x) { return (3 * x * x + std::sqrt(9 * x * x * x * x - 18 * x * x * x + 25 * x * x - 16 * x + 4) - 7 * x + 2) / (6 * (x - 1) * (2 * x - 1)); }; + P corner1(1. / 2, 2. / 3, 2. / 3); + P corner2(1, 2. / 3, 1. / 2); + return { create_polyline

    (1. / 2, 0, corner1, + [y, z](double x) { return P(x, y(x, z(x)), z(x)); }, + prec), + create_polyline

    (1. / 2, 1, corner1, corner2, + [y, z](double x) { return P(x, y(x, z(x)), z(x)); }, + prec) + }; +} +// 00012021 +// curve : x = (3*z-1)/(3*z), y = z/(3*z-1), z = [1/2,1] +template +std::vector> poly00012021(const int prec = 10) +{ + return { create_polyline

    (1. / 2, 1, + [](double z) { return P((3 * z - 1) / (3 * z), z / (3 * z - 1), z); }, + prec) }; +} +// 00012110 +// curve : x=]0,1/2], y = (3 * x * x + sqrt(9 * x * x * x * x - 18 * x * x * x + 25 * x * x - 16 * x + 4) + x - 2)/(6 * (x - 1) * x), z = (3*x*y-1)/(9*x*y-3*x-3*y) +// point limit : x = 0, y = 1/2, z = 2/3 +// +template +std::vector> poly00012110(const int prec = 10) +{ + auto y = [](double x) { return (3 * x * x + std::sqrt(9 * x * x * x * x - 18 * x * x * x + 25 * x * x - 16 * x + 4) + x - 2) / (6 * (x - 1) * x); }; + auto z = [](double x, double y) { return (3 * x * y - 1) / (9 * x * y - 3 * x - 3 * y); }; + P corner(0, 1. / 2, 2. / 3); + return { create_polyline

    (0, 1. / 2, corner, + [y, z](double x) { return P(x, y(x), z(x, y(x))); }, + prec) }; +} +// 00012112 +// x = ]0,1/2[, y = (3 * x*x + sqrt(9 * x * x * x * x - 36 * x * x * x + 40 * x * x - 20 * x + 4) + 2 * x - 2)/(6 * x * (2 * x - 1)), z = (3*x*y-1)/(9*x*y-3*x-3*y) +// point limit x = 0, y = 1/2, z = 2/3 +// point limit x = 1/2, y = 0, z = 2/3 +// +template +std::vector> poly00012112(const int prec = 10) +{ + auto y = [](double x) { return (3 * x * x + std::sqrt(9 * x * x * x * x - 36 * x * x * x + 40 * x * x - 20 * x + 4) + 2 * x - 2) / (6 * x * (2 * x - 1)); }; + auto z = [](double x, double y) { return (3 * x * y - 1) / (9 * x * y - 3 * x - 3 * y); }; + P corner1(0, 1. / 2, 2. / 3); + P corner2(1. / 2, 0, 2. / 3); + return { create_polyline

    (0, 1. / 2, corner1, corner2, + [y, z](double x) { return P(x, y(x), z(x, y(x))); }, + prec) }; +} + +// 00012120 +// curve : x = (3*z-1)/(3*z), y = (3*z^2-2*z)/(6*z^2-5*z+1), z = [2/3,1] +template +std::vector> poly00012120(const int prec = 10) +{ + return { create_polyline

    (2. / 3, 1, + [](double z) { return P((3 * z - 1) / (3 * z), (3 * z * z - 2 * z) / (6 * z * z - 5 * z + 1), z); }, + prec)}; +} +// +// 00012121 +// curve : x = (3*z-1)/(3*z), y = (3*z^2-2*z)/(3*z^2-4*z+1), z = [1/2,2/3] +template +std::vector> poly00012121(const int prec = 10) +{ + return { create_polyline

    (1. / 2, 2. / 3, + [](double z) { return P((3 * z - 1) / (3 * z), (3 * z * z - 2 * z) / (3 * z * z - 4 * z + 1), z); }, + prec) }; +} +// 00012122 +// curve : x = (6*z^2-6*z+1)/(3*z^2-3*z), y = (3*z^2-2*z)/(6*z^2-6*z+1), z = [1/3,2/3] +template +std::vector> poly00012122(const int prec = 10) +{ + auto x = [](double z) { return (6 * z * z - 6 * z + 1) / (3 * z * z - 3 * z); }; + auto y = [](double z) { return (3 * z * z - 2 * z) / (6 * z * z - 6 * z + 1); }; + return { create_polyline

    (1. / 3, 2. / 3, + [x,y](double z) { return P(x(z), y(z), z); }, + prec) }; +} +// 00012221 +// curve : x = 1/(3*y),y = [1/3,1],z = 1/2 +template +std::vector> poly00012221(const int prec = 10) +{ + return { create_polyline

    (1. / 3, 1, + [](double y) { return P(1. / (3 * y),y , 1. / 2); }, + prec) }; +} + +// 00111100 +// curve : x = [0,1], y = 1/2, z = 1/2 +template +std::vector> poly00111100(const int prec = 10) +{ + return { create_polyline

    (0, 1, + [](double x) { return P(x , 1. / 2, 1. / 2); }, + prec) }; +} + +// 00111102 +// curve : x = (2*z-1)/(3*z^2-z), y = (3*z-1)/(6*z-3), z = [2/3,1] +template +std::vector> poly00111102(const int prec = 10) +{ + return { create_polyline

    (2. / 3, 1, + [](double z) { return P((2 * z - 1) / (3 * z * z - z), (3 * z - 1) / (6 * z - 3), z); }, + prec) }; +} + +// 00111220 +// segment 1/2 0 2/3 1/2 1 2/3 +template +std::vector> poly00111220(const int /*not needed for a segment*/) +{ + return { { P(1. / 2, 0, 2. / 3), P(1. / 2, 1, 2. / 3) } }; +} + +// 00121201 +// curve_1 : x =[1/2, 2/3], y = (-sqrt(-24 * x^3 + 37 * x^2 - 20 * x + 4) + 5 * x - 2)/(6 * x^2), z = ( sqrt(-24 * x^3 + 37 * x^2 - 20 * x + 4) + 5 * x - 2)/(6 * x^2) +// curve_2 : x =[1/2, 2/3], y = ( sqrt(-24 * x^3 + 37 * x^2 - 20 * x + 4) + 5 * x - 2)/(6 * x^2), z = (-sqrt(-24 * x^3 + 37 * x^2 - 20 * x + 4) + 5 * x - 2)/(6 * x^2) +// point 0 1/2 1/2 +template +std::vector> poly00121201(const int prec = 10) +{ + auto sq_exp = [](double x) { + return std::sqrt(-24 * x * x * x + 37 * x * x - 20 * x + 4); + }; + auto y = [sq_exp](double x) { return (-sq_exp(x) + 5 * x - 2) / (6 * x * x); }; + auto z = [sq_exp](double x) { return (sq_exp(x) + 5 * x - 2) / (6 * x * x); }; + P corner{ 2. / 3, y(2. / 3), z(2. / 3) }; + return { + create_polyline

    (2. / 3, 1. / 2, corner, + [y, z](double x) { return P(x, y(x), z(x)); }, + prec), + create_polyline

    (2. / 3, 1. / 2, corner, + [y, z](double x) { return P(x, z(x), y(x)); }, + prec), + // { P(0., .5, .5), P(0., .5, .5) } + }; +} + + +inline double limit_value(double bound, double direction, double epsilon=1e-6) +{ + return bound + direction * epsilon; +} + +// 00000123 +// curve 1 : x =1/2, y = -(z-2.)/(2.*z), z = [2/3, 1] +// curve 2 : x = -(z/2.-1)/z, y = 1./2., z =[2/3, 1] +template +std::vector> poly00000123(const int prec = 10) +{ + return { + create_polyline(2./3, 1., P(1./2, 1, 2./3), + [](double z) { return P( 1./2, -(z-2.)/(2.*z), z); }, + prec), + create_polyline(2./3, 1., P(1, 1./2, 2./3), + [](double z) { return P(-(z-2.)/(2.*z), 1./2, z); }, + prec), +}; +} + + +//00001123 +// curve 1 : x = (3*z - 2)/(2*z - 1), y = (2*z - 1)/z, z = [2/3, 3/4] +// curve 2 : x = -(z - 1)/(2*z - 1), y = (2*z - 1)/z, z = [2/3, 3/4] +// curve 3 : x =1/2, y = -2*(z - 1)/z, z = [2/3, 3/4] +// curve 4 : x = 1/2, y = 2/3, z = [3/4,1] +template +std::vector> poly00001123(const int prec = 10) +{ +return { + create_polyline(2./3, 3./4, P(0, 1./2, 2./3), + [](double z) { return P( (3*z - 2)/(2*z - 1), (2*z - 1)/z, z); }, + prec), + create_polyline(2./3, 3./4, P(1, 1./2, 2./3), + [](double z) { return P( -(z - 1)/(2*z - 1),(2*z - 1)/z, z); }, + prec), + create_polyline(2./3, 3./4, P(1./2, 1, 2./3), + [](double z) { return P( 1./2,-2*(z - 1)/z, z); }, + prec), + create_polyline(3./4, 1., P(1./2, 2./3, 3./4),P(1./2,2./3.,1.), + [](double z) { return P( 1./2,2./3, z); }, + prec), +}; +} + +//00001223 + +// curve 1 : x = -(z*(-sqrt((z - 1)*(13*z - 9))/(2*z) + (5*z - 3)/(2*z)) - 5*z + 3)/z, y = -sqrt((z - 1)*(13*z - 9))/(2*z) + (5*z - 3)/(2*z), z = [2/3, 9/13] +// curve 2 : x = -(z*(sqrt((z - 1)*(13*z - 9))/(2*z) + (5*z - 3)/(2*z)) - 5*z + 3)/z, y = sqrt((z - 1)*(13*z - 9))/(2*z) + (5*z - 3)/(2*z), z = [2/3, 9/13] +// curve 3 : x = -(z*(-sqrt((z - 1)*(13*z - 9))/(2*z) - 3*(z - 1)/(2*z)) + 3*z - 3)/z, y = -sqrt((z - 1)*(13*z - 9))/(2*z) - 3*(z - 1)/(2*z), z = [2/3, 9/13] +// curve 4 : x = -(z*(sqrt((z - 1)*(13*z - 9))/(2*z) - 3*(z - 1)/(2*z)) + 3*z - 3)/z, y = sqrt((z - 1)*(13*z - 9))/(2*z) - 3*(z - 1)/(2*z), z = [2/3, 9/13] +template +std::vector> poly00001223(const int prec = 10) +{ +return { + create_polyline(2./3, 9./13, P(1./2, 0., 2./3), + [](double z) { return P( -(z*(-std::sqrt((z - 1)*(13*z - 9))/(2*z) + (5*z - 3)/(2*z)) - 5*z + 3)/z, -std::sqrt((z - 1)*(13*z - 9))/(2*z) + (5*z - 3)/(2*z), z); }, + prec), + create_polyline(2./3, 9./13, P(0., 1./2, 2./3), + [](double z) { return P( -(z*(std::sqrt((z - 1)*(13*z - 9))/(2*z) + (5*z - 3)/(2*z)) - 5*z + 3)/z, std::sqrt((z - 1)*(13*z - 9))/(2*z) + (5*z - 3)/(2*z), z); }, + prec), + create_polyline(2./3, 9./13, P(1., 1./2, 2./3), + [](double z) { return P(-(z*(-std::sqrt((z - 1)*(13*z - 9))/(2*z) - 3*(z - 1)/(2*z)) + 3*z - 3)/z, -std::sqrt((z - 1)*(13*z - 9))/(2*z) - 3*(z - 1)/(2*z), z); }, + prec), + create_polyline(2./3, 9./13, P(1./2, 1., 2./3), + [](double z) { return P( -(z*(std::sqrt((z - 1)*(13*z - 9))/(2*z) - 3*(z - 1)/(2*z)) + 3*z - 3)/z, std::sqrt((z - 1)*(13*z - 9))/(2*z) - 3*(z - 1)/(2*z), z); }, + prec), +}; +} + +//00010123 +// curve 1 : x = -(3*z - 1)*(z*z /(3*z - 1) - 1)/(2*z*z), y = z/(3*z - 1), z = [1/2,1] +// curve 2 : x = 1./2, y = -(z - 2)/(z + 1), z = [1/2,1] +template +std::vector> poly00010123(const int prec = 10) +{ +return { + create_polyline(1./2, 1., P(1./2, 1., 1./2), + [](double z) { return P(-(3*z - 1)*(z*z /(3*z - 1) - 1)/(2*z*z), z/(3*z - 1),z); }, + prec), + create_polyline(1./2, 1., P(1./2, 1., 1./2), + [](double z) { return P( 1./2 , -(z - 2)/(z + 1),z); }, + prec), + +}; +} + +//00010230 +// no curves +template +std::vector> poly00010230(const int /*prec*/ = 10) +{ +return { + + +}; +} + +//00010231 +// curve 1 : x = (z + 1)*(z**2/(z + 1) - 1)/(z*(z - 3)), y = z/(z + 1), z = [1/2,1] +// curve 2 : x = (z + 1 + (z**2 - 3*z)*(z**2 - z - 1)/(z*(z - 3)))/(z*(z + 1)), y = (z**2 - z - 1)/(z*(z - 3)), z = [1/2,1] +template +std::vector> poly00010231(const int prec = 10) +{ +return { + create_polyline(1./2, 1., P(1., 1./3, 1./2), + [](double z) { return P((z + 1)*(z*z/(z + 1) - 1)/(z*(z - 3)), z/(z + 1),z); }, + prec), + create_polyline(1./2, 1., P(1./3, 1., 1./2), + [](double z) { return P((z + 1 + (z*z - 3*z)*(z*z - z - 1)/(z*(z - 3)))/(z*(z + 1)), (z*z - z - 1)/(z*(z - 3)),z); }, + prec), + +}; +} + +//00011023 + +// curve 1 : x = -(-2*z**2 + z + (z**2 - 3*z)*(-(z**2 + z + 1)/(2*z*(z - 3)) + sqrt(z**4 + 6*z**3 - 9*z**2 + 2*z + 1)/(2*z*(z - 3))) + 1)/(2*z**2), y = -(z**2 + z + 1)/(2*z*(z - 3)) + sqrt(z**4 + 6*z**3 - 9*z**2 + 2*z + 1)/(2*z*(z - 3)), z = [2/3,1] +// curve 2 : x = 1/2, y = -(z - 2)/(z + 1), z = [1/2,1] +// curve 3 : x = [1/2,1[, y = (sqrt(8*x*x*x - 3*x*x - 2*x + 1) + x + 1)/(2*x*(2*x + 1)), z = (sqrt(8*x*x*x - 3*x*x - 2*x + 1) - x - 1)/(2*(2*x*x - x - 1))) +template +std::vector> poly00011023(const int prec = 10) +{ +return { + create_polyline(2./3, 1., P(0, 1./2, 2./3), + [](double z) { return P(-(-2*z*z + z + (z*z - 3*z)*(-(z*z + z + 1)/(2*z*(z - 3)) + std::sqrt(z*z*z*z + 6*z*z*z - 9*z*z + 2*z + 1)/(2*z*(z - 3))) + 1)/(2*z*z) , -(z*z + z + 1)/(2*z*(z - 3)) + std::sqrt(z*z*z*z + 6*z*z*z - 9*z*z + 2*z + 1)/(2*z*(z - 3)) ,z); }, + prec), + create_polyline(1./2, 1., P(1./2, 1., 1./2), + [](double z) { return P(1./2,-(z - 2)/(z + 1) ,z); }, + prec), + create_polyline(1./2, limit_value(1.,-1.), P(1./2, 1.,1./2), + [](double x) { return P(x, (std::sqrt(8*x*x*x - 3*x*x - 2*x + 1) + x + 1)/(2*x*(2*x + 1)) ,(std::sqrt(8*x*x*x - 3*x*x - 2*x + 1) - x - 1)/(2*(2*x*x - x - 1)) ); }, + prec), + + +}; +} + +//00011123 +// curve 1 : x = z*(3*z - 2)/(2*z*z - 1), y = (2*z*z - 1)/(z*(4*z - 3)), z = [1/2.2/3] +// curve 2 : x = 1./2, y = [2/3,1], z = y/(2*(-1 + 2*y)) +// problem with close polylines, there is an over refinement +template +std::vector> poly00011123(const int prec = 10) +{ +return { + create_polyline(1./2, 2./3, P(1./2, 1., 1./2),P(0., 1./2, 2./3), + [](double z) { return P(z*(3*z - 2)/(2*z*z - 1) , (2*z*z - 1)/(z*(4*z - 3)) ,z); }, + prec), + create_polyline( 2./3,1., P(1./2, 2./3, 1.),P(1./2, 1., 1./2), + [](double y) { return P(1./2,y,y/(2*(-1 + 2*y))); }, + prec) +}; +} + +//00011223 +// curve 1 : x = [1/2,3/5[U ]3/5,1], y = (-2 + 2*x + 3*x*x - sqrt(4 - 20*x + 36*x*x - 28*x*x*x + 9*x*x*x*x))/(2*x*(-3 + 5*x)), z = (2 - 2*x + 3*x*x - sqrt(4 - 20*x + 36*x*x - 28*x*x*x + 9*x*x*x*x))/(2*(3 - 5*x + 4*x*x)) +// curve 2 : x = ]0,1/2], y = (-2 + 2*x + 3*x*x + sqrt(4 - 20*x + 36*x*x - 28*x*x*x + 9*x*x*x*x))/(2*x*(-3 + 5*x)), z = (2 - 2*x + 3*x*x + sqrt(4 - 20*x + 36*x*x - 28*x*x*x + 9*x*x*x*x))/(2*(3 - 5*x + 4*x*x)) +// curve 3 : x = -(-3*z + (4*z - 1)*(3*z/(2*(4*z - 1)) + sqrt(-z*(7*z - 4))/(2*(4*z - 1))))/(4*z - 1), y = 3*z/(2*(4*z - 1)) + sqrt(-z*(7*z - 4))/(2*(4*z - 1)), z = [1/2,4/7] +// curve 4 : x = -(-3*z + (4*z - 1)*(3*z/(2*(4*z - 1)) - sqrt(-z*(7*z - 4))/(2*(4*z - 1))))/(4*z - 1), y = 3*z/(2*(4*z - 1)) - sqrt(-z*(7*z - 4))/(2*(4*z - 1)), z = [1/2,4/7] +// problem with close polylines, there is an over refinement +template +std::vector> poly00011223(const int prec = 10) +{ +return { + create_polyline( 1./2,4./7, P(1./2, 1., 1./2),P(2./3, 2./3, 4./7), + [](double z) { return P(-(-3*z + (4*z - 1)*(3*z/(2*(4*z - 1)) + std::sqrt(-z*(7*z - 4))/(2*(4*z - 1))))/(4*z - 1),3*z/(2*(4*z - 1)) + std::sqrt(-z*(7*z - 4))/(2*(4*z - 1)),z); }, + prec), + create_polyline( 1./2,4./7, P(1., 1./2, 1./2),P(2./3, 2./3, 4./7), + [](double z) { return P(-(-3*z + (4*z - 1)*(3*z/(2*(4*z - 1)) - std::sqrt(-z*(7*z - 4))/(2*(4*z - 1))))/(4*z - 1),3*z/(2*(4*z - 1)) - std::sqrt(-z*(7*z - 4))/(2*(4*z - 1)),z); }, + prec), + create_polyline( 1./2,limit_value(3./5,-1.), P(1./2, 1., 1./2),P(3./5,5./7,5./9), + [](double x) { return P(x,(-2. + 2*x + 3*x*x - std::sqrt(4 - 20*x + 36*x*x - 28*x*x*x + 9*x*x*x*x))/(2*x*(-3 + 5*x)),(2. - 2*x + 3*x*x - std::sqrt(4 - 20*x + 36*x*x - 28*x*x*x + 9*x*x*x*x))/(2*(3 - 5*x + 4*x*x)) ); }, + prec), + create_polyline(limit_value(3./5,1.),1.,P(3./5,5./7,5./9),P(1., 1./2, 1./2), + [](double x) { return P(x,(-2. + 2*x + 3*x*x - std::sqrt(4 - 20*x + 36*x*x - 28*x*x*x + 9*x*x*x*x))/(2*x*(-3 + 5*x)),(2. - 2*x + 3*x*x - std::sqrt(4 - 20*x + 36*x*x - 28*x*x*x + 9*x*x*x*x))/(2*(3 - 5*x + 4*x*x)) ); }, + prec), + create_polyline( limit_value(0.,1.), 1./2, P(0., 1./2, 2./3),P(1./2, 0., 2./3), + [](double x) { return P(x,(-2. + 2*x + 3*x*x + std::sqrt(4 - 20*x + 36*x*x - 28*x*x*x + 9*x*x*x*x))/(2*x*(-3 + 5*x)),(2. - 2*x + 3*x*x + std::sqrt(4 - 20*x + 36*x*x - 28*x*x*x + 9*x*x*x*x))/(2*(3 - 5*x + 4*x*x)) ); }, + prec), +}; +} +//00011230 +//curve 1 : x = -(-4*z*z + z + (3*z*z - z)*((5*z*z - z - 1)/(2*z*(3*z - 1)) - sqrt(-11*z*z*z*z + 26*z*z*z - 17*z*z + 2*z + 1)/(2*z*(3*z - 1))) + 1)/(z*(5*z - 3)), y = (5*z*z - z - 1)/(2*z*(3*z - 1)) - sqrt(-11*z*z*z*z + 26*z*z*z - 17*z*z + 2*z + 1)/(2*z*(3*z - 1)), z = [2/3,1] +//curve 2 : x = ]0,1/2], y = (-2 + x + x*x + sqrt(4 - 16*x + 25*x*x - 14*x*x*x + x*x*x*x))/(2*x*(-3 + 4*x)), z = (2 - x + x*x + sqrt(4 - 16*x + 25*x*x - 14*x*x*x + x*x*x*x))/(2*(3 - 5*x + 3*x*x)) +template +std::vector> poly00011230(const int prec = 10) +{ +return { + create_polyline(2./3, 1., P(1./2, 0.,2./3), P(1./2,1./2,1.), + [](double z) { return P(-(-4*z*z + z + (3*z*z - z)*((5*z*z - z - 1)/(2*z*(3*z - 1)) - std::sqrt(-11*z*z*z*z + 26*z*z*z - 17*z*z + 2*z + 1)/(2*z*(3*z - 1))) + 1)/(z*(5*z - 3)),(5*z*z - z - 1)/(2*z*(3*z - 1)) - std::sqrt(-11*z*z*z*z + 26*z*z*z - 17*z*z + 2*z + 1)/(2*z*(3*z - 1)),z ); }, + prec), + create_polyline(limit_value(0.,1.), 1./2, P(0., 1./2,2./3), P(1./2,1./2,1.), + [](double x) { return P(x,(-2 + x + x*x + std::sqrt(4 - 16*x + 25*x*x - 14*x*x*x + x*x*x*x))/(2*x*(-3 + 4*x)),(2 - x + x*x + std::sqrt(4 - 16*x + 25*x*x - 14*x*x*x + x*x*x*x))/(2*(3 - 5*x + 3*x*x))); }, + prec), + +}; +} + +//00011231 +//curve 1 : x = [1/2,1], y = (-1 + 2*x + 3*x*x - sqrt(1 - 8*x + 22*x*x - 20*x*x*x + 9*x*x*x*x))/(2*x*(-1 + 4*x)), z = (1 - 2*x + 3*x*x - sqrt(1 - 8*x + 22*x*x - 20*x*x*x + 9*x*x*x*x))/(2*(1 - 3*x + 2*x*x)) +//curve 2 : x = [0,1/3], y = (-2 + 2*x + x*x + sqrt(4 - 20*x + 28*x*x - 12*x*x*x + x*x*x*x))/(2*x*(-3 + 4*x)), z = (2 - 2*x + x*x + sqrt(4 - 20*x + 28*x*x - 12*x*x*x + x*x*x*x))/(2*(3 - 5*x + 2*x*x)) +template +std::vector> poly00011231(const int prec = 10) +{ +return { + create_polyline(1./2, 1., P(1./2, 0.,2./3), P(1.,1./3,1./2), + [](double x) { return P(x,(-1 + 2*x + 3*x*x - std::sqrt(1 - 8*x + 22*x*x - 20*x*x*x + 9*x*x*x*x))/(2*x*(-1 + 4*x)),(1 - 2*x + 3*x*x - std::sqrt(1 - 8*x + 22*x*x - 20*x*x*x + 9*x*x*x*x))/(2*(1 - 3*x + 2*x*x)) ); }, + prec), + create_polyline(0., 1./3, P(0.,1./2,2./3), P(1./3,1.,1./2), + [](double x) { return P(x,(-2 + 2*x + x*x + std::sqrt(4 - 20*x + 28*x*x - 12*x*x*x + x*x*x*x))/(2*x*(-3 + 4*x)) ,(2 - 2*x + x*x + std::sqrt(4 - 20*x + 28*x*x - 12*x*x*x + x*x*x*x))/(2*(3 - 5*x + 2*x*x)) ); }, + prec), +}; +} + +//00011232 +//curve 1 : x = [1/2,1[, y = (-1 + 3*x*x - sqrt(1 - 4*x + 6*x*x - 8*x*x*x + 9*x*x*x*x))/(2*(-1 + x)*x), z = (1 + 3*x*x - sqrt(1 - 4*x + 6*x*x - 8*x*x*x + 9*x*x*x*x))/(2*(1 + 2*x*x)) +//curve 2 : x = [0.366025,1./2], y = (-1 + 3*x*x + sqrt(1 - 4*x + 6*x*x - 8*x*x*x + 9*x*x*x*x))/(2*(-1 + x)*x), z = (1 + 3*x*x + sqrt(1 - 4*x + 6*x*x - 8*x*x*x + 9*x*x*x*x))/(2*(1 + 2*x*x)) +//curve 3 : x = -(-3.*z*z + z + (3*z*z - 3*z)*((2*z + 1)/(6*z) - sqrt(-8*z*z + 4*z + 1)/(6*z)) + 1)/(z*(2*z - 1)), y = (2*z + 1)/(6*z) - sqrt(-8.*z*z + 4*z + 1)/(6*z), z = [2./3,(1+1.73205)/4] +//curve 4 : x = [0.366025,1./2], y = -x/(-1 + x), z = (-1 + x + x*x)/(-1 + 2*x*x) +//curve 5 : x = [1./3,0.366025], y = -x/(-1 + x), z = -(x*x)/(1 - 4*x + 2*x*x) +template +std::vector> poly00011232(const int prec = 10) +{ +return { + create_polyline(1./2,limit_value(1.,-1.), P(1./2, 1.,1./2), P(1.,1./2,1./3), + [](double x) { return P(x,(-1 + 3*x*x - std::sqrt(1 - 4*x + 6*x*x - 8*x*x*x + 9*x*x*x*x))/(2*(-1 + x)*x),(1 + 3*x*x - std::sqrt(1 - 4*x + 6*x*x - 8*x*x*x + 9*x*x*x*x))/(2*(1 + 2*x*x)) ); }, + prec), + create_polyline(0.366025,1./2, P(0.366025,0.57735,(1+1.73205)/4), P(1./2,0.,2./3), + [](double x) { return P(x,(-1 + 3*x*x + std::sqrt(1 - 4*x + 6*x*x - 8*x*x*x + 9*x*x*x*x))/(2*(-1 + x)*x),(1 + 3*x*x + std::sqrt(1 - 4*x + 6*x*x - 8*x*x*x + 9*x*x*x*x))/(2*(1 + 2*x*x)) ); }, + prec), + create_polyline(2./3,(1+1.73205)/4.,P(0.,1./2,2./3),P(0.366025,0.57735,(1+1.73205)/4), + [](double z) { return P( -(-3.*z*z + z + (3*z*z - 3*z)*((2*z + 1)/(6*z) - std::sqrt(-8*z*z + 4*z + 1)/(6*z)) + 1)/(z*(2*z - 1)),(2*z + 1)/(6*z) - std::sqrt(-8.*z*z + 4*z + 1)/(6*z),z); }, + prec), + create_polyline(0.366025,1./2,P(0.366025,0.57735,(1+1.73205)/4),P(1./2,1.,1./2), + [](double x) { return P( x,-x/(-1 + x),(-1 + x + x*x)/(-1 + 2*x*x)); }, + prec), + create_polyline(1./3,0.366025,P(1./3,1./2,1.),P(0.366025,0.57735,(1+1.73205)/4), + [](double x) { return P( x,-x/(-1 + x),-(x*x)/(1 - 4*x + 2*x*x)); }, + prec), +}; +} + +//00012003 +// curve 1 : x = [2/3,1], y = (1 + x)/(-1 + 4*x), z = 1/2 +template +std::vector> poly00012003(const int prec = 10) +{ +return { + create_polyline(2./3, 1., P(2./3, 1.,1./2), P(1.,2./3,1./2), + [](double x) { return P(x,(1 + x)/(-1 + 4*x) ,1./2); }, + prec), + +}; +} + +//00012013 +// curve 1 : x = -(-5*z*z + 6*z + (z*z - 3*z)*((2*z*z - 6*z + 1)/(2*z*(z - 3)) + sqrt(4*z*z*z*z - 20*z*z*z + 28*z*z - 12*z + 1)/(2*z*(z - 3))) - 1)/(z*(5*z - 3)), y = (2*z*z - 6*z + 1)/(2*z*(z - 3)) + sqrt(4*z*z*z*z - 20*z*z*z + 28*z*z - 12*z + 1)/(2*z*(z - 3)), z = [2/3,1] +// curve 2 : x = (3*z*z - 4*z + 1 - (z*z + z)*(2*z*z - 4*z + 1)/(z*(z + 1)))/(z*(3*z - 1)), y = -(2*z*z - 4*z + 1)/(z*(z + 1)), z = [1/2,1] +template +std::vector> poly00012013(const int prec = 10) +{ +return { + create_polyline(2./3, 1., P(0., 1./2,2./3), P(1./2,1./2,1.), + [](double z) { return P(-(-5*z*z + 6*z + (z*z - 3*z)*((2*z*z - 6*z + 1)/(2*z*(z - 3)) + std::sqrt(4*z*z*z*z - 20*z*z*z + 28*z*z - 12*z + 1)/(2*z*(z - 3))) - 1)/(z*(5*z - 3)), (2*z*z - 6*z + 1)/(2*z*(z - 3)) + std::sqrt(4*z*z*z*z - 20*z*z*z + 28*z*z - 12*z + 1)/(2*z*(z - 3)) ,z ); }, + prec), + create_polyline(1./2, 1., P(1., 2./3,1./2), P(1./2,1./2,1.), + [](double z) { return P( (3*z*z - 4*z + 1 - (z*z + z)*(2*z*z - 4*z + 1)/(z*(z + 1)))/(z*(3*z - 1)), -(2*z*z - 4*z + 1)/(z*(z + 1)),z ); }, + prec), + +}; +} + +//00012023 +// curve 1 : x = 2*z/(2*z + 1), y = 1/(2*z), z = [1/2,1] +// curve 2 : x = [1/2,1], y = (x+1)/(3*x), z = 1/2 +// problem with close polylines, there is an over refinement +template +std::vector> poly00012023(const int prec = 10) +{ +return { + create_polyline(1./2, 1., P(1./2, 1.,1./2), + [](double z) { return P(2*z/(2*z + 1),1/(2*z) ,z ); }, + prec), + create_polyline(1./2, 1., P(1./2, 1.,1./2), + [](double x) { return P(x,(x+1)/(3*x) ,1./2 ); }, + prec), + +}; +} + +//00012033 +// curve 1 : x = ((z*z - 2*z + 1 - (z*z - 2*z)*(2*z*z - 2*z + 1)/(z*(z - 2)))/(z*(z - 1)) , y = -(2*z*z - 2*z + 1)/(z*(z - 2)), z = [1/3,1/2] +// curve 2 : x = (z + (z + 2)*((z + 1)/(z + 2) - sqrt(z*z + z - 1)/(z + 2)) - 2)/(z - 1), y = (z + 1)/(z + 2) - sqrt(z*z + z - 1)/(z + 2), z = [2/3,1[ +template +std::vector> poly00012033(const int prec = 10) +{ +return { + create_polyline(1./3, 1./2, P(1./2, 1.,1./3), P(1., 2./3,1./2), + [](double z) { return P((z*z - 2*z + 1 - (z*z - 2*z)*(2*z*z - 2*z + 1)/(z*(z - 2)))/(z*(z - 1)) ,-(2*z*z - 2*z + 1)/(z*(z - 2)) ,z ); }, + prec), +create_polyline(2./3,limit_value(1.,-1.), P(0., 1./2,2./3), P(1./2, 1./3,1.), + [](double z) { return P((z + (z + 2)*((z + 1)/(z + 2) - std::sqrt(z*z + z - 1)/(z + 2)) - 2)/(z - 1) ,(z + 1)/(z + 2) - std::sqrt(z*z + z - 1)/(z + 2) ,z ); }, + prec), +}; +} + +//00012113 +// curve 1 : x = -(-8*z*z + 7*z + (4*z*z - 3*z)*(-(z - 1.)*sqrt(16*z*z - 12*z + 1)/(2*z*(4*z - 3)) + (8*z*z - 7*z + 1)/(2*z*(4*z - 3))) - 1)/(z*(4*z - 3)), y = -(z - 1)*sqrt(16*z*z - 12*z + 1)/(2*z*(4*z - 3)) + (8*z*z - 7*z + 1)/(2*z*(4*z - 3)), z = [(3.+ std::sqrt(5))/8, 2./3] +// curve 2 : x = -(-8*z*z + 7*z + (4*z*z - 3*z)*((z - 1)*sqrt(16*z*z - 12*z + 1)/(2*z*(4*z - 3)) + (8*z*z - 7*z + 1)/(2*z*(4*z - 3))) - 1)/(z*(4*z - 3)), y = (z - 1)*sqrt(16*z*z - 12*z + 1)/(2*z*(4*z - 3)) + (8*z*z - 7*z + 1)/(2*z*(4*z - 3)), z = [(3.+ std::sqrt(5))/8, 2./3] +template +std::vector> poly00012113(const int prec = 10) +{ + //split point is the same for both curves + //computed from x(z) and y(z) formulas at z = (3.+ std::sqrt(5))/8 + const P split_point(0.30901699437494742, 0.30901699437494742, (3. + CGAL_SQRT5) / 8); +return { + create_polyline((3.+ CGAL_SQRT5)/8, 2./3, split_point, + [](double z) { return P(-(-8*z*z + 7*z + (4*z*z - 3*z)*(-(z - 1.)*std::sqrt(16*z*z - 12*z + 1)/(2*z*(4*z - 3)) + (8*z*z - 7*z + 1)/(2*z*(4*z - 3))) - 1)/(z*(4*z - 3)), -(z - 1)*std::sqrt(16*z*z - 12*z + 1)/(2*z*(4*z - 3)) + (8*z*z - 7*z + 1)/(2*z*(4*z - 3)),z); }, + prec), + create_polyline((3.+ CGAL_SQRT5)/8, 2./3, split_point, + [](double z) { return P( -(-8*z*z + 7*z + (4*z*z - 3*z)*((z - 1)*std::sqrt(16*z*z - 12*z + 1)/(2*z*(4*z - 3)) + (8*z*z - 7*z + 1)/(2*z*(4*z - 3))) - 1)/(z*(4*z - 3)),(z - 1)*std::sqrt(16*z*z - 12*z + 1)/(2*z*(4*z - 3)) + (8*z*z - 7*z + 1)/(2*z*(4*z - 3)),z); }, + prec), + +}; +} + +//00012123 +// curve 1 : x = (5*z*z - 5*z + 1)/(z*(4*z - 3)), y = z*(3*z - 2)/(5*z*z - 5*z + 1), z = [1/2,2/3] +// curve 2 : x = [1/2,2/3], y = (1-x)/x, z = (x-1)/(4*x-3) +template +std::vector> poly00012123(const int prec = 10) +{ +return { + create_polyline(1./2, 2./3, P(1./2, 1.,1./2), + [](double z) { return P((5*z*z - 5*z + 1)/(z*(4*z - 3)), z*(3*z - 2)/(5*z*z - 5*z + 1) ,z ); }, + prec), + create_polyline(1./2, 2./3, P(1./2, 1.,1./2), + [](double x) { return P(x, (1-x)/x ,(x-1)/(4*x-3) ); }, + prec), +}; +} + +//00012130 +// curve 1 : x = -(2 - 3*z)/(3*z - 1), y = 1./2, z = [2/3,1] +//curve 2 : x = -(-7*z*z + 6*z + (4*z*z - 2*z)*(-sqrt((2*z - 1)*(8*z*z*z - 16*z*z + 10*z - 1))/(4*z*(2*z - 1)) + (4*z - 1)/(4*z)) - 1)/(z*(5*z - 3)), y = -sqrt((2*z - 1)*(8*z*z*z - 16*z*z + 10*z - 1))/(4*z*(2*z - 1)) + (4*z - 1)/(4*z), z = [2/3,1] +template +std::vector> poly00012130(const int prec = 10) +{ +return { + create_polyline(2/3., 1., P(1./2, 0.,2./3),P(1./2,1./2,1.), + [](double z) { return P(-(-7*z*z + 6*z + (4*z*z - 2*z)*(-std::sqrt((2*z - 1)*(8*z*z*z - 16*z*z + 10*z - 1))/(4*z*(2*z - 1)) + (4*z - 1)/(4*z)) - 1)/(z*(5*z - 3)), -std::sqrt((2*z - 1)*(8*z*z*z - 16*z*z + 10*z - 1))/(4*z*(2*z - 1)) + (4*z - 1)/(4*z),z); }, + prec), +create_polyline(2/3., 1., P(0.,1./2,2./3),P(1./2,1./2,1.), + [](double z) { return P(-(2 - 3*z)/(3*z - 1),1./2,z); }, + prec), +}; +} + +//00012131 +// curve 1 : x = [0., (2. - 1.4142)/2], y = 1./2, z = (-2 + x)/(-3 + 2*x) +// curve 2 : x = [((2. - 1.4142)/2.,1./3], y = 1./2, z = -x/(-1 + 2*x) +// curve 3 : x = (z - 1)*(2*z*((z*z + z - 1)/(4*z*(z - 1)) - sqrt(9*z*z*z*z - 14*z*z*z + 7*z*z - 2*z + 1)/(4*z*(z - 1))) - 1)/(z*(2*z - 1)), y = (z*z + z - 1)/(4*z*(z - 1)) - sqrt(9*z*z*z*z - 14*z*z*z + 7*z*z - 2*z + 1)/(4*z*(z - 1)), z =[1./2, 1./1.4142] +// curve 4 : x = [(2. - 1.4142)/2, 1./2[, y = (-1 - x + 3*x*x + sqrt(1 - 6*x + 19*x*x - 22*x*x*x + 9*x*x*x*x))/(4*(-1 + x)*x), z = (1. - 5*x + 3*x*x + sqrt(1 - 6*x + 19*x*x - 22*x*x*x + 9*x*x*x*x))/(2*(1 - 3*x + 2*x*x)) +template +std::vector> poly00012131(const int prec = 10) +{ +return { + create_polyline(0., (2. - CGAL_SQRT2)/2, P(0., 1./2,2./3),P((2. - CGAL_SQRT2)/2,1./2,1./CGAL_SQRT2), + [](double x) { return P(x,1./2,(-2 + x)/(-3 + 2*x)); }, + prec), + create_polyline((2. - CGAL_SQRT2)/2.,1./3,P((2. - CGAL_SQRT2)/2,1./2,1./CGAL_SQRT2), P(1./3, 1./2,1.), + [](double x) { return P(x,1./2,-x/(-1 + 2*x) ); }, + prec), + create_polyline(1./2, 1./CGAL_SQRT2, P(1./3, 1.,1./2),P((2. - CGAL_SQRT2)/2,1./2,1./CGAL_SQRT2), + [](double z) { return P((z - 1)*(2*z*((z*z + z - 1)/(4*z*(z - 1)) - std::sqrt(9*z*z*z*z - 14*z*z*z + 7*z*z - 2*z + 1)/(4*z*(z - 1))) - 1)/(z*(2*z - 1)),(z*z + z - 1)/(4*z*(z - 1)) - std::sqrt(9*z*z*z*z - 14*z*z*z + 7*z*z - 2*z + 1)/(4*z*(z - 1)) ,z); }, + prec), + create_polyline((2. - CGAL_SQRT2)/2,limit_value(1./2,-1.),P((2. - CGAL_SQRT2)/2,1./2,1./CGAL_SQRT2), P(1./2,0. ,2./3), + [](double x) { return P(x,(-1 - x + 3*x*x + std::sqrt(1 - 6*x + 19*x*x - 22*x*x*x + 9*x*x*x*x))/(4*(-1 + x)*x),(1. - 5*x + 3*x*x + std::sqrt(1 - 6*x + 19*x*x - 22*x*x*x + 9*x*x*x*x))/(2*(1 - 3*x + 2*x*x))); }, + prec), +}; +} + +//00012132 +// curve 1 : x = -(-7*z*z + 7*z + (3*z*z - 2*z)*(sqrt((z - 1)*(2*z - 1)*(14*z*z - 11*z + 1))/(2*z*(3*z - 2)) + (8*z*z - 7*z + 1)/(2*z*(3*z - 2))) - 1)/(z*(2*z - 3)), y = sqrt((z - 1)*(2*z - 1)*(14*z*z - 11*z + 1))/(2*z*(3*z - 2))+ (8*z*z - 7*z + 1)/(2*z*(3*z - 2)), z = [1/2,2/3[ +// curve 2 : x = -(-5*z + (z - 2)*(-sqrt((z - 1)*(3*z - 2))/(z - 2) + 2*(z - 1)/(z - 2)) + 4)/(2*z - 1), y = -sqrt((z - 1)*(3*z - 2))/(z - 2) + 2*(z - 1)/(z - 2), z = [1/2,2/3] +template +std::vector> poly00012132(const int prec = 10) +{ +return { + create_polyline(1./2, limit_value(2./3,-1.), P(1./2, 1.,1./2),P(1./2,0.,2./3), + [](double z) { return P(-(-7*z*z + 7*z + (3*z*z - 2*z)*(std::sqrt((z - 1)*(2*z - 1)*(14*z*z - 11*z + 1))/(2*z*(3*z - 2)) + (8*z*z - 7*z + 1)/(2*z*(3*z - 2))) - 1)/(z*(2*z - 3)),std::sqrt((z - 1)*(2*z - 1)*(14*z*z - 11*z + 1))/(2*z*(3*z - 2))+ (8*z*z - 7*z + 1)/(2*z*(3*z - 2)),z); }, + prec), + create_polyline(1./2, (2./3), P(1./2, 1.,1./2),P(0.,1./2,2./3), + [](double z) { return P(-(-5*z + (z - 2)*(-std::sqrt((z - 1)*(3*z - 2))/(z - 2) + 2*(z - 1)/(z - 2)) + 4)/(2*z - 1),-std::sqrt((z - 1)*(3*z - 2))/(z - 2) + 2*(z - 1)/(z - 2),z); }, + prec), +}; +} + +//00012133 +// curve 1 : x = -(-6*z*z + 6*z + (3*z*z - 2*z)*((z - 1)*sqrt(13*z*z - 10*z + 1)/(2*z*(3*z - 2)) + (7*z*z - 6*z + 1)/(2*z*(3*z - 2))) - 1)/(3*z*(z - 1)), y = (z - 1)*sqrt(13*z*z - 10*z + 1)/(2*z*(3*z - 2)) + (7*z*z - 6*z + 1)/(2*z*(3*z - 2)), z = [2./3,0.70263] +// curve 2 : x = (2*z*z - 3*z + (3*z*z - 2*z)*(-(z*z - 3*z + 1)/(2*z*(3*z - 2)) - sqrt(13*z*z*z*z - 26*z*z*z + 19*z*z - 6*z + 1)/(2*z*(3*z - 2))) + 1)/(z*(z - 1)), y = -(z*z - 3*z + 1)/(2*z*(3*z - 2)) - sqrt(13*z*z*z*z - 26*z*z*z + 19*z*z - 6*z + 1)/(2*z*(3*z - 2)), z = [1./3,0.70263] +// curve 3 : x = [0,0.447683], y = (-1 + x)/(-2 + x), z = (2 - 2*x + x*x)/(3 - 3*x + x*x) +//curve 4 : x = -(-2*z + (5*z - 2)*((5*z - 1)/(2*(5*z - 2)) - sqrt(5*z*z - 2*z + 1)/(2*(5*z - 2))) + 1)/(z - 1), y = (5*z - 1)/(2*(5*z - 2)) - sqrt(5*z*z - 2*z + 1)/(2*(5*z - 2)), z = [0.70263,1] +template +std::vector> poly00012133(const int prec = 10) +{ +return { + create_polyline(2./3,0.70263, P(1./2, 0.,2./3),P(0.447683,0.3555809, 0.70263), + [](double z) { return P(-(-6*z*z + 6*z + (3*z*z - 2*z)*((z - 1)*std::sqrt(13*z*z - 10*z + 1)/(2*z*(3*z - 2)) + (7*z*z - 6*z + 1)/(2*z*(3*z - 2))) - 1)/(3*z*(z - 1)),(z - 1)*std::sqrt(13*z*z - 10*z + 1)/(2*z*(3*z - 2)) + (7*z*z - 6*z + 1)/(2*z*(3*z - 2)),z); }, + prec), + create_polyline(1./3, 0.70263, P(1./2, 1.,1./3),P(0.447683,0.3555809, 0.70263), + [](double z) { return P((2*z*z - 3*z + (3*z*z - 2*z)*(-(z*z - 3*z + 1)/(2*z*(3*z - 2)) - std::sqrt(13*z*z*z*z - 26*z*z*z + 19*z*z - 6*z + 1)/(2*z*(3*z - 2))) + 1)/(z*(z - 1)), -(z*z - 3*z + 1)/(2*z*(3*z - 2)) - std::sqrt(13*z*z*z*z - 26*z*z*z + 19*z*z - 6*z + 1)/(2*z*(3*z - 2)),z); }, + prec), + create_polyline(0.,0.447683, P(0.,1./2,2./3),P(0.447683,0.3555809, 0.70263), + [](double x) { return P(x,(-1 + x)/(-2 + x),(2 - 2*x + x*x)/(3 - 3*x + x*x) ); }, + prec), + create_polyline(0.70263,1.,P(0.447683,0.3555809, 0.70263),P(1./2,1./3,1.), + [](double z) { return P(-(-2*z + (5*z - 2)*((5*z - 1)/(2*(5*z - 2)) - std::sqrt(5*z*z - 2*z + 1)/(2*(5*z - 2))) + 1)/(z - 1),(5*z - 1)/(2*(5*z - 2)) - std::sqrt(5*z*z - 2*z + 1)/(2*(5*z - 2)),z); }, + prec), +}; +} + +//00012223 +// curve 1 : x = 1/2y, y = [1/2,1], z = 1/2 +template +std::vector> poly00012223(const int prec = 10) +{ +return { + create_polyline(1./2, 1., P(1., 1./2,1./2), + [](double y) { return P( 1/(2*y) ,y,1./2); }, + prec), + +}; +} + +//00012230 +// curve 1 : x = (3*z - 2)/(2*(2*z - 1)), y = 2*(2*z - 1)/(5*z - 2), z =[2/3,1] +template +std::vector> poly00012230(const int prec = 10) +{ +return { + create_polyline(2./3, 1., P(0., 1./2,2./3), + [](double z) { return P((3*z - 2)/(2*(2*z - 1)),2*(2*z - 1)/(5*z - 2),z); }, + prec), + +}; +} + +//00012231 +// curve 1 : x = z*(z - 1)/(z**2 - 3*z + 1), y = (z**2 - 3*z + 1)/(z*(z - 2)), z=[1/2,2/3] +// curve 2 : x = z/(z + 1), y = (z - 1)*(z + 1)/(z*(z - 2)), z = [1/2,2/3] +// curve 3 : x = [2/5,1/2], y = 1/(2-x), z = x/(1-x) +// curve 4 : x = [0,2/5], y = 1/(2-x), z = 2./3 +template +std::vector> poly00012231(const int prec = 10) +{ +return { + create_polyline(1./2, 2./3, P(1., 1./3,1./2), + [](double z) { return P(z*(z - 1)/(z*z - 3*z + 1),(z*z - 3*z + 1)/(z*(z - 2)),z); }, + prec), + create_polyline(1./2, 2./3, P(1./3, 1.,1./2), + [](double z) { return P(z/(z + 1),(z - 1)*(z + 1)/(z*(z - 2)),z); }, + prec), + create_polyline(2./5,1./2, P(2./5, 5./8,2./3), + [](double x) { return P(x,1/(2-x),x/(1-x)); }, + prec), + create_polyline(0.,2./5., P(0.,1./2,2./3), + [](double x) { return P(x,1/(2-x),2./3); }, + prec), + +}; +} + +//00012232 +// curve 1 : x = z/(4*z - 1), y = (4*z - 1)/(2*z), z =[1/3,1/2] +// curve 2 : x = (3*z - 2)/(4*z - 3), y = (4*z - 3)/(2*(z - 1)), z= [1/2,2/3] +template +std::vector> poly00012232(const int prec = 10) +{ +return { + create_polyline(1./3,1./2., P(1.,1./2,1./3), + [](double z) { return P(z/(4*z - 1),(4*z - 1)/(2*z),z); }, + prec), + create_polyline(1./2,2./3., P(1./2,1.,1./2), + [](double z) { return P((3*z - 2)/(4*z - 3),(4*z - 3)/(2*(z - 1)),z); }, + prec), + +}; +} + +//00012233 +// curve 1 : x = -z/(z-1), y = -(z - 1)/(2*z), z = [1/3,1/2] +//curve 2 : x = (3*z - 2)/(z - 1), y = 1/2, z = [1/2,2/3] +template +std::vector> poly00012233(const int prec = 10) +{ +return { + create_polyline(1./3,1./2, P(1./2,1.,1./3), + [](double z) { return P(-z/(z - 1),-(z - 1)/(2*z),z); }, + prec), + create_polyline(1./2,2./3, P(1.,1./2.,1./2), + [](double z) { return P((3*z - 2)/(z - 1),1./2,z); }, + prec), + + + +}; +} + +//00012330 +// curve 1 : x = [0,1/2], y = (-1 + 2*x)/(-2 + 3*x), z = (2*(1 - 2*x + x*x))/(3 - 7*x + 5*x*x) +template +std::vector> poly00012330(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2.,2./3), P(1./2,0.,2./3), + [](double x) { return P(x,(-1 + 2*x)/(-2 + 3*x),(2*(1 - 2*x + x*x))/(3 - 7*x + 5*x*x)); }, + prec), + +}; +} + +//00012331 +// curve 1 : x = [1/3,1[, y = (-1 + 3*x + 2*x*x - sqrt(1 - 6*x + 13*x*x - 8*x*x*x + 4*x*x*x*x))/(2*x*(-2 + 5*x)), z = (1 - x + 2*x*x - sqrt(1 - 6*x + 13*x*x - 8*x*x*x + 4*x*x*x*x))/(2*(-1 + x)*(-1+x))) +// curve 2 : x = [0,1/2], y = (-1 + 2*x)/(-2 + 3*x), z = 2./3 +template +std::vector> poly00012331(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,2./3),P(1./2,0.,2./3), + [](double x) { return P(x,(-1 + 2*x)/(-2 + 3*x),2./3); }, + prec), + create_polyline(1./3,limit_value(1.,-1.), P(1./3,1.,1./2),P(1.,1./3,1./2), + [](double x) { return P(x,(-1 + 3*x + 2*x*x - std::sqrt(1 - 6*x + 13*x*x - 8*x*x*x + 4*x*x*x*x))/(2*x*(-2 + 5*x)) ,(1 - x + 2*x*x - std::sqrt(1 - 6*x + 13*x*x - 8*x*x*x + 4*x*x*x*x))/(2*(-1 + x)*(-1+x))); }, + prec), +}; +} + +//00012332 +//curve 1 : x = -(4 - 6*z)/(2*(z - 1)), y = 1./2, z = [1/2,2/3] +//curve 2 : x = -(-7*z + 5 + (2*z - 2)*(3*z - 2)/(z - 1))/(2*(z - 1)), y = (3*z - 2)/(z - 1), z = [1/2,2/3] +//curve 3 : x = -(2*z*((5*z - 1)/(4*z) - sqrt(17*z*z - 10*z + 1)/(4*z)) - 5*z + 1)/(2*z), y = (5*z - 1)/(4*z) - sqrt(17*z*z - 10*z + 1)/(4*z), z = [1./2, 2.*1.4142/17 + 5./17] +//curve 4 : x = -(2*z*((5*z - 1)/(4*z) + sqrt(17*z*z - 10*z + 1)/(4*z)) - 5*z + 1)/(2*z), y = (5*z - 1)/(4*z) + sqrt(17*z*z - 10*z + 1)/(4*z), z = [1./2, 2.*1.4142/17 + 5./17] +//curve 5 : x = y = 1/2, z = [3/5,1] +template +std::vector> poly00012332(const int prec = 10) +{ +return { + create_polyline(1./2,3./5, P(1.,1./2.,1./2),P(1./2,1./2.,3./5), + [](double z) { return P( -(4 - 6*z)/(2*(z - 1)),1./2,z); }, + prec), + create_polyline(3./5,2./3, P(1./2,1./2.,3./5), + [](double z) { return P( -(4 - 6*z)/(2*(z - 1)),1./2,z); }, + prec), + create_polyline(1./2,3./5, P(1./2,1.,1./2),P(1./2,1./2.,3./5), + [](double z) { return P(-(-7*z + 5 + (2*z - 2)*(3*z - 2)/(z - 1))/(2*(z - 1)),(3*z - 2)/(z - 1),z); }, + prec), + create_polyline(3./5,2./3, P(1./2,1./2,3./5), + [](double z) { return P(-(-7*z + 5 + (2*z - 2)*(3*z - 2)/(z - 1))/(2*(z - 1)),(3*z - 2)/(z - 1),z); }, + prec), + create_polyline(1./2, 2.*CGAL_SQRT2/17 + 5./17, P(1.,1./2.,1./2), + [](double z) { return P( -(2*z*((5*z - 1)/(4*z) - std::sqrt(17*z*z - 10*z + 1)/(4*z)) - 5*z + 1)/(2*z),(5*z - 1)/(4*z) - std::sqrt(17*z*z - 10*z + 1)/(4*z),z); }, + prec), + create_polyline(1./2,2.* CGAL_SQRT2 /17 + 5./17, P(1./2,1.,1./2), + [](double z) { return P( -(2*z*((5*z - 1)/(4*z) + std::sqrt(17*z*z - 10*z + 1)/(4*z)) - 5*z + 1)/(2*z),(5*z - 1)/(4*z) + std::sqrt(17*z*z - 10*z + 1)/(4*z),z); }, + prec), + create_polyline(3./5,1., P(1./2.,1./2,3./5),P(1./2,1./2.,1.), + [](double z) { return P(1./2,1./2,z); }, + prec), +}; +} + +//00012333 +// curve 1 : x = [1/2,1], y = 1./(2*x), z = x/(2.*x*x+1) +// curve 2 : x= [0,1/2], y = (2*x-1)/(2*x-2), z = (2 - 3*x + 2*x*x)/(3 - 4*x + 2*x*x) +template +std::vector> poly00012333(const int prec = 10) +{ +return { + create_polyline(1./2,1., P(1./2,1.,1./3), + [](double x) { return P(x,1./(2*x),x/(2.*x*x+1)); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,2./3), + [](double x) { return P(x,(2*x-1)/(2*x-2),(2 - 3*x + 2*x*x)/(3 - 4*x + 2*x*x)); }, + prec), +}; +} + +//00111123 +//curve 1 : x = 1/2, y =[2/3,1], z = (2*y)/(5*y-2) +template +std::vector> poly00111123(const int prec = 10) +{ +return { + create_polyline(2./3,1., P(1./2,2./3,1.), + [](double y) { return P(1./2,y,(2*y)/(5*y-2)); }, + prec), + +}; +} + +//00111203 +// curve 1 : x = [1/2,1], y = 1./2, z = 1./(2*x) +// curve 2 : x = [1/2,2/3], y = (2*x-1.)/x, z = 1./(2.-x) +// curve 3 : x = [1/2,2/3], y = (-x+1.)/x, z = 1./(2.-x) +// curve 4 : x = [0,2/3], y = 1./2, z= 1./(2.-x) +template +std::vector> poly00111203(const int prec = 10) +{ +return { + create_polyline(2./3,1., P(2./3,1./2,3./4),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./(2*x)); }, + prec), + create_polyline(1./2,2./3, P(1./2,1./2,1.),P(2./3,1./2,3./4), + [](double x) { return P(x,1./2,1./(2*x)); }, + prec), + create_polyline(1./2,2./3, P(1./2,0.,2./3),P(2./3,1./2,3./4), + [](double x) { return P(x,(2*x-1.)/x,1./(2.-x)); }, + prec), + create_polyline(1./2,2./3, P(1./2,1.,2./3),P(2./3,1./2,3./4), + [](double x) { return P(x,(-x+1.)/x,1./(2.-x)); }, + prec), + create_polyline(0.,2./3, P(0.,1./2,1./2),P(2./3,1./2,3./4), + [](double x) { return P(x,1./2,1./(2.-x)); }, + prec), + +}; +} + +//00111223 +// curve 1 : x = -(-5*z + (6*z - 5)*(sqrt(-(z - 1)*(2*z - 1))/(6*z - 5) + (4*z - 3)/(6*z - 5)) + 3)/z, y = sqrt(-(z - 1)*(2*z - 1))/(6*z - 5) + (4*z - 3)/(6*z - 5),z = [1/2,2/3] +// curve 2 : x = [1/2,1], y = x/(3*x-1), z = x/(1 - 2*x + 3*x*x) +template +std::vector> poly00111223(const int prec = 10) +{ +return { + create_polyline(1./2,2./3, P(1.,1./2,1./2), + [](double z) { return P(-(-5*z + (6*z - 5)*(std::sqrt(-(z - 1)*(2*z - 1))/(6*z - 5) + (4*z - 3)/(6*z - 5)) + 3)/z,std::sqrt(-(z - 1)*(2*z - 1))/(6*z - 5) + (4*z - 3)/(6*z - 5),z); }, + prec), + create_polyline(1./2,1., P(1./2,1.,2./3), + [](double x) { return P(x,x/(3*x-1),x/(1 - 2*x + 3*x*x) ); }, + prec), + +}; +} + +//00111230 +// curve 1 : x = -(-2*z + (3*z - 2)*((8*z - 5)/(4*(3*z - 2)) - sqrt(-8*z*z + 16*z - 7)/(4*(3*z - 2))) + 1)/z, y = (8*z - 5)/(4*(3*z - 2)) - sqrt(-8*z*z + 16*z - 7)/(4*(3*z - 2)), z = ]2/3,1] +// curve 2 : x = -(-2*z + (3*z - 2)*((4*z - 3)/(4*(3*z - 2)) + sqrt(-8*z*z + 16*z - 7)/(4*(3*z - 2))) + 1)/z, y = (4*z - 3)/(4*(3*z - 2)) + sqrt(-8*z*z + 16*z - 7)/(4*(3*z - 2)), z = ]2/3,1] +template +std::vector> poly00111230(const int prec = 10) +{ +return { +create_polyline(limit_value(2./3,1.),1, P(1./2,0.,2./3),P(1./2,1./2,1.), + [](double z) { return P(-(-2*z + (3*z - 2)*((8*z - 5)/(4*(3*z - 2)) - std::sqrt(-8*z*z + 16*z - 7)/(4*(3*z - 2))) + 1)/z,(8*z - 5)/(4*(3*z - 2)) - std::sqrt(-8*z*z + 16*z - 7)/(4*(3*z - 2)),z ); }, + prec), +create_polyline(limit_value(2./3,1.),1, P(1./2,1.,2./3),P(1./2,1./2,1.), + [](double z) { return P(-(-2*z + (3*z - 2)*((4*z - 3)/(4*(3*z - 2)) + std::sqrt(-8*z*z + 16*z - 7)/(4*(3*z - 2))) + 1)/z,(4*z - 3)/(4*(3*z - 2)) + std::sqrt(-8*z*z + 16*z - 7)/(4*(3*z - 2)),z ); }, + prec), +}; +} + +//00111232 +// curve 1 : x = (z - 1)*(-1 + (5*z - 4)/(2*(z - 1)) + sqrt(13*z*z - 20*z + 8)/(2*(z - 1)))/z, y = (5*z - 4)/(2*(z - 1)) + sqrt(13*z*z - 20*z + 8)/(2*(z - 1)), z = [1/3,2/3] +// curve 2 : x = [1/3,1/2], y = x/(1. - x), z = -x/(1. - 5*x + 3*x*x +template +std::vector> poly00111232(const int prec = 10) +{ +return { + create_polyline(1./3,2./3, P(1.,1./2,1./3), + [](double z) { return P((z - 1)*(-1 + (5*z - 4)/(2*(z - 1)) + std::sqrt(13*z*z - 20*z + 8)/(2*(z - 1)))/z, (5*z - 4)/(2*(z - 1)) + std::sqrt(13*z*z - 20*z + 8)/(2*(z - 1)),z ); }, + prec), + create_polyline(1./3,1./2, P(1./3,1./2,1.), + [](double x) { return P(x,x/(1. - x),-x/(1. - 5*x + 3*x*x)); }, + prec), + +}; +} + +//00111233 +// curve 1 : x = -(z - 1)/z, y = (3*z - 2)/(4*z - 3), z = [1/2,2/3] +// curve 2 : x = [1/2,1], y = x/(x+1), z = x/(3*x-1) +// problem with close polylines, there is an over refinement +template +std::vector> poly00111233(const int prec = 10) +{ +return { + create_polyline(1./2,2./3, P(1.,1./2,1./2), + [](double z) { return P(-(z - 1)/z, (3*z - 2)/(4*z - 3),z); }, + prec), + create_polyline(1./2,1., P(1./2,1./3,1.),P(1.,1./2,1./2), + [](double x) { return P(x,x/(x+1),x/(3*x-1)); }, + prec), + +}; +} + +//00112233 +// curve 1 : x = [0,1], y = 1/2, z = 1/2 +template +std::vector> poly00112233(const int prec = 10) +{ +return { +create_polyline(0.,1., P(0.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + +}; +} + +//00112323 +// curve 1 : x = (3*z - 1)/(2*z), y = 1./2, z = [1/3,1/2] +// curve 2 : x = -(z - 1)/(2*z), y = 1./2, z = [1/3,1/2] +// curve 3 : x = 1./2, y = (3*z - 2)/(2*(z - 1)), z = [1/2,2/3] +// curve 4 : x = 1./2, y = -z /(2*(z - 1)), z = [1/2,2/3] + +template +std::vector> poly00112323(const int prec = 10) +{ +return { + create_polyline(1./3,1./2, P(0.,1./2,1./3),P(1./2,1./2,1./2), + [](double z) { return P((3*z - 1)/(2*z),1./2,z); }, + prec), + create_polyline(1./3,1./2, P(1.,1./2,1./3),P(1./2,1./2,1./2), + [](double z) { return P( -(z - 1)/(2*z),1./2,z); }, + prec), + create_polyline(1./2,2./3,P(1./2,1./2,1./2),P(1./2,0.,2./3), + [](double z) { return P(1./2,(3*z - 2)/(2*(z - 1)),z); }, + prec), + create_polyline(1./2,2./3,P(1./2,1./2,1./2),P(1./2,1.,2./3), + [](double z) { return P(1./2,-z /(2*(z - 1)),z); }, + prec), + + +}; +} + +//00112332 +// curve 1 : x = [0,1], y = z = 1/2 +// curve 2 : x = y = 1/2, z = [1/2,1] +// curve 3 : x = 1./2, y = (3*z - 2)/(2*(z - 1)), z = [1/2,2/3] +// curve 4 : x = 1./2, y = -z /(2*(z - 1)), z = [1/2,2/3] +template +std::vector> poly00112332(const int prec = 10) +{ +return { + create_polyline(1./2,2./3,P(1./2,1./2,1./2),P(1./2,0.,2./3), + [](double z) { return P(1./2,(3*z - 2)/(2*(z - 1)),z); }, + prec), + create_polyline(1./2,2./3,P(1./2,1./2,1./2),P(1./2,1.,2./3), + [](double z) { return P(1./2,-z /(2*(z - 1)),z); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1./2),P(1./2,1./2,1.), + [](double z) { return P(1./2,1./2,z); }, + prec), + +}; +} + +//00121203 +// curve 1 : x = (-5*z*z + 7*z + (3*z - 2)*(10*z*z - 11*z + 3)/(5*z - 3) - 2)/(2*z*z), y = (3*z - 2)/(5*z - 3), z = [0,1/2]U[2/3,1] +// curve 2 : x = ((3*z - 1)*(z*(2*z - 1)/(3*z - 1) - z + 1)/(2*z*z)), y = z/(3*z - 1), z = [1/2,1] +template +std::vector> poly00121203(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(1./2,2./3,0.),P(1./2,1.,1./2), + [](double z) { return P((-5*z*z + 7*z + (3*z - 2)*(10*z*z - 11*z + 3)/(5*z - 3) - 2)/(2*z*z) ,(3*z - 2)/(5*z - 3),z); }, + prec), + create_polyline(2./3,1., P(1./2,0.,2./3),P(1./2,1./2,1.), + [](double z) { return P((-5*z*z + 7*z + (3*z - 2)*(10*z*z - 11*z + 3)/(5*z - 3) - 2)/(2*z*z) ,(3*z - 2)/(5*z - 3),z); }, + prec), + create_polyline(1./2,1., P(1./2,1.,1./2),P(1./2,1./2,1.), + [](double z) { return P(((3*z - 1)*(z*(2*z - 1)/(3*z - 1) - z + 1)/(2*z*z)), z/(3*z - 1),z); }, + prec), +}; +} + +//00121223 +// curve 1 : x = ]3/8,1/2], y = (3 - 5*x + sqrt(-3 + 8*x) - x*sqrt(-3 + 8*x))/(2*(3 - 5*x + x*x)), z = (3 - 5*x - sqrt(-3 + 8*x) + x*sqrt(-3 + 8*x))/(2*(3 - 5*x + x*x)) +// curve 3 : x = ]3/8,1/2], y = (3 - 5*x - sqrt(-3 + 8*x) + x*sqrt(-3 + 8*x))/(2*(3 - 5*x + x*x)), z = (3 - 5*x + sqrt(-3 + 8*x) - x*sqrt(-3 + 8*x))/(2*(3 - 5*x + x*x)) +template +std::vector> poly00121223(const int prec = 10) +{ +return { + create_polyline(limit_value(3./8,1.),1./2, P(3./8,4./9,4./9),P(1./2,2./3,0.), + [](double x) { return P(x,(3 - 5*x + std::sqrt(-3 + 8*x) - x*std::sqrt(-3 + 8*x))/(2*(3 - 5*x + x*x)), (3 - 5*x - std::sqrt(-3 + 8*x) + x*std::sqrt(-3 + 8*x))/(2*(3 - 5*x + x*x))); }, + prec), + create_polyline(limit_value(3./8,1.),1./2, P(3./8,4./9,4./9),P(1./2,0.,2./3), + [](double x) { return P(x,(3 - 5*x - std::sqrt(-3 + 8*x) + x*std::sqrt(-3 + 8*x))/(2*(3 - 5*x + x*x)), (3 - 5*x + std::sqrt(-3 + 8*x) - x*std::sqrt(-3 + 8*x))/(2*(3 - 5*x + x*x))); }, + prec), + +}; +} + +//00121233 +// curve 1 : x = 1./2, y = (3*z - 2)/(4*z - 3), z = [0,2/3] +// curve 2 : x = 1./2, y = 1-z, z' = 1-(3*z - 2)/(4*z - 3), z = [0,2/3] +// problem with close polylines, there is an over refinement +template +std::vector> poly00121233(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(1./2,2./3,0.),P(1./2,1./2,1./2), + [](double z) { return P(1./2,(3*z - 2)/(4*z - 3),z); }, + prec), + create_polyline(1./2,2./3, P(1./2,1./2,1./2),P(1./2,0.,2./3), + [](double z) { return P(1./2,(3*z - 2)/(4*z - 3),z); }, + prec), + create_polyline(0.,1./2, P(1./2,1.,1./3),P(1./2,1./2,1./2), + [](double z) { return P(1./2,1-z,1-(3*z - 2)/(4*z - 3)); }, + prec), + create_polyline(1./2.,2./3, P(1./2,1./2,1./2),P(1./2,1./3,1.), + [](double z) { return P(1./2,1-z,1-(3*z - 2)/(4*z - 3)); }, + prec), +}; +} + +//00121300 + +// curve 1 : x = -(2*z - 1)*(-2*z + (4*z - 3)*(sqrt((2*z - 1)*(2*z*z*z - 5*z*z + 8*z - 4))/(2*(8*z*z - 10*z + 3)) + (3*z - 2)/(2*(4*z - 3))) + 2)/(z*(z - 1)) , y = sqrt((2*z - 1)*(2*z*z*z - 5*z*z + 8*z - 4))/(2*(8*z*z - 10*z + 3)) + (3*z - 2)/(2*(4*z - 3)), z = ]0,1/3] +// curve 2 : x = -(2*z - 1)*(-2*z + (4*z - 3)*(sqrt((2*z - 1)*(2*z*z*z - 5*z*z + 8*z - 4))/(2*(8*z*z - 10*z + 3)) + (3*z - 2)/(2*(4*z - 3))) + 2)/(z*(z - 1)) , y = 1-( sqrt((2*z - 1)*(2*z*z*z - 5*z*z + 8*z - 4))/(2*(8*z*z - 10*z + 3)) + (3*z - 2)/(2*(4*z - 3))), z' = 1.-z, z = ]0,1/3] +template +std::vector> poly00121300(const int prec = 10) +{ +return { + create_polyline(limit_value(0.,1.),1./3, P(1./2,2./3,0.),P(1./2,1.,1./3), + [](double z) { return P(-(2*z - 1)*(-2*z + (4*z - 3)*(std::sqrt((2*z - 1)*(2*z*z*z - 5*z*z + 8*z - 4))/(2*(8*z*z - 10*z + 3)) + (3*z - 2)/(2*(4*z - 3))) + 2)/(z*(z - 1)) , std::sqrt((2*z - 1)*(2*z*z*z - 5*z*z + 8*z - 4))/(2*(8*z*z - 10*z + 3)) + (3*z - 2)/(2*(4*z - 3)),z); }, + prec), + create_polyline(limit_value(0.,1.),1./3, P(1./2,1./3,1.),P(1./2,0.,2./3), + [](double z) { return P(-(2*z - 1)*(-2*z + (4*z - 3)*(std::sqrt((2*z - 1)*(2*z*z*z - 5*z*z + 8*z - 4))/(2*(8*z*z - 10*z + 3)) + (3*z - 2)/(2*(4*z - 3))) + 2)/(z*(z - 1)) ,1-( std::sqrt((2*z - 1)*(2*z*z*z - 5*z*z + 8*z - 4))/(2*(8*z*z - 10*z + 3)) + (3*z - 2)/(2*(4*z - 3))),1.-z); }, + prec), + + +}; +} + +//00121301 +// curve 1 : x = (-4*z*z + 7*z + (sqrt((z - 1)*(z*z*z - 5*z*z + 4*z - 1))/(8*z*z - 10*z + 3) + (z - 1)*(3*z - 1)/((2*z - 1)*(4*z - 3)))*(8*z*z - 10*z + 3) - 2)/z, y = sqrt((z - 1)*(z*z*z - 5*z*z + 4*z - 1))/(8*z*z - 10*z + 3) + (z - 1)*(3*z - 1)/((2*z - 1)*(4*z - 3)), z = ]0,1/2[ +// curve 2 : x = ]1/2,1], y = (-2 + 6*x - x*x - sqrt(4 - 16*x + 24*x*x - 12*x*x*x + x*x*x*x))/(4*x), z = (-2 + 2*x + x*x + sqrt(4 - 16*x + 24*x*x - 12*x*x*x + x*x*x*x))/(4*x*(-1 + 2*x)) +template +std::vector> poly00121301(const int prec = 10) +{ +return { + create_polyline(limit_value(0.,1.),limit_value(1./2,-1.), P(1./2,2./3,0.),P(1.,1./2,1./2), + [](double z) { return P( (-4*z*z + 7*z + (std::sqrt((z - 1)*(z*z*z - 5*z*z + 4*z - 1))/(8*z*z - 10*z + 3) + (z - 1)*(3*z - 1)/((2*z - 1)*(4*z - 3)))*(8*z*z - 10*z + 3) - 2)/z, std::sqrt((z - 1)*(z*z*z - 5*z*z + 4*z - 1))/(8*z*z - 10*z + 3) + (z - 1)*(3*z - 1)/((2*z - 1)*(4*z - 3)),z); }, + prec), + create_polyline(limit_value(1./2,1.),1., P(1./2,0.,2./3),P(1.,1./2,1./2), + [](double x) { return P(x,(-2 + 6*x - x*x - std::sqrt(4 - 16*x + 24*x*x - 12*x*x*x + x*x*x*x))/(4*x),(-2 + 2*x + x*x + std::sqrt(4 - 16*x + 24*x*x - 12*x*x*x + x*x*x*x))/(4*x*(-1 + 2*x))); }, + prec), +}; +} + +//00121302 +// curve 1 : x = (-z*z + 5*z + (sqrt(z*z*z*z + 8*z*z - 12*z + 4)/(2*(2*z*z - 7*z + 3)) + (3*z*z - 6*z + 2)/(2*(z - 3)*(2*z - 1)))*(2*z*z - 7*z + 3) - 2)/(z*(z + 1)), y = sqrt(z*z*z*z + 8*z*z - 12*z + 4)/(2*(2*z*z - 7*z + 3)) + (3*z*z - 6*z + 2)/(2*(z - 3)*(2*z - 1)), z = ]0,1/2[ +// curve 2 : x = (-z + (2*z - 1)*(3*z*z - 2*z)/(6*z*z - 5*z + 1) + 1)/z, y = (3*z*z - 2*z)/(6*z*z - 5*z + 1), z = [2/3,1] +// curve 3 : x = (-z + z*(2*z - 1)/(z + 1) + 1)/z, y = z/(z+1.), z =[1/2,1] +template +std::vector> poly00121302(const int prec = 10) +{ +return { + create_polyline(limit_value(0.,1.),limit_value(1./2,-1.), P(1./2,2./3,0.),P(1./3,1.,1./2), + [](double z) { return P((-z*z + 5*z + (std::sqrt(z*z*z*z + 8*z*z - 12*z + 4)/(2*(2*z*z - 7*z + 3)) + (3*z*z - 6*z + 2)/(2*(z - 3)*(2*z - 1)))*(2*z*z - 7*z + 3) - 2)/(z*(z + 1)) ,std::sqrt(z*z*z*z + 8*z*z - 12*z + 4)/(2*(2*z*z - 7*z + 3)) + (3*z*z - 6*z + 2)/(2*(z - 3)*(2*z - 1)),z); }, + prec), + create_polyline(2./3,1., P(1./2,0.,2./3),P(1./2,1./2,1.), + [](double z) { return P((-z + (2*z - 1)*(3*z*z - 2*z)/(6*z*z - 5*z + 1) + 1)/z, (3*z*z - 2*z)/(6*z*z - 5*z + 1),z); }, + prec), + create_polyline(1./2,1., P(1.,1./3.,1./2),P(1./2,1./2,1.), + [](double z) { return P((-z + z*(2*z - 1)/(z + 1) + 1)/z, z/(z+1.),z); }, + prec), +}; +} + +//00121320 +// curve 1 : x = -(-7*z*z + 7*z + ((7*z*z - 8*z + 2)/(2*(9*z*z - 10*z + 3)) + sqrt(13*z*z*z*z - 36*z*z*z + 40*z*z - 20*z + 4)/(2*(9*z*z - 10*z + 3)))*(9*z*z - 10*z + 3) - 2)/(z*(3*z - 1)), y = (7*z*z - 8*z + 2)/(2*(9*z*z - 10*z + 3)) + sqrt(13*z*z*z*z - 36*z*z*z + 40*z*z - 20*z + 4)/(2*(9*z*z - 10*z + 3)), z = [0,1] +// curve 2 : x = [1/2,(8.06225-7)/2], y = (2 - 5*x + x*x + sqrt(x)*sqrt(4 - 11*x + 6*x*x + x*x*x))/(2*(1 - 4*x + 2*x*x)), z = (2 - x - x*x - sqrt(x)*sqrt(4 - 11*x + 6*x*x + x*x*x))/(2*(1 - x + x*x)) +// curve 3 : x = [1/2,(8.06225-7)/2], y = (2 - 5*x + x*x - sqrt(x)*sqrt(4 - 11*x + 6*x*x + x*x*x))/(2*(1 - 4*x + 2*x*x)), z = (2 - x - x*x + sqrt(x)*sqrt(4 - 11*x + 6*x*x + x*x*x))/(2*(1 - x + x*x)) +template +std::vector> poly00121320(const int prec = 10) +{ +return { + create_polyline(0.,1., P(1./2,2./3,0.),P(1./2,1./2,1.), + [](double z) { return P(-(-7*z*z + 7*z + ((7*z*z - 8*z + 2)/(2*(9*z*z - 10*z + 3)) + std::sqrt(13*z*z*z*z - 36*z*z*z + 40*z*z - 20*z + 4)/(2*(9*z*z - 10*z + 3)))*(9*z*z - 10*z + 3) - 2)/(z*(3*z - 1)),(7*z*z - 8*z + 2)/(2*(9*z*z - 10*z + 3)) + std::sqrt(13*z*z*z*z - 36*z*z*z + 40*z*z - 20*z + 4)/(2*(9*z*z - 10*z + 3)),z); }, + prec), + create_polyline(1./2,(CGAL_SQRT65-7.)/2, P(1./2,0.,2./3),P((CGAL_SQRT65-7.)/2,1./3,(3.+CGAL_SQRT65)/14), + [](double x) { return P(x,(2 - 5*x + x*x + std::sqrt(x)*std::sqrt(4 - 11*x + 6*x*x + x*x*x))/(2*(1 - 4*x + 2*x*x)),(2 - x - x*x - std::sqrt(x)*std::sqrt(4 - 11*x + 6*x*x + x*x*x))/(2*(1 - x + x*x))); }, + prec), + create_polyline(1./2,(CGAL_SQRT65-7.)/2, P(1./2,1./2,1.),P((CGAL_SQRT65-7.)/2,1./3,(3.+CGAL_SQRT65)/14), + [](double x) { return P(x,(2 - 5*x + x*x - std::sqrt(x)*std::sqrt(4 - 11*x + 6*x*x + x*x*x))/(2*(1 - 4*x + 2*x*x)),(2 - x - x*x + std::sqrt(x)*std::sqrt(4 - 11*x + 6*x*x + x*x*x))/(2*(1 - x + x*x))); }, + prec), +}; +} + +//00121321 +// curve 1 : x = -(-7*z*z + 8*z + (sqrt((z - 1)*(25*z*z*z - 37*z*z + 20*z - 4))/(2*(6*z*z - 10*z + 3)) + (z - 1)*(7*z - 2)/(2*(6*z*z - 10*z + 3)))*(6*z*z - 10*z +3) - 2)/(z*(2*z - 1)), y = sqrt((z - 1)*(25*z*z*z - 37*z*z + 20*z - 4))/(2*(6*z*z - 10*z + 3)) + (z - 1)*(7*z - 2)/(2*(6*z*z - 10*z + 3)), z = ]0,1/2[ +// curve 2 : x = (-2*z*z + 3*z - 1)/(z*(2*z - 1)), y = (3*z*z - 2*z)/(6*z*z - 6*z + 1), z = ]1/2,2/3] +template +std::vector> poly00121321(const int prec = 10) +{ +return { + create_polyline(limit_value(0.,1.),limit_value(1./2,-1.), P(1./2,2./3,0.),P(1.,1./2,1./2), + [](double z) { return P( -(-7*z*z + 8*z + (std::sqrt((z - 1)*(25*z*z*z - 37*z*z + 20*z - 4))/(2*(6*z*z - 10*z + 3)) + (z - 1)*(7*z - 2)/(2*(6*z*z - 10*z + 3)))*(6*z*z - 10*z +3) - 2)/(z*(2*z - 1)),std::sqrt((z - 1)*(25*z*z*z - 37*z*z + 20*z - 4))/(2*(6*z*z - 10*z + 3)) + (z - 1)*(7*z - 2)/(2*(6*z*z - 10*z + 3)),z); }, + prec), + create_polyline(limit_value(1./2.,1.),2./3, P(1.,1./2,1./2),P(1./2,0.,2./3), + [](double z) { return P((-2*z*z + 3*z - 1)/(z*(2*z - 1)),(3*z*z - 2*z)/(6*z*z - 6*z + 1),z); }, + prec), + +}; +} + +//00121323 +// curve 1 : x = -(-3*z + (3*z - 3)*((3*z - 1)/(3*(2*z - 1)) - sqrt(3*z*z - 3*z + 1)/(3*(2*z - 1))) + 2)/z, y = (3*z - 1)/(3*(2*z - 1)) - sqrt(3*z*z - 3*z + 1)/(3*(2*z - 1)), z = ]0,1[ +// curve 2 : x = (z - 1)*(-1 + sqrt(12*z*z*z*z - 20*z*z*z + 12*z*z - 4*z + 1)/(2*(2*z*z - 3*z + 1)) + (6*z*z - 6*z + 1)/(2*(z - 1)*(2*z - 1)))/z, y = sqrt(12*z*z*z*z - 20*z*z*z + 12*z*z - 4*z + 1)/(2*(2*z*z - 3*z + 1)) + (6*z*z - 6*z + 1)/(2*(z - 1)*(2*z - 1)), z = ]1/2,2/3] +// curve 3 : x = (z - 1)*(-1 - sqrt(12*z*z*z*z - 28*z*z*z + 24*z*z - 8*z + 1)/(2*(2*z*z - 3*z + 1)) + (2*z*z - 2*z + 1)/(2*(z - 1)*(2*z - 1)))/z, y = -sqrt(12*z*z*z*z - 28*z*z*z + 24*z*z - 8*z + 1)/(2*(2*z*z - 3*z + 1)) + (2*z*z - 2*z + 1)/(2*(z - 1)*(2*z - 1)), z = [1/3,1/2[ +// curve 4 : x = -(-z + (z - 1)*(-z*z/((z - 1)*(2*z - 1)) + z*sqrt(3*z*z - 3*z + 1)/(2*z*z - 3*z + 1)))/(3*z), y = -z*z/((z - 1)*(2*z - 1)) + z*sqrt(3*z*z - 3*z + 1)/(2*z*z - 3*z + 1), z = ]1/2,1] +template +std::vector> poly00121323(const int prec = 10) +{ +return { + create_polyline(limit_value(0.,1.),limit_value(1./2,-1.), P(1./2,2./3,0.),P(1./2,1./2,1./2), + [](double z) { return P(-(-3*z + (3*z - 3)*((3*z - 1)/(3*(2*z - 1)) - std::sqrt(3*z*z - 3*z + 1)/(3*(2*z - 1))) + 2)/z,(3*z - 1)/(3*(2*z - 1)) - std::sqrt(3*z*z - 3*z + 1)/(3*(2*z - 1)),z); }, + prec), + create_polyline(limit_value(1./2,1.),2./3,P(1./2,1./2,1./2), P(1./2,0.,2./3), + [](double z) { return P( (z - 1)*(-1 + std::sqrt(12*z*z*z*z - 20*z*z*z + 12*z*z - 4*z + 1)/(2*(2*z*z - 3*z + 1)) + (6*z*z - 6*z + 1)/(2*(z - 1)*(2*z - 1)))/z,std::sqrt(12*z*z*z*z - 20*z*z*z + 12*z*z - 4*z + 1)/(2*(2*z*z - 3*z + 1)) + (6*z*z - 6*z + 1)/(2*(z - 1)*(2*z - 1)) ,z); }, + prec), + create_polyline(1./3,limit_value(1./2,-1.), P(1.,1./2,1./3),P(1./2,1./2,1./2), + [](double z) { return P( (z - 1)*(-1 - std::sqrt(12*z*z*z*z - 28*z*z*z + 24*z*z - 8*z + 1)/(2*(2*z*z - 3*z + 1)) + (2*z*z - 2*z + 1)/(2*(z - 1)*(2*z - 1)))/z,-std::sqrt(12*z*z*z*z - 28*z*z*z + 24*z*z - 8*z + 1)/(2*(2*z*z - 3*z + 1)) + (2*z*z - 2*z + 1)/(2*(z - 1)*(2*z - 1)),z); }, + prec), + create_polyline(limit_value(1./2,1.),1., P(1./2,1./2,1./2),P(1./3,1./2,1.), + [](double z) { return P( -(-z + (z - 1)*(-z*z/((z - 1)*(2*z - 1)) + z*std::sqrt(3*z*z - 3*z + 1)/(2*z*z - 3*z + 1)))/(3*z),-z*z/((z - 1)*(2*z - 1)) + z*std::sqrt(3*z*z - 3*z + 1)/(2*z*z - 3*z + 1) ,z); }, + prec), +}; +} + +//00122103 +// curve 1 : x = 1/2, y = [0,1/2] U [2/3,1], z = (3*y-2.)/(5*y-3.) +// curve 2 : x = [1/2,1], y = (2 - x + sqrt(x)* sqrt(4 - 11*x + 8*x*x))/(2*(1 - x + 2*x*x)), z = (-3*x + sqrt(x)*sqrt(4 - 11*x + 8*x*x))/(2*(1 - 5*x + 2*x*x)) +// curve 3 : x = [1/2,1], y = (-3*x + sqrt(x)*sqrt(4 - 11*x + 8*x*x))/(2*(1 - 5*x + 2*x*x)), z = (2 - x + sqrt(x)* sqrt(4 - 11*x + 8*x*x))/(2*(1 - x + 2*x*x)) +// problem with polylines, there is an over refinement +template +std::vector> poly00122103(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(1./2,0.,2./3),P(1./2,1./2,1.), + [](double y) { return P(1./2,y,(3*y-2.)/(5*y-3.)); }, + prec), + create_polyline(2./3,1., P(1./2,2./3,0.),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,(3*y-2.)/(5*y-3.)); }, + prec), + create_polyline(1./2,1., P(1./2,1.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,(2 - x + std::sqrt(x)* std::sqrt(4 - 11*x + 8*x*x))/(2*(1 - x + 2*x*x)),(-3*x + std::sqrt(x)*std::sqrt(4 - 11*x + 8*x*x))/(2*(1 - 5*x + 2*x*x))); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1.,1./2,1./2), + [](double x) { return P(x,(-3*x + std::sqrt(x)*std::sqrt(4 - 11*x + 8*x*x))/(2*(1 - 5*x + 2*x*x)),(2 - x + std::sqrt(x)* std::sqrt(4 - 11*x + 8*x*x))/(2*(1 - x + 2*x*x))); }, + prec), + +}; +} + +//00122113 +// curve 1 : x = [1/2,1], y = (-4 + 7*x - sqrt(4 - 16*x + 21*x*x - 8*x*x*x))/(2*(-3 + 4*x + x*x)), z = (-2 + 5*x - sqrt(4 - 16*x + 21*x*x - 8*x*x*x))/(2*x*(1 + x)) +// curve 2 : x = [0,1/2], y = (-4 + 7*x + sqrt(4 - 16*x + 21*x*x - 8*x*x*x))/(2*(-3 + 4*x + x*x)), z = (-2 + 5*x + sqrt(4 - 16*x + 21*x*x - 8*x*x*x))/(2*x*(1 + x)) +// curve 3 : x = [2/3,1], y = (-1. + 2*x)/(-1. + 3*x*x), z = (-1. + 2*x)/(x*(-1. + 3*x)) +template +std::vector> poly00122113(const int prec = 10) +{ +return { + create_polyline(1./2,1., P(1./2,2./3,0.),P(1.,1./2,1./2), + [](double x) { return P(x,(-4 + 7*x - std::sqrt(4 - 16*x + 21*x*x - 8*x*x*x))/(2*(-3. + 4*x + x*x)),(-2. + 5*x - std::sqrt(4 - 16*x + 21*x*x - 8*x*x*x))/(2*x*(1 + x))); }, + prec), + create_polyline(0.000001,1./2, P(0.,1./3,1./2),P(1./2,0.,2./3), + [](double x) { return P(x,(-4. + 7*x + std::sqrt(4 - 16*x + 21*x*x - 8*x*x*x))/(2*(-3 + 4*x + x*x)),(-2. + 5*x + std::sqrt(4 - 16*x + 21*x*x - 8*x*x*x))/(2*x*(1 + x))); }, + prec), + create_polyline(2./3,1.,P(2./3,1.,1./2), P(1.,1./2,1./2), + [](double x) { return P(x,(-1. + 2*x)/(-1. + 3*x*x),(-1. + 2*x)/(x*(-1. + 3*x))); }, + prec), +}; +} + +//00122133 +// curve 1 : x = [0,1], y = z = 1/2 +// curve 2 : x = 1/ 2, y = (3*z - 2)/(4*z - 3), z = [0,2/3] +// curve 3 : x = 1/2, y = [1/3,1], z = y/(4.*y-1) +// problem with close polylines, there is an over refinement +template +std::vector> poly00122133(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(0.,1./2,P(1./2,2./3,0.),P(1./2,1./2,1./2), + [](double z) { return P(1./2,(3*z - 2)/(4*z - 3),z); }, + prec), + create_polyline(1./2,2./3,P(1./2,1./2,1./2),P(1./2,0.,2./3), + [](double z) { return P(1./2,(3*z - 2)/(4*z - 3),z); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2,1./2),P(1./2,1.,1./3), + [](double y) { return P(1./2,y,y/(4.*y-1)); }, + prec), + create_polyline(1./3,1./2,P(1./2,1./3,1.),P(1./2,1./2,1./2), + [](double y) { return P(1./2,y,y/(4.*y-1)); }, + prec), + +}; +} + +//00122300 +// curve 1 : x = 1/2, y = [2/3,1], z = (3*y-2)/(5*y-2) +// curve 2 : x = 1/2, y' = 1-y, z = 1-(3*y-2)/(5*y-2), y'= [2/3,1] +template +std::vector> poly00122300(const int prec = 10) +{ +return { +create_polyline(2./3,1.,P(1./2,2./3,0.),P(1./2,1.,1./3), + [](double y) { return P(1./2,y,(3*y-2)/(5*y-2)); }, + prec), +create_polyline(2./3,1.,P(1./2,1./3,1.),P(1./2,0.,2./3), + [](double y) { return P(1./2,1-y,1-(3*y-2)/(5*y-2)); }, + prec), + +}; +} + +//00122301 +// curve 1 : x = -(-5*z*z + 5*z + (sqrt((2*z - 1)*(14*z*z*z - 25*z*z + 16*z - 4))/(2*(6*z*z - 7*z + 3)) + (2*z*z - 3*z + 2)/(2*(6*z*z - 7*z + 3)))*(6*z*z - 7*z + 3) - 2)/(z*(3*z - 1)), y = sqrt((2*z - 1)*(14*z*z*z - 25*z*z + 16*z - 4))/(2*(6*z*z - 7*z + 3)) + (2*z*z - 3*z + 2)/(2*(6*z*z - 7*z + 3)), z = ]0,1/2] +// curve 2 : x = (-z + (2*z - 1)*(sqrt(12*z*z*z*z - 28*z*z*z + 24*z*z - 8*z + 1)/(2*(6*z*z - 5*z + 1)) + (6*z*z - 6*z + 1)/(2*(2*z - 1)*(3*z - 1))) + 1)/z, y = sqrt(12*z*z*z*z - 28*z*z*z + 24*z*z - 8*z + 1)/(2*(6*z*z - 5*z + 1)) + (6*z*z - 6*z + 1)/(2*(2*z - 1)*(3*z - 1)), z = ]1/2,1] +// curve 3 : x = (-z + (2*z - 1)*(-sqrt(12*z*z*z*z - 20*z*z*z + 12*z*z - 4*z + 1)/(2*(2*z*z + z - 1)) + (6*z*z - 2*z - 1)/(2*(z + 1)*(2*z - 1))) + 1)/z, y = -sqrt(12*z*z*z*z - 20*z*z*z + 12*z*z - 4*z + 1)/(2*(2*z*z + z - 1)) + (6*z*z - 2*z - 1)/(2*(z + 1)*(2*z - 1)), z = [2/3,1] +template +std::vector> poly00122301(const int prec = 10) +{ +return { +create_polyline(limit_value(0.,1.),1./2,P(1./2,2./3,0.),P(1.,1./2,1./2), + [](double z) { return P(-(-5*z*z + 5*z + (std::sqrt((2*z - 1)*(14*z*z*z - 25*z*z + 16*z - 4))/(2*(6*z*z - 7*z + 3)) + (2*z*z - 3*z + 2)/(2*(6*z*z - 7*z + 3)))*(6*z*z - 7*z + 3) - 2)/(z*(3*z - 1)),std::sqrt((2*z - 1)*(14*z*z*z - 25*z*z + 16*z - 4))/(2*(6*z*z - 7*z + 3)) + (2*z*z - 3*z + 2)/(2*(6*z*z - 7*z + 3)) ,z); }, + prec), +create_polyline(limit_value(1./2,1.),1.,P(1.,1./2,1./2),P(1.,1./2,1.), + [](double z) { return P((-z + (2*z - 1)*(std::sqrt(12*z*z*z*z - 28*z*z*z + 24*z*z - 8*z + 1)/(2*(6*z*z - 5*z + 1)) + (6*z*z - 6*z + 1)/(2*(2*z - 1)*(3*z - 1))) + 1)/z,std::sqrt(12*z*z*z*z - 28*z*z*z + 24*z*z - 8*z + 1)/(2*(6*z*z - 5*z + 1)) + (6*z*z - 6*z + 1)/(2*(2*z - 1)*(3*z - 1)),z); }, + prec), +create_polyline(2./3,1.,P(1./2,0.,2./3),P(1./2,1./2,1.), + [](double z) { return P( (-z + (2*z - 1)*(-std::sqrt(12*z*z*z*z - 20*z*z*z + 12*z*z - 4*z + 1)/(2*(2*z*z + z - 1)) + (6*z*z - 2*z - 1)/(2*(z + 1)*(2*z - 1))) + 1)/z, -std::sqrt(12*z*z*z*z - 20*z*z*z + 12*z*z - 4*z + 1)/(2*(2*z*z + z - 1)) + (6*z*z - 2*z - 1)/(2*(z + 1)*(2*z - 1)) ,z); }, + prec), +}; +} + +//00122302 +// curve 1 : x = (2*z*z - 3*z + (4*z - 3)*(-sqrt((z - 1)*(z*z*z - 13*z*z + 12*z - 4))/(2*(4*z - 3)) + (z - 1)*(z + 2)/(2*(4*z - 3))) + 2)/(z*(2*z - 1)), y = -sqrt((z - 1)*(z*z*z - 13*z*z + 12*z - 4))/(2*(4*z - 3)) + (z - 1)*(z + 2)/(2*(4*z - 3)), z = ]0,1/2] +// curve 2 : x = 1-z, y = 1-(-sqrt((z - 1)*(z*z*z - 13*z*z + 12*z - 4))/(2*(4*z - 3)) + (z - 1)*(z + 2)/(2*(4*z - 3))), z' = 1-((2*z*z - 3*z + (4*z - 3)*(-sqrt((z - 1)*(z*z*z - 13*z*z + 12*z - 4))/(2*(4*z - 3)) + (z - 1)*(z + 2)/(2*(4*z - 3))) + 2)/(z*(2*z - 1))), z = ]0,1/2] +template +std::vector> poly00122302(const int prec = 10) +{ +return { + create_polyline(limit_value(0.,1.),1./2, P(1./2,2./3,0.),P(1./3,1.,1./2), + [](double z) { return P((2*z*z - 3*z + (4*z - 3)*(-std::sqrt((z - 1)*(z*z*z - 13*z*z + 12*z - 4))/(2*(4*z - 3)) + (z - 1)*(z + 2)/(2*(4*z - 3))) + 2)/(z*(2*z - 1)),-std::sqrt((z - 1)*(z*z*z - 13*z*z + 12*z - 4))/(2*(4*z - 3)) + (z - 1)*(z + 2)/(2*(4*z - 3)),z); }, + prec), + create_polyline(limit_value(0.,1.),1./2, P(1.,1./3,1./2),P(1./2,0.,2./3), + [](double z) { return P(1-z,1-(-std::sqrt((z - 1)*(z*z*z - 13*z*z + 12*z - 4))/(2*(4*z - 3)) + (z - 1)*(z + 2)/(2*(4*z - 3))),1-((2*z*z - 3*z + (4*z - 3)*(-std::sqrt((z - 1)*(z*z*z - 13*z*z + 12*z - 4))/(2*(4*z - 3)) + (z - 1)*(z + 2)/(2*(4*z - 3))) + 2)/(z*(2*z - 1)))); }, + prec), + +}; +} + +//00122313 +// curve 1 : x = (-1 + (3*z*z - 2*z)/(z - 1))*(z - 1)/z, y = (3*z*z - 2*z)/(z - 1), z = [1/3,2/3] +// curve 2 : x = [1/3,2/3], y = (-1 + 3*x - 3*x*x)/(-1 + x), z = (1 - 3*x + 3*x*x)/x) +// curve 3 : x = -(3*y*y-4*y+1)/y,y = [1/3,2/3], z = (3*y*y-2*y)/(y-1) +template +std::vector> poly00122313(const int prec = 10) +{ +return { + create_polyline(1./3,1./2, P(1.,1./2,1./3), P(1./2,1./2,1./2), + [](double z) { return P( (-1 + (3*z*z - 2*z)/(z - 1))*(z - 1)/z, (3*z*z - 2*z)/(z - 1),z); }, + prec), + create_polyline(1./2,2./3, P(1./2,1./2,1./2),P(1./2,0.,2./3), + [](double z) { return P( (-1 + (3*z*z - 2*z)/(z - 1))*(z - 1)/z, (3*z*z - 2*z)/(z - 1),z); }, + prec), + create_polyline(1./2,2./3, P(1./2,1./2,1./2),P(2./3,1.,1./2), + [](double x) { return P( x,(-1 + 3*x - 3*x*x)/(-1 + x),(1 - 3*x + 3*x*x)/x); }, + prec), + create_polyline(1./3,1./2, P(1./3,1./2,1.), P(1./2,1./2,1./2), + [](double x) { return P( x,(-1 + 3*x - 3*x*x)/(-1 + x),(1 - 3*x + 3*x*x)/x); }, + prec), + create_polyline(1./3,1./2, P(0.,1./3,1./2), P(1./2,1./2,1./2), + [](double y) { return P(-(3*y*y-4*y+1)/y ,y,(3*y*y-2*y)/(y-1)); }, + prec), + create_polyline(1./2,2./3, P(1./2,1./2,1./2), P(1./2,2./3,0.), + [](double y) { return P(-(3*y*y-4*y+1)/y ,y,(3*y*y-2*y)/(y-1)); }, + prec), +}; +} + +//00122331 +// curve 1 : x = [0,1], y = z = 1/2 +// curve 2 : x = -(-4*z*z + 5*z + (-(2*z - 1)*sqrt(5*z*z - 8*z + 4)/(2*(4*z*z - 6*z + 3)) + (2*z*z - 3*z + 2)/(2*(4*z*z - 6*z + 3)))*(4*z*z - 6*z + 3) - 2)/(z*(2*z - 1)), y = -(2*z - 1)*sqrt(5*z*z - 8*z + 4)/(2*(4*z*z - 6*z + 3)) + (2*z*z - 3*z + 2)/(2*(4*z*z - 6*z + 3)),z = ]0,1/2[ +// curve 3 : x = -(-4*z*z + z + (sqrt(-(z - 1)*(3*z + 1))*(2*z - 1)/(2*(4*z*z - 2*z - 1)) + (6*z*z - 3*z - 1)/(2*(4*z*z - 2*z - 1)))*(4*z*z - 2*z - 1) + 1)/(z*(2*z - 1)), y = sqrt(-(z - 1)*(3*z + 1))*(2*z - 1)/(2*(4*z*z - 2*z - 1)) + (6*z*z - 3*z - 1)/(2*(4*z*z - 2*z - 1)),z = ]1/2,2/3] +template +std::vector> poly00122331(const int prec = 10) +{ +return { + create_polyline(0.,1./3, P(0.,1./2,1./2),P(1./3,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./3,2./3, P(1./3,1./2,1./2),P(2./3,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(2./3,1., P(2./3,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(limit_value(0.,1.),limit_value(1./2,-1.), P(1./2,2./3,0.),P(2./3,1./2,1./2), + [](double z) { return P(-(-4*z*z + 5*z + (-(2*z - 1)*std::sqrt(5*z*z - 8*z + 4)/(2*(4*z*z - 6*z + 3)) + (2*z*z - 3*z + 2)/(2*(4*z*z - 6*z + 3)))*(4*z*z - 6*z + 3) - 2)/(z*(2*z - 1)),-(2*z - 1)*std::sqrt(5*z*z - 8*z + 4)/(2*(4*z*z - 6*z + 3)) + (2*z*z - 3*z + 2)/(2*(4*z*z - 6*z + 3)),z); }, + prec), + create_polyline(limit_value(1./2,1.),2./3, P(1./3,1./2,1./2),P(1./2,0.,2./3), + [](double z) { return P( -(-4*z*z + z + (std::sqrt(-(z - 1)*(3*z + 1))*(2*z - 1)/(2*(4*z*z - 2*z - 1)) + (6*z*z - 3*z - 1)/(2*(4*z*z - 2*z - 1)))*(4*z*z - 2*z - 1) + 1)/(z*(2*z - 1)),std::sqrt(-(z - 1)*(3*z + 1))*(2*z - 1)/(2*(4*z*z - 2*z - 1)) + (6*z*z - 3*z - 1)/(2*(4*z*z - 2*z - 1)),z); }, + prec), + +}; +} + +//01101023 +// curve 1 : x = 1./2, y = 1./(2*z), z = [1/2,1] +// curve 2 : x = 1/2, y = [0,1/2], z = (-1 + 2*y)/(-2 + 3*y) +template +std::vector> poly01101023(const int prec = 10) +{ +return { + create_polyline(1./2,1., P(1./2,1.,1./2),P(1./2,1./2,1.), + [](double z) { return P(1./2,1./(2*z),z); }, + prec), + create_polyline(0.,1./2, P(1./2,0.,1./2),P(1./2,1./2,0.), + [](double y) { return P(1./2,y,(-1 + 2*y)/(-2 + 3*y)); }, + prec), + +}; +} + +//01101223 +// curve 1 : x = [1/2,1], y = x/(-1 + 3*x), z = (-1 + 3*x - x*x)/(-1 + 3*x) +template +std::vector> poly01101223(const int prec = 10) +{ +return { + create_polyline(1./2,1, P(1./2,1.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,x/(-1 + 3*x),(-1 + 3*x - x*x)/(-1 + 3*x)); }, + prec), +}; +} + +//01101231 +// no curves +template +std::vector> poly01101231(const int /*prec*/ = 10) +{ +return { + + +}; +} + +//01102332 +// curve 1 : x =[0,1], y = z = 1/2 +// curve 2 : y =[0,1], x = z = 1/2 +// curve 3 : z =[0,1], y = x = 1/2 +template +std::vector> poly01102332(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(0.,1./2, P(1./2,0.,1./2),P(1./2,1./2,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1./2),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(0.,1./2, P(1./2,1./2,0.),P(1./2,1./2,1./2), + [](double z) { return P(1./2,1./2,z); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1./2),P(1./2,1./2,1.), + [](double z) { return P(1./2,1./2,z); }, + prec), + +}; +} + +//01121223 +// no curves +template +std::vector> poly01121223(const int /*prec*/ = 10) +{ +return { + + +}; +} + +//01121230 +// curve 1 : x = -(-7*z*z + 8*z + (-sqrt(-(2*z - 1)*(4*z*z*z - 12*z*z + 10*z - 3))/(2*(9*z*z - 10*z + 3)) + (10*z*z - 10*z + 3)/(2*(9*z*z - 10*z + 3)))*(9*z*z - 10*z + 3) - 3)/(6*z*z - 7*z + 3), y = -sqrt(-(2*z - 1)*(4*z*z*z - 12*z*z + 10*z - 3))/(2*(9*z*z - 10*z + 3)) + (10*z*z - 10*z + 3)/(2*(9*z*z - 10*z + 3)), z = [1/2,1] +// curve 2 : x = -(-5*z*z + 5*z + (sqrt(-z*(8*z*z*z - 20*z*z + 15*z - 4))/(2*(3*z*z - 2*z + 1)) + (2*z*z - 3*z + 2)/(2*(3*z*z - 2*z + 1)))*(3*z*z - 2*z + 1) - 2)/((2*z - 1)*(3*z - 1)), y = sqrt(-z*(8*z*z*z - 20*z*z + 15*z - 4))/(2*(3*z*z - 2*z + 1)) + (2*z*z - 3*z + 2)/(2*(3*z*z - 2*z + 1)), z = ]1/2,1] +template +std::vector> poly01121230(const int prec = 10) +{ +return { + create_polyline(1./2,1., P(1./2,1.,1./2),P(1./2,1./2,1.), + [](double z) { return P(-(-7*z*z + 8*z + (-std::sqrt(-(2*z - 1)*(4*z*z*z - 12*z*z + 10*z - 3))/(2*(9*z*z - 10*z + 3)) + (10*z*z - 10*z + 3)/(2*(9*z*z - 10*z + 3)))*(9*z*z - 10*z + 3) - 3)/(6*z*z - 7*z + 3),-std::sqrt(-(2*z - 1)*(4*z*z*z - 12*z*z + 10*z - 3))/(2*(9*z*z - 10*z + 3)) + (10*z*z - 10*z + 3)/(2*(9*z*z - 10*z + 3)) ,z); }, + prec), + create_polyline(limit_value(1./2,1.),1., P(1./2,1.,1./2),P(1./2,1./2,1.), + [](double z) { return P( -(-5*z*z + 5*z + (std::sqrt(-z*(8*z*z*z - 20*z*z + 15*z - 4))/(2*(3*z*z - 2*z + 1)) + (2*z*z - 3*z + 2)/(2*(3*z*z - 2*z + 1)))*(3*z*z - 2*z + 1) - 2)/((2*z - 1)*(3*z - 1)), std::sqrt(-z*(8*z*z*z - 20*z*z + 15*z - 4))/(2*(3*z*z - 2*z + 1)) + (2*z*z - 3*z + 2)/(2*(3*z*z - 2*z + 1)),z); }, + prec), +}; +} + +//01122330 +// curve 1 : x =[0,1], y = z = 1/2 +// curve 2 : y =[0,1], x = z = 1/2 +template +std::vector> poly01122330(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(0.,1./2, P(1./2,0.,1./2),P(1./2,1./2,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1./2),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + +}; +} + +//01123023 +// curve 1 : x =[0,1], y = z = 1/2 +template +std::vector> poly01123023(const int prec = 10) +{ +return { +create_polyline(0.,1., P(0.,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + +}; +} + +//01233210 +// curve 1 : x =[0,1], y = z = 1/2 +// curve 2 : y =[0,1], x = z = 1/2 +// curve 3 : z =[0,1], y = x = 1/2 +template +std::vector> poly01233210(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(0.,1./2, P(1./2,0.,1./2),P(1./2,1./2,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1./2),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(0.,1./2, P(1./2,1./2,0.),P(1./2,1./2,1./2), + [](double z) { return P(1./2,1./2,z); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1./2),P(1./2,1./2,1.), + [](double z) { return P(1./2,1./2,z); }, + prec), + +}; +} + + +//00001234 +// curve 1 : x = 1/2, y = [0,1/2], z = 2/(3-y) +// curve 2 : x = 1/2, y = [1/2,1], z = 1/(2+y) +// curve 3 : x = [0,1/2], y = 1/2, z = 2/(3-x) +// curve 4 : x = [1/2,1], y = 1/2, z = 1/(2+x) +// curve 5 : x = y = 1/2, z = [4/5,1] +template +std::vector> poly00001234(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(1./2,0.,2./3),P(1./2,1./2,4./5), + [](double y) { return P(1./2,y,2./(3-y)); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,4./5),P(1./2,1.,2./3), + [](double y) { return P(1./2,y,2./(2+y)); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,2./3),P(1./2,1./2,4./5), + [](double x) { return P(x,1./2,2./(3-x)); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,4./5),P(1.,1./2,2./3), + [](double x) { return P(x,1./2,2./(2+x)); }, + prec), + create_polyline(4./5,1., P(1./2,1./2,4./5),P(1./2,1./2,1.), + [](double z) { return P(1./2,1./2,z); }, + prec), +}; +} + +//00010234 +// curve 1 : x = [1/2,1], y = (2 - x)/(1 + x), z = 1/2 +// curve 2 : x = (2 - z)/(1 + z), y = 1/2, z = [1/2,1] +// curve 3 : x = 1/2, y = [1/2,1], z = (2 - y)/(1 + y) +template +std::vector> poly00010234(const int prec = 10) +{ +return { + create_polyline(1./2,1., P(1./2,1.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,(2 - x)/(1 + x),1./2); }, + prec), + create_polyline(1./2,1., P(1.,1./2,1./2),P(1./2,1./2,1.), + [](double z) { return P((2 - z)/(1 + z),1./2,z); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,(2 - y)/(1 + y)); }, + prec), + +}; +} + +//00011234 +// curve 1 : x = ]0,1/2], y = (2 + x - sqrt(4 - 8*x + x*x))/(6*x), z = (2 - x + x*x + sqrt(4 - 8*x + x*x) - x*sqrt(4 - 8*x + x*x))/(2*(3 - 4*x + 2*x*x)) +// curve 2 : x = 1/2, y = [2/3,1], z = 1-y/2 +// curve 3 : x = 1/2, y = [1/2,2/3], z = y/(-1 + 3*y) +// curve 4 : x = [2/3,1], y = 1./2, z = 1.-x/2 +// curve 5 : x = [1/2,2/3], y = 1./2, z = x/(-1 + 3*x) +// curve 6 : x = [1/2,2/3], y = (-1 + 2*x)/(x*(-1 + 3*x)), z = x/(1 - 2*x + 3*x*x) +// curve 7 : x = [1/2,2/3], y = (1 - x)/x, z = x +// curve 8 : x = [1/2,1], y = 1/(1+x),1/(1+x) +template +std::vector> poly00011234(const int prec = 10) +{ +return { + create_polyline(limit_value(0,1),1./2, P(0.,1./2,2./3),P(1./2,2./3,2./3), + [](double x) { return P(x,(2 + x - std::sqrt(4 - 8*x + x*x))/(6*x),(2 - x + x*x + std::sqrt(4 - 8*x + x*x) - x*std::sqrt(4 - 8*x + x*x))/(2*(3 - 4*x + 2*x*x))); }, + prec), + create_polyline(2./3,1.,P(1./2,2./3,2./3),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1.-y/2); }, + prec), + create_polyline(1./2,2./3,P(1./2,1./2,1.),P(1./2,2./3,2./3), + [](double y) { return P(1./2,y,y/(-1 + 3*y)); }, + prec), + create_polyline(2./3,1.,P(2./3,1./2,2./3),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1.-x/2); }, + prec), + create_polyline(1./2,2./3,P(1./2,1./2,1.),P(2./3,1./2,2./3), + [](double x) { return P(x,1./2,x/(-1 + 3*x)); }, + prec), + create_polyline(1./2,2./3,P(1./2,0.,2./3),P(2./3,1./2,2./3), + [](double x) { return P(x,(-1 + 2*x)/(x*(-1 + 3*x)),x/(1 - 2*x + 3*x*x)); }, + prec), + create_polyline(1./2,(CGAL_SQRT5-1)/2,P(1./2,1.,1./2),P((CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2), + [](double x) { return P(x,(1 - x)/x,x); }, + prec), + create_polyline((CGAL_SQRT5-1)/2,2./3,P((CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2),P(2./3,1./2,2./3), + [](double x) { return P(x,(1 - x)/x,x); }, + prec), + create_polyline(1./2,(CGAL_SQRT5-1)/2,P(1./2,2./3,2./3),P((CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2), + [](double x) { return P(x,1/(1+x),1/(1+x)); }, + prec), + create_polyline((CGAL_SQRT5-1)/2,1.,P((CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2),P(1.,1./2,1./2), + [](double x) { return P(x,1/(1+x),1/(1+x)); }, + prec), +}; +} + +//00012034 +// curve 1 : x = [1/2,1], y = (1+ x)/(3*x), z = 1/2 +// curve 2 : x = 1/2, y = [1/2,1], z = (2 - y)/(1 + y) +// curve 3 : x =[0,1/2], y = 1/2, z = (x-2)/(3*x-3) +template +std::vector> poly00012034(const int prec = 10) +{ +return { + create_polyline(1./2,1., P(1./2,1.,1./2),P(1.,2./3,1./2), + [](double x) { return P(x,(1+ x)/(3*x),1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,(2 - y)/(1 + y)); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,2./3),P(1./2,1./2,1.), + [](double x) { return P(x,1./2,(x-2)/(3*x-3)); }, + prec), +}; +} + +//00012134 +// curve 1 : x = [1-1./1.73205,1./2], y = (-1 + 2*x)/(x*(-2 + 3*x)), z = -x/(1 - 5*x + 3*x*x) +// curve 2 : x = [(0.,1-1./1.73205], y = 1/2, z = (-2 + x)/(-3 + 2*x) +// curve 3 : x = 1/2, y = [2/3,1], z = 1-y/2 +// curve 4 : x = -(z - 1)*(3*z - 1)/z, y = z/(3*z - 1), z = [1/2,2/3] +// curve 5 : x = [1-1./1.73205,1./2], y = (-1 - x*x + sqrt(1 - 6*x*x + 4*x*x*x + x*x*x*x))/(2*(-2 + x)*x), z = (-1 - 2*x + x*x - sqrt(1 - 6*x*x + 4*x*x*x + x*x*x*x))/(2*(-1 - 2*x + 2*x*x)) +// curve 6 : x = 1/2, y = [1/2,2/3], z = y/(-1 + 3*y) +// curve 7 : x = [1-1./1.73205,1./2], y = 1/2, z = x/(1-x) +template +std::vector> poly00012134(const int prec = 10) +{ +return { + create_polyline(1-1./CGAL_SQRT3,1./2, P(1-1./CGAL_SQRT3,1./2,CGAL_SQRT3-1.),P(1./2,0.,2./3), + [](double x) { return P(x,(-1 + 2*x)/(x*(-2 + 3*x)),-x/(1 - 5*x + 3*x*x)); }, + prec), + create_polyline(0.,1-1./CGAL_SQRT3, P(0.,1./2,2./3),P(1-1./CGAL_SQRT3,1./2,CGAL_SQRT3-1.), + [](double x) { return P(x,1./2,(-2 + x)/(-3 + 2*x)); }, + prec), + create_polyline(2./3,1., P(1./2,2./3,2./3),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1.-y/2); }, + prec), + create_polyline(1./2,2./3, P(1./2,1.,1./2),P(1./2,2./3,2./3), + [](double z) { return P( -(z - 1)*(3*z - 1)/z,z/(3*z - 1),z); }, + prec), + create_polyline(1-1./CGAL_SQRT3,1./2,P(1-1./CGAL_SQRT3,1./2,CGAL_SQRT3-1.),P(1./2,2./3,2./3), + [](double x) { return P(x,(-1 - x*x + std::sqrt(1 - 6*x*x + 4*x*x*x + x*x*x*x))/(2*(-2 + x)*x),(-1 - 2*x + x*x - std::sqrt(1 - 6*x*x + 4*x*x*x + x*x*x*x))/(2*(-1 - 2*x + 2*x*x)) ); }, + prec), + create_polyline(1./2,2./3, P(1./2,1./2,1.),P(1./2,2./3,2./3), + [](double y) { return P( 1./2,y,y/(-1 + 3*y)); }, + prec), + create_polyline(1-1./CGAL_SQRT3,1./2, P(1-1./CGAL_SQRT3,1./2,CGAL_SQRT3-1.),P(1./2,1./2,1.), + [](double x) { return P(x ,1./2,x/(1-x)); }, + prec), +}; +} + +//00012234 +// curve 1 : x = [1/2,1], y = 1/(2x), z = 1/2 +// curve 2 : x = [1/2,1], y = z = 1./(1+x) +// curve 3 : x = 1/2, y = [2/3,1], z = 1-y/2 +// curve 4 : x = [0,1/2], y = 1/(2-x), z = 2/3 +// curve 5 : x = 1/2, y = 2/3, z =[2/3,1] +template +std::vector> poly00012234(const int prec = 10) +{ +return { + create_polyline(1./2,1., P(1./2,1.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x ,1./(2*x),1./2); }, + prec), + create_polyline(1./2,1., P(1./2,2./3,2./3),P(1.,1./2,1./2), + [](double x) { return P(x ,1./(1+x),1./(1+x)); }, + prec), + create_polyline(2./3,1., P(1./2,2./3,2./3),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1.-y/2); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,2./3),P(1./2,2./3,2./3), + [](double x) { return P(x,1./(2-x),2./3); }, + prec), + create_polyline(2./3,1., P(1./2,2./3,2./3),P(1./2,2./3,1.), + [](double z) { return P(1./2,2./3,z); }, + prec), +}; +} + +//00012334 +// curve 1 : x = [0,1/2], y = (-1 + 2*x)/(-2 + 3*x), z = 2./3 +// curve 2 : x = [1/2,1], y = x/(-1 + 3*x), z = (-1 + 3*x - x*x)/(-1 + 3*x) +// curve 3 : x = [1/2,1], y = 1/2x, z = 1/2 +// problem with close polylines, there is an over refinement +template +std::vector> poly00012334(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,2./3),P(1./2,0.,2./3), + [](double x) { return P(x,(-1 + 2*x)/(-2 + 3*x),2./3); }, + prec), + create_polyline(1./2,1., P(1/2.,1.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x, x/(-1 + 3*x),(-1 + 3*x - x*x)/(-1 + 3*x)); }, + prec), + create_polyline(1./2,1., P(1/2.,1.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./(2*x),1./2); }, + prec), +}; +} + +//00012340 +// curve 1 : x = [0,1/2], y = 1/2, z = (-2 + x)/(3*(-1 + x)) +// curve 2 : x = [0,1/2], y = [0,1/2], z = (-2 + y)/(3*(-1 + y)) +template +std::vector> poly00012340(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,2./3),P(1./2,1./2,1.), + [](double x) { return P(x,1./2,(-2 + x)/(3*(-1 + x))); }, + prec), + create_polyline(0.,1./2, P(1./2,0.,2./3),P(1./2,1./2,1.), + [](double y) { return P(1./2,y,(-2 + y)/(3*(-1 + y))); }, + prec), +}; +} + +//00012341 +// curve 1 : x = 1/2, y = [0.,1-1./1.73205], z = (-2 + y)/(-3 + 2*y) +// curve 2 : x = [0.,1-1./1.73205], y = 1/2, z = (-2 + x)/(-3 + 2*x) +// curve 3 : x = 1/2, y = [1-1./1.73205,1./2], z = -y/(-1 + y) +// curve 4 : x = [1-1./1.73205,1./2], y = 1/2, z = -x/(-1 + x) +// curve 5 : x = [1-1./1.73205,1./2], y = (-1 - 2*x + 2*x*x + sqrt(1 - 4*x + 12*x*x - 12*x*x*x + 4*x*x*x*x))/(2*(-2 + x)*x), z = (1 - 4*x + 2*x*x + sqrt(1 - 4*x + 12*x*x - 12*x*x*x + 4*x*x*x*x))/(2*(-1 + x)*(-1+x)) +// curve 6 : x = [1/2,1], y = (1 + x - sqrt(1 - x + x*x))/(3*x), z = (x - sqrt(1 - x + x*x))/(-1 + x) +// curve 7 : x = (1 + y - sqrt(1 - y + y*y))/(3*y), y = [1/2,1], z = (y - sqrt(1 - y + y*y))/(-1 + y) +template +std::vector> poly00012341(const int prec = 10) +{ +return { + create_polyline(0.,1-1./CGAL_SQRT3, P(1./2,0.,2./3),P(1./2,1-1./CGAL_SQRT3,CGAL_SQRT3-1), + [](double y) { return P(1./2,y,(-2 + y)/(-3 + 2*y)); }, + prec), + create_polyline(0.,1-1./CGAL_SQRT3, P(0.,1./2,2./3),P(1-1./CGAL_SQRT3,1./2,CGAL_SQRT3-1), + [](double x) { return P(x,1./2,(-2 + x)/(-3 + 2*x)); }, + prec), + create_polyline(1-1./CGAL_SQRT3,1./2,P(1./2,1-1./CGAL_SQRT3,CGAL_SQRT3-1), P(1./2,1./2,1.), + [](double y) { return P(1./2,y,-y/(-1 + y)); }, + prec), + create_polyline(1-1./CGAL_SQRT3,1./2,P(1-1./CGAL_SQRT3,1./2,CGAL_SQRT3-1), P(1./2,1./2,1.), + [](double x) { return P(x,1./2,-x/(-1 + x)); }, + prec), + create_polyline(1-1./CGAL_SQRT3,1./2,P(1-1./CGAL_SQRT3,1./2,CGAL_SQRT3-1),P(1./2,1-1./CGAL_SQRT3,CGAL_SQRT3-1), + [](double x) { return P(x,(-1 - 2*x + 2*x*x + std::sqrt(1 - 4*x + 12*x*x - 12*x*x*x + 4*x*x*x*x))/(2*(-2 + x)*x),(1 - 4*x + 2*x*x + std::sqrt(1 - 4*x + 12*x*x - 12*x*x*x + 4*x*x*x*x))/(2*(-1 + x)*(-1+x))); }, + prec), + create_polyline(1./2,1., P(1./2,1-1./CGAL_SQRT3,CGAL_SQRT3-1), P(1.,1./3,1./2) , + [](double x) { return P(x,(1 + x - std::sqrt(1 - x + x*x))/(3*x),(x - std::sqrt(1 - x + x*x))/(-1 + x)); }, + prec), + create_polyline(1./2,1.,P(1-1./CGAL_SQRT3,1./2,CGAL_SQRT3-1),P(1./3,1.,1./2), + [](double y) { return P((1 + y - std::sqrt(1 - y + y*y))/(3*y),y,(y - std::sqrt(1 - y + y*y))/(-1 + y)); }, + prec), +}; +} + +//00012342 +// curve 1 : x = [1/2,1], y = 1/(2*x), z = -x/(1 - 5*x + 2*x*x) +// curve 2 : x = [1/2,1], y = (-1 + 2*x)/(-1 + 3*x), z = (1 - 4*x + 2*x*x)/(1 - 4*x + x*x) +// curve 3 : x = [0,1/2], y = (-1 +x)/(-2 + 3*x), z = (2 - 4*x + x*x)/(3 - 6*x + 2*x*x) +template +std::vector> poly00012342(const int prec = 10) +{ +return { + create_polyline(1./2,1., P(1./2,1.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1/(2*x),-x/(1 - 5*x + 2*x*x)); }, + prec), + create_polyline(1./2,1., P(1./2,0.,2./3),P(1.,1./2,1./2), + [](double x) { return P(x,(-1 + 2*x)/(-1 + 3*x),(1 - 4*x + 2*x*x)/(1 - 4*x + x*x)); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,2./3),P(1./2,1.,1./2), + [](double x) { return P(x,(-1 +x)/(-2 + 3*x),(2 - 4*x + x*x)/(3 - 6*x + 2*x*x)); }, + prec), +}; +} + +//00012343 +// curve 1 : x = [1/2,1], y = 1/(2*x), z = 1/(2*x+1) +// curve 2 : x = [1/3,1/2], y = (-1 + 2*x)/(-1 + x), z = (1 - 2*x + 2*x*x)/(1 - x + x*x) +// curve 3 : x = [0,1/3], y = 1./2, z = (-2 + x)/(-3 + 2*x) +// curve 4 : x = [1/3,1/2], y = -x/(-1 + x), z = (-1 + x + x*x)/(-1 + 2*x*x) +// curve 5 : x = 1/3, y = 1/2, z = [5/7,1] +template +std::vector> poly00012343(const int prec = 10) +{ +return { + create_polyline(1./2,1., P(1./2,1.,1./2),P(1.,1./2,1./3), + [](double x) { return P(x,1/(2*x),1/(2*x+1)); }, + prec), + create_polyline(1./3,1./2, P(1./3,1./2,5./7),P(1./2,0.,2./3), + [](double x) { return P(x,(-1 + 2*x)/(-1 + x),(1 - 2*x + 2*x*x)/(1 - x + x*x)); }, + prec), + create_polyline(0.,1./3, P(0.,1./2,2./3),P(1./3,1./2,5./7), + [](double x) { return P(x,1./2,(-2 + x)/(-3 + 2*x)); }, + prec), + create_polyline(1./3,1./2,P(1./3,1./2,5./7), P(1./2,1.,1./2), + [](double x) { return P(x,-x/(-1 + x),(-1 + x + x*x)/(-1 + 2*x*x)); }, + prec), + create_polyline(5./7,1., P(1./3,1./2,5./7),P(1./3,1./2,1.), + [](double z) { return P(1./3,1./2,z); }, + prec), +}; +} + +//00111234 +// curve 1 : x = [1/2,1], y = (-1 + 2*x)/(-1 + 3*x), z = 1/(1 + x) +// curve 2 : x = [1/2,1], y = 1./2, z = 1./(2*x) +// curve 3 : x = 1/2, y =[1/2,1], z = (2*y)/(-1 + 4*y) +template +std::vector> poly00111234(const int prec = 10) +{ +return { + create_polyline(1./2,1., P(1./2,0.,2./3),P(1.,1./2,1./2), + [](double x) { return P(x,(-1 + 2*x)/(-1 + 3*x),1/(1 + x)); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./(2*x)); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1./2,1.,2./3), + [](double y) { return P(1./2,y,(2*y)/(-1 + 4*y)); }, + prec), +}; +} + +//00112234 +// curve 1 : x = [0,1], y = z = 1/2 +// curve 2 : x = [1/2,1], y = z = 1/(1 + x) +// curve 3 : x = 1/2, y = [2/3,1], z = 2/3 +// curve 4 : x = 1/2, y = 2/3, z = [2/3,1] +// curve 5 : x = [0,1/2], y = z = 1/(2 - x) +template +std::vector> poly00112234(const int prec = 10) +{ +return { + create_polyline(0.,1., P(0.,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,1., P(1./2,2./3,2./3),P(1.,1./2,1./2), + [](double x) { return P(x,1/(1 + x),1/(1 + x)); }, + prec), + create_polyline(2./3,1., P(1./2,2./3,2./3),P(1./2,1.,2./3), + [](double y) { return P(1./2,y,2./3); }, + prec), + create_polyline(2./3,1., P(1./2,2./3,2./3),P(1./2,2./3,1.), + [](double z) { return P(1./2,2./3,z); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,2./3,2./3), + [](double x) { return P(x,1/(2 - x),1/(2 - x)); }, + prec), +}; +} + +//00112324 +// curve 1 : x = [0,2/3], y = 1/2, z = 1/(3 - 2*x) +// curve 2 : x = [2/3,1], y = 1/2, z = 1./(1 + x) +// curve 3 : x = [1/2,2/3], y = (-1 + 2*x)/x, z = 1/(1 + x) +// curve 4 : x = [1/2,2/3], y = (1 - x)/x, z = 1/(1 + x) +// curve 5 : x = 2/3, y = 1/2, z = [3/5,1] +template +std::vector> poly00112324(const int prec = 10) +{ +return { + create_polyline(0.,2./3, P(0.,1./2,1./3),P(2./3,1./2,3./5), + [](double x) { return P(x,1./2 ,1/(3 - 2*x)); }, + prec), + create_polyline(2./3,1, P(2./3,1./2,3./5),P(1.,1./2,1.), + [](double x) { return P(x,1./2 ,1./(1 + x)); }, + prec), + create_polyline(1./2,2./3, P(1./2,0.,2./3),P(2./3,1./2,3./5), + [](double x) { return P(x,(-1 + 2*x)/x,1/(1 + x)); }, + prec), + create_polyline(1./2,2./3, P(1./2,1.,2./3),P(2./3,1./2,3./5), + [](double x) { return P(x,(1 - x)/x,1/(1 + x)); }, + prec), + create_polyline(3./5,1., P(2./3,1./2,3./5),P(2./3,1./2,1.), + [](double z) { return P(2./3,1./2,z); }, + prec), + +}; +} + +//00112334 +// curve 1 : x = [0,1], y = z = 1/2 +// curve 2 : x = [1/2,1], y = x/(-1 + 3*x), z = 1/(1 + x) +// curve 2 : x = 1-x', y = 1- x'/(-1 + 3*x'), z = 1/(1 + x'), x' = [1/2,1] +template +std::vector> poly00112334(const int prec = 10) +{ +return { + create_polyline(0.,1., P(0.,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + + create_polyline(1./2,1., P(1./2,1.,2./3),P(1.,1./2,1./2), + [](double x) { return P(x,x/(-1. + 3*x),1./(1 + x)); }, + prec), + create_polyline(1./2,1., P(1./2,0.,2./3),P(0.,1./2,1./2), + [](double x) { return P(1-x,1 - x/(-1. + 3*x),1./(1 + x)); }, + prec), +}; +} + +//00121234 +// curve 1 : x = 1/2, y = [0,2/3], z = (-2 + 3*y)/(-3 + 4*y +// curve 2 : x = 1/2, y =[1/2,1], z = y/(-1 + 3*y) +template +std::vector> poly00121234(const int prec = 10) +{ +return { + create_polyline(0.,2./3, P(1./2,0.,2./3),P(1./2,2./3,0.), + [](double y) { return P(1./2,y,(-2 + 3*y)/(-3 + 4*y)); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,y/(-1 + 3*y)); }, + prec), +}; +} + +//00121304 +// curve 1 : x = [1/2,4.-2*1.73205], y = (2 + x - sqrt(4 - 8*x + x*x))/(6*x), z = (-2 + 5*x - x*x - sqrt(4 - 8*x + x*x) + x*sqrt(4 - 8*x + x*x))/(2*x) +// curve 2 : x = [1/2,4.-2*1.73205], y = (2 + x + sqrt(4 - 8*x + x*x))/(6*x), z = (-2 + 5*x - x*x + sqrt(4 - 8*x + x*x) - x*sqrt(4 - 8*x + x*x))/(2*x) +// curve 3 : x = [1/2,4.-2*1.73205], y = (-2 + 5*x - x*x + sqrt(4 - 8*x + x*x) - x*sqrt(4 - 8*x + x*x))/(2*x), z = (2 + x + sqrt(4 - 8*x + x*x))/(6*x) +// curve 4 : x = [1/2,4.-2*1.73205], y = (-2 + 5*x - x*x - sqrt(4 - 8*x + x*x) + x*sqrt(4 - 8*x + x*x))/(2*x), z = (2 + x - sqrt(4 - 8*x + x*x))/(6*x) +// curve 5 : x = [1/2,1], y = 1/2x, z = 1/2 +// curve 6 : x = [1/2,1], y = 1/2, z = 1/2x +template +std::vector> poly00121304(const int prec = 10) +{ +return { + create_polyline(1./2,4.-2*CGAL_SQRT3, P(1./2,2./3,0.),P(4.-2*CGAL_SQRT3,(1.+1/CGAL_SQRT3)/2,(CGAL_SQRT3-1)/2.), + [](double x) { return P(x,(2 + x - std::sqrt(4 - 8*x + x*x))/(6*x),(-2 + 5*x - x*x - std::sqrt(4 - 8*x + x*x) + x*std::sqrt(4 - 8*x + x*x))/(2*x)); }, + prec), + create_polyline(1./2,4.-2*CGAL_SQRT3, P(1./2,1.,1./2),P(4.-2*CGAL_SQRT3,(1.+1/CGAL_SQRT3)/2,(CGAL_SQRT3-1)/2.), + [](double x) { return P(x,(2 + x + std::sqrt(4 - 8*x + x*x))/(6*x),(-2 + 5*x - x*x + std::sqrt(4 - 8*x + x*x) - x*std::sqrt(4 - 8*x + x*x))/(2*x)); }, + prec), + create_polyline(1./2,4.-2*CGAL_SQRT3, P(1./2,1./2,1.),P(4.-2*CGAL_SQRT3,(CGAL_SQRT3-1)/2.,(1.+1/CGAL_SQRT3)/2), + [](double x) { return P(x,(-2 + 5*x - x*x + std::sqrt(4 - 8*x + x*x) - x*std::sqrt(4 - 8*x + x*x))/(2*x),(2 + x + std::sqrt(4 - 8*x + x*x))/(6*x)); }, + prec), + create_polyline(1./2,4.-2*CGAL_SQRT3, P(1./2,0.,2./3),P(4.-2*CGAL_SQRT3,(CGAL_SQRT3-1)/2.,(1.+1/CGAL_SQRT3)/2), + [](double x) { return P(x,(-2 + 5*x - x*x - std::sqrt(4 - 8*x + x*x) + x*std::sqrt(4 - 8*x + x*x))/(2*x),(2 + x - std::sqrt(4 - 8*x + x*x))/(6*x)); }, + prec), + create_polyline(1./2,1., P(1./2,1.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./(2*x),1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./(2*x)); }, + prec), +}; +} + +//00121324 +// curve 1 : x = [1./2,0.5944], y = (1 - 2*x)/(1 - 3*x + x*x), z = 1/(1 + x) +// curve 2 : x = [0.5944,1], y = x/(1 + x*x), z = 1/(1 + x) +// curve 3 : x = [3/5,1], y =1./2, z = x/(3*x-1) +// curve 4 : x = z/(3*z-1), y = 1./2, z = [3/4,1] +// curve 5 : x = [1./2,0.5944], y = (x*(-2 + 3*x))/(-1 + 2*x*x), z = (x*(-2 + 3*x))/(1 - 5*x + 5*x*x) +// curve 6 : x = -(-3*z + (3*z - 3)*((3*z - 1)/(3*(2*z - 1)) - sqrt(3*z*z - 3*z + 1)/(3*(2*z - 1))) + 2)/z, y = (3*z - 1)/(3*(2*z - 1)) - sqrt(3*z*z - 3*z + 1)/(3*(2*z - 1)), z = ]0,0.6271] +template +std::vector> poly00121324(const int prec = 10) +{ +return { + create_polyline(1./2,0.5944, P(1./2,0.,2./3),P(0.5944,0.4392,0.6271), + [](double x) { return P(x,(1 - 2*x)/(1 - 3*x + x*x),1/(1 + x)); }, + prec), + create_polyline(0.5944,1.,P(0.5944,0.4392,0.6271),P(1.,1./2,1./2), + [](double x) { return P(x,x/(1 + x*x),1/(1 + x)); }, + prec), + create_polyline(3./5,1.,P(3./5,1./2,3./4),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,x/(3*x-1)); }, + prec), + create_polyline(3./4,1.,P(3./5,1./2,3./4),P(1./2,1./2,1.), + [](double z) { return P(z/(3*z-1),1./2,z); }, + prec), + create_polyline(1./2,0.5944, P(1./2,1./2,1.),P(0.5944,0.4392,0.6271), + [](double x) { return P(x,(x*(-2 + 3*x))/(-1 + 2*x*x),(x*(-2 + 3*x))/(1 - 5*x + 5*x*x)); }, + prec), + create_polyline(limit_value(0.,1),0.6271,P(1./2,2./3,0.),P(0.5944,0.4392,0.6271), + [](double z) { return P(-(-3*z + (3*z - 3)*((3*z - 1)/(3*(2*z - 1)) - std::sqrt(3*z*z - 3*z + 1)/(3*(2*z - 1))) + 2)/z,(3*z - 1)/(3*(2*z - 1)) - std::sqrt(3*z*z - 3*z + 1)/(3*(2*z - 1)),z); }, + prec), +}; +} + +//00121340 +// curve 1 : x = -(-5*z*z + 6*z + ((2*z - 1)*(3*z - 2)/(2*(7*z*z - 9*z + 3)) + sqrt(8*z*z*z*z - 20*z*z*z + 25*z*z - 16*z + 4)/(2*(7*z*z - 9*z + 3)))*(7*z*z - 9*z + 3) - 2)/(z*(2*z - 1)), y = (2*z - 1)*(3*z - 2)/(2*(7*z*z - 9*z + 3)) + sqrt(8*z*z*z*z - 20*z*z*z + 25*z*z - 16*z + 4)/(2*(7*z*z - 9*z + 3)), z = ]0,1/2[ +// curve 2 : x = -(-5*z*z + 4*z + (-sqrt(-(z*z + z - 1)*(3*z*z - 5*z + 1))/(2*(7*z*z - 6*z + 1)) + (9*z*z - 7*z + 1)/(2*(7*z*z - 6*z + 1)))*(7*z*z - 6*z + 1) - 1)/(z*(z + 1)), y = -sqrt(-(z*z + z - 1)*(3*z*z - 5*z + 1))/(2*(7*z*z - 6*z + 1)) + (9*z*z - 7*z + 1)/(2*(7*z*z - 6*z + 1)), z = [2/3,1] +// curve 3 : x = [3/8,1/2], y = (-3 - sqrt(-3 + 8*x))/(2*(-3 + 2*x)), z = (-3 + sqrt(-3 + 8*x))/(2*(-3 + 2*x)) +// curve 4 : x = [3/8,1/2], y = (-3 + sqrt(-3 + 8*x))/(2*(-3 + 2*x)), z = (-3 - sqrt(-3 + 8*x))/(2*(-3 + 2*x)) +template +std::vector> poly00121340(const int prec = 10) +{ +return { + create_polyline(limit_value(0.,1.),limit_value(1./2,-1.), P(1./2,2./3,0.),P(1./2,1.,1./2), + [](double z) { return P(-(-5*z*z + 6*z + ((2*z - 1)*(3*z - 2)/(2*(7*z*z - 9*z + 3)) + std::sqrt(8*z*z*z*z - 20*z*z*z + 25*z*z - 16*z + 4)/(2*(7*z*z - 9*z + 3)))*(7*z*z - 9*z + 3) - 2)/(z*(2*z - 1)),(2*z - 1)*(3*z - 2)/(2*(7*z*z - 9*z + 3)) + std::sqrt(8*z*z*z*z - 20*z*z*z + 25*z*z - 16*z + 4)/(2*(7*z*z - 9*z + 3)),z); }, + prec), + create_polyline(2./3,1., P(1./2,0.,2./3),P(1./2,1./2,1.), + [](double z) { return P(-(-5*z*z + 4*z + (-std::sqrt(-(z*z + z - 1)*(3*z*z - 5*z + 1))/(2*(7*z*z - 6*z + 1)) + (9*z*z - 7*z + 1)/(2*(7*z*z - 6*z + 1)))*(7*z*z - 6*z + 1) - 1)/(z*(z + 1)),-std::sqrt(-(z*z + z - 1)*(3*z*z - 5*z + 1))/(2*(7*z*z - 6*z + 1)) + (9*z*z - 7*z + 1)/(2*(7*z*z - 6*z + 1)),z); }, + prec), + create_polyline(3./8,1./2, P(3./8.,2./3,2./3),P(1./2,1.,1./2), + [](double x) { return P(x,(-3 - std::sqrt(-3 + 8*x))/(2*(-3 + 2*x)),(-3 + std::sqrt(-3 + 8*x))/(2*(-3 + 2*x))); }, + prec), + create_polyline(3./8,1./2, P(3./8.,2./3,2./3),P(1./2,1./2,1.), + [](double x) { return P(x,(-3 + std::sqrt(-3 + 8*x))/(2*(-3 + 2*x)),(-3 - std::sqrt(-3 + 8*x))/(2*(-3 + 2*x))); }, + prec), +}; +} + +//00121341 +// curve 1 : x = [1/2,1], y = 1./(x+1), z = (1 - 2*x)/(1 - 4*x + x*x) +// curve 2 : x = [1/2,1], y = (1 - 2*x)/(1 - 4*x + x*x), z = 1./(x+1) +template +std::vector> poly00121341(const int prec = 10) +{ +return { + create_polyline(1./2,1.,P(1./2,2./3,0.),P(1.,1./2,1./2), + [](double x) { return P(x,1./(x+1),(1 - 2*x)/(1 - 4*x + x*x)); }, + prec), + create_polyline(1./2,1.,P(1./2,0.,2./3),P(1.,1./2,1./2), + [](double x) { return P(x,(1 - 2*x)/(1 - 4*x + x*x),1./(x+1)); }, + prec), +}; +} + +//00121342 +// curve 1 : x = [1/3,1/2], y = x/(-1 + 4*x), z = -x/(-1 + x) +// curve 2 : x = [1/2,1/1.73205], y = (1 - 2*x)/(1 - 3*x + x*x), z = 1/(1 + x) +// curve 3 : x = [1/1.73205,1], y = 1/(2 + x), z = 1/(1 + x) +// curve 4 : x = [1/2,1/1.73205], y = (-2 + 3*x)/(-3 + 4*x), z = (-2 + 3*x)/(-1 + x) +// curve 5 : x = (-2*z*z + 5*z + ((3*z*z - 6*z + 2)/(2*(2*z*z - 6*z + 3)) + sqrt(z*z*z*z - 4*z*z*z + 12*z*z - 12*z + 4)/(2*(2*z*z - 6*z + 3)))*(2*z*z - 6*z + 3) - 2)/z, y = (3*z*z - 6*z + 2)/(2*(2*z*z - 6*z + 3)) + sqrt(z*z*z*z - 4*z*z*z + 12*z*z - 12*z + 4)/(2*(2*z*z - 6*z + 3)), z = [0,(3-1.73205)/2] +template +std::vector> poly00121342(const int prec = 10) +{ +return { + create_polyline(1./3,1./2,P(1./3,1.,1./2),P(1./2,1./2,1.), + [](double x) { return P(x,x/(-1 + 4*x),-x/(-1 + x)); }, + prec), + create_polyline(1./2,1/CGAL_SQRT3,P(1./2,0.,2./3),P(1/CGAL_SQRT3,(6-CGAL_SQRT3)/11,(3-CGAL_SQRT3)/2), + [](double x) { return P(x,(1 - 2*x)/(1 - 3*x + x*x),1/(1 + x)); }, + prec), + create_polyline(1./CGAL_SQRT3,1.,P(1/CGAL_SQRT3,(6-CGAL_SQRT3)/11,(3-CGAL_SQRT3)/2),P(1.,1./3,1./2), + [](double x) { return P(x,1/(2 + x),1/(1 + x)); }, + prec), + create_polyline(1./2,1/CGAL_SQRT3,P(1./2,1./2,1.),P(1/CGAL_SQRT3,(6-CGAL_SQRT3)/11,(3-CGAL_SQRT3)/2), + [](double x) { return P(x,(-2 + 3*x)/(-3 + 4*x),(-2 + 3*x)/(-1 + x)); }, + prec), + create_polyline(limit_value(0.,1),(3-CGAL_SQRT3)/2,P(1./2,2./3,0.),P(1/CGAL_SQRT3,(6-CGAL_SQRT3)/11,(3-CGAL_SQRT3)/2), + [](double z) { return P((-2*z*z + 5*z + ((3*z*z - 6*z + 2)/(2*(2*z*z - 6*z + 3)) + std::sqrt(z*z*z*z - 4*z*z*z + 12*z*z - 12*z + 4)/(2*(2*z*z - 6*z + 3)))*(2*z*z - 6*z + 3) - 2)/z,(3*z*z - 6*z + 2)/(2*(2*z*z - 6*z + 3)) + std::sqrt(z*z*z*z - 4*z*z*z + 12*z*z - 12*z + 4)/(2*(2*z*z - 6*z + 3)),z); }, + prec), +}; +} + +//00121344 +// curve 1 : x = [1./2,0.5698], y = 1/(1 + x), z = (1 - 2*x)/(1 - 3*x + x*x) +// curve 2 : x = [0.5698,1], y = 1/(1 + x), z = x/(1 + x) +// curve 3 : x = [1./2,0.5698], y = ((-1 + x)*x)/(1 - 3*x + x*x), z = x/(1 + x) +// curve 4 : x = [0.5698,1], y = x/(1 + x), z = 1/(1 + x) +// curve 5 : x = [1./2,0.5698], y = (1 - 2*x)/(1 - 3*x + x*x), z = 1/(1 + x) +// curve 6 : x = [1./2,0.5698], y = x/(1 + x),((-1 + x)*x)/(1 - 3*x + x*x) +// curve 7 : x = (3*z*z - 3*z + 1)/(2*z*z - 2*z + 1), y = 1-z, z = [0.3629,0.6370] +template +std::vector> poly00121344(const int prec = 10) +{ +return { + create_polyline(1./2,0.5698,P(1./2,2./3,0.),P(0.5698,0.6370,0.3629), + [](double x) { return P(x,1/(1 + x),(1 - 2*x)/(1 - 3*x + x*x)); }, + prec), + create_polyline(0.5698,1.,P(0.5698,0.6370,0.3629),P(1.,1./2,1./2), + [](double x) { return P(x,1/(1 + x),x/(1 + x)); }, + prec), + create_polyline(1./2,0.5698,P(1./2,1.,1./3),P(0.5698,0.6370,0.3629), + [](double x) { return P(x,((-1 + x)*x)/(1 - 3*x + x*x),x/(1 + x)); }, + prec), + create_polyline(0.5698,1.,P(0.5698,0.3629,0.6370),P(1.,1./2,1./2), + [](double x) { return P(x,x/(1 + x),1/(1 + x)); }, + prec), + create_polyline(1./2,0.5698,P(1./2,0.,2./3),P(0.5698,0.3629,0.6370), + [](double x) { return P(x,(1 - 2*x)/(1 - 3*x + x*x),1/(1 + x)); }, + prec), + create_polyline(1./2,0.5698,P(1./2,1./3,1.),P(0.5698,0.3629,0.6370), + [](double x) { return P(x,x/(1 + x),((-1 + x)*x)/(1 - 3*x + x*x)); }, + prec), + create_polyline(0.3629,0.6370,P(0.5698,0.6370,0.3629),P(0.5698,0.3629,0.6370), + [](double z) { return P((3*z*z - 3*z + 1)/(2*z*z - 2*z + 1),1-z,z); }, + prec), +}; +} + +//00122134 +// curve 1 : x = 1/2, y = [0,1], z = (-2 + 3*y)/(-3 + 4 y) +// curve 2 : x = [0,1], y = z = 1/2 +// curve 3 : x = [0,1/2], y = z = 1/(2 - x) +// curve 4 : x = [1/2,1], y = z = 1/(1+ x) +// curve 5 : x = 1/2, y = [1/2,1], z = y/(-1 + 3*y) +// curve 6 : x = 1/2, y = z = [1/2,2/3] + +template +std::vector> poly00122134(const int prec = 10) +{ +return { + create_polyline(0.,1./2,P(1./2,0.,2./3),P(1./2,1./2,1./2), + [](double y) { return P(1./2,y,(-2 + 3*y)/(-3 + 4*y)); }, + prec), + create_polyline(1./2,2./3,P(1./2,1./2,1./2),P(1./2,2./3,0.), + [](double y) { return P(1./2,y,(-2 + 3*y)/(-3 + 4*y)); }, + prec), + create_polyline(0.,1./2,P(0.,1./2,1./2),P(1./2,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(0.,1./2,P(0.,1./2,1./2),P(1./2,2./3,2./3), + [](double x) { return P(x,1/(2 - x),1/(2 - x)); }, + prec), + create_polyline(1./2,1.,P(1./2,2./3,2./3),P(1.,1./2,1./2), + [](double x) { return P(x,1/(1+ x),1/(1 +x)); }, + prec), + create_polyline(2./3,1.,P(1./2,2./3,2./3),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,y/(-1 + 3*y)); }, + prec), + create_polyline(1./2,2./3,P(1./2,1./2,1.),P(1./2,2./3,2./3), + [](double y) { return P(1./2,y,y/(-1 + 3*y)); }, + prec), + create_polyline(1./2,2./3,P(1./2,1./2,1./2),P(1./2,2./3,2./3), + [](double y) { return P(1./2,y,y); }, + prec), +}; +} + +//00122304 +// curve 1 : x = (-3*z*z + 4*z + (-sqrt(3*z*z - 3*z + 1)/(3*(z - 1)) - 1/(3*(z - 1)))*(3*z*z - 6*z + 3) - 2)/(z*(2*z - 1)), y = -sqrt(3*z*z - 3*z + 1)/(3*(z - 1)) - 1/(3*(z - 1)), z = [0,1/2] +// curve 2 : x = [1/2,1], y = (2 - x + sqrt(x)*sqrt(4 - 11*x + 8*x*x))/(2*(1 - x + 2*x*x)), z = (-3*x + sqrt(x)*sqrt(4 - 11*x + 8*x*x))/(2*(1 - 5*x + 2*x*x)) +// curve 3 : x = [1/2,1], y = (2 - x + sqrt(x)*sqrt(4 - 11*x + 8*x*x))/(2*(1 - x + 2*x*x)), z = (-3*x + sqrt(x)*sqrt(4 - 11*x + 8*x*x))/(2*(1 - 5*x + 2*x*x)) +// curve 4 : x = (-z + (2*z - 1)*(-sqrt(12*z*z*z*z - 20*z*z*z + 12*z*z - 4*z + 1)/(2*(2*z*z + z - 1)) + (6*z*z - 2*z - 1)/(2*(z + 1)*(2*z - 1))) + 1)/z, y = -sqrt(12*z*z*z*z - 20*z*z*z + 12*z*z - 4*z + 1)/(2*(2*z*z + z - 1)) + (6*z*z - 2*z - 1)/(2*(z + 1)*(2*z - 1)), z = [2/3,1] +template +std::vector> poly00122304(const int prec = 10) +{ +return { + create_polyline(0.,1./2,P(1./2,2./3,0.),P(1./2,1.,1./2), + [](double z) { return P(-(-3*z*z + 4*z + (-std::sqrt(3*z*z - 3*z + 1)/(3*(z - 1)) - 1/(3*(z - 1)))*(3*z*z - 6*z + 3) - 2)/(z*(2*z - 1)),-std::sqrt(3*z*z - 3*z + 1)/(3*(z - 1)) - 1/(3*(z - 1)),z); }, + prec), + create_polyline(1./2,1.,P(1./2,1.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,(2 - x + std::sqrt(x)*std::sqrt(4 - 11*x + 8*x*x))/(2*(1 - x + 2*x*x)),(-3*x + std::sqrt(x)*std::sqrt(4 - 11*x + 8*x*x))/(2*(1 - 5*x + 2*x*x))); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2,1.),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1/(2*x)); }, + prec), + create_polyline(2./3,1.,P(1./2,0.,2./3),P(1./2,1./2,1.), + [](double z) { return P((-z + (2*z - 1)*(-std::sqrt(12*z*z*z*z - 20*z*z*z + 12*z*z - 4*z + 1)/(2*(2*z*z + z - 1)) + (6*z*z - 2*z - 1)/(2*(z + 1)*(2*z - 1))) + 1)/z,-std::sqrt(12*z*z*z*z - 20*z*z*z + 12*z*z - 4*z + 1)/(2*(2*z*z + z - 1)) + (6*z*z - 2*z - 1)/(2*(z + 1)*(2*z - 1)),z); }, + prec), +}; +} + +//00122314 +// curve 1 : x = [1/2,1], y = (-1 + 2*x)/(-1 + 2*x + x*x), z = 1/(1 + x) +// curve 2 : x = [0,4-21.73205], y = (4 - x - sqrt(4 - 8*x + x*x))/6, z = (-2 + 5*x - x*x + sqrt(4 - 8*x + x*x) - x*sqrt(4 - 8*x + x*x))/(2*x) +// curve 3 : x = [1/2,4-21.73205], y = (4 - x + sqrt(4 - 8*x + x*x))/6, z = (-2 + 5*x - x*x - sqrt(4 - 8*x + x*x) + x*sqrt(4 - 8*x + x*x))/(2*x) +// curve 4 : x = [1/2,1], y = 1/2, z = x/(-1 + 3*x) +// curve 5 : x = [1/2,2/3], y = (-1 + 2*x - x*x)/(-1 + 2*x*x), z = (1 - x)/x +// problem with close polylines, there is an over refinement +template +std::vector> poly00122314(const int prec = 10) +{ +return { + create_polyline(1./2,1.,P(1./2,0.,2./3),P(1.,1./2,1./2), + [](double x) { return P(x,(-1 + 2*x)/(-1 + 2*x + x*x),1/(1 + x)); }, + prec), + create_polyline(0.,4.-2*CGAL_SQRT3,P(0.,1./3,1./2),P(4.-2*CGAL_SQRT3,1/CGAL_SQRT3,(CGAL_SQRT3-1)/2.), + [](double x) { return P(x,(4 - x - std::sqrt(4 - 8*x + x*x))/6,(-2 + 5*x - x*x + std::sqrt(4 - 8*x + x*x) - x*std::sqrt(4 - 8*x + x*x))/(2*x) ); }, + prec), + create_polyline(1./2,4.-2*CGAL_SQRT3,P(1./2,2./3,0.),P(4.-2*CGAL_SQRT3,1/CGAL_SQRT3,(CGAL_SQRT3-1)/2.), + [](double x) { return P(x,(4 - x + std::sqrt(4 - 8*x + x*x))/6,(-2 + 5*x - x*x - std::sqrt(4 - 8*x + x*x) + x*std::sqrt(4 - 8*x + x*x))/(2*x) ); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2,1.),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,x/(-1 + 3*x)); }, + prec), + create_polyline(1./2,2./3,P(1./2,1./2,1.),P(2./3,1.,1./2), + [](double x) { return P(x,(-1 + 2*x - x*x)/(-1 + 2*x*x),(1 - x)/x); }, + prec), +}; +} + +//00122324 +// curve 1 : x = [0,1/2], y = 1/(2 - x), z = (1 - 2*x)/(3 - 5*x + x*x) +// curve 2 : x = [1/2,1], y = (-1 + 2*x)/(x*(1 + x)), z = 1/(1 + x) +// curve 3 : x = [2/3,1], y = 1/2, z = x/(2*(-1 + 2*x) +template +std::vector> poly00122324(const int prec = 10) +{ +return { + create_polyline(0.,1./2,P(0.,1./2,1./3),P(1./2,2./3,0.), + [](double x) { return P(x,1/(2 - x),(1 - 2*x)/(3 - 5*x + x*x)); }, + prec), + create_polyline(1./2,1.,P(1./2,0.,2./3),P(1.,1./2,1./2), + [](double x) { return P(x,(-1 + 2*x)/(x*(1 + x)),1/(1 + x)); }, + prec), + create_polyline(2./3,1.,P(2./3,1./2,1.),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,x/(2*(-1 + 2*x))); }, + prec), + +}; +} + +//00122334 +// curve 1 : x = [1/2,1], y = x/(-1 + 3*x), z = (x*x)/(1 - 3*x + 4*x*x) +// curve 2 : x = [1/3,1/2], y = (1 - 3*x + 3*x*x)/(2 - 6*x + 5*x*x), z = (1 - 3*x + 3*x*x)/(2 - 5*x + 4*x*x) +// curve 3 : x = [1/3,1/2], y = 1/(2 - x), z = (1 - 2*x)/(2 - 4*x + x*x) +// curve 4 : x = [0,1/3], y = 1/(2 - x), z = 1/(2 + x) +// curve 5 : x = [1/3,1/2], y = (-1 + 2*x)/(-1 + x + x*x), z = x/(1 - x + x*x) +// curve 6 : x = [0,1], y = z = 1/2 +template +std::vector> poly00122334(const int prec = 10) +{ +return { + create_polyline(1./2,1.,P(1./2,1.,1/2.),P(1.,1./2,1./2), + [](double x) { return P(x,x/(-1 + 3*x),(x*x)/(1 - 3*x + 4*x*x)); }, + prec), + create_polyline(1./3,1./2,P(1./3,3./5,3./7),P(1./2,1.,1/2.), + [](double x) { return P(x,(1 - 3*x + 3*x*x)/(2 - 6*x + 5*x*x),(1 - 3*x + 3*x*x)/(2 - 5*x + 4*x*x)); }, + prec), + create_polyline(1./3,1./2,P(1./3,3./5,3./7),P(1./2,2./3,0.), + [](double x) { return P(x,1/(2 - x),(1 - 2*x)/(2 - 4*x + x*x)); }, + prec), + create_polyline(0.,1./3,P(0.,1./2,1./2),P(1./3,3./5,3./7), + [](double x) { return P(x,1/(2 - x),1/(2 + x)); }, + prec), + create_polyline(1./3,(3.-CGAL_SQRT5)/2,P(1./3,3./5,3./7),P((3.-CGAL_SQRT5)/2,1./2,1./2), + [](double x) { return P(x,(-1 + 2*x)/(-1 + x + x*x),x/(1 - x + x*x)); }, + prec), + create_polyline((3.-CGAL_SQRT5)/2,1./2,P((3.-CGAL_SQRT5)/2,1./2,1./2),P(1./2,0.,2./3), + [](double x) { return P(x,(-1 + 2*x)/(-1 + x + x*x),x/(1 - x + x*x)); }, + prec), + create_polyline(0.,(3.-CGAL_SQRT5)/2,P(0.,1./2,1./2),P((3.-CGAL_SQRT5)/2,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline((3.-CGAL_SQRT5)/2,1.,P((3.-CGAL_SQRT5)/2,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), +}; +} + +//00122344 +// curve 1 : x = [1./2,(std::sqrt(5)-1.)/2], y = x/(1 + x), z = (x*x)/(-1 + 2*x + x*x) +// curve 2 : x = [(3.-std::sqrt(5))/2,1./2], y = (-1 + x)*(-1+x)/(2 - 4*x + x*x), z = (-1 + x)/(-2 + x) +// curve 3 : x = [1./2,(std::sqrt(5)-1.)/2], y = (-1 + 2*x)/(-1 + 2*x + x*x), z = 1/(1 + x) +// curve 4 : x = [(std::sqrt(5)-1.)/2,1], y = x/(1 + x), z = 1/(1 + x) +// curve 5 : x = [0.,(3.-std::sqrt(5))/2], y = 1/(2 - x), z = (-1 + x)/(-2 + x) +// curve 6 : x = [3.-std::sqrt(5))/2,1./2], y = 1/(2 - x), z = (1 - 2*x)/(2 - 4*x + x*x) +// curve 7 : x = [0,1], y = z = 1/2 +// curve 8 : x = z, y = 1-z, z = [(3.-std::sqrt(5))/2,(std::sqrt(5)-1.)/2] +template +std::vector> poly00122344(const int prec = 10) +{ +return { + create_polyline(1./2,(CGAL_SQRT5-1.)/2,P(1./2,1./3,1.),P((CGAL_SQRT5-1.)/2,(3.-CGAL_SQRT5)/2,(CGAL_SQRT5-1.)/2), + [](double x) { return P(x,x/(1 + x),(x*x)/(-1 + 2*x + x*x)); }, + prec), + create_polyline((3.-CGAL_SQRT5)/2,1./2,P((3.-CGAL_SQRT5)/2,(CGAL_SQRT5-1.)/2,(3.-CGAL_SQRT5)/2),P(1./2,1.,1./3), + [](double x) { return P(x,(-1 + x)*(-1+x)/(2 - 4*x + x*x),(-1 + x)/(-2 + x)); }, + prec), + create_polyline(1./2,(CGAL_SQRT5-1.)/2,P(1./2,0.,2./3),P((CGAL_SQRT5-1.)/2,(3.-CGAL_SQRT5)/2,(CGAL_SQRT5-1.)/2), + [](double x) { return P(x,(-1 + 2*x)/(-1 + 2*x + x*x),1/(1 + x)); }, + prec), + create_polyline((CGAL_SQRT5-1.)/2,1.,P((CGAL_SQRT5-1.)/2,(3.-CGAL_SQRT5)/2,(CGAL_SQRT5-1.)/2),P(1.,1./2,1./2), + [](double x) { return P(x,x/(1 + x),1/(1 + x)); }, + prec), + create_polyline(0.,(3.-CGAL_SQRT5)/2,P(0.,1./2,1./2),P((3.-CGAL_SQRT5)/2,(CGAL_SQRT5-1.)/2,(3.-CGAL_SQRT5)/2), + [](double x) { return P(x,1/(2 - x),(-1 + x)/(-2 + x)); }, + prec), + create_polyline((3.-CGAL_SQRT5)/2,1./2,P((3.-CGAL_SQRT5)/2,(CGAL_SQRT5-1.)/2,(3.-CGAL_SQRT5)/2),P(1./2,2./3,0.), + [](double x) { return P(x,1/(2 - x),(1 - 2*x)/(2 - 4*x + x*x)); }, + prec), + create_polyline(0.,1./2,P(0.,1./2,1./2),P(1./2,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline((3.-CGAL_SQRT5)/2,1./2,P((3.-CGAL_SQRT5)/2,(CGAL_SQRT5-1.)/2,(3.-CGAL_SQRT5)/2),P(1./2,1./2,1./2), + [](double z) { return P(z,1-z,z); }, + prec), + create_polyline(1./2,(CGAL_SQRT5-1.)/2,P(1./2,1./2,1./2),P((CGAL_SQRT5-1.)/2,(3.-CGAL_SQRT5)/2,(CGAL_SQRT5-1.)/2), + [](double z) { return P(z,1-z,z); }, + prec), +}; +} + +//00123400 +// curve 1 : x = 1/2, y = [2/3,1], z = (-2 + 3*y)/(-2 + 5*y) +// curve 2 : x = 1/2, y = [0,1/3], z = (2*(-1 + y))/(-3 + 5*y +template +std::vector> poly00123400(const int prec = 10) +{ +return { + create_polyline(2./3,1.,P(1./2,2./3,0.),P(1./2,1.,1./3), + [](double y) { return P(1./2,y,(-2 + 3*y)/(-2 + 5*y)); }, + prec), + create_polyline(0.,1./3,P(1./2,0.,2./3),P(1./2,1./3,1.), + [](double y) { return P(1./2,y,(2*(-1 + y))/(-3 + 5*y)); }, + prec), +}; +} + +//00123401 +// curve 1 : x = [1/2,1], y = x/(1 - 2*x + 3*x*x), z = (-1 + 2*x)/(-1 + 3*x) +// curve 2 : x = [1/2,1], y = (4*x - x*x - sqrt(x)*sqrt(-4 + 12*x - 8*x*x + x*x*x))/(2*(1 + x)), z = (-2 + 2*x + x*x + sqrt(x)*sqrt(-4 + 12*x - 8*x*x + x*x*x))/(2*(-1 + 3*x*x)) +// curve 3 : X = 1/2, y = [0,1/2], z = (2*(-1 + y))/(-3 + 4*y) +template +std::vector> poly00123401(const int prec = 10) +{ +return { + create_polyline(1./2,1.,P(1./2,2./3,0.),P(1.,1./2,1./2), + [](double x) { return P(x,x/(1 - 2*x + 3*x*x),(-1 + 2*x)/(-1 + 3*x)); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2,1.),P(1.,1./2,1./2), + [](double x) { return P(x,(4*x - x*x - std::sqrt(x)*std::sqrt(-4 + 12*x - 8*x*x + x*x*x))/(2*(1 + x)),(-2 + 2*x + x*x + std::sqrt(x)*std::sqrt(-4 + 12*x - 8*x*x + x*x*x))/(2*(-1 + 3*x*x))); }, + prec), + create_polyline(0.,1./2,P(1./2,0.,2./3),P(1./2,1./2,1.), + [](double y) { return P(1./2,y,(2*(-1 + y))/(-3 + 4*y)); }, + prec), +}; +} + +//00123414 +// curve 1 : x = [(std::sqrt(5)-1)/2,2./3], y = (1 - 2*x)/(-1 + x), z = (-1 + 2*x)/x +// curve 2 : x = [1/2,(std::sqrt(5)-1)/2], y = 1/(1 + x), z = (-1 + 2*x)/x +// curve 3 : x = [(std::sqrt(5)-1)/2,1], y = 1/(1+x), z = 1/(2+x) +// curve 4 : x = [(3-std::sqrt(5))/2,1./2], y = (-1 + 2*x)/(-1 + x), z = 1/(2 - x) +// curve 5 : x = [0.,(3-std::sqrt(5))/2], y = 1/(3-x), z = 1/(2 - x) +// curve 6 : x = y = 1-z, z = [(3-std::sqrt(5))/2,(std::sqrt(5)-1)/2] +// curve 7 : x = [1./3,(3-std::sqrt(5))/2], y = (-1 + 2*x)/(-1 + x), z = (1 - 2*x)/x +template +std::vector> poly00123414(const int prec = 10) +{ +return { + create_polyline((CGAL_SQRT5-1)/2,2./3,P((CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2,(3-CGAL_SQRT5)/2),P(2./3,1.,1./2), + [](double x) { return P(x,(1 - 2*x)/(-1 + x),(-1 + 2*x)/x); }, + prec), + create_polyline(1./2,(CGAL_SQRT5-1)/2,P(1./2,2./3,0.),P((CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2,(3-CGAL_SQRT5)/2), + [](double x) { return P(x,1/(1 + x),(-1 + 2*x)/x); }, + prec), + create_polyline((CGAL_SQRT5-1)/2,1.,P((CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2,(3-CGAL_SQRT5)/2),P(1.,1./2,1./3), + [](double x) { return P(x,1/(1+x),1/(2+x)); }, + prec), + create_polyline((3-CGAL_SQRT5)/2,1./2,P((3-CGAL_SQRT5)/2,(3-CGAL_SQRT5)/2,(CGAL_SQRT5-1)/2),P(1./2,0.,2./3), + [](double x) { return P(x,(-1 + 2*x)/(-1 + x),1/(2 - x)); }, + prec), + create_polyline(0.,(3-CGAL_SQRT5)/2,P(0.,1./3,1./2),P((3-CGAL_SQRT5)/2,(3-CGAL_SQRT5)/2,(CGAL_SQRT5-1)/2), + [](double x) { return P(x,1/(3-x),1/(2 - x)); }, + prec), + create_polyline((3-CGAL_SQRT5)/2,(CGAL_SQRT5-1)/2,P((CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2,(3-CGAL_SQRT5)/2),P((3-CGAL_SQRT5)/2,(3-CGAL_SQRT5)/2,(CGAL_SQRT5-1)/2), + [](double z) { return P(1-z,1-z,z); }, + prec), + create_polyline(1./3,(3-CGAL_SQRT5)/2,P(1./3,1./2,1.),P((3-CGAL_SQRT5)/2,(3-CGAL_SQRT5)/2,(CGAL_SQRT5-1)/2), + [](double x) { return P(x,(-1 + 2*x)/(-1 + x),(1 - 2*x)/x); }, + prec), +}; +} + +//00123421 +// curve 1 : x = 1/2, y = [2/5,1/2], z = y/(1-y) +// curve 2 : x = 1/2, y = [0,2/5], z = 2/3 +// curve 3 : x = [1/2,1], y = 1/(3 - x), z = 1/(1 + x) +// curve 4 : x = [0,1/2], y = 1/(2 + x), z = 1/(2- x) +// curve 5 : x = [0,1], y = z = 1/2 +// curve 6 : x = 1/2, y = [2/5,2/3], z = (-2 + 3*y)/(2*(-1 + y)) +// curve 7 : x = 1/2, y = [1/2,1], z = 1/2 +template +std::vector> poly00123421(const int prec = 10) +{ +return { + create_polyline(2./5,1./2,P(1./2,2./5,2./3),P(1./2,1./2,1.), + [](double y) { return P(1./2,y,y/(1-y)); }, + prec), + create_polyline(0.,2./5,P(1./2,0.,2./3),P(1./2,2./5,2./3), + [](double y) { return P(1./2,y,2./3); }, + prec), + create_polyline(1./2,1.,P(1./2,2./5,2./3),P(1.,1./2,1./2), + [](double x) { return P(x,1/(3 - x),1/(1 + x)); }, + prec), + create_polyline(0.,1./2,P(0.,1./2,1./2),P(1./2,2./5,2./3), + [](double x) { return P(x,1/(2 + x),1/(2- x)); }, + prec), + create_polyline(0.,1./2,P(0.,1./2,1./2),P(1./2,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(2./5,1./2,P(1./2,2./5,2./3),P(1./2,1./2,1./2), + [](double y) { return P(1./2,y,(-2 + 3*y)/(2*(-1 + y))); }, + prec), + create_polyline(1./2,2./3,P(1./2,1./2,1./2),P(1./2,2./3,0.), + [](double y) { return P(1./2,y,(-2 + 3*y)/(2*(-1 + y))); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2,1./2),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), +}; +} + +//00123423 +// curve 1 : x = [0,1/2], y = 1/(2 - x), z = (-1 + 2*x)/(-2 + 3*x) +// curve 2 : x = [1/2,1], y = (-1 + 2*x)/(-1 + 3*x), z = 1/(1 + x) +// curve 3 : x = [0,1], y = z = 1/2 +template +std::vector> poly00123423(const int prec = 10) +{ +return { + create_polyline(0.,1./2,P(0.,1./2,1./2),P(1./2,2./3,0.), + [](double x) { return P(x,1/(2 - x),(-1 + 2*x)/(-2 + 3*x)); }, + prec), + create_polyline(1./2,1.,P(1./2,0.,2./3),P(1.,1./2,1./2), + [](double x) { return P(x,(-1 + 2*x)/(-1 + 3*x),1/(1 + x)); }, + prec), + create_polyline(0.,1.,P(0.,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), +}; +} + +//01101234 +// curve 1 : x = 1/2, y = [1/2,1], z = 1/2y +// curve 2 : x = [1/2,1], y = 1/2, z = 1/2x +// curve 3 : x = ]1/2,1], y = (-2 + 4*x - x*x + sqrt(x)*sqrt(-4 + 16*x - 20*x*x + 9*x*x*x))/(2*(-1 + x + 2*x*x)), z = (-2 + 2*x + 3*x*x - sqrt(x)*sqrt(-4 + 16*x - 20*x*x + 9*x*x*x))/(2*(-1 - x + 4*x*x)) +template +std::vector> poly01101234(const int prec = 10) +{ +return { + create_polyline(1./2,1.,P(1./2,1./2,1.),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1./(2*y)); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2,1.),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./(2*x)); }, + prec), + create_polyline(limit_value(1./2,1.),1.,P(1./2,1.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,(-2 + 4*x - x*x + std::sqrt(x)*std::sqrt(-4 + 16*x - 20*x*x + 9*x*x*x))/(2*(-1 + x + 2*x*x)),(-2 + 2*x + 3*x*x - std::sqrt(x)*std::sqrt(-4 + 16*x - 20*x*x + 9*x*x*x))/(2*(-1 - x + 4*x*x)) ); }, + prec), +}; +} + +//01102334 +// curve 1 : x = [0,1], y = z = 1/2 +// curve 2 : x = 1/2, y = [0,1], z = 1/2 +// curve 3 : x = [1/2,1], y = x/(-1 + 3*x), z = (-1 + 3*x - x*x)/(-1 + 3*x) +// curve 4 : x = [0,1/2], y = (-1 + 2*x)/(-2 + 3*x), z = (-1 + x + x*x)/(-2 + 3*x) +template +std::vector> poly01102334(const int prec = 10) +{ +return { + create_polyline(1./2,1.,P(1./2,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(0.,1./2,P(0.,1./2,1./2),P(1./2,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(0.,1./2,P(1./2,1./2,0.),P(1./2,1./2,1./2), + [](double z) { return P(1./2,1./2,z); }, + prec), + create_polyline(0.,1./2,P(1./2,0.,1./2),P(1./2,1./2,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2,1./2),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(1./2,1.,P(1./2,1.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,x/(-1 + 3*x),(-1 + 3*x - x*x)/(-1 + 3*x)); }, + prec), + create_polyline(0.,1./2,P(0.,1./2,1./2),P(1./2,0.,1./2), + [](double x) { return P(x,(-1 + 2*x)/(-2 + 3*x),(-1 + x + x*x)/(-2 + 3*x)); }, + prec), +}; +} + +//01121234 +// curve 1 : x = 1/2, y = [1/2,1], z = 1/2y +// curve 2 : x = [1/2,4/7], y = (3*x - sqrt(-x (-4 + 7*x)))/(2*(-1 + 4*x)), z = (3*x + sqrt(-x*(-4 + 7*x)))/(2*(-1 + 4*x)) +// curve 3 : x = [1/2,4/7], y = (3*x + sqrt(-x (-4 + 7*x)))/(2*(-1 + 4*x)), z = (3*x - sqrt(-x*(-4 + 7*x)))/(2*(-1 + 4*x)) +template +std::vector> poly01121234(const int prec = 10) +{ +return { + create_polyline(1./2,1.,P(1./2,1./2,1.),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1./(2*y)); }, + prec), + create_polyline(1./2,4./7,P(1./2,1./2,1.),P(4./7,2./3,2./3), + [](double x) { return P(x,(3*x - std::sqrt(-x*(-4 + 7*x)))/(2*(-1 + 4*x)),(3*x + std::sqrt(-x*(-4 + 7*x)))/(2*(-1 + 4*x))); }, + prec), + create_polyline(1./2,4./7,P(1./2,1.,1./2),P(4./7,2./3,2./3), + [](double x) { return P(x,(3*x + std::sqrt(-x*(-4 + 7*x)))/(2*(-1 + 4*x)),(3*x - std::sqrt(-x*(-4 + 7*x)))/(2*(-1 + 4*x))); }, + prec), +}; +} + +//01121340 +// curve 1 : x = ]1/2,1], y = (2 - 3*x + 2*x*x + sqrt(-x*(-4 + 15*x - 20*x*x + 8*x*x*x)))/(2*(1 - 2*x + 3*x*x)), z = (2 - 7*x + 8*x*x - sqrt(-x*(-4 + 15*x - 20*x*x + 8*x*x*x)))/(2*(1 - 5*x + 6*x*x)) +// curve 2 : x = ]1/2,1], y = (2 - 7*x + 8*x*x - sqrt(-x*(-4 + 15*x - 20*x*x + 8*x*x*x)))/(2*(1 - 5*x + 6*x*x)), z = (2 - 3*x + 2*x*x + sqrt(-x*(-4 + 15*x - 20*x*x + 8*x*x*x)))/(2*(1 - 2*x + 3*x*x)) +// curve 3 : x = [0.45016,1/2], y = (3 - 7*x + 5*x*x - sqrt(-3 + 14*x - 21*x*x + 10*x*x*x + x*x*x*x))/(2*(3 - 8*x + 6*x*x)), z = (3 - 7*x + 5*x*x + sqrt(-3 + 14*x - 21*x*x + 10*x*x*x + x*x*x*x))/(2*(3 - 8*x + 6*x*x)) +// curve 4 : x = [(0.45016,1./2], y = (3 - 7*x + 5*x*x + sqrt(-3 + 14*x - 21*x*x + 10*x*x*x + x*x*x*x))/(2*(3 - 8*x + 6*x*x)), z = (3 - 7*x + 5*x*x - sqrt(-3 + 14*x - 21*x*x + 10*x*x*x + x*x*x*x))/(2*(3 - 8*x + 6*x*x)) +template +std::vector> poly01121340(const int prec = 10) +{ +return { + create_polyline(limit_value(1./2,1.),1.,P(1./2,1.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,(2 - 3*x + 2*x*x + std::sqrt(-x*(-4 + 15*x - 20*x*x + 8*x*x*x)))/(2*(1 - 2*x + 3*x*x)),(2 - 7*x + 8*x*x - std::sqrt(-x*(-4 + 15*x - 20*x*x + 8*x*x*x)))/(2*(1 - 5*x + 6*x*x))); }, + prec), + create_polyline(limit_value(1./2,1.),1.,P(1./2,1./2,1.),P(1.,1./2,1./2), + [](double x) { return P(x,(2 - 7*x + 8*x*x - std::sqrt(-x*(-4 + 15*x - 20*x*x + 8*x*x*x)))/(2*(1 - 5*x + 6*x*x)),(2 - 3*x + 2*x*x + std::sqrt(-x*(-4 + 15*x - 20*x*x + 8*x*x*x)))/(2*(1 - 2*x + 3*x*x))); }, + prec), + create_polyline(0.45016,1./2,P(0.45016,0.702631,0.700106),P(1./2,1./2,1.), + [](double x) { return P(x,(3 - 7*x + 5*x*x - std::sqrt(-3 + 14*x - 21*x*x + 10*x*x*x + x*x*x*x))/(2*(3 - 8*x + 6*x*x)),(3 - 7*x + 5*x*x + std::sqrt(-3 + 14*x - 21*x*x + 10*x*x*x + x*x*x*x))/(2*(3 - 8*x + 6*x*x))); }, + prec), + create_polyline(0.45016,1./2,P(0.45016,0.702631,0.700106),P(1./2,1.,1./2), + [](double x) { return P(x,(3 - 7*x + 5*x*x + std::sqrt(-3 + 14*x - 21*x*x + 10*x*x*x + x*x*x*x))/(2*(3 - 8*x + 6*x*x)),(3 - 7*x + 5*x*x - std::sqrt(-3 + 14*x - 21*x*x + 10*x*x*x + x*x*x*x))/(2*(3 - 8*x + 6*x*x))); }, + prec), +}; +} + +//01121341 +// no curves +// +template +std::vector> poly01121341(const int /*prec*/ = 10) +{ +return { + + +}; +} + +//01122034 +// curve 1 : x = [0,1], y = z = 1/2 +// curve 2 : x = -(-3*z*z + 2*z + (3*z/(2*(4*z - 1)) - sqrt(-z*(7*z - 4))/(2*(4*z - 1)))*(4*z*z - 5*z + 1))/(2*z*z - 2*z + 1), y = 3*z/(2*(4*z - 1)) - sqrt(-z*(7*z - 4))/(2*(4*z - 1)), z = [4/7,1/2] +// curve 3 : x = -(-3*z*z + 2*z + (3*z/(2*(4*z - 1)) + sqrt(-z*(7*z - 4))/(2*(4*z - 1)))*(4*z*z - 5*z + 1))/(2*z*z - 2*z + 1), y = 3*z/(2*(4*z - 1)) + sqrt(-z*(7*z - 4))/(2*(4*z - 1)), z = [4/7,1/2] +// curve 4 : x = 1/2, y = [0,1/2], z = y/(-1 + 3*y) +// curve 5: x = -(z*z/(4*z*z - 3*z + 1) - 1)*(4*z*z - 3*z + 1)/(5*z*z - 4*z + 1), y = z*z/(4*z*z - 3*z + 1), z = [1/2,1] +// problem with close polylines, there is an over refinement +template +std::vector> poly01122034(const int prec = 10) +{ +return { + create_polyline(0.,1.,P(0.,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,4./7,P(0.,1./2,1./2),P(2./5,2./3,4./7), + [](double z) { return P(-(-3*z*z + 2*z + (3*z/(2*(4*z - 1)) - std::sqrt(-z*(7*z - 4))/(2*(4*z - 1)))*(4*z*z - 5*z + 1))/(2*z*z - 2*z + 1), 3*z/(2*(4*z - 1)) - std::sqrt(-z*(7*z - 4))/(2*(4*z - 1)),z); }, + prec), + create_polyline(1./2,4./7,P(1./2,1.,1./2),P(2./5,2./3,4./7), + [](double z) { return P(-(-3*z*z+ 2*z + (3*z/(2*(4*z - 1)) + std::sqrt(-z*(7*z - 4))/(2*(4*z - 1)))*(4*z*z - 5*z + 1))/(2*z*z - 2*z + 1),3*z/(2*(4*z - 1)) + std::sqrt(-z*(7*z - 4))/(2*(4*z - 1)),z); }, + prec), + create_polyline(1/2.,1.,P(1/2.,1./2,1.),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,y/(-1 + 3*y)); }, + prec), + create_polyline(1./2,1.,P(1.,1./2,1./2),P(1./2,1./2,1.), + [](double z) { return P(-(z*z/(4*z*z - 3*z + 1) - 1)*(4*z*z - 3*z + 1)/(5*z*z - 4*z + 1), z*z/(4*z*z - 3*z + 1),z); }, + prec), +}; +} + +//01122334 +// curve 1 : x = [0,1], y = z = 1/2 +// curve 2 : x = 1/2, y = [0,1], z = 1/2 +// curve 3 : x = [0,1/2], y = (-1 + 2*x)/(-2 + 3*x), z = (1 - 3*x + 3*x*x)/(2 - 5*x + 4*x*x) +// curve 4 : x = [0,1/2], x'=1-x, y = (-1 + 2*x)/(-2 + 3*x), z = (1 - 3*x + 3*x*x)/(2 - 5*x + 4*x*x) +template +std::vector> poly01122334(const int prec = 10) +{ +return { + create_polyline(0.,1./2,P(0.,1./2,1./2),P(1./2,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,1.,P(1./2.,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(0.,1./2,P(1./2,0.,1./2),P(1./2,1./2,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2.,1./2),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(0.,1./2,P(0.,1./2,1./2),P(1./2,0.,1./2), + [](double x) { return P(x,(-1 + 2*x)/(-2 + 3*x),(1 - 3*x + 3*x*x)/(2 - 5*x + 4*x*x)); }, + prec), + create_polyline(0.,1./2,P(1.,1./2,1./2),P(1./2,1.,1./2), + [](double x) { return P(1-x,1-(-1 + 2*x)/(-2 + 3*x),1-(1 - 3*x + 3*x*x)/(2 - 5*x + 4*x*x)); }, + prec), +}; +} + +//01122340 +// curve 1 : x = [0,1], y = z = 1/2 +// curve 2 : x = 1/2, y = [0,1], z = 1/2 +// curve 3 : x = [0.,0.36299], y = (-1 + 4*x - sqrt(1 - 4*x*x))/(2*(-2 + 5*x)), z = (1 - x + 2*x*x + sqrt(1 - 4*x*x) - x*sqrt(1 - 4*x*x))/(2*(2 - 3*x + 2*x*x)) +// curve 4 : x = [0.36299,1./2], y = (1 - 3*x + 3*x*x)/(2 - 6*x + 5*x*x), z = (1 - 2*x + x*x)/(2 - 5*x + 4*x*x) +// curve 5 : x = [0.,0.36299], x'=1-x, y = 1-(-1 + 4*x - sqrt(1 - 4*x*x))/(2*(-2 + 5*x)), z = (1 - x + 2*x*x + sqrt(1 - 4*x*x) - x*sqrt(1 - 4*x*x))/(2*(2 - 3*x + 2*x*x)) +// curve 6 : x = [0.36299,1./2], x'= 1-x, y = 1-(1 - 3*x + 3*x*x)/(2 - 6*x + 5*x*x), z = (1 - 2*x + x*x)/(2 - 5*x + 4*x*x) +// curve 7 : x = [0.36299,1./2], y = 1-x, z = -x/(-1 + x) +// curve 8 : x = [1./2,1-0.36299], y = 1-x,(1 - x)/x +// curve 9 : x = [0.36299,1-0.36299], y = 1-x, z = (1 - 3*x + 3*x*x)/(1 - 2*x + 2*x*x) +// problem with close polylines, there is an over refinement +template +std::vector> poly01122340(const int prec = 10) +{ +return { + create_polyline(0.,1./2,P(0.,1./2,1./2),P(1./2,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,1.,P(1./2.,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(0.,1./2,P(1./2,0.,1./2),P(1./2,1./2,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2.,1./2),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(0.,0.36299,P(0.,1./2,1./2),P(0.36299,0.637,0.569841), + [](double x) { return P(x,(-1 + 4*x - std::sqrt(1 - 4*x*x))/(2*(-2 + 5*x)),(1 - x + 2*x*x + std::sqrt(1 - 4*x*x) - x*std::sqrt(1 - 4*x*x))/(2*(2 - 3*x + 2*x*x))); }, + prec), + create_polyline(0.36299,1./2,P(0.36299,0.637,0.569841),P(1./2,1.,1./2), + [](double x) { return P(x,(1 - 3*x + 3*x*x)/(2 - 6*x + 5*x*x),(1 - 2*x + x*x)/(2 - 5*x + 4*x*x)); }, + prec), + create_polyline(0.,0.36299,P(1.,1./2,1./2),P(1-0.36299,1-0.637,0.569841), + [](double x) { return P(1-x,1-(-1 + 4*x - std::sqrt(1 - 4*x*x))/(2*(-2 + 5*x)),(1 - x + 2*x*x + std::sqrt(1 - 4*x*x) - x*std::sqrt(1 - 4*x*x))/(2*(2 - 3*x + 2*x*x))); }, + prec), + create_polyline(0.36299,1./2,P(1-0.36299,1-0.637,0.569841),P(1./2,0.,1./2), + [](double x) { return P(1-x,1-(1 - 3*x + 3*x*x)/(2 - 6*x + 5*x*x),(1 - 2*x + x*x)/(2 - 5*x + 4*x*x)); }, + prec), + create_polyline(0.36299,1./2,P(0.36299,0.637,0.569841),P(1./2,1./2,1.), + [](double x) { return P(x,1-x,-x/(-1 + x)); }, + prec), + create_polyline(1./2,1-0.36299,P(1./2,1./2,1.),P(1-0.36299,1-0.637,0.569841), + [](double x) { return P(x,1-x,(1 - x)/x); }, + prec), + create_polyline(0.36299,1./2,P(0.36299,0.637,0.569841),P(1./2,1./2,1./2), + [](double x) { return P(x,1-x,(1 - 3*x + 3*x*x)/(1 - 2*x + 2*x*x)); }, + prec), + create_polyline(1./2,1-0.36299,P(1./2,1./2,1./2),P(1-0.36299,1-0.637,0.569841), + [](double x) { return P(x,1-x,(1 - 3*x + 3*x*x)/(1 - 2*x + 2*x*x)); }, + prec), +}; +} + +//01123024 +// curve 1 : x = [0,1], y = z = 1./2 +// curve 2 : x = [1/2,1], y = (-1 + 3*x - x*x)/(-1 + 3*x), z = x/(-1 + 3*x) +// curve 3 : x = [0,1], y = (-1 + 2*x - x*x)/(-2 + 3*x), z = (-1 + x)/(-2 + 3*x) +template +std::vector> poly01123024(const int prec = 10) +{ +return { + create_polyline(0.,1.,P(0.,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2,1.),P(1.,1./2,1./2), + [](double x) { return P(x,(-1 + 3*x - x*x)/(-1 + 3*x),x/(-1 + 3*x)); }, + prec), + create_polyline(0.,1./2,P(0.,1./2,1./2),P(1./2,1./2,1.), + [](double x) { return P(x,(-1 + 2*x - x*x)/(-2 + 3*x),(-1 + x)/(-2 + 3*x)); }, + prec), +}; +} + +//01233214 +// curve 1 : x = [0,1], y = z = 1/2 +// curve 2 : x = 1/2, y = [0,1], z = 1/2 +// curve 3 : x = y = 1/2, z = [0,1] +// curve 4 : x = [(std::sqrt(5)-1)/2,1], y = z = 1/(1 + x) +// curve 5 : x = [1./2,(std::sqrt(5)-1)/2], y = (1 - x)/x, z = x +// curve 6 : x = [0.,(3-std::sqrt(5))/2], y = z = (-1 + x)/(-2 + x) +// curve 7 : x = [(3-std::sqrt(5))/2,1./2], y = (-1 + 2*x)/(-1 + x), z = x +// curve 8 : x = y = z = [(3-std::sqrt(5))/2,(std::sqrt(5)-1)/2] +// curve 9 : x = y = [(3-std::sqrt(5))/2,1./2], z = (-1 + 2*x)/(-1 + x) +// curve 10 : x = y = [1./2,(std::sqrt(5)-1)/2], z = (1-x)/x +template +std::vector> poly01233214(const int prec = 10) +{ +return { + create_polyline(0.,1./2,P(0.,1./2,1./2),P(1./2,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,1.,P(1./2.,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(0.,1./2,P(1./2,0.,1./2),P(1./2,1./2,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2.,1./2),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(0.,1./2,P(1./2,1./2,0.),P(1./2,1./2,1./2), + [](double z) { return P(1./2,1./2,z); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2.,1./2),P(1./2,1./2,1.), + [](double z) { return P(1./2,1./2,z); }, + prec), + create_polyline((CGAL_SQRT5-1)/2,1.,P((CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2),P(1.,1./2,1./2), + [](double x) { return P(x,1/(1 + x),1/(1 + x)); }, + prec), + create_polyline(1./2,(CGAL_SQRT5-1)/2,P(1./2.,1.,1./2),P((CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2), + [](double x) { return P(x,(1 - x)/x,x); }, + prec), + create_polyline(0.,(3-CGAL_SQRT5)/2,P(0.,1./2,1./2),P((3-CGAL_SQRT5)/2,(3-CGAL_SQRT5)/2,(3-CGAL_SQRT5)/2), + [](double x) { return P(x,(-1 + x)/(-2 + x),(-1 + x)/(-2 + x)); }, + prec), + create_polyline((3-CGAL_SQRT5)/2,1./2,P((3-CGAL_SQRT5)/2,(3-CGAL_SQRT5)/2,(3-CGAL_SQRT5)/2),P(1./2.,0.,1./2), + [](double x) { return P(x,(-1 + 2*x)/(-1 + x),x); }, + prec), + create_polyline((3-CGAL_SQRT5)/2,1./2,P((3-CGAL_SQRT5)/2,(3-CGAL_SQRT5)/2,(3-CGAL_SQRT5)/2),P(1./2,1./2,1./2), + [](double x) { return P(x,x,x); }, + prec), + create_polyline

    (1./2,(CGAL_SQRT5-1)/2,P(1./2.,1./2,1./2),P((CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2), + [](double x) { return P(x,x,x); }, + prec), + create_polyline((3-CGAL_SQRT5)/2,1./2,P((3-CGAL_SQRT5)/2,(3-CGAL_SQRT5)/2,(3-CGAL_SQRT5)/2),P(1./2,1./2,0.), + [](double x) { return P(x,x,(-1 + 2*x)/(-1 + x)); }, + prec), + create_polyline(1./2,(CGAL_SQRT5-1)/2,P(1./2.,1./2,1.),P((CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2), + [](double x) { return P(x,x,(1 - x)/x); }, + prec), +}; +} + +//00012345 +// curve 1 : x = [0,1/2], y = 1/2x, z = 1/2 +// curve 2 : x = y = 1/2, z = [3/4,1] +// curve 3 : x = [1/2,1], y = 1/2, z = 1 -x/2 +// curve 4 : x = 1/2, y = [1/2,1], z = 1 -y/2 +// curve 5 : x = 1/2, y = [0,1/2], z = (-2 + y)/(-3 + 2*y) +// curve 6 : x = [0,1/2], y =1/2, z = (-2 + x)/(-3 + 2*x) +template +std::vector> poly00012345(const int prec = 10) +{ +return { + create_polyline(3./4,1., P(1./2,1./2,3./4),P(1./2,1./2,1.), + [](double z) { return P(1./2,1./2,z); }, + prec), + create_polyline(1./2,1., P(1./2,1.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./(2*x),1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,3./4),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1.-x/2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,3./4),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1.-y/2); }, + prec), + create_polyline(0.,1./2, P(1./2,0.,2./3),P(1./2,1./2,3./4), + [](double y) { return P(1./2,y,(-2 + y)/(-3 + 2*y)); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,2./3),P(1./2,1./2,3./4), + [](double x) { return P(x,1./2,(-2 + x)/(-3 + 2*x)); }, + prec), +}; +} + +//00112345 +// curve 1 : x = 1/2, y = [0,1], z = 2/3 +// curve 2 : x = y = 1/2, z = [2/3,1] +// curve 2 : x = [0,1/2],y = 1/2, z = 1/(2-x) +// curve 3 : x' = [0,1/2], x = 1-x', y = 1/2, z = 1/(2-x') +template +std::vector> poly00112345(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,1./2,2./3), + [](double x) { return P(x,1./2,1./(2-x)); }, + prec), + create_polyline(0.,1./2, P(1.,1./2,1./2),P(1./2,1./2,2./3), + [](double x) { return P(1-x,1./2,1./(2-x)); }, + prec), + create_polyline(0.,1./2, P(1./2,0.,2./3),P(1./2,1./2,2./3), + [](double y) { return P(1./2,y,2./3); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,2./3),P(1./2,1.,2./3), + [](double y) { return P(1./2,y,2./3); }, + prec), + create_polyline(2./3,1., P(1./2,1./2,2./3),P(1./2,1./2,1.), + [](double z) { return P(1./2,1./2,z); }, + prec), +}; +} + +//00121345 +// curve 1 : x = 1/2, y = [1/2,1], z = y/(-1 + 3*y) +// curve 2 : x = [1/2,(std::sqrt(5)-1.)/2], y = 1./2, z = (1 - x)/x +// curve 3 : x = [1/2,(std::sqrt(5)-1.)/2], y = (1 - 2*x)/(1 - 3*x + x*x), z = 1./(x+1) +// curve 4 : x = [(std::sqrt(5)-1.)/2,1], y = 1./2, z = 1./(x+1) +// curve 5 : x = [(std::sqrt(5)-1.)/2,1], y = 1./(x+1), z = 1./2 +// curve 6 : x = [1./2,(std::sqrt(5)-1.)/2], y = 1./(x+1), z = (1 - 2*x)/(1 - 3*x + x*x +// curve 7 : x = [1./2,(std::sqrt(5)-1.)/2], y = (1 - x)/x, z = 1./2 +// curve 8 : x = [(9-4.12310)/8,(std::sqrt(5)-1.)/2[, y = -sqrt(-x*(4*x*x - 9*x + 4))/(2*(x*x - x - 1)) + (x - 2)/(2*(x*x - x - 1)), z = -(-x + (-sqrt(-x*(4*x*x - 9*x + 4))/(2*(x*x - x - 1)) + (x - 2)/(2*(x*x - x - 1)))*(x*x - x - 1) + 2)/(x*x - x - 1) +// curve 8 : x = [(9-4.12310)/8,(std::sqrt(5)-1.)/2[, y = sqrt(-x*(4*x*x - 9*x + 4))/(2*(x*x - x - 1)) + (x - 2)/(2*(x*x - x - 1)), z = -(-x + (sqrt(-x*(4*x*x - 9*x + 4))/(2*(x*x - x - 1)) + (x - 2)/(2*(x*x - x - 1)))*(x*x - x - 1) + 2)/(x*x - x - 1) +template +std::vector> poly00121345(const int prec = 10) +{ +return { + create_polyline(1./2,1., P(1./2,1./2,1.),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,y/(-1 + 3*y) ); }, + prec), + create_polyline(1./2,(CGAL_SQRT5-1.)/2, P(1./2,1./2,1.),P((CGAL_SQRT5-1.)/2,1./2,(CGAL_SQRT5-1.)/2), + [](double x) { return P(x,1./2,(1 - x)/x) ; }, + prec), + create_polyline(1./2,(CGAL_SQRT5-1.)/2, P(1./2,0.,2./3),P((CGAL_SQRT5-1)/2,1./2,(CGAL_SQRT5-1)/2), + [](double x) { return P(x,(1 - 2*x)/(1 - 3*x + x*x),1./(x+1)) ; }, + prec), + create_polyline((CGAL_SQRT5-1.)/2,1.,P((CGAL_SQRT5-1.)/2,1./2,(CGAL_SQRT5-1.)/2), P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./(x+1)) ; }, + prec), + create_polyline((CGAL_SQRT5-1.)/2,1.,P((CGAL_SQRT5-1.)/2,(CGAL_SQRT5-1.)/2,1./2), P(1.,1./2,1./2), + [](double x) { return P(x,1./(x+1),1./2) ; }, + prec), + create_polyline(1./2,(CGAL_SQRT5-1.)/2, P(1./2,2./3,0.),P((CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2,1./2), + [](double x) { return P(x,1./(x+1),(1 - 2*x)/(1 - 3*x + x*x)) ; }, + prec), + create_polyline(1./2,(CGAL_SQRT5-1.)/2, P(1./2,1.,1./2),P((CGAL_SQRT5-1.)/2,(CGAL_SQRT5-1)/2,1./2), + [](double x) { return P(x,(1 - x)/x,1./2) ; }, + prec), + create_polyline((9-CGAL_SQRT17)/8.,limit_value((CGAL_SQRT5-1.)/2,-1),P((9-CGAL_SQRT17)/8.,(CGAL_SQRT17-3)/2.,(CGAL_SQRT17-3)/2.), P((CGAL_SQRT5-1)/2,(CGAL_SQRT5-1)/2,1./2), + [](double x) { return P(x,-std::sqrt(-x*(4*x*x - 9*x + 4))/(2*(x*x - x - 1)) + (x - 2)/(2*(x*x - x - 1)),-(-x + (-std::sqrt(-x*(4*x*x - 9*x + 4))/(2*(x*x - x - 1)) + (x - 2)/(2*(x*x - x - 1)))*(x*x - x - 1) + 2)/(x*x - x - 1)) ; }, + prec), + create_polyline((9-CGAL_SQRT17)/8.,limit_value((CGAL_SQRT5-1.)/2,-1),P((9-CGAL_SQRT17)/8.,(CGAL_SQRT17-3)/2.,(CGAL_SQRT17-3)/2.), P((CGAL_SQRT5-1)/2,1./2,(CGAL_SQRT5-1)/2), + [](double x) { return P(x,std::sqrt(-x*(4*x*x - 9*x + 4))/(2*(x*x - x - 1)) + (x - 2)/(2*(x*x - x - 1)),-(-x + (std::sqrt(-x*(4*x*x - 9*x + 4))/(2*(x*x - x - 1)) + (x - 2)/(2*(x*x - x - 1)))*(x*x - x - 1) + 2)/(x*x - x - 1)) ; }, + prec), +}; +} + +//00122345 +// curve 1 : x = [0,1/2], y = 1./(2-x), z = (1 - 2*x)/(2 - 4*x + x*x) +// curve 2 : x = [1/2,1], y = (-1 + 2*x)/(-1 + 2*x + x*x), z = 1./(1+x) +// curve 3 : x = [1/2,1], y = 1./2, z = x/(-1 + 3*x) +// curve 4 : x = 1/2, y = [1/2,1], z = y/(-1 + 3*y) +// curve 5 : x = [0,1/2], y = (-1 + x)/(-2 + 3*x), z = 1./2 +// problem with close polylines, there is an over refinement +template +std::vector> poly00122345(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,2./3,0.), + [](double x) { return P(x,1./(2-x),(1 - 2*x)/(2 - 4*x + x*x)); }, + prec), + create_polyline(1./2,1., P(1./2,0.,2./3),P(1.,1./2,1./2), + [](double x) { return P(x,(-1 + 2*x)/(-1 + 2*x + x*x),1./(1+x)); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,x/(-1 + 3*x)); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,y/(-1 + 3*y)); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,1.,1./2), + [](double x) { return P(x,(-1 + x)/(-2 + 3*x),1./2); }, + prec), +}; +} + +//00123405 +// curve 1 : x = 1/2, y = [2/3,1], z = (-2 + 3*y)/(2*(-1 + 2*y)) +// curve 2 : x = [1/2,1], y = 1./(2*x), z = 1./2 +// curve 3 : x = [1/2,1], y = 1./2, z = 1./(2*x) +// curve 4 : x = 1/2, y = [0,1/2], z = (2*(-1 + y))/(-3 + 4*y) +template +std::vector> poly00123405(const int prec = 10) +{ +return { + create_polyline(2./3.,1., P(1./2,2./3,0.),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,(-2 + 3*y)/(2*(-1 + 2*y))); }, + prec), + create_polyline(1./2.,1., P(1./2,1.,1./2.),P(1.,1./2,1./2), + [](double x) { return P(x,1./(2*x),1./2); }, + prec), + create_polyline(1./2.,1., P(1./2,1./2.,1.),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./(2*x)); }, + prec), + create_polyline(0.,1./2, P(1./2,0.,2./3),P(1./2,1./2,1.), + [](double y) { return P(1./2,y,(2*(-1 + y))/(-3 + 4*y)); }, + prec), +}; +} + +//00123415 +// curve 1 : x = 1/2, y = [0,2/5], z = 2/3 +// curve 2 : x = [0,1/2], y = 1./(3-x), z = 1./(2-x) +// curve 3 : x = [1./2,(std::sqrt(5)-1)/2], y = -x/(-1 - x + x*x), z = 1./(x+1) +// curve 4 : x = [(std::sqrt(5)-1)/2.,1], y = 1./2, z = 1./(x+1) +// curve 5 : x = [(std::sqrt(5)-1)/2.,2./3], y = (1 - 2*x)/(1. - 3*x + x*x), z = (1. - x)/x +// curve 6 : x = [2/3,1], y = 1./(x+1), z = 1./2 +// curve 7 : x = [1/2,2/3], y = 1./(x+1), z = (2*x-1.)/x +// curve 8 : x = 2/3, y = [3/5,1], z = 1/2 +// curve 9 : x = [1/2,(std::sqrt(5)-1)/2], y = 1/2, z = (1. - x)/x +// curve 10 : x = 1/2, y = [2/5,1/2], z = y/(1.-y) +template +std::vector> poly00123415(const int prec = 10) +{ +return { + create_polyline(0.,2./5, P(1./2,0.,2./3),P(1./2,2./5,2./3), + [](double y) { return P(1./2,y,2./3); }, + prec), + create_polyline(0.,1./2, P(0.,1./3,1./2),P(1./2,2./5,2./3), + [](double x) { return P(x,1./(3-x),1./(2-x)); }, + prec), + create_polyline(1./2,(CGAL_SQRT5-1)/2., P(1./2,2./5,2./3),P((CGAL_SQRT5-1)/2.,1./2,(CGAL_SQRT5-1)/2.), + [](double x) { return P(x,-x/(-1 - x + x*x),1./(x+1)); }, + prec), + create_polyline((CGAL_SQRT5-1)/2.,1., P((CGAL_SQRT5-1)/2.,1./2,(CGAL_SQRT5-1)/2.),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./(x+1)); }, + prec), + create_polyline((CGAL_SQRT5-1)/2.,2./3, P((CGAL_SQRT5-1)/2.,1./2,(CGAL_SQRT5-1)/2.),P(2./3,3./5,1./2), + [](double x) { return P(x,(1 - 2*x)/(1. - 3*x + x*x),(1. - x)/x); }, + prec), + create_polyline(2./3,1., P(2./3,3./5,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./(x+1),1./2); }, + prec), + create_polyline(1./2,2./3,P(1./2,2./3,0.), P(2./3,3./5,1./2), + [](double x) { return P(x,1./(x+1),(2*x-1.)/x); }, + prec), + create_polyline(3./5,1., P(2./3,3./5,1./2),P(2./3,1.,1./2), + [](double y) { return P(2./3,y,1./2); }, + prec), + create_polyline(1./2.,(CGAL_SQRT5-1)/2., P(1./2,1./2,1.), P((CGAL_SQRT5-1)/2.,1./2,(CGAL_SQRT5-1)/2.), + [](double x) { return P(x,1./2,(1. - x)/x); }, + prec), + create_polyline(2./5,1./2, P(1./2,2./5,2./3),P(1./2,1./2,1.), + [](double y) { return P(1./2,y,y/(1.-y)); }, + prec), +}; +} + +//00123425 +// curve 1 : x = 1/2, y = [0,2/5], z = 2/3 +// curve 2 : x = [1/2,1], y = x/(1.+x*x), z = 1./(x+1) +// curve 3 : x = [0,1/2], y = 1/(2 + x), z = 1/(2 - x) +// curve 4 : x = [0,1/2], y = 1/(2 - x), z = (-1 + 2*x)/(-2 + 3*x) +// curve 5 : x = [1/2,1], y = 1/2, z = x/(-1 + 3*x) +// curve 6 : x = 1/2, y = [2/5,1/2], z = y/(1.-y) +// problem with close polylines, there is an over refinement + +template +std::vector> poly00123425(const int prec = 10) +{ +return { + create_polyline(0.,2./5, P(1./2,0.,2./3),P(1./2,2./5,2./3), + [](double y) { return P(1./2,y,2./3); }, + prec), + create_polyline(1./2,1., P(1./2,2./5,2./3),P(1.,1./2,1./2), + [](double x) { return P(x,x/(1.+x*x),1./(x+1)); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,2./5,2./3), + [](double x) { return P(x,1/(2 + x),1/(2 - x)); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,2./3,0.), + [](double x) { return P(x,1/(2 - x),(-1 + 2*x)/(-2 + 3*x)); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,x/(-1 + 3*x)); }, + prec), + create_polyline(2./5,1./2, P(1./2,2./5,2./3),P(1./2,1./2,1.), + [](double y) { return P(1./2,y,y/(1.-y)); }, + prec), +}; +} + +//00123455 +// curve 1 : x = 1./2, y = [2/3,1], z = 1./3 +// curve 2 : x = 1./2, y = [0,1/3], z = 2./3 +// curve 3 : x = 1./2, y = 1./3, z = [2/3,1] +// curve 4 : x = 1./2, y = 2./3, z = [0,1/3] +// curve 5 : x = [1/2,1], y = 1./(1+x), z = x/(1.+x) +// curve 6 : x = 1-x',1./(1+x'),x'/(1.+x'), x' = [1/2,1] +// curve 7 : x = 1-x', 1 - 1./(1+x'),1 - x'/(1.+x'), x' = [1/2,1] +// curve 8 : x = [1/2,1], y = 1 - 1./(1+x), z = 1 - x/(1.+x) +template +std::vector> poly00123455(const int prec = 10) +{ +return { + create_polyline(2./3.,1., P(1./2,2./3,1./3),P(1./2,1.,1./3), + [](double y) { return P(1./2,y,1./3); }, + prec), + create_polyline(0.,1./3., P(1./2,0.,2./3),P(1./2,1./3,2./3), + [](double y) { return P(1./2,y,2./3); }, + prec), + create_polyline(2./3.,1., P(1./2,1./3,2./3),P(1./2,1./3,1.), + [](double z) { return P(1./2,1./3,z); }, + prec), + create_polyline(0.,1./3., P(1./2,2./3,0.),P(1./2,2./3,1./3), + [](double z) { return P(1./2,2./3,z); }, + prec), + create_polyline(1/2.,1., P(1./2,2./3,1./3),P(1.,1./2,1./2), + [](double x) { return P(x,1./(1+x),x/(1.+x)); }, + prec), + create_polyline(1/2.,1., P(1./2,2./3,1./3),P(0.,1./2,1./2), + [](double x) { return P(1-x,1./(1+x),x/(1.+x)); }, + prec), + create_polyline(1/2.,1., P(1./2,1./3,2./3),P(0.,1./2,1./2), + [](double x) { return P(1-x,1-1./(1+x),1- x/(1.+x)); }, + prec), + create_polyline(1/2.,1., P(1./2,1./3,2./3),P(1.,1./2,1./2), + [](double x) { return P(x,1- 1./(1+x),1- x/(1.+x)); }, + prec), +}; +} + +//01102345 +// curve 1 : x = y = 1/2, z = [0,1] +// curve 2 : x = 1./2, y = [0,1/2], z = 1./(2-y) +// curve 3 : x = [0,1/2], y = 1/2, z = 1./(2-x) +// curve 4 : x = 1./2, y = 1-y', z = 1./(2-y'), y' = [0,1/2] +// curve 5 : x = 1-x', y = 1/2, z = 1./(2-x'), x' = [0,1/2] +template +std::vector> poly01102345(const int prec = 10) +{ +return { + create_polyline(0.,2./3., P(1./2,1./2,0.),P(1./2,1./2,2./3), + [](double z) { return P(1./2,1./2,z); }, + prec), + create_polyline(2./3.,1., P(1./2,1./2,2./3.),P(1./2,1./2,1.), + [](double z) { return P(1./2,1./2,z); }, + prec), + create_polyline(0.,1./2, P(1./2,0.,1./2),P(1./2,1./2,2./3), + [](double y) { return P(1./2,y,1./(2-y)); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,1./2,2./3), + [](double x) { return P(x,1./2,1./(2-x)); }, + prec), + create_polyline(0.,1./2, P(1./2,1.,1./2),P(1./2,1./2,2./3), + [](double y) { return P(1./2,1-y,1./(2-y)); }, + prec), + create_polyline(0.,1./2, P(1.,1./2,1./2),P(1./2,1./2,2./3), + [](double x) { return P(1-x,1./2,1./(2-x)); }, + prec), +}; +} + +//01121345 +// curve 1 : x = [1/2,1], y = 1/2x, z = 1/2 +// curve 2 : x = [1/2,1], y = 1/2, z = 1/2x +// curve 3 : x = 1/2, y = [1/2,1], z = 1/2y +template +std::vector> poly01121345(const int prec = 10) +{ +return { + create_polyline(1./2,1., P(1./2,1.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./(2*x),1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./(2*x)); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1./(2*y)); }, + prec), +}; +} + +//01122345 +// curve 1 : x = [1/2,1], y = (x*(-1 + 2*x))/(1 - 4*x + 5*x*x), z = x*x/(1 - 3*x + 4*x*x) +// curve 2 : x = (x'*(-1 + 2*x'))/(1 - 4*x' + 5*x'*x'),y = x',z = x'*x'/(1 - 3*x' + 4*x'*x'), x'= [1/2,1] +// curve 3 : x = 1./2,y = [1/2,1], z = y/(-1 + 3*y) +// curve 4 : x = [1/2,1], y = 1./2, z = x/(-1 + 3*x) +// curve 5 : x = [0,1/2], y = (-1 + 2*x)/(-2 + 3*x), z = (1 - 3*x + 3*x*x)/(2 - 5*x + 4*x*x) +// problem with close polylines, there is an over refinement +template +std::vector> poly01122345(const int prec = 10) +{ +return { + create_polyline(1./2,1., P(1./2,0.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,(x*(-1 + 2*x))/(1 - 4*x + 5*x*x),x*x/(1 - 3*x + 4*x*x)); }, + prec), + create_polyline(1./2,1.,P(0.,1./2,1./2), P(1./2,1.,1./2), + [](double x) { return P((x*(-1 + 2*x))/(1 - 4*x + 5*x*x),x,x*x/(1 - 3*x + 4*x*x)); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,y/(-1 + 3*y)); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,x/(-1 + 3*x)); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,0.,1./2), + [](double x) { return P(x,(-1 + 2*x)/(-2 + 3*x),(1 - 3*x + 3*x*x)/(2 - 5*x + 4*x*x)); }, + prec), +}; +} + +//01123045 +// curve 1 : x = [0,1/2], y = 1/2, z = (-1 + x)/(-2 + 3*x) +// curve 2 : x = 1/2, y = [1/2,(std::sqrt(5)-1.)/2], z = (1 - y)/y +// curve 3 : x = (2*z*z - 3*z + 1)/(5*z*z - 5*z + 1), y = (-z*z + 2*z - 1)/(2*z*z - 1), z = [1/2,(std::sqrt(5)-1.)/2] +// curve 4 : x = [(std::sqrt(5)-1.)/2,1], y = (-2 + 5*x - sqrt(4 - 8*x + 5*x*x))/(2*(-3 + 5*x)), z = (-2 + 4*x - x*x + x*sqrt(4 - 8*x + 5*x*x))/(2*(-1 + 2*x + x*x)) +// curve 5 : x =[1/2,1], y = x/(-1 + 3*x), z = 1./2 +// curve 6 : x = 1/2, y = [(std::sqrt(5)-1.)/2,1], z = 1./(y+1) +// problem with close polylines, there is an over refinement +template +std::vector> poly01123045(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,1./2,1.), + [](double x) { return P(x,1./2,(-1 + x)/(-2 + 3*x)); }, + prec), + create_polyline(1./2,(CGAL_SQRT5-1.)/2, P(1./2,1./2,1.),P(1./2,(CGAL_SQRT5-1.)/2,(CGAL_SQRT5-1.)/2), + [](double y) { return P(1./2,y,(1 - y)/y); }, + prec), + create_polyline(1./2,(CGAL_SQRT5-1.)/2, P(0.,1./2,1./2),P(1./2,(CGAL_SQRT5-1.)/2,(CGAL_SQRT5-1.)/2), + [](double z) { return P((2*z*z - 3*z + 1)/(5*z*z - 5*z + 1),(-z*z + 2*z - 1)/(2*z*z - 1),z); }, + prec), + create_polyline((CGAL_SQRT5-1.)/2,1.,P(1./2,(CGAL_SQRT5-1.)/2,(CGAL_SQRT5-1.)/2), P(1.,1./2,1./2), + [](double x) { return P(x,(-2 + 5*x - std::sqrt(4 - 8*x + 5*x*x))/(2*(-3 + 5*x)),(-2 + 4*x - x*x + x*std::sqrt(4 - 8*x + 5*x*x))/(2*(-1 + 2*x + x*x)) ); }, + prec), + create_polyline(1./2,1., P(1./2,1.,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,x/(-1 + 3*x),1./2); }, + prec), + create_polyline((CGAL_SQRT5-1.)/2,1., P(1./2,(CGAL_SQRT5-1.)/2,(CGAL_SQRT5-1.)/2),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1./(y+1)); }, + prec), +}; +} + +//01123445 +// curve 1 : x= [0,1/2], y = (-1 + 2*x)/(-2 + 3*x), z = 1./2 +// curve 2 : x = 1- x', y = 1- (-1 + 2*x')/(-2 + 3*x'), z = 1./2, x' = [0,1/2] +template +std::vector> poly01123445(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,0.,1./2), + [](double x) { return P(x,(-1 + 2*x)/(-2 + 3*x),1./2); }, + prec), + create_polyline(0.,1./2, P(1.,1./2,1./2),P(1./2,1.,1./2), + [](double x) { return P(1-x,1-(-1 + 2*x)/(-2 + 3*x),1./2); }, + prec), + +}; +} + +//01123453 +// curve 1 : x = [0,1/2], y = (-1 + 2*x)/(-2 + 3*x), z = (-1 + 2*x - x*x)/(-2 + 3*x) +// curve 2 : x = 1-x', y = 1-(-1 + 2*x')/(-2 + 3*x'), z = (-1 + 2*x' - x'*x')/(-2 + 3*x'), x'= [0,1/2] +// curve 3 : x = 1-x', y = (-1 + 2*x')/(-2 + 3*x'), z = 1-(-1 + 2*x' - x'*x')/(-2 + 3*x'), x'= [0,1/2] +// curve 4 : x = x', y = 1-(-1 + 2*x')/(-2 + 3*x'), z = 1-(-1 + 2*x' - x'*x')/(-2 + 3*x'), x'= [0,1/2] +template +std::vector> poly01123453(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,0.,1./2), + [](double x) { return P(x,(-1 + 2*x)/(-2 + 3*x),(-1 + 2*x - x*x)/(-2 + 3*x)); }, + prec), + create_polyline(0.,1./2, P(1.,1./2,1./2),P(1./2,1.,1./2), + [](double x) { return P(1-x,1-(-1 + 2*x)/(-2 + 3*x),(-1 + 2*x - x*x)/(-2 + 3*x)); }, + prec), + create_polyline(0.,1./2, P(1.,1./2,1./2),P(1./2,0.,1./2), + [](double x) { return P(1-x,(-1 + 2*x)/(-2 + 3*x),1-(-1 + 2*x - x*x)/(-2 + 3*x)); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,1.,1./2), + [](double x) { return P(x,1-(-1 + 2*x)/(-2 + 3*x),1-(-1 + 2*x - x*x)/(-2 + 3*x)); }, + prec), +}; +} + +//01233245 +// curve 1 : x = 1./2, y = (2*z - 1)/(3*z - 2), z = [0,1/2] +// curve 2 : x = 1./2, y = 1-(2*z' - 1)/(3*z' - 2), z = 1-z', z' = [0,1/2] +// curve 3 : x = (z*z + z*(3*z - 2) - 4*z + 2)/(2*(z - 1)*(z-1)), y = z, z = [1/3,1/2] +// curve 4 : x = 1-(z'*z' + z'*(3*z' - 2) - 4*z' + 2)/(2*(z' - 1)*(z'-1)), y = z', z = z' = [1/3,1/2] +// curve 5 : x = 1-(z'*z' + z'*(3*z' - 2) - 4*z' + 2)/(2*(z' - 1)*(z'-1)), y = 1-z', z = 1-z', z' = [1/3,1/2] +// curve 6 : x = (z'*z' + z'*(3*z' - 2) - 4*z' + 2)/(2*(z' - 1)*(z'-1)), y = 1-z', z = 1-z', z' = [1/3,1/2] +// curve 7 : x = 1./2, y = z = [1/3,2/3] +template +std::vector> poly01233245(const int prec = 10) +{ +return { + create_polyline(0.,1./3, P(1./2,1./2,0.),P(1./2,1./3,1./3), + [](double z) { return P(1./2, (2*z - 1)/(3*z - 2),z); }, + prec), + create_polyline(1./3,1./2, P(1./2,1./3,1./3),P(1./2,0.,1./2), + [](double z) { return P(1./2, (2*z - 1)/(3*z - 2),z); }, + prec), + create_polyline(1/3.,1./2, P(1./2,2/3.,2./3),P(1./2,1.,1./2), + [](double z) { return P(1./2, 1-(2*z - 1)/(3*z - 2),1-z); }, + prec), + create_polyline(0.,1./3, P(1./2,1./2,1.),P(1./2,2/3.,2./3), + [](double z) { return P(1./2, 1-(2*z - 1)/(3*z - 2),1-z); }, + prec), + create_polyline(1./3,1./2, P(1./2,1./3,1./3),P(0.,1./2,1./2), + [](double z) { return P( (z*z + z*(3*z - 2) - 4*z + 2)/(2*(z - 1)*(z-1)),z,z); }, + prec), + create_polyline(1./3,1./2, P(1./2,1./3,1./3),P(1.,1./2,1./2), + [](double z) { return P( 1-(z*z + z*(3*z - 2) - 4*z + 2)/(2*(z - 1)*(z-1)),z,z); }, + prec), + create_polyline(1./3,1./2, P(1./2,2./3,2./3),P(1.,1./2,1./2), + [](double z) { return P( 1-(z*z + z*(3*z - 2) - 4*z + 2)/(2*(z - 1)*(z-1)),1-z,1-z); }, + prec), + create_polyline(1./3,1./2, P(1./2,2./3,2./3),P(0.,1./2,1./2), + [](double z) { return P( (z*z + z*(3*z - 2) - 4*z + 2)/(2*(z - 1)*(z-1)),1-z,1-z); }, + prec), + create_polyline(1./3,2./3, P(1./2,1./3,1./3),P(1./2,2./3,2./3), + [](double z) { return P(1./2,z,z); }, + prec), +}; +} + +//00123456 +// curve 1 : x = [0,1/2], y = 1./2, z = 1./(2-x) +// curve 2 : x' = [0,1/2], x = 1-x y = 1./2, z = 1./(2-x') +// curve 3 : x = [0,1/2], y = 1./(2-x), z = 1./2 +// curve 4 : x' = [0,1/2], x = 1-x, y = 1./(2-x), z = 1./2 +// curve 5 : x = 1./2, y = 2./3, z = [0,1/2] +// curve 6 : x = 1./2, y = [0,1/2], z = 2./3 +// curve 7 : x = 1./2, y = [2/3,1], z = 1./2 +// curve 8 : x = 1./2, y = 1./2, z = [2/3,1] +// curve 9 : x = 1./2, y = [1/2,2/3], z = (2*(-1 + y))/(-2 + y) +template +std::vector> poly00123456(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,1./2,2./3), + [](double x) { return P(x,1./2,1./(2-x)); }, + prec), + create_polyline(0.,1./2, P(1.,1./2,1./2),P(1./2,1./2,2./3), + [](double x) { return P(1-x,1./2,1./(2-x)); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,2./3,1./2), + [](double x) { return P(x,1./(2-x),1./2); }, + prec), + create_polyline(0.,1./2, P(1.,1./2,1./2),P(1./2,2./3,1./2), + [](double x) { return P(1-x,1./(2-x),1./2); }, + prec), + create_polyline(0.,1./2, P(1./2,2./3,0.),P(1./2,2./3,1./2), + [](double z) { return P(1./2,2./3,z); }, + prec), + create_polyline(0.,1./2, P(1./2,0.,2./3),P(1./2,1./2,2./3), + [](double y) { return P(1./2,y,2./3); }, + prec), + create_polyline(2./3,1., P(1./2,2/3.,1./2),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(2./3,1., P(1./2,1./2,2/3.),P(1./2,1./2,1.), + [](double z) { return P(1./2,1./2,z); }, + prec), + create_polyline(1./2,2./3, P(1./2,1./2,2/3.),P(1./2,2./3,1./2), + [](double y) { return P(1./2,y,(2*(-1 + y))/(-2 + y)); }, + prec), +}; +} + +//01123456 +// curve 1 : x = [0,1/2], y = 1./2, z = 1./(2-x) +// curve 2 : x = 1-x', y = 1./2, z = 1./(2-x'), x' = [0,1/2] +// curve 3 : x = 1./2, y = [1/2,1], z = 1./(1+y) +// curve 4 : x = 1./2, y = 1-y', z = 1./(1+y'), y' = [1/2,1] +// curve 5 : x = [0,1/2], y = (-1 + 2*x)/(-2 + 3*x), z = 1./2 +// curve 6 : x = 1-x', y = 1-(-1 + 2*x')/(-2 + 3*x'), z = 1./2 +// curve 7 : x = 1./2, y = 1./2, z = [2/3,1] +template +std::vector> poly01123456(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,1./2,2./3), + [](double x) { return P(x,1./2,1./(2-x)); }, + prec), + create_polyline(0.,1./2, P(1.,1./2,1./2),P(1./2,1./2,2./3), + [](double x) { return P(1-x,1./2,1./(2-x)); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2,2./3),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1./(1+y)); }, + prec), + create_polyline(1./2,1.,P(1./2,1./2,2./3),P(1./2,0.,1./2), + [](double y) { return P(1./2,1-y,1./(1+y)); }, + prec), + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,0.,1./2), + [](double x) { return P(x,(-1 + 2*x)/(-2 + 3*x),1./2); }, + prec), + create_polyline(0.,1./2, P(1.,1./2,1./2),P(1./2,1.,1./2), + [](double x) { return P(1-x,1-(-1 + 2*x)/(-2 + 3*x),1./2); }, + prec), + create_polyline(2./3,1., P(1./2,1./2,2./3),P(1./2,1./2,1.), + [](double z) { return P(1./2,1./2,z); }, + prec), +}; +} + +//01233456 +// curve 1 : x = [0,1/2], y = (-1 + x)/(-2 + 3*x), z = 1./2 +// curve 2 : x = 1-x', y = 1-(-1 + x')/(-2 + 3*x'), z = 1./2, x' = [0,1/2] +// curve 3 : x = [1/2,1], y = 1./2, z = x/(-1 + 3*x) +// curve 4 : x = 1-x',1./2,1-(x'/(-1 + 3*x')), x'= [1/2,1] +// curve 5 : x = 1./2, y = [1/2,1], z = y/(3*y-1) +// curve 6 : x = 1./2, y = 1-y', z = 1 -(y'/(3*y'-1)), y'= [1/2,1] +template +std::vector> poly01233456(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,1.,1./2), + [](double x) { return P(x,(-1 + x)/(-2 + 3*x),1./2); }, + prec), + create_polyline(0.,1./2, P(1.,1./2,1./2),P(1./2,0.,1./2), + [](double x) { return P(1-x,1-(-1 + x)/(-2 + 3*x),1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1.,1./2.,1./2), + [](double x) { return P(x,1./2,x/(-1 + 3*x)); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,0.),P(0.,1./2.,1./2), + [](double x) { return P(1-x,1./2,1-(x/(-1 + 3*x))); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1.),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,y/(3*y-1)); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,0.),P(1./2,0.,1./2), + [](double y) { return P(1./2,1-y,1 -(y/(3*y-1))); }, + prec), +}; +} + +//01234567 +// curve 1 : x =[0,1], y = z = 1/2 +// curve 2 : y =[0,1], x = z = 1/2 +// curve 3 : z =[0,1], y = x = 1/2 +template +std::vector> poly01234567(const int prec = 10) +{ +return { + create_polyline(0.,1./2, P(0.,1./2,1./2),P(1./2,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1./2),P(1.,1./2,1./2), + [](double x) { return P(x,1./2,1./2); }, + prec), + create_polyline(0.,1./2, P(1./2,0.,1./2),P(1./2,1./2,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1./2),P(1./2,1.,1./2), + [](double y) { return P(1./2,y,1./2); }, + prec), + create_polyline(0.,1./2, P(1./2,1./2,0.),P(1./2,1./2,1./2), + [](double z) { return P(1./2,1./2,z); }, + prec), + create_polyline(1./2,1., P(1./2,1./2,1./2),P(1./2,1./2,1.), + [](double z) { return P(1./2,1./2,z); }, + prec), + + +}; +} + +// Cube (begin definition) +using Cube = std::array; + +inline constexpr Cube convert_to_cube(unsigned int n) { + #if !defined(_MSC_VER) || (_MSC_VER > 1900) + assert(n < (1 << 24)); + #endif + return { + (std::uint8_t)((n & 070000000) >> 21), (std::uint8_t)((n & 007000000) >> 18), + (std::uint8_t)((n & 000700000) >> 15), (std::uint8_t)((n & 000070000) >> 12), + (std::uint8_t)((n & 000007000) >> 9), (std::uint8_t)((n & 000000700) >> 6), + (std::uint8_t)((n & 000000070) >> 3), (std::uint8_t)((n & 000000007) >> 0), + }; +} + +// User-defined literal operator. Given an integer in octal notation, like +// 01234567, gives the cube with the same colors. For example, `01234567_c` +// is `Cube{0, 1, 2, 3, 4, 5, 6, 7}`. +inline constexpr Cube operator""_c(unsigned long long n) +{ + #if !defined(_MSC_VER) || (_MSC_VER > 1900) + assert(n < (1 << 24)); + #endif + return convert_to_cube(unsigned(n)); +} + +inline std::string config_name(const Cube cube) { + std::stringstream filename_prefix_ss; + for (int j = 0; j < 8; ++j) { + filename_prefix_ss << int(cube[j]); + } + return filename_prefix_ss.str(); +} +// Cube (end) + + +template +class Triple_line_extractor +{ + using P = Point; + using Polyline = std::vector

    ; + using Polylines = std::vector; + + typedef Polylines(*create_polylines_fct)(const int /* prec */); + + +public: + boost::unordered_map create_polylines_fcts { + // One internal corner + { 00001221_c, CGAL::Mesh_3::poly00001221 } , + { 00111202_c, CGAL::Mesh_3::poly00111202 } , + { 01101001_c, CGAL::Mesh_3::poly01101001 } , + // Two curves + { 00011022_c, CGAL::Mesh_3::poly00011022 } , + { 00011221_c, CGAL::Mesh_3::poly00011221 } , + { 00011222_c, CGAL::Mesh_3::poly00011222 } , + { 00121200_c, CGAL::Mesh_3::poly00121200 } , + { 00121221_c, CGAL::Mesh_3::poly00121221 } , + { 00122100_c, CGAL::Mesh_3::poly00122100 } , + { 00122101_c, CGAL::Mesh_3::poly00122101 } , + // One curve + { 00000012_c, CGAL::Mesh_3::poly00000012 } , + { 00000112_c, CGAL::Mesh_3::poly00000112 } , + { 00000121_c, CGAL::Mesh_3::poly00000121 } , + { 00001112_c, CGAL::Mesh_3::poly00001112 } , + { 00001122_c, CGAL::Mesh_3::poly00001122 } , + { 00010121_c, CGAL::Mesh_3::poly00010121 } , + { 00010122_c, CGAL::Mesh_3::poly00010122 } , + { 00011002_c, CGAL::Mesh_3::poly00011002 } , + { 00011012_c, CGAL::Mesh_3::poly00011012 } , + { 00011110_c, CGAL::Mesh_3::poly00011110 } , + { 00011120_c, CGAL::Mesh_3::poly00011120 } , + { 00011121_c, CGAL::Mesh_3::poly00011121 } , + { 00011122_c, CGAL::Mesh_3::poly00011122 } , + { 00011220_c, CGAL::Mesh_3::poly00011220 } , + { 00012002_c, CGAL::Mesh_3::poly00012002 } , + { 00012012_c, CGAL::Mesh_3::poly00012012 } , + { 00012021_c, CGAL::Mesh_3::poly00012021 } , + { 00012110_c, CGAL::Mesh_3::poly00012110 } , + { 00012112_c, CGAL::Mesh_3::poly00012112 } , + { 00012120_c, CGAL::Mesh_3::poly00012120 } , + { 00012121_c, CGAL::Mesh_3::poly00012121 } , + { 00012122_c, CGAL::Mesh_3::poly00012122 } , + { 00012221_c, CGAL::Mesh_3::poly00012221 } , + { 00111100_c, CGAL::Mesh_3::poly00111100 } , + { 00111102_c, CGAL::Mesh_3::poly00111102 } , + { 00111220_c, CGAL::Mesh_3::poly00111220 } , + { 00121201_c, CGAL::Mesh_3::poly00121201 } , + // 4 color cases + { 00000123_c, CGAL::Mesh_3::poly00000123 } , + { 00001123_c, CGAL::Mesh_3::poly00001123 } , + { 00001223_c, CGAL::Mesh_3::poly00001223 } , + { 00010123_c, CGAL::Mesh_3::poly00010123 } , + { 00010230_c, CGAL::Mesh_3::poly00010230 } , + { 00010231_c, CGAL::Mesh_3::poly00010231 } , + { 00011023_c, CGAL::Mesh_3::poly00011023 } , + { 00011123_c, CGAL::Mesh_3::poly00011123 } , + { 00011223_c, CGAL::Mesh_3::poly00011223 } , + { 00011230_c, CGAL::Mesh_3::poly00011230 } , + { 00011231_c, CGAL::Mesh_3::poly00011231 } , + { 00011232_c, CGAL::Mesh_3::poly00011232 } , + { 00012003_c, CGAL::Mesh_3::poly00012003 } , + { 00012013_c, CGAL::Mesh_3::poly00012013 } , + { 00012023_c, CGAL::Mesh_3::poly00012023 } , + { 00012033_c, CGAL::Mesh_3::poly00012033 } , + { 00012113_c, CGAL::Mesh_3::poly00012113 } , + { 00012123_c, CGAL::Mesh_3::poly00012123 } , + { 00012130_c, CGAL::Mesh_3::poly00012130 } , + { 00012131_c, CGAL::Mesh_3::poly00012131 } , + { 00012132_c, CGAL::Mesh_3::poly00012132 } , + { 00012133_c, CGAL::Mesh_3::poly00012133 } , + { 00012223_c, CGAL::Mesh_3::poly00012223 } , + { 00012230_c, CGAL::Mesh_3::poly00012230 } , + { 00012231_c, CGAL::Mesh_3::poly00012231 } , + { 00012232_c, CGAL::Mesh_3::poly00012232 } , + { 00012233_c, CGAL::Mesh_3::poly00012233 } , + { 00012330_c, CGAL::Mesh_3::poly00012330 } , + { 00012331_c, CGAL::Mesh_3::poly00012331 } , + { 00012332_c, CGAL::Mesh_3::poly00012332 } , + { 00012333_c, CGAL::Mesh_3::poly00012333 } , + { 00111123_c, CGAL::Mesh_3::poly00111123 } , + { 00111203_c, CGAL::Mesh_3::poly00111203 } , + { 00111223_c, CGAL::Mesh_3::poly00111223 } , + { 00111230_c, CGAL::Mesh_3::poly00111230 } , + { 00111232_c, CGAL::Mesh_3::poly00111232 } , + { 00111233_c, CGAL::Mesh_3::poly00111233 } , + { 00112233_c, CGAL::Mesh_3::poly00112233 } , + { 00112323_c, CGAL::Mesh_3::poly00112323 } , + { 00112332_c, CGAL::Mesh_3::poly00112332 } , + { 00121203_c, CGAL::Mesh_3::poly00121203 } , + { 00121223_c, CGAL::Mesh_3::poly00121223 } , + { 00121233_c, CGAL::Mesh_3::poly00121233 } , + { 00121300_c, CGAL::Mesh_3::poly00121300 } , + { 00121301_c, CGAL::Mesh_3::poly00121301 } , + { 00121302_c, CGAL::Mesh_3::poly00121302 } , + { 00121320_c, CGAL::Mesh_3::poly00121320 } , + { 00121321_c, CGAL::Mesh_3::poly00121321 } , + { 00121323_c, CGAL::Mesh_3::poly00121323 } , + { 00122103_c, CGAL::Mesh_3::poly00122103 } , + { 00122113_c, CGAL::Mesh_3::poly00122113 } , + { 00122133_c, CGAL::Mesh_3::poly00122133 } , + { 00122300_c, CGAL::Mesh_3::poly00122300 } , + { 00122301_c, CGAL::Mesh_3::poly00122301 } , + { 00122302_c, CGAL::Mesh_3::poly00122302 } , + { 00122313_c, CGAL::Mesh_3::poly00122313 } , + { 00122331_c, CGAL::Mesh_3::poly00122331 } , + { 01101023_c, CGAL::Mesh_3::poly01101023 } , + { 01101223_c, CGAL::Mesh_3::poly01101223 } , + { 01101231_c, CGAL::Mesh_3::poly01101231 } , + { 01102332_c, CGAL::Mesh_3::poly01102332 } , + { 01121223_c, CGAL::Mesh_3::poly01121223 } , + { 01121230_c, CGAL::Mesh_3::poly01121230 } , + { 01122330_c, CGAL::Mesh_3::poly01122330 } , + { 01123023_c, CGAL::Mesh_3::poly01123023 } , + { 01233210_c, CGAL::Mesh_3::poly01233210 } , + // 5 colors + { 00001234_c, CGAL::Mesh_3::poly00001234 } , + { 00010234_c, CGAL::Mesh_3::poly00010234 } , + { 00011234_c, CGAL::Mesh_3::poly00011234 } , + { 00012034_c, CGAL::Mesh_3::poly00012034 } , + { 00012134_c, CGAL::Mesh_3::poly00012134 } , + { 00012234_c, CGAL::Mesh_3::poly00012234 } , + { 00012334_c, CGAL::Mesh_3::poly00012334 } , + { 00012340_c, CGAL::Mesh_3::poly00012340 } , + { 00012341_c, CGAL::Mesh_3::poly00012341 } , + { 00012342_c, CGAL::Mesh_3::poly00012342 } , + { 00012343_c, CGAL::Mesh_3::poly00012343 } , + { 00111234_c, CGAL::Mesh_3::poly00111234 } , + { 00112234_c, CGAL::Mesh_3::poly00112234 } , + { 00112324_c, CGAL::Mesh_3::poly00112324 } , + { 00112334_c, CGAL::Mesh_3::poly00112334 } , + { 00121234_c, CGAL::Mesh_3::poly00121234 } , + { 00121304_c, CGAL::Mesh_3::poly00121304 } , + { 00121324_c, CGAL::Mesh_3::poly00121324 } , + { 00121340_c, CGAL::Mesh_3::poly00121340 } , + { 00121341_c, CGAL::Mesh_3::poly00121341 } , + { 00121342_c, CGAL::Mesh_3::poly00121342 } , + { 00121344_c, CGAL::Mesh_3::poly00121344 } , + { 00122134_c, CGAL::Mesh_3::poly00122134 } , + { 00122304_c, CGAL::Mesh_3::poly00122304 } , + { 00122314_c, CGAL::Mesh_3::poly00122314 } , + { 00122324_c, CGAL::Mesh_3::poly00122324 } , + { 00122334_c, CGAL::Mesh_3::poly00122334 } , + { 00122344_c, CGAL::Mesh_3::poly00122344 } , + { 00123400_c, CGAL::Mesh_3::poly00123400 } , + { 00123401_c, CGAL::Mesh_3::poly00123401 } , + { 00123414_c, CGAL::Mesh_3::poly00123414 } , + { 00123421_c, CGAL::Mesh_3::poly00123421 } , + { 00123423_c, CGAL::Mesh_3::poly00123423 } , + { 01101234_c, CGAL::Mesh_3::poly01101234 } , + { 01102334_c, CGAL::Mesh_3::poly01102334 } , + { 01121234_c, CGAL::Mesh_3::poly01121234 } , + { 01121340_c, CGAL::Mesh_3::poly01121340 } , + { 01121341_c, CGAL::Mesh_3::poly01121341 } , + { 01122034_c, CGAL::Mesh_3::poly01122034 } , + { 01122334_c, CGAL::Mesh_3::poly01122334 } , + { 01122340_c, CGAL::Mesh_3::poly01122340 } , + { 01123024_c, CGAL::Mesh_3::poly01123024 } , + { 01233214_c, CGAL::Mesh_3::poly01233214 } , + // 6 colors + { 00012345_c, CGAL::Mesh_3::poly00012345 } , + { 00112345_c, CGAL::Mesh_3::poly00112345 } , + { 00121345_c, CGAL::Mesh_3::poly00121345 } , + { 00122345_c, CGAL::Mesh_3::poly00122345 } , + { 00123405_c, CGAL::Mesh_3::poly00123405 } , + { 00123415_c, CGAL::Mesh_3::poly00123415 } , + { 00123425_c, CGAL::Mesh_3::poly00123425 } , + { 00123455_c, CGAL::Mesh_3::poly00123455 } , + { 01102345_c, CGAL::Mesh_3::poly01102345 } , + { 01121345_c, CGAL::Mesh_3::poly01121345 } , + { 01122345_c, CGAL::Mesh_3::poly01122345 } , + { 01123045_c, CGAL::Mesh_3::poly01123045 } , + { 01123445_c, CGAL::Mesh_3::poly01123445 } , + { 01123453_c, CGAL::Mesh_3::poly01123453 } , + { 01233245_c, CGAL::Mesh_3::poly01233245 } , + // 7 colors + { 00123456_c, CGAL::Mesh_3::poly00123456 } , + { 01123456_c, CGAL::Mesh_3::poly01123456 } , + { 01233456_c, CGAL::Mesh_3::poly01233456 } , + // 8 colors + { 01234567_c, CGAL::Mesh_3::poly01234567 } + }; +};// end triple_lines_extractor + +#undef CGAL_SQRT65 +#undef CGAL_SQRT17 + +}// end namespace Mesh 3 +}// end namespace CGAL + +#endif // CGAL_MESH_3_FEATURES_DETECTION_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/features_detection_helpers.h b/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/features_detection_helpers.h new file mode 100644 index 00000000..37cb24cf --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/features_detection_helpers.h @@ -0,0 +1,72 @@ +// Copyright (c) 2022 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/features_detection/features_detection_helpers.h $ +// $Id: include/CGAL/Mesh_3/features_detection/features_detection_helpers.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Sebastien Loriot, Jane Tournois +// +//****************************************************************************** +// +//****************************************************************************** + + +#ifndef CGAL_MESH_3_FEATURES_DETECTION_HELPERS_H +#define CGAL_MESH_3_FEATURES_DETECTION_HELPERS_H + +#include + +#include + +namespace CGAL +{ +namespace Mesh_3 +{ +namespace internal +{ + + template 1)> + struct Color_transformation_helper + { + using type = std::unordered_map; + static void reset(type& t) + { + t.clear(); + } + static bool is_valid(const type& t, const Word_type& w) + { + return t.find(w) != t.end(); + } + }; + template + struct Color_transformation_helper + { + using type = std::array; + static void reset(type& t) + { + std::fill(t.begin(), t.end(), 8/*invalid_word*/); + } + static bool is_valid(const type& t, const Word_type& w) + { + return t[w] != 8;/*invalid_word*/ + } + }; + + template + void debug_cerr(const char* title, const Array& tab) + { + std::cerr << title << " ["; + for (const auto t : tab) + std::cout << std::to_string(t) << " "; + std::cout << "]" << std::endl; + } + +}//end namespace internal +}//end namespace Mesh_3 +}//end namespace CGAL + +#endif // CGAL_MESH_3_FEATURES_DETECTION_HELPERS_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/postprocess_weights.h b/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/postprocess_weights.h new file mode 100644 index 00000000..575c1f63 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/features_detection/postprocess_weights.h @@ -0,0 +1,165 @@ +// Copyright (c) 2023 GeometryFactory +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/features_detection/postprocess_weights.h $ +// $Id: include/CGAL/Mesh_3/features_detection/postprocess_weights.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Jane Tournois + +#ifndef CGAL_MESH_3_POSTPROCESS_LABEL_WEIGHTS_H +#define CGAL_MESH_3_POSTPROCESS_LABEL_WEIGHTS_H + +#include + +#include + +#include + +namespace CGAL { +namespace Mesh_3 { +namespace internal { + + template + void set_voxel(CGAL::Image_3& img, + const std::size_t& i, + const std::size_t& j, + const std::size_t& k, + const Word_type& w) + { + using CGAL::IMAGEIO::static_evaluate; + + if (i == std::size_t(-1) || j == std::size_t(-1) || k == std::size_t(-1)) + return; + else if (i > img.xdim() - 1 || j > img.ydim() - 1 || k > img.zdim() - 1) + return; + else + static_evaluate(img.image(), i, j, k) = w; + } + + template + void set_voxels(CGAL::Image_3& weights, + const std::vector>& black_voxels, + const Word_type& wblack) + { + for (auto v : black_voxels) + { + const std::size_t& i = v[0]; + const std::size_t& j = v[1]; + const std::size_t& k = v[2]; + + // i - 1 : 9 voxels + internal::set_voxel(weights, i - 1, j - 1, k - 1, wblack); + internal::set_voxel(weights, i - 1, j - 1, k, wblack); + internal::set_voxel(weights, i - 1, j - 1, k + 1, wblack); + internal::set_voxel(weights, i - 1, j, k - 1, wblack); + internal::set_voxel(weights, i - 1, j, k, wblack); + internal::set_voxel(weights, i - 1, j, k + 1, wblack); + internal::set_voxel(weights, i - 1, j + 1, k - 1, wblack); + internal::set_voxel(weights, i - 1, j + 1, k, wblack); + internal::set_voxel(weights, i - 1, j + 1, k + 1, wblack); + + // i : 9 voxels + internal::set_voxel(weights, i, j - 1, k - 1, wblack); + internal::set_voxel(weights, i, j - 1, k, wblack); + internal::set_voxel(weights, i, j - 1, k + 1, wblack); + internal::set_voxel(weights, i, j, k - 1, wblack); + internal::set_voxel(weights, i, j, k, wblack); + internal::set_voxel(weights, i, j, k + 1, wblack); + internal::set_voxel(weights, i, j + 1, k - 1, wblack); + internal::set_voxel(weights, i, j + 1, k, wblack); + internal::set_voxel(weights, i, j + 1, k + 1, wblack); + + // i + 1 : 9 voxels + internal::set_voxel(weights, i + 1, j - 1, k - 1, wblack); + internal::set_voxel(weights, i + 1, j - 1, k, wblack); + internal::set_voxel(weights, i + 1, j - 1, k + 1, wblack); + internal::set_voxel(weights, i + 1, j, k - 1, wblack); + internal::set_voxel(weights, i + 1, j, k, wblack); + internal::set_voxel(weights, i + 1, j, k + 1, wblack); + internal::set_voxel(weights, i + 1, j + 1, k - 1, wblack); + internal::set_voxel(weights, i + 1, j + 1, k, wblack); + internal::set_voxel(weights, i + 1, j + 1, k + 1, wblack); + } + + +#ifdef CGAL_MESH_3_WEIGHTED_IMAGES_DEBUG + _writeImage(weights.image(), "weights-image_postprocessed.inr.gz"); +#endif + } + + // POLYLINES ON CUBE BOUNDARY + template + void feature_voxels_on_image_bbox(const CGAL::Image_3& image, + std::vector>& black_voxels) + { + const std::size_t& xdim = image.xdim(); + const std::size_t& ydim = image.ydim(); + const std::size_t& zdim = image.zdim(); + + const std::size_t wx = (std::max)(xdim - 1, std::size_t(1)); + const std::size_t wy = (std::max)(ydim - 1, std::size_t(1)); + const std::size_t wz = (std::max)(zdim - 1, std::size_t(1)); + + for (int axis = 0; axis < 3; ++axis) + { + for (std::size_t i = 0; i < xdim; i += (axis == 0 ? wx : 1)) + for (std::size_t j = 0; j < ydim; j += (axis == 1 ? wy : 1)) + for (std::size_t k = 0; k < zdim; k += (axis == 2 ? wz : 1)) + { + typedef std::array Pixel; + + Pixel pix00 = { {i , j , k } }, + pix10 = pix00, pix01 = pix00, pix11 = pix00; + + const int axis_xx = (axis + 1) % 3; + const int axis_yy = (axis + 2) % 3; + + ++pix10[axis_xx]; + ++pix11[axis_xx]; ++pix11[axis_yy]; + ++pix01[axis_yy]; + if (pix11[0] >= xdim || pix11[1] >= ydim || pix11[2] >= zdim) { + // we have gone too far + continue; + } + + struct Enriched_pixel { + Pixel pixel; + Image_word_type word; + }; + + std::array, 2> square = + { { {{ { pix00, Image_word_type() }, + { pix01, Image_word_type() } }}, + {{ { pix10, Image_word_type() }, + { pix11, Image_word_type() } }} } }; + + std::map pixel_values_set; + for (int ii = 0; ii < 2; ++ii) { + for (int jj = 0; jj < 2; ++jj) { + const Pixel& pixel = square[ii][jj].pixel; + short sum_faces = + ((0 == pixel[0] || (xdim - 1) == pixel[0]) ? 1 : 0) + + ((0 == pixel[1] || (ydim - 1) == pixel[1]) ? 1 : 0) + + ((0 == pixel[2] || (zdim - 1) == pixel[2]) ? 1 : 0); + + square[ii][jj].word = CGAL::IMAGEIO::static_evaluate + (image.image(), pixel[0], pixel[1], pixel[2]); + ++pixel_values_set[square[ii][jj].word]; + + if (pixel_values_set.size() > 1 || sum_faces > 1/*on edge of bbox*/) + black_voxels.push_back({ i, j, k }); + } + }//end for loops on ii, jj + }//end for loops on i,j,k + }//end for loop on axis + } + +}//end namespace internal +}//namespace Mesh_3 +}//namespace CGAL + +#endif // CGAL_MESH_3_POSTPROCESS_LABEL_WEIGHTS_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/generate_label_weights.h b/thirdparty/CGAL/include/CGAL/Mesh_3/generate_label_weights.h index 3fb4ee81..25bcbec7 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/generate_label_weights.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/generate_label_weights.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/generate_label_weights.h $ -// $Id: generate_label_weights.h 1a8e03c 2022-10-13T15:15:22+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/generate_label_weights.h $ +// $Id: include/CGAL/Mesh_3/generate_label_weights.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -28,6 +28,7 @@ #include #include #include +#include namespace CGAL { namespace Mesh_3 { @@ -111,7 +112,7 @@ SIGN get_sign() #ifdef CGAL_MESH_3_WEIGHTED_IMAGES_DEBUG template void convert_itk_to_image_3(itk::Image* const itk_img, - const char* filename) + const char* filename = "") { auto t = itk_img->GetOrigin(); auto v = itk_img->GetSpacing(); @@ -138,7 +139,8 @@ void convert_itk_to_image_3(itk::Image* const itk_img, itk_img->GetBufferPointer() + size, img_ptr); - _writeImage(img, filename); + if(!std::string(filename).empty()) + _writeImage(img, filename); } #endif @@ -147,7 +149,7 @@ void convert_itk_to_image_3(itk::Image* const itk_img, /// @cond INTERNAL template CGAL::Image_3 generate_label_weights_with_known_word_type(const CGAL::Image_3& image, - const float& sigma) + const float& sigma) { typedef unsigned char Weights_type; //from 0 t 255 const std::size_t img_size = image.size(); @@ -309,9 +311,8 @@ CGAL::Image_3 generate_label_weights_with_known_word_type(const CGAL::Image_3& i * @returns a `CGAL::Image_3` of weights used to build a quality `Labeled_mesh_domain_3`, * with the same dimensions as `image` */ - -CGAL::Image_3 generate_label_weights(const CGAL::Image_3& image, - const float& sigma) +template +CGAL::Image_3 generate_label_weights(const CGAL::Image_3& image, const float& sigma) { CGAL_IMAGE_IO_CASE(image.image(), return generate_label_weights_with_known_word_type(image, sigma); diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/initialize_triangulation_from_gray_image.h b/thirdparty/CGAL/include/CGAL/Mesh_3/initialize_triangulation_from_gray_image.h index d60cdf0c..3c00380c 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/initialize_triangulation_from_gray_image.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/initialize_triangulation_from_gray_image.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/initialize_triangulation_from_gray_image.h $ -// $Id: initialize_triangulation_from_gray_image.h 7c9e452 2021-02-12T17:20:46+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/initialize_triangulation_from_gray_image.h $ +// $Id: include/CGAL/Mesh_3/initialize_triangulation_from_gray_image.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h b/thirdparty/CGAL/include/CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h index 0ede0035..81db85ad 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h $ -// $Id: initialize_triangulation_from_labeled_image.h 399945f 2023-01-05T14:20:16+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h $ +// $Id: include/CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -96,31 +96,31 @@ void initialize_triangulation_from_labeled_image(C3T3& c3t3, TransformOperator transform = CGAL::Identity()) { typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename Tr::Weighted_point Weighted_point; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Segment Segment_3; typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Tr::Cell_handle Cell_handle; - typedef typename Gt::Vector_3 Vector_3; + typedef typename GT::Vector_3 Vector_3; typedef MeshDomain Mesh_domain; Tr& tr = c3t3.triangulation(); - typename Gt::Compare_weighted_squared_radius_3 cwsr = + typename GT::Compare_weighted_squared_radius_3 cwsr = tr.geom_traits().compare_weighted_squared_radius_3_object(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); - typename Gt::Construct_weighted_point_3 cwp = + typename GT::Construct_weighted_point_3 cwp = tr.geom_traits().construct_weighted_point_3_object(); if(protect_features) { init_tr_from_labeled_image_call_init_features (c3t3, domain, criteria, - CGAL::Mesh_3::internal::Has_features()); + CGAL::internal::Has_features()); } const double max_v = (std::max)((std::max)(image.vx(), @@ -159,8 +159,8 @@ void initialize_triangulation_from_labeled_image(C3T3& c3t3, : domain.is_in_domain_object()( seed_cell->weighted_circumcenter(tr.geom_traits())); - if ( seed_label != boost::none - && seed_cell_label != boost::none + if ( seed_label != std::nullopt + && seed_cell_label != std::nullopt && *seed_label == *seed_cell_label) continue; //this means the connected component has already been initialized diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/internal/Graph_manipulations.h b/thirdparty/CGAL/include/CGAL/Mesh_3/internal/Graph_manipulations.h index 6c8f6344..45e9950c 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/internal/Graph_manipulations.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/internal/Graph_manipulations.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/internal/Graph_manipulations.h $ -// $Id: Graph_manipulations.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/internal/Graph_manipulations.h $ +// $Id: include/CGAL/Mesh_3/internal/Graph_manipulations.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/internal/check_weights.h b/thirdparty/CGAL/include/CGAL/Mesh_3/internal/check_weights.h index d0e7f24b..5ccd3658 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/internal/check_weights.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/internal/check_weights.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/internal/check_weights.h $ -// $Id: check_weights.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/internal/check_weights.h $ +// $Id: include/CGAL/Mesh_3/internal/check_weights.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jane Tournois @@ -22,7 +22,7 @@ #include #include -#include +#include #include namespace CGAL { @@ -33,7 +33,7 @@ template bool has_non_protecting_weights(const Triangulation& tr, const MeshDomain&) { - const bool with_features = Has_features::value; + const bool with_features = ::CGAL::internal::Has_features::value; typedef typename Triangulation::FT FT; typedef typename Triangulation::Weighted_point Weighted_point; diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/internal/helpers.h b/thirdparty/CGAL/include/CGAL/Mesh_3/internal/helpers.h index 621990dd..0752ea76 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/internal/helpers.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/internal/helpers.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/internal/helpers.h $ -// $Id: helpers.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/internal/helpers.h $ +// $Id: include/CGAL/Mesh_3/internal/helpers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/io_signature.h b/thirdparty/CGAL/include/CGAL/Mesh_3/io_signature.h index 90ce94a4..53b8b1b5 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/io_signature.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/io_signature.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/io_signature.h $ -// $Id: io_signature.h b64a171 2020-06-16T17:47:00+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/io_signature.h $ +// $Id: include/CGAL/Mesh_3/io_signature.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent RINEAU @@ -13,351 +13,8 @@ #ifndef CGAL_MESH_3_IO_SIGNATURE_H #define CGAL_MESH_3_IO_SIGNATURE_H -#include - -#define CGAL_MESH_3_IO_H // the old include macro, tested by other files - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef CGAL_PERIODIC_3_MESH_3_CONFIG_H -#include -#include -#endif - -#include -#include -#include - -namespace CGAL { - -// SFINAE test -template -class has_io_signature -{ -private: - template struct helper; - template static char check(helper<&V::io_signature> *); - template static char (&check(...))[2]; - -public: - enum { value = (sizeof(check(0)) == sizeof(char)) }; -}; - -template -struct Get_io_signature_aux -{ - std::string operator() () const - { - return T::io_signature(); - } -}; // end struct template Get_io_signature_aux - -template -struct Get_io_signature_aux -{ - std::string operator()() const - { - std::cerr << "Type without signature: " << typeid(T).name() << std::endl; - return std::string(); - } -}; // end template partial specialization Get_io_signature_aux - - -template -struct Get_io_signature - : public Get_io_signature_aux< - T, - (has_io_signature::value || - has_io_signature::value || - has_io_signature::value ) // signature for - // static mem func - > -{ -}; - -template <> -struct Get_io_signature -{ - std::string operator()() { - return "i"; - } -}; - -template <> -struct Get_io_signature -{ - std::string operator()() { - return "ui"; - } -}; - -template <> -struct Get_io_signature -{ - std::string operator()() { - return "c"; - } -}; - -template <> -struct Get_io_signature -{ - std::string operator()() { - return "uc"; - } -}; - -template <> -struct Get_io_signature -{ - std::string operator()() { - return "sc"; - } -}; - -template <> -struct Get_io_signature -{ - std::string operator()() { - return "s"; - } -}; - -template <> -struct Get_io_signature -{ - std::string operator()() { - return "us"; - } -}; - -template <> -struct Get_io_signature -{ - std::string operator()() { - return "d"; - } -}; - -template -struct Get_io_signature > -{ - std::string operator()() { - return std::string("boost::variant<") + - Get_io_signature()() + "," + - Get_io_signature()() + ">"; - } -}; - -template -struct Get_io_signature > -{ - std::string operator()() { - return std::string("std::pair<") + - Get_io_signature()() + "," + - Get_io_signature()() + ">"; - } -}; - -template -struct Get_io_signature > -{ - std::string operator()() { - return std::string("std::pair<") + - Get_io_signature()() + "," + - Get_io_signature()() + ">"; - } -}; - -template -struct Get_io_signature > -{ - std::string operator()() { - return std::string("boost::variant<") + - Get_io_signature()() + "," + - Get_io_signature()() + "," + - Get_io_signature()() + ">"; - } -}; - -template -struct Get_io_signature > -{ - std::string operator()() { - return std::string("boost::variant<") + - Get_io_signature()() + "," + - Get_io_signature()() + "," + - Get_io_signature()() + "," + - Get_io_signature()() + ">"; - } -}; - -template -struct Get_io_signature > -{ - std::string operator()() { - return "Point_3"; - } -}; - -template -struct Get_io_signature > -{ - std::string operator()() { - return std::string("Weighted_point<") + Get_io_signature >()() + ">"; - } -}; - -#ifdef CGAL_TRIANGULATION_3_H -template -struct -Get_io_signature > -{ - std::string operator()() { - return std::string("Triangulation_3(") + - Get_io_signature()() + - ",Vb(" + Get_io_signature()() + - "),Cb(" + Get_io_signature()() + - "))"; - } -}; -#endif - -#ifdef CGAL_DELAUNAY_TRIANGULATION_3_H -template -struct -Get_io_signature > -{ - std::string operator()() { - return Get_io_signature >()(); - } -}; -#endif - -#ifdef CGAL_REGULAR_TRIANGULATION_3_H -template -struct -Get_io_signature > -{ - std::string operator()() { - return Get_io_signature >()(); - } -}; -#endif - -#ifdef CGAL_PERIODIC_3_TRIANGULATION_3_H -template -struct -Get_io_signature > -{ - std::string operator()() { - return std::string("Periodic_3_triangulation_3(") + - Get_io_signature()() + - ",Vb(" + Get_io_signature()() + - "),Cb(" + Get_io_signature()() + - "))"; - } -}; -#endif - -#ifdef CGAL_PERIODIC_3_REGULAR_TRIANGULATION_3_H -template -struct -Get_io_signature > -{ - std::string operator()() { - return Get_io_signature >()(); - } -}; -#endif - -#ifdef CGAL_TRIANGULATION_VERTEX_BASE_3_H -template -struct Get_io_signature > -{ - std::string operator()() { - return "Tvb_3"; - } -}; -#endif - -#ifdef CGAL_REGULAR_TRIANGULATION_VERTEX_BASE_3_H -template -struct Get_io_signature > -{ - // identical to Triangulation_vertex_base_3 - std::string operator()() { - return "Tvb_3"; - } -}; -#endif - -#ifdef CGAL_TRIANGULATION_VERTEX_BASE_WITH_INFO_3_H -template -struct -Get_io_signature > -{ - std::string operator()() { - return Get_io_signature()(); - } -}; -#endif - -#ifdef CGAL_TRIANGULATION_CELL_BASE_3_H -template -struct -Get_io_signature > -{ - std::string operator()() { - return "Tcb_3"; - } -}; -#endif - -#ifdef CGAL_TRIANGULATION_CELL_BASE_WITH_INFO_3_H -template -struct -Get_io_signature > -{ - std::string operator()() { - return Get_io_signature()(); - } -}; -#endif - -#ifdef CGAL_REGULAR_TRIANGULATION_CELL_BASE_3_H -template -struct -Get_io_signature > -{ - std::string operator()() { - return "RTcb_3"; - } -}; -#endif - -#ifdef CGAL_REGULAR_TRIANGULATION_CELL_BASE_WITH_CIRCUMCENTER_3_H -template -struct -Get_io_signature > -{ - std::string operator()() { - return "RTWWCcb_3"; - } -}; -#endif - -} // end namespace CGAL +#include +#include #endif // CGAL_MESH_3_IO_SIGNATURE_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h b/thirdparty/CGAL/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h index 04f80dbd..9aa4a110 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h $ -// $Id: mesh_standard_cell_criteria.h 6fe18d8 2021-01-20T15:32:23+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h $ +// $Id: include/CGAL/Mesh_3/mesh_standard_cell_criteria.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -142,12 +142,20 @@ class Cell_uniform_size_criterion public: // Constructor - Cell_uniform_size_criterion(const FT& radius_bound) - : sq_radius_bound_(radius_bound*radius_bound) {} + Cell_uniform_size_criterion(const FT& radius_bound, + const bool is_lower_bound = false) + : sq_radius_bound_(radius_bound*radius_bound) + , is_lower_bound_(is_lower_bound) + {} // Destructor ~Cell_uniform_size_criterion() {} + bool is_lower_bound() const + { + return is_lower_bound_; + } + protected: virtual void do_accept(Visitor_& v) const { @@ -182,11 +190,19 @@ class Cell_uniform_size_criterion const FT size = sq_radius(p, q, r, s); - if ( size > sq_radius_bound_ ) + if (!is_lower_bound() && size > sq_radius_bound_ ) { #ifdef CGAL_MESH_3_DEBUG_CELL_CRITERIA std::cerr << "bad cell " << (void*)(ch.operator->()) << " (radius bound): size[" << size << "] bound[" << sq_radius_bound_ << "]\n" ; +#endif + return Is_bad(Quality(sq_radius_bound_/ size)); + } + else if(is_lower_bound() && size <= sq_radius_bound_) + { +#ifdef CGAL_MESH_3_DEBUG_FACET_CRITERIA + std::cerr << "Cell too small (uniform size): sq_radius[" << size + << "] bound[" << sq_radius_bound_ << "]\n"; #endif return Is_bad(Quality(sq_radius_bound_/size)); } @@ -196,6 +212,7 @@ class Cell_uniform_size_criterion private: FT sq_radius_bound_; + const bool is_lower_bound_; }; // end class Cell_uniform_size_criterion @@ -378,13 +395,8 @@ class Cell_criteria_visitor_with_features typedef Criterion_visitor Base; typedef Cell_criteria_visitor_with_features Self; - - typedef Abstract_criterion Criterion; - typedef Mesh_3::Cell_size_criterion Cell_size_criterion; - typedef Mesh_3::Cell_radius_edge_criterion Cell_radius_edge_criterion; - - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; typedef typename Tr::Weighted_point Weighted_point; @@ -402,11 +414,11 @@ class Cell_criteria_visitor_with_features , ratio_(0) , size_ratio_(0.5*0.5*4.) { - typename Gt::Compare_weighted_squared_radius_3 compare = + typename GT::Compare_weighted_squared_radius_3 compare = tr.geom_traits().compare_weighted_squared_radius_3_object(); - typename Gt::Compute_weight_3 cw = + typename GT::Compute_weight_3 cw = tr.geom_traits().compute_weight_3_object(); - typename Gt::Compute_squared_radius_smallest_orthogonal_sphere_3 sq_radius = + typename GT::Compute_squared_radius_smallest_orthogonal_sphere_3 sq_radius = tr.geom_traits().compute_squared_radius_smallest_orthogonal_sphere_3_object(); int k1 = 0; @@ -501,7 +513,8 @@ class Cell_criteria_visitor_with_features ~Cell_criteria_visitor_with_features() {} // visit functions - void visit(const Cell_size_criterion& criterion) + template + void visit(const Mesh_3::Cell_size_criterion& criterion) { if ( ratio_ < size_ratio_ && (do_spheres_intersect_ || 1 == wp_nb_) ) @@ -513,7 +526,8 @@ class Cell_criteria_visitor_with_features Base::do_visit(criterion); } - void visit(const Cell_radius_edge_criterion& criterion) + template + void visit(const Mesh_3::Cell_radius_edge_criterion& criterion) { if ( (wp_nb_ >= 2 && do_spheres_intersect_) || 1 == wp_nb_ ) @@ -525,7 +539,8 @@ class Cell_criteria_visitor_with_features Base::do_visit(criterion); } - void visit(const Criterion& criterion) + template + void visit(const Abstract_criterion& criterion) { Base::do_visit(criterion); } @@ -535,9 +550,74 @@ class Cell_criteria_visitor_with_features bool do_spheres_intersect_; FT ratio_; FT size_ratio_; -}; // end class Cell_criterion_visitor +}; // end class Cell_criteria_visitor_with_features + + +template +class Cell_criterion_visitor_with_radius_lower_bound + : public Cell_criteria_visitor_with_features +{ + typedef Cell_criteria_visitor_with_features Base; + typedef Cell_criterion_visitor_with_radius_lower_bound Self; + + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + +public: + typedef typename Base::Quality Cell_quality; + typedef typename Base::Is_bad Is_cell_bad; + typedef typename Base::Handle Handle; + typedef Handle Cell_handle; + + // Constructor + Cell_criterion_visitor_with_radius_lower_bound(const Tr& tr, + const Cell_handle& ch) + : Base(tr, ch) + , dont_go_further_(false) + {} + + Is_cell_bad is_bad() const + { + if (dont_go_further_) + return Is_cell_bad(); + else + return Base::is_bad(); + } + bool go_further() const + { + if (dont_go_further_) + return false; + else + return Base::go_further(); + } + + // visit functions + template + void visit(const Criterion& criterion) + { + Base::visit(criterion); + } + + template + void visit(const Mesh_3::Abstract_criterion& criterion) + { + Base::visit(criterion); + } + + template + void visit(const Mesh_3::Cell_uniform_size_criterion& criterion) + { + Base::visit(criterion); + + if (criterion.is_lower_bound() && Base::is_bad()) + dont_go_further_ = true; + } + +private: + bool dont_go_further_; +};// end class Cell_criterion_visitor_with_radius_lower_bound } // end namespace Mesh_3 diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/mesh_standard_criteria.h b/thirdparty/CGAL/include/CGAL/Mesh_3/mesh_standard_criteria.h index d03e13d9..1b5837ce 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/mesh_standard_criteria.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/mesh_standard_criteria.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/mesh_standard_criteria.h $ -// $Id: mesh_standard_criteria.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/mesh_standard_criteria.h $ +// $Id: include/CGAL/Mesh_3/mesh_standard_criteria.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,7 +22,7 @@ -#include +#include #include namespace CGAL { @@ -41,7 +41,7 @@ class Abstract_criterion public: typedef FT Quality; - typedef boost::optional Is_bad; + typedef std::optional Is_bad; typedef typename Visitor_::Handle Handle; /// Destructor @@ -81,7 +81,7 @@ class Criterion_visitor public: typedef std::pair Quality; - typedef boost::optional Is_bad; + typedef std::optional Is_bad; // Constructor diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h b/thirdparty/CGAL/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h index 77edf3ed..f498efe5 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h $ -// $Id: mesh_standard_facet_criteria.h 58b10a3 2020-03-26T18:58:50+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h $ +// $Id: include/CGAL/Mesh_3/mesh_standard_facet_criteria.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -102,14 +102,14 @@ class Aspect_ratio_criterion : CGAL_assertion (f.first->is_facet_on_surface(f.second)); CGAL_assertion (B_ != 0); - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typedef typename Gt::Compute_squared_area_3 Area; - typedef typename Gt::Compute_squared_distance_3 Distance; - typedef typename Gt::Construct_point_3 Construct_point_3; - typedef typename Gt::Construct_triangle_3 Construct_triangle_3; + typedef typename GT::Compute_squared_area_3 Area; + typedef typename GT::Compute_squared_distance_3 Distance; + typedef typename GT::Construct_point_3 Construct_point_3; + typedef typename GT::Construct_triangle_3 Construct_triangle_3; Area area = tr.geom_traits().compute_squared_area_3_object(); Distance distance = tr.geom_traits().compute_squared_distance_3_object(); @@ -127,7 +127,7 @@ class Aspect_ratio_criterion : const FT d12 = distance(p1,p2); const FT d13 = distance(p1,p3); const FT d23 = distance(p2,p3); - const FT min_d123 = details::min_3(d12,d13,d23); + const FT min_d123 = details::min_3(d12,d13,d23); const FT aspect_ratio = 4 * triangle_area * min_d123 / (d12*d13*d23); @@ -193,11 +193,11 @@ class Uniform_curvature_size_criterion : CGAL_assertion(f.first->is_facet_on_surface(f.second)); CGAL_assertion (B_ != 0); - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Weighted_point Weighted_point; typedef typename Tr::Bare_point Bare_point; - typename Gt::Construct_weighted_circumcenter_3 weighted_circumcenter = + typename GT::Construct_weighted_circumcenter_3 weighted_circumcenter = tr.geom_traits().construct_weighted_circumcenter_3_object(); const Weighted_point& p1 = tr.point(f.first, (f.second+1)&3); @@ -264,11 +264,11 @@ class Variable_curvature_size_criterion : { CGAL_assertion (f.first->is_facet_on_surface(f.second)); - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Weighted_point Weighted_point; typedef typename Tr::Bare_point Bare_point; - typename Gt::Construct_weighted_circumcenter_3 weighted_circumcenter = + typename GT::Construct_weighted_circumcenter_3 weighted_circumcenter = tr.geom_traits().construct_weighted_circumcenter_3_object(); const Weighted_point& p1 = tr.point(f.first, (f.second+1)&3); @@ -346,11 +346,11 @@ class Variable_size_criterion : { CGAL_assertion (f.first->is_facet_on_surface(f.second)); - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); const Weighted_point& wp1 = tr.point(f.first, (f.second+1)&3); const Bare_point& p1 = cp(wp1); @@ -398,7 +398,16 @@ class Uniform_size_criterion : public: // Nb: the default bound of the criterion is such that the criterion // is always fulfilled - Uniform_size_criterion(const FT b = 1e20) : B_(b * b) {} + Uniform_size_criterion(const FT b = 1e20, + const bool is_lower_bound = false) + : B_(b * b) + , is_lower_bound_(is_lower_bound) + {} + + bool is_lower_bound() const + { + return is_lower_bound_; + } protected: virtual void do_accept(Visitor_& v) const @@ -417,11 +426,11 @@ class Uniform_size_criterion : CGAL_assertion (f.first->is_facet_on_surface(f.second)); CGAL_assertion (B_ != 0); - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); const Weighted_point& wp1 = tr.point(f.first, (f.second+1)&3); const Bare_point p1 = cp(wp1); @@ -429,11 +438,19 @@ class Uniform_size_criterion : const FT sq_radius = tr.min_squared_distance(p1, ball_center); - if ( sq_radius > B_ ) + if (!is_lower_bound() && sq_radius > B_ ) { #ifdef CGAL_MESH_3_DEBUG_FACET_CRITERIA std::cerr << "Bad facet (uniform size): sq_radius[" << sq_radius << "] bound[" << B_ << "]\n"; +#endif + return Is_bad(Quality(B_/sq_radius)); + } + else if(is_lower_bound() && sq_radius <= B_) + { +#ifdef CGAL_MESH_3_DEBUG_FACET_CRITERIA + std::cerr << "Facet too small (uniform size): sq_radius[" << sq_radius + << "] bound[" << B_ << "]\n"; #endif return Is_bad(Quality(B_/sq_radius)); } @@ -443,6 +460,7 @@ class Uniform_size_criterion : private: FT B_; + const bool is_lower_bound_; }; // end Uniform_size_criterion @@ -635,15 +653,8 @@ class Facet_criterion_visitor_with_features typedef Mesh_3::Criterion_visitor Base; typedef Facet_criterion_visitor_with_features Self; - typedef Mesh_3::Abstract_criterion Criterion; - typedef Mesh_3::Curvature_size_criterion Curvature_size_criterion; - typedef Mesh_3::Aspect_ratio_criterion Aspect_ratio_criterion; - typedef Mesh_3::Facet_on_surface_criterion Facet_on_surface_criterion; - typedef Mesh_3::Facet_size_criterion Facet_size_criterion; - typedef Mesh_3::Facet_on_same_surface_criterion Facet_on_same_surface_criterion; - - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; public: typedef typename Base::Quality Facet_quality; @@ -661,15 +672,15 @@ class Facet_criterion_visitor_with_features , angle_ratio_(0.5*0.5*4.) , size_ratio_(0.4*0.4*4.) { - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Weighted_point Weighted_point; typedef typename Tr::Cell_handle Cell_handle; - typename Gt::Compute_squared_radius_smallest_orthogonal_sphere_3 sq_radius = + typename GT::Compute_squared_radius_smallest_orthogonal_sphere_3 sq_radius = tr.geom_traits().compute_squared_radius_smallest_orthogonal_sphere_3_object(); - typename Gt::Compute_weight_3 cw = + typename GT::Compute_weight_3 cw = tr.geom_traits().compute_weight_3_object(); - typename Gt::Compare_weighted_squared_radius_3 compare = + typename GT::Compare_weighted_squared_radius_3 compare = tr.geom_traits().compare_weighted_squared_radius_3_object(); const Cell_handle& c = fh.first; @@ -736,11 +747,9 @@ class Facet_criterion_visitor_with_features } } - // Destructor - ~Facet_criterion_visitor_with_features() {} - // visit functions - void visit(const Criterion& criterion) + template + void visit(const Mesh_3::Abstract_criterion& criterion) { if ( 3 == wp_nb_ && do_spheres_intersect_ ) { @@ -751,7 +760,8 @@ class Facet_criterion_visitor_with_features Base::do_visit(criterion); } - void visit(const Curvature_size_criterion& criterion) + template + void visit(const Mesh_3::Curvature_size_criterion& criterion) { if ( ratio_ < approx_ratio_ && (do_spheres_intersect_ || 1 == wp_nb_ ) ) @@ -763,7 +773,8 @@ class Facet_criterion_visitor_with_features Base::do_visit(criterion); } - void visit(const Aspect_ratio_criterion& criterion) + template + void visit(const Mesh_3::Aspect_ratio_criterion& criterion) { if ( ratio_ < angle_ratio_ && (do_spheres_intersect_ || 1 == wp_nb_) ) @@ -775,7 +786,8 @@ class Facet_criterion_visitor_with_features Base::do_visit(criterion); } - void visit(const Facet_size_criterion& criterion) + template + void visit(const Mesh_3::Facet_size_criterion& criterion) { if ( ratio_ < size_ratio_ && (do_spheres_intersect_ || 1 == wp_nb_) ) @@ -798,6 +810,74 @@ class Facet_criterion_visitor_with_features }; // end class Facet_criterion_visitor +template +class Facet_criterion_visitor_with_radius_lower_bound + : public Facet_criterion_visitor_with_features +{ + typedef Facet_criterion_visitor_with_features Base; + typedef Facet_criterion_visitor_with_radius_lower_bound Self; + + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + +public: + typedef typename Base::Quality Facet_quality; + typedef typename Base::Is_bad Is_facet_bad; + typedef typename Base::Handle Handle; + typedef Handle Facet; + + // Constructor + Facet_criterion_visitor_with_radius_lower_bound(const Tr& tr, const Facet& fh) + : Base(tr, fh) + , dont_go_further_(false) + {} + + Is_facet_bad is_bad() const + { + if (dont_go_further_) + return Is_facet_bad(); + else + return Base::is_bad(); + } + + bool go_further() const + { + if (dont_go_further_) + return false; + else + return Base::go_further(); + } + + // visit functions + template + void visit(const Criterion& criterion) + { + Base::visit(criterion); + } + + template + void visit(const Mesh_3::Abstract_criterion& criterion) + { + Base::visit(criterion); + } + + template + void visit(const Mesh_3::Uniform_size_criterion& criterion) + { + Base::visit(criterion); + + if (criterion.is_lower_bound() && Base::is_bad()) + dont_go_further_ = true; + } + +private: + bool dont_go_further_; + + +};// end class Facet_criterion_visitor_with_radius_lower_bound + + + } // end namespace Mesh_3 } // end namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/min_dihedral_angle.h b/thirdparty/CGAL/include/CGAL/Mesh_3/min_dihedral_angle.h index 98a5c209..f278266b 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/min_dihedral_angle.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/min_dihedral_angle.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/min_dihedral_angle.h $ -// $Id: min_dihedral_angle.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/min_dihedral_angle.h $ +// $Id: include/CGAL/Mesh_3/min_dihedral_angle.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/parameters.h b/thirdparty/CGAL/include/CGAL/Mesh_3/parameters.h new file mode 100644 index 00000000..61292fd6 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/parameters.h @@ -0,0 +1,34 @@ +// Copyright (c) 2009 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/parameters.h $ +// $Id: include/CGAL/Mesh_3/parameters.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// + +#ifndef CGAL_MESH_3_PARAMETERS_H +#define CGAL_MESH_3_PARAMETERS_H + +#include +#include +#include +#include +#include + +namespace CGAL { +namespace parameters { + +#define CGAL_NP_BASE internal_np::No_property +#define CGAL_NP_BUILD(P, V) P(V) + +#include + +#undef CGAL_NP_BASE +#undef CGAL_NP_BUILD + +} } // end of CGAL::parameters namespace + + +#endif //CGAL_MESH_3_PARAMETERS_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/parameters_defaults.h b/thirdparty/CGAL/include/CGAL/Mesh_3/parameters_defaults.h index d5930167..44e9d23c 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/parameters_defaults.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/parameters_defaults.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/parameters_defaults.h $ -// $Id: parameters_defaults.h 1c3e09f 2022-01-10T15:32:38+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/parameters_defaults.h $ +// $Id: include/CGAL/Mesh_3/parameters_defaults.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,14 +23,14 @@ #include +// see also default_values_for_mesh_3 namespace +// in CGAL/STL_Extension/internal/mesh_option_classes.h + namespace CGAL { namespace parameters { namespace default_values_for_mesh_3 { -// exude_mesh_3 -const double exude_sliver_bound = 0.; // perturb_mesh_3 -const double perturb_sliver_bound = 0.; template CGAL::Mesh_3::Min_dihedral_angle_criterion @@ -40,17 +40,6 @@ CGAL::Mesh_3::Min_dihedral_angle_criterion return CGAL::Mesh_3::Min_dihedral_angle_criterion(bound, c3t3.triangulation()); } -// global optimizers -const bool do_freeze = true; - -// lloyd_optimize_mesh_3 -const double lloyd_freeze_ratio = 0.01; -const double lloyd_convergence_ratio = 0.02; - -// odt_optimize_mesh_3 -const double odt_freeze_ratio = 0.01; -const double odt_convergence_ratio = 0.02; - } } // end namespace parameters::default_values_for_mesh_3 } // end namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/polyhedral_to_labeled_function_wrapper.h b/thirdparty/CGAL/include/CGAL/Mesh_3/polyhedral_to_labeled_function_wrapper.h index a31c4081..9810997f 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/polyhedral_to_labeled_function_wrapper.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/polyhedral_to_labeled_function_wrapper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/polyhedral_to_labeled_function_wrapper.h $ -// $Id: polyhedral_to_labeled_function_wrapper.h 0fa0c4f 2019-12-05T11:05:35+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/polyhedral_to_labeled_function_wrapper.h $ +// $Id: include/CGAL/Mesh_3/polyhedral_to_labeled_function_wrapper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/polylines_to_protect.h b/thirdparty/CGAL/include/CGAL/Mesh_3/polylines_to_protect.h index 560fde11..b8e7da44 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/polylines_to_protect.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/polylines_to_protect.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/polylines_to_protect.h $ -// $Id: polylines_to_protect.h 74540b0 2022-04-26T15:32:02+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/polylines_to_protect.h $ +// $Id: include/CGAL/Mesh_3/polylines_to_protect.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -15,7 +15,6 @@ #include - #include #include #include // std::swap @@ -23,17 +22,21 @@ #include #include +#include +#include + #include #include #include -#include // for CGAL::Null_subdomain_index -#include -#include // for boost::prior -#include #include #include +#include + +#include +#include + namespace CGAL { namespace Mesh_3 { namespace internal { @@ -382,8 +385,8 @@ void snap_graph_vertices(Graph& graph, { if(poly_it->begin() != poly_it->end()) { tree.insert(*poly_it->begin()); - if(boost::next(poly_it->begin()) != poly_it->end()) { - tree.insert(*boost::prior(poly_it->end())); + if(std::next(poly_it->begin()) != poly_it->end()) { + tree.insert(*std::prev(poly_it->end())); } } } @@ -447,7 +450,7 @@ polylines_to_protect InterpolationFunctor interpolate, PolylineInputIterator existing_polylines_begin, PolylineInputIterator existing_polylines_end, - boost::optional scalar_interpolation_value = boost::none, + std::optional scalar_interpolation_value = std::nullopt, int prec = 10) { typedef typename DomainFunctor::result_type Domain_type; @@ -582,12 +585,13 @@ polylines_to_protect pixel[1], pixel[2]); square[ii][jj].domain = domain_fct(square[ii][jj].word); - if(scalar_interpolation_value != boost::none) { + if(scalar_interpolation_value != std::nullopt) { square[ii][jj].word = Image_word_type(square[ii][jj].word - (*scalar_interpolation_value)); } ++pixel_values_set[square[ii][jj].domain]; + } } @@ -730,7 +734,7 @@ polylines_to_protect square[1][0], null); Isoline_equation equation = - (scalar_interpolation_value == boost::none) ? + (scalar_interpolation_value == std::nullopt) ? Isoline_equation(1, -1, -1, 0) : Isoline_equation(v00, v10, v01, v11); insert_curve_in_graph.insert_curve(equation, @@ -740,7 +744,7 @@ polylines_to_protect p00, p10 - p00, p01 - p00); - if(scalar_interpolation_value == boost::none) { + if(scalar_interpolation_value == std::nullopt) { equation = Isoline_equation(0, -1, -1, 1); } insert_curve_in_graph.insert_curve(equation, @@ -867,7 +871,7 @@ polylines_to_protect square[1][1], null); vertex_descriptor bottom = g_manip.split(square[0][0], square[1][0], null); - if(scalar_interpolation_value == boost::none) { + if(scalar_interpolation_value == std::nullopt) { g_manip.try_add_edge(top, bottom); } else { insert_curve_in_graph.insert_curve(Isoline_equation(v00, v10, @@ -886,7 +890,7 @@ polylines_to_protect CGAL_assertion(square[1][0].domain==square[0][1].domain); CGAL_assertion(square[0][0].domain!=square[0][1].domain); - if(scalar_interpolation_value != boost::none) { + if(scalar_interpolation_value != std::nullopt) { // Compute the squared distance between the two branches of // the hyperbola. const double discrimant = double(v00) * v11 - double(v01) * v10; @@ -959,7 +963,7 @@ polylines_to_protect square[1][1], null); Isoline_equation equation = - (scalar_interpolation_value == boost::none) ? + (scalar_interpolation_value == std::nullopt) ? Isoline_equation(1, -1, 1, 1) : Isoline_equation(v00, v10, v01, v11); @@ -1038,15 +1042,15 @@ polylines_to_protect(std::vector >& polylines, for (PolylineInputIterator poly_it = existing_polylines_begin; poly_it != existing_polylines_end; ++poly_it) { - Polyline polyline = *poly_it; + const Polyline& polyline = *poly_it; if (polyline.size() < 2) continue; - typename Polyline::iterator pit = polyline.begin(); - while (boost::next(pit) != polyline.end()) + typename Polyline::const_iterator pit = polyline.begin(); + while (std::next(pit) != polyline.end()) { vertex_descriptor v = g_manip.get_vertex(*pit, false); - vertex_descriptor w = g_manip.get_vertex(*boost::next(pit), false); + vertex_descriptor w = g_manip.get_vertex(*std::next(pit), false); g_manip.try_add_edge(v, w); ++pit; } @@ -1128,6 +1132,79 @@ polylines_to_protect(const CGAL::Image_3& cgal_image, existing_polylines_end); } +template +void +polylines_to_protect_on_bbox(const CGAL::Image_3& cgal_image, + std::vector >& polylines, + PolylineInputIterator existing_polylines_begin, + PolylineInputIterator existing_polylines_end) +{ + polylines_to_protect(cgal_image, + polylines, + existing_polylines_begin, + existing_polylines_end); +} + + + +template +void +merge_and_snap_polylines(const CGAL::Image_3& image, + PolylineRange1& polylines_to_snap, + const PolylineRange2& existing_polylines) +{ + static_assert(std::is_same::value, + "Polyline ranges should have same point type"); + using P = typename PolylineRange1::value_type::value_type; + using K = typename Kernel_traits

    ::Kernel; + + using CGAL::internal::polylines_to_protect_namespace::Vertex_info; + using Graph = boost::adjacency_list >; + using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; + + // build graph of polylines_to_snap + Graph graph; + typedef Mesh_3::internal::Returns_midpoint Midpoint_fct; + Mesh_3::internal::Graph_manipulations g_manip(graph); + + for (const auto& polyline : polylines_to_snap) + { + if (polyline.size() < 2) + continue; + + auto pit = polyline.begin(); + while (std::next(pit) != polyline.end()) + { + vertex_descriptor v = g_manip.get_vertex(*pit, false); + vertex_descriptor w = g_manip.get_vertex(*std::next(pit), false); + g_manip.try_add_edge(v, w); + ++pit; + } + } + + // snap graph to existing_polylines + snap_graph_vertices(graph, + image.vx(), image.vy(), image.vz(), + std::begin(existing_polylines), std::end(existing_polylines), + K()); + + // rebuild polylines_to_snap + polylines_to_snap.clear(); + Mesh_3::Polyline_visitor visitor(polylines_to_snap, graph); + Less_for_Graph_vertex_descriptors less(graph); + const Graph& const_graph = graph; + Mesh_3::Angle_tester angle_tester(90.); + split_graph_into_polylines(const_graph, visitor, angle_tester, less); +} + + } // namespace CGAL #endif // CGAL_MESH_3_POLYLINES_TO_PROTECT_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/radius_ratio.h b/thirdparty/CGAL/include/CGAL/Mesh_3/radius_ratio.h index 16bd799c..3c349f58 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/radius_ratio.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/radius_ratio.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/radius_ratio.h $ -// $Id: radius_ratio.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/radius_ratio.h $ +// $Id: include/CGAL/Mesh_3/radius_ratio.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -29,8 +29,7 @@ radius_ratio(const typename K::Point_3& p0, K k = K()) { typedef typename K::FT FT; - typename K::Compute_squared_distance_3 sq_distance = - k.compute_squared_distance_3_object(); + typename K::Compute_squared_radius_3 comp_sq_circumradius = k.compute_squared_radius_3_object(); typename K::Compute_volume_3 volume = diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h b/thirdparty/CGAL/include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h index 91610370..a933c691 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h $ -// $Id: search_for_connected_components_in_labeled_image.h a8877c5 2022-10-25T17:24:57+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h $ +// $Id: include/CGAL/Mesh_3/search_for_connected_components_in_labeled_image.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -47,7 +47,7 @@ search_for_connected_components_in_labeled_image(const CGAL::Image_3& image, const std::size_t nz = image.zdim(); const std::size_t size = nx * ny * nz; - typedef boost::uint16_t uint; + typedef std::uint16_t uint; if(nx > 65535 || ny > 65535 || nz > 65535) { @@ -95,9 +95,9 @@ search_for_connected_components_in_labeled_image(const CGAL::Image_3& image, % (long)static_evaluate(image.image(), i, j, k) % number_of_connected_components % (int)current_label; -#endif // CGAL_MESH_3_SEARCH_FOR_CONNECTED_COMPONENTS_IN_LABELED_IMAGE_VERBOSE int nb_voxels = 0; +#endif // CGAL_MESH_3_SEARCH_FOR_CONNECTED_COMPONENTS_IN_LABELED_IMAGE_VERBOSE Indices_queue queue; Indices indices(i, j ,k, 0); @@ -135,7 +135,9 @@ search_for_connected_components_in_labeled_image(const CGAL::Image_3& image, { visited[offset] = true; second_pass[offset] = false; +#ifdef CGAL_MESH_3_SEARCH_FOR_CONNECTED_COMPONENTS_IN_LABELED_IMAGE_VERBOSE ++nb_voxels; +#endif boost::get<0>(bbox_min) = (std::min)(i, boost::get<0>(bbox_min)); boost::get<0>(bbox_max) = (std::max)(i, boost::get<0>(bbox_max)); boost::get<1>(bbox_min) = (std::min)(j, boost::get<1>(bbox_min)); diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/sliver_criteria.h b/thirdparty/CGAL/include/CGAL/Mesh_3/sliver_criteria.h index ebc5a5ad..8c515873 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/sliver_criteria.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/sliver_criteria.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/sliver_criteria.h $ -// $Id: sliver_criteria.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/sliver_criteria.h $ +// $Id: include/CGAL/Mesh_3/sliver_criteria.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -36,9 +36,9 @@ template Base; typedef typename Base::Tetrahedron_3 Tetrahedron_3; typedef typename Base::Cell_vector Cell_vector; - typedef typename Base::Gt Gt; + typedef typename Base::GT GT; public: typedef typename Base::Cell_handle Cell_handle; @@ -163,7 +163,7 @@ class Radius_ratio_criterion { protected: typedef Sliver_criterion Base; - typedef typename Base::Gt Gt; + typedef typename Base::GT GT; typedef typename Base::Tetrahedron_3 Tetrahedron_3; typedef typename Base::Cell_vector Cell_vector; typedef Radius_ratio_criterion RR_criterion; diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/squared_distance_Point_3_Triangle_3.h b/thirdparty/CGAL/include/CGAL/Mesh_3/squared_distance_Point_3_Triangle_3.h index e2346306..930e5c6d 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/squared_distance_Point_3_Triangle_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/squared_distance_Point_3_Triangle_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/squared_distance_Point_3_Triangle_3.h $ -// $Id: squared_distance_Point_3_Triangle_3.h 5deb509 2021-04-12T14:42:44+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/squared_distance_Point_3_Triangle_3.h $ +// $Id: include/CGAL/Mesh_3/squared_distance_Point_3_Triangle_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_3/vertex_perturbation.h b/thirdparty/CGAL/include/CGAL/Mesh_3/vertex_perturbation.h index 73b0a700..440b6b33 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_3/vertex_perturbation.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_3/vertex_perturbation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h $ -// $Id: vertex_perturbation.h 9ab7e1e 2022-10-20T17:21:43+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h $ +// $Id: include/CGAL/Mesh_3/vertex_perturbation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -34,7 +34,7 @@ #endif #endif -#include +#include #include #include #include @@ -49,7 +49,7 @@ namespace Mesh_3 { namespace details { /** - * @brief Returns the angle in radian of vectors \c u and \c v + * @brief Returns the angle in radian of vectors `u` and `v` */ template typename K::FT @@ -98,7 +98,7 @@ angle_in_radian(const typename K::Vector_3& u, } /** - * @brief Returns the angle in radian of vectors \c u and \c v + * @brief Returns the angle in radian of vectors `u` and `v` */ template typename Kernel_traits::Kernel::FT @@ -108,21 +108,24 @@ angle_in_radian(const Vector_3& u, const Vector_3& v) } /** - * @brief Returns the squared length of edge \c e + * @brief Returns the squared length of edge `e`. */ template typename Tr::Geom_traits::FT edge_sq_length(const typename Tr::Edge& e, const Tr& tr) { - typedef typename Tr::Geom_traits Gt; + typedef typename Tr::Geom_traits GT; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; - typename Gt::Construct_point_3 cp = - tr.geom_traits().construct_point_3_object(); - typename Gt::Compute_squared_distance_3 sq_distance = + // There is no need to use tr.min_squared_distance() here because we are computing + // distances between vertices within a common cell, which means that even + // if we are using a periodic triangulation, the distance is correctly computed. + typename GT::Compute_squared_distance_3 sq_distance = tr.geom_traits().compute_squared_distance_3_object(); + typename GT::Construct_point_3 cp = + tr.geom_traits().construct_point_3_object(); const Weighted_point& wp = tr.point(e.first, e.second); const Weighted_point& wq = tr.point(e.first, e.third); @@ -133,8 +136,8 @@ edge_sq_length(const typename Tr::Edge& e, } /** - * @brief Returns the minimal incident edge length of \c v - * in triangulation \c tr + * @brief Returns the minimal incident edge length of `v` + * in triangulation `tr`. */ template typename Tr::Geom_traits::FT @@ -210,7 +213,7 @@ class Abstract_perturbation /** * @brief This operator try to move vertex \v using the perturbation. * @param v the vertex to move - * @param slivers a vector which contains incident slivers of \c v + * @param slivers a vector which contains incident slivers of `v` * @param c3t3 the c3t3 * @param domain the domain * @param criterion the criterion which is used to evaluate if a cell is @@ -219,12 +222,12 @@ class Abstract_perturbation * @param modified_vertices an output vector which contains vertices of c3t3 * which may have been impacted by v relocation. * @return a pair containing: - * - a bool which is \c true if a move has been done. + * - a bool which is `true` if a move has been done. * - a Vertex_handle which is always filled and may be the new vertex (if - * the move is a success), or the vertex which lies at \c v's position in + * the move is a success), or the vertex which lies at `v`'s position in * the new c3t3. * - * Note that this function is hill_climbing only. The min \c criterion value + * Note that this function is hill_climbing only. The min `criterion` value * of c3t3 could not decrease. */ std::pair @@ -390,9 +393,9 @@ class Gradient_based_perturbation typedef typename Base::Cell_handle Cell_handle; typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; @@ -432,7 +435,7 @@ class Gradient_based_perturbation /** * Tries to apply a gradient perturbation using direction of - * \c gradient_vector + * `gradient_vector` */ std::pair apply_perturbation(const Vertex_handle& v, @@ -447,15 +450,15 @@ class Gradient_based_perturbation const Tr& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); - typename Gt::Construct_weighted_point_3 cwp = + typename GT::Construct_weighted_point_3 cwp = tr.geom_traits().construct_weighted_point_3_object(); - typename Gt::Compute_squared_length_3 sq_length = + typename GT::Compute_squared_length_3 sq_length = tr.geom_traits().compute_squared_length_3_object(); - typename Gt::Construct_translated_point_3 translate = + typename GT::Construct_translated_point_3 translate = tr.geom_traits().construct_translated_point_3_object(); - typename Gt::Construct_vector_3 vector = + typename GT::Construct_vector_3 vector = tr.geom_traits().construct_vector_3_object(); // create a helper @@ -548,9 +551,9 @@ class Sq_radius_perturbation typedef typename Base::Vertex_handle Vertex_handle; typedef typename Base::Cell_handle Cell_handle; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; @@ -650,9 +653,9 @@ class Sq_radius_perturbation { const Triangulation& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); - typename Gt::Construct_translated_point_3 translate = + typename GT::Construct_translated_point_3 translate = c3t3.triangulation().geom_traits().construct_translated_point_3_object(); unsigned int index = cell->index(v); @@ -724,9 +727,9 @@ class Volume_perturbation typedef typename Base::Cell_handle Cell_handle; typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; @@ -827,7 +830,7 @@ class Volume_perturbation CGAL_precondition(cell->has_vertex(v)); const typename C3T3::Triangulation& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); const int i = cell->index(v); @@ -875,9 +878,9 @@ class Dihedral_angle_perturbation typedef typename Base::Cell_handle Cell_handle; typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; @@ -979,10 +982,13 @@ class Dihedral_angle_perturbation CGAL_assertion(cell->has_vertex(v)); const typename C3T3::Triangulation& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = - tr.geom_traits().construct_point_3_object(); - typename Gt::Compute_squared_distance_3 sq_distance = + // There is no need to use tr.min_squared_distance() here because we are computing + // distances between vertices within a common cell, which means that even + // if we are using a periodic triangulation, the distance is correctly computed. + typename GT::Compute_squared_distance_3 sq_distance = tr.geom_traits().compute_squared_distance_3_object(); + typename GT::Construct_point_3 cp = + tr.geom_traits().construct_point_3_object(); const int i = cell->index(v); const Weighted_point& wp0 = tr.point(cell, i); @@ -1041,9 +1047,9 @@ class Dihedral_angle_perturbation { const typename C3T3::Triangulation& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); - typename Gt::Compute_approximate_dihedral_angle_3 approx_dihedral_angle = + typename GT::Compute_approximate_dihedral_angle_3 approx_dihedral_angle = tr.geom_traits().compute_approximate_dihedral_angle_3_object(); const Weighted_point& wp1 = tr.point(cell, k1); @@ -1054,7 +1060,7 @@ class Dihedral_angle_perturbation } /** - * @brief returns the cotangent of \c value + * @brief returns the cotangent of `value`. */ FT cotangent(const FT& value) const { @@ -1062,14 +1068,14 @@ class Dihedral_angle_perturbation } /** - * @brief returns the normal of facet (ch,i), oriented from inside to outside - * of \c ch + * @brief returns the normal of facet `(ch,i)`, oriented from inside to outside + * of `ch`. */ Vector_3 normal_estimate(const C3T3& c3t3, const Cell_handle& ch, const int i) const { const typename C3T3::Triangulation& tr = c3t3.triangulation(); - typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename GT::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); int k1 = (i+1)&3; int k2 = (i+2)&3; @@ -1108,9 +1114,9 @@ class Random_based_perturbation typedef typename Base::Cell_handle Cell_handle; typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Bare_point Bare_point; @@ -1157,7 +1163,7 @@ class Random_based_perturbation FT sphere_sq_radius() const { return sphere_sq_radius_; } /** - * @brief returns a FT between \c min and \c max + * @brief returns a FT between `min` and `max`. */ FT random_ft(const FT& min = FT(0.), const FT& max = FT(1.)) const { @@ -1166,12 +1172,12 @@ class Random_based_perturbation } /** - * @brief returns a random vector with size \c vector_size + * @brief returns a random vector with size `vector_size`. */ Vector_3 random_vector_fixed_size(const C3T3& c3t3, const FT& vector_sq_size) const { - typename Gt::Compute_squared_length_3 sq_length = + typename GT::Compute_squared_length_3 sq_length = c3t3.triangulation().geom_traits().compute_squared_length_3_object(); Vector_3 rnd_vector(random_ft(),random_ft(),random_ft()); @@ -1184,7 +1190,7 @@ class Random_based_perturbation } /** - * @brief returns a random vector with size between 0 and \c vector_size + * @brief returns a random vector with size between 0 and `vector_size`. */ Vector_3 random_vector_max_size(const C3T3& c3t3, const FT& vector_max_sq_size) const @@ -1236,9 +1242,9 @@ class Li_random_perturbation typedef typename Base::Cell_handle Cell_handle; typedef typename C3T3::Triangulation Tr; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Gt::Vector_3 Vector_3; + typedef typename Tr::Geom_traits GT; + typedef typename GT::FT FT; + typedef typename GT::Vector_3 Vector_3; typedef typename Tr::Bare_point Bare_point; typedef typename Tr::Weighted_point Weighted_point; @@ -1299,7 +1305,7 @@ class Li_random_perturbation // ----------------------------------- /** - * @brief try to improve mesh using random moves of \c v + * @brief tries to improve mesh using random moves of `v`. */ std::pair apply_perturbation(const Vertex_handle& v, @@ -1313,13 +1319,13 @@ class Li_random_perturbation { typedef Triangulation_helpers Th; - typename Gt::Construct_point_3 cp = + typename GT::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); - typename Gt::Construct_weighted_point_3 cwp = + typename GT::Construct_weighted_point_3 cwp = c3t3.triangulation().geom_traits().construct_weighted_point_3_object(); - typename Gt::Construct_translated_point_3 translate = + typename GT::Construct_translated_point_3 translate = c3t3.triangulation().geom_traits().construct_translated_point_3_object(); - typename Gt::Construct_vector_3 vector = + typename GT::Construct_vector_3 vector = c3t3.triangulation().geom_traits().construct_vector_3_object(); modified_vertices.clear(); @@ -1410,7 +1416,7 @@ class Li_random_perturbation } private: - // If set to \c true, then random point will be generated on sphere surface. + // If set to `true`, then random points will be generated on sphere surface. bool on_sphere_; }; diff --git a/thirdparty/CGAL/include/CGAL/Mesh_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Mesh_cell_base_3.h index 11727733..226033a4 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_cell_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_cell_base_3.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_cell_base_3.h $ -// $Id: Mesh_cell_base_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_cell_base_3.h $ +// $Id: include/CGAL/Mesh_cell_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -15,7 +15,7 @@ #ifndef CGAL_MESH_CELL_BASE_3_H #define CGAL_MESH_CELL_BASE_3_H -#include +#include // #define CGAL_DEPRECATED_HEADER "" @@ -27,11 +27,9 @@ #include #include #include -#include +#include #include -#include - #ifdef CGAL_LINKED_WITH_TBB # include #endif @@ -95,14 +93,45 @@ class Mesh_cell_base_3_base // Class Mesh_cell_base_3 // Cell base class used in 3D meshing process. // Adds information to Cb about the cell of the input complex containing it -template< class GT, - class MD, - class Cb= CGAL::Regular_triangulation_cell_base_with_weighted_circumcenter_3< - GT, CGAL::Regular_triangulation_cell_base_3 > > +/*! +\ingroup PkgMesh3MeshClasses + + +The class `Mesh_cell_base_3` is a model of the concept `MeshCellBase_3`. +It is designed to serve as cell base class for the 3D triangulation +used in the 3D mesh generation process. + +\tparam GT is the geometric traits class. +It has to be a model of the concept `MeshTriangulationTraits_3`. + +\tparam MD provides the types of indices used to identify +the faces of the input complex. It has to be a model +of the concept `MeshDomain_3`. + +\tparam Cb is the cell base class. It has to be a model +of the concept `RegularTriangulationCellBaseWithWeightedCircumcenter_3` and defaults to +`Regular_triangulation_cell_base_with_weighted_circumcenter_3`. + +\cgalModels{MeshCellBase_3} + +\sa `CGAL::Mesh_complex_3_in_triangulation_3` +\sa `CGAL::Compact_mesh_cell_base_3` + +*/ +template > > class Mesh_cell_base_3 -: public Mesh_3::Mesh_surface_cell_base_3, - public Mesh_cell_base_3_base< - typename Mesh_3::Mesh_surface_cell_base_3::Tds::Concurrency_tag> +#ifndef DOXYGEN_RUNNING + : public Mesh_3::Mesh_surface_cell_base_3, + public Mesh_cell_base_3_base::Tds::Concurrency_tag> +#endif { typedef typename GT::FT FT; @@ -131,7 +160,6 @@ class Mesh_cell_base_3 typedef Mesh_cell_base_3 Other; }; - // Constructors Mesh_cell_base_3() : Base() , subdomain_index_() @@ -193,6 +221,9 @@ class Mesh_cell_base_3 bool is_cache_valid() const { return sliver_cache_validity_; } void reset_cache_validity() const { sliver_cache_validity_ = false; } + /// \name I/O + ///@{ + static std::string io_signature() { @@ -201,6 +232,8 @@ class Mesh_cell_base_3 + Get_io_signature()(); } + /// @} + #ifdef CGAL_INTRUSIVE_LIST public: Cell_handle next_intrusive() const { return next_intrusive_; } @@ -216,8 +249,9 @@ class Mesh_cell_base_3 } #endif // CGAL_INTRUSIVE_LIST - /// For the determinism of Compact_container iterators + /// \name Determinism ///@{ + typedef Tag_true Has_timestamp; std::size_t time_stamp() const { @@ -226,6 +260,7 @@ class Mesh_cell_base_3 void set_time_stamp(const std::size_t& ts) { time_stamp_ = ts; } + ///@} private: diff --git a/thirdparty/CGAL/include/CGAL/Mesh_cell_criteria_3.h b/thirdparty/CGAL/include/CGAL/Mesh_cell_criteria_3.h index 7969f2b7..ad1f3915 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_cell_criteria_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_cell_criteria_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_cell_criteria_3.h $ -// $Id: Mesh_cell_criteria_3.h 393ae7d 2021-05-12T15:03:53+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_cell_criteria_3.h $ +// $Id: include/CGAL/Mesh_cell_criteria_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,11 +27,42 @@ namespace CGAL { -template > +/*! +\ingroup PkgMesh3MeshClasses + +The class `Mesh_cell_criteria_3` is a model of `MeshCellCriteria_3`. It provides, +for the mesh tetrahedra, +a uniform shape criterion +and a sizing field which may be a uniform or variable field. + +\tparam Tr must be identical to the nested type +`Triangulation` of the instance used as model of +`MeshComplex_3InTriangulation_3`. + +\cgalModels{MeshCellCriteria_3} + +\sa `MeshCriteria_3` +\sa `CGAL::Mesh_criteria_3` +\sa `CGAL::make_mesh_3()` +*/ +template +#endif + > class Mesh_cell_criteria_3 { public: + /// \name Types + /// @{ + + /*! + Numerical type + */ + typedef typename Tr::Geom_traits::FT FT; + + /// @} + typedef Visitor_ Visitor; typedef typename Visitor::Cell_quality Cell_quality; typedef typename Visitor::Is_cell_bad Is_cell_bad; @@ -41,20 +72,36 @@ class Mesh_cell_criteria_3 typedef Mesh_3::Criteria Criteria; typedef typename Tr::Cell_handle Cell_handle; - typedef typename Tr::Geom_traits::FT FT; typedef Mesh_cell_criteria_3 Self; public: - /** - * @brief Constructor - * @param radius_edge_bound the radius-edge bound - * @param radius_bound the radius bound (tet sizing) + /// \name Creation +/// @{ + + /*! + * Returns an object to serve as default criteria for cells. + * @param radius_edge_bound is the upper bound for the radius-edge + * ratio of the tetrahedra. + * @param radius_bound is a uniform upper bound + for the circumradii of the tetrahedra in the mesh + * + * @param min_radius_bound is a uniform lower bound for the + * circumradii of the tetrahedra in the mesh. + * Only cells with a circumradius larger than that + * bound will be refined. + * + * See Section \ref introsecparam for further details. + * Note that if one parameter is set to 0, then its corresponding criterion is ignored. */ Mesh_cell_criteria_3(const FT& radius_edge_bound, - const FT& radius_bound) + const FT& radius_bound, + const FT& min_radius_bound = 0.) { + if (FT(0) != min_radius_bound) + init_min_radius(min_radius_bound); + if ( FT(0) != radius_bound ) init_radius(radius_bound); @@ -64,26 +111,44 @@ class Mesh_cell_criteria_3 // Nb: SFINAE to avoid wrong matches with built-in numerical types // as int. + + /*! + Returns an object to serve as default criteria for facets. + @tparam SizingField must be a model of the concept + `MeshDomainField_3`. + + The behavior and semantic of the arguments are the same + as above, except that the radius bound parameter is a functional + instead of a constant. + */ template - Mesh_cell_criteria_3(const FT& radius_edge_bound, - const Sizing_field& radius_bound, - typename std::enable_if< + Mesh_cell_criteria_3(const FT& radius_edge_bound + ,const Sizing_field& radius_bound + ,const FT& min_radius_bound = 0. +#ifndef DOXYGEN_RUNNING + ,std::enable_if_t< Mesh_3::Is_mesh_domain_field_3::value - >::type* = 0 + >* = 0 +#endif ) { + if (FT(0) != min_radius_bound) + init_min_radius(min_radius_bound); + init_radius(radius_bound); if ( FT(0) != radius_edge_bound ) init_radius_edge(radius_edge_bound); } - /// Destructor + /// @} + + // Destructor ~Mesh_cell_criteria_3() { } /** - * @brief returns whether the cell \c cell is bad or not. - * @param tr the triangulation within which \c cell lives + * @brief returns whether the cell `cell` is bad or not. + * @param tr the triangulation within which `cell` lives * @param cell the cell */ Is_cell_bad operator()(const Tr& tr, const Cell_handle& cell) const @@ -91,10 +156,12 @@ class Mesh_cell_criteria_3 return criteria_(tr, cell); } +#ifndef DOXYGEN_RUNNING void add(Abstract_criterion* criterion) { criteria_.add(criterion); } +#endif private: void init_radius_edge(const FT& radius_edge_bound) @@ -118,6 +185,13 @@ class Mesh_cell_criteria_3 criteria_.add(new Radius_criterion(radius_bound)); } + void init_min_radius(const FT& min_radius_bound) + { + typedef Mesh_3::Cell_uniform_size_criterion Radius_criterion; + criteria_.add(new Radius_criterion(min_radius_bound, true/*lower bound*/)); + } + + private: Criteria criteria_; diff --git a/thirdparty/CGAL/include/CGAL/Mesh_complex_3_in_triangulation_3.h b/thirdparty/CGAL/include/CGAL/Mesh_complex_3_in_triangulation_3.h index ccb7098f..ff819f22 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_complex_3_in_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_complex_3_in_triangulation_3.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h $ -// $Id: Mesh_complex_3_in_triangulation_3.h 591141b 2021-09-27T14:57:10+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h $ +// $Id: include/CGAL/Mesh_complex_3_in_triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,64 +18,222 @@ #ifndef CGAL_MESH_COMPLEX_3_IN_TRIANGULATION_3_H #define CGAL_MESH_COMPLEX_3_IN_TRIANGULATION_3_H -#include +#include -#include +#include #include #include -#include -#include -#include +#include +#include #include +#include +#include +#include + +#include +#include #include #include #include #include -#include #include +#include +#include +#include + +#include +#include + + +#ifdef CGAL_LINKED_WITH_TBB +#include +#include + +namespace CGAL { + template < class DSC, bool Const > + std::size_t tbb_hasher(const CGAL::internal::CC_iterator& it) + { + return CGAL::internal::hash_value(it); + } + + // As Marc Glisse pointed out the TBB hash of a std::pair is + // simplistic and leads to the + // TBB Warning: Performance is not optimal because the hash function + // produces bad randomness in lower bits in class + // tbb::interface5::concurrent_hash_map + template < class DSC, bool Const > + std::size_t tbb_hasher(const std::pair, + CGAL::internal::CC_iterator >& p) + { + return boost::hash, + CGAL::internal::CC_iterator > >()(p); + } + + struct Hash_compare_for_TBB { + template < class DSC, bool Const > + std::size_t hash(const std::pair, + CGAL::internal::CC_iterator >& p) const + { + return tbb_hasher(p); + } + template < class DSC, bool Const > + std::size_t operator()(const CGAL::internal::CC_iterator& it) + { + return CGAL::internal::hash_value(it); + } + template + bool equal(const T& v1, const T& v2) const { + return v1 == v2; + } + }; +}//end namespace CGAL +#endif namespace CGAL { + namespace SMDS_3 { + + namespace details { + template + class C3t3_helper_class + { + protected: + typedef typename Tr::Vertex_handle Vertex_handle; + typedef typename Tr::Cell_handle Cell_handle; + typedef typename Tr::Facet Facet; + typedef typename Tr::Edge Edge; + + typedef std::pair Pair_of_vertices; + + // computes and returns an ordered pair of Vertex + Pair_of_vertices + make_ordered_pair(const Vertex_handle vh1, const Vertex_handle vh2) const { + if (vh1 < vh2) { + return std::make_pair(vh1, vh2); + } + else { + return std::make_pair(vh2, vh1); + } + } + // same from an Edge + Pair_of_vertices + make_ordered_pair(const Edge e) const { + return make_ordered_pair(e.first->vertex(e.second), + e.first->vertex(e.third)); + } + Facet canonical_facet(Cell_handle c, int i) const { + Cell_handle c2 = c->neighbor(i); + return (c2 < c) ? std::make_pair(c2, c2->index(c)) : std::make_pair(c, i); + } + }; // end class template C3t3_helper_class + + } // end namespace SMDS_3::details + } //end namespace SMDS_3 + +/*! + \ingroup PkgSMDS3Classes + + \brief A data structure to represent and maintain a 3D complex embedded + in a 3D triangulation. + + The class `Mesh_complex_3_in_triangulation_3` implements a data structure + to store the 3D restricted Delaunay triangulation used by a mesh + generation process. + + This class is a model of the concept + `MeshComplexWithFeatures_3InTriangulation_3`. + + \tparam Tr can be instantiated with any 3D + triangulation of \cgal provided that its + vertex and cell base class are models of the concepts + `SimplicialMeshVertexBase_3` and `SimplicialMeshCellBase_3`, respectively. + + \tparam CornerIndex Type of indices for corners (i.e.\f$ 0\f$--dimensional features) + of the discretized geometric domain. + It must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible` and + `LessThanComparable`. + It must match the `Corner_index` of the model + of the `MeshDomainWithFeatures_3` concept when used for mesh generation. + + \tparam CurveIndex Type of indices for curves (i.e. \f$ 1\f$-dimensional features) + of the discretized geometric domain. + It must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible` and + `LessThanComparable`. The default constructed value must be the value for an edge which + does not approximate a 1-dimensional feature of the geometric domain. + It must match the `Curve_index` types of the model + of the `MeshDomainWithFeatures_3` concept when used for mesh generation. + + Those two last template parameters default to `int`, so that they can be ignored + if the domain used for mesh generation does not include 0 and 1-dimensionnal features (i.e + is only a model of the concept `MeshDomain_3`). + + \cgalModels{MeshComplexWithFeatures_3InTriangulation_3} + + \sa \link make_mesh_3() `CGAL::make_mesh_3()`\endlink + \sa \link refine_mesh_3() `CGAL::refine_mesh_3()`\endlink + \sa `MeshComplex_3InTriangulation_3` + \sa `MeshComplexWithFeatures_3InTriangulation_3` + \sa `SimplicialMeshCellBase_3`, + \sa `SimplicialMeshVertexBase_3` + +*/ template -class Mesh_complex_3_in_triangulation_3 : - public Mesh_3::Mesh_complex_3_in_triangulation_3_base< - Tr, typename Tr::Concurrency_tag> - , public CGAL::Mesh_3::internal::Debug_messages_tools +class Mesh_complex_3_in_triangulation_3 +#ifndef DOXYGEN_RUNNING + : public CGAL::SMDS_3::details::C3t3_helper_class + , public CGAL::SMDS_3::internal::Debug_messages_tools +#endif { public: typedef typename Tr::Concurrency_tag Concurrency_tag; private: typedef Mesh_complex_3_in_triangulation_3< - Tr,CornerIndex,CurveIndex> Self; - typedef Mesh_3::Mesh_complex_3_in_triangulation_3_base< - Tr,Concurrency_tag> Base; + Tr,CornerIndex,CurveIndex> Self; + typedef SMDS_3::details::C3t3_helper_class Base; + typedef CGAL::Hash_handles_with_or_without_timestamps Hash_fct; public: - typedef typename Base::size_type size_type; - - typedef typename Tr::Point Point; - typedef typename Base::Edge Edge; - typedef typename Base::Facet Facet; - typedef typename Base::Vertex_handle Vertex_handle; - typedef typename Base::Cell_handle Cell_handle; - typedef CornerIndex Corner_index; - typedef CurveIndex Curve_index; - - typedef CGAL::Hash_handles_with_or_without_timestamps Hash_fct; #ifndef CGAL_NO_DEPRECATED_CODE typedef CurveIndex Curve_segment_index; #endif - typedef typename Base::Triangulation Triangulation; - typedef typename Base::Subdomain_index Subdomain_index; +/// \name Types +/// @{ + typedef Tr Triangulation; + typedef typename Tr::size_type size_type; + typedef typename Tr::Point Point; + typedef typename Tr::Edge Edge; + typedef typename Tr::Facet Facet; + typedef typename Tr::Vertex_handle Vertex_handle; + typedef typename Tr::Cell_handle Cell_handle; + /*! + Index type. + */ + typedef typename Tr::Vertex::Index Index; + /*! + Surface index type. + */ + typedef typename Tr::Cell::Surface_patch_index Surface_patch_index; + /*! + Subdomain index type. + */ + typedef typename Tr::Cell::Subdomain_index Subdomain_index; + /*! + Corner index type. + */ + typedef CornerIndex Corner_index; + /*! + Curve index type. + */ + typedef CurveIndex Curve_index; +/// @} - using Base::surface_patch_index; private: // Type to store the edges: @@ -99,11 +257,35 @@ class Mesh_complex_3_in_triangulation_3 : typedef std::vector Far_vertices_vec; public: - /** - * Constructor - */ - Mesh_complex_3_in_triangulation_3() = default; + enum Face_status { + NOT_IN_COMPLEX = 0, + ISOLATED = 1, // - An ISOLATED edge is a marked edge, + // without any incident facets. + BOUNDARY, // - An edge is on BOUNDARY if it has only + // one incident facet. + // - A vertex is on BOUNDARY if all its + // incident edges are REGULAR or on + // BOUNDARY, at least one is on + // BOUNDARY, and the incident facets + // form only one connected component. + REGULAR, // - A facet that is in the complex is + // REGULAR. + // - An edge is REGULAR if it has + // exactly two incident facets. + // - A vertex is REGULAR if all it + // incident edges are REGULAR, and the + // incident facets form only one + // connected component. + SINGULAR // - SINGULAR is for all other cases. + }; +/// \name Creation +/// @{ + /** + * @brief Constructor + * builds an empty 3D complex. + */ + Mesh_complex_3_in_triangulation_3(); /** * Copy constructor */ @@ -112,16 +294,11 @@ class Mesh_complex_3_in_triangulation_3 : /** * Move constructor */ - Mesh_complex_3_in_triangulation_3(Self&& rhs) - : Base(std::move(rhs)) - , edges_(std::move(rhs.edges_)) - , corners_(std::move(rhs.corners_)) - , far_vertices_(std::move(rhs.far_vertices_)) - {} + Mesh_complex_3_in_triangulation_3(Self&& rhs); /** - * Assignement operator, also serves as move-assignement - */ + * Assignment operator, also serves as move-assignment + */ Self& operator=(Self rhs) { swap(rhs); @@ -129,38 +306,76 @@ class Mesh_complex_3_in_triangulation_3 : } /** - * Swaps this & rhs + * swaps `this` and `rhs` */ void swap(Self& rhs) { - Base::swap(rhs); + Swap_elements swapper; + swapper(rhs.number_of_facets_, number_of_facets_); + tr_.swap(rhs.tr_); + swapper(rhs.number_of_cells_, number_of_cells_); + edges_.swap(rhs.edges_); corners_.swap(rhs.corners_); far_vertices_.swap(rhs.far_vertices_); } +/// @} + +/// \name Access Functions +/// @{ + /// returns a const reference to the triangulation + const Triangulation& triangulation() const { return tr_; } +/// @} + +/// \name Non const access +/// @{ + /// returns a reference to the triangulation + Triangulation& triangulation() { return tr_; } +/// @} + + +/// \name Modifiers +/// @{ /** - * Clears data of c3t3 + * clears data of the complex */ void clear() { - Base::clear(); + number_of_cells_ = 0; + number_of_facets_ = 0; + clear_manifold_info(); + tr_.clear(); edges_.clear(); corners_.clear(); far_vertices_.clear(); } - /// Import Base functions - using Base::is_in_complex; - using Base::add_to_complex; - using Base::remove_from_complex; - using Base::triangulation; - using Base::set_surface_patch_index; - + /** adds cell \p cell to the 3D complex, with subdomain index \p index + */ + void add_to_complex(const Cell_handle& cell, const Subdomain_index& index) + { + CGAL_precondition(!(index == Subdomain_index())); + if (!is_in_complex(cell)) + { + set_subdomain_index(cell, index); + ++number_of_cells_; + } + } + /** adds facet \p facet to the 2D complex, with surface index \p index + */ + void add_to_complex(const Facet& facet, const Surface_patch_index& index) + { + add_to_complex(facet.first, facet.second, index); + } + /** adds facet(\p cell, \p i) to the 2D complex, with surface index \p index + */ + void add_to_complex(const Cell_handle& cell, + const int i, + const Surface_patch_index& index); - /** - * Add edge e to complex, with Curve_index index + /** adds edge \p e to complex, with curve index \p index */ void add_to_complex(const Edge& e, const Curve_index& index) @@ -171,7 +386,7 @@ class Mesh_complex_3_in_triangulation_3 : } /** - * Add edge (v1,v2) to complex, with Curve_index index + * adds edge (\p v1, \p v2) to the 1D complex, with `Curve_index` \p index */ void add_to_complex(const Vertex_handle& v1, const Vertex_handle& v2, @@ -181,7 +396,7 @@ class Mesh_complex_3_in_triangulation_3 : } /** - * Mark vertex \c v as a corner of the complex + * marks vertex \p v as a corner of the complex */ void add_to_complex(const Vertex_handle& v, const Corner_index& index) { @@ -189,8 +404,27 @@ class Mesh_complex_3_in_triangulation_3 : corners_.insert(std::make_pair(v,index)); } + /** removes cell \p cell from the 3D complex + */ + void remove_from_complex(const Cell_handle& cell) + { + if (is_in_complex(cell)) + { + set_subdomain_index(cell, Subdomain_index()); + --number_of_cells_; + } + } + /** removes facet \p facet from the 2D complex + */ + void remove_from_complex(const Facet& facet); + + /** removes facet(\p cell, \p i) from the 2D complex + */ + void remove_from_complex(const Cell_handle& c, const int i) { + remove_from_complex(Facet(c, i)); + } /** - * Remove edge \c e from complex + * removes edge \p e from the 1D complex */ void remove_from_complex(const Edge& e) { @@ -198,7 +432,7 @@ class Mesh_complex_3_in_triangulation_3 : } /** - * Remove edge (v1,v2) from complex + * removes edge (v1,v2) from the 1D complex */ void remove_from_complex(const Vertex_handle& v1, const Vertex_handle& v2) { @@ -206,7 +440,7 @@ class Mesh_complex_3_in_triangulation_3 : } /** - * Remove vertex \c v from complex + * removes vertex \p v from the complex */ void remove_from_complex(const Vertex_handle& v) { @@ -214,6 +448,116 @@ class Mesh_complex_3_in_triangulation_3 : v->set_dimension(-1); } + /** sets the index of vertex \p vertex to \p index + */ + void set_index(const Vertex_handle& vertex, const Index& index) const + { + vertex->set_index(index); + } + /** sets the surface index of facet \p facet to \p index + */ + void set_surface_patch_index(const Facet& f, const Surface_patch_index& index) + { + set_surface_patch_index(f.first, f.second, index); + } + /** sets the surface index of facet(\p cell, \p i) to \p index + */ + void set_surface_patch_index(const Cell_handle& cell, + const int i, + const Surface_patch_index& index) const + { + cell->set_surface_patch_index(i, index); + } + /** sets the subdomain index of cell \p cell to \p index + */ + void set_subdomain_index(const Cell_handle& cell, + const Subdomain_index& index) const + { + cell->set_subdomain_index(index); + } + /** sets the dimension of vertex \p vertex to \p dimension + */ + void set_dimension(const Vertex_handle& vertex, int dimension) const + { + vertex->set_dimension(dimension); + } +/// @} + +/// \name Queries on the identifier of the face complex including triangulation cells, facets, and vertices. +/// @{ + /** returns the index of vertex \p v + */ + Index index(const Vertex_handle& v) const { return v->index(); } + + /** returns the subdomain index of cell \p cell + */ + Subdomain_index subdomain_index(const Cell_handle& cell) const + { + return cell->subdomain_index(); + } + /** returns the surface index of facet \p f + */ + Surface_patch_index surface_patch_index(const Facet& f) const + { + return surface_patch_index(f.first, f.second); + } + + /** returns the surface index of facet(\p cell, \p i) + */ + Surface_patch_index surface_patch_index(const Cell_handle& cell, + const int i) const + { + return cell->surface_patch_index(i); + } + /** returns the dimension of the lowest dimensional face of the input 3D + * complex that contains the vertex + */ + int in_dimension(const Vertex_handle& v) const { return v->in_dimension(); } + + /** + * returns the curve index of edge \p e + */ + Curve_index curve_index(const Edge& e) const + { + return curve_index(e.first->vertex(e.second), + e.first->vertex(e.third)); + } + + /** + * returns the curve index of the edge formed by \p v1 and \p v2 + */ + Curve_index curve_index(const Vertex_handle& v1, + const Vertex_handle& v2) const + { + return curve_index(make_internal_edge(v1, v2)); + } + + /** + * returns the corner index of vertex \p v + */ + Corner_index corner_index(const Vertex_handle& v) const + { + typename Corner_map::const_iterator it = corners_.find(v); + if (corners_.end() != it) { return it->second; } + return Corner_index(); + } +/// @} + +#ifndef CGAL_NO_DEPRECATED_CODE + CGAL_DEPRECATED + Curve_index curve_segment_index(const Edge& e) const + { + return curve_index(e); + } + + CGAL_DEPRECATED + Curve_index curve_segment_index(const Vertex_handle& v1, + const Vertex_handle& v2) const + { + return curve_index(v1, v2); + } +#endif // CGAL_NO_DEPRECATED_CODE + std::size_t number_of_far_points() const { return far_vertices_.size(); @@ -229,6 +573,7 @@ class Mesh_complex_3_in_triangulation_3 : far_vertices_.push_back(vh); } + void remove_isolated_vertex(Vertex_handle v) { Triangulation& tr = triangulation(); @@ -271,22 +616,38 @@ class Mesh_complex_3_in_triangulation_3 : //triangulation().remove(far_vertices_.begin(), far_vertices_.end()); typename Far_vertices_vec::const_iterator it = far_vertices_.begin(); typename Far_vertices_vec::const_iterator it_end = far_vertices_.end(); - for ( ; it != it_end ; ++it) + for (; it != it_end; ++it) { remove_isolated_vertex(*it); } far_vertices_.clear(); } + /*! + The tetrahedral mesh generation algorithm implemented in + \link make_mesh_3() `CGAL::make_mesh_3()`\endlink + and \link refine_mesh_3() `CGAL::refine_mesh_3()`\endlink + does not guarantee that all the points inserted + by the algorithm are actually present in the final mesh. + + In most cases, all points are used, but if the geometry of the object + has small features compared to the size of the simplices (triangles and tetrahedra), + it might be that the Delaunay facets that are selected in the restricted Delaunay + triangulation miss some vertices of the triangulation. + The concurrent version of the tetrahedral mesh generation algorithm + also inserts a small set of auxiliary vertices that belong to the triangulation + but are isolated from the complex at the end of the meshing process. + + This function removes these so-called \em isolated vertices, that belong to the + triangulation but not to any simplex of the `C3T3`, from the triangulation. + */ void remove_isolated_vertices() { Triangulation& tr = triangulation(); for (Vertex_handle v : tr.finite_vertex_handles()) v->set_meshing_info(0); - for (typename Base::Cells_in_complex_iterator c = this->cells_in_complex_begin(); - c != this->cells_in_complex_end(); - ++c) + for (Cell_handle c : this->cells_in_complex()) { for (int i = 0; i < 4; ++i) { @@ -295,12 +656,9 @@ class Mesh_complex_3_in_triangulation_3 : } } - for (typename Base::Facets_in_complex_iterator fit = this->facets_in_complex_begin(); - fit != this->facets_in_complex_end(); - ++fit) + for (Facet f :this->facets_in_complex()) { - Facet f = *fit; - for (int i = 1; i < 4; ++i) + for (int i = 1; i < 4; ++i) { Vertex_handle vi = f.first->vertex((f.second + i) % 4); vi->set_meshing_info(vi->meshing_info() + 1); @@ -310,7 +668,8 @@ class Mesh_complex_3_in_triangulation_3 : std::vector isolated; for (Vertex_handle v : tr.finite_vertex_handles()) { - if (v->meshing_info() == 0.) + if (v->meshing_info() == 0. + && (v->in_dimension() > 1 || v->in_dimension() < 0)) isolated.push_back(v); } @@ -330,34 +689,82 @@ class Mesh_complex_3_in_triangulation_3 : #endif } + void rescan_after_load_of_triangulation(); + +/// \name Queries on the faces of the embedded complex +/// @{ + /** + * returns the number of cells which belong to the 3D complex + */ + size_type number_of_cells_in_complex() const { return number_of_cells_; } + /** + * returns the number of cells which belong to the 3D complex + */ + size_type number_of_cells() const + { + return number_of_cells_in_complex(); + } /** - * Returns the number of edges of c3t3 + * returns the number of surface facets of the complex + */ + size_type number_of_facets_in_complex() const { return number_of_facets_; } + /** + * returns the number of surface facets of the complex + */ + size_type number_of_facets() const + { + return number_of_facets_in_complex(); + } + /** + * returns the number of edges of the complex */ size_type number_of_edges_in_complex() const { return edges_.size(); } + /** + * returns the number of edges of the complex + */ size_type number_of_edges() const { return edges_.size(); } - /** - * Returns the number of corners of c3t3 + * returns the number of corners of the complex */ size_type number_of_vertices_in_complex() const { return corners_.size(); } + /** + * returns the number of corners of the complex + */ size_type number_of_corners() const { return corners_.size(); } + /** + * returns \c true if cell \p cell belongs to the 3D complex + */ + bool is_in_complex(const Cell_handle& cell) const + { + return !(subdomain_index(cell) == Subdomain_index()); + } + /** returns true if facet \p facet belongs to the 2D complex + */ + bool is_in_complex(const Facet& facet) const + { + return is_in_complex(facet.first, facet.second); + } - void rescan_after_load_of_triangulation(); - + /** returns true if facet (\p cell, \p i) belongs to the 2D complex + */ + bool is_in_complex(const Cell_handle& cell, const int i) const + { + return (cell->is_facet_on_surface(i)); + } /** - * Returns true if edge \c e is in complex + * returns true if edge \p e belongs to the 1D complex */ bool is_in_complex(const Edge& e) const { @@ -365,7 +772,7 @@ class Mesh_complex_3_in_triangulation_3 : } /** - * Returns true if edge (v1,v2) is in C3T3 + * returns true if edge (v1,v2) belongs to the 1D complex */ bool is_in_complex(const Vertex_handle& v1, const Vertex_handle& v2) const { @@ -373,55 +780,19 @@ class Mesh_complex_3_in_triangulation_3 : } /** - * Returns true if \c v is a 0-dimensionnal feature in the c3t3 + * returns true if \p v is a 0-dimensionnal feature in the complex */ bool is_in_complex(const Vertex_handle& v) const { return (corners_.find(v) != corners_.end()); } +/// @} - /** - * Returns Curve_index of edge \c e - */ - Curve_index curve_index(const Edge& e) const - { - return curve_index(e.first->vertex(e.second), - e.first->vertex(e.third)); - } - - Curve_index curve_index(const Vertex_handle& v1, - const Vertex_handle& v2) const - { - return curve_index(make_internal_edge(v1,v2)); - } - -#ifndef CGAL_NO_DEPRECATED_CODE - CGAL_DEPRECATED - Curve_index curve_segment_index(const Edge& e) const - { - return curve_index(e); - } - - CGAL_DEPRECATED - Curve_index curve_segment_index(const Vertex_handle& v1, - const Vertex_handle& v2) const - { - return curve_index(v1, v2); - } -#endif // CGAL_NO_DEPRECATED_CODE - - /** - * Returns Corner_index of vertex \c v - */ - Corner_index corner_index(const Vertex_handle& v) const - { - typename Corner_map::const_iterator it = corners_.find(v); - if ( corners_.end() != it ) { return it->second; } - return Corner_index(); - } + /// \name I/O Functions + /// @{ /** - * Outputs the outer boundary of the entire domain with facets oriented outward. + * outputs the outer boundary of the entire domain, with facets oriented outward. */ std::ostream& output_boundary_to_off(std::ostream& out) const { @@ -430,7 +801,7 @@ class Mesh_complex_3_in_triangulation_3 : } /** - * Outputs the outer boundary of the selected subdomain with facets oriented outward. + * outputs the outer boundary of the selected subdomain, with facets oriented outward. */ std::ostream& output_boundary_to_off(std::ostream& out, Subdomain_index subdomain) const { @@ -439,7 +810,7 @@ class Mesh_complex_3_in_triangulation_3 : } /** - * Outputs the surface facets with a consistent orientation at the interface of two subdomains. + * outputs the surface facets, with a consistent orientation at the interface of two subdomains. */ std::ostream& output_facets_in_complex_to_off(std::ostream& out) const { @@ -447,8 +818,35 @@ class Mesh_complex_3_in_triangulation_3 : return out; } + /*! + outputs the mesh to `os` + in Medit format. + */ +#ifdef DOXYGEN_RUNNING + void output_to_medit(std::ostream& os) const +#else + void output_to_medit(std::ostream& os, + bool rebind = true, + bool show_patches = false) const +#endif + { + // Call global function + bool all_vertices = true; + bool all_cells = false; + CGAL::IO::output_to_medit(os, *this, rebind, show_patches, + all_vertices, all_cells); + } + + void output_to_maya(std::ostream& os, bool surfaceOnly = true) const + { + // Call global function + CGAL::IO::output_to_maya(os, *this, surfaceOnly); + } + + /// @} + /** - * Fills \c out with incident edges (1-dimensional features of \c v. + * fills \p out with incident edges (1-dimensional features of \p v). * OutputIterator value type is std::pair * \pre v->in_dimension() < 2 */ @@ -460,15 +858,55 @@ class Mesh_complex_3_in_triangulation_3 : // Undocumented // ----------------------------------- - /** - * Returns true if c3t3 is valid - */ bool is_valid(bool verbose = false) const; // ----------------------------------- // Complex traversal // ----------------------------------- private: + /** + * @class Cell_not_in_complex + * @brief A class to filter cells which do not belong to the complex + */ + class Cell_not_in_complex + { + const Self* r_self_; + Subdomain_index index_;//needed by SWIG, should be const Subdomain_index + public: + Cell_not_in_complex() {}//needed by SWIG + Cell_not_in_complex(const Self& self, + const Subdomain_index& index = Subdomain_index()) + : r_self_(&self) + , index_(index) { } + + bool operator()(Cell_handle ch) const + { + if (index_ == Subdomain_index()) { return !r_self_->is_in_complex(ch); } + else { return !(r_self_->subdomain_index(ch) == index_); } + } + }; // end class Cell_not_in_complex + + typedef SMDS_3::internal::Iterator_not_in_complex Iterator_not_in_complex; + + class Facet_iterator_not_in_complex + { + const Self* c3t3_; + Surface_patch_index index_; //need by SWIG: should be const Surface_patch_index + public: + Facet_iterator_not_in_complex() {} //need by SWIG + Facet_iterator_not_in_complex(const Self& c3t3, + const Surface_patch_index& index = Surface_patch_index()) + : c3t3_(&c3t3) + , index_(index) { } + + template + bool operator()(Iterator it) const + { + if (index_ == Surface_patch_index()) { return !c3t3_->is_in_complex(*it); } + else { return !(c3t3_->surface_patch_index(*it) == index_); } + } + }; + class Edge_iterator_not_in_complex { const Self& c3t3_; @@ -512,7 +950,7 @@ class Mesh_complex_3_in_triangulation_3 : // Iterator type to get the first element of pair typedef boost::transform_iterator < - Mesh_3::internal::First_of, + SMDS_3::internal::First_of, Vertex_map_filter_iterator > Vertex_map_iterator_first; // Iterator type to remove a level of referencing @@ -549,12 +987,128 @@ class Mesh_complex_3_in_triangulation_3 : }; public: - /// Iterator type to visit the edges of the 1D complex. +/// \name Traversal of the complex +/// @{ +#ifdef DOXYGEN_RUNNING + /// Iterator type to visit the cells of the 3D complex + typedef unspecified_type Cells_in_complex_iterator; + /// Iterator type to visit the facets of the 2D complex + typedef unspecified_type Facets_in_complex_iterator; + /// Iterator type to visit the edges of the 1D complex + typedef unspecified_type Edges_in_complex_iterator; + /// Iterator type to visit the vertices of the 0D complex + typedef unspecified_type Vertices_in_complex_iterator; + + /// Range type for iterating over all cells of the 3D complex, + /// with a nested type iterator that has as value type `Cell_handle`. + typedef Iterator_range Cells_in_complex; + /// Range type for iterating over all facets of the 2D complex, + /// with a nested type iterator that has as value type `Facet`. + typedef Iterator_range Facets_in_complex; + /// Range type for iterating over all cells of the 1D complex, + /// with a nested type iterator that has as value type `Edge`. + typedef Iterator_range Edges_in_complex; + /// Range type for iterating over all vertices of the 0D complex, + /// with a nested type iterator that has as value type `Vertex_handle`. + typedef Iterator_range Vertices_in_complex; + +#else typedef Filter_iterator< typename Triangulation::Finite_edges_iterator, - Edge_iterator_not_in_complex > Edges_in_complex_iterator; + Edge_iterator_not_in_complex > Edges_in_complex_iterator; + typedef Vertex_map_iterator_first_dereference Vertices_in_complex_iterator; + typedef Filter_iterator< + typename Triangulation::Finite_facets_iterator, + Facet_iterator_not_in_complex > Facets_in_complex_iterator; + + /** + * @class Cells_in_complex_iterator + * @brief Iterator type to visit the cells of the triangulation that belong + * to the 3D complex + * + * This class is useful to ensure that Cells_in_complex_iterator is convertible + * to Cell_handle + */ + class Cells_in_complex_iterator : + public Filter_iterator + { + private: + typedef typename Triangulation::Finite_cells_iterator Tr_iterator; + typedef Filter_iterator Base; + typedef Cells_in_complex_iterator Self; + + public: + Cells_in_complex_iterator() : Base() { } + Cells_in_complex_iterator(Base i) : Base(i) { } - /// Returns a Facets_in_complex_iterator to the first facet of the 1D complex + Self& operator++() { Base::operator++(); return *this; } + Self& operator--() { Base::operator--(); return *this; } + Self operator++(int) { Self tmp(*this); ++(*this); return tmp; } + Self operator--(int) { Self tmp(*this); --(*this); return tmp; } + + operator Cell_handle() const { return Cell_handle(this->base()); } + }; // end class Cells_in_complex_iterator + + typedef Iterator_range > Vertices_in_complex; + typedef Iterator_range Edges_in_complex; + typedef Iterator_range Facets_in_complex; + typedef Iterator_range > Cells_in_complex; + +#endif + +/// \name Iterators +/// @{ + + /// returns a \c Cells_in_complex_iterator to the first cell of the 3D complex + Cells_in_complex_iterator cells_in_complex_begin() const + { + return CGAL::filter_iterator(tr_.finite_cells_end(), + Cell_not_in_complex(*this), + tr_.finite_cells_begin()); + } + + /// returns a \c Cells_in_complex_iterator to the first cell of the 3D complex + Cells_in_complex_iterator cells_in_complex_begin(const Subdomain_index& index) const + { + return CGAL::filter_iterator(tr_.finite_cells_end(), + Cell_not_in_complex(*this, index), + tr_.finite_cells_begin()); + } + + /// returns the past-the-end iterator for the cells of the 3D complex + Cells_in_complex_iterator cells_in_complex_end() const + { + return CGAL::filter_iterator(tr_.finite_cells_end(), + Cell_not_in_complex(*this)); + } + + /// returns a `Facets_in_complex_iterator` to the first facet of the 2D complex + Facets_in_complex_iterator facets_in_complex_begin() const + { + return CGAL::filter_iterator(tr_.finite_facets_end(), + Facet_iterator_not_in_complex(*this), + tr_.finite_facets_begin()); + } + + /// returns a `Facets_in_complex_iterator` to the first facet of the 2D complex + Facets_in_complex_iterator + facets_in_complex_begin(const Surface_patch_index& index) const + { + return CGAL::filter_iterator(tr_.finite_facets_end(), + Facet_iterator_not_in_complex(*this, index), + tr_.finite_facets_begin()); + } + + /// returns past-the-end iterator on facet of the 2D complex + Facets_in_complex_iterator facets_in_complex_end(const Surface_patch_index = Surface_patch_index()) const + { + return CGAL::filter_iterator(tr_.finite_facets_end(), + Facet_iterator_not_in_complex(*this)); + } + + /// returns a `Edges_in_complex_iterator` to the first edge of the 1D complex Edges_in_complex_iterator edges_in_complex_begin() const { return CGAL::filter_iterator(this->triangulation().finite_edges_end(), @@ -562,7 +1116,7 @@ class Mesh_complex_3_in_triangulation_3 : this->triangulation().finite_edges_begin()); } - /// Returns a Facets_in_complex_iterator to the first facet of the 1D complex + /// returns a `Edges_in_complex_iterator` to the first edge of the 1D complex Edges_in_complex_iterator edges_in_complex_begin(const Curve_index& index) const { @@ -571,17 +1125,14 @@ class Mesh_complex_3_in_triangulation_3 : this->triangulation().finite_edges_begin()); } - /// Returns past-the-end iterator on facet of the 1D complex + /// returns past-the-end iterator on edges of the 1D complex Edges_in_complex_iterator edges_in_complex_end(const Curve_index& = Curve_index()) const { return CGAL::filter_iterator(this->triangulation().finite_edges_end(), Edge_iterator_not_in_complex(*this)); } - /// Iterator type to visit the edges of the 0D complex. - typedef Vertex_map_iterator_first_dereference Vertices_in_complex_iterator; - - /// Returns a Vertices_in_complex_iterator to the first vertex of the 0D complex + /// returns a `Vertices_in_complex_iterator` to the first vertex of the 0D complex Vertices_in_complex_iterator vertices_in_complex_begin() const { return CGAL::filter_iterator(corners_.end(), @@ -589,7 +1140,7 @@ class Mesh_complex_3_in_triangulation_3 : corners_.begin()); } - /// Returns a Vertices_in_complex_iterator to the first vertex of the 0D complex + /// returns a `Vertices_in_complex_iterator` to the first vertex of the 0D complex Vertices_in_complex_iterator vertices_in_complex_begin(const Corner_index& index) const { @@ -598,17 +1149,70 @@ class Mesh_complex_3_in_triangulation_3 : corners_.begin()); } - /// Returns past-the-end iterator on facet of the 0D complex + /// returns past-the-end iterator on vertices of the 0D complex Vertices_in_complex_iterator vertices_in_complex_end() const { return CGAL::filter_iterator(corners_.end(), Vertex_iterator_not_in_complex(*this)); } + /*! + returns a range of iterators over vertices of the 0D complex + \note The value type of `Vertices_in_complex::iterator` is `Vertex_handle`. + */ + Vertices_in_complex vertices_in_complex() const + { + return make_prevent_deref_range(vertices_in_complex_begin(), + vertices_in_complex_end()); + } + /*! + returns a range of iterators over the edges of the 1D complex, + starting at an arbitrary edge. + Returns an empty range when `t.dimension() < 2`. + */ + Edges_in_complex edges_in_complex() const + { + return Edges_in_complex(edges_in_complex_begin(), + edges_in_complex_end()); + } + /*! + returns a range of iterators over the facets of the 2D complex, + starting at an arbitrary facet. + Returns an empty range when `t.dimension() < 2`. + */ + Facets_in_complex facets_in_complex() const + { + return Facets_in_complex(facets_in_complex_begin(), + facets_in_complex_end()); + } + /*! + returns a range of iterators over cells of the 3D complex. + Returns an empty range when `triangulation().number_of_cells() == 0` + or complex is empty. + \note The value type of `Cells_in_complex::iterator` is `Cell_handle`. + */ + Cells_in_complex cells_in_complex() const + { + return make_prevent_deref_range(cells_in_complex_begin(), + cells_in_complex_end()); + } +/// @} + +public: + template + friend + std::istream& operator>>(std::istream& is, + Mesh_complex_3_in_triangulation_3& c3t3); + + static std::string io_signature() + { + return Get_io_signature()(); + } -private: /** - * Creates an Internal_edge object (i.e a pair of ordered Vertex_handle) + * @cond SKIP_IN_MANUAL + * creates an `Internal_edge` object (i.e a pair of ordered `Vertex_handle`) + * @endcond */ Internal_edge make_internal_edge(const Vertex_handle& v1, const Vertex_handle& v2) const @@ -618,7 +1222,9 @@ class Mesh_complex_3_in_triangulation_3 : } /** - * Returns true if \c edge is in C3T3 + * @cond SKIP_IN_MANUAL + * returns true if \p edge is in the 1D complex + * @endcond */ bool is_in_complex(const Internal_edge& edge) const { @@ -626,7 +1232,9 @@ class Mesh_complex_3_in_triangulation_3 : } /** - * Add edge \c edge to complex, with Curve_index index + * @cond SKIP_IN_MANUAL + * adds edge \p edge to the 1D complex, with curve index `index` + * @endcond */ void add_to_complex(const Internal_edge& edge, const Curve_index& index) { @@ -641,7 +1249,9 @@ class Mesh_complex_3_in_triangulation_3 : } /** - * Remove edge \c edge from complex + * @cond SKIP_IN_MANUAL + * removes edge \p edge from the 1D complex + * @endcond */ void remove_from_complex(const Internal_edge& edge) { @@ -649,8 +1259,10 @@ class Mesh_complex_3_in_triangulation_3 : } /** - * Returns Curve_index of edge \c edge - */ + * @cond SKIP_IN_MANUAL + * returns the curve index of edge \p edge + * @endcond + */ Curve_index curve_index(const Internal_edge& edge) const { typename Edge_map::const_iterator it = edges_.find(edge); @@ -658,20 +1270,484 @@ class Mesh_complex_3_in_triangulation_3 : return Curve_index(); } + /// @cond SKIP_IN_MANUAL + /// Returns `NOT_IN_COMPLEX`, `BOUNDARY`, `REGULAR`, or `SINGULAR`, + /// depending on the number of incident facets in the complex, and the + /// number of connected components of its link + /// @endcond + Face_status face_status(const Vertex_handle v) const + { + if (!manifold_info_initialized_) init_manifold_info(); + const std::size_t n = v->cached_number_of_incident_facets(); + + if (n == 0) return NOT_IN_COMPLEX; + + //test incident edges for REGULARITY and count BOUNDARY edges + typename std::vector edges; + edges.reserve(64); + if (tr_.is_parallel()) { + tr_.incident_edges_threadsafe(v, std::back_inserter(edges)); + } + else { + tr_.incident_edges(v, std::back_inserter(edges)); + } + int number_of_boundary_incident_edges = 0; // could be a bool + for (typename std::vector::iterator + eit = edges.begin(), end = edges.end(); + eit != end; eit++) + { + switch (face_status(*eit)) + { + case NOT_IN_COMPLEX: case REGULAR: break; + case BOUNDARY: ++number_of_boundary_incident_edges; break; + default: +#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS + std::cerr << "singular edge...\n"; + std::cerr << tr_.point(v) << std::endl; +#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS + return SINGULAR; + } + } + + // From here all incident edges (in complex) are REGULAR or BOUNDARY. + const std::size_t nb_components = union_find_of_incident_facets(v); + if (nb_components > 1) { +#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS + std::cerr << "singular vertex: nb_components=" << nb_components << std::endl; + std::cerr << tr_.point(v) << std::endl; +#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS + return SINGULAR; + } + else { // REGULAR OR BOUNDARY +#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS + std::cerr << "regular or boundary: " << tr_.point(v) << std::endl; +#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS + if (number_of_boundary_incident_edges != 0) + return BOUNDARY; + else + return REGULAR; + } + } + + /// @cond SKIP_IN_MANUAL + /// This function should be called only when incident edges + /// are known to be `REGULAR` or `BOUNDARY` + /// @endcond + bool is_regular_or_boundary_for_vertices(Vertex_handle v) const { + return union_find_of_incident_facets(v) == 1; + } + + /// @cond SKIP_IN_MANUAL + /// Returns `NOT_IN_COMPLEX`, `BOUNDARY`, `REGULAR`, or `SINGULAR`, + /// depending on the number of incident facets in the complex + /// @endcond + Face_status face_status(const Edge& edge) const + { + if (!manifold_info_initialized_) init_manifold_info(); + +#ifdef CGAL_LINKED_WITH_TBB + typename Edge_facet_counter::const_accessor accessor; + if (!edge_facet_counter_.find(accessor, + this->make_ordered_pair(edge))) + return NOT_IN_COMPLEX; + switch (accessor->second) +#else // not CGAL_LINKED_WITH_TBB + switch (edge_facet_counter_[this->make_ordered_pair(edge)]) +#endif // not CGAL_LINKED_WITH_TBB + { + case 0: return NOT_IN_COMPLEX; + case 1: return BOUNDARY; + case 2: return REGULAR; + default: return SINGULAR; + } + } + + /// Returns true if the vertex \p v has is incident to at least a facet + /// of the complex + bool has_incident_facets_in_complex(const Vertex_handle& v) const + { + if (!manifold_info_initialized_) init_manifold_info(); + return v->cached_number_of_incident_facets() > 0; + } + + /** + * @cond SKIP_IN_MANUAL + * @brief inserts \p [first,last[ in the triangulation (with dimension 2) + * @param first the iterator on the first point to insert + * @param last the iterator past the last point to insert + * + * InputIterator value type must be \c std::pair + * @endcond + */ + template + void insert_surface_points(InputIterator first, InputIterator last) + { + typename Tr::Geom_traits::Construct_weighted_point_3 cwp = + tr_.geom_traits().construct_weighted_point_3_object(); + + while (first != last) + { + Vertex_handle vertex = tr_.insert(cwp((*first).first)); + vertex->set_index((*first).second); + vertex->set_dimension(2); + ++first; + } + } + + /** + * @cond SKIP_IN_MANUAL + * @brief inserts \p [first,last[ in the triangulation (with dimension 2 and + * index \p default_index) + * @param first the iterator on the first point to insert + * @param last the iterator past the last point to insert + * @param default_index the index to be used to insert points + * + * InputIterator value type must be \c Tr::Point + * @endcond + */ + template + void insert_surface_points(InputIterator first, + InputIterator last, + const Index& default_index) + { + typename Tr::Geom_traits::Construct_weighted_point_3 cwp = + tr_.geom_traits().construct_weighted_point_3_object(); + + while (first != last) + { + Vertex_handle vertex = tr_.insert(cwp(*first)); + vertex->set_index(default_index); + vertex->set_dimension(2); + ++first; + } + } + + void clear_cells_and_facets_from_c3t3() { + for (typename Tr::Finite_cells_iterator + cit = this->triangulation().finite_cells_begin(), + end = this->triangulation().finite_cells_end(); + cit != end; ++cit) + { + set_subdomain_index(cit, Subdomain_index()); + } + this->number_of_cells_ = 0; + for (typename Tr::Finite_facets_iterator + fit = this->triangulation().finite_facets_begin(), + end = this->triangulation().finite_facets_end(); + fit != end; ++fit) + { + Facet facet = *fit; + set_surface_patch_index(facet.first, facet.second, Surface_patch_index()); + if (this->triangulation().dimension() > 2) { + Facet mirror = tr_.mirror_facet(facet); + set_surface_patch_index(mirror.first, mirror.second, Surface_patch_index()); + } + } + this->number_of_facets_ = 0; + clear_manifold_info(); + } + + void clear_manifold_info() { + edge_facet_counter_.clear(); + manifold_info_initialized_ = false; + } + + /** @cond SKIP_IN_MANUAL + * Returns bbox + * @endcond + */ + Bbox_3 bbox() const; + +private: + // Sequential: non-atomic + // "dummy" is here to allow the specialization (see below) + // See https://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/285ab1eec49e1cb6 + template + struct Number_of_elements + { + typedef size_type type; + }; + + template + struct Init_number_of_elements + { + template + void operator()(T& a, const T& b) + { + a = b; + } + template + void operator()(T& a) + { + a = 0; + } + }; + + template + struct Swap_elements + { + template + void operator()(T& a, T& b) + { + std::swap(a, b); + } + }; +#ifdef CGAL_LINKED_WITH_TBB + // Parallel: atomic + template + struct Number_of_elements + { + typedef std::atomic type; + }; + + template + struct Init_number_of_elements + { + template + void operator()(T& a, const T& b) + { + a = b.load(); + } + template + void operator()(T& a) + { + a = 0; + } + }; + + template + struct Swap_elements + { + template + void operator()(T& a, T& b) + { + T tmp; + tmp.exchange(a); + a.exchange(b); + b.exchange(tmp); + } + }; +#endif // CGAL_LINKED_WITH_TBB + +private: + void init_manifold_info() const + { + for (typename Tr::All_vertices_iterator + vit = triangulation().finite_vertices_begin(), + end = triangulation().finite_vertices_end(); + vit != end; ++vit) + { + vit->set_c2t3_cache(0, (std::numeric_limits::max)()); + } + + edge_facet_counter_.clear(); + + for (typename Tr::Finite_facets_iterator + fit = triangulation().finite_facets_begin(), + end = triangulation().finite_facets_end(); + fit != end; ++fit) + { + if (is_in_complex(*fit)) { + const Cell_handle cell = fit->first; + const int i = fit->second; + for (int j = 0; j < 3; ++j) + { + const int edge_index_va = tr_.vertex_triple_index(i, j); + const int edge_index_vb = tr_.vertex_triple_index(i, (j == 2) ? 0 : (j + 1)); + const Vertex_handle edge_va = cell->vertex(edge_index_va); + const Vertex_handle edge_vb = cell->vertex(edge_index_vb); +#ifndef CGAL_LINKED_WITH_TBB + ++edge_facet_counter_[this->make_ordered_pair(edge_va, edge_vb)]; +#else // CGAL_LINKED_WITH_TBB + { + typename Edge_facet_counter::accessor accessor; + edge_facet_counter_.insert(accessor, + this->make_ordered_pair(edge_va, edge_vb)); + ++accessor->second; + } +#endif // CGAL_LINKED_WITH_TBB + + const std::size_t n = edge_va->cached_number_of_incident_facets(); + edge_va->set_c2t3_cache(n + 1, (std::numeric_limits::max)()); + } + } + } + manifold_info_initialized_ = true; + } + + /// Extract the subset `F` of facets of the complex incident to `v` and + /// return the number of connected component of the adjacency graph of `F`. + std::size_t union_find_of_incident_facets(const Vertex_handle v) const + { + if (v->is_c2t3_cache_valid()) + { + const std::size_t n = v->cached_number_of_components(); + if (n != (std::numeric_limits::max)()) return n; + } + + Union_find facets; + { // fill the union find + std::vector non_filtered_facets; + if (tr_.is_parallel()) { + tr_.incident_facets_threadsafe(v, std::back_inserter(non_filtered_facets)); + } + else { + tr_.incident_facets(v, std::back_inserter(non_filtered_facets)); + } + + for (typename std::vector::iterator + fit = non_filtered_facets.begin(), + end = non_filtered_facets.end(); + fit != end; ++fit) + { + if (is_in_complex(*fit)) facets.push_back(*fit); + } + } + + typedef boost::unordered_map::handle, + Hash_fct> Vertex_set_map; + typedef typename Vertex_set_map::iterator Vertex_set_map_iterator; + + Vertex_set_map vsmap; + + for (typename Union_find::iterator + it = facets.begin(), end = facets.end(); + it != end; ++it) + { + const Cell_handle& ch = (*it).first; + const int& i = (*it).second; + for (int j = 0; j < 3; ++j) { + const Vertex_handle w = ch->vertex(tr_.vertex_triple_index(i, j)); + if (w != v) { + Vertex_set_map_iterator vsm_it = vsmap.find(w); + if (vsm_it != vsmap.end()) { + facets.unify_sets(vsm_it->second, it); + } + else { + vsmap.insert(std::make_pair(w, it)); + } + } + } + } + const std::size_t nb_components = facets.number_of_sets(); + + const std::size_t n = v->cached_number_of_incident_facets(); + v->set_c2t3_cache(n, nb_components); + return nb_components; + } + +public: + // ----------------------------------- + // Backward Compatibility + // ----------------------------------- +#ifndef DOXYGEN_RUNNING +#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX + typedef Surface_patch_index Surface_index; + + void set_surface_index(const Facet& f, const Surface_index& index) + { + set_surface_patch_index(f, index); + } + + void set_surface_index(const Cell_handle& c, const int i, const Surface_index& index) + { + set_surface_patch_index(c, i, index); + } + + Surface_index surface_index(const Facet& f) const + { + return surface_patch_index(f); + } + + Surface_index surface_index(const Cell_handle& c, const int i) const + { + return surface_patch_index(c, i); + } +#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX + +#ifndef CGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS + typedef Facets_in_complex_iterator Facet_iterator; + typedef Cells_in_complex_iterator Cell_iterator; + + Facet_iterator facets_begin() const + { + return facets_in_complex_begin(); + } + + Facet_iterator facets_end() const + { + return facets_in_complex_end(); + } + + Cell_iterator cells_begin() const + { + return cells_in_complex_begin(); + } + + Cell_iterator cells_end() const + { + return cells_in_complex_end(); + } +#endif // CGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS +#endif // DOXYGEN_RUNNING + // ----------------------------------- + // End backward Compatibility + // ----------------------------------- + + private: + // Private data members + Triangulation tr_; + + typedef typename Base::Pair_of_vertices Pair_of_vertices; +#ifdef CGAL_LINKED_WITH_TBB + typedef tbb::concurrent_hash_map Edge_facet_counter; +#else // not CGAL_LINKED_WITH_TBB + typedef std::map Edge_facet_counter; +#endif // not CGAL_LINKED_WITH_TBB + + mutable Edge_facet_counter edge_facet_counter_; + + typename Number_of_elements::type number_of_facets_; + typename Number_of_elements::type number_of_cells_; + + mutable bool manifold_info_initialized_; + Edge_map edges_; Corner_map corners_; Far_vertices_vec far_vertices_; }; +template +Mesh_complex_3_in_triangulation_3:: +Mesh_complex_3_in_triangulation_3() + : Base() + , tr_() + , edge_facet_counter_() //TODO: parallel! + , manifold_info_initialized_(false) //TODO: parallel! +{ + // We don't put it in the initialization list because + // std::atomic has no constructors + number_of_facets_ = 0; + number_of_cells_ = 0; +} template Mesh_complex_3_in_triangulation_3:: Mesh_complex_3_in_triangulation_3(const Self& rhs) : Base(rhs) + , tr_(rhs.tr_) + , edge_facet_counter_(rhs.edge_facet_counter_) + , manifold_info_initialized_(rhs.manifold_info_initialized_) , edges_() , corners_() { + Init_number_of_elements init; + init(number_of_facets_, rhs.number_of_facets_); + init(number_of_cells_, rhs.number_of_cells_); + // Copy edges for ( typename Edge_map::const_iterator it = rhs.edges_.begin(), end = rhs.edges_.end() ; it != end ; ++it ) @@ -712,6 +1788,23 @@ Mesh_complex_3_in_triangulation_3(const Self& rhs) } } +template +Mesh_complex_3_in_triangulation_3:: +Mesh_complex_3_in_triangulation_3(Self&& rhs) + : Base() + , tr_(std::move(rhs.tr_)) + , edge_facet_counter_(std::move(rhs.edge_facet_counter_)) + , manifold_info_initialized_(std::exchange(rhs.manifold_info_initialized_, false)) + , edges_(std::move(rhs.edges_)) + , corners_(std::move(rhs.corners_)) + , far_vertices_(std::move(rhs.far_vertices_)) +{ + Init_number_of_elements init; + init(number_of_facets_, rhs.number_of_facets_); + init(number_of_cells_, rhs.number_of_cells_); + init(rhs.number_of_facets_); // set to 0 + init(rhs.number_of_cells_); // set to 0 +} template template @@ -808,10 +1901,136 @@ is_valid(bool verbose) const return true; } +template +void +Mesh_complex_3_in_triangulation_3:: +add_to_complex(const Cell_handle& cell, + const int i, + const Surface_patch_index& index) +{ + CGAL_precondition(!(index == Surface_patch_index())); + + if (!is_in_complex(cell, i)) + { + Facet mirror = tr_.mirror_facet(std::make_pair(cell, i)); + set_surface_patch_index(cell, i, index); + set_surface_patch_index(mirror.first, mirror.second, index); + ++number_of_facets_; + if (manifold_info_initialized_) { + for (int j = 0; j < 3; ++j) + { + int edge_index_va = tr_.vertex_triple_index(i, j); + int edge_index_vb = tr_.vertex_triple_index(i, (j == 2) ? 0 : (j + 1)); + Vertex_handle edge_va = cell->vertex(edge_index_va); + Vertex_handle edge_vb = cell->vertex(edge_index_vb); +#ifdef CGAL_LINKED_WITH_TBB + { + typename Edge_facet_counter::accessor accessor; + edge_facet_counter_.insert(accessor, + this->make_ordered_pair(edge_va, edge_vb)); + ++accessor->second; + } +#else // not CGAL_LINKED_WITH_TBB + ++edge_facet_counter_[this->make_ordered_pair(edge_va, edge_vb)]; +#endif // not CGAL_LINKED_WITH_TBB + + const std::size_t n = edge_va->cached_number_of_incident_facets(); + const std::size_t m = edge_va->cached_number_of_components(); + edge_va->set_c2t3_cache(n + 1, m); + } + const int dimension_plus_1 = tr_.dimension() + 1; + // update c2t3 for vertices of f + for (int j = 0; j < dimension_plus_1; j++) { + if (j != i) { +#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS + if (cell->vertex(j)->is_c2t3_cache_valid()) + std::cerr << "(" << tr_.point(cell, j) << ")->invalidate_c2t3_cache()\n"; +#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS + cell->vertex(j)->invalidate_c2t3_cache(); + } + } + } + } +} + +template +void +Mesh_complex_3_in_triangulation_3:: +remove_from_complex(const Facet& facet) +{ + if (is_in_complex(facet)) + { + Facet mirror = tr_.mirror_facet(facet); + set_surface_patch_index(facet.first, facet.second, Surface_patch_index()); + set_surface_patch_index(mirror.first, mirror.second, Surface_patch_index()); + --number_of_facets_; + if (manifold_info_initialized_) { + const Cell_handle cell = facet.first; + const int i = facet.second; + for (int j = 0; j < 3; ++j) + { + const int edge_index_va = tr_.vertex_triple_index(i, j); + const int edge_index_vb = tr_.vertex_triple_index(i, (j == 2) ? 0 : (j + 1)); + const Vertex_handle edge_va = cell->vertex(edge_index_va); + const Vertex_handle edge_vb = cell->vertex(edge_index_vb); +#ifdef CGAL_LINKED_WITH_TBB + { + typename Edge_facet_counter::accessor accessor; + edge_facet_counter_.insert(accessor, + this->make_ordered_pair(edge_va, edge_vb)); + --accessor->second; + } +#else // not CGAL_LINKED_WITH_TBB + --edge_facet_counter_[this->make_ordered_pair(edge_va, edge_vb)]; +#endif // not CGAL_LINKED_WITH_TBB + + const std::size_t n = edge_va->cached_number_of_incident_facets(); + CGAL_assertion(n > 0); + const std::size_t m = edge_va->cached_number_of_components(); + edge_va->set_c2t3_cache(n - 1, m); + } + const int dimension_plus_1 = tr_.dimension() + 1; + // update c2t3 for vertices of f + for (int j = 0; j < dimension_plus_1; j++) { + if (j != facet.second) { +#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS + if (cell->vertex(j)->is_c2t3_cache_valid()) + std::cerr << "(" << tr_.point(cell, j) << ")->invalidate_c2t3_cache()\n"; +#endif // CGAL_MESHES_DEBUG_REFINEMENT_POINTS + cell->vertex(j)->invalidate_c2t3_cache(); + } + } + } + } +} + +template +Bbox_3 +Mesh_complex_3_in_triangulation_3:: +bbox() const +{ + if (0 == triangulation().number_of_vertices()) + { + return Bbox_3(); + } + + typename Tr::Finite_vertices_iterator vit = tr_.finite_vertices_begin(); + Bbox_3 result = tr_.point(vit++).bbox(); + + for (typename Tr::Finite_vertices_iterator end = tr_.finite_vertices_end(); + vit != end; ++vit) + { + result = result + tr_.point(vit).bbox(); + } + + return result; +} + template void Mesh_complex_3_in_triangulation_3:: -rescan_after_load_of_triangulation() { +rescan_after_load_of_triangulation() +{ corners_.clear(); for(typename Tr::Finite_vertices_iterator vit = this->triangulation().finite_vertices_begin(), @@ -822,7 +2041,28 @@ rescan_after_load_of_triangulation() { add_to_complex(vit, Corner_index(1)); } } - Base::rescan_after_load_of_triangulation(); + + this->number_of_facets_ = 0; + for (typename Tr::Finite_facets_iterator + fit = this->triangulation().finite_facets_begin(), + end = this->triangulation().finite_facets_end(); + fit != end; ++fit) + { + if (this->is_in_complex(*fit)) { + ++this->number_of_facets_; + } + } + + this->number_of_cells_ = 0; + for (typename Tr::Finite_cells_iterator + cit = this->triangulation().finite_cells_begin(), + end = this->triangulation().finite_cells_end(); + cit != end; ++cit) + { + if (this->is_in_complex(cit)) { + ++this->number_of_cells_; + } + } } template @@ -831,9 +2071,7 @@ operator<< (std::ostream& os, const Mesh_complex_3_in_triangulation_3 &c3t3) { // TODO: implement edge saving - typedef typename Mesh_complex_3_in_triangulation_3::Concurrency_tag Concurrency_tag; - return os << static_cast< - const Mesh_3::Mesh_complex_3_in_triangulation_3_base&>(c3t3); + return os << c3t3.triangulation(); } @@ -843,9 +2081,14 @@ operator>> (std::istream& is, Mesh_complex_3_in_triangulation_3 &c3t3) { // TODO: implement edge loading - typedef typename Mesh_complex_3_in_triangulation_3::Concurrency_tag Concurrency_tag; - is >> static_cast< - Mesh_3::Mesh_complex_3_in_triangulation_3_base&>(c3t3); + c3t3.clear(); + is >> c3t3.triangulation(); + + if (!is) { + c3t3.clear(); + return is; + } + c3t3.rescan_after_load_of_triangulation(); return is; } diff --git a/thirdparty/CGAL/include/CGAL/Mesh_constant_domain_field_3.h b/thirdparty/CGAL/include/CGAL/Mesh_constant_domain_field_3.h index f2c4d643..8d970f6b 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_constant_domain_field_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_constant_domain_field_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h $ -// $Id: Mesh_constant_domain_field_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h $ +// $Id: include/CGAL/Mesh_constant_domain_field_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -28,27 +28,78 @@ namespace CGAL { -template +/*! +* @ingroup PkgMesh3DomainFields +* The class `Mesh_constant_domain_field_3` is a model of concept `MeshDomainField_3`. It provides +* a constant field accessible using queries on 3D-points. +* +* The class `Mesh_constant_domain_field_3` can also be customized through `set_size()` operations to become +* a piecewise constant field, i.e. a sizing field with a constant size on each subpart +* of the domain. +* +* @tparam GT is the geometric traits class. It must match the type `Triangulation::Geom_traits`, +* where `Triangulation` is the nested type of the model of `MeshComplex_3InTriangulation_3` used +* in the meshing process. +* +* @tparam Index_ is the type of index of the vertices of the triangulation. +* It must match the type `%Index` of the model of `MeshDomain_3` used in the meshing process. +* +* @cgalModels{MeshDomainField_3} +*/ +template class Mesh_constant_domain_field_3 { public: - typedef typename Gt::FT FT; - typedef typename boost::mpl::eval_if_c< - internal::Has_nested_type_Bare_point::value, - typename internal::Bare_point_type, - boost::mpl::identity + /// \name Types + /// @{ + + /*! + * Numerical type. + */ + typedef typename GT::FT FT; + + /*! + + * Point type. + */ +#ifdef DOXYGEN_RUNNING + typedef GT::Point_3 Point_3; +#else + typedef typename boost::mpl::eval_if_c< + internal::Has_nested_type_Bare_point::value, + typename internal::Bare_point_type, + boost::mpl::identity >::type Point_3; + #endif + + /*! + * Type of index of the vertices of the triangulation. + */ typedef Index_ Index; + /// @} + private: // Map to store field values typedef std::map,FT> Values; public: - /// Constructor - Mesh_constant_domain_field_3(const FT& d) : d_(d) {} + /// \name Creation + /// @{ - /// Returns size + /*! + * Builds a constant domain field with size `size`. + */ + Mesh_constant_domain_field_3(const FT& size) : d_(size) {} + + /// @} + + /// \name Operations + /// @{ + + /*! + * Returns the size of query points of dimension `dim` and index `index`. + */ FT operator()(const Point_3&, const int dim, const Index& index) const { typename Values::const_iterator it = values_.find(std::make_pair(dim,index)); @@ -57,11 +108,16 @@ class Mesh_constant_domain_field_3 return d_; } - /// Sets size at any point of dimension \c dim and index \c index + + /*! + * Sets the size such that `operator()` for any query point + * of dimension `dim` and index `index` returns `size`. + */ void set_size(const FT& size, const int dim, const Index& index) { values_.insert(std::make_pair(std::make_pair(dim,index),size)); } + /// @} private: // default value diff --git a/thirdparty/CGAL/include/CGAL/Mesh_criteria_3.h b/thirdparty/CGAL/include/CGAL/Mesh_criteria_3.h index 2f93fa95..6be6b7da 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_criteria_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_criteria_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_criteria_3.h $ -// $Id: Mesh_criteria_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_criteria_3.h $ +// $Id: include/CGAL/Mesh_criteria_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,40 +22,15 @@ #include #include - +#include #include -#include -#include #include #include #include #include // for the macro DBL_MAX -#include -namespace CGAL { - -namespace parameters { -// see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS - - BOOST_PARAMETER_NAME( (edge_size, tag) edge_size_ ) - BOOST_PARAMETER_NAME( (edge_sizing_field, tag) edge_sizing_field_ ) - BOOST_PARAMETER_NAME( (facet_angle, tag) facet_angle_ ) - BOOST_PARAMETER_NAME( (facet_size, tag) facet_size_ ) - BOOST_PARAMETER_NAME( (facet_sizing_field, tag) facet_sizing_field_ ) - BOOST_PARAMETER_NAME( (facet_distance, tag) facet_distance_ ) - BOOST_PARAMETER_NAME( (facet_topology, tag) facet_topology_ ) - BOOST_PARAMETER_NAME( (cell_radius_edge, tag) cell_radius_edge_ ) - BOOST_PARAMETER_NAME( (cell_radius_edge_ratio, tag) cell_radius_edge_ratio_ ) - BOOST_PARAMETER_NAME( (cell_size, tag) cell_size_ ) - BOOST_PARAMETER_NAME( (cell_sizing_field, tag) cell_sizing_field_ ) - BOOST_PARAMETER_NAME( (sizing_field, tag) sizing_field_ ) - -CGAL_PRAGMA_DIAG_POP +namespace CGAL { -} // end namespace parameters namespace internal { @@ -93,22 +68,18 @@ class Mesh_criteria_3_impl // This template constructor is not instantiated when named parameters // are not used, so Facet_criteria and Cell_criteria construction from FT // is not a problem - template - Mesh_criteria_3_impl(const ArgumentPack& args) - : edge_criteria_(args[parameters::edge_size - | args[parameters::edge_sizing_field - | args[parameters::sizing_field | FT(DBL_MAX)] ] ]) - , facet_criteria_(args[parameters::facet_angle | FT(0)], - args[parameters::facet_size - | args[parameters::facet_sizing_field - | args[parameters::sizing_field | FT(0)] ] ], - args[parameters::facet_distance | FT(0)], - args[parameters::facet_topology | CGAL::FACET_VERTICES_ON_SURFACE]) - , cell_criteria_(args[parameters::cell_radius_edge_ratio - | args[parameters::cell_radius_edge | FT(0)] ], - args[parameters::cell_size - | args[parameters::cell_sizing_field - | args[parameters::sizing_field | FT(0)] ] ]) + template + Mesh_criteria_3_impl(const CGAL_NP_CLASS& np) + :edge_criteria_(parameters::choose_parameter(parameters::get_parameter_reference(np, internal_np::edge_size_param), FT(DBL_MAX)), + parameters::choose_parameter(parameters::get_parameter(np, internal_np::edge_min_size_param), FT(0))), + facet_criteria_(parameters::choose_parameter(parameters::get_parameter(np, internal_np::facet_angle_param), FT(0)), + parameters::choose_parameter(parameters::get_parameter_reference(np, internal_np::facet_size_param), FT(0)), + parameters::choose_parameter(parameters::get_parameter_reference(np, internal_np::facet_distance_param), FT(0)), + parameters::choose_parameter(parameters::get_parameter(np, internal_np::facet_topology_param), CGAL::FACET_VERTICES_ON_SURFACE), + parameters::choose_parameter(parameters::get_parameter(np, internal_np::facet_min_size_param), FT(0))), + cell_criteria_(parameters::choose_parameter(parameters::get_parameter(np, internal_np::cell_radius_edge_ratio_param), FT(0)), + parameters::choose_parameter(parameters::get_parameter_reference(np, internal_np::cell_size_param), FT(0)), + parameters::choose_parameter(parameters::get_parameter(np, internal_np::cell_min_size_param), FT(0))) { } #ifndef CGAL_NO_DEPRECATED_CODE @@ -123,19 +94,19 @@ class Mesh_criteria_3_impl template void add_facet_criterion(Facet_criterion* criterion) { - CGAL_static_assertion((boost::is_base_of< + static_assert(std::is_base_of< typename Facet_criteria::Abstract_criterion, Facet_criterion - >::value)); + >::value); facet_criteria_.add(criterion); } template void add_cell_criterion(Cell_criterion* criterion) { - CGAL_static_assertion((boost::is_base_of< + static_assert(std::is_base_of< typename Cell_criteria::Abstract_criterion, Cell_criterion - >::value)); + >::value); cell_criteria_.add(criterion); } @@ -150,17 +121,67 @@ class Mesh_criteria_3_impl -// Class Mesh_criteria_3 -// Provides default mesh criteria to drive Mesh_3 process + +/*! +\ingroup PkgMesh3MeshClasses + +The class gathers the refinement criteria for mesh tetrahedra and +surface facets where +surface facets are facets in the mesh approximating the domain surface patches. +In addition, for domains with exposed 1-dimensional features, +the class `Mesh_criteria_3` +handles the definition of a sizing field to guide the discretization of +1-dimensional features. + +\tparam Tr has to be instantiated with the type used for +`C3T3::Triangulation`, +where `C3T3` is the model of `MeshComplex_3InTriangulation_3` +used in the mesh generation process, +and `C3T3::Triangulation` its nested triangulation type. + +\cgalModels{MeshCriteria_3,MeshCriteriaWithFeatures_3} + +\cgalHeading{Example} + +\code{.cpp} + +// Create a Mesh_criteria_3 object with all cell and facet parameters set +Mesh_criteria_3 criteria (parameters::facet_angle(30). + parameters::facet_size(1). + parameters::facet_distance(0.1). + parameters::cell_radius_edge_ratio(2). + parameters::cell_size(1.5)); + +// Create a Mesh_criteria_3 object with size ignored (note that the order changed) +Mesh_criteria_3 criteria (parameters::cell_radius_edge_ratio(2). + parameters::facet_angle(30). + parameters::facet_distance(0.1)); + +\endcode + +\sa `MeshCriteria_3` +\sa `MeshCriteriaWithFeatures_3` +\sa `MeshCellCriteria_3` +\sa `MeshEdgeCriteria_3` +\sa `MeshFacetCriteria_3` +\sa `MeshDomainField_3` +\sa `CGAL::Mesh_cell_criteria_3` +\sa `CGAL::Mesh_edge_criteria_3` +\sa `CGAL::Mesh_facet_criteria_3` +\sa `CGAL::Mesh_facet_topology` + +*/ template , typename FacetCriteria = Mesh_facet_criteria_3, typename CellCriteria = Mesh_cell_criteria_3 > class Mesh_criteria_3 +#ifndef DOXYGEN_RUNNING : public internal::Mesh_criteria_3_impl< Tr, EdgeCriteria, FacetCriteria, CellCriteria > +#endif { typedef internal::Mesh_criteria_3_impl< Tr, EdgeCriteria, @@ -168,38 +189,134 @@ class Mesh_criteria_3 CellCriteria> Base; public: +#ifdef DOXYGEN_RUNNING +/// \name Types +/// @{ + +/*! +The criteria for edges. +*/ +typedef Mesh_edge_criteria_3 Edge_criteria; + +/*! +The criteria for facets. +*/ +typedef Mesh_facet_criteria_3 Facet_criteria; + +/*! +The +criteria for cells. +*/ +typedef Mesh_cell_criteria_3 Cell_criteria; + +/// @} +#else typedef typename Base::Edge_criteria Edge_criteria; typedef typename Base::Facet_criteria Facet_criteria; typedef typename Base::Cell_criteria Cell_criteria; +#endif - // Constructor + /// Construction from facet and cell criteria, the edge criteria are ignored in this case. Mesh_criteria_3(Facet_criteria facet_criteria, Cell_criteria cell_criteria) : Base(facet_criteria, cell_criteria) {} - // Constructor + /// Constructor from edge, face, and cell criteria. Mesh_criteria_3(Edge_criteria edge_criteria, Facet_criteria facet_criteria, Cell_criteria cell_criteria) : Base(edge_criteria, facet_criteria, cell_criteria) {} - - // For convenient constructor call (see examples) - BOOST_PARAMETER_CONSTRUCTOR(Mesh_criteria_3, (Base), parameters::tag, - (optional (edge_size_,*) - (edge_sizing_field_,*) - (facet_angle_,*) - (facet_size_,*) - (facet_sizing_field_,*) - (facet_distance_,*) - (facet_topology_,*) - (cell_radius_edge_,*) - (cell_size_,*) - (cell_sizing_field_,*) - (sizing_field_,*) - )) +/*! + * \brief Construction from criteria parameters. + * + * Note that each size or distance parameter can be specified using two ways: either as a scalar field or + * as a numerical value when the field is uniform. + * + * If not specified, each parameter has a default value such that the corresponding criterion will be ignored. + * Numerical sizing or distance values, as well as scalar fields should be given in the unit used for coordinates + * of points in the mesh domain class of the mesh generation process. + * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{edge_size} + * \cgalParamDescription{a scalar field (resp. a constant) providing a space varying + * (resp. a uniform) + * upper bound for the lengths of curve edges. This parameter has to be set to a positive + * value when 1-dimensional features protection is used.} + * \cgalParamNEnd + * \cgalParamNBegin{edge_min_size} + * \cgalParamDescription{a desired uniform lower-bound for the lengths of curve edges. + * Only feature edges with a length larger than this bound will be refined. + * If a feature edge is too small with respect to this criterion, + * it will not be refined whether the other criteria are met or not.} + * \cgalParamExtra{If this criterion is applied during the meshing process, + * the feature protection algorithm correctness is not guaranteed anymore, + * and the output mesh may contain incorrect polyline features, + * or have missing polyline features.} + * \cgalParamExtra{Note this lower-bound may not be respected everywhere in the output mesh, + * to keep the feature graph valid.} + * \cgalParamNEnd + * \cgalParamNBegin{facet_angle} + * \cgalParamDescription{a lower bound for the angles (in degrees) of the + * surface mesh facets.} + * \cgalParamNEnd + * \cgalParamNBegin{facet_size} + * \cgalParamDescription{a scalar field (resp. a constant) describing + * a space varying (resp. a uniform) upper-bound or for the radii of the surface Delaunay balls.} + * \cgalParamNEnd + * \cgalParamNBegin{facet_min_size} + * \cgalParamDescription{a constant describing a uniform lower-bound for the radii of the surface Delaunay balls. + * Only facets with a radius larger than this bound will be refined. + * If a facet is too small with respect to this criterion, + * it will not be refined whether the other criteria are met or not.} + * \cgalParamNEnd + * \cgalParamNBegin{facet_distance} + * \cgalParamDescription{a scalar field (resp. a constant) describing a space varying (resp. a uniform) + * upper bound for the distance between the facet circumcenter and the center of its surface + * Delaunay ball.} + * \cgalParamNEnd + * \cgalParamNBegin{facet_topology} + * \cgalParamDescription{the set of topological constraints + * which have to be verified by each surface facet. See `Mesh_facet_topology` manual page to + * get all possible values.} + * \cgalParamDefault{CGAL::FACET_VERTICES_ON_SURFACE} + * \cgalParamNEnd + * \cgalParamNBegin{cell_radius_edge_ratio} + * \cgalParamDescription{ an upper bound for the radius-edge ratio of the mesh tetrahedra.} + * \cgalParamNEnd + * \cgalParamNBegin{cell_size} + * \cgalParamDescription{ a scalar field (resp. a constant) describing + * a space varying (resp. a uniform) upper-bound for the circumradii of the mesh tetrahedra.} + * \cgalParamNEnd + * \cgalParamNBegin{cell_min_size} + * \cgalParamDescription{ a constant describing a uniform lower-bound for the radii of the circumradii + * of the mesh tetrahedra. + * Only tetrahedra with a circumradius larger than this bound will be refined. + * If a cell is too small with respect to this criterion, + * it will not be refined whether the other criteria are met or not.} + * \cgalParamNEnd + * \cgalNamedParamsEnd + */ +template +Mesh_criteria_3(const CGAL_NP_CLASS& np = parameters::default_values()): Base(np) +{ +} + +// Overload handling parameters passed with operator= +template +Mesh_criteria_3(const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) + : Mesh_criteria_3(internal_np::combine_named_parameters(np1, np2, nps...)) +{ +} }; // end class Mesh_criteria_3 diff --git a/thirdparty/CGAL/include/CGAL/Mesh_domain_with_polyline_features_3.h b/thirdparty/CGAL/include/CGAL/Mesh_domain_with_polyline_features_3.h index c27a97ad..2fdfaf69 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_domain_with_polyline_features_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_domain_with_polyline_features_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h $ -// $Id: Mesh_domain_with_polyline_features_3.h 67a5a69 2022-08-25T10:29:04+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h $ +// $Id: include/CGAL/Mesh_domain_with_polyline_features_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -29,17 +29,15 @@ #include #include #include -#include +#include #include #include #include #include +#include -#include // for boost::prior and boost::next -#include -#include -#include +#include #include namespace CGAL { @@ -63,7 +61,7 @@ class Polyline Polyline() {} ~Polyline() {} - /// Add a point at the end of the polyline + /// adds a point at the end of the polyline void add_point(const Point_3& p) { if( points_.empty() || p != end_point() ) { @@ -71,27 +69,27 @@ class Polyline } } - /// Returns the starting point of the polyline + /// returns the starting point of the polyline const Point_3& start_point() const { CGAL_assertion( ! points_.empty() ); return points_.front(); } - /// Returns the ending point of the polyline + /// returns the ending point of the polyline const Point_3& end_point() const { CGAL_assertion( ! points_.empty() ); return points_.back(); } - /// Returns `true` if the polyline is not degenerated + /// returns `true` if the polyline is not degenerate bool is_valid() const { return points_.size() > 1; } - /// Returns `true` if polyline is a loop + /// returns `true` if polyline is a loop bool is_loop() const { return start_point() == end_point(); @@ -202,7 +200,7 @@ class Polyline } - /// Returns the angle at the first point. + /// returns the angle at the first point. /// \pre The polyline must be a loop. Angle angle_at_first_point() const { CGAL_precondition(is_loop()); @@ -212,7 +210,7 @@ class Polyline return angle(prev, first, next_p); } - /// Returns the length of the polyline + /// returns the length of the polyline FT length() const { //TODO: cache result @@ -228,7 +226,7 @@ class Polyline return result; } - /// Returns signed geodesic distance between \c p and \c q + /// returns the signed geodesic distance between `p` and `q`. FT signed_geodesic_distance(const Point_3& p, const Point_3& q) const { // Locate p & q on polyline @@ -260,7 +258,7 @@ class Polyline } - /// Returns a point at geodesic distance \c distance from p along the + /// returns a point at geodesic distance `distance` from p along the /// polyline. The polyline is oriented from starting point to end point. /// The distance could be negative. Point_3 point_at(const Point_3& p, FT distance) const @@ -333,7 +331,7 @@ class Polyline return (points_.end() - 2); } - /// Returns an iterator on the starting point of the segment of the + /// returns an iterator on the starting point of the segment of the /// polyline which contains p /// if end_point_first is true, then --end is returned instead of begin /// if p is the starting point of a loop. @@ -453,7 +451,7 @@ class Polyline }; // end class Polyline -template +template struct Mesh_domain_segment_of_curve_primitive{ typedef typename std::iterator_traits::value_type Map_value_type; typedef typename Map_value_type::first_type Curve_id; @@ -465,7 +463,7 @@ struct Mesh_domain_segment_of_curve_primitive{ typedef typename std::iterator_traits< typename Polyline::const_iterator>::value_type Point; - typedef typename Gt::Segment_3 Datum; + typedef typename GT::Segment_3 Datum; Id id_; @@ -518,93 +516,90 @@ struct Display_incidences_to_curves_aux { /*! \ingroup PkgMesh3Domains -The class `Mesh_domain_with_polyline_features_3` is designed to allow the user +The class `Mesh_domain_with_polyline_features_3` enables the user to add some 0- and 1-dimensional features into any model of the `MeshDomain_3` concept. The 1-dimensional features are described as polylines whose endpoints are the added corners. -\tparam MeshDomain_3 is the type -of the domain which should be extended. -It has to be a model of the `MeshDomain_3` concept. +\tparam MD is the type of the domain which is extended. It has to be a model of the `MeshDomain_3` concept. -\cgalModels `MeshDomainWithFeatures_3` +\cgalModels{MeshDomainWithFeatures_3} -\sa `MeshDomain_3` \sa `MeshPolyline_3` -\sa `CGAL::Implicit_mesh_domain_3` -\sa `CGAL::Polyhedral_mesh_domain_3` -\sa `CGAL::Labeled_image_mesh_domain_3` - +\sa `CGAL::Polyhedral_mesh_domain_3` */ -template < typename MeshDomain_3 > +template < typename MD > class Mesh_domain_with_polyline_features_3 - : public MeshDomain_3 + : public MD { - typedef Mesh_domain_with_polyline_features_3 Self; + typedef Mesh_domain_with_polyline_features_3 Self; + public: -/// \name Types -/// @{ - typedef typename MeshDomain_3::Surface_patch_index Surface_patch_index; - typedef typename MeshDomain_3::Subdomain_index Subdomain_index; + /// \name Types + /// @{ + + typedef typename MD::Surface_patch_index Surface_patch_index; + typedef typename MD::Subdomain_index Subdomain_index; typedef int Curve_index; typedef int Corner_index; +#ifdef DOXYGEN_RUNNING + typedef unspecified_type Index; +#else typedef typename Mesh_3::internal::Index_generator_with_features< - typename MeshDomain_3::Subdomain_index, + typename MD::Subdomain_index, Surface_patch_index, Curve_index, Corner_index>::type Index; +#endif typedef CGAL::Tag_true Has_features; - typedef typename MeshDomain_3::R::FT FT; -/// @} + typedef typename MD::R::FT FT; -#ifndef DOXYGEN_RUNNING + /// @} #ifndef CGAL_NO_DEPRECATED_CODE - typedef Curve_index Curve_segment_index; + typedef Curve_index Curve_segment_index; #endif - typedef typename MeshDomain_3::R Gt; - typedef Gt R; - typedef typename MeshDomain_3::Point_3 Point_3; -#endif // DOXYGEN_RUNNING + typedef typename MD::R GT; + typedef GT R; + typedef typename MD::Point_3 Point_3; -/// \name Creation -/// Constructors. Forwards the arguments to the constructor -/// of the base class. -/// @{ + /// \name Creation + /// @{ + // forwards the arguments to the constructor of the base class. template Mesh_domain_with_polyline_features_3(const T& ...o) - : MeshDomain_3(o...) + : MD(o...) , current_corner_index_(1) , current_curve_index_(1) , curves_aabb_tree_is_built(false) {} Mesh_domain_with_polyline_features_3(const Mesh_domain_with_polyline_features_3&) = default; -/// @} + /// @} -/// \name Operations -/// @{ + /// \name Operations + /// @{ /// @cond DEVELOPERS - /// @{ - /// Add a 0-dimensional feature in the domain. + /// adds a 0-dimensional feature in the domain. Corner_index add_corner(const Point_3& p); - /// Overloads where the last parameter \c out is not `CGAL::Emptyset_iterator()`. + /// Overload where the last parameter `out` is not `CGAL::Emptyset_iterator()`. template IndicesOutputIterator add_corners(InputIterator first, InputIterator end, IndicesOutputIterator out /*= CGAL::Emptyset_iterator()*/); /*! - Add 0-dimensional features in the domain. The value type of `InputIterator` must - be `Point_3`. + adds 0-dimensional features in the domain. + + The value type of `InputIterator` must be `Point_3`. */ template void @@ -614,7 +609,7 @@ class Mesh_domain_with_polyline_features_3 Corner_index register_corner(const Point_3& p, const Curve_index& index); Corner_index add_corner_with_context(const Point_3& p, const Surface_patch_index& index); - /// Overloads where the last parameter \c out is not + /// Overload where the last parameter `out` is not /// `CGAL::Emptyset_iterator()`. template IndicesOutputIterator @@ -637,11 +632,13 @@ class Mesh_domain_with_polyline_features_3 add_features_with_context(InputIterator first, InputIterator end, IndicesOutputIterator out /*= CGAL::Emptyset_iterator()*/); - /// @} - /// \endcond + + /// @endcond + /*! - Add 1-dimensional features in the domain. `InputIterator` value type must - be a model of the concept `MeshPolyline_3`. + adds 1-dimensional features in the domain. + + The value type of `InputIterator` must be a model of the concept `MeshPolyline_3`. */ template void @@ -649,16 +646,17 @@ class Mesh_domain_with_polyline_features_3 { add_features(first, end, CGAL::Emptyset_iterator()); } /// @cond DEVELOPERS - /// Undocumented function, kept for backward-compatibility with existing - /// code + + /// Undocumented function, kept for backward-compatibility with existing code template void add_features_with_context(InputIterator first, InputIterator end) { add_features_with_context(first, end, CGAL::Emptyset_iterator()); } + /// @endcond /*! - Add 1-dimensional features (curves) from the range `[first, end)` in the domain with their incidences + adds 1-dimensional features (curves) from the range `[first, end)` in the domain with their incidences with 2-dimensional features (patches) of the domain. \tparam InputIterator input iterator over curves @@ -691,100 +689,100 @@ class Mesh_domain_with_polyline_features_3 incident_patches_indices_pmap, CGAL::Emptyset_iterator()); } -/// @} -/// \name Implementation of the concept MeshDomainWithFeatures_3 -/// The following methods implement the requirement of the concept -/// `MeshDomainWithFeatures_3`. -/// @{ + /// @} + + /// \name Implementation of the concept MeshDomainWithFeatures_3 + /// The following methods implement the requirements of the concept + /// `MeshDomainWithFeatures_3`. + /// @{ - /// Implements `MeshDomainWithFeatures_3::get_corners()`. - /// OutputIterator value type is std::pair + /// implements `MeshDomainWithFeatures_3::get_corners()`. + /// OutputIterator is `std::pair` template OutputIterator get_corners(OutputIterator out) const; - /// Implements `MeshDomainWithFeatures_3::get_curves()`. + /// implements `MeshDomainWithFeatures_3::get_curves()`. /// OutputIterator value type is std::tuple, std::pair > template OutputIterator get_curves(OutputIterator out) const; - /// Implements `MeshDomainWithFeatures_3::curve_segment_length()`. + /// implements `MeshDomainWithFeatures_3::curve_segment_length()`. FT curve_segment_length(const Point_3& p, const Point_3 q, const Curve_index& curve_index, CGAL::Orientation orientation) const; - /// Implements `MeshDomainWithFeatures_3::curve_length()`. + /// implements `MeshDomainWithFeatures_3::curve_length()`. FT curve_length(const Curve_index& curve_index) const; - /// Implements `MeshDomainWithFeatures_3::construct_point_on_curve()`. + /// implements `MeshDomainWithFeatures_3::construct_point_on_curve()`. Point_3 construct_point_on_curve(const Point_3& starting_point, const Curve_index& curve_index, FT distance) const; - /// Implements `MeshDomainWithFeatures_3::distance_sign_along_loop()`. + /// implements `MeshDomainWithFeatures_3::distance_sign_along_loop()`. CGAL::Sign distance_sign_along_loop(const Point_3& p, const Point_3& q, const Point_3& r, const Curve_index& index) const; - /// Implements `MeshDomainWithFeatures_3::distance_sign()`. + /// implements `MeshDomainWithFeatures_3::distance_sign()`. CGAL::Sign distance_sign(const Point_3& p, const Point_3& q, const Curve_index& index) const; - /// Implements `MeshDomainWithFeatures_3::is_loop()`. + /// implements `MeshDomainWithFeatures_3::is_loop()`. bool is_loop(const Curve_index& index) const; - /// Implements `MeshDomainWithFeatures_3::is_curve_segment_covered()`. + /// implements `MeshDomainWithFeatures_3::is_curve_segment_covered()`. bool is_curve_segment_covered(const Curve_index& index, CGAL::Orientation orientation, const Point_3& c1, const Point_3& c2, const FT sq_r1, const FT sq_r2) const; - /** * Returns the index to be stored in a vertex lying on the surface identified - * by \c index. + * by `index`. */ Index index_from_surface_patch_index(const Surface_patch_index& index) const { return Index(index); } /** * Returns the index to be stored in a vertex lying in the subdomain - * identified by \c index. + * identified by `index`. */ Index index_from_subdomain_index(const Subdomain_index& index) const { return Index(index); } - /// Returns an `Index` from a `Curve_index` + /// returns an `Index` from a `Curve_index` Index index_from_curve_index(const Curve_index& index) const { return Index(index); } - /// Returns an `Index` from a `Corner_index` + /// returns an `Index` from a `Corner_index` Index index_from_corner_index(const Corner_index& index) const { return Index(index); } /** - * Returns the \c Surface_patch_index of the surface patch - * where lies a vertex with dimension 2 and index \c index. + * Returns the `Surface_patch_index` of the surface patch + * where lies a vertex with dimension 2 and index `index`. */ Surface_patch_index surface_patch_index(const Index& index) const - { return boost::get(index); } + { return Mesh_3::internal::get_index(index); } /** * Returns the index of the subdomain containing a vertex - * with dimension 3 and index \c index. + * with dimension 3 and index `index`. */ Subdomain_index subdomain_index(const Index& index) const - { return boost::get(index); } + { return Mesh_3::internal::get_index(index); } - /// Returns a `Curve_index` from an `Index` + /// returns a `Curve_index` from an `Index` Curve_index curve_index(const Index& index) const - { return boost::get(index); } + { return Mesh_3::internal::get_index(index); } - /// Returns a `Corner_index` from an `Index` + /// returns a `Corner_index` from an `Index` Corner_index corner_index(const Index& index) const - { return boost::get(index); } + { return Mesh_3::internal::get_index(index); } /// @cond DEVELOPERS #ifndef CGAL_NO_DEPRECATED_CODE @@ -828,29 +826,29 @@ class Mesh_domain_with_polyline_features_3 Curve_index insert_edge(InputIterator first, InputIterator end); /// @endcond -/// @} + /// @} private: void compute_corners_incidences(); - /// Returns Index associated to p (p must be the coordinates of a corner + /// returns Index associated to p (p must be the coordinates of a corner /// point) Index point_corner_index(const Point_3& p) const; private: typedef std::map Corners; - typedef Mesh_3::internal::Polyline Polyline; + typedef Mesh_3::internal::Polyline Polyline; typedef std::map Edges; typedef std::map Edges_incidences; typedef std::map > Corners_tmp_incidences; typedef std::map Corners_incidences; typedef Mesh_3::internal::Mesh_domain_segment_of_curve_primitive< - Gt, + GT, typename Edges::const_iterator> Curves_primitives; - typedef CGAL::AABB_traits AABB_curves_traits; Corners corners_; @@ -880,11 +878,11 @@ class Mesh_domain_with_polyline_features_3 } Curve_index maximal_curve_index() const { if(edges_incidences_.empty()) return Curve_index(); - return boost::prior(edges_incidences_.end())->first; + return std::prev(edges_incidences_.end())->first; } void build_curves_aabb_tree() const { -#if CGAL_MESH_3_VERBOSE +#ifdef CGAL_MESH_3_VERBOSE std::cerr << "Building curves AABB tree..."; CGAL::Real_timer timer; timer.start(); @@ -910,13 +908,15 @@ class Mesh_domain_with_polyline_features_3 } curves_aabb_tree_ptr_->build(); curves_aabb_tree_is_built = true; -#if CGAL_MESH_3_VERBOSE +#ifdef CGAL_MESH_3_VERBOSE timer.stop(); std::cerr << " done (" << timer.time() * 1000 << " ms)" << std::endl; #endif - } // end build_curves_aabb_tree() + } // build_curves_aabb_tree() + /// @endcond -}; // end class Mesh_domain_with_polyline_features_3 + +}; // class Mesh_domain_with_polyline_features_3 @@ -1455,9 +1455,9 @@ insert_edge(InputIterator first, InputIterator end) // 'compute_corners_incidences()', that corner is incident only to a // loop, then it will be removed from the set of corners. register_corner(*first, curve_index); - if ( *first != *boost::prior(end) ) + if ( *first != *std::prev(end) ) { - register_corner(*boost::prior(end), curve_index); + register_corner(*std::prev(end), curve_index); } // Create a new polyline @@ -1544,9 +1544,6 @@ is_curve_segment_covered(const Curve_index& index, c1, c2, sq_r1, sq_r2); } - - } //namespace CGAL - #endif // CGAL_MESH_DOMAIN_WITH_POLYLINE_FEATURES_3_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_edge_criteria_3.h b/thirdparty/CGAL/include/CGAL/Mesh_edge_criteria_3.h index 597fb0a4..f339e965 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_edge_criteria_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_edge_criteria_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_edge_criteria_3.h $ -// $Id: Mesh_edge_criteria_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_edge_criteria_3.h $ +// $Id: include/CGAL/Mesh_edge_criteria_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -85,43 +85,103 @@ namespace internal { } // end namespace internal } // end namespace Mesh_3 + +/*! +\ingroup PkgMesh3MeshClasses + +The function object class `Mesh_edge_criteria_3` is a model of `MeshEdgeCriteria_3`. It +provides a bound for the size criterion. + +\cgalModels{MeshEdgeCriteria_3} + +\sa `MeshCriteria_3` +\sa `CGAL::Mesh_criteria_3` +\sa `MeshDomainField_3` +*/ template < typename Tr > class Mesh_edge_criteria_3 { +private: typedef Mesh_edge_criteria_3 Self; + typedef typename Tr::Geom_traits GT; public: - typedef typename Tr::Vertex::Index Index; - typedef typename Tr::Geom_traits Gt; - typedef typename Gt::FT FT; - typedef typename Tr::Bare_point Point_3; - /// Constructors - Mesh_edge_criteria_3(const FT& value) + /// \name Types + /// @{ + /*! + Numerical type. + */ + typedef typename Tr::Geom_traits::FT FT; + typedef typename Tr::Vertex::Index Index; + typedef typename Tr::Bare_point Point_3; + + /// @} + + + /// \name Creation + /// @{ + /*! + * returns an object to serve as criteria for edges. + * + * \param length_bound is an upper bound + * for the length of the edges which are used to discretize the curves. + * \param min_length_bound is a desired lower bound + * for the length of the edges which are used to discretize the curves. + * Only edges that are longer than this bound will be refined. Using + * this lower bound can be handy on some domains, but using it may + * break all the surface topology guarantees of the meshing algorithm. + * It is not guaranteed to be exactly respected in the output mesh. + * + * \note If one parameter is set to 0, then its corresponding criterion is ignored. + */ + Mesh_edge_criteria_3(const FT& length_bound, + const FT& min_length_bound = 0) + : p_size_(new Mesh_3::internal::Sizing_field_container< - Mesh_constant_domain_field_3 , + Mesh_constant_domain_field_3 , FT, Point_3, - Index>(value)) + Index>(length_bound)) + , min_length_bound_(min_length_bound) {} // Nb: SFINAE to avoid wrong matches with built-in numerical types // as int. - template < typename Sizing_field > + + /*! + * returns an object to serve as criteria for edges. + * The behavior and semantic of the argument are the same + * as above, except that the `length_bound` + * parameter is a functional instead of a constant. + * + * @tparam SizingField a model of `MeshDomainField_3` + */ + template < typename SizingField > Mesh_edge_criteria_3 ( - const Sizing_field& size, - typename std::enable_if::value>::type* = 0 + + const SizingField& length_bound, + const FT& min_length_bound = 0 +#ifndef DOXYGEN_RUNNING + , std::enable_if_t::value>* = 0 +#endif ) + : min_length_bound_(min_length_bound) { - p_size_ = new Mesh_3::internal::Sizing_field_container(size); + Index>(length_bound); } + /// @} + +#ifndef DOXYGEN_RUNNING Mesh_edge_criteria_3(const Self& rhs) - : p_size_(rhs.p_size_->clone()) {} + : p_size_(rhs.p_size_->clone()) + , min_length_bound_(rhs.min_length_bound_) + {} /// Destructor ~Mesh_edge_criteria_3() @@ -133,6 +193,13 @@ class Mesh_edge_criteria_3 FT sizing_field(const Point_3& p, const int dim, const Index& index) const { return (*p_size_)(p,dim,index); } +public: + const FT& min_length_bound() const + { + return min_length_bound_; + } +#endif + private: typedef Mesh_3::internal::Sizing_field_interface Sizing_field_interface; @@ -140,6 +207,7 @@ class Mesh_edge_criteria_3 // A pointer to Sizing_field_interface to handle dynamic wrapping of // real Sizing_field type Sizing_field_interface* p_size_; + const FT min_length_bound_; }; } // end namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Mesh_error_code.h b/thirdparty/CGAL/include/CGAL/Mesh_error_code.h index a57ca4de..cf0535f4 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_error_code.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_error_code.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_error_code.h $ -// $Id: Mesh_error_code.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_error_code.h $ +// $Id: include/CGAL/Mesh_error_code.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau @@ -14,17 +14,13 @@ #include +#include + #include #include namespace CGAL { -enum Mesh_error_code { - CGAL_MESH_3_NO_ERROR = 0, - CGAL_MESH_3_MAXIMAL_NUMBER_OF_VERTICES_REACHED, - CGAL_MESH_3_STOPPED -}; - inline std::string mesh_error_string(const Mesh_error_code& error_code) { switch(error_code) { diff --git a/thirdparty/CGAL/include/CGAL/Mesh_facet_criteria_3.h b/thirdparty/CGAL/include/CGAL/Mesh_facet_criteria_3.h index 8d39656e..abe7a996 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_facet_criteria_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_facet_criteria_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_facet_criteria_3.h $ -// $Id: Mesh_facet_criteria_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_facet_criteria_3.h $ +// $Id: include/CGAL/Mesh_facet_criteria_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -25,13 +25,53 @@ #include #include +#include + namespace CGAL { -template > +/*! + \ingroup PkgMesh3MeshClasses + + The class `Mesh_facet_criteria_3` is a model of `MeshFacetCriteria_3`. + It provides a uniform bound for the shape criterion, + a uniform or variable sizing field + for the size criterion and/or + a uniform or variable distance field + for the approximation error criterion. + + \tparam Tr must be identical to the nested type + `Triangulation` of the instance used as model of + `MeshComplex_3InTriangulation_3`. + + \cgalModels{MeshFacetCriteria_3} + + \sa `MeshCriteria_3` + \sa `MeshFacetCriteria_3` + \sa `MeshDomainField_3` + \sa `CGAL::Mesh_facet_topology` + \sa `CGAL::Mesh_criteria_3` + \sa `CGAL::make_mesh_3()` + +*/ +template +#endif + > class Mesh_facet_criteria_3 { public: + + /// \name Types + /// @{ + + /*! + Numerical type + */ + typedef typename Tr::Geom_traits::FT FT; + + /// @} + typedef Visitor_ Visitor; typedef typename Visitor::Facet_quality Facet_quality; typedef typename Visitor::Is_facet_bad Is_facet_bad; @@ -41,41 +81,88 @@ class Mesh_facet_criteria_3 typedef Mesh_3::Criteria Criteria; typedef typename Tr::Facet Facet; - typedef typename Tr::Geom_traits::FT FT; + typedef Mesh_facet_criteria_3 Self; public: typedef CGAL::Tag_true Has_manifold_criterion; - /** - * @brief Constructor - */ - template < typename Sizing_field, typename Sizing_field2 > + /// \name Creation + /// @{ + +#ifdef DOXYGEN_RUNNING + /*! + returns an object to serve as criteria for facets. + + \param angle_bound is the lower bound for the angles in degrees of the + surface mesh facets. + \param radius_bound is a uniform upper bound + for the radius of the surface Delaunay balls. + \param distance_bound is an upper bound for the center-center distances + of the surface mesh facets. + \param topology is the set of topological constraints + which have to be verified by each surface facet. See + section \ref Mesh_3DelaunayRefinement for further details. + \param min_radius_bound is a uniform lower bound for the radius of + the surface Delaunay balls. Only facets with a radius larger than that + bound will be refined. + + @note If one parameter is set to 0, then its corresponding + criterion is ignored. + */ + Mesh_facet_criteria_3(const FT& angle_bound, + const FT& radius_bound, + const FT& distance_bound, + const Mesh_facet_topology topology = FACET_VERTICES_ON_SURFACE, + const FT& min_radius_bound = 0.); + +#endif + + + /*! + Returns an object to serve as criteria for facets. The types `SizingField` and + `DistanceField` must + be models of the concept `MeshDomainField_3`. The behavior and semantic of the arguments are the same + as above, except that the radius and distance bound parameters are + functionals instead of constants. + */ + template < typename SizingField, typename DistanceField > Mesh_facet_criteria_3(const FT& angle_bound, - const Sizing_field & radius_bound, - const Sizing_field2& distance_bound, - const Mesh_facet_topology topology = - FACET_VERTICES_ON_SURFACE) + const SizingField & radius_bound, + const DistanceField& distance_bound, + const Mesh_facet_topology topology = FACET_VERTICES_ON_SURFACE, + const FT& min_radius_bound = 0.) + : squared_min_radius_bound_(std::nullopt) { + if (FT(0) != min_radius_bound) + { + init_min_radius(min_radius_bound); + squared_min_radius_bound_ = CGAL::square(min_radius_bound); + } + if ( FT(0) != angle_bound ) init_aspect(angle_bound); init_radius(radius_bound, - Mesh_3::Is_mesh_domain_field_3()); + Mesh_3::Is_mesh_domain_field_3()); init_distance(distance_bound, - Mesh_3::Is_mesh_domain_field_3()); + Mesh_3::Is_mesh_domain_field_3()); init_topo(topology); } -/// Destructor + /// @} + + + // Destructor ~Mesh_facet_criteria_3() { } /** - * @brief returns whether the facet \c facet is bad or not. - * @param tr the triangulation within which \c facet lives + * @brief returns whether the facet `facet` is bad or not. + * + * @param tr the triangulation within which `facet` lives * @param facet the facet */ Is_facet_bad operator()(const Tr& tr, const Facet& facet) const @@ -92,6 +179,13 @@ class Mesh_facet_criteria_3 return topology_; } + std::optional squared_min_radius_bound() const { + if(squared_min_radius_bound_) + return *squared_min_radius_bound_; + else + return std::nullopt; + } + private: void init_aspect(const FT& angle_bound) { @@ -113,6 +207,12 @@ class Mesh_facet_criteria_3 criteria_.add(new Variable_size_criterion(radius_bound)); } + void init_min_radius(const FT& min_radius_bound) + { + typedef Mesh_3::Uniform_size_criterion Uniform_size_criterion; + criteria_.add(new Uniform_size_criterion(min_radius_bound, true/*lower bound*/)); + } + void init_distance(const FT& distance_bound, Tag_false) { if(FT(0) == distance_bound) return; @@ -155,6 +255,7 @@ class Mesh_facet_criteria_3 private: Criteria criteria_; Mesh_facet_topology topology_; + std::optional squared_min_radius_bound_; }; // end class Mesh_facet_criteria_3 } // end namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Mesh_facet_topology.h b/thirdparty/CGAL/include/CGAL/Mesh_facet_topology.h index 7640be9f..bf09b4a4 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_facet_topology.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_facet_topology.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_facet_topology.h $ -// $Id: Mesh_facet_topology.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_facet_topology.h $ +// $Id: include/CGAL/Mesh_facet_topology.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,13 +22,35 @@ namespace CGAL { -enum Mesh_facet_topology { - FACET_VERTICES_ON_SURFACE = 1, - FACET_VERTICES_ON_SAME_SURFACE_PATCH = 2, - FACET_VERTICES_ON_SAME_SURFACE_PATCH_WITH_ADJACENCY_CHECK = 3, +/*! +\ingroup PkgMesh3Enum + +The enum `Mesh_facet_topology` is designed to tell which constraints have to +be checked on each surface facet during the mesh refinement process. + +\sa `CGAL::Mesh_criteria_3`, +\sa `CGAL::Mesh_facet_criteria_3`. +*/ +enum Mesh_facet_topology +{ + FACET_VERTICES_ON_SURFACE = 1,//!< Each vertex of the facet has + //!< to be on the surface, on a curve, or on a corner. + FACET_VERTICES_ON_SAME_SURFACE_PATCH = 2, //!< The three vertices of a facet belonging + //!< to a surface patch `s` have to be on + //!< the same surface patch `s`, on a curve or on a corner. + /*! + The three vertices of a facet belonging to a surface patch `s` + have to be on the same surface patch `s`, or on a curve + incident to the surface patch `s` or on a corner incident to the + surface patch `s`. + */ + FACET_VERTICES_ON_SAME_SURFACE_PATCH_WITH_ADJACENCY_CHECK = 3 +#ifndef DOXYGEN_RUNNING + , MANIFOLD_WITH_BOUNDARY = 8, NO_BOUNDARY = 16, MANIFOLD = 24 +#endif }; } // end namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Mesh_optimization_return_code.h b/thirdparty/CGAL/include/CGAL/Mesh_optimization_return_code.h index d827cbf5..8b607436 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_optimization_return_code.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_optimization_return_code.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesher_level/include/CGAL/Mesh_optimization_return_code.h $ -// $Id: Mesh_optimization_return_code.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesher_level/include/CGAL/Mesh_optimization_return_code.h $ +// $Id: include/CGAL/Mesh_optimization_return_code.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesh_polyhedron_3.h b/thirdparty/CGAL/include/CGAL/Mesh_polyhedron_3.h index 4f2552d7..c7e2fd8a 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_polyhedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_polyhedron_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_polyhedron_3.h $ -// $Id: Mesh_polyhedron_3.h 0f4559a 2021-04-06T17:39:54+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_polyhedron_3.h $ +// $Id: include/CGAL/Mesh_polyhedron_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -209,13 +209,45 @@ class Mesh_polyhedron_items : public CGAL::Polyhedron_items_3 { } // end namespace Mesh_3 +/*! +\ingroup PkgMesh3Domains -template +The class `Mesh_polyhedron_3` provides a customized `Polyhedron_3` type. This type uses +as `PolyhedronItems_3` a customized type which adds data to the `Vertex`, `Face` and +`Halfedge` classes. Those data are required to use the detection of sharp features. + +\tparam IGT stands for the geometric traits associated +to the meshing process. It must be a model of the two concepts +`PolyhedronTraits_3` and `IntersectionGeometricTraits_3`. + +\sa `CGAL::Polyhedron_3` +\sa `CGAL::Polyhedral_mesh_domain_with_features_3` + +*/ +#ifdef DOXYGEN_RUNNING +template struct Mesh_polyhedron_3 { - typedef Polyhedron_3 > type; + /// \name Types + /// @{ + + /*! + `CGAL::Polyhedron_3` type with customized `PolyhedronItems_3` designed to handle sharp feature detection. + */ + typedef unspecified_type type; + + /// @} +}; +#else +template +struct Mesh_polyhedron_3 +{ + typedef Polyhedron_3 > type; typedef type Type; }; +#endif + } // end namespace CGAL #endif // CGAL_MESH_POLYHEDRON_3_H diff --git a/thirdparty/CGAL/include/CGAL/Mesh_triangulation_3.h b/thirdparty/CGAL/include/CGAL/Mesh_triangulation_3.h index b0c0e4d9..458ffffd 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_triangulation_3.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_triangulation_3.h $ -// $Id: Mesh_triangulation_3.h 91d862d 2021-12-23T11:58:19+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_triangulation_3.h $ +// $Id: include/CGAL/Mesh_triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -28,7 +28,7 @@ #include #include -#include +#include namespace CGAL { @@ -62,12 +62,14 @@ class Mesh_3_regular_triangulation_3_wrapper typedef typename Base::Triangle Triangle; typedef typename Base::Vertex_handle Vertex_handle; + typedef typename Base::Facet Facet; typedef typename Base::Cell_handle Cell_handle; typedef typename Geom_traits::Vector_3 Vector; using Base::geom_traits; using Base::point; + using Base::triangle; static std::string io_signature() { return Get_io_signature()(); } @@ -75,7 +77,7 @@ class Mesh_3_regular_triangulation_3_wrapper // because of Periodic_3_mesh_3: they are functions for which both triangulations // have fundamentally different implementations (usually, Periodic_3_mesh_3 // does not know the offset of a point and must brute-force check for all - // possibilities). To allow Periodic_3_mesh_3 to use Mesh_3's files, + // possibilities). To enable Periodic_3_mesh_3 to use Mesh_3's files, // each mesh triangulation implements its own version. const Bare_point& get_closest_point(const Bare_point& /*p*/, const Bare_point& q) const @@ -83,9 +85,9 @@ class Mesh_3_regular_triangulation_3_wrapper return q; } - const Triangle& get_closest_triangle(const Bare_point& /*p*/, const Triangle& t) const + Triangle get_incident_triangle(const Facet& f, const Vertex_handle) const { - return t; + return triangle(f); } void set_point(const Vertex_handle v, @@ -122,44 +124,93 @@ class Mesh_3_regular_triangulation_3_wrapper } }; -// Struct Mesh_triangulation_3 -// + +/*! +\ingroup PkgMesh3MeshClasses + +The class `Mesh_triangulation_3` is a class template which provides the triangulation +type to be used for the 3D triangulation embedding the mesh. + +\tparam MD must be a model of `MeshDomain_3`. + +\tparam GT must be a model of `MeshTriangulationTraits_3` or `Default` +and defaults to `Kernel_traits::%Kernel`. + +\tparam ConcurrencyTag enables sequential versus parallel meshing and optimization algorithms. + Possible values are `Sequential_tag` (the default), `Parallel_tag`, + and `Parallel_if_available_tag`. + +\tparam VertexBase must be a model of `MeshVertexBase_3` or `Default` +and defaults to `Mesh_vertex_base_3`. + +\tparam CellBase must be a model of `MeshCellBase_3` or `Default` +and defaults to `Compact_mesh_cell_base_3`. + +\warning To improve the robustness of the meshing process, the input traits `GT` + is wrapped with the traits class `Robust_weighted_circumcenter_filtered_traits_3`. + The class `Robust_weighted_circumcenter_filtered_traits_3` upgrades the functors + models of `Kernel::ConstructWeightedCircumcenter_3`, `Kernel::ComputeSquaredRadius_3`, + and `Kernel::ComputeSquaredRadiusSmallestOrthogonalSphere_3` that are + provided by `GT` to use exact computations when the geometric configuration + is close to degenerate (e.g. almost coplanar points).

    + Users should therefore be aware that the traits class of the triangulation + will have type `Robust_weighted_circumcenter_filtered_traits_3`. + +\sa `make_mesh_3()` +\sa `Mesh_complex_3_in_triangulation_3` + +*/ template + class GT = Default, + class ConcurrencyTag = Sequential_tag, + class VertexBase = Default, + class CellBase = Default> struct Mesh_triangulation_3 { private: - using K = typename Default::Lazy_get >::type; + using K = typename Default::Lazy_get >::type; using Geom_traits = typename details::Mesh_geom_traits_generator::type; using Indices_tuple = Mesh_3::internal::Indices_tuple_t; using Vertex_base = typename Default::Get< - Vertex_base_, + VertexBase, Mesh_vertex_generator_3 >::type; using Cell_base = typename Default::Get< - Cell_base_, + CellBase, Compact_mesh_cell_generator_3 >::type; using Concurrency_tag = - typename Default::Get::type; + typename Default::Get::type; struct Tds : public Triangulation_data_structure_3 {}; using Triangulation = Mesh_3_regular_triangulation_3_wrapper; public: +#ifndef DOXYGEN_RUNNING using type = Triangulation; using Type = type; -}; // end struct Mesh_triangulation_3 -} // end namespace CGAL +#else + /// \name Types + /// @{ + + /*! + The triangulation type to be used for the 3D triangulation embedding the mesh. + This type is a wrapper around the type `CGAL::Regular_triangulation_3`, whose vertex + and cell base classes are respectively `VertexBase` and `CellBase`. + */ + typedef unspecified_type type; + + /// @} +#endif // DOXYGEN_RUNNING +}; + +} // end namespace CGAL #include diff --git a/thirdparty/CGAL/include/CGAL/Mesh_vertex_base_3.h b/thirdparty/CGAL/include/CGAL/Mesh_vertex_base_3.h index 88e4dcd8..09207271 100644 --- a/thirdparty/CGAL/include/CGAL/Mesh_vertex_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Mesh_vertex_base_3.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Mesh_vertex_base_3.h $ -// $Id: Mesh_vertex_base_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Mesh_vertex_base_3.h $ +// $Id: include/CGAL/Mesh_vertex_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Stéphane Tayeb, Andreas Fabri @@ -20,12 +20,12 @@ #ifndef CGAL_COMPACT_MESH_VERTEX_BASE_3_H #define CGAL_COMPACT_MESH_VERTEX_BASE_3_H -#include +#include #include -#include -#include +#include +#include #include #include #include @@ -115,6 +115,7 @@ class Mesh_vertex_3 // Types typedef Index_ Index; typedef typename GT::FT FT; + typedef typename Vb::Point Point; // Constructor Mesh_vertex_3() @@ -289,13 +290,42 @@ class Mesh_vertex_3 } }; // end class Mesh_vertex_3 + +/*! +\ingroup PkgMesh3MeshClasses + +The class `Mesh_vertex_base_3` is a model of the concept `MeshVertexBase_3`. +It is designed to serve as vertex base class for the 3D triangulation +used in a 3D mesh generation process. + +\tparam GT is the geometric traits class. +It must be a model of the concept `MeshTriangulationTraits_3`. + +\tparam MD provides the types of indices +used to identify +the faces of the input complex. It must be a model +of the concept `MeshDomain_3`. + +\tparam Vb is the vertex base class. It has to be a model +of the concept `RegularTriangulationVertexBase_3` and defaults to +`Regular_triangulation_vertex_base_3`. + +\cgalModels{MeshVertexBase_3} + +\sa `CGAL::Mesh_complex_3_in_triangulation_3` +*/ template > struct Mesh_vertex_base_3 { +#ifdef DOXYGEN_RUNNING + using Triangulation_data_structure = unspecified_type; +#else using Triangulation_data_structure = internal::Dummy_tds_3; +#endif using Vertex_handle = typename Triangulation_data_structure::Vertex_handle; using Cell_handle = typename Triangulation_data_structure::Cell_handle; + using Point = typename Vb::Point; template < class TDS3 > struct Rebind_TDS { @@ -311,7 +341,11 @@ template > struct Mesh_vertex_generator_3 { +#ifdef DOXYGEN_RUNNING + using Triangulation_data_structure = unspecified_type; +#else using Triangulation_data_structure = internal::Dummy_tds_3; +#endif using Vertex_handle = typename Triangulation_data_structure::Vertex_handle; using Cell_handle = typename Triangulation_data_structure::Cell_handle; diff --git a/thirdparty/CGAL/include/CGAL/Mesher_level.h b/thirdparty/CGAL/include/CGAL/Mesher_level.h index 674dda8d..3ac19d62 100644 --- a/thirdparty/CGAL/include/CGAL/Mesher_level.h +++ b/thirdparty/CGAL/include/CGAL/Mesher_level.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesher_level/include/CGAL/Mesher_level.h $ -// $Id: Mesher_level.h 5439dbd 2021-08-24T18:04:50+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesher_level/include/CGAL/Mesher_level.h $ +// $Id: include/CGAL/Mesher_level.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -108,7 +108,7 @@ class Mesher_level } //@} - /** \name Private member datas */ + /** \name Private member data */ Previous& previous_level; /**< The previous level of the refinement process. */ diff --git a/thirdparty/CGAL/include/CGAL/Mesher_level_default_implementations.h b/thirdparty/CGAL/include/CGAL/Mesher_level_default_implementations.h index 850c5a89..756ec482 100644 --- a/thirdparty/CGAL/include/CGAL/Mesher_level_default_implementations.h +++ b/thirdparty/CGAL/include/CGAL/Mesher_level_default_implementations.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesher_level/include/CGAL/Mesher_level_default_implementations.h $ -// $Id: Mesher_level_default_implementations.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesher_level/include/CGAL/Mesher_level_default_implementations.h $ +// $Id: include/CGAL/Mesher_level_default_implementations.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mesher_level_visitors.h b/thirdparty/CGAL/include/CGAL/Mesher_level_visitors.h index 5e160c89..d915e5fd 100644 --- a/thirdparty/CGAL/include/CGAL/Mesher_level_visitors.h +++ b/thirdparty/CGAL/include/CGAL/Mesher_level_visitors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesher_level/include/CGAL/Mesher_level_visitors.h $ -// $Id: Mesher_level_visitors.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesher_level/include/CGAL/Mesher_level_visitors.h $ +// $Id: include/CGAL/Mesher_level_visitors.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Meshes/Double_map_container.h b/thirdparty/CGAL/include/CGAL/Meshes/Double_map_container.h index 76af00ba..e2b79f78 100644 --- a/thirdparty/CGAL/include/CGAL/Meshes/Double_map_container.h +++ b/thirdparty/CGAL/include/CGAL/Meshes/Double_map_container.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesher_level/include/CGAL/Meshes/Double_map_container.h $ -// $Id: Double_map_container.h 6fe18d8 2021-01-20T15:32:23+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesher_level/include/CGAL/Meshes/Double_map_container.h $ +// $Id: include/CGAL/Meshes/Double_map_container.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -33,7 +33,7 @@ namespace CGAL { typedef Elt Element; protected: - // --- protected datas --- + // --- protected data --- Double_map m; public: diff --git a/thirdparty/CGAL/include/CGAL/Meshes/Filtered_deque_container.h b/thirdparty/CGAL/include/CGAL/Meshes/Filtered_deque_container.h index 6cc2d5bf..de6a592e 100644 --- a/thirdparty/CGAL/include/CGAL/Meshes/Filtered_deque_container.h +++ b/thirdparty/CGAL/include/CGAL/Meshes/Filtered_deque_container.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Meshes/Filtered_deque_container.h $ -// $Id: Filtered_deque_container.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Meshes/Filtered_deque_container.h $ +// $Id: include/CGAL/Meshes/Filtered_deque_container.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Clement JAMIN @@ -189,7 +189,7 @@ namespace Meshes { typedef Element_ Element; protected: - // --- protected datas --- + // --- protected data --- Container container; Predicate test; diff --git a/thirdparty/CGAL/include/CGAL/Meshes/Filtered_multimap_container.h b/thirdparty/CGAL/include/CGAL/Meshes/Filtered_multimap_container.h index 28b0d691..fd39122d 100644 --- a/thirdparty/CGAL/include/CGAL/Meshes/Filtered_multimap_container.h +++ b/thirdparty/CGAL/include/CGAL/Meshes/Filtered_multimap_container.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Meshes/Filtered_multimap_container.h $ -// $Id: Filtered_multimap_container.h 4fc2f59 2020-07-31T16:17:56+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Meshes/Filtered_multimap_container.h $ +// $Id: include/CGAL/Meshes/Filtered_multimap_container.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Clement JAMIN @@ -187,7 +187,7 @@ namespace CGAL { typedef typename Base::size_type size_type; protected: - // --- protected datas --- + // --- protected data --- Map container; Predicate test; diff --git a/thirdparty/CGAL/include/CGAL/Meshes/Filtered_queue_container.h b/thirdparty/CGAL/include/CGAL/Meshes/Filtered_queue_container.h index 2254d8dc..edffc134 100644 --- a/thirdparty/CGAL/include/CGAL/Meshes/Filtered_queue_container.h +++ b/thirdparty/CGAL/include/CGAL/Meshes/Filtered_queue_container.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesher_level/include/CGAL/Meshes/Filtered_queue_container.h $ -// $Id: Filtered_queue_container.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesher_level/include/CGAL/Meshes/Filtered_queue_container.h $ +// $Id: include/CGAL/Meshes/Filtered_queue_container.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -31,7 +31,7 @@ namespace CGAL { typedef typename std::deque::const_iterator const_iterator; private: - // --- private datas --- + // --- private data --- std::deque d; Predicate test; diff --git a/thirdparty/CGAL/include/CGAL/Meshes/Simple_map_container.h b/thirdparty/CGAL/include/CGAL/Meshes/Simple_map_container.h index 98778446..56ca7725 100644 --- a/thirdparty/CGAL/include/CGAL/Meshes/Simple_map_container.h +++ b/thirdparty/CGAL/include/CGAL/Meshes/Simple_map_container.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesher_level/include/CGAL/Meshes/Simple_map_container.h $ -// $Id: Simple_map_container.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesher_level/include/CGAL/Meshes/Simple_map_container.h $ +// $Id: include/CGAL/Meshes/Simple_map_container.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -28,7 +28,7 @@ namespace CGAL { typedef typename Map::value_type value_type; protected: - // --- protected datas --- + // --- protected data --- Map map; public: diff --git a/thirdparty/CGAL/include/CGAL/Meshes/Simple_queue_container.h b/thirdparty/CGAL/include/CGAL/Meshes/Simple_queue_container.h index 0fea5b08..fe7e9758 100644 --- a/thirdparty/CGAL/include/CGAL/Meshes/Simple_queue_container.h +++ b/thirdparty/CGAL/include/CGAL/Meshes/Simple_queue_container.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesher_level/include/CGAL/Meshes/Simple_queue_container.h $ -// $Id: Simple_queue_container.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesher_level/include/CGAL/Meshes/Simple_queue_container.h $ +// $Id: include/CGAL/Meshes/Simple_queue_container.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -28,7 +28,7 @@ namespace CGAL { typedef typename Queue::size_type size_type; protected: - // --- protected datas --- + // --- protected data --- Queue q; public: diff --git a/thirdparty/CGAL/include/CGAL/Meshes/Simple_set_container.h b/thirdparty/CGAL/include/CGAL/Meshes/Simple_set_container.h index cc66f0b3..078a10a8 100644 --- a/thirdparty/CGAL/include/CGAL/Meshes/Simple_set_container.h +++ b/thirdparty/CGAL/include/CGAL/Meshes/Simple_set_container.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesher_level/include/CGAL/Meshes/Simple_set_container.h $ -// $Id: Simple_set_container.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesher_level/include/CGAL/Meshes/Simple_set_container.h $ +// $Id: include/CGAL/Meshes/Simple_set_container.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,7 +27,7 @@ namespace CGAL { typedef typename Set::size_type size_type; protected: - // --- protected datas --- + // --- protected data --- Set s; public: diff --git a/thirdparty/CGAL/include/CGAL/Meshes/Triangulation_mesher_level_traits_2.h b/thirdparty/CGAL/include/CGAL/Meshes/Triangulation_mesher_level_traits_2.h index 99f8fe24..d0145839 100644 --- a/thirdparty/CGAL/include/CGAL/Meshes/Triangulation_mesher_level_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Meshes/Triangulation_mesher_level_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesher_level/include/CGAL/Meshes/Triangulation_mesher_level_traits_2.h $ -// $Id: Triangulation_mesher_level_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesher_level/include/CGAL/Meshes/Triangulation_mesher_level_traits_2.h $ +// $Id: include/CGAL/Meshes/Triangulation_mesher_level_traits_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h b/thirdparty/CGAL/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h index 249f4958..b41f94e6 100644 --- a/thirdparty/CGAL/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesher_level/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h $ -// $Id: Triangulation_mesher_level_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesher_level/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h $ +// $Id: include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent RINEAU @@ -76,7 +76,7 @@ struct Triangulation_mesher_level_traits_3 : internal_facets.reserve(64); } - Locate_type locate_type; + Locate_type locate_type = Tr::OUTSIDE_AFFINE_HULL; Cell_handle cell; int i, j; diff --git a/thirdparty/CGAL/include/CGAL/Min_annulus_d.h b/thirdparty/CGAL/include/CGAL/Min_annulus_d.h index ab798133..9ef1f720 100644 --- a/thirdparty/CGAL/include/CGAL/Min_annulus_d.h +++ b/thirdparty/CGAL/include/CGAL/Min_annulus_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_annulus_d.h $ -// $Id: Min_annulus_d.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_annulus_d.h $ +// $Id: include/CGAL/Min_annulus_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -325,7 +325,7 @@ class Min_annulus_d { Support_point_iterator support_points_begin() const { - CGAL_optimisation_assertion_msg(number_of_points() >= 2, + CGAL_assertion_msg(number_of_points() >= 2, "support_points_begin: not enough points"); return Support_point_iterator( solver->basic_original_variable_indices_begin(), @@ -334,7 +334,7 @@ class Min_annulus_d { Support_point_iterator support_points_end() const { - CGAL_optimisation_assertion_msg(number_of_points() >= 2, + CGAL_assertion_msg(number_of_points() >= 2, "support_points_begin: not enough points"); return Support_point_iterator( solver->basic_original_variable_indices_end(), @@ -401,27 +401,27 @@ class Min_annulus_d { // NOTE: an implicit conversion from ET to RT must be available! Point center( ) const - { CGAL_optimisation_precondition( ! is_empty()); + { CGAL_precondition( ! is_empty()); return tco.construct_point_d_object()( ambient_dimension(), center_coordinates_begin(), center_coordinates_end()); } FT squared_inner_radius( ) const - { CGAL_optimisation_precondition( ! is_empty()); + { CGAL_precondition( ! is_empty()); return FT( squared_inner_radius_numerator()) / FT( squared_radii_denominator()); } FT squared_outer_radius( ) const - { CGAL_optimisation_precondition( ! is_empty()); + { CGAL_precondition( ! is_empty()); return FT( squared_outer_radius_numerator()) / FT( squared_radii_denominator()); } // predicates CGAL::Bounded_side bounded_side( const Point& p) const - { CGAL_optimisation_precondition( + { CGAL_precondition( is_empty() || tco.access_dimension_d_object()( p) == d); ET sqr_d = sqr_dist( p); ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d]; @@ -431,7 +431,7 @@ class Min_annulus_d { bool has_on_bounded_side( const Point& p) const - { CGAL_optimisation_precondition( + { CGAL_precondition( is_empty() || tco.access_dimension_d_object()( p) == d); ET sqr_d = sqr_dist( p); ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d]; @@ -440,7 +440,7 @@ class Min_annulus_d { bool has_on_boundary( const Point& p) const - { CGAL_optimisation_precondition( + { CGAL_precondition( is_empty() || tco.access_dimension_d_object()( p) == d); ET sqr_d = sqr_dist( p); ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d]; @@ -449,7 +449,7 @@ class Min_annulus_d { bool has_on_unbounded_side( const Point& p) const - { CGAL_optimisation_precondition( + { CGAL_precondition( is_empty() || tco.access_dimension_d_object()( p) == d); ET sqr_d = sqr_dist( p); ET h_p_sqr(da_coord(p)[d]); @@ -468,14 +468,14 @@ class Min_annulus_d { { if ( points.size() > 0) points.erase( points.begin(), points.end()); std::copy( first, last, std::back_inserter( points)); set_dimension(); - CGAL_optimisation_precondition_msg( check_dimension(), + CGAL_precondition_msg( check_dimension(), "Not all points have the same dimension."); compute_min_annulus(); } void insert( const Point& p) { if ( is_empty()) d = tco.access_dimension_d_object()( p); - CGAL_optimisation_precondition( + CGAL_precondition( tco.access_dimension_d_object()( p) == d); points.push_back( p); compute_min_annulus(); } @@ -483,10 +483,10 @@ class Min_annulus_d { template < class InputIterator > void insert( InputIterator first, InputIterator last) - { CGAL_optimisation_precondition_code( std::size_t old_n = points.size()); + { CGAL_precondition_code( std::size_t old_n = points.size()); points.insert( points.end(), first, last); set_dimension(); - CGAL_optimisation_precondition_msg( check_dimension( old_n), + CGAL_precondition_msg( check_dimension( old_n), "Not all points have the same dimension."); compute_min_annulus(); } @@ -645,7 +645,7 @@ class Min_annulus_d { options.set_pricing_strategy(pricing_strategy(NT())); delete solver; solver = new Solver(lp, options); - CGAL_optimisation_assertion(solver->status() == QP_OPTIMAL); + CGAL_assertion(solver->status() == QP_OPTIMAL); // compute center and squared radius ET sqr_sum = 0; @@ -829,7 +829,7 @@ operator << ( std::ostream& os, break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::get_mode( os) invalid!"); break; } @@ -858,7 +858,7 @@ operator >> ( std::istream& is, CGAL::Min_annulus_d& min_annulus) break; default: - CGAL_optimisation_assertion_msg( false, "CGAL::IO::mode invalid!"); + CGAL_assertion_msg( false, "CGAL::IO::mode invalid!"); break; } return( is); diff --git a/thirdparty/CGAL/include/CGAL/Min_circle_2.h b/thirdparty/CGAL/include/CGAL/Min_circle_2.h index a2ac6065..ba4d9599 100644 --- a/thirdparty/CGAL/include/CGAL/Min_circle_2.h +++ b/thirdparty/CGAL/include/CGAL/Min_circle_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_circle_2.h $ -// $Id: Min_circle_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_circle_2.h $ +// $Id: include/CGAL/Min_circle_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -191,7 +191,7 @@ class Min_circle_2 { const Point& support_point( std::size_t i) const { - CGAL_optimisation_precondition(i < number_of_support_points()); + CGAL_precondition(i < number_of_support_points()); return( support_points[ i]); } // circle @@ -256,7 +256,7 @@ class Min_circle_2 { tco.circle.set( ); break; default: - CGAL_optimisation_assertion( n_support_points <= 3 ); } + CGAL_assertion( n_support_points <= 3 ); } } void @@ -334,7 +334,7 @@ class Min_circle_2 { // initialize circle tco.circle.set(); - CGAL_optimisation_postcondition( is_empty()); + CGAL_postcondition( is_empty()); } // constructor for one point @@ -349,7 +349,7 @@ class Min_circle_2 { support_points[ 0] = p; tco.circle.set( p); - CGAL_optimisation_postcondition( is_degenerate()); + CGAL_postcondition( is_degenerate()); } // constructor for two points diff --git a/thirdparty/CGAL/include/CGAL/Min_circle_2/Min_circle_2_adapterC2.h b/thirdparty/CGAL/include/CGAL/Min_circle_2/Min_circle_2_adapterC2.h index ca891997..1d73fcbf 100644 --- a/thirdparty/CGAL/include/CGAL/Min_circle_2/Min_circle_2_adapterC2.h +++ b/thirdparty/CGAL/include/CGAL/Min_circle_2/Min_circle_2_adapterC2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_circle_2/Min_circle_2_adapterC2.h $ -// $Id: Min_circle_2_adapterC2.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_circle_2/Min_circle_2_adapterC2.h $ +// $Id: include/CGAL/Min_circle_2/Min_circle_2_adapterC2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -293,7 +293,7 @@ operator << ( std::ostream& os, break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::get_mode( os) invalid!"); break; } @@ -323,7 +323,7 @@ operator >> ( std::istream& is, break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::mode invalid!"); break; } diff --git a/thirdparty/CGAL/include/CGAL/Min_circle_2/Min_circle_2_adapterH2.h b/thirdparty/CGAL/include/CGAL/Min_circle_2/Min_circle_2_adapterH2.h index c7407b97..e7f3a794 100644 --- a/thirdparty/CGAL/include/CGAL/Min_circle_2/Min_circle_2_adapterH2.h +++ b/thirdparty/CGAL/include/CGAL/Min_circle_2/Min_circle_2_adapterH2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_circle_2/Min_circle_2_adapterH2.h $ -// $Id: Min_circle_2_adapterH2.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_circle_2/Min_circle_2_adapterH2.h $ +// $Id: include/CGAL/Min_circle_2/Min_circle_2_adapterH2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -332,7 +332,7 @@ operator << ( std::ostream& os, break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::get_mode( os) invalid!"); break; } @@ -363,7 +363,7 @@ operator >> ( std::istream& is, break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::mode invalid!"); break; } diff --git a/thirdparty/CGAL/include/CGAL/Min_circle_2/Min_circle_2_impl.h b/thirdparty/CGAL/include/CGAL/Min_circle_2/Min_circle_2_impl.h index 1a1ce652..9dc6a68f 100644 --- a/thirdparty/CGAL/include/CGAL/Min_circle_2/Min_circle_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Min_circle_2/Min_circle_2_impl.h @@ -3,13 +3,18 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_circle_2/Min_circle_2_impl.h $ -// $Id: Min_circle_2_impl.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_circle_2/Min_circle_2_impl.h $ +// $Id: include/CGAL/Min_circle_2/Min_circle_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Sven Schoenherr , Bernd Gaertner +#ifndef CGAL_MIN_CIRCLE_2_MIN_CIRCLE_2_IMPL_H +#define CGAL_MIN_CIRCLE_2_MIN_CIRCLE_2_IMPL_H + +#include + #include namespace CGAL { @@ -60,7 +65,7 @@ operator << ( std::ostream& os, break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::get_mode( os) invalid!"); break; } @@ -89,7 +94,7 @@ operator >> ( std::istream& is, CGAL::Min_circle_2& min_circle) break; default: - CGAL_optimisation_assertion_msg( false, "CGAL::IO::mode invalid!"); + CGAL_assertion_msg( false, "CGAL::IO::mode invalid!"); break; } return( is); @@ -98,3 +103,5 @@ operator >> ( std::istream& is, CGAL::Min_circle_2& min_circle) } //namespace CGAL // ===== EOF ================================================================== + +#endif // CGAL_MIN_CIRCLE_2_MIN_CIRCLE_2_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/Min_circle_2/Optimisation_circle_2.h b/thirdparty/CGAL/include/CGAL/Min_circle_2/Optimisation_circle_2.h index c69b6ad8..a410c232 100644 --- a/thirdparty/CGAL/include/CGAL/Min_circle_2/Optimisation_circle_2.h +++ b/thirdparty/CGAL/include/CGAL/Min_circle_2/Optimisation_circle_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_circle_2/Optimisation_circle_2.h $ -// $Id: Optimisation_circle_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_circle_2/Optimisation_circle_2.h $ +// $Id: include/CGAL/Min_circle_2/Optimisation_circle_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Min_circle_2/Optimisation_circle_2_impl.h b/thirdparty/CGAL/include/CGAL/Min_circle_2/Optimisation_circle_2_impl.h index 2856a64f..cf13497a 100644 --- a/thirdparty/CGAL/include/CGAL/Min_circle_2/Optimisation_circle_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Min_circle_2/Optimisation_circle_2_impl.h @@ -3,15 +3,20 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_circle_2/Optimisation_circle_2_impl.h $ -// $Id: Optimisation_circle_2_impl.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_circle_2/Optimisation_circle_2_impl.h $ +// $Id: include/CGAL/Min_circle_2/Optimisation_circle_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Sven Schoenherr , Bernd Gaertner +#ifndef CGAL_MIN_SPHERE_D_OPTIMISATION_CIRCLE_2_IMPL_H +#define CGAL_MIN_SPHERE_D_OPTIMISATION_CIRCLE_2_IMPL_H + +#include + // includes -# include +# include namespace CGAL { @@ -42,7 +47,7 @@ operator << ( std::ostream& os, const CGAL::Optimisation_circle_2& c) break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::get_mode( os) invalid!"); break; } @@ -79,7 +84,7 @@ operator >> ( std::istream& is, CGAL::Optimisation_circle_2& c) break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::get_mode( is) invalid!"); break; } @@ -89,3 +94,5 @@ operator >> ( std::istream& is, CGAL::Optimisation_circle_2& c) } //namespace CGAL // ===== EOF ================================================================== + +#endif //CGAL_MIN_SPHERE_D_OPTIMISATION_CIRCLE_2_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/Min_circle_2_traits_2.h b/thirdparty/CGAL/include/CGAL/Min_circle_2_traits_2.h index 58e7fe81..b506efd9 100644 --- a/thirdparty/CGAL/include/CGAL/Min_circle_2_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Min_circle_2_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_circle_2_traits_2.h $ -// $Id: Min_circle_2_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_circle_2_traits_2.h $ +// $Id: include/CGAL/Min_circle_2_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Min_ellipse_2.h b/thirdparty/CGAL/include/CGAL/Min_ellipse_2.h index 507ae616..db72d8cb 100644 --- a/thirdparty/CGAL/include/CGAL/Min_ellipse_2.h +++ b/thirdparty/CGAL/include/CGAL/Min_ellipse_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_ellipse_2.h $ -// $Id: Min_ellipse_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_ellipse_2.h $ +// $Id: include/CGAL/Min_ellipse_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -203,7 +203,7 @@ class Min_ellipse_2 { const Point& support_point( std::size_t i) const { - CGAL_optimisation_precondition(i < number_of_support_points()); + CGAL_precondition(i < number_of_support_points()); return( support_points[ i]); } // ellipse @@ -281,7 +281,7 @@ class Min_ellipse_2 { tco.ellipse.set( ); break; default: - CGAL_optimisation_assertion( ( n_support_points >= 0) && + CGAL_assertion( ( n_support_points >= 0) && ( n_support_points <= 5) ); } } @@ -360,7 +360,7 @@ class Min_ellipse_2 { // initialize ellipse tco.ellipse.set(); - CGAL_optimisation_postcondition( is_empty()); + CGAL_postcondition( is_empty()); } inline @@ -373,7 +373,7 @@ class Min_ellipse_2 { // initialize ellipse tco.ellipse.set(); - CGAL_optimisation_postcondition( is_empty()); + CGAL_postcondition( is_empty()); } // constructor for one point @@ -388,7 +388,7 @@ class Min_ellipse_2 { support_points[ 0] = p; tco.ellipse.set( p); - CGAL_optimisation_postcondition( is_degenerate()); + CGAL_postcondition( is_degenerate()); } // constructor for two points @@ -409,7 +409,7 @@ class Min_ellipse_2 { // compute me me( points.end(), 0); - CGAL_optimisation_postcondition( is_degenerate()); + CGAL_postcondition( is_degenerate()); } // constructor for three points diff --git a/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterC2.h b/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterC2.h index 0a23999b..ae5cf3a5 100644 --- a/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterC2.h +++ b/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterC2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterC2.h $ -// $Id: Min_ellipse_2_adapterC2.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterC2.h $ +// $Id: include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterC2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ // includes # include -# include +# include namespace CGAL { @@ -235,7 +235,7 @@ class _Min_ellipse_2_adapterC2__Ellipse { int tau_star = c.vol_derivative( dr, ds, dt, du, dv, dw); return( CGAL::Bounded_side( CGAL_NTS sign( tau_star))); } } default: - CGAL_optimisation_assertion( ( n_boundary_points >= 0) && + CGAL_assertion( ( n_boundary_points >= 0) && ( n_boundary_points <= 5) ); } // keeps g++ happy return( CGAL::Bounded_side( 0)); @@ -298,7 +298,7 @@ class _Min_ellipse_2_adapterC2__Ellipse { || ( ( conic1 == e.conic2) && ( conic2 == e.conic1))); default: - CGAL_optimisation_assertion( ( n_boundary_points >= 0) + CGAL_assertion( ( n_boundary_points >= 0) && ( n_boundary_points <= 5)); } // keeps g++ happy return( false); @@ -341,7 +341,7 @@ operator << ( std::ostream& os, case CGAL::IO::BINARY: break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::get_mode( os) invalid!"); break; } @@ -405,7 +405,7 @@ operator >> ( std::istream& is, break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::mode invalid!"); break; } diff --git a/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterH2.h b/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterH2.h index ba74358c..79a74a12 100644 --- a/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterH2.h +++ b/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterH2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterH2.h $ -// $Id: Min_ellipse_2_adapterH2.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterH2.h $ +// $Id: include/CGAL/Min_ellipse_2/Min_ellipse_2_adapterH2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ // includes # include -# include +# include namespace CGAL { @@ -243,7 +243,7 @@ class _Min_ellipse_2_adapterH2__Ellipse { int tau_star = c.vol_derivative( dr, ds, dt, du, dv, dw); return( CGAL::Bounded_side( CGAL_NTS sign( tau_star))); } } default: - CGAL_optimisation_assertion( ( n_boundary_points >= 0) && + CGAL_assertion( ( n_boundary_points >= 0) && ( n_boundary_points <= 5) ); } // keeps g++ happy return( CGAL::Bounded_side( 0)); @@ -306,7 +306,7 @@ class _Min_ellipse_2_adapterH2__Ellipse { || ( ( conic1 == e.conic2) && ( conic2 == e.conic1))); default: - CGAL_optimisation_assertion( ( n_boundary_points >= 0) + CGAL_assertion( ( n_boundary_points >= 0) && ( n_boundary_points <= 5)); } // keeps g++ happy return( false); @@ -349,7 +349,7 @@ operator << ( std::ostream& os, case CGAL::IO::BINARY: break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::get_mode( os) invalid!"); break; } @@ -413,7 +413,7 @@ operator >> ( std::istream& is, break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::mode invalid!"); break; } diff --git a/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Min_ellipse_2_impl.h b/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Min_ellipse_2_impl.h index 803c5424..860138ad 100644 --- a/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Min_ellipse_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Min_ellipse_2_impl.h @@ -3,13 +3,18 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_ellipse_2/Min_ellipse_2_impl.h $ -// $Id: Min_ellipse_2_impl.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_ellipse_2/Min_ellipse_2_impl.h $ +// $Id: include/CGAL/Min_ellipse_2/Min_ellipse_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Sven Schoenherr , Bernd Gaertner +#ifndef CGAL_MIN_ELLIPSE_2_MIN_ELLIPSE_2_IMP_H +#define CGAL_MIN_ELLIPSE_2_MIN_ELLIPSE_2_IMP_H + +#include + #include namespace CGAL { @@ -60,7 +65,7 @@ operator << ( std::ostream& os, break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::get_mode( os) invalid!"); break; } @@ -89,7 +94,7 @@ operator >> ( std::istream& is, CGAL::Min_ellipse_2& min_ellipse) break; default: - CGAL_optimisation_assertion_msg( false, "CGAL::IO::mode invalid!"); + CGAL_assertion_msg( false, "CGAL::IO::mode invalid!"); break; } return( is); @@ -98,3 +103,5 @@ operator >> ( std::istream& is, CGAL::Min_ellipse_2& min_ellipse) } //namespace CGAL // ===== EOF ================================================================== + +#endif // CGAL_MIN_ELLIPSE_2_MIN_ELLIPSE_2_IMP_H diff --git a/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h b/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h index 85b2fc66..3bfd8b41 100644 --- a/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h +++ b/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h $ -// $Id: Optimisation_ellipse_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h $ +// $Id: include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #include -#include +#include #include @@ -131,7 +131,7 @@ class Optimisation_ellipse_2 { set( const Point& p, const Point& q) { n_boundary_points = 2; - CGAL_optimisation_precondition(boundary_point1 == p); CGAL_USE(p); + CGAL_precondition(boundary_point1 == p); CGAL_USE(p); boundary_point2 = q; } @@ -139,20 +139,20 @@ class Optimisation_ellipse_2 { set( const Point& p1, const Point& p2, const Point& p3) { n_boundary_points = 3; - CGAL_optimisation_precondition(boundary_point1 == p1); - CGAL_optimisation_precondition(boundary_point2 == p2); + CGAL_precondition(boundary_point1 == p1); + CGAL_precondition(boundary_point2 == p2); boundary_point3 = p3; helper_conic.set_ellipse( p1, p2, p3); - CGAL_optimisation_assertion(helper_conic.is_ellipse()); + CGAL_assertion(helper_conic.is_ellipse()); } void set( const Point& p1, const Point& p2, const Point& p3, const Point& p4) { n_boundary_points = 4; - CGAL_optimisation_precondition(boundary_point1 == p1); - CGAL_optimisation_precondition(boundary_point2 == p2); - CGAL_optimisation_precondition(boundary_point3 == p3); + CGAL_precondition(boundary_point1 == p1); + CGAL_precondition(boundary_point2 == p2); + CGAL_precondition(boundary_point3 == p3); boundary_point4 = p4; Conic::set_two_linepairs( p1, p2, p3, p4, conic1, conic2); @@ -195,7 +195,7 @@ class Optimisation_ellipse_2 { if (!helper_ellipse_set) { helper_ellipse.set_ellipse( conic1, conic2); helper_ellipse.analyse(); - CGAL_optimisation_assertion (helper_ellipse.is_ellipse()); + CGAL_assertion (helper_ellipse.is_ellipse()); helper_ellipse_set= true; } } @@ -211,14 +211,14 @@ class Optimisation_ellipse_2 { // In that case, helper_conic is already correct, // but in general, this optimization is NOT valid. n_boundary_points = 5; - CGAL_optimisation_assertion(helper_conic.is_ellipse()); + CGAL_assertion(helper_conic.is_ellipse()); // the following assertion is too strict if we run under // double (which is sometimes the case, e.g. in demos) - // CGAL_optimisation_assertion(helper_conic.has_on_boundary(p5)); - CGAL_optimisation_precondition(boundary_point1 == p1); - CGAL_optimisation_precondition(boundary_point2 == p2); - CGAL_optimisation_precondition(boundary_point3 == p3); - CGAL_optimisation_precondition(boundary_point4 == p4); + // CGAL_assertion(helper_conic.has_on_boundary(p5)); + CGAL_precondition(boundary_point1 == p1); + CGAL_precondition(boundary_point2 == p2); + CGAL_precondition(boundary_point3 == p3); + CGAL_precondition(boundary_point4 == p4); CGAL_USE(p1); CGAL_USE(p2); CGAL_USE(p3); CGAL_USE(p4); boundary_point5 = p5; } @@ -247,7 +247,7 @@ class Optimisation_ellipse_2 { double &u, double &v, double &w) const { // just like double_conic, but we only get the coefficients - CGAL_optimisation_precondition( ! is_degenerate()); + CGAL_precondition( ! is_degenerate()); if ( n_boundary_points == 4) { set_e_values(); @@ -297,7 +297,7 @@ class Optimisation_ellipse_2 { || ( ( conic1 == e.conic2) && ( conic2 == e.conic1))); default: - CGAL_optimisation_assertion( ( n_boundary_points >= 0) + CGAL_assertion( ( n_boundary_points >= 0) && ( n_boundary_points <= 5)); } // keeps g++ happy return( false); @@ -343,7 +343,7 @@ class Optimisation_ellipse_2 { helper_conic.vol_derivative( dr, ds, dt, du, dv, dw); return( CGAL::Bounded_side( CGAL_NTS sign( tau_star))); } } default: - CGAL_optimisation_assertion( ( n_boundary_points >= 0) && + CGAL_assertion( ( n_boundary_points >= 0) && ( n_boundary_points <= 5) ); } // keeps g++ happy return( CGAL::Bounded_side( 0)); @@ -416,7 +416,7 @@ class Optimisation_ellipse_2 { return (CGAL::ZERO == (c.vol_derivative(dr, ds, dt, du, dv, dw))); } default: - CGAL_optimisation_assertion( ( n_boundary_points >= 0) && + CGAL_assertion( ( n_boundary_points >= 0) && ( n_boundary_points <= 5) ); return false; } diff --git a/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2_impl.h b/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2_impl.h index 247d954d..4d249d9a 100644 --- a/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2_impl.h @@ -3,13 +3,18 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2_impl.h $ -// $Id: Optimisation_ellipse_2_impl.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2_impl.h $ +// $Id: include/CGAL/Min_ellipse_2/Optimisation_ellipse_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Sven Schoenherr , Bernd Gaertner +#ifndef CGAL_MIN_ELLIPSE_2_OPTIMISATION_ELLIPSE_2_IMPL_H +#define CGAL_MIN_ELLIPSE_2_OPTIMISATION_ELLIPSE_2_IMPL_H + +#include + namespace CGAL { // Class implementation (continued) @@ -43,7 +48,7 @@ operator << ( std::ostream& os, const CGAL::Optimisation_ellipse_2& e) case CGAL::IO::BINARY: break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::get_mode( os) invalid!"); break; } @@ -106,7 +111,7 @@ operator >> ( std::istream& is, CGAL::Optimisation_ellipse_2& e) break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::get_mode( is) invalid!"); break; } @@ -116,3 +121,5 @@ operator >> ( std::istream& is, CGAL::Optimisation_ellipse_2& e) } //namespace CGAL // ===== EOF ================================================================== + +#endif // CGAL_MIN_ELLIPSE_2_OPTIMISATION_ELLIPSE_2_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/Min_ellipse_2_traits_2.h b/thirdparty/CGAL/include/CGAL/Min_ellipse_2_traits_2.h index f525b1f1..4bb76f78 100644 --- a/thirdparty/CGAL/include/CGAL/Min_ellipse_2_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Min_ellipse_2_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_ellipse_2_traits_2.h $ -// $Id: Min_ellipse_2_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_ellipse_2_traits_2.h $ +// $Id: include/CGAL/Min_ellipse_2_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Min_quadrilateral_traits_2.h b/thirdparty/CGAL/include/CGAL/Min_quadrilateral_traits_2.h index f8a4a895..c69a9e30 100644 --- a/thirdparty/CGAL/include/CGAL/Min_quadrilateral_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Min_quadrilateral_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_quadrilateral_traits_2.h $ -// $Id: Min_quadrilateral_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_quadrilateral_traits_2.h $ +// $Id: include/CGAL/Min_quadrilateral_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ #include -#include +#include #include #include #include @@ -303,36 +303,36 @@ struct Min_quadrilateral_default_traits_2 { if (assign(tmp, tmpo)) { *o++ = tmp; } else { - CGAL_optimisation_assertion_code(bool test1 =) + CGAL_assertion_code(bool test1 =) assign(tmpl, tmpo); - CGAL_optimisation_assertion(test1); + CGAL_assertion(test1); *o++ = r.p1; } tmpo = isec(line(r.p3, r.d1), line(r.p2, r.d2)); if (assign(tmp, tmpo)) { *o++ = tmp; } else { - CGAL_optimisation_assertion_code(bool test1 =) + CGAL_assertion_code(bool test1 =) assign(tmpl, tmpo); - CGAL_optimisation_assertion(test1); + CGAL_assertion(test1); *o++ = r.p2; } tmpo = isec(line(r.p3, r.d1), line(r.p4, r.d2)); if (assign(tmp, tmpo)) { *o++ = tmp; } else { - CGAL_optimisation_assertion_code(bool test1 =) + CGAL_assertion_code(bool test1 =) assign(tmpl, tmpo); - CGAL_optimisation_assertion(test1); + CGAL_assertion(test1); *o++ = r.p3; } tmpo = isec(line(r.p1, r.d1), line(r.p4, r.d2)); if (assign(tmp, tmpo)) { *o++ = tmp; } else { - CGAL_optimisation_assertion_code(bool test1 =) + CGAL_assertion_code(bool test1 =) assign(tmpl, tmpo); - CGAL_optimisation_assertion(test1); + CGAL_assertion(test1); *o++ = r.p3; } return o; diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_annulus_d_traits_2.h b/thirdparty/CGAL/include/CGAL/Min_sphere_annulus_d_traits_2.h index 1f49cb36..74fe090f 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_annulus_d_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_annulus_d_traits_2.h @@ -7,9 +7,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_2.h $ -// $Id: Min_sphere_annulus_d_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_2.h $ +// $Id: include/CGAL/Min_sphere_annulus_d_traits_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Sven Schoenherr @@ -17,6 +17,9 @@ #ifndef CGAL_MIN_SPHERE_ANNULUS_D_TRAITS_2_H #define CGAL_MIN_SPHERE_ANNULUS_D_TRAITS_2_H +#include + + // includes # include # include diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_annulus_d_traits_3.h b/thirdparty/CGAL/include/CGAL/Min_sphere_annulus_d_traits_3.h index 08b54bd7..d4557de6 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_annulus_d_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_annulus_d_traits_3.h @@ -7,9 +7,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_3.h $ -// $Id: Min_sphere_annulus_d_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_3.h $ +// $Id: include/CGAL/Min_sphere_annulus_d_traits_3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Sven Schoenherr @@ -17,6 +17,9 @@ #ifndef CGAL_MIN_SPHERE_ANNULUS_D_TRAITS_3_H #define CGAL_MIN_SPHERE_ANNULUS_D_TRAITS_3_H +#include + + // includes # include # include diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_annulus_d_traits_d.h b/thirdparty/CGAL/include/CGAL/Min_sphere_annulus_d_traits_d.h index 24c68ab6..14d98980 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_annulus_d_traits_d.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_annulus_d_traits_d.h @@ -7,9 +7,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_d.h $ -// $Id: Min_sphere_annulus_d_traits_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_annulus_d_traits_d.h $ +// $Id: include/CGAL/Min_sphere_annulus_d_traits_d.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Sven Schoenherr @@ -17,6 +17,9 @@ #ifndef CGAL_MIN_SPHERE_ANULUS_D_TRAITS_D_H #define CGAL_MIN_SPHERE_ANULUS_D_TRAITS_D_H +#include + + // includes # include # include diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_d.h b/thirdparty/CGAL/include/CGAL/Min_sphere_d.h index 8c3824c1..f230fcef 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_d.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_d.h $ -// $Id: Min_sphere_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_d.h $ +// $Id: include/CGAL/Min_sphere_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -26,7 +26,7 @@ # include -# include +# include # include @@ -110,7 +110,7 @@ class Min_sphere_d #endif if (points.size()>0) { d = tco.access_dimension_d_object() (points.front()); - CGAL_optimisation_precondition ((d>=0) && all_points_have_dim(d)); + CGAL_precondition ((d>=0) && all_points_have_dim(d)); ms_basis.get_sphere(Rep_tag()).set_size (d); pivot_ms(); } @@ -137,7 +137,7 @@ class Min_sphere_d #endif if (points.size()>0) { d = tco.access_dimension_d_object() (points.front()); - CGAL_optimisation_precondition ((d>=0) && all_points_have_dim(d)); + CGAL_precondition ((d>=0) && all_points_have_dim(d)); ms_basis.get_sphere(Rep_tag()).set_size (d); pivot_ms(); } @@ -211,13 +211,13 @@ class Min_sphere_d Point center () const { - CGAL_optimisation_precondition (!is_empty()); + CGAL_precondition (!is_empty()); return ms_basis.get_sphere(Rep_tag()).center(); } FT squared_radius () const { - CGAL_optimisation_precondition (!is_empty()); + CGAL_precondition (!is_empty()); return ms_basis.get_sphere(Rep_tag()).squared_radius(); } @@ -227,7 +227,7 @@ class Min_sphere_d if (d == -1) return ON_UNBOUNDED_SIDE; else { - CGAL_optimisation_precondition + CGAL_precondition (d == tco.access_dimension_d_object()(p)); return (Bounded_side (-CGAL::sign (ms_basis.get_sphere(Rep_tag()).excess (p)))); @@ -239,7 +239,7 @@ class Min_sphere_d if (d == -1) return false; else { - CGAL_optimisation_precondition + CGAL_precondition (d == tco.access_dimension_d_object()(p)); return (CGAL_NTS is_negative (ms_basis.get_sphere(Rep_tag()).excess (p))); } @@ -250,7 +250,7 @@ class Min_sphere_d if (d == -1) return true; else { - CGAL_optimisation_precondition + CGAL_precondition (d == tco.access_dimension_d_object()(p)); return (CGAL_NTS is_positive (ms_basis.get_sphere(Rep_tag()).excess (p))); } @@ -261,7 +261,7 @@ class Min_sphere_d if (d == -1) return false; else { - CGAL_optimisation_precondition + CGAL_precondition (d == tco.access_dimension_d_object()(p)); return (CGAL_NTS is_zero (ms_basis.get_sphere(Rep_tag()).excess (p))); } @@ -296,7 +296,7 @@ class Min_sphere_d support_end = points.begin(); if (points.size()>0) { d = tco.access_dimension_d_object() (points.front()); - CGAL_optimisation_precondition ((d>=0) && all_points_have_dim (d)); + CGAL_precondition ((d>=0) && all_points_have_dim (d)); ms_basis.get_sphere(Rep_tag()).set_size (d); pivot_ms(); } else { @@ -310,7 +310,7 @@ class Min_sphere_d if (has_on_unbounded_side (p)) { if (is_empty()) { d = tco.access_dimension_d_object() (p); - CGAL_optimisation_precondition (d>=0); + CGAL_precondition (d>=0); ms_basis.get_sphere(Rep_tag()).set_size (d); } // ensure precondition of pivot_ms diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_d/Min_sphere_d_impl.h b/thirdparty/CGAL/include/CGAL/Min_sphere_d/Min_sphere_d_impl.h index 03a9e995..14f89990 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_d/Min_sphere_d_impl.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_d/Min_sphere_d_impl.h @@ -3,14 +3,19 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_d/Min_sphere_d_impl.h $ -// $Id: Min_sphere_d_impl.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_d/Min_sphere_d_impl.h $ +// $Id: include/CGAL/Min_sphere_d/Min_sphere_d_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Sven Schoenherr // Bernd Gaertner +#ifndef CGAL_MIN_SPHERE_D_MIN_SPHERE_D_IMPL_H +#define CGAL_MIN_SPHERE_D_MIN_SPHERE_D_IMPL_H + +#include + #include namespace CGAL { @@ -62,7 +67,7 @@ operator << ( std::ostream& os, const Min_sphere_d& min_sphere) break; default: - CGAL_optimisation_assertion_msg + CGAL_assertion_msg ( false, "IO::get_mode( os) invalid!"); break; } @@ -93,7 +98,7 @@ operator >> ( std::istream& is, Min_sphere_d& min_sphere) } break; default: - CGAL_optimisation_assertion_msg( false, "IO::mode invalid!"); + CGAL_assertion_msg( false, "IO::mode invalid!"); break; } @@ -105,3 +110,5 @@ operator >> ( std::istream& is, Min_sphere_d& min_sphere) } //namespace CGAL // ===== EOF ================================================================== + +#endif //CGAL_MIN_SPHERE_D_MIN_SPHERE_D_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_d/Optimisation_sphere_d.h b/thirdparty/CGAL/include/CGAL/Min_sphere_d/Optimisation_sphere_d.h index 08b672fe..f5254fb2 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_d/Optimisation_sphere_d.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_d/Optimisation_sphere_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_d/Optimisation_sphere_d.h $ -// $Id: Optimisation_sphere_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_d/Optimisation_sphere_d.h $ +// $Id: include/CGAL/Min_sphere_d/Optimisation_sphere_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -42,7 +42,7 @@ class Optimisation_sphere_d; #include - #include + #include namespace CGAL { @@ -188,7 +188,7 @@ class Optimisation_sphere_d; // compute z FT z = FT_(2)*v_basis[m+1] - prod(v,x,m+1); - CGAL_optimisation_assertion (!CGAL_NTS is_zero (z)); + CGAL_assertion (!CGAL_NTS is_zero (z)); FT inv_z = FT_(1)/z; // set up A^{-1}_{B^m} @@ -461,7 +461,7 @@ class Optimisation_sphere_d; // compute \tilde{z} RT old_denom = denom[m-1]; RT z = old_denom*RT_(2)*sqr_q_m - prod(v,x,m+1); - CGAL_optimisation_assertion (!CGAL_NTS is_zero (z)); + CGAL_assertion (!CGAL_NTS is_zero (z)); // set up \tilde{A}^{-1}_{B^m} RT** M = inv[m-1]; // \tilde{A}^{-1}_B, old matrix @@ -503,7 +503,7 @@ class Optimisation_sphere_d; // get h_p RT h_p = *(i++); - CGAL_optimisation_precondition (!CGAL_NTS is_zero (h_p)); + CGAL_precondition (!CGAL_NTS is_zero (h_p)); // compute (h_p h D)^2 (c-p)^2 RT sqr_dist(RT(0)); diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_of_points_d_traits_2.h b/thirdparty/CGAL/include/CGAL/Min_sphere_of_points_d_traits_2.h index f85159f4..c12cd3d5 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_of_points_d_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_of_points_d_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_of_points_d_traits_2.h $ -// $Id: Min_sphere_of_points_d_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_of_points_d_traits_2.h $ +// $Id: include/CGAL/Min_sphere_of_points_d_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_of_points_d_traits_3.h b/thirdparty/CGAL/include/CGAL/Min_sphere_of_points_d_traits_3.h index 4cdad33b..480d56bd 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_of_points_d_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_of_points_d_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_of_points_d_traits_3.h $ -// $Id: Min_sphere_of_points_d_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_of_points_d_traits_3.h $ +// $Id: include/CGAL/Min_sphere_of_points_d_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_of_points_d_traits_d.h b/thirdparty/CGAL/include/CGAL/Min_sphere_of_points_d_traits_d.h index 309bfc40..b10eed54 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_of_points_d_traits_d.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_of_points_d_traits_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_of_points_d_traits_d.h $ -// $Id: Min_sphere_of_points_d_traits_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_of_points_d_traits_d.h $ +// $Id: include/CGAL/Min_sphere_of_points_d_traits_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d.h b/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d.h index 3b9d95ce..3d3a8854 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d.h $ -// $Id: Min_sphere_of_spheres_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d.h $ +// $Id: include/CGAL/Min_sphere_of_spheres_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -53,7 +53,7 @@ namespace CGAL_MINIBALL_NAMESPACE { Traits t; // To allow the traits to not only vary at compile- but // also at runtime, we instantiate it here. - private: // for internal consisteny checks: + private: // for internal consistency checks: // The following variable is true if and only if the miniball // has been computed of all inserted balls, i.e. iff every checked-in // ball has been respected in the miniball computation. diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_configure.h b/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_configure.h index b2ed9893..eeb677c5 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_configure.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_configure.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_configure.h $ -// $Id: Min_sphere_of_spheres_d_configure.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_configure.h $ +// $Id: include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_configure.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_impl.h b/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_impl.h index 203068b6..ca5293f9 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_impl.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_impl.h $ -// $Id: Min_sphere_of_spheres_d_impl.h a522818 2021-03-21T19:06:01+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_impl.h $ +// $Id: include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h b/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h index 36d53935..39b65c87 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h $ -// $Id: Min_sphere_of_spheres_d_pair.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h $ +// $Id: include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -42,7 +42,7 @@ namespace CGAL_MINIBALL_NAMESPACE { { // That constant is embedded in an inline static function, to // workaround a bug of g++>=4.1 - // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 // g++ does not like const floating expression when -frounding-math // is used. static double result() { @@ -55,7 +55,7 @@ namespace CGAL_MINIBALL_NAMESPACE { { // That constant is embedded in an inline static function, to // workaround a bug of g++>=4.1 - // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 // g++ does not like const floating expression when -frounding-math // is used. static float result() { @@ -68,7 +68,7 @@ namespace CGAL_MINIBALL_NAMESPACE { { // That constant is embedded in an inline static function, to // workaround a bug of g++>=4.1 - // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 // g++ does not like const floating expression when -frounding-math // is used. static double result() { @@ -81,7 +81,7 @@ namespace CGAL_MINIBALL_NAMESPACE { { // That constant is embedded in an inline static function, to // workaround a bug of g++>=4.1 - // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 // g++ does not like const floating expression when -frounding-math // is used. static float result() { @@ -141,7 +141,7 @@ namespace CGAL_MINIBALL_NAMESPACE { return *this; } - public: // arithmetic and comparision: + public: // arithmetic and comparison: inline Pair operator+(const Pair& a) const { return Pair(this->first+a.first,this->second+a.second); } diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pivot_impl.h b/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pivot_impl.h index 08e30daa..f2bcf59f 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pivot_impl.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pivot_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pivot_impl.h $ -// $Id: Min_sphere_of_spheres_d_pivot_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pivot_impl.h $ +// $Id: include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pivot_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set.h b/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set.h index d925a963..08d2d4cf 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set.h $ -// $Id: Min_sphere_of_spheres_d_support_set.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set.h $ +// $Id: include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -181,7 +181,7 @@ namespace CGAL_MINIBALL_NAMESPACE { private: // traits class: Traits& t; - private: // for internal consisteny checks: + private: // for internal consistency checks: #ifdef CGAL_MINIBALL_DEBUG // The following variable is true if and only if no ball has been // pushed so far, or is_spanning() has been called at least once and diff --git a/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h b/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h index 26ac906d..901c62a2 100644 --- a/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h +++ b/thirdparty/CGAL/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h $ -// $Id: Min_sphere_of_spheres_d_support_set_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h $ +// $Id: include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -144,7 +144,7 @@ namespace CGAL_MINIBALL_NAMESPACE { copy_n(t.center_cartesian_begin(*b[0]),center); if (m > 1) { - // compute the coeffients beta[i] and the center: + // compute the coefficients beta[i] and the center: for(unsigned int i=1; i(delta[i]+eps[i])+sol[m]*phi[i])/alpha[i]; for (int j=0; j diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_node_with_join.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_node_with_join.h index cd7454a0..ec5a6fca 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_node_with_join.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_node_with_join.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_node_with_join.h $ -// $Id: AABB_node_with_join.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_node_with_join.h $ +// $Id: include/CGAL/Minkowski_sum_2/AABB_node_with_join.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h index 9bec50e5..958d119a 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h $ -// $Id: AABB_segment_2_primitive.h 7322c79 2022-11-21T14:09:08+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h $ +// $Id: include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Sebastian Morr diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_traits_2.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_traits_2.h index 85de9ef9..2de223e2 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traits_2.h $ -// $Id: AABB_traits_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traits_2.h $ +// $Id: include/CGAL/Minkowski_sum_2/AABB_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Sebastian Morr diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h index 6d43f534..a32b442c 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h $ -// $Id: AABB_traversal_traits_with_join.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h $ +// $Id: include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #include -#include +#include namespace CGAL { @@ -69,7 +69,7 @@ class First_intersection_traits public: typedef - boost::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > + std::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > Result; public: First_intersection_traits(const AABBTraits& traits) @@ -124,7 +124,7 @@ class Listing_intersection_traits void intersection(const Query& query, const Primitive& primitive) { - boost::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > + std::optional< typename AABBTraits::template Intersection_and_primitive_id::Type > intersection = m_traits.intersection_object()(query, primitive); if(intersection) @@ -211,7 +211,7 @@ class First_primitive_traits { if( m_traits.do_intersect_object()(query, primitive) ) { - m_result = boost::optional(primitive.id()); + m_result = std::optional(primitive.id()); m_is_found = true; } } @@ -221,12 +221,12 @@ class First_primitive_traits return m_traits.do_intersect_object()(query, node.bbox()); } - boost::optional result() const { return m_result; } + std::optional result() const { return m_result; } bool is_intersection_found() const { return m_is_found; } private: bool m_is_found; - boost::optional m_result; + std::optional m_result; const AABBTraits& m_traits; }; diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h index d2be42b6..9aac9193 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h $ -// $Id: AABB_tree_with_join.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h $ +// $Id: include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,7 @@ #include #include #include -#include +#include #ifdef CGAL_HAS_THREADS #include @@ -182,7 +182,7 @@ namespace CGAL { /// After one or more calls to `AABB_tree_with_join::insert()` the internal data /// structure of the tree must be reconstructed. This procedure - /// has a complexity of \f$O(n log(n))\f$, where \f$n\f$ is the number of + /// has a complexity of \cgalBigO{n log(n)}, where \f$n\f$ is the number of /// primitives of the tree. This procedure is called implicitly /// at the first call to a query member function. You can call /// AABB_tree_with_join::build() explicitly to ensure that the next call to @@ -252,7 +252,7 @@ namespace CGAL { /// `do_intersect` predicates are defined /// in the traits class `AABBTraits`. template - boost::optional any_intersected_primitive(const Query& query) const; + std::optional any_intersected_primitive(const Query& query) const; ///@} @@ -276,7 +276,7 @@ namespace CGAL { /// for which `do_intersect` predicates /// and intersections are defined in the traits class AABBTraits. template - boost::optional< typename Intersection_and_primitive_id::Type > + std::optional< typename Intersection_and_primitive_id::Type > any_intersection(const Query& query) const; ///@} @@ -764,7 +764,7 @@ namespace CGAL { template template - boost::optional< typename AABB_tree_with_join::template Intersection_and_primitive_id::Type > + std::optional< typename AABB_tree_with_join::template Intersection_and_primitive_id::Type > AABB_tree_with_join::any_intersection(const Query& query) const { using namespace CGAL::internal::AABB_tree_with_join; @@ -776,7 +776,7 @@ namespace CGAL { template template - boost::optional::Primitive_id> + std::optional::Primitive_id> AABB_tree_with_join::any_intersected_primitive(const Query& query) const { using namespace CGAL::internal::AABB_tree_with_join; diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h index 90ed5405..1ad3ce9a 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h $ -// $Id: Approx_offset_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h $ +// $Id: include/CGAL/Minkowski_sum_2/Approx_offset_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein @@ -168,12 +168,10 @@ class Approx_offset_base_2 typename Kernel::Orientation_2 f_orient = ker.orientation_2_object(); Traits_2 traits; - std::list xobjs; - std::list::iterator xobj_it; + std::list> xobjs; typename Traits_2::Make_x_monotone_2 f_make_x_monotone = traits.make_x_monotone_2_object(); Curve_2 arc; - X_monotone_curve_2 xarc; do { @@ -517,12 +515,11 @@ class Approx_offset_base_2 // convolution cycle. xobjs.clear(); f_make_x_monotone (arc, std::back_inserter(xobjs)); - for (xobj_it = xobjs.begin(); xobj_it != xobjs.end(); ++xobj_it) { - assign_success = CGAL::assign (xarc, *xobj_it); - CGAL_assertion (assign_success); - CGAL_USE(assign_success); - *oi++ = Labeled_curve_2 (xarc, - X_curve_label (xarc.is_directed_right(), + for (auto xobj_it = xobjs.begin(); xobj_it != xobjs.end(); ++xobj_it) { + const X_monotone_curve_2* xarc = std::get_if(&(*xobj_it)); + CGAL_assertion(xarc!=nullptr); + *oi++ = Labeled_curve_2 (*xarc, + X_curve_label (xarc->is_directed_right(), cycle_id, curve_index++)); } } @@ -571,18 +568,17 @@ class Approx_offset_base_2 xobjs.clear(); f_make_x_monotone (arc, std::back_inserter(xobjs)); - xobj_it = xobjs.begin(); + auto xobj_it = xobjs.begin(); while (xobj_it != xobjs.end()) { - assign_success = CGAL::assign (xarc, *xobj_it); - CGAL_assertion (assign_success); - CGAL_USE(assign_success); + const X_monotone_curve_2* xarc = std::get_if(&(*xobj_it)); + CGAL_assertion (xarc != nullptr); ++xobj_it; bool is_last = (xobj_it == xobjs.end()); - *oi++ = Labeled_curve_2 (xarc, - X_curve_label (xarc.is_directed_right(), + *oi++ = Labeled_curve_2 (*xarc, + X_curve_label (xarc->is_directed_right(), cycle_id, curve_index++, is_last)); } diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h index 914efdfd..82f735ac 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h $ -// $Id: Arr_labeled_traits_2.h 3863b96 2020-04-06T02:01:25+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h $ +// $Id: include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -21,7 +21,7 @@ namespace CGAL { /*! \class - * A meta-traits class that adds lables to points and to x-monotone curves, + * A meta-traits class that adds labels to points and to x-monotone curves, * such that the comparison of two points, as well as the computation of the * intersections between two segments can be easily filtered. */ @@ -115,7 +115,7 @@ class Arr_labeled_traits_2 : public Traits_ { Compare_y_at_x_right_2; typedef typename Base_traits_2::Equal_2 Equal_2; - /// \name Overriden functors. + /// \name Overridden functors. //@{ class Compare_x_2 { private: @@ -297,11 +297,8 @@ class Arr_labeled_traits_2 : public Traits_ { OutputIterator oi) const { typedef std::pair Intersection_base_point; - typedef boost::variant + typedef std::variant Intersection_base_result; - typedef std::pair Intersection_point; - typedef boost::variant - Intersection_result; // In case the curves are adjacent in their curve sequence, we do // not have to compute their intersection (we already know that they @@ -317,24 +314,22 @@ class Arr_labeled_traits_2 : public Traits_ { // Attach labels to the intersection objects. for (const auto& xection : xections) { const Intersection_base_point* base_pt = - boost::get(&xection); + std::get_if(&xection); if (base_pt != nullptr) { // Attach an invalid label to an itersection point. - *oi++ = Intersection_result(std::make_pair(Point_2(base_pt->first), - base_pt->second)); + *oi++ = std::make_pair(Point_2(base_pt->first), base_pt->second); continue; } const Base_x_monotone_curve_2* base_xcv = - boost::get(&xection); + std::get_if(&xection); CGAL_assertion(base_xcv != nullptr); // Attach a merged label to the overlapping curve. - *oi++ = - Intersection_result(X_monotone_curve_2(*base_xcv, - X_curve_label(cv1.label(), - cv2.label()))); + *oi++ = X_monotone_curve_2(*base_xcv, + X_curve_label(cv1.label(), + cv2.label())); } return oi; diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h index 9e70ba64..08ab9367 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h $ -// $Id: Decomposition_strategy_adapter.h 414103f 2022-02-21T17:17:34+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h $ +// $Id: include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein @@ -48,7 +48,7 @@ class Polygon_decomposition_strategy_adapter { // Data members: const Traits_2* m_traits; - bool m_own_traits; // inidicates whether the kernel should be freed up. + bool m_own_traits; // indicates whether the kernel should be freed up. public: // The pointer to the traits and the flag that indicate ownership should be diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h index 7af66949..b00bd5a8 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h $ -// $Id: Exact_offset_base_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h $ +// $Id: include/CGAL/Minkowski_sum_2/Exact_offset_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein @@ -28,11 +28,9 @@ namespace CGAL { * A base class for computing the offset of a given polygon by a given * radius in an exact manner. */ -template -class Exact_offset_base_2 -{ +template +class Exact_offset_base_2 { private: - typedef Traits_ Traits_2; // Rational kernel types: @@ -48,7 +46,6 @@ class Exact_offset_base_2 typedef Rational Basic_NT; private: - // Algebraic kernel types: typedef typename Traits_2::Alg_kernel Alg_kernel; typedef typename Alg_kernel::FT Algebraic; @@ -63,7 +60,6 @@ class Exact_offset_base_2 typedef CGAL::Gps_traits_2 Gps_traits_2; protected: - typedef CGAL::Polygon_2 Polygon_2; typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; @@ -75,21 +71,15 @@ class Exact_offset_base_2 typedef typename Polygon_2::Vertex_circulator Vertex_circulator; protected: - typedef Arr_labeled_traits_2 Labeled_traits_2; - typedef typename Labeled_traits_2::X_monotone_curve_2 Labeled_curve_2; public: - /*! Default constructor. */ - Exact_offset_base_2 () - {} + Exact_offset_base_2() {} protected: - - /*! - * Compute the curves that constitute the offset of a simple polygon by a + /*! Compute the curves that constitute the offset of a simple polygon by a * given radius. * \param pgn The polygon. * \param orient The orientation to traverse the vertices. @@ -99,16 +89,16 @@ class Exact_offset_base_2 * \pre The value type of the output iterator is Labeled_curve_2. * \return A past-the-end iterator for the holes container. */ - template - OutputIterator _offset_polygon (const Polygon_2& pgn, - CGAL::Orientation orient, - const Rational& r, - unsigned int cycle_id, - OutputIterator oi) const + template + OutputIterator _offset_polygon(const Polygon_2& pgn, + CGAL::Orientation orient, + const Rational& r, + unsigned int cycle_id, + OutputIterator oi) const { // Prepare circulators over the polygon vertices. - const bool forward = (pgn.orientation() == orient); - Vertex_circulator first, curr, next; + const bool forward = (pgn.orientation() == orient); + Vertex_circulator first, curr, next; first = pgn.vertices_circulator(); curr = first; @@ -116,38 +106,31 @@ class Exact_offset_base_2 // Traverse the polygon vertices and edges and construct the arcs that // constitute the single convolution cycle. - Alg_kernel alg_ker; - typename Alg_kernel::Equal_2 f_equal = alg_ker.equal_2_object(); - - Nt_traits nt_traits; - const Rational sqr_r = CGAL::square (r); - const Algebraic alg_r = nt_traits.convert (r); - Rational x1, y1; // The source of the current edge. - Rational x2, y2; // The target of the current edge. - Rational delta_x, delta_y; // (x2 - x1) and (y2 - y1), resp. - Algebraic len; // The length of the current edge. - Algebraic trans_x, trans_y; // The translation vector. - Alg_point_2 op1, op2; // The edge points of the offset edge. - Alg_point_2 first_op; // The first offset point. - Algebraic a, b, c; - - unsigned int curve_index = 0; - Traits_2 traits; - std::list xobjs; - std::list::iterator xobj_it; - typename Traits_2::Make_x_monotone_2 - f_make_x_monotone = traits.make_x_monotone_2_object(); - Curve_2 arc; - X_monotone_curve_2 xarc; - bool assign_success; - - do - { + const Rational sqr_r = CGAL::square (r); + Rational x1, y1; // The source of the current edge. + Rational x2, y2; // The target of the current edge. + Rational delta_x, delta_y; // (x2 - x1) and (y2 - y1), resp. + Algebraic len; // The length of the current edge. + Algebraic trans_x, trans_y; // The translation vector. + Alg_point_2 op1, op2; // The edge points of the offset edge. + Alg_point_2 first_op; // The first offset point. + Algebraic a, b, c; + + unsigned int curve_index(0); + std::list> xobjs; + + Traits_2 traits; + auto nt_traits = traits.nt_traits(); + const Algebraic alg_r = nt_traits->convert(r); + auto f_make_x_monotone = traits.make_x_monotone_2_object(); + + auto alg_ker = traits.alg_kernel(); + auto f_equal = alg_ker->equal_2_object(); + + do { // Get a circulator for the next vertex (in the proper orientation). - if (forward) - ++next; - else - --next; + if (forward) ++next; + else --next; // Compute the vector v = (delta_x, delta_y) of the current edge, // and compute the edge length ||v||. @@ -158,8 +141,8 @@ class Exact_offset_base_2 delta_x = x2 - x1; delta_y = y2 - y1; - len = nt_traits.sqrt (nt_traits.convert (CGAL::square (delta_x) + - CGAL::square (delta_y))); + len = nt_traits->sqrt(nt_traits->convert(CGAL::square(delta_x) + + CGAL::square(delta_y))); // The angle theta between the vector v and the x-axis is given by: // @@ -174,45 +157,37 @@ class Exact_offset_base_2 // // trans_x = r*cos(alpha - PI/2) = r*sin(alpha) // trans_y = r*sin(alpha - PI/2) = -r*cos(alpha) - trans_x = nt_traits.convert (r * delta_y) / len; - trans_y = nt_traits.convert (-r * delta_x) / len; + trans_x = nt_traits->convert(r * delta_y) / len; + trans_y = nt_traits->convert(-r * delta_x) / len; // Construct the first offset vertex, which corresponds to the // source vertex of the current polygon edge. - op1 = Alg_point_2 (nt_traits.convert (x1) + trans_x, - nt_traits.convert (y1) + trans_y); + op1 = Alg_point_2(nt_traits->convert(x1) + trans_x, + nt_traits->convert(y1) + trans_y); - if (curr == first) - { + if (curr == first) { // This is the first edge we visit -- store op1 for future use. first_op = op1; } - else - { - if (! f_equal (op2, op1)) - { + else { + if (! f_equal (op2, op1)) { // Connect op2 (from the previous iteration) and op1 with a circular // arc, whose supporting circle is (x1, x2) with radius r. - arc = Curve_2 (Rat_circle_2 (*curr, sqr_r), - CGAL::COUNTERCLOCKWISE, - op2, op1); + auto ctr_cv = traits.construct_curve_2_object(); + Curve_2 arc = ctr_cv(Rat_circle_2 (*curr, sqr_r), + CGAL::COUNTERCLOCKWISE, op2, op1); // Subdivide the arc into x-monotone subarcs and append them to the // convolution cycle. xobjs.clear(); - f_make_x_monotone (arc, std::back_inserter(xobjs)); - - for (xobj_it = xobjs.begin(); xobj_it != xobjs.end(); ++xobj_it) - { - assign_success = CGAL::assign (xarc, *xobj_it); - CGAL_assertion (assign_success); - CGAL_USE(assign_success); - - *oi = Labeled_curve_2 (xarc, - X_curve_label (xarc.is_directed_right(), - cycle_id, - curve_index)); - ++oi; + f_make_x_monotone(arc, std::back_inserter(xobjs)); + + for (auto xobj_it = xobjs.begin(); xobj_it != xobjs.end(); ++xobj_it) { + const X_monotone_curve_2* xarc = std::get_if(&(*xobj_it)); + CGAL_assertion (xarc!=nullptr); + + *oi++ = Labeled_curve_2(*xarc, X_curve_label(xarc->is_directed_right(), + cycle_id, curve_index)); curve_index++; } } @@ -220,25 +195,21 @@ class Exact_offset_base_2 // Construct the second offset vertex, which corresponds to the // target vertex of the current polygon edge. - op2 = Alg_point_2 (nt_traits.convert (x2) + trans_x, - nt_traits.convert (y2) + trans_y); + op2 = Alg_point_2(nt_traits->convert(x2) + trans_x, + nt_traits->convert(y2) + trans_y); // The equation of the line connecting op1 and op2 is given by: // // (y1 - y2)*x + (x2 - x1)*y + (r*len - y1*x2 - x1*y2) = 0 // - a = nt_traits.convert (-delta_y); - b = nt_traits.convert (delta_x); - c = alg_r*len - nt_traits.convert (y1*x2 - x1*y2); - - xarc = X_monotone_curve_2 (a, b, c, - op1, op2); - - *oi = Labeled_curve_2 (xarc, - X_curve_label (xarc.is_directed_right(), - cycle_id, - curve_index)); - ++oi; + a = nt_traits->convert(-delta_y); + b = nt_traits->convert(delta_x); + c = alg_r*len - nt_traits->convert(y1*x2 - x1*y2); + + auto ctr_xcv = traits.construct_x_monotone_curve_2_object(); + X_monotone_curve_2 xarc = ctr_xcv(a, b, c, op1, op2); + *oi++ = Labeled_curve_2(xarc, X_curve_label(xarc.is_directed_right(), + cycle_id, curve_index)); curve_index++; // Proceed to the next polygon vertex. @@ -246,42 +217,36 @@ class Exact_offset_base_2 } while (curr != first); - if (! f_equal (op2, first_op)) - { + if (! f_equal (op2, first_op)) { // Close the convolution cycle by creating the final circular arc, // centered at the first vertex. - arc = Curve_2 (Rat_circle_2 (*first, sqr_r), - CGAL::COUNTERCLOCKWISE, - op2, first_op); + auto ctr_cv = traits.construct_curve_2_object(); + Curve_2 arc = ctr_cv(Rat_circle_2 (*first, sqr_r), + CGAL::COUNTERCLOCKWISE, op2, first_op); // Subdivide the arc into x-monotone subarcs and append them to the // convolution cycle. - bool is_last; + bool is_last; xobjs.clear(); - f_make_x_monotone (arc, std::back_inserter(xobjs)); + f_make_x_monotone(arc, std::back_inserter(xobjs)); - xobj_it = xobjs.begin(); - while (xobj_it != xobjs.end()) - { - assign_success = CGAL::assign (xarc, *xobj_it); - CGAL_assertion (assign_success); - CGAL_USE(assign_success); + auto xobj_it = xobjs.begin(); + while (xobj_it != xobjs.end()) { + const X_monotone_curve_2* xarc = std::get_if(&(*xobj_it)); + CGAL_assertion (xarc!=nullptr); ++xobj_it; is_last = (xobj_it == xobjs.end()); - *oi = Labeled_curve_2 (xarc, - X_curve_label (xarc.is_directed_right(), - cycle_id, - curve_index, - is_last)); - ++oi; + *oi++ = Labeled_curve_2(*xarc, X_curve_label(xarc->is_directed_right(), + cycle_id, curve_index, + is_last)); curve_index++; } } - return (oi); + return oi; } }; diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Hole_filter_2.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Hole_filter_2.h index dd94b001..78d45dc7 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Hole_filter_2.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Hole_filter_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Hole_filter_2.h $ -// $Id: Hole_filter_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Hole_filter_2.h $ +// $Id: include/CGAL/Minkowski_sum_2/Hole_filter_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Sebastian Morr @@ -26,54 +26,38 @@ namespace CGAL { * to the Minkowski sum boundary. */ template -class Hole_filter_2 -{ +class Hole_filter_2 { private: - typedef Kernel_ Kernel; - typedef Container_ Container; - - typedef CGAL::Polygon_2 Polygon_2; - typedef CGAL::Polygon_with_holes_2 Polygon_with_holes_2; - typedef typename Polygon_with_holes_2::Hole_iterator Hole_iterator; - typedef std::vector Hole_iterator_vector; + using Kernel = Kernel_; + using Container = Container_; + using Polygon_2 = CGAL::Polygon_2; + using Polygon_with_holes_2 = CGAL::Polygon_with_holes_2; public: /*! Filter out holes of a polygon with holes. * \param[in] pgn1 The polygon with holes to filter. * \param[in] pgn2 The reference polygon with holes. - * \param[out] filtered_pgn1 the filterd polygon. + * \param[out] filtered_pgn1 the filtered polygon. */ void operator()(const Polygon_with_holes_2& pgn1, const Polygon_2& pgn2, - Polygon_with_holes_2& filtered_pgn1) const - { - filtered_pgn1 = pgn1; - - Hole_iterator_vector to_erase; + Polygon_with_holes_2& filtered_pgn1) const { Bbox_2 boundary_bbox = pgn2.bbox(); - - Hole_iterator it = filtered_pgn1.holes_begin(); - while (it != filtered_pgn1.holes_end()) { - Bbox_2 hole_bbox = (*it).bbox(); - - if ((hole_bbox.ymax()-hole_bbox.ymin() < - boundary_bbox.ymax()-boundary_bbox.ymin()) || - (hole_bbox.xmax()-hole_bbox.xmin() < + filtered_pgn1 = Polygon_with_holes_2(pgn1.outer_boundary()); + for (const auto& h : pgn1.holes()) { + Bbox_2 hole_bbox = h.bbox(); + if ((hole_bbox.ymax()-hole_bbox.ymin() >= + boundary_bbox.ymax()-boundary_bbox.ymin()) && + (hole_bbox.xmax()-hole_bbox.xmin() >= boundary_bbox.xmax()-boundary_bbox.xmin())) - { - to_erase.push_back(it); - } - ++it; + filtered_pgn1.add_hole(h); } - - typename Hole_iterator_vector::iterator it2 = to_erase.begin(); - while (it2 != to_erase.end()) filtered_pgn1.erase_hole(*it2++); } /*! Filter out holes of a polygon with holes. * \param[in] pgn1 The polygon with holes to filter. * \param[in] pgn2 The reference polygon polygon with holes. - * \param[out] filtered_pgn1 the filterd polygon. + * \param[out] filtered_pgn1 the filtered polygon. */ void operator()(const Polygon_with_holes_2& pgn1, const Polygon_with_holes_2& pgn2, diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Labels.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Labels.h index 2eec75e9..e36f9e3e 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Labels.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Labels.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Labels.h $ -// $Id: Labels.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Labels.h $ +// $Id: include/CGAL/Minkowski_sum_2/Labels.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein @@ -182,7 +182,7 @@ class X_curve_label (label._is_last && _index == 0))); } - /*! Check whether the given label is the succcessor of this label. */ + /*! Check whether the given label is the successor of this label. */ bool is_next (const X_curve_label& label) const { if (_component == 0) diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h index 58a5b913..f6f32b6c 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h $ -// $Id: Minkowski_sum_by_reduced_convolution_2.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h $ +// $Id: include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Sebastian Morr @@ -32,8 +32,7 @@ namespace CGAL { // This implementation is based on Alon Baram's 2013 master's thesis "Polygonal // Minkowski Sums via Convolution: Theory and Practice" at Tel-Aviv University. template -class Minkowski_sum_by_reduced_convolution_2 -{ +class Minkowski_sum_by_reduced_convolution_2 { private: typedef Kernel_ Kernel; typedef Container_ Container; @@ -56,14 +55,14 @@ class Minkowski_sum_by_reduced_convolution_2 // Arrangement-related types: typedef Arrangement_with_history_2 Arrangement_history_2; - typedef typename Arrangement_history_2::Halfedge_handle Halfedge_handle; - typedef typename Arrangement_history_2::Face_iterator Face_iterator; - typedef typename Arrangement_history_2::Face_handle Face_handle; - typedef typename Arrangement_history_2::Ccb_halfedge_circulator - Ccb_halfedge_circulator; - typedef typename Arrangement_history_2::Originating_curve_iterator - Originating_curve_iterator; - typedef typename Arrangement_history_2::Inner_ccb_iterator Inner_ccb_iterator; + typedef typename Arrangement_history_2::Halfedge_const_handle + Halfedge_const_handle; + typedef typename Arrangement_history_2::Face_const_handle + Face_const_handle; + typedef typename Arrangement_history_2::Ccb_halfedge_const_circulator + Ccb_halfedge_const_circulator; + typedef typename Arrangement_history_2::Inner_ccb_const_iterator + Inner_ccb_const_iterator; // Function object types: typename Kernel::Construct_translated_point_2 f_add; @@ -74,8 +73,8 @@ class Minkowski_sum_by_reduced_convolution_2 typename Kernel::Counterclockwise_in_between_2 f_ccw_in_between; public: - Minkowski_sum_by_reduced_convolution_2() - { + //! \brief constructs. + Minkowski_sum_by_reduced_convolution_2() { // Obtain kernel functors Kernel ker; f_add = ker.construct_translated_point_2_object(); @@ -86,10 +85,10 @@ class Minkowski_sum_by_reduced_convolution_2 f_ccw_in_between = ker.counterclockwise_in_between_2_object(); } + //! \brief applies the Minkowski sum reduced-convolution operator. template void operator()(const Polygon_2& pgn1, const Polygon_2& pgn2, - Polygon_2& outer_boundary, OutputIterator holes) const - { + Polygon_2& outer_boundary, OutputIterator holes) const { CGAL_precondition(pgn1.is_simple()); CGAL_precondition(pgn2.is_simple()); CGAL_precondition(pgn1.orientation() == COUNTERCLOCKWISE); @@ -101,19 +100,17 @@ class Minkowski_sum_by_reduced_convolution_2 common_operator(pwh1, pwh2, outer_boundary, holes); } + //! \brief applies the Minkowski sum reduced-convolution operator. template void operator()(const Polygon_with_holes_2& pgn1, const Polygon_with_holes_2& pgn2, Polygon_2& outer_boundary, OutputIterator holes) const - { - common_operator(pgn1, pgn2, outer_boundary, holes); - } + { common_operator(pgn1, pgn2, outer_boundary, holes); } + //! \brief applies the Minkowski sum reduced-convolution operator. template - void operator()(const Polygon_2& pgn1, - const Polygon_with_holes_2& pgn2, - Polygon_2& outer_boundary, OutputIterator holes) const - { + void operator()(const Polygon_2& pgn1, const Polygon_with_holes_2& pgn2, + Polygon_2& outer_boundary, OutputIterator holes) const { CGAL_precondition(pgn1.is_simple()); CGAL_precondition(pgn1.orientation() == COUNTERCLOCKWISE); const Polygon_with_holes_2 pwh1(pgn1); @@ -121,11 +118,11 @@ class Minkowski_sum_by_reduced_convolution_2 } private: + //! \brief applies the Minkowski sum reduced-convolution operator. template void common_operator(const Polygon_with_holes_2& pgn1, const Polygon_with_holes_2& pgn2, - Polygon_2& outer_boundary, OutputIterator holes) const - { + Polygon_2& outer_boundary, OutputIterator holes) const { // If the outer boundaries of both summands are empty the Minkowski sum is // the entire plane. if (pgn1.outer_boundary().is_empty() && pgn2.outer_boundary().is_empty()) @@ -157,7 +154,7 @@ class Minkowski_sum_by_reduced_convolution_2 // Check for each face whether it is a hole in the M-sum. If it is, add it // to 'holes'. See chapter 3 of of Alon's master's thesis. - for (Face_iterator fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) { + for (auto fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) { // Check whether the face is on the M-sum's border. // The unbounded face cannot contribute to the Minkowski sum @@ -169,8 +166,8 @@ class Minkowski_sum_by_reduced_convolution_2 // The face needs to be orientable if (! test_face_orientation(arr, fit)) continue; - // When the reversed polygon 1, translated by a point inside of this face, - // collides with polygon 2, this cannot be a hole + // When the reversed polygon 1, translated by a point inside of this + // face, collides with polygon 2, this cannot be a hole Point_2 inner_point = get_point_in_face(fit); if (collision_detector.check_collision(inner_point)) continue; @@ -178,56 +175,52 @@ class Minkowski_sum_by_reduced_convolution_2 } } - // Builds the reduced convolution for each pair of loop in the two - // polygons-with-holes. + /*! \brief builds the reduced convolution for each pair of loops in the two + * polygons-with-holes. + */ void build_reduced_convolution(const Polygon_with_holes_2& pgnwh1, const Polygon_with_holes_2& pgnwh2, - Segment_list& reduced_convolution) const - { - for (std::size_t x = 0; x < 1+pgnwh1.number_of_holes(); ++x) - { - for (std::size_t y = 0; y < 1+pgnwh2.number_of_holes(); ++y) - { - if ((x != 0) && (y != 0)) - { - continue; - } - - Polygon_2 pgn1, pgn2; - + Segment_list& reduced_convolution) const { + for (std::size_t x = 0; x < 1+pgnwh1.number_of_holes(); ++x) { + for (std::size_t y = 0; y < 1+pgnwh2.number_of_holes(); ++y) { + if ((x != 0) && (y != 0)) continue; if (x == 0) { - pgn1 = pgnwh1.outer_boundary(); - } - else { - typename Polygon_with_holes_2::Hole_const_iterator it1 = - pgnwh1.holes_begin(); - for (std::size_t count = 0; count < x-1; count++) { it1++; } - pgn1 = *it1; - } - - if (y == 0) { - pgn2 = pgnwh2.outer_boundary(); + const auto& pgn1 = pgnwh1.outer_boundary(); + if (y == 0) { + const auto& pgn2 = pgnwh2.outer_boundary(); + build_reduced_convolution(pgn1, pgn2, reduced_convolution); + } + else { + auto it2 = pgnwh2.holes_begin(); + for (std::size_t count = 0; count < y-1; ++count) ++it2; + build_reduced_convolution(pgn1, *it2, reduced_convolution); + } } else { - typename Polygon_with_holes_2::Hole_const_iterator it2 = - pgnwh2.holes_begin(); - for (std::size_t count = 0; count < y-1; count++) { it2++; } - pgn2 = *it2; + auto it1 = pgnwh1.holes_begin(); + for (std::size_t count = 0; count < x-1; ++count) ++it1; + if (y == 0) { + const auto& pgn2 = pgnwh2.outer_boundary(); + build_reduced_convolution(*it1, pgn2, reduced_convolution); + } + else { + auto it2 = pgnwh2.holes_begin(); + for (std::size_t count = 0; count < y-1; ++count) ++it2; + build_reduced_convolution(*it1, *it2, reduced_convolution); + } } - - build_reduced_convolution(pgn1, pgn2, reduced_convolution); } } } - // Builds the reduced convolution using a fiber grid approach. For each - // starting vertex, try to add two outgoing next states. If a visited - // vertex is reached, then do not explore further. This is a BFS-like - // iteration beginning from each vertex in the first column of the fiber - // grid. + /*! \brief builds the reduced convolution using a fiber grid approach. For + * each starting vertex, try to add two outgoing next states. If a visited + * vertex is reached, then do not explore further. This is a BFS-like + * iteration beginning from each vertex in the first column of the fiber + * grid. + */ void build_reduced_convolution(const Polygon_2& pgn1, const Polygon_2& pgn2, - Segment_list& reduced_convolution) const - { + Segment_list& reduced_convolution) const { int n1 = static_cast(pgn1.size()); int n2 = static_cast(pgn2.size()); if ((n1 == 0) || (n2 == 0)) return; @@ -235,7 +228,7 @@ class Minkowski_sum_by_reduced_convolution_2 std::vector p1_vertices = vertices_of_polygon(pgn1); std::vector p2_vertices = vertices_of_polygon(pgn2); - // Init the direcions of both polygons + // Init the directions of both polygons std::vector p1_dirs = directions_of_polygon(p1_vertices); std::vector p2_dirs = directions_of_polygon(p2_vertices); @@ -244,13 +237,9 @@ class Minkowski_sum_by_reduced_convolution_2 // Init the queue with vertices from the first column std::queue state_queue; - for (int i = n1-1; i >= 0; --i) - { - state_queue.push(State(i, 0)); - } + for (int i = n1-1; i >= 0; --i) state_queue.push(State(i, 0)); - while (state_queue.size() > 0) - { + while (state_queue.size() > 0) { State curr_state = state_queue.front(); state_queue.pop(); @@ -258,10 +247,7 @@ class Minkowski_sum_by_reduced_convolution_2 int i2 = curr_state.second; // If this state was already visited, skip it - if (visited_states.count(curr_state) > 0) - { - continue; - } + if (visited_states.count(curr_state) > 0) continue; visited_states.insert(curr_state); int next_i1 = (i1+1) % n1; @@ -271,16 +257,13 @@ class Minkowski_sum_by_reduced_convolution_2 // Try two transitions: From (i,j) to (i+1,j) and to (i,j+1). Add // the respective segments, if they are in the reduced convolution. - for(int step_in_pgn1 = 0; step_in_pgn1 <= 1; step_in_pgn1++) - { + for (int step_in_pgn1 = 0; step_in_pgn1 <= 1; ++step_in_pgn1) { int new_i1, new_i2; - if (step_in_pgn1) - { + if (step_in_pgn1) { new_i1 = next_i1; new_i2 = i2; } - else - { + else { new_i1 = i1; new_i2 = next_i2; } @@ -289,39 +272,33 @@ class Minkowski_sum_by_reduced_convolution_2 // the other polygon's vertex' ingoing and outgoing directions, // the segment belongs to the full convolution. bool belongs_to_convolution; - if (step_in_pgn1) - { + if (step_in_pgn1) { belongs_to_convolution = f_ccw_in_between(p1_dirs[i1], p2_dirs[prev_i2], p2_dirs[i2]) || p1_dirs[i1] == p2_dirs[i2]; } - else - { + else { belongs_to_convolution = f_ccw_in_between(p2_dirs[i2], p1_dirs[prev_i1], p1_dirs[i1]) || p2_dirs[i2] == p1_dirs[prev_i1]; } - if (belongs_to_convolution) - { + if (belongs_to_convolution) { state_queue.push(State(new_i1, new_i2)); // Only edges added to convex vertices can be on the M-sum's boundary. // This filter only leaves the *reduced* convolution. bool convex; - if (step_in_pgn1) - { + if (step_in_pgn1) { convex = is_convex(p2_vertices[prev_i2], p2_vertices[i2], p2_vertices[next_i2]); } - else - { + else { convex = is_convex(p1_vertices[prev_i1], p1_vertices[i1], p1_vertices[next_i1]); } - if (convex) - { + if (convex) { Point_2 start_point = get_point(i1, i2, p1_vertices, p2_vertices); Point_2 end_point = get_point(new_i1, new_i2, p1_vertices, p2_vertices); @@ -334,27 +311,21 @@ class Minkowski_sum_by_reduced_convolution_2 // Returns a vector of the polygon's vertices, in case that Container // is std::list and we cannot use vertex(i). - std::vector vertices_of_polygon(const Polygon_2& p) const - { + std::vector vertices_of_polygon(const Polygon_2& p) const { std::vector vertices; - for (typename Polygon_2::Vertex_const_iterator it = p.vertices_begin(); - it != p.vertices_end(); it++) - { + for (auto it = p.vertices_begin(); it != p.vertices_end(); it++) vertices.push_back(*it); - } return vertices; } // Returns a sorted list of the polygon's edges - std::vector directions_of_polygon( - const std::vector& points) const - { + std::vector + directions_of_polygon(const std::vector& points) const { std::vector directions; std::size_t n = points.size(); - for (std::size_t i = 0; i < n-1; ++i) - { + for (std::size_t i = 0; i < n-1; ++i) { directions.push_back(f_direction(f_vector(points[i], points[i+1]))); } directions.push_back(f_direction(f_vector(points[n-1], points[0]))); @@ -362,69 +333,59 @@ class Minkowski_sum_by_reduced_convolution_2 return directions; } + /*! \brief determines whether three vertices on the outer CCB of a face are + * locally convex. + */ bool is_convex(const Point_2& prev, const Point_2& curr, const Point_2& next) const - { - return f_orientation(prev, curr, next) == LEFT_TURN; - } + { return f_orientation(prev, curr, next) == LEFT_TURN; } - // Returns the point corresponding to a state (i,j). + //! \brief obtains the point corresponding to a state (i,j). Point_2 get_point(int i1, int i2, const std::vector& pgn1, const std::vector& pgn2) const - { - - return f_add(pgn1[i1], Vector_2(Point_2(ORIGIN), pgn2[i2])); - } + { return f_add(pgn1[i1], Vector_2(Point_2(ORIGIN), pgn2[i2])); } - // Put the outer loop of the arrangement in 'outer_boundary' - void get_outer_loop(Arrangement_history_2& arr, - Polygon_2& outer_boundary) const - { - Inner_ccb_iterator icit = arr.unbounded_face()->inner_ccbs_begin(); - Ccb_halfedge_circulator circ_start = *icit; - Ccb_halfedge_circulator circ = circ_start; + //! \brief puts the outer loop of the arrangement in 'outer_boundary' + void get_outer_loop(const Arrangement_history_2& arr, + Polygon_2& outer_boundary) const { + Inner_ccb_const_iterator icit = arr.unbounded_face()->inner_ccbs_begin(); + Ccb_halfedge_const_circulator circ_start = *icit; + Ccb_halfedge_const_circulator circ = circ_start; - do - { - outer_boundary.push_back(circ->source()->point()); - } + do outer_boundary.push_back(circ->source()->point()); while (--circ != circ_start); } - // Determine whether the face orientation is consistent. + //! \brief determines whether the face orientation is consistent. bool test_face_orientation(const Arrangement_history_2& arr, - const Face_handle face) const - { + const Face_const_handle face) const { // The face needs to be orientable - Ccb_halfedge_circulator start = face->outer_ccb(); - Ccb_halfedge_circulator circ = start; + Ccb_halfedge_const_circulator start = face->outer_ccb(); + Ccb_halfedge_const_circulator circ = start; do if (!do_original_edges_have_same_direction(arr, circ)) return false; while (++circ != start); return true; } - // Add a face to 'holes'. + //! \brief adds a face to 'holes'. template - void add_face(const Face_handle face, OutputIterator holes) const - { + void add_face(Face_const_handle face, OutputIterator holes) const { Polygon_2 pgn_hole; - Ccb_halfedge_circulator start = face->outer_ccb(); - Ccb_halfedge_circulator circ = start; + Ccb_halfedge_const_circulator start = face->outer_ccb(); + Ccb_halfedge_const_circulator circ = start; do pgn_hole.push_back(circ->source()->point()); while (--circ != start); *holes = pgn_hole; ++holes; } - // Check whether the convolution's original edge(s) had the same direction as - // the arrangement's half edge + /*! \brief checks whether the convolution's original edge(s) had the same + * direction as the arrangement's half edge. + */ bool do_original_edges_have_same_direction(const Arrangement_history_2& arr, - const Halfedge_handle he) const - { - Originating_curve_iterator segment_itr; - - for (segment_itr = arr.originating_curves_begin(he); + Halfedge_const_handle he) const { + for (auto segment_itr = arr.originating_curves_begin(he); segment_itr != arr.originating_curves_end(he); ++segment_itr) { if (f_compare_xy(segment_itr->source(), segment_itr->target()) == @@ -437,41 +398,34 @@ class Minkowski_sum_by_reduced_convolution_2 return true; } - // Return a point in the face's interior by finding a diagonal - Point_2 get_point_in_face(const Face_handle face) const - { - Ccb_halfedge_circulator current_edge = face->outer_ccb(); - Ccb_halfedge_circulator next_edge = current_edge; - next_edge++; - - Point_2 a, v, b; - - // Move over the face's vertices until a convex corner is encountered: - do - { - a = current_edge->source()->point(); - v = current_edge->target()->point(); - b = next_edge->target()->point(); - - current_edge++; - next_edge++; + //! \brief obtains a point in the face's interior by finding a diagonal + Point_2 get_point_in_face(Face_const_handle face) const { + Ccb_halfedge_const_circulator next = face->outer_ccb(); + Ccb_halfedge_const_circulator curr = next++; + + // Move over the face's vertices until a convex corner is encountered. + // Observe that the outer ccb of a hole is clockwise oriented. + while (! is_convex(curr->source()->point(), + curr->target()->point(), + next->target()->point())) { + curr = next; + ++next; } - while (!is_convex(a, v, b)); + const auto& a = curr->source()->point(); + const auto& v = curr->target()->point(); + const auto& b = next->target()->point(); Triangle_2 ear(a, v, b); FT min_distance = -1; - const Point_2* min_q = 0; + const Point_2* min_q = nullptr; // Of the remaining vertices, find the one inside of the "ear" with minimal // distance to v: - while (++next_edge != current_edge) - { - const Point_2& q = next_edge->target()->point(); - if (ear.has_on_bounded_side(q)) - { + while (++next != curr) { + const Point_2& q = next->target()->point(); + if (ear.has_on_bounded_side(q)) { FT distance = squared_distance(q, v); - if ((min_q == 0) || (distance < min_distance)) - { + if ((min_q == 0) || (distance < min_distance)) { min_distance = distance; min_q = &q; } @@ -483,15 +437,14 @@ class Minkowski_sum_by_reduced_convolution_2 return (min_q == 0) ? centroid(ear) : midpoint(v, *min_q); } + //! \brief transforms a polygon with holes. template Polygon_with_holes_2 transform(const Transformation& t, - const Polygon_with_holes_2& p) const - { + const Polygon_with_holes_2& p) const { Polygon_with_holes_2 result(CGAL::transform(t, p.outer_boundary())); - typename Polygon_with_holes_2::Hole_const_iterator it = p.holes_begin(); - while (it != p.holes_end()) - { + auto it = p.holes_begin(); + while (it != p.holes_end()) { Polygon_2 p2(it->vertices_begin(), it->vertices_end()); result.add_hole(CGAL::transform(t, p2)); ++it; diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h index c0f251e4..d5d5b0a1 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h $ -// $Id: Minkowski_sum_conv_2.h 414103f 2022-02-21T17:17:34+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h $ +// $Id: include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein @@ -104,7 +104,7 @@ class Minkowski_sum_by_convolution_2 { typedef Union_of_segment_cycles_2 Union_2; const Kernel* m_kernel; - bool m_own_kernel; // inidicates whether the kernel should be freed up. + bool m_own_kernel; // indicates whether the kernel should be freed up. // Data members: Equal_2 f_equal; @@ -192,7 +192,7 @@ class Minkowski_sum_by_convolution_2 { * polygon. * \param pgn1 The first polygon. * \param pgn2 The second polygon. - * \param sum_bound Output: A polygon respresenting the outer boundary + * \param sum_bound Output: A polygon representing the outer boundary * of the Minkowski sum. * \param sum_holes Output: An output iterator for the holes in the sum, * represented as simple polygons. @@ -266,7 +266,6 @@ class Minkowski_sum_by_convolution_2 { // Construct the segments of the convolution cycles. unsigned int curr_id = 0; - unsigned int cycles = 0; Segments_list conv_segments; Segments_list cycle; Labels_set used_labels; @@ -340,7 +339,6 @@ class Minkowski_sum_by_convolution_2 { CGAL_assertion(cycle.empty()); } } - ++cycles; } curr1 = next1; diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h index bbcbff90..71170000 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h $ -// $Id: Minkowski_sum_decomp_2.h 414103f 2022-02-21T17:17:34+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h $ +// $Id: include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein @@ -75,11 +75,11 @@ class Minkowski_sum_by_decomposition_2 { // Data members: const Decomposition_strategy1* m_decomposition_strategy1; const Decomposition_strategy2* m_decomposition_strategy2; - bool m_own_strategy1; // inidicates whether the stategy should be freed up. - bool m_own_strategy2; // inidicates whether the stategy should be freed up. + bool m_own_strategy1; // indicates whether the strategy should be freed up. + bool m_own_strategy2; // indicates whether the strategy should be freed up. const Traits_2* m_traits; - bool m_own_traits; // inidicates whether the kernel should be freed up. + bool m_own_traits; // indicates whether the kernel should be freed up. Compare_angle_2 f_compare_angle; Translate_point_2 f_add; @@ -348,7 +348,7 @@ class Minkowski_sum_by_decomposition_2 { } private: - /*! Merge mergable edges + /*! Merge mergeable edges * \param arr (in) The underlying arrangement. */ void simplify(Arrangement_2& arr) const diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Offset_conv_2.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Offset_conv_2.h index dba1923c..79e640fb 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Offset_conv_2.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Offset_conv_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Offset_conv_2.h $ -// $Id: Offset_conv_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Offset_conv_2.h $ +// $Id: include/CGAL/Minkowski_sum_2/Offset_conv_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Offset_decomp_2.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Offset_decomp_2.h index 961b4370..0cd77d10 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Offset_decomp_2.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Offset_decomp_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Offset_decomp_2.h $ -// $Id: Offset_decomp_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Offset_decomp_2.h $ +// $Id: include/CGAL/Minkowski_sum_2/Offset_decomp_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Polygon_convex_decomposition.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Polygon_convex_decomposition.h index 3b1b4653..df09bf57 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Polygon_convex_decomposition.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Polygon_convex_decomposition.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Polygon_convex_decomposition.h $ -// $Id: Polygon_convex_decomposition.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Polygon_convex_decomposition.h $ +// $Id: include/CGAL/Minkowski_sum_2/Polygon_convex_decomposition.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h index b74385cb..bacc3d99 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h $ -// $Id: Union_of_curve_cycles_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h $ +// $Id: include/CGAL/Minkowski_sum_2/Union_of_curve_cycles_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Union_of_cycles_2.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Union_of_cycles_2.h index e099303d..7fe5f98f 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Union_of_cycles_2.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Union_of_cycles_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Union_of_cycles_2.h $ -// $Id: Union_of_cycles_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Union_of_cycles_2.h $ +// $Id: include/CGAL/Minkowski_sum_2/Union_of_cycles_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Union_of_segment_cycles_2.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Union_of_segment_cycles_2.h index e840f9a0..a3200db6 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Union_of_segment_cycles_2.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_2/Union_of_segment_cycles_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Union_of_segment_cycles_2.h $ -// $Id: Union_of_segment_cycles_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Union_of_segment_cycles_2.h $ +// $Id: include/CGAL/Minkowski_sum_2/Union_of_segment_cycles_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/Gaussian_map.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/Gaussian_map.h index cdabce79..1f62b74f 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/Gaussian_map.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/Gaussian_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/Gaussian_map.h $ -// $Id: Gaussian_map.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/Gaussian_map.h $ +// $Id: include/CGAL/Minkowski_sum_3/Gaussian_map.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -180,7 +180,7 @@ class Gaussian_map : CGAL_NEF_TRACEN( "first+current:" << first << "+" << current ); typename Nef_polyhedron_3::SHalfedge_around_sface_const_circulator sfc(sec), send(sfc); CGAL_For_all(sfc, send) { - CGAL_NEF_TRACEN( "sedge->cirlce() " << sfc->circle() ); + CGAL_NEF_TRACEN( "sedge->circle() " << sfc->circle() ); if(sfc->circle() != current) { if(sfc->circle() != first) ++circles; diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/Gaussian_map_to_nef_3.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/Gaussian_map_to_nef_3.h index a415a33b..35b3f647 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/Gaussian_map_to_nef_3.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/Gaussian_map_to_nef_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/Gaussian_map_to_nef_3.h $ -// $Id: Gaussian_map_to_nef_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/Gaussian_map_to_nef_3.h $ +// $Id: include/CGAL/Minkowski_sum_3/Gaussian_map_to_nef_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/PointMark.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/PointMark.h index b080d91e..c21b5832 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/PointMark.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/PointMark.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/PointMark.h $ -// $Id: PointMark.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/PointMark.h $ +// $Id: include/CGAL/Minkowski_sum_3/PointMark.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/bipartite_nary_union_sorted_combined.h b/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/bipartite_nary_union_sorted_combined.h index 1d09d94d..785b63f4 100644 --- a/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/bipartite_nary_union_sorted_combined.h +++ b/thirdparty/CGAL/include/CGAL/Minkowski_sum_3/bipartite_nary_union_sorted_combined.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/bipartite_nary_union_sorted_combined.h $ -// $Id: bipartite_nary_union_sorted_combined.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/bipartite_nary_union_sorted_combined.h $ +// $Id: include/CGAL/Minkowski_sum_3/bipartite_nary_union_sorted_combined.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Mixed_integer_program_traits.h b/thirdparty/CGAL/include/CGAL/Mixed_integer_program_traits.h index d6cf6c35..f45656ca 100644 --- a/thirdparty/CGAL/include/CGAL/Mixed_integer_program_traits.h +++ b/thirdparty/CGAL/include/CGAL/Mixed_integer_program_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Solver_interface/include/CGAL/Mixed_integer_program_traits.h $ -// $Id: Mixed_integer_program_traits.h a5b03d5 2022-04-30T14:09:18+02:00 albert-github +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Solver_interface/include/CGAL/Mixed_integer_program_traits.h $ +// $Id: include/CGAL/Mixed_integer_program_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Liangliang Nan @@ -100,7 +100,7 @@ namespace CGAL { /// /// The variable of a mixed integer program. /// - /// \cgalModels `MixedIntegerProgramVariable` + /// \cgalModels{MixedIntegerProgramVariable} template class Variable : public Solver_entry, public Bound { @@ -199,7 +199,7 @@ namespace CGAL { /// /// The linear constraint of a mixed integer program. /// - /// \cgalModels `MixedIntegerProgramLinearConstraint` + /// \cgalModels{MixedIntegerProgramLinearConstraint} template class Linear_constraint : public Linear_expression, public Bound { @@ -231,7 +231,7 @@ namespace CGAL { /// /// The linear objective of a mixed integer program. /// - /// \cgalModels `MixedIntegerProgramLinearObjective` + /// \cgalModels{MixedIntegerProgramLinearObjective} /// template class Linear_objective : public Linear_expression @@ -281,7 +281,7 @@ namespace CGAL { /// \tparam FT Number type /// \endcond /// - /// \cgalModels `MixedIntegerProgramTraits` + /// \cgalModels{MixedIntegerProgramTraits} template class Mixed_integer_program_traits { diff --git a/thirdparty/CGAL/include/CGAL/Modifiable_priority_queue.h b/thirdparty/CGAL/include/CGAL/Modifiable_priority_queue.h index c46cf561..2859eaa3 100644 --- a/thirdparty/CGAL/include/CGAL/Modifiable_priority_queue.h +++ b/thirdparty/CGAL/include/CGAL/Modifiable_priority_queue.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Modifiable_priority_queue.h $ -// $Id: Modifiable_priority_queue.h 87233c6 2022-03-18T20:02:29+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Modifiable_priority_queue.h $ +// $Id: include/CGAL/Modifiable_priority_queue.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -12,7 +12,7 @@ #define CGAL_MODIFIABLE_PRIORITY_QUEUE_H #include // Needed by the following Boost header for CHAR_BIT. -#include +#include #include #include @@ -66,14 +66,14 @@ class Modifiable_priority_queue bool contains ( value_type const& v ) { return mHeap.contains(v) ; } - boost::optional extract_top() + std::optional extract_top() { - boost::optional r ; + std::optional r ; if ( !empty() ) { value_type v = top(); pop(); - r = boost::optional(v) ; + r = std::optional(v) ; } return r ; } @@ -238,14 +238,14 @@ struct Modifiable_priority_queue extract_top() + std::optional extract_top() { - boost::optional r; + std::optional r; if(!empty()) { value_type v = top(); pop(); - r = boost::optional(v); + r = std::optional(v); } return r; diff --git a/thirdparty/CGAL/include/CGAL/Modifier_base.h b/thirdparty/CGAL/include/CGAL/Modifier_base.h index 2be13647..dd92c956 100644 --- a/thirdparty/CGAL/include/CGAL/Modifier_base.h +++ b/thirdparty/CGAL/include/CGAL/Modifier_base.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Modifier/include/CGAL/Modifier_base.h $ -// $Id: Modifier_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Modifier/include/CGAL/Modifier_base.h $ +// $Id: include/CGAL/Modifier_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Modular_arithmetic/Residue_type.h b/thirdparty/CGAL/include/CGAL/Modular_arithmetic/Residue_type.h index 8fd27be6..9dcf005e 100644 --- a/thirdparty/CGAL/include/CGAL/Modular_arithmetic/Residue_type.h +++ b/thirdparty/CGAL/include/CGAL/Modular_arithmetic/Residue_type.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Modular_arithmetic/include/CGAL/Modular_arithmetic/Residue_type.h $ -// $Id: Residue_type.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Modular_arithmetic/include/CGAL/Modular_arithmetic/Residue_type.h $ +// $Id: include/CGAL/Modular_arithmetic/Residue_type.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion, Michael Hemmer, Alexander Kobel @@ -148,7 +148,7 @@ class Residue: } - /* a^-1, using Bezout (extended Euclidian algorithm). */ + /* a^-1, using Bezout (extended Euclidean algorithm). */ static inline double RES_inv (double ri1){ CGAL_precondition (ri1 != 0.0); diff --git a/thirdparty/CGAL/include/CGAL/Modular_traits.h b/thirdparty/CGAL/include/CGAL/Modular_traits.h index 3b0fddfd..2668f739 100644 --- a/thirdparty/CGAL/include/CGAL/Modular_traits.h +++ b/thirdparty/CGAL/include/CGAL/Modular_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Modular_arithmetic/include/CGAL/Modular_traits.h $ -// $Id: Modular_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Modular_arithmetic/include/CGAL/Modular_traits.h $ +// $Id: include/CGAL/Modular_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Hemmer diff --git a/thirdparty/CGAL/include/CGAL/Monge_via_jet_fitting.h b/thirdparty/CGAL/include/CGAL/Monge_via_jet_fitting.h index ee2e9b45..5efccd35 100644 --- a/thirdparty/CGAL/include/CGAL/Monge_via_jet_fitting.h +++ b/thirdparty/CGAL/include/CGAL/Monge_via_jet_fitting.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h $ -// $Id: Monge_via_jet_fitting.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h $ +// $Id: include/CGAL/Monge_via_jet_fitting.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Pouget and Frédéric Cazals @@ -151,7 +151,7 @@ class Monge_form { //translate_p0 changes the origin of the world to p0 the first point // of the input data points //change_world2fitting (coord of a vector in world) = coord of this - // vector in fitting. The matrix tranform has as lines the coord of + // vector in fitting. The matrix transform has as lines the coord of // the basis vectors of fitting in the world coord. //idem for change_fitting2monge Aff_transformation translate_p0, change_world2fitting, @@ -553,7 +553,7 @@ compute_Monge_coefficients(FT* A, std::size_t dprime, { //One has the equation w=J_A(u,v) of the fitted surface S // in the fitting_basis - //Substituing (u,v,w)=change_fitting2monge^{-1}(x,y,z) + //Substituting (u,v,w)=change_fitting2monge^{-1}(x,y,z) //One has the equation f(x,y,z)=0 on this surface S in the monge // basis //The monge form of the surface at the origin is the bivariate fct diff --git a/thirdparty/CGAL/include/CGAL/Mpzf.h b/thirdparty/CGAL/include/CGAL/Mpzf.h index b1fdae64..a7ab9083 100644 --- a/thirdparty/CGAL/include/CGAL/Mpzf.h +++ b/thirdparty/CGAL/include/CGAL/Mpzf.h @@ -4,18 +4,19 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Mpzf.h $ -// $Id: Mpzf.h 6481cb2 2021-08-13T16:44:53+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Mpzf.h $ +// $Id: include/CGAL/Mpzf.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse +#ifndef CGAL_MPZF_H +#define CGAL_MPZF_H + #ifndef CGAL_NO_MPZF_DIVISION_OPERATOR #define CGAL_MPZF_DIVISION_OPERATOR 1 #endif -#ifndef CGAL_MPZF_H -#define CGAL_MPZF_H #include #include #include @@ -147,7 +148,7 @@ template struct pool2 { static bool empty() { return data() == 0; } static const int extra = 1; // TODO: handle the case where a pointer is larger than a mp_limb_t private: - CGAL_static_assertion(sizeof(T) >= sizeof(T*)); + static_assert(sizeof(T) >= sizeof(T*)); static T& data () { static CGAL_MPZF_TLS T data_ = 0; return data_; @@ -161,7 +162,7 @@ template struct pool3 { static bool empty() { return data() == 0; } static const int extra = 1; // TODO: handle the case where a pointer is larger than a mp_limb_t private: - CGAL_static_assertion(sizeof(T) >= sizeof(T*)); + static_assert(sizeof(T) >= sizeof(T*)); struct cleaner { T data_ = 0; ~cleaner(){ @@ -187,7 +188,7 @@ template struct no_pool { }; // Only used with an argument known not to be 0. -inline int ctz (boost::uint64_t x) { +inline int ctz (std::uint64_t x) { #if defined(_MSC_VER) unsigned long ret; _BitScanForward64(&ret, x); @@ -199,7 +200,7 @@ inline int ctz (boost::uint64_t x) { return __builtin_ctzll (x); #endif } -inline int clz (boost::uint64_t x) { +inline int clz (std::uint64_t x) { #if defined(_MSC_VER) unsigned long ret; _BitScanReverse64(&ret, x); @@ -429,7 +430,7 @@ struct Mpzf { } Mpzf(double d){ init(); - using boost::uint64_t; + using std::uint64_t; union { #ifdef CGAL_LITTLE_ENDIAN struct { uint64_t man:52; uint64_t exp:11; uint64_t sig:1; } s; @@ -454,7 +455,7 @@ struct Mpzf { } int e1 = (int)dexp+13; // FIXME: make it more general! But not slower... - CGAL_static_assertion(GMP_NUMB_BITS == 64); + static_assert(GMP_NUMB_BITS == 64); int e2 = e1 % 64; exp = e1 / 64 - 17; // 52+1023+13==17*64 ? diff --git a/thirdparty/CGAL/include/CGAL/Multi_surface_3.h b/thirdparty/CGAL/include/CGAL/Multi_surface_3.h index 0c2f94dc..34911a24 100644 --- a/thirdparty/CGAL/include/CGAL/Multi_surface_3.h +++ b/thirdparty/CGAL/include/CGAL/Multi_surface_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Multi_surface_3.h $ -// $Id: Multi_surface_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Multi_surface_3.h $ +// $Id: include/CGAL/Multi_surface_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent RINEAU diff --git a/thirdparty/CGAL/include/CGAL/Multiscale_sort.h b/thirdparty/CGAL/include/CGAL/Multiscale_sort.h index 5459afa5..c80b221e 100644 --- a/thirdparty/CGAL/include/CGAL/Multiscale_sort.h +++ b/thirdparty/CGAL/include/CGAL/Multiscale_sort.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Multiscale_sort.h $ -// $Id: Multiscale_sort.h 5c41b10 2020-01-02T10:26:44+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Multiscale_sort.h $ +// $Id: include/CGAL/Multiscale_sort.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Christophe Delage diff --git a/thirdparty/CGAL/include/CGAL/Multiset.h b/thirdparty/CGAL/include/CGAL/Multiset.h index d1df28c1..ab1e5ec3 100644 --- a/thirdparty/CGAL/include/CGAL/Multiset.h +++ b/thirdparty/CGAL/include/CGAL/Multiset.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Multiset.h $ -// $Id: Multiset.h 5ecd852 2021-04-26T21:37:02+01:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Multiset.h $ +// $Id: include/CGAL/Multiset.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,7 +14,6 @@ #include #include -#include #include #include #include @@ -27,15 +26,15 @@ namespace CGAL { * Container class representing a red-black tree, which is a balanced binary * tree that has the following invariants: * 1. Each node has a color, which is either red or black. - * 2. Each red node has two red children (if a child is missing, it is + * 2. Each red node has two black children (if a child is missing, it is * considered as a black node). * 3. The number of black nodes from every path from the tree root to a leaf * is the same for all tree leaves (it is called the 'black height' of the * tree). - * Due to propeties 2-3, the height of a red-black tree containing n nodes + * Due to properties 2-3, the height of a red-black tree containing n nodes * is bounded by 2*log_2(n). * - * The Multiset template requires three template parmeters: + * The Multiset template requires three template parameters: * - The contained Type class represents the objects stored in the tree. * It has to support the default constructor, the copy constructor and * the assignment operator (operator=). @@ -43,7 +42,7 @@ namespace CGAL { * class Type: It has to support an operator() that receives two objects from * the Type class and returns SMALLER, EQUAL or LARGER, depending on the * comparison result. - * In case the deafult parameter is supplied, the Type class has to support + * In case the default parameter is supplied, the Type class has to support * the less-than (<) and the equal (==) operators. * - The Allocator represents an allocator class. By default, it is the CGAL * allocator. @@ -168,7 +167,7 @@ class Multiset Node* predecessor () const { // The DUMMY_BEGIN node has no predecessor. - CGAL_multiset_assertion (color != DUMMY_BEGIN); + CGAL_assertion (color != DUMMY_BEGIN); Node *predP; @@ -203,7 +202,7 @@ class Multiset Node* successor () const { // The DUMMY_END node has no successor. - CGAL_multiset_assertion (color != DUMMY_END); + CGAL_assertion (color != DUMMY_END); Node *succP; @@ -292,7 +291,7 @@ class Multiset public: - // Forward decleration: + // Forward declaration: class const_iterator; /*! \class @@ -326,7 +325,7 @@ class Multiset public: - /*! Deafult constructor. */ + /*! Default constructor. */ iterator () : nodeP (nullptr) {} @@ -346,7 +345,7 @@ class Multiset /*! Increment operator (prefix notation). */ iterator& operator++ () { - CGAL_multiset_precondition (nodeP != nullptr); + CGAL_precondition (nodeP != nullptr); nodeP = nodeP->successor(); return (*this); @@ -355,7 +354,7 @@ class Multiset /*! Increment operator (postfix notation). */ iterator operator++ (int ) { - CGAL_multiset_precondition (nodeP != nullptr); + CGAL_precondition (nodeP != nullptr); iterator temp = *this; @@ -366,7 +365,7 @@ class Multiset /*! Decrement operator (prefix notation). */ iterator& operator-- () { - CGAL_multiset_precondition (nodeP != nullptr); + CGAL_precondition (nodeP != nullptr); nodeP = nodeP->predecessor(); return (*this); @@ -375,7 +374,7 @@ class Multiset /*! Decrement operator (postfix notation). */ iterator operator-- (int ) { - CGAL_multiset_precondition (nodeP != nullptr); + CGAL_precondition (nodeP != nullptr); iterator temp = *this; @@ -388,7 +387,7 @@ class Multiset */ reference operator* () const { - CGAL_multiset_precondition (nodeP != nullptr && nodeP->is_valid()); + CGAL_precondition (nodeP != nullptr && nodeP->is_valid()); return (nodeP->object); } @@ -398,7 +397,7 @@ class Multiset */ pointer operator-> () const { - CGAL_multiset_precondition (nodeP != nullptr && nodeP->is_valid()); + CGAL_precondition (nodeP != nullptr && nodeP->is_valid()); return (&(nodeP->object)); } @@ -436,7 +435,7 @@ class Multiset public: - /*! Deafult constructor. */ + /*! Default constructor. */ const_iterator () : nodeP (nullptr) {} @@ -461,7 +460,7 @@ class Multiset /*! Increment operator (prefix notation). */ const_iterator& operator++ () { - CGAL_multiset_precondition (nodeP != nullptr); + CGAL_precondition (nodeP != nullptr); nodeP = nodeP->successor(); return (*this); @@ -470,7 +469,7 @@ class Multiset /*! Increment operator (postfix notation). */ const_iterator operator++ (int ) { - CGAL_multiset_precondition (nodeP != nullptr); + CGAL_precondition (nodeP != nullptr); const_iterator temp = *this; @@ -481,7 +480,7 @@ class Multiset /*! Decrement operator (prefix notation). */ const_iterator& operator-- () { - CGAL_multiset_precondition (nodeP != nullptr); + CGAL_precondition (nodeP != nullptr); nodeP = nodeP->predecessor(); return (*this); @@ -490,7 +489,7 @@ class Multiset /*! Decrement operator (postfix notation). */ const_iterator operator-- (int ) { - CGAL_multiset_precondition (nodeP != nullptr); + CGAL_precondition (nodeP != nullptr); const_iterator temp = *this; @@ -503,7 +502,7 @@ class Multiset */ reference operator* () const { - CGAL_multiset_precondition (nodeP != nullptr && nodeP->is_valid()); + CGAL_precondition (nodeP != nullptr && nodeP->is_valid()); return (nodeP->object); } @@ -513,7 +512,7 @@ class Multiset */ pointer operator-> () const { - CGAL_multiset_precondition (nodeP != nullptr && nodeP->is_valid()); + CGAL_precondition (nodeP != nullptr && nodeP->is_valid()); return (&(nodeP->object)); } @@ -545,25 +544,25 @@ class Multiset //@{ /*! - * Default constructor. [takes O(1) operations] + * Default constructor. [takes \cgalBigO{1} operations] */ Multiset (); /*! - * Constructor with a comparison object. [takes O(1) operations] + * Constructor with a comparison object. [takes \cgalBigO{1} operations] * \param comp A comparison object to be used by the tree. */ Multiset (const Compare& comp); /*! - * Copy constructor. [takes O(n) operations] + * Copy constructor. [takes \cgalBigO{n} operations] * \param tree The copied tree. */ Multiset (const Self& tree); /*! * Construct a tree that contains all objects in the given range. - * [takes O(n log n) operations] + * [takes \cgalBigO{n log n} operations] * \param first An iterator for the first object in the range. * \param last A past-the-end iterator for the range. */ @@ -588,18 +587,18 @@ class Multiset } /*! - * Destructor. [takes O(n) operations] + * Destructor. [takes \cgalBigO{n} operations] */ virtual ~Multiset () noexcept(!CGAL_ASSERTIONS_ENABLED); /*! - * Assignment operator. [takes O(n) operations] + * Assignment operator. [takes \cgalBigO{n} operations] * \param tree The copied tree. */ Self& operator= (const Self& tree); /*! - * Swap two trees. [takes O(1) operations] + * Swap two trees. [takes \cgalBigO{1} operations] * \param tree The copied tree. */ void swap (Self& tree); @@ -609,13 +608,13 @@ class Multiset //@{ /*! - * Test two trees for equality. [takes O(n) operations] + * Test two trees for equality. [takes \cgalBigO{n} operations] * \param tree The compared tree. */ bool operator== (const Self& tree) const; /*! - * Check if our tree is lexicographically smaller. [takes O(n) operations] + * Check if our tree is lexicographically smaller. [takes \cgalBigO{n} operations] * \param tree The compared tree. */ bool operator< (const Self& tree) const; @@ -625,7 +624,7 @@ class Multiset //@{ /*! - * Get the comparsion object used by the tree (non-const version). + * Get the comparison object used by the tree (non-const version). */ inline Compare& key_comp () { @@ -633,7 +632,7 @@ class Multiset } /*! - * Get the comparsion object used by the tree (non-const version). + * Get the comparison object used by the tree (non-const version). */ inline Compare& value_comp () { @@ -642,7 +641,7 @@ class Multiset /*! - * Get the comparsion object used by the tree (const version). + * Get the comparison object used by the tree (const version). */ inline const Compare& key_comp () const { @@ -650,7 +649,7 @@ class Multiset } /*! - * Get the comparsion object used by the tree (const version). + * Get the comparison object used by the tree (const version). */ inline const Compare& value_comp () const { @@ -708,8 +707,8 @@ class Multiset } /*! - * Get the size of the tree. [takes O(1) operations, unless the tree - * was involved in a split operation, then it may take O(n) time.] + * Get the size of the tree. [takes \cgalBigO{1} operations, unless the tree + * was involved in a split operation, then it may take \cgalBigO{n} time.] * \return The number of objects stored in the tree. */ size_t size () const; @@ -726,14 +725,14 @@ class Multiset /// \name Insertion functions. /*! - * Insert an object into the tree. [takes O(log n) operations] + * Insert an object into the tree. [takes \cgalBigO{log n} operations] * \param object The object to be inserted. * \return An iterator pointing to the inserted object. */ iterator insert (const Type& object); /*! - * Insert a range of k objects into the tree. [takes O(k log n) operations] + * Insert a range of k objects into the tree. [takes \cgalBigO{k log n} operations] * \param first An iterator for the first object in the range. * \param last A past-the-end iterator for the range. */ @@ -752,7 +751,7 @@ class Multiset /*! * Insert an object to the tree, with a given hint to its position. - * [takes O(log n) operations at worst-case, but only O(1) amortized] + * [takes \cgalBigO{log n} operations at worst-case, but only \cgalBigO{1} amortized] * \param position A hint for the position of the object. * \param object The object to be inserted. * \return An iterator pointing to the inserted object. @@ -762,7 +761,7 @@ class Multiset /*! * Insert an object to the tree, as the successor the given object. - * [takes O(log n) operations at worst-case, but only O(1) amortized] + * [takes \cgalBigO{log n} operations at worst-case, but only \cgalBigO{1} amortized] * \param position Points to the object after which the new object should * be inserted (or an invalid iterator to insert the object * as the tree minimum). @@ -775,7 +774,7 @@ class Multiset /*! * Insert an object to the tree, as the predecessor the given object. - * [takes O(log n) operations at worst-case, but only O(1) amortized] + * [takes \cgalBigO{log n} operations at worst-case, but only \cgalBigO{1} amortized] * \param position Points to the object before which the new object should * be inserted (or an invalid iterator to insert the object * as the tree maximum). @@ -790,7 +789,7 @@ class Multiset //@{ /*! - * Erase objects from the tree. [takes O(log n) operations] + * Erase objects from the tree. [takes \cgalBigO{log n} operations] * \param object The object to be removed. * \return The number of objects removed from the tree. * Note that all iterators to the erased objects become invalid. @@ -799,7 +798,7 @@ class Multiset /*! * Remove the object pointed by the given iterator. - * [takes O(log n) operations at worst-case, but only O(1) amortized] + * [takes \cgalBigO{log n} operations at worst-case, but only \cgalBigO{1} amortized] * \param position An iterator pointing the object to be erased. * \pre The iterator must be a valid. * Note that all iterators to the erased object become invalid. @@ -807,7 +806,7 @@ class Multiset void erase (iterator position); /*! - * Clear the contents of the tree. [takes O(n) operations] + * Clear the contents of the tree. [takes \cgalBigO{n} operations] */ void clear (); @@ -818,7 +817,7 @@ class Multiset /*! * Search the tree for the given key (non-const version). - * [takes O(log n) operations] + * [takes \cgalBigO{log n} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return A iterator pointing to the first equivalent object in the tree, @@ -844,7 +843,7 @@ class Multiset /*! * Search the tree for the given key (const version). - * [takes O(log n) operations] + * [takes \cgalBigO{log n} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return A iterator pointing to the first equivalent object in the tree, @@ -870,7 +869,7 @@ class Multiset /*! * Count the number of object in the tree equivalent to a given key. - * [takes O(log n + d) operations] + * [takes \cgalBigO{log n + d} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return The number of equivalent objects. @@ -906,7 +905,7 @@ class Multiset /*! * Get the first element whose key is not less than a given key - * (non-const version). [takes O(log n) operations] + * (non-const version). [takes \cgalBigO{log n} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return The lower bound of the key, or end() if the key is not found @@ -932,7 +931,7 @@ class Multiset /*! * Get the first element whose key is not less than a given key - * (non-const version). [takes O(log n) operations] + * (non-const version). [takes \cgalBigO{log n} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return The lower bound of the key, along with a flag indicating whether @@ -958,7 +957,7 @@ class Multiset /*! * Get the first element whose key is greater than a given key - * (non-const version). [takes O(log n) operations] + * (non-const version). [takes \cgalBigO{log n} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return The upper bound of the key, or end() if the key is not found @@ -984,7 +983,7 @@ class Multiset /*! * Get the first element whose key is not less than a given key - * (const version). [takes O(log n) operations] + * (const version). [takes \cgalBigO{log n} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return The lower bound of the key, or end() if the key is not found @@ -1010,7 +1009,7 @@ class Multiset /*! * Get the first element whose key is not less than a given key - * (const version). [takes O(log n) operations] + * (const version). [takes \cgalBigO{log n} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return The lower bound of the key, along with a flag indicating whether @@ -1036,7 +1035,7 @@ class Multiset /*! * Get the first element whose key is greater than a given key - * (const version). [takes O(log n) operations] + * (const version). [takes \cgalBigO{log n} operations] * \param object The query object. * \return The upper bound of the key, or end() if the key is not found * in the tree. @@ -1061,7 +1060,7 @@ class Multiset /*! * Get the range of objects in the tree that are equivalent to a given key - * (non-const version). [takes O(log n + d) operations] + * (non-const version). [takes \cgalBigO{log n + d} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return A pair of (lower_bound(key), upper_bound(key)). @@ -1109,7 +1108,7 @@ class Multiset /*! * Get the range of objects in the tree that are equivalent to a given key - * (const version). [takes O(log n + d) operations] + * (const version). [takes \cgalBigO{log n + d} operations] * \param key The query key. * \param comp_key A comparison functor for comparing keys and objects. * \return A pair of (lower_bound(key), upper_bound(key)). @@ -1164,7 +1163,7 @@ class Multiset /*! * Replace the object pointed by a given iterator with another object. - * [takes O(1) operations] + * [takes \cgalBigO{1} operations] * \param position An iterator pointing the object to be replaced. * \param object The new object. * \pre The given iterator is valid. @@ -1175,7 +1174,7 @@ class Multiset /*! * Swap the location two objects in the tree, given by their positions. - * [takes O(1) operations] + * [takes \cgalBigO{1} operations] * \param pos1 An iterator pointing to the first object. * \param pos1 An iterator pointing to the second object. * \pre The two iterators are valid. @@ -1185,7 +1184,7 @@ class Multiset /*! * Catenate the tree with a given tree, whose minimal object is not less - * than the maximal object of this tree. [takes O(log n) operations] + * than the maximal object of this tree. [takes \cgalBigO{log n} operations] * The function clears the other given tree, but all its iterators remain * valid and can be used with the catenated tree. * \param tree The tree to catenate to out tree. @@ -1197,7 +1196,7 @@ class Multiset /*! * Split the tree such that all remaining objects are less than a given * key, and all objects greater than (or equal to) this key form - * a new output tree. [takes O(log n) operations] + * a new output tree. [takes \cgalBigO{log n} operations] * \param key The split key. * \param comp_key A comparison functor for comparing keys and objects. * \param tree Output: The tree that will eventually contain all objects @@ -1221,7 +1220,7 @@ class Multiset /*! * Split the tree at a given position, such that it contains all objects * in the range [begin, position) and all objects in the range - * [position, end) form a new output tree. [takes O(log n) operations] + * [position, end) form a new output tree. [takes \cgalBigO{log n} operations] * \param position An iterator pointing at the split position. * \param tree Output: The output tree. * \pre The output tree is initially empty. @@ -1241,13 +1240,13 @@ class Multiset bool is_valid() const; /*! - * Get the height of the tree. [takes O(n) operations] + * Get the height of the tree. [takes \cgalBigO{n} operations] * \return The length of the longest path from the root to a leaf node. */ size_t height () const; /*! - * Get the black-height of the tree. [takes O(1) operations] + * Get the black-height of the tree. [takes \cgalBigO{1} operations] * \return The number of black nodes from the root to each leaf node. */ inline size_t black_height () const @@ -1276,7 +1275,7 @@ class Multiset /*! Check whether a node is black. */ inline bool _is_black (const Node *nodeP) const { - // Note that invalid nodes are considered ro be black as well. + // Note that invalid nodes are considered to be black as well. return (nodeP == nullptr || nodeP->color != Node::RED); } //@} @@ -1956,7 +1955,7 @@ Multiset::insert (iterator positi { Node *nodeP = position.nodeP; - CGAL_multiset_precondition (_is_valid (nodeP)); + CGAL_precondition (_is_valid (nodeP)); // Compare the object to the one stored at the given node in order to decide // in which direction to proceed. @@ -1980,7 +1979,7 @@ Multiset::insert (iterator positi if (k > max_steps) { // In case the given position is too far away (more than log(n) steps) - // from the true poisition of the object, break the loop. + // from the true position of the object, break the loop. found_pos = false; break; } @@ -2004,7 +2003,7 @@ Multiset::insert (iterator positi if (k > max_steps) { // In case the given position is too far away (more than log(n) steps) - // from the true poisition of the object, break the loop. + // from the true position of the object, break the loop. found_pos = false; break; } @@ -2033,7 +2032,7 @@ Multiset::insert_after (iterator Node *nodeP = position.nodeP; // In case we are given a nullptr node, object should be the tree minimum. - CGAL_multiset_assertion (nodeP != &endNode); + CGAL_assertion (nodeP != &endNode); if (nodeP == &beginNode) nodeP = nullptr; @@ -2042,7 +2041,7 @@ Multiset::insert_after (iterator { // In case the tree is empty, make sure that we did not receive a valid // iterator. - CGAL_multiset_precondition (nodeP == nullptr); + CGAL_precondition (nodeP == nullptr); // Assign a new root node. Notice that the root is always black. rootP = _allocate_node (object, Node::BLACK); @@ -2070,7 +2069,7 @@ Multiset::insert_after (iterator // child of the current minimal leaf. parentP = beginNode.parentP; - CGAL_multiset_precondition (comp_f(object, parentP->object) != LARGER); + CGAL_precondition (comp_f(object, parentP->object) != LARGER); parentP->leftP = newNodeP; @@ -2081,9 +2080,9 @@ Multiset::insert_after (iterator else { // Make sure the insertion does not violate the tree order. - CGAL_multiset_precondition_code (Node *_succP = nodeP->successor()); - CGAL_multiset_precondition (comp_f(object, nodeP->object) != SMALLER); - CGAL_multiset_precondition (! _succP->is_valid() || + CGAL_precondition_code (Node *_succP = nodeP->successor()); + CGAL_precondition (comp_f(object, nodeP->object) != SMALLER); + CGAL_precondition (! _succP->is_valid() || comp_f(object, _succP->object) != LARGER); // In case given node has no right child, place the new node as its @@ -2131,7 +2130,7 @@ Multiset::insert_before (iterator Node *nodeP = position.nodeP; // In case we are given a nullptr node, object should be the tree maximum. - CGAL_multiset_assertion (nodeP != &beginNode); + CGAL_assertion (nodeP != &beginNode); if (nodeP == &endNode) nodeP = nullptr; @@ -2140,7 +2139,7 @@ Multiset::insert_before (iterator { // In case the tree is empty, make sure that we did not receive a valid // iterator. - CGAL_multiset_precondition (nodeP == nullptr); + CGAL_precondition (nodeP == nullptr); // Assign a new root node. Notice that the root is always black. rootP = _allocate_node(object, Node::BLACK); @@ -2168,7 +2167,7 @@ Multiset::insert_before (iterator // child of the current maximal leaf. parentP = endNode.parentP; - CGAL_multiset_precondition (comp_f(object, parentP->object) != SMALLER); + CGAL_precondition (comp_f(object, parentP->object) != SMALLER); parentP->rightP = newNodeP; @@ -2179,9 +2178,9 @@ Multiset::insert_before (iterator else { // Make sure the insertion does not violate the tree order. - CGAL_multiset_precondition_code (Node *_predP = nodeP->predecessor()); - CGAL_multiset_precondition (comp_f(object, nodeP->object) != LARGER); - CGAL_multiset_precondition (! _predP->is_valid() || + CGAL_precondition_code (Node *_predP = nodeP->predecessor()); + CGAL_precondition (comp_f(object, nodeP->object) != LARGER); + CGAL_precondition (! _predP->is_valid() || comp_f(object, _predP->object) != SMALLER); // In case given node has no left child, place the new node as its @@ -2258,7 +2257,7 @@ void Multiset::erase (iterator po { Node *nodeP = position.nodeP; - CGAL_multiset_precondition (_is_valid (nodeP)); + CGAL_precondition (_is_valid (nodeP)); _remove_at (nodeP); return; @@ -2294,16 +2293,16 @@ void Multiset::replace (iterator { Node *nodeP = position.nodeP; - CGAL_multiset_precondition (_is_valid (nodeP)); + CGAL_precondition (_is_valid (nodeP)); // Make sure the replacement does not violate the tree order. - CGAL_multiset_precondition_code (Node *_succP = nodeP->successor()); - CGAL_multiset_precondition (_succP == nullptr || + CGAL_precondition_code (Node *_succP = nodeP->successor()); + CGAL_precondition (_succP == nullptr || _succP->color == Node::DUMMY_END || comp_f(object, _succP->object) != LARGER); - CGAL_multiset_precondition_code (Node *_predP = nodeP->predecessor()); - CGAL_multiset_precondition (_predP == nullptr || + CGAL_precondition_code (Node *_predP = nodeP->predecessor()); + CGAL_precondition (_predP == nullptr || _predP->color == Node::DUMMY_BEGIN || comp_f(object, _predP->object) != SMALLER); @@ -2323,30 +2322,30 @@ void Multiset::swap (iterator pos Node *node1_P = pos1.nodeP; Node *node2_P = pos2.nodeP; - CGAL_multiset_precondition (_is_valid (node1_P)); - CGAL_multiset_precondition (_is_valid (node2_P)); + CGAL_precondition (_is_valid (node1_P)); + CGAL_precondition (_is_valid (node2_P)); if (node1_P == node2_P) return; // Make sure the swap does not violate the tree order. - CGAL_multiset_precondition_code (Node *_succ1_P = node1_P->successor()); - CGAL_multiset_precondition (! _is_valid (_succ1_P) || + CGAL_precondition_code (Node *_succ1_P = node1_P->successor()); + CGAL_precondition (! _is_valid (_succ1_P) || comp_f (node2_P->object, _succ1_P->object) != LARGER); - CGAL_multiset_precondition_code (Node *_pred1_P = node1_P->predecessor()); - CGAL_multiset_precondition (! _is_valid (_pred1_P) || + CGAL_precondition_code (Node *_pred1_P = node1_P->predecessor()); + CGAL_precondition (! _is_valid (_pred1_P) || comp_f (node2_P->object, _pred1_P->object) != SMALLER); - CGAL_multiset_precondition_code (Node *_succ2_P = node2_P->successor()); - CGAL_multiset_precondition (! _is_valid (_succ2_P) || + CGAL_precondition_code (Node *_succ2_P = node2_P->successor()); + CGAL_precondition (! _is_valid (_succ2_P) || comp_f (node1_P->object, _succ2_P->object) != LARGER); - CGAL_multiset_precondition_code (Node *_pred2_P = node2_P->predecessor()); - CGAL_multiset_precondition (! _is_valid (_pred2_P) || + CGAL_precondition_code (Node *_pred2_P = node2_P->predecessor()); + CGAL_precondition (! _is_valid (_pred2_P) || comp_f (node1_P->object, _pred2_P->object) != SMALLER); @@ -2438,13 +2437,13 @@ void Multiset::catenate (Self& tr if (min2_P == nullptr) { // The other tree is empty - nothing to do. - CGAL_multiset_assertion (tree.rootP == nullptr); + CGAL_assertion (tree.rootP == nullptr); return; } else if (max1_P == nullptr) { // Our tree is empty: Copy all other tree properties to our tree. - CGAL_multiset_assertion (rootP == nullptr); + CGAL_assertion (rootP == nullptr); _shallow_assign (tree); return; @@ -2452,19 +2451,19 @@ void Multiset::catenate (Self& tr // Make sure that the minimal object in the other tree is not less than the // maximal object in our tree. - CGAL_multiset_precondition (comp_f (max1_P->object, + CGAL_precondition (comp_f (max1_P->object, min2_P->object) != LARGER); // Make sure both tree roots black. - CGAL_multiset_assertion (_is_black (rootP)); - CGAL_multiset_assertion (_is_black (tree.rootP)); + CGAL_assertion (_is_black (rootP)); + CGAL_assertion (_is_black (tree.rootP)); // Splice max1_P (or min2_P) from its tree, but without deleting it. Node* auxP = nullptr; if (max1_P != rootP) { - // Splice max1_P from its current poisition in our tree. + // Splice max1_P from its current position in our tree. // We know it is has no right child, so we just have to connect its // left child with its parent. max1_P->parentP->rightP = max1_P->leftP; @@ -2480,7 +2479,7 @@ void Multiset::catenate (Self& tr } else if (min2_P != tree.rootP) { - // Splice min2_P from its current poisition in the other tree. + // Splice min2_P from its current position in the other tree. // We know it is has no left child, so we just have to connect its // right child with its parent. if (min2_P->parentP != nullptr) @@ -2561,7 +2560,7 @@ void Multiset::catenate (Self& tr if (_is_red (node2_P)) node2_P = node2_P->leftP; - CGAL_multiset_assertion (_is_valid (node2_P)); + CGAL_assertion (_is_valid (node2_P)); } else { @@ -2578,7 +2577,7 @@ void Multiset::catenate (Self& tr if (_is_red (node1_P)) node1_P = node1_P->rightP; - CGAL_multiset_assertion (_is_valid (node2_P)); + CGAL_assertion (_is_valid (node2_P)); } // Check which one of the tree roots have we reached. @@ -2615,7 +2614,7 @@ void Multiset::catenate (Self& tr // moving auxP to be their parent. parentP = node1_P->parentP; - CGAL_multiset_assertion (parentP != nullptr); + CGAL_assertion (parentP != nullptr); // The catenated tree will be rooted at the current root of our tree. newRootP = rootP; @@ -2670,7 +2669,7 @@ template ::split (iterator position, Self& tree) { - CGAL_multiset_precondition (tree.empty()); + CGAL_precondition (tree.empty()); // Check the extremal cases. if (position == begin()) @@ -2691,7 +2690,7 @@ void Multiset::split (iterator po // is at most twice the black-height of the tree. Node *nodeP = position.nodeP; - CGAL_multiset_precondition (_is_valid (nodeP)); + CGAL_precondition (_is_valid (nodeP)); Node *currP = nodeP; Comparison_result *path = new Comparison_result [2 * iBlackHeight]; @@ -2708,7 +2707,7 @@ void Multiset::split (iterator po currP = currP->parentP; } - CGAL_multiset_assertion (currP == rootP); + CGAL_assertion (currP == rootP); // Now go down the path and split the tree accordingly. We also keep // track of the black-height of the current node. @@ -2726,7 +2725,7 @@ void Multiset::split (iterator po while (depth >= 0) { - CGAL_multiset_assertion (_is_valid (currP)); + CGAL_assertion (_is_valid (currP)); // If we encounter a black node, the black-height of both its left and // right subtrees is decremented. @@ -2750,7 +2749,7 @@ void Multiset::split (iterator po if (_is_valid (childP) && rightTree.rootP == nullptr) { - // Assing T_r to rightTree. + // Assign T_r to rightTree. rightTree.rootP = childP; rightTree.iBlackHeight = iCurrBHeight; @@ -2770,8 +2769,8 @@ void Multiset::split (iterator po else if (_is_valid (childP)) { // Catenate T_r with the current rightTree. - CGAL_multiset_assertion (_is_valid (spineRightP) && - _is_valid(auxRightP)); + CGAL_assertion (_is_valid (spineRightP) && + _is_valid(auxRightP)); // Make sure the root of T_r is black. size_t iCurrRightBHeight = iCurrBHeight; @@ -2784,7 +2783,7 @@ void Multiset::split (iterator po // Go down the leftmost path of rightTree until locating a black // node whose black height is exactly iCurrRightBHeight. - CGAL_multiset_assertion (iRightBHeight >= iCurrRightBHeight); + CGAL_assertion (iRightBHeight >= iCurrRightBHeight); while (iRightBHeight > iCurrRightBHeight) { @@ -2795,7 +2794,7 @@ void Multiset::split (iterator po if (_is_red (spineRightP)) spineRightP = spineRightP->leftP; - CGAL_multiset_assertion (_is_valid (spineRightP)); + CGAL_assertion (_is_valid (spineRightP)); // Use the auxiliary node and make it the parent of T_r (which // becomes its left sub-tree) and spineRightP (which becomes its @@ -2885,7 +2884,7 @@ void Multiset::split (iterator po if (_is_valid (childP) && leftTree.rootP == nullptr) { - // Assing T_l to leftTree. + // Assign T_l to leftTree. leftTree.rootP = childP; leftTree.iBlackHeight = iCurrBHeight; @@ -2905,8 +2904,8 @@ void Multiset::split (iterator po else if (_is_valid (childP)) { // Catenate T_l with the current leftTree. - CGAL_multiset_assertion (_is_valid (spineLeftP) && - _is_valid(auxLeftP)); + CGAL_assertion (_is_valid (spineLeftP) && + _is_valid(auxLeftP)); // Make sure the root of T_l is black. size_t iCurrLeftBHeight = iCurrBHeight; @@ -2919,7 +2918,7 @@ void Multiset::split (iterator po // Go down the rightmost path of leftTree until locating a black // node whose black height is exactly iCurrLeftBHeight. - CGAL_multiset_assertion (iLeftBHeight >= iCurrLeftBHeight); + CGAL_assertion (iLeftBHeight >= iCurrLeftBHeight); while (iLeftBHeight > iCurrLeftBHeight) { @@ -2930,7 +2929,7 @@ void Multiset::split (iterator po if (_is_red (spineLeftP)) spineLeftP = spineLeftP->rightP; - CGAL_multiset_assertion (_is_valid (spineLeftP)); + CGAL_assertion (_is_valid (spineLeftP)); // Use the auxiliary node and make it the parent of T_l (which // becomes its right sub-tree) and spineLeftP (which becomes its @@ -3012,7 +3011,7 @@ void Multiset::split (iterator po // It is now possible to free the path. delete[] path; - CGAL_multiset_assertion (auxLeftP == nullptr && auxRightP == nodeP); + CGAL_assertion (auxLeftP == nullptr && auxRightP == nodeP); // Fix the properties of the left tree: We know its minimal node is the // same as the current minimum. @@ -3020,7 +3019,7 @@ void Multiset::split (iterator po leftTree.beginNode.parentP->leftP = &(leftTree.beginNode); // Traverse the rightmost path of the left tree to find the its maximum. - CGAL_multiset_assertion (_is_valid (spineLeftP)); + CGAL_assertion (_is_valid (spineLeftP)); while (_is_valid (spineLeftP->rightP)) spineLeftP = spineLeftP->rightP; @@ -3130,7 +3129,7 @@ void Multiset::_shallow_clear () template void Multiset::_remove_at (Node* nodeP) { - CGAL_multiset_precondition (_is_valid (nodeP)); + CGAL_precondition (_is_valid (nodeP)); if (nodeP == rootP && ! _is_valid (rootP->leftP) && ! _is_valid (rootP->rightP)) @@ -3155,11 +3154,11 @@ void Multiset::_remove_at (Node* // which is the leftmost child in its right sub-tree and has at most // one child (it may have a right child). Node *succP = _sub_minimum (nodeP->rightP); - CGAL_multiset_assertion (_is_valid (succP)); + CGAL_assertion (_is_valid (succP)); // Now physically swap nodeP and its successor. Notice this may temporarily // violate the tree properties, but we are going to remove nodeP anyway. - // This way we have moved nodeP to a position were it is more convinient + // This way we have moved nodeP to a position were it is more convenient // to delete it. _swap (nodeP, succP); } @@ -3169,7 +3168,7 @@ void Multiset::_remove_at (Node* if (_is_valid (nodeP->leftP)) { - CGAL_multiset_assertion (! _is_valid (nodeP->rightP)); + CGAL_assertion (! _is_valid (nodeP->rightP)); childP = nodeP->leftP; } else @@ -3247,8 +3246,8 @@ template ::_swap (Node* node1_P, Node* node2_P) { - CGAL_multiset_assertion (_is_valid (node1_P)); - CGAL_multiset_assertion (_is_valid (node2_P)); + CGAL_assertion (_is_valid (node1_P)); + CGAL_assertion (_is_valid (node2_P)); // Store the properties of the first node. typename Node::Node_color color1 = node1_P->color; @@ -3388,8 +3387,8 @@ template ::_swap_siblings (Node* node1_P, Node* node2_P) { - CGAL_multiset_assertion (_is_valid (node1_P)); - CGAL_multiset_assertion (_is_valid (node2_P)); + CGAL_assertion (_is_valid (node1_P)); + CGAL_assertion (_is_valid (node2_P)); // Store the properties of the first node. typename Node::Node_color color1 = node1_P->color; @@ -3422,7 +3421,7 @@ void Multiset::_swap_siblings (No Node *parent_P = node1_P->parentP; Node *temp; - CGAL_multiset_assertion (parent_P == node2_P->parentP); + CGAL_assertion (parent_P == node2_P->parentP); temp = parent_P->leftP; parent_P->leftP = parent_P->rightP; @@ -3464,7 +3463,7 @@ template ::_sub_height (const Node* nodeP) const { - CGAL_multiset_assertion (_is_valid (nodeP)); + CGAL_assertion (_is_valid (nodeP)); // Recursively calculate the heights of the left and right sub-trees. size_t iRightHeight = 0; @@ -3552,7 +3551,7 @@ template ::Node* Multiset::_sub_minimum (Node* nodeP) const { - CGAL_multiset_assertion (_is_valid (nodeP)); + CGAL_assertion (_is_valid (nodeP)); Node *minP = nodeP; @@ -3568,7 +3567,7 @@ template ::Node* Multiset::_sub_maximum (Node* nodeP) const { - CGAL_multiset_assertion (_is_valid (nodeP)); + CGAL_assertion (_is_valid (nodeP)); Node *maxP = nodeP; @@ -3593,7 +3592,7 @@ void Multiset::_rotate_left (Node // Get the right child of the node. Node *yNodeP = xNodeP->rightP; - CGAL_multiset_assertion (_is_valid (yNodeP)); + CGAL_assertion (_is_valid (yNodeP)); // Change its left subtree (T2) to x's right subtree. xNodeP->rightP = yNodeP->leftP; @@ -3639,7 +3638,7 @@ void Multiset::_rotate_right (Nod // Get the left child of the node. Node *xNodeP = yNodeP->leftP; - CGAL_multiset_assertion (_is_valid (xNodeP)); + CGAL_assertion (_is_valid (xNodeP)); // Change its right subtree (T2) to y's left subtree. yNodeP->leftP = xNodeP->rightP; @@ -3683,7 +3682,7 @@ template ::Node* Multiset::_duplicate (const Node* nodeP) { - CGAL_multiset_assertion (_is_valid (nodeP)); + CGAL_assertion (_is_valid (nodeP)); // Create a node of the same color, containing the same object. Node *dupNodeP = _allocate_node(nodeP->object, nodeP->color); @@ -3711,7 +3710,7 @@ Multiset::_duplicate (const Node* template void Multiset::_destroy (Node* nodeP) { - CGAL_multiset_assertion (_is_valid (nodeP)); + CGAL_assertion (_is_valid (nodeP)); // Destroy the children recursively. if (_is_valid (nodeP->rightP)) @@ -3734,9 +3733,9 @@ void Multiset::_destroy (Node* no template void Multiset::_insert_fixup (Node* nodeP) { - CGAL_multiset_precondition (_is_red (nodeP)); + CGAL_precondition (_is_red (nodeP)); - // Fix the red-black propreties: we may have inserted a red leaf as the + // Fix the red-black properties: we may have inserted a red leaf as the // child of a red parent - so we have to fix the coloring of the parent // recursively. Node *currP = nodeP; @@ -3748,7 +3747,7 @@ void Multiset::_insert_fixup (Nod // Get a pointer to the current node's grandparent (notice the root is // always black, so the red parent must have a parent). grandparentP = currP->parentP->parentP; - CGAL_multiset_precondition (grandparentP != nullptr); + CGAL_precondition (grandparentP != nullptr); if (currP->parentP == grandparentP->leftP) { @@ -3781,7 +3780,7 @@ void Multiset::_insert_fixup (Nod // Color the parent black and the grandparent red. currP->parentP->color = Node::BLACK; - CGAL_multiset_assertion (grandparentP == currP->parentP->parentP); + CGAL_assertion (grandparentP == currP->parentP->parentP); grandparentP->color = Node::RED; // Right-rotate the grandparent's sub-tree @@ -3819,7 +3818,7 @@ void Multiset::_insert_fixup (Nod // Color the parent black and the grandparent red. currP->parentP->color = Node::BLACK; - CGAL_multiset_assertion(grandparentP == currP->parentP->parentP); + CGAL_assertion(grandparentP == currP->parentP->parentP); grandparentP->color = Node::RED; // Left-rotate the grandparent's sub-tree @@ -3873,7 +3872,7 @@ void Multiset::_remove_fixup (Nod siblingP = currParentP->rightP; } - CGAL_multiset_assertion (_is_valid (siblingP)); + CGAL_assertion (_is_valid (siblingP)); if (_is_black (siblingP->leftP) && _is_black (siblingP->rightP)) { @@ -3889,14 +3888,14 @@ void Multiset::_remove_fixup (Nod // the black height of the entire tree. if (currP == rootP) { - CGAL_multiset_assertion (currParentP == nullptr); + CGAL_assertion (currParentP == nullptr); iBlackHeight--; } } else { // In this case, at least one of the sibling's children is red. - // It is therfore obvious that the sibling itself is black. + // It is therefore obvious that the sibling itself is black. if (_is_black (siblingP->rightP)) { // The left child is red: Color it black, and color the sibling red. @@ -3938,7 +3937,7 @@ void Multiset::_remove_fixup (Nod siblingP = currParentP->leftP; } - CGAL_multiset_assertion (_is_valid (siblingP)); + CGAL_assertion (_is_valid (siblingP)); if (_is_black (siblingP->leftP) && _is_black (siblingP->rightP)) { @@ -3954,14 +3953,14 @@ void Multiset::_remove_fixup (Nod // the black height of the entire tree. if (currP == rootP) { - CGAL_multiset_assertion (currParentP == nullptr); + CGAL_assertion (currParentP == nullptr); iBlackHeight--; } } else { // In this case, at least one of the sibling's children is red. - // It is therfore obvious that the sibling itself is black. + // It is therefore obvious that the sibling itself is black. if (_is_black (siblingP->leftP)) { // The right child is red: Color it black, and color the sibling red. @@ -4011,8 +4010,8 @@ Multiset::_allocate_node (const Type& object, typename Node::Node_color color) { - CGAL_multiset_assertion (color != Node::DUMMY_BEGIN && - color != Node::DUMMY_END); + CGAL_assertion (color != Node::DUMMY_BEGIN && + color != Node::DUMMY_END); Node* new_node = node_alloc.allocate(beginNode); new_node->init(object, color); diff --git a/thirdparty/CGAL/include/CGAL/NT_converter.h b/thirdparty/CGAL/include/CGAL/NT_converter.h index 4575dc89..a1251b51 100644 --- a/thirdparty/CGAL/include/CGAL/NT_converter.h +++ b/thirdparty/CGAL/include/CGAL/NT_converter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/NT_converter.h $ -// $Id: NT_converter.h cd92000 2022-01-10T15:40:04+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/NT_converter.h $ +// $Id: include/CGAL/NT_converter.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/N_step_adaptor.h b/thirdparty/CGAL/include/CGAL/N_step_adaptor.h index 8f57b032..26a25ba3 100644 --- a/thirdparty/CGAL/include/CGAL/N_step_adaptor.h +++ b/thirdparty/CGAL/include/CGAL/N_step_adaptor.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/N_step_adaptor.h $ -// $Id: N_step_adaptor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/N_step_adaptor.h $ +// $Id: include/CGAL/N_step_adaptor.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/N_step_adaptor_derived.h b/thirdparty/CGAL/include/CGAL/N_step_adaptor_derived.h index 3b051579..f974b596 100644 --- a/thirdparty/CGAL/include/CGAL/N_step_adaptor_derived.h +++ b/thirdparty/CGAL/include/CGAL/N_step_adaptor_derived.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/N_step_adaptor_derived.h $ -// $Id: N_step_adaptor_derived.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/N_step_adaptor_derived.h $ +// $Id: include/CGAL/N_step_adaptor_derived.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Named_function_parameters.h b/thirdparty/CGAL/include/CGAL/Named_function_parameters.h index f6f3c185..2ab75b13 100644 --- a/thirdparty/CGAL/include/CGAL/Named_function_parameters.h +++ b/thirdparty/CGAL/include/CGAL/Named_function_parameters.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Named_function_parameters.h $ -// $Id: Named_function_parameters.h 477353d 2022-04-20T15:55:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Named_function_parameters.h $ +// $Id: include/CGAL/Named_function_parameters.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,15 +17,17 @@ #endif #include +#include -#include -#include +#include #include #include #define CGAL_NP_TEMPLATE_PARAMETERS NP_T=bool, typename NP_Tag=CGAL::internal_np::all_default_t, typename NP_Base=CGAL::internal_np::No_property #define CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT NP_T, typename NP_Tag, typename NP_Base +#define CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_1 NP_T1, typename NP_Tag1, typename NP_Base1 +#define CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_2 NP_T2, typename NP_Tag2, typename NP_Base2 #define CGAL_NP_CLASS CGAL::Named_function_parameters #define CGAL_NP_TEMPLATE_PARAMETERS_1 NP_T1=bool, typename NP_Tag1=CGAL::internal_np::all_default_t, typename NP_Base1=CGAL::internal_np::No_property @@ -33,6 +35,8 @@ #define CGAL_NP_TEMPLATE_PARAMETERS_2 NP_T2=bool, typename NP_Tag2=CGAL::internal_np::all_default_t, typename NP_Base2=CGAL::internal_np::No_property #define CGAL_NP_CLASS_2 CGAL::Named_function_parameters +#define CGAL_NP_TEMPLATE_PARAMETERS_VARIADIC NP_T, typename ... NP_Tag, typename ... NP_Base + namespace CGAL { namespace internal_np{ @@ -44,8 +48,19 @@ enum all_default_t { all_default }; // define enum types and values for new named parameters #define CGAL_add_named_parameter(X, Y, Z) \ enum X { Y }; +#define CGAL_add_named_parameter_with_compatibility(X, Y, Z) \ + enum X { Y }; +#define CGAL_add_named_parameter_with_compatibility_cref_only(X, Y, Z) \ + enum X { Y }; +#define CGAL_add_named_parameter_with_compatibility_ref_only(X, Y, Z) \ + enum X { Y }; +#define CGAL_add_extra_named_parameter_with_compatibility(X, Y, Z) #include #undef CGAL_add_named_parameter +#undef CGAL_add_named_parameter_with_compatibility +#undef CGAL_add_named_parameter_with_compatibility_cref_only +#undef CGAL_add_named_parameter_with_compatibility_ref_only +#undef CGAL_add_extra_named_parameter_with_compatibility template struct Named_params_impl : Base @@ -127,14 +142,14 @@ struct Lookup_named_param_def typedef typename internal_np::Get_param::type NP_type; typedef typename internal_np::Get_param::reference NP_reference; - typedef typename boost::mpl::if_< - boost::is_same, - D, NP_type>::type + typedef std::conditional_t< + std::is_same_v, + D, NP_type> type; - typedef typename boost::mpl::if_< - boost::is_same, - D&, NP_reference>::type + typedef std::conditional_t< + std::is_same_v, + D&, NP_reference> reference; }; @@ -166,7 +181,7 @@ typename Get_param, Query_tag>::type get_parameter_impl(const Named_params_impl& np, Query_tag tag) { #ifndef CGAL_NO_STATIC_ASSERTION_TEST - CGAL_static_assertion( (!boost::is_same::value) ); + static_assert(!std::is_same::value); #endif return get_parameter_impl(static_cast(np), tag); } @@ -227,76 +242,21 @@ template typename Get_param, Query_tag>::reference get_parameter_reference_impl(const Named_params_impl& np, Query_tag tag) { - CGAL_static_assertion( (!boost::is_same::value) ); + static_assert(!std::is_same::value); return get_parameter_reference_impl(static_cast(np), tag); } - } // end of internal_np namespace - template -struct Named_function_parameters - : internal_np::Named_params_impl -{ - typedef internal_np::Named_params_impl base; - typedef Named_function_parameters self; - - Named_function_parameters() : base(T()) {} - Named_function_parameters(const T& v) : base(v) {} - Named_function_parameters(const T& v, const Base& b) : base(v, b) {} - -// create the functions for new named parameters and the one imported boost -// used to concatenate several parameters -#define CGAL_add_named_parameter(X, Y, Z) \ - template \ - Named_function_parameters \ - Z(const K& k) const \ - { \ - typedef Named_function_parameters Params;\ - return Params(k, *this); \ - } -#include -#undef CGAL_add_named_parameter -}; +struct Named_function_parameters; -namespace parameters { +namespace parameters{ typedef Named_function_parameters Default_named_parameters; -#ifndef CGAL_NO_DEPRECATED_CODE -Default_named_parameters -inline all_default() -{ - return Default_named_parameters(); -} -#endif - Default_named_parameters -inline default_values() -{ - return Default_named_parameters(); -} - -template -Named_function_parameters -inline no_parameters(Named_function_parameters) -{ - typedef Named_function_parameters Params; - return Params(); -} - -// define free functions for named parameters -#define CGAL_add_named_parameter(X, Y, Z) \ - template \ - Named_function_parameters \ - Z(const K& p) \ - { \ - typedef Named_function_parameters Params;\ - return Params(p); \ - } -#include -#undef CGAL_add_named_parameter +inline default_values(); // function to extract a parameter template @@ -359,6 +319,224 @@ const T& choose_parameter(const T& t) return t; } +} // parameters namespace + +namespace internal_np { + +template +auto +combine_named_parameters(const Named_function_parameters& np, const NPS& ... nps) +{ + return np.combine(nps ...); +} + +} // end of internal_np namespace + +template +struct Named_function_parameters + : internal_np::Named_params_impl +{ + typedef internal_np::Named_params_impl base; + typedef Named_function_parameters self; + + Named_function_parameters() : base(T()) {} + Named_function_parameters(const T& v) : base(v) {} + Named_function_parameters(const T& v, const Base& b) : base(v, b) {} + +// create the functions for new named parameters and the one imported boost +// used to concatenate several parameters +#define CGAL_add_named_parameter(X, Y, Z) \ + template \ + Named_function_parameters \ + Z(const K& k) const \ + { \ + typedef Named_function_parameters Params;\ + return Params(k, *this); \ + } +#define CGAL_add_named_parameter_with_compatibility(X, Y, Z) \ + template \ + Named_function_parameters \ + Z(const K& k) const \ + { \ + typedef Named_function_parameters Params;\ + return Params(k, *this); \ + } +#define CGAL_add_named_parameter_with_compatibility_cref_only(X, Y, Z) \ + template \ + Named_function_parameters, \ + internal_np::X, self> \ + Z(const K& k) const \ + { \ + typedef Named_function_parameters,\ + internal_np::X, self> Params; \ + return Params(std::cref(k), *this); \ + } +#define CGAL_add_named_parameter_with_compatibility_ref_only(X, Y, Z) \ + template \ + Named_function_parameters, \ + internal_np::X, self> \ + Z(K& k) const \ + { \ + typedef Named_function_parameters, \ + internal_np::X, self> Params; \ + return Params(std::ref(k), *this); \ + } +#define CGAL_add_extra_named_parameter_with_compatibility(X, Y, Z) \ + template \ + Named_function_parameters \ + Z(const K& k) const \ + { \ + typedef Named_function_parameters Params;\ + return Params(k, *this); \ + } +#include +#undef CGAL_add_named_parameter +#undef CGAL_add_named_parameter_with_compatibility +#undef CGAL_add_named_parameter_with_compatibility_cref_only +#undef CGAL_add_named_parameter_with_compatibility_ref_only +#undef CGAL_add_extra_named_parameter_with_compatibility + +// inject mesh specific named parameter functions +#define CGAL_NP_BASE self +#define CGAL_NP_BUILD(P, V) P(V, *this) + +#include + +#undef CGAL_NP_BASE +#undef CGAL_NP_BUILD + + template + Named_function_parameters + combine(const Named_function_parameters& np) const + { + return Named_function_parameters(np.v,*this); + } + + template + auto + combine(const Named_function_parameters& np, const NPS& ... nps) const + { + return Named_function_parameters(np.v,*this).combine(nps...); + } + + // typedef for SFINAE + typedef int CGAL_Named_function_parameters_class; +}; + +namespace parameters { + +Default_named_parameters +inline default_values() +{ + return Default_named_parameters(); +} + +#ifndef CGAL_NO_DEPRECATED_CODE +Default_named_parameters +inline all_default() +{ + return Default_named_parameters(); +} +#endif + +template +struct Boost_parameter_compatibility_wrapper +{ + template + Named_function_parameters + operator()(const K& p) const + { + typedef Named_function_parameters Params; + return Params(p); + } + + template + Named_function_parameters + operator=(const K& p) const + { + typedef Named_function_parameters Params; + return Params(p); + } +}; + +template +struct Boost_parameter_compatibility_wrapper +{ + template + Named_function_parameters, Tag> + operator()(const K& p) const + { + typedef Named_function_parameters, Tag> Params; + return Params(std::cref(p)); + } + + template + Named_function_parameters, Tag> + operator=(const K& p) const + { + typedef Named_function_parameters, Tag> Params; + return Params(std::cref(p)); + } +}; + +template +struct Boost_parameter_compatibility_wrapper +{ + template + Named_function_parameters, Tag> + operator()(K& p) const + { + typedef Named_function_parameters, Tag> Params; + return Params(std::ref(p)); + } + + template + Named_function_parameters, Tag> + operator=(std::reference_wrapper p) const + { + typedef Named_function_parameters, Tag> Params; + return Params(std::ref(p)); + } +}; + +// define free functions and Boost_parameter_compatibility_wrapper for named parameters +#define CGAL_add_named_parameter(X, Y, Z) \ + template \ + Named_function_parameters \ + Z(const K& p) \ + { \ + typedef Named_function_parameters Params;\ + return Params(p); \ + } + +#define CGAL_add_named_parameter_with_compatibility(X, Y, Z) \ + const Boost_parameter_compatibility_wrapper Z; +#define CGAL_add_named_parameter_with_compatibility_cref_only(X, Y, Z) \ + const Boost_parameter_compatibility_wrapper Z; +#define CGAL_add_named_parameter_with_compatibility_ref_only(X, Y, Z) \ + const Boost_parameter_compatibility_wrapper Z; +#define CGAL_add_extra_named_parameter_with_compatibility(X, Y, Z) \ + const Boost_parameter_compatibility_wrapper Z; +#include +#undef CGAL_add_named_parameter +#undef CGAL_add_extra_named_parameter_with_compatibility +#undef CGAL_add_named_parameter_with_compatibility +#undef CGAL_add_named_parameter_with_compatibility_cref_only +#undef CGAL_add_named_parameter_with_compatibility_ref_only + +// Version with three parameters for dynamic property maps +template +D choose_parameter(const internal_np::Param_not_found&, Dynamic_tag tag, PolygonMesh& pm) +{ + return get(tag, pm); +} + +template +const T& choose_parameter(const T& t, Dynamic_tag, PolygonMesh&) +{ + return t; +} + template struct is_default_parameter { @@ -366,7 +544,7 @@ struct is_default_parameter NamedParameters, internal_np::Param_not_found>::type NP_type; - static const bool value = boost::is_same::value; + static const bool value = std::is_same::value; typedef CGAL::Boolean_tag type; }; @@ -390,9 +568,14 @@ namespace boost template void get_param(CGAL::Named_function_parameters, Tag2) { - CGAL_static_assertion(B && "You must use CGAL::parameters::get_parameter instead of boost::get_param"); + static_assert(B && "You must use CGAL::parameters::get_parameter instead of boost::get_param"); } } #endif +// For disambiguation using SFINAE +BOOST_MPL_HAS_XXX_TRAIT_DEF(CGAL_Named_function_parameters_class) +template +inline constexpr bool is_named_function_parameter = has_CGAL_Named_function_parameters_class::value; + #endif // CGAL_BOOST_FUNCTION_PARAMS_HPP diff --git a/thirdparty/CGAL/include/CGAL/Needs_parens_as_product.h b/thirdparty/CGAL/include/CGAL/Needs_parens_as_product.h index 015a2324..b1e6fd54 100644 --- a/thirdparty/CGAL/include/CGAL/Needs_parens_as_product.h +++ b/thirdparty/CGAL/include/CGAL/Needs_parens_as_product.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_foundations/include/CGAL/Needs_parens_as_product.h $ -// $Id: Needs_parens_as_product.h a88a84b 2021-08-13T15:46:50+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_foundations/include/CGAL/Needs_parens_as_product.h $ +// $Id: include/CGAL/Needs_parens_as_product.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -28,7 +28,7 @@ class Parens_as_product_tag {}; /*! \ingroup NiX_io_parens * \brief decides whether this number requires parentheses - * in case it appears within a produkt. + * in case it appears within a product. */ template struct Needs_parens_as_product{ @@ -37,7 +37,7 @@ struct Needs_parens_as_product{ /*! \ingroup NiX_io_parens * \brief decides whether this number requires parentheses - * in case it appears within a produkt. + * in case it appears within a product. */ template inline bool needs_parens_as_product(const NT& x){ diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/Bounding_box_2.h b/thirdparty/CGAL/include/CGAL/Nef_2/Bounding_box_2.h index 5d8b89ae..d758cf5c 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/Bounding_box_2.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/Bounding_box_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/Bounding_box_2.h $ -// $Id: Bounding_box_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/Bounding_box_2.h $ +// $Id: include/CGAL/Nef_2/Bounding_box_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/Constrained_triang_traits.h b/thirdparty/CGAL/include/CGAL/Nef_2/Constrained_triang_traits.h index eb50fe7a..051763b3 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/Constrained_triang_traits.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/Constrained_triang_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/Constrained_triang_traits.h $ -// $Id: Constrained_triang_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/Constrained_triang_traits.h $ +// $Id: include/CGAL/Nef_2/Constrained_triang_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/HDS_items.h b/thirdparty/CGAL/include/CGAL/Nef_2/HDS_items.h index a6212136..6937d4c4 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/HDS_items.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/HDS_items.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/HDS_items.h $ -// $Id: HDS_items.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/HDS_items.h $ +// $Id: include/CGAL/Nef_2/HDS_items.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,10 +19,10 @@ #include #include #include -#include +#include #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -62,7 +62,7 @@ class Nef_vertex_2 { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Traits::Point Point; // geometric embedding @@ -73,7 +73,7 @@ class Nef_vertex_2 { Halfedge_handle _h; Face_handle _f; Point _p; - boost::optional _ivit; + std::optional _ivit; Mark _m; GenPtr _i; public: @@ -127,7 +127,7 @@ class Nef_vertex_2 { iv_iterator ivit() const { return *_ivit; } void set_ivit(iv_iterator it) { _ivit = it; } - void reset_ivit() { _ivit = boost::none; } + void reset_ivit() { _ivit = std::nullopt; } }; @@ -151,7 +151,7 @@ class Nef_halfedge_2 { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename std::list::iterator fc_iterator; @@ -162,7 +162,7 @@ class Nef_halfedge_2 { Halfedge_handle opp, prv, nxt; Vertex_handle _v; Face_handle _f; - boost::optional _fcit; + std::optional _fcit; Mark _m; GenPtr _i; public: @@ -223,7 +223,7 @@ class Nef_halfedge_2 { fc_iterator fcit() const { return *_fcit; } void set_fcit(fc_iterator it) { _fcit = it; } - void reset_fcit() { _fcit = boost::none; } + void reset_fcit() { _fcit = std::nullopt; } bool is_hole_entry() const /*{\Mop returns true iff |\Mvar| is entry point into a hole face @@ -248,7 +248,7 @@ class Nef_face_2 { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Traits::Mark Mark; // mark information diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/Line_to_epoint.h b/thirdparty/CGAL/include/CGAL/Nef_2/Line_to_epoint.h index 111e9dae..6174dc84 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/Line_to_epoint.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/Line_to_epoint.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/Line_to_epoint.h $ -// $Id: Line_to_epoint.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/Line_to_epoint.h $ +// $Id: include/CGAL/Nef_2/Line_to_epoint.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/Object_handle.h b/thirdparty/CGAL/include/CGAL/Nef_2/Object_handle.h index bdff68bb..c8ab75f8 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/Object_handle.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/Object_handle.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/Object_handle.h $ -// $Id: Object_handle.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/Object_handle.h $ +// $Id: include/CGAL/Nef_2/Object_handle.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/Object_index.h b/thirdparty/CGAL/include/CGAL/Nef_2/Object_index.h index cbab486c..2e65197e 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/Object_index.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/Object_index.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/Object_index.h $ -// $Id: Object_index.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/Object_index.h $ +// $Id: include/CGAL/Nef_2/Object_index.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/PM_checker.h b/thirdparty/CGAL/include/CGAL/Nef_2/PM_checker.h index c7cf9407..cb640aca 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/PM_checker.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/PM_checker.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/PM_checker.h $ -// $Id: PM_checker.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/PM_checker.h $ +// $Id: include/CGAL/Nef_2/PM_checker.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -203,7 +203,7 @@ check_boundary_is_clockwise_weakly_polygon() const for (vit = v_min = this->vertices_begin() ; vit != this->vertices_end(); ++vit) if ( K.compare_xy(point(vit), point(v_min))<0 ) v_min = vit; CGAL_assertion_msg(!is_isolated(v_min),"Minimal vertex not connected."); - Point p_min = point(v_min); + const Point& p_min = point(v_min); // determine boundary edge incident to v_min: Halfedge_const_handle e_boundary_at_v_min = first_out_edge(v_min); // all out edges are forward oriented due to minimality @@ -211,8 +211,8 @@ check_boundary_is_clockwise_weakly_polygon() const hvit(e_boundary_at_v_min), hend(hvit); do { --hvit; - Point p1 = point(target(e_boundary_at_v_min)); - Point p2 = point(target(hvit)); + const Point& p1 = point(target(e_boundary_at_v_min)); + const Point& p2 = point(target(hvit)); if ( K.orientation(p_min,p1,p2) > 0 ) { // left_turn e_boundary_at_v_min = hvit; break; @@ -220,7 +220,7 @@ check_boundary_is_clockwise_weakly_polygon() const } while (hvit != hend); // now e_boundary_at_v_min is highest starting edge in bundle!! - int winding_around_globally=0; + CGAL_assertion_code(int winding_around_globally=0); Halfedge_around_face_const_circulator hfit(e_boundary_at_v_min),hstart(hfit); Halfedge_const_handle e_prev = next(e_boundary_at_v_min); @@ -229,7 +229,7 @@ check_boundary_is_clockwise_weakly_polygon() const Direction d_prev = direction(e_prev); CGAL_For_all_backwards(hstart,hfit) { Direction d_curr = direction(hfit); - if ( d_curr < d_prev ) ++winding_around_globally; + CGAL_assertion_code(if ( d_curr < d_prev ) ++winding_around_globally); d_prev = d_curr; } CGAL_assertion(winding_around_globally == 1); @@ -262,10 +262,10 @@ check_is_triangulation() const for( eit = this->halfedges_begin(); eit != this->halfedges_end(); ++eit) { if (on_boundary[eit]) continue; hit = hend = eit; - int edges_in_face_cycle=0; + CGAL_assertion_code(int edges_in_face_cycle=0); CGAL_For_all(hit,hend) { error_status << PE(hit); - ++edges_in_face_cycle; + CGAL_assertion_code(++edges_in_face_cycle); } CGAL_assertion_msg(edges_in_face_cycle==3,error_status.str().c_str()); CGAL_assertion_msg( diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/PM_const_decorator.h b/thirdparty/CGAL/include/CGAL/Nef_2/PM_const_decorator.h index 67aa8a9b..1dbc518f 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/PM_const_decorator.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/PM_const_decorator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/PM_const_decorator.h $ -// $Id: PM_const_decorator.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/PM_const_decorator.h $ +// $Id: include/CGAL/Nef_2/PM_const_decorator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -28,7 +28,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif #include @@ -137,7 +137,7 @@ typedef size_t Size_type; /*{\Mtypemember The size type.}*/ typedef void* GenPtr; #else -typedef boost::any GenPtr; +typedef std::any GenPtr; #endif @@ -434,9 +434,10 @@ check_integrity_and_topological_planarity(bool faces) const /* check the source links of out edges and count isolated vertices */ for (vit = vertices_begin() ; vit != vend; ++vit) { if ( is_isolated(vit) ) { - if ( faces ) - CGAL_assertion_msg( vit->face() != Face_const_handle(), - VI(vit).c_str()); + if (faces) { + CGAL_assertion_msg(vit->face() != Face_const_handle(), + VI(vit).c_str()); + } ++iso_vert_num; } else { CGAL_assertion_msg( vit->halfedge() != Halfedge_const_handle(), @@ -481,10 +482,14 @@ check_integrity_and_topological_planarity(bool faces) const first=false; } + CGAL_assertion(iso_vert_num == iv_num); + std::size_t v_num = number_of_vertices() - iso_vert_num; std::size_t e_num = number_of_edges(); std::size_t c_num = number_of_connected_components() - iso_vert_num; std::size_t f_num = number_of_face_cycles() - c_num + 1; + CGAL_USE(fc_num); + CGAL_USE(iv_num); CGAL_USE(v_num); CGAL_USE(e_num); CGAL_USE(f_num); @@ -494,7 +499,7 @@ check_integrity_and_topological_planarity(bool faces) const /* this means all face cycles and all isolated vertices are indeed referenced from a face */ /* every isolated vertex increases the component count - one face cycle per component is redundent except one + one face cycle per component is redundant except one finally check the Euler formula: */ CGAL_assertion( v_num - e_num + f_num == 1 + c_num ); } diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/PM_decorator.h b/thirdparty/CGAL/include/CGAL/Nef_2/PM_decorator.h index b2665e58..99244bcf 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/PM_decorator.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/PM_decorator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/PM_decorator.h $ -// $Id: PM_decorator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/PM_decorator.h $ +// $Id: include/CGAL/Nef_2/PM_decorator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif #include #include @@ -102,7 +102,7 @@ The type generalizes |Vertex_handle|.}*/ /* note: originally I had the mhavs, mhafs hardwired to Halfedge in this class scope. egcs 290.60 reacted with an internal compiler - error; this recursive instatiation scheme works however! + error; this recursive instantiation scheme works however! what a shitty world */ enum { BEFORE = -1, AFTER = 1 }; @@ -352,7 +352,7 @@ void link_as_isolated_vertex(Face_handle f, Vertex_handle v) const void clear_face_cycle_entries(Face_handle f) const /*{\Mop removes all isolated vertices and halfedges that -are entrie points into face cycles from the lists of |f|.}*/ +are entry points into face cycles from the lists of |f|.}*/ { f->clear_all_entries(); } @@ -608,7 +608,7 @@ void make_first_out_edge(Halfedge_handle e) const void set_adjacency_at_source_between(Halfedge_handle e, Halfedge_handle en) const -/*{\Mop makes |e| and |en| neigbors in the cyclic ordered adjacency list +/*{\Mop makes |e| and |en| neighbors in the cyclic ordered adjacency list around |v=source(e)|. \precond |source(e)==source(en)|.}*/ { CGAL_assertion(source(e)==source(en)); link_as_prev_next_pair(en->opposite(),e); @@ -800,10 +800,12 @@ void PM_decorator::clone(const HDS& H) const CGAL::Unique_hash_map Hnew; CGAL::Unique_hash_map Fnew; - /* First clone all objects and store correspondance in three maps.*/ + /* First clone all objects and store correspondence in three maps.*/ Vertex_const_iterator vit, vend = H.vertices_end(); - for (vit = H.vertices_begin(); vit!=vend; ++vit) - Vnew[vit] = this->phds->vertices_push_back(Vertex_base()); + for (vit = H.vertices_begin(); vit != vend; ++vit) { + Vnew[vit] = this->phds->vertices_push_back(Vertex_base()); + assert(Vnew[vit] != Vertex_handle()); + } Halfedge_const_iterator eit, eend = H.halfedges_end(); for (eit = H.halfedges_begin(); eit!=eend; ++(++eit)) { Hnew[eit] = this->phds->edges_push_back(Halfedge_base(),Halfedge_base()); @@ -820,8 +822,12 @@ void PM_decorator::clone(const HDS& H) const vit2!=vend2; ++vit, ++vit2) { mark(vit2) = DC.mark(vit); point(vit2) = DC.point(vit); - if ( DC.is_isolated(vit) ) vit2->set_face(Fnew[vit->face()]); - else vit2->set_halfedge(Hnew[vit->halfedge()]); + if (DC.is_isolated(vit)) { + vit2->set_face(Fnew[vit->face()]); + } + else { + vit2->set_halfedge(Hnew[vit->halfedge()]); + } } Halfedge_iterator eit2, eend2 = this->phds->halfedges_end(); for (eit = H.halfedges_begin(), eit2 = halfedges_begin(); @@ -843,9 +849,10 @@ void PM_decorator::clone(const HDS& H) const fit2->store_fc(Hnew[fcit]); } // hole face cycles Isolated_vertex_const_iterator ivit; - for (ivit = isolated_vertices_begin(fit); - ivit != isolated_vertices_end(fit); ++ivit) + for (ivit = DC.isolated_vertices_begin(fit); + ivit != DC.isolated_vertices_end(fit); ++ivit) { fit2->store_iv(Vnew[ivit]); + } // isolated vertices in the interior mark(fit2) = DC.mark(fit); } @@ -867,7 +874,7 @@ clone_skeleton(const HDS& H, const LINKDA& L) const CGAL::Unique_hash_map Vnew; CGAL::Unique_hash_map Hnew; - /* First clone all objects and store correspondance in the two maps.*/ + /* First clone all objects and store correspondence in the two maps.*/ Vertex_const_iterator vit, vend = H.vertices_end(); for (vit = H.vertices_begin(); vit!=vend; ++vit) { Vertex_handle v = this->phds->vertices_push_back(Vertex_base()); diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/PM_explorer.h b/thirdparty/CGAL/include/CGAL/Nef_2/PM_explorer.h index e30d58e2..d6b9c1ba 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/PM_explorer.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/PM_explorer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/PM_explorer.h $ -// $Id: PM_explorer.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/PM_explorer.h $ +// $Id: include/CGAL/Nef_2/PM_explorer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/PM_io_parser.h b/thirdparty/CGAL/include/CGAL/Nef_2/PM_io_parser.h index 4b1108fd..4b56cb49 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/PM_io_parser.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/PM_io_parser.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/PM_io_parser.h $ -// $Id: PM_io_parser.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/PM_io_parser.h $ +// $Id: include/CGAL/Nef_2/PM_io_parser.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/PM_overlayer.h b/thirdparty/CGAL/include/CGAL/Nef_2/PM_overlayer.h index 71ba7688..cec97da4 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/PM_overlayer.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/PM_overlayer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/PM_overlayer.h $ -// $Id: PM_overlayer.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/PM_overlayer.h $ +// $Id: include/CGAL/Nef_2/PM_overlayer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif #undef CGAL_NEF_DEBUG #define CGAL_NEF_DEBUG 13 @@ -32,7 +32,7 @@ #include #include -#include +#include #ifndef CGAL_USE_LEDA #define LEDA_MEMORY(t) @@ -92,7 +92,7 @@ struct PMO_from_segs { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::access(G.info(v)) = e; #else - *boost::any_cast(&G.info(v)) = e; + *std::any_cast(&G.info(v)) = e; #endif } @@ -102,7 +102,7 @@ struct PMO_from_segs { return geninfo::access(G.info(v)); #else return - boost::any_cast(G.info(v)); + std::any_cast(G.info(v)); #endif } @@ -112,7 +112,7 @@ struct PMO_from_segs { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(G.info(v)); #else - G.info(v)=boost::any(); + G.info(v)=std::any(); #endif } @@ -336,6 +336,8 @@ is associated to the output object $u$ by $|mark|(u,i)$.}*/ using Base::set_isolated_vertex; using Base::has_outdeg_two; using Base::merge_halfedge_pairs_at_target; + using Base::isolated_vertices_begin; + using Base::isolated_vertices_end; // C++ is really friendly: #define USECMARK(t) const Mark& mark(t h) const { return Base::mark(h); } @@ -458,7 +460,7 @@ and |\Mvar.mark(v,1) = D1.mark(f1)|.}*/ create_face_objects(Out); - CGAL_NEF_TRACEN("transfering marks"); + CGAL_NEF_TRACEN("transferring marks"); Face_iterator f = this->faces_begin(); assoc_info(f); for (i=0; i<2; ++i) mark(f,i) = PI[i].mark(PI[i].faces_begin()); @@ -605,18 +607,18 @@ avoid the simplification for edge pairs referenced by |e|.}*/ CGAL_For_all(hfc,hend) { set_face(hfc,f); if(target(hfc) == target(e_min)) { - Point p1 = point(source(hfc)), - p2 = point(target(hfc)), - p3 = point(target(next(hfc))); + const Point& p1 = point(source(hfc)); + const Point& p2 = point(target(hfc)); + const Point& p3 = point(target(next(hfc))); if (!K.left_turn(p1,p2,p3) ) e_min = hfc; } else if ( K.compare_xy(point(target(hfc)), point(target(e_min))) < 0 ) e_min = hfc; linked[hfc]=true; } - Point p1 = point(source(e_min)), - p2 = point(target(e_min)), - p3 = point(target(next(e_min))); + const Point& p1 = point(source(e_min)); + const Point& p2 = point(target(e_min)); + const Point& p3 = point(target(next(e_min))); if ( K.orientation(p1,p2,p3) > 0 ) set_halfedge(f,e_min); // outer else set_hole(f,e_min); // store as inner } @@ -626,12 +628,15 @@ avoid the simplification for edge pairs referenced by |e|.}*/ for(v = this->vertices_begin(); v != vend; v=vn) { CGAL_NEF_TRACEN("at vertex "<faces_begin(); f != fend; f=fn) { fn=f; ++fn; Union_find_handle pit = Pitem[f]; - if ( unify_faces.find(pit) != pit ) delete_face(f); + Union_find_handle root = unify_faces.find(pit); + if (root != pit) { + + for(Isolated_vertex_iterator ivi = isolated_vertices_begin(f); ivi != isolated_vertices_end(f); ++ivi){ + ivi->set_face(*root); + link_as_isolated_vertex(*root,ivi); + } + delete_face(f); + } } @@ -674,7 +687,7 @@ void discard_info(Vertex_handle v) const #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(info(v)); #else - info(v)=boost::any(); + info(v)=std::any(); #endif } @@ -684,7 +697,7 @@ vertex_info& ginfo(Vertex_handle v) const return geninfo::access(info(v)); #else return - *boost::any_cast(&info(v)); + *std::any_cast(&info(v)); #endif } @@ -729,8 +742,8 @@ void discard_info(Halfedge_handle e) const geninfo::clear(info(e)); geninfo::clear(info(twin(e))); #else - info(e)=boost::any(); - info(twin(e))=boost::any(); + info(e)=std::any(); + info(twin(e))=std::any(); #endif } @@ -740,7 +753,7 @@ halfedge_info& ginfo(Halfedge_handle e) const return geninfo::access(info(e)); #else return - *boost::any_cast(&info(e)); + *std::any_cast(&info(e)); #endif } @@ -782,7 +795,7 @@ void discard_info(Face_handle f) const #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(info(f)); #else - info(f)=boost::any(); + info(f)=std::any(); #endif } @@ -792,7 +805,7 @@ face_info& ginfo(Face_handle f) const return geninfo::access(info(f)); #else return - *boost::any_cast(&info(f)); + *std::any_cast(&info(f)); #endif } @@ -828,9 +841,9 @@ void create_face_objects(const Below_info& D) const CGAL_For_all(hfc,hend) { FaceCycle[hfc]=i; // assign face cycle number if(target(hfc) == target(e_min)) { - Point p1 = point(source(hfc)), - p2 = point(target(hfc)), - p3 = point(target(next(hfc))); + const Point& p1 = point(source(hfc)); + const Point&p2 = point(target(hfc)); + const Point&p3 = point(target(next(hfc))); if (!K.left_turn(p1,p2,p3) ) e_min = hfc; } else if ( K.compare_xy(point(target(hfc)), point(target(e_min))) < 0 ) @@ -844,10 +857,10 @@ void create_face_objects(const Below_info& D) const Face_handle f_outer = this->new_face(); for (int j=0; j outer face cycle CGAL_NEF_TRACEN(" creating new face object"); Face_handle f = this->new_face(); @@ -889,9 +902,9 @@ void create_face_objects_pl(const Below_info& D) const CGAL_For_all(hfc,hend) { FaceCycle[hfc]=i; // assign face cycle number if(target(hfc) == target(e_min)) { - Point p1 = point(source(hfc)), - p2 = point(target(hfc)), - p3 = point(target(next(hfc))); + const Point& p1 = point(source(hfc)); + const Point& p2 = point(target(hfc)); + const Point& p3 = point(target(next(hfc))); if (!K.left_turn(p1,p2,p3) ) e_min = hfc; } else if ( K.compare_xy(point(target(hfc)), point(target(e_min))) < 0 ) @@ -905,10 +918,10 @@ void create_face_objects_pl(const Below_info& D) const (void)/* Face_handle f_outer = */ this->new_face(); for (int j=0; j outer face cycle CGAL_NEF_TRACEN(" creating new face object"); Face_handle f = this->new_face(); @@ -953,13 +966,13 @@ Segment segment(const Const_decorator& N, bool is_forward_edge(const Const_decorator& N, Halfedge_const_iterator hit) const -{ Point p1 = N.point(N.source(hit)); - Point p2 = N.point(N.target(hit)); +{ const Point& p1 = N.point(N.source(hit)); + const Point& p2 = N.point(N.target(hit)); return (K.compare_xy(p1,p2) < 0); } void assert_type_precondition() const { typename PM_decorator_::Point p1; Point p2; - CGAL_static_assertion((boost::is_same::value)); } + static_assert(std::is_same::value); } diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/PM_persistent_PL.h b/thirdparty/CGAL/include/CGAL/Nef_2/PM_persistent_PL.h index 459cc799..16ec9d5c 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/PM_persistent_PL.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/PM_persistent_PL.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/PM_persistent_PL.h $ -// $Id: PM_persistent_PL.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/PM_persistent_PL.h $ +// $Id: include/CGAL/Nef_2/PM_persistent_PL.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -72,8 +72,8 @@ struct PM_persistent_PL_traits EdgeCategory ClassifyEdge(const Graph& G, const Edge& e, const Node& u) { - Point p_u = G.point(u); - Point p_v = G.point(opposite(G,e,u)); + const Point& p_u = G.point(u); + const Point& p_v = G.point(opposite(G,e,u)); int cmpX = pK->compare_x(p_u, p_v); if ( cmpX < 0 ) return StartingNonVertical; @@ -111,7 +111,8 @@ struct PM_persistent_PL_traits Curve makeCurve(const Graph& G, const Node& n) const { return makeCurve(G.point(n)); } Curve makeCurve(const Graph& G, const Edge& e) const - { Point ps = G.point(G.source(e)), pt = G.point(G.target(e)); + { const Point& ps = G.point(G.source(e)); + const Point& pt = G.point(G.target(e)); Curve res(G.point(G.source(e)),G.point(G.target(e))); if ( pK->compare_xy(ps,pt) < 0 ) res = pK->construct_segment(ps,pt); else res = pK->construct_segment(pt,ps); @@ -135,10 +136,10 @@ struct PM_persistent_PL_traits int operator()(const Curve& s1, const Curve& s2) const { - Point a = pK->source(s1); - Point b = pK->target(s1); - Point c = pK->source(s2); - Point d = pK->target(s2); + const Point& a = pK->source(s1); + const Point& b = pK->target(s1); + const Point& c = pK->source(s2); + const Point& d = pK->target(s2); if ( a==b ) if ( c==d ) return pK->compare_y(a,c); else return cmppntseg(a, s2); diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/PM_point_locator.h b/thirdparty/CGAL/include/CGAL/Nef_2/PM_point_locator.h index 91d47407..1ffad1cb 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/PM_point_locator.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/PM_point_locator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/PM_point_locator.h $ -// $Id: PM_point_locator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/PM_point_locator.h $ +// $Id: include/CGAL/Nef_2/PM_point_locator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -27,7 +28,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif #ifdef CGAL_USE_LEDA_LIBRARY @@ -158,13 +159,12 @@ class PM_naive_point_locator : public PM_decorator_ { const Direction& d, bool& collinear) const /*{\Xop returns a halfedge |e| bounding a wedge in between two neighbored edges in the adjacency list of |v| which contains |d|. - If |d| extends along a edge then |e| is this edge. If |d| extends + If |d| extends along an edge then |e| is this edge. If |d| extends into the interior of such a wedge then |e| is the first edge hit when |d| is rotated clockwise. \precond |v| is not isolated.}*/ { CGAL_NEF_TRACEN("out_wedge "<number_of_vertices() == 0) CGAL_error_msg("PM_naive_point_locator: plane map is empty."); - Point p = K.source(s); + const Point& p = K.source(s); Vertex_const_iterator vit; for(vit = this->vertices_begin(); vit != this->vertices_end(); ++vit) { if ( p == point(vit) ) return make_object(vit); @@ -235,7 +235,7 @@ class PM_naive_point_locator : public PM_decorator_ { Direction dso = K.construct_direction(K.target(s),p), d_res; CGAL::Unique_hash_map visited(false); for(vit = this->vertices_begin(); vit != this->vertices_end(); ++vit) { - Point p_res, vp = point(vit); + const Point& vp = point(vit); if ( K.contains(ss,vp) ) { CGAL_NEF_TRACEN(" location via vertex at "<halfedges_begin(); eit != this->halfedges_end(); ++eit) { if ( visited[eit] ) continue; - Point se = point(source(eit)), - te = point(target(eit)); + const Point& se = point(source(eit)); + const Point& te = point(target(eit)); int o1 = K.orientation(ss,se); int o2 = K.orientation(ss,te); if ( o1 == -o2 && // internal intersection @@ -297,7 +297,7 @@ class PM_naive_point_locator : public PM_decorator_ { along |s| does not hit any object |h| of |P| with |M(h)|.}*/ { CGAL_NEF_TRACEN("naive ray_shoot "<vertices_begin(); v != this->vertices_end(); ++v) { - Point pv = point(v); + const Point& pv = point(v); if ( !K.contains(ss,pv) ) continue; CGAL_NEF_TRACEN("candidate "<::const_access(CT.info(v)).first; #else return - boost::any_cast(CT.info(v)).first; + std::any_cast(CT.info(v)).first; #endif } @@ -506,7 +506,7 @@ class PM_point_locator : public return geninfo::const_access(CT.info(e)).first; #else return - boost::any_cast(CT.info(e)).first; + std::any_cast(CT.info(e)).first; #endif } @@ -516,7 +516,7 @@ class PM_point_locator : public return geninfo::const_access(CT.info(e)).second; #else return - boost::any_cast(CT.info(e)).second; + std::any_cast(CT.info(e)).second; #endif } @@ -583,10 +583,10 @@ class PM_point_locator : public f = geninfo::access(info(e_from)).second; #else f = - boost::any_cast(info(source(e))).second; + std::any_cast(info(source(e))).second; else f = - boost::any_cast(info(e_from)).second; + std::any_cast(info(e_from)).second; #endif mark(e) = _DP.mark(f); #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO @@ -642,10 +642,10 @@ class PM_point_locator : public Halfedge_handle e3 = next(e); // e1,e3: edges of quadrilateral with diagonal e - Point a = point(source(e1)); - Point b = point(target(e1)); - Point c = point(source(e3)); - Point d = point(target(e3)); + const Point& a = point(source(e1)); + const Point& b = point(target(e1)); + const Point& c = point(source(e3)); + const Point& d = point(target(e3)); if (! (this->K.orientation(b,d,a) > 0 && // left_turn this->K.orientation(b,d,c) < 0) ) // right_turn @@ -665,6 +665,7 @@ class PM_point_locator : public } + CGAL_USE(flip_count); CGAL_NEF_TRACEN(" flipped "<K.source(s); + const Point& p = this->K.source(s); Vertex_const_handle v1 = CT.vertices_begin(); Halfedge_const_handle e1 = CT.twin(CT.first_out_edge(v1)); Halfedge_around_face_const_circulator circ(e1), end(circ); @@ -780,7 +781,7 @@ class PM_point_locator : public { Segment s(ss); CGAL_NEF_TRACEN("ray_shoot "<K.is_degenerate(s) ); - Point p = this->K.source(s); + const Point& p = this->K.source(s); Direction d = this->K.construct_direction(p,s.target()); Vertex_const_handle v; Halfedge_const_handle e; @@ -811,9 +812,9 @@ class PM_point_locator : public if ( M(input_face(e)) ) // face mark return make_object(input_face(e)); - Point p1 = CT.point(CT.source(e)), - p2 = CT.point(CT.target(e)), - p3 = CT.point(CT.target(next(e))); + const Point& p1 = CT.point(CT.source(e)); + const Point& p2 = CT.point(CT.target(e)); + const Point& p3 = CT.point(CT.target(next(e))); int or1 = this->K.orientation(p,s.target(),p1); int or2 = this->K.orientation(p,s.target(),p2); int or3 = this->K.orientation(p,s.target(),p3); @@ -966,7 +967,7 @@ PM_point_locator:: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(CT.info(vit)); #else - CT.info(vit)=boost::any(); + CT.info(vit)=std::any(); #endif } Halfedge_iterator eit, eend = CT.halfedges_end(); @@ -974,7 +975,7 @@ PM_point_locator:: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(CT.info(eit)); #else - CT.info(eit)=boost::any(); + CT.info(eit)=std::any(); #endif } CT.clear(); @@ -997,7 +998,7 @@ PM_point_locator::walk_in_triangulation(const Point& q) const return Object_handle(); Halfedge_const_handle e; - Point p = CT.point(v); + const Point& p = CT.point(v); if ( p == q ) return make_object(v); // Segment s = this->K.construct_segment(p,q); Direction dir = this->K.construct_direction(p,q); diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/Polynomial.h b/thirdparty/CGAL/include/CGAL/Nef_2/Polynomial.h index eb8a824b..d102b4df 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/Polynomial.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/Polynomial.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/Polynomial.h $ -// $Id: Polynomial.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/Polynomial.h $ +// $Id: include/CGAL/Nef_2/Polynomial.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Michael Seel @@ -14,6 +14,9 @@ #ifndef CGAL_NEF_2_POLYNOMIAL_H #define CGAL_NEF_2_POLYNOMIAL_H +#include + + #include #include #include @@ -366,7 +369,7 @@ template class Polynomial : /*{\Mtext Additionally |\Mname| offers standard arithmetic ring - opertions like |+,-,*,+=,-=,*=|. By means of the sign operation we can + operations like |+,-,*,+=,-=,*=|. By means of the sign operation we can also offer comparison predicates as $<,>,\leq,\geq$. Where $p_1 < p_2$ holds iff $|sign|(p_1 - p_2) < 0$. This data type is fully compliant to the requirements of CGAL number types. \setopdims{3cm}{2cm}}*/ @@ -690,7 +693,7 @@ class Polynomial : } /*{\Xtext Additionally |\Mname| offers standard arithmetic ring - opertions like |+,-,*,+=,-=,*=|. By means of the sign operation we can + operations like |+,-,*,+=,-=,*=|. By means of the sign operation we can also offer comparison predicates as $<,>,\leq,\geq$. Where $p_1 < p_2$ holds iff $|sign|(p_1 - p_2) < 0$. This data type is fully compliant to the requirements of CGAL number types. \setopdims{3cm}{2cm}}*/ @@ -991,7 +994,7 @@ determines the sign for the limit process $x \rightarrow \infty$. /*{\Xtext Additionally |\Mname| offers standard arithmetic ring - opertions like |+,-,*,+=,-=,*=|. By means of the sign operation we can + operations like |+,-,*,+=,-=,*=|. By means of the sign operation we can also offer comparison predicates as $<,>,\leq,\geq$. Where $p_1 < p_2$ holds iff $|sign|(p_1 - p_2) < 0$. This data type is fully compliant to the requirements of CGAL number types. \setopdims{3cm}{2cm}}*/ diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/Polynomial_impl.h b/thirdparty/CGAL/include/CGAL/Nef_2/Polynomial_impl.h index 401e1ac1..47f970c6 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/Polynomial_impl.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/Polynomial_impl.h @@ -3,14 +3,19 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/Polynomial_impl.h $ -// $Id: Polynomial_impl.h 03e1e07 2021-12-27T11:36:27+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/Polynomial_impl.h $ +// $Id: include/CGAL/Nef_2/Polynomial_impl.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Michael Seel // Andreas Fabri +#ifndef CGAL_NEF_2_POLYNOMIAL_IMPL_H +#define CGAL_NEF_2_POLYNOMIAL_IMPL_H + +#include + namespace CGAL{ @@ -202,3 +207,5 @@ Polynomial Polynomial::gcd( } // end namespace Nef }//end namespace CGAL + +#endif //CGAL_NEF_2_POLYNOMIAL_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/Segment_overlay_traits.h b/thirdparty/CGAL/include/CGAL/Nef_2/Segment_overlay_traits.h index 13c7562f..a0df6e5e 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/Segment_overlay_traits.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/Segment_overlay_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h $ -// $Id: Segment_overlay_traits.h f3f6beb 2021-05-12T07:37:49+01:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h $ +// $Id: include/CGAL/Nef_2/Segment_overlay_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -161,11 +161,13 @@ class leda_seg_overlay_traits { } - Point_2 source(ISegment is) const + Point_2 source(const ISegment& is) const { return K.source(is->first()); } - Point_2 target(ISegment is) const + + Point_2 target(const ISegment& is) const { return K.target(is->first()); } - ITERATOR original(ISegment s) const + + ITERATOR original(const ISegment& s) const { return s->second(); } int orientation(ST_item sit, const Point_2& p) const @@ -474,7 +476,7 @@ class stl_seg_overlay_traits { public: compare_segs_at_sweepline(const Point_2& pi, - ISegment s1, ISegment s2, + ISegment s1, ISegment s2, const GEOMETRY& k) : p(pi), s_bottom(s1), s_top(s2), K(k) {} @@ -673,6 +675,7 @@ class stl_seg_overlay_traits { Point_2 source(ISegment is) const { return K.source(is->first); } + Point_2 target(ISegment is) const { return K.target(is->first); } @@ -687,7 +690,8 @@ class stl_seg_overlay_traits { *sit1 == &sh || *sit2 == &sl || *sit2 == &sh) return false; - Point_2 ps = source(*sit2), pt = target(*sit2); + const Point_2& ps = source(*sit2); + const Point_2& pt = target(*sit2); return ( orientation(sit1,ps)==0 && orientation(sit1,pt)==0 ); } @@ -758,8 +762,8 @@ class stl_seg_overlay_traits { continue; // ignore zero-length segments regarding YS } - Point_2 p = *it1; - Point_2 q = *it2; + const Point_2& p = *it1; + const Point_2& q = *it2; Segment_2 s1; if ( K.compare_xy(p,q) < 0 ) diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/debug.h b/thirdparty/CGAL/include/CGAL/Nef_2/debug.h index a299e6ed..70b1f608 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/debug.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/debug.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/debug.h $ -// $Id: debug.h ce7d06d 2020-12-05T08:12:56+00:00 Giles Bathgate -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/debug.h $ +// $Id: include/CGAL/Nef_2/debug.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Michael Seel @@ -13,6 +13,9 @@ #ifndef CGAL_NEF_2_DEBUG_H #define CGAL_NEF_2_DEBUG_H +#include + + #include #ifdef NDEBUG diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/gen_point_location.h b/thirdparty/CGAL/include/CGAL/Nef_2/gen_point_location.h index 16571427..c7278f79 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/gen_point_location.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/gen_point_location.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/gen_point_location.h $ -// $Id: gen_point_location.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/gen_point_location.h $ +// $Id: include/CGAL/Nef_2/gen_point_location.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,7 +27,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif @@ -55,7 +55,7 @@ class GenericLocation { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif public: /*{\Mtypes}*/ @@ -89,7 +89,7 @@ class GenericLocation { return geninfo::const_access(value); #else return - *boost::any_cast(&value); + *std::any_cast(&value); #endif } /*{\Mconversion converts |\Mvar| into a node.\\ @@ -105,7 +105,7 @@ class GenericLocation { return geninfo::const_access(value); #else return - *boost::any_cast(&value); + *std::any_cast(&value); #endif } /*{\Mconversion converts |\Mvar| into an edge.\\ @@ -159,8 +159,8 @@ class GenericLocation { case NODE: geninfo::clear(value); break; case EDGE: geninfo::clear(value); break; #else - case NODE: value=boost::any(); break; - case EDGE: value=boost::any(); break; + case NODE: value=std::any(); break; + case EDGE: value=std::any(); break; #endif case NIL: break; } @@ -174,14 +174,14 @@ class GenericLocation { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::access(value) = geninfo::const_access(L.value); #else - *boost_any_cast(&value) = boost::any_cast(L.value); + *boost_any_cast(&value) = std::any_cast(L.value); #endif break; case EDGE: #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::access(value) = geninfo::const_access(L.value); #else - *boost::any_cast(&value) = boost::any_cast(L.value); + *std::any_cast(&value) = std::any_cast(L.value); #endif break; case NIL: break; @@ -345,7 +345,7 @@ class PointLocator { /*{\Mtypes}*/ // define additional types typedef GenericLocation Location; - /*{\Mtypedef usual return value for the point loaction.}*/ + /*{\Mtypedef usual return value for the point location.}*/ enum Direction { downwards, upwards}; /*{\Menum used to specify the direction for the point location.}*/ diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/geninfo.h b/thirdparty/CGAL/include/CGAL/Nef_2/geninfo.h index 92d3117a..0d0ec0ec 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/geninfo.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/geninfo.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/geninfo.h $ -// $Id: geninfo.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/geninfo.h $ +// $Id: include/CGAL/Nef_2/geninfo.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #define CGAL_DEPRECATED_HEADER "" #define CGAL_DEPRECATED_MESSAGE_DETAILS \ - "Something like boost::any or boost::variant should be used instead." + "Something like std::any or std::variant should be used instead." #include #include diff --git a/thirdparty/CGAL/include/CGAL/Nef_2/iterator_tools.h b/thirdparty/CGAL/include/CGAL/Nef_2/iterator_tools.h index ff6bea3a..514e21ec 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_2/iterator_tools.h +++ b/thirdparty/CGAL/include/CGAL/Nef_2/iterator_tools.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_2/iterator_tools.h $ -// $Id: iterator_tools.h 9d16a42 2020-06-15T17:07:35+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_2/iterator_tools.h $ +// $Id: include/CGAL/Nef_2/iterator_tools.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/Binary_operation.h b/thirdparty/CGAL/include/CGAL/Nef_3/Binary_operation.h index f8531540..4f6e79c2 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/Binary_operation.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/Binary_operation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/Binary_operation.h $ -// $Id: Binary_operation.h d5b6911 2022-06-03T16:08:58+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/Binary_operation.h $ +// $Id: include/CGAL/Nef_3/Binary_operation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -74,6 +75,7 @@ class Binary_operation : public CGAL::SNC_decorator { typedef typename SNC_structure::Items Items; typedef typename Map::Sphere_map Sphere_map; typedef CGAL::SNC_decorator SNC_decorator; + typedef CGAL::SNC_const_decorator SNC_const_decorator; typedef SNC_decorator Base; typedef CGAL::SNC_constructor SNC_constructor; typedef CGAL::SNC_external_structure @@ -82,10 +84,13 @@ class Binary_operation : public CGAL::SNC_decorator { typedef CGAL::SNC_SM_overlayer SM_overlayer; typedef CGAL::SM_point_locator SM_point_locator; typedef CGAL::SNC_point_locator SNC_point_locator; + typedef CGAL::SNC_point_locator SNC_const_point_locator; typedef typename SNC_structure::Vertex_handle Vertex_handle; typedef typename SNC_structure::Halfedge_handle Halfedge_handle; + typedef typename SNC_structure::Halfedge_const_handle Halfedge_const_handle; typedef typename SNC_structure::Halffacet_handle Halffacet_handle; + typedef typename SNC_structure::Halffacet_const_handle Halffacet_const_handle; typedef typename SNC_structure::Volume_handle Volume_handle; typedef typename SNC_structure::SVertex_handle SVertex_handle; typedef typename SNC_structure::SHalfedge_handle SHalfedge_handle; @@ -144,12 +149,12 @@ class Binary_operation : public CGAL::SNC_decorator { return v01; } - Vertex_handle create_local_view_on( const Point_3& p, Halfedge_handle e) { + Vertex_handle create_local_view_on( const Point_3& p, Halfedge_const_handle e) { SNC_constructor C(*this->sncp()); return C.create_from_edge( e, p); } - Vertex_handle create_local_view_on( const Point_3& p, Halffacet_handle f) { + Vertex_handle create_local_view_on( const Point_3& p, Halffacet_const_handle f) { SNC_constructor C(*this->sncp()); return C.create_from_facet( f, p); } @@ -167,14 +172,14 @@ class Binary_operation : public CGAL::SNC_decorator { typename Selection, typename Association> class Intersection_call_back : - public SNC_point_locator::Intersection_call_back + public SNC_const_point_locator::Intersection_call_back { typedef typename SNC_decorator::Decorator_traits Decorator_traits; typedef typename Decorator_traits::Halfedge_handle Halfedge_handle; typedef typename Decorator_traits::Halffacet_handle Halffacet_handle; public: - Intersection_call_back( SNC_structure& s0, SNC_structure& s1, + Intersection_call_back( const SNC_structure& s0, const SNC_structure& s1, const Selection& _bop, SNC_structure& r, bool invert_order, Association& Ain) : snc0(s0), snc1(s1), bop(_bop), result(r), @@ -450,18 +455,16 @@ class Binary_operation : public CGAL::SNC_decorator { // SNC structure finds an intersection between the segment defined // by an edge on the other SNC structure, the call back method is // called with the intersecting objects and the intersection point. - // The responsability of the call back functor is to construct the + // The responsibility of the call back functor is to construct the // local view on the intersection point on both SNC structures, // overlay them and add the resulting sphere map to the result. // CGAL_NEF_SETDTHREAD(19*509*43*131); - Intersection_call_back call_back0 - ( const_cast(snc1), const_cast(snc2), - BOP, *this->sncp(), false, A); - Intersection_call_back call_back1 - ( const_cast(snc2), const_cast(snc2), - BOP, *this->sncp(), true, A); + Intersection_call_back call_back0 + ( snc1, snc2, BOP, *this->sncp(), false, A); + Intersection_call_back call_back1 + ( snc2, snc2, BOP, *this->sncp(), true, A); #ifdef CGAL_NEF3_TIMER_INTERSECTION double split_intersection = timer_overlay.time(); @@ -503,10 +506,8 @@ class Binary_operation : public CGAL::SNC_decorator { << this->sncp()->number_of_vertices()); #else CGAL_NEF_TRACEN("intersection by fast box intersection"); - binop_intersection_test_segment_tree binop_box_intersection; - binop_box_intersection(call_back0, call_back1, - const_cast(snc1), - const_cast(snc2)); + binop_intersection_test_segment_tree binop_box_intersection; + binop_box_intersection(call_back0, call_back1, snc1, snc2); #endif #ifdef CGAL_NEF3_TIMER_INTERSECTION diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/Bounding_box_3.h b/thirdparty/CGAL/include/CGAL/Nef_3/Bounding_box_3.h index 33d266a3..ae5ad3d9 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/Bounding_box_3.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/Bounding_box_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/Bounding_box_3.h $ -// $Id: Bounding_box_3.h b1c09a5 2020-07-20T16:52:24+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/Bounding_box_3.h $ +// $Id: include/CGAL/Nef_3/Bounding_box_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/Combine_with_halfspace.h b/thirdparty/CGAL/include/CGAL/Nef_3/Combine_with_halfspace.h index 4197cd01..60941ab1 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/Combine_with_halfspace.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/Combine_with_halfspace.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/Combine_with_halfspace.h $ -// $Id: Combine_with_halfspace.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/Combine_with_halfspace.h $ +// $Id: include/CGAL/Nef_3/Combine_with_halfspace.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/Default_items.h b/thirdparty/CGAL/include/CGAL/Nef_3/Default_items.h index 88f464cc..7d7e9477 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/Default_items.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/Default_items.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/Default_items.h $ -// $Id: Default_items.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/Default_items.h $ +// $Id: include/CGAL/Nef_3/Default_items.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/Edge_edge_overlay.h b/thirdparty/CGAL/include/CGAL/Nef_3/Edge_edge_overlay.h index 96e9a95d..45a37a24 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/Edge_edge_overlay.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/Edge_edge_overlay.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/Edge_edge_overlay.h $ -// $Id: Edge_edge_overlay.h 521c72d 2021-10-04T13:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/Edge_edge_overlay.h $ +// $Id: include/CGAL/Nef_3/Edge_edge_overlay.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -487,7 +487,7 @@ class Edge_edge_overlay sce[1-i] = svc; --svc; if(svc->circle().oriented_side(sv[0]->point()) == os1) { - // sedges are only on one side " + // sedges are only on one side sce[i] = scb[1-i] = sce[1-i]; empty_c[1-i] = true; done = true; diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h b/thirdparty/CGAL/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h index 5250e55d..2bf84f56 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h $ -// $Id: Exact_triangulation_euclidean_traits_xy_3.h 5ea5e93 2021-01-20T15:17:41+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h $ +// $Id: include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xy_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -34,9 +34,9 @@ struct Exact_intersect_xy_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - typedef boost::variant variant_type; + typedef std::variant variant_type; - boost::optional + std::optional operator() (const Segment_3& s3, const Segment_3& t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -55,18 +55,18 @@ struct Exact_intersect_xy_2 // so all third components are faked! auto obj = intersection (s2,t2); if(! obj){ - return boost::none; + return std::nullopt; } - if (const Point_2* pi = boost::get(&*obj)) + if (const Point_2* pi = std::get_if(&*obj)) { - return boost::make_optional(variant_type(Point_3(p2.x(),p2.y(),0))); + return std::make_optional(variant_type(Point_3(p2.x(),p2.y(),0))); } - const Segment_2* si = boost::get(&*obj); + const Segment_2* si = std::get_if(&*obj); p2 = si->source(); q2 = si->target(); - return boost::make_optional(variant_type(Segment_3(Point_3(p2.x(),p2.y(),0), + return std::make_optional(variant_type(Segment_3(Point_3(p2.x(),p2.y(),0), Point_3(q2.x(),q2.y(),0) ) )); } }; @@ -80,9 +80,9 @@ struct Exact_intersect_xy_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - typedef boost::variant variant_type; + typedef std::variant variant_type; - boost::optional operator() (Segment_3 s3, Segment_3 t3) + std::optional operator() (Segment_3 s3, Segment_3 t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -102,18 +102,18 @@ struct Exact_intersect_xy_2 // so all third components are faked! auto obj = intersection (s2,t2); if(! obj){ - return boost::none; + return std::nullopt; } - if (const Point_2* pi = boost::get(&*obj)) + if (const Point_2* pi = std::get_if(&*obj)) { - return boost::make_optional(variant_type(Point_3(p2.hx(),p2.hy(),0,p2.hw()))); + return std::make_optional(variant_type(Point_3(p2.hx(),p2.hy(),0,p2.hw()))); } - const Segment_2* si = boost::get(&*obj); + const Segment_2* si = std::get_if(&*obj); p2 = si->source(); q2 = si->target(); - return boost::make_optional(variant_type(Segment_3(Point_3 (p2.hx(),p2.hy(),0,p2.hw()), + return std::make_optional(variant_type(Segment_3(Point_3 (p2.hx(),p2.hy(),0,p2.hw()), Point_3 (q2.hx(),q2.hy(),0,q2.hw())) )); } }; diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h b/thirdparty/CGAL/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h index 5e5ad802..4afc665c 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h $ -// $Id: Exact_triangulation_euclidean_traits_xz_3.h 5ea5e93 2021-01-20T15:17:41+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h $ +// $Id: include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_xz_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ralf Osbild @@ -33,9 +33,9 @@ struct Exact_intersect_xz_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - typedef boost::variant variant_type; + typedef std::variant variant_type; - boost::optional + std::optional operator() (const Segment_3& s3, const Segment_3& t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -54,18 +54,18 @@ struct Exact_intersect_xz_2 // so all third components are faked! auto obj = intersection (s2,t2); if(! obj){ - return boost::none; + return std::nullopt; } - if (const Point_2* pi = boost::get(&*obj)) + if (const Point_2* pi = std::get_if(&*obj)) { - return boost::make_optional(variant_type(Point_3(p2.x(),0,p2.y()))); + return std::make_optional(variant_type(Point_3(p2.x(),0,p2.y()))); } - const Segment_2* si = boost::get(&*obj); + const Segment_2* si = std::get_if(&*obj); p2 = si->source(); q2 = si->target(); - return boost::make_optional(variant_type(Segment_3(Point_3(p2.x(),0,p2.y()), + return std::make_optional(variant_type(Segment_3(Point_3(p2.x(),0,p2.y()), Point_3(q2.x(),0,q2.y()) ) )); } }; @@ -79,9 +79,9 @@ struct Exact_intersect_xz_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - typedef boost::variant variant_type; + typedef std::variant variant_type; - boost::optional operator() (Segment_3 s3, Segment_3 t3) + std::optional operator() (Segment_3 s3, Segment_3 t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -101,18 +101,18 @@ struct Exact_intersect_xz_2 // so all third components are faked! auto obj = intersection (s2,t2); if(! obj){ - return boost::none; + return std::nullopt; } - if (const Point_2* pi = boost::get(&*obj)) + if (const Point_2* pi = std::get_if(&*obj)) { - return boost::make_optional(variant_type(Point_3(p2.hx(),0,p2.hy(),p2.hw()))); + return std::make_optional(variant_type(Point_3(p2.hx(),0,p2.hy(),p2.hw()))); } - const Segment_2* si = boost::get(&*obj); + const Segment_2* si = std::get_if(&*obj); p2 = si->source(); q2 = si->target(); - return boost::make_optional(variant_type(Segment_3(Point_3 (p2.hx(),0,p2.hy(),p2.hw()), + return std::make_optional(variant_type(Segment_3(Point_3 (p2.hx(),0,p2.hy(),p2.hw()), Point_3 (q2.hx(),0,q2.hy(),q2.hw())) )); } diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h b/thirdparty/CGAL/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h index aca6f7ec..d703cf51 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h $ -// $Id: Exact_triangulation_euclidean_traits_yz_3.h 5ea5e93 2021-01-20T15:17:41+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h $ +// $Id: include/CGAL/Nef_3/Exact_triangulation_euclidean_traits_yz_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -34,9 +34,9 @@ struct Exact_intersect_yz_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - typedef boost::variant variant_type; + typedef std::variant variant_type; - boost::optional + std::optional operator() (const Segment_3& s3, const Segment_3& t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -55,18 +55,18 @@ struct Exact_intersect_yz_2 // so all third components are faked! auto obj = intersection (s2,t2); if(! obj){ - return boost::none; + return std::nullopt; } - if (const Point_2* pi = boost::get(&*obj)) + if (const Point_2* pi = std::get_if(&*obj)) { - return boost::make_optional(variant_type(Point_3(0,p2.x(),p2.y()))); + return std::make_optional(variant_type(Point_3(0,p2.x(),p2.y()))); } - const Segment_2* si = boost::get(&*obj); + const Segment_2* si = std::get_if(&*obj); p2 = si->source(); q2 = si->target(); - return boost::make_optional(variant_type(Segment_3(Point_3(0,p2.x(),p2.y()), + return std::make_optional(variant_type(Segment_3(Point_3(0,p2.x(),p2.y()), Point_3(0,q2.x(),q2.y()) ) )); } }; @@ -80,9 +80,9 @@ struct Exact_intersect_yz_2 typedef typename R::Point_3 Point_3; typedef typename R::Segment_3 Segment_3; - typedef boost::variant variant_type; + typedef std::variant variant_type; - boost::optional operator() (Segment_3 s3, Segment_3 t3) + std::optional operator() (Segment_3 s3, Segment_3 t3) { Point_2 p2, q2; Point_3 p3, q3; @@ -102,18 +102,18 @@ struct Exact_intersect_yz_2 // so all third components are faked! auto obj = intersection (s2,t2); if(! obj){ - return boost::none; + return std::nullopt; } - if (const Point_2* pi = boost::get(&*obj)) + if (const Point_2* pi = std::get_if(&*obj)) { - return boost::make_optional(variant_type(Point_3(0,p2.hx(),p2.hy(),p2.hw()))); + return std::make_optional(variant_type(Point_3(0,p2.hx(),p2.hy(),p2.hw()))); } - const Segment_2* si = boost::get(&*obj); + const Segment_2* si = std::get_if(&*obj); p2 = si->source(); q2 = si->target(); - return boost::make_optional(variant_type(Segment_3(Point_3 (0,p2.hx(),p2.hy(),p2.hw()), + return std::make_optional(variant_type(Segment_3(Point_3 (0,p2.hx(),p2.hy(),p2.hw()), Point_3 (0,q2.hx(),q2.hy(),q2.hw())) )); } }; diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/Halfedge.h b/thirdparty/CGAL/include/CGAL/Nef_3/Halfedge.h index 82dc476b..8ac376ab 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/Halfedge.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/Halfedge.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/Halfedge.h $ -// $Id: Halfedge.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/Halfedge.h $ +// $Id: include/CGAL/Nef_3/Halfedge.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -30,7 +31,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -41,7 +42,7 @@ class Halfedge_base #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Vector_3 Vector_3; diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/Halffacet.h b/thirdparty/CGAL/include/CGAL/Nef_3/Halffacet.h index da3dd995..1fb87b63 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/Halffacet.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/Halffacet.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/Halffacet.h $ -// $Id: Halffacet.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/Halffacet.h $ +// $Id: include/CGAL/Nef_3/Halffacet.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/ID_support_handler.h b/thirdparty/CGAL/include/CGAL/Nef_3/ID_support_handler.h index 467b9b2b..e29b0408 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/ID_support_handler.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/ID_support_handler.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/ID_support_handler.h $ -// $Id: ID_support_handler.h 2a5fcdc 2022-04-13T12:59:21+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/ID_support_handler.h $ +// $Id: include/CGAL/Nef_3/ID_support_handler.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/Infimaximal_box.h b/thirdparty/CGAL/include/CGAL/Nef_3/Infimaximal_box.h index 6560f6ee..f18e64b1 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/Infimaximal_box.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/Infimaximal_box.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h $ -// $Id: Infimaximal_box.h e9d41d7 2020-04-21T10:03:00+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h $ +// $Id: include/CGAL/Nef_3/Infimaximal_box.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,6 +24,7 @@ #include #include +#include namespace CGAL { @@ -151,7 +152,7 @@ class Infimaximal_box { create_vertices_on_infibox(SNC_constructor&, const Plane_3&, const std::list&, const Mark&, const Mark&, const Mark&) { - // TODO: warning oder assertion einbauen + // TODO: create warning or assertion return std::list(); } diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/K3_tree.h b/thirdparty/CGAL/include/CGAL/Nef_3/K3_tree.h index e3ed416c..5b6030b7 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/K3_tree.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/K3_tree.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/K3_tree.h $ -// $Id: K3_tree.h 68d896b 2022-04-13T11:53:02+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/K3_tree.h $ +// $Id: include/CGAL/Nef_3/K3_tree.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,15 +20,14 @@ #include #include #include +#include #include #include -#include +#include -#include #include #include -#include #undef CGAL_NEF_DEBUG #define CGAL_NEF_DEBUG 503 @@ -249,7 +248,7 @@ typedef Smaller_than< Iterator( const Node_handle root, const Segment_3& s) { CGAL_assertion_code( first_segment = true); S.push_front( Candidate( root, s)); - ++(*this); // place the interator in the first intersected cell + ++(*this); // place the iterator in the first intersected cell } Iterator( const Self& i) : S(i.S), node(i.node) {} Self& operator++() { @@ -553,7 +552,7 @@ Node_handle build_kdtree(Vertex_list& V, Halfedge_list& E, Halffacet_list& F, non_efective_splits = 0; if(non_efective_splits > 2) { - CGAL_NEF_TRACEN("build_kdtree: non efective splits reached maximum"); + CGAL_NEF_TRACEN("build_kdtree: non effective splits reached maximum"); nodes.push_back(Node(V, E, F)); return &(nodes.back()); } @@ -671,10 +670,10 @@ Segment_3 ray_to_segment(const Ray_3& r) const { CGAL_NEF_TRACEN("Objects_along_ray: input ray: "< - -#include +#include +#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/Nef_box.h b/thirdparty/CGAL/include/CGAL/Nef_3/Nef_box.h index d27d7b1c..dec74f5b 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/Nef_box.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/Nef_box.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/Nef_box.h $ -// $Id: Nef_box.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/Nef_box.h $ +// $Id: include/CGAL/Nef_3/Nef_box.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Peter Hachenberger @@ -16,7 +16,11 @@ #include #include +#include +#include #include +#include +#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/OGL_helper.h b/thirdparty/CGAL/include/CGAL/Nef_3/OGL_helper.h index 787b162e..a00b0905 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/OGL_helper.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/OGL_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/OGL_helper.h $ -// $Id: OGL_helper.h e0e4874 2021-09-15T15:48:35+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/OGL_helper.h $ +// $Id: include/CGAL/Nef_3/OGL_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -123,7 +123,7 @@ namespace OGL { // DFacet stores the facet cycle vertices in a continuus C array // of three double components, this is necessary due to the OpenGL - // tesselator input format ! + // tessellator input format ! class DFacet { typedef std::vector Coord_vector; typedef std::vector Cycle_vector; diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/Pluecker_line_3.h b/thirdparty/CGAL/include/CGAL/Nef_3/Pluecker_line_3.h index 8cd8cf6a..9c549cd4 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/Pluecker_line_3.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/Pluecker_line_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/Pluecker_line_3.h $ -// $Id: Pluecker_line_3.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/Pluecker_line_3.h $ +// $Id: include/CGAL/Nef_3/Pluecker_line_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SFace.h b/thirdparty/CGAL/include/CGAL/Nef_3/SFace.h index ca0dcdd1..2d4fffd5 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SFace.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SFace.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SFace.h $ -// $Id: SFace.h 2d4a857 2022-03-12T12:06:17+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SFace.h $ +// $Id: include/CGAL/Nef_3/SFace.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -29,7 +29,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -39,7 +39,7 @@ class SFace_base { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Vertex_handle Vertex_handle; diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SHalfedge.h b/thirdparty/CGAL/include/CGAL/Nef_3/SHalfedge.h index c63b15c3..dc72e1c4 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SHalfedge.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SHalfedge.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SHalfedge.h $ -// $Id: SHalfedge.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SHalfedge.h $ +// $Id: include/CGAL/Nef_3/SHalfedge.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -29,7 +30,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -39,7 +40,7 @@ class SHalfedge_base { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Sphere_circle Sphere_circle; diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SHalfloop.h b/thirdparty/CGAL/include/CGAL/Nef_3/SHalfloop.h index 78f76397..e90f1827 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SHalfloop.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SHalfloop.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SHalfloop.h $ -// $Id: SHalfloop.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SHalfloop.h $ +// $Id: include/CGAL/Nef_3/SHalfloop.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SM_visualizor.h b/thirdparty/CGAL/include/CGAL/Nef_3/SM_visualizor.h index 2051652f..301fe65b 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SM_visualizor.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SM_visualizor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SM_visualizor.h $ -// $Id: SM_visualizor.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SM_visualizor.h $ +// $Id: include/CGAL/Nef_3/SM_visualizor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_FM_decorator.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_FM_decorator.h index f4b578c3..dfdb1455 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_FM_decorator.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_FM_decorator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_FM_decorator.h $ -// $Id: SNC_FM_decorator.h 0a8ef64 2022-03-11T22:48:44+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_FM_decorator.h $ +// $Id: include/CGAL/Nef_3/SNC_FM_decorator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif #include #include @@ -413,7 +413,7 @@ class SNC_FM_decorator : public SNC_decorator { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO Edge_of[geninfo::access(info(e_min->twin()->source()->twin()->source()))]; #else - Edge_of[ boost::any_cast(info(e_min->twin()->source()->twin()->source())) ]; + Edge_of[ std::any_cast(info(e_min->twin()->source()->twin()->source())) ]; #endif CGAL_assertion( e_below != SHalfedge_handle() ); CGAL_NEF_TRACEN(" edge below " << debug(e_below)); @@ -652,7 +652,7 @@ create_facet_objects(const Plane_3& plane_supporting_facet, #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO Edge_of[geninfo::access(info(l->incident_sface()->center_vertex()))]; #else - Edge_of[ boost::any_cast(info(l->incident_sface()->center_vertex())) ]; + Edge_of[ std::any_cast(info(l->incident_sface()->center_vertex())) ]; #endif CGAL_assertion( e_below != SHalfedge_handle() ); diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_SM_explorer.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_SM_explorer.h index 9621fc59..5638c442 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_SM_explorer.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_SM_explorer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h $ -// $Id: SNC_SM_explorer.h 7322c79 2022-11-21T14:09:08+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h $ +// $Id: include/CGAL/Nef_3/SNC_SM_explorer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_SM_overlayer.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_SM_overlayer.h index fcb77328..bb2c73ad 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_SM_overlayer.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_SM_overlayer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_SM_overlayer.h $ -// $Id: SNC_SM_overlayer.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_SM_overlayer.h $ +// $Id: include/CGAL/Nef_3/SNC_SM_overlayer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif #include #include diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_SM_visualizor.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_SM_visualizor.h index ea34a7cb..8836141a 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_SM_visualizor.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_SM_visualizor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_SM_visualizor.h $ -// $Id: SNC_SM_visualizor.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_SM_visualizor.h $ +// $Id: include/CGAL/Nef_3/SNC_SM_visualizor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_const_decorator.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_const_decorator.h index fd816994..d94040cd 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_const_decorator.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_const_decorator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_const_decorator.h $ -// $Id: SNC_const_decorator.h 142fac6 2021-06-25T09:47:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_const_decorator.h $ +// $Id: include/CGAL/Nef_3/SNC_const_decorator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -32,7 +32,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -118,7 +118,7 @@ class SNC_const_decorator { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif SNC_const_decorator() : sncp_(0) {} @@ -303,7 +303,7 @@ class SNC_const_decorator { } else if(fc.is_svertex()) { #ifdef CGAL_USE_TRACE - // TODO: is there any warranty that the outter facet cycle enty point is always at first + // TODO: is there any warranty that the outer facet cycle entry point is always at first // in the cycles list? ++fc; while( fc != fce) { CGAL_assertion( fc.is_svertex()); ++fc; } CGAL_NEF_TRACEN( "no adjacent facets were found (but incident edge(s))."); @@ -369,10 +369,10 @@ class SNC_const_decorator { continue; } - // We have to comapare the two skalar products sk0 and sk1. Therefore + // We have to comapare the two scalar products sk0 and sk1. Therefore // we have to normalize the input vectors vec0 and vec1, which means // that we have to divide them by their lengths len0 and len1. - // To cicumvent irrational numbers, we sqaure the whole inequality. + // To cicumvent irrational numbers, we square the whole inequality. FT len0 = vec0.x()*vec0.x()+vec0.y()*vec0.y()+vec0.z()*vec0.z(); FT len1 = vec1.x()*vec1.x()+vec1.y()*vec1.y()+vec1.z()*vec1.z(); @@ -441,7 +441,7 @@ class SNC_const_decorator { Objects are marked as done, when placed in the output list. We have to maintain a stack of sface candidates (the spherical rubber sectors that provide connectivity at the local graphs of vertices) and facet -candiates (the plane pieces in three space also providing +candidates (the plane pieces in three space also providing connectivity). Note that we have to take care about the orientation of sobjects and facets. We have to take care that (1) the search along the shell extends along the whole shell structure (2) does not visit diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_constructor.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_constructor.h index 67f872a8..2450438c 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_constructor.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_constructor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_constructor.h $ -// $Id: SNC_constructor.h 2067913 2022-03-29T17:46:56+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_constructor.h $ +// $Id: include/CGAL/Nef_3/SNC_constructor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,12 +24,13 @@ #include #include #include -#include +#include #include #include +#include #include +#include #include -#include #ifdef SM_VISUALIZOR #include #endif // SM_VISUALIZOR diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_decorator.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_decorator.h index b1a3d843..3947a52f 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_decorator.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_decorator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_decorator.h $ -// $Id: SNC_decorator.h 1009acb 2022-03-10T18:24:07+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_decorator.h $ +// $Id: include/CGAL/Nef_3/SNC_decorator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -36,7 +36,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -157,7 +157,7 @@ class SNC_decorator : public SNC_const_decorator { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif SNC_decorator() : Base(), sncp_() {} diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_decorator_traits.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_decorator_traits.h index 8d6d4e3d..e3b2a3c5 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_decorator_traits.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_decorator_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_decorator_traits.h $ -// $Id: SNC_decorator_traits.h 252aab7 2022-03-19T12:16:25+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_decorator_traits.h $ +// $Id: include/CGAL/Nef_3/SNC_decorator_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_external_structure.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_external_structure.h index c3e12b43..4961ced0 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_external_structure.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_external_structure.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_external_structure.h $ -// $Id: SNC_external_structure.h 9567522 2022-04-19T17:02:20+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_external_structure.h $ +// $Id: include/CGAL/Nef_3/SNC_external_structure.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -40,77 +40,6 @@ namespace CGAL { -struct int_lt { - bool operator()(const int& i1, const int& i2) const { return i1 -struct Halfedge_key_lt4 { - - bool operator()(const Edge_handle& e1, const Edge_handle& e2) const { - if(CGAL::sign(e1->point().x()) != 0) { - if(e1->source() != e2->source()) - return CGAL::compare_x(e1->source()->point(), e2->source()->point()) < 0; - else - return e1->point().x() < 0; - } - if(CGAL::sign(e1->point().y()) != 0) { - if(e1->source() != e2->source()) - return CGAL::compare_y(e1->source()->point(), e2->source()->point()) < 0; - else - return e1->point().y() < 0; - } - if(e1->source() != e2->source()) - return CGAL::compare_z(e1->source()->point(), e2->source()->point()) < 0; - return e1->point().z() < 0; - } -}; - -template -struct Halfedge_key_lt3 { - - bool operator()(const Edge_handle& e1, const Edge_handle& e2) const { - if(e1->source() != e2->source()) - return CGAL::lexicographically_xyz_smaller(e1->source()->point(), e2->source()->point()); - if(CGAL::sign(e1->point().x()) != 0) - return e1->point().x() < 0; - if(CGAL::sign(e1->point().y()) != 0) - return e1->point().y() < 0; - return e1->point().z() < 0; - } -}; - -template -struct Halfedge_key { - typedef Halfedge_key Self; - Point p; int i; Edge e; - Halfedge_key(Point pi, int ii, Edge ei) : - p(pi), i(ii), e(ei) {} - Halfedge_key(const Self& k) : p(k.p), i(k.i), e(k.e) {} - Self& operator=(const Self& k) { p=k.p; i=k.i; e=k.e; return *this; } - bool operator==(const Self& k) const { return p==k.p && i==k.i; } - bool operator!=(const Self& k) const { return !operator==(k); } -}; - -template -struct Halfedge_key_lt { - typedef Halfedge_key Key; - typedef typename Point::R R; - typedef typename R::Vector_3 Vector; - typedef typename R::Direction_3 Direction; - bool operator()( const Key& k1, const Key& k2) const { - if( k1.e->source() == k2.e->source()) - return (k1.i < k2.i); - Direction l(k1.e->vector()); - if( k1.i < 0) l = -l; - return (Direction( k2.p - k1.p) == l); - } -}; - -template -std::ostream& operator<<(std::ostream& os, - const Halfedge_key& k ) -{ os << k.p << " " << k.i; return os; } - template int sign_of(const CGAL::Plane_3& h) { if ( h.c() != 0 ) return CGAL_NTS sign(h.c()); @@ -809,7 +738,7 @@ class SNC_external_structure_base : public SNC_decorator SFace_iterator f; // First, we classify all the Shere Faces per Shell. For each Shell we - // determine its minimum lexicographyly vertex and we check wheter the + // determine its minimum lexicographyly vertex and we check whether the // Shell encloses a region (closed surface) or not. CGAL_forall_sfaces(f,*this->sncp()) { // progress++; @@ -898,8 +827,7 @@ class SNC_external_structure_base : public SNC_decorator if ( f->volume() != Volume_handle() ) continue; CGAL_NEF_TRACEN( "Outer shell #" << ShellSf[f] << " volume?"); - Volume_handle c = determine_volume( MinimalSFace[ShellSf[f]], - MinimalSFace, ShellSf ); + Volume_handle c = determine_volume( f, MinimalSFace, ShellSf ); c->mark() = f->mark(); link_as_outer_shell( f, c ); } @@ -927,7 +855,7 @@ class SNC_external_structure_base : public SNC_decorator // The ray here has an special property since it is shooted from the lowest // vertex in a shell, so it would be expected that the ray goes along the // interior of a volume before it hits a 2-skeleton element. - // Unfortunatelly, it seems to be possible that several shells are incident + // Unfortunately, it seems to be possible that several shells are incident // to this lowest vertex, and in consequence, the ray could also go along // an edge or a facet belonging to a different shell. // This fact invalidates the precondition of the get_visible_facet method, diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_halfedge_key.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_halfedge_key.h new file mode 100644 index 00000000..48872e61 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_halfedge_key.h @@ -0,0 +1,95 @@ +// Copyright (c) 1997-2002 Max-Planck-Institute Saarbruecken (Germany). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_halfedge_key.h $ +// $Id: include/CGAL/Nef_3/SNC_halfedge_key.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Peter Hachenberger + +#ifndef CGAL_SNC_HALFEDGE_KEY_H +#define CGAL_SNC_HALFEDGE_KEY_H + +#include + +#include + +namespace CGAL { + +struct int_lt { + bool operator()(const int& i1, const int& i2) const { return i1 +struct Halfedge_key_lt4 { + + bool operator()(const Edge_handle& e1, const Edge_handle& e2) const { + if(CGAL::sign(e1->point().x()) != 0) { + if(e1->source() != e2->source()) + return CGAL::compare_x(e1->source()->point(), e2->source()->point()) < 0; + else + return e1->point().x() < 0; + } + if(CGAL::sign(e1->point().y()) != 0) { + if(e1->source() != e2->source()) + return CGAL::compare_y(e1->source()->point(), e2->source()->point()) < 0; + else + return e1->point().y() < 0; + } + if(e1->source() != e2->source()) + return CGAL::compare_z(e1->source()->point(), e2->source()->point()) < 0; + return e1->point().z() < 0; + } +}; + +template +struct Halfedge_key_lt3 { + + bool operator()(const Edge_handle& e1, const Edge_handle& e2) const { + if(e1->source() != e2->source()) + return CGAL::lexicographically_xyz_smaller(e1->source()->point(), e2->source()->point()); + if(CGAL::sign(e1->point().x()) != 0) + return e1->point().x() < 0; + if(CGAL::sign(e1->point().y()) != 0) + return e1->point().y() < 0; + return e1->point().z() < 0; + } +}; + +template +struct Halfedge_key { + typedef Halfedge_key Self; + Point p; int i; Edge e; + Halfedge_key(Point pi, int ii, Edge ei) : + p(pi), i(ii), e(ei) {} + Halfedge_key(const Self& k) : p(k.p), i(k.i), e(k.e) {} + Self& operator=(const Self& k) { p=k.p; i=k.i; e=k.e; return *this; } + bool operator==(const Self& k) const { return p==k.p && i==k.i; } + bool operator!=(const Self& k) const { return !operator==(k); } +}; + +template +struct Halfedge_key_lt { + typedef Halfedge_key Key; + typedef typename Point::R R; + typedef typename R::Vector_3 Vector; + typedef typename R::Direction_3 Direction; + bool operator()( const Key& k1, const Key& k2) const { + if( k1.e->source() == k2.e->source()) + return (k1.i < k2.i); + Direction l(k1.e->vector()); + if( k1.i < 0) l = -l; + return (Direction( k2.p - k1.p) == l); + } +}; + +template +std::ostream& operator<<(std::ostream& os, + const Halfedge_key& k ) +{ os << k.p << " " << k.i; return os; } + +} +#endif //CGAL_SNC_HALFEDGE_KEY_H diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_indexed_items.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_indexed_items.h index 14eecbe9..44aae91f 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_indexed_items.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_indexed_items.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_indexed_items.h $ -// $Id: SNC_indexed_items.h 2a54687 2021-06-04T13:52:14+02:00 albert-github +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_indexed_items.h $ +// $Id: include/CGAL/Nef_3/SNC_indexed_items.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_intersection.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_intersection.h index 62886d32..9a07468b 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_intersection.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_intersection.h $ -// $Id: SNC_intersection.h dc18d7a 2022-03-22T21:00:57+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_intersection.h $ +// $Id: include/CGAL/Nef_3/SNC_intersection.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -197,7 +197,7 @@ class SNC_intersection { if( outer_bound_pos != CGAL::ON_BOUNDED_SIDE ) return outer_bound_pos; /* The point p is not in the relative interior of the outer face cycle - so it is not necesary to know the possition of p with respect to the + so it is not necessary to know the position of p with respect to the inner face cycles */ Halffacet_cycle_const_iterator fe = f->facet_cycles_end(); ++fc; @@ -226,7 +226,7 @@ class SNC_intersection { if( inner_bound_pos != CGAL::ON_UNBOUNDED_SIDE ) return opposite(inner_bound_pos); /* At this point the point p belongs to relative interior of the facet's - outer cycle, and its possition is completely known when it belongs + outer cycle, and its position is completely known when it belongs to the clousure of any inner cycle */ } return CGAL::ON_BOUNDED_SIDE; diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_io_parser.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_io_parser.h index ec80a6f8..86fcf483 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_io_parser.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_io_parser.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h $ -// $Id: SNC_io_parser.h c552735 2021-09-29T11:46:49+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h $ +// $Id: include/CGAL/Nef_3/SNC_io_parser.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -38,7 +37,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif #include @@ -964,7 +963,7 @@ class SNC_io_parser : public SNC_decorator #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif using Base::visit_shell_objects; diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_items.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_items.h index a5e517ae..17a06038 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_items.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_items.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_items.h $ -// $Id: SNC_items.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_items.h $ +// $Id: include/CGAL/Nef_3/SNC_items.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_iteration.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_iteration.h index 90042890..e251ef1d 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_iteration.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_iteration.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_iteration.h $ -// $Id: SNC_iteration.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_iteration.h $ +// $Id: include/CGAL/Nef_3/SNC_iteration.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_k3_tree_traits.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_k3_tree_traits.h index 2e9c65f4..7da36142 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_k3_tree_traits.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_k3_tree_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_k3_tree_traits.h $ -// $Id: SNC_k3_tree_traits.h 263c168 2022-03-10T18:24:07+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_k3_tree_traits.h $ +// $Id: include/CGAL/Nef_3/SNC_k3_tree_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -185,7 +185,7 @@ Comparison_result cr; /* An edge is considered intersecting a plane if its endpoints lie on the - plane or if they lie on diferent sides. Partial tangency is not considered + plane or if they lie on different sides. Partial tangency is not considered as intersection, due the fact that a lower dimensional face (the vertex) should be already reported as an object intersecting the plane. */ @@ -209,9 +209,9 @@ Side_of_plane::operator()(Halfedge_handle e) { /* - As for the edges, if a facet is tanget to the plane it is not considered as - a interesection since lower dimensional faces, like the edges and vertices - where the tangency occurrs, should be reported as the objects intersecting + As for the edges, if a facet is tangent to the plane it is not considered as + a intersection since lower dimensional faces, like the edges and vertices + where the tangency occurs, should be reported as the objects intersecting the plane. So, an intersection is reported if all vertices of the facet lie on plane, for which it is only necessary to check three vertices, or if the facet diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_list.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_list.h index bbd4ef66..014822d8 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_list.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_list.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_list.h $ -// $Id: SNC_list.h e5f4796 2022-03-19T12:43:38+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_list.h $ +// $Id: include/CGAL/Nef_3/SNC_list.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_point_locator.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_point_locator.h index 94fb982b..84df6971 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_point_locator.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_point_locator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_point_locator.h $ -// $Id: SNC_point_locator.h 36f2260 2022-04-14T08:36:36+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_point_locator.h $ +// $Id: include/CGAL/Nef_3/SNC_point_locator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -225,6 +225,22 @@ class SNC_point_locator_by_spatial_subdivision : delete candidate_provider; } + // We next check if v is a vertex on the face to avoid a geometric test + static inline bool v_vertex_of_f(Vertex_handle v, Halffacet_handle f) { + Halffacet_cycle_iterator fci; + for(fci=f->facet_cycles_begin(); fci!=f->facet_cycles_end(); ++fci) { + if(fci.is_shalfedge()) { + SHalfedge_around_facet_circulator sfc(fci), send(sfc); + CGAL_For_all(sfc,send) { + if(sfc->source()->center_vertex() == v){ + return true; + } + } + } + } + return false; + } + virtual Object_handle shoot(const Ray_3& ray, int mask=255) const { Vertex_handle null_handle; return this->shoot(ray, null_handle, mask); @@ -301,21 +317,23 @@ class SNC_point_locator_by_spatial_subdivision : Point_3 q; _CGAL_NEF_TRACEN("trying facet with on plane "<plane()<< " with point on "<plane().point()); - if( SNC_intersection::does_intersect_internally( ray, f, q) ) { - _CGAL_NEF_TRACEN("ray intersects facet on "<is_point_in_node( q, n)); - if( !candidate_provider->is_point_in_node( q, n)) - continue; - eor = q; - f_res = f; - solution = is_facet_; - hit = true; - _CGAL_NEF_TRACEN("the facet becomes the new hit object"); + if( (ray_source_vertex == Vertex_handle()) || !v_vertex_of_f(ray_source_vertex,f) ) { + if( SNC_intersection::does_intersect_internally( ray, f, q) ) { + _CGAL_NEF_TRACEN("ray intersects facet on "<is_point_in_node( q, n)); + if( !candidate_provider->is_point_in_node( q, n)) + continue; + eor = q; + f_res = f; + solution = is_facet_; + hit = true; + _CGAL_NEF_TRACEN("the facet becomes the new hit object"); + } } } } @@ -434,22 +452,7 @@ class SNC_point_locator_by_spatial_subdivision : return make_object(f); } - // We next check if v is a vertex on the face to avoid a geometric test - bool v_vertex_of_f = false; - Halffacet_cycle_iterator fci; - for(fci=f->facet_cycles_begin(); (! v_vertex_of_f) && (fci!=f->facet_cycles_end()); ++fci) { - if(fci.is_shalfedge()) { - SHalfedge_around_facet_circulator sfc(fci), send(sfc); - CGAL_For_all(sfc,send) { - if(sfc->source()->center_vertex() == v){ - v_vertex_of_f = true; - break; - } - } - } - } - - if( (! v_vertex_of_f) && SNC_intersection::does_intersect_internally(s,f,ip) ) { + if( !v_vertex_of_f(v,f) && SNC_intersection::does_intersect_internally(s,f,ip) ) { s = Segment_3(p, normalized(ip)); f_res = f; solution = is_facet_; diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_simplify.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_simplify.h index 4d22e50b..f312c774 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_simplify.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_simplify.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_simplify.h $ -// $Id: SNC_simplify.h 0357455 2022-03-18T18:25:40+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_simplify.h $ +// $Id: include/CGAL/Nef_3/SNC_simplify.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -111,7 +111,7 @@ class SNC_simplify_base : public SNC_decorator { if ( SD.is_closed_at_source( u->twin()) ) SD.set_face( tgt, fu); /* TO VERIFY: does is_closed_at_source(u) imply is_isolated(src)? - if it is true, the svertex face update is not necesary. */ + if it is true, the svertex face update is not necessary. */ SHalfedge_around_facet_circulator next = u; ++next; @@ -127,7 +127,7 @@ class SNC_simplify_base : public SNC_decorator { } else if(fc.is_shalfloop()) { SHalfloop_handle l(fc); - // this code is currenlty not used, but it is potentially need + // this code is currently not used, but it is potentially need // in the future, e.g for complex marks or a relative interior // function SFace_handle fu = l->incident_sface(), ftu = l->twin()->incident_sface(); @@ -144,7 +144,7 @@ class SNC_simplify_base : public SNC_decorator { } bool is_part_of_volume(Vertex_handle v) - /* determines if a vertex v is part of a volume, cheking if its local + /* determines if a vertex v is part of a volume, checking if its local graph is trivial (only one sface with no boundary). */ { SM_decorator SD(&*v); CGAL_assertion( !is_empty_range( SD.sfaces_begin(), SD.sfaces_end())); @@ -169,7 +169,7 @@ class SNC_simplify_base : public SNC_decorator { } bool is_part_of_edge(Vertex_handle v) { - /* determines if a vertex v is part of a edge, checking at its local + /* determines if a vertex v is part of an edge, checking at its local graph for exactly two antipodal vertices */ SM_decorator SD(&*v); diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_sphere_map.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_sphere_map.h index e8ae1a56..142eeae7 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_sphere_map.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_sphere_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h $ -// $Id: SNC_sphere_map.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h $ +// $Id: include/CGAL/Nef_3/SNC_sphere_map.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #undef CGAL_NEF_DEBUG diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_structure.h b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_structure.h index 075e42e3..d2f879c0 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/SNC_structure.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/SNC_structure.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/SNC_structure.h $ -// $Id: SNC_structure.h 4c4aeb7 2022-03-29T17:47:51+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/SNC_structure.h $ +// $Id: include/CGAL/Nef_3/SNC_structure.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -34,7 +34,7 @@ #include #include -#include +#include #include namespace CGAL { @@ -56,6 +56,7 @@ void merge_sets( Object o1, Object o2, Hash_map& hash, Union_find& uf) { template class SNC_sphere_map; template class SM_decorator; template class SNC_decorator; +template class SNC_io_parser; /*{\Manpage {SNC_structure}{Items}{Selective Nef Complex}{C}}*/ @@ -383,13 +384,13 @@ the local graph or added for the comfort of the user.}*/ expensive operation.}*/ SNC_structure() : - boundary_item_(boost::none), sm_boundary_item_(boost::none), + boundary_item_(std::nullopt), sm_boundary_item_(std::nullopt), vertices_(), halfedges_(), halffacets_(), volumes_(), shalfedges_(), shalfloops_(), sfaces_() {} ~SNC_structure() { CGAL_NEF_TRACEN("~SNC_structure: clearing "< bool is_boundary_object(H h) const - { return boundary_item_[h]!=boost::none; } + { return boundary_item_[h]!=std::nullopt; } template bool is_sm_boundary_object(H h) const - { return sm_boundary_item_[h]!=boost::none; } + { return sm_boundary_item_[h]!=std::nullopt; } template Object_iterator& boundary_item(H h) @@ -461,12 +462,12 @@ the local graph or added for the comfort of the user.}*/ template void undef_boundary_item(H h) - { CGAL_assertion(boundary_item_[h]!=boost::none); - boundary_item_[h] = boost::none; } + { CGAL_assertion(boundary_item_[h]!=std::nullopt); + boundary_item_[h] = std::nullopt; } template void undef_sm_boundary_item(H h) - { CGAL_assertion(sm_boundary_item_[h]!=boost::none); - sm_boundary_item_[h] = boost::none; } + { CGAL_assertion(sm_boundary_item_[h]!=std::nullopt); + sm_boundary_item_[h] = std::nullopt; } void reset_iterator_hash(Object_iterator it) { SVertex_handle sv; @@ -1034,7 +1035,7 @@ the local graph or added for the comfort of the user.}*/ protected: void pointer_update(const Self& D); - typedef boost::optional Optional_object_iterator ; + typedef std::optional Optional_object_iterator ; private: Generic_handle_map boundary_item_; Generic_handle_map sm_boundary_item_; diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/Vertex.h b/thirdparty/CGAL/include/CGAL/Nef_3/Vertex.h index 969c7309..59123b15 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/Vertex.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/Vertex.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/Vertex.h $ -// $Id: Vertex.h 2d4a857 2022-03-12T12:06:17+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/Vertex.h $ +// $Id: include/CGAL/Nef_3/Vertex.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -30,7 +30,7 @@ #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -41,7 +41,7 @@ class Vertex_base { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Point_3 Point_3; @@ -128,7 +128,7 @@ class Vertex_base { Refs*& sncp() { return sncp_; } /* all sobjects of the local graph are stored in a global list - where each vertex has a continous range in each list for its + where each vertex has a continuous range in each list for its sobjects. All objects of the range [sxxx_begin_,sxxx_last_] belong to a vertex. This range is empty iff sxxx_begin_ == sxxx_last_ == sncp()->sxxx_end() diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/Volume.h b/thirdparty/CGAL/include/CGAL/Nef_3/Volume.h index 95d4b74f..7cc96bdd 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/Volume.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/Volume.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/Volume.h $ -// $Id: Volume.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/Volume.h $ +// $Id: include/CGAL/Nef_3/Volume.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/binop_intersection_tests.h b/thirdparty/CGAL/include/CGAL/Nef_3/binop_intersection_tests.h index 0913b52f..56b63de3 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/binop_intersection_tests.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/binop_intersection_tests.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h $ -// $Id: binop_intersection_tests.h ddce635 2022-04-06T23:10:06+01:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h $ +// $Id: include/CGAL/Nef_3/binop_intersection_tests.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,9 +17,8 @@ #include #include +#include #include -#include -#include namespace CGAL { @@ -41,21 +40,6 @@ struct binop_intersection_test_segment_tree { struct Bop_edge0_face1_callback { Callback &cb; - struct Pair_hash_function { - typedef std::size_t result_type; - - template - std::size_t - operator() (const H& h) const { - return - std::size_t(&*(h.first)) / sizeof - (typename std::iterator_traits::value_type) - + - std::size_t(&*(h.second)) / sizeof - (typename std::iterator_traits::value_type); - } - }; - Bop_edge0_face1_callback(Callback &cb) : cb(cb) {} @@ -76,7 +60,6 @@ struct binop_intersection_test_segment_tree { } }; - template struct Bop_edge1_face0_callback { Callback &cb; @@ -126,55 +109,40 @@ struct binop_intersection_test_segment_tree { template void operator()(Callback& cb0, Callback& cb1, - SNC_structure& sncp, - SNC_structure& snc1i) + const SNC_structure& snc0, + const SNC_structure& snc1) { Halfedge_iterator e0, e1; Halffacet_iterator f0, f1; - std::vector a, b; + std::vector e0boxes, e1boxes, f0boxes, f1boxes; + + e0boxes.reserve(snc0.number_of_halfedges()); + e1boxes.reserve(snc1.number_of_halfedges()); + f0boxes.reserve(snc0.number_of_halffacets()); + f1boxes.reserve(snc1.number_of_halffacets()); + + CGAL_forall_edges( e0, snc0) e0boxes.push_back( Nef_box( e0 ) ); + CGAL_forall_edges( e1, snc1) e1boxes.push_back( Nef_box( e1 ) ); + CGAL_forall_facets( f0, snc0) f0boxes.push_back( Nef_box( f0 ) ); + CGAL_forall_facets( f1, snc1) f1boxes.push_back( Nef_box( f1 ) ); CGAL_NEF_TRACEN("start edge0 edge1"); Bop_edge0_edge1_callback callback_edge0_edge1( cb0 ); - CGAL_forall_edges( e0, sncp) a.push_back( Nef_box( e0 ) ); - CGAL_forall_edges( e1, snc1i) b.push_back( Nef_box( e1 ) ); -#ifdef CGAL_NEF3_BOX_INTERSECTION_CUTOFF - box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), - callback_edge0_edge1, - CGAL_NEF3_BOX_INTERSECTION_CUTOFF,); -#else - box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), + box_intersection_d( e0boxes.begin(), e0boxes.end(), + e1boxes.begin(), e1boxes.end(), callback_edge0_edge1); -#endif - a.clear(); - b.clear(); CGAL_NEF_TRACEN("start edge0 face1"); Bop_edge0_face1_callback callback_edge0_face1( cb0 ); - CGAL_forall_edges( e0, sncp ) a.push_back( Nef_box( e0 ) ); - CGAL_forall_facets( f1, snc1i) b.push_back( Nef_box( f1 ) ); -#ifdef CGAL_NEF3_BOX_INTERSECTION_CUTOFF - box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), - callback_edge0_face1, - CGAL_NEF3_BOX_INTERSECTION_CUTOFF); -#else - box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), + box_intersection_d( e0boxes.begin(), e0boxes.end(), + f1boxes.begin(), f1boxes.end(), callback_edge0_face1); -#endif - a.clear(); - b.clear(); CGAL_NEF_TRACEN("start edge1 face0"); Bop_edge1_face0_callback callback_edge1_face0( cb1 ); - CGAL_forall_edges( e1, snc1i) a.push_back( Nef_box( e1 ) ); - CGAL_forall_facets( f0, sncp ) b.push_back( Nef_box( f0 ) ); -#ifdef CGAL_NEF3_BOX_INTERSECTION_CUTOFF - box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), - callback_edge1_face0, - CGAL_NEF3_BOX_INTERSECTION_CUTOFF); -#else - box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), + box_intersection_d( e1boxes.begin(), e1boxes.end(), + f0boxes.begin(), f0boxes.end(), callback_edge1_face0); -#endif } }; diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/bounded_side_3.h b/thirdparty/CGAL/include/CGAL/Nef_3/bounded_side_3.h index f4c445b3..88c8b188 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/bounded_side_3.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/bounded_side_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/bounded_side_3.h $ -// $Id: bounded_side_3.h 7cb53ab 2021-11-03T17:30:26+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/bounded_side_3.h $ +// $Id: include/CGAL/Nef_3/bounded_side_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h b/thirdparty/CGAL/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h index 533f5b6c..3566147f 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h $ -// $Id: polygon_mesh_to_nef_3.h f1f201b 2022-06-29T10:47:14+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h $ +// $Id: include/CGAL/Nef_3/polygon_mesh_to_nef_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,10 +19,13 @@ #include - +#include #include #include #include +#include +#include +#include #include #undef CGAL_NEF_DEBUG diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/quotient_coordinates_to_homogeneous_point.h b/thirdparty/CGAL/include/CGAL/Nef_3/quotient_coordinates_to_homogeneous_point.h index ea0162e0..aff085e8 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/quotient_coordinates_to_homogeneous_point.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/quotient_coordinates_to_homogeneous_point.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/quotient_coordinates_to_homogeneous_point.h $ -// $Id: quotient_coordinates_to_homogeneous_point.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/quotient_coordinates_to_homogeneous_point.h $ +// $Id: include/CGAL/Nef_3/quotient_coordinates_to_homogeneous_point.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/shell_to_nef_3.h b/thirdparty/CGAL/include/CGAL/Nef_3/shell_to_nef_3.h index 9dce5b78..abdcec2e 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/shell_to_nef_3.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/shell_to_nef_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/shell_to_nef_3.h $ -// $Id: shell_to_nef_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/shell_to_nef_3.h $ +// $Id: include/CGAL/Nef_3/shell_to_nef_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_3/vertex_cycle_to_nef_3.h b/thirdparty/CGAL/include/CGAL/Nef_3/vertex_cycle_to_nef_3.h index 6f976fdd..b3fb1175 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_3/vertex_cycle_to_nef_3.h +++ b/thirdparty/CGAL/include/CGAL/Nef_3/vertex_cycle_to_nef_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_3/vertex_cycle_to_nef_3.h $ -// $Id: vertex_cycle_to_nef_3.h 30e536b 2021-03-01T08:06:48+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_3/vertex_cycle_to_nef_3.h $ +// $Id: include/CGAL/Nef_3/vertex_cycle_to_nef_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -28,10 +28,7 @@ #include // Nef polyhedra -#include -#include -#include -#include +#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/Generic_handle_map.h b/thirdparty/CGAL/include/CGAL/Nef_S2/Generic_handle_map.h index 02c18ca1..0728ce6b 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/Generic_handle_map.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/Generic_handle_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/Generic_handle_map.h $ -// $Id: Generic_handle_map.h 77054d4 2021-05-10T18:26:29+01:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/Generic_handle_map.h $ +// $Id: include/CGAL/Nef_S2/Generic_handle_map.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/ID_support_handler.h b/thirdparty/CGAL/include/CGAL/Nef_S2/ID_support_handler.h index 52e4711a..45266d6b 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/ID_support_handler.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/ID_support_handler.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/ID_support_handler.h $ -// $Id: ID_support_handler.h 8770c7a 2022-05-10T12:06:32+01:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/ID_support_handler.h $ +// $Id: include/CGAL/Nef_S2/ID_support_handler.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/Normalizing.h b/thirdparty/CGAL/include/CGAL/Nef_S2/Normalizing.h index c9dfaaf3..23a30663 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/Normalizing.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/Normalizing.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/Normalizing.h $ -// $Id: Normalizing.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/Normalizing.h $ +// $Id: include/CGAL/Nef_S2/Normalizing.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/OGL_base_object.h b/thirdparty/CGAL/include/CGAL/Nef_S2/OGL_base_object.h index 83b7a991..ca1d912b 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/OGL_base_object.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/OGL_base_object.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/OGL_base_object.h $ -// $Id: OGL_base_object.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/OGL_base_object.h $ +// $Id: include/CGAL/Nef_S2/OGL_base_object.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Peter Hachenberger @@ -13,6 +13,9 @@ #ifndef CGAL_OGL_BASE_OBJECT_H #define CGAL_OGL_BASE_OBJECT_H +#include + + #include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_checker.h b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_checker.h index df065b0f..c7dd2905 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_checker.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_checker.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/SM_checker.h $ -// $Id: SM_checker.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/SM_checker.h $ +// $Id: include/CGAL/Nef_S2/SM_checker.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_const_decorator.h b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_const_decorator.h index f48d9c00..2c953ff7 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_const_decorator.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_const_decorator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/SM_const_decorator.h $ -// $Id: SM_const_decorator.h 9c6712c 2021-02-08T19:32:33+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/SM_const_decorator.h $ +// $Id: include/CGAL/Nef_S2/SM_const_decorator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -32,7 +32,7 @@ #define CGAL_NEF_DEBUG 67 #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -75,7 +75,7 @@ typedef size_t Size_type; #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else -typedef boost::any GenPtr; +typedef std::any GenPtr; #endif @@ -192,7 +192,7 @@ SHalfedge_around_svertex_const_circulator SFace_cycle_const_iterator sface_cycles_begin(SFace_const_handle f) const /*{\Mop returns an iterator for all bounding face cycles of |f|. -The iterator is is convertable to |SVertex_const_handle|, +The iterator is is convertible to |SVertex_const_handle|, |SHalfloop_const_handle|, or |SHalfedge_const_handle|.}*/ { return f->boundary_entry_objects_.begin(); } @@ -299,13 +299,13 @@ check_integrity_and_topological_planarity(bool faces) const EI(shalfedges_begin(),shalfedges_end(),'e'); #endif SVertex_const_handle v; - int iso_vert_num=0; + CGAL_assertion_code(int iso_vert_num=0); /* check the source links of out edges and count isolated vertices */ CGAL_forall_svertices(v,*this) { if ( is_isolated(v) ) { if ( faces ) CGAL_assertion_msg(v->incident_sface() != SFace_const_handle(), get_svertex_index(v).c_str()); - ++iso_vert_num; + CGAL_assertion_code(++iso_vert_num); } else { CGAL_assertion_code(SHalfedge_const_handle e=first_out_edge(v)); CGAL_assertion_msg(e != SHalfedge_const_handle(), get_svertex_index(v).c_str()); @@ -358,6 +358,8 @@ check_integrity_and_topological_planarity(bool faces) const iso_vert_num + number_of_sloops()); CGAL_assertion_code(std::size_t f_num = number_of_sface_cycles() - c_num + 1); + CGAL_USE(fc_num); + CGAL_USE(iv_num); CGAL_assertion_code(CGAL_NEF_TRACEV(fc_num)); CGAL_assertion_code(CGAL_NEF_TRACEV(iv_num)); CGAL_assertion_code(CGAL_NEF_TRACEV(iso_vert_num)); @@ -368,7 +370,7 @@ check_integrity_and_topological_planarity(bool faces) const /* this means all face cycles and all isolated vertices are indeed referenced from a face */ /* every isolated vertex increases the component count - one face cycle per component is redundent except one + one face cycle per component is redundant except one finally check the Euler formula: */ CGAL_assertion( v_num - e_num + f_num == 1 + c_num ); } diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_constrained_triang_traits.h b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_constrained_triang_traits.h index 42449a9f..77637e4a 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_constrained_triang_traits.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_constrained_triang_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/SM_constrained_triang_traits.h $ -// $Id: SM_constrained_triang_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/SM_constrained_triang_traits.h $ +// $Id: include/CGAL/Nef_S2/SM_constrained_triang_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_decorator.h b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_decorator.h index ae777e20..21a80a1b 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_decorator.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_decorator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/SM_decorator.h $ -// $Id: SM_decorator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/SM_decorator.h $ +// $Id: include/CGAL/Nef_S2/SM_decorator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -31,7 +31,7 @@ #include #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -84,7 +84,7 @@ typedef typename Sphere_kernel::Aff_transformation_3 Aff_transformation_3; #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else -typedef boost::any GenPtr; +typedef std::any GenPtr; #endif typedef typename Map::SVertex SVertex; typedef typename Map::SVertex_handle SVertex_handle; @@ -231,7 +231,7 @@ Size_type number_of_sfaces() const SFace_cycle_iterator sface_cycles_begin(SFace_handle f) const /*{\Mop returns an iterator for all bounding face cycles of |f|. -The iterator is is convertable to |SVertex_handle|, +The iterator is is convertible to |SVertex_handle|, |SHalfloop_handle|, or |SHalfedge_handle|.}*/ { return f->boundary_entry_objects().begin(); } @@ -659,7 +659,7 @@ void link_as_target_of(SHalfedge_handle e, SVertex_handle v) const { link_as_source_of(e->twin(),v); } void set_adjacency_at_source_between(SHalfedge_handle e, SHalfedge_handle en) -/*{\Mop makes |e| and |en| neigbors in the cyclic ordered adjacency list +/*{\Mop makes |e| and |en| neighbors in the cyclic ordered adjacency list around |v=e->source()|. \precond |e->source()==en->source()|.}*/ { CGAL_assertion(e->source()==en->source()); link_as_prev_next_pair(en->twin(),e); diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_decorator_traits.h b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_decorator_traits.h index e71df974..56db606c 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_decorator_traits.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_decorator_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/SM_decorator_traits.h $ -// $Id: SM_decorator_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/SM_decorator_traits.h $ +// $Id: include/CGAL/Nef_S2/SM_decorator_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_io_parser.h b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_io_parser.h index 19662b03..cf8f79b4 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_io_parser.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_io_parser.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h $ -// $Id: SM_io_parser.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/SM_io_parser.h $ +// $Id: include/CGAL/Nef_S2/SM_io_parser.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -34,7 +34,7 @@ namespace CGAL { /*{\Manpage {SM_io_parser}{Decorator_}{IO of embedded maps}{IO}}*/ /*{\Mdefinition An instance |\Mvar| of the data type |\Mname| is a -decorator to provide input and output of a embedded map. |\Mtype| is +decorator to provide input and output of an embedded map. |\Mtype| is generic with respect to the |Decorator_| parameter. |Decorator_| has to be a decorator model of our |SM_decorator| concept.}*/ diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_items.h b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_items.h index 04698627..cc961383 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_items.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_items.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/SM_items.h $ -// $Id: SM_items.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/SM_items.h $ +// $Id: include/CGAL/Nef_S2/SM_items.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,7 +27,7 @@ #include #include #ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include +#include #endif namespace CGAL { @@ -45,7 +45,7 @@ struct SM_items { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Sphere_point Sphere_point; @@ -127,7 +127,7 @@ struct SM_items { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Sphere_circle Sphere_circle; @@ -228,7 +228,7 @@ struct SM_items { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Sphere_circle Sphere_circle; @@ -306,7 +306,7 @@ struct SM_items { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO typedef void* GenPtr; #else - typedef boost::any GenPtr; + typedef std::any GenPtr; #endif typedef typename Refs::Mark Mark; typedef typename Refs::Object_handle Object_handle; diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_iteration.h b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_iteration.h index eec62155..2344f1aa 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_iteration.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_iteration.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/SM_iteration.h $ -// $Id: SM_iteration.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/SM_iteration.h $ +// $Id: include/CGAL/Nef_S2/SM_iteration.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_list.h b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_list.h index b3094aeb..f6ec761f 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_list.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_list.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/SM_list.h $ -// $Id: SM_list.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/SM_list.h $ +// $Id: include/CGAL/Nef_S2/SM_list.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_overlayer.h b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_overlayer.h index 3570d51e..66f7090e 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_overlayer.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_overlayer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/SM_overlayer.h $ -// $Id: SM_overlayer.h 6e8f312 2022-06-20T11:57:23+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/SM_overlayer.h $ +// $Id: include/CGAL/Nef_S2/SM_overlayer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif #include #include @@ -106,7 +106,7 @@ struct SMO_from_segs { return geninfo::access(G.info(v)); #else return - boost::any_cast( G.info(v) ); + std::any_cast( G.info(v) ); #endif } @@ -122,7 +122,7 @@ struct SMO_from_segs { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(G.info(v)); #else - G.info(v)=boost::any(); + G.info(v)=std::any(); #endif } @@ -141,7 +141,7 @@ struct SMO_from_segs { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(G.info(v)); #else - G.info(v)=boost::any(); + G.info(v)=std::any(); #endif } @@ -564,7 +564,7 @@ class SM_overlayer : public SM_decorator_ { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(info(v)); #else - info(v)=boost::any(); + info(v)=std::any(); #endif } @@ -574,7 +574,7 @@ class SM_overlayer : public SM_decorator_ { return geninfo::access(info(v)); #else return - *boost::any_cast(&info(v)); + *std::any_cast(&info(v)); #endif } @@ -618,8 +618,8 @@ class SM_overlayer : public SM_decorator_ { geninfo::clear(info(e)); geninfo::clear(info(e->twin())); #else - info(e)=boost::any(); - info(e->twin())=boost::any(); + info(e)=std::any(); + info(e->twin())=std::any(); #endif } @@ -629,7 +629,7 @@ class SM_overlayer : public SM_decorator_ { return geninfo::access(info(e)); #else return - *boost::any_cast(&info(e)); + *std::any_cast(&info(e)); #endif } @@ -671,7 +671,7 @@ class SM_overlayer : public SM_decorator_ { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(info(f)); #else - info(f)=boost::any(); + info(f)=std::any(); #endif } @@ -681,7 +681,7 @@ class SM_overlayer : public SM_decorator_ { return geninfo::access(info(f)); #else return - *boost::any_cast(&info(f)); + *std::any_cast(&info(f)); #endif } @@ -1043,7 +1043,7 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const { CGAL_assertion(n<3); CGAL_NEF_TRACEN("n " << n); - CGAL_NEF_TRACEN("number of coordinats =0:" << n); + CGAL_NEF_TRACEN("number of coordinates =0:" << n); if(n==0) { if((chsp&60)!=60 && it->sphere_circle().orthogonal_vector().x()!=0) chsp|=60; diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_point_locator.h b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_point_locator.h index a4ebd39c..9d77f469 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_point_locator.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_point_locator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/SM_point_locator.h $ -// $Id: SM_point_locator.h 2334ec5 2021-03-10T18:40:03+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/SM_point_locator.h $ +// $Id: include/CGAL/Nef_S2/SM_point_locator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,7 @@ #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO #include #else -#include +#include #endif #include #include @@ -119,7 +119,7 @@ class SM_point_locator : public SM_decorator { bool& collinear) const /*{\Xop returns a halfedge |e| bounding a wedge in between two neighbored edges in the adjacency list of |v| which contains |d|. - If |d| extends along a edge then |e| is this edge. If |d| extends + If |d| extends along an edge then |e| is this edge. If |d| extends into the interior of such a wedge then |e| is the first edge hit when |d| is rotated clockwise. \precond |v| is not isolated.}*/ { CGAL_NEF_TRACEN("out_wedge "< #else -#include +#include #endif #include #include @@ -213,7 +213,7 @@ class SM_triangulator : public Decorator_ { #ifdef CGAL_I_DO_WANT_TO_USE_GENINFO geninfo::clear(info(v)); #else - info(v)=boost::any(); + info(v)=std::any(); #endif } @@ -223,7 +223,7 @@ class SM_triangulator : public Decorator_ { return geninfo::access(info(v)); #else return - *boost::any_cast(&info(v)); + *std::any_cast(&info(v)); #endif } @@ -258,8 +258,8 @@ class SM_triangulator : public Decorator_ { geninfo::clear(info(e)); geninfo::clear(info(e->twin())); #else - info(e)=boost::any(); - info(e->twin())=boost::any(); + info(e)=std::any(); + info(e->twin())=std::any(); #endif } @@ -269,7 +269,7 @@ class SM_triangulator : public Decorator_ { return geninfo::access(info(e)); #else return - *boost::any_cast(&info(e)); + *std::any_cast(&info(e)); #endif } @@ -288,7 +288,7 @@ class SM_triangulator : public Decorator_ { return geninfo::const_access(info(e)); #else return - *boost::any_cast(&info(e)); + *std::any_cast(&info(e)); #endif } const Mark& incident_mark(SHalfedge_const_handle e) const diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_visualizor.h b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_visualizor.h index 9be8d92a..e072745a 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/SM_visualizor.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/SM_visualizor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/SM_visualizor.h $ -// $Id: SM_visualizor.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/SM_visualizor.h $ +// $Id: include/CGAL/Nef_S2/SM_visualizor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_circle.h b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_circle.h index f9512fdf..0bcfea1b 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_circle.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_circle.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/Sphere_circle.h $ -// $Id: Sphere_circle.h 9cdf8ba 2022-04-02T18:10:06+01:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/Sphere_circle.h $ +// $Id: include/CGAL/Nef_S2/Sphere_circle.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -57,7 +57,7 @@ Sphere_circle() : Base() {} /*{\Mcreate creates some great circle.}*/ Sphere_circle(const Sphere_point& p, const Sphere_point&q) - : Base(Point_3(0,0,0),p,q) + : Base(CGAL::ORIGIN,p,q) /*{\Mcreate creates a great circle through $p$ and $q$. If $p$ and $q$ are not antipodal on $S_2$, then this circle is unique and oriented such that a walk along |\Mvar| meets $p$ just before the shorter segment @@ -104,9 +104,9 @@ Sphere_circle(Sphere_circle c, const Sphere_point& p) { CGAL_assertion(!c.has_on(p)); if ( c.has_on_negative_side(p) ) c=c.opposite(); if ( p == c.orthogonal_pole() ) - *this = Sphere_circle(Base(Point_3(0,0,0),p,CGAL::ORIGIN+c.base1())); + *this = Sphere_circle(Base(CGAL::ORIGIN,p,CGAL::ORIGIN+c.base1())); else - *this = Sphere_circle(Base(Point_3(0,0,0),p,c.orthogonal_pole())); + *this = Sphere_circle(Base(CGAL::ORIGIN,p,c.orthogonal_pole())); } /*{\Moperations 4 2}*/ diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_direction.h b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_direction.h index ebbcfd40..e953523d 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_direction.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_direction.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/Sphere_direction.h $ -// $Id: Sphere_direction.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/Sphere_direction.h $ +// $Id: include/CGAL/Nef_S2/Sphere_direction.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -51,14 +51,14 @@ Sphere_direction(const Sphere_circle& c) : Base(c) {} Sphere_direction(const Sphere_point& p, const Sphere_point&q) - : Base(Point_3(0,0,0),p,q) + : Base(CGAL::ORIGIN,p,q) /*{\Mcreate creates a direction that describes the orientation of the great circle through $p$ and $q$ (oriented such that the segment $pq$ is the shorter one of the two possible ones. \precond $p$ and $q$ are not opposite on $S_2$.}*/ { CGAL_assertion(p!=q.opposite()); - Point_3 p1(0,0,0), p4 = CGAL::ORIGIN + ((Base*) this)->orthogonal_vector(); - if ( CGAL::orientation(p1,p,q,p4) != CGAL::POSITIVE ) + Point_3 p4 = CGAL::ORIGIN + ((Base*) this)->orthogonal_vector(); + if ( R().orientation_3_object()(CGAL::ORIGIN,p,q,p4) != CGAL::POSITIVE ) *this = Sphere_direction(opposite()); } @@ -82,7 +82,7 @@ Plane_3 plane() const { return Base(*this); } /* We have: 1) all directions fixed at p 2) d1==d3 possible - return true iff d1,d2,d3 are stricly ccw ordered around p + return true iff d1,d2,d3 are strictly ccw ordered around p Note: Sphere_directions are Plane_3 we therefore compare the normal vectors of the planes that underly the directions d1,d2,d3 in the plane @@ -95,18 +95,20 @@ bool strictly_ordered_ccw_at(const Sphere_point& p, const Sphere_direction& d2, const Sphere_direction& d3) { CGAL_assertion(d1.has_on(p) && d2.has_on(p) && d3.has_on(p)); - typename R::Point_3 p0(0,0,0); - typename R::Point_3 p1(CGAL::ORIGIN + d1.orthogonal_vector()); - typename R::Point_3 p2(CGAL::ORIGIN + d2.orthogonal_vector()); - typename R::Point_3 p3(CGAL::ORIGIN + d3.orthogonal_vector()); + typedef typename R::Vector_3 Vector_3; + Vector_3 v0 = p - CGAL::ORIGIN; + Vector_3 v1 = d1.orthogonal_vector(); + Vector_3 v2 = d2.orthogonal_vector(); + Vector_3 v3 = d3.orthogonal_vector(); if ( d1 == d3 ) return false; - if ( CGAL::orientation(p0,p,p1,p3) == CGAL::POSITIVE ) { - return CGAL::orientation(p0,p,p1,p2) == CGAL::POSITIVE && - CGAL::orientation(p0,p,p3,p2) == CGAL::NEGATIVE; + typename R::Orientation_3 orientation = R().orientation_3_object(); + if ( orientation(v0,v1,v3) == CGAL::POSITIVE ) { + return orientation(v0,v1,v2) == CGAL::POSITIVE && + orientation(v0,v3,v2) == CGAL::NEGATIVE; } else { - return CGAL::orientation(p0,p,p1,p2) == CGAL::POSITIVE || - CGAL::orientation(p0,p,p3,p2) == CGAL::NEGATIVE; + return orientation(v0,v1,v2) == CGAL::POSITIVE || + orientation(v0,v3,v2) == CGAL::NEGATIVE; } } diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_geometry.h b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_geometry.h index 8c3a3f4f..956e121f 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_geometry.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_geometry.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/Sphere_geometry.h $ -// $Id: Sphere_geometry.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/Sphere_geometry.h $ +// $Id: include/CGAL/Nef_S2/Sphere_geometry.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_geometry_OGL.h b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_geometry_OGL.h index f6e5c27d..81a27dc8 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_geometry_OGL.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_geometry_OGL.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/Sphere_geometry_OGL.h $ -// $Id: Sphere_geometry_OGL.h 521c72d 2021-10-04T13:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/Sphere_geometry_OGL.h $ +// $Id: include/CGAL/Nef_S2/Sphere_geometry_OGL.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_map.h b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_map.h index 31ca2619..2696a1d5 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_map.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/Sphere_map.h $ -// $Id: Sphere_map.h 16bed97 2022-03-17T20:21:12+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/Sphere_map.h $ +// $Id: include/CGAL/Nef_S2/Sphere_map.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -30,7 +30,7 @@ #define CGAL_NEF_DEBUG 109 #include -#include +#include #include namespace CGAL { @@ -128,7 +128,7 @@ the HDS design of Kettner.}*/ typedef std::list Object_list; typedef typename Object_list::iterator Object_iterator; typedef typename Object_list::const_iterator Object_const_iterator; - typedef boost::optional Optional_object_iterator ; + typedef std::optional Optional_object_iterator ; typedef Generic_handle_map Handle_to_iterator_map; typedef Sphere_map* Constructor_parameter; @@ -226,7 +226,7 @@ the HDS design of Kettner.}*/ construction means cloning an isomorphic structure and is thus an expensive operation.}*/ - Sphere_map(bool = false) : boundary_item_(boost::none), + Sphere_map(bool = false) : boundary_item_(std::nullopt), svertices_(), sedges_(), sfaces_(), shalfloop_() {} ~Sphere_map() noexcept(!CGAL_ASSERTIONS_ENABLED) @@ -236,7 +236,7 @@ the HDS design of Kettner.}*/ ); } - Sphere_map(const Self& D) : boundary_item_(boost::none), + Sphere_map(const Self& D) : boundary_item_(std::nullopt), svertices_(D.svertices_), sedges_(D.sedges_), sfaces_(D.sfaces_), @@ -258,7 +258,7 @@ the HDS design of Kettner.}*/ void clear() { - boundary_item_.clear(boost::none); + boundary_item_.clear(std::nullopt); svertices_.destroy(); sfaces_.destroy(); while ( shalfedges_begin() != shalfedges_end() ) @@ -268,7 +268,7 @@ the HDS design of Kettner.}*/ template bool is_sm_boundary_object(H h) const - { return boundary_item_[h]!=boost::none; } + { return boundary_item_[h]!=std::nullopt; } template Object_iterator& sm_boundary_item(H h) @@ -280,8 +280,8 @@ the HDS design of Kettner.}*/ template void undef_sm_boundary_item(H h) - { CGAL_assertion(boundary_item_[h]!=boost::none); - boundary_item_[h] = boost::none; } + { CGAL_assertion(boundary_item_[h]!=std::nullopt); + boundary_item_[h] = std::nullopt; } void reset_sm_iterator_hash(Object_iterator it) { SVertex_handle sv; diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_point.h b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_point.h index 2dd56074..60daf3af 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_point.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_point.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/Sphere_point.h $ -// $Id: Sphere_point.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/Sphere_point.h $ +// $Id: include/CGAL/Nef_S2/Sphere_point.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_segment.h b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_segment.h index 4fad291e..ab51ed53 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_segment.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_segment.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/Sphere_segment.h $ -// $Id: Sphere_segment.h 9a50014 2022-03-17T14:08:23+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/Sphere_segment.h $ +// $Id: include/CGAL/Nef_S2/Sphere_segment.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -33,7 +33,10 @@ template class Sphere_segment_rep typedef Sphere_segment_rep Rep; friend class Sphere_segment; public: -Sphere_segment_rep() { ps_ = pt_ = Point(); c_ = Circle(); } + +Sphere_segment_rep() : + ps_(), pt_(), c_() +{} Sphere_segment_rep(const Point& p1, const Point& p2, bool shorter_arc=true) : @@ -85,7 +88,7 @@ class Sphere_segment : public Handle_for< Sphere_segment_rep > { /*{\Mdefinition An object |\Mvar| of type |\Mname| is a segment in the -surface of a unit sphere that is part of a great circle trough the +surface of a unit sphere that is part of a great circle through the origin. Sphere segments are represented by two sphere points $p$ and $q$ plus an oriented plane $h$ that contains $p$ and $q$. The plane determines the sphere segment. Let $c$ be the circle in the diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_triangle.h b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_triangle.h index b7b6f6b2..aec192f8 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_triangle.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/Sphere_triangle.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/Sphere_triangle.h $ -// $Id: Sphere_triangle.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/Sphere_triangle.h $ +// $Id: include/CGAL/Nef_S2/Sphere_triangle.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/leda_sphere_map.h b/thirdparty/CGAL/include/CGAL/Nef_S2/leda_sphere_map.h index e4f0d67e..14164d31 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/leda_sphere_map.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/leda_sphere_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/leda_sphere_map.h $ -// $Id: leda_sphere_map.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/leda_sphere_map.h $ +// $Id: include/CGAL/Nef_S2/leda_sphere_map.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -100,7 +100,7 @@ template void subdivide(Iterator start, Iterator end) /* subdivision is done in phases - first we partition all segments into the pieces in the - closed postive xy-halfspace and into the pieces in the + closed positive xy-halfspace and into the pieces in the negative xy-halfspace - we sweep both halfspheres separate. Note that the boundary carries the same topology diff --git a/thirdparty/CGAL/include/CGAL/Nef_S2/sphere_predicates.h b/thirdparty/CGAL/include/CGAL/Nef_S2/sphere_predicates.h index 35a1bc4a..bc4dff7f 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_S2/sphere_predicates.h +++ b/thirdparty/CGAL/include/CGAL/Nef_S2/sphere_predicates.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_S2/sphere_predicates.h $ -// $Id: sphere_predicates.h 31e4638 2020-11-11T18:47:25+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_S2/sphere_predicates.h $ +// $Id: include/CGAL/Nef_S2/sphere_predicates.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -51,7 +51,7 @@ points are part of the equator first. Otherwise we sort according to the angle of the halfcircle through $S$, $N$, and the points with respect to the xy-plane. If both lie on the same halfcircle then the angle with respect to $OS$ decides. The parameter $pos=1$ does -everthing in the positive halfsphere. If $pos=-1$ then we rotate the +everything in the positive halfsphere. If $pos=-1$ then we rotate the whole scenery around the y-axis by $\pi$. Then the x-axis points left and the z-axis into the equatorial plane. */ diff --git a/thirdparty/CGAL/include/CGAL/Nef_nary_intersection_3.h b/thirdparty/CGAL/include/CGAL/Nef_nary_intersection_3.h index 48f6ba38..34f4f136 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_nary_intersection_3.h +++ b/thirdparty/CGAL/include/CGAL/Nef_nary_intersection_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_nary_intersection_3.h $ -// $Id: Nef_nary_intersection_3.h 7b09c8e 2022-08-02T17:37:38+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_nary_intersection_3.h $ +// $Id: include/CGAL/Nef_nary_intersection_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_nary_union_3.h b/thirdparty/CGAL/include/CGAL/Nef_nary_union_3.h index a0bde8d4..b9005b0b 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_nary_union_3.h +++ b/thirdparty/CGAL/include/CGAL/Nef_nary_union_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_nary_union_3.h $ -// $Id: Nef_nary_union_3.h 7b09c8e 2022-08-02T17:37:38+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_nary_union_3.h $ +// $Id: include/CGAL/Nef_nary_union_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_polyhedron_2.h b/thirdparty/CGAL/include/CGAL/Nef_polyhedron_2.h index 48414eed..5b1bfaad 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_polyhedron_2.h +++ b/thirdparty/CGAL/include/CGAL/Nef_polyhedron_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_polyhedron_2.h $ -// $Id: Nef_polyhedron_2.h 618b409 2021-01-18T15:40:40+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_polyhedron_2.h $ +// $Id: include/CGAL/Nef_polyhedron_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -1031,7 +1031,7 @@ static T EK; // static extended kernel dictionaries are present or if not then the point location time is worst-case linear, but experiments show often sublinear runtimes. Ray shooting equals point location plus a walk in the constrained - triangulation overlayed on the plane map representation. The cost of + triangulation overlaid on the plane map representation. The cost of the walk is proportional to the number of triangles passed in direction |d| until an obstacle is met. In a minimum weight triangulation of the obstacles (the plane map representing the diff --git a/thirdparty/CGAL/include/CGAL/Nef_polyhedron_3.h b/thirdparty/CGAL/include/CGAL/Nef_polyhedron_3.h index ba1258ac..2b3c342e 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_polyhedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Nef_polyhedron_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/Nef_polyhedron_3.h $ -// $Id: Nef_polyhedron_3.h f1f201b 2022-06-29T10:47:14+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/Nef_polyhedron_3.h $ +// $Id: include/CGAL/Nef_polyhedron_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -50,7 +50,6 @@ #include #include #include -#include #include #include @@ -61,9 +60,7 @@ #include #include #include - -#include -#include +#include // RO: includes for "vertex cycle to Nef" constructor #include @@ -131,7 +128,7 @@ class Nef_polyhedron_3_rep /*{\Mdefinition An instance of data type |\Mname| is a subset of 3-space which is the result of forming complements and intersections starting from a set |H| of -halfspaces. |\Mtype| is closed under all binary set opertions |intersection|, +halfspaces. |\Mtype| is closed under all binary set operations |intersection|, |union|, |difference|, |complement| and under the topological operations |boundary|, |closure|, and |interior|.}*/ @@ -629,9 +626,9 @@ class Nef_polyhedron_3 : public CGAL::Handle_for< Nef_polyhedron_3_rep - >::type* = nullptr // disambiguate with another constructor + typename std::enable_if < + !std::is_same::value + >* = nullptr // disambiguate with another constructor ) : Nef_polyhedron_3(Private_tag{}) { CGAL_NEF_TRACEN("construction from PolygonMesh"); @@ -1464,7 +1461,7 @@ class Nef_polyhedron_3 : public CGAL::Handle_for< Nef_polyhedron_3_rep& N1) const /*{\Mop returns the symmectric difference |\Mvar - T| $\cup$ |T - \Mvar|. }*/ { - CGAL_NEF_TRACEN(" symmetic difference between nef3 "<<&*this<<" and "<<&N1); + CGAL_NEF_TRACEN(" symmetric difference between nef3 "<<&*this<<" and "<<&N1); if (is_empty()) return N1; if (N1.is_empty()) return *this; if (is_space()) return Nef_polyhedron_3(EMPTY); @@ -1530,11 +1527,11 @@ class Nef_polyhedron_3 : public CGAL::Handle_for< Nef_polyhedron_3_rep& N1) const - { CGAL_NEF_TRACEN(" equality comparision between nef3 "<<&*this<<" and "<<&N1); + { CGAL_NEF_TRACEN(" equality comparison between nef3 "<<&*this<<" and "<<&N1); return symmetric_difference(N1).is_empty(); } bool operator!=(const Nef_polyhedron_3& N1) const - { CGAL_NEF_TRACEN(" inequality comparision between nef3 "<<&*this<<" and "<<&N1); + { CGAL_NEF_TRACEN(" inequality comparison between nef3 "<<&*this<<" and "<<&N1); return !operator==(N1); } bool operator<(const Nef_polyhedron_3& N1) const diff --git a/thirdparty/CGAL/include/CGAL/Nef_polyhedron_S2.h b/thirdparty/CGAL/include/CGAL/Nef_polyhedron_S2.h index 18693ba8..bac14b58 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_polyhedron_S2.h +++ b/thirdparty/CGAL/include/CGAL/Nef_polyhedron_S2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_S2/include/CGAL/Nef_polyhedron_S2.h $ -// $Id: Nef_polyhedron_S2.h 5ecd852 2021-04-26T21:37:02+01:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_S2/include/CGAL/Nef_polyhedron_S2.h $ +// $Id: include/CGAL/Nef_polyhedron_S2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_polynomial.h b/thirdparty/CGAL/include/CGAL/Nef_polynomial.h index cb7f02aa..50246fe9 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_polynomial.h +++ b/thirdparty/CGAL/include/CGAL/Nef_polynomial.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_polynomial.h $ -// $Id: Nef_polynomial.h 9d16a42 2020-06-15T17:07:35+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_polynomial.h $ +// $Id: include/CGAL/Nef_polynomial.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Nef_polynomial_fwd.h b/thirdparty/CGAL/include/CGAL/Nef_polynomial_fwd.h index 6d4ae092..168a0dae 100644 --- a/thirdparty/CGAL/include/CGAL/Nef_polynomial_fwd.h +++ b/thirdparty/CGAL/include/CGAL/Nef_polynomial_fwd.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/Nef_polynomial_fwd.h $ -// $Id: Nef_polynomial_fwd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/Nef_polynomial_fwd.h $ +// $Id: include/CGAL/Nef_polynomial_fwd.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri, Stefan Schirra, Sylvain Pion @@ -13,6 +13,9 @@ #ifndef CGAL_NEF_POLYNOMIAL_FWD_H #define CGAL_NEF_POLYNOMIAL_FWD_H +#include + + #include // Forward declarations of functions over Polynomial and Nef_polynomial diff --git a/thirdparty/CGAL/include/CGAL/Nested_iterator.h b/thirdparty/CGAL/include/CGAL/Nested_iterator.h index bf2996f0..c02d5422 100644 --- a/thirdparty/CGAL/include/CGAL/Nested_iterator.h +++ b/thirdparty/CGAL/include/CGAL/Nested_iterator.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Nested_iterator.h $ -// $Id: Nested_iterator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Nested_iterator.h $ +// $Id: include/CGAL/Nested_iterator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_LA_base.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_LA_base.h index e87565cb..d2f4de03 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_LA_base.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_LA_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_base.h $ -// $Id: Cartesian_LA_base.h bdc0ce3 2021-01-27T16:33:59+01:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_base.h $ +// $Id: include/CGAL/NewKernel_d/Cartesian_LA_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -13,7 +13,7 @@ #define CGAL_KERNEL_D_CARTESIAN_LA_BASE_H #include #include -#include +#include #include #include #include @@ -89,7 +89,7 @@ struct Cartesian_LA_base_d : public Dimension_base ::add::type Iterator_list; - template > struct Functor { + template > struct Functor { typedef Null_functor type; }; template struct Functor,D> { @@ -105,19 +105,19 @@ struct Cartesian_LA_base_d : public Dimension_base typedef CartesianDVectorBase::Construct_cartesian_const_iterator type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Sum_of_vectors type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Difference_of_vectors type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Opposite_vector type; }; template struct Functor::value || !LA_vector::template Property::value> > { typedef CartesianDVectorBase::Midpoint type; @@ -135,24 +135,24 @@ struct Cartesian_LA_base_d : public Dimension_base typedef CartesianDVectorBase::PV_dimension type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Orientation_of_vectors type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Orientation_of_points type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Scalar_product type; }; template struct Functor::value> > { + std::integral_constant::value> > { typedef CartesianDVectorBase::Squared_distance_to_origin_stored type; }; // Use integral_constant in case of failure, to distinguish from the previous one. template struct Functor::value || !LA_vector::template Property::value)*2> > { typedef CartesianDVectorBase::Squared_distance_to_origin_via_dotprod type; diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_LA_functors.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_LA_functors.h index 288a0c0a..70948f85 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_LA_functors.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_LA_functors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_functors.h $ -// $Id: Cartesian_LA_functors.h 2d8f804 2021-02-15T21:06:12+01:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_LA_functors.h $ +// $Id: include/CGAL/NewKernel_d/Cartesian_LA_functors.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -13,7 +13,7 @@ #define CGAL_CARTESIAN_LA_FUNCTORS_H #include -#include +#include #include #include #include @@ -57,28 +57,28 @@ template struct Construct_LA_vector return std::move(v); } template - typename std::enable_if::value && + std::enable_if_t::value && std::is_same, Dimension>::value, - result_type>::type + result_type> operator()(U&&...u)const{ return typename Constructor::Values()(std::forward(u)...); } - //template::value>::type,class=typename std::enable_if<(sizeof...(U)==static_dim+1)>::type,class=void> + //template::value>,class=typename std::enable_if_t<(sizeof...(U)==static_dim+1)>,class=void> template - typename std::enable_if::value && + std::enable_if_t::value && std::is_same, Dimension>::value, - result_type>::type + result_type> operator()(U&&...u)const{ return Apply_to_last_then_rest()(typename Constructor::Values_divide(),std::forward(u)...); } template inline - typename std::enable_if_t::value,result_type> operator() + std::enable_if_t::value,result_type> operator() (Iter f,Iter g,Cartesian_tag t)const { return this->operator()((int)std::distance(f,g),f,g,t); } template inline - typename std::enable_if_t::value,result_type> operator() + std::enable_if_t::value,result_type> operator() (int d,Iter f,Iter g,Cartesian_tag)const { CGAL_assertion(d==std::distance(f,g)); @@ -86,28 +86,28 @@ template struct Construct_LA_vector return typename Constructor::Iterator()(d,f,g); } template inline - typename std::enable_if_t::value,result_type> operator() + std::enable_if_t::value,result_type> operator() (Iter f,Iter g,Homogeneous_tag)const { --g; return this->operator()((int)std::distance(f,g),f,g,*g); } template inline - typename std::enable_if_t::value,result_type> operator() + std::enable_if_t::value,result_type> operator() (int d,Iter f,Iter g,Homogeneous_tag)const { --g; return this->operator()(d,f,g,*g); } template inline - typename std::enable_if_t::value,result_type> operator() + std::enable_if_t::value,result_type> operator() (Iter f,Iter g)const { // Shouldn't it try comparing dist(f,g) to the dimension if it is known? return this->operator()(f,g,typename R::Rep_tag()); } template inline - typename std::enable_if_t::value,result_type> operator() + std::enable_if_t::value,result_type> operator() (int d,Iter f,Iter g)const { return this->operator()(d,f,g,typename R::Rep_tag()); @@ -115,7 +115,7 @@ template struct Construct_LA_vector // Last homogeneous coordinate given separately template inline - typename std::enable_if_t::value,result_type> operator() + std::enable_if_t::value,result_type> operator() (int d,Iter f,Iter g,NT const&l)const { CGAL_assertion(d==std::distance(f,g)); @@ -124,7 +124,7 @@ template struct Construct_LA_vector return typename Constructor::Iterator()(d,CGAL::make_transforming_iterator(f,Divide(l)),CGAL::make_transforming_iterator(g,Divide(l))); } template inline - typename std::enable_if_t::value,result_type> operator() + std::enable_if_t::value,result_type> operator() (Iter f,Iter g,NT const&l)const { return this->operator()((int)std::distance(f,g),f,g,l); diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_base.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_base.h index 14f53f6e..01c4ade1 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_base.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_base.h $ -// $Id: Cartesian_base.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_base.h $ +// $Id: include/CGAL/NewKernel_d/Cartesian_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_change_FT.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_change_FT.h index d5a32237..cec902e7 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_change_FT.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_change_FT.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_change_FT.h $ -// $Id: Cartesian_change_FT.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_change_FT.h $ +// $Id: include/CGAL/NewKernel_d/Cartesian_change_FT.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_complete.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_complete.h index a4b85924..455484c5 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_complete.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_complete.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_complete.h $ -// $Id: Cartesian_complete.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_complete.h $ +// $Id: include/CGAL/NewKernel_d/Cartesian_complete.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_filter_K.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_filter_K.h index caf77977..01a656a7 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_filter_K.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_filter_K.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_filter_K.h $ -// $Id: Cartesian_filter_K.h 634fe39 2020-12-30T19:56:58+01:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_filter_K.h $ +// $Id: include/CGAL/NewKernel_d/Cartesian_filter_K.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -15,7 +15,6 @@ #include #include #include -#include #include namespace CGAL { @@ -65,10 +64,10 @@ struct Cartesian_filter_K : public Base_ EK_rt exact_kernel()const{return sek.kernel();} // MSVC is too dumb to perform the empty base optimization. - typedef boost::mpl::and_< - internal::Do_not_store_kernel, - internal::Do_not_store_kernel, - internal::Do_not_store_kernel > Do_not_store_kernel; + typedef std::bool_constant< + internal::Do_not_store_kernel::value && + internal::Do_not_store_kernel::value && + internal::Do_not_store_kernel::value > Do_not_store_kernel; //TODO: C2A/C2E could be able to convert *this into this->kernel() or this->kernel2(). typedef KernelD_converter C2A; diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_filter_NT.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_filter_NT.h index 7c8d625d..21ab1706 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_filter_NT.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_filter_NT.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_filter_NT.h $ -// $Id: Cartesian_filter_NT.h 74c029c 2021-09-09T11:44:36+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_filter_NT.h $ +// $Id: include/CGAL/NewKernel_d/Cartesian_filter_NT.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_per_dimension.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_per_dimension.h index aaba6399..4869b1ea 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_per_dimension.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_per_dimension.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_per_dimension.h $ -// $Id: Cartesian_per_dimension.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_per_dimension.h $ +// $Id: include/CGAL/NewKernel_d/Cartesian_per_dimension.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_static_filters.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_static_filters.h index 535b009e..b08ae2e6 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_static_filters.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Cartesian_static_filters.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_static_filters.h $ -// $Id: Cartesian_static_filters.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Cartesian_static_filters.h $ +// $Id: include/CGAL/NewKernel_d/Cartesian_static_filters.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -16,7 +16,6 @@ #include // bug, should be included by the next one #include #include -#include namespace CGAL { namespace SFA { // static filter adapter @@ -98,9 +97,9 @@ struct Cartesian_static_filters, R_, Derived_> : public R_ { template struct Functor : Inherit_functor {}; template struct Functor { typedef - //typename boost::mpl::if_ < - //boost::is_same, - //typename Get_functor::type, + //std::conditional_t < + //std::is_same_v, + //typename Get_functor, SFA::Orientation_of_points_2 // >::type type; diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Coaffine.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Coaffine.h index a1877186..7b0c1821 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Coaffine.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Coaffine.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Coaffine.h $ -// $Id: Coaffine.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Coaffine.h $ +// $Id: include/CGAL/NewKernel_d/Coaffine.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Define_kernel_types.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Define_kernel_types.h index ded7e6df..2ac3afb2 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Define_kernel_types.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Define_kernel_types.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Define_kernel_types.h $ -// $Id: Define_kernel_types.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Define_kernel_types.h $ +// $Id: include/CGAL/NewKernel_d/Define_kernel_types.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Dimension_base.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Dimension_base.h index 3b2b43cb..8d310142 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Dimension_base.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Dimension_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Dimension_base.h $ -// $Id: Dimension_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Dimension_base.h $ +// $Id: include/CGAL/NewKernel_d/Dimension_base.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Filtered_predicate2.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Filtered_predicate2.h index 25afb83e..592536b5 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Filtered_predicate2.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Filtered_predicate2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Filtered_predicate2.h $ -// $Id: Filtered_predicate2.h 6bae0e3 2021-09-09T11:09:16+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Filtered_predicate2.h $ +// $Id: include/CGAL/NewKernel_d/Filtered_predicate2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/KernelD_converter.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/KernelD_converter.h index 276739f4..3dc47ff3 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/KernelD_converter.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/KernelD_converter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/KernelD_converter.h $ -// $Id: KernelD_converter.h 209513d 2020-07-31T15:58:38+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/KernelD_converter.h $ +// $Id: include/CGAL/NewKernel_d/KernelD_converter.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -15,15 +15,14 @@ #include #include #include +#include #include #include #include #include #include -#include +#include #include -#include -#include #include #include @@ -80,12 +79,12 @@ class KernelD_converter_ // Explicit calls to boost::mpl functions to avoid parenthesis // warning on some versions of GCC - typedef typename boost::mpl::if_ < + typedef std::conditional_t < // If Point==Vector, keep only one conversion - boost::mpl::or_, + duplicate::value || // For iterator objects, the default is make_transforming_iterator - boost::mpl::bool_<(iterator_tag_traits::is_iterator && no_converter::value)> >, - Do_not_use,K1_Obj>::type argument_type; + (iterator_tag_traits::is_iterator && no_converter::value), + Do_not_use,K1_Obj> argument_type; //typedef typename KOC::argument_type K1_Obj; //typedef typename KOC::result_type K2_Obj; public: @@ -135,7 +134,7 @@ typename typeset_intersection(a),Store_kernel2(b){} // For the (not anymore used in CGAL) boost result of, used in transforming_iterator - template::value?42:0> struct result:Base::template result{}; + template::value?42:0> struct result:Base::template result{}; template struct result { typedef transforming_iterator type; }; @@ -160,7 +159,7 @@ typename typeset_intersection - transforming_iterator,It>::type> + transforming_iterator::value,It>> operator()(It const& it) const { return make_transforming_iterator(it,*this); } @@ -182,7 +181,7 @@ typename typeset_intersection()(obj,*this); } - //TODO: convert boost::variant + //TODO: convert std::variant }; diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_2_interface.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_2_interface.h index 76965a50..038c64ff 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_2_interface.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_2_interface.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Kernel_2_interface.h $ -// $Id: Kernel_2_interface.h cf54055 2021-02-14T01:16:52+01:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Kernel_2_interface.h $ +// $Id: include/CGAL/NewKernel_d/Kernel_2_interface.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_3_interface.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_3_interface.h index 84c36ba0..2cdd2443 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_3_interface.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_3_interface.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Kernel_3_interface.h $ -// $Id: Kernel_3_interface.h cf54055 2021-02-14T01:16:52+01:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Kernel_3_interface.h $ +// $Id: include/CGAL/NewKernel_d/Kernel_3_interface.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_d_interface.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_d_interface.h index 964d05be..af7f4d09 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_d_interface.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_d_interface.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h $ -// $Id: Kernel_d_interface.h 31a0557 2021-08-13T16:45:28+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h $ +// $Id: include/CGAL/NewKernel_d/Kernel_d_interface.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -135,8 +135,8 @@ template struct Kernel_d_interface : public Base_ { typedef typename Base::Point_cartesian_const_iterator result_type; // Kernel_d requires a common iterator type for points and vectors // TODO: provide this mixed functor in preKernel? - // CGAL_static_assertion((boost::is_same::type>::type, result_type>::value)); - // CGAL_static_assertion((boost::is_same::type, result_type>::value)); + // static_assert(std::is_same::type>::type, result_type>::value); + // static_assert(std::is_same::type, result_type>::value); template auto operator()(Point_d const&p, Tag_ t)const{ return CPI(this->kernel())(p,t); diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_object_converter.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_object_converter.h index 93a48fe6..e92b728e 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_object_converter.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Kernel_object_converter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Kernel_object_converter.h $ -// $Id: Kernel_object_converter.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Kernel_object_converter.h $ +// $Id: include/CGAL/NewKernel_d/Kernel_object_converter.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/LA_eigen/LA.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/LA_eigen/LA.h index b9b9e290..4ccc1037 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/LA_eigen/LA.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/LA_eigen/LA.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/LA.h $ -// $Id: LA.h 8a52dd3 2020-05-12T11:21:06+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/LA.h $ +// $Id: include/CGAL/NewKernel_d/LA_eigen/LA.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -16,7 +16,6 @@ #error Requires Eigen #endif #include -#include #include #include #include @@ -39,10 +38,10 @@ template struct LA_eigen { struct Rebind_dimension { typedef LA_eigen< NT, D2, D3 > Other; }; - template struct Property : boost::false_type {}; - template struct Property : boost::true_type {}; - template struct Property : boost::true_type {}; - template struct Property : boost::true_type {}; + template struct Property : std::false_type {}; + template struct Property : std::true_type {}; + template struct Property : std::true_type {}; + template struct Property : std::true_type {}; typedef Eigen::Matrix::value,1,Eigen::ColMajor|Eigen::AutoAlign,Eigen_dimension::value,1> Vector; typedef Eigen::Matrix Dynamic_vector; diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/LA_eigen/constructors.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/LA_eigen/constructors.h index 22a29038..b42c2d6e 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/LA_eigen/constructors.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/LA_eigen/constructors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/constructors.h $ -// $Id: constructors.h 77ae994 2021-11-03T23:20:12+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/LA_eigen/constructors.h $ +// $Id: include/CGAL/NewKernel_d/LA_eigen/constructors.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -23,7 +23,6 @@ #error Requires Eigen #endif #include -#include #include #include #include diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Lazy_cartesian.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Lazy_cartesian.h index 3ecc0a81..66d549f4 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Lazy_cartesian.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Lazy_cartesian.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Lazy_cartesian.h $ -// $Id: Lazy_cartesian.h 74c029c 2021-09-09T11:44:36+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Lazy_cartesian.h $ +// $Id: include/CGAL/NewKernel_d/Lazy_cartesian.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -259,9 +260,9 @@ struct Lazy_cartesian : void set_dimension(int dim){ak.set_dimension(dim);ek.set_dimension(dim);} // For compilers that do not handle [[no_unique_address]] - typedef boost::mpl::and_< - internal::Do_not_store_kernel, - internal::Do_not_store_kernel > Do_not_store_kernel; + typedef std::bool_constant< + internal::Do_not_store_kernel::value && + internal::Do_not_store_kernel::value > Do_not_store_kernel; typedef typename EK_::Dimension Dimension; // ? typedef Lazy_cartesian Self; diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Aff_transformation.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Aff_transformation.h index f0d2beee..9bb4f796 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Aff_transformation.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Aff_transformation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Types/Aff_transformation.h $ -// $Id: Aff_transformation.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Types/Aff_transformation.h $ +// $Id: include/CGAL/NewKernel_d/Types/Aff_transformation.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Hyperplane.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Hyperplane.h index 8736e041..648a9181 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Hyperplane.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Hyperplane.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Types/Hyperplane.h $ -// $Id: Hyperplane.h 634fe39 2020-12-30T19:56:58+01:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Types/Hyperplane.h $ +// $Id: include/CGAL/NewKernel_d/Types/Hyperplane.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Iso_box.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Iso_box.h index 513db5e6..723bee91 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Iso_box.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Iso_box.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Types/Iso_box.h $ -// $Id: Iso_box.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Types/Iso_box.h $ +// $Id: include/CGAL/NewKernel_d/Types/Iso_box.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Line.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Line.h index dc940e85..1dbeb331 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Line.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Line.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Types/Line.h $ -// $Id: Line.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Types/Line.h $ +// $Id: include/CGAL/NewKernel_d/Types/Line.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Ray.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Ray.h index 0b545f3a..d895b041 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Ray.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Ray.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Types/Ray.h $ -// $Id: Ray.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Types/Ray.h $ +// $Id: include/CGAL/NewKernel_d/Types/Ray.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Segment.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Segment.h index f8d0f737..224b6006 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Segment.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Segment.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Types/Segment.h $ -// $Id: Segment.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Types/Segment.h $ +// $Id: include/CGAL/NewKernel_d/Types/Segment.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -26,7 +26,7 @@ template class Segment { public: //typedef Segmentd Segment; //FIXME: don't forward directly, piecewise_construct should call the point construction functor (I guess? or is it unnecessary?) - template::type...>,std::tuple>::value>::type> + template::type...>,std::tuple>::value>> Segment(U&&...u):data(std::forward(u)...){} Point_ source()const{return data.first;} Point_ target()const{return data.second;} diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Sphere.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Sphere.h index 536a3b46..309d82f7 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Sphere.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Sphere.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Types/Sphere.h $ -// $Id: Sphere.h 634fe39 2020-12-30T19:56:58+01:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Types/Sphere.h $ +// $Id: include/CGAL/NewKernel_d/Types/Sphere.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Weighted_point.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Weighted_point.h index 9df3a2ad..9ae4eff6 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Weighted_point.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Types/Weighted_point.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Types/Weighted_point.h $ -// $Id: Weighted_point.h 53ed991 2020-08-27T15:39:08+02:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Types/Weighted_point.h $ +// $Id: include/CGAL/NewKernel_d/Types/Weighted_point.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/array.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/array.h index fb630c0e..f622d16e 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/array.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/array.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h $ -// $Id: array.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h $ +// $Id: include/CGAL/NewKernel_d/Vector/array.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -12,7 +12,6 @@ #ifndef CGAL_VECTOR_ARRAY_H #define CGAL_VECTOR_ARRAY_H #include -#include #include #include #include @@ -39,10 +38,10 @@ template struct Array_vector { struct Rebind_dimension { typedef Array_vector< NT, D2, D3 > Other; }; - template struct Property : boost::false_type {}; + template struct Property : std::false_type {}; static const unsigned d_=Max_dim_::value; - CGAL_static_assertion(d_ != (unsigned)UNKNOWN_DIMENSION); + static_assert(d_ != (unsigned)UNKNOWN_DIMENSION); typedef std::array Vector; struct Construct_vector { diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/avx4.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/avx4.h index d08d4875..737a2051 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/avx4.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/avx4.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Vector/avx4.h $ -// $Id: avx4.h e6c767d 2021-05-12T15:45:07+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Vector/avx4.h $ +// $Id: include/CGAL/NewKernel_d/Vector/avx4.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -31,19 +31,19 @@ namespace CGAL { typedef Dimension_tag<4> Dimension; typedef Dimension_tag<4> Max_dimension; // No Rebind_dimension, this is a building block - template struct Property : boost::false_type {}; + template struct Property : std::false_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; /* MAYBE? template struct Property - : boost::true_type {}; + : std::true_type {}; */ template struct Property - : boost::true_type {}; + : std::true_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; typedef __m256d Vector; struct Construct_vector { diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h index 26d57d15..e6b43f78 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h $ -// $Id: determinant_of_iterator_to_points_from_iterator_to_vectors.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h $ +// $Id: include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -42,7 +42,7 @@ struct Add_determinant_of_iterator_to_points_from_iterator_to_vectors }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; // TODO: use std::minus, boost::bind, etc template struct Minus_fixed { diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h index a3d0b383..278c9562 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h $ -// $Id: determinant_of_iterator_to_points_from_points.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h $ +// $Id: include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_points.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -42,7 +42,7 @@ struct Add_determinant_of_iterator_to_points_from_points }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){ @@ -74,7 +74,7 @@ struct Add_determinant_of_iterator_to_points_from_points }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){ @@ -108,7 +108,7 @@ struct Add_determinant_of_iterator_to_points_from_points }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){ @@ -144,7 +144,7 @@ struct Add_determinant_of_iterator_to_points_from_points }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){ @@ -182,7 +182,7 @@ struct Add_determinant_of_iterator_to_points_from_points }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_points(Iter const&first, Iter const&end){ diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h index 7c50de69..7ecce89b 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h $ -// $Id: determinant_of_iterator_to_vectors_from_vectors.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h $ +// $Id: include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_vectors_from_vectors.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -42,7 +42,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ @@ -72,7 +72,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ @@ -104,7 +104,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ @@ -138,7 +138,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ @@ -174,7 +174,7 @@ struct Add_determinant_of_iterator_to_vectors_from_vectors }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; template static NT determinant_of_iterator_to_vectors(Iter const&first, Iter const&end){ diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h index 05b53c4b..e55e272f 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h $ -// $Id: determinant_of_points_from_vectors.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h $ +// $Id: include/CGAL/NewKernel_d/Vector/determinant_of_points_from_vectors.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -42,7 +42,7 @@ struct Add_determinant_of_points_from_vectors_and_minus }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT determinant_of_points(Vector const&a, Vector const&b, Vector const&c){ @@ -66,7 +66,7 @@ struct Add_determinant_of_points_from_vectors_and_minus }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT determinant_of_points(Vector const&a, Vector const&b, Vector const&c, Vector const&d){ @@ -90,7 +90,7 @@ struct Add_determinant_of_points_from_vectors_and_minus }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT determinant_of_points(Vector const&a, Vector const&b, Vector const&c, Vector const&d, Vector const&e){ @@ -114,7 +114,7 @@ struct Add_determinant_of_points_from_vectors_and_minus }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT determinant_of_points(Vector const&a, Vector const&b, Vector const&c, Vector const&d, Vector const&e, Vector const&f){ @@ -138,7 +138,7 @@ struct Add_determinant_of_points_from_vectors_and_minus }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT determinant_of_points(Vector const&a, Vector const&b, Vector const&c, Vector const&d, Vector const&e, Vector const&f, diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim.h index ead5a5d6..cfa7c6ee 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim.h $ -// $Id: determinant_of_vectors_small_dim.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim.h $ +// $Id: include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h index 0ce7b48a..59a4441d 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h $ -// $Id: determinant_of_vectors_small_dim_internal.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h $ +// $Id: include/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -46,7 +46,7 @@ struct CGAL_CLASS }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT CGAL_FUNC(Vector const&a, Vector const&b){ return CGAL::determinant_of_vectors(a,b); @@ -69,7 +69,7 @@ struct CGAL_CLASS }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT CGAL_FUNC(Vector const&a, Vector const&b, Vector const&c){ @@ -93,7 +93,7 @@ struct CGAL_CLASS }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT CGAL_FUNC(Vector const&a, Vector const&b, Vector const&c, Vector const&d){ @@ -117,7 +117,7 @@ struct CGAL_CLASS }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT CGAL_FUNC(Vector const&a, Vector const&b, Vector const&c, Vector const&d, Vector const&e){ @@ -141,7 +141,7 @@ struct CGAL_CLASS }; template struct Property : LA::template Property

    {}; template struct Property : - boost::true_type {}; + std::true_type {}; static NT CGAL_FUNC(Vector const&a, Vector const&b, Vector const&c, Vector const&d, Vector const&e, Vector const&f){ diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/mix.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/mix.h index 19b58ea3..cd8feecb 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/mix.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/mix.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Vector/mix.h $ -// $Id: mix.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Vector/mix.h $ +// $Id: include/CGAL/NewKernel_d/Vector/mix.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/sse2.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/sse2.h index 67993fbd..fe2acd98 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/sse2.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/sse2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Vector/sse2.h $ -// $Id: sse2.h e6c767d 2021-05-12T15:45:07+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Vector/sse2.h $ +// $Id: include/CGAL/NewKernel_d/Vector/sse2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -32,17 +32,17 @@ namespace CGAL { typedef Dimension_tag<2> Dimension; typedef Dimension_tag<2> Max_dimension; // No Rebind_dimension, this is a building block - template struct Property : boost::false_type {}; + template struct Property : std::false_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; /* MAYBE? template struct Property - : boost::true_type {}; + : std::true_type {}; */ template struct Property - : boost::true_type {}; + : std::true_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; typedef __m128d Vector; struct Construct_vector { diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/v2int.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/v2int.h index d72b045b..579050fa 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/v2int.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/v2int.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Vector/v2int.h $ -// $Id: v2int.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Vector/v2int.h $ +// $Id: include/CGAL/NewKernel_d/Vector/v2int.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -70,13 +70,13 @@ namespace CGAL { typedef Dimension_tag<2> Dimension; typedef Dimension_tag<2> Max_dimension; // No Rebind_dimension, this is a building block - template struct Property : boost::false_type {}; + template struct Property : std::false_type {}; //template struct Property - // : boost::true_type {}; + // : std::true_type {}; template struct Property - : boost::true_type {}; + : std::true_type {}; //template struct Property - // : boost::true_type {}; + // : std::true_type {}; // Advertise somehow that the sign_of_determinant* are exact? typedef std::array Vector; diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/vector.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/vector.h index 700f31d8..bb20dcb2 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/vector.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Vector/vector.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Vector/vector.h $ -// $Id: vector.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Vector/vector.h $ +// $Id: include/CGAL/NewKernel_d/Vector/vector.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -12,7 +12,6 @@ #ifndef CGAL_VECTOR_VECTOR_H #define CGAL_VECTOR_VECTOR_H #include -#include #include #include #include @@ -30,7 +29,7 @@ template struct Vector_vector { struct Rebind_dimension { typedef Vector_vector< NT, D2, D3 > Other; }; - template struct Property : boost::false_type {}; + template struct Property : std::false_type {}; struct Construct_vector { struct Dimension { diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h index 7af17f81..950eb568 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h $ -// $Id: Cartesian_wrap.h 31a0557 2021-08-13T16:45:28+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h $ +// $Id: include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -13,7 +13,7 @@ #define CGAL_KERNEL_D_CARTESIAN_WRAP_H #include -#include +#include #if defined(BOOST_MSVC) # pragma warning(push) @@ -59,18 +59,18 @@ struct Forward_rep { //@mglisse shall we update that code? //TODO: make a good C++0X version with perfect forwarding //#ifdef CGAL_CXX11 -//template ::type>::value&&!Is_wrapper_iterator::type>::value>::type> +//template ::type>::value&&!Is_wrapper_iterator::type>::value>> //T&& operator()(typename std::remove_reference::type&& t) const {return static_cast(t);}; -//template ::type>::value&&!Is_wrapper_iterator::type>::value>::type> +//template ::type>::value&&!Is_wrapper_iterator::type>::value>> //T&& operator()(typename std::remove_reference::type& t) const {return static_cast(t);}; // -//template ::type>::value>::type> +//template ::type>::value>> //typename Type_copy_cvref::type::Rep>::type&& //operator()(T&& t) const { // return static_cast::type::Rep>::type&&>(t.rep()); //}; // -//template ::type>::value>::type> +//template ::type>::value>> //transforming_iterator::type> //operator()(T&& t) const { // return make_transforming_iterator(std::forward(t),Forward_rep()); @@ -83,12 +83,12 @@ template struct result_{typedef transforming_iterator struct result; template struct result : result_ {}; -template typename boost::disable_if,Is_wrapper_iterator >,T>::type const& operator()(T const& t) const {return t;} -template typename boost::disable_if,Is_wrapper_iterator >,T>::type& operator()(T& t) const {return t;} +template std::enable_if_t::value || Is_wrapper_iterator::value,T> const& operator()(T const& t) const {return t;} +template std::enable_if_t::value || Is_wrapper_iterator::value,T>& operator()(T& t) const {return t;} -template typename T::Rep const& operator()(T const& t, typename boost::enable_if >::type* = 0) const {return t.rep();} +template typename T::Rep const& operator()(T const& t, std::enable_if_t::value >* = 0) const {return t.rep();} -template transforming_iterator,T>::type> operator()(T const& t) const {return make_transforming_iterator(t,Forward_rep());} +template transforming_iterator::value,T>> operator()(T const& t) const {return make_transforming_iterator(t,Forward_rep());} //#endif }; } @@ -189,8 +189,8 @@ struct Cartesian_refcount : public Base_ //typedef typename map_functor_type::type f_t; typedef typename map_result_tag::type r_t; enum { - is_nul = boost::is_same::type,Null_functor>::value, - ret_rcobj = boost::is_same::value || boost::is_same::value + is_nul = std::is_same::type,Null_functor>::value, + ret_rcobj = std::is_same::value || std::is_same::value }; }; diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h index d76157d8..eaf9a57a 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h $ -// $Id: Hyperplane_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h $ +// $Id: include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -32,7 +32,7 @@ class Hyperplane_d : public Get_type:: typedef typename Get_functor::type HTBase; typedef Hyperplane_d Self; - CGAL_static_assertion((boost::is_same::type>::value)); + static_assert(std::is_same::type>::value); public: @@ -54,7 +54,7 @@ class Hyperplane_d : public Get_type:: typedef R_ R; - template::type...>,std::tuple >::value>::type> explicit Hyperplane_d(U&&...u) + template::type...>,std::tuple >::value>> explicit Hyperplane_d(U&&...u) : Rep(CHBase()(std::forward(u)...)){} // // called from Construct_point_d diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Point_d.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Point_d.h index 755a6db2..3d2b6768 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Point_d.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Point_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h $ -// $Id: Point_d.h cca0a19 2022-04-12T16:14:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h $ +// $Id: include/CGAL/NewKernel_d/Wrapper/Point_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -40,7 +40,7 @@ class Point_d : public Get_type::type typedef Point_d Self; - CGAL_static_assertion((boost::is_same::type>::value)); + static_assert(std::is_same::type>::value); public: @@ -68,7 +68,7 @@ class Point_d : public Get_type::type # pragma warning(disable: 4309) #endif - template::type...>,std::tuple >::value>::type> explicit Point_d(U&&...u) + template::type...>,std::tuple >::value>> explicit Point_d(U&&...u) : Rep(CPBase()(std::forward(u)...)){} #if defined(BOOST_MSVC) && (BOOST_MSVC == 1900) diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h index bc9d38e2..1bdd434a 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h $ -// $Id: Ref_count_obj.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h $ +// $Id: include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -33,7 +33,7 @@ class Ref_count_obj typedef typename Get_functor >::type CBase; typedef Ref_count_obj Self; - CGAL_static_assertion((boost::is_same::type>::value)); + static_assert(std::is_same::type>::value); public: typedef R_ R; @@ -54,7 +54,7 @@ class Ref_count_obj return CGAL::get_pointee_or_identity(data); } - template::type...>,std::tuple >::value>::type> explicit Ref_count_obj(U&&...u) + template::type...>,std::tuple >::value>> explicit Ref_count_obj(U&&...u) : data(Eval_functor(),CBase(),std::forward(u)...){} template explicit Ref_count_obj(Eval_functor&&,F&&f,U&&...u) diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Segment_d.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Segment_d.h index d63bec0c..8f9d03f4 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Segment_d.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Segment_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h $ -// $Id: Segment_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h $ +// $Id: include/CGAL/NewKernel_d/Wrapper/Segment_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -35,7 +35,7 @@ class Segment_d : public Get_type::type typedef typename Get_functor::type CSEBase; typedef Segment_d Self; - CGAL_static_assertion((boost::is_same::type>::value)); + static_assert(std::is_same::type>::value); public: @@ -57,7 +57,7 @@ class Segment_d : public Get_type::type typedef R_ R; - template::type...>,std::tuple >::value>::type> explicit Segment_d(U&&...u) + template::type...>,std::tuple >::value>> explicit Segment_d(U&&...u) : Rep(CSBase()(std::forward(u)...)){} // // called from Construct_point_d diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h index da9f8bc4..691df5c2 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h $ -// $Id: Sphere_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h $ +// $Id: include/CGAL/NewKernel_d/Wrapper/Sphere_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -32,7 +32,7 @@ class Sphere_d : public Get_type::type typedef typename Get_functor::type SRBase; typedef Sphere_d Self; - CGAL_static_assertion((boost::is_same::type>::value)); + static_assert(std::is_same::type>::value); public: @@ -54,7 +54,7 @@ class Sphere_d : public Get_type::type typedef R_ R; - template::type...>,std::tuple >::value>::type> explicit Sphere_d(U&&...u) + template::type...>,std::tuple >::value>> explicit Sphere_d(U&&...u) : Rep(CSBase()(std::forward(u)...)){} // // called from Construct_point_d diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Vector_d.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Vector_d.h index 14ddcf7b..5f87f0f1 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Vector_d.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Vector_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h $ -// $Id: Vector_d.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h $ +// $Id: include/CGAL/NewKernel_d/Wrapper/Vector_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -39,7 +39,7 @@ class Vector_d : public Get_type::type typedef typename Get_functor::type SLBase; typedef Vector_d Self; - CGAL_static_assertion((boost::is_same::type>::value)); + static_assert(std::is_same::type>::value); public: @@ -66,7 +66,7 @@ class Vector_d : public Get_type::type # pragma warning(push) # pragma warning(disable: 4309) #endif - template::type...>,std::tuple >::value>::type> explicit Vector_d(U&&...u) + template::type...>,std::tuple >::value>> explicit Vector_d(U&&...u) : Rep(CVBase()(std::forward(u)...)){} #if defined(BOOST_MSVC) && (BOOST_MSVC == 1900) diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Weighted_point_d.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Weighted_point_d.h index 138fbbfe..0e4c6420 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Weighted_point_d.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/Wrapper/Weighted_point_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Weighted_point_d.h $ -// $Id: Weighted_point_d.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Weighted_point_d.h $ +// $Id: include/CGAL/NewKernel_d/Wrapper/Weighted_point_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -35,7 +34,7 @@ class Weighted_point_d : public Get_type::type PWBase; typedef Weighted_point_d Self; - BOOST_STATIC_ASSERT((boost::is_same::type>::value)); + BOOST_STATIC_ASSERT((std::is_same::type>::value)); public: @@ -57,7 +56,7 @@ class Weighted_point_d : public Get_type::type...>,std::tuple >::value>::type> explicit Weighted_point_d(U&&...u) + template::type...>,std::tuple >::value>> explicit Weighted_point_d(U&&...u) : Rep(CWPBase()(std::forward(u)...)){} // // called from Construct_point_d diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/function_objects_cartesian.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/function_objects_cartesian.h index ad8ac17f..b7799cc0 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/function_objects_cartesian.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/function_objects_cartesian.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h $ -// $Id: function_objects_cartesian.h 634fe39 2020-12-30T19:56:58+01:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h $ +// $Id: include/CGAL/NewKernel_d/function_objects_cartesian.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -64,8 +64,8 @@ template,typename R::Default_ambient_dimension>::value>::type> - template =3)>::type> + // template ::value,typename R::Default_ambient_dimension>::value>> + template =3)>> result_type operator()(U&&...u) const { return operator()({std::forward(u)...}); } @@ -159,7 +159,7 @@ template struct Orientation_of_vectors : private Store_kernel { return R::LA::sign_of_determinant(std::move(m)); } - template =3)>::type> + template =3)>> result_type operator()(U&&...u) const { return operator()({std::forward(u)...}); } @@ -425,7 +425,7 @@ CGAL_KD_DEFAULT_FUNCTOR(Linear_base_tag,(CartesianDKernelFunctors::Linear_base::value> struct Orientation : private Store_kernel { +template::value> struct Orientation : private Store_kernel { CGAL_FUNCTOR_INIT_STORE(Orientation) typedef R_ R; typedef typename Get_type::type Vector; @@ -463,12 +463,12 @@ template struct Orientation : private Store_kernel { //when Point and Vector are distinct types, the dispatch should be made //in a way that doesn't instantiate a conversion from Point to Vector template - typename boost::enable_if,result_type>::type + std::enable_if_t::value,result_type> operator()(Iter const&f, Iter const& e)const{ return OP(this->kernel())(f,e); } template - typename boost::enable_if,result_type>::type + std::enable_if_t::value,result_type> operator()(Iter const&f, Iter const& e)const{ return OV(this->kernel())(f,e); } @@ -586,7 +586,7 @@ template struct Side_of_oriented_sphere : private Store_kernel { return LA::sign_of_determinant(std::move(m)); } - template =4)>::type> + template =4)>> result_type operator()(U&&...u) const { return operator()({std::forward(u)...}); } @@ -762,7 +762,7 @@ template struct Side_of_bounded_sphere : private Store_kernel { return enum_cast (sos (f, e, p0) * op (f, e)); } - template =4)>::type> + template =4)>> result_type operator()(U&&...u) const { return operator()({std::forward(u)...}); } diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/functor_properties.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/functor_properties.h index 15949c9c..772ab037 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/functor_properties.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/functor_properties.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/functor_properties.h $ -// $Id: functor_properties.h 634fe39 2020-12-30T19:56:58+01:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/functor_properties.h $ +// $Id: include/CGAL/NewKernel_d/functor_properties.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -20,7 +20,7 @@ namespace CGAL { BOOST_MPL_HAS_XXX_TRAIT_DEF(Is_pretty) \ } \ template::value> \ - struct Is_pretty : boost::false_type {}; \ + struct Is_pretty : std::false_type {}; \ template \ struct Is_pretty : T::Is_pretty {} diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/functor_tags.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/functor_tags.h index 19b23588..906696a1 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/functor_tags.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/functor_tags.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/functor_tags.h $ -// $Id: functor_tags.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/functor_tags.h $ +// $Id: include/CGAL/NewKernel_d/functor_tags.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -65,23 +64,23 @@ namespace CGAL { : Has_type_different_from, Null_functor> {}; template::type::value> - struct Provides_functors : boost::mpl::and_ < - Provides_functor::type>, - Provides_functors::type> > {}; + struct Provides_functors : std::bool_constant< + Provides_functor::type>::value && + Provides_functors::type>::value > {}; template - struct Provides_functors : boost::true_type {}; + struct Provides_functors : std::true_type {}; template::type::value> - struct Provides_types : boost::mpl::and_ < - Provides_type::type>, - Provides_types::type> > {}; + struct Provides_types : std::bool_constant< + Provides_type::type>::value && + Provides_types::type>::value > {}; template - struct Provides_types : boost::true_type {}; + struct Provides_types : std::true_type {}; namespace internal { BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_Type,template Type,false) } template::value /* false */> - struct Provides_type_i : boost::false_type {}; + struct Provides_type_i : std::false_type {}; template struct Provides_type_i : Has_type_different_from, Null_type> {}; @@ -93,7 +92,7 @@ namespace CGAL { template::value /* false */> - struct Provides_functor_i : boost::false_type {}; + struct Provides_functor_i : std::false_type {}; template struct Provides_functor_i : Has_type_different_from, Null_functor> {}; @@ -233,7 +232,7 @@ namespace CGAL { #undef CGAL_DECL_ITER_OBJ templatestruct Get_functor_category,B,C> : - boost::mpl::if_c::is_iterator, + std::conditional::is_iterator, Construct_iterator_tag, Construct_tag> {}; @@ -332,19 +331,19 @@ namespace CGAL { struct Stores_squared_norm_tag {}; template struct Preserved_by_non_linear_extra_coordinate - : boost::false_type {}; + : std::false_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; template<> struct Preserved_by_non_linear_extra_coordinate - : boost::true_type {}; + : std::true_type {}; // Kernel properties struct Point_stores_squared_distance_to_origin_tag {}; diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/static_int.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/static_int.h index 6f51218f..de6fac27 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/static_int.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/static_int.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/static_int.h $ -// $Id: static_int.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/static_int.h $ +// $Id: include/CGAL/NewKernel_d/static_int.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/store_kernel.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/store_kernel.h index ba102daf..48a2ca55 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/store_kernel.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/store_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/store_kernel.h $ -// $Id: store_kernel.h a03eff6 2020-04-08T16:03:18+02:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/store_kernel.h $ +// $Id: include/CGAL/NewKernel_d/store_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/NewKernel_d/utils.h b/thirdparty/CGAL/include/CGAL/NewKernel_d/utils.h index c29c55e4..45b967e1 100644 --- a/thirdparty/CGAL/include/CGAL/NewKernel_d/utils.h +++ b/thirdparty/CGAL/include/CGAL/NewKernel_d/utils.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/NewKernel_d/utils.h $ -// $Id: utils.h 9c28a54 2021-03-18T09:38:30+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/NewKernel_d/utils.h $ +// $Id: include/CGAL/NewKernel_d/utils.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -36,10 +35,10 @@ namespace internal { } template ::value /*false*/> -struct Has_type_different_from : boost::false_type {}; +struct Has_type_different_from : std::false_type {}; template struct Has_type_different_from -: boost::mpl::not_ > {}; +: std::bool_constant> {}; template struct Wrap_type { typedef T type; }; @@ -47,7 +46,7 @@ struct Has_type_different_from // tell a function f(a,b,c) that its real argument is a(b,c) struct Eval_functor {}; - // forget the first argument. Useful to make something dependant + // forget the first argument. Useful to make something dependent // (and thus usable in SFINAE), although that's not a great design. template struct Second_arg { typedef B type; @@ -89,7 +88,7 @@ struct Has_type_different_from } }; - template struct has_cheap_constructor : boost::is_arithmetic{}; + template struct has_cheap_constructor : std::is_arithmetic{}; template struct has_cheap_constructor > { enum { value=true }; }; @@ -105,7 +104,7 @@ struct Has_type_different_from template struct Type_copy_cv { typedef U const volatile type; }; template struct Type_copy_cvref : - Type_copy_ref::type,U>::type> {}; + Type_copy_ref,U>::type> {}; struct Dereference_functor { template struct result{}; @@ -139,18 +138,18 @@ struct Has_type_different_from } // TODO: make a Cartesian-only variant -// WARNING: do not use the Req* parameters too much, they can cause circular instanciations and are only useful for dispatching. +// WARNING: do not use the Req* parameters too much, they can cause circular instantiations and are only useful for dispatching. #define CGAL_STRIP_PAREN_(...) __VA_ARGS__ #define CGAL_STRIP_PAREN(...) CGAL_STRIP_PAREN_ __VA_ARGS__ // What to do with O? pass it down to other functors or drop it? #define CGAL_KD_DEFAULT_FUNCTOR(Tg,Name,ReqTyp,ReqFun) \ template \ struct Get_functor::value \ || !Provides_types >::value \ || !Provides_functors >::value \ - , int, void>::type> \ + , int, void>> \ { \ typedef CGAL_STRIP_PAREN_ Name type; \ typedef K Bound_kernel; \ @@ -160,11 +159,11 @@ struct Has_type_different_from #define CGAL_KD_DEFAULT_TYPE(Tg,Name,ReqTyp,ReqFun) \ template \ struct Get_type::value \ || !Provides_types >::value \ || !Provides_functors >::value \ - , int, void>::type> \ + , int, void>> \ { \ typedef CGAL_STRIP_PAREN_ Name type; \ typedef K Bound_kernel; \ diff --git a/thirdparty/CGAL/include/CGAL/No_intersection_surface_sweep_2.h b/thirdparty/CGAL/include/CGAL/No_intersection_surface_sweep_2.h index 08f6bdfa..31f9c495 100644 --- a/thirdparty/CGAL/include/CGAL/No_intersection_surface_sweep_2.h +++ b/thirdparty/CGAL/include/CGAL/No_intersection_surface_sweep_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h $ -// $Id: No_intersection_surface_sweep_2.h 6b64dc8 2020-11-11T09:38:55+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h $ +// $Id: include/CGAL/No_intersection_surface_sweep_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman @@ -129,11 +129,8 @@ class No_intersection_surface_sweep_2 { typedef typename Traits_adaptor_2::Top_side_category Top_side_category; typedef typename Traits_adaptor_2::Right_side_category Right_side_category; - BOOST_MPL_ASSERT( - (typename - Arr_sane_identified_tagging< Left_side_category, Bottom_side_category, - Top_side_category, Right_side_category >::result) - ); + static_assert(Arr_sane_identified_tagging< Left_side_category, Bottom_side_category, + Top_side_category, Right_side_category >::value); protected: /*! @@ -281,7 +278,7 @@ class No_intersection_surface_sweep_2 { m_visitor->after_sweep(); } - /*! Run the sweep-line alogrithm on a range of x-monotone curves, a range + /*! Run the sweep-line algorithm on a range of x-monotone curves, a range * of action event points (if a curve passed through an action point, it will * be split) and a range of query points (if a curve passed through a * query point,it will not be split). @@ -479,7 +476,7 @@ class No_intersection_surface_sweep_2 { } } - /*! Initiliaze the sweep algorithm. */ + /*! Initialize the sweep algorithm. */ template void _init_sweep(CurveInputIterator curves_begin, CurveInputIterator curves_end) @@ -490,7 +487,7 @@ class No_intersection_surface_sweep_2 { _init_curves(curves_begin, curves_end); // initialize the curves } - /*! Initiliaze the sweep algorithm. */ + /*! Initialize the sweep algorithm. */ template void _init_indexed_sweep(const EdgeRange& edges, const Accessor& accessor) diff --git a/thirdparty/CGAL/include/CGAL/Null_matrix.h b/thirdparty/CGAL/include/CGAL/Null_matrix.h index d996ec89..d7fb787a 100644 --- a/thirdparty/CGAL/include/CGAL/Null_matrix.h +++ b/thirdparty/CGAL/include/CGAL/Null_matrix.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Null_matrix.h $ -// $Id: Null_matrix.h ff09c5d 2019-10-25T16:35:53+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Null_matrix.h $ +// $Id: include/CGAL/Null_matrix.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola diff --git a/thirdparty/CGAL/include/CGAL/Number_type_checker.h b/thirdparty/CGAL/include/CGAL/Number_type_checker.h index ee9e0773..98684bf8 100644 --- a/thirdparty/CGAL/include/CGAL/Number_type_checker.h +++ b/thirdparty/CGAL/include/CGAL/Number_type_checker.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Number_type_checker.h $ -// $Id: Number_type_checker.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Number_type_checker.h $ +// $Id: include/CGAL/Number_type_checker.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -61,7 +61,7 @@ class Number_type_checker Number_type_checker(const NT1 &n1, const NT2 &n2) : _n1(n1), _n2(n2) { CGAL_assertion(is_valid()); } - // The following need to be dependant on NT1 != {NT2,int,double} ... + // The following need to be dependent on NT1 != {NT2,int,double} ... //Number_type_checker(const NT1 &n1) : _n1(n1), _n2(n1) {} //Number_type_checker(const NT2 &n2) : _n1(n2), _n2(n2) {} diff --git a/thirdparty/CGAL/include/CGAL/Number_types/internal/Exact_type_selector.h b/thirdparty/CGAL/include/CGAL/Number_types/internal/Exact_type_selector.h index da012d1d..319a1c3b 100644 --- a/thirdparty/CGAL/include/CGAL/Number_types/internal/Exact_type_selector.h +++ b/thirdparty/CGAL/include/CGAL/Number_types/internal/Exact_type_selector.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Number_types/internal/Exact_type_selector.h $ -// $Id: Exact_type_selector.h 4bd7049 2022-05-03T12:14:50+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Number_types/internal/Exact_type_selector.h $ +// $Id: include/CGAL/Number_types/internal/Exact_type_selector.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,9 +22,9 @@ #include #include #include -#include #include + #ifdef CGAL_USE_GMP # include # include @@ -49,29 +49,59 @@ class Expr; namespace CGAL { namespace internal { // Two classes which tell the preferred "exact number types" corresponding to a type. +// Exact_ring_selector and Exact_field_selector are used by EPICK as exact number type +// to answer predicates at the end of the filtering chain of predicates and EPECK uses +// Exact_field_selector for as its exact number type. -// The default template chooses mpq_class, Gmpq, leda_rational, or Quotient. -// It should support the built-in types. -template < typename > -struct Exact_field_selector - -#if ( (defined(CGAL_TEST_SUITE) && CGAL_VERSION_NR == 1050500900) || defined(CGAL_FORCE_USE_BOOST_MP))\ - && BOOST_VERSION > 107800 && defined(CGAL_USE_BOOST_MP) -// use boost-mp by default in the testsuite until 5.5-beta is out -// Boost -{ typedef BOOST_cpp_arithmetic_kernel::Rational Type; }; -#else // BOOST_VERSION > 107800 -#ifdef CGAL_USE_GMPXX -{ typedef mpq_class Type; }; -#elif defined(CGAL_USE_GMP) -#if defined(CGAL_USE_BOOST_MP) -{ typedef BOOST_gmp_arithmetic_kernel::Rational Type; }; +// Warning, the order in this list must match the one in Installation/lib/cmake/CGALConfig.cmake +enum ENT_backend_choice +{ + GMP_BACKEND, + GMPXX_BACKEND, + BOOST_GMP_BACKEND, + BOOST_BACKEND, + LEDA_BACKEND, + MP_FLOAT_BACKEND +}; + +template +struct Exact_NT_backend; + +#ifdef CGAL_USE_GMP +template <> +struct Exact_NT_backend + : public GMP_arithmetic_kernel +{ +#ifdef CGAL_HAS_MPZF + typedef Mpzf Ring_for_float; #else -{ typedef Gmpq Type; }; + typedef Gmpzf Ring_for_float; #endif -#elif defined(CGAL_USE_LEDA) -{ typedef leda_rational Type; }; -#elif defined(CGAL_USE_BOOST_MP) +}; +#endif + +#ifdef CGAL_USE_GMPXX +template <> +struct Exact_NT_backend + : public GMPXX_arithmetic_kernel +{ + typedef Exact_NT_backend::Ring_for_float Ring_for_float; +}; +#endif + +#if defined (CGAL_USE_BOOST_MP) && defined(CGAL_USE_GMP) +template <> +struct Exact_NT_backend + : public BOOST_gmp_arithmetic_kernel +{ + typedef Exact_NT_backend::Ring_for_float Ring_for_float; +}; +#endif + +#ifdef CGAL_USE_BOOST_MP +template <> +struct Exact_NT_backend +{ // See the discussion in https://github.com/CGAL/cgal/pull/3614 // This is disabled for now because cpp_rational is even slower than Quotient. Quotient will be a good candidate after some polishing. // In fact, the new version of cpp_rational from here: https://github.com/boostorg/multiprecision/pull/366 @@ -79,31 +109,74 @@ struct Exact_field_selector // while Quotient does not. Though, we can still use it if needed. #if BOOST_VERSION <= 107800 // See this comment: https://github.com/CGAL/cgal/pull/5937#discussion_r721533675 -{ typedef Quotient Type; }; + typedef Quotient Rational; #else -{ typedef BOOST_cpp_arithmetic_kernel::Rational Type; }; + typedef BOOST_cpp_arithmetic_kernel::Rational Rational; #endif -#else -{ typedef Quotient Type; }; + typedef boost::multiprecision::cpp_int Integer; + typedef cpp_float Ring_for_float; +}; #endif -#endif // BOOST_VERSION > 107800 -// By default, a field is a safe choice of ring. -template < typename T > -struct Exact_ring_selector : Exact_field_selector < T > { }; +#ifdef CGAL_USE_LEDA +template <> +struct Exact_NT_backend + : public LEDA_arithmetic_kernel +{ + typedef leda_rational Ring_for_float; +}; +#endif template <> -struct Exact_ring_selector -#ifdef CGAL_HAS_MPZF -{ typedef Mpzf Type; }; -#elif defined(CGAL_HAS_THREADS) || !defined(CGAL_USE_GMP) -{ typedef MP_Float Type; }; +struct Exact_NT_backend + : public MP_Float_arithmetic_kernel +{ + typedef MP_Float Ring_for_float; +}; + +#ifndef CMAKE_OVERRIDDEN_DEFAULT_ENT_BACKEND +constexpr ENT_backend_choice Default_exact_nt_backend = +#ifdef CGAL_USE_GMPXX + GMPXX_BACKEND; +#elif defined(CGAL_USE_GMP) + #if defined(CGAL_USE_BOOST_MP) + BOOST_GMP_BACKEND; + #else + GMP_BACKEND; + #endif +#elif BOOST_VERSION > 107900 && defined(CGAL_USE_BOOST_MP) + BOOST_BACKEND; +#elif defined(CGAL_USE_LEDA) + LEDA_BACKEND; #else -{ typedef Gmpzf Type; }; + MP_FLOAT_BACKEND; +#endif +#else +constexpr ENT_backend_choice Default_exact_nt_backend = static_cast(CMAKE_OVERRIDDEN_DEFAULT_ENT_BACKEND); #endif -template <> -struct Exact_ring_selector : Exact_ring_selector { }; +template < typename > +struct Exact_field_selector; + +template < typename > +struct Exact_ring_selector; + +#define CGAL_EXACT_SELECTORS_SPECS(X) \ +template <> \ +struct Exact_ring_selector \ +{ \ + using Type = typename Exact_NT_backend::Ring_for_float; \ +}; \ +\ +template <> \ +struct Exact_field_selector \ +{ \ + using Type = typename Exact_NT_backend::Rational; \ +}; + +CGAL_EXACT_SELECTORS_SPECS(double) +CGAL_EXACT_SELECTORS_SPECS(float) +CGAL_EXACT_SELECTORS_SPECS(int) template <> struct Exact_field_selector @@ -117,6 +190,10 @@ template <> struct Exact_field_selector > { typedef Quotient Type; }; +template <> +struct Exact_ring_selector > +{ typedef Quotient Type; }; + // And we specialize for the following types : #ifdef CGAL_USE_GMP template <> @@ -134,6 +211,10 @@ struct Exact_ring_selector template <> struct Exact_field_selector { typedef Gmpq Type; }; + +template <> +struct Exact_ring_selector +{ typedef Gmpq Type; }; #endif #ifdef CGAL_USE_GMPXX @@ -148,6 +229,10 @@ struct Exact_ring_selector< ::mpz_class> template <> struct Exact_field_selector< ::mpq_class> { typedef ::mpq_class Type; }; + +template <> +struct Exact_ring_selector< ::mpq_class> +{ typedef ::mpq_class Type; }; #endif #ifdef CGAL_USE_LEDA @@ -163,31 +248,66 @@ template <> struct Exact_field_selector { typedef leda_rational Type; }; +template <> +struct Exact_ring_selector +{ typedef leda_rational Type; }; + template <> struct Exact_field_selector { typedef leda_real Type; }; + +template <> +struct Exact_ring_selector +{ typedef leda_real Type; }; #endif #ifdef CGAL_USE_CORE template <> struct Exact_field_selector { typedef CORE::Expr Type; }; + +template <> +struct Exact_ring_selector +{ typedef CORE::Expr Type; }; #endif -template < typename ET > -struct Exact_field_selector > -: Exact_field_selector -{ - // We have a choice here : - // - using ET gets rid of the DAG computation as well as redoing the interval - // - using Lazy_exact_nt might use sharper intervals. - // typedef ET Type; - // typedef Lazy_exact_nt Type; -}; -template < typename ET > -struct Exact_ring_selector > -: Exact_ring_selector -{}; +#ifdef CGAL_USE_BOOST_MP +template <> +struct Exact_field_selector::Integer> +{ typedef Exact_NT_backend::Rational Type; }; + +template <> +struct Exact_ring_selector::Integer> +{ typedef Exact_NT_backend::Integer Type; }; + +template <> +struct Exact_field_selector::Rational> +{ typedef Exact_NT_backend::Rational Type; }; + +template <> +struct Exact_ring_selector::Rational> +{ typedef Exact_NT_backend::Rational Type; }; + + +#ifdef CGAL_USE_GMP +template <> +struct Exact_field_selector::Integer> +{ typedef Exact_NT_backend::Rational Type; }; + +template <> +struct Exact_ring_selector::Integer> +{ typedef Exact_NT_backend::Integer Type; }; + +template <> +struct Exact_field_selector::Rational> +{ typedef Exact_NT_backend::Rational Type; }; + +template <> +struct Exact_ring_selector::Rational> +{ typedef Exact_NT_backend::Rational Type; }; +#endif + +#endif #ifndef CGAL_NO_DEPRECATED_CODE // Added for backward compatibility @@ -197,4 +317,6 @@ struct Exact_type_selector : Exact_field_selector< ET > {}; } } // namespace CGAL::internal +#undef CGAL_EXACT_SELECTORS_SPECS + #endif // CGAL_INTERNAL_EXACT_TYPE_SELECTOR_H diff --git a/thirdparty/CGAL/include/CGAL/Number_types/internal_functions_comparison_root_of_2.h b/thirdparty/CGAL/include/CGAL/Number_types/internal_functions_comparison_root_of_2.h index 9af04358..7976eee1 100644 --- a/thirdparty/CGAL/include/CGAL/Number_types/internal_functions_comparison_root_of_2.h +++ b/thirdparty/CGAL/include/CGAL/Number_types/internal_functions_comparison_root_of_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Number_types/internal_functions_comparison_root_of_2.h $ -// $Id: internal_functions_comparison_root_of_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Number_types/internal_functions_comparison_root_of_2.h $ +// $Id: include/CGAL/Number_types/internal_functions_comparison_root_of_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/OFF_to_nef_3.h b/thirdparty/CGAL/include/CGAL/OFF_to_nef_3.h index 7b2cd2f7..ba58d3a0 100644 --- a/thirdparty/CGAL/include/CGAL/OFF_to_nef_3.h +++ b/thirdparty/CGAL/include/CGAL/OFF_to_nef_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/OFF_to_nef_3.h $ -// $Id: OFF_to_nef_3.h 6d6dc0c 2020-06-24T17:41:20+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/OFF_to_nef_3.h $ +// $Id: include/CGAL/OFF_to_nef_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/OSQP_quadratic_program_traits.h b/thirdparty/CGAL/include/CGAL/OSQP_quadratic_program_traits.h index ca1b436f..4784916a 100644 --- a/thirdparty/CGAL/include/CGAL/OSQP_quadratic_program_traits.h +++ b/thirdparty/CGAL/include/CGAL/OSQP_quadratic_program_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Solver_interface/include/CGAL/OSQP_quadratic_program_traits.h $ -// $Id: OSQP_quadratic_program_traits.h 599d7b3 2022-04-26T09:53:42+02:00 albert-github +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Solver_interface/include/CGAL/OSQP_quadratic_program_traits.h $ +// $Id: include/CGAL/OSQP_quadratic_program_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Dmitry Anisimov @@ -44,11 +44,11 @@ namespace CGAL { number type that `FieldNumberType` \note The `FT` type is provided for convenience. Internally, this FT type is converted - to `c_float` type that can be set either to `float` or `double`. By default, the `double` - type is used. After the optimization is complete, the `c_float` type is converted back to `FT`. - See more about `c_float` here. + to `OSQPFloat` type that can be set either to `float` or `double`. By default, the `double` + type is used. After the optimization is complete, the `OSQPFloat` type is converted back to `FT`. + See more about `OSQPFloat` here. - \cgalModels `QuadraticProgramTraits` + \cgalModels{QuadraticProgramTraits} */ template class OSQP_quadratic_program_traits @@ -192,27 +192,27 @@ class OSQP_quadratic_program_traits CGAL_precondition(q_vec.size() == n); CGAL_precondition(l_vec.size() == m && l_vec.size() == m); - const c_int P_nnz = static_cast(P_vec.size()); - auto P_x = std::make_unique(P_nnz); - auto P_i = std::make_unique(P_nnz); - auto P_p = std::make_unique(n + 1); + const OSQPInt P_nnz = static_cast(P_vec.size()); + auto P_x = std::make_unique(P_nnz); + auto P_i = std::make_unique(P_nnz); + auto P_p = std::make_unique(n + 1); set_matrix_from_triplets("P", P_vec, P_x.get(), P_i.get(), P_p.get()); if(verbose) std::cout << "P_nnz: " << P_nnz << std::endl; - const c_int A_nnz = static_cast(A_vec.size()); - auto A_x = std::make_unique(A_nnz); - auto A_i = std::make_unique(A_nnz); - auto A_p = std::make_unique(n + 1); + const OSQPInt A_nnz = static_cast(A_vec.size()); + auto A_x = std::make_unique(A_nnz); + auto A_i = std::make_unique(A_nnz); + auto A_p = std::make_unique(n + 1); set_matrix_from_triplets("A", A_vec, A_x.get(), A_i.get(), A_p.get()); if(verbose) std::cout << "A_nnz: " << A_nnz << std::endl; - const c_int q_size = static_cast(q_vec.size()); - const c_int l_size = static_cast(l_vec.size()); - const c_int u_size = static_cast(u_vec.size()); + const OSQPInt q_size = static_cast(q_vec.size()); + const OSQPInt l_size = static_cast(l_vec.size()); + const OSQPInt u_size = static_cast(u_vec.size()); - auto q_x = std::make_unique(q_size); - auto l_x = std::make_unique(l_size); - auto u_x = std::make_unique(u_size); + auto q_x = std::make_unique(q_size); + auto l_x = std::make_unique(l_size); + auto u_x = std::make_unique(u_size); set_qlu_data(q_x.get(), l_x.get(), u_x.get()); // Problem settings. @@ -220,22 +220,11 @@ class OSQP_quadratic_program_traits CGAL_assertion(settings); // Structures. - OSQPWorkspace *work; - OSQPData *data = (OSQPData *) malloc(sizeof(OSQPData)); - CGAL_assertion(data); + OSQPCscMatrix* P = static_cast(malloc(sizeof(OSQPCscMatrix))); + OSQPCscMatrix* A = static_cast(malloc(sizeof(OSQPCscMatrix))); - // Populate data. - data->n = static_cast(n); - data->m = static_cast(m); - data->P = csc_matrix(data->n, data->n, P_nnz, P_x.get(), P_i.get(), P_p.get()); - CGAL_assertion(data->P); - - data->q = q_x.get(); - data->A = csc_matrix(data->m, data->n, A_nnz, A_x.get(), A_i.get(), A_p.get()); - CGAL_assertion(data->A); - - data->l = l_x.get(); - data->u = u_x.get(); + csc_set_data(A, m, n, A_nnz, A_x.get(), A_i.get(), A_p.get()); + csc_set_data(P, n, n, P_nnz, P_x.get(), P_i.get(), P_p.get()); // Set solver settings. osqp_set_default_settings(settings); @@ -243,38 +232,33 @@ class OSQP_quadratic_program_traits settings->eps_rel = eps_rel; settings->verbose = verbose; - // Set workspace. - osqp_setup(&work, data, settings); + OSQPSolver* solver = NULL; + OSQPInt exitflag = osqp_setup(&solver, P, q_x.get(), A, l_x.get(), u_x.get(), m, n, settings); - // Solve problem. - c_int exitflag = -1; try { - exitflag = osqp_solve(work); + if (!exitflag) + exitflag = osqp_solve(solver); + + const OSQPFloat* x = solver->solution->x; + for (std::size_t i = 0; i < n; ++i) + { + const FT value{ x[i] }; + *(++solution) = value; + } } - catch(std::exception& e) + catch (std::exception& e) { std::cerr << "ERROR: OSQP solver has thrown an exception!" << std::endl; std::cerr << e.what() << std::endl; } - const bool success = (exitflag == 0); - - // Create solution. - const c_float *x = work->solution->x; - for(std::size_t i=0; iA); - c_free(data->P); - c_free(data); - c_free(settings); + osqp_cleanup(solver); + if (A) free(A); + if (P) free(P); + if (settings) free(settings); - return success; + return (exitflag == 0); } /// \endcond @@ -282,9 +266,9 @@ class OSQP_quadratic_program_traits // Based on the code in scipy, function coo_tocsr() void set_matrix_from_triplets(const std::string /* name */, const std::vector& triplets, - c_float *M_x, - c_int *M_i, - c_int *M_p) const + OSQPFloat *M_x, + OSQPInt *M_i, + OSQPInt *M_p) const { const std::size_t nnz = triplets.size(); @@ -296,10 +280,10 @@ class OSQP_quadratic_program_traits } // Fill M_p - c_int cumsum = 0; + OSQPInt cumsum = 0; for(std::size_t j=0; j(std::get<1>(triplets[k])); - const c_int dest = M_p[col]; + const OSQPInt col = static_cast(std::get<1>(triplets[k])); + const OSQPInt dest = M_p[col]; - M_i[dest] = static_cast(std::get<0>(triplets[k])); - M_x[dest] = c_float(CGAL::to_double(std::get<2>(triplets[k]))); + M_i[dest] = static_cast(std::get<0>(triplets[k])); + M_x[dest] = OSQPFloat(CGAL::to_double(std::get<2>(triplets[k]))); M_p[col]++; } - c_int last = 0; + OSQPInt last = 0; for(std::size_t j=0; j<=n; ++j) { - const c_int tmp = M_p[j]; + const OSQPInt tmp = M_p[j]; M_p[j] = last; last = tmp; } @@ -341,19 +325,19 @@ class OSQP_quadratic_program_traits // std::cout << std::endl; } - void set_qlu_data(c_float *q_x, - c_float *l_x, - c_float *u_x) const + void set_qlu_data(OSQPFloat *q_x, + OSQPFloat *l_x, + OSQPFloat *u_x) const { for(std::size_t i=0; i #include #include -#include +#include // STL #include @@ -764,7 +764,7 @@ class Reconstruction_triangulation_2 // signed distance from t to the intersection of line(a,b) and line(t,s) // the pair::first is false if sign==-1 and true otherwise - std::pair > + std::pair > signed_distance_from_intersection(Vertex_handle a, Vertex_handle b, Vertex_handle t, Vertex_handle s) const { const Point& pa = a->point(); @@ -776,24 +776,24 @@ class Reconstruction_triangulation_2 // signed distance from t to the intersection of line(a,b) and line(t,s) // the pair::first is false if sign==-1 and true otherwise - std::pair > + std::pair > compute_signed_distance_from_intersection( const Point& pa, const Point& pb, const Point& pt, const Point& ps) const { FT Dabt = compute_signed_distance(pa, pb, pt); if (Dabt == FT(0)) - return std::make_pair(true,boost::make_optional(FT(0))); + return std::make_pair(true,std::make_optional(FT(0))); Line lab = geom_traits().construct_line_2_object()( pa, geom_traits().construct_vector_2_object()(pa, pb)); Line lts = geom_traits().construct_line_2_object()( pt, geom_traits().construct_vector_2_object()(pt, ps)); - boost::optional Dqt; + std::optional Dqt; const auto result = intersection(lab, lts); if (result) { - const Point* iq = boost::get(&(*result)); + const Point* iq = std::get_if(&(*result)); if (iq) Dqt = CGAL::approximate_sqrt(geom_traits().compute_squared_distance_2_object()(*iq, pt)); } @@ -996,24 +996,24 @@ class Reconstruction_triangulation_2 std::cout <<"( " << (edge).priority() << ") ( " << a << " , " << b << " )" << std::endl; } - bool is_p_infinity(const std::pair >& p) const + bool is_p_infinity(const std::pair >& p) const { - return p.first && p.second==boost::none; + return p.first && p.second==std::nullopt; } - bool is_m_infinity(const std::pair >& p) const + bool is_m_infinity(const std::pair >& p) const { - return !p.first && p.second==boost::none; + return !p.first && p.second==std::nullopt; } - bool is_infinity(const std::pair >& p) const + bool is_infinity(const std::pair >& p) const { - return p.second==boost::none; + return p.second==std::nullopt; } - std::pair > m_infinity() const + std::pair > m_infinity() const { - return std::pair >(false,boost::optional()); + return std::pair >(false,std::optional()); } template // value_type = Edge @@ -1028,9 +1028,9 @@ class Reconstruction_triangulation_2 Edge ab = twin_edge(*it); Vertex_handle a = source_vertex(ab); Vertex_handle b = target_vertex(ab); - std::pair > D = signed_distance_from_intersection(a, b, target, source); + std::pair > D = signed_distance_from_intersection(a, b, target, source); if (!D.first ) { - CGAL_assertion(D.second!=boost::none); + CGAL_assertion(D.second!=std::nullopt); multi_ind.insert(Rec_edge_2(ab, *D.second)); } } @@ -1053,11 +1053,11 @@ class Reconstruction_triangulation_2 Vertex_handle c = target_vertex(bc); Vertex_handle d = target_vertex(cd); - std::pair > Dac=m_infinity(); + std::pair > Dac=m_infinity(); if (a != c && is_triangle_ccw(a, b, c)) Dac = signed_distance_from_intersection(a, c, target, source); - std::pair > Dbd=m_infinity(); + std::pair > Dbd=m_infinity(); if (b != d && is_triangle_ccw(b, c, d)) Dbd = signed_distance_from_intersection(b, d, target, source); diff --git a/thirdparty/CGAL/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h index e87016de..9af6d2fa 100644 --- a/thirdparty/CGAL/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h $ -// $Id: Reconstruction_vertex_base_2.h d6ec192 2022-12-22T14:22:40+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h $ +// $Id: include/CGAL/OTR_2/Reconstruction_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando de Goes, Pierre Alliez, Ivo Vigan, Clément Jamin diff --git a/thirdparty/CGAL/include/CGAL/OTR_2/Sample.h b/thirdparty/CGAL/include/CGAL/OTR_2/Sample.h index 6a4ee141..e433aaa7 100644 --- a/thirdparty/CGAL/include/CGAL/OTR_2/Sample.h +++ b/thirdparty/CGAL/include/CGAL/OTR_2/Sample.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Sample.h $ -// $Id: Sample.h 939a6a2 2023-01-02T13:17:17+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Sample.h $ +// $Id: include/CGAL/OTR_2/Sample.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando de Goes, Pierre Alliez, Ivo Vigan, Clément Jamin diff --git a/thirdparty/CGAL/include/CGAL/Object.h b/thirdparty/CGAL/include/CGAL/Object.h index d5a1822c..8d2a359d 100644 --- a/thirdparty/CGAL/include/CGAL/Object.h +++ b/thirdparty/CGAL/include/CGAL/Object.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Object.h $ -// $Id: Object.h b575892 2021-06-08T18:21:46+01:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Object.h $ +// $Id: include/CGAL/Object.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,8 +27,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -39,7 +39,7 @@ class Object std::shared_ptr obj; // returns an any pointer from a variant - struct Any_from_variant : public boost::static_visitor { + struct Any_from_variant { template boost::any* operator()(const T& t) const { return new boost::any(t); @@ -52,8 +52,6 @@ class Object template friend T object_cast(const Object & o); - typedef void (Object::*bool_type)() const; - void this_type_does_not_support_comparisons() const {} public: struct private_tag{}; @@ -64,14 +62,14 @@ class Object Object(T && t, private_tag) : obj(new boost::any(std::forward(t))) { } // implicit constructor from optionals containing variants - template - Object(const boost::optional< boost::variant >& t) - : obj( t ? boost::apply_visitor(Any_from_variant(), *t) : nullptr) { } + template + Object(const std::optional< std::variant >& t) + : obj( t ? std::visit(Any_from_variant(), *t) : nullptr) { } // implicit constructor from variants - template - Object(const boost::variant& v) - : obj(boost::apply_visitor(Any_from_variant(), v)) { } + template + Object(const std::variant& v) + : obj(std::visit(Any_from_variant(), v)) { } template bool assign(T &t) const @@ -97,8 +95,8 @@ class Object } // safe-bool conversion - operator bool_type() const { - return empty() == false ? &Object::this_type_does_not_support_comparisons : 0; + explicit operator bool() const { + return !empty(); } diff --git a/thirdparty/CGAL/include/CGAL/Octree.h b/thirdparty/CGAL/include/CGAL/Octree.h index 8362ccb5..72ee1678 100644 --- a/thirdparty/CGAL/include/CGAL/Octree.h +++ b/thirdparty/CGAL/include/CGAL/Octree.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Orthtree/include/CGAL/Octree.h $ -// $Id: Octree.h 4d761ed 2021-04-01T14:21:01+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Orthtree/include/CGAL/Octree.h $ +// $Id: include/CGAL/Octree.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/OpenGR/compute_registration_transformation.h b/thirdparty/CGAL/include/CGAL/OpenGR/compute_registration_transformation.h index 1576e755..03dac991 100644 --- a/thirdparty/CGAL/include/CGAL/OpenGR/compute_registration_transformation.h +++ b/thirdparty/CGAL/include/CGAL/OpenGR/compute_registration_transformation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h $ -// $Id: compute_registration_transformation.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h $ +// $Id: include/CGAL/OpenGR/compute_registration_transformation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot, Necip Fazil Yildiran @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -30,6 +29,8 @@ #include +#include + namespace CGAL { namespace OpenGR { @@ -275,7 +276,7 @@ compute_registration_transformation(const PointRange1& range1, const PointRan \cgalParamNEnd \cgalParamNBegin{normal_map} - \cgalParamDescription{a property map associating normals to the elements of the poing set `point_set_2`} + \cgalParamDescription{a property map associating normals to the elements of the point set `point_set_2`} \cgalParamType{a model of `ReadablePropertyMap` whose key type is the value type of the iterator of `PointRange2` and whose value type is `geom_traits::Vector_3`} \cgalParamDefault{Normals are computed and stored internally.} @@ -308,14 +309,14 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point typedef Point_set_processing_3_np_helper NP_helper2; typedef typename NP_helper1::Const_point_map PointMap1; typedef typename NP_helper2::Const_point_map PointMap2; - CGAL_static_assertion_msg((boost::is_same< typename boost::property_traits::value_type, - typename boost::property_traits::value_type> ::value), + static_assert(std::is_same< typename boost::property_traits::value_type, + typename boost::property_traits::value_type> ::value, "The point type of input ranges must be the same"); typedef typename NP_helper1::Normal_map NormalMap1; typedef typename NP_helper2::Normal_map NormalMap2; - CGAL_static_assertion_msg((boost::is_same< typename boost::property_traits::value_type, - typename boost::property_traits::value_type> ::value), + static_assert(std::is_same< typename boost::property_traits::value_type, + typename boost::property_traits::value_type> ::value, "The vector type of input ranges must be the same"); typedef typename NP_helper1::Geom_traits Kernel; diff --git a/thirdparty/CGAL/include/CGAL/OpenGR/register_point_sets.h b/thirdparty/CGAL/include/CGAL/OpenGR/register_point_sets.h index c413e06c..f9c798dc 100644 --- a/thirdparty/CGAL/include/CGAL/OpenGR/register_point_sets.h +++ b/thirdparty/CGAL/include/CGAL/OpenGR/register_point_sets.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h $ -// $Id: register_point_sets.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h $ +// $Id: include/CGAL/OpenGR/register_point_sets.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot, Necip Fazil Yildiran @@ -23,10 +23,10 @@ #include -#include - #include +#include + namespace CGAL { namespace OpenGR { @@ -196,7 +196,7 @@ register_point_sets(const PointRange1& range1, PointRange2& range2, \cgalParamNEnd \cgalParamNBegin{normal_map} - \cgalParamDescription{a property map associating normals to the elements of the poing set `point_set_2`} + \cgalParamDescription{a property map associating normals to the elements of the point set `point_set_2`} \cgalParamType{a model of `ReadablePropertyMap` whose key type is the value type of the iterator of `PointRange2` and whose value type is `geom_traits::Vector_3`} \cgalParamDefault{Normals are computed and stored internally.} @@ -222,14 +222,14 @@ register_point_sets (const PointRange1& point_set_1, PointRange2& point_set_2, typedef Point_set_processing_3_np_helper NP_helper2; typedef typename NP_helper1::Const_point_map PointMap1; typedef typename NP_helper2::Const_point_map PointMap2; - CGAL_static_assertion_msg((boost::is_same< typename boost::property_traits::value_type, - typename boost::property_traits::value_type> ::value), + static_assert(std::is_same< typename boost::property_traits::value_type, + typename boost::property_traits::value_type> ::value, "The point type of input ranges must be the same"); typedef typename NP_helper1::Normal_map NormalMap1; typedef typename NP_helper2::Normal_map NormalMap2; - CGAL_static_assertion_msg((boost::is_same< typename boost::property_traits::value_type, - typename boost::property_traits::value_type> ::value), + static_assert(std::is_same< typename boost::property_traits::value_type, + typename boost::property_traits::value_type> ::value, "The vector type of input ranges must be the same"); typedef typename NP_helper1::Geom_traits Kernel; diff --git a/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/Oriented_bounding_box_traits_3.h b/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/Oriented_bounding_box_traits_3.h index 2b53b1ab..a2f0a095 100644 --- a/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/Oriented_bounding_box_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/Oriented_bounding_box_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/Oriented_bounding_box_traits_3.h $ -// $Id: Oriented_bounding_box_traits_3.h b3968d2 2020-03-27T18:19:39+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/Oriented_bounding_box_traits_3.h $ +// $Id: include/CGAL/Optimal_bounding_box/Oriented_bounding_box_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -36,7 +36,7 @@ namespace CGAL { /// /// \tparam K must be a model of `Kernel` /// -/// \cgalModels `OrientedBoundingBoxTraits_3` +/// \cgalModels{OrientedBoundingBoxTraits_3} /// template class Oriented_bounding_box_traits_3 diff --git a/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/evolution.h b/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/evolution.h index c6c76899..c6474f01 100644 --- a/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/evolution.h +++ b/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/evolution.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/evolution.h $ -// $Id: evolution.h 6fe47ed 2020-05-06T12:10:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/evolution.h $ +// $Id: include/CGAL/Optimal_bounding_box/internal/evolution.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -85,7 +85,7 @@ class Evolution Simplex offspring; for(int j=0; j<4; ++j) { - const FT r{m_rng.get_double()}; + const FT r{m_rng.uniform_01()}; const FT fitnessA = m_population[group1[i]][j].fitness(); const FT fitnessB = m_population[group2[i]][j].fitness(); const FT threshold = (fitnessA < fitnessB) ? uweight : lweight; @@ -129,7 +129,7 @@ class Evolution const std::size_t nelder_mead_iterations, const std::size_t max_random_mutations = 0) { - // stopping criteria prameters + // stopping criteria parameters FT prev_fit_value = 0; const FT tolerance = 1e-10; int stale = 0; diff --git a/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/fitness_function.h b/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/fitness_function.h index 68e69f0f..0775f617 100644 --- a/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/fitness_function.h +++ b/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/fitness_function.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/fitness_function.h $ -// $Id: fitness_function.h e9d41d7 2020-04-21T10:03:00+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/fitness_function.h $ +// $Id: include/CGAL/Optimal_bounding_box/internal/fitness_function.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -39,8 +39,10 @@ compute_fitness(const typename Traits::Matrix& R, // rotation matrix CGAL_assertion(points.size() >= 3); FT xmin, ymin, zmin, xmax, ymax, zmax; - xmin = ymin = zmin = FT{(std::numeric_limits::max)()}; - xmax = ymax = zmax = FT{std::numeric_limits::lowest()}; + //cast from double to float looses data, so cast with {} is not allowed + //cast from double to exact types also works + xmin = ymin = zmin = FT((std::numeric_limits::max)()); + xmax = ymax = zmax = FT(std::numeric_limits::lowest()); for(const Point& pt : points) { @@ -81,8 +83,10 @@ compute_fitness_if_smaller(const typename Traits::Matrix& R, // rotation matrix CGAL_assertion(points.size() >= 3); FT xmin, ymin, zmin, xmax, ymax, zmax; - xmin = ymin = zmin = FT{(std::numeric_limits::max)()}; - xmax = ymax = zmax = FT{std::numeric_limits::lowest()}; + //cast from double to float looses data, so cast with {} is not allowed + //cast from double to exact types also works + xmin = ymin = zmin = FT((std::numeric_limits::max)()); + xmax = ymax = zmax = FT(std::numeric_limits::lowest()); // compute every 1%, with a minimum of 1000 iterations const std::size_t pn = points.size(); diff --git a/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/helper.h b/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/helper.h index cc63fb70..ab2258e5 100644 --- a/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/helper.h +++ b/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/helper.h $ -// $Id: helper.h ba99311 2019-12-12T11:18:29+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/helper.h $ +// $Id: include/CGAL/Optimal_bounding_box/internal/helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/nelder_mead_functions.h b/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/nelder_mead_functions.h index 9e222f97..b4de5c5c 100644 --- a/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/nelder_mead_functions.h +++ b/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/nelder_mead_functions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/nelder_mead_functions.h $ -// $Id: nelder_mead_functions.h f0f2799 2020-03-28T12:18:16+01:00 Mael +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/nelder_mead_functions.h $ +// $Id: include/CGAL/Optimal_bounding_box/internal/nelder_mead_functions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/optimize_2.h b/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/optimize_2.h index bb594dfe..b62943f9 100644 --- a/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/optimize_2.h +++ b/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/optimize_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/optimize_2.h $ -// $Id: optimize_2.h 93ee230 2021-08-23T22:25:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/optimize_2.h $ +// $Id: include/CGAL/Optimal_bounding_box/internal/optimize_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -104,7 +104,9 @@ compute_2D_deviation(const PointRange& points, if(theta > 0.25 * CGAL_PI) // @todo is there a point to this theta = 0.5 * CGAL_PI - theta; - return std::make_pair(pol.area(), FT{theta}); + //cast from double to float looses data, so cast with {} is not allowed + //cast from double to exact types also works + return std::make_pair(pol.area(), FT(theta)); } template @@ -117,14 +119,16 @@ void optimize_along_OBB_axes(typename Traits::Matrix& rot, typedef typename Traits::Matrix Matrix; typedef typename Traits::Vector Vector; - CGAL_static_assertion((std::is_same::type, Point>::value)); + static_assert(std::is_same::type, Point>::value); std::vector rotated_points; rotated_points.reserve(points.size()); FT xmin, ymin, zmin, xmax, ymax, zmax; - xmin = ymin = zmin = FT{(std::numeric_limits::max)()}; - xmax = ymax = zmax = FT{std::numeric_limits::lowest()}; + //cast from double to float looses data, so cast with {} is not allowed + //cast from double to exact types also works + xmin = ymin = zmin = FT((std::numeric_limits::max)()); + xmax = ymax = zmax = FT(std::numeric_limits::lowest()); for(const Point& pt : points) { diff --git a/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/population.h b/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/population.h index dfde0e3f..4a79e3ca 100644 --- a/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/population.h +++ b/thirdparty/CGAL/include/CGAL/Optimal_bounding_box/internal/population.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/population.h $ -// $Id: population.h e9d41d7 2020-04-21T10:03:00+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/population.h $ +// $Id: include/CGAL/Optimal_bounding_box/internal/population.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -121,7 +121,9 @@ class Population Vertex& get_best_vertex() { std::size_t simplex_id = static_cast(-1), vertex_id = static_cast(-1); - FT best_fitness = FT{(std::numeric_limits::max)()}; + //cast from double to float looses data, so cast with {} is not allowed + //cast from double to exact types also works + FT best_fitness = FT((std::numeric_limits::max)()); for(std::size_t i=0, ps=m_simplices.size(); i #include -#include #include #include @@ -164,9 +163,9 @@ void construct_oriented_bounding_box(const PointRange& points, Array& obb_points, CGAL::Random& rng, const Traits& traits, - typename boost::enable_if< - typename boost::has_range_iterator - >::type* = 0) + std::enable_if_t< + boost::has_range_iterator::value + >* = 0) { typename Traits::Aff_transformation_3 transformation, inverse_transformation; compute_best_transformation(points, transformation, inverse_transformation, rng, traits); @@ -179,9 +178,9 @@ void construct_oriented_bounding_box(const PointRange& points, PolygonMesh& pm, CGAL::Random& rng, const Traits& traits, - typename boost::disable_if< - typename boost::has_range_iterator - >::type* = 0) + std::enable_if_t< + !boost::has_range_iterator::value + >* = 0) { typename Traits::Aff_transformation_3 transformation, inverse_transformation; compute_best_transformation(points, transformation, inverse_transformation, rng, traits); @@ -203,7 +202,7 @@ void construct_oriented_bounding_box(const PointRange& points, { typedef typename Traits::Point_3 Point; - CGAL_static_assertion((std::is_same::type, Point>::value)); + static_assert(std::is_same::type, Point>::value); if(use_ch) // construct the convex hull to reduce the number of points { @@ -318,9 +317,9 @@ void oriented_bounding_box(const PointRange& points, Output& out, const NamedParameters& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if< - typename boost::has_range_iterator - >::type* = 0 + , std::enable_if_t< + boost::has_range_iterator::value + >* = 0 #endif ) { @@ -342,7 +341,7 @@ void oriented_bounding_box(const PointRange& points, NamedParameters, Default_traits>::type Geom_traits; - CGAL_static_assertion_msg(!(std::is_same::value), + static_assert(!(std::is_same::value), "You must provide a traits class or have Eigen enabled!"); Geom_traits traits = choose_parameter(get_parameter(np, internal_np::geom_traits)); @@ -362,7 +361,7 @@ void oriented_bounding_box(const PointRange& points, // @todo handle those cases (or call min_rectangle_2 with a projection) if(points.size() <= 3) { - std::cerr << "The oriented bounding box cannot (yet) be computed for a mesh with fewer than 4 vertices!\n"; + std::cerr << "The oriented bounding box cannot be computed with fewer than 4 vertices!\n"; return; } @@ -421,9 +420,9 @@ void oriented_bounding_box(const PolygonMesh& pmesh, Output& out, const NamedParameters& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if< - typename boost::has_range_iterator - >::type* = 0 + , std::enable_if_t< + !boost::has_range_iterator::value + >* = 0 #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/Optimal_transportation_reconstruction_2.h b/thirdparty/CGAL/include/CGAL/Optimal_transportation_reconstruction_2.h index ecaa4650..27fd4ab6 100644 --- a/thirdparty/CGAL/include/CGAL/Optimal_transportation_reconstruction_2.h +++ b/thirdparty/CGAL/include/CGAL/Optimal_transportation_reconstruction_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h $ -// $Id: Optimal_transportation_reconstruction_2.h 793801c 2023-01-03T07:36:46+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h $ +// $Id: include/CGAL/Optimal_transportation_reconstruction_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando de Goes, Pierre Alliez, Ivo Vigan, Clément Jamin @@ -34,7 +34,6 @@ #include #include #include -#include namespace CGAL { @@ -230,11 +229,11 @@ class Optimal_transportation_reconstruction_2 /// @} - /// \name Settting Parameters + /// \name Setting Parameters /// @{ /*! If `sample_size == 0`, the simplification is performed using an exhaustive priority queue. - If `sample_size` is stricly positive the simplification is performed using a + If `sample_size` is strictly positive the simplification is performed using a multiple choice approach, ie, a best-choice selection in a random sample of edge collapse operators, of size `sample_size`. A typical value for the sample size is 15, but this value must be enlarged when targeting a very coarse simplification. @@ -1185,9 +1184,9 @@ class Optimal_transportation_reconstruction_2 // number type (like a multiprecision), the coordinates of the points // will increase a lot due to the relocation step. These functions // simply turn a relocated point to a rounded to double version. - void relocate_on_the_double_grid(Point&, boost::true_type) const + void relocate_on_the_double_grid(Point&, std::true_type) const {} - void relocate_on_the_double_grid(Point& p, boost::false_type) const + void relocate_on_the_double_grid(Point& p, std::false_type) const { double x=to_double(m_traits.compute_x_2_object()(p)); double y=to_double(m_traits.compute_y_2_object()(p)); @@ -1196,7 +1195,7 @@ class Optimal_transportation_reconstruction_2 void relocate_on_the_double_grid(Point& p) const { relocate_on_the_double_grid(p, - typename boost::is_float::type()); + typename std::is_floating_point::type()); } Point compute_relocation(Vertex_handle vertex) const { diff --git a/thirdparty/CGAL/include/CGAL/Optimisation/Access_coordinates_begin_2.h b/thirdparty/CGAL/include/CGAL/Optimisation/Access_coordinates_begin_2.h index 24ad523c..149a2628 100644 --- a/thirdparty/CGAL/include/CGAL/Optimisation/Access_coordinates_begin_2.h +++ b/thirdparty/CGAL/include/CGAL/Optimisation/Access_coordinates_begin_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimisation_basic/include/CGAL/Optimisation/Access_coordinates_begin_2.h $ -// $Id: Access_coordinates_begin_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimisation_basic/include/CGAL/Optimisation/Access_coordinates_begin_2.h $ +// $Id: include/CGAL/Optimisation/Access_coordinates_begin_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Optimisation/Access_coordinates_begin_3.h b/thirdparty/CGAL/include/CGAL/Optimisation/Access_coordinates_begin_3.h index 5647cf57..25e0c8d3 100644 --- a/thirdparty/CGAL/include/CGAL/Optimisation/Access_coordinates_begin_3.h +++ b/thirdparty/CGAL/include/CGAL/Optimisation/Access_coordinates_begin_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimisation_basic/include/CGAL/Optimisation/Access_coordinates_begin_3.h $ -// $Id: Access_coordinates_begin_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimisation_basic/include/CGAL/Optimisation/Access_coordinates_begin_3.h $ +// $Id: include/CGAL/Optimisation/Access_coordinates_begin_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Optimisation/Access_coordinates_begin_d.h b/thirdparty/CGAL/include/CGAL/Optimisation/Access_coordinates_begin_d.h index 8df1d4e9..a49b66e3 100644 --- a/thirdparty/CGAL/include/CGAL/Optimisation/Access_coordinates_begin_d.h +++ b/thirdparty/CGAL/include/CGAL/Optimisation/Access_coordinates_begin_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimisation_basic/include/CGAL/Optimisation/Access_coordinates_begin_d.h $ -// $Id: Access_coordinates_begin_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimisation_basic/include/CGAL/Optimisation/Access_coordinates_begin_d.h $ +// $Id: include/CGAL/Optimisation/Access_coordinates_begin_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Optimisation/Access_dimension_2.h b/thirdparty/CGAL/include/CGAL/Optimisation/Access_dimension_2.h index 1e98647d..334aa804 100644 --- a/thirdparty/CGAL/include/CGAL/Optimisation/Access_dimension_2.h +++ b/thirdparty/CGAL/include/CGAL/Optimisation/Access_dimension_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimisation_basic/include/CGAL/Optimisation/Access_dimension_2.h $ -// $Id: Access_dimension_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimisation_basic/include/CGAL/Optimisation/Access_dimension_2.h $ +// $Id: include/CGAL/Optimisation/Access_dimension_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Optimisation/Access_dimension_3.h b/thirdparty/CGAL/include/CGAL/Optimisation/Access_dimension_3.h index 20db3e1b..9698dda5 100644 --- a/thirdparty/CGAL/include/CGAL/Optimisation/Access_dimension_3.h +++ b/thirdparty/CGAL/include/CGAL/Optimisation/Access_dimension_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimisation_basic/include/CGAL/Optimisation/Access_dimension_3.h $ -// $Id: Access_dimension_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimisation_basic/include/CGAL/Optimisation/Access_dimension_3.h $ +// $Id: include/CGAL/Optimisation/Access_dimension_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Optimisation/Access_dimension_d.h b/thirdparty/CGAL/include/CGAL/Optimisation/Access_dimension_d.h index d49a04a1..4aad21e9 100644 --- a/thirdparty/CGAL/include/CGAL/Optimisation/Access_dimension_d.h +++ b/thirdparty/CGAL/include/CGAL/Optimisation/Access_dimension_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimisation_basic/include/CGAL/Optimisation/Access_dimension_d.h $ -// $Id: Access_dimension_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimisation_basic/include/CGAL/Optimisation/Access_dimension_d.h $ +// $Id: include/CGAL/Optimisation/Access_dimension_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Optimisation/Construct_point_2.h b/thirdparty/CGAL/include/CGAL/Optimisation/Construct_point_2.h index bf75bae5..c13570a6 100644 --- a/thirdparty/CGAL/include/CGAL/Optimisation/Construct_point_2.h +++ b/thirdparty/CGAL/include/CGAL/Optimisation/Construct_point_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimisation_basic/include/CGAL/Optimisation/Construct_point_2.h $ -// $Id: Construct_point_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimisation_basic/include/CGAL/Optimisation/Construct_point_2.h $ +// $Id: include/CGAL/Optimisation/Construct_point_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Optimisation/Construct_point_3.h b/thirdparty/CGAL/include/CGAL/Optimisation/Construct_point_3.h index 83fa1946..2514121a 100644 --- a/thirdparty/CGAL/include/CGAL/Optimisation/Construct_point_3.h +++ b/thirdparty/CGAL/include/CGAL/Optimisation/Construct_point_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimisation_basic/include/CGAL/Optimisation/Construct_point_3.h $ -// $Id: Construct_point_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimisation_basic/include/CGAL/Optimisation/Construct_point_3.h $ +// $Id: include/CGAL/Optimisation/Construct_point_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Optimisation/Construct_point_d.h b/thirdparty/CGAL/include/CGAL/Optimisation/Construct_point_d.h index ab11c05b..10f66bce 100644 --- a/thirdparty/CGAL/include/CGAL/Optimisation/Construct_point_d.h +++ b/thirdparty/CGAL/include/CGAL/Optimisation/Construct_point_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimisation_basic/include/CGAL/Optimisation/Construct_point_d.h $ -// $Id: Construct_point_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimisation_basic/include/CGAL/Optimisation/Construct_point_d.h $ +// $Id: include/CGAL/Optimisation/Construct_point_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Optimisation/basic.h b/thirdparty/CGAL/include/CGAL/Optimisation/basic.h index 4b4045ed..4f50c3c1 100644 --- a/thirdparty/CGAL/include/CGAL/Optimisation/basic.h +++ b/thirdparty/CGAL/include/CGAL/Optimisation/basic.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimisation_basic/include/CGAL/Optimisation/basic.h $ -// $Id: basic.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimisation_basic/include/CGAL/Optimisation/basic.h $ +// $Id: include/CGAL/Optimisation/basic.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,6 @@ // includes #include -#include #include #include diff --git a/thirdparty/CGAL/include/CGAL/Optimisation/debug.h b/thirdparty/CGAL/include/CGAL/Optimisation/debug.h index c6b17df2..7b990ab7 100644 --- a/thirdparty/CGAL/include/CGAL/Optimisation/debug.h +++ b/thirdparty/CGAL/include/CGAL/Optimisation/debug.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimisation_basic/include/CGAL/Optimisation/debug.h $ -// $Id: debug.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimisation_basic/include/CGAL/Optimisation/debug.h $ +// $Id: include/CGAL/Optimisation/debug.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Optimisation_d_traits_2.h b/thirdparty/CGAL/include/CGAL/Optimisation_d_traits_2.h index bf7f26e1..c9439840 100644 --- a/thirdparty/CGAL/include/CGAL/Optimisation_d_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Optimisation_d_traits_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimisation_basic/include/CGAL/Optimisation_d_traits_2.h $ -// $Id: Optimisation_d_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimisation_basic/include/CGAL/Optimisation_d_traits_2.h $ +// $Id: include/CGAL/Optimisation_d_traits_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Optimisation_d_traits_3.h b/thirdparty/CGAL/include/CGAL/Optimisation_d_traits_3.h index 40470736..e28e8575 100644 --- a/thirdparty/CGAL/include/CGAL/Optimisation_d_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Optimisation_d_traits_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimisation_basic/include/CGAL/Optimisation_d_traits_3.h $ -// $Id: Optimisation_d_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimisation_basic/include/CGAL/Optimisation_d_traits_3.h $ +// $Id: include/CGAL/Optimisation_d_traits_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Optimisation_d_traits_d.h b/thirdparty/CGAL/include/CGAL/Optimisation_d_traits_d.h index 5a77a5e7..14f3aae9 100644 --- a/thirdparty/CGAL/include/CGAL/Optimisation_d_traits_d.h +++ b/thirdparty/CGAL/include/CGAL/Optimisation_d_traits_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimisation_basic/include/CGAL/Optimisation_d_traits_d.h $ -// $Id: Optimisation_d_traits_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimisation_basic/include/CGAL/Optimisation_d_traits_d.h $ +// $Id: include/CGAL/Optimisation_d_traits_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Orientation_Linf_2.h b/thirdparty/CGAL/include/CGAL/Orientation_Linf_2.h index f4d0dbf0..9cecf548 100644 --- a/thirdparty/CGAL/include/CGAL/Orientation_Linf_2.h +++ b/thirdparty/CGAL/include/CGAL/Orientation_Linf_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Orientation_Linf_2.h $ -// $Id: Orientation_Linf_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Orientation_Linf_2.h $ +// $Id: include/CGAL/Orientation_Linf_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Origin.h b/thirdparty/CGAL/include/CGAL/Origin.h index 466c2dcd..e56af922 100644 --- a/thirdparty/CGAL/include/CGAL/Origin.h +++ b/thirdparty/CGAL/include/CGAL/Origin.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Origin.h $ -// $Id: Origin.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Origin.h $ +// $Id: include/CGAL/Origin.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Origin_impl.h b/thirdparty/CGAL/include/CGAL/Origin_impl.h index eb49cbd8..0e33d8a5 100644 --- a/thirdparty/CGAL/include/CGAL/Origin_impl.h +++ b/thirdparty/CGAL/include/CGAL/Origin_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Origin_impl.h $ -// $Id: Origin_impl.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Origin_impl.h $ +// $Id: include/CGAL/Origin_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Orthogonal_incremental_neighbor_search.h b/thirdparty/CGAL/include/CGAL/Orthogonal_incremental_neighbor_search.h index 7708a313..e835d88b 100644 --- a/thirdparty/CGAL/include/CGAL/Orthogonal_incremental_neighbor_search.h +++ b/thirdparty/CGAL/include/CGAL/Orthogonal_incremental_neighbor_search.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h $ -// $Id: Orthogonal_incremental_neighbor_search.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h $ +// $Id: include/CGAL/Orthogonal_incremental_neighbor_search.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -65,7 +65,7 @@ namespace CGAL { SearchTraits traits; public: - int number_of_neighbours_computed; + int number_of_neighbors_computed; int number_of_internal_nodes_visited; int number_of_leaf_nodes_visited; int number_of_items_visited; @@ -85,7 +85,7 @@ namespace CGAL { FT distance_to_root; - bool search_nearest_neighbour; + bool search_nearest_neighbor; FT rd; @@ -97,8 +97,8 @@ namespace CGAL { bool search_nearest; - Priority_higher(bool search_the_nearest_neighbour) - : search_nearest(search_the_nearest_neighbour) + Priority_higher(bool search_the_nearest_neighbor) + : search_nearest(search_the_nearest_neighbor) {} //highest priority is smallest distance @@ -115,8 +115,8 @@ namespace CGAL { bool search_nearest; - Distance_smaller(bool search_the_nearest_neighbour) - : search_nearest(search_the_nearest_neighbour) + Distance_smaller(bool search_the_nearest_neighbor) + : search_nearest(search_the_nearest_neighbor) {} //highest priority is smallest distance @@ -144,12 +144,12 @@ namespace CGAL { // constructor Iterator_implementation(const Tree& tree,const Query_item& q, const Distance& tr, FT Eps=FT(0.0), bool search_nearest=true) - : traits(tree.traits()),number_of_neighbours_computed(0), number_of_internal_nodes_visited(0), + : traits(tree.traits()),number_of_neighbors_computed(0), number_of_internal_nodes_visited(0), number_of_leaf_nodes_visited(0), number_of_items_visited(0), orthogonal_distance_instance(tr), m_distance_helper(orthogonal_distance_instance, traits), multiplication_factor(orthogonal_distance_instance.transformed_distance(FT(1.0)+Eps)), - query_point(q), search_nearest_neighbour(search_nearest), + query_point(q), search_nearest_neighbor(search_nearest), m_tree(tree), PriorityQueue(Priority_higher(search_nearest)), Item_PriorityQueue(Distance_smaller(search_nearest)), reference_count(1) @@ -175,7 +175,7 @@ namespace CGAL { // rd is the distance of the top of the priority queue to q rd=std::get<1>(*The_Root); - Compute_the_next_nearest_neighbour(); + Compute_the_next_nearest_neighbor(); } else{ distance_to_root= @@ -187,7 +187,7 @@ namespace CGAL { // rd is the distance of the top of the priority queue to q rd=std::get<1>(*The_Root); - Compute_the_next_furthest_neighbour(); + Compute_the_next_furthest_neighbor(); } @@ -205,10 +205,10 @@ namespace CGAL { operator++() { Delete_the_current_item_top(); - if(search_nearest_neighbour) - Compute_the_next_nearest_neighbour(); + if(search_nearest_neighbor) + Compute_the_next_nearest_neighbor(); else - Compute_the_next_furthest_neighbour(); + Compute_the_next_furthest_neighbor(); return *this; } @@ -232,8 +232,8 @@ namespace CGAL { << number_of_leaf_nodes_visited << std::endl; s << "Number of items visited:" << number_of_items_visited << std::endl; - s << "Number of neighbours computed:" - << number_of_neighbours_computed << std::endl; + s << "Number of neighbors computed:" + << number_of_neighbors_computed << std::endl; return s; } @@ -287,21 +287,21 @@ namespace CGAL { // old top of PriorityQueue has been processed, // hence update rd - bool next_neighbour_found; + bool next_neighbor_found; if (!(PriorityQueue.empty())) { rd = std::get<1>(*PriorityQueue.top()); - next_neighbour_found = (search_furthest ? + next_neighbor_found = (search_furthest ? multiplication_factor*rd < Item_PriorityQueue.top()->second : multiplication_factor*rd > Item_PriorityQueue.top()->second); } - else // priority queue empty => last neighbour found + else // priority queue empty => last neighbor found { - next_neighbour_found = true; + next_neighbor_found = true; } - number_of_neighbours_computed++; - return next_neighbour_found; + number_of_neighbors_computed++; + return next_neighbor_found; } // Without cache @@ -322,37 +322,37 @@ namespace CGAL { // old top of PriorityQueue has been processed, // hence update rd - bool next_neighbour_found; + bool next_neighbor_found; if (!(PriorityQueue.empty())) { rd = std::get<1>(*PriorityQueue.top()); - next_neighbour_found = (search_furthest ? + next_neighbor_found = (search_furthest ? multiplication_factor*rd < Item_PriorityQueue.top()->second : multiplication_factor*rd > Item_PriorityQueue.top()->second); } - else // priority queue empty => last neighbour found + else // priority queue empty => last neighbor found { - next_neighbour_found=true; + next_neighbor_found=true; } - number_of_neighbours_computed++; - return next_neighbour_found; + number_of_neighbors_computed++; + return next_neighbor_found; } void - Compute_the_next_nearest_neighbour() + Compute_the_next_nearest_neighbor() { // compute the next item - bool next_neighbour_found=false; + bool next_neighbor_found=false; if (!(Item_PriorityQueue.empty())) { - next_neighbour_found= + next_neighbor_found= (multiplication_factor*rd > Item_PriorityQueue.top()->second); } typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Cartesian_const_iterator_d query_point_it = construct_it(query_point); // otherwise browse the tree further - while ((!next_neighbour_found) && (!PriorityQueue.empty())) { + while ((!next_neighbor_found) && (!PriorityQueue.empty())) { Node_with_distance* The_node_top=PriorityQueue.top(); Node_const_handle N= std::get<0>(*The_node_top); dists = std::get<2>(*The_node_top); @@ -398,26 +398,29 @@ namespace CGAL { number_of_leaf_nodes_visited++; if (node->size() > 0) { typename internal::Has_points_cache::type::value>::type dummy; - next_neighbour_found = search_in_leaf(node, dummy, false); + next_neighbor_found = search_in_leaf(node, dummy, false); } - } // next_neighbour_found or priority queue is empty - // in the latter case also the item priority quee is empty + } // next_neighbor_found or priority queue is empty + // in the latter case also the item priority queue is empty } + CGAL_DEPRECATED void Compute_the_next_nearest_neighbour() + { Compute_the_next_nearest_neighbor(); } + void - Compute_the_next_furthest_neighbour() + Compute_the_next_furthest_neighbor() { // compute the next item - bool next_neighbour_found=false; + bool next_neighbor_found=false; if (!(Item_PriorityQueue.empty())) { - next_neighbour_found= + next_neighbor_found= (rd < multiplication_factor*Item_PriorityQueue.top()->second); } typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Cartesian_const_iterator_d query_point_it = construct_it(query_point); // otherwise browse the tree further - while ((!next_neighbour_found) && (!PriorityQueue.empty())) { + while ((!next_neighbor_found) && (!PriorityQueue.empty())) { Node_with_distance* The_node_top=PriorityQueue.top(); Node_const_handle N= std::get<0>(*The_node_top); dists = std::get<2>(*The_node_top); @@ -462,11 +465,14 @@ namespace CGAL { number_of_leaf_nodes_visited++; if (node->size() > 0) { typename internal::Has_points_cache::type::value>::type dummy; - next_neighbour_found = search_in_leaf(node, dummy, true); + next_neighbor_found = search_in_leaf(node, dummy, true); } - } // next_neighbour_found or priority queue is empty - // in the latter case also the item priority quee is empty + } // next_neighbor_found or priority queue is empty + // in the latter case also the item priority queue is empty } + + CGAL_DEPRECATED void Compute_the_next_furthest_neighbour() + { Compute_the_next_furthest_neighbor(); } }; // class Iterator_implementaion diff --git a/thirdparty/CGAL/include/CGAL/Orthogonal_k_neighbor_search.h b/thirdparty/CGAL/include/CGAL/Orthogonal_k_neighbor_search.h index 87047e17..a93c6d28 100644 --- a/thirdparty/CGAL/include/CGAL/Orthogonal_k_neighbor_search.h +++ b/thirdparty/CGAL/include/CGAL/Orthogonal_k_neighbor_search.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Orthogonal_k_neighbor_search.h $ -// $Id: Orthogonal_k_neighbor_search.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Orthogonal_k_neighbor_search.h $ +// $Id: include/CGAL/Orthogonal_k_neighbor_search.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Orthtree.h b/thirdparty/CGAL/include/CGAL/Orthtree.h index ac3b4ea0..82940e98 100644 --- a/thirdparty/CGAL/include/CGAL/Orthtree.h +++ b/thirdparty/CGAL/include/CGAL/Orthtree.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Orthtree/include/CGAL/Orthtree.h $ -// $Id: Orthtree.h e3b3774 2022-11-15T17:00:48+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Orthtree/include/CGAL/Orthtree.h $ +// $Id: include/CGAL/Orthtree.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jackson Campolattaro, Simon Giraudot, Cédric Portaneri, Tong Zhao @@ -277,7 +277,7 @@ class Orthtree // Non-necessary but just to be clear on the rule of 5: - // assignement operators deleted (PointRange is a ref) + // assignment operators deleted (PointRange is a ref) Orthtree& operator= (const Orthtree& other) = delete; Orthtree& operator= (Orthtree&& other) = delete; // Destructor diff --git a/thirdparty/CGAL/include/CGAL/Orthtree/Cartesian_ranges.h b/thirdparty/CGAL/include/CGAL/Orthtree/Cartesian_ranges.h index 33d55b1d..2f3da3f4 100644 --- a/thirdparty/CGAL/include/CGAL/Orthtree/Cartesian_ranges.h +++ b/thirdparty/CGAL/include/CGAL/Orthtree/Cartesian_ranges.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Orthtree/include/CGAL/Orthtree/Cartesian_ranges.h $ -// $Id: Cartesian_ranges.h 4d761ed 2021-04-01T14:21:01+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Orthtree/include/CGAL/Orthtree/Cartesian_ranges.h $ +// $Id: include/CGAL/Orthtree/Cartesian_ranges.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Orthtree/IO.h b/thirdparty/CGAL/include/CGAL/Orthtree/IO.h index 71ad1d51..5309b117 100644 --- a/thirdparty/CGAL/include/CGAL/Orthtree/IO.h +++ b/thirdparty/CGAL/include/CGAL/Orthtree/IO.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Orthtree/include/CGAL/Orthtree/IO.h $ -// $Id: IO.h 0fcb4cb 2020-10-27T09:04:13+01:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Orthtree/include/CGAL/Orthtree/IO.h $ +// $Id: include/CGAL/Orthtree/IO.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jackson Campolattaro, Cédric Portaneri, Tong Zhao diff --git a/thirdparty/CGAL/include/CGAL/Orthtree/Node.h b/thirdparty/CGAL/include/CGAL/Orthtree/Node.h index d5a79253..eecd5db4 100644 --- a/thirdparty/CGAL/include/CGAL/Orthtree/Node.h +++ b/thirdparty/CGAL/include/CGAL/Orthtree/Node.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Orthtree/include/CGAL/Orthtree/Node.h $ -// $Id: Node.h d1eca83 2022-11-07T17:34:54+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Orthtree/include/CGAL/Orthtree/Node.h $ +// $Id: include/CGAL/Orthtree/Node.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jackson Campolattaro, Cédric Portaneri, Tong Zhao @@ -44,6 +44,26 @@ struct Node_access template static void split(Node node) { return node.split(); } + + template + static void free(Node node) + { + typedef Dimension_tag<(2 << (Node::Dimension::value - 1))> Degree; + std::queue nodes; + nodes.push(node); + while (!nodes.empty()) + { + Node node = nodes.front(); + nodes.pop(); + if (!node.is_leaf()){ + for (std::size_t i = 0; i < Degree::value; ++ i){ + nodes.push (node[i]); + } + } + node.free(); + } + } + }; } // namespace Orthtrees @@ -57,7 +77,7 @@ struct Node_access A `Node` is a lightweight object and thus generally passed by copy. It is also a model of `ConstRange` with value type `Traits::Point_d`. - \cgalModels `ConstRange` + \cgalModels{ConstRange} */ template class Orthtree::Node diff --git a/thirdparty/CGAL/include/CGAL/Orthtree/Split_predicates.h b/thirdparty/CGAL/include/CGAL/Orthtree/Split_predicates.h index e52b6149..b07b00e6 100644 --- a/thirdparty/CGAL/include/CGAL/Orthtree/Split_predicates.h +++ b/thirdparty/CGAL/include/CGAL/Orthtree/Split_predicates.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Orthtree/include/CGAL/Orthtree/Split_predicates.h $ -// $Id: Split_predicates.h 4d761ed 2021-04-01T14:21:01+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Orthtree/include/CGAL/Orthtree/Split_predicates.h $ +// $Id: include/CGAL/Orthtree/Split_predicates.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jackson Campolattaro, Cédric Portaneri, Tong Zhao diff --git a/thirdparty/CGAL/include/CGAL/Orthtree/Traversal_iterator.h b/thirdparty/CGAL/include/CGAL/Orthtree/Traversal_iterator.h index 1ed18914..357c82e7 100644 --- a/thirdparty/CGAL/include/CGAL/Orthtree/Traversal_iterator.h +++ b/thirdparty/CGAL/include/CGAL/Orthtree/Traversal_iterator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Orthtree/include/CGAL/Orthtree/Traversal_iterator.h $ -// $Id: Traversal_iterator.h 0747b09 2020-10-26T15:56:42+01:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Orthtree/include/CGAL/Orthtree/Traversal_iterator.h $ +// $Id: include/CGAL/Orthtree/Traversal_iterator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jackson Campolattaro, Cédric Portaneri, Tong Zhao diff --git a/thirdparty/CGAL/include/CGAL/Orthtree/Traversals.h b/thirdparty/CGAL/include/CGAL/Orthtree/Traversals.h index 332b3f5c..5c03562c 100644 --- a/thirdparty/CGAL/include/CGAL/Orthtree/Traversals.h +++ b/thirdparty/CGAL/include/CGAL/Orthtree/Traversals.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Orthtree/include/CGAL/Orthtree/Traversals.h $ -// $Id: Traversals.h 4d761ed 2021-04-01T14:21:01+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Orthtree/include/CGAL/Orthtree/Traversals.h $ +// $Id: include/CGAL/Orthtree/Traversals.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jackson Campolattaro, Cédric Portaneri, Tong Zhao @@ -123,7 +123,7 @@ Node first_child_at_depth(Node n, std::size_t depth) { A preorder traversal starts from the root towards the leaves. - \cgalModels `OrthtreeTraversal` + \cgalModels{OrthtreeTraversal} */ struct Preorder_traversal { @@ -156,7 +156,7 @@ struct Preorder_traversal { A postorder traversal starts from the leaves towards the root. - \cgalModels `OrthtreeTraversal` + \cgalModels{OrthtreeTraversal} */ struct Postorder_traversal { @@ -184,7 +184,7 @@ struct Postorder_traversal { All non-leave nodes are ignored. - \cgalModels `OrthtreeTraversal` + \cgalModels{OrthtreeTraversal} */ struct Leaves_traversal { @@ -213,7 +213,7 @@ struct Leaves_traversal { All trees at another depth are ignored. If the selected depth is higher than the maximum depth of the orthtree, no node will be traversed. - \cgalModels `OrthtreeTraversal` + \cgalModels{OrthtreeTraversal} */ struct Level_traversal { diff --git a/thirdparty/CGAL/include/CGAL/Orthtree_traits_2.h b/thirdparty/CGAL/include/CGAL/Orthtree_traits_2.h index 6749a47b..86da469e 100644 --- a/thirdparty/CGAL/include/CGAL/Orthtree_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Orthtree_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Orthtree/include/CGAL/Orthtree_traits_2.h $ -// $Id: Orthtree_traits_2.h 4d761ed 2021-04-01T14:21:01+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Orthtree/include/CGAL/Orthtree_traits_2.h $ +// $Id: include/CGAL/Orthtree_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -28,7 +28,7 @@ namespace CGAL \tparam GeomTraits model of `Kernel`. - \cgalModels `OrthtreeTraits` + \cgalModels{OrthtreeTraits} \sa `CGAL::Quadtree` \sa `CGAL::Orthtree_traits_3` \sa `CGAL::Orthtree_traits_d` diff --git a/thirdparty/CGAL/include/CGAL/Orthtree_traits_3.h b/thirdparty/CGAL/include/CGAL/Orthtree_traits_3.h index 4e2821de..99a48167 100644 --- a/thirdparty/CGAL/include/CGAL/Orthtree_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Orthtree_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Orthtree/include/CGAL/Orthtree_traits_3.h $ -// $Id: Orthtree_traits_3.h 4d761ed 2021-04-01T14:21:01+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Orthtree/include/CGAL/Orthtree_traits_3.h $ +// $Id: include/CGAL/Orthtree_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -28,7 +28,7 @@ namespace CGAL \tparam GeomTraits model of `Kernel`. - \cgalModels `OrthtreeTraits` + \cgalModels{OrthtreeTraits} \sa `CGAL::Octree` \sa `CGAL::Orthtree_traits_2` \sa `CGAL::Orthtree_traits_d` diff --git a/thirdparty/CGAL/include/CGAL/Orthtree_traits_d.h b/thirdparty/CGAL/include/CGAL/Orthtree_traits_d.h index 5d3bf77c..c69e014f 100644 --- a/thirdparty/CGAL/include/CGAL/Orthtree_traits_d.h +++ b/thirdparty/CGAL/include/CGAL/Orthtree_traits_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Orthtree/include/CGAL/Orthtree_traits_d.h $ -// $Id: Orthtree_traits_d.h 4d761ed 2021-04-01T14:21:01+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Orthtree/include/CGAL/Orthtree_traits_d.h $ +// $Id: include/CGAL/Orthtree_traits_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -28,7 +28,7 @@ namespace CGAL \tparam GeomTraits model of `Kernel`. \tparam DimensionTag specialization of `CGAL::Dimension_tag`. - \cgalModels `OrthtreeTraits` + \cgalModels{OrthtreeTraits} \sa `CGAL::Orthtree` \sa `CGAL::Orthtree_traits_2` \sa `CGAL::Orthtree_traits_3` diff --git a/thirdparty/CGAL/include/CGAL/PCA_util.h b/thirdparty/CGAL/include/CGAL/PCA_util.h index 83d032a5..4fd90ebc 100644 --- a/thirdparty/CGAL/include/CGAL/PCA_util.h +++ b/thirdparty/CGAL/include/CGAL/PCA_util.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/PCA_util.h $ -// $Id: PCA_util.h 39df599 2022-04-22T15:36:38+02:00 Sven Oesau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/PCA_util.h $ +// $Id: include/CGAL/PCA_util.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta @@ -391,7 +391,7 @@ assemble_covariance_matrix_3(InputIterator first, 0.0, radius, 0.0, 0.0, 0.0, radius}; Matrix transformation = init_matrix(3,delta); - FT volume = (FT)(4.0/3.0) * radius * t.squared_radius(); + FT volume = radius * t.squared_radius(); // skip zero measure primitives if(volume == (FT)0.0) @@ -400,8 +400,9 @@ assemble_covariance_matrix_3(InputIterator first, // Find the 2nd order moment for the sphere wrt to the origin by an affine transformation. // Transform the standard 2nd order moment using the transformation matrix - transformation = (3.0/4.0) * volume * transformation * moment * LA::transpose(transformation); + transformation = volume * transformation * moment * LA::transpose(transformation); + volume *= FT(4.0/3.0); // Translate the 2nd order moment to the center of the sphere. FT x0 = t.center().x(); FT y0 = t.center().y(); @@ -476,7 +477,7 @@ assemble_covariance_matrix_3(InputIterator first, 0.0, radius, 0.0, 0.0, 0.0, radius}; Matrix transformation = init_matrix(3,delta); - FT area = (FT)4.0 * t.squared_radius(); + FT area = t.squared_radius(); // skip zero measure primitives if(area == (FT)0.0) @@ -485,8 +486,9 @@ assemble_covariance_matrix_3(InputIterator first, // Find the 2nd order moment for the sphere wrt to the origin by an affine transformation. // Transform the standard 2nd order moment using the transformation matrix - transformation = (1.0/4.0) * area * transformation * moment * LA::transpose(transformation); + transformation = area * transformation * moment * LA::transpose(transformation); + area *= FT(4.0); // Translate the 2nd order moment to the center of the sphere. FT x0 = t.center().x(); FT y0 = t.center().y(); diff --git a/thirdparty/CGAL/include/CGAL/PCA_util_Eigen.h b/thirdparty/CGAL/include/CGAL/PCA_util_Eigen.h index 5d1d359c..1a0ed512 100644 --- a/thirdparty/CGAL/include/CGAL/PCA_util_Eigen.h +++ b/thirdparty/CGAL/include/CGAL/PCA_util_Eigen.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/PCA_util_Eigen.h $ -// $Id: PCA_util_Eigen.h 7d716c0 2021-04-06T08:38:56+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/PCA_util_Eigen.h $ +// $Id: include/CGAL/PCA_util_Eigen.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta and Simon Giraudot @@ -368,7 +368,7 @@ assemble_covariance_matrix_3(InputIterator first, transformation << radius, 0.0, 0.0, 0.0, radius, 0.0, 0.0, 0.0, radius; - FT volume = (FT)(4.0/3.0) * radius * t.squared_radius(); + FT volume = radius * t.squared_radius(); // skip zero measure primitives if(volume == (FT)0.0) @@ -377,8 +377,9 @@ assemble_covariance_matrix_3(InputIterator first, // Find the 2nd order moment for the sphere wrt to the origin by an affine transformation. // Transform the standard 2nd order moment using the transformation matrix - transformation = (3.0/4.0) * volume * transformation * moment * transformation.transpose(); + transformation = volume * transformation * moment * transformation.transpose(); + volume *= FT(4.0 / 3.0); // Translate the 2nd order moment to the center of the sphere. FT x0 = t.center().x(); FT y0 = t.center().y(); @@ -453,7 +454,7 @@ assemble_covariance_matrix_3(InputIterator first, transformation << radius, 0.0, 0.0, 0.0, radius, 0.0, 0.0, 0.0, radius; - FT area = (FT)4.0 * t.squared_radius(); + FT area = t.squared_radius(); // skip zero measure primitives if(area == (FT)0.0) @@ -462,8 +463,9 @@ assemble_covariance_matrix_3(InputIterator first, // Find the 2nd order moment for the sphere wrt to the origin by an affine transformation. // Transform the standard 2nd order moment using the transformation matrix - transformation = (1.0/4.0) * area * transformation * moment * transformation.transpose(); + transformation = area * transformation * moment * transformation.transpose(); + area *= FT(4.0); // Translate the 2nd order moment to the center of the sphere. FT x0 = t.center().x(); FT y0 = t.center().y(); diff --git a/thirdparty/CGAL/include/CGAL/Parabola_2.h b/thirdparty/CGAL/include/CGAL/Parabola_2.h index 7d106762..159dc7c3 100644 --- a/thirdparty/CGAL/include/CGAL/Parabola_2.h +++ b/thirdparty/CGAL/include/CGAL/Parabola_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Parabola_2.h $ -// $Id: Parabola_2.h d2a2532 2021-06-17T10:29:02+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Parabola_2.h $ +// $Id: include/CGAL/Parabola_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Parabola_segment_2.h b/thirdparty/CGAL/include/CGAL/Parabola_segment_2.h index 36a2ba45..d4ca906a 100644 --- a/thirdparty/CGAL/include/CGAL/Parabola_segment_2.h +++ b/thirdparty/CGAL/include/CGAL/Parabola_segment_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/Parabola_segment_2.h $ -// $Id: Parabola_segment_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/Parabola_segment_2.h $ +// $Id: include/CGAL/Parabola_segment_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Circulator_pair.h b/thirdparty/CGAL/include/CGAL/Partition_2/Circulator_pair.h index 8290626f..736bd8cc 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Circulator_pair.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Circulator_pair.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Circulator_pair.h $ -// $Id: Circulator_pair.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Circulator_pair.h $ +// $Id: include/CGAL/Partition_2/Circulator_pair.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Indirect_edge_compare.h b/thirdparty/CGAL/include/CGAL/Partition_2/Indirect_edge_compare.h index 9e8da55b..458e126d 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Indirect_edge_compare.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Indirect_edge_compare.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Indirect_edge_compare.h $ -// $Id: Indirect_edge_compare.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Indirect_edge_compare.h $ +// $Id: include/CGAL/Partition_2/Indirect_edge_compare.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Indirect_less_xy_2.h b/thirdparty/CGAL/include/CGAL/Partition_2/Indirect_less_xy_2.h index a029c0be..60da4721 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Indirect_less_xy_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Indirect_less_xy_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Indirect_less_xy_2.h $ -// $Id: Indirect_less_xy_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Indirect_less_xy_2.h $ +// $Id: include/CGAL/Partition_2/Indirect_less_xy_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Indirect_not_less_yx_2.h b/thirdparty/CGAL/include/CGAL/Partition_2/Indirect_not_less_yx_2.h index 73c07777..c4a65ed4 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Indirect_not_less_yx_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Indirect_not_less_yx_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Indirect_not_less_yx_2.h $ -// $Id: Indirect_not_less_yx_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Indirect_not_less_yx_2.h $ +// $Id: include/CGAL/Partition_2/Indirect_not_less_yx_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Iterator_list.h b/thirdparty/CGAL/include/CGAL/Partition_2/Iterator_list.h index c1f9abb2..7147308d 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Iterator_list.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Iterator_list.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Iterator_list.h $ -// $Id: Iterator_list.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Iterator_list.h $ +// $Id: include/CGAL/Partition_2/Iterator_list.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Matrix.h b/thirdparty/CGAL/include/CGAL/Partition_2/Matrix.h index 32d49073..16b82937 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Matrix.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Matrix.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Matrix.h $ -// $Id: Matrix.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Matrix.h $ +// $Id: include/CGAL/Partition_2/Matrix.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Partition_opt_cvx_diagonal_list.h b/thirdparty/CGAL/include/CGAL/Partition_2/Partition_opt_cvx_diagonal_list.h index 20e4abde..236fe437 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Partition_opt_cvx_diagonal_list.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Partition_opt_cvx_diagonal_list.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Partition_opt_cvx_diagonal_list.h $ -// $Id: Partition_opt_cvx_diagonal_list.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Partition_opt_cvx_diagonal_list.h $ +// $Id: include/CGAL/Partition_2/Partition_opt_cvx_diagonal_list.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Partition_opt_cvx_edge.h b/thirdparty/CGAL/include/CGAL/Partition_2/Partition_opt_cvx_edge.h index 1dd4344a..5350b1a4 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Partition_opt_cvx_edge.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Partition_opt_cvx_edge.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Partition_opt_cvx_edge.h $ -// $Id: Partition_opt_cvx_edge.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Partition_opt_cvx_edge.h $ +// $Id: include/CGAL/Partition_2/Partition_opt_cvx_edge.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Partition_opt_cvx_vertex.h b/thirdparty/CGAL/include/CGAL/Partition_2/Partition_opt_cvx_vertex.h index 9c5c997b..bb61cd6f 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Partition_opt_cvx_vertex.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Partition_opt_cvx_vertex.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Partition_opt_cvx_vertex.h $ -// $Id: Partition_opt_cvx_vertex.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Partition_opt_cvx_vertex.h $ +// $Id: include/CGAL/Partition_2/Partition_opt_cvx_vertex.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Partition_traits_2_base.h b/thirdparty/CGAL/include/CGAL/Partition_2/Partition_traits_2_base.h index 2adaf690..4ed75ec1 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Partition_traits_2_base.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Partition_traits_2_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Partition_traits_2_base.h $ -// $Id: Partition_traits_2_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Partition_traits_2_base.h $ +// $Id: include/CGAL/Partition_2/Partition_traits_2_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Partition_vertex_map.h b/thirdparty/CGAL/include/CGAL/Partition_2/Partition_vertex_map.h index c5bfa7b8..22d1f2b8 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Partition_vertex_map.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Partition_vertex_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Partition_vertex_map.h $ -// $Id: Partition_vertex_map.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Partition_vertex_map.h $ +// $Id: include/CGAL/Partition_2/Partition_vertex_map.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -332,7 +332,7 @@ std::ostream& operator<<(std::ostream& os, const Edge_list& edges) return os; } -} // namesapce Partition_2 +} // namespace Partition_2 template class Partition_vertex_map diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Partitioned_polygon_2.h b/thirdparty/CGAL/include/CGAL/Partition_2/Partitioned_polygon_2.h index 91118a9e..165ceea4 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Partitioned_polygon_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Partitioned_polygon_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Partitioned_polygon_2.h $ -// $Id: Partitioned_polygon_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Partitioned_polygon_2.h $ +// $Id: include/CGAL/Partition_2/Partitioned_polygon_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Point_pair_less_xy_2.h b/thirdparty/CGAL/include/CGAL/Partition_2/Point_pair_less_xy_2.h index 30882425..0d704f63 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Point_pair_less_xy_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Point_pair_less_xy_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Point_pair_less_xy_2.h $ -// $Id: Point_pair_less_xy_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Point_pair_less_xy_2.h $ +// $Id: include/CGAL/Partition_2/Point_pair_less_xy_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Rotation_tree_2.h b/thirdparty/CGAL/include/CGAL/Partition_2/Rotation_tree_2.h index 9671ca9d..ebd69bd1 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Rotation_tree_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Rotation_tree_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h $ -// $Id: Rotation_tree_2.h b8aa255 2022-11-17T19:40:38+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h $ +// $Id: include/CGAL/Partition_2/Rotation_tree_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -108,7 +108,7 @@ class Rotation_tree_2 : public internal::vector< Rotation_tree_node_2 > // the point that comes first in the right-to-left ordering is first - // in the ordering, after the auxilliary points p_minus_inf and p_inf + // in the ordering, after the auxiliary points p_minus_inf and p_inf Self_iterator rightmost_point_ref() { return this->begin(); diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Rotation_tree_2_impl.h b/thirdparty/CGAL/include/CGAL/Partition_2/Rotation_tree_2_impl.h index 578786e1..9fae9ee2 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Rotation_tree_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Rotation_tree_2_impl.h @@ -3,13 +3,18 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Rotation_tree_2_impl.h $ -// $Id: Rotation_tree_2_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Rotation_tree_2_impl.h $ +// $Id: include/CGAL/Partition_2/Rotation_tree_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Susan Hert +#ifndef CGAL_PARTITION_2_ROTATION_TREE_2_IMPL_H +#define CGAL_PARTITION_2_ROTATION_TREE_2_IMPL_H + +#include + #include namespace CGAL { @@ -130,3 +135,5 @@ std::ostream& operator<<(std::ostream& os, const Rotation_tree_2& tree) } } + +#endif // CGAL_PARTITION_2_ROTATION_TREE_2_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Rotation_tree_node_2.h b/thirdparty/CGAL/include/CGAL/Partition_2/Rotation_tree_node_2.h index aac139ee..c41f5625 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Rotation_tree_node_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Rotation_tree_node_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Rotation_tree_node_2.h $ -// $Id: Rotation_tree_node_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Rotation_tree_node_2.h $ +// $Id: include/CGAL/Partition_2/Rotation_tree_node_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Segment_less_yx_2.h b/thirdparty/CGAL/include/CGAL/Partition_2/Segment_less_yx_2.h index d7af78dc..34f2d84d 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Segment_less_yx_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Segment_less_yx_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Segment_less_yx_2.h $ -// $Id: Segment_less_yx_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Segment_less_yx_2.h $ +// $Id: include/CGAL/Partition_2/Segment_less_yx_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Triangulation_indirect_traits_2.h b/thirdparty/CGAL/include/CGAL/Partition_2/Triangulation_indirect_traits_2.h index b8740fa2..7f09d7b2 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Triangulation_indirect_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Triangulation_indirect_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Triangulation_indirect_traits_2.h $ -// $Id: Triangulation_indirect_traits_2.h 2e8a59d 2020-07-21T15:25:54+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Triangulation_indirect_traits_2.h $ +// $Id: include/CGAL/Partition_2/Triangulation_indirect_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Turn_reverser.h b/thirdparty/CGAL/include/CGAL/Partition_2/Turn_reverser.h index c50b124e..cd91260a 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Turn_reverser.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Turn_reverser.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Turn_reverser.h $ -// $Id: Turn_reverser.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Turn_reverser.h $ +// $Id: include/CGAL/Partition_2/Turn_reverser.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Vertex_visibility_graph_2.h b/thirdparty/CGAL/include/CGAL/Partition_2/Vertex_visibility_graph_2.h index cc7a03f5..d8f8dc57 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Vertex_visibility_graph_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Vertex_visibility_graph_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Vertex_visibility_graph_2.h $ -// $Id: Vertex_visibility_graph_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Vertex_visibility_graph_2.h $ +// $Id: include/CGAL/Partition_2/Vertex_visibility_graph_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h b/thirdparty/CGAL/include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h index c97ba922..0fb356d8 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h @@ -3,13 +3,18 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h $ -// $Id: Vertex_visibility_graph_2_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h $ +// $Id: include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Susan Hert +#ifndef CGAL_PARTITION_2_VERTEX_VISIBILITY_GRAPH_2_IMPL_H +#define CGAL_PARTITION_2_VERTEX_VISIBILITY_GRAPH_2_IMPL_H + +#include + namespace CGAL { @@ -699,3 +704,5 @@ void Vertex_visibility_graph_2::handle(Tree_iterator p, } } + +#endif // CGAL_PARTITION_2_VERTEX_VISIBILITY_GRAPH_2_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/is_degenerate_polygon_2.h b/thirdparty/CGAL/include/CGAL/Partition_2/is_degenerate_polygon_2.h index c0ed48c5..4e2ad22b 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/is_degenerate_polygon_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/is_degenerate_polygon_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/is_degenerate_polygon_2.h $ -// $Id: is_degenerate_polygon_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/is_degenerate_polygon_2.h $ +// $Id: include/CGAL/Partition_2/is_degenerate_polygon_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/partition_approx_convex_2.h b/thirdparty/CGAL/include/CGAL/Partition_2/partition_approx_convex_2.h index 9f4c6b8c..36523762 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/partition_approx_convex_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/partition_approx_convex_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/partition_approx_convex_2.h $ -// $Id: partition_approx_convex_2.h e6c767d 2021-05-12T15:45:07+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/partition_approx_convex_2.h $ +// $Id: include/CGAL/Partition_2/partition_approx_convex_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -29,7 +29,7 @@ _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") #include #include #include -#include +#include #include #include #include @@ -138,7 +138,7 @@ OutputIterator partition_approx_convex_2(InputIterator first, P_Polygon_2 polygon(first, beyond,traits); - CGAL_partition_precondition( + CGAL_precondition( orientation_2(polygon.begin(), polygon.end(), traits) == COUNTERCLOCKWISE); Circulator first_c(polygon.begin(), polygon.end(), polygon.begin()); @@ -238,7 +238,7 @@ OutputIterator partition_approx_convex_2(InputIterator first, #endif // no postconditions polygon.partition(res, 0); - CGAL_partition_postcondition( + CGAL_postcondition( convex_partition_is_valid_2(polygon.begin(), polygon.end(), res.output_so_far_begin(), res.output_so_far_end(), traits)); diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/partition_greene_approx_convex_2.h b/thirdparty/CGAL/include/CGAL/Partition_2/partition_greene_approx_convex_2.h index 608c8983..b1c2840b 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/partition_greene_approx_convex_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/partition_greene_approx_convex_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/partition_greene_approx_convex_2.h $ -// $Id: partition_greene_approx_convex_2.h 521c72d 2021-10-04T13:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/partition_greene_approx_convex_2.h $ +// $Id: include/CGAL/Partition_2/partition_greene_approx_convex_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -90,7 +90,7 @@ void erase_vertices(BidirectionalCirculator first, #endif it = first.current_iterator(); - CGAL_partition_assertion (it != polygon.end()); + CGAL_assertion (it != polygon.end()); while ( (it != polygon.end()) && (*it != *last) ) { @@ -692,9 +692,9 @@ void ga_convex_decomposition(ForwardIterator first, ForwardIterator beyond, Vertex_list polygon(first, beyond); - CGAL_partition_precondition( + CGAL_precondition( orientation_2(polygon.begin(), polygon.end(), traits) == COUNTERCLOCKWISE); - CGAL_partition_precondition( + CGAL_precondition( is_y_monotone_2(polygon.begin(), polygon.end(), traits)); Vertex_circulator point_ref(&polygon); @@ -806,7 +806,7 @@ OutputIterator partition_greene_approx_convex_2(InputIterator first, #endif // no postconditions Polygon_2 polygon(first, beyond); - CGAL_partition_precondition( + CGAL_precondition( orientation_2(polygon.vertices_begin(), polygon.vertices_end(), traits) == COUNTERCLOCKWISE); @@ -822,7 +822,7 @@ OutputIterator partition_greene_approx_convex_2(InputIterator first, (*MP_it).vertices_end(), res, traits); } - CGAL_partition_postcondition( + CGAL_postcondition( convex_partition_is_valid_2(polygon.vertices_begin(), polygon.vertices_end(), res.output_so_far_begin(), diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/partition_optimal_convex_2.h b/thirdparty/CGAL/include/CGAL/Partition_2/partition_optimal_convex_2.h index c63aa6bc..63e343fa 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/partition_optimal_convex_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/partition_optimal_convex_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/partition_optimal_convex_2.h $ -// $Id: partition_optimal_convex_2.h 5a36ff8 2020-12-04T08:02:26+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/partition_optimal_convex_2.h $ +// $Id: include/CGAL/Partition_2/partition_optimal_convex_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -67,7 +67,7 @@ #include #include #include -#include +#include #include #include #include @@ -520,7 +520,7 @@ OutputIterator partition_optimal_convex_2(InputIterator first, #endif // no postconditions P_Polygon_2 polygon(first, beyond,traits); - CGAL_partition_precondition( + CGAL_precondition( orientation_2(polygon.begin(), polygon.end(), traits) == COUNTERCLOCKWISE); #ifdef CGAL_PARTITION_OPTIMAL_CONVEX_DEBUG @@ -559,7 +559,7 @@ OutputIterator partition_optimal_convex_2(InputIterator first, // be pruned away. These crop up when there are collinear vertices. // See explanation at top of file. polygon.partition(res, 1); - CGAL_partition_postcondition( + CGAL_postcondition( convex_partition_is_valid_2(polygon.begin(), polygon.end(), res.output_so_far_begin(), res.output_so_far_end(), traits) diff --git a/thirdparty/CGAL/include/CGAL/Partition_2/partition_y_monotone_2.h b/thirdparty/CGAL/include/CGAL/Partition_2/partition_y_monotone_2.h index a244d7a6..1ee85c8b 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_2/partition_y_monotone_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_2/partition_y_monotone_2.h @@ -3,15 +3,15 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_2/partition_y_monotone_2.h $ -// $Id: partition_y_monotone_2.h 5a36ff8 2020-12-04T08:02:26+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_2/partition_y_monotone_2.h $ +// $Id: include/CGAL/Partition_2/partition_y_monotone_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Susan Hert // -// Implementaion of the algorithm from pp 49--55 of "Computational Geometry +// Implementation of the algorithm from pp 49--55 of "Computational Geometry // Algorithms and Applications" by de Berg, van Kreveld, Overmars, and // Schwarzkopf for producing a partitioning of a polygon into y-monotone // pieces. @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include @@ -426,7 +426,7 @@ OutputIterator partition_y_monotone_2(InputIterator first, #endif // no postcondition P_Polygon_2 polygon(first, beyond, traits); - CGAL_partition_precondition( + CGAL_precondition( orientation_2(polygon.begin(), polygon.end(), traits) == COUNTERCLOCKWISE); Circulator circ(polygon.begin(), polygon.end()), done = circ; @@ -484,7 +484,7 @@ OutputIterator partition_y_monotone_2(InputIterator first, #endif polygon.partition(res, 0); - CGAL_partition_postcondition( + CGAL_postcondition( y_monotone_partition_is_valid_2(polygon.begin(), polygon.end(), res.output_so_far_begin(), res.output_so_far_end(), traits)); diff --git a/thirdparty/CGAL/include/CGAL/Partition_is_valid_traits_2.h b/thirdparty/CGAL/include/CGAL/Partition_is_valid_traits_2.h index 45c93178..55b1f9e5 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_is_valid_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_is_valid_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_is_valid_traits_2.h $ -// $Id: Partition_is_valid_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_is_valid_traits_2.h $ +// $Id: include/CGAL/Partition_is_valid_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_traits_2.h b/thirdparty/CGAL/include/CGAL/Partition_traits_2.h index 02454eed..f2432d3b 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_traits_2.h $ -// $Id: Partition_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_traits_2.h $ +// $Id: include/CGAL/Partition_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Partition_traits_adapter_2.h b/thirdparty/CGAL/include/CGAL/Partition_traits_adapter_2.h index eabb100f..d0b3f909 100644 --- a/thirdparty/CGAL/include/CGAL/Partition_traits_adapter_2.h +++ b/thirdparty/CGAL/include/CGAL/Partition_traits_adapter_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/Partition_traits_adapter_2.h $ -// $Id: Partition_traits_adapter_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/Partition_traits_adapter_2.h $ +// $Id: include/CGAL/Partition_traits_adapter_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Path_on_surface.h b/thirdparty/CGAL/include/CGAL/Path_on_surface.h index 79c75116..b08b9de7 100644 --- a/thirdparty/CGAL/include/CGAL/Path_on_surface.h +++ b/thirdparty/CGAL/include/CGAL/Path_on_surface.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_topology/include/CGAL/Path_on_surface.h $ -// $Id: Path_on_surface.h c5c6098 2022-01-27T11:02:17+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_topology/include/CGAL/Path_on_surface.h $ +// $Id: include/CGAL/Path_on_surface.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -36,7 +36,7 @@ // opposite of this dart if m_flip[n-1] is true i.e. if m_flip[i] is true means // that the i-th dart m_path[i] has to be flipped. // We use flips because sometimes opposite darts doesn't exist on surfaces with -// boundaries. But if m_flip[i] is true doesn't necesary mean that +// boundaries. But if m_flip[i] is true doesn't necessary mean that // m_path[i] is 2-free namespace CGAL { @@ -49,9 +49,9 @@ class Path_on_surface typedef Path_on_surface Self; typedef Mesh_ Mesh; typedef typename Get_map::type Map; // Mesh seen as a 2-map - typedef typename Map::Dart_const_handle Dart_const_handle; + typedef typename Map::Dart_const_descriptor Dart_const_descriptor; - typedef Dart_const_handle halfedge_descriptor; // To be compatible with BGL + typedef Dart_const_descriptor halfedge_descriptor; // To be compatible with BGL Path_on_surface(const Mesh& amesh) : m_map(amesh), m_is_closed(false) {} @@ -150,7 +150,7 @@ class Path_on_surface { return ((is_closed() && i==0)?(m_path.size()-1):(i-1)); } /// @return the ith dart of the path. - Dart_const_handle get_ith_dart(std::size_t i) const + Dart_const_descriptor get_ith_dart(std::size_t i) const { CGAL_assertion(i l, bool update_isclosed=true) @@ -325,8 +325,8 @@ class Path_on_surface /// @return true iff the dart labeled e can be added at the end of the path. bool can_be_pushed_by_label(const std::string& e, bool flip=false) const { - Dart_const_handle dh=get_map().get_dart_labeled(e); - if (dh==Map::null_handle) { return false; } + Dart_const_descriptor dh=get_map().get_dart_labeled(e); + if (dh==Map::null_descriptor) { return false; } return can_be_pushed(dh, flip); } @@ -337,8 +337,8 @@ class Path_on_surface std::istringstream iss(s); for (std::string e; std::getline(iss, e, ' '); ) { - Dart_const_handle dh=get_map().get_dart_labeled(e); - if (dh!=Map::null_handle) { push_back(dh, false, update_isclosed); } + Dart_const_descriptor dh=get_map().get_dart_labeled(e); + if (dh!=Map::null_descriptor) { push_back(dh, false, update_isclosed); } } } @@ -423,7 +423,7 @@ class Path_on_surface /// Debugging method. void display_failed_extention(const std::string& /*name_of_function*/) { - // std::cout<<"Cant extend the path this way ("<(dh)) @@ -464,7 +464,7 @@ class Path_on_surface if (is_empty() || nb==0) { display_failed_extention("extend_straight_negative"); return; } - Dart_const_handle dh=back(); + Dart_const_descriptor dh=back(); if(!back_flip()) { if (get_map().template is_free<2>(dh)) @@ -500,7 +500,7 @@ class Path_on_surface return; } - Dart_const_handle dh=back(); + Dart_const_descriptor dh=back(); if(back_flip()) { if (get_map().template is_free<2>(dh)) @@ -532,7 +532,7 @@ class Path_on_surface return; } - Dart_const_handle dh=back(); + Dart_const_descriptor dh=back(); if(!back_flip()) { if (get_map().template is_free<2>(dh)) @@ -564,9 +564,9 @@ class Path_on_surface typename Map::size_type index=static_cast (random.get_int(0, static_cast(get_map().darts().capacity()))); while (!get_map().darts().is_used(index) || - (!get_map().template is_free<2>(get_map().dart_handle(index)) && - get_map().dart_handle(index)>get_map(). - opposite2(get_map().dart_handle(index)))) + (!get_map().template is_free<2>(get_map().dart_descriptor(index)) && + get_map().dart_descriptor(index)>get_map(). + opposite2(get_map().dart_descriptor(index)))) { ++index; if (index==get_map().darts().capacity()) index=0; @@ -575,16 +575,16 @@ class Path_on_surface // second we take randomly one of the two darts of this edge // (potentially with the help of a flip) bool heads_or_tails=random.get_bool(); - if (get_map().template is_free<2>(get_map().dart_handle(index))) + if (get_map().template is_free<2>(get_map().dart_descriptor(index))) { - push_back(get_map().dart_handle(index), heads_or_tails, update_isclosed); + push_back(get_map().dart_descriptor(index), heads_or_tails, update_isclosed); } else { if (heads_or_tails) - { push_back(get_map().dart_handle(index), false, update_isclosed); } + { push_back(get_map().dart_descriptor(index), false, update_isclosed); } else - { push_back(get_map().opposite2(get_map().dart_handle(index)), + { push_back(get_map().opposite2(get_map().dart_descriptor(index)), false, update_isclosed); } } return true; @@ -610,7 +610,7 @@ class Path_on_surface if(get_map().template is_free<1>(back())) { return false; } - Dart_const_handle next_vertex; + Dart_const_descriptor next_vertex; if (back_flip()) { next_vertex=back(); } else if (get_map().template is_free<2>(back())) @@ -618,7 +618,7 @@ class Path_on_surface else { next_vertex=get_map().opposite2(back()); } - std::vector > candidats; + std::vector > candidats; for (auto it=get_map().template darts_of_cell<0>(next_vertex).begin(), itend=get_map().template darts_of_cell<0>(next_vertex).end(); it!=itend; ++it ) @@ -742,7 +742,7 @@ class Path_on_surface // 1) We add in p2 the part of the path which is pushed. if (get_ith_flip(i)) { - Dart_const_handle dh=get_map().next(get_ith_dart(i)); + Dart_const_descriptor dh=get_map().next(get_ith_dart(i)); do { p2.push_back(dh, false, false); @@ -752,7 +752,7 @@ class Path_on_surface } else { - Dart_const_handle dh=get_map().previous(get_ith_dart(i)); + Dart_const_descriptor dh=get_map().previous(get_ith_dart(i)); do { p2.push_back(dh, true, false); @@ -939,18 +939,18 @@ class Path_on_surface bool is_valid(bool display_error=false) const { if (is_empty()) { return !is_closed(); } // an empty past is not closed - Dart_const_handle last_vertex; + Dart_const_descriptor last_vertex; for (unsigned int i=1; i(pbegin, pend); } @@ -1037,7 +1037,7 @@ class Path_on_surface typename Map::size_type markedge=m_map.get_new_mark(); bool res=true; - Dart_const_handle dh_vertex; + Dart_const_descriptor dh_vertex; unsigned int i=0; for (i=0; res && i::storage_type m_map; // The underlying map - std::vector m_path; /// The sequence of darts + std::vector m_path; /// The sequence of darts bool m_is_closed; /// True iff the path is a cycle std::vector m_flip; /// The sequence of flips }; diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_Delaunay_triangulation_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_Delaunay_triangulation_2.h index d13bef9a..0f5a8067 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_Delaunay_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_Delaunay_triangulation_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h $ -// $Id: Periodic_2_Delaunay_triangulation_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h $ +// $Id: include/CGAL/Periodic_2_Delaunay_triangulation_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Nico Kruithof @@ -131,7 +131,7 @@ class Periodic_2_Delaunay_triangulation_2 Periodic_2_Delaunay_triangulation_2(const Periodic_2_Delaunay_triangulation_2 &tr) : Base(tr) { - CGAL_triangulation_postcondition( is_valid(true) ); + CGAL_postcondition( is_valid(true) ); } /// Constructor with insertion of points @@ -207,11 +207,11 @@ class Periodic_2_Delaunay_triangulation_2 std::ptrdiff_t insert(InputIterator first, InputIterator last, bool is_large_point_set = true, - typename boost::enable_if < - boost::is_convertible < + std::enable_if_t < + std::is_convertible < typename std::iterator_traits::value_type, Point - > >::type* = nullptr) + >::value >* = nullptr) #else template < class InputIterator > std::ptrdiff_t @@ -419,11 +419,11 @@ class Periodic_2_Delaunay_triangulation_2 insert( InputIterator first, InputIterator last, bool is_large_point_set = true, - typename boost::enable_if < - boost::is_convertible < + std::enable_if_t < + std::is_convertible < typename std::iterator_traits::value_type, std::pair::type> - > >::type* = nullptr + >::value >* = nullptr ) { return insert_with_info< std::pair::type> >(first, last, is_large_point_set); @@ -434,11 +434,10 @@ class Periodic_2_Delaunay_triangulation_2 insert( boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, bool is_large_point_set = true, - typename boost::enable_if < - boost::mpl::and_ < - boost::is_convertible< typename std::iterator_traits::value_type, Point >, - boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - > >::type* = nullptr) + std::enable_if_t < + std::is_convertible_v< typename std::iterator_traits::value_type, Point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > + >* = nullptr) { return insert_with_info< boost::tuple::type> >(first, last, is_large_point_set); } @@ -467,7 +466,7 @@ class Periodic_2_Delaunay_triangulation_2 OutputItBoundaryEdges eit, Face_handle start = Face_handle()) const { - CGAL_triangulation_precondition( dimension() == 2); + CGAL_precondition( dimension() == 2); int li; Locate_type lt; Face_handle fh = locate(p, lt, li, start); @@ -487,7 +486,7 @@ class Periodic_2_Delaunay_triangulation_2 pit = propagate_conflicts(p, fh, 2, pit); return pit; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return std::make_pair(fit, eit); } @@ -572,7 +571,7 @@ class Periodic_2_Delaunay_triangulation_2 void propagating_flip(const Face_handle& f, int i); #endif - // auxilliary functions for remove + // auxiliary functions for remove // returns false if we first need to convert to a 9-cover before the vertex can be removed bool remove_single_vertex(Vertex_handle v, const Offset &v_o); void remove_degree_triangulate(Vertex_handle v, std::vector &f, @@ -763,7 +762,7 @@ class Periodic_2_Delaunay_triangulation_2 true) == ON_POSITIVE_SIDE; } -// end of auxilliary functions for remove +// end of auxiliary functions for remove @@ -836,7 +835,7 @@ is_valid(bool verbose, int level) const side_of_oriented_circle(*p[0], *p[1], *p[2], *p[3], off[0], off[1], off[2], off[3], false); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); } } } @@ -866,7 +865,7 @@ typename Periodic_2_Delaunay_triangulation_2::Vertex_handle Periodic_2_Delaunay_triangulation_2:: nearest_vertex_2D(const Point& p, Face_handle f) const { - CGAL_triangulation_precondition(dimension() == 2); + CGAL_precondition(dimension() == 2); f = locate(p, f); typename Geom_traits::Compare_distance_2 compare_distance = @@ -914,7 +913,7 @@ typename Periodic_2_Delaunay_triangulation_2::Point Periodic_2_Delaunay_triangulation_2:: dual (Face_handle f) const { - CGAL_triangulation_precondition (dimension() == 2); + CGAL_precondition (dimension() == 2); return circumcenter(f); } @@ -958,9 +957,9 @@ typename Periodic_2_Delaunay_triangulation_2::Vertex_handle Periodic_2_Delaunay_triangulation_2:: insert(const Point &p, Face_handle start) { - CGAL_triangulation_assertion((domain().xmin() <= p.x()) && + CGAL_assertion((domain().xmin() <= p.x()) && (p.x() < domain().xmax())); - CGAL_triangulation_assertion((domain().ymin() <= p.y()) && + CGAL_assertion((domain().ymin() <= p.y()) && (p.y() < domain().ymax())); if (empty()) @@ -1006,7 +1005,7 @@ insert(const Point &p, Locate_type lt, Face_handle loc, int li) { typename Base::Virtual_vertex_reverse_map_it vertices_it = this->virtual_vertices_reverse().find(vh); - CGAL_triangulation_assertion(vertices_it != this->virtual_vertices_reverse().end()); + CGAL_assertion(vertices_it != this->virtual_vertices_reverse().end()); const std::vector &virtual_vertices = vertices_it->second; for (size_t i = 0; i < virtual_vertices.size(); ++i) { @@ -1016,7 +1015,7 @@ insert(const Point &p, Locate_type lt, Face_handle loc, int li) this->try_to_convert_to_one_cover(); if (is_1_cover()) { - CGAL_triangulation_assertion(is_valid()); + CGAL_assertion(is_valid()); } } } @@ -1167,8 +1166,8 @@ remove(Vertex_handle v) // Make sure we have the original vertex CGAL_assertion(v == this->get_original_vertex(v)); - CGAL_triangulation_precondition(v != Vertex_handle()); - CGAL_triangulation_precondition(dimension() == 2); + CGAL_precondition(v != Vertex_handle()); + CGAL_precondition(dimension() == 2); if ( this->number_of_vertices() == 1) { @@ -5070,7 +5069,7 @@ side_of_oriented_circle(const Point &p0, const Point &p1, const Point &p2, if (points[i] == &p0 && (o = orientation(p, p1, p2)) != COLLINEAR) return Oriented_side(o); } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return ON_NEGATIVE_SIDE; } @@ -5114,7 +5113,7 @@ side_of_oriented_circle(const Point &p0, const Point &p1, const Point &p2, != COLLINEAR)) return Oriented_side(orient); } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return ON_NEGATIVE_SIDE; } diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h index 9309ad7b..def8795c 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h $ -// $Id: Periodic_2_Delaunay_triangulation_traits_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h $ +// $Id: include/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Nico Kruithof diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_offset_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_offset_2.h index 0ffd456b..8b058881 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_offset_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_offset_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_offset_2.h $ -// $Id: Periodic_2_offset_2.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_offset_2.h $ +// $Id: include/CGAL/Periodic_2_offset_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Nico Kruithof @@ -16,7 +16,7 @@ #include -#include +#include #include namespace CGAL @@ -71,14 +71,14 @@ class Periodic_2_offset_2 int &operator[](int i) { if (i == 0) return _offx; - CGAL_triangulation_assertion(i == 1); + CGAL_assertion(i == 1); return _offy; } /// Return the i-th entry of o. int operator[](int i) const { if (i == 0) return _offx; - CGAL_triangulation_assertion(i == 1); + CGAL_assertion(i == 1); return _offy; } /// Add o' to o using vector addition. diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2.h index 99930d78..103294c4 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h $ -// $Id: Periodic_2_triangulation_2.h cdbf0d7 2022-03-09T11:34:12+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h $ +// $Id: include/CGAL/Periodic_2_triangulation_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Nico Kruithof @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include @@ -119,12 +119,21 @@ class Periodic_2_triangulation_2 /// Unique_vertex_iterator iterates over exactly one representative. typedef Periodic_2_triangulation_unique_vertex_iterator_2 Unique_vertex_iterator; + /// Iterator over the canonical edges, i.e. for each set of periodic copies the + /// Unique_edge_iterator iterates over exactly one representative. + typedef Periodic_2_triangulation_unique_edge_iterator_2 + Unique_edge_iterator; + /// Iterator over the canonical faces, i.e. for each set of periodic copies the + /// Unique_face_iterator iterates over exactly one representative. + typedef Periodic_2_triangulation_unique_face_iterator_2 + Unique_face_iterator; /// \name For compatibility with the Triangulation_2 class // \{ typedef Face_iterator Finite_faces_iterator; typedef Edge_iterator Finite_edges_iterator; typedef Vertex_iterator Finite_vertices_iterator; + typedef Vertex_iterator All_vertices_iterator; typedef Face_iterator All_faces_iterator; // \} @@ -381,10 +390,11 @@ class Periodic_2_triangulation_2 /// Checks whether the triangulation is a valid simplicial complex in the one cover. bool is_triangulation_in_1_sheet() const; - /// Convert a 9 sheeted cover (used for sparse triangulations) to a single sheeted cover. + /// Converts a 9 sheeted cover (used for sparse triangulations) to a single sheeted cover. /// \pre !is_1_cover(); void convert_to_1_sheeted_covering(); - /// Convert a single sheeted cover (used for dense triangulations) to a 9 sheeted cover. + + /// Converts a single sheeted cover (used for dense triangulations) to a 9 sheeted cover. /// \pre is_1_cover(); void convert_to_9_sheeted_covering(); // \} @@ -418,8 +428,8 @@ class Periodic_2_triangulation_2 /// \pre i == {0,1,2} Periodic_segment periodic_segment(Face_handle f, int i) const { - CGAL_triangulation_precondition( number_of_vertices() != 0 ); - CGAL_triangulation_precondition( i >= 0 && i <= 2); + CGAL_precondition( number_of_vertices() != 0 ); + CGAL_precondition( i >= 0 && i <= 2); return make_array(periodic_point(f, ccw(i)), periodic_point(f, cw(i))); } @@ -676,6 +686,32 @@ class Periodic_2_triangulation_2 Periodic_2_triangulation_2_internal::Domain_tester(this)); } + Unique_edge_iterator unique_edges_begin() const + { + return CGAL::filter_iterator(edges_end(), + Periodic_2_triangulation_2_internal::Domain_tester(this), + edges_begin()); + } + /// past-the-end iterator over the canonical edges + Unique_edge_iterator unique_edges_end() const + { + return CGAL::filter_iterator(edges_end(), + Periodic_2_triangulation_2_internal::Domain_tester(this)); + } + + Unique_face_iterator unique_faces_begin() const + { + return CGAL::filter_iterator(faces_end(), + Periodic_2_triangulation_2_internal::Domain_tester(this), + faces_begin()); + } + /// past-the-end iterator over the non-virtual vertices + Unique_face_iterator unique_faces_end() const + { + return CGAL::filter_iterator(faces_end(), + Periodic_2_triangulation_2_internal::Domain_tester(this)); + } + // \} /// \name Geometric iterators //\{ @@ -941,9 +977,9 @@ class Periodic_2_triangulation_2 Offset get_neighbor_offset(Face_handle fh, int i, Face_handle nb, int j) const { // Redundance in the signature - CGAL_triangulation_precondition(fh->neighbor(i) == nb); - CGAL_triangulation_precondition(nb->neighbor(j) == fh); - CGAL_triangulation_precondition(fh->vertex(cw(i)) == nb->vertex(ccw(j))); + CGAL_precondition(fh->neighbor(i) == nb); + CGAL_precondition(nb->neighbor(j) == fh); + CGAL_precondition(fh->vertex(cw(i)) == nb->vertex(ccw(j))); return int_to_off(nb->offset(ccw(j))) - int_to_off(fh->offset(cw(i))); } @@ -972,11 +1008,37 @@ class Periodic_2_triangulation_2 return Offset(); } + // Gets the canonicalized offsets of a face. + void get_offsets(Face_handle fh, + Offset& off0, Offset& off1, Offset& off2) const + { + Offset face_off0 = int_to_off(fh->offset(0)); + Offset face_off1 = int_to_off(fh->offset(1)); + Offset face_off2 = int_to_off(fh->offset(2)); + Offset diff_off((face_off0.x() == 1 && face_off1.x() == 1 && face_off2.x() == 1) ? -1 : 0, + (face_off0.y() == 1 && face_off1.y() == 1 && face_off2.y() == 1) ? -1 : 0); + off0 = combine_offsets(get_offset(fh, 0), diff_off); + off1 = combine_offsets(get_offset(fh, 1), diff_off); + off2 = combine_offsets(get_offset(fh, 2), diff_off); + } + + // Gets the canonicalized offsets of an edge. + void get_offsets(const Edge& e, + Offset& off0, Offset& off1) const + { + Offset edge_off0 = int_to_off(e.first->offset(cw(e.second))); + Offset edge_off1 = int_to_off(e.first->offset(ccw(e.second))); + Offset diff_off((edge_off0.x() == 1 && edge_off1.x() == 1) ? -1 : 0, + (edge_off0.y() == 1 && edge_off1.y() == 1) ? -1 : 0); + off0 = combine_offsets(get_offset(e.first, cw(e.second)), diff_off); + off1 = combine_offsets(get_offset(e.first, ccw(e.second)), diff_off); + } + /// Converts an offset to a bit pattern where bit1==offx and bit0==offy. int off_to_int(const Offset & off) const { - CGAL_triangulation_assertion( off.x() == 0 || off.x() == 1 ); - CGAL_triangulation_assertion( off.y() == 0 || off.y() == 1 ); + CGAL_assertion( off.x() == 0 || off.x() == 1 ); + CGAL_assertion( off.y() == 0 || off.y() == 1 ); int i = ((off.x() & 1) << 1) + (off.y() & 1); return i; } @@ -986,13 +1048,12 @@ class Periodic_2_triangulation_2 return Offset((i >> 1) & 1, i & 1); } - // \} - // Protected functions of Periodic_2_triangulation_2 - /// Const accessor to the virtual vertices reverse map, - /// used to optimize point location for periodic copies. - const Virtual_vertex_reverse_map &virtual_vertices_reverse() const + /// Tests whether a vertex is a periodic copy of a vertex in the 3-cover. + bool is_virtual(Vertex_handle v) const { - return _virtual_vertices_reverse; + if (is_1_cover()) + return false; + return (_virtual_vertices.find(v) != _virtual_vertices.end()); } /// [Undoc] Returns the non-virtual copy of the vertex. @@ -1007,23 +1068,85 @@ class Periodic_2_triangulation_2 return vh; } + const std::vector& periodic_copies(const Vertex_handle v) const + { + CGAL_precondition(number_of_sheets() != make_array(1, 1) ); + CGAL_precondition(_virtual_vertices.find(v) == _virtual_vertices.end()); + CGAL_assertion(_virtual_vertices_reverse.find(v) != _virtual_vertices_reverse.end()); + return _virtual_vertices_reverse.find(v)->second; + } - /// Tests whether a vertex is a periodic copy of a vertex in the 3-cover. - bool is_virtual(Vertex_handle v) + // Protected functions of Periodic_2_triangulation_2 + /// Const accessor to the virtual vertices reverse map, + /// used to optimize point location for periodic copies. + const Virtual_vertex_reverse_map& virtual_vertices_reverse() const { - if (is_1_cover()) - return false; - return (_virtual_vertices.find(v) != _virtual_vertices.end()); + return _virtual_vertices_reverse; } - const std::vector& periodic_copies(const Vertex_handle v) const + // check whether pos points onto a unique edge or not. + // If we are computing in 1-sheeted covering this should + // always be true. + bool is_canonical(Face_handle fh) const { - CGAL_triangulation_precondition(number_of_sheets() != make_array(1, 1) ); - CGAL_triangulation_precondition(_virtual_vertices.find(v) == _virtual_vertices.end()); - CGAL_triangulation_assertion(_virtual_vertices_reverse.find(v) != _virtual_vertices_reverse.end()); - return _virtual_vertices_reverse.find(v)->second; + if(is_1_cover()) + return true; + + Offset off0, off1, off2; + get_offsets(fh, off0, off1, off2); + + // If there is one offset with entries larger than 1 then we are + // talking about a vertex that is too far away from the original + // domain to belong to a canonical triangle. + if (off0.x() > 1) return false; + if (off0.y() > 1) return false; + if (off1.x() > 1) return false; + if (off1.y() > 1) return false; + if (off2.x() > 1) return false; + if (off2.y() > 1) return false; + + // If there is one direction of space for which all offsets are + // non-zero then the edge is not canonical because we can + // take the copy closer towards the origin in that direction. + int offx = off0.x() & off1.x() & off2.x(); + int offy = off0.y() & off1.y() & off2.y(); + + return (offx == 0 && offy == 0); } + bool is_canonical(const Edge& e) const + { + if(is_1_cover()) + return true; + + // fetch all offsets + Offset off0, off1; + get_offsets(e, off0, off1); + + // If there is one offset with entries larger than 1 then we are + // talking about a vertex that is too far away from the original + // domain to belong to a canonical edge. + if (off0.x() > 1) return false; + if (off0.y() > 1) return false; + if (off1.x() > 1) return false; + if (off1.y() > 1) return false; + + // If there is one direction of space for which all offsets are + // non-zero then the edge is not canonical because we can + // take the copy closer towards the origin in that direction. + int offx = off0.x() & off1.x(); + int offy = off0.y() & off1.y(); + + return (offx == 0 && offy == 0); + } + + // checks whether pos points onto a vertex inside the original domain + bool is_canonical(Vertex_handle vh) const + { + return !is_virtual(vh); + } + +public: template Stream& draw_triangulation(Stream& os) const { @@ -1044,9 +1167,9 @@ class Periodic_2_triangulation_2 // than sqrt(0.166) is fulfilled. if (_too_long_edge_counter == 0 && !is_1_cover()) { - CGAL_triangulation_expensive_assertion( is_valid() ); + CGAL_expensive_assertion( is_valid() ); this->convert_to_1_sheeted_covering(); - CGAL_triangulation_expensive_assertion( is_valid() ); + CGAL_expensive_assertion( is_valid() ); } } @@ -1218,7 +1341,7 @@ class Periodic_2_triangulation_2 /// Returns the offset such that (p, o) lies on the bounded side of the face f. Offset get_location_offset(Face_handle f, const Point &p, const Offset &o) const { - CGAL_triangulation_precondition( number_of_vertices() != 0 ); + CGAL_precondition( number_of_vertices() != 0 ); if (is_1_cover() && f->has_zero_offsets()) { @@ -1296,14 +1419,14 @@ class Periodic_2_triangulation_2 } } - CGAL_triangulation_assertion((std::min)((std::min)(off0[0], off1[0]), off2[0]) == 0); - CGAL_triangulation_assertion((std::min)((std::min)(off0[1], off1[1]), off2[1]) == 0); - CGAL_triangulation_assertion((0 <= off0[0]) && (off0[0] < 2)); - CGAL_triangulation_assertion((0 <= off1[0]) && (off1[0] < 2)); - CGAL_triangulation_assertion((0 <= off2[0]) && (off2[0] < 2)); - CGAL_triangulation_assertion((0 <= off0[1]) && (off0[1] < 2)); - CGAL_triangulation_assertion((0 <= off1[1]) && (off1[1] < 2)); - CGAL_triangulation_assertion((0 <= off2[1]) && (off2[1] < 2)); + CGAL_assertion((std::min)((std::min)(off0[0], off1[0]), off2[0]) == 0); + CGAL_assertion((std::min)((std::min)(off0[1], off1[1]), off2[1]) == 0); + CGAL_assertion((0 <= off0[0]) && (off0[0] < 2)); + CGAL_assertion((0 <= off1[0]) && (off1[0] < 2)); + CGAL_assertion((0 <= off2[0]) && (off2[0] < 2)); + CGAL_assertion((0 <= off0[1]) && (off0[1] < 2)); + CGAL_assertion((0 <= off1[1]) && (off1[1] < 2)); + CGAL_assertion((0 <= off2[1]) && (off2[1] < 2)); int o0i = ((off0[0] & 1) << 1) + (off0[1] & 1); int o1i = ((off1[0] & 1) << 1) + (off1[1] & 1); @@ -1326,11 +1449,11 @@ class Periodic_2_triangulation_2 } bool has_self_edges(Face_handle fh) const { - CGAL_triangulation_assertion((fh->vertex(0) != fh->vertex(1)) || - (fh->offset(0) != fh->offset(1))); - CGAL_triangulation_assertion((fh->vertex(0) != fh->vertex(2)) || - (fh->offset(0) != fh->offset(2))); - CGAL_triangulation_assertion((fh->vertex(1) != fh->vertex(2)) || + CGAL_assertion((fh->vertex(0) != fh->vertex(1)) || + (fh->offset(0) != fh->offset(1))); + CGAL_assertion((fh->vertex(0) != fh->vertex(2)) || + (fh->offset(0) != fh->offset(2))); + CGAL_assertion((fh->vertex(1) != fh->vertex(2)) || (fh->offset(1) != fh->offset(2))); return ((fh->vertex(0) == fh->vertex(1)) || (fh->vertex(0) == fh->vertex(2)) || @@ -1408,7 +1531,7 @@ Periodic_2_triangulation_2::Periodic_2_triangulation_2( , _domain(domain) , _too_long_edge_counter(0) { - CGAL_triangulation_precondition(_domain.xmax() - _domain.xmin() == + CGAL_precondition(_domain.xmax() - _domain.xmin() == _domain.ymax() - _domain.ymin()); set_domain(_domain); } @@ -1470,7 +1593,7 @@ copy_multiple_covering(const Periodic_2_triangulation_2 & tr) vlist.push_back(vit); _virtual_vertices_reverse.insert( std::make_pair(vit, std::vector(8))); - CGAL_triangulation_assertion(_virtual_vertices_reverse.find(vit) + CGAL_assertion(_virtual_vertices_reverse.find(vit) ->second.size() == 8); } } @@ -1491,7 +1614,7 @@ copy_multiple_covering(const Periodic_2_triangulation_2 & tr) std::make_pair(*vlist_it, off))); _virtual_vertices_reverse.find(*vlist_it) ->second[3 * off[0] + off[1] - 1] = vit2; - CGAL_triangulation_assertion(get_offset(vit2) == off); + CGAL_assertion(get_offset(vit2) == off); } } // Cleanup vertex offsets @@ -1533,7 +1656,7 @@ copy_multiple_covering(const Periodic_2_triangulation_2 & tr) Vertex_handle v_no = eit->first->vertex(i); if (squared_distance(p1, p2) > _edge_length_threshold) { - CGAL_triangulation_assertion( + CGAL_assertion( find(_too_long_edges[v_no].begin(), _too_long_edges[v_no].end(), edge_to_add.second) == _too_long_edges[v_no].end()); @@ -1562,7 +1685,7 @@ void Periodic_2_triangulation_2::copy_triangulation( copy_multiple_covering(tr); } CGAL_assertion(_too_long_edge_counter == tr._too_long_edge_counter); - CGAL_triangulation_expensive_postcondition(*this == tr); + CGAL_expensive_postcondition(*this == tr); } template @@ -1628,7 +1751,7 @@ bool Periodic_2_triangulation_2::is_valid(Face_handle fh, bool /*verbos std::cerr << "Offset: " << o << std::endl; } std::cerr << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); } return result; @@ -1638,7 +1761,7 @@ template bool Periodic_2_triangulation_2::is_valid(bool verbose, int level) const { bool result = _tds.is_valid(verbose, level); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); if (dimension() == 2) { @@ -1667,36 +1790,36 @@ bool Periodic_2_triangulation_2::is_valid(bool verbose, int level) cons } } } - CGAL_triangulation_assertion(result); + CGAL_assertion(result); // Check for the right number of simplices int copies = number_of_sheets()[0] * number_of_sheets()[1]; result &= (number_of_stored_vertices() == copies * number_of_vertices()); result &= (number_of_stored_edges() == copies * number_of_edges()); result &= (number_of_stored_faces() == copies * number_of_faces()); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); // check number of euler characteristic. This cannot be done by the Tds // which does not know the genus result &= (number_of_stored_vertices() - number_of_stored_edges() + number_of_stored_faces() == 0); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); result &= !has_self_edges(); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); // Edges should not be longer than 1 periodicity for (Face_iterator fit = faces_begin(); fit != faces_end(); ++fit) { result &= is_valid(fit, verbose, level); } - CGAL_triangulation_assertion(result); + CGAL_assertion(result); result &= is_1_cover() == _virtual_vertices.empty(); result &= is_1_cover() == _virtual_vertices_reverse.empty(); result &= (_virtual_vertices.size() == (number_of_sheets()[0] * number_of_sheets()[1] - 1) * _virtual_vertices_reverse.size()); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); for (Virtual_vertex_map_it it = _virtual_vertices.begin(); it != _virtual_vertices.end(); ++it) @@ -1722,7 +1845,7 @@ bool Periodic_2_triangulation_2::is_valid(bool verbose, int level) cons result &= false; } } - CGAL_triangulation_assertion(result); + CGAL_assertion(result); for (Virtual_vertex_reverse_map_it it = _virtual_vertices_reverse.begin(); it != _virtual_vertices_reverse.end(); ++it) @@ -1755,20 +1878,20 @@ bool Periodic_2_triangulation_2::is_valid_too_long_edges(bool verbose, bool result = true; result &= is_1_cover() == _too_long_edges.empty(); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); size_t too_long_edges = 0; for (Too_long_edges_map_it it = _too_long_edges.begin(); it != _too_long_edges.end(); ++it) { too_long_edges += it->second.size(); } - CGAL_triangulation_assertion(result); + CGAL_assertion(result); if (_too_long_edge_counter != too_long_edges) { if (verbose) std::cout << "Too long edge counter is incorrect: " << _too_long_edge_counter << " != " << too_long_edges << std::endl; result = false; } - CGAL_triangulation_assertion(result); + CGAL_assertion(result); /// Expensive check whether the right too long edges are in the list if (is_1_cover()) @@ -1781,7 +1904,7 @@ bool Periodic_2_triangulation_2::is_valid_too_long_edges(bool verbose, Point p2 = construct_point(vh2->point(), get_offset(eit->first, cw(eit->second))); result &= (!edge_is_too_long(p1, p2)); } - CGAL_triangulation_assertion(result); + CGAL_assertion(result); } else { @@ -1797,7 +1920,7 @@ bool Periodic_2_triangulation_2::is_valid_too_long_edges(bool verbose, if (&*vh2 < &*vh1) std::swap(vh1, vh2); - CGAL_triangulation_assertion(&*vh1 < &*vh2); + CGAL_assertion(&*vh1 < &*vh2); bool too_long = edge_is_too_long(p1, p2); if (too_long != edge_is_too_long(p2, p1)) @@ -1805,7 +1928,7 @@ bool Periodic_2_triangulation_2::is_valid_too_long_edges(bool verbose, if (verbose) std::cout << "Long edge criterion not symmetric c(v1,v2) != c(v2,v1)" << std::endl; result = false; } - CGAL_triangulation_assertion(result); + CGAL_assertion(result); Too_long_edges_map_it it = _too_long_edges.find(vh1); if (it == _too_long_edges.end()) @@ -1816,7 +1939,7 @@ bool Periodic_2_triangulation_2::is_valid_too_long_edges(bool verbose, result = false; } result &= !too_long; - CGAL_triangulation_assertion(result); + CGAL_assertion(result); } else { @@ -1829,7 +1952,7 @@ bool Periodic_2_triangulation_2::is_valid_too_long_edges(bool verbose, if (verbose) std::cout << "2. Too long edge not in the data structure" << std::endl; result = false; } - CGAL_triangulation_assertion(result); + CGAL_assertion(result); } else { @@ -1838,7 +1961,7 @@ bool Periodic_2_triangulation_2::is_valid_too_long_edges(bool verbose, if (verbose) std::cout << "Edge is not too long, but contained in the data structure" << std::endl; result = false; } - CGAL_triangulation_assertion(result); + CGAL_assertion(result); } } } @@ -1849,7 +1972,7 @@ bool Periodic_2_triangulation_2::is_valid_too_long_edges(bool verbose, std::cout << "Counts do not match: " << _too_long_edge_counter << " != " << too_long_edges << std::endl; result = false; } - CGAL_triangulation_assertion(result); + CGAL_assertion(result); } return result; @@ -1926,9 +2049,9 @@ void Periodic_2_triangulation_2::flip(Face_handle f, int i) vh2_offset = it_vh2->second.second; } - CGAL_triangulation_assertion( + CGAL_assertion( virtual_vertices_reverse().find(vh1) != virtual_vertices_reverse().end()); - CGAL_triangulation_assertion( + CGAL_assertion( virtual_vertices_reverse().find(vh2) != virtual_vertices_reverse().end()); const std::vector &v1s = virtual_vertices_reverse().find(vh1)->second; @@ -1972,11 +2095,11 @@ void Periodic_2_triangulation_2::flip(Face_handle f, int i) template void Periodic_2_triangulation_2::flip_single_edge(Face_handle f, int i) { - CGAL_triangulation_precondition(f != Face_handle()); - CGAL_triangulation_precondition(i == 0 || i == 1 || i == 2); - CGAL_triangulation_precondition(dimension() == 2); + CGAL_precondition(f != Face_handle()); + CGAL_precondition(i == 0 || i == 1 || i == 2); + CGAL_precondition(dimension() == 2); - CGAL_triangulation_precondition(flippable(f, i)); + CGAL_precondition(flippable(f, i)); if (!is_1_cover()) remove_too_long_edge(f, i); @@ -2012,7 +2135,7 @@ void Periodic_2_triangulation_2::flip_single_edge(Face_handle f, int i) } else { - CGAL_triangulation_assertion(nb_offset.x() == -1); + CGAL_assertion(nb_offset.x() == -1); CGAL_assertion((offsets[3] & 2) == 0); offsets[3] |= 2; } @@ -2028,20 +2151,20 @@ void Periodic_2_triangulation_2::flip_single_edge(Face_handle f, int i) } else { - CGAL_triangulation_assertion(nb_offset.y() == -1); + CGAL_assertion(nb_offset.y() == -1); CGAL_assertion((offsets[3] & 1) == 0); offsets[3] |= 1; } } CGAL_assertion((offsets[0] & offsets[1] & offsets[2] & offsets[3]) == 0); - CGAL_triangulation_assertion_code(Vertex_handle vh = f->vertex(i)); - CGAL_triangulation_assertion_code(Vertex_handle vh_ccw = f->vertex(ccw(i))); + CGAL_assertion_code(Vertex_handle vh = f->vertex(i)); + CGAL_assertion_code(Vertex_handle vh_ccw = f->vertex(ccw(i))); _tds.flip(f, i); // Combinatorial checks - CGAL_triangulation_assertion(vh == f->vertex(i)); - CGAL_triangulation_assertion(vh_ccw == f->vertex(ccw(i))); - CGAL_triangulation_assertion(f->vertex(i) == nb->vertex(cw(nb_index))); - CGAL_triangulation_assertion(f->vertex(cw(i)) == nb->vertex(nb_index)); + CGAL_assertion(vh == f->vertex(i)); + CGAL_assertion(vh_ccw == f->vertex(ccw(i))); + CGAL_assertion(f->vertex(i) == nb->vertex(cw(nb_index))); + CGAL_assertion(f->vertex(cw(i)) == nb->vertex(nb_index)); // Restore the offsets int new_off[3]; @@ -2065,7 +2188,7 @@ void Periodic_2_triangulation_2::remove_from_virtual_copies(Vertex_handle v) { typename Virtual_vertex_reverse_map::iterator rev_it = _virtual_vertices_reverse.find(v); - CGAL_triangulation_assertion(rev_it != _virtual_vertices_reverse.end()); + CGAL_assertion(rev_it != _virtual_vertices_reverse.end()); const std::vector &virtual_copies = rev_it->second; for (size_t i = 0; i < virtual_copies.size(); ++i) @@ -2176,16 +2299,14 @@ Gt, Tds >::insert_first(const Point& p) _tds.set_dimension(2); // create the base for too_long_edges; - CGAL_triangulation_assertion(_too_long_edges.empty() ); - CGAL_triangulation_assertion(_too_long_edge_counter == 0); + CGAL_assertion(_too_long_edges.empty() ); + CGAL_assertion(_too_long_edge_counter == 0); // Insert all vertices as the first vertex in the _too_long_edges list - int k = 0; std::list empty_list; for (Vertex_iterator vit = vertices_begin(); vit != vertices_end(); ++vit) { _too_long_edges[vit] = empty_list; - k++; } // Insert all edges as all edges are too long @@ -2224,14 +2345,14 @@ Periodic_2_triangulation_2::insert_in_edge(const Point& p, const Offset // Insert in edge calls an insert_in_face and a flip. // Therefore there is no need to update the too_long_edges bookkeeping directly. - CGAL_triangulation_assertion(number_of_vertices() != 0); - CGAL_triangulation_assertion((!is_1_cover()) || (o == Offset())); + CGAL_assertion(number_of_vertices() != 0); + CGAL_assertion((!is_1_cover()) || (o == Offset())); // Backup of the neighbor and its relative offset Face_handle nb = f->neighbor(i); int j = nb->index(f); - CGAL_triangulation_assertion_code(Offset current_offset = get_location_offset(f, p, o)); - CGAL_triangulation_assertion + CGAL_assertion_code(Offset current_offset = get_location_offset(f, p, o)); + CGAL_assertion (orientation(f->vertex(cw(i))->point(), p, f->vertex(ccw(i))->point(), get_offset(f, cw(i)), combine_offsets(o, current_offset), get_offset(f, ccw(i))) == COLLINEAR && collinear_between(f->vertex(cw(i))->point(), p, f->vertex(ccw(i))->point(), @@ -2256,9 +2377,9 @@ Periodic_2_triangulation_2::insert_in_face(const Point& p, const Offset Face_handle f, Vertex_handle vh) { - CGAL_triangulation_assertion(f != Face_handle()); - CGAL_triangulation_assertion(number_of_vertices() != 0); - CGAL_triangulation_assertion((!is_1_cover()) || (o == Offset())); + CGAL_assertion(f != Face_handle()); + CGAL_assertion(number_of_vertices() != 0); + CGAL_assertion((!is_1_cover()) || (o == Offset())); const bool simplicity_criterion = f->has_zero_offsets() && o.is_zero(); @@ -2269,21 +2390,21 @@ Periodic_2_triangulation_2::insert_in_face(const Point& p, const Offset Face_handle nb[3]; int nb_index[3]; int offsets[3]; - CGAL_triangulation_assertion_code( Vertex_handle vertices[3]; ) + CGAL_assertion_code( Vertex_handle vertices[3]; ) if (!simplicity_criterion) { // Choose the periodic copy of tester.point() that is inside c. current_off = get_location_offset(f, p, o); - CGAL_triangulation_assertion(oriented_side(f, p, combine_offsets(o, current_off)) != ON_NEGATIVE_SIDE); + CGAL_assertion(oriented_side(f, p, combine_offsets(o, current_off)) != ON_NEGATIVE_SIDE); for (int i = 0; i < 3; ++i) { nb[i] = f->neighbor(i); nb_index[i] = nb[i]->index(f); offsets[i] = f->offset(i); - CGAL_triangulation_assertion_code( vertices[i] = f->vertex(i); ); + CGAL_assertion_code( vertices[i] = f->vertex(i); ); } } @@ -2301,8 +2422,8 @@ Periodic_2_triangulation_2::insert_in_face(const Point& p, const Offset Face_handle new_face = nb[i]->neighbor(nb_index[i]); int v_index = new_face->index(v); - CGAL_triangulation_assertion(new_face->vertex(ccw(v_index)) == vertices[ccw(i)]); - CGAL_triangulation_assertion(new_face->vertex(cw(v_index)) == vertices[cw(i)]); + CGAL_assertion(new_face->vertex(ccw(v_index)) == vertices[ccw(i)]); + CGAL_assertion(new_face->vertex(cw(v_index)) == vertices[cw(i)]); new_offsets[v_index] = v_offset; new_offsets[ccw(v_index)] = offsets[ccw(i)]; @@ -2330,9 +2451,9 @@ template typename Periodic_2_triangulation_2::Vertex_handle Periodic_2_triangulation_2::insert(const Point &p, Face_handle start) { - CGAL_triangulation_assertion((_domain.xmin() <= p.x()) && + CGAL_assertion((_domain.xmin() <= p.x()) && (p.x() < _domain.xmax())); - CGAL_triangulation_assertion((_domain.ymin() <= p.y()) && + CGAL_assertion((_domain.ymin() <= p.y()) && (p.y() < _domain.ymax())); if (number_of_stored_vertices() == 0) @@ -2383,9 +2504,9 @@ Periodic_2_triangulation_2::insert(const Point& p, } // vstart should be non-virtual, but should have virtual copies - CGAL_triangulation_assertion(_virtual_vertices.find(vstart) + CGAL_assertion(_virtual_vertices.find(vstart) == _virtual_vertices.end()); - CGAL_triangulation_assertion(_virtual_vertices_reverse.find(vstart) + CGAL_assertion(_virtual_vertices_reverse.find(vstart) != _virtual_vertices_reverse.end()); } @@ -2455,7 +2576,7 @@ Gt, Tds >::insert(const Point& p, const Offset &o, Locate_type lt, } default: { - CGAL_triangulation_assertion(false); // locate step failed + CGAL_assertion(false); // locate step failed return Vertex_handle(); } } @@ -2744,7 +2865,7 @@ bool Periodic_2_triangulation_2::compare_walks(const Point& p, std::cerr << std::endl; } - CGAL_triangulation_assertion(b); + CGAL_assertion(b); return b; } @@ -2959,9 +3080,9 @@ typename Periodic_2_triangulation_2::Face_handle Periodic_2_triangulati Gt, Tds >::locate(const Point& p, const Offset &o, Locate_type& lt, int& li, Face_handle start) const { - CGAL_triangulation_assertion((_domain.xmin() <= p.x()) && + CGAL_assertion((_domain.xmin() <= p.x()) && (p.x() < _domain.xmax())); - CGAL_triangulation_assertion((_domain.ymin() <= p.y()) && + CGAL_assertion((_domain.ymin() <= p.y()) && (p.y() < _domain.ymax())); if (dimension() <= 0) @@ -3000,7 +3121,7 @@ void Periodic_2_triangulation_2::convert_to_1_sheeted_covering() { if (is_1_cover()) return; - CGAL_triangulation_expensive_assertion(is_triangulation_in_1_sheet()); + CGAL_expensive_assertion(is_triangulation_in_1_sheet()); bool to_delete, has_simplifiable_offset; Virtual_vertex_map_it vvmit; @@ -3087,16 +3208,16 @@ void Periodic_2_triangulation_2::convert_to_1_sheeted_covering() // The vector from nb to the "original" periodic copy of nb, that is // the copy that will not be deleted. Offset difference_offset(x, y); - CGAL_triangulation_assertion( !difference_offset.is_null() ); + CGAL_assertion( !difference_offset.is_null() ); // We now have to find the "original" periodic copy of nb from // its vertices. Therefore, we first have to find the vertices. for (int j = 0; j < 3; j++) { - CGAL_triangulation_assertion( (off[j] - difference_offset)[0] >= 0); - CGAL_triangulation_assertion( (off[j] - difference_offset)[1] >= 0); - CGAL_triangulation_assertion( (off[j] - difference_offset)[0] < 3); - CGAL_triangulation_assertion( (off[j] - difference_offset)[1] < 3); + CGAL_assertion( (off[j] - difference_offset)[0] >= 0); + CGAL_assertion( (off[j] - difference_offset)[1] >= 0); + CGAL_assertion( (off[j] - difference_offset)[0] < 3); + CGAL_assertion( (off[j] - difference_offset)[1] < 3); // find the Vertex_handles of the vertices of the "original" // periodic copy of nb. If the vertex is inside the original @@ -3151,19 +3272,19 @@ void Periodic_2_triangulation_2::convert_to_1_sheeted_covering() off[i] = Offset(); get_vertex(it, i, vert[i], off[i]); it->set_vertex(i, vert[i]); - CGAL_triangulation_assertion(vert[i]->point()[0] < _domain.xmax()); - CGAL_triangulation_assertion(vert[i]->point()[1] < _domain.ymax()); - CGAL_triangulation_assertion(vert[i]->point()[0] >= _domain.xmin()); - CGAL_triangulation_assertion(vert[i]->point()[1] >= _domain.ymin()); + CGAL_assertion(vert[i]->point()[0] < _domain.xmax()); + CGAL_assertion(vert[i]->point()[1] < _domain.ymax()); + CGAL_assertion(vert[i]->point()[0] >= _domain.xmin()); + CGAL_assertion(vert[i]->point()[1] >= _domain.ymin()); // redirect also the face pointer of the vertex. it->vertex(i)->set_face(it); } // Set the offsets. set_offsets(it, off[0], off[1], off[2]); - CGAL_triangulation_assertion( int_to_off(it->offset(0)) == off[0] ); - CGAL_triangulation_assertion( int_to_off(it->offset(1)) == off[1] ); - CGAL_triangulation_assertion( int_to_off(it->offset(2)) == off[2] ); + CGAL_assertion( int_to_off(it->offset(0)) == off[0] ); + CGAL_assertion( int_to_off(it->offset(1)) == off[1] ); + CGAL_assertion( int_to_off(it->offset(2)) == off[2] ); } } @@ -3196,7 +3317,7 @@ void Periodic_2_triangulation_2::convert_to_1_sheeted_covering() { if (_virtual_vertices.count(vit) != 0) { - CGAL_triangulation_assertion( _virtual_vertices.count( vit ) == 1 ); + CGAL_assertion( _virtual_vertices.count( vit ) == 1 ); vertices_to_delete.push_back(vit); } } @@ -3213,7 +3334,7 @@ void Periodic_2_triangulation_2::convert_to_1_sheeted_covering() _too_long_edge_counter = 0; _too_long_edges.clear(); - CGAL_triangulation_assertion(is_1_cover()); + CGAL_assertion(is_1_cover()); } template @@ -3221,7 +3342,7 @@ void Periodic_2_triangulation_2::convert_to_9_sheeted_covering() { if (_cover == make_array(3, 3)) return; - CGAL_triangulation_precondition(is_1_cover()); + CGAL_precondition(is_1_cover()); // Create 9 copies of each vertex and write virtual_vertices and // virtual_vertices_reverse @@ -3299,7 +3420,7 @@ void Periodic_2_triangulation_2::convert_to_9_sheeted_covering() for (int i = 0; i < 3; i++) { vvrmit[i] = _virtual_vertices_reverse.find((*fit)->vertex(i)); - CGAL_triangulation_assertion( + CGAL_assertion( vvrmit[i] != _virtual_vertices_reverse.end()); vvoff[i] = int_to_off((*fit)->offset(i)); } @@ -3313,7 +3434,7 @@ void Periodic_2_triangulation_2::convert_to_9_sheeted_covering() int o_i = ((n + 1) / 3 + vvoff[i].x() + 3) % 3; int o_j = ((n + 1) + vvoff[i].y() + 3) % 3; int n_c = 3 * o_i + o_j - 1; - CGAL_triangulation_assertion(n_c >= -1); + CGAL_assertion(n_c >= -1); if (n_c == -1) vvh[i] = (*fit)->vertex(i); else @@ -3333,13 +3454,13 @@ void Periodic_2_triangulation_2::convert_to_9_sheeted_covering() { Virtual_vertex_reverse_map_it vvrmit = _virtual_vertices_reverse.find( (*fit)->vertex(i)); - CGAL_triangulation_assertion(vvrmit != _virtual_vertices_reverse.end()); + CGAL_assertion(vvrmit != _virtual_vertices_reverse.end()); Offset vvoff = int_to_off((*fit)->offset(i)); if (!vvoff.is_null()) { int n_f = 3 * vvoff.x() + vvoff.y() - 1; - CGAL_triangulation_assertion(n_f >= 0); - CGAL_triangulation_assertion(static_cast(n_f) < vvrmit->second.size()); + CGAL_assertion(n_f >= 0); + CGAL_assertion(static_cast(n_f) < vvrmit->second.size()); (*fit)->set_vertex(i, vvrmit->second[n_f]); } } @@ -3350,14 +3471,14 @@ void Periodic_2_triangulation_2::convert_to_9_sheeted_covering() for (typename std::list::iterator fit = original_faces.begin(); fit != original_faces.end(); ++fit, ++oit) { - CGAL_triangulation_assertion( oit != off_nb.end() ); + CGAL_assertion( oit != off_nb.end() ); VCRMIT c_cp = virtual_faces_reverse.find(*fit); - CGAL_triangulation_assertion(c_cp != virtual_faces_reverse.end()); + CGAL_assertion(c_cp != virtual_faces_reverse.end()); for (int i = 0; i < 3; i++) { Face_handle fit_nb = (*fit)->neighbor(i); VCRMIT c_cp_nb = virtual_faces_reverse.find(fit_nb); - CGAL_triangulation_assertion(c_cp_nb != virtual_faces_reverse.end()); + CGAL_assertion(c_cp_nb != virtual_faces_reverse.end()); Offset nboff = (*oit)[i]; for (int n = 0; n < 8; n++) { @@ -3372,16 +3493,16 @@ void Periodic_2_triangulation_2::convert_to_9_sheeted_covering() } if (n_nb == -1) { - CGAL_triangulation_assertion(fit_nb->has_vertex(c_cp->second[n]->vertex(ccw(i))) ); - CGAL_triangulation_assertion(fit_nb->has_vertex(c_cp->second[n]->vertex( cw(i))) ); + CGAL_assertion(fit_nb->has_vertex(c_cp->second[n]->vertex(ccw(i))) ); + CGAL_assertion(fit_nb->has_vertex(c_cp->second[n]->vertex( cw(i))) ); c_cp->second[n]->set_neighbor(i, fit_nb); } else { - CGAL_triangulation_assertion(n_nb >= 0); - CGAL_triangulation_assertion(static_cast(n_nb) <= c_cp_nb->second.size()); - CGAL_triangulation_assertion(c_cp_nb->second[n_nb]->has_vertex(c_cp->second[n]->vertex(ccw(i))) ); - CGAL_triangulation_assertion(c_cp_nb->second[n_nb]->has_vertex(c_cp->second[n]->vertex( cw(i))) ); + CGAL_assertion(n_nb >= 0); + CGAL_assertion(static_cast(n_nb) <= c_cp_nb->second.size()); + CGAL_assertion(c_cp_nb->second[n_nb]->has_vertex(c_cp->second[n]->vertex(ccw(i))) ); + CGAL_assertion(c_cp_nb->second[n_nb]->has_vertex(c_cp->second[n]->vertex( cw(i))) ); c_cp->second[n]->set_neighbor(i, c_cp_nb->second[n_nb]); } } @@ -3393,7 +3514,7 @@ void Periodic_2_triangulation_2::convert_to_9_sheeted_covering() for (typename std::list::iterator fit = original_faces.begin(); fit != original_faces.end(); ++fit, ++oit) { - CGAL_triangulation_assertion( oit != off_nb.end() ); + CGAL_assertion( oit != off_nb.end() ); for (int i = 0; i < 3; i++) { Offset nboff = (*oit)[i]; @@ -3401,14 +3522,14 @@ void Periodic_2_triangulation_2::convert_to_9_sheeted_covering() { Face_handle fit_nb = (*fit)->neighbor(i); VCRMIT c_cp_nb = virtual_faces_reverse.find(fit_nb); - CGAL_triangulation_assertion(c_cp_nb != virtual_faces_reverse.end()); + CGAL_assertion(c_cp_nb != virtual_faces_reverse.end()); int o_i = (3 - nboff.x()) % 3; int o_j = (3 - nboff.y()) % 3; int n_nb = 3 * o_i + o_j - 1; - CGAL_triangulation_assertion(n_nb >= 0); - CGAL_triangulation_assertion(static_cast(n_nb) <= c_cp_nb->second.size()); - CGAL_triangulation_assertion(c_cp_nb->second[n_nb]->has_vertex((*fit)->vertex(ccw(i))) ); - CGAL_triangulation_assertion(c_cp_nb->second[n_nb]->has_vertex((*fit)->vertex( cw(i))) ); + CGAL_assertion(n_nb >= 0); + CGAL_assertion(static_cast(n_nb) <= c_cp_nb->second.size()); + CGAL_assertion(c_cp_nb->second[n_nb]->has_vertex((*fit)->vertex(ccw(i))) ); + CGAL_assertion(c_cp_nb->second[n_nb]->has_vertex((*fit)->vertex( cw(i))) ); (*fit)->set_neighbor(i, c_cp_nb->second[n_nb]); } } @@ -3428,7 +3549,7 @@ void Periodic_2_triangulation_2::convert_to_9_sheeted_covering() != original_faces.end(); ++fit) { VCRMIT c_cp = virtual_faces_reverse.find(*fit); - CGAL_triangulation_assertion( c_cp != virtual_faces_reverse.end()); + CGAL_assertion( c_cp != virtual_faces_reverse.end()); Offset off[3]; for (int i = 0; i < 3; i++) off[i] = int_to_off((*fit)->offset(i)); @@ -3445,8 +3566,8 @@ void Periodic_2_triangulation_2::convert_to_9_sheeted_covering() { off_cp[i] = Offset((o_i == 2) ? off[i].x() : 0, (o_j == 2) ? off[i].y() : 0); - CGAL_triangulation_assertion(off_cp[i].x() == 0 || off_cp[i].x() == 1); - CGAL_triangulation_assertion(off_cp[i].y() == 0 || off_cp[i].y() == 1); + CGAL_assertion(off_cp[i].x() == 0 || off_cp[i].x() == 1); + CGAL_assertion(off_cp[i].y() == 0 || off_cp[i].y() == 1); } set_offsets(c_cp->second[n], off_cp[0], off_cp[1], off_cp[2]); } @@ -3458,25 +3579,23 @@ void Periodic_2_triangulation_2::convert_to_9_sheeted_covering() { //This statement does not seem to have any effect set_offsets(*fit, 0, 0, 0); - CGAL_triangulation_assertion((*fit)->offset(0) == 0); - CGAL_triangulation_assertion((*fit)->offset(1) == 0); - CGAL_triangulation_assertion((*fit)->offset(2) == 0); + CGAL_assertion((*fit)->offset(0) == 0); + CGAL_assertion((*fit)->offset(1) == 0); + CGAL_assertion((*fit)->offset(2) == 0); } _cover = make_array(3, 3); // Set up too long edges data structure - int i = 0; for (Vertex_iterator vit = vertices_begin(); vit != vertices_end(); ++vit) { _too_long_edges[vit] = std::list(); - ++i; } _too_long_edge_counter = find_too_long_edges(_too_long_edges); - CGAL_triangulation_expensive_assertion(is_valid()); + CGAL_expensive_assertion(is_valid()); - CGAL_triangulation_assertion(!is_1_cover()); + CGAL_assertion(!is_1_cover()); } // iterate over all edges and store the ones that are longer than @@ -3547,17 +3666,17 @@ inline void Periodic_2_triangulation_2::get_vertex(Vertex_handle vh_i, // if vh_i is not contained in virtual_vertices, then it is in the // original domain. vh = vh_i; - CGAL_triangulation_assertion(vh != Vertex_handle()); + CGAL_assertion(vh != Vertex_handle()); } else { // otherwise it has to be looked up as well as its offset. vh = it->second.first; off += it->second.second; - CGAL_triangulation_assertion(vh->point().x() < _domain.xmax()); - CGAL_triangulation_assertion(vh->point().y() < _domain.ymax()); - CGAL_triangulation_assertion(vh->point().x() >= _domain.xmin()); - CGAL_triangulation_assertion(vh->point().y() >= _domain.ymin()); + CGAL_assertion(vh->point().x() < _domain.xmax()); + CGAL_assertion(vh->point().y() < _domain.ymax()); + CGAL_assertion(vh->point().x() >= _domain.xmin()); + CGAL_assertion(vh->point().y() >= _domain.ymin()); } } @@ -3575,7 +3694,7 @@ GT, Tds >::get_face(const Vertex_handle* vh) const Face_circulator done(fc); do { - CGAL_triangulation_assertion( + CGAL_assertion( fc->vertex(0) == vh[2] || fc->vertex(1) == vh[2] || fc->vertex(2) == vh[2]); @@ -3591,7 +3710,7 @@ GT, Tds >::get_face(const Vertex_handle* vh) const } while (++fc != done); - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return Face_handle(); } @@ -3599,7 +3718,7 @@ template Bounded_side Periodic_2_triangulation_2::side_of_face(const Point &q, const Offset &off, Face_handle f, Locate_type <, int &li) const { - CGAL_triangulation_precondition(number_of_vertices() != 0); + CGAL_precondition(number_of_vertices() != 0); Orientation o0, o1, o2; o0 = o1 = o2 = ZERO; @@ -3607,7 +3726,7 @@ Bounded_side Periodic_2_triangulation_2::side_of_face(const Point &q, if ((cumm_off == 0) && is_1_cover()) { - CGAL_triangulation_assertion(off == Offset()); + CGAL_assertion(off == Offset()); const Point &p0 = f->vertex(0)->point(); const Point &p1 = f->vertex(1)->point(); @@ -3629,7 +3748,7 @@ Bounded_side Periodic_2_triangulation_2::side_of_face(const Point &q, p[i] = &(f->vertex(i)->point()); offs[i] = get_offset(f, i); } - CGAL_triangulation_assertion(orientation(*p[0], *p[1], *p[2], + CGAL_assertion(orientation(*p[0], *p[1], *p[2], offs[0], offs[1], offs[2]) == POSITIVE); bool found = false; for (int i = 0; (i < 4) && (!found); i++) @@ -3681,7 +3800,7 @@ Bounded_side Periodic_2_triangulation_2::side_of_face(const Point &q, default: { // impossible : cannot be on 3 edges for a real triangle - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return ON_BOUNDARY; } } @@ -3753,7 +3872,7 @@ Bounded_side Periodic_2_triangulation_2::bounded_side(const Point &p0, { // return position of point p with respect to triangle p0p1p2 - CGAL_triangulation_precondition( orientation(p0, p1, p2) != COLLINEAR); + CGAL_precondition( orientation(p0, p1, p2) != COLLINEAR); Orientation o1 = orientation(p0, p1, p); Orientation o2 = orientation(p1, p2, p); @@ -3796,7 +3915,7 @@ Bounded_side Periodic_2_triangulation_2::bounded_side(const Point &p0, const Offset &o1, const Offset &o2, const Offset &o) const { // return position of point p with respect to triangle p0p1p2 - CGAL_triangulation_precondition( orientation(p0, p1, p2, o0, o1, o2) != COLLINEAR); + CGAL_precondition( orientation(p0, p1, p2, o0, o1, o2) != COLLINEAR); Orientation orient1 = orientation(p0, p1, p, o0, o1, o); Orientation orient2 = orientation(p1, p2, p, o1, o2, o); Orientation orient3 = orientation(p2, p0, p, o2, o0, o); @@ -3995,7 +4114,7 @@ void Periodic_2_triangulation_2::insert_too_long_edge(Face_handle f, in } else { - CGAL_triangulation_precondition(&*vh2 < &*vh1); + CGAL_precondition(&*vh2 < &*vh1); if (edge_is_too_long(p2, p1) && (find(_too_long_edges[vh2].begin(), _too_long_edges[vh2].end(), vh1) == _too_long_edges[vh2].end())) { @@ -4039,7 +4158,7 @@ void Periodic_2_triangulation_2::remove_too_long_edges_in_star( } else { - CGAL_triangulation_precondition(&*vh2 < &*vh); + CGAL_precondition(&*vh2 < &*vh); if (edge_is_too_long(p1, p2) && (find(_too_long_edges[vh2].begin(), _too_long_edges[vh2].end(), vh) != _too_long_edges[vh2].end())) @@ -4190,14 +4309,14 @@ Periodic_2_triangulation_2::save(std::ostream& os) const << Offset(0, 0) << std::endl; else os << it->point() << Offset(0, 0); - CGAL_triangulation_assertion(_virtual_vertices_reverse.find(it) + CGAL_assertion(_virtual_vertices_reverse.find(it) != _virtual_vertices_reverse.end()); vv = _virtual_vertices_reverse.find(it)->second; - CGAL_triangulation_assertion(vv.size() == 8); + CGAL_assertion(vv.size() == 8); for (std::size_t j = 0; j < vv.size(); j++) { vvit = _virtual_vertices.find(vv[j]); - CGAL_triangulation_assertion(vvit != _virtual_vertices.end()); + CGAL_assertion(vvit != _virtual_vertices.end()); V[vv[j]] = i++; if (IO::is_ascii(os)) os << vv[j]->point() << std::endl @@ -4206,7 +4325,7 @@ Periodic_2_triangulation_2::save(std::ostream& os) const } } } - CGAL_triangulation_postcondition(i == _cover[0]*_cover[1]*n); + CGAL_postcondition(i == _cover[0]*_cover[1]*n); Unique_hash_map F(0, _tds.number_of_faces()); int inum = 0; @@ -4299,7 +4418,7 @@ Periodic_2_triangulation_2::load(std::istream& is) // the faces by the indices of their vertices in the preceding list // of vertices, plus the non combinatorial information on each face // the neighbors of each face by their index in the preceding list of face - CGAL_triangulation_precondition(is.good()); + CGAL_precondition(is.good()); clear(); @@ -4321,7 +4440,7 @@ Periodic_2_triangulation_2::load(std::istream& is) } std::cout << "Line:" << __LINE__ << " cx:" << cx << " cy:" << cy << " n:" << n << std::endl; - CGAL_triangulation_assertion((n / (cx * cy))*cx*cy == n); + CGAL_assertion((n / (cx * cy))*cx*cy == n); tds().set_dimension((n == 0 ? -2 : 2)); _domain = domain; @@ -4434,19 +4553,17 @@ Periodic_2_triangulation_2::load(std::istream& is) for (std::size_t j = 0 ; j < m; j++) is >> *(F[j]); - int i = 0; for (Vertex_iterator vi = vertices_begin(); vi != vertices_end(); ++vi) { _too_long_edges[vi] = std::list(); - ++i; } _edge_length_threshold = FT(0.166) * (_domain.xmax() - _domain.xmin()) * (_domain.xmax() - _domain.xmin()); _too_long_edge_counter = find_too_long_edges(_too_long_edges); - CGAL_triangulation_expensive_assertion( is_valid() ); + CGAL_expensive_assertion( is_valid() ); return is; } @@ -4472,11 +4589,11 @@ test_next(const Periodic_2_triangulation_2 &t1, // Returns false if an inequality has been found. // Precondition: c1, c2 have been registered as well as their 4 vertices. - CGAL_triangulation_precondition(t1.number_of_vertices() != 0); - CGAL_triangulation_precondition(Cmap[c1] == c2); - CGAL_triangulation_precondition(Vmap.find(c1->vertex(0)) != Vmap.end()); - CGAL_triangulation_precondition(Vmap.find(c1->vertex(1)) != Vmap.end()); - CGAL_triangulation_precondition(Vmap.find(c1->vertex(2)) != Vmap.end()); + CGAL_precondition(t1.number_of_vertices() != 0); + CGAL_precondition(Cmap[c1] == c2); + CGAL_precondition(Vmap.find(c1->vertex(0)) != Vmap.end()); + CGAL_precondition(Vmap.find(c1->vertex(1)) != Vmap.end()); + CGAL_precondition(Vmap.find(c1->vertex(2)) != Vmap.end()); typedef Periodic_2_triangulation_2 Tr1; typedef Periodic_2_triangulation_2 Tr2; diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Functor_with_offset_points_adaptor_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Functor_with_offset_points_adaptor_2.h index 345d19f6..839f0105 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Functor_with_offset_points_adaptor_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Functor_with_offset_points_adaptor_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Functor_with_offset_points_adaptor_2.h $ -// $Id: Functor_with_offset_points_adaptor_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Functor_with_offset_points_adaptor_2.h $ +// $Id: include/CGAL/Periodic_2_triangulation_2/internal/Functor_with_offset_points_adaptor_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_Delaunay_triangulation_filtered_traits_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_Delaunay_triangulation_filtered_traits_2.h index 6b01f69f..c1e2abfc 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_Delaunay_triangulation_filtered_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_Delaunay_triangulation_filtered_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_Delaunay_triangulation_filtered_traits_2.h $ -// $Id: Periodic_2_Delaunay_triangulation_filtered_traits_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_Delaunay_triangulation_filtered_traits_2.h $ +// $Id: include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_Delaunay_triangulation_filtered_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_Delaunay_triangulation_statically_filtered_traits_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_Delaunay_triangulation_statically_filtered_traits_2.h index 7ca6ea73..92c231c6 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_Delaunay_triangulation_statically_filtered_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_Delaunay_triangulation_statically_filtered_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_Delaunay_triangulation_statically_filtered_traits_2.h $ -// $Id: Periodic_2_Delaunay_triangulation_statically_filtered_traits_2.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_Delaunay_triangulation_statically_filtered_traits_2.h $ +// $Id: include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_Delaunay_triangulation_statically_filtered_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_construct_point_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_construct_point_2.h index 8d56b9df..bfc885d0 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_construct_point_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_construct_point_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_construct_point_2.h $ -// $Id: Periodic_2_construct_point_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_construct_point_2.h $ +// $Id: include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_construct_point_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Nico Kruithof , diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_triangulation_filtered_traits_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_triangulation_filtered_traits_2.h index 3bfff1df..cf467456 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_triangulation_filtered_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_triangulation_filtered_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_triangulation_filtered_traits_2.h $ -// $Id: Periodic_2_triangulation_filtered_traits_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_triangulation_filtered_traits_2.h $ +// $Id: include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_triangulation_filtered_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Nico Kruithof , diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_triangulation_statically_filtered_traits_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_triangulation_statically_filtered_traits_2.h index 92111b58..ab9e259c 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_triangulation_statically_filtered_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_triangulation_statically_filtered_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_triangulation_statically_filtered_traits_2.h $ -// $Id: Periodic_2_triangulation_statically_filtered_traits_2.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_triangulation_statically_filtered_traits_2.h $ +// $Id: include/CGAL/Periodic_2_triangulation_2/internal/Periodic_2_triangulation_statically_filtered_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Nico Kruithof , diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Static_filters/Periodic_2_orientation_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Static_filters/Periodic_2_orientation_2.h index 25985cb0..130c7c84 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Static_filters/Periodic_2_orientation_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Static_filters/Periodic_2_orientation_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Static_filters/Periodic_2_orientation_2.h $ -// $Id: Periodic_2_orientation_2.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Static_filters/Periodic_2_orientation_2.h $ +// $Id: include/CGAL/Periodic_2_triangulation_2/internal/Static_filters/Periodic_2_orientation_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Nico Kruithof diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h index 0487ff22..87229dbe 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_2/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h $ -// $Id: Periodic_2_side_of_oriented_circle_2.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h $ +// $Id: include/CGAL/Periodic_2_triangulation_2/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_dummy_12.h b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_dummy_12.h index b260e854..6ac5c9da 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_dummy_12.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_dummy_12.h @@ -3,12 +3,14 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_dummy_12.h $ -// $Id: Periodic_2_triangulation_dummy_12.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_dummy_12.h $ +// $Id: include/CGAL/Periodic_2_triangulation_dummy_12.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Nico Kruithof +#include + #ifdef CGAL_INCLUDE_FROM_PERIODIC_2_TRIANGULATION_2_H #include diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_face_base_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_face_base_2.h index 6416e1f7..707df340 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_face_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_face_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_face_base_2.h $ -// $Id: Periodic_2_triangulation_face_base_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_face_base_2.h $ +// $Id: include/CGAL/Periodic_2_triangulation_face_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Nico Kruithof @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -64,7 +64,7 @@ class Periodic_2_triangulation_face_base_2 /// Periodic functions int offset(int i) const { - CGAL_triangulation_precondition( i >= 0 && i < 3 ); + CGAL_precondition( i >= 0 && i < 3 ); return ((_off >> 2 * i) & 3); } bool has_zero_offsets() const diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_hierarchy_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_hierarchy_2.h index 7409d5a9..52a3a0cc 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_hierarchy_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_hierarchy_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_hierarchy_2.h $ -// $Id: Periodic_2_triangulation_hierarchy_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_hierarchy_2.h $ +// $Id: include/CGAL/Periodic_2_triangulation_hierarchy_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers @@ -209,7 +209,7 @@ Periodic_2_triangulation_hierarchy_2(const Periodic_2_triangulation_hierarchy_2< } -//Assignement +//Assignment template Periodic_2_triangulation_hierarchy_2 & Periodic_2_triangulation_hierarchy_2:: @@ -455,13 +455,13 @@ typename Periodic_2_triangulation_hierarchy_2::Vertex_handle Periodic_2_triangulation_hierarchy_2:: move_if_no_collision(Vertex_handle v, const Point &p) { - CGAL_triangulation_precondition(v != Vertex_handle()); + CGAL_precondition(v != Vertex_handle()); Vertex_handle old, ret; for (int l = 0; l < m_maxlevel; ++l) { Vertex_handle u = v->up(); - CGAL_triangulation_assertion(hierarchy[l]->is_valid()); + CGAL_assertion(hierarchy[l]->is_valid()); Vertex_handle w = hierarchy[l]->move_if_no_collision(v, p); if (l == 0) { @@ -491,13 +491,13 @@ typename Periodic_2_triangulation_hierarchy_2::Vertex_handle Periodic_2_triangulation_hierarchy_2:: move_point(Vertex_handle v, const Point &p) { - CGAL_triangulation_precondition(v != Vertex_handle()); + CGAL_precondition(v != Vertex_handle()); Vertex_handle old, ret; for (int l = 0; l < m_maxlevel; ++l) { Vertex_handle u = v->up(); - CGAL_triangulation_assertion(hierarchy[l]->is_valid()); + CGAL_assertion(hierarchy[l]->is_valid()); Vertex_handle w = hierarchy[l]->move_point(v, p); if (l == 0) { diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_iterators_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_iterators_2.h index 155918c8..9bc7fbef 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_iterators_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_iterators_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_iterators_2.h $ -// $Id: Periodic_2_triangulation_iterators_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_iterators_2.h $ +// $Id: include/CGAL/Periodic_2_triangulation_iterators_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Nico Kruithof @@ -14,13 +14,11 @@ #include - -#include +#include #include #include -namespace CGAL -{ +namespace CGAL { template < class T > class Periodic_2_triangulation_triangle_iterator_2 @@ -66,7 +64,7 @@ class Periodic_2_triangulation_triangle_iterator_2 { if (_it == T::UNIQUE || _it == T::UNIQUE_COVER_DOMAIN) { - while (pos != _t->faces_end() && !is_canonical() ) + while (pos != _t->faces_end() && !_t->is_canonical(pos) ) ++pos; } } @@ -88,14 +86,14 @@ class Periodic_2_triangulation_triangle_iterator_2 { ++pos; } - while (pos != _t->faces_end() && !is_canonical()); + while (pos != _t->faces_end() && !_t->is_canonical(pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: increment_domain(); break; default: - CGAL_triangulation_assertion(false); + CGAL_assertion(false); }; return *this; } @@ -112,7 +110,7 @@ class Periodic_2_triangulation_triangle_iterator_2 { --pos; } - while (pos != _t->faces_begin() && !is_canonical()); + while (pos != _t->faces_begin() && !_t->is_canonical(pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: @@ -138,7 +136,7 @@ class Periodic_2_triangulation_triangle_iterator_2 bool operator==(const Periodic_triangle_iterator& ti) const { // We are only allowed to compare iterators of the same type. - CGAL_triangulation_assertion(_it == ti._it); + CGAL_assertion(_it == ti._it); return _t == ti._t && pos == ti.pos && _off == ti._off; } @@ -172,43 +170,12 @@ class Periodic_2_triangulation_triangle_iterator_2 mutable Periodic_triangle periodic_triangle; // current triangle. private: - // check whether pos points onto a unique edge or not. - // If we are computing in 1-sheeted covering this should - // always be true. - bool is_canonical() - { - // fetch all offsets - Offset off0, off1, off2; - get_edge_offsets(off0, off1, off2); - - if (_t->number_of_sheets() != make_array(1, 1)) - { - // If there is one offset with entries larger than 1 then we are - // talking about a vertex that is too far away from the original - // domain to belong to a canonical triangle. - if (off0.x() > 1) return false; - if (off0.y() > 1) return false; - if (off1.x() > 1) return false; - if (off1.y() > 1) return false; - if (off2.x() > 1) return false; - if (off2.y() > 1) return false; - } - - // If there is one direction of space for which all offsets are - // non-zero then the edge is not canonical because we can - // take the copy closer towards the origin in that direction. - int offx = off0.x() & off1.x() & off2.x(); - int offy = off0.y() & off1.y() & off2.y(); - - return (offx == 0 && offy == 0); - } - // Artificial incrementation function that takes periodic // copies into account. void increment_domain() { int off = get_drawing_offsets(); - CGAL_triangulation_assertion(_off <= off); + CGAL_assertion(_off <= off); if (_off == off) { _off = 0; @@ -217,7 +184,7 @@ class Periodic_2_triangulation_triangle_iterator_2 ++pos; } while (_it == T::UNIQUE_COVER_DOMAIN - && pos != _t->faces_end() && !is_canonical()); + && pos != _t->faces_end() && !_t->is_canonical(pos)); } else { @@ -241,7 +208,7 @@ class Periodic_2_triangulation_triangle_iterator_2 { --pos; } - while (_it == T::UNIQUE_COVER_DOMAIN && !is_canonical()); + while (_it == T::UNIQUE_COVER_DOMAIN && !_t->is_canonical(pos)); _off = get_drawing_offsets(); } else @@ -256,25 +223,6 @@ class Periodic_2_triangulation_triangle_iterator_2 } } - // Get the canonicalized offsets of an edge. - // This works in any cover that is encoded in _t->combine_offsets - void get_edge_offsets(Offset &off0, Offset &off1, - Offset &off2) const - { - Offset face_off0 = _t->int_to_off(pos->offset(0)); - Offset face_off1 = _t->int_to_off(pos->offset(1)); - Offset face_off2 = _t->int_to_off(pos->offset(2)); - Offset diff_off((face_off0.x() == 1 - && face_off1.x() == 1 - && face_off2.x() == 1) ? -1 : 0, - (face_off0.y() == 1 - && face_off1.y() == 1 - && face_off2.y() == 1) ? -1 : 0); - off0 = _t->combine_offsets(_t->get_offset(pos, 0), diff_off); - off1 = _t->combine_offsets(_t->get_offset(pos, 1), diff_off); - off2 = _t->combine_offsets(_t->get_offset(pos, 2), diff_off); - } - // return an integer that encodes the translations which have to be // applied to the edge *pos int get_drawing_offsets() @@ -284,24 +232,24 @@ class Periodic_2_triangulation_triangle_iterator_2 // intersect the boundary of the periodic domain. In UNIQUE mode // this means that the offset with respect to drawing should // differ in some entries. Otherwise we consider the offsets - // internally stored inside the cell telling us that this cell + // internally stored inside the face telling us that this face // wraps around the domain. if (_it == T::UNIQUE_COVER_DOMAIN) - get_edge_offsets(off0, off1, off2); + _t->get_offsets(pos, off0, off1, off2); else { - CGAL_triangulation_assertion(_it == T::STORED_COVER_DOMAIN); + CGAL_assertion(_it == T::STORED_COVER_DOMAIN); off0 = _t->int_to_off(pos->offset(0)); off1 = _t->int_to_off(pos->offset(1)); off2 = _t->int_to_off(pos->offset(2)); } - CGAL_triangulation_assertion(off0.x() == 0 || off0.x() == 1); - CGAL_triangulation_assertion(off0.y() == 0 || off0.y() == 1); - CGAL_triangulation_assertion(off1.x() == 0 || off1.x() == 1); - CGAL_triangulation_assertion(off1.y() == 0 || off1.y() == 1); - CGAL_triangulation_assertion(off2.x() == 0 || off2.x() == 1); - CGAL_triangulation_assertion(off2.y() == 0 || off2.y() == 1); + CGAL_assertion(off0.x() == 0 || off0.x() == 1); + CGAL_assertion(off0.y() == 0 || off0.y() == 1); + CGAL_assertion(off1.x() == 0 || off1.x() == 1); + CGAL_assertion(off1.y() == 0 || off1.y() == 1); + CGAL_assertion(off2.x() == 0 || off2.x() == 1); + CGAL_assertion(off2.y() == 0 || off2.y() == 1); int offx = ( ((off0.x() == 0 && off1.x() == 0 && off2.x() == 0) @@ -317,9 +265,9 @@ class Periodic_2_triangulation_triangle_iterator_2 Periodic_triangle construct_periodic_triangle() const { - CGAL_triangulation_assertion(pos != typename T::Face_handle()); + CGAL_assertion(pos != typename T::Face_handle()); Offset off0, off1, off2; - get_edge_offsets(off0, off1, off2); + _t->get_offsets(pos, off0, off1, off2); Offset transl_off = Offset((((_off >> 1) & 1) == 1 ? -1 : 0), (((_off ) & 1) == 1 ? -1 : 0)); if (_it == T::STORED_COVER_DOMAIN) @@ -385,7 +333,7 @@ class Periodic_2_triangulation_segment_iterator_2 { if (_it == T::UNIQUE || _it == T::UNIQUE_COVER_DOMAIN) { - while (pos != _t->edges_end() && !is_canonical() ) + while (pos != _t->edges_end() && !_t->is_canonical(*pos) ) ++pos; } } @@ -407,14 +355,14 @@ class Periodic_2_triangulation_segment_iterator_2 { ++pos; } - while (pos != _t->edges_end() && !is_canonical()); + while (pos != _t->edges_end() && !_t->is_canonical(*pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: increment_domain(); break; default: - CGAL_triangulation_assertion(false); + CGAL_assertion(false); }; return *this; } @@ -431,7 +379,7 @@ class Periodic_2_triangulation_segment_iterator_2 { --pos; } - while (pos != _t->edges_begin() && !is_canonical()); + while (pos != _t->edges_begin() && !_t->is_canonical(*pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: @@ -457,7 +405,7 @@ class Periodic_2_triangulation_segment_iterator_2 bool operator==(const Periodic_segment_iterator& ti) const { // We are only allowed to compare iterators of the same type. - CGAL_triangulation_assertion(_it == ti._it); + CGAL_assertion(_it == ti._it); return _t == ti._t && pos == ti.pos && _off == ti._off; } @@ -490,41 +438,12 @@ class Periodic_2_triangulation_segment_iterator_2 mutable Periodic_segment periodic_segment; // current segment. private: - // check whether pos points onto a unique edge or not. - // If we are computing in 1-sheeted covering this should - // always be true. - bool is_canonical() - { - // fetch all offsets - Offset off0, off1; - get_edge_offsets(off0, off1); - - if (_t->number_of_sheets() != make_array(1, 1)) - { - // If there is one offset with entries larger than 1 then we are - // talking about a vertex that is too far away from the original - // domain to belong to a canonical triangle. - if (off0.x() > 1) return false; - if (off0.y() > 1) return false; - if (off1.x() > 1) return false; - if (off1.y() > 1) return false; - } - - // If there is one direction of space for which all offsets are - // non-zero then the edge is not canonical because we can - // take the copy closer towards the origin in that direction. - int offx = off0.x() & off1.x(); - int offy = off0.y() & off1.y(); - - return (offx == 0 && offy == 0); - } - // Artificial incrementation function that takes periodic // copies into account. void increment_domain() { int off = get_drawing_offsets(); - CGAL_triangulation_assertion(_off <= off); + CGAL_assertion(_off <= off); if (_off == off) { _off = 0; @@ -533,7 +452,7 @@ class Periodic_2_triangulation_segment_iterator_2 ++pos; } while (_it == T::UNIQUE_COVER_DOMAIN - && pos != _t->edges_end() && !is_canonical()); + && pos != _t->edges_end() && !_t->is_canonical(*pos)); } else { @@ -557,7 +476,7 @@ class Periodic_2_triangulation_segment_iterator_2 { --pos; } - while (_it == T::UNIQUE_COVER_DOMAIN && !is_canonical()); + while (_it == T::UNIQUE_COVER_DOMAIN && !_t->is_canonical(*pos)); _off = get_drawing_offsets(); } else @@ -572,20 +491,6 @@ class Periodic_2_triangulation_segment_iterator_2 } } - // Get the canonicalized offsets of an edge. - // This works in any cover that is encoded in _t->combine_offsets - void get_edge_offsets(Offset &off0, Offset &off1) const - { - Offset cell_off0 = _t->int_to_off(pos->first->offset(_t->cw(pos->second))); - Offset cell_off1 = _t->int_to_off(pos->first->offset(_t->ccw(pos->second))); - Offset diff_off((cell_off0.x() == 1 && cell_off1.x() == 1) ? -1 : 0, - (cell_off0.y() == 1 && cell_off1.y() == 1) ? -1 : 0); - off0 = _t->combine_offsets(_t->get_offset(pos->first, _t->cw(pos->second)), - diff_off); - off1 = _t->combine_offsets(_t->get_offset(pos->first, _t->ccw(pos->second)), - diff_off); - } - // return an integer that encodes the translations which have to be // applied to the edge *pos int get_drawing_offsets() @@ -595,20 +500,20 @@ class Periodic_2_triangulation_segment_iterator_2 // intersect the boundary of the periodic domain. In UNIQUE mode // this means that the offset with respect to drawing should // differ in some entries. Otherwise we consider the offsets - // internally stored inside the cell telling us that this cell + // internally stored inside the face telling us that this face // wraps around the domain. if (_it == T::UNIQUE_COVER_DOMAIN) - get_edge_offsets(off0, off1); + _t->get_offsets(*pos, off0, off1); else { - CGAL_triangulation_assertion(_it == T::STORED_COVER_DOMAIN); + CGAL_assertion(_it == T::STORED_COVER_DOMAIN); off0 = _t->int_to_off(pos->first->offset(_t->cw(pos->second))); off1 = _t->int_to_off(pos->first->offset(_t->ccw(pos->second))); } Offset diff_off = off0 - off1; - CGAL_triangulation_assertion(diff_off.x() >= -1 || diff_off.x() <= 1); - CGAL_triangulation_assertion(diff_off.y() >= -1 || diff_off.y() <= 1); + CGAL_assertion(diff_off.x() >= -1 || diff_off.x() <= 1); + CGAL_assertion(diff_off.y() >= -1 || diff_off.y() <= 1); return( 2 * (diff_off.x() == 0 ? 0 : 1) + (diff_off.y() == 0 ? 0 : 1)); @@ -616,9 +521,9 @@ class Periodic_2_triangulation_segment_iterator_2 Periodic_segment construct_periodic_segment() const { - CGAL_triangulation_assertion(pos->first != typename T::Face_handle()); + CGAL_assertion(pos->first != typename T::Face_handle()); Offset off0, off1; - get_edge_offsets(off0, off1); + _t->get_offsets(*pos, off0, off1); Offset transl_off = Offset((((_off >> 1) & 1) == 1 ? -1 : 0), (( _off & 1) == 1 ? -1 : 0)); if (_it == T::STORED_COVER_DOMAIN) @@ -681,7 +586,7 @@ class Periodic_2_triangulation_point_iterator_2 { if (_it == T::UNIQUE || _it == T::UNIQUE_COVER_DOMAIN) { - while (pos != _t->vertices_end() && !is_canonical() ) + while (pos != _t->vertices_end() && !_t->is_canonical(pos) ) ++pos; } } @@ -705,10 +610,10 @@ class Periodic_2_triangulation_point_iterator_2 { ++pos; } - while (pos != _t->vertices_end() && !is_canonical()); + while (pos != _t->vertices_end() && !_t->is_canonical(pos)); break; default: - CGAL_triangulation_assertion(false); + CGAL_assertion(false); }; return *this; } @@ -727,10 +632,10 @@ class Periodic_2_triangulation_point_iterator_2 { --pos; } - while (pos != _t->vertices_begin() && !is_canonical()); + while (pos != _t->vertices_begin() && !_t->is_canonical(pos)); break; default: - CGAL_triangulation_assertion(false); + CGAL_assertion(false); }; return *this; } @@ -752,7 +657,7 @@ class Periodic_2_triangulation_point_iterator_2 bool operator==(const Periodic_point_iterator& pi) const { // We are only allowed to compare iterators of the same type. - CGAL_triangulation_assertion(_it == pi._it); + CGAL_assertion(_it == pi._it); return _t == pi._t && pos == pi.pos; } @@ -785,39 +690,99 @@ class Periodic_2_triangulation_point_iterator_2 mutable Periodic_point periodic_point; // current point. private: - // check whether pos points onto a vertex inside the original - // domain. If we are computing in 1-sheeted covering this should - // always be true. - bool is_canonical() - { - return (_t->get_offset(pos).is_null()); - } - Periodic_point construct_periodic_point() const { - CGAL_triangulation_assertion(pos != typename T::Vertex_handle()); + CGAL_assertion(pos != typename T::Vertex_handle()); Offset off = _t->get_offset(pos); return std::make_pair(pos->point(), off); } }; -namespace Periodic_2_triangulation_2_internal -{ +namespace Periodic_2_triangulation_2_internal { + +// returns `true` if the simplex is not canonical, and has to be filtered out template class Domain_tester { - const T *t; + typedef typename T::Offset Offset; + + const T *t; + +public: + Domain_tester() {} + Domain_tester(const T *tr) : t(tr) {} + + bool operator()(const typename T::Vertex_iterator v) const + { + return !(t->get_offset(v).is_null()); + } + + bool operator()(const typename T::Edge_iterator e) const + { + Offset eo_0 = t->int_to_off(e->first->offset(t->cw(e->second))); + Offset eo_1 = t->int_to_off(e->first->offset(t->ccw(e->second))); - public: - Domain_tester() {} - Domain_tester(const T *tr) : t(tr) {} + Offset diff_off((eo_0.x() == 1 && eo_1.x() == 1) ? -1 : 0, + (eo_0.y() == 1 && eo_1.y() == 1) ? -1 : 0); + Offset off0 = t->combine_offsets(t->get_offset(e->first, t->cw(e->second)), diff_off); + Offset off1 = t->combine_offsets(t->get_offset(e->first, t->ccw(e->second)), diff_off); - bool operator()(const typename T::Vertex_iterator & v) const + if (t->number_of_sheets() != make_array(1, 1)) { - return (t->get_offset(v) != typename T::Offset(0, 0)); + // If there is one offset with entries larger than 1 then we are + // talking about a vertex that is too far away from the original + // domain to belong to a canonical edge. + if (off0.x() > 1) return true; + if (off0.y() > 1) return true; + if (off1.x() > 1) return true; + if (off1.y() > 1) return true; } + + // If there is one direction of space for which all offsets are + // non-zero then the edge is not canonical because we can + // take the copy closer towards the origin in that direction. + int offx = off0.x() & off1.x(); + int offy = off0.y() & off1.y(); + + return (offx != 0 || offy != 0); + } + + bool operator()(const typename T::Face_iterator f) const + { + Offset fo_0 = t->int_to_off(f->offset(0)); + Offset fo_1 = t->int_to_off(f->offset(1)); + Offset fo_2 = t->int_to_off(f->offset(2)); + + Offset diff_off((fo_0.x() == 1 && fo_1.x() == 1 && fo_2.x() == 1) ? -1 : 0, + (fo_0.y() == 1 && fo_1.y() == 1 && fo_2.y() == 1) ? -1 : 0); + Offset off0 = t->combine_offsets(t->get_offset(f, 0), diff_off); + Offset off1 = t->combine_offsets(t->get_offset(f, 1), diff_off); + Offset off2 = t->combine_offsets(t->get_offset(f, 2), diff_off); + + if (t->number_of_sheets() != make_array(1, 1)) + { + // If there is one offset with entries larger than 1 then we are + // talking about a vertex that is too far away from the original + // domain to belong to a canonical triangle. + if (off0.x() > 1) return true; + if (off0.y() > 1) return true; + if (off1.x() > 1) return true; + if (off1.y() > 1) return true; + if (off2.x() > 1) return true; + if (off2.y() > 1) return true; + } + + // If there is one direction of space for which all offsets are + // non-zero then the edge is not canonical because we can + // take the copy closer towards the origin in that direction. + int offx = off0.x() & off1.x() & off2.x(); + int offy = off0.y() & off1.y() & off2.y(); + + return (offx != 0 || offy != 0); + } }; -} + +} // Periodic_2_triangulation_2_internal // Iterates over the vertices in a periodic triangulation that are // located inside the original cube. @@ -830,7 +795,6 @@ template class Periodic_2_triangulation_unique_vertex_iterator_2 : public Filter_iterator > { - typedef typename T::Vertex_handle Vertex_handle; typedef typename T::Vertex_iterator Vertex_iterator; @@ -838,8 +802,8 @@ class Periodic_2_triangulation_unique_vertex_iterator_2 typedef Filter_iterator Base; typedef Periodic_2_triangulation_unique_vertex_iterator_2 Self; -public: +public: Periodic_2_triangulation_unique_vertex_iterator_2() : Base() {} Periodic_2_triangulation_unique_vertex_iterator_2(const Base &b) : Base(b) {} @@ -872,6 +836,108 @@ class Periodic_2_triangulation_unique_vertex_iterator_2 } }; -} //namespace CGAL +// Iterates over the canonical edges in a periodic triangulation. +// Derives from Filter_iterator in order to add a conversion to handle +// +// Comments: +// When computing in 1-sheeted covering, there will be no difference +// between a normal Edge_iterator and this iterator +template +class Periodic_2_triangulation_unique_edge_iterator_2 + : public Filter_iterator > +{ + typedef typename T::Edge Edge; + typedef typename T::Edge_iterator Edge_iterator; + + typedef typename Periodic_2_triangulation_2_internal::Domain_tester Tester; + + typedef Filter_iterator Base; + typedef Periodic_2_triangulation_unique_edge_iterator_2 Self; + +public: + Periodic_2_triangulation_unique_edge_iterator_2() : Base() {} + Periodic_2_triangulation_unique_edge_iterator_2(const Base &b) : Base(b) {} + + Self & operator++() + { + Base::operator++(); + return *this; + } + Self & operator--() + { + Base::operator--(); + return *this; + } + Self operator++(int) + { + Self tmp(*this); + ++(*this); + return tmp; + } + Self operator--(int) + { + Self tmp(*this); + --(*this); + return tmp; + } + + operator Edge() const + { + return Base::base(); + } +}; + +// Iterates over the canonical faces in a periodic triangulation. +// Derives from Filter_iterator in order to add a conversion to handle +// +// Comments: +// When computing in 1-sheeted covering, there will be no difference +// between a normal Face_iterator and this iterator +template +class Periodic_2_triangulation_unique_face_iterator_2 + : public Filter_iterator > +{ + typedef typename T::Face_handle Face_handle; + typedef typename T::Face_iterator Face_iterator; + + typedef typename Periodic_2_triangulation_2_internal::Domain_tester Tester; + + typedef Filter_iterator Base; + typedef Periodic_2_triangulation_unique_face_iterator_2 Self; + +public: + Periodic_2_triangulation_unique_face_iterator_2() : Base() {} + Periodic_2_triangulation_unique_face_iterator_2(const Base &b) : Base(b) {} + + Self & operator++() + { + Base::operator++(); + return *this; + } + Self & operator--() + { + Base::operator--(); + return *this; + } + Self operator++(int) + { + Self tmp(*this); + ++(*this); + return tmp; + } + Self operator--(int) + { + Self tmp(*this); + --(*this); + return tmp; + } + + operator Face_handle() const + { + return Base::base(); + } +}; + +} // namespace CGAL #endif // CGAL_PERIODIC_2_TRIANGULATION_ITERATORS_2_H diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_traits_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_traits_2.h index bb837ef6..65783945 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_traits_2.h $ -// $Id: Periodic_2_triangulation_traits_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_traits_2.h $ +// $Id: include/CGAL/Periodic_2_triangulation_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Nico Kruithof , @@ -20,7 +20,6 @@ #include #include -#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_vertex_base_2.h index 374721f4..2cf01ef9 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_2_triangulation_vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_vertex_base_2.h $ -// $Id: Periodic_2_triangulation_vertex_base_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_vertex_base_2.h $ +// $Id: include/CGAL/Periodic_2_triangulation_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_Delaunay_triangulation_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_Delaunay_triangulation_3.h index eb0ca52c..262d2a39 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_Delaunay_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_Delaunay_triangulation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_Delaunay_triangulation_3.h $ -// $Id: Periodic_3_Delaunay_triangulation_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_Delaunay_triangulation_3.h $ +// $Id: include/CGAL/Periodic_3_Delaunay_triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -239,8 +239,8 @@ class Periodic_3_Delaunay_triangulation_3 : if(!is_1_cover()) compute_too_long_edges(); - CGAL_triangulation_expensive_postcondition(*this == tr); - CGAL_triangulation_expensive_postcondition(is_valid()); + CGAL_expensive_postcondition(*this == tr); + CGAL_expensive_postcondition(is_valid()); } Periodic_3_Delaunay_triangulation_3 operator=(Periodic_3_Delaunay_triangulation_3 tr) @@ -304,9 +304,9 @@ class Periodic_3_Delaunay_triangulation_3 : Vertex_handle v_no = eit->first->vertex(i); if(squared_distance(p1,p2) > edge_length_threshold) { - CGAL_triangulation_assertion(find(too_long_edges[v_no].begin(), - too_long_edges[v_no].end(), - edge_to_add.second) == too_long_edges[v_no].end()); + CGAL_assertion(find(too_long_edges[v_no].begin(), + too_long_edges[v_no].end(), + edge_to_add.second) == too_long_edges[v_no].end()); too_long_edges[v_no].push_back(edge_to_add.second); ++too_long_edge_counter; } @@ -316,8 +316,8 @@ class Periodic_3_Delaunay_triangulation_3 : void create_initial_triangulation() { // create the base for too_long_edges; - CGAL_triangulation_assertion( too_long_edges.empty() ); - CGAL_triangulation_assertion(too_long_edge_counter == 0); + CGAL_assertion( too_long_edges.empty() ); + CGAL_assertion(too_long_edge_counter == 0); for(Vertex_iterator vit = vertices_begin(); vit !=vertices_end(); ++vit ) too_long_edges[vit] = std::list();; @@ -374,7 +374,7 @@ class Periodic_3_Delaunay_triangulation_3 : template void insert_too_long_edges(Vertex_handle v, const CellIt begin, const CellIt end) { - CGAL_triangulation_precondition(number_of_vertices() != 0); + CGAL_precondition(number_of_vertices() != 0); // add newly added edges to too_long_edges, if necessary. Point p1,p2; std::pair< Vertex_handle, Vertex_handle > edge_to_add; @@ -389,7 +389,7 @@ class Periodic_3_Delaunay_triangulation_3 : if(&*((*it)->vertex(j)) > &*((*it)->vertex(k))) continue; // make the offsets canonical (wrt. to some notion) // add to too_long_edges, if not yet added and if "too long" - CGAL_triangulation_precondition( + CGAL_precondition( &*((*it)->vertex(j))< &*((*it)->vertex(k))); edge_to_add = std::make_pair((*it)->vertex(j), (*it)->vertex(k)); @@ -665,29 +665,6 @@ class Periodic_3_Delaunay_triangulation_3 : } public: - /** @name Geometric access functions */ - - Point point(const Periodic_point& pp) const - { - return point(pp, geom_traits().construct_point_3_object()); - } - - // The following functions return the "real" position in space (unrestrained - // to the fundamental domain) of the vertices v and c->vertex(idx), - // respectively - - Point point(Vertex_handle v) const - { - return point(v, geom_traits().construct_point_3_object()); - } - - Point point(Cell_handle c, int idx) const - { - return point(c, idx, geom_traits().construct_point_3_object()); - } - - // end of geometric functions - Periodic_point periodic_circumcenter(Cell_handle c) const { return Base::periodic_circumcenter(c, geom_traits().construct_circumcenter_3_object()); } @@ -906,7 +883,7 @@ typename Periodic_3_Delaunay_triangulation_3::Vertex_handle Periodic_3_Delaunay_triangulation_3::nearest_vertex_in_cell( const Cell_handle& c, const Point& p, const Offset& o) const { - CGAL_triangulation_precondition(number_of_vertices() != 0); + CGAL_precondition(number_of_vertices() != 0); Vertex_handle nearest = c->vertex(0); for(int i=1; i<4; i++) { nearest = (compare_distance(p,nearest->point(),c->vertex(i)->point(), @@ -925,18 +902,9 @@ typename Periodic_3_Delaunay_triangulation_3::Vertex_handle Periodic_3_Delaunay_triangulation_3:: move_point(Vertex_handle v, const Point& p) { - CGAL_triangulation_expensive_precondition(is_vertex(v)); - // Remember an incident vertex to restart - // the point location after the removal. - // Cell_handle c = v->cell(); - //Vertex_handle old_neighbor = c->vertex(c->index(v) == 0 ? 1 : 0); - // CGAL_triangulation_assertion(old_neighbor != v); - + CGAL_expensive_precondition(is_vertex(v)); remove(v); - - if(number_of_vertices() == 0) - return insert(p); - return insert(p);//, old_neighbor->cell()); + return insert(p); } template < class Gt, class Tds > @@ -953,7 +921,7 @@ void Periodic_3_Delaunay_triangulation_3::remove(Vertex_handle v) Cover_manager cover_manager(*this); Base::remove(v, remover, ct, cover_manager); - CGAL_triangulation_expensive_assertion(is_valid()); + CGAL_expensive_assertion(is_valid()); } // Undocumented function that tries to remove 'v' but only does so if removal @@ -964,7 +932,7 @@ bool Periodic_3_Delaunay_triangulation_3:: remove_if_no_cover_change(Vertex_handle v) { - CGAL_triangulation_precondition(this->is_1_cover()); + CGAL_precondition(this->is_1_cover()); // Since we are in a 1-sheet configuration, we can call directly periodic_remove() // and don't need the conflict tester. The rest is copied from above. @@ -985,8 +953,8 @@ remove_if_no_cover_change(Vertex_handle v) return false; // removing would cause a cover change } - CGAL_triangulation_expensive_postcondition(is_valid()); - CGAL_triangulation_postcondition(this->is_1_cover()); + CGAL_expensive_postcondition(is_valid()); + CGAL_postcondition(this->is_1_cover()); return true; // successfully removed the vertex } @@ -999,7 +967,7 @@ Periodic_3_Delaunay_triangulation_3::find_conflicts( const Point& p, Cell_handle c, OutputIteratorBoundaryFacets bfit, OutputIteratorCells cit, OutputIteratorInternalFacets ifit) const { - CGAL_triangulation_precondition(number_of_vertices() != 0); + CGAL_precondition(number_of_vertices() != 0); std::vector facets; facets.reserve(64); @@ -1097,7 +1065,7 @@ _side_of_sphere(const Cell_handle& c, const Point& q, // 2 iterations are enough (cf paper) for(int i=4; i>2; --i) { if(points[i] == &pts[4]) { - CGAL_triangulation_assertion(orientation(p0, p1, p2, p3, o0, o1, o2, o3) + CGAL_assertion(orientation(p0, p1, p2, p3, o0, o1, o2, o3) == POSITIVE); // since p0 p1 p2 p3 are non coplanar and positively oriented return ON_UNBOUNDED_SIDE; @@ -1121,7 +1089,7 @@ _side_of_sphere(const Cell_handle& c, const Point& q, } } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return ON_UNBOUNDED_SIDE; } @@ -1129,7 +1097,7 @@ template < class Gt, class Tds > bool Periodic_3_Delaunay_triangulation_3:: is_Gabriel(const Cell_handle c, int i) const { - CGAL_triangulation_precondition(number_of_vertices() != 0); + CGAL_precondition(number_of_vertices() != 0); typename Geom_traits::Side_of_bounded_sphere_3 side_of_bounded_sphere = geom_traits().side_of_bounded_sphere_3_object(); @@ -1300,7 +1268,7 @@ class Periodic_3_Delaunay_triangulation_3::Conflict_tester bool test_initial_cell(Cell_handle c, const Offset &off) const { if(!(operator()(c, off))) - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return true; } @@ -1339,11 +1307,11 @@ class Periodic_3_Delaunay_triangulation_3::Point_hider inline void hide_point(Cell_handle, const Point &) { } inline void hide(Point &, Cell_handle ) const { - CGAL_triangulation_assertion(false); + CGAL_assertion(false); } inline void do_hide(const Point &, Cell_handle ) const { - CGAL_triangulation_assertion(false); + CGAL_assertion(false); } template < class Tester > inline bool replace_vertex(const Point &, Vertex_handle , @@ -1463,7 +1431,7 @@ operator>> (std::istream& is, Periodic_3_Delaunay_triangulation_3 &tr) tr.compute_too_long_edges(); - CGAL_triangulation_expensive_assertion( tr.is_valid() ); + CGAL_expensive_assertion( tr.is_valid() ); return is; } diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h index abd72712..cc59237a 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h $ -// $Id: Periodic_3_Delaunay_triangulation_traits_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h $ +// $Id: include/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_function_wrapper.h b/thirdparty/CGAL/include/CGAL/Periodic_3_function_wrapper.h index ff42fa7c..a7c47a62 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_function_wrapper.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_function_wrapper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_mesh_3/include/CGAL/Periodic_3_function_wrapper.h $ -// $Id: Periodic_3_function_wrapper.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_mesh_3/include/CGAL/Periodic_3_function_wrapper.h $ +// $Id: include/CGAL/Periodic_3_function_wrapper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -18,7 +18,6 @@ #include #include -#include namespace CGAL { @@ -46,9 +45,9 @@ class Periodic_3_function_wrapper } private: - typedef typename boost::mpl::if_, - Function_*, - Function_>::type Stored_function; + typedef std::conditional_t, + Function_*, + Function_> Stored_function; /// Function to wrap Stored_function f_; diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_3/IO/File_medit.h b/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_3/IO/File_medit.h index 4a03f459..5c7ff553 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_3/IO/File_medit.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_3/IO/File_medit.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/IO/File_medit.h $ -// $Id: File_medit.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/IO/File_medit.h $ +// $Id: include/CGAL/Periodic_3_mesh_3/IO/File_medit.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mikhail Bogdanov @@ -89,9 +89,14 @@ void output_to_medit(std::ostream& os, const Vertex_index_property_map& vertex_pmap, const Facet_index_property_map& facet_pmap, const Cell_index_property_map& cell_pmap, - const Facet_index_property_map_twice& facet_twice_pmap = Facet_index_property_map_twice(), - const bool print_each_facet_twice = false) + const Facet_index_property_map_twice& = Facet_index_property_map_twice()) { +#ifdef CGAL_MESH_3_IO_VERBOSE + std::cout << "Output to medit;\n" + << "\toccurrences = " << occurrence_count << "\n" + << "\tdistinguish_copies = " << distinguish_copies << std::endl; +#endif + // if occurrence_count equals: // "1" --> only draws a single instance of the domain. // "2" --> draws 2 occurrences of the domain, displaying an additional domain @@ -110,11 +115,10 @@ void output_to_medit(std::ostream& os, typedef typename Tr::Weighted_point Weighted_point; typedef typename C3T3::Vertex_handle Vertex_handle; + typedef typename C3T3::Facet Facet; typedef typename C3T3::Cell_handle Cell_handle; typedef typename Tr::Vertex_iterator Vertex_iterator; - typedef typename C3T3::Facet_iterator Facet_iterator; - typedef typename C3T3::Cell_iterator Cell_iterator; typedef typename Tr::Offset Offset; @@ -126,21 +130,21 @@ void output_to_medit(std::ostream& os, int Oz_rn = 1 + (((occurrence_count - 1) >> 2) & 1); int number_of_vertices = static_cast(tr.number_of_vertices()); - int number_of_facets = static_cast(c3t3.number_of_facets()); - int number_of_cells = static_cast(c3t3.number_of_cells()); + int number_of_facets = static_cast(c3t3.number_of_facets_in_complex()); + int number_of_cells = static_cast(c3t3.number_of_cells_in_complex()); // Hardcoded values can be passed here to force more copies // Ox_rn = 20; Oy_rn = 20; Oz_rn = 1; int occ_mult = Ox_rn * Oy_rn * Oz_rn; -#ifdef CGAL_PERIODIC_3_MESH_3_VERBOSE - std::cerr << "Outputting mesh to medit... " << std::endl; - std::cerr << "occurrences over each axis: " +#ifdef CGAL_MESH_3_IO_VERBOSE + std::cout << "Outputting mesh to medit... " << std::endl; + std::cout << "occurrences over each axis: " << Ox_rn << " " << Oy_rn << " " << Oz_rn << std::endl; - std::cerr << number_of_vertices << " vertices" << std::endl; - std::cerr << number_of_facets << " facets" << std::endl; - std::cerr << number_of_cells << " cells" << std::endl; + std::cout << number_of_vertices << " vertices" << std::endl; + std::cout << number_of_facets << " facets" << std::endl; + std::cout << number_of_cells << " cells" << std::endl; #endif os << std::setprecision(17); @@ -155,7 +159,7 @@ void output_to_medit(std::ostream& os, // On each axis, we repeat n+1 times the point, where 'n' is the number of // instances of the mesh that will be printed over that axis. This is because - // a cell 'c' might have point(c,i) that is equal to v with an offset 2 + // a cell 'c' might have point(c,i) that lives in the +1 (in x, y, or z) offset boost::unordered_map V; int inum = 1; // '1' because medit ids start at 1 @@ -194,65 +198,45 @@ void output_to_medit(std::ostream& os, } } - int medit_number_of_triangles = occ_mult * number_of_facets; - if(print_each_facet_twice) - medit_number_of_triangles *= 2; + int medit_number_of_triangles = 2 * occ_mult * number_of_facets; os << "Triangles\n" << medit_number_of_triangles << std::endl; - for(int i=0; isecond) - continue; + const Offset off(k, j, i); - Cell_handle c = fit->first; - Vertex_handle v = c->vertex(l); - const Offset combined_off = tr.combine_offsets( - off, tr.int_to_off(c->offset(l))); - const int vector_offset = combined_off.x() + - combined_off.y() * (Ox_rn + 1) + - combined_off.z() * (Ox_rn + 1) * (Oy_rn + 1); - const int id = vector_offset * number_of_vertices + V[v]; - CGAL_assertion(1 <= id && id <= medit_number_of_vertices); - os << id << " "; - } - - // For multiple copies, color to distinguish copies rather than to distinguish subdomains - if(!distinguish_copies || occ_mult == 1) - os << get(facet_pmap, *fit) << '\n'; - else - os << 1 + k + 3*j + 9*i << '\n'; - - // Print triangle again if needed - if(print_each_facet_twice) - { - for(int l=0; l<4; ++l) + for(int vi=1; vi<4; ++vi) // vertices of the facet in complex { - if(l == fit->second) - continue; - - Cell_handle c = fit->first; - Vertex_handle v = c->vertex(l); - const Offset combined_off = tr.combine_offsets( - off, tr.int_to_off(c->offset(l))); + const int pos = (s+vi) % 4; + const Offset combined_off = tr.combine_offsets(off, tr.int_to_off(c->offset(pos))); const int vector_offset = combined_off.x() + combined_off.y() * (Ox_rn + 1) + combined_off.z() * (Ox_rn + 1) * (Oy_rn + 1); + + const Vertex_handle v = c->vertex(pos); const int id = vector_offset * number_of_vertices + V[v]; + CGAL_assertion(1 <= id && id <= medit_number_of_vertices); os << id << " "; } + // For multiple copies, color to distinguish copies rather than to distinguish subdomains if(!distinguish_copies || occ_mult == 1) - os << get(facet_twice_pmap, *fit) << '\n'; + os << get(facet_pmap, Facet(c, s)) << '\n'; else os << 1 + k + 3*j + 9*i << '\n'; } @@ -269,12 +253,12 @@ void output_to_medit(std::ostream& os, for(int k=0; koffset(l))); + const Offset combined_off = tr.combine_offsets(off, tr.int_to_off(cit->offset(l))); const int vector_offset = combined_off.x() + combined_off.y() * (Ox_rn + 1) + combined_off.z() * (Ox_rn + 1) * (Oy_rn + 1); @@ -297,18 +281,21 @@ void output_to_medit(std::ostream& os, os << "End" << std::endl; } -template +template void output_to_medit(std::ostream& os, const C3T3& c3t3, const int occurrence_count, const bool distinguish_copies) { #ifdef CGAL_MESH_3_IO_VERBOSE - std::cerr << "Output to medit:\n"; + std::cout << "Output to medit:\n"; #endif + CGAL_precondition(c3t3.triangulation().is_1_cover()); - typedef CGAL::Mesh_3::Medit_pmap_generator Generator; + // periodic meshes always print facets twice because the facet in complex + // might be on the boundary of the domain + typedef CGAL::SMDS_3::Medit_pmap_generator Generator; typedef typename Generator::Cell_pmap Cell_pmap; typedef typename Generator::Facet_pmap Facet_pmap; typedef typename Generator::Facet_pmap_twice Facet_pmap_twice; @@ -320,11 +307,10 @@ void output_to_medit(std::ostream& os, Vertex_pmap vertex_pmap(c3t3, cell_pmap, facet_pmap); Periodic_3_mesh_3::output_to_medit(os, c3t3, occurrence_count, distinguish_copies, - vertex_pmap, facet_pmap, cell_pmap, facet_pmap_twice, - Generator().print_twice()); + vertex_pmap, facet_pmap, cell_pmap, facet_pmap_twice); #ifdef CGAL_MESH_3_IO_VERBOSE - std::cerr << "done.\n"; + std::cout << "done.\n"; #endif } @@ -341,32 +327,19 @@ namespace IO { * \param distinguish_copies if set to `true`, each copy is assigned a unique color. * Otherwise, all domains are drawn with subdomain index-based colors. * \param rebind if set to `true`, labels of cells are rebinded into [1..nb_of_labels] - * \param show_patches if set to `true`, patches are labeled with different labels than - * cells. If `false`, each surface facet is written twice, using label of - * each adjacent cell. */ template void output_periodic_mesh_to_medit(std::ostream& os, const C3T3& c3t3, const int occurrence_count = 8, const bool distinguish_copies = true, - bool rebind = false, - bool show_patches = false) + const bool rebind = false, + const bool /*show_patches*/ = false) // for backward compatibility { if(rebind) - { - if(show_patches) - Periodic_3_mesh_3::output_to_medit(os, c3t3, occurrence_count, distinguish_copies); - else - Periodic_3_mesh_3::output_to_medit(os, c3t3, occurrence_count, distinguish_copies); - } + Periodic_3_mesh_3::output_to_medit(os, c3t3, occurrence_count, distinguish_copies); else - { - if(show_patches) - Periodic_3_mesh_3::output_to_medit(os, c3t3, occurrence_count, distinguish_copies); - else - Periodic_3_mesh_3::output_to_medit(os, c3t3, occurrence_count, distinguish_copies); - } + Periodic_3_mesh_3::output_to_medit(os, c3t3, occurrence_count, distinguish_copies); } } // namespace IO diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h b/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h index e4ce7561..01b5b736 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h @@ -4,16 +4,12 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h $ -// $Id: Protect_edges_sizing_field.h a93dda8 2021-09-10T17:43:47+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h $ +// $Id: include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Stephane Tayeb, Laurent Rineau, Mael Rouxel-Labbé // -//****************************************************************************** -// File Description : -//****************************************************************************** - #ifndef CGAL_PERIODIC_3_MESH_3_PROTECT_EDGES_SIZING_FIELD_H #define CGAL_PERIODIC_3_MESH_3_PROTECT_EDGES_SIZING_FIELD_H @@ -31,13 +27,16 @@ #include -#include +#include #ifdef CGAL_MESH_3_DUMP_FEATURES_PROTECTION_ITERATIONS #include #endif #include -#include +#include #include +#if CGAL_MESH_3_PROTECTION_DEBUG +# include +#endif #include #include @@ -53,7 +52,7 @@ #ifndef CGAL_NO_ASSERTIONS # include // for float_prior #endif -#include +#include #include #include #include @@ -75,7 +74,7 @@ namespace Periodic_3_mesh_3 { template class Protect_edges_sizing_field - : public CGAL::Mesh_3::internal::Debug_messages_tools + : public CGAL::SMDS_3::internal::Debug_messages_tools { typedef Protect_edges_sizing_field Self; @@ -203,8 +202,8 @@ class Protect_edges_sizing_field Vertex_handle get_vertex_corner_from_point(const Bare_point& p, const Index& p_index) const; - /// Insert point(p,w) into the triangulation and set its dimension to \c dim - /// and its index to \c index. + /// Insert point(p,w) into the triangulation and set its dimension to `dim` + /// and its index to `index`. /// The handle of the newly created vertex is returned. template Vertex_handle insert_point(const Bare_point& p, @@ -215,8 +214,8 @@ class Protect_edges_sizing_field const bool special_ball); /** - * Insert point(p,w) into the triangulation and set its dimension to \c dim and - * its index to \c index. + * Insert point(p,w) into the triangulation and set its dimension to `dim` and + * its index to `index`. * The handle of the newly created vertex is returned. * * This function also ensures that `point(p,w)` will not be inside a @@ -233,11 +232,11 @@ class Protect_edges_sizing_field const Curve_index_container& curve_indices, ErasedVeOutIt out); - /// Insert balls between the points identified by the handles \c vp and \c vq - /// on the curve identified by \c curve_index. + /// Insert balls between the points identified by the handles `vp` and `vq` + /// on the curve identified by `curve_index`. /// - /// \param orientation Orientation of the curve segment between \c vp and - /// \c vq, given the orientation of the curve of index \c curve_index + /// \param orientation Orientation of the curve segment between `vp` and + /// `vq`, given the orientation of the curve of index `curve_index` template ErasedVeOutIt insert_balls(const Vertex_handle& vp, const Vertex_handle& vq, @@ -260,25 +259,25 @@ class Protect_edges_sizing_field const Curve_index& curve_index, ErasedVeOutIt out); - /// Return `true` if the balls of \c va and \c vb intersect, and (va,vb) is not + /// Return `true` if the balls of `va` and `vb` intersect, and `(va,vb)` is not /// an edge of the complex. bool non_adjacent_but_intersect(const Vertex_handle& va, const Vertex_handle& vb) const; - /// Return `true` if the balls of \c va and \c vb intersect. + /// Return `true` if the balls of `va` and `vb` intersect. bool do_balls_intersect(const Vertex_handle& va, const Vertex_handle& vb) const; - /// Change the size of the ball of the vertex \c v. + /// Change the size of the ball of the vertex `v`. bool change_ball_size(Vertex_handle& v, const FT squared_size, const bool special_ball = false); /// Return `true` if balls of v1 and v2 intersect "enough". - /// \param orientation Orientation of the curve segment between \c v1 and - /// \c v2, given the orientation of the curve of index - /// \c curve_index + /// \param orientation Orientation of the curve segment between `v1` and + /// `v2`, given the orientation of the curve of index + /// `curve_index` /// \pre `c3t3.curve_index(v1, v2) == curve_index` bool is_sampling_dense_enough(const Vertex_handle& v1, const Vertex_handle& v2, @@ -289,17 +288,17 @@ class Protect_edges_sizing_field /// of those vertices is ok. If not, fix it. void check_and_repopulate_edges(); - /// Check if the vertex \c v is well sampled, and if its not the case, fix it. + /// Check if the vertex `v` is well sampled, and if its not the case, fix it. /// Fill `out` with deleted vertices during this process. The value type of `out` /// is `Vertex_handle`. template ErasedVeOutIt check_and_fix_vertex_along_edge(const Vertex_handle& v, ErasedVeOutIt out); - /// Given two vertices \c start and \c next inserted on the curve with - /// index \c curve_index, return `CGAL::POSITIVE` if the curve arc from - /// \c start to \c next is oriented in the same orientation as the curve - /// segment with index \c curve_index, or `CGAL::NEGATIVE` otherwise. + /// Given two vertices `start` and `next inserted` on the curve with + /// index `curve_index`, return `CGAL::POSITIVE` if the curve arc from + /// `start` to `next` is oriented in the same orientation as the curve + /// segment with index `curve_index`, or `CGAL::NEGATIVE` otherwise. /// /// \pre `c3t3.curve_index(v1, v2) == curve_index` CGAL::Orientation @@ -307,13 +306,13 @@ class Protect_edges_sizing_field const Vertex_handle& next, Curve_index curve_index) const; - /// Walk along the edge from \c start, following the direction \c start to - /// \c next, and fills \c out with the vertices which do not fulfill + /// Walk along the edge from `start`, following the direction `start` to + /// `next`, and fills `out` with the vertices which do not fulfill /// the sampling conditions. /// - /// \param orientation Orientation of the curve segment between \c v1 and - /// \c v2, given the orientation of the curve of index - /// \c curve_index + /// \param orientation Orientation of the curve segment between `v1` and + /// `v2`, given the orientation of the curve of index + /// `curve_index` /// /// \pre `c3t3.curve_index(v1, v2) == curve_index` template @@ -324,8 +323,8 @@ class Protect_edges_sizing_field const CGAL::Orientation orientation, ErasedVeOutIt out) const; - /// Return the next vertex along edge, i.e the vertex after \c start, following - /// the direction from \c previous to \c start. + /// Return the next vertex along edge, i.e the vertex after `start`, following + /// the direction from `previous` to `start`. /// \pre (previous,start) is in c3t3 /// \pre `c3t3.curve_index(start, previous) == curve_index` Vertex_handle @@ -334,12 +333,12 @@ class Protect_edges_sizing_field const Curve_index& curve_index) const; /// Replace the vertices between ]begin,last[ with new vertices, along the curve - /// identified by \c curve_index. + /// identified by `curve_index`. /// The value type of `InputIterator` is `Vertex_handle`. /// - /// \param orientation Orientation of the curve segment between \c begin and - /// \c last, given the orientation of the curve of index - /// \c curve_index + /// \param orientation Orientation of the curve segment between `begin` and + /// `last`, given the orientation of the curve of index + /// `curve_index` /// template ErasedVeOutIt repopulate(InputIterator begin, @@ -355,33 +354,33 @@ class Protect_edges_sizing_field const CGAL::Orientation orientation, ErasedVeOutIt out); - /// Check if the size of \c v2 is compatible (i.e. greater) with the linear - /// interpolation of the sizes of \c v1 and \c v3. + /// Check if the size of `v2` is compatible (i.e. greater) with the linear + /// interpolation of the sizes of `v1` and `v3`. bool is_sizing_field_correct(const Vertex_handle& v1, const Vertex_handle& v2, const Vertex_handle& v3, const Curve_index& index, const CGAL::Orientation orientation) const; - /// Repopulate all incident curves around the corner \c v. - /// \pre \c v is a corner of c3t3 + /// Repopulate all incident curves around the corner `v`. + /// \pre `v` is a corner of c3t3 template ErasedVeOutIt repopulate_edges_around_corner(const Vertex_handle& v, ErasedVeOutIt out); - /// Return `true` if the edge with index \c curve_index is already treated. + /// Return `true` if the edge with index `curve_index` is already treated. bool is_treated(const Curve_index& curve_index) const { return (treated_edges_.find(curve_index) != treated_edges_.end()); } - /// Set the edge with index \c curve_index as treated. + /// Set the edge with index `curve_index` as treated. void set_treated(const Curve_index& curve_index) { treated_edges_.insert(curve_index); } - /// Compute the Euclidean distance between the bare points \c and \c q. + /// Compute the Euclidean distance between the bare points `p` and `q`. FT compute_distance(const Bare_point& p, const Bare_point& q) const { // No need to call min_squared_distance() because 'p' and 'q' have been @@ -398,7 +397,7 @@ class Protect_edges_sizing_field return compute_distance(pa, pb); } - /// Compute the Euclidean distance between the bare points of \c va and \c vb. + /// Compute the Euclidean distance between the bare points of `va` and `vb`. FT compute_distance(const Vertex_handle& va, const Vertex_handle& vb) const { typename Gt::Construct_point_3 cp = @@ -410,7 +409,7 @@ class Protect_edges_sizing_field return CGAL::sqrt(c3t3_.triangulation().min_squared_distance(cp(wpa), cp(wpb))); } - /// Return the radius of the ball of vertex \c v. + /// Return the radius of the ball of vertex `v`. FT get_radius(const Vertex_handle& v) const { typename Gt::Compute_weight_3 cw = @@ -463,7 +462,16 @@ class Protect_edges_sizing_field if(dim == 0) msg << "corner ("; else msg << "point ("; msg << p << ")"; +#if CGAL_MESH_3_PROTECTION_DEBUG & 4 + CGAL_error_msg(([this, str = msg.str()]() + { + CGAL_USE(this); + dump_c3t3(this->c3t3_, "dump-bug"); + return str.c_str(); + }())); +#else CGAL_error_msg(msg.str().c_str()); +#endif } return s; } @@ -556,7 +564,7 @@ Protect_edges_sizing_field:: operator()(const bool refine) { // This class is only meant to be used with periodic triangulations - CGAL_assertion((boost::is_same::value)); + CGAL_assertion((std::is_same::value)); #ifdef CGAL_MESH_3_VERBOSE std::cerr << "Inserting protection balls..." << std::endl @@ -980,7 +988,7 @@ dump_dummy_points(const std::string filename) const for(; vit!=vend; ++vit) { Index index = c3t3_.index(vit); - const int* i = boost::get(&index); + const int* i = std::get_if(&index); if(i && *i == 0) dummy_out << cp(c3t3_.triangulation().point(vit)) << std::endl; } @@ -994,7 +1002,7 @@ try_to_remove_dummy_vertex(const Vertex_handle dummy_vertex) const { // 'dummy_vertex' must correspond to a dummy point CGAL_precondition_code(Index index = c3t3_.index(dummy_vertex);) - CGAL_precondition_code(if(const int* i = boost::get(&index)) {) + CGAL_precondition_code(if(const int* i = std::get_if(&index)) {) CGAL_precondition(*i == 0); CGAL_precondition_code(}) @@ -1029,9 +1037,8 @@ get_maximum_weight(const Vertex_handle protection_vertex, const FT intended_weig if(max_possible_weight < minimal_weight_) max_possible_weight = minimal_weight_; - CGAL_assertion_code(const Weighted_point& pvwp = c3t3_.triangulation().point(protection_vertex);) - CGAL_assertion_code(const Bare_point& pvp = - c3t3_.triangulation().geom_traits().construct_point_3_object()(pvwp);) + CGAL_assertion_code(const Weighted_point pvwp = c3t3_.triangulation().point(protection_vertex);) + CGAL_assertion_code(const Bare_point pvp = c3t3_.triangulation().geom_traits().construct_point_3_object()(pvwp);) CGAL_assertion_code(const int dim = get_dimension(protection_vertex);) CGAL_assertion_code(const Index index = c3t3_.index(protection_vertex);) CGAL_assertion_code(const FT w_max = CGAL::square(query_size(pvp, dim, index));) @@ -1155,7 +1162,7 @@ try_to_remove_close_dummy_vertex(Vertex_handle& protection_vertex, protection_vertex, weight, is_special(protection_vertex), dummy_point)) { #if CGAL_MESH_3_PROTECTION_DEBUG & 4 - std::cerr << "Successfuly removed the dummy point and changed the vertex weight" << std::endl; + std::cerr << "Successfully removed the dummy point and changed the vertex weight" << std::endl; #endif return true; } @@ -1340,7 +1347,7 @@ try_to_solve_close_dummy_point(Vertex_handle& protection_vertex, { // dummy_vertex must be a dummy point CGAL_precondition_code(Index index = c3t3_.index(dummy_vertex);) - CGAL_precondition_code(if(const int* i = boost::get(&index)) {) + CGAL_precondition_code(if(const int* i = std::get_if(&index)) {) CGAL_precondition(*i == 0); CGAL_precondition_code(}) @@ -1608,7 +1615,7 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, Vertex_handle v = ch->vertex(li); Index existing_vertex_index = c3t3_.index(v); - const int* i = boost::get(&existing_vertex_index); + const int* i = std::get_if(&existing_vertex_index); if(i && *i == 0) { @@ -1657,7 +1664,7 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, } else { - // The corner has already been inserted and necessary adjustements to its weight + // The corner has already been inserted and necessary adjustments to its weight // have already been performed during its insertion and during the insertion // of other points. Only thing missing is to add it the correspondence map. insert_in_correspondence_map(v, p, curve_indices); @@ -1671,20 +1678,20 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, CGAL_assertion(nearest_vh != Vertex_handle()); CGAL_assertion(tr.point(nearest_vh) != cwp(tr.canonicalize_point(p))); -#if CGAL_MESH_3_PROTECTION_DEBUG & 2 +#if CGAL_MESH_3_PROTECTION_DEBUG & 16 std::cerr << "Nearest power vertex of (" << p << ") is " << &*nearest_vh << " (" << c3t3_.triangulation().point(nearest_vh) << ") " << "at distance: " << sq_d << std::endl; Index nearest_vh_index = c3t3_.index(nearest_vh); - int* i = boost::get(&nearest_vh_index); + int* i = std::get_if(&nearest_vh_index); if(i && *i == 0) std::cerr << "Nearest power vertex is a dummy point" << std::endl; #endif // This will never happen for a dummy point - while(cwsr(c3t3_.triangulation().point(nearest_vh), - sq_d) == CGAL::SMALLER && - ! is_special(nearest_vh)) + while(! is_special(nearest_vh) && + cwsr(c3t3_.triangulation().point(nearest_vh), - sq_d) == CGAL::SMALLER) { CGAL_assertion(minimal_size_ > 0 || sq_d > 0); @@ -1745,7 +1752,7 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, #ifdef CGAL_PERIODIC_PROTECTION_ATTEMPT_TO_REMOVE_DUMMY_PTS Index v_index = c3t3_.index(v); - const int* id = boost::get(&v_index); + const int* id = std::get_if(&v_index); bool is_v_dummy_vertex(id && *id == 0); #endif @@ -1792,7 +1799,7 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, << c3t3_.triangulation().point(nearest_vertex) << ")\n"; Index nearest_vertex_index = c3t3_.index(nearest_vertex); - i = boost::get(&nearest_vertex_index); + i = std::get_if(&nearest_vertex_index); if(i && *i == 0) std::cerr << "reduced due to dummy" << std::endl; #endif @@ -1884,7 +1891,7 @@ insert_balls_on_edges() Input_features input_features; domain_.get_curves(std::back_inserter(input_features)); - // Interate on edges + // Iterate on edges for(typename Input_features::iterator fit = input_features.begin(), end = input_features.end() ; fit != end ; ++fit) { @@ -2091,6 +2098,7 @@ insert_balls(const Vertex_handle& vp, // n = 2(d-sq) / (sp+sq) // ======================= + const FT d_signF = static_cast(d_sign); int n = static_cast(std::floor(FT(2)*(d-sq) / (sp+sq))+.5); // if(minimal_weight_ != 0 && n == 0) return; @@ -2113,10 +2121,8 @@ insert_balls(const Vertex_handle& vp, curve_index, d_sign) << ")\n"; #endif - const FT sgn = (d_sign == CGAL::POSITIVE) ? 1. - : (d_sign == CGAL::NEGATIVE ? -1. : 0.); const Bare_point new_point = - domain_.construct_point_on_curve(vpp, curve_index, sgn * d / 2); + domain_.construct_point_on_curve(vpp, curve_index, d_signF * d / 2); const int dim = 1; // new_point is on edge const Index index = domain_.index_from_curve_index(curve_index); const FT point_weight = CGAL::square(size_(new_point, dim, index)); @@ -2162,7 +2168,6 @@ insert_balls(const Vertex_handle& vp, FT norm_step_size = dleft_frac * step_size; // Initial distance - FT d_signF = static_cast(d_sign); FT pt_dist = d_signF * norm_step_size; Vertex_handle prev = vp; @@ -2189,8 +2194,18 @@ insert_balls(const Vertex_handle& vp, else { CGAL_assertion_code(using boost::math::float_prior); - CGAL_assertion(n==0 || - dleft_frac >= float_prior(float_prior(1.))); +#if CGAL_MESH_3_PROTECTION_DEBUG & 4 + CGAL_assertion_msg(n==0 || + dleft_frac >= float_prior(float_prior(1.)), + ([this]() + { + CGAL_USE(this); + dump_c3t3(this->c3t3_, "dump-bug"); + return "the sampling of protecting balls is not possible"; + }())); +#else + CGAL_assertion(n==0 || dleft_frac >= float_prior(float_prior(1.))); +#endif } // Launch balls @@ -2248,7 +2263,7 @@ void Protect_edges_sizing_field:: refine_balls() { -#if CGAL_MESH_3_PROTECTION_DEBUG & 4 +#if CGAL_MESH_3_PROTECTION_DEBUG & 8 dump_c3t3(c3t3_, "dump-before-refine_balls"); dump_c3t3_edges(c3t3_, "dump-before-refine_balls"); #endif @@ -2384,7 +2399,7 @@ refine_balls() } } -#if CGAL_MESH_3_PROTECTION_DEBUG & 4 +#if CGAL_MESH_3_PROTECTION_DEBUG & 8 dump_c3t3(c3t3_, "dump-before-check_and_repopulate_edges"); dump_c3t3_edges(c3t3_, "dump-before-check_and_repopulate_edges"); #endif @@ -2479,7 +2494,7 @@ change_ball_size(Vertex_handle& v, const FT squared_size, const bool special_bal const Bare_point p = cp(c3t3_.triangulation().point(v)); // intentional copy // Remove v from the set of corners - boost::optional corner_index = boost::make_optional(false, Corner_index()); + std::optional corner_index; if(c3t3_.is_in_complex(v)) { corner_index = c3t3_.corner_index(v); @@ -3126,7 +3141,7 @@ repopulate_edges_around_corner(const Vertex_handle& v, ErasedVeOutIt out) // `check_and_repopulate_edges()::vertices` before it is passed itself // to `repopulate_edges_around_corner()`. if(c3t3_.is_in_complex(to_repopulate.back())) - std::copy(to_repopulate.begin(), boost::prior(to_repopulate.end()), out); + std::copy(to_repopulate.begin(), std::prev(to_repopulate.end()), out); else std::copy(to_repopulate.begin(), to_repopulate.end(), out); diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_3/config.h b/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_3/config.h index 0792b784..5c788ff8 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_3/config.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_3/config.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/config.h $ -// $Id: config.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/config.h $ +// $Id: include/CGAL/Periodic_3_mesh_3/config.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Aymeric Pellé @@ -20,6 +20,10 @@ #define CGAL_MESH_3_VERBOSE #endif +#ifdef CGAL_MESH_3_CONFIG_H + #error "The header '' must be included before ''" +#endif + #include // Whether to remove dummy points or not during the protection of sharp features diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_triangulation_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_triangulation_3.h index a57da00f..3f5fea9e 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_mesh_triangulation_3.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_triangulation_3.h $ -// $Id: Periodic_3_mesh_triangulation_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_triangulation_3.h $ +// $Id: include/CGAL/Periodic_3_mesh_triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mikhail Bogdanov @@ -30,6 +30,7 @@ #include // vertex and cell bases +#include // to mark dummy vertices #include #include @@ -38,20 +39,21 @@ #include #include #include -#include +#include #include #include #include #include +#include #include #include namespace CGAL { -/// This class currently provides an interface between the classe +/// This class currently provides an interface between the class /// `CGAL::Periodic_3_regular_triangulation_3` and the mesher `Mesh_3`. -/// As periodic triangulations are parallelized, a lot of these functions will +/// If periodic triangulations are parallelized, a lot of these functions will /// become obsolete. template class Periodic_3_regular_triangulation_3_wrapper @@ -140,12 +142,18 @@ class Periodic_3_regular_triangulation_3_wrapper /// Concurrency related template - bool try_lock_cell(const Cell_handle &, int = 0) const { return true; } + bool try_lock_cell(const Cell_handle &, int = 0) const + { + std::cerr << "ERROR: P3M3 does not yet support parallel execution" << std::endl; + CGAL_assertion(false); + return true; + } bool try_lock_and_get_incident_cells(Vertex_handle /* v */, std::vector& /* cells */) const { - std::cerr << "ERROR: implement try_lock_and_get_incident_cells()"<< std::endl; + std::cerr << "ERROR: P3M3 does not yet support parallel execution" << std::endl; + CGAL_assertion(false); return true; } @@ -156,7 +164,7 @@ class Periodic_3_regular_triangulation_3_wrapper bool is_infinite(const Facet&) const { return false; } bool is_infinite(const Cell_handle) const { return false; } bool is_infinite(const Cell_handle, int) const { return false; } - bool is_infinite(const Cell_handle c, int i, int j) const; + bool is_infinite(const Cell_handle, int, int) const { return false; } Cell_handle infinite_cell() const { @@ -180,9 +188,6 @@ class Periodic_3_regular_triangulation_3_wrapper void set_domain(const Iso_cuboid& domain) { - CGAL_precondition_msg(domain.xmax() - domain.xmin() == domain.ymax() - domain.ymin() && - domain.xmax() - domain.xmin() == domain.zmax() - domain.zmin(), - "The fundamental domain must be a cube."); Base::set_domain(domain); } @@ -191,13 +196,19 @@ class Periodic_3_regular_triangulation_3_wrapper return P3T3::internal::robust_canonicalize_point(p, geom_traits()); } - // @todo it might be dangerous to call robust_canonicalize without also changing + // @fixme it might be dangerous to call robust_canonicalize() without also changing // = construct_periodic_point(p) (lack of consistency in the result) Weighted_point canonicalize_point(const Weighted_point& p) const { return P3T3::internal::robust_canonicalize_point(p, geom_traits()); } + // 1-cover, so we can take a const& + const Weighted_point& point(const Vertex_handle v) const + { + return v->point(); + } + Triangle triangle(const Facet& f) const { Periodic_triangle ptri = periodic_triangle(f); @@ -297,51 +308,52 @@ class Periodic_3_regular_triangulation_3_wrapper this->v_offsets.clear(); } - FT compute_power_distance_to_power_sphere(const Cell_handle& c, const int i) const + FT compute_power_distance_to_power_sphere(const Cell_handle c, const int i) const { typename Geom_traits::Compute_power_distance_to_power_sphere_3 cr = geom_traits().compute_power_distance_to_power_sphere_3_object(); Offset o_nb = this->neighbor_offset(c, i, c->neighbor(i)); - Offset o_vt = this->get_offset(c->neighbor(i), c->neighbor(i)->index(c)); - - const Weighted_point& wp0 = this->point(c->vertex(0)); // need the canonical point - const Weighted_point& wp1 = this->point(c->vertex(1)); - const Weighted_point& wp2 = this->point(c->vertex(2)); - const Weighted_point& wp3 = this->point(c->vertex(3)); - const Weighted_point& wq = this->point(c->neighbor(i)->vertex(c->neighbor(i)->index(c))); - const Offset& op0 = this->get_offset(c, 0); - const Offset& op1 = this->get_offset(c, 1); - const Offset& op2 = this->get_offset(c, 2); - const Offset& op3 = this->get_offset(c, 3); - const Offset& oq = o_vt - o_nb; + Offset o_vt = get_offset(c->neighbor(i), c->neighbor(i)->index(c)); + + const Weighted_point& wp0 = point(c->vertex(0)); // need the canonical point + const Weighted_point& wp1 = point(c->vertex(1)); + const Weighted_point& wp2 = point(c->vertex(2)); + const Weighted_point& wp3 = point(c->vertex(3)); + const Weighted_point& wq = point(c->neighbor(i)->vertex(c->neighbor(i)->index(c))); + const Offset& op0 = get_offset(c, 0); + const Offset& op1 = get_offset(c, 1); + const Offset& op2 = get_offset(c, 2); + const Offset& op3 = get_offset(c, 3); + const Offset oq = o_vt - o_nb; return cr(wp0, wp1, wp2, wp3, wq, op0, op1, op2, op3, oq); } - // The functions below are needed by Mesh_3 but need a specific implementation - // for the periodic case because we need to try with different offsets - // to get a result - FT compute_power_distance_to_power_sphere(const Cell_handle& c, + // The functions below are used in Mesh_3 and need a specific implementation + // for the periodic case because we need to try with different offsets to get the result + FT compute_power_distance_to_power_sphere(const Cell_handle c, const Vertex_handle v) const { + // @fixme need to introduce Compare_power_distances_to_power_sphere_3(4 points, query) typename Geom_traits::Compute_power_distance_to_power_sphere_3 cr = geom_traits().compute_power_distance_to_power_sphere_3_object(); FT min_power_dist = std::numeric_limits::infinity(); + const Weighted_point& wp0 = point(c->vertex(0)); // need the canonical point + const Weighted_point& wp1 = point(c->vertex(1)); + const Weighted_point& wp2 = point(c->vertex(2)); + const Weighted_point& wp3 = point(c->vertex(3)); + const Weighted_point& wq = point(v); + const Offset& op0 = get_offset(c, 0); + const Offset& op1 = get_offset(c, 1); + const Offset& op2 = get_offset(c, 2); + const Offset& op3 = get_offset(c, 3); + for(int i = 0; i < 3; ++i) { for(int j = 0; j < 3; ++j) { for(int k = 0; k < 3; ++k) { - const Weighted_point& wp0 = this->point(c->vertex(0)); // need the canonical point - const Weighted_point& wp1 = this->point(c->vertex(1)); - const Weighted_point& wp2 = this->point(c->vertex(2)); - const Weighted_point& wp3 = this->point(c->vertex(3)); - const Weighted_point& wq = this->point(v); - const Offset& op0 = this->get_offset(c, 0); - const Offset& op1 = this->get_offset(c, 1); - const Offset& op2 = this->get_offset(c, 2); - const Offset& op3 = this->get_offset(c, 3); const Offset oq(i-1, j-1, k-1); FT power_dist = cr(wp0, wp1, wp2, wp3, wq, op0, op1, op2, op3, oq); @@ -371,11 +383,14 @@ class Periodic_3_regular_triangulation_3_wrapper const Offset off(i-1, j-1, k-1); if(tester(c, off)) { - return construct_tetrahedron( - canonic_wp, this->point(c->vertex((index+1)&3)), - this->point(c->vertex((index+2)&3)), this->point(c->vertex((index+3)&3)), - off, this->get_offset(c, (index+1)&3), - this->get_offset(c, (index+2)&3), this->get_offset(c, (index+3)&3)); + return construct_tetrahedron(canonic_wp, + point(c->vertex((index+1)&3)), + point(c->vertex((index+2)&3)), + point(c->vertex((index+3)&3)), + off, + get_offset(c, (index+1)&3), + get_offset(c, (index+2)&3), + get_offset(c, (index+3)&3)); } } } @@ -385,7 +400,7 @@ class Periodic_3_regular_triangulation_3_wrapper return Tetrahedron(); } - Bounded_side side_of_power_sphere(const Cell_handle& c, const Weighted_point& p, + Bounded_side side_of_power_sphere(const Cell_handle c, const Weighted_point& p, bool perturb = false) const { Weighted_point canonical_p = canonicalize_point(p); @@ -404,62 +419,85 @@ class Periodic_3_regular_triangulation_3_wrapper } return bs; - - return Base::side_of_power_sphere(c, canonical_p, Offset(), perturb); } - // Warning : This is a periodic version that computes the smallest possible + // Warning: This is a periodic version that computes the smallest possible distance // between 'p' and 'q', for all possible combinations of offsets FT min_squared_distance(const Bare_point& p, const Bare_point& q) const { - typename Geom_traits::Compute_squared_distance_3 csd = + typename Geom_traits::Compare_squared_distance_3 compare_sd = + geom_traits().compare_squared_distance_3_object(); + typename Geom_traits::Compute_squared_distance_3 compute_sd = geom_traits().compute_squared_distance_3_object(); - const Bare_point cp = canonicalize_point(p); - const Bare_point cq = canonicalize_point(q); + bool used_exact = false; + std::pair pp_p = P3T3::internal::construct_periodic_point(p, used_exact, geom_traits()); + std::pair pp_q = P3T3::internal::construct_periodic_point(q, used_exact, geom_traits()); - FT min_sq_dist = std::numeric_limits::infinity(); + Offset min_off; for(int i = 0; i < 3; ++i) { for(int j = 0; j < 3; ++j) { - for(int k = 0; k < 3; ++k) { - FT sq_dist = csd(cq, construct_point(std::make_pair(cp, Offset(i-1, j-1, k-1)))); + for(int k = 0; k < 3; ++k) + { + const Offset o(i-1, j-1, k-1); - if(sq_dist < min_sq_dist) - min_sq_dist = sq_dist; + if((i == 0 && j == 0 && k == 0) || + compare_sd(q, p, q, p, + pp_q.second, pp_p.second + o, + pp_q.second, pp_p.second + min_off) == SMALLER) + { + min_off = o; + } } } } - return min_sq_dist; + return compute_sd(q, p, pp_q.second, pp_p.second + min_off); } - // Warning : This function finds which offset 'Oq' should be applied to 'q' so + // Warning: This function finds which offset 'Oq' should be applied to 'q' such // that the distance between 'p' and '(q, Oq)' is minimal. // // \pre 'p' lives in the canonical instance. Bare_point get_closest_point(const Bare_point& p, const Bare_point& q) const { - Bare_point rq; - const Bare_point cq = canonicalize_point(q); - FT min_sq_dist = std::numeric_limits::infinity(); + CGAL_precondition(p.x() < domain().xmax()); + CGAL_precondition(p.y() < domain().ymax()); + CGAL_precondition(p.z() < domain().zmax()); + CGAL_precondition(p.x() >= domain().xmin()); + CGAL_precondition(p.y() >= domain().ymin()); + CGAL_precondition(p.z() >= domain().zmin()); + + typename Geom_traits::Compare_squared_distance_3 compare_sd = + geom_traits().compare_squared_distance_3_object(); + typename Geom_traits::Construct_point_3 cp = + geom_traits().construct_point_3_object(); - for(int i = -1; i < 2; ++i) { - for(int j = -1; j < 2; ++j) { - for(int k = -1; k < 2; ++k) { - const Bare_point tcq = construct_point(std::make_pair(cq, Offset(i, j, k))); - FT sq_dist = geom_traits().compute_squared_distance_3_object()(p, tcq); + bool used_exact = false; + std::pair pp_q = P3T3::internal::construct_periodic_point(q, used_exact, geom_traits()); - if(sq_dist < min_sq_dist) + Offset min_off; + Offset null_offset(0,0,0); + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 3; ++j) { + for(int k = 0; k < 3; ++k) + { + const Offset o(i-1, j-1, k-1); + + if((i == 0 && j == 0 && k == 0) || + compare_sd(p, q, p, q, + null_offset, pp_q.second + o, + null_offset, pp_q.second + min_off) == SMALLER) { - rq = tcq; - min_sq_dist = sq_dist; + min_off = o; } } } } - return rq; + return cp(q, pp_q.second + min_off); } Weighted_point get_closest_point(const Weighted_point& wp, const Weighted_point& wq) const @@ -471,46 +509,28 @@ class Periodic_3_regular_triangulation_3_wrapper return cwp(get_closest_point(cp(wp), cp(wq)), cw(wq)); } - Triangle get_closest_triangle(const Bare_point& p, const Triangle& t) const + // returns the triangle corresponding to f, with a geometric shift + // so that it is incident to ref_v's canonical position + Triangle get_incident_triangle(const Facet& f, const Vertex_handle ref_v) const { - typename Geom_traits::Construct_vector_3 cv = geom_traits().construct_vector_3_object(); + typename Geom_traits::Construct_point_3 cp = geom_traits().construct_point_3_object(); typename Geom_traits::Construct_translated_point_3 tr = geom_traits().construct_translated_point_3_object(); - typename Geom_traits::Compute_squared_distance_3 csd = geom_traits().compute_squared_distance_3_object(); + typename Geom_traits::Construct_vector_3 cv = geom_traits().construct_vector_3_object(); + typename Geom_traits::Construct_triangle_3 ct = geom_traits().construct_triangle_3_object(); - // It doesn't matter which point we use to canonicalize the triangle as P3M3 is necessarily - // in one cover and we have to look at all the neighboring copies anyway since we do not - // have control of 'p'. - Bare_point canon_p0 = canonicalize_point(t[0]); - Vector_3 move_to_canonical = cv(t[0], canon_p0); - const std::array ct = { canon_p0, - tr(t[1], move_to_canonical), - tr(t[2], move_to_canonical) }; - - FT min_sq_dist = std::numeric_limits::infinity(); - Triangle rt; - for(int i = -1; i < 2; ++i) { - for(int j = -1; j < 2; ++j) { - for(int k = -1; k < 2; ++k) { - - const Triangle tt( - construct_point(std::make_pair(ct[0], Offset(i, j, k))), - construct_point(std::make_pair(ct[1], Offset(i, j, k))), - construct_point(std::make_pair(ct[2], Offset(i, j, k)))); - - const FT sq_dist = csd(p, tt); - - if(sq_dist == FT(0)) - return rt; - - if(sq_dist < min_sq_dist) { - rt = tt; - min_sq_dist = sq_dist; - } - } - } - } + CGAL_precondition(f.first != Cell_handle() && f.first->has_vertex(ref_v)); + const int ref_v_pos = f.first->index(ref_v); + const Bare_point& ref_p = cp(point(ref_v)); + const Bare_point ref_p_in_f = cp(point(f.first, ref_v_pos)); + Vector_3 move_to_canonical = cv(ref_p_in_f, ref_p); - return rt; + const int s = f.second; + const Bare_point mp0 = tr(cp(point(f.first, (s+1)%4)), move_to_canonical); + const Bare_point mp1 = tr(cp(point(f.first, (s+2)%4)), move_to_canonical); + const Bare_point mp2 = tr(cp(point(f.first, (s+3)%4)), move_to_canonical); + const Triangle t = ct(mp0, mp1, mp2); + + return t; } // Warning: This is a periodic version that computes the smallest possible @@ -522,37 +542,51 @@ class Periodic_3_regular_triangulation_3_wrapper const Weighted_point& q, const Weighted_point& r) const { - typename Geom_traits::Compute_power_product_3 power_distance = - geom_traits().compute_power_product_3_object(); - - // canonicalize the points - const Weighted_point cp = - geom_traits().construct_weighted_point_3_object()(canonicalize_point(p)); - const Weighted_point cq = canonicalize_point(q); - const Weighted_point cr = canonicalize_point(r); - - FT min_power_distance_to_q = std::numeric_limits::infinity(); - FT min_power_distance_to_r = std::numeric_limits::infinity(); + CGAL_precondition(this->is_1_cover()); - for(int i = 0; i < 3; ++i) { - for(int j = 0; j < 3; ++j) { - for(int k = 0; k < 3; ++k) { - const Weighted_point cp_copy = - construct_weighted_point(std::make_pair(cp, Offset(i-1, j-1, k-1))); - - const FT power_distance_to_q = power_distance(cp_copy, cq); - if(power_distance_to_q < min_power_distance_to_q) - min_power_distance_to_q = power_distance_to_q; - - const FT power_distance_to_r = power_distance(cp_copy, cr); - if (power_distance_to_r < min_power_distance_to_r) - min_power_distance_to_r = power_distance_to_r; + typename Geom_traits::Construct_point_3 cp = + geom_traits().construct_point_3_object(); + typename Geom_traits::Compare_power_distance_3 compare_power_distance = + geom_traits().compare_power_distance_3_object(); + + // Compute the offsets that would bring p, q, and r into the canonical domain + bool used_exact = false; + std::pair pp_p = P3T3::internal::construct_periodic_point(p, used_exact, geom_traits()); + std::pair pp_q = P3T3::internal::construct_periodic_point(cp(q), used_exact, geom_traits()); + std::pair pp_r = P3T3::internal::construct_periodic_point(cp(r), used_exact, geom_traits()); + + // To compare pp(p, q) to pp(p, r), we first need to know the best offsets that minimize these distances + auto get_offset_minimizing_power_product = [&](const Weighted_point& wp, + const Offset& base_wp_offset) -> Offset + { + Offset min_wp_offset; + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 3; ++j) { + for(int k = 0; k < 3; ++k) + { + const Offset off(i-1, j-1, k-1); + if((i == 0 && j == 0 && k == 0) || + compare_power_distance(p, wp, wp, + pp_p.second, + base_wp_offset + off, + base_wp_offset + min_wp_offset) == SMALLER) + { + min_wp_offset = off; + } + } } } - } - CGAL_postcondition(min_power_distance_to_r < 0.5 && min_power_distance_to_q < 0.5); - return min_power_distance_to_q >= min_power_distance_to_r; + return min_wp_offset; + }; + + Offset min_q_off = get_offset_minimizing_power_product(q, pp_q.second); + Offset min_r_off = get_offset_minimizing_power_product(r, pp_r.second); + + return !(compare_power_distance(p, q, r, + pp_p.second, + pp_q.second + min_q_off, + pp_r.second + min_r_off) == SMALLER); } /// \name Locate functions @@ -574,8 +608,8 @@ class Periodic_3_regular_triangulation_3_wrapper return Base::nearest_power_vertex(canonicalize_point(p), start); } - /// Return the squared distance (note: _NOT_ the power distance) between the - /// 'p' and the closest vertex for the power distance. + /// Return the squared distance (note: _NOT_ the power distance) + /// between 'p' and the closest vertex for the power distance. std::pair nearest_power_vertex_with_sq_distance(const Bare_point& p, Cell_handle start) const { @@ -607,14 +641,14 @@ class Periodic_3_regular_triangulation_3_wrapper query_offset = this->combine_offsets(Offset(), -query_offset); Vertex_handle nearest = Base::nearest_vertex_in_cell(c, canonical_p, query_offset); - const Weighted_point& nearest_wp = this->point(nearest); + const Weighted_point& nearest_wp = point(nearest); Offset offset_of_nearest = Base::get_min_dist_offset(canonical_p, query_offset, nearest); FT min_sq_dist = csd(canonical_p, cp(nearest_wp), query_offset, offset_of_nearest); std::vector vs; vs.reserve(32); - while(true) + for(;;) { Vertex_handle tmp = nearest; @@ -622,7 +656,7 @@ class Periodic_3_regular_triangulation_3_wrapper for(typename std::vector::const_iterator vsit = vs.begin(); vsit != vs.end(); ++vsit) { - // Can happen in 27-sheeted triangulations composed of few points + // Can happen in periodic triangulations composed of few points if(point(*vsit) == point(nearest)) continue; @@ -632,7 +666,7 @@ class Periodic_3_regular_triangulation_3_wrapper { tmp = *vsit; offset_of_nearest = min_dist_offset; - const Weighted_point& vswp = this->point(tmp); + const Weighted_point& vswp = point(tmp); min_sq_dist = csd(canonical_p, cp(vswp), query_offset, min_dist_offset); } } @@ -647,6 +681,41 @@ class Periodic_3_regular_triangulation_3_wrapper return std::make_pair(nearest, min_sq_dist); } + std::pair + nearest_power_vertex_with_sq_distance(const Vertex_handle v) const + { + typename Geom_traits::Construct_point_3 cp = geom_traits().construct_point_3_object(); + typename Geom_traits::Compute_squared_distance_3 csd = geom_traits().compute_squared_distance_3_object(); + + Vertex_handle min_v {}; + FT min_sq_dist = -1; + + std::vector inc_cells; + std::unordered_set visited_vertices; + incident_cells(v, std::back_inserter(inc_cells)); + for(Cell_handle ch : inc_cells) + { + CGAL_assertion(ch->has_vertex(v)); + int v_pos = ch->index(v); + for(int i=1; i<4; ++i) + { + int vi_pos = (v_pos + i) % 4; + Vertex_handle vi = ch->vertex(vi_pos); + if(!visited_vertices.insert(vi).second) // already visited + continue; + + FT sq_dist_i = csd(cp(point(ch, v_pos)), cp(point(ch, vi_pos))); + if(min_v == Vertex_handle() || sq_dist_i < min_sq_dist) + { + min_v = vi; + min_sq_dist = sq_dist_i; + } + } + } + + return { min_v, min_sq_dist }; + } + Cell_handle locate(const Weighted_point& p, Cell_handle start = Cell_handle(), bool* CGAL_assertion_code(could_lock_zone) = nullptr) const @@ -715,8 +784,8 @@ class Periodic_3_regular_triangulation_3_wrapper const Facet* /* this_facet_must_be_in_the_cz */ = nullptr, bool* /* the_facet_is_in_its_cz */ = nullptr) const { - CGAL_triangulation_precondition(could_lock_zone == nullptr); - CGAL_triangulation_precondition(number_of_vertices() != 0); + CGAL_precondition(could_lock_zone == nullptr); + CGAL_precondition(number_of_vertices() != 0); clear_v_offsets(); @@ -847,6 +916,76 @@ class Periodic_3_regular_triangulation_3_wrapper return make_object(s); } + void dual_exact(const Facet& f, const Weighted_point& ws, + Bare_point& cc) const + { + // first find the offset minimizing the distance between the facet and the fourth point + typename Geom_traits::Construct_point_3 construct_point = + geom_traits().construct_point_3_object(); + + // @fixme need to introduce Compare_power_distances_to_power_sphere_3(3 points, query) + typename Geom_traits::Construct_weighted_circumcenter_3 wcc = + geom_traits().construct_weighted_circumcenter_3_object(); + typename Geom_traits::Compare_squared_distance_3 compare_sd = + geom_traits().compare_squared_distance_3_object(); + + const Cell_handle c = f.first; + const int i = f.second; + + const Bare_point fcc = wcc(point(c, (i+1)%4), point(c, (i+2)%4), point(c, (i+3)%4)); + const Bare_point& s = construct_point(ws); + + bool used_exact = false; + std::pair pp_fcc = P3T3::internal::construct_periodic_point(fcc, used_exact, geom_traits()); + std::pair pp_s = P3T3::internal::construct_periodic_point(s, used_exact, geom_traits()); + + Offset min_off; + + for(int i = 0; i < 3; ++i) { + for(int j = 0; j < 3; ++j) { + for(int k = 0; k < 3; ++k) + { + const Offset o(i-1, j-1, k-1); + + if((i == 0 && j == 0 && k == 0) || + compare_sd(fcc, s, fcc, s, + pp_fcc.second, pp_s.second + o, + pp_fcc.second, pp_s.second + min_off) == SMALLER) + { + min_off = o; + } + } + } + } + + typedef typename Kernel_traits::Kernel Kernel; + typedef Exact_predicates_exact_constructions_kernel EKernel; + + typedef Cartesian_converter To_exact; + typedef Cartesian_converter Back_from_exact; + + typedef CGAL::Periodic_3_regular_triangulation_traits_3 Exact_Rt; + typedef typename Exact_Rt::Weighted_point_3 EWeighted_point_3; + + To_exact to_exact; + Back_from_exact back_from_exact; + + Exact_Rt etraits(to_exact(domain())); + Exact_Rt::Construct_weighted_circumcenter_3 exact_weighted_circumcenter = + etraits.construct_weighted_circumcenter_3_object(); + + const EWeighted_point_3& cp = to_exact(c->vertex((i+1)%4)->point()); + const EWeighted_point_3& cq = to_exact(c->vertex((i+2)%4)->point()); + const EWeighted_point_3& cr = to_exact(c->vertex((i+3)%4)->point()); + const EWeighted_point_3& cs = to_exact(ws); + + cc = back_from_exact(exact_weighted_circumcenter(cp, cq, cr, cs, + pp_fcc.second + get_offset(c, (i+1)%4), + pp_fcc.second + get_offset(c, (i+2)%4), + pp_fcc.second + get_offset(c, (i+3)%4), + pp_s.second + min_off)); + } + void dual_segment(const Facet& facet, Bare_point& p, Bare_point& q) const { typename Base::Periodic_segment_3 ps = Base::dual(facet); @@ -890,12 +1029,14 @@ class Periodic_3_regular_triangulation_3_wrapper to_exact(point(n->vertex(2))), to_exact(point(n->vertex(3))), get_offset(n, 0), get_offset(n, 1), get_offset(n, 2), get_offset(n, 3)); + typename EKernel::Point_3 dp; // get the offset of the first weighted circumcenter Offset transl_wc1; - while(true) /* while not in */ + for(;;) /* while not in */ { + // can safely perform a construction here because the kernel has exact constructions dp = etraits.construct_point_3_object()(exact_wc1, transl_wc1); if(dp.x() < dom.xmin()) @@ -916,7 +1057,7 @@ class Periodic_3_regular_triangulation_3_wrapper // get the offset of the second weighted circumcenter Offset transl_wc2; - while(true) /* while not in */ + for(;;) /* while not in */ { dp = etraits.construct_point_3_object()(exact_wc2, transl_wc2); @@ -942,6 +1083,7 @@ class Periodic_3_regular_triangulation_3_wrapper Offset cumm_off((std::min)(o1.x(), o2.x()), (std::min)(o1.y(), o2.y()), (std::min)(o1.z(), o2.z())); + EPoint_3 ewc1 = exact_construct_point(exact_wc1, transl_wc1); EPoint_3 ewc2 = exact_construct_point(exact_wc2, transl_wc2); p = back_from_exact(exact_construct_point(ewc1, o1 - cumm_off)); @@ -984,6 +1126,13 @@ template class Periodic_3_mesh_triangulation_3 { + // Triangulation_vertex_base_with_info_3 only does default initialization + // and not value initialization, but we cannot initialize info() during Mesh_3's refinement + struct Boolean_with_def_value + { + bool is_dummy_vertex = false; + }; + // default K typedef typename Default::Get::Kernel>::type K; @@ -993,12 +1142,13 @@ class Periodic_3_mesh_triangulation_3 // Periodic vertex and cell bases typedef Periodic_3_triangulation_ds_vertex_base_3<> VbDS; typedef Regular_triangulation_vertex_base_3 PVb; + typedef Triangulation_vertex_base_with_info_3 Vb; typedef Periodic_3_triangulation_ds_cell_base_3<> CbDS; typedef Regular_triangulation_cell_base_3 RCb; typedef Regular_triangulation_cell_base_with_weighted_circumcenter_3 PCb; - typedef Mesh_vertex_base_3 Default_Vb; + typedef Mesh_vertex_base_3 Default_Vb; typedef Mesh_cell_base_3 Default_Cb; // default Vb/Cb diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_offset_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_offset_3.h index 1216c738..48f1123d 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_offset_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_offset_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_offset_3.h $ -// $Id: Periodic_3_offset_3.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_offset_3.h $ +// $Id: include/CGAL/Periodic_3_offset_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,9 +17,12 @@ #include #include -#include +#include #include +#include +#include + namespace CGAL { class Periodic_3_offset_3 @@ -43,18 +46,27 @@ class Periodic_3_offset_3 int& z() { return _offz; } int z() const { return _offz; } - int &operator[](int i) { + // Use sfinae on the operator[] to accept only integral types as argument + template ::value>::type* = nullptr> + int& operator[](T i) + { if (i==0) return _offx; if (i==1) return _offy; - CGAL_triangulation_assertion(i==2); + CGAL_assertion(i==2); return _offz; } - int operator[](int i) const { + + template ::value>::type* = nullptr> + int operator[](T i) const + { if (i==0) return _offx; if (i==1) return _offy; - CGAL_triangulation_assertion(i==2); + CGAL_assertion(i==2); return _offz; } + void operator+=(const Periodic_3_offset_3 &other) { _offx += other._offx; _offy += other._offy; diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_regular_triangulation_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_regular_triangulation_3.h index c3431461..58c8cd2e 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_regular_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_regular_triangulation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h $ -// $Id: Periodic_3_regular_triangulation_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h $ +// $Id: include/CGAL/Periodic_3_regular_triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -31,7 +31,6 @@ #include #include -#include #include #include #include @@ -177,11 +176,11 @@ class Periodic_3_regular_triangulation_3 }; /// This threshold is chosen such that if all orthosphere radii are shorter - /// than this treshold, then we can be sure that there are no self-edges anymore. + /// than this threshold, then we can be sure that there are no self-edges anymore. FT orthosphere_radius_threshold; /// This container stores all the cells whose orthosphere radius is larger - /// than the treshold `orthosphere_radius_threshold`. + /// than the threshold `orthosphere_radius_threshold`. boost::unordered_set cells_with_too_big_orthoball; class Cover_manager @@ -220,13 +219,20 @@ class Periodic_3_regular_triangulation_3 }; public: + FT compute_cover_threshold() const + { + FT min_span = (std::min)({ domain().xmax() - domain().xmin(), + domain().ymax() - domain().ymin(), + domain().zmax() - domain().zmin() }); + return FT(0.015625) * CGAL::square(min_span); + } + /** @name Creation */ Periodic_3_regular_triangulation_3(const Iso_cuboid& domain = Iso_cuboid(0, 0, 0, 1, 1, 1), const Geometric_traits& gt = Geometric_traits()) : Tr_Base(domain, gt) { - orthosphere_radius_threshold = FT(0.015625) * (domain.xmax() - domain.xmin()) - * (domain.xmax() - domain.xmin()); + orthosphere_radius_threshold = compute_cover_threshold(); } template < typename InputIterator > @@ -236,8 +242,7 @@ class Periodic_3_regular_triangulation_3 bool is_large_point_set = false) : Tr_Base(domain, gt) { - orthosphere_radius_threshold = FT(0.015625) * (domain.xmax() - domain.xmin()) - * (domain.xmax() - domain.xmin()); + orthosphere_radius_threshold = compute_cover_threshold(); insert(first, last, is_large_point_set); } @@ -250,8 +255,8 @@ class Periodic_3_regular_triangulation_3 if(!is_1_cover()) insert_cells_with_too_big_orthoball(tr.cells_begin(), tr.cells_end()); - CGAL_triangulation_expensive_postcondition(*this == tr); - CGAL_triangulation_expensive_postcondition(is_valid()); + CGAL_expensive_postcondition(*this == tr); + CGAL_expensive_postcondition(is_valid()); } Periodic_3_regular_triangulation_3 operator=(Periodic_3_regular_triangulation_3 tr) @@ -269,7 +274,7 @@ class Periodic_3_regular_triangulation_3 void create_initial_triangulation() { - CGAL_triangulation_assertion( cells_with_too_big_orthoball.empty() ); + CGAL_assertion( cells_with_too_big_orthoball.empty() ); for(Cell_iterator iter = cells_begin(), end_iter = cells_end(); iter != end_iter; ++iter) cells_with_too_big_orthoball.insert(iter); @@ -383,8 +388,7 @@ class Periodic_3_regular_triangulation_3 virtual void update_cover_data_after_setting_domain () { - orthosphere_radius_threshold = FT(0.015625) * (domain().xmax() - domain().xmin()) - * (domain().xmax() - domain().xmin()); + orthosphere_radius_threshold = compute_cover_threshold(); } // the function below is used in `convert_to_1_sheeted_covering()` of P3T3 @@ -412,8 +416,8 @@ class Periodic_3_regular_triangulation_3 Conflict_tester tester(point, this); Point_hider hider(this); Cover_manager cover_manager(*this); - CGAL_triangulation_precondition(point.weight() >= 0); - CGAL_triangulation_precondition_msg + CGAL_precondition(point.weight() >= 0); + CGAL_precondition_msg ( point.weight() < orthosphere_radius_threshold , "point.weight() < 1/64 * domain_size * domain_size" @@ -428,8 +432,8 @@ class Periodic_3_regular_triangulation_3 Conflict_tester tester(point, this); Point_hider hider(this); Cover_manager cover_manager(*this); - CGAL_triangulation_precondition(point.weight() >= 0); - CGAL_triangulation_precondition_msg + CGAL_precondition(point.weight() >= 0); + CGAL_precondition_msg ( point.weight() < orthosphere_radius_threshold, "point.weight() < 1/64 * domain_size * domain_size" @@ -444,7 +448,7 @@ class Periodic_3_regular_triangulation_3 if(first == last) return 0; - CGAL_triangulation_precondition_code + CGAL_precondition_code ( bool precondition_is_satisfied = true; for(InputIterator pc_first = first, pc_last = last; pc_first != pc_last; ++pc_first) @@ -457,7 +461,7 @@ class Periodic_3_regular_triangulation_3 } ) - CGAL_triangulation_precondition_msg + CGAL_precondition_msg ( precondition_is_satisfied, "0 <= point.weight() < 1/64 * domain_size * domain_size" @@ -555,7 +559,7 @@ class Periodic_3_regular_triangulation_3 insert(*hi); } - CGAL_triangulation_expensive_postcondition(is_valid()); + CGAL_expensive_postcondition(is_valid()); } // Undocumented function that tries to remove 'v' but only does so if removal @@ -563,7 +567,7 @@ class Periodic_3_regular_triangulation_3 // \pre the triangulation is 1-sheeted bool remove_if_no_cover_change(Vertex_handle v) { - CGAL_triangulation_precondition(this->is_1_cover()); + CGAL_precondition(this->is_1_cover()); // Since we are in a 1-sheet configuration, we can call directly periodic_remove() // and don't need the conflict tester. The rest is copied from above. @@ -591,8 +595,8 @@ class Periodic_3_regular_triangulation_3 insert(*hi); } - CGAL_triangulation_expensive_postcondition(is_valid()); - CGAL_triangulation_postcondition(this->is_1_cover()); + CGAL_expensive_postcondition(is_valid()); + CGAL_postcondition(this->is_1_cover()); return true; // successfully removed the vertex } @@ -609,6 +613,8 @@ class Periodic_3_regular_triangulation_3 return geom_traits().compare_power_distance_3_object()(p, q, r, o1, o2, o3) == SMALLER; } + // @fixme the overloads with offset might run into an issue if the intermediate construction + // does not preserve the orientation... See Robust_periodic_weighted_circumcenter_traits_3.h Bare_point construct_weighted_circumcenter(const Weighted_point &p, const Weighted_point &q, const Weighted_point &r) const { @@ -648,7 +654,7 @@ class Periodic_3_regular_triangulation_3 Oriented_side power_side_of_oriented_power_sphere(const Weighted_point &p, const Weighted_point &q) const { - CGAL_triangulation_precondition(this->equal(p, q)); + CGAL_precondition(this->equal(p, q)); return geom_traits().power_side_of_oriented_power_sphere_3_object()(p, q); } Oriented_side power_side_of_oriented_power_sphere(const Weighted_point &p, const Weighted_point &q, @@ -700,7 +706,7 @@ class Periodic_3_regular_triangulation_3 const Offset& o3 = this->get_offset(c,3); const Offset& oq = offset; - CGAL_triangulation_precondition( orientation(p0, p1, p2, p3, o0, o1, o2, o3) == POSITIVE ); + CGAL_precondition( orientation(p0, p1, p2, p3, o0, o1, o2, o3) == POSITIVE ); Oriented_side os = ON_NEGATIVE_SIDE; os = power_side_of_oriented_power_sphere(p0, p1, p2, p3, q, o0, o1, o2, o3, oq); @@ -721,7 +727,7 @@ class Periodic_3_regular_triangulation_3 // of the determinant has non null coefficient. for(int i=4; i>1; --i) { if(points[i] == &pts[4]) { - CGAL_triangulation_assertion(orientation(p0, p1, p2, p3, o0, o1, o2, o3) + CGAL_assertion(orientation(p0, p1, p2, p3, o0, o1, o2, o3) == POSITIVE); // since p0 p1 p2 p3 are non coplanar and positively oriented return ON_UNBOUNDED_SIDE; @@ -745,7 +751,7 @@ class Periodic_3_regular_triangulation_3 } } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return ON_UNBOUNDED_SIDE; } @@ -802,12 +808,12 @@ class Periodic_3_regular_triangulation_3 CGAL_precondition(CGAL::abs(move.z()) < domain().zmax() - domain().zmin() ); // 'new_position' must be canonical - CGAL_triangulation_precondition(new_position.x() < domain().xmax()); - CGAL_triangulation_precondition(new_position.y() < domain().ymax()); - CGAL_triangulation_precondition(new_position.z() < domain().zmax()); - CGAL_triangulation_precondition(new_position.x() >= domain().xmin()); - CGAL_triangulation_precondition(new_position.y() >= domain().ymin()); - CGAL_triangulation_precondition(new_position.z() >= domain().zmin()); + CGAL_precondition(new_position.x() < domain().xmax()); + CGAL_precondition(new_position.y() < domain().ymax()); + CGAL_precondition(new_position.z() < domain().zmax()); + CGAL_precondition(new_position.x() >= domain().xmin()); + CGAL_precondition(new_position.y() >= domain().ymin()); + CGAL_precondition(new_position.z() >= domain().zmin()); if(new_position == v->point()) return; @@ -902,7 +908,7 @@ class Periodic_3_regular_triangulation_3 std::cout << "four offsets: " << std::endl; #endif - boost::array offsets; + std::array offsets; for(int i=0; i<4; ++i) { #ifdef CGAL_PERIODIC_SET_POINT_VERBOSE @@ -936,9 +942,9 @@ class Periodic_3_regular_triangulation_3 std::cout << "moved v to " << v->point() << std::endl; #endif - CGAL_triangulation_precondition(!(v->point().x() < domain().xmin()) && v->point().x() < domain().xmax()); - CGAL_triangulation_precondition(!(v->point().y() < domain().ymin()) && v->point().y() < domain().ymax()); - CGAL_triangulation_precondition(!(v->point().z() < domain().zmin()) && v->point().z() < domain().zmax()); + CGAL_precondition(!(v->point().x() < domain().xmin()) && v->point().x() < domain().xmax()); + CGAL_precondition(!(v->point().y() < domain().ymin()) && v->point().y() < domain().ymax()); + CGAL_precondition(!(v->point().z() < domain().zmin()) && v->point().z() < domain().zmax()); } Weighted_point point(const Periodic_weighted_point& pp) const @@ -968,12 +974,12 @@ class Periodic_3_regular_triangulation_3 Vertex_handle nearest_power_vertex(const Bare_point& p, Cell_handle start) const { - CGAL_triangulation_precondition(p.x() < domain().xmax()); - CGAL_triangulation_precondition(p.y() < domain().ymax()); - CGAL_triangulation_precondition(p.z() < domain().zmax()); - CGAL_triangulation_precondition(p.x() >= domain().xmin()); - CGAL_triangulation_precondition(p.y() >= domain().ymin()); - CGAL_triangulation_precondition(p.z() >= domain().zmin()); + CGAL_precondition(p.x() < domain().xmax()); + CGAL_precondition(p.y() < domain().ymax()); + CGAL_precondition(p.z() < domain().zmax()); + CGAL_precondition(p.x() >= domain().xmin()); + CGAL_precondition(p.y() >= domain().ymin()); + CGAL_precondition(p.z() >= domain().zmin()); if(number_of_vertices() == 0) return Vertex_handle(); @@ -1067,7 +1073,7 @@ class Periodic_3_regular_triangulation_3 bool is_Gabriel(Cell_handle c, int i) const { - CGAL_triangulation_precondition(number_of_vertices() != 0); + CGAL_precondition(number_of_vertices() != 0); typename Geom_traits::Power_side_of_bounded_power_sphere_3 side_of_bounded_power_sphere = geom_traits().power_side_of_bounded_power_sphere_3_object(); @@ -1102,7 +1108,7 @@ class Periodic_3_regular_triangulation_3 bool is_Gabriel(Cell_handle c, int i, int j) const { - CGAL_triangulation_precondition(number_of_vertices() != 0); + CGAL_precondition(number_of_vertices() != 0); typename Geom_traits::Power_side_of_bounded_power_sphere_3 side_of_bounded_power_sphere = geom_traits().power_side_of_bounded_power_sphere_3_object(); @@ -1186,12 +1192,12 @@ class Periodic_3_regular_triangulation_3 // offsets to find the minimum Offset get_min_dist_offset_general(const Bare_point& p, const Vertex_handle vh) const { - CGAL_triangulation_precondition(p.x() < domain().xmax()); - CGAL_triangulation_precondition(p.y() < domain().ymax()); - CGAL_triangulation_precondition(p.z() < domain().zmax()); - CGAL_triangulation_precondition(p.x() >= domain().xmin()); - CGAL_triangulation_precondition(p.y() >= domain().ymin()); - CGAL_triangulation_precondition(p.z() >= domain().zmin()); + CGAL_precondition(p.x() < domain().xmax()); + CGAL_precondition(p.y() < domain().ymax()); + CGAL_precondition(p.z() < domain().zmax()); + CGAL_precondition(p.x() >= domain().xmin()); + CGAL_precondition(p.y() >= domain().ymin()); + CGAL_precondition(p.z() >= domain().zmin()); Offset min_off = Offset(0,0,0); @@ -1215,7 +1221,7 @@ class Periodic_3_regular_triangulation_3 Vertex_handle nearest_vertex_in_cell(const Cell_handle& c, const Bare_point& p, const Offset & o) const { - CGAL_triangulation_precondition(number_of_vertices() != 0); + CGAL_precondition(number_of_vertices() != 0); Vertex_handle nearest = c->vertex(0); for(int i=1; i<4; i++) { @@ -1384,7 +1390,7 @@ class Periodic_3_regular_triangulation_3 OutputIteratorBoundaryFacets bfit, OutputIteratorCells cit, OutputIteratorInternalFacets ifit) const { - CGAL_triangulation_precondition(number_of_vertices() != 0); + CGAL_precondition(number_of_vertices() != 0); std::vector facets; facets.reserve(64); @@ -1671,12 +1677,12 @@ class Periodic_3_regular_triangulation_3::Point_hider // inline void hide(Weighted_point&, Cell_handle ) const // useless? // { -// CGAL_triangulation_assertion(false); +// CGAL_assertion(false); // } // // inline void do_hide(const Weighted_point&, Cell_handle ) const // useless? // { -// CGAL_triangulation_assertion(false); +// CGAL_assertion(false); // } // template < class Tester > @@ -1746,16 +1752,14 @@ operator>> (std::istream& is, Periodic_3_regular_triangulation_3& tr) { typedef Periodic_3_regular_triangulation_3 P3RT3; typedef typename P3RT3::Tr_Base Tr_Base; - typedef typename GT::FT FT; is >> static_cast(tr); - tr.orthosphere_radius_threshold = FT(0.015625) * (tr.domain().xmax() - tr.domain().xmin()) - * (tr.domain().xmax() - tr.domain().xmin()); + tr.orthosphere_radius_threshold = tr.compute_cover_threshold(); tr.insert_cells_with_too_big_orthoball(tr.cells_begin(), tr.cells_end()); - CGAL_triangulation_expensive_assertion( tr.is_valid() ); + CGAL_expensive_assertion( tr.is_valid() ); return is; } diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_regular_triangulation_traits_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_regular_triangulation_traits_3.h index 155f9761..1588ea1b 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_regular_triangulation_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_regular_triangulation_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_traits_3.h $ -// $Id: Periodic_3_regular_triangulation_traits_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_traits_3.h $ +// $Id: include/CGAL/Periodic_3_regular_triangulation_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -85,6 +85,8 @@ class Periodic_3_regular_triangulation_traits_base_3 Compute_power_distance_to_power_sphere_3; typedef Functor_with_offset_weighted_points_adaptor_3 Compute_squared_distance_3; + typedef Functor_with_offset_weighted_points_adaptor_3 + Compare_squared_distance_3; // Operations Construct_weighted_point_3 construct_weighted_point_3_object() const { @@ -111,6 +113,12 @@ class Periodic_3_regular_triangulation_traits_base_3 this->construct_point_3_object(), construct_weighted_point_3_object()); } + Compare_squared_distance_3 compare_squared_distance_3_object() const { + return Compare_squared_distance_3( + this->Base::compare_squared_distance_3_object(), + this->construct_point_3_object(), construct_weighted_point_3_object()); + } + // predicates Power_side_of_bounded_power_sphere_3 power_side_of_bounded_power_sphere_3_object() const { return Power_side_of_bounded_power_sphere_3( diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3.h index 4c956cb3..400d83ed 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h $ -// $Id: Periodic_3_triangulation_3.h 81ac3b9 2022-06-10T09:46:09+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -22,16 +22,19 @@ #include #include +#include + #include #include #include #include #include #include -#include -#include +#include +#include #include +#include #include #include #include @@ -123,7 +126,7 @@ class Periodic_3_triangulation_3 typedef typename GT::Periodic_3_offset_3 Offset; typedef typename GT::Iso_cuboid_3 Iso_cuboid; - typedef std::array Covering_sheets; + typedef std::array Covering_sheets; // point types typedef typename TDS::Vertex::Point Point; @@ -166,6 +169,13 @@ class Periodic_3_triangulation_3 typedef Facet_iterator All_facets_iterator; typedef Edge_iterator All_edges_iterator; typedef Vertex_iterator All_vertices_iterator; + + typedef Periodic_3_triangulation_unique_cell_iterator_3 + Unique_cell_iterator; + typedef Periodic_3_triangulation_unique_facet_iterator_3 + Unique_facet_iterator; + typedef Periodic_3_triangulation_unique_edge_iterator_3 + Unique_edge_iterator; typedef Periodic_3_triangulation_unique_vertex_iterator_3 Unique_vertex_iterator; @@ -259,17 +269,6 @@ class Periodic_3_triangulation_3 const Geometric_traits& gt = Geometric_traits()) : _gt(gt), _tds() { - typedef typename internal::Exact_field_selector::Type EFT; - typedef NT_converter NTC; - CGAL_USE_TYPE(NTC); - CGAL_triangulation_precondition_code( NTC ntc; ) - CGAL_triangulation_precondition(ntc(domain.xmax())-ntc(domain.xmin()) - == ntc(domain.ymax())-ntc(domain.ymin())); - CGAL_triangulation_precondition(ntc(domain.ymax())-ntc(domain.ymin()) - == ntc(domain.zmax())-ntc(domain.zmin())); - CGAL_triangulation_precondition(ntc(domain.zmax())-ntc(domain.zmin()) - == ntc(domain.xmax())-ntc(domain.xmin())); - _gt.set_domain(domain); _cover = CGAL::make_array(3,3,3); init_tds(); @@ -290,8 +289,8 @@ class Periodic_3_triangulation_3 else copy_multiple_covering(tr); - CGAL_triangulation_expensive_postcondition(*this == tr); - CGAL_triangulation_expensive_postcondition(is_valid()); + CGAL_expensive_postcondition(*this == tr); + CGAL_expensive_postcondition(is_valid()); } virtual ~Periodic_3_triangulation_3() {} @@ -316,7 +315,7 @@ class Periodic_3_triangulation_3 { vlist.push_back(vit); virtual_vertices_reverse.insert(std::make_pair(vit,std::vector(26))); - CGAL_triangulation_assertion(virtual_vertices_reverse.find(vit)->second.size() == 26); + CGAL_assertion(virtual_vertices_reverse.find(vit)->second.size() == 26); } } @@ -332,7 +331,7 @@ class Periodic_3_triangulation_3 Offset off = vit2->offset(); virtual_vertices.insert(std::make_pair(vit2, std::make_pair(*vlist_it,off))); virtual_vertices_reverse.find(*vlist_it)->second[9*off[0]+3*off[1]+off[2]-1] = vit2; - CGAL_triangulation_assertion(get_offset(vit2) == off); + CGAL_assertion(get_offset(vit2) == off); } } @@ -405,26 +404,14 @@ class Periodic_3_triangulation_3 } const Covering_sheets& number_of_sheets() const { return _cover; } - const std::pair original_vertex(const Vertex_handle v) const - { - return (virtual_vertices.find(v) == virtual_vertices.end()) ? - std::make_pair(v,Offset()) : virtual_vertices.find(v)->second; - } - const std::vector& periodic_copies(const Vertex_handle v) const - { - CGAL_triangulation_precondition(number_of_sheets() != CGAL::make_array(1,1,1)); - CGAL_triangulation_precondition(virtual_vertices.find(v) == virtual_vertices.end()); - CGAL_triangulation_assertion( - virtual_vertices_reverse.find(v) != virtual_vertices_reverse.end()); - return virtual_vertices_reverse.find(v)->second; - } bool is_triangulation_in_1_sheet() const; - void convert_to_1_sheeted_covering(); + virtual void update_cover_data_after_converting_to_27_sheeted_covering() { } void convert_to_27_sheeted_covering(); +public: size_type number_of_cells() const { if(is_1_cover()) return _tds.number_of_cells(); else return _tds.number_of_cells()/27; @@ -468,25 +455,19 @@ class Periodic_3_triangulation_3 _cover = cover; } -public: - bool is_virtual(Vertex_handle v) - { - if(is_1_cover()) - return false; - return (virtual_vertices.find(v) != virtual_vertices.end()); - } - public: // Offset converters int off_to_int(const Offset& off) const { - CGAL_triangulation_assertion( off.x() == 0 || off.x() == 1 ); - CGAL_triangulation_assertion( off.y() == 0 || off.y() == 1 ); - CGAL_triangulation_assertion( off.z() == 0 || off.z() == 1 ); + CGAL_assertion( off.x() == 0 || off.x() == 1 ); + CGAL_assertion( off.y() == 0 || off.y() == 1 ); + CGAL_assertion( off.z() == 0 || off.z() == 1 ); int i = ((off.x()&1)<<2) + ((off.y()&1)<<1) + ((off.z()&1)); return i; } + // The first 3 bits are a 0 or 1 offsets in the xyz directions + // For example, 6 = 4 + 2 + 0 <=> 110 in binary <=> Offset(1, 1, 0) Offset int_to_off(int i) const { return Offset((i>>2)&1,(i>>1)&1,i&1); @@ -529,24 +510,24 @@ class Periodic_3_triangulation_3 } } - CGAL_triangulation_assertion((std::min)((std::min)(off0[0],off1[0]), + CGAL_assertion((std::min)((std::min)(off0[0],off1[0]), (std::min)(off2[0],off3[0])) == 0); - CGAL_triangulation_assertion((std::min)((std::min)(off0[1],off1[1]), + CGAL_assertion((std::min)((std::min)(off0[1],off1[1]), (std::min)(off2[1],off3[1])) == 0); - CGAL_triangulation_assertion((std::min)((std::min)(off0[2],off1[2]), + CGAL_assertion((std::min)((std::min)(off0[2],off1[2]), (std::min)(off2[2],off3[2])) == 0); - CGAL_triangulation_assertion((0 <= off0[0]) && (off0[0] < 2)); - CGAL_triangulation_assertion((0 <= off1[0]) && (off1[0] < 2)); - CGAL_triangulation_assertion((0 <= off2[0]) && (off2[0] < 2)); - CGAL_triangulation_assertion((0 <= off3[0]) && (off3[0] < 2)); - CGAL_triangulation_assertion((0 <= off0[1]) && (off0[1] < 2)); - CGAL_triangulation_assertion((0 <= off1[1]) && (off1[1] < 2)); - CGAL_triangulation_assertion((0 <= off2[1]) && (off2[1] < 2)); - CGAL_triangulation_assertion((0 <= off3[1]) && (off3[1] < 2)); - CGAL_triangulation_assertion((0 <= off0[2]) && (off0[2] < 2)); - CGAL_triangulation_assertion((0 <= off1[2]) && (off1[2] < 2)); - CGAL_triangulation_assertion((0 <= off2[2]) && (off2[2] < 2)); - CGAL_triangulation_assertion((0 <= off3[2]) && (off3[2] < 2)); + CGAL_assertion((0 <= off0[0]) && (off0[0] < 2)); + CGAL_assertion((0 <= off1[0]) && (off1[0] < 2)); + CGAL_assertion((0 <= off2[0]) && (off2[0] < 2)); + CGAL_assertion((0 <= off3[0]) && (off3[0] < 2)); + CGAL_assertion((0 <= off0[1]) && (off0[1] < 2)); + CGAL_assertion((0 <= off1[1]) && (off1[1] < 2)); + CGAL_assertion((0 <= off2[1]) && (off2[1] < 2)); + CGAL_assertion((0 <= off3[1]) && (off3[1] < 2)); + CGAL_assertion((0 <= off0[2]) && (off0[2] < 2)); + CGAL_assertion((0 <= off1[2]) && (off1[2] < 2)); + CGAL_assertion((0 <= off2[2]) && (off2[2] < 2)); + CGAL_assertion((0 <= off3[2]) && (off3[2] < 2)); int o0i = ((off0[0]&1)<<2)+((off0[1]&1)<<1)+(off0[2]&1); int o1i = ((off1[0]&1)<<2)+((off1[1]&1)<<1)+(off1[2]&1); @@ -555,6 +536,232 @@ class Periodic_3_triangulation_3 c->set_offsets(o0i,o1i,o2i,o3i); } +public: + // undocumented access functions + Offset get_offset(Cell_handle ch, int i) const + { + if(is_1_cover()) + return int_to_off(ch->offset(i)); + + Virtual_vertex_map_it it = virtual_vertices.find(ch->vertex(i)); + if(it != virtual_vertices.end()) + return combine_offsets(it->second.second, int_to_off(ch->offset(i))); + else + return combine_offsets(Offset(), int_to_off(ch->offset(i))); + } + + Offset get_offset(Vertex_handle vh) const + { + if(is_1_cover()) + return Offset(); + + Virtual_vertex_map_it it = virtual_vertices.find(vh); + if(it != virtual_vertices.end()) + return it->second.second; + else + return Offset(); + } + + // Get the canonicalized offsets of a cell. + void get_offsets(Cell_handle ch, + Offset& off0, Offset& off1, Offset& off2, Offset& off3) const + { + Offset cell_off0 = int_to_off(ch->offset(0)); + Offset cell_off1 = int_to_off(ch->offset(1)); + Offset cell_off2 = int_to_off(ch->offset(2)); + Offset cell_off3 = int_to_off(ch->offset(3)); + Offset diff_off((cell_off0.x() == 1 && cell_off1.x() == 1 && + cell_off2.x() == 1 && cell_off3.x() == 1) ? -1 : 0, + (cell_off0.y() == 1 && cell_off1.y() == 1 && + cell_off2.y() == 1 && cell_off3.y() == 1) ? -1 : 0, + (cell_off0.z() == 1 && cell_off1.z() == 1 && + cell_off2.z() == 1 && cell_off3.z() == 1) ? -1 : 0); + off0 = combine_offsets(get_offset(ch,0), diff_off); + off1 = combine_offsets(get_offset(ch,1), diff_off); + off2 = combine_offsets(get_offset(ch,2), diff_off); + off3 = combine_offsets(get_offset(ch,3), diff_off); + } + + // Gets the canonicalized offsets of a face. + void get_offsets(const Facet& f, + Offset& off0, Offset& off1, Offset& off2) const + { + Offset cell_off0 = int_to_off(f.first->offset((f.second+1)&3)); + Offset cell_off1 = int_to_off(f.first->offset((f.second+2)&3)); + Offset cell_off2 = int_to_off(f.first->offset((f.second+3)&3)); + Offset diff_off((cell_off0.x() == 1 && cell_off1.x() == 1 && cell_off2.x() == 1) ? -1 : 0, + (cell_off0.y() == 1 && cell_off1.y() == 1 && cell_off2.y() == 1) ? -1 : 0, + (cell_off0.z() == 1 && cell_off1.z() == 1 && cell_off2.z() == 1) ? -1 : 0); + off0 = combine_offsets(get_offset(f.first, (f.second+1)&3), diff_off); + off1 = combine_offsets(get_offset(f.first, (f.second+2)&3), diff_off); + off2 = combine_offsets(get_offset(f.first, (f.second+3)&3), diff_off); + } + + // Gets the canonicalized offsets of an edge. + void get_offsets(const Edge& e, + Offset& off0, Offset& off1) const + { + Offset cell_off0 = int_to_off(e.first->offset(e.second)); + Offset cell_off1 = int_to_off(e.first->offset(e.third)); + Offset diff_off((cell_off0.x()==1 && cell_off1.x()==1) ? -1 : 0, + (cell_off0.y()==1 && cell_off1.y()==1) ? -1 : 0, + (cell_off0.z()==1 && cell_off1.z()==1) ? -1 : 0); + off0 = combine_offsets(get_offset(e.first, e.second), diff_off); + off1 = combine_offsets(get_offset(e.first, e.third), diff_off); + } + +public: + Offset combine_offsets(const Offset& o_c, const Offset& o_t) const + { + Offset o_ct(_cover[0]*o_t.x(), _cover[1]*o_t.y(), _cover[2]*o_t.z()); + return o_c + o_ct; + } + +public: + Offset neighbor_offset(Cell_handle ch, int i, Cell_handle nb) const; + + Offset neighbor_offset(Cell_handle ch, int i) const + { + return neighbor_offset(ch, i, ch->neighbor(i)); + } + +public: + /// Tests whether a vertex is a periodic copy of a vertex in the 3-cover. + bool is_virtual(Vertex_handle vh) const + { + if(is_1_cover()) + return false; + return (virtual_vertices.find(vh) != virtual_vertices.end()); + } + + /// Returns the non-virtual (i.e. canonical) copy of the vertex. + Vertex_handle get_original_vertex(Vertex_handle vh) const + { + if(is_1_cover()) + return vh; + + Virtual_vertex_map_it it = virtual_vertices.find(vh); + if(it != virtual_vertices.end()) + return it->second.first; + else + return vh; + } + + const std::pair original_vertex(const Vertex_handle v) const + { + return (virtual_vertices.find(v) == virtual_vertices.end()) ? + std::make_pair(v,Offset()) : virtual_vertices.find(v)->second; + } + + const std::vector& periodic_copies(const Vertex_handle v) const + { + CGAL_precondition(number_of_sheets() != CGAL::make_array(1,1,1)); + CGAL_precondition(virtual_vertices.find(v) == virtual_vertices.end()); + CGAL_assertion( + virtual_vertices_reverse.find(v) != virtual_vertices_reverse.end()); + return virtual_vertices_reverse.find(v)->second; + } + +public: + bool is_canonical(Cell_handle ch) const + { + if(is_1_cover()) + return true; + + Offset off0, off1, off2, off3; + get_offsets(ch, off0, off1, off2, off3); + + // If there is one offset with entries larger than 1 then we are + // talking about a vertex that is too far away from the original + // domain to belong to a canonical triangle. + if (off0.x() > 1) return false; + if (off0.y() > 1) return false; + if (off0.z() > 1) return false; + if (off1.x() > 1) return false; + if (off1.y() > 1) return false; + if (off1.z() > 1) return false; + if (off2.x() > 1) return false; + if (off2.y() > 1) return false; + if (off2.z() > 1) return false; + if (off3.x() > 1) return false; + if (off3.y() > 1) return false; + if (off3.z() > 1) return false; + + // If there is one direction of space for which all offsets are + // non-zero then the edge is not canonical because we can + // take the copy closer towards the origin in that direction. + int offx = off0.x() & off1.x() & off2.x() & off3.x(); + int offy = off0.y() & off1.y() & off2.y() & off3.y(); + int offz = off0.z() & off1.z() & off2.z() & off3.z(); + + return (offx == 0 && offy == 0 && offz == 0); + } + + bool is_canonical(const Edge& e) const + { + if(is_1_cover()) + return true; + + Offset off0, off1; + get_offsets(e, off0, off1); + + // If there is one offset with entries larger than 1 then we are + // talking about a vertex that is too far away from the original + // domain to belong to a canonical edge. + if (off0.x() > 1) return false; + if (off0.y() > 1) return false; + if (off0.z() > 1) return false; + if (off1.x() > 1) return false; + if (off1.y() > 1) return false; + if (off1.z() > 1) return false; + + // If there is one direction of space for which all offsets are + // non-zero then the edge is not canonical because we can + // take the copy closer towards the origin in that direction. + int offx = off0.x() & off1.x(); + int offy = off0.y() & off1.y(); + int offz = off0.z() & off1.z(); + + return (offx == 0 && offy == 0 && offz == 0); + } + + bool is_canonical(const Facet& f) const + { + if(is_1_cover()) + return true; + + Offset off0, off1, off2; + get_offsets(f, off0, off1, off2); + + // If there is one offset with entries larger than 1 then we are + // talking about a vertex that is too far away from the original + // domain to belong to a canonical triangle. + if(off0.x() > 1) return false; + if(off0.y() > 1) return false; + if(off0.z() > 1) return false; + if(off1.x() > 1) return false; + if(off1.y() > 1) return false; + if(off1.z() > 1) return false; + if(off2.x() > 1) return false; + if(off2.y() > 1) return false; + if(off2.z() > 1) return false; + + // If there is one direction of space for which all offsets are + // non-zero then the facet is not canonical because we can + // take the copy closer towards the origin in that direction. + int offx = off0.x() & off1.x() & off2.x(); + int offy = off0.y() & off1.y() & off2.y(); + int offz = off0.z() & off1.z() & off2.z(); + + return (offx == 0 && offy == 0 && offz == 0); + } + + /// Tests whether a vertex belongs to the original (canonical) domain. + bool is_canonical(Vertex_handle vh) const + { + return !is_virtual(vh); + } + public: /** @name Wrapping the traits */ // Note that calling functors with "construct_point(p), offset" and not @@ -680,7 +887,7 @@ class Periodic_3_triangulation_3 // --------------------------------------------------------------------------- // The following functions return objects of type Point and Periodic_point, // _not_ Point_3 and Periodic_point_3. - // They are templated by `construct_point` to distingush between Delaunay and + // They are templated by `construct_point` to distinguish between Delaunay and // regular triangulations // --------------------------------------------------------------------------- @@ -694,7 +901,8 @@ class Periodic_3_triangulation_3 // to the fundamental domain) of the vertices v and c->vertex(idx), // respectively template - Point point(Vertex_handle v, ConstructPoint cp) const { + Point point(Vertex_handle v, ConstructPoint cp) const + { return point(periodic_point(v), cp); } @@ -755,6 +963,25 @@ class Periodic_3_triangulation_3 return Point(); } + Point point(const Periodic_point& pp) const + { + return point(pp, geom_traits().construct_point_3_object()); + } + + // The following functions return the "real" position in space (unrestrained + // to the fundamental domain) of the vertices v and c->vertex(idx), + // respectively + + Point point(Vertex_handle v) const + { + return point(v, geom_traits().construct_point_3_object()); + } + + Point point(Cell_handle c, int idx) const + { + return point(c, idx, geom_traits().construct_point_3_object()); + } + Periodic_point periodic_point(const Vertex_handle v) const { if(is_1_cover()) @@ -822,9 +1049,9 @@ class Periodic_3_triangulation_3 } Periodic_segment periodic_segment(const Cell_handle c, int i, int j) const { - CGAL_triangulation_precondition( i != j ); - CGAL_triangulation_precondition( number_of_vertices() != 0 ); - CGAL_triangulation_precondition( i >= 0 && i <= 3 && j >= 0 && j <= 3 ); + CGAL_precondition( i != j ); + CGAL_precondition( number_of_vertices() != 0 ); + CGAL_precondition( i >= 0 && i <= 3 && j >= 0 && j <= 3 ); return CGAL::make_array(std::make_pair(c->vertex(i)->point(), get_offset(c,i)), std::make_pair(c->vertex(j)->point(), get_offset(c,j))); } @@ -880,8 +1107,8 @@ class Periodic_3_triangulation_3 } Periodic_triangle periodic_triangle(const Cell_handle c, int i) const { - CGAL_triangulation_precondition( number_of_vertices() != 0 ); - CGAL_triangulation_precondition( i >= 0 && i <= 3 ); + CGAL_precondition( number_of_vertices() != 0 ); + CGAL_precondition( i >= 0 && i <= 3 ); if( (i&1)==0 ) return CGAL::make_array(std::make_pair(c->vertex((i+2)&3)->point(), get_offset(c,(i+2)&3)), std::make_pair(c->vertex((i+1)&3)->point(), get_offset(c,(i+1)&3)), @@ -952,7 +1179,7 @@ class Periodic_3_triangulation_3 Periodic_tetrahedron periodic_tetrahedron(const Cell_handle c) const { - CGAL_triangulation_precondition( number_of_vertices() != 0 ); + CGAL_precondition( number_of_vertices() != 0 ); return CGAL::make_array(std::make_pair(c->vertex(0)->point(), get_offset(c,0)), std::make_pair(c->vertex(1)->point(), get_offset(c,1)), std::make_pair(c->vertex(2)->point(), get_offset(c,2)), @@ -974,6 +1201,14 @@ class Periodic_3_triangulation_3 // end of geometric functions public: + // These functions give the pair (vertex, offset) that corresponds to the + // i-th vertex of cell ch or vertex vh, respectively. + void get_vertex(Cell_handle ch, int i, Vertex_handle& vh, Offset& off) const; + void get_vertex(Vertex_handle vh_i, Vertex_handle& vh, Offset& off) const; + + // Auxiliary functions + Cell_handle get_cell(const Vertex_handle* vh) const; + /** @name Queries */ bool is_vertex(const Point& p, Vertex_handle& v) const; @@ -1288,7 +1523,17 @@ class Periodic_3_triangulation_3 public: std::vector insert_dummy_points(); + std::vector insert_generic_dummy_points(); + protected: + template + Offset get_location_offset(const Conflict_tester& tester, + Cell_handle c) const; + + template + Offset get_location_offset(const Conflict_tester& tester, + Cell_handle c, bool& found) const; + // this is needed for compatibility reasons template @@ -1349,21 +1594,21 @@ class Periodic_3_triangulation_3 std::vector double_vertices; Locate_type lt = Locate_type(); int li=0, lj=0; - CGAL_triangulation_assertion_code( Locate_type lta = Locate_type(); ) - CGAL_triangulation_assertion_code( int ia = 0; ) - CGAL_triangulation_assertion_code( int ja = 0; ) + CGAL_assertion_code( Locate_type lta = Locate_type(); ) + CGAL_assertion_code( int ia = 0; ) + CGAL_assertion_code( int ja = 0; ) Cell_handle hint; while(begin!=end) { tester.set_point(*begin); Offset lo; hint = periodic_locate(*begin, Offset(), lo, lt, li, lj, start); - CGAL_triangulation_assertion_code( if(number_of_vertices() != 0) { ); - CGAL_triangulation_assertion(side_of_cell( + CGAL_assertion_code( if(number_of_vertices() != 0) { ); + CGAL_assertion(side_of_cell( *begin,Offset(), hint, lta, ia, ja) != ON_UNBOUNDED_SIDE); - CGAL_triangulation_assertion(lta == lt); - CGAL_triangulation_assertion(ia == li); - CGAL_triangulation_assertion(ja == lj); - CGAL_triangulation_assertion_code( } + CGAL_assertion(lta == lt); + CGAL_assertion(ia == li); + CGAL_assertion(ja == lj); + CGAL_assertion_code( } ); new_vertex = insert_in_conflict(*begin,lt,hint,li,lj,tester,hider, cover_manager); @@ -1416,7 +1661,7 @@ class Periodic_3_triangulation_3 typename Virtual_vertex_reverse_map::iterator origin_it = this->virtual_vertices_reverse.find(vh); std::vector& copies = origin_it->second; typename std::vector::iterator copy_iter = std::find(copies.begin(), copies.end(), vertex_handle); - CGAL_triangulation_assertion(copy_iter != copies.end()); + CGAL_assertion(copy_iter != copies.end()); copies.erase(copy_iter); if(copies.empty()) virtual_vertices_reverse.erase(origin_it); @@ -1424,8 +1669,8 @@ class Periodic_3_triangulation_3 return; } - CGAL_triangulation_assertion(this->virtual_vertices.find(vertex_handle) == this->virtual_vertices.end()); - CGAL_triangulation_assertion(this->virtual_vertices_reverse.find(vertex_handle) == this->virtual_vertices_reverse.end()); + CGAL_assertion(this->virtual_vertices.find(vertex_handle) == this->virtual_vertices.end()); + CGAL_assertion(this->virtual_vertices_reverse.find(vertex_handle) == this->virtual_vertices_reverse.end()); } public: @@ -1458,6 +1703,8 @@ class Periodic_3_triangulation_3 return _tds.facets_end(); } + // Finite iterators (= all iterators, for periodic triangulations) + Cell_iterator finite_cells_begin() const { return _tds.cells_begin(); } @@ -1486,6 +1733,8 @@ class Periodic_3_triangulation_3 return _tds.facets_end(); } + // All iterators (= finite, for periodic triangulations) + All_cells_iterator all_cells_begin() const { return _tds.cells_begin(); } @@ -1514,6 +1763,16 @@ class Periodic_3_triangulation_3 return _tds.facets_end(); } + // Unique iterators + + Unique_cell_iterator unique_cells_begin() const { + return CGAL::filter_iterator(cells_end(), Domain_tester(this), + cells_begin()); + } + Unique_cell_iterator unique_cells_end() const { + return CGAL::filter_iterator(cells_end(), Domain_tester(this)); + } + Unique_vertex_iterator unique_vertices_begin() const { return CGAL::filter_iterator(vertices_end(), Domain_tester(this), vertices_begin()); @@ -1522,6 +1781,22 @@ class Periodic_3_triangulation_3 return CGAL::filter_iterator(vertices_end(), Domain_tester(this)); } + Unique_edge_iterator unique_edges_begin() const { + return CGAL::filter_iterator(edges_end(), Domain_tester(this), + edges_begin()); + } + Unique_edge_iterator unique_edges_end() const { + return CGAL::filter_iterator(edges_end(), Domain_tester(this)); + } + + Unique_facet_iterator unique_facets_begin() const { + return CGAL::filter_iterator(facets_end(), Domain_tester(this), + facets_begin()); + } + Unique_facet_iterator unique_facets_end() const { + return CGAL::filter_iterator(facets_end(), Domain_tester(this)); + } + // Geometric iterators Periodic_tetrahedron_iterator periodic_tetrahedra_begin( Iterator_type it = STORED) const { @@ -1560,6 +1835,7 @@ class Periodic_3_triangulation_3 } // Circulators + Cell_circulator incident_cells(const Edge& e) const { return _tds.incident_cells(e); } @@ -1679,75 +1955,6 @@ class Periodic_3_triangulation_3 } }; -public: - // undocumented access functions - Offset get_offset(Cell_handle ch, int i) const - { - if(is_1_cover()) - return int_to_off(ch->offset(i)); - - Virtual_vertex_map_it it = virtual_vertices.find(ch->vertex(i)); - if(it != virtual_vertices.end()) - return combine_offsets(it->second.second, int_to_off(ch->offset(i))); - else - return combine_offsets(Offset(), int_to_off(ch->offset(i))); - } - - Offset get_offset(Vertex_handle vh) const - { - if(is_1_cover()) - return Offset(); - - Virtual_vertex_map_it it = virtual_vertices.find(vh); - if(it != virtual_vertices.end()) - return it->second.second; - else - return Offset(); - } - - Vertex_handle get_original_vertex(Vertex_handle vh) const - { - if(is_1_cover()) - return vh; - - Virtual_vertex_map_it it = virtual_vertices.find(vh); - if(it != virtual_vertices.end()) - return it->second.first; - else - return vh; - } - - Offset combine_offsets(const Offset& o_c, const Offset& o_t) const - { - Offset o_ct(_cover[0]*o_t.x(), _cover[1]*o_t.y(), _cover[2]*o_t.z()); - return o_c + o_ct; - } - - // These functions give the pair (vertex, offset) that corresponds to the - // i-th vertex of cell ch or vertex vh, respectively. - void get_vertex(Cell_handle ch, int i, Vertex_handle& vh, Offset& off) const; - void get_vertex(Vertex_handle vh_i, Vertex_handle& vh, Offset& off) const; - -protected: - // Auxiliary functions - Cell_handle get_cell(const Vertex_handle* vh) const; - - template - Offset get_location_offset(const Conflict_tester& tester, - Cell_handle c) const; - - template - Offset get_location_offset(const Conflict_tester& tester, - Cell_handle c, bool& found) const; - - Offset neighbor_offset(Cell_handle ch, int i, Cell_handle nb) const; - -public: - Offset neighbor_offset(Cell_handle ch, int i) const - { - return neighbor_offset(ch, i, ch->neighbor(i)); - } - protected: /** @name Friends */ friend std::istream& operator>> <> @@ -1760,8 +1967,10 @@ class Periodic_3_triangulation_3 Periodic_point_3 periodic_circumcenter(Cell_handle c, ConstructCircumcenter construct_circumcenter) const { - CGAL_triangulation_precondition(c != Cell_handle()); + CGAL_precondition(c != Cell_handle()); + // @fixme this might run into an issue if the intermediate construction does not preserve + // the orientation... See Robust_periodic_weighted_circumcenter_traits_3.h Point_3 p = construct_circumcenter(c->vertex(0)->point(), c->vertex(1)->point(), c->vertex(2)->point(), c->vertex(3)->point(), get_offset(c, 0), get_offset(c, 1), @@ -1770,57 +1979,12 @@ class Periodic_3_triangulation_3 return construct_periodic_point(p); } -public: - bool is_canonical(const Facet& f) const - { - if(number_of_sheets() == CGAL::make_array(1,1,1)) - return true; - - Offset cell_off0 = int_to_off(f.first->offset((f.second+1)&3)); - Offset cell_off1 = int_to_off(f.first->offset((f.second+2)&3)); - Offset cell_off2 = int_to_off(f.first->offset((f.second+3)&3)); - Offset diff_off((cell_off0.x() == 1 - && cell_off1.x() == 1 - && cell_off2.x() == 1) ? -1 : 0, - (cell_off0.y() == 1 - && cell_off1.y() == 1 - && cell_off2.y() == 1) ? -1 : 0, - (cell_off0.z() == 1 - && cell_off1.z() == 1 - && cell_off2.z() == 1) ? -1 : 0); - Offset off0 = combine_offsets(get_offset(f.first, (f.second+1)&3), diff_off); - Offset off1 = combine_offsets(get_offset(f.first, (f.second+2)&3), diff_off); - Offset off2 = combine_offsets(get_offset(f.first, (f.second+3)&3), diff_off); - - // If there is one offset with entries larger than 1 then we are - // talking about a vertex that is too far away from the original - // domain to belong to a canonical triangle. - if(off0.x() > 1) return false; - if(off0.y() > 1) return false; - if(off0.z() > 1) return false; - if(off1.x() > 1) return false; - if(off1.y() > 1) return false; - if(off1.z() > 1) return false; - if(off2.x() > 1) return false; - if(off2.y() > 1) return false; - if(off2.z() > 1) return false; - - // If there is one direction of space for which all offsets are - // non-zero then the edge is not canonical because we can - // take the copy closer towards the origin in that direction. - int offx = off0.x() & off1.x() & off2.x(); - int offy = off0.y() & off1.y() & off2.y(); - int offz = off0.z() & off1.z() & off2.z(); - - return (offx == 0 && offy == 0 && offz == 0); - } - protected: template bool canonical_dual_segment(Cell_handle c, int i, Periodic_segment_3& ps, ConstructCircumcenter construct_circumcenter) const { - CGAL_triangulation_precondition(c != Cell_handle()); + CGAL_precondition(c != Cell_handle()); Offset off = neighbor_offset(c,i,c->neighbor(i)); Periodic_point_3 p1 = periodic_circumcenter(c, construct_circumcenter); Periodic_point_3 p2 = periodic_circumcenter(c->neighbor(i), construct_circumcenter); @@ -1879,7 +2043,7 @@ class Periodic_3_triangulation_3 template Stream& draw_dual(Stream& os, ConstructCircumcenter construct_circumcenter) const { - CGAL_triangulation_assertion_code( unsigned int i = 0; ) + CGAL_assertion_code( unsigned int i = 0; ) for(Facet_iterator fit = facets_begin(), end = facets_end(); fit != end; ++fit) { if(!is_canonical(*fit)) @@ -1888,11 +2052,11 @@ class Periodic_3_triangulation_3 Periodic_segment_3 pso; canonical_dual_segment(fit->first, fit->second, pso, construct_circumcenter); Segment so = construct_segment(pso); - CGAL_triangulation_assertion_code ( ++i; ) + CGAL_assertion_code ( ++i; ) os << so.source() << '\n'; os << so.target() << '\n'; } - CGAL_triangulation_assertion( i == number_of_facets() ); + CGAL_assertion( i == number_of_facets() ); return os; } @@ -1988,9 +2152,9 @@ class Periodic_3_triangulation_3 z = (z < d.zmin() ? z+d.zmax()-d.zmin() : (z >= d.zmax() ? z-d.zmax()+d.zmin() : z)); - CGAL_triangulation_postcondition((d.xmin()<=x)&&(xneighbor(0)->neighbor( + CGAL_postcondition(start!=Cell_handle()); + CGAL_assertion(start->neighbor(0)->neighbor( start->neighbor(0)->index(start))==start); - CGAL_triangulation_assertion(start->neighbor(1)->neighbor( + CGAL_assertion(start->neighbor(1)->neighbor( start->neighbor(1)->index(start))==start); - CGAL_triangulation_assertion(start->neighbor(2)->neighbor( + CGAL_assertion(start->neighbor(2)->neighbor( start->neighbor(2)->index(start))==start); - CGAL_triangulation_assertion(start->neighbor(3)->neighbor( + CGAL_assertion(start->neighbor(3)->neighbor( start->neighbor(3)->index(start))==start); // We implement the remembering visibility/stochastic walk. @@ -2181,7 +2345,7 @@ exact_periodic_locate continue; } - CGAL_triangulation_assertion(next->neighbor(next->index(c)) == c); + CGAL_assertion(next->neighbor(next->index(c)) == c); // We temporarily put p at i's place in pts. const Point* backup = pts[i]; @@ -2251,7 +2415,7 @@ exact_periodic_locate break; default: // the point cannot lie on four facets - CGAL_triangulation_assertion(false); + CGAL_assertion(false); } lo = off_query; @@ -2272,7 +2436,7 @@ inexact_periodic_locate(const Point& p, const Offset& o_p, if(number_of_vertices() == 0) { return Cell_handle(); } - CGAL_triangulation_assertion(number_of_vertices() != 0); + CGAL_assertion(number_of_vertices() != 0); if(start == Cell_handle()) { start = cells_begin(); @@ -2289,15 +2453,11 @@ inexact_periodic_locate(const Point& p, const Offset& o_p, off_query += Offset(0,0,1); } - CGAL_triangulation_postcondition(start!=Cell_handle()); - CGAL_triangulation_assertion(start->neighbor(0)->neighbor( - start->neighbor(0)->index(start))==start); - CGAL_triangulation_assertion(start->neighbor(1)->neighbor( - start->neighbor(1)->index(start))==start); - CGAL_triangulation_assertion(start->neighbor(2)->neighbor( - start->neighbor(2)->index(start))==start); - CGAL_triangulation_assertion(start->neighbor(3)->neighbor( - start->neighbor(3)->index(start))==start); + CGAL_postcondition(start!=Cell_handle()); + CGAL_assertion(start->neighbor(0)->neighbor(start->neighbor(0)->index(start)) == start); + CGAL_assertion(start->neighbor(1)->neighbor(start->neighbor(1)->index(start)) == start); + CGAL_assertion(start->neighbor(2)->neighbor(start->neighbor(2)->index(start)) == start); + CGAL_assertion(start->neighbor(3)->neighbor(start->neighbor(3)->index(start)) == start); // We implement the remembering visibility/stochastic walk. @@ -2394,14 +2554,14 @@ inline Bounded_side Periodic_3_triangulation_3::side_of_cell( const Point& q, const Offset& off, Cell_handle c, Locate_type& lt, int& i, int& j) const { - CGAL_triangulation_precondition( number_of_vertices() != 0 ); + CGAL_precondition( number_of_vertices() != 0 ); Orientation o0,o1,o2,o3; o0 = o1 = o2 = o3 = ZERO; int cumm_off = c->offset(0) | c->offset(1) | c->offset(2) | c->offset(3); if((cumm_off == 0) && (is_1_cover())) { - CGAL_triangulation_assertion(off == Offset()); + CGAL_assertion(off == Offset()); const Point& p0 = c->vertex(0)->point(); const Point& p1 = c->vertex(1)->point(); const Point& p2 = c->vertex(2)->point(); @@ -2421,7 +2581,7 @@ inline Bounded_side Periodic_3_triangulation_3::side_of_cell( p[i] = &(c->vertex(i)->point()); offs[i] = get_offset(c,i); } - CGAL_triangulation_assertion(orientation(*p[0], *p[1], *p[2], *p[3], + CGAL_assertion(orientation(*p[0], *p[1], *p[2], *p[3], offs[0], offs[1], offs[2], offs[3]) == POSITIVE); bool found=false; for(int i=0; (i<8)&&(!found); i++) { @@ -2491,7 +2651,7 @@ inline Bounded_side Periodic_3_triangulation_3::side_of_cell( default: { // impossible : cannot be on 4 facets for a real tetrahedron - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return ON_BOUNDARY; } } @@ -2523,11 +2683,10 @@ Periodic_3_triangulation_3::periodic_insert( Locate_type /*lt*/, Cell_handle c, const Conflict_tester& tester, Point_hider& hider, CoverManager& cover_manager, Vertex_handle vh) { - Vertex_handle v; - CGAL_triangulation_precondition(number_of_vertices() != 0); - CGAL_triangulation_assertion_code( + CGAL_precondition(number_of_vertices() != 0); + CGAL_assertion_code( Locate_type lt_assert; int i_assert; int j_assert;); - CGAL_triangulation_precondition(side_of_cell(tester.point(),o, c, + CGAL_precondition(side_of_cell(tester.point(),o, c, lt_assert, i_assert, j_assert) != ON_UNBOUNDED_SIDE); tester.set_offset(o); @@ -2536,7 +2695,7 @@ Periodic_3_triangulation_3::periodic_insert( bool found = false; Offset current_off = get_location_offset(tester, c, found); - CGAL_triangulation_assertion(side_of_cell(tester.point(), + CGAL_assertion(side_of_cell(tester.point(), combine_offsets(o,current_off),c,lt_assert,i_assert,j_assert) != ON_UNBOUNDED_SIDE); @@ -2568,7 +2727,7 @@ Periodic_3_triangulation_3::periodic_insert( // Insertion. Warning: facets[0].first MUST be in conflict! // Compute the star and put it into the data structure. // Store the new cells from the star in nbs. - v = _tds._insert_in_hole(cells.begin(), cells.end(), facet.first, facet.second); + Vertex_handle v = _tds._insert_in_hole(cells.begin(), cells.end(), facet.first, facet.second); v->set_point(p); //TODO: this could be done within the _insert_in_hole without losing any @@ -2577,6 +2736,7 @@ Periodic_3_triangulation_3::periodic_insert( //- Find the modified _insert_in_hole in the branch svn history of TDS std::vector nbs; incident_cells(v, std::back_inserter(nbs)); + // For all neighbors of the newly added vertex v: fetch their offsets from // the tester and reset them in the triangulation data structure. for(typename std::vector::iterator cit = nbs.begin(); @@ -2595,7 +2755,7 @@ Periodic_3_triangulation_3::periodic_insert( v_offsets.clear(); if(vh != Vertex_handle()) { -// CGAL_triangulation_assertion(virtual_vertices.find(v) == virtual_vertices.end()); +// CGAL_assertion(virtual_vertices.find(v) == virtual_vertices.end()); virtual_vertices[v] = Virtual_vertex(vh,o); virtual_vertices_reverse[vh].push_back(v); } @@ -2641,8 +2801,8 @@ Periodic_3_triangulation_3::create_initial_triangulation(const Point& p) virtual_vertices_reverse[vir_vertices[0][0][0]].push_back( vir_vertices[i][j][k]); } - CGAL_triangulation_assertion(vir_vertices[i][j][k] != Vertex_handle()); - CGAL_triangulation_assertion(vir_vertices[0][0][0]->point() == p); + CGAL_assertion(vir_vertices[i][j][k] != Vertex_handle()); + CGAL_assertion(vir_vertices[0][0][0]->point() == p); } } } @@ -2655,7 +2815,7 @@ Periodic_3_triangulation_3::create_initial_triangulation(const Point& p) // 6 cells per 'cube' cells[i][j][k][l] = _tds.create_cell(); for(int n=0; n<4; n++) - CGAL_triangulation_assertion(cells[i][j][k][l] != Cell_handle()); + CGAL_assertion(cells[i][j][k][l] != Cell_handle()); } } } @@ -2751,8 +2911,10 @@ Periodic_3_triangulation_3::create_initial_triangulation(const Point& p) return vir_vertices[0][0][0]; } + #define CGAL_INCLUDE_FROM_PERIODIC_3_TRIANGULATION_3_H #include +#include #undef CGAL_INCLUDE_FROM_PERIODIC_3_TRIANGULATION_3_H /** finds all cells that are in conflict with the currently added point @@ -2781,8 +2943,8 @@ find_conflicts(Cell_handle d, const Offset& current_off, OutputIteratorCells, OutputIteratorInternalFacets> it) const { - CGAL_triangulation_precondition( number_of_vertices() != 0 ); - CGAL_triangulation_precondition( tester(d, current_off) ); + CGAL_precondition( number_of_vertices() != 0 ); + CGAL_precondition( tester(d, current_off) ); std::stack > cell_stack; cell_stack.push(std::make_pair(d,current_off)); @@ -2848,13 +3010,11 @@ template < class Conflict_tester, class Point_hider, class CoverManager > inline typename Periodic_3_triangulation_3::Vertex_handle Periodic_3_triangulation_3::insert_in_conflict(const Point& p, Locate_type lt, Cell_handle c, int li, int lj, - const Conflict_tester& tester, Point_hider& hider, CoverManager& cover_manager) { - CGAL_triangulation_assertion((domain().xmin() <= p.x()) - && (p.x() < domain().xmax())); - CGAL_triangulation_assertion((domain().ymin() <= p.y()) - && (p.y() < domain().ymax())); - CGAL_triangulation_assertion((domain().zmin() <= p.z()) - && (p.z() < domain().zmax())); + const Conflict_tester& tester, Point_hider& hider, CoverManager& cover_manager) +{ + CGAL_assertion((domain().xmin() <= p.x()) && (p.x() < domain().xmax())); + CGAL_assertion((domain().ymin() <= p.y()) && (p.y() < domain().ymax())); + CGAL_assertion((domain().zmin() <= p.z()) && (p.z() < domain().zmax())); if(number_of_vertices() == 0) { Vertex_handle vh = create_initial_triangulation(p); @@ -2874,14 +3034,12 @@ Periodic_3_triangulation_3::insert_in_conflict(const Point& p, vstart = c->vertex(0); else vstart = vvmit->second.first; - CGAL_triangulation_assertion(virtual_vertices.find(vstart) - == virtual_vertices.end()); - CGAL_triangulation_assertion(virtual_vertices_reverse.find(vstart) - != virtual_vertices_reverse.end()); + CGAL_assertion(virtual_vertices.find(vstart) == virtual_vertices.end()); + CGAL_assertion(virtual_vertices_reverse.find(vstart) != virtual_vertices_reverse.end()); } - CGAL_triangulation_assertion( number_of_vertices() != 0 ); - CGAL_triangulation_expensive_assertion(is_valid()); + CGAL_assertion( number_of_vertices() != 0 ); + CGAL_expensive_assertion(is_valid()); hider.set_original_cube(true); Vertex_handle vh = periodic_insert(p, Offset(), lt, c, tester, hider, cover_manager); if(is_1_cover()) { @@ -2903,14 +3061,14 @@ Periodic_3_triangulation_3::insert_in_conflict(const Point& p, } } } - CGAL_triangulation_expensive_assertion(is_valid()); + CGAL_expensive_assertion(is_valid()); // Fall back to 1-cover if the criterion that the longest edge is shorter // than sqrt(0.166) is fulfilled. if( cover_manager.can_be_converted_to_1_sheet() ) { - CGAL_triangulation_expensive_assertion(is_valid()); + CGAL_expensive_assertion(is_valid()); convert_to_1_sheeted_covering(); - CGAL_triangulation_expensive_assertion( is_valid() ); + CGAL_expensive_assertion( is_valid() ); } return vh; } @@ -2918,17 +3076,17 @@ Periodic_3_triangulation_3::insert_in_conflict(const Point& p, /// tests if two vertices of one cell are just periodic copies of each other template < class GT, class TDS > inline bool Periodic_3_triangulation_3::has_self_edges(Cell_handle c) const { - CGAL_triangulation_assertion((c->vertex(0) != c->vertex(1)) || + CGAL_assertion((c->vertex(0) != c->vertex(1)) || (c->offset(0) != c->offset(1))); - CGAL_triangulation_assertion((c->vertex(0) != c->vertex(2)) || + CGAL_assertion((c->vertex(0) != c->vertex(2)) || (c->offset(0) != c->offset(2))); - CGAL_triangulation_assertion((c->vertex(0) != c->vertex(3)) || + CGAL_assertion((c->vertex(0) != c->vertex(3)) || (c->offset(0) != c->offset(3))); - CGAL_triangulation_assertion((c->vertex(1) != c->vertex(2)) || + CGAL_assertion((c->vertex(1) != c->vertex(2)) || (c->offset(1) != c->offset(2))); - CGAL_triangulation_assertion((c->vertex(1) != c->vertex(3)) || + CGAL_assertion((c->vertex(1) != c->vertex(3)) || (c->offset(1) != c->offset(3))); - CGAL_triangulation_assertion((c->vertex(2) != c->vertex(3)) || + CGAL_assertion((c->vertex(2) != c->vertex(3)) || (c->offset(2) != c->offset(3))); return ((c->vertex(0) == c->vertex(1)) || (c->vertex(0) == c->vertex(2)) || @@ -2964,20 +3122,20 @@ is_valid(bool verbose, int level) const iter_2 != end_iter_2; ++iter_2) { - CGAL_triangulation_assertion(virtual_vertices.find(*iter_2) != virtual_vertices.end()); - CGAL_triangulation_assertion(virtual_vertices.at(*iter_2).first == iter->first); + CGAL_assertion(virtual_vertices.find(*iter_2) != virtual_vertices.end()); + CGAL_assertion(virtual_vertices.at(*iter_2).first == iter->first); } } } bool error = false; - for(Cell_iterator cit = cells_begin(); - cit != cells_end(); ++cit) { + for(Cell_iterator cit = cells_begin(); cit != cells_end(); ++cit) { + CGAL_assertion(cit != Cell_handle()); for(int i=0; i<4; i++) { - CGAL_triangulation_assertion(cit != cit->neighbor(i)); + CGAL_assertion(cit != cit->neighbor(i)); for(int j=i+1; j<4; j++) { - CGAL_triangulation_assertion(cit->neighbor(i) != cit->neighbor(j)); - CGAL_triangulation_assertion(cit->vertex(i) != cit->vertex(j)); + CGAL_assertion(cit->neighbor(i) != cit->neighbor(j)); + CGAL_assertion(cit->vertex(i) != cit->vertex(j)); } } // Check positive orientation: @@ -2986,14 +3144,15 @@ is_valid(bool verbose, int level) const p[i] = &cit->vertex(i)->point(); off[i] = get_offset(cit,i); } + if(orientation(*p[0], *p[1], *p[2], *p[3], off[0], off[1], off[2], off[3]) != POSITIVE) { if(verbose) { - std::cerr<<"Periodic_3_triangulation_3: wrong orientation:"<second.first; - CGAL_triangulation_assertion(virtual_vertices_reverse.find(v) + CGAL_assertion(virtual_vertices_reverse.find(v) != virtual_vertices_reverse.end()); vhrem = virtual_vertices_reverse.find(v)->second; virtual_vertices_reverse.erase(v); - CGAL_triangulation_assertion(vhrem.size()==26); + CGAL_assertion(vhrem.size()==26); for(int i=0; i<26; i++) { periodic_remove(vhrem[i],r, cover_manager); virtual_vertices.erase(vhrem[i]); - CGAL_triangulation_expensive_assertion(is_valid()); + CGAL_expensive_assertion(is_valid()); } periodic_remove(v,r, cover_manager); } @@ -3145,7 +3304,9 @@ template < class GT, class TDS > template < class PointRemover, class CoverManager > inline bool Periodic_3_triangulation_3:: -periodic_remove(Vertex_handle v, PointRemover& remover, CoverManager& cover_manager, +periodic_remove(Vertex_handle v, + PointRemover& remover, + CoverManager& cover_manager, const bool abort_if_cover_change) { // Construct the set of vertex triples on the boundary @@ -3169,7 +3330,7 @@ periodic_remove(Vertex_handle v, PointRemover& remover, CoverManager& cover_mana make_hole(v, outer_map, hole); - CGAL_triangulation_assertion(outer_map.size()==hole.size()); + CGAL_assertion(outer_map.size()==hole.size()); if(!is_1_cover()) { cover_manager.delete_unsatisfying_elements(hole.begin(), hole.end()); @@ -3211,16 +3372,16 @@ periodic_remove(Vertex_handle v, PointRemover& remover, CoverManager& cover_mana for(unsigned int i=0; i < vertices.size(); i++) { typedef typename Point_remover::Triangulation_R3::Point TRPoint; - CGAL_triangulation_assertion( + CGAL_assertion( get_offset(vertices[i]) + combine_offsets(Offset(), vh_off_map[vertices[i]]) == combine_offsets(get_offset(vertices[i]),vh_off_map[vertices[i]])); TRPoint trp = std::make_pair(vertices[i]->point(), combine_offsets( get_offset(vertices[i]), vh_off_map[vertices[i]]) ); VertexE_handle vh = remover.tmp.insert(trp, ch); vmap[vh] = vertices[i]; - CGAL_triangulation_assertion(vmap.is_defined(vh)); + CGAL_assertion(vmap.is_defined(vh)); } - CGAL_triangulation_assertion(remover.tmp.number_of_vertices() != 0); + CGAL_assertion(remover.tmp.number_of_vertices() != 0); // Construct the set of vertex triples of tmp // We reorient the vertex triple so that it matches those from outer_map @@ -3263,7 +3424,7 @@ periodic_remove(Vertex_handle v, PointRemover& remover, CoverManager& cover_mana typename Vertex_triple_FacetE_map::iterator iit = inner_map.find(o_vt_f_pair.first); - CGAL_triangulation_assertion(iit != inner_map.end()); + CGAL_assertion(iit != inner_map.end()); typename Vertex_triple_FacetE_map::value_type i_vt_f_pair = *iit; CellE_handle i_ch = i_vt_f_pair.second.first; unsigned int i_i = i_vt_f_pair.second.second; @@ -3278,11 +3439,13 @@ periodic_remove(Vertex_handle v, PointRemover& remover, CoverManager& cover_mana vh_off_map[vmap[i_ch->vertex(2)]], vh_off_map[vmap[i_ch->vertex(3)]]); + // cells created above are deleted in update_cover_data_during_management() even if we abort + // Update the edge length management if(cover_manager.update_cover_data_during_management(new_ch, new_cells, abort_if_cover_change)) { - CGAL_triangulation_expensive_postcondition(_tds.is_valid()); + CGAL_expensive_postcondition(_tds.is_valid()); return false; // removing would cause / has caused a cover change } @@ -3293,7 +3456,7 @@ periodic_remove(Vertex_handle v, PointRemover& remover, CoverManager& cover_mana nr_vec.push_back(boost::make_tuple(o_ch,o_i,new_ch)); nr_vec.push_back(boost::make_tuple(new_ch,i_i,o_ch)); - // for the other faces check, if they can also be glued + // for the other facets check, if they can also be glued for(unsigned int i = 0; i < 4; i++) { if(i != i_i) { Facet f = std::pair(new_ch,i); @@ -3305,7 +3468,7 @@ periodic_remove(Vertex_handle v, PointRemover& remover, CoverManager& cover_mana std::swap(vt.second,vt.third); outer_map[vt]= f; } else { - // glue the faces + // glue the facets typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; Cell_handle o_ch2 = o_vt_f_pair2.second.first; int o_i2 = o_vt_f_pair2.second.second; @@ -3331,8 +3494,8 @@ periodic_remove(Vertex_handle v, PointRemover& remover, CoverManager& cover_mana _tds.delete_vertex(v); _tds.delete_cells(hole.begin(), hole.end()); - CGAL_triangulation_expensive_assertion(is_valid()); - return true; // sucessfully removed the vertex + CGAL_expensive_assertion(is_valid()); + return true; // successfully removed the vertex } // ############################################################################ @@ -3444,17 +3607,17 @@ Periodic_3_triangulation_3::convert_to_1_sheeted_covering() // The vector from nb to the "original" periodic copy of nb, that is // the copy that will not be deleted. Offset difference_offset(x,y,z); - CGAL_triangulation_assertion( !difference_offset.is_null() ); + CGAL_assertion( !difference_offset.is_null() ); // We now have to find the "original" periodic copy of nb from // its vertices. Therefore, we first have to find the vertices. for( int j = 0; j < 4; j++ ) { - CGAL_triangulation_assertion( (off[j]-difference_offset)[0] >= 0); - CGAL_triangulation_assertion( (off[j]-difference_offset)[1] >= 0); - CGAL_triangulation_assertion( (off[j]-difference_offset)[2] >= 0); - CGAL_triangulation_assertion( (off[j]-difference_offset)[0] < 3); - CGAL_triangulation_assertion( (off[j]-difference_offset)[1] < 3); - CGAL_triangulation_assertion( (off[j]-difference_offset)[2] < 3); + CGAL_assertion( (off[j]-difference_offset)[0] >= 0); + CGAL_assertion( (off[j]-difference_offset)[1] >= 0); + CGAL_assertion( (off[j]-difference_offset)[2] >= 0); + CGAL_assertion( (off[j]-difference_offset)[0] < 3); + CGAL_assertion( (off[j]-difference_offset)[1] < 3); + CGAL_assertion( (off[j]-difference_offset)[2] < 3); // find the Vertex_handles of the vertices of the "original" // periodic copy of nb. If the vertex is inside the original @@ -3506,22 +3669,22 @@ Periodic_3_triangulation_3::convert_to_1_sheeted_covering() off[i] = Offset(); get_vertex( it, i, vert[i], off[i]); it->set_vertex( i, vert[i]); - CGAL_triangulation_assertion(vert[i]->point()[0] < domain().xmax()); - CGAL_triangulation_assertion(vert[i]->point()[1] < domain().ymax()); - CGAL_triangulation_assertion(vert[i]->point()[2] < domain().zmax()); - CGAL_triangulation_assertion(vert[i]->point()[0] >= domain().xmin()); - CGAL_triangulation_assertion(vert[i]->point()[1] >= domain().ymin()); - CGAL_triangulation_assertion(vert[i]->point()[2] >= domain().zmin()); + CGAL_assertion(vert[i]->point()[0] < domain().xmax()); + CGAL_assertion(vert[i]->point()[1] < domain().ymax()); + CGAL_assertion(vert[i]->point()[2] < domain().zmax()); + CGAL_assertion(vert[i]->point()[0] >= domain().xmin()); + CGAL_assertion(vert[i]->point()[1] >= domain().ymin()); + CGAL_assertion(vert[i]->point()[2] >= domain().zmin()); // redirect also the cell pointer of the vertex. it->vertex(i)->set_cell(it); } // Set the offsets. set_offsets(it, off[0], off[1], off[2], off[3] ); - CGAL_triangulation_assertion( int_to_off(it->offset(0)) == off[0] ); - CGAL_triangulation_assertion( int_to_off(it->offset(1)) == off[1] ); - CGAL_triangulation_assertion( int_to_off(it->offset(2)) == off[2] ); - CGAL_triangulation_assertion( int_to_off(it->offset(3)) == off[3] ); + CGAL_assertion( int_to_off(it->offset(0)) == off[0] ); + CGAL_assertion( int_to_off(it->offset(1)) == off[1] ); + CGAL_assertion( int_to_off(it->offset(2)) == off[2] ); + CGAL_assertion( int_to_off(it->offset(3)) == off[3] ); } } @@ -3553,7 +3716,7 @@ Periodic_3_triangulation_3::convert_to_1_sheeted_covering() for( Vertex_iterator vit = all_vertices_begin(); vit != all_vertices_end(); ++vit ) { if( virtual_vertices.count( vit ) != 0 ) { - CGAL_triangulation_assertion( virtual_vertices.count( vit ) == 1 ); + CGAL_assertion( virtual_vertices.count( vit ) == 1 ); vertices_to_delete.push_back( vit ); } } @@ -3572,7 +3735,7 @@ Periodic_3_triangulation_3::convert_to_27_sheeted_covering() if(_cover == CGAL::make_array(3,3,3)) return; - CGAL_triangulation_precondition(is_1_cover()); + CGAL_precondition(is_1_cover()); // Create 27 copies of each vertex and write virtual_vertices and // virtual_vertices_reverse @@ -3640,7 +3803,7 @@ Periodic_3_triangulation_3::convert_to_27_sheeted_covering() Offset vvoff[4]; for(int i=0; i<4; i++) { vvrmit[i] = virtual_vertices_reverse.find((*cit)->vertex(i)); - CGAL_triangulation_assertion( + CGAL_assertion( vvrmit[i] != virtual_vertices_reverse.end()); vvoff[i] = int_to_off((*cit)->offset(i)); } @@ -3653,7 +3816,7 @@ Periodic_3_triangulation_3::convert_to_27_sheeted_covering() int o_j = ((n+1)/3+vvoff[i].y()+3)%3; int o_k = ((n+1)+vvoff[i].z()+3)%3; int n_c = 9*o_i+3*o_j+o_k-1; - CGAL_triangulation_assertion(n_c >= -1); + CGAL_assertion(n_c >= -1); if(n_c == -1) vvh[i] = (*cit)->vertex(i); else vvh[i] = vvrmit[i]->second[n_c]; } @@ -3669,12 +3832,12 @@ Periodic_3_triangulation_3::convert_to_27_sheeted_covering() for(int i=0; i<4; i++) { Virtual_vertex_reverse_map_it vvrmit = virtual_vertices_reverse.find((*cit)->vertex(i)); - CGAL_triangulation_assertion(vvrmit != virtual_vertices_reverse.end()); + CGAL_assertion(vvrmit != virtual_vertices_reverse.end()); Offset vvoff = int_to_off((*cit)->offset(i)); if(!vvoff.is_null()) { int n_c = 9*vvoff.x()+3*vvoff.y()+vvoff.z()-1; - CGAL_triangulation_assertion(n_c >= 0); - CGAL_triangulation_assertion(static_cast(n_c) + CGAL_assertion(n_c >= 0); + CGAL_assertion(static_cast(n_c) < vvrmit->second.size()); (*cit)->set_vertex(i,vvrmit->second[n_c]); } @@ -3685,13 +3848,13 @@ Periodic_3_triangulation_3::convert_to_27_sheeted_covering() typename std::list >::iterator oit = off_nb.begin(); for(typename std::list::iterator cit = original_cells.begin(); cit != original_cells.end(); ++cit, ++oit) { - CGAL_triangulation_assertion( oit != off_nb.end() ); + CGAL_assertion( oit != off_nb.end() ); VCRMIT c_cp = virtual_cells_reverse.find(*cit); - CGAL_triangulation_assertion(c_cp != virtual_cells_reverse.end()); + CGAL_assertion(c_cp != virtual_cells_reverse.end()); for(int i=0; i<4; i++) { Cell_handle cit_nb = (*cit)->neighbor(i); VCRMIT c_cp_nb = virtual_cells_reverse.find(cit_nb); - CGAL_triangulation_assertion(c_cp_nb != virtual_cells_reverse.end()); + CGAL_assertion(c_cp_nb != virtual_cells_reverse.end()); Offset nboff = (*oit)[i]; for(int n=0; n<26; n++) { int n_nb; @@ -3703,23 +3866,23 @@ Periodic_3_triangulation_3::convert_to_27_sheeted_covering() n_nb = 9*o_i+3*o_j+o_k-1; } if(n_nb == -1) { - CGAL_triangulation_assertion(cit_nb->has_vertex( + CGAL_assertion(cit_nb->has_vertex( c_cp->second[n]->vertex((i+1)%4)) ); - CGAL_triangulation_assertion(cit_nb->has_vertex( + CGAL_assertion(cit_nb->has_vertex( c_cp->second[n]->vertex((i+2)%4)) ); - CGAL_triangulation_assertion(cit_nb->has_vertex( + CGAL_assertion(cit_nb->has_vertex( c_cp->second[n]->vertex((i+3)%4)) ); c_cp->second[n]->set_neighbor(i,cit_nb); } else { - CGAL_triangulation_assertion(n_nb >= 0); - CGAL_triangulation_assertion(static_cast(n_nb) + CGAL_assertion(n_nb >= 0); + CGAL_assertion(static_cast(n_nb) <= c_cp_nb->second.size()); - CGAL_triangulation_assertion(c_cp_nb->second[n_nb] + CGAL_assertion(c_cp_nb->second[n_nb] ->has_vertex(c_cp->second[n]->vertex((i+1)%4)) ); - CGAL_triangulation_assertion(c_cp_nb->second[n_nb] + CGAL_assertion(c_cp_nb->second[n_nb] ->has_vertex(c_cp->second[n]->vertex((i+2)%4)) ); - CGAL_triangulation_assertion(c_cp_nb->second[n_nb] + CGAL_assertion(c_cp_nb->second[n_nb] ->has_vertex(c_cp->second[n]->vertex((i+3)%4)) ); c_cp->second[n]->set_neighbor(i,c_cp_nb->second[n_nb]); } @@ -3731,25 +3894,25 @@ Periodic_3_triangulation_3::convert_to_27_sheeted_covering() oit = off_nb.begin(); for(typename std::list::iterator cit = original_cells.begin(); cit != original_cells.end(); ++cit, ++oit) { - CGAL_triangulation_assertion( oit != off_nb.end() ); + CGAL_assertion( oit != off_nb.end() ); for(int i=0; i<4; i++) { Offset nboff = (*oit)[i]; if(!nboff.is_null()) { Cell_handle cit_nb = (*cit)->neighbor(i); VCRMIT c_cp_nb = virtual_cells_reverse.find(cit_nb); - CGAL_triangulation_assertion(c_cp_nb != virtual_cells_reverse.end()); + CGAL_assertion(c_cp_nb != virtual_cells_reverse.end()); int o_i = (3-nboff.x())%3; int o_j = (3-nboff.y())%3; int o_k = (3-nboff.z())%3; int n_nb = 9*o_i+3*o_j+o_k-1; - CGAL_triangulation_assertion(n_nb >= 0); - CGAL_triangulation_assertion(static_cast(n_nb) + CGAL_assertion(n_nb >= 0); + CGAL_assertion(static_cast(n_nb) <= c_cp_nb->second.size()); - CGAL_triangulation_assertion(c_cp_nb->second[n_nb] + CGAL_assertion(c_cp_nb->second[n_nb] ->has_vertex((*cit)->vertex((i+1)%4)) ); - CGAL_triangulation_assertion(c_cp_nb->second[n_nb] + CGAL_assertion(c_cp_nb->second[n_nb] ->has_vertex((*cit)->vertex((i+2)%4)) ); - CGAL_triangulation_assertion(c_cp_nb->second[n_nb] + CGAL_assertion(c_cp_nb->second[n_nb] ->has_vertex((*cit)->vertex((i+3)%4)) ); (*cit)->set_neighbor(i,c_cp_nb->second[n_nb]); } @@ -3767,7 +3930,7 @@ Periodic_3_triangulation_3::convert_to_27_sheeted_covering() for(typename std::list::iterator cit = original_cells.begin(); cit != original_cells.end(); ++cit) { VCRMIT c_cp = virtual_cells_reverse.find(*cit); - CGAL_triangulation_assertion( c_cp != virtual_cells_reverse.end()); + CGAL_assertion( c_cp != virtual_cells_reverse.end()); Offset off[4]; for(int i=0; i<4; i++) off[i] = int_to_off((*cit)->offset(i)); @@ -3788,9 +3951,9 @@ Periodic_3_triangulation_3::convert_to_27_sheeted_covering() off_cp[i] = Offset((o_i==2)?off[i].x():0, (o_j==2)?off[i].y():0, (o_k==2)?off[i].z():0); - CGAL_triangulation_assertion(off_cp[i].x() == 0 || off_cp[i].x() == 1); - CGAL_triangulation_assertion(off_cp[i].y() == 0 || off_cp[i].y() == 1); - CGAL_triangulation_assertion(off_cp[i].z() == 0 || off_cp[i].z() == 1); + CGAL_assertion(off_cp[i].x() == 0 || off_cp[i].x() == 1); + CGAL_assertion(off_cp[i].y() == 0 || off_cp[i].y() == 1); + CGAL_assertion(off_cp[i].z() == 0 || off_cp[i].z() == 1); } set_offsets(c_cp->second[n],off_cp[0],off_cp[1],off_cp[2],off_cp[3]); } @@ -3801,14 +3964,14 @@ Periodic_3_triangulation_3::convert_to_27_sheeted_covering() cit != original_cells.end(); ++cit) { //This statement does not seem to have any effect set_offsets(*cit, 0,0,0,0); - CGAL_triangulation_assertion((*cit)->offset(0) == 0); - CGAL_triangulation_assertion((*cit)->offset(1) == 0); - CGAL_triangulation_assertion((*cit)->offset(2) == 0); - CGAL_triangulation_assertion((*cit)->offset(3) == 0); + CGAL_assertion((*cit)->offset(0) == 0); + CGAL_assertion((*cit)->offset(1) == 0); + CGAL_assertion((*cit)->offset(2) == 0); + CGAL_assertion((*cit)->offset(3) == 0); } _cover = CGAL::make_array(3,3,3); - CGAL_triangulation_expensive_assertion(is_valid()); + CGAL_expensive_assertion(is_valid()); update_cover_data_after_converting_to_27_sheeted_covering(); } @@ -3840,7 +4003,7 @@ Periodic_3_triangulation_3::get_cell(const Vertex_handle* vh) const incident_cells(vh[3],std::back_inserter(cells)); for( typename std::vector::iterator it = cells.begin(); it != cells.end(); it++ ) { - CGAL_triangulation_assertion( + CGAL_assertion( (*it)->vertex(0) == vh[3] || (*it)->vertex(1) == vh[3] ||(*it)->vertex(2) == vh[3] || (*it)->vertex(3) == vh[3]); for( int j=0; j<3; j++ ) { @@ -3854,12 +4017,12 @@ Periodic_3_triangulation_3::get_cell(const Vertex_handle* vh) const return (*it); } } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return Cell_handle(); } /*! \brief gets the offset of tester.point() such that - * this point is in conflict with c w.r.t tester.get_offset(). + * this point is in conflict with c w.r.t. tester.get_offset(). * * Implementation: Just try all eight possibilities. */ @@ -3869,12 +4032,12 @@ inline typename Periodic_3_triangulation_3::Offset Periodic_3_triangulation_3::get_location_offset( const Conflict_tester& tester, Cell_handle c) const { - CGAL_triangulation_precondition( number_of_vertices() != 0 ); + CGAL_precondition( number_of_vertices() != 0 ); int cumm_off = c->offset(0) | c->offset(1) | c->offset(2) | c->offset(3); if(cumm_off == 0) { // default case: - CGAL_triangulation_assertion(tester(c, Offset())); + CGAL_assertion(tester(c, Offset())); return Offset(); } else { // Main idea seems to just test all possibilities. @@ -3886,7 +4049,7 @@ Periodic_3_triangulation_3::get_location_offset( } } } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return Offset(); } @@ -3896,7 +4059,7 @@ inline typename Periodic_3_triangulation_3::Offset Periodic_3_triangulation_3::get_location_offset( const Conflict_tester& tester, Cell_handle c, bool& found) const { - CGAL_triangulation_precondition( number_of_vertices() != 0 ); + CGAL_precondition( number_of_vertices() != 0 ); found = false; @@ -3932,8 +4095,8 @@ Periodic_3_triangulation_3::neighbor_offset( Cell_handle ch, int i, Cell_handle nb) const { // Redundance in the signature! - CGAL_triangulation_precondition(ch->neighbor(i) == nb); - CGAL_triangulation_precondition(nb->neighbor(nb->index(ch)) == ch); + CGAL_precondition(ch->neighbor(i) == nb); + CGAL_precondition(nb->neighbor(nb->index(ch)) == ch); Vertex_handle vertex_ch; int index_ch, index_nb; @@ -3978,17 +4141,17 @@ inline void Periodic_3_triangulation_3::get_vertex( // if 'vh_i' is not contained in virtual_vertices, then it is in // the original domain. vh = vh_i; - CGAL_triangulation_assertion(vh != Vertex_handle()); + CGAL_assertion(vh != Vertex_handle()); } else { // otherwise it has to be looked up as well as its offset. vh = it->second.first; off += it->second.second; - CGAL_triangulation_assertion(vh->point().x() < domain().xmax()); - CGAL_triangulation_assertion(vh->point().y() < domain().ymax()); - CGAL_triangulation_assertion(vh->point().z() < domain().zmax()); - CGAL_triangulation_assertion(vh->point().x() >= domain().xmin()); - CGAL_triangulation_assertion(vh->point().y() >= domain().ymin()); - CGAL_triangulation_assertion(vh->point().z() >= domain().zmin()); + CGAL_assertion(vh->point().x() < domain().xmax()); + CGAL_assertion(vh->point().y() < domain().ymax()); + CGAL_assertion(vh->point().z() < domain().zmax()); + CGAL_assertion(vh->point().x() >= domain().xmin()); + CGAL_assertion(vh->point().y() >= domain().ymin()); + CGAL_assertion(vh->point().z() >= domain().zmin()); } } @@ -4007,7 +4170,7 @@ operator>> (std::istream& is, Periodic_3_triangulation_3& tr) // of vertices, plus the non combinatorial information on each cell // the neighbors of each cell by their index in the preceding list of cells { - CGAL_triangulation_precondition(is.good()); + CGAL_precondition(is.good()); typedef Periodic_3_triangulation_3 Triangulation; typedef typename Triangulation::size_type size_type; @@ -4035,7 +4198,7 @@ operator>> (std::istream& is, Periodic_3_triangulation_3& tr) read(is,n); } - CGAL_triangulation_assertion((n/(cx*cy*cz))*cx*cy*cz == n); + CGAL_assertion((n/(cx*cy*cz))*cx*cy*cz == n); tr.tds().set_dimension((n==0?-2:3)); tr._gt.set_domain(domain); @@ -4093,7 +4256,7 @@ operator>> (std::istream& is, Periodic_3_triangulation_3& tr) for(std::size_t j=0; j < m; j++) is >> *(C[j]); - CGAL_triangulation_expensive_assertion( tr.is_valid() ); + CGAL_expensive_assertion( tr.is_valid() ); return is; } @@ -4167,13 +4330,13 @@ operator<< (std::ostream& os,const Periodic_3_triangulation_3& tr) os << it->point() << std::endl << Offset(0,0,0) << std::endl; else os << it->point() << Offset(0,0,0); - CGAL_triangulation_assertion(tr.virtual_vertices_reverse.find(it) + CGAL_assertion(tr.virtual_vertices_reverse.find(it) != tr.virtual_vertices_reverse.end()); vv = tr.virtual_vertices_reverse.find(it)->second; - CGAL_triangulation_assertion(vv.size() == 26); + CGAL_assertion(vv.size() == 26); for(std::size_t j=0; jpoint() << std::endl @@ -4182,7 +4345,7 @@ operator<< (std::ostream& os,const Periodic_3_triangulation_3& tr) } } } - CGAL_triangulation_postcondition(i == tr.number_of_sheets()[0] * + CGAL_postcondition(i == tr.number_of_sheets()[0] * tr.number_of_sheets()[1] * tr.number_of_sheets()[2] * n); @@ -4255,12 +4418,12 @@ test_next(const Periodic_3_triangulation_3& t1, queue.pop_back(); // Precondition: c1, c2 have been registered as well as their 4 vertices. - CGAL_triangulation_precondition(t1.number_of_vertices() != 0); - CGAL_triangulation_precondition(Cmap[c1] == c2); - CGAL_triangulation_precondition(Vmap.find(c1->vertex(0)) != Vmap.end()); - CGAL_triangulation_precondition(Vmap.find(c1->vertex(1)) != Vmap.end()); - CGAL_triangulation_precondition(Vmap.find(c1->vertex(2)) != Vmap.end()); - CGAL_triangulation_precondition(Vmap.find(c1->vertex(3)) != Vmap.end()); + CGAL_precondition(t1.number_of_vertices() != 0); + CGAL_precondition(Cmap[c1] == c2); + CGAL_precondition(Vmap.find(c1->vertex(0)) != Vmap.end()); + CGAL_precondition(Vmap.find(c1->vertex(1)) != Vmap.end()); + CGAL_precondition(Vmap.find(c1->vertex(2)) != Vmap.end()); + CGAL_precondition(Vmap.find(c1->vertex(3)) != Vmap.end()); for(int i=0; i <= 3; ++i) { Cell_handle1 n1 = c1->neighbor(i); diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Functor_with_offset_points_adaptor_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Functor_with_offset_points_adaptor_3.h index d968105d..d43aeaa1 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Functor_with_offset_points_adaptor_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Functor_with_offset_points_adaptor_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Functor_with_offset_points_adaptor_3.h $ -// $Id: Functor_with_offset_points_adaptor_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Functor_with_offset_points_adaptor_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Functor_with_offset_points_adaptor_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Functor_with_offset_weighted_points_adaptor_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Functor_with_offset_weighted_points_adaptor_3.h index 4dd0fd1c..940de454 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Functor_with_offset_weighted_points_adaptor_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Functor_with_offset_weighted_points_adaptor_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Functor_with_offset_weighted_points_adaptor_3.h $ -// $Id: Functor_with_offset_weighted_points_adaptor_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Functor_with_offset_weighted_points_adaptor_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Functor_with_offset_weighted_points_adaptor_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_filtered_traits_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_filtered_traits_3.h index 665df179..115e98c6 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_filtered_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_filtered_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_filtered_traits_3.h $ -// $Id: Periodic_3_Delaunay_triangulation_filtered_traits_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_filtered_traits_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_filtered_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_remove_traits_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_remove_traits_3.h index e91f25c6..cdbb3639 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_remove_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_remove_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_remove_traits_3.h $ -// $Id: Periodic_3_Delaunay_triangulation_remove_traits_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_remove_traits_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_remove_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -16,7 +16,6 @@ #include #include -#include #include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_statically_filtered_traits_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_statically_filtered_traits_3.h index 06903dfc..be6ac673 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_statically_filtered_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_statically_filtered_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_statically_filtered_traits_3.h $ -// $Id: Periodic_3_Delaunay_triangulation_statically_filtered_traits_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_statically_filtered_traits_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_Delaunay_triangulation_statically_filtered_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_construct_point_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_construct_point_3.h index 55348950..24685a48 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_construct_point_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_construct_point_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_construct_point_3.h $ -// $Id: Periodic_3_construct_point_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_construct_point_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_construct_point_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_construct_weighted_point_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_construct_weighted_point_3.h index e000f492..71ba42ed 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_construct_weighted_point_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_construct_weighted_point_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_construct_weighted_point_3.h $ -// $Id: Periodic_3_construct_weighted_point_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_construct_weighted_point_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_construct_weighted_point_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_dummy_288.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_dummy_288.h index 8025fc54..2c097a2d 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_dummy_288.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_dummy_288.h @@ -3,13 +3,15 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_dummy_288.h $ -// $Id: Periodic_3_regular_triangulation_dummy_288.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_dummy_288.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_dummy_288.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Manuel Caroli +#include + #ifdef CGAL_INCLUDE_FROM_PERIODIC_3_REGULAR_TRIANGULATION_3_H std::vector dummy_points() @@ -37,7 +39,7 @@ std::vector dummy_points() FT z = (FT(k) * domain_z / FT(8)) + domain().zmin(); - dummy_points.push_back(Weighted_point(Bare_point(x, y, z), 0)); + dummy_points.emplace_back(Bare_point(x, y, z), 0); } } } diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_filtered_traits_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_filtered_traits_3.h index 71fb7232..aa51874b 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_filtered_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_filtered_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_filtered_traits_3.h $ -// $Id: Periodic_3_regular_triangulation_filtered_traits_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_filtered_traits_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_filtered_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_remove_traits_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_remove_traits_3.h index c5bc3382..91ad572f 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_remove_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_remove_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_remove_traits_3.h $ -// $Id: Periodic_3_regular_triangulation_remove_traits_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_remove_traits_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_remove_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_statically_filtered_traits_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_statically_filtered_traits_3.h index 8f20ceb4..08d1af20 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_statically_filtered_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_statically_filtered_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_statically_filtered_traits_3.h $ -// $Id: Periodic_3_regular_triangulation_statically_filtered_traits_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_statically_filtered_traits_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_regular_triangulation_statically_filtered_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_36.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_36.h index e6742ed0..1c95dfb4 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_36.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_36.h @@ -3,13 +3,15 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_36.h $ -// $Id: Periodic_3_triangulation_dummy_36.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_36.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_36.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Manuel Caroli +#include + #ifdef CGAL_INCLUDE_FROM_PERIODIC_3_TRIANGULATION_3_H template < class GT, class TDS > diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_generator.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_generator.h new file mode 100644 index 00000000..60d23320 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_generator.h @@ -0,0 +1,638 @@ +// Copyright (c) 2009 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_generator.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_generator.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Mael Rouxel-Labbé + +#include + +#ifdef CGAL_INCLUDE_FROM_PERIODIC_3_TRIANGULATION_3_H + +template < class GT, class TDS > +inline std::vector::Vertex_handle > +Periodic_3_triangulation_3:: +insert_generic_dummy_points() +{ + // the "info" field is the index of the neighbor offset in `neigh_offsets` + using DT3_Vb = CGAL::Triangulation_vertex_base_with_info_3; + using DT3_Cb = CGAL::Delaunay_triangulation_cell_base_3; + using DT3_TDS = CGAL::Triangulation_data_structure_3; + using DT3 = CGAL::Delaunay_triangulation_3; + using DT3_VH = typename DT3::Vertex_handle; + using DT3_CH = typename DT3::Cell_handle; + + // Compute the number of subdivisions in all directions ------------------------------------------ + + const std::array spans = { domain().xmax() - domain().xmin(), + domain().ymax() - domain().ymin(), + domain().zmax() - domain().zmin() }; + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 1) + std::cout << "Domain spans:\n" + << domain().xmin() << " " << domain().xmax() << "\n" + << domain().ymin() << " " << domain().ymax() << "\n" + << domain().zmin() << " " << domain().zmax() << std::endl; +#endif + + std::size_t min_pos = std::min_element(std::cbegin(spans), std::cend(spans)) - std::cbegin(spans); + std::size_t max_pos = std::max_element(std::cbegin(spans), std::cend(spans)) - std::cbegin(spans); + std::size_t mid_pos; + + if(min_pos == max_pos) // cubic + { + min_pos = 0; // x + mid_pos = 1; // y + max_pos = 2; // z + } + else + { + mid_pos = (min_pos + 1) % 3; + if(mid_pos == max_pos) + mid_pos = (max_pos + 1) % 3; + + if(min_pos > mid_pos && spans[min_pos] == spans[mid_pos]) + std::swap(min_pos, mid_pos); // just for convenience + } + + CGAL_assertion(min_pos < 3 && mid_pos < 3 && max_pos < 3); + CGAL_assertion(min_pos != max_pos && mid_pos != min_pos && mid_pos != max_pos); + + std::array nums_steps; + std::array steps; + + // Min: + // this doesn't work for P3M3 + sharp features due to weights creating a harder constraint of 1/64th domain_size² +// #define CGAL_P3T3_USE_EXPERIMENTAL_LARGE_STEP_IN_DUMMY_GENERATION +#ifdef CGAL_P3T3_USE_EXPERIMENTAL_LARGE_STEP_IN_DUMMY_GENERATION + nums_steps[min_pos] = 3; +#else + nums_steps[min_pos] = 6; +#endif + steps[min_pos] = spans[min_pos] / nums_steps[min_pos]; + + // Mid: do not use the min step, but redistribute the error between nums_steps[mid_pos] * min_step and the actual span + nums_steps[mid_pos] = int(to_interval(spans[mid_pos] / steps[min_pos]).first); // flooring, "min" is not a typo + steps[mid_pos] = spans[mid_pos] / nums_steps[mid_pos]; + + // Max: smaller step in the max span direction as to avoid cospherical configurations +#ifdef CGAL_P3T3_USE_EXPERIMENTAL_LARGE_STEP_IN_DUMMY_GENERATION + const FT minor_step = spans[min_pos] / FT(4); // a ratio of 3:4 makes for nicely shaped tetrahedra +#else + const FT minor_step = spans[min_pos] / FT(8); // a ratio of 6:8 makes for nicely shaped tetrahedra +#endif + nums_steps[max_pos] = int(to_interval(spans[max_pos] / minor_step).first); // flooring + CGAL_assertion(nums_steps[max_pos] >= steps[min_pos]); + + // Important! Consecutive levels in the max length have a shift (that's the `k % 2 != 0` part). + // Hence, to get proper periodicity, the number of steps needs to be even, otherwise the level + // `max - 1` and `0` would have the same shift and the Delaunay stars would not be identical everywhere. + if(nums_steps[max_pos] % 2 != 0) + ++nums_steps[max_pos]; + + // now that the number of steps is known, re-adjust the step length so that it matches the height + steps[max_pos] = spans[max_pos] / nums_steps[max_pos]; + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 1) + std::cout << "min|mid|max: " << min_pos << " " << mid_pos << " " << max_pos << std::endl; + std::cout << "nums_steps[min_pos] = " << nums_steps[min_pos] << std::endl; + std::cout << "steps[min_pos] = " << steps[min_pos] << std::endl; + std::cout << "nums_steps[mid_pos] = " << nums_steps[mid_pos] << std::endl; + std::cout << "steps[mid_pos] = " << steps[mid_pos] << std::endl; + std::cout << "minor step = " << minor_step << std::endl; + std::cout << "nums_steps[max_pos] = " << nums_steps[max_pos] << std::endl; + std::cout << "steps[max_pos] = " << steps[max_pos] << std::endl; +#endif + + auto grid_offset_to_lattice_offset = [&](const Offset& loff) -> Offset + { + const int hloz = int(std::ceil(double(loff[max_pos]) / 2.)); + + Offset goff; + goff[min_pos] = loff[min_pos] + hloz; + goff[mid_pos] = loff[mid_pos] + hloz; + goff[max_pos] = loff[max_pos]; + return goff; + }; + + auto lattice_offset_to_grid_offset = [&](const Offset& loff) -> Offset + { + const int hloz = int(std::ceil(double(loff[max_pos]) / 2.)); + + Offset goff; + goff[min_pos] = loff[min_pos] - hloz; + goff[mid_pos] = loff[mid_pos] - hloz; + goff[max_pos] = loff[max_pos]; + return goff; + }; + + // This should be prefered from building points from the lattice offset + // because the grid offset (by construction) aligns with the canonical domain, + // and there is thus fewer numerical errors. + auto construct_point_from_grid_offset = [&](const Offset& goff) -> Point_3 + { + std::array coords; + coords[min_pos] = goff[min_pos] * steps[min_pos]; + coords[mid_pos] = goff[mid_pos] * steps[mid_pos]; + coords[max_pos] = goff[max_pos] * steps[max_pos]; + + if(goff[max_pos] % 2 != 0) + { + coords[min_pos] += 0.5 * steps[min_pos]; + coords[mid_pos] += 0.5 * steps[mid_pos]; + } + + return { coords[0], coords[1], coords[2] }; + }; + + auto construct_point_from_lattice_offset = [&](const Offset& loff) -> Point_3 + { + // @fixme? verify that the lattice is indeed already reduced + + // For `min_pos = 0`, `mid_pos = 1`, `max_pos = 2`, this returns: + // CGAL::Origin + loff[0]*lv0 + loff[1]*lv1 + loff[2]*lv2 + // with + // Vector lv0 { x_step, 0, 0 }; + // Vector lv1 { 0, y_step, 0 }; + // Vector lv2 { -0.5 * x_step, -0.5 * y_step, z_step }; + + std::array coords; + coords[min_pos] = loff[min_pos] * steps[min_pos] - loff[max_pos] * steps[min_pos] / FT(2); + coords[mid_pos] = loff[mid_pos] * steps[mid_pos] - loff[max_pos] * steps[mid_pos] / FT(2); + coords[max_pos] = loff[max_pos] * steps[max_pos]; + + return { coords[0], coords[1], coords[2] }; + }; + + CGAL_USE(construct_point_from_lattice_offset); + + // Create the dummy points ----------------------------------------------------------------------- + + std::vector dummy_points; + dummy_points.reserve(nums_steps[0] * nums_steps[1] * nums_steps[2]); + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 32) + DT3 dt3; +#endif + + std::array coords; + for(int i=0; i(min_pos)) + i * steps[min_pos]; + coords[mid_pos] = domain().min_coord(static_cast(mid_pos)) + j * steps[mid_pos]; + + if(k % 2 != 0) + { + coords[min_pos] += steps[min_pos] / FT(2); + coords[mid_pos] += steps[mid_pos] / FT(2); + } + + coords[max_pos] = domain().min_coord(static_cast(max_pos)) + k * steps[max_pos]; + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 2) + std::cout << "Add dummy: " << coords[0] << " " << coords[1] << " " << coords[2] << std::endl; +#endif + dummy_points.emplace_back(coords[0], coords[1], coords[2]); + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 32) + DT3_VH dt3_v = dt3.insert(dummy_points.back()); +#endif + } + } + } + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 1) + std::cout << dummy_points.size() << " dummy points" << std::endl; +#endif + + // Build the periodic triangulation -------------------------------------------------------------- + + clear(); + tds().set_dimension(3); + set_cover(CGAL::make_array(1,1,1)); + + const std::size_t nv = static_cast(nums_steps[0] * nums_steps[1] * nums_steps[2]); + + // Create vertices + std::vector vertices; + vertices.reserve(nv); + + std::size_t id = 0; + for(int i=0; iset_point(Point(dummy_points[id++])); // wrap with Point for regular triangulations + } + } + } + + // Create cells + std::vector star_lnoffs; + std::vector > star_cells; + + auto compute_periodic_star = [&]() -> void + { + // Lattice offsets sufficient to get the complete periodic star + // + // Considering all offsets is likely an overkill because it's a special lattice with bounded angles + // and ratio, but it's a tiny triangulation so it does not matter + const std::array neigh_offsets = + {{ + {0, 0, 0}, + + // 14 offsets that are entirely contained within the scaled domain + {-1, -1, -1}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {1, 1, 0}, {1, 0, 1}, {0, -1, -1}, + {0, 1, 1}, {-1, 0, -1}, {-1, -1, 0}, {1, 1, 1}, {0, 0, -1}, {0, -1, 0}, {-1, 0, 0}, + + // 36 offsets that have a guaranteed intersection with the scaled domain + {1, 2, 0}, {1, 0, 2}, {-1, -2, -2}, {2, 1, 0}, {2, 0, 1}, {1, -1, -1}, {0, 1, 2}, + {-2, -1, -2}, {0, 2, 1}, {-1, 1, -1}, {-2, -2, -1}, {-1, -1, 1}, {1, 1, 2}, + {-1, -1, -2}, {1, 2, 1}, {0, 1, -1}, {-1, -2, -1}, {0, -1, 1}, {2, 1, 1}, + {1, 0, -1}, {1, -1, 0}, {-2, -1, -1}, {-1, 0, 1}, {-1, 1, 0}, {1, 2, 2}, + {-1, 0, -2}, {-1, -2, 0}, {2, 1, 2}, {0, -1, -2}, {2, 2, 1}, {1, 1, -1}, + {0, -2, -1}, {1, -1, 1}, {-2, -1, 0}, {-2, 0, -1}, {-1, 1, 1}, + + // 24 offsets that might have an intersection with the scaled domain (6 of them will) + {3, 2, 1}, {2, 1, -1}, {3, 1, 2}, {2, -1, 1}, {1, -1, -2}, {1, -2, -1}, + {2, 3, 1}, {1, 2, -1}, {1, 3, 2}, {-1, 2, 1}, {-1, 1, -2}, {-2, 1, -1}, + {2, 1, 3}, {1, -1, 2}, {1, 2, 3}, {-1, 1, 2}, {-1, -2, 1}, {-2, -1, 1}, + {-1, -2, -3}, {-1, -3, -2}, {-2, -1, -3}, {-3, -1, -2}, {-2, -3, -1}, {-3, -2, -1} + }}; + + star_lnoffs.reserve(neigh_offsets.size()); + star_lnoffs.push_back(neigh_offsets[0]); + + DT3 dt3; + DT3_VH v0 = dt3.insert(CGAL::ORIGIN); + CGAL_assertion(v0 != DT3_VH()); + v0->info() = 0; + + for(std::size_t oi=1; oi 1e-10 * spans[min_pos])) // might fail with inexact constructions + CGAL_warning_code({ std::cout << "WARNING: gp/lp " << gp << " ||| " << lp << std::endl; }) + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 8) + std::cout << "Lattice Offset: " << lidx[min_pos] << " " << lidx[mid_pos] << " " << lidx[max_pos] + << " yields p: " << gp << std::endl; +#endif + + DT3_VH vh = dt3.insert(gp); + CGAL_assertion(vh != DT3_VH() && vh != v0); + vh->info() = oi; + + star_lnoffs.push_back(lidx); + } + + std::list cells; + dt3.incident_cells(v0, std::back_inserter(cells)); + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 8) + std::set neighbors_in_use; +#endif + + star_cells.reserve(cells.size()); + for(DT3_CH ch : cells) + { + // To avoid keeping tracks of cells being already created or not, we only insert cells + // when they appear in the incident cells of the vertex with the smallest global ID within the call. + // + // Put the center vertex at pos 0 in the cell so that it is simple to find it + constexpr std::array, 4> permutations = + {{ + { 0, 1, 2, 3 }, + { 1, 2, 0, 3 }, + { 2, 0, 1, 3 }, + { 3, 1, 0, 2 }, + }}; + + const int v0_pos = ch->index(v0); + CGAL_postcondition(v0_pos >= 0 && v0_pos <= 3); + CGAL_assertion(ch->vertex(permutations[v0_pos][0]) == v0); + CGAL_assertion(ch->vertex(permutations[v0_pos][0])->info() == 0); + + star_cells.emplace_back(std::array{ ch->vertex(permutations[v0_pos][0])->info(), + ch->vertex(permutations[v0_pos][1])->info(), + ch->vertex(permutations[v0_pos][2])->info(), + ch->vertex(permutations[v0_pos][3])->info() }); + + CGAL_assertion_code + ( + for(int pos1=0; pos1<4; ++pos1) + for(int pos2=0; pos2<4; ++pos2) + if(pos1 != pos2) + CGAL_assertion(star_cells.back()[pos1] != star_cells.back()[pos2]); + ) + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 8) + for(int i=0; i<4; ++i) + neighbors_in_use.insert(neigh_offsets[ch->vertex(i)->info()]); +#endif + } + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 8) + std::cout << neighbors_in_use.size() << " lattice offsets in the canonical star:\n"; + for(const Offset& loff : neighbors_in_use) + std::cout << loff[min_pos] << " " << loff[mid_pos] << " " << loff[max_pos] << std::endl; + + std::cout << "as grid offsets:\n"; + for(const Offset& loff : neighbors_in_use) + { + const Offset goff = lattice_offset_to_grid_offset(loff); + std::cout << goff[min_pos] << " " << goff[mid_pos] << " " << goff[max_pos] << std::endl; + } +#endif + }; + + compute_periodic_star(); + + // @todo might be able to avoid a map by numbering uniquely cells + // with a clear vertex_id<->cell_id formula + std::map, std::pair > neighboring_facets; + + for(int i=0; i std::size_t + { + CGAL_assertion(v_idx[min_pos] >= 0 && v_idx[min_pos] < nums_steps[min_pos]); + CGAL_assertion(v_idx[mid_pos] >= 0 && v_idx[mid_pos] < nums_steps[mid_pos]); + CGAL_assertion(v_idx[max_pos] >= 0 && v_idx[max_pos] < nums_steps[max_pos]); + + return v_idx[min_pos] * nums_steps[mid_pos] * nums_steps[max_pos] + + v_idx[mid_pos] * nums_steps[max_pos] + + v_idx[max_pos]; + }; + + auto add_facet = [&](const std::set& face_vertices_ids, const Facet& f) -> void + { + CGAL_assertion(f.first != Cell_handle() && f.second >= 0 && f.second <= 3); + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 16) + std::cout << std::endl; + std::cout << "Add facet"; + for(const std::size_t vi : face_vertices_ids) + std::cout << " " << vi; + std::cout << std::endl; + + std::cout << "Positions\n"; + for(const std::size_t vi : face_vertices_ids) + std::cout << vertices[vi]->point() << std::endl; + std::cout << std::endl; +#endif + + auto insertion_result = neighboring_facets.emplace(face_vertices_ids, std::make_pair(f, Facet())); + if(!insertion_result.second) // already exists in the facet map + { + std::pair& fp = insertion_result.first->second; + CGAL_assertion(fp.first.first != Cell_handle()); // one existing neighbor since insertion failed + CGAL_assertion(fp.second.first == Cell_handle()); // two neighbors at most + CGAL_assertion(fp.second.first != f.first); // neighbors are different + fp.second = f; + + CGAL_assertion(fp.second.first != Cell_handle()); // properly set up + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 16) + std::cout << "facets" << std::endl; + std::cout << &*(fp.first.first->vertex((fp.first.second+1)%4)) << std::endl; + std::cout << &*(fp.first.first->vertex((fp.first.second+2)%4)) << std::endl; + std::cout << &*(fp.first.first->vertex((fp.first.second+3)%4)) << std::endl; + std::cout << &*(fp.second.first->vertex((fp.second.second+1)%4)) << std::endl; + std::cout << &*(fp.second.first->vertex((fp.second.second+2)%4)) << std::endl; + std::cout << &*(fp.second.first->vertex((fp.second.second+3)%4)) << std::endl; + std::cout << fp.first.first->vertex((fp.first.second+1)%4)->point() << std::endl; + std::cout << fp.first.first->vertex((fp.first.second+2)%4)->point() << std::endl; + std::cout << fp.first.first->vertex((fp.first.second+3)%4)->point() << std::endl; + std::cout << fp.second.first->vertex((fp.second.second+1)%4)->point() << std::endl; + std::cout << fp.second.first->vertex((fp.second.second+2)%4)->point() << std::endl; + std::cout << fp.second.first->vertex((fp.second.second+3)%4)->point() << std::endl; + + std::set f1_vs = { fp.first.first->vertex((fp.first.second+1)%4), + fp.first.first->vertex((fp.first.second+2)%4), + fp.first.first->vertex((fp.first.second+3)%4) }; + std::set f2_vs = { fp.second.first->vertex((fp.second.second+1)%4), + fp.second.first->vertex((fp.second.second+2)%4), + fp.second.first->vertex((fp.second.second+3)%4) }; + CGAL_assertion(f1_vs == f2_vs); +#endif + + // neighbors could be set here instead of storing pairs and doing it later, + // but it doesn't cost much and it enables checking that every face has exactly + // two incident cells + } + + const std::pair& fp = insertion_result.first->second; + CGAL_USE(fp); + CGAL_assertion(fp.first.first != Cell_handle()); // properly set up + }; + + auto add_cell = [&](const std::array& star_cell) -> Cell_handle + { +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 8) + std::cout << std::endl; + std::cout << "-- Considering cell " << star_cell[0] << " " << star_cell[1] << " " << star_cell[2] << " " << star_cell[3] << std::endl; +#endif + + // convert to lattice offset, add (lattice) neighbor offset, convert back to grid + + Offset idx; + idx[min_pos] = i; + idx[mid_pos] = j; + idx[max_pos] = k; + + const Offset lidx = grid_offset_to_lattice_offset(idx); + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 16) + std::cout << "(Recall that min/mid/max are: " << min_pos << " " << mid_pos << " " << max_pos << ")" << std::endl; + std::cout << "(Recall that steps are: " << steps[min_pos] << " " << steps[mid_pos] << " " << steps[max_pos] << ")" << std::endl; + std::cout << "(Recall that nums steps are: " << nums_steps[min_pos] << " " << nums_steps[mid_pos] << " " << nums_steps[max_pos] << ")" << std::endl; + std::cout << "grid idx: " << idx[min_pos] << " " << idx[mid_pos] << " " << idx[max_pos] << std::endl; + std::cout << "lattice idx: " << lidx[min_pos] << " " << lidx[mid_pos] << " " << lidx[max_pos] << std::endl; +#endif + + std::array glob_idx; + std::array offsets { }; + + for(int pos=0; pos<4; ++pos) + { + const Offset& lnoff = star_lnoffs[star_cell[pos]]; + + // lnoff has already been shuffled to match min/mid/max + Offset lnidx = lidx + lnoff; + + // canonical (to be) ijk of the neighbor + Offset cidx = lattice_offset_to_grid_offset(lnidx); + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 16) + std::cout << std::endl; + std::cout << "lattice neighbor offset[" << pos << "] = " << lnoff[min_pos] << " " << lnoff[mid_pos] << " " << lnoff[max_pos] << std::endl; + std::cout << "lattice neighbor idx[" << pos << "] = " << lnidx[min_pos] << " " << lnidx[mid_pos] << " " << lnidx[max_pos] << std::endl; + std::cout << "canonical idx[" << pos << "] = " << cidx[min_pos] << " " << cidx[mid_pos] << " " << cidx[max_pos] << " (before)" << std::endl; +#endif + + CGAL_warning_code(const Point_3 gp = construct_point_from_grid_offset(cidx);) + CGAL_warning_code(const Point_3 lp = construct_point_from_lattice_offset(lnidx);) + CGAL_warning_code(if(CGAL::squared_distance(gp, lp) > 1e-10 * spans[min_pos])) // might fail with inexact constructions + CGAL_warning_code({ std::cout << "WARNING: gp/lp " << gp << " ||| " << lp << std::endl; }) + + // canonicalize using indices to avoid constructions + for(int l=0; l<3; ++l) + { + offsets[pos][l] = 0; + + while(cidx[l] >= nums_steps[l]) + { + cidx[l] -= nums_steps[l]; + offsets[pos][l] += 1; + } + + while(cidx[l] < 0) + { + cidx[l] += nums_steps[l]; + offsets[pos][l] -= 1; + } + } + + glob_idx[pos] = idx_to_global(cidx); + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 16) + std::cout << "final canon idx[" << pos << "] = " << cidx[min_pos] << " " << cidx[mid_pos] << " " << cidx[max_pos] << std::endl; + std::cout << "periodic offset[" << pos << "] = " << offsets[pos] << std::endl; + std::cout << "Glob ID[" << pos << "] = " << glob_idx[pos]<< std::endl; + std::cout << "Position[" << pos << "] = " << vertices[glob_idx[pos]]->point() << std::endl; +#endif + + CGAL_assertion(glob_idx[pos] < nv); + } + + CGAL_assertion_code + ( + for(int pos1=0; pos1<4; ++pos1) + for(int pos2=0; pos2<4; ++pos2) + if(pos1 != pos2) + CGAL_assertion(glob_idx[pos1] != glob_idx[pos2]); + ) + + // trick to add facets only once per cell; can't really do that for all operations + // due to cells on the border (or, it could be done, but then + // is_not_on_top_right_up_corner must be reworked) + // + // The trick works because glob_idx[0] is always the center vertex + if(glob_idx[0] != (std::min)({glob_idx[0], glob_idx[1], glob_idx[2], glob_idx[3]})) + return Cell_handle(); + + // here and below, it's a new cell + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 16) + std::cout << "\nCell position around star center" << std::endl; + std::cout << construct_point(vertices[glob_idx[0]]->point(), offsets[0]) << std::endl; + std::cout << construct_point(vertices[glob_idx[1]]->point(), offsets[1]) << std::endl; + std::cout << construct_point(vertices[glob_idx[2]]->point(), offsets[2]) << std::endl; + std::cout << construct_point(vertices[glob_idx[3]]->point(), offsets[3]) << std::endl; +#endif + + CGAL_assertion(orientation(construct_point(vertices[glob_idx[0]]->point(), offsets[0]), + construct_point(vertices[glob_idx[1]]->point(), offsets[1]), + construct_point(vertices[glob_idx[2]]->point(), offsets[2]), + construct_point(vertices[glob_idx[3]]->point(), offsets[3])) == CGAL::POSITIVE); + + Cell_handle ch = tds().create_cell(); + CGAL_assertion(ch != Cell_handle()); + + CGAL_assertion_code(for(int pos=0; pos<4; ++pos) {) + CGAL_assertion(vertices.at(glob_idx[pos]) != Vertex_handle()); + CGAL_assertion_code(}) + + ch->set_vertices(vertices[glob_idx[0]], vertices[glob_idx[1]], vertices[glob_idx[2]], vertices[glob_idx[3]]); + set_offsets(ch, offsets[0], offsets[1], offsets[2], offsets[3]); + + for(int pos=0; pos<4; ++pos) + vertices[glob_idx[pos]]->set_cell(ch); + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 16) + std::cout << "\nCell position in P3T3" << std::endl; + std::cout << point(ch, 0) << std::endl; + std::cout << point(ch, 1) << std::endl; + std::cout << point(ch, 2) << std::endl; + std::cout << point(ch, 3) << std::endl; +#endif + + // add faces to the neighboring map + add_facet(std::set{glob_idx[0], glob_idx[1], glob_idx[2]}, Facet(ch, 3)); + add_facet(std::set{glob_idx[0], glob_idx[1], glob_idx[3]}, Facet(ch, 2)); + add_facet(std::set{glob_idx[0], glob_idx[2], glob_idx[3]}, Facet(ch, 1)); + add_facet(std::set{glob_idx[1], glob_idx[2], glob_idx[3]}, Facet(ch, 0)); + + return ch; + }; + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 4) + std::cout << std::endl; + std::cout << " ====================== VERTEX " << i << " " << j << " " << k << " ==============" << std::endl; +#endif + + for(const auto& star_cell : star_cells) + add_cell(star_cell); + } + } + } + + // build neighboring info + for(const auto& e : neighboring_facets) + { + const std::pair& fp = e.second; + const Cell_handle ch_a = fp.first.first, ch_b = fp.second.first; + const int s_a = fp.first.second, s_b = fp.second.second; + + CGAL_assertion(ch_a != Cell_handle() && ch_b != Cell_handle() && ch_a != ch_b); + CGAL_assertion(ch_a->neighbor(s_a) == Cell_handle() && ch_b->neighbor(s_b) == Cell_handle()); + + ch_a->set_neighbor(s_a, ch_b); + ch_b->set_neighbor(s_b, ch_a); + } + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 8) + std::cout << "facet map size: " << neighboring_facets.size() << std::endl; + std::cout << number_of_vertices() << " nv" << std::endl; + std::cout << number_of_cells() << " nc" << std::endl; +#endif + +#if (CGAL_P3T3_DUMMY_GENERATION_DEBUG_VERBOSITY >= 2) + CGAL_postcondition(is_valid(true)); +#else + CGAL_postcondition(is_valid()); +#endif + + return vertices; +} + +#endif // CGAL_INCLUDE_FROM_PERIODIC_3_TRIANGULATION_3_H diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_filtered_traits_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_filtered_traits_3.h index 57d9f3ae..ba8845ca 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_filtered_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_filtered_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_filtered_traits_3.h $ -// $Id: Periodic_3_triangulation_filtered_traits_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_filtered_traits_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_filtered_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_iterators_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_iterators_3.h index 208d777d..6a10e25a 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_iterators_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_iterators_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_iterators_3.h $ -// $Id: Periodic_3_triangulation_iterators_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_iterators_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_iterators_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -16,7 +16,7 @@ #include -#include +#include #include #include @@ -63,7 +63,7 @@ class Periodic_3_triangulation_tetrahedron_iterator_3 { Iterator_type it = T::STORED) : _t(t), pos(_t->cells_begin()), _it(it), _off(0) { if (_it == T::UNIQUE || _it == T::UNIQUE_COVER_DOMAIN) { - while (pos != _t->cells_end() && !is_canonical() ) + while (pos != _t->cells_end() && !_t->is_canonical(pos) ) ++pos; } } @@ -79,14 +79,14 @@ class Periodic_3_triangulation_tetrahedron_iterator_3 { ++pos; break; case T::UNIQUE: - do { ++pos; } while (pos != _t->cells_end() && !is_canonical()); + do { ++pos; } while (pos != _t->cells_end() && !_t->is_canonical(pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: increment_domain(); break; default: - CGAL_triangulation_assertion(false); + CGAL_assertion(false); }; return *this; } @@ -97,7 +97,7 @@ class Periodic_3_triangulation_tetrahedron_iterator_3 { --pos; break; case T::UNIQUE: - do { --pos; } while (pos != _t->cells_begin() && !is_canonical()); + do { --pos; } while (pos != _t->cells_begin() && !_t->is_canonical(pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: @@ -122,7 +122,7 @@ class Periodic_3_triangulation_tetrahedron_iterator_3 { bool operator==(const Periodic_tetrahedron_iterator& ti) const { - CGAL_triangulation_assertion(_it == ti._it); + CGAL_assertion(_it == ti._it); return _t == ti._t && pos == ti.pos && _off == ti._off; } @@ -156,51 +156,15 @@ class Periodic_3_triangulation_tetrahedron_iterator_3 { mutable Periodic_tetrahedron periodic_tetrahedron; // current tetrahedron. private: - // check whether pos points onto a unique edge or not. - // If we are computing in 1-sheeted covering this should - // always be true. - bool is_canonical() { - // fetch all offsets - Offset off0, off1, off2, off3; - get_edge_offsets(off0, off1, off2, off3); - - if (_t->number_of_sheets() != make_array(1,1,1)) { - // If there is one offset with entries larger than 1 then we are - // talking about a vertex that is too far away from the original - // domain to belong to a canonical triangle. - if (off0.x() > 1) return false; - if (off0.y() > 1) return false; - if (off0.z() > 1) return false; - if (off1.x() > 1) return false; - if (off1.y() > 1) return false; - if (off1.z() > 1) return false; - if (off2.x() > 1) return false; - if (off2.y() > 1) return false; - if (off2.z() > 1) return false; - if (off3.x() > 1) return false; - if (off3.y() > 1) return false; - if (off3.z() > 1) return false; - } - - // If there is one direction of space for which all offsets are - // non-zero then the edge is not canonical because we can - // take the copy closer towards the origin in that direction. - int offx = off0.x() & off1.x() & off2.x() & off3.x(); - int offy = off0.y() & off1.y() & off2.y() & off3.y(); - int offz = off0.z() & off1.z() & off2.z() & off3.z(); - - return (offx == 0 && offy == 0 && offz == 0); - } - // Artificial incrementation function that takes periodic // copies into account. void increment_domain() { int off = get_drawing_offsets(); - CGAL_triangulation_assertion(_off <= off); + CGAL_assertion(_off <= off); if (_off == off) { _off = 0; do { ++pos; } while (_it == T::UNIQUE_COVER_DOMAIN - && pos != _t->cells_end() && !is_canonical()); + && pos != _t->cells_end() && !_t->is_canonical(pos)); } else { do { ++_off; @@ -214,7 +178,7 @@ class Periodic_3_triangulation_tetrahedron_iterator_3 { void decrement_domain() { if (_off == 0) { if (pos == _t->cells_begin()) return; - do { --pos; } while (_it == T::UNIQUE_COVER_DOMAIN && !is_canonical()); + do { --pos; } while (_it == T::UNIQUE_COVER_DOMAIN && !_t->is_canonical(pos)); _off = get_drawing_offsets(); } else { int off = get_drawing_offsets(); @@ -225,32 +189,6 @@ class Periodic_3_triangulation_tetrahedron_iterator_3 { } } - // Get the canonicalized offsets of an edge. - // This works in any cover that is encoded in _t->combine_offsets - void get_edge_offsets(Offset &off0, Offset &off1, - Offset &off2, Offset &off3) const { - Offset cell_off0 = _t->int_to_off(pos->offset(0)); - Offset cell_off1 = _t->int_to_off(pos->offset(1)); - Offset cell_off2 = _t->int_to_off(pos->offset(2)); - Offset cell_off3 = _t->int_to_off(pos->offset(3)); - Offset diff_off((cell_off0.x() == 1 - && cell_off1.x() == 1 - && cell_off2.x() == 1 - && cell_off3.x() == 1)?-1:0, - (cell_off0.y() == 1 - && cell_off1.y() == 1 - && cell_off2.y() == 1 - && cell_off3.y() == 1)?-1:0, - (cell_off0.z() == 1 - && cell_off1.z() == 1 - && cell_off2.z() == 1 - && cell_off3.z() == 1)?-1:0); - off0 = _t->combine_offsets(_t->get_offset(pos,0), diff_off); - off1 = _t->combine_offsets(_t->get_offset(pos,1), diff_off); - off2 = _t->combine_offsets(_t->get_offset(pos,2), diff_off); - off3 = _t->combine_offsets(_t->get_offset(pos,3), diff_off); - } - // return an integer that encodes the translations which have to be // applied to the edge *pos int get_drawing_offsets() { @@ -262,27 +200,27 @@ class Periodic_3_triangulation_tetrahedron_iterator_3 { // internally stored inside the cell telling us that this cell // wraps around the domain. if (_it == T::UNIQUE_COVER_DOMAIN) - get_edge_offsets(off0,off1,off2,off3); + _t->get_offsets(pos, off0, off1, off2, off3); else { - CGAL_triangulation_assertion(_it == T::STORED_COVER_DOMAIN); + CGAL_assertion(_it == T::STORED_COVER_DOMAIN); off0 = _t->int_to_off(pos->offset(0)); off1 = _t->int_to_off(pos->offset(1)); off2 = _t->int_to_off(pos->offset(2)); off3 = _t->int_to_off(pos->offset(3)); } - CGAL_triangulation_assertion(off0.x() == 0 || off0.x() == 1); - CGAL_triangulation_assertion(off0.y() == 0 || off0.y() == 1); - CGAL_triangulation_assertion(off0.z() == 0 || off0.z() == 1); - CGAL_triangulation_assertion(off1.x() == 0 || off1.x() == 1); - CGAL_triangulation_assertion(off1.y() == 0 || off1.y() == 1); - CGAL_triangulation_assertion(off1.z() == 0 || off1.z() == 1); - CGAL_triangulation_assertion(off2.x() == 0 || off2.x() == 1); - CGAL_triangulation_assertion(off2.y() == 0 || off2.y() == 1); - CGAL_triangulation_assertion(off2.z() == 0 || off2.z() == 1); - CGAL_triangulation_assertion(off3.x() == 0 || off3.x() == 1); - CGAL_triangulation_assertion(off3.y() == 0 || off3.y() == 1); - CGAL_triangulation_assertion(off3.z() == 0 || off3.z() == 1); + CGAL_assertion(off0.x() == 0 || off0.x() == 1); + CGAL_assertion(off0.y() == 0 || off0.y() == 1); + CGAL_assertion(off0.z() == 0 || off0.z() == 1); + CGAL_assertion(off1.x() == 0 || off1.x() == 1); + CGAL_assertion(off1.y() == 0 || off1.y() == 1); + CGAL_assertion(off1.z() == 0 || off1.z() == 1); + CGAL_assertion(off2.x() == 0 || off2.x() == 1); + CGAL_assertion(off2.y() == 0 || off2.y() == 1); + CGAL_assertion(off2.z() == 0 || off2.z() == 1); + CGAL_assertion(off3.x() == 0 || off3.x() == 1); + CGAL_assertion(off3.y() == 0 || off3.y() == 1); + CGAL_assertion(off3.z() == 0 || off3.z() == 1); int offx = ( ((off0.x() == 0 && off1.x() == 0 && off2.x() == 0 && off3.x() == 0) @@ -301,9 +239,9 @@ class Periodic_3_triangulation_tetrahedron_iterator_3 { } Periodic_tetrahedron construct_periodic_tetrahedron() const { - CGAL_triangulation_assertion(pos != typename T::Cell_handle()); + CGAL_assertion(pos != typename T::Cell_handle()); Offset off0, off1, off2, off3; - get_edge_offsets(off0, off1, off2, off3); + _t->get_offsets(pos, off0, off1, off2, off3); Offset transl_off = Offset((((_off>>2)&1)==1 ? -1:0), (((_off>>1)&1)==1 ? -1:0), (( _off &1)==1 ? -1:0)); @@ -369,7 +307,7 @@ class Periodic_3_triangulation_triangle_iterator_3 { Iterator_type it = T::STORED) : _t(t), pos(_t->facets_begin()), _it(it), _off(0) { if (_it == T::UNIQUE || _it == T::UNIQUE_COVER_DOMAIN) { - while (pos != _t->facets_end() && !is_canonical() ) + while (pos != _t->facets_end() && !_t->is_canonical(*pos) ) ++pos; } } @@ -385,14 +323,14 @@ class Periodic_3_triangulation_triangle_iterator_3 { ++pos; break; case T::UNIQUE: - do { ++pos; } while (pos != _t->facets_end() && !is_canonical()); + do { ++pos; } while (pos != _t->facets_end() && !_t->is_canonical(*pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: increment_domain(); break; default: - CGAL_triangulation_assertion(false); + CGAL_assertion(false); }; return *this; } @@ -403,7 +341,7 @@ class Periodic_3_triangulation_triangle_iterator_3 { --pos; break; case T::UNIQUE: - do { --pos; } while (pos != _t->facets_begin() && !is_canonical()); + do { --pos; } while (pos != _t->facets_begin() && !_t->is_canonical(*pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: @@ -428,7 +366,7 @@ class Periodic_3_triangulation_triangle_iterator_3 { bool operator==(const Periodic_triangle_iterator& ti) const { - CGAL_triangulation_assertion(_it == ti._it); + CGAL_assertion(_it == ti._it); return _t == ti._t && pos == ti.pos && _off == ti._off; } @@ -462,48 +400,15 @@ class Periodic_3_triangulation_triangle_iterator_3 { mutable Periodic_triangle periodic_triangle; // current segment. private: - // check whether pos points onto a unique edge or not. - // If we are computing in 1-sheeted covering this should - // always be true. - bool is_canonical() { - // fetch all offsets - Offset off0, off1, off2; - get_edge_offsets(off0, off1, off2); - - if (_t->number_of_sheets() != make_array(1,1,1)) { - // If there is one offset with entries larger than 1 then we are - // talking about a vertex that is too far away from the original - // domain to belong to a canonical triangle. - if (off0.x() > 1) return false; - if (off0.y() > 1) return false; - if (off0.z() > 1) return false; - if (off1.x() > 1) return false; - if (off1.y() > 1) return false; - if (off1.z() > 1) return false; - if (off2.x() > 1) return false; - if (off2.y() > 1) return false; - if (off2.z() > 1) return false; - } - - // If there is one direction of space for which all offsets are - // non-zero then the edge is not canonical because we can - // take the copy closer towards the origin in that direction. - int offx = off0.x() & off1.x() & off2.x(); - int offy = off0.y() & off1.y() & off2.y(); - int offz = off0.z() & off1.z() & off2.z(); - - return (offx == 0 && offy == 0 && offz == 0); - } - // Artificial incrementation function that takes periodic // copies into account. void increment_domain() { int off = get_drawing_offsets(); - CGAL_triangulation_assertion(_off <= off); + CGAL_assertion(_off <= off); if (_off == off) { _off = 0; do { ++pos; } while (_it == T::UNIQUE_COVER_DOMAIN - && pos != _t->facets_end() && !is_canonical()); + && pos != _t->facets_end() && !_t->is_canonical(*pos)); } else { do { ++_off; @@ -517,7 +422,7 @@ class Periodic_3_triangulation_triangle_iterator_3 { void decrement_domain() { if (_off == 0) { if (pos == _t->facets_begin()) return; - do { --pos; } while (_it == T::UNIQUE_COVER_DOMAIN && !is_canonical()); + do { --pos; } while (_it == T::UNIQUE_COVER_DOMAIN && !_t->is_canonical(*pos)); _off = get_drawing_offsets(); } else { int off = get_drawing_offsets(); @@ -528,32 +433,6 @@ class Periodic_3_triangulation_triangle_iterator_3 { } } - // Get the canonicalized offsets of an edge. - // This works in any cover that is encoded in _t->combine_offsets - void get_edge_offsets(Offset &off0, Offset &off1, Offset &off2) const { - Offset cell_off0 = _t->int_to_off(pos->first->offset((pos->second+1)&3)); - Offset cell_off1 = _t->int_to_off(pos->first->offset((pos->second+2)&3)); - Offset cell_off2 = _t->int_to_off(pos->first->offset((pos->second+3)&3)); - Offset diff_off((cell_off0.x() == 1 - && cell_off1.x() == 1 - && cell_off2.x() == 1)?-1:0, - (cell_off0.y() == 1 - && cell_off1.y() == 1 - && cell_off2.y() == 1)?-1:0, - (cell_off0.z() == 1 - && cell_off1.z() == 1 - && cell_off2.z() == 1)?-1:0); - off0 = _t->combine_offsets(_t->get_offset(pos->first, - (pos->second+1)&3), - diff_off); - off1 = _t->combine_offsets(_t->get_offset(pos->first, - (pos->second+2)&3), - diff_off); - off2 = _t->combine_offsets(_t->get_offset(pos->first, - (pos->second+3)&3), - diff_off); - } - // return an integer that encodes the translations which have to be // applied to the edge *pos int get_drawing_offsets() { @@ -565,23 +444,23 @@ class Periodic_3_triangulation_triangle_iterator_3 { // internally stored inside the cell telling us that this cell // wraps around the domain. if (_it == T::UNIQUE_COVER_DOMAIN) - get_edge_offsets(off0,off1,off2); + _t->get_offsets(*pos, off0, off1, off2); else { - CGAL_triangulation_assertion(_it == T::STORED_COVER_DOMAIN); + CGAL_assertion(_it == T::STORED_COVER_DOMAIN); off0 = _t->int_to_off(pos->first->offset((pos->second+1)&3)); off1 = _t->int_to_off(pos->first->offset((pos->second+2)&3)); off2 = _t->int_to_off(pos->first->offset((pos->second+3)&3)); } - CGAL_triangulation_assertion(off0.x() == 0 || off0.x() == 1); - CGAL_triangulation_assertion(off0.y() == 0 || off0.y() == 1); - CGAL_triangulation_assertion(off0.z() == 0 || off0.z() == 1); - CGAL_triangulation_assertion(off1.x() == 0 || off1.x() == 1); - CGAL_triangulation_assertion(off1.y() == 0 || off1.y() == 1); - CGAL_triangulation_assertion(off1.z() == 0 || off1.z() == 1); - CGAL_triangulation_assertion(off2.x() == 0 || off2.x() == 1); - CGAL_triangulation_assertion(off2.y() == 0 || off2.y() == 1); - CGAL_triangulation_assertion(off2.z() == 0 || off2.z() == 1); + CGAL_assertion(off0.x() == 0 || off0.x() == 1); + CGAL_assertion(off0.y() == 0 || off0.y() == 1); + CGAL_assertion(off0.z() == 0 || off0.z() == 1); + CGAL_assertion(off1.x() == 0 || off1.x() == 1); + CGAL_assertion(off1.y() == 0 || off1.y() == 1); + CGAL_assertion(off1.z() == 0 || off1.z() == 1); + CGAL_assertion(off2.x() == 0 || off2.x() == 1); + CGAL_assertion(off2.y() == 0 || off2.y() == 1); + CGAL_assertion(off2.z() == 0 || off2.z() == 1); int offx = ( ((off0.x() == 0 && off1.x() == 0 && off2.x() == 0) || (off0.x() == 1 && off1.x() == 1 && off2.x() == 1)) ? 0 : 1); @@ -594,9 +473,9 @@ class Periodic_3_triangulation_triangle_iterator_3 { } Periodic_triangle construct_periodic_triangle() const { - CGAL_triangulation_assertion(pos->first != typename T::Cell_handle()); + CGAL_assertion(pos->first != typename T::Cell_handle()); Offset off0, off1, off2; - get_edge_offsets(off0, off1, off2); + _t->get_offsets(*pos, off0, off1, off2); Offset transl_off = Offset((((_off>>2)&1)==1 ? -1:0), (((_off>>1)&1)==1 ? -1:0), (( _off &1)==1 ? -1:0)); @@ -659,7 +538,7 @@ class Periodic_3_triangulation_segment_iterator_3 { Iterator_type it = T::STORED) : _t(t), pos(_t->edges_begin()), _it(it), _off(0) { if (_it == T::UNIQUE || _it == T::UNIQUE_COVER_DOMAIN) { - while (pos != _t->edges_end() && !is_canonical() ) + while (pos != _t->edges_end() && !_t->is_canonical(*pos) ) ++pos; } } @@ -675,14 +554,14 @@ class Periodic_3_triangulation_segment_iterator_3 { ++pos; break; case T::UNIQUE: - do { ++pos; } while (pos != _t->edges_end() && !is_canonical()); + do { ++pos; } while (pos != _t->edges_end() && !_t->is_canonical(*pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: increment_domain(); break; default: - CGAL_triangulation_assertion(false); + CGAL_assertion(false); }; return *this; } @@ -693,7 +572,7 @@ class Periodic_3_triangulation_segment_iterator_3 { --pos; break; case T::UNIQUE: - do { --pos; } while (pos != _t->edges_begin() && !is_canonical()); + do { --pos; } while (pos != _t->edges_begin() && !_t->is_canonical(*pos)); break; case T::STORED_COVER_DOMAIN: case T::UNIQUE_COVER_DOMAIN: @@ -718,7 +597,7 @@ class Periodic_3_triangulation_segment_iterator_3 { bool operator==(const Periodic_segment_iterator& ti) const { - CGAL_triangulation_assertion(_it == ti._it); + CGAL_assertion(_it == ti._it); return _t == ti._t && pos == ti.pos && _off == ti._off; } @@ -751,45 +630,15 @@ class Periodic_3_triangulation_segment_iterator_3 { mutable Periodic_segment periodic_segment; // current segment. private: - // check whether pos points onto a unique edge or not. - // If we are computing in 1-sheeted covering this should - // always be true. - bool is_canonical() { - // fetch all offsets - Offset off0, off1; - get_edge_offsets(off0, off1); - - if (_t->number_of_sheets() != make_array(1,1,1)) { - // If there is one offset with entries larger than 1 then we are - // talking about a vertex that is too far away from the original - // domain to belong to a canonical triangle. - if (off0.x() > 1) return false; - if (off0.y() > 1) return false; - if (off0.z() > 1) return false; - if (off1.x() > 1) return false; - if (off1.y() > 1) return false; - if (off1.z() > 1) return false; - } - - // If there is one direction of space for which all offsets are - // non-zero then the edge is not canonical because we can - // take the copy closer towards the origin in that direction. - int offx = off0.x() & off1.x(); - int offy = off0.y() & off1.y(); - int offz = off0.z() & off1.z(); - - return (offx == 0 && offy == 0 && offz == 0); - } - // Artificial incrementation function that takes periodic // copies into account. void increment_domain() { int off = get_drawing_offsets(); - CGAL_triangulation_assertion(_off <= off); + CGAL_assertion(_off <= off); if (_off == off) { _off = 0; do { ++pos; } while (_it == T::UNIQUE_COVER_DOMAIN - && pos != _t->edges_end() && !is_canonical()); + && pos != _t->edges_end() && !_t->is_canonical(*pos)); } else { do { ++_off; @@ -803,7 +652,7 @@ class Periodic_3_triangulation_segment_iterator_3 { void decrement_domain() { if (_off == 0) { if (pos == _t->edges_begin()) return; - do { --pos; } while (_it == T::UNIQUE_COVER_DOMAIN && !is_canonical()); + do { --pos; } while (_it == T::UNIQUE_COVER_DOMAIN && !_t->is_canonical(*pos)); _off = get_drawing_offsets(); } else { int off = get_drawing_offsets(); @@ -814,20 +663,6 @@ class Periodic_3_triangulation_segment_iterator_3 { } } - // Get the canonicalized offsets of an edge. - // This works in any cover that is encoded in _t->combine_offsets - void get_edge_offsets(Offset &off0, Offset &off1) const { - Offset cell_off0 = _t->int_to_off(pos->first->offset(pos->second)); - Offset cell_off1 = _t->int_to_off(pos->first->offset(pos->third)); - Offset diff_off((cell_off0.x()==1 && cell_off1.x()==1)?-1:0, - (cell_off0.y()==1 && cell_off1.y()==1)?-1:0, - (cell_off0.z()==1 && cell_off1.z()==1)?-1:0); - off0 = _t->combine_offsets(_t->get_offset(pos->first,pos->second), - diff_off); - off1 = _t->combine_offsets(_t->get_offset(pos->first,pos->third), - diff_off); - } - // return an integer that encodes the translations which have to be // applied to the edge *pos int get_drawing_offsets() { @@ -839,17 +674,17 @@ class Periodic_3_triangulation_segment_iterator_3 { // internally stored inside the cell telling us that this cell // wraps around the domain. if (_it == T::UNIQUE_COVER_DOMAIN) - get_edge_offsets(off0,off1); + _t->get_offsets(*pos, off0, off1); else { - CGAL_triangulation_assertion(_it == T::STORED_COVER_DOMAIN); + CGAL_assertion(_it == T::STORED_COVER_DOMAIN); off0 = _t->int_to_off(pos->first->offset(pos->second)); off1 = _t->int_to_off(pos->first->offset(pos->third)); } Offset diff_off = off0 - off1; - CGAL_triangulation_assertion(diff_off.x() >= -1 || diff_off.x() <= 1); - CGAL_triangulation_assertion(diff_off.y() >= -1 || diff_off.y() <= 1); - CGAL_triangulation_assertion(diff_off.z() >= -1 || diff_off.z() <= 1); + CGAL_assertion(diff_off.x() >= -1 || diff_off.x() <= 1); + CGAL_assertion(diff_off.y() >= -1 || diff_off.y() <= 1); + CGAL_assertion(diff_off.z() >= -1 || diff_off.z() <= 1); return( 4*(diff_off.x() == 0 ? 0:1) + 2*(diff_off.y() == 0 ? 0:1) @@ -857,9 +692,9 @@ class Periodic_3_triangulation_segment_iterator_3 { } Periodic_segment construct_periodic_segment() const { - CGAL_triangulation_assertion(pos->first != typename T::Cell_handle()); + CGAL_assertion(pos->first != typename T::Cell_handle()); Offset off0, off1; - get_edge_offsets(off0, off1); + _t->get_offsets(*pos, off0, off1); Offset transl_off = Offset((((_off>>2)&1)==1 ? -1:0), (((_off>>1)&1)==1 ? -1:0), (( _off &1)==1 ? -1:0)); @@ -918,7 +753,7 @@ class Periodic_3_triangulation_point_iterator_3 { Iterator_type it = T::STORED) : _t(t), pos(_t->vertices_begin()), _it(it) { if (_it == T::UNIQUE || _it == T::UNIQUE_COVER_DOMAIN) { - while (pos != _t->vertices_end() && !is_canonical() ) + while (pos != _t->vertices_end() && !_t->is_canonical(pos) ) ++pos; } } @@ -936,10 +771,10 @@ class Periodic_3_triangulation_point_iterator_3 { break; case T::UNIQUE: case T::UNIQUE_COVER_DOMAIN: - do { ++pos; } while (pos != _t->vertices_end() && !is_canonical()); + do { ++pos; } while (pos != _t->vertices_end() && !_t->is_canonical(pos)); break; default: - CGAL_triangulation_assertion(false); + CGAL_assertion(false); }; return *this; } @@ -952,10 +787,10 @@ class Periodic_3_triangulation_point_iterator_3 { break; case T::UNIQUE: case T::UNIQUE_COVER_DOMAIN: - do { --pos; } while (pos != _t->vertices_begin() && !is_canonical()); + do { --pos; } while (pos != _t->vertices_begin() && !_t->is_canonical(pos)); break; default: - CGAL_triangulation_assertion(false); + CGAL_assertion(false); }; return *this; } @@ -976,7 +811,7 @@ class Periodic_3_triangulation_point_iterator_3 { bool operator==(const Periodic_point_iterator& pi) const { - CGAL_triangulation_assertion(_it == pi._it); + CGAL_assertion(_it == pi._it); return _t == pi._t && pos == pi.pos; } @@ -1009,15 +844,8 @@ class Periodic_3_triangulation_point_iterator_3 { mutable Periodic_point periodic_point; // current point. private: - // check whether pos points onto a vertex inside the original - // domain. If we are computing in 1-sheeted covering this should - // always be true. - bool is_canonical() { - return (_t->get_offset(pos) == Offset(0,0,0)); - } - Periodic_point construct_periodic_point() const { - CGAL_triangulation_assertion(pos != typename T::Vertex_handle()); + CGAL_assertion(pos != typename T::Vertex_handle()); Offset off = _t->get_offset(pos); return std::make_pair(pos->point(),off); } @@ -1031,9 +859,54 @@ class Domain_tester { Domain_tester() {} Domain_tester(const T *tr) : t(tr) {} - bool operator()(const typename T::Vertex_iterator & v) const { - return (t->get_offset(v) != typename T::Offset(0,0,0)); + bool operator()(const typename T::Cell_iterator c) const + { + return !t->is_canonical(c); + } + + bool operator()(const typename T::Facet_iterator f) const + { + return !t->is_canonical(*f); + } + + bool operator()(const typename T::Edge_iterator e) const + { + return !t->is_canonical(*e); + } + + bool operator()(const typename T::Vertex_iterator v) const + { + return !t->is_canonical(v); } + +}; + +// Iterates over the canonical cells in a periodic triangulation. +// Derives from Filter_iterator in order to add a conversion to handle +// +// Comments: +// When computing in 1-sheeted covering, there will be no difference +// between a normal Cell_iterator and this iterator +template +class Periodic_3_triangulation_unique_cell_iterator_3 + : public Filter_iterator > +{ + typedef typename T::Cell_handle Cell_handle; + typedef typename T::Cell_iterator Cell_iterator; + + typedef Filter_iterator > Base; + typedef Periodic_3_triangulation_unique_cell_iterator_3 Self; + +public: + Periodic_3_triangulation_unique_cell_iterator_3() : Base() {} + Periodic_3_triangulation_unique_cell_iterator_3(const Base &b) : Base(b) {} + + Self & operator++() { Base::operator++(); return *this; } + Self & operator--() { Base::operator--(); return *this; } + Self operator++(int) { Self tmp(*this); ++(*this); return tmp; } + Self operator--(int) { Self tmp(*this); --(*this); return tmp; } + + operator Cell_handle() const { return Base::base(); } }; // Iterates over the vertices in a periodic triangulation that are @@ -1045,15 +918,15 @@ class Domain_tester { // between a normal Vertex_iterator and this iterator template class Periodic_3_triangulation_unique_vertex_iterator_3 - : public Filter_iterator > { - + : public Filter_iterator > +{ typedef typename T::Vertex_handle Vertex_handle; typedef typename T::Vertex_iterator Vertex_iterator; typedef Filter_iterator > Base; typedef Periodic_3_triangulation_unique_vertex_iterator_3 Self; -public: +public: Periodic_3_triangulation_unique_vertex_iterator_3() : Base() {} Periodic_3_triangulation_unique_vertex_iterator_3(const Base &b) : Base(b) {} @@ -1065,6 +938,62 @@ class Periodic_3_triangulation_unique_vertex_iterator_3 operator Vertex_handle() const { return Base::base(); } }; -} //namespace CGAL +// Iterates over the canonical edges in a periodic triangulation. +// Derives from Filter_iterator in order to add a conversion to handle +// +// Comments: +// When computing in 1-sheeted covering, there will be no difference +// between a normal Edge_iterator and this iterator +template +class Periodic_3_triangulation_unique_edge_iterator_3 + : public Filter_iterator > +{ + typedef typename T::Edge Edge; + typedef typename T::Edge_iterator Edge_iterator; + + typedef Filter_iterator > Base; + typedef Periodic_3_triangulation_unique_edge_iterator_3 Self; + +public: + Periodic_3_triangulation_unique_edge_iterator_3() : Base() {} + Periodic_3_triangulation_unique_edge_iterator_3(const Base &b) : Base(b) {} + + Self & operator++() { Base::operator++(); return *this; } + Self & operator--() { Base::operator--(); return *this; } + Self operator++(int) { Self tmp(*this); ++(*this); return tmp; } + Self operator--(int) { Self tmp(*this); --(*this); return tmp; } + + operator Edge() const { return Base::base(); } +}; + +// Iterates over the canonical facets in a periodic triangulation. +// Derives from Filter_iterator in order to add a conversion to handle +// +// Comments: +// When computing in 1-sheeted covering, there will be no difference +// between a normal Facet_iterator and this iterator +template +class Periodic_3_triangulation_unique_facet_iterator_3 + : public Filter_iterator > +{ + typedef typename T::Facet Facet; + typedef typename T::Facet_iterator Facet_iterator; + + typedef Filter_iterator > Base; + typedef Periodic_3_triangulation_unique_facet_iterator_3 Self; +public: + + Periodic_3_triangulation_unique_facet_iterator_3() : Base() {} + Periodic_3_triangulation_unique_facet_iterator_3(const Base &b) : Base(b) {} + + Self & operator++() { Base::operator++(); return *this; } + Self & operator--() { Base::operator--(); return *this; } + Self operator++(int) { Self tmp(*this); ++(*this); return tmp; } + Self operator--(int) { Self tmp(*this); --(*this); return tmp; } + + operator Facet() const { return Base::base(); } +}; + +} // namespace CGAL #endif // CGAL_PERIODIC_3_TRIANGULATION_ITERATORS_3_H diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_statically_filtered_traits_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_statically_filtered_traits_3.h index 3f29b963..d6ae84d4 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_statically_filtered_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_statically_filtered_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_statically_filtered_traits_3.h $ -// $Id: Periodic_3_triangulation_statically_filtered_traits_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_statically_filtered_traits_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_statically_filtered_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Robust_periodic_weighted_circumcenter_traits_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Robust_periodic_weighted_circumcenter_traits_3.h index 41650035..e02a8a5a 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Robust_periodic_weighted_circumcenter_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Robust_periodic_weighted_circumcenter_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Robust_periodic_weighted_circumcenter_traits_3.h $ -// $Id: Robust_periodic_weighted_circumcenter_traits_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Robust_periodic_weighted_circumcenter_traits_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Robust_periodic_weighted_circumcenter_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -67,16 +67,45 @@ class Robust_periodic_construct_weighted_circumcenter_3 const Offset& o_p, const Offset& o_q, const Offset& o_r, const Offset& o_s) const { - typename Base_traits::Construct_weighted_point_3 p2wp = + typename Base_traits::Compute_weight_3 weight = + base_traits.compute_weight_3_object(); + typename Base_traits::Construct_point_3 point = + base_traits.construct_point_3_object(); + typename Base_traits::Construct_weighted_point_3 weighted_point = base_traits.construct_weighted_point_3_object(); typename Base_traits::Construct_weighted_circumcenter_3 cwc = base_traits.construct_weighted_circumcenter_3_object(); + typename Base_traits::Orientation_3 orientation = + base_traits.orientation_3_object(); typename Base_traits::Power_side_of_oriented_power_sphere_3 ps = base_traits.power_side_of_oriented_power_sphere_3_object(); - Point_3 c = cwc(p, q, r, s, o_p, o_q, o_r, o_s); + // Calling Construct_weighted_circumcenter_3(p,q,r,s,o_p,o_q,o_r,o_s) will construct + // the 3D weighted points (in Functor_with_offset_adaptor) but that is bad because + // if we're unlucky pqrs is almost flat and the orientation might become wrong + // (i.e. != POSITIVE) when we construct the Euclidean, non-periodic 3D representations + // of the points + const Point_3 euc_p = point(p, o_p); + const Point_3 euc_q = point(q, o_q); + const Point_3 euc_r = point(r, o_r); + const Point_3 euc_s = point(s, o_s); + + bool needs_exact = false; + Point_3 c; + if(orientation(euc_p, euc_q, euc_r, euc_s) != POSITIVE) // see comment above + { + needs_exact = true; + } + else + { + c = cwc(weighted_point(euc_p, weight(p)), + weighted_point(euc_q, weight(q)), + weighted_point(euc_r, weight(r)), + weighted_point(euc_s, weight(s))); + } - if(ps(p, q, r, s, p2wp(c), o_p, o_q, o_r, o_s, Offset()) != ON_POSITIVE_SIDE) + if(needs_exact || + ps(p, q, r, s, weighted_point(c), o_p, o_q, o_r, o_s, Offset()) != ON_POSITIVE_SIDE) { // switch to exact typedef typename Base_traits::Kernel K; @@ -95,28 +124,55 @@ class Robust_periodic_construct_weighted_circumcenter_3 to_exact(p), to_exact(q), to_exact(r), to_exact(s), o_p, o_q, o_r, o_s)); - CGAL_assertion(ps(p, q, r, s, p2wp(c), o_p, o_q, o_r, o_s, Offset()) == ON_POSITIVE_SIDE); + CGAL_assertion(ps(p, q, r, s, weighted_point(c), o_p, o_q, o_r, o_s, Offset()) == ON_POSITIVE_SIDE); } return c; } - Point_3 operator()(const Weighted_point_3 & p, - const Weighted_point_3 & q, - const Weighted_point_3 & r, - const Offset& o_p, const Offset& o_q, + Point_3 operator()(const Weighted_point_3& p, + const Weighted_point_3& q, + const Weighted_point_3& r, + const Offset& o_p, + const Offset& o_q, const Offset& o_r) const { - typename Base_traits::Construct_weighted_point_3 p2wp = + typename Base_traits::Compute_weight_3 weight = + base_traits.compute_weight_3_object(); + typename Base_traits::Construct_point_3 point = + base_traits.construct_point_3_object(); + typename Base_traits::Construct_weighted_point_3 weighted_point = base_traits.construct_weighted_point_3_object(); typename Base_traits::Construct_weighted_circumcenter_3 cwc = base_traits.construct_weighted_circumcenter_3_object(); + typename Base_traits::Collinear_3 collinear = + base_traits.collinear_3_object(); typename Base_traits::Power_side_of_bounded_power_sphere_3 ps = base_traits.power_side_of_bounded_power_sphere_3_object(); - Point_3 c = cwc(p, q, r, o_p, o_q, o_r); + // Calling Construct_weighted_circumcenter_3(p,q,r,o_p,o_q,o_r) will construct + // the 3D weighted points (in Functor_with_offset_adaptor) but that is bad because + // if we're unlucky pqr is almost collinear and it becomes so when we construct the Euclidean, + // non-periodic 3D representations of the points + const Point_3 euc_p = point(p, o_p); + const Point_3 euc_q = point(q, o_q); + const Point_3 euc_r = point(r, o_r); + + bool needs_exact = false; + Point_3 c; + if(collinear(euc_p, euc_q, euc_r)) // see comment above + { + needs_exact = true; + } + else + { + c = cwc(weighted_point(euc_p, weight(p)), + weighted_point(euc_q, weight(q)), + weighted_point(euc_r, weight(r))); + } - if(ps(p, q, r, p2wp(c), o_p, o_q, o_r, Offset()) != ON_BOUNDED_SIDE) + if(needs_exact || + ps(p, q, r, weighted_point(c), o_p, o_q, o_r, Offset()) != ON_BOUNDED_SIDE) { // switch to exact typedef typename Base_traits::Kernel K; @@ -134,26 +190,51 @@ class Robust_periodic_construct_weighted_circumcenter_3 etraits.construct_weighted_circumcenter_3_object()( to_exact(p), to_exact(q), to_exact(r), o_p, o_q, o_r)); - CGAL_assertion(ps(p, q, r, p2wp(c), o_p, o_q, o_r, Offset()) == ON_BOUNDED_SIDE); + CGAL_assertion(ps(p, q, r, weighted_point(c), o_p, o_q, o_r, Offset()) == ON_BOUNDED_SIDE); } return c; } - Point_3 operator()(const Weighted_point_3 & p, - const Weighted_point_3 & q, - const Offset& o_p, const Offset& o_q) const + Point_3 operator()(const Weighted_point_3& p, + const Weighted_point_3& q, + const Offset& o_p, + const Offset& o_q) const { - typename Base_traits::Construct_weighted_point_3 p2wp = + typename Base_traits::Equal_3 equal = + base_traits.equal_3_object(); + typename Base_traits::Compute_weight_3 weight = + base_traits.compute_weight_3_object(); + typename Base_traits::Construct_point_3 point = + base_traits.construct_point_3_object(); + typename Base_traits::Construct_weighted_point_3 weighted_point = base_traits.construct_weighted_point_3_object(); typename Base_traits::Construct_weighted_circumcenter_3 cwc = base_traits.construct_weighted_circumcenter_3_object(); typename Base_traits::Power_side_of_bounded_power_sphere_3 ps = base_traits.power_side_of_bounded_power_sphere_3_object(); - Point_3 c = cwc(p, q, o_p, o_q); + // Calling Construct_weighted_circumcenter_3(p,q,o_p,o_q) will construct + // the 3D weighted points (in Functor_with_offset_adaptor) but that is bad because + // if we're unlucky p and q become equal when we construct the Euclidean, + // non-periodic 3D representations of the points + const Point_3 euc_p = point(p, o_p); + const Point_3 euc_q = point(q, o_q); + + bool needs_exact = false; + Point_3 c; + if(equal(euc_p, euc_q)) // see comment above + { + needs_exact = true; + } + else + { + c = cwc(weighted_point(euc_p, weight(p)), + weighted_point(euc_q, weight(q))); + } - if(ps(p, q, p2wp(c), o_p, o_q, Offset()) != ON_BOUNDED_SIDE) + if(needs_exact || + ps(p, q, weighted_point(c), o_p, o_q, Offset()) != ON_BOUNDED_SIDE) { // switch to exact typedef typename Base_traits::Kernel K; @@ -171,7 +252,7 @@ class Robust_periodic_construct_weighted_circumcenter_3 etraits.construct_weighted_circumcenter_3_object()( to_exact(p), to_exact(q), o_p, o_q)); - CGAL_assertion(ps(p, q, p2wp(c), o_p, o_q, Offset()) == ON_BOUNDED_SIDE); + CGAL_assertion(ps(p, q, weighted_point(c), o_p, o_q, Offset()) == ON_BOUNDED_SIDE); } return c; diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_orientation_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_orientation_3.h index 5f8d17c0..7b987771 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_orientation_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_orientation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_orientation_3.h $ -// $Id: Periodic_3_orientation_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_orientation_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_orientation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_power_side_of_oriented_power_sphere_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_power_side_of_oriented_power_sphere_3.h index a1956dbd..f6cafe2b 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_power_side_of_oriented_power_sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_power_side_of_oriented_power_sphere_3.h @@ -3,15 +3,18 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_power_side_of_oriented_power_sphere_3.h $ -// $Id: Periodic_3_power_side_of_oriented_power_sphere_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_power_side_of_oriented_power_sphere_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_power_side_of_oriented_power_sphere_3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé #ifndef CGAL_INTERNAL_STATIC_FILTERS_PERIODIC_3_POWER_TEST_3_H #define CGAL_INTERNAL_STATIC_FILTERS_PERIODIC_3_POWER_TEST_3_H +#include + + #include #include #include diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_side_of_oriented_sphere_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_side_of_oriented_sphere_3.h index 568fdc9f..41238849 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_side_of_oriented_sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_side_of_oriented_sphere_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_side_of_oriented_sphere_3.h $ -// $Id: Periodic_3_side_of_oriented_sphere_3.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_side_of_oriented_sphere_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/Static_filters/Periodic_3_side_of_oriented_sphere_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/canonicalize_helper.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/canonicalize_helper.h index 3168c7a2..9890c8b3 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/canonicalize_helper.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_3/internal/canonicalize_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/canonicalize_helper.h $ -// $Id: canonicalize_helper.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/canonicalize_helper.h $ +// $Id: include/CGAL/Periodic_3_triangulation_3/internal/canonicalize_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -39,60 +39,13 @@ namespace CGAL { namespace P3T3 { // can't name it Periodic_3_triangulation_3 because it's already a class... namespace internal { +// Given a point `p` in space, compute its offset `o` with respect to the canonical +// domain (i.e., p + o * d is in the canonical domain) and returns `(p, o)` template std::pair -construct_periodic_point_exact(const typename Gt_::Point_3& p, - const Gt_& gt) -{ - typedef Gt_ Geom_traits; - typedef typename Geom_traits::Periodic_3_offset_3 Offset; - typedef typename Geom_traits::Iso_cuboid_3 Iso_cuboid; - - const Iso_cuboid& domain = gt.get_domain(); - - typedef typename Geom_traits::Kernel K; - typedef typename Exact_kernel_selector::Exact_kernel EK; - typedef typename Exact_kernel_selector::C2E C2E; - - C2E to_exact; - - typedef Periodic_3_triangulation_traits_3 Exact_traits; - Exact_traits etraits(to_exact(domain)); - - Offset transl(0, 0, 0); - typename EK::Point_3 ep = to_exact(p); - typename EK::Point_3 dp; - - const typename EK::Iso_cuboid_3& exact_domain = etraits.get_domain(); - - while(true) /* while not in */ - { - dp = etraits.construct_point_3_object()(ep, transl); - - if(dp.x() < exact_domain.xmin()) - transl.x() += 1; - else if(dp.y() < exact_domain.ymin()) - transl.y() += 1; - else if(dp.z() < exact_domain.zmin()) - transl.z() += 1; - else if(!(dp.x() < exact_domain.xmax())) - transl.x() -= 1; - else if(!(dp.y() < exact_domain.ymax())) - transl.y() -= 1; - else if(!(dp.z() < exact_domain.zmax())) - transl.z() -= 1; - else - break; - } - - return std::make_pair(p, transl); -} - -// Given a point `p` in space, compute its offset `o` with respect -// to the canonical instance and returns (p, o) -template -std::pair -construct_periodic_point(const typename Gt_::Point_3& p, bool& encountered_issue, const Gt_& gt) +construct_periodic_point(const typename Gt_::Point_3& p, + bool& encountered_issue, + const Gt_& gt) { typedef Gt_ Geom_traits; typedef typename Geom_traits::Point_3 Point; @@ -101,13 +54,18 @@ construct_periodic_point(const typename Gt_::Point_3& p, bool& encountered_issue const Iso_cuboid& domain = gt.get_domain(); + // Use these rather than Construct_point_3 to avoid construction inaccuracies + typename Geom_traits::Compare_x_3 cmp_x3 = gt.compare_x_3_object(); + typename Geom_traits::Compare_y_3 cmp_y3 = gt.compare_y_3_object(); + typename Geom_traits::Compare_z_3 cmp_z3 = gt.compare_z_3_object(); + // Check if p lies within the domain. If not, translate. if(!(p.x() < domain.xmin()) && p.x() < domain.xmax() && !(p.y() < domain.ymin()) && p.y() < domain.ymax() && !(p.z() < domain.zmin()) && p.z() < domain.zmax()) + { return std::make_pair(p, Offset()); - - typename Geom_traits::Construct_point_3 cp = gt.construct_point_3_object(); + } // Numerical approximations might create inconsistencies between the constructions // and the comparisons. For example in a cubic domain of size 2: @@ -120,9 +78,10 @@ construct_periodic_point(const typename Gt_::Point_3& p, bool& encountered_issue // // If this is happening the 'Last_change' enum will break this infinite // loop and return the wrong point and the 'encountered_issue' bool will be - // set to 'true'. An exact version of this function should then be called. + // set to 'true'. An exact version of this function is then be called. - enum Last_change { + enum Last_change + { NO_LAST_CHANGE, INCREASED_X, DECREASED_X, INCREASED_Y, DECREASED_Y, INCREASED_Z, DECREASED_Z }; @@ -131,13 +90,14 @@ construct_periodic_point(const typename Gt_::Point_3& p, bool& encountered_issue bool in = false; Offset transl(0, 0, 0); - Point dp; + const Offset null_off(0, 0, 0); + + Point domain_m(domain.xmin(), domain.ymin(), domain.zmin()); + Point domain_M(domain.xmax(), domain.ymax(), domain.zmax()); while(!in) { - dp = cp(p, transl); - - if(dp.x() < domain.xmin()) + if(cmp_x3(p, domain_m, transl, null_off) == SMALLER) { if(lc == DECREASED_X) // stuck in a loop break; @@ -145,7 +105,7 @@ construct_periodic_point(const typename Gt_::Point_3& p, bool& encountered_issue lc = INCREASED_X; transl.x() += 1; } - else if(dp.y() < domain.ymin()) + else if(cmp_y3(p, domain_m, transl, null_off) == SMALLER) { if(lc == DECREASED_Y) // stuck in a loop break; @@ -153,7 +113,7 @@ construct_periodic_point(const typename Gt_::Point_3& p, bool& encountered_issue lc = INCREASED_Y; transl.y() += 1; } - else if(dp.z() < domain.zmin()) + else if(cmp_z3(p, domain_m, transl, null_off) == SMALLER) { if(lc == DECREASED_Z) // stuck in a loop break; @@ -161,7 +121,7 @@ construct_periodic_point(const typename Gt_::Point_3& p, bool& encountered_issue lc = INCREASED_Z; transl.z() += 1; } - else if(!(dp.x() < domain.xmax())) + else if(!(cmp_x3(p, domain_M, transl, null_off) == SMALLER)) { if(lc == INCREASED_X) // stuck in a loop break; @@ -169,7 +129,7 @@ construct_periodic_point(const typename Gt_::Point_3& p, bool& encountered_issue lc = DECREASED_X; transl.x() -= 1; } - else if(!(dp.y() < domain.ymax())) + else if(!(cmp_y3(p, domain_M, transl, null_off) == SMALLER)) { if(lc == INCREASED_Y) // stuck in a loop break; @@ -177,7 +137,7 @@ construct_periodic_point(const typename Gt_::Point_3& p, bool& encountered_issue lc = DECREASED_Y; transl.y() -= 1; } - else if(!(dp.z() < domain.zmax())) + else if(!(cmp_z3(p, domain_M, transl, null_off) == SMALLER)) { if(lc == INCREASED_Z) // stuck in a loop break; @@ -193,157 +153,79 @@ construct_periodic_point(const typename Gt_::Point_3& p, bool& encountered_issue std::pair pp(p, transl); - if(dp.x() < domain.xmin() || !(dp.x() < domain.xmax()) || - dp.y() < domain.ymin() || !(dp.y() < domain.ymax()) || - dp.z() < domain.zmin() || !(dp.z() < domain.zmax())) + if(cmp_x3(p, domain_m, transl, null_off) == SMALLER || // < min + cmp_y3(p, domain_m, transl, null_off) == SMALLER || + cmp_z3(p, domain_m, transl, null_off) == SMALLER || + !(cmp_x3(p, domain_M, transl, null_off) == SMALLER) || // >= max + !(cmp_y3(p, domain_M, transl, null_off) == SMALLER) || + !(cmp_z3(p, domain_M, transl, null_off) == SMALLER)) { encountered_issue = true; - pp = construct_periodic_point_exact(p, gt); } return pp; } -template -bool -is_point_too_close_to_border(const std::pair& pbp, - const Gt_& gt) -{ - typedef Gt_ Geom_traits; - typedef typename Geom_traits::FT FT; - typedef typename Geom_traits::Point_3 Bare_point; - typedef typename Geom_traits::Iso_cuboid_3 Iso_cuboid; - - typename Geom_traits::Construct_point_3 cp = gt.construct_point_3_object(); - - const Bare_point p = cp(pbp.first /*point*/, pbp.second /*offset*/); - const FT px = p.x(); - const FT py = p.y(); - const FT pz = p.z(); - - const Iso_cuboid& domain = gt.get_domain(); - const FT dxm = domain.xmin(); - const FT dym = domain.ymin(); - const FT dzm = domain.zmin(); - const FT dxM = domain.xmax(); - const FT dyM = domain.ymax(); - const FT dzM = domain.zmax(); - - // simply comparing to FT::epsilon() is probably not completely satisfactory - const FT eps = std::numeric_limits::epsilon(); - - FT diff = CGAL::abs(px - dxm); - if(diff < eps && diff > 0) return true; - diff = CGAL::abs(px - dxM); - if(diff < eps && diff > 0) return true; - diff = CGAL::abs(py - dym); - if(diff < eps && diff > 0) return true; - diff = CGAL::abs(py - dyM); - if(diff < eps && diff > 0) return true; - diff = CGAL::abs(pz - dzm); - if(diff < eps && diff > 0) return true; - diff = CGAL::abs(pz - dzM); - if(diff < eps && diff > 0) return true; - return false; -} - template typename Gt_::Point_3 -snap_to_domain_border(const typename Gt_::Point_3& p, const Gt_& gt) +constrain_to_canonical_domain(const typename Gt_::Point_3& p, + const Gt_& gt) { typedef Gt_ Geom_traits; typedef typename Geom_traits::FT FT; typedef typename Geom_traits::Iso_cuboid_3 Iso_cuboid; - const FT px = p.x(); - const FT py = p.y(); - const FT pz = p.z(); - FT sx = px, sy = py, sz = pz; + typename Geom_traits::Construct_point_3 cp = gt.construct_point_3_object(); const Iso_cuboid& domain = gt.get_domain(); - const FT dxm = domain.xmin(); - const FT dym = domain.ymin(); - const FT dzm = domain.zmin(); - const FT dxM = domain.xmax(); - const FT dyM = domain.ymax(); - const FT dzM = domain.zmax(); - - // simply comparing to FT::epsilon() is probably not completely satisfactory - const FT eps = std::numeric_limits::epsilon(); - - if(CGAL::abs(px - dxm) < eps) sx = dxm; - if(CGAL::abs(px - dxM) < eps) sx = dxM; - if(CGAL::abs(py - dym) < eps) sy = dym; - if(CGAL::abs(py - dyM) < eps) sy = dyM; - if(CGAL::abs(pz - dzm) < eps) sz = dzm; - if(CGAL::abs(pz - dzM) < eps) sz = dzM; - - return gt.construct_point_3_object()(sx, sy, sz); -} - -template -typename Gt_::Weighted_point_3 -snap_to_domain_border(const typename Gt_::Weighted_point_3& p, - const Gt_& gt) -{ - typedef Gt_ Geom_traits; - typedef typename Geom_traits::Point_3 Bare_point; - - typename Geom_traits::Compute_weight_3 cw = gt.compute_weight_3_object(); - - const Bare_point snapped_p = snap_to_domain_border(gt.construct_point_3_object()(p), gt); - - return gt.construct_weighted_point_3_object()(snapped_p, cw(p)); + FT x = p.x(); + FT y = p.y(); + FT z = p.z(); + + if(p.x() < domain.xmin() || p.x() >= domain.xmax()) + x = domain.xmin(); + if(p.y() < domain.ymin() || p.y() >= domain.ymax()) + y = domain.ymin(); + if(p.z() < domain.zmin() || p.z() >= domain.zmax()) + z = domain.zmin(); + + return cp(x, y, z); } /// transform a bare point (living anywhere in space) into the canonical /// instance of the same bare point that lives inside the base domain template typename Gt_::Point_3 -robust_canonicalize_point(const typename Gt_::Point_3& p, const Gt_& gt) +robust_canonicalize_point(const typename Gt_::Point_3& p, + const Gt_& gt) { typedef Gt_ Geom_traits; typedef typename Geom_traits::Point_3 Bare_point; typedef typename Geom_traits::Periodic_3_offset_3 Offset; typedef typename Geom_traits::Iso_cuboid_3 Iso_cuboid; + typename Geom_traits::Construct_point_3 cp = gt.construct_point_3_object(); + const Iso_cuboid& domain = gt.get_domain(); if(p.x() >= domain.xmin() && p.x() < domain.xmax() && p.y() >= domain.ymin() && p.y() < domain.ymax() && p.z() >= domain.zmin() && p.z() < domain.zmax()) return p; - bool should_snap = false; - std::pair pbp = construct_periodic_point(p, should_snap, gt); - - if(!should_snap) - { - // Even if there is no issue while constructing the canonical point, - // snap the point if it's too close to a border of the domain - should_snap = is_point_too_close_to_border(pbp, gt); - } + bool encountered_issue = false; + std::pair pbp = construct_periodic_point(p, encountered_issue, gt); + Bare_point canonical_p = cp(pbp.first /*point*/, pbp.second /*offset*/); - if(should_snap) + if(encountered_issue) { - Bare_point sp = snap_to_domain_border(p, gt); - - // might have snapped to a 'max' of the domain, which is not in the domain - // note: we could snap to 'min' all the time in 'snap_to_domain_border' - // but this is clearer like that (and costs very little since we should - // not have to use exact computations too often) - return robust_canonicalize_point(sp, gt); + // If we encountered an issue, there's no guarantee that the double construction gives a point + // in the domain (even if we computed it exactly beforehand). So, forcefully put it into the domain. + canonical_p = constrain_to_canonical_domain(canonical_p, gt); } - typename Geom_traits::Construct_point_3 cp = gt.construct_point_3_object(); - - Bare_point canonical_p = cp(pbp.first /*point*/, pbp.second /*offset*/); - CGAL_postcondition( !(canonical_p.x() < domain.xmin()) && - (canonical_p.x() < domain.xmax()) ); - CGAL_postcondition( !(canonical_p.y() < domain.ymin()) && - (canonical_p.y() < domain.ymax()) ); - CGAL_postcondition( !(canonical_p.z() < domain.zmin()) && - (canonical_p.z() < domain.zmax()) ); + CGAL_postcondition( !(canonical_p.x() < domain.xmin()) && (canonical_p.x() < domain.xmax())); + CGAL_postcondition( !(canonical_p.y() < domain.ymin()) && (canonical_p.y() < domain.ymax())); + CGAL_postcondition( !(canonical_p.z() < domain.zmin()) && (canonical_p.z() < domain.zmax())); return canonical_p; } @@ -352,7 +234,8 @@ robust_canonicalize_point(const typename Gt_::Point_3& p, const Gt_& gt) /// instance of the same weighted point that lives inside the base domain template typename Gt_::Weighted_point_3 -robust_canonicalize_point(const typename Gt_::Weighted_point_3& wp, const Gt_& gt) +robust_canonicalize_point(const typename Gt_::Weighted_point_3& wp, + const Gt_& gt) { typedef Gt_ Geom_traits; typedef typename Geom_traits::Point_3 Bare_point; diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_ds_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_ds_cell_base_3.h index ac8c0085..1120d1d4 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_ds_cell_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_ds_cell_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_ds_cell_base_3.h $ -// $Id: Periodic_3_triangulation_ds_cell_base_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_ds_cell_base_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_ds_cell_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,7 @@ #include #include -#include +#include #include namespace CGAL { @@ -63,7 +63,7 @@ class Periodic_3_triangulation_ds_cell_base_3 const Vertex_handle& vertex(int i) const { - CGAL_triangulation_precondition( i >= 0 && i <= 3 ); + CGAL_precondition( i >= 0 && i <= 3 ); CGAL_assume( i >= 0 && i <= 3 ); return V[i]; } @@ -87,13 +87,13 @@ class Periodic_3_triangulation_ds_cell_base_3 if (v == V[0]) { return 0; } if (v == V[1]) { return 1; } if (v == V[2]) { return 2; } - CGAL_triangulation_assertion( v == V[3] ); + CGAL_assertion( v == V[3] ); return 3; } const Cell_handle& neighbor(int i) const { - CGAL_triangulation_precondition( i >= 0 && i <= 3); + CGAL_precondition( i >= 0 && i <= 3); return N[i]; } @@ -116,13 +116,13 @@ class Periodic_3_triangulation_ds_cell_base_3 if (n == N[0]) return 0; if (n == N[1]) return 1; if (n == N[2]) return 2; - CGAL_triangulation_assertion( n == N[3] ); + CGAL_assertion( n == N[3] ); return 3; } int offset(int i) const { - CGAL_triangulation_precondition( i >= 0 && i <= 3 ); + CGAL_precondition( i >= 0 && i <= 3 ); return ((off>>3*i)&7); } @@ -130,13 +130,13 @@ class Periodic_3_triangulation_ds_cell_base_3 void set_vertex(int i, const Vertex_handle& v) { - CGAL_triangulation_precondition( i >= 0 && i <= 3); + CGAL_precondition( i >= 0 && i <= 3); V[i] = v; } void set_neighbor(int i, const Cell_handle& n) { - CGAL_triangulation_precondition( i >= 0 && i <= 3); + CGAL_precondition( i >= 0 && i <= 3); N[i] = n; } @@ -170,7 +170,7 @@ class Periodic_3_triangulation_ds_cell_base_3 void set_offset(const Vertex_handle vh, int o) { - CGAL_triangulation_precondition(has_vertex(vh)); + CGAL_precondition(has_vertex(vh)); int vhi = index(vh); unsigned int offo[3] = {static_cast((o&1)), @@ -189,6 +189,11 @@ class Periodic_3_triangulation_ds_cell_base_3 void set_offsets(int o0,int o1,int o2,int o3) { + CGAL_precondition(o0 >= 0 && o0 <= 7); + CGAL_precondition(o1 >= 0 && o1 <= 7); + CGAL_precondition(o2 >= 0 && o2 <= 7); + CGAL_precondition(o3 >= 0 && o3 <= 7); + off = 0; // The following explicit cast are needed according to the Intel // Compiler version 12. @@ -242,7 +247,7 @@ class Periodic_3_triangulation_ds_cell_base_3 // TODO: Get rid of this flag! Used in convert_to_1_sheeted_covering. // Either use the conflict flag or a std::map. void set_additional_flag(unsigned char f) { - CGAL_triangulation_assertion(f < 4); + CGAL_assertion(f < 4); _additional_flag = f; } unsigned char get_additional_flag() const { diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_ds_vertex_base_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_ds_vertex_base_3.h index 46cce6e9..f9869821 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_ds_vertex_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_ds_vertex_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_ds_vertex_base_3.h $ -// $Id: Periodic_3_triangulation_ds_vertex_base_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_ds_vertex_base_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_ds_vertex_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_hierarchy_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_hierarchy_3.h index 1c01b1bb..98afb28a 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_hierarchy_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_hierarchy_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_hierarchy_3.h $ -// $Id: Periodic_3_triangulation_hierarchy_3.h a049e63 2020-09-25T16:55:18+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_hierarchy_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_hierarchy_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers @@ -396,7 +396,7 @@ void Periodic_3_triangulation_hierarchy_3:: remove(Vertex_handle v) { - CGAL_triangulation_precondition(v != Vertex_handle()); + CGAL_precondition(v != Vertex_handle()); CGAL_expensive_precondition(is_vertex(v)); for (int l = 0; l < maxlevel; ++l) { Vertex_handle u = v->up(); @@ -412,12 +412,12 @@ typename Periodic_3_triangulation_hierarchy_3::Vertex_handle Periodic_3_triangulation_hierarchy_3:: move_point(Vertex_handle v, const Point & p) { - CGAL_triangulation_precondition(v != Vertex_handle()); + CGAL_precondition(v != Vertex_handle()); Vertex_handle old, ret; for (int l = 0; l < maxlevel; ++l) { Vertex_handle u = v->up(); - CGAL_triangulation_assertion(hierarchy[l]->is_valid()); + CGAL_assertion(hierarchy[l]->is_valid()); Vertex_handle w = hierarchy[l]->move_point(v, p); if (l == 0) { ret = w; diff --git a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_traits_3.h b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_traits_3.h index 18f44652..4fed0505 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_3_triangulation_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_traits_3.h $ -// $Id: Periodic_3_triangulation_traits_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_traits_3.h $ +// $Id: include/CGAL/Periodic_3_triangulation_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Nico Kruithof @@ -22,7 +22,6 @@ #include #include -#include namespace CGAL { @@ -79,6 +78,12 @@ class Periodic_3_triangulation_traits_base_3 Construct_point_3; // Triangulation predicates + typedef Functor_with_offset_points_adaptor_3 + Compare_x_3; + typedef Functor_with_offset_points_adaptor_3 + Compare_y_3; + typedef Functor_with_offset_points_adaptor_3 + Compare_z_3; typedef Functor_with_offset_points_adaptor_3 Compare_xyz_3; typedef Functor_with_offset_points_adaptor_3 @@ -97,6 +102,15 @@ class Periodic_3_triangulation_traits_base_3 return Construct_point_3(&_domain, this->Kernel::construct_point_3_object()); } + Compare_x_3 compare_x_3_object() const { + return Compare_x_3(this->Kernel::compare_x_3_object(), construct_point_3_object()); + } + Compare_y_3 compare_y_3_object() const { + return Compare_y_3(this->Kernel::compare_y_3_object(), construct_point_3_object()); + } + Compare_z_3 compare_z_3_object() const { + return Compare_z_3(this->Kernel::compare_z_3_object(), construct_point_3_object()); + } Compare_xyz_3 compare_xyz_3_object() const { return Compare_xyz_3(this->Kernel::compare_xyz_3_object(), construct_point_3_object()); } diff --git a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_2.h b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_2.h index 35c7ebe4..32c627ab 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_2.h $ -// $Id: Periodic_4_hyperbolic_Delaunay_triangulation_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_2.h $ +// $Id: include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Iordan Iordanov @@ -165,15 +165,11 @@ class Periodic_4_hyperbolic_Delaunay_triangulation_2 spatial_sort(points.begin(), points.end(), geom_traits()); Face_handle f; - int cnt = 0; - int cnt_good = 0; for(typename std::vector::const_iterator p=points.begin(), end = points.end(); p != end; ++p) { - ++cnt; Vertex_handle v = insert(*p, f); if(v != Vertex_handle()) { - ++cnt_good; f = v->face(); } } @@ -271,7 +267,7 @@ class Periodic_4_hyperbolic_Delaunay_triangulation_2 Point get_dummy_point(int i) const { - CGAL_triangulation_precondition(0 <= i && i <= static_cast(dummy_points.size())); + CGAL_precondition(0 <= i && i <= static_cast(dummy_points.size())); return dummy_points[i](); } @@ -543,7 +539,7 @@ remove(Vertex_handle v) int nidx = 0; if(nbf->neighbor(1) == nb) nidx = 1; if(nbf->neighbor(2) == nb) nidx = 2; - CGAL_triangulation_assertion(nbf->neighbor(nidx) == nb); + CGAL_assertion(nbf->neighbor(nidx) == nb); bdry_nbrs.insert(Edge_neighbor(e, Neighbor_pair(nbf, nidx))); bdry_verts.push_back(nb->vertex(ccw(idx))); @@ -596,8 +592,6 @@ remove(Vertex_handle v) Nbr_history failsafe; - int internb = 0; - int bdrynb = 0; for(std::size_t i=0; ineighbor(nbidx), nbf->neighbor(nbidx)->index(nbf)); - CGAL_triangulation_assertion(side1.first->neighbor(side1.second) == side2.first); - CGAL_triangulation_assertion(side2.first->neighbor(side2.second) == side1.first); + CGAL_assertion(side1.first->neighbor(side1.second) == side2.first); + CGAL_assertion(side2.first->neighbor(side2.second) == side1.first); Nbr_pair hist(side1, side2); failsafe.push_back(hist); tds().set_adjacency(nbf, nbidx, new_f[i], k); - bdrynb++; break; } } @@ -641,7 +634,6 @@ remove(Vertex_handle v) new_f[i]->vertex(cw(k)) == new_f[l]->vertex(ccw(j))) { tds().set_adjacency(new_f[i], k, new_f[l], j); - internb++; break; } } @@ -680,7 +672,7 @@ remove(Vertex_handle v) tds().delete_face(new_f[rit]); } - CGAL_triangulation_assertion(this->is_valid(true)); + CGAL_assertion(this->is_valid(true)); return false; } @@ -712,7 +704,7 @@ remove(Vertex_handle v) tds().delete_vertex(v); - CGAL_triangulation_assertion(this->is_valid(true)); + CGAL_assertion(this->is_valid(true)); return true; } diff --git a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h index 87714b70..4a587873 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h $ -// $Id: Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h 5c8df66 2020-09-25T14:25:14+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h $ +// $Id: include/CGAL/Periodic_4_hyperbolic_Delaunay_triangulation_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Iordan Iordanov @@ -24,7 +24,7 @@ #include #include -#include +#include #include @@ -371,9 +371,9 @@ class Compute_approximate_hyperbolic_diameter Hyperbolic_point_2 operator()(const Hyperbolic_segment_2& s1, const Hyperbolic_segment_2& s2) { - if(Circular_arc_2* c1 = boost::get(&s1)) + if(Circular_arc_2* c1 = std::get_if(&s1)) { - if(Circular_arc_2* c2 = boost::get(&s2)) + if(Circular_arc_2* c2 = std::get_if(&s2)) { std::pair res = operator()(c1->circle(), c2->circle()); @@ -387,7 +387,7 @@ class Compute_approximate_hyperbolic_diameter } else { - Euclidean_segment_2* ell2 = boost::get(&s2); + Euclidean_segment_2* ell2 = std::get_if(&s2); std::pair res = operator()(c1->circle(), ell2->supporting_line()); Hyperbolic_point_2 p1 = res.first; @@ -401,8 +401,8 @@ class Compute_approximate_hyperbolic_diameter } else { - Euclidean_segment_2* ell1 = boost::get(&s1); - if(Circular_arc_2* c2 = boost::get(&s2)) + Euclidean_segment_2* ell1 = std::get_if(&s1); + if(Circular_arc_2* c2 = std::get_if(&s2)) { std::pair res = operator()(ell1->supporting_line(), c2->circle()); @@ -416,7 +416,7 @@ class Compute_approximate_hyperbolic_diameter } else { - Euclidean_segment_2* ell2 = boost::get(&s2); + Euclidean_segment_2* ell2 = std::get_if(&s2); Hyperbolic_point_2 p1 = operator()(ell1->supporting_line(), ell2->supporting_line()); CGAL_assertion(p1.x()*p1.x() + p1.y()*p1.y()) < FT(1); return p1; @@ -465,9 +465,9 @@ class Compute_approximate_hyperbolic_diameter Euclidean_line_2* l; Circle_2* c; - if(Circle_2* c_pq = boost::get(&bis_pq)) + if(Circle_2* c_pq = std::get_if(&bis_pq)) { - if(Circle_2* c_qr = boost::get(&bis_qr)) + if(Circle_2* c_qr = std::get_if(&bis_qr)) { std::pair inters = _gt.construct_inexact_intersection_2_object()(*c_pq, *c_qr); @@ -477,14 +477,14 @@ class Compute_approximate_hyperbolic_diameter return inters.second; } // here bis_qr is a line - l = boost::get(&bis_qr); + l = std::get_if(&bis_qr); c = c_pq; } else { // here bis_pq is a line - l = boost::get(&bis_pq); - c = boost::get(&bis_qr); + l = std::get_if(&bis_pq); + c = std::get_if(&bis_qr); } std::pair inters = _gt.construct_inexact_intersection_2_object()(*c, *l); diff --git a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2.h b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2.h index 2ed502b3..9529e8c0 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_triangulation_2.h $ -// $Id: Periodic_4_hyperbolic_triangulation_2.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_triangulation_2.h $ +// $Id: include/CGAL/Periodic_4_hyperbolic_triangulation_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Iordan Iordanov @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include @@ -110,7 +110,7 @@ class Periodic_4_hyperbolic_triangulation_2 Periodic_4_hyperbolic_triangulation_2(const Periodic_4_hyperbolic_triangulation_2& tr) : _gt(tr.geom_traits()) { - CGAL_triangulation_expensive_postcondition(*this == tr); + CGAL_expensive_postcondition(*this == tr); } Periodic_4_hyperbolic_triangulation_2& operator=(Periodic_4_hyperbolic_triangulation_2 tr) @@ -175,7 +175,7 @@ class Periodic_4_hyperbolic_triangulation_2 Periodic_point periodic_point(const Face_handle c, int i) const { - CGAL_triangulation_precondition(i >= 0 && i <= 2); + CGAL_precondition(i >= 0 && i <= 2); return std::make_pair(c->vertex(i)->point(), c->translation(i)); } @@ -194,8 +194,8 @@ class Periodic_4_hyperbolic_triangulation_2 Periodic_segment periodic_segment(const Face_handle c, int i, int j) const { - CGAL_triangulation_precondition(i != j); - CGAL_triangulation_precondition((i >= 0 && i <= 2) && (j >= 0 && j <= 2)); + CGAL_precondition(i != j); + CGAL_precondition((i >= 0 && i <= 2) && (j >= 0 && j <= 2)); return periodic_segment(c->vertex(i)->point(), c->vertex(j)->point(), c->translation(i), c->translation(j)); } @@ -263,14 +263,14 @@ class Periodic_4_hyperbolic_triangulation_2 Hyperbolic_segment construct_hyperbolic_segment(const Face_handle & fh, int idx) const { - CGAL_triangulation_precondition(idx >= 0 && idx <= 2); + CGAL_precondition(idx >= 0 && idx <= 2); return construct_hyperbolic_segment(fh->vertex(ccw(idx))->point(), fh->vertex(cw(idx))->point(), fh->translation(ccw(idx)), fh->translation(cw(idx))); } Hyperbolic_segment construct_hyperbolic_segment(const std::pair & edge) const { - CGAL_triangulation_precondition(edge.second >= 0 && edge.second <= 2); + CGAL_precondition(edge.second >= 0 && edge.second <= 2); return construct_hyperbolic_segment(edge.first, ccw(edge.second)); } @@ -523,7 +523,7 @@ class Periodic_4_hyperbolic_triangulation_2 Hyperbolic_translation neighbor_translation(const Face_handle fh, int i) const { - CGAL_triangulation_precondition(i >= 0 && i <= 2); + CGAL_precondition(i >= 0 && i <= 2); int myi = ccw(i); Hyperbolic_translation myof = fh->translation(myi); @@ -645,9 +645,9 @@ inline bool Periodic_4_hyperbolic_triangulation_2:: has_self_edges(typename TDS::Face_handle c) const { - CGAL_triangulation_assertion((c->vertex(0) != c->vertex(1)) || (c->translation(0) != c->translation(1))); - CGAL_triangulation_assertion((c->vertex(0) != c->vertex(2)) || (c->translation(0) != c->translation(2))); - CGAL_triangulation_assertion((c->vertex(1) != c->vertex(2)) || (c->translation(1) != c->translation(2))); + CGAL_assertion((c->vertex(0) != c->vertex(1)) || (c->translation(0) != c->translation(1))); + CGAL_assertion((c->vertex(0) != c->vertex(2)) || (c->translation(0) != c->translation(2))); + CGAL_assertion((c->vertex(1) != c->vertex(2)) || (c->translation(1) != c->translation(2))); return ((c->vertex(0) == c->vertex(1)) || (c->vertex(0) == c->vertex(2)) || @@ -691,11 +691,11 @@ is_valid(bool verbose) const { { for(int i=0; i<3; ++i) { - CGAL_triangulation_assertion(cit != cit->neighbor(i)); + CGAL_assertion(cit != cit->neighbor(i)); for(int j=i+1; j<3; ++j) { - CGAL_triangulation_assertion(cit->neighbor(i) != cit->neighbor(j)); - CGAL_triangulation_assertion(cit->vertex(i) != cit->vertex(j)); + CGAL_assertion(cit->neighbor(i) != cit->neighbor(j)); + CGAL_assertion(cit->vertex(i) != cit->vertex(j)); } } @@ -735,9 +735,9 @@ is_valid(bool verbose) const { if(!error) { - CGAL_triangulation_assertion(!has_self_edges()); - CGAL_triangulation_assertion(!has_cycles_length_2()); - CGAL_triangulation_assertion(_tds.number_of_vertices() + _tds.number_of_faces() + 2 == _tds.number_of_edges()); + CGAL_assertion(!has_self_edges()); + CGAL_assertion(!has_cycles_length_2()); + CGAL_assertion(_tds.number_of_vertices() + _tds.number_of_faces() + 2 == _tds.number_of_edges()); return true; } else @@ -990,8 +990,8 @@ hyperbolic_periodic_locate(const Point& p, Point np0 = construct_point(construct_point(nf->vertex(0)->point(), nf->translation(0)) , tr); Point np1 = construct_point(construct_point(nf->vertex(1)->point(), nf->translation(1)) , tr); Point np2 = construct_point(construct_point(nf->vertex(2)->point(), nf->translation(2)) , tr); - CGAL_triangulation_assertion_code(Oriented_side os1 = side_of_hyperbolic_triangle(np0, np1, np2, p, lt, li)); - CGAL_triangulation_assertion(os1 == ON_POSITIVE_SIDE); + CGAL_assertion_code(Oriented_side os1 = side_of_hyperbolic_triangle(np0, np1, np2, p, lt, li)); + CGAL_assertion(os1 == ON_POSITIVE_SIDE); lo = tr; return nf; } diff --git a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Dehn_hyperbolic_octagon_translation_word.h b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Dehn_hyperbolic_octagon_translation_word.h index 351b2030..8606cd63 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Dehn_hyperbolic_octagon_translation_word.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Dehn_hyperbolic_octagon_translation_word.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Dehn_hyperbolic_octagon_translation_word.h $ -// $Id: Dehn_hyperbolic_octagon_translation_word.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Dehn_hyperbolic_octagon_translation_word.h $ +// $Id: include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Dehn_hyperbolic_octagon_translation_word.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Iordan Iordanov diff --git a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Hyperbolic_octagon_translation_matrix.h b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Hyperbolic_octagon_translation_matrix.h index f1fb8780..c2ae55b1 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Hyperbolic_octagon_translation_matrix.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Hyperbolic_octagon_translation_matrix.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Hyperbolic_octagon_translation_matrix.h $ -// $Id: Hyperbolic_octagon_translation_matrix.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Hyperbolic_octagon_translation_matrix.h $ +// $Id: include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Hyperbolic_octagon_translation_matrix.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Iordan Iordanov diff --git a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Hyperbolic_octagon_translation_word.h b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Hyperbolic_octagon_translation_word.h index 148ca8de..a60b1666 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Hyperbolic_octagon_translation_word.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Hyperbolic_octagon_translation_word.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Hyperbolic_octagon_translation_word.h $ -// $Id: Hyperbolic_octagon_translation_word.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Hyperbolic_octagon_translation_word.h $ +// $Id: include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Hyperbolic_octagon_translation_word.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Iordan Iordanov diff --git a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Periodic_4_hyperbolic_triangulation_dummy_14.h b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Periodic_4_hyperbolic_triangulation_dummy_14.h index 8f65d8f5..343385d1 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Periodic_4_hyperbolic_triangulation_dummy_14.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Periodic_4_hyperbolic_triangulation_dummy_14.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Periodic_4_hyperbolic_triangulation_dummy_14.h $ -// $Id: Periodic_4_hyperbolic_triangulation_dummy_14.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Periodic_4_hyperbolic_triangulation_dummy_14.h $ +// $Id: include/CGAL/Periodic_4_hyperbolic_triangulation_2/internal/Periodic_4_hyperbolic_triangulation_dummy_14.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Iordan Iordanov @@ -251,7 +251,7 @@ insert_dummy_points(bool rational) for(Face_iterator fit = tds().faces_begin(); fit != tds().faces_end(); ++fit) this->make_canonical(fit); - CGAL_triangulation_assertion(is_valid(true)); + CGAL_assertion(is_valid(true)); return ret; } @@ -260,4 +260,3 @@ insert_dummy_points(bool rational) } // namespace CGAL #endif // CGAL_PERIODIC_4_HYPERBOLIC_TRIANGULATION_DUMMY_14_H - diff --git a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_face_base_2.h b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_face_base_2.h index c87eb452..396a5d01 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_face_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_face_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_triangulation_face_base_2.h $ -// $Id: Periodic_4_hyperbolic_triangulation_face_base_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_triangulation_face_base_2.h $ +// $Id: include/CGAL/Periodic_4_hyperbolic_triangulation_face_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Iordan Iordanov @@ -17,7 +17,6 @@ #include #include -#include #include namespace CGAL { @@ -73,13 +72,13 @@ class Periodic_4_hyperbolic_triangulation_face_base_2 Hyperbolic_translation translation(int i) const { - CGAL_triangulation_precondition(i >= 0 && i <= 2); + CGAL_precondition(i >= 0 && i <= 2); return o[i]; } void set_translation(const int& k, const Hyperbolic_translation& new_o) { - CGAL_triangulation_precondition(k >= 0 && k <= 2); + CGAL_precondition(k >= 0 && k <= 2); o[k] = new_o; } diff --git a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_vertex_base_2.h index 01b459c0..b1262dd0 100644 --- a/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Periodic_4_hyperbolic_triangulation_vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_triangulation_vertex_base_2.h $ -// $Id: Periodic_4_hyperbolic_triangulation_vertex_base_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_4_hyperbolic_triangulation_2/include/CGAL/Periodic_4_hyperbolic_triangulation_vertex_base_2.h $ +// $Id: include/CGAL/Periodic_4_hyperbolic_triangulation_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Iordan Iordanov diff --git a/thirdparty/CGAL/include/CGAL/Plane_3.h b/thirdparty/CGAL/include/CGAL/Plane_3.h index 23679f54..4db07ff7 100644 --- a/thirdparty/CGAL/include/CGAL/Plane_3.h +++ b/thirdparty/CGAL/include/CGAL/Plane_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Plane_3.h $ -// $Id: Plane_3.h 71bba3e 2022-03-17T22:35:09+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Plane_3.h $ +// $Id: include/CGAL/Plane_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,11 +18,12 @@ #define CGAL_PLANE_3_H #include -#include #include #include #include +#include + namespace CGAL { template @@ -40,7 +41,7 @@ class Plane_3 : public R_::Kernel_base::Plane_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Plane_3 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: @@ -72,6 +73,9 @@ class Plane_3 : public R_::Kernel_base::Plane_3 Plane_3(const Point_3& p, const Point_3& q, const Point_3& r) : Rep(typename R::Construct_plane_3()(Return_base_tag(), p, q, r)) {} + Plane_3(Origin o, const Point_3& q, const Point_3& r) + : Rep(typename R::Construct_plane_3()(Return_base_tag(), o, q, r)) {} + Plane_3(const Point_3& p, const Direction_3& d) : Rep(typename R::Construct_plane_3()(Return_base_tag(), p, d)) {} diff --git a/thirdparty/CGAL/include/CGAL/Plane_separator.h b/thirdparty/CGAL/include/CGAL/Plane_separator.h index 841553cd..d4b25d96 100644 --- a/thirdparty/CGAL/include/CGAL/Plane_separator.h +++ b/thirdparty/CGAL/include/CGAL/Plane_separator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Plane_separator.h $ -// $Id: Plane_separator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Plane_separator.h $ +// $Id: include/CGAL/Plane_separator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Point_2.h b/thirdparty/CGAL/include/CGAL/Point_2.h index 2cc8c15a..1f6cfc7c 100644 --- a/thirdparty/CGAL/include/CGAL/Point_2.h +++ b/thirdparty/CGAL/include/CGAL/Point_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Point_2.h $ -// $Id: Point_2.h 2884569 2022-04-27T16:32:06+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Point_2.h $ +// $Id: include/CGAL/Point_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,11 +20,12 @@ #include #include #include -#include #include #include #include +#include + namespace CGAL { template @@ -36,7 +37,7 @@ class Point_2 : public R_::Kernel_base::Point_2 typedef typename R_::Kernel_base::Point_2 RPoint_2; typedef Point_2 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Point_3.h b/thirdparty/CGAL/include/CGAL/Point_3.h index 8ea8be3f..f99f1dd7 100644 --- a/thirdparty/CGAL/include/CGAL/Point_3.h +++ b/thirdparty/CGAL/include/CGAL/Point_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Point_3.h $ -// $Id: Point_3.h 2884569 2022-04-27T16:32:06+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Point_3.h $ +// $Id: include/CGAL/Point_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -35,7 +34,7 @@ class Point_3 : public R_::Kernel_base::Point_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Point_3 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Point_container.h b/thirdparty/CGAL/include/CGAL/Point_container.h index c9b77244..ed9c3669 100644 --- a/thirdparty/CGAL/include/CGAL/Point_container.h +++ b/thirdparty/CGAL/include/CGAL/Point_container.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Point_container.h $ -// $Id: Point_container.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Point_container.h $ +// $Id: include/CGAL/Point_container.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -25,7 +25,7 @@ #include #include -#include +#include namespace CGAL { @@ -45,8 +45,8 @@ class Point_container { private: Traits traits; // the iterator range of the Point_container - boost::optional m_b ; - boost::optional m_e ; + std::optional m_b ; + std::optional m_e ; int built_coord; // a coordinate for which the pointer list is built Kd_tree_rectangle bbox; // bounding box, i.e. rectangle of node diff --git a/thirdparty/CGAL/include/CGAL/Point_set_2.h b/thirdparty/CGAL/include/CGAL/Point_set_2.h index 2e070e74..de3dfd55 100644 --- a/thirdparty/CGAL/include/CGAL/Point_set_2.h +++ b/thirdparty/CGAL/include/CGAL/Point_set_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_2/include/CGAL/Point_set_2.h $ -// $Id: Point_set_2.h 7e62c02 2021-04-12T14:02:37+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_2/include/CGAL/Point_set_2.h $ +// $Id: include/CGAL/Point_set_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Point_set_3.h b/thirdparty/CGAL/include/CGAL/Point_set_3.h index 67fd777c..28a7c016 100644 --- a/thirdparty/CGAL/include/CGAL/Point_set_3.h +++ b/thirdparty/CGAL/include/CGAL/Point_set_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_3/include/CGAL/Point_set_3.h $ -// $Id: Point_set_3.h 0fb05d1 2022-11-15T20:04:23+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_3/include/CGAL/Point_set_3.h $ +// $Id: include/CGAL/Point_set_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -35,6 +35,49 @@ namespace CGAL { +template ::Kernel::Vector_3> +class Point_set_3; + +/// \cond SKIP_IN_MANUAL +namespace internal { + template + class Point_set_3_index + { + public: +#ifdef CGAL_POINT_SET_3_USE_STD_SIZE_T_AS_SIZE_TYPE + typedef std::size_t size_type; +#else + typedef std::uint32_t size_type; +#endif + typedef CGAL::Point_set_3 Point_set_3; + + private: + friend class CGAL::Point_set_3; + friend class Properties::Property_container; + template friend class Properties::Property_array; + template friend struct Property_map; + friend class std::vector; + size_type value; + + public: + Point_set_3_index(const Point_set_3_index& index) : value(static_cast(index)) { } + Point_set_3_index(const std::size_t& value) : value(static_cast(value)) { } + Point_set_3_index() : value(static_cast(-1)) { } + Point_set_3_index operator= (const Point_set_3_index& index) { value = index.value; return *this; } + + operator std::size_t() const { return static_cast(value); } + bool operator== (const Point_set_3_index& index) const { return value == index.value; } + bool operator!= (const Point_set_3_index& index) const { return value != index.value; } + bool operator< (const Point_set_3_index& index) const { return value < index.value; } + Point_set_3_index& operator++ () { ++value; return *this; } + Point_set_3_index& operator-- () { --value; return *this; } + Point_set_3_index operator++ (int) { Point_set_3_index tmp(*this); ++value; return tmp; } + Point_set_3_index operator-- (int) { Point_set_3_index tmp(*this); --value; return tmp; } +}; +} // namespace internal +/// \endcond + /*! \ingroup PkgPointSet3Ref @@ -48,34 +91,34 @@ namespace CGAL { two particular properties that are hard coded by this class: the coordinates of the points and the normal vectors. - The coordinates of a point can be access using the index of the + The coordinates of a point can be accessed using the index of the point and the member function `point()`. This property is always present. The normal vector of a point can be accessed using the index of the point and the `normal()` method. This property must be explicitly created. All properties can be accessed as a range using the methods - `points()`, `normals()`, and `range()` for points coordinates, + `points()`, `normals()`, and `range()` for point coordinates, normal vectors, and other properties respectively. - Removing a point with properties is achieved by moving its `Index` + Removing a point with properties is achieved by moving its index at the end of the container and keeping track of the number of removed elements. A garbage collection method must be called to really remove it from memory. For convenience, all functions of the package \ref - PkgPointSetProcessing3 automatically creates the right named + PkgPointSetProcessing3 automatically create the right named parameters if called with a `CGAL::Point_set_3` object as argument. \tparam Point Point type \tparam Vector Normal vector type - \cgalModels `Range` + \cgalModels{Range} */ template ::Kernel::Vector_3> + typename Vector> class Point_set_3 { public: @@ -85,7 +128,7 @@ class Point_set_3 typedef Vector Vector_type; typedef Point_set_3 Point_set; - class Index; + using Index = internal::Point_set_3_index; typedef typename Properties::Property_container Base; @@ -105,52 +148,20 @@ class Point_set_3 }; /// \endcond - /*! - \brief This represents a point with associated properties. - \cgalModels `::Index` - \cgalModels `LessThanComparable` - \cgalModels `Hashable` +#ifdef DOXYGEN_RUNNING + /*! + \brief This represents a point with associated properties. + \cgalModels{::Index,LessThanComparable,Hashable} */ - class Index - { - /// \cond SKIP_IN_MANUAL - public: -#ifdef CGAL_POINT_SET_3_USE_STD_SIZE_T_AS_SIZE_TYPE - typedef std::size_t size_type; -#else - typedef boost::uint32_t size_type; + class Index; #endif - private: - friend class Point_set_3; - friend class Properties::Property_container; - template friend class Properties::Property_array; - template friend struct Property_map; - friend class std::vector; - size_type value; - - public: - Index (const Index& index) : value (static_cast(index)) { } - Index (const std::size_t& value) : value (static_cast(value)) { } - Index () : value (static_cast(-1)) { } - Index operator= (const Index& index) { value = index.value; return *this; } - /// \cond SKIP_IN_MANUAL - operator std::size_t() const { return static_cast(value); } - bool operator== (const Index& index) const { return value == index.value; } - bool operator!= (const Index& index) const { return value != index.value; } - bool operator< (const Index& index) const { return value < index.value; } - Index& operator++ () { ++ value; return *this; } - Index& operator-- () { -- value; return *this; } - Index operator++ (int) { Index tmp(*this); ++ value; return tmp; } - Index operator-- (int) { Index tmp(*this); -- value; return tmp; } - /// \endcond - }; typedef Point Point_3; ///< The point type typedef Vector Vector_3; ///< The vector type #ifdef DOXYGEN_RUNNING - typedef unspecified_type iterator; ///< Iterator type of the point set with value type `Index` \cgalModels RandomAccessIterator - typedef unspecified_type const_iterator; ///< Constant iterator type of the point set with value type `Index` \cgalModels RandomAccessIterator + typedef unspecified_type iterator; ///< Iterator type of the point set with value type `Index` is model of `RandomAccessIterator` + typedef unspecified_type const_iterator; ///< Constant iterator type of the point set with value type `Index` is model of `RandomA.ccessIterator` #else typedef typename Index_map::iterator iterator; ///< Iterator type of the point set typedef typename Index_map::const_iterator const_iterator; ///< Constant iterator type of the point set @@ -694,7 +705,6 @@ class Point_set_3 \sa `number_of_removed_points()` */ std::size_t garbage_size () const { return number_of_removed_points(); } - /// \endcond /*! \brief returns `true` if there are elements marked as removed, `false` otherwise. @@ -966,8 +976,8 @@ class Point_set_3 - `geom_traits`: contains the kernel `typename Kernel_traits`::`Kernel` \warning this method does not check if the normal map was - instanciated or not. The normal map named parameter should not be - used if this property was not instanciated first. + instantiated or not. The normal map named parameter should not be + used if this property was not instantiated first. */ #ifdef DOXYGEN_RUNNING unspecified_type @@ -1275,9 +1285,6 @@ class Point_set_3 }; // end of class Point_set_3 - - - /*! \brief Append `other` at the end of `ps`. @@ -1303,8 +1310,8 @@ Point_set_3& operator+=(Point_set_3& ps, /// \cond SKIP_IN_MANUAL // specialization for default named parameters -template -struct Point_set_processing_3_np_helper, NamedParameters, NP_TAG> +template +struct Point_set_processing_3_np_helper, NamedParameters, DPM, DVM> { typedef typename std::iterator_traits::iterator>::value_type Value_type; @@ -1313,9 +1320,9 @@ struct Point_set_processing_3_np_helper, NamedParamet typedef typename Point_set_3::template Property_map DefaultPMap; typedef const typename Point_set_3::template Property_map DefaultConstPMap; - typedef typename internal_np::Lookup_named_param_def ::type Point_map; // public - typedef typename internal_np::Lookup_named_param_def ::type Const_point_map; // public typedef typename internal_np::Lookup_named_param_def < @@ -1374,5 +1381,23 @@ struct Point_set_processing_3_np_helper, NamedParamet } // namespace CGAL +namespace boost { +template +std::size_t hash_value(const typename CGAL::internal::Point_set_3_index& i) +{ + return i; +} +} // namespace boost + +namespace std { +template +struct hash< CGAL::internal::Point_set_3_index > { + std::size_t operator()(const CGAL::internal::Point_set_3_index& i) const + { + std::size_t ret = i; + return ret; + } +}; +} // namespace std #endif // CGAL_POINT_SET_3_H diff --git a/thirdparty/CGAL/include/CGAL/Point_set_3/IO.h b/thirdparty/CGAL/include/CGAL/Point_set_3/IO.h index c19afe14..a86de3e3 100644 --- a/thirdparty/CGAL/include/CGAL/Point_set_3/IO.h +++ b/thirdparty/CGAL/include/CGAL/Point_set_3/IO.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_3/include/CGAL/Point_set_3/IO.h $ -// $Id: IO.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_3/include/CGAL/Point_set_3/IO.h $ +// $Id: include/CGAL/Point_set_3/IO.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -161,6 +161,8 @@ bool read_point_set(const std::string& fname, \param ps the point set \return `os` + + \relates Point_set_3 */ template std::ostream& operator<<(std::ostream& os, diff --git a/thirdparty/CGAL/include/CGAL/Point_set_3/IO/LAS.h b/thirdparty/CGAL/include/CGAL/Point_set_3/IO/LAS.h index bdd1e077..71424963 100644 --- a/thirdparty/CGAL/include/CGAL/Point_set_3/IO/LAS.h +++ b/thirdparty/CGAL/include/CGAL/Point_set_3/IO/LAS.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_3/include/CGAL/Point_set_3/IO/LAS.h $ -// $Id: LAS.h c8cc074 2021-09-27T15:33:42+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_3/include/CGAL/Point_set_3/IO/LAS.h $ +// $Id: include/CGAL/Point_set_3/IO/LAS.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -52,7 +52,7 @@ void check_if_property_is_used(PointSet& point_set, /*! \ingroup PkgPointSet3IOLAS - \brief reads the content of an intput stream in the \ref IOStreamLAS into a point set. + \brief reads the content of an input stream in the \ref IOStreamLAS into a point set. \attention To read a binary file, the flag `std::ios::binary` must be set during the creation of the `ifstream`. @@ -147,7 +147,7 @@ bool read_LAS(std::istream& is, /*! \ingroup PkgPointSet3IOLAS - \brief reads the content of an intput file in the \ref IOStreamLAS into a point set. + \brief reads the content of an input file in the \ref IOStreamLAS into a point set. \param fname the path to the input file \param point_set the point set diff --git a/thirdparty/CGAL/include/CGAL/Point_set_3/IO/OFF.h b/thirdparty/CGAL/include/CGAL/Point_set_3/IO/OFF.h index 26f5e17f..3ce86b22 100644 --- a/thirdparty/CGAL/include/CGAL/Point_set_3/IO/OFF.h +++ b/thirdparty/CGAL/include/CGAL/Point_set_3/IO/OFF.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h $ -// $Id: OFF.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h $ +// $Id: include/CGAL/Point_set_3/IO/OFF.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -36,7 +36,7 @@ namespace IO { /*! \ingroup PkgPointSet3IOOFF - \brief reads the content of an intput stream in the \ref IOStreamOFF into a point set. + \brief reads the content of an input stream in the \ref IOStreamOFF into a point set. If normals are present in the input (NOFF), a normal map will be created and filled. diff --git a/thirdparty/CGAL/include/CGAL/Point_set_3/IO/PLY.h b/thirdparty/CGAL/include/CGAL/Point_set_3/IO/PLY.h index 1ab76ccc..ac3837cf 100644 --- a/thirdparty/CGAL/include/CGAL/Point_set_3/IO/PLY.h +++ b/thirdparty/CGAL/include/CGAL/Point_set_3/IO/PLY.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h $ -// $Id: PLY.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_3/include/CGAL/Point_set_3/IO/PLY.h $ +// $Id: include/CGAL/Point_set_3/IO/PLY.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -118,40 +118,40 @@ class Point_set_3_filler continue; } - if(dynamic_cast*>(property)) + if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } - else if(dynamic_cast*>(property)) + else if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } - else if(dynamic_cast*>(property)) + else if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } - else if(dynamic_cast*>(property)) + else if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } - else if(dynamic_cast*>(property)) + else if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } - else if(dynamic_cast*>(property)) + else if(dynamic_cast*>(property)) { m_properties.push_back - (new PLY_property_to_point_set_property(m_point_set, + (new PLY_property_to_point_set_property(m_point_set, name)); } else if(dynamic_cast*>(property)) @@ -456,14 +456,14 @@ bool write_PLY(std::ostream& os, typedef typename Point_set::Index Index; typedef typename Point_set::Point_map Point_map; typedef typename Point_set::Vector_map Vector_map; - typedef typename Point_set::template Property_map Int8_map; - typedef typename Point_set::template Property_map Uint8_map; - typedef typename Point_set::template Property_map Int16_map; - typedef typename Point_set::template Property_map Uint16_map; - typedef typename Point_set::template Property_map Int32_map; - typedef typename Point_set::template Property_map Uint32_map; - typedef typename Point_set::template Property_map Int64_map; - typedef typename Point_set::template Property_map Uint64_map; + typedef typename Point_set::template Property_map Int8_map; + typedef typename Point_set::template Property_map Uint8_map; + typedef typename Point_set::template Property_map Int16_map; + typedef typename Point_set::template Property_map Uint16_map; + typedef typename Point_set::template Property_map Int32_map; + typedef typename Point_set::template Property_map Uint32_map; + typedef typename Point_set::template Property_map Int64_map; + typedef typename Point_set::template Property_map Uint64_map; typedef typename Point_set::template Property_map Float_map; typedef typename Point_set::template Property_map Double_map; @@ -505,7 +505,7 @@ bool write_PLY(std::ostream& os, if(prop[i] == "point") { - if(boost::is_same::type, float>::value) + if(std::is_same::type, float>::value) { os << "property float x" << std::endl << "property float y" << std::endl @@ -522,7 +522,7 @@ bool write_PLY(std::ostream& os, } if(prop[i] == "normal") { - if(boost::is_same::type, float>::value) + if(std::is_same::type, float>::value) { os << "property float nx" << std::endl << "property float ny" << std::endl @@ -541,27 +541,27 @@ bool write_PLY(std::ostream& os, bool okay = false; { Int8_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property char " << prop[i] << std::endl; - printers.push_back(new internal::Char_property_printer(pmap)); + printers.push_back(new internal::Simple_property_printer(pmap)); continue; } } { Uint8_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property uchar " << prop[i] << std::endl; - printers.push_back(new internal::Char_property_printer(pmap)); + printers.push_back(new internal::Simple_property_printer(pmap)); continue; } } { Int16_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property short " << prop[i] << std::endl; @@ -571,7 +571,7 @@ bool write_PLY(std::ostream& os, } { Uint16_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property ushort " << prop[i] << std::endl; @@ -581,7 +581,7 @@ bool write_PLY(std::ostream& os, } { Int32_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property int " << prop[i] << std::endl; @@ -591,7 +591,7 @@ bool write_PLY(std::ostream& os, } { Uint32_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property uint " << prop[i] << std::endl; @@ -601,21 +601,21 @@ bool write_PLY(std::ostream& os, } { Int64_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property int " << prop[i] << std::endl; - printers.push_back(new internal::Simple_property_printer(pmap)); + printers.push_back(new internal::Simple_property_printer(pmap)); continue; } } { Uint64_map pmap; - boost::tie(pmap, okay) = point_set.template property_map(prop[i]); + boost::tie(pmap, okay) = point_set.template property_map(prop[i]); if(okay) { os << "property uint " << prop[i] << std::endl; - printers.push_back(new internal::Simple_property_printer(pmap)); + printers.push_back(new internal::Simple_property_printer(pmap)); continue; } } diff --git a/thirdparty/CGAL/include/CGAL/Point_set_3/IO/XYZ.h b/thirdparty/CGAL/include/CGAL/Point_set_3/IO/XYZ.h index fa75c6a4..421206f6 100644 --- a/thirdparty/CGAL/include/CGAL/Point_set_3/IO/XYZ.h +++ b/thirdparty/CGAL/include/CGAL/Point_set_3/IO/XYZ.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h $ -// $Id: XYZ.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h $ +// $Id: include/CGAL/Point_set_3/IO/XYZ.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -35,7 +35,7 @@ namespace IO { /*! \ingroup PkgPointSet3IOXYZ - \brief reads the content of an intput stream in the \ref IOStreamXYZ into a point set. + \brief reads the content of an input stream in the \ref IOStreamXYZ into a point set. If normals are present in the input stream, a normal map will be created and filled. diff --git a/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Callback_wrapper.h b/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Callback_wrapper.h index baa02009..a824d7dc 100644 --- a/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Callback_wrapper.h +++ b/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Callback_wrapper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Callback_wrapper.h $ -// $Id: Callback_wrapper.h 17ac255 2021-05-18T15:43:59+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Callback_wrapper.h $ +// $Id: include/CGAL/Point_set_processing_3/internal/Callback_wrapper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Neighbor_query.h b/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Neighbor_query.h index f645bf4c..475fcd8d 100644 --- a/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Neighbor_query.h +++ b/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Neighbor_query.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Neighbor_query.h $ -// $Id: Neighbor_query.h 590ddf8 2021-10-08T15:38:47+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Neighbor_query.h $ +// $Id: include/CGAL/Point_set_processing_3/internal/Neighbor_query.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -18,7 +18,6 @@ #include #include #include -#include #include diff --git a/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Rich_grid.h b/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Rich_grid.h index d4249a7c..071205e4 100644 --- a/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Rich_grid.h +++ b/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Rich_grid.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Rich_grid.h $ -// $Id: Rich_grid.h 67b53fa 2020-04-29T14:06:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Rich_grid.h $ +// $Id: include/CGAL/Point_set_processing_3/internal/Rich_grid.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Shihao Wu, Clement Jamin, Pierre Alliez @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -266,7 +266,7 @@ void Rich_grid::travel_itself( for(int x = 0; x < x_side; x++) { int origin = cell(x, y, z); self(get_start_iter(origin), get_end_iter(origin), radius); - // compute between other girds + // compute between other grids for(int d = 2; d < 28; d += 2) { // skipping self const int *cs = corner + 3*diagonals[d]; const int *ce = corner + 3*diagonals[d+1]; @@ -284,7 +284,7 @@ void Rich_grid::travel_itself( } } -/// define how to travel in other gird +/// define how to travel in other grid template void Rich_grid::travel_others( Rich_grid &points, @@ -454,7 +454,7 @@ void compute_ball_neighbors_one_self( CGAL::Bbox_3 bbox, ///< bounding box const typename Kernel::FT radius) { - CGAL_point_set_processing_precondition(radius > 0); + CGAL_precondition(radius > 0); for (unsigned int i = 0; i < points.size(); ++i) { diff --git a/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Search_traits_vertex_handle_3.h b/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Search_traits_vertex_handle_3.h index 917a0721..a03c4412 100644 --- a/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Search_traits_vertex_handle_3.h +++ b/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Search_traits_vertex_handle_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Search_traits_vertex_handle_3.h $ -// $Id: Search_traits_vertex_handle_3.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Search_traits_vertex_handle_3.h $ +// $Id: include/CGAL/Point_set_processing_3/internal/Search_traits_vertex_handle_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Laurent Saboret diff --git a/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_3.h b/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_3.h index 6d6082ba..e7aad8b6 100644 --- a/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_3.h +++ b/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_3.h $ -// $Id: voronoi_covariance_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_3.h $ +// $Id: include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jocelyn Meyron and Quentin Mérigot @@ -84,10 +84,11 @@ namespace CGAL { const Point &b, const Point &c) { - internal::covariance_matrix_tetrahedron (a[0], a[1], a[2], - b[0], b[1], b[2], - c[0], c[1], c[2], - _result); + internal::covariance_matrix_tetrahedron( + FT(a[0]), FT(a[1]), FT(a[2]), + FT(b[0]), FT(b[1]), FT(b[2]), + FT(c[0]), FT(c[1]), FT(c[2]), + _result); } const Result_type &result() const @@ -166,7 +167,7 @@ namespace CGAL { (planes.begin(), planes.end(), P, - boost::make_optional(Point(CGAL::ORIGIN))); + std::make_optional(Point(CGAL::ORIGIN))); // apply f to the triangles on the boundary of P for(typename boost::graph_traits::face_descriptor fd : faces(P)) @@ -192,31 +193,29 @@ namespace CGAL { const Sphere &sphere, FT covariance[6]) { - typename internal::Covariance_accumulator_3 ca; + typename internal::Covariance_accumulator_3 ca; internal::tessellate_and_intersect(dt, v, sphere, ca); std::copy (ca.result().begin(), ca.result().end(), covariance); } template - std::array + std::array voronoi_covariance_3 (const DT &dt, typename DT::Vertex_handle v, const Sphere &sphere) { - typedef typename DT::Geom_traits::FT FT; - typename internal::Covariance_accumulator_3 ca; + typename internal::Covariance_accumulator_3 ca; return internal::tessellate_and_intersect(dt, v, sphere, ca).result(); } template - typename DT::Geom_traits::FT + double voronoi_volume_3 (const DT &dt, typename DT::Vertex_handle v, const Sphere &sphere) { - typedef typename DT::Geom_traits::FT FT; - typename internal::Volume_accumulator_3 va; + typename internal::Volume_accumulator_3 va; return internal::tessellate_and_intersect(dt, v, sphere, va).result(); } diff --git a/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_sphere_3.h b/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_sphere_3.h index c79a7cb9..a0592385 100644 --- a/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_sphere_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_sphere_3.h $ -// $Id: voronoi_covariance_sphere_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_sphere_3.h $ +// $Id: include/CGAL/Point_set_processing_3/internal/Voronoi_covariance_3/voronoi_covariance_sphere_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jocelyn Meyron and Quentin Mérigot diff --git a/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/bbox_diagonal.h b/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/bbox_diagonal.h index 0f04833f..d9d5b184 100644 --- a/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/bbox_diagonal.h +++ b/thirdparty/CGAL/include/CGAL/Point_set_processing_3/internal/bbox_diagonal.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/bbox_diagonal.h $ -// $Id: bbox_diagonal.h d6cf972 2020-04-17T09:22:57+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/bbox_diagonal.h $ +// $Id: include/CGAL/Point_set_processing_3/internal/bbox_diagonal.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Point_traits.h b/thirdparty/CGAL/include/CGAL/Point_traits.h index 9ba80a1d..f2bdb275 100644 --- a/thirdparty/CGAL/include/CGAL/Point_traits.h +++ b/thirdparty/CGAL/include/CGAL/Point_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Point_traits.h $ -// $Id: Point_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Point_traits.h $ +// $Id: include/CGAL/Point_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Point_with_normal_3.h b/thirdparty/CGAL/include/CGAL/Point_with_normal_3.h index 01e4aa81..cee79b6f 100644 --- a/thirdparty/CGAL/include/CGAL/Point_with_normal_3.h +++ b/thirdparty/CGAL/include/CGAL/Point_with_normal_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/Point_with_normal_3.h $ -// $Id: Point_with_normal_3.h 590ddf8 2021-10-08T15:38:47+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/Point_with_normal_3.h $ +// $Id: include/CGAL/Point_with_normal_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -120,7 +120,7 @@ class Point_with_normal_3 : public Gt::Point_3 /// Property map that accesses the normal vector from a Point_with_normal_3 object /// /// @heading Is Model for the Concepts: -/// \cgalModels `LvaluePropertyMap` +/// \cgalModels{LvaluePropertyMap} /// /// @heading Parameters: /// @param Gt Geometric traits class. diff --git a/thirdparty/CGAL/include/CGAL/Point_with_psc_localisation.h b/thirdparty/CGAL/include/CGAL/Point_with_psc_localisation.h index e5a7e297..3d513978 100644 --- a/thirdparty/CGAL/include/CGAL/Point_with_psc_localisation.h +++ b/thirdparty/CGAL/include/CGAL/Point_with_psc_localisation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Point_with_psc_localisation.h $ -// $Id: Point_with_psc_localisation.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Point_with_psc_localisation.h $ +// $Id: include/CGAL/Point_with_psc_localisation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Point_with_surface_index.h b/thirdparty/CGAL/include/CGAL/Point_with_surface_index.h index 758be9ac..2626d1b6 100644 --- a/thirdparty/CGAL/include/CGAL/Point_with_surface_index.h +++ b/thirdparty/CGAL/include/CGAL/Point_with_surface_index.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Point_with_surface_index.h $ -// $Id: Point_with_surface_index.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Point_with_surface_index.h $ +// $Id: include/CGAL/Point_with_surface_index.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Point_with_surface_index_geom_traits.h b/thirdparty/CGAL/include/CGAL/Point_with_surface_index_geom_traits.h index a12fa057..13004fd7 100644 --- a/thirdparty/CGAL/include/CGAL/Point_with_surface_index_geom_traits.h +++ b/thirdparty/CGAL/include/CGAL/Point_with_surface_index_geom_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Point_with_surface_index_geom_traits.h $ -// $Id: Point_with_surface_index_geom_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Point_with_surface_index_geom_traits.h $ +// $Id: include/CGAL/Point_with_surface_index_geom_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Poisson_implicit_surface_3.h b/thirdparty/CGAL/include/CGAL/Poisson_implicit_surface_3.h index 1a555149..a1121f9b 100644 --- a/thirdparty/CGAL/include/CGAL/Poisson_implicit_surface_3.h +++ b/thirdparty/CGAL/include/CGAL/Poisson_implicit_surface_3.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Poisson_surface_reconstruction_3/include/CGAL/Poisson_implicit_surface_3.h $ -// $Id: Poisson_implicit_surface_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Poisson_surface_reconstruction_3/include/CGAL/Poisson_implicit_surface_3.h $ +// $Id: include/CGAL/Poisson_implicit_surface_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent RINEAU diff --git a/thirdparty/CGAL/include/CGAL/Poisson_mesh_cell_criteria_3.h b/thirdparty/CGAL/include/CGAL/Poisson_mesh_cell_criteria_3.h index 925c5951..d60256fe 100644 --- a/thirdparty/CGAL/include/CGAL/Poisson_mesh_cell_criteria_3.h +++ b/thirdparty/CGAL/include/CGAL/Poisson_mesh_cell_criteria_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Poisson_surface_reconstruction_3/include/CGAL/Poisson_mesh_cell_criteria_3.h $ -// $Id: Poisson_mesh_cell_criteria_3.h 848aa7d 2021-02-08T10:16:59+01:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Poisson_surface_reconstruction_3/include/CGAL/Poisson_mesh_cell_criteria_3.h $ +// $Id: include/CGAL/Poisson_mesh_cell_criteria_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Poisson_reconstruction_function.h b/thirdparty/CGAL/include/CGAL/Poisson_reconstruction_function.h index 7b072dd4..7e4e5e2f 100644 --- a/thirdparty/CGAL/include/CGAL/Poisson_reconstruction_function.h +++ b/thirdparty/CGAL/include/CGAL/Poisson_reconstruction_function.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h $ -// $Id: Poisson_reconstruction_function.h 4968d21 2022-05-17T10:31:07+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h $ +// $Id: include/CGAL/Poisson_reconstruction_function.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret, Pierre Alliez @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -37,16 +38,13 @@ #endif #include #include -#include +#include #include #include #include #include #include -#include -#include -#include #include /*! @@ -147,7 +145,7 @@ Delaunay triangulation instead of an adaptive octree. \tparam Gt Geometric traits class. -\cgalModels `ImplicitFunction` +\cgalModels{ImplicitFunction} */ template @@ -380,9 +378,9 @@ class Poisson_reconstruction_function InputIterator first, ///< iterator over the first input point. InputIterator beyond, ///< past-the-end iterator over the input points. NormalPMap normal_pmap, ///< property map: `value_type of InputIterator` -> `Vector` (the *oriented* normal of an input point). - typename boost::enable_if< - boost::is_convertible::value_type, Point> - >::type* = 0 + std::enable_if_t< + std::is_convertible::value_type, Point>::value + >* = 0 ) : m_tr(new Triangulation), m_bary(new std::vector) , average_spacing(CGAL::compute_average_spacing(CGAL::make_range(first, beyond), 6)) @@ -823,7 +821,7 @@ class Poisson_reconstruction_function double D; if(!solver.linear_solver(A, B, X, D)) return false; - CGAL_surface_reconstruction_points_assertion(D == 1.0); + CGAL_assertion(D == 1.0); duration_solve = (clock() - time_init)/CLOCKS_PER_SEC; CGAL_TRACE_STREAM << " Solve sparse linear system: done (" << duration_solve << "sec.)\n"; @@ -1129,7 +1127,7 @@ class Poisson_reconstruction_function if(voronoi_points.size() < 3) { - CGAL_surface_reconstruction_points_assertion(false); + CGAL_assertion(false); return 0.0; } diff --git a/thirdparty/CGAL/include/CGAL/Polychain_2.h b/thirdparty/CGAL/include/CGAL/Polychain_2.h index 61607ae5..3a73700f 100644 --- a/thirdparty/CGAL/include/CGAL/Polychain_2.h +++ b/thirdparty/CGAL/include/CGAL/Polychain_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h $ -// $Id: Polychain_2.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Polychain_2.h $ +// $Id: include/CGAL/Polychain_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_2.h b/thirdparty/CGAL/include/CGAL/Polygon_2.h index 47924a6b..1a3fd04d 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_2.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon/include/CGAL/Polygon_2.h $ -// $Id: Polygon_2.h 81f127d 2023-01-31T08:36:31+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon/include/CGAL/Polygon_2.h $ +// $Id: include/CGAL/Polygon_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -42,11 +43,11 @@ namespace CGAL { /// \ingroup PkgPolygon2Ref -/// The class Polygon_2 implements polygons. The Polygon_2 is +/// The class `Polygon_2` implements polygons. The `Polygon_2` is /// parameterized by a traits class and a container class. The latter /// can be any class that fulfills the requirements for an STL -/// container, and has a function `resize()` that takes an std::size_t as argument -/// . It defaults to the std::vector class. +/// container, and has a function `resize()` that takes an `std::size_t` as argument. +/// It defaults to the `std::vector` class. /// /// \cgalHeading{Implementation} /// @@ -154,14 +155,16 @@ class Polygon_2 { /// @{ /// Creates an empty polygon. - Polygon_2() : traits() {} + Polygon_2() = default; /// Creates an empty polygon. Polygon_2(const Traits & p_traits) : traits(p_traits) {} /// Copy constructor. - Polygon_2(const Polygon_2& polygon) - : d_container(polygon.d_container), traits(polygon.traits) {} + Polygon_2(const Polygon_2& polygon) = default; + + /// Move constructor + Polygon_2(Polygon_2&& polygon) = default; /// Creates a polygon with vertices from the sequence /// defined by the range \c [first,last). @@ -173,7 +176,8 @@ class Polygon_2 { {} #ifndef DOXYGEN_RUNNING - Polygon_2& operator=(const Polygon_2&)=default; + Polygon_2& operator=(const Polygon_2&) = default; + Polygon_2& operator=(Polygon_2&& p) = default; #endif /// @} @@ -370,7 +374,7 @@ class Polygon_2 { /// `p.is_simple()`. Bounded_side bounded_side(const Point_2& value) const { - CGAL_polygon_precondition(is_simple()); + CGAL_precondition(is_simple()); return bounded_side_2(d_container.begin(), d_container.end(), value, traits); } @@ -573,7 +577,7 @@ operator!=(const Polygon_2 &p1, const Polygon_2 &p2); /// Returns the image of the polygon \c p under the transformation \c t. -/// \memberof Polygon_2 +/// \relates Polygon_2 template Polygon_2 transform(const Transformation& t, const Polygon_2& p); @@ -587,13 +591,13 @@ transform(const Transformation& t, const Polygon_2& p); /// Reads a polygon from stream `is` and assigns it to `p`. /// \pre The extract operator must be defined for `Point_2`. -/// \memberof Polygon_2 +/// \relates Polygon_2 template std::istream &operator>>(std::istream &is, Polygon_2& p); /// Inserts the polygon `p` into the stream `os`. /// \pre The insert operator must be defined for `Point_2`. -/// \memberof Polygon_2 +/// \relates Polygon_2 template std::ostream &operator<<(std::ostream &os, const Polygon_2& p); diff --git a/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h b/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h index e3937687..cd7e5991 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h $ -// $Id: Polygon_2_algorithms_impl.h 6b87fe3 2020-12-05T11:11:33+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h $ +// $Id: include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -166,7 +166,7 @@ ForwardIterator left_vertex_2(ForwardIterator first, ForwardIterator last, const PolygonTraits&traits) { - CGAL_polygon_precondition(first != last); + CGAL_precondition(first != last); internal::Polygon_2::Compare_vertices less(traits.less_xy_2_object()); return std::min_element(first, last, less); @@ -182,7 +182,7 @@ ForwardIterator right_vertex_2(ForwardIterator first, ForwardIterator last, const PolygonTraits &traits) { - CGAL_polygon_precondition(first != last); + CGAL_precondition(first != last); internal::Polygon_2::Compare_vertices less(traits.less_xy_2_object()); return std::max_element(first, last, less); @@ -198,7 +198,7 @@ ForwardIterator top_vertex_2(ForwardIterator first, ForwardIterator last, const PolygonTraits&traits) { - CGAL_polygon_precondition(first != last); + CGAL_precondition(first != last); return std::max_element(first, last, traits.less_yx_2_object()); } @@ -212,7 +212,7 @@ ForwardIterator bottom_vertex_2(ForwardIterator first, ForwardIterator last, const PolygonTraits&traits) { - CGAL_polygon_precondition(first != last); + CGAL_precondition(first != last); return std::min_element(first, last, traits.less_yx_2_object()); } @@ -325,7 +325,7 @@ Oriented_side oriented_side_2(ForwardIterator first, const Traits& traits) { Orientation o = orientation_2(first, last, traits); - CGAL_polygon_assertion(o != COLLINEAR); + CGAL_assertion(o != COLLINEAR); Bounded_side b = bounded_side_2(first, last, point, traits); switch (b) { @@ -502,13 +502,17 @@ Bounded_side bounded_side_2(ForwardIterator first, // uses Traits::Less_xy_2 (used by left_vertex_2) // Traits::orientation_2_object() +namespace Polygon { +namespace internal { + +// This exists because the "is_simple_2" precondition in the orientation_2() function is in fact +// stronger than necessary: it also works for strictly simple polygons, which matters for +// Straight line skeletons, as the offset polygons might have non-manifoldness. template -Orientation orientation_2(ForwardIterator first, - ForwardIterator last, - const Traits& traits) +Orientation orientation_2_no_precondition(ForwardIterator first, + ForwardIterator last, + const Traits& traits) { - CGAL_polygon_precondition(is_simple_2(first, last, traits)); - ForwardIterator i = left_vertex_2(first, last, traits); ForwardIterator prev = (i == first) ? last : i; @@ -527,6 +531,18 @@ Orientation orientation_2(ForwardIterator first, return traits.orientation_2_object()(Point(*prev), Point(*i), Point(*next)); } +} // namespace internal +} // namespace Polygon + +template +Orientation orientation_2(ForwardIterator first, + ForwardIterator last, + const Traits& traits) +{ + CGAL_precondition(is_simple_2(first, last, traits)); + return Polygon::internal::orientation_2_no_precondition(first, last, traits); +} + } //namespace CGAL /// \endcond diff --git a/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_edge_circulator.h b/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_edge_circulator.h index ae66dafe..358b36ae 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_edge_circulator.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_edge_circulator.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon/include/CGAL/Polygon_2/Polygon_2_edge_circulator.h $ -// $Id: Polygon_2_edge_circulator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon/include/CGAL/Polygon_2/Polygon_2_edge_circulator.h $ +// $Id: include/CGAL/Polygon_2/Polygon_2_edge_circulator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ #include #include #include -#include +#include namespace CGAL { #ifndef DOXYGEN_RUNNING //to avoid conflicts @@ -57,7 +57,7 @@ class Polygon_2_const_edge_circulator { : first_vertex(f) {} bool operator==( std::nullptr_t CGAL_assertion_code(p) ) const { - CGAL_polygon_assertion( p == 0); + CGAL_assertion( p == 0); return (first_vertex == 0); } diff --git a/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_edge_iterator.h b/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_edge_iterator.h index a3e502e3..f50632b5 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_edge_iterator.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_edge_iterator.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon/include/CGAL/Polygon_2/Polygon_2_edge_iterator.h $ -// $Id: Polygon_2_edge_iterator.h f7e2c03 2020-08-13T15:37:10+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon/include/CGAL/Polygon_2/Polygon_2_edge_iterator.h $ +// $Id: include/CGAL/Polygon_2/Polygon_2_edge_iterator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_impl.h b/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_impl.h index 43a09b9c..3f165ead 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon/include/CGAL/Polygon_2/Polygon_2_impl.h $ -// $Id: Polygon_2_impl.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon/include/CGAL/Polygon_2/Polygon_2_impl.h $ +// $Id: include/CGAL/Polygon_2/Polygon_2_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -41,7 +41,6 @@ bool operator==( const Polygon_2 &x, return true; typedef typename Traits_P::Equal_2 Equal_2; typedef typename Traits_P::Point_2 Point_2; -// CGAL_polygon_precondition( (x.size() != 0) || (y.size() != 0)); if ((x.size() == 0) && (y.size() == 0)) return true; if (x.size() != y.size()) return false; diff --git a/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_simplicity.h b/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_simplicity.h index d08972a6..890571e3 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_simplicity.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_simplicity.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon/include/CGAL/Polygon_2/Polygon_2_simplicity.h $ -// $Id: Polygon_2_simplicity.h 6b4ba80 2021-03-31T15:58:09+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon/include/CGAL/Polygon_2/Polygon_2_simplicity.h $ +// $Id: include/CGAL/Polygon_2/Polygon_2_simplicity.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include @@ -220,9 +220,9 @@ template bool Less_segments:: less_than_in_tree(Vertex_index new_edge, Vertex_index tree_edge) const { - CGAL_polygon_precondition( + CGAL_precondition( m_vertex_data->edges[tree_edge.as_int()].is_in_tree); - CGAL_polygon_precondition( + CGAL_precondition( !m_vertex_data->edges[new_edge.as_int()].is_in_tree); Vertex_index left, mid, right; m_vertex_data->left_and_right_index(left, right, tree_edge); @@ -323,20 +323,20 @@ insertion_event(Tree *tree, Vertex_index prev_vt, std::pair result; if (left_turn) { result = tree->insert(prev_vt); - // CGAL_polygon_assertion(result.second) + // CGAL_assertion(result.second) td_prev.tree_it = result.first; td_prev.is_in_tree = true; result = tree->insert(mid_vt); - // CGAL_polygon_assertion(result.second) + // CGAL_assertion(result.second) td_mid.tree_it = result.first; td_mid.is_in_tree = true; } else { result = tree->insert(mid_vt); - // CGAL_polygon_assertion(result.second) + // CGAL_assertion(result.second) td_mid.tree_it = result.first; td_mid.is_in_tree = true; result = tree->insert(prev_vt); - // CGAL_polygon_assertion(result.second) + // CGAL_assertion(result.second) td_prev.tree_it = result.first; td_prev.is_in_tree = true; } @@ -369,7 +369,7 @@ replacement_event(Tree *tree, Vertex_index cur_edge, Vertex_index next_edge) // check if continuation point is on the right side of neighbor segments typedef typename Tree::iterator It; Edge_data &td = edges[cur_edge.as_int()]; - CGAL_polygon_assertion(td.is_in_tree); + CGAL_assertion(td.is_in_tree); It cur_seg = td.tree_it; Vertex_index cur_vt = (td.is_left_to_right) ? next_edge : cur_edge; if (cur_seg != tree->begin()) { diff --git a/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h b/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h index 745c890a..f1c3ebef 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h $ -// $Id: Polygon_2_vertex_circulator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h $ +// $Id: include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_2_algorithms.h b/thirdparty/CGAL/include/CGAL/Polygon_2_algorithms.h index eac1d510..ace83756 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_2_algorithms.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_2_algorithms.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon/include/CGAL/Polygon_2_algorithms.h $ -// $Id: Polygon_2_algorithms.h 875f823 2020-08-26T11:10:29+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon/include/CGAL/Polygon_2_algorithms.h $ +// $Id: include/CGAL/Polygon_2_algorithms.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,7 +24,7 @@ #include #include #include -#include +#include /// namespace CGAL { @@ -231,7 +231,7 @@ bool is_convex_2(ForwardIterator first, /// /// The simplicity test is implemented by means of a plane sweep algorithm. /// The algorithm is quite robust when used with inexact number types. -/// The running time is `O(n log n)`, where n is the number of vertices of the +/// The running time is \cgalBigO{n log n}, where n is the number of vertices of the /// polygon. /// /// \sa `PolygonTraits_2` diff --git a/thirdparty/CGAL/include/CGAL/Polygon_convex_decomposition_2.h b/thirdparty/CGAL/include/CGAL/Polygon_convex_decomposition_2.h index d53199a6..df5c83b1 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_convex_decomposition_2.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_convex_decomposition_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Polygon_convex_decomposition_2.h $ -// $Id: Polygon_convex_decomposition_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Polygon_convex_decomposition_2.h $ +// $Id: include/CGAL/Polygon_convex_decomposition_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein @@ -22,7 +22,7 @@ namespace CGAL { /*! * \class - * The O(n^4) optimal strategy for decomposing a polygon into convex + * The \cgalBigO{n^4} optimal strategy for decomposing a polygon into convex * sub-polygons. */ template + +#include +#include + +#include +#include + +#include + +namespace CGAL +{ +namespace Polygon_mesh_processing +{ +/*! +* \ingroup PMP_meshing_grp +* a sizing field describing variable target mesh edge lengths for +* `CGAL::Polygon_mesh_processing::isotropic_remeshing()`. +* This adaptive sizing field is a function of local discrete curvatures, +* computed using the +* `CGAL::Polygon_mesh_processing::interpolated_corrected_curvatures()` function. +* +* Edges too long with respect to the local target edge length are split in two, while +* edges that are too short are collapsed. +* +* This class depends on the \eigen library. +* +* \cgalModels{PMPSizingField} +* +* \sa `isotropic_remeshing()` +* \sa `Uniform_sizing_field` +* +* @tparam PolygonMesh model of `MutableFaceGraph` that +* has an internal property map for `CGAL::vertex_point_t`. +*/ +template ::const_type> +class Adaptive_sizing_field +#ifndef DOXYGEN_RUNNING +: public internal::Sizing_field_base +#endif +{ +private: + typedef internal::Sizing_field_base Base; + typedef typename CGAL::dynamic_vertex_property_t Vertex_property_tag; + typedef typename boost::property_map::type VertexSizingMap; + +public: + typedef typename Base::K K; + typedef typename Base::FT FT; + typedef typename Base::Point_3 Point_3; + typedef typename Base::face_descriptor face_descriptor; + typedef typename Base::halfedge_descriptor halfedge_descriptor; + typedef typename Base::vertex_descriptor vertex_descriptor; + + /// \name Creation + /// @{ + /*! + * Constructor + * + * @tparam FaceRange range of `boost::graph_traits::%face_descriptor`, + * model of `Range`. Its iterator type is `ForwardIterator`. + * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * @param tol the error tolerance, used together with curvature to derive target edge length. + * Lower tolerance values will result in shorter mesh edges. + * @param edge_len_min_max contains the bounds for minimum and maximum + * edge lengths + * @param face_range the range of triangular faces defining one or several surface patches + * to be remeshed. It should be the same as the range of faces passed to `isotropic_remeshing()`. + * @param pmesh a polygon mesh with triangulated surface patches to be remeshed. It should be the + * same mesh as the one passed to `isotropic_remeshing()`. + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below + + * \cgalNamedParamsBegin + * \cgalParamNBegin{vertex_point_map} + * \cgalParamDescription{a property map associating points to the vertices of `pmesh`} + * \cgalParamType{a class model of `ReadWritePropertyMap` with + * `boost::graph_traits::%vertex_descriptor` + * as key type and `%Point_3` as value type} + * \cgalParamDefault{`boost::get(CGAL::vertex_point, pmesh)`} + * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + * must be available in `PolygonMesh`.} + * \cgalParamNEnd + * + * \cgalParamNBegin{ball_radius} + * \cgalParamDescription{`ball_radius` parameter passed to `interpolated_corrected_curvatures()`} + * \cgalParamNEnd + * \cgalNamedParamsEnd + */ + template + Adaptive_sizing_field(const FT tol + , const std::pair& edge_len_min_max + , const FaceRange& face_range + , PolygonMesh& pmesh + , const NamedParameters& np = parameters::default_values()) + : tol(tol) + , m_short(edge_len_min_max.first) + , m_long(edge_len_min_max.second) + , m_vpmap(parameters::choose_parameter( + parameters::get_parameter(np, internal_np::vertex_point), + get_property_map(vertex_point, pmesh))) + , m_vertex_sizing_map(get(Vertex_property_tag(), pmesh)) + { + if (face_range.size() == faces(pmesh).size()) + { + // calculate curvature from the whole mesh + calc_sizing_map(pmesh, np); + } + else + { + // expand face selection and calculate curvature from it + std::vector selection(face_range.begin(), face_range.end()); + auto is_selected = get(CGAL::dynamic_face_property_t(), pmesh); + for (face_descriptor f : faces(pmesh)) put(is_selected, f, false); + for (face_descriptor f : face_range) put(is_selected, f, true); + expand_face_selection(selection, pmesh, 1, + is_selected, std::back_inserter(selection)); + Face_filtered_graph ffg(pmesh, selection); + + calc_sizing_map(ffg, np); + } + } + + ///@} + +private: + template + void calc_sizing_map(FaceGraph& face_graph + , const NamedParameters& np) + { + typedef Principal_curvatures_and_directions Principal_curvatures; + typedef typename CGAL::dynamic_vertex_property_t Vertex_curvature_tag; + typedef typename boost::property_map::type Vertex_curvature_map; + + using parameters::choose_parameter; + using parameters::get_parameter; + typename Base::FT radius = choose_parameter(get_parameter(np, internal_np::ball_radius), -1); + +#ifdef CGAL_PMP_REMESHING_VERBOSE + int oversize = 0; + int undersize = 0; + int insize = 0; + std::cout << "Calculating sizing field..." << std::endl; +#endif + + Vertex_curvature_map vertex_curvature_map = get(Vertex_curvature_tag(), face_graph); + interpolated_corrected_curvatures(face_graph, + parameters::vertex_principal_curvatures_and_directions_map(vertex_curvature_map) + .ball_radius(radius)); + // calculate vertex sizing field L(x_i) from the curvature field + for(vertex_descriptor v : vertices(face_graph)) + { + auto vertex_curv = get(vertex_curvature_map, v); + const FT max_absolute_curv = (CGAL::max)(CGAL::abs(vertex_curv.max_curvature), + CGAL::abs(vertex_curv.min_curvature)); + const FT vertex_size_sq = 6 * tol / max_absolute_curv - 3 * CGAL::square(tol); + if (vertex_size_sq > CGAL::square(m_long)) + { + put(m_vertex_sizing_map, v, m_long); +#ifdef CGAL_PMP_REMESHING_VERBOSE + ++oversize; +#endif + } + else if (vertex_size_sq < CGAL::square(m_short)) + { + put(m_vertex_sizing_map, v, m_short); +#ifdef CGAL_PMP_REMESHING_VERBOSE + ++undersize; +#endif + } + else + { + put(m_vertex_sizing_map, v, CGAL::approximate_sqrt(vertex_size_sq)); +#ifdef CGAL_PMP_REMESHING_VERBOSE + ++insize; +#endif + } + } +#ifdef CGAL_PMP_REMESHING_VERBOSE + std::cout << " done (" << insize << " from curvature, " + << oversize << " set to max, " + << undersize << " set to min)" << std::endl; +#endif + } + + FT sqlength(const vertex_descriptor va, + const vertex_descriptor vb) const + { + return FT(CGAL::squared_distance(get(m_vpmap, va), get(m_vpmap, vb))); + } + + FT sqlength(const halfedge_descriptor& h, const PolygonMesh& pmesh) const + { + return sqlength(target(h, pmesh), source(h, pmesh)); + } + +public: + FT at(const vertex_descriptor v, const PolygonMesh& /* pmesh */) const + { + CGAL_assertion(get(m_vertex_sizing_map, v)); + return get(m_vertex_sizing_map, v); + } + + std::optional is_too_long(const vertex_descriptor va, const vertex_descriptor vb, const PolygonMesh& /* pmesh */) const + { + const FT sqlen = sqlength(va, vb); + FT sqtarg_len = CGAL::square(4./3. * (CGAL::min)(get(m_vertex_sizing_map, va), + get(m_vertex_sizing_map, vb))); + CGAL_assertion(get(m_vertex_sizing_map, va)); + CGAL_assertion(get(m_vertex_sizing_map, vb)); + if (sqlen > sqtarg_len) + return sqlen / sqtarg_len; + else + return std::nullopt; + } + + std::optional is_too_short(const halfedge_descriptor h, const PolygonMesh& pmesh) const + { + const FT sqlen = sqlength(h, pmesh); + FT sqtarg_len = CGAL::square(4./5. * (CGAL::min)(get(m_vertex_sizing_map, source(h, pmesh)), + get(m_vertex_sizing_map, target(h, pmesh)))); + CGAL_assertion(get(m_vertex_sizing_map, source(h, pmesh))); + CGAL_assertion(get(m_vertex_sizing_map, target(h, pmesh))); + if (sqlen < sqtarg_len) + return sqlen / sqtarg_len; + else + return std::nullopt; + } + + Point_3 split_placement(const halfedge_descriptor h, const PolygonMesh& pmesh) const + { + return midpoint(get(m_vpmap, target(h, pmesh)), + get(m_vpmap, source(h, pmesh))); + } + + void register_split_vertex(const vertex_descriptor v, const PolygonMesh& pmesh) + { + // calculating it as the average of two vertices on other ends + // of halfedges as updating is done during an edge split + FT vertex_size = 0; + CGAL_assertion(CGAL::halfedges_around_target(v, pmesh).size() == 2); + for (halfedge_descriptor ha: CGAL::halfedges_around_target(v, pmesh)) + { + vertex_size += get(m_vertex_sizing_map, source(ha, pmesh)); + } + vertex_size /= CGAL::halfedges_around_target(v, pmesh).size(); + + put(m_vertex_sizing_map, v, vertex_size); + } + +private: + const FT tol; + const FT m_short; + const FT m_long; + const VPMap m_vpmap; + VertexSizingMap m_vertex_sizing_map; +}; + +}//end namespace Polygon_mesh_processing +}//end namespace CGAL + +#endif //CGAL_PMP_REMESHING_ADAPTIVE_SIZING_FIELD_H diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h index 02a849a3..660fb36b 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h $ -// $Id: polygon_mesh_io.h d5b51a8 2022-03-23T18:39:31+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h $ +// $Id: include/CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include @@ -105,7 +105,7 @@ bool read_polygon_mesh(const std::string& fname, std::vector points; std::vector > faces; - if(!CGAL::IO::read_polygon_soup(fname, points, faces)) + if(!CGAL::IO::read_polygon_soup(fname, points, faces, CGAL::parameters::verbose(verbose))) { if(verbose) std::cerr << "Warning: cannot read polygon soup" << std::endl; diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h index d85d0d45..2c2168d9 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h $ -// $Id: Non_manifold_feature_map.h 64ead81 2021-10-08T15:28:13+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h $ +// $Id: include/CGAL/Polygon_mesh_processing/Non_manifold_feature_map.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot @@ -28,8 +28,8 @@ struct Non_manifold_feature_map typedef typename Graph_traits::halfedge_descriptor halfedge_descriptor; typedef dynamic_edge_property_t Edge_to_id_tag; typedef dynamic_vertex_property_t Vertex_to_id_tag; - typedef typename boost::property_map::type Edge_to_nm_id; - typedef typename boost::property_map::type Vertex_to_nm_id; + typedef typename boost::property_map::const_type Edge_to_nm_id; + typedef typename boost::property_map::const_type Vertex_to_nm_id; Edge_to_nm_id e_nm_id; Vertex_to_nm_id v_nm_id; std::vector< std::vector > non_manifold_edges; @@ -39,7 +39,7 @@ struct Non_manifold_feature_map {} template - Non_manifold_feature_map(PolygonMesh& pm, Vpm vpm) + Non_manifold_feature_map(const PolygonMesh& pm, Vpm vpm) : e_nm_id(get(Edge_to_id_tag(), pm)) , v_nm_id(get(Vertex_to_id_tag(), pm)) { @@ -99,6 +99,14 @@ struct Non_manifold_feature_map } } } + + void clear() + { + non_manifold_edges.clear(); + non_manifold_vertices.clear(); + e_nm_id = Edge_to_nm_id(); + v_nm_id = Vertex_to_nm_id(); + } }; } } // end of CGAL::Polygon_mesh_processing diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/Uniform_sizing_field.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/Uniform_sizing_field.h new file mode 100644 index 00000000..f1cdfd45 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/Uniform_sizing_field.h @@ -0,0 +1,149 @@ +// Copyright (c) 2020 GeometryFactory (France) +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Uniform_sizing_field.h $ +// $Id: include/CGAL/Polygon_mesh_processing/Uniform_sizing_field.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Jane Tournois + +#ifndef CGAL_PMP_REMESHING_UNIFORM_SIZING_FIELD_H +#define CGAL_PMP_REMESHING_UNIFORM_SIZING_FIELD_H + +#include + +#include + +#include + +namespace CGAL +{ +namespace Polygon_mesh_processing +{ +/*! +* \ingroup PMP_meshing_grp +* a sizing field describing a uniform target edge length for +* `CGAL::Polygon_mesh_processing::isotropic_remeshing()`. +* +* Edges longer than 4/3 of the target edge length will be split in half, while +* edges shorter than 4/5 of the target edge length will be collapsed. +* +* \cgalModels{PMPSizingField} +* +* \sa `isotropic_remeshing()` +* \sa `Adaptive_sizing_field` +* +* @tparam PolygonMesh model of `MutableFaceGraph` that +* has an internal property map for `CGAL::vertex_point_t`. +* @tparam VPMap property map associating points to the vertices of `pmesh`, +* model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` +* as key type and `%Point_3` as value type. Default is `boost::get(CGAL::vertex_point, pmesh)`. +*/ +template ::const_type> +class Uniform_sizing_field +#ifndef DOXYGEN_RUNNING +: public internal::Sizing_field_base +#endif +{ +private: + typedef internal::Sizing_field_base Base; + +public: + typedef typename Base::FT FT; + typedef typename Base::Point_3 Point_3; + typedef typename Base::halfedge_descriptor halfedge_descriptor; + typedef typename Base::vertex_descriptor vertex_descriptor; + + /// \name Creation + /// @{ + + /*! + * Constructor. + * \param size the target edge length for isotropic remeshing. If set to 0, + * the criterion for edge length is ignored and edges are neither split nor collapsed. + * \param vpmap is the input vertex point map that associates points to the vertices of + * the input mesh. + */ + Uniform_sizing_field(const FT size, const VPMap& vpmap) + : m_size(size) + , m_sq_short( CGAL::square(4./5. * size)) + , m_sq_long( CGAL::square(4./3. * size)) + , m_vpmap(vpmap) + {} + + /*! + * Constructor using internal vertex point map of the input polygon mesh. + * + * @param size the target edge length for isotropic remeshing. If set to 0, + * the criterion for edge length is ignored and edges are neither split nor collapsed. + * @param pmesh a polygon mesh with triangulated surface patches to be remeshed. The default + * vertex point map of `pmesh` is used to construct the class. + */ + Uniform_sizing_field(const FT size, const PolygonMesh& pmesh) + : Uniform_sizing_field(size, get(CGAL::vertex_point, pmesh)) + {} + + /// @} + +private: + FT sqlength(const vertex_descriptor va, + const vertex_descriptor vb) const + { + return FT(squared_distance(get(m_vpmap, va), get(m_vpmap, vb))); + } + + FT sqlength(const halfedge_descriptor& h, const PolygonMesh& pmesh) const + { + return sqlength(target(h, pmesh), source(h, pmesh)); + } + +public: + FT at(const vertex_descriptor /* v */, const PolygonMesh& /* pmesh */) const + { + return m_size; + } + + std::optional is_too_long(const vertex_descriptor va, const vertex_descriptor vb, const PolygonMesh& /* pmesh */) const + { + const FT sqlen = sqlength(va, vb); + if (sqlen > m_sq_long) + //no need to return the ratio for the uniform field + return sqlen; + else + return std::nullopt; + } + + std::optional is_too_short(const halfedge_descriptor h, const PolygonMesh& pmesh) const + { + const FT sqlen = sqlength(h, pmesh); + if (sqlen < m_sq_short) + //no need to return the ratio for the uniform field + return sqlen; + else + return std::nullopt; + } + + Point_3 split_placement(const halfedge_descriptor h, const PolygonMesh& pmesh) const + { + return midpoint(get(m_vpmap, target(h, pmesh)), + get(m_vpmap, source(h, pmesh))); + } + + void register_split_vertex(const vertex_descriptor /* v */, const PolygonMesh& /* pmesh */) + {} + +private: + const FT m_size; + const FT m_sq_short; + const FT m_sq_long; + const VPMap m_vpmap; +}; + +}//end namespace Polygon_mesh_processing +}//end namespace CGAL + +#endif //CGAL_PMP_REMESHING_UNIFORM_SIZING_FIELD_H diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h index 8e8c5343..d88c74b3 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h $ -// $Id: angle_and_area_smoothing.h ec53e0a 2022-04-21T06:51:12+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h $ +// $Id: include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -31,9 +31,9 @@ namespace Polygon_mesh_processing { /*! * \ingroup PMP_meshing_grp * -* \short smooths a triangulated region of a polygon mesh. +* \brief smooths a triangulated region of a polygon mesh. * -* This function attempts to make the triangle angle and area distributions as uniform as possible +* This function aims to make the triangle angle and area distributions as uniform as possible * by moving (non-constrained) vertices. * * Angle-based smoothing does not change the combinatorial information of the mesh. Area-based smoothing @@ -329,13 +329,33 @@ void angle_and_area_smoothing(const FaceRange& faces, } } -///\cond SKIP_IN_MANUAL +/*! +* \ingroup PMP_meshing_grp +* +* \brief smooths a polygon mesh. +* +* This function aims to make the triangle angle and area distributions as uniform as possible +* by moving (non-constrained) vertices. +* +* Angle-based smoothing does not change the combinatorial information of the mesh. Area-based smoothing +* might change the combinatorial information, unless specified otherwise. It is also possible +* to make the smoothing algorithm "safer" by rejecting moves that, when applied, would worsen the +* quality of the mesh, e.g. that would decrease the value of the smallest angle around a vertex or +* create self-intersections. +* +* Optionally, the points are reprojected after each iteration. +* +* See the overload which takes a face range as additonal parameter for a comprehensive description +* of the parameters. +*/ template void angle_and_area_smoothing(TriangleMesh& tmesh, const CGAL_NP_CLASS& np = parameters::default_values()) { angle_and_area_smoothing(faces(tmesh), tmesh, np); } + +///\cond SKIP_IN_MANUAL template void angles_evaluation(TriangleMesh& tmesh, GeomTraits traits, Stream& output) { diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/autorefinement.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/autorefinement.h new file mode 100644 index 00000000..71fc503a --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/autorefinement.h @@ -0,0 +1,1414 @@ +// Copyright (c) 2023 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/autorefinement.h $ +// $Id: include/CGAL/Polygon_mesh_processing/autorefinement.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Sebastien Loriot +// + +#ifndef CGAL_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_H +#define CGAL_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_H + +#include + +#include +#include +#include +#include +#include +#include +#include + +#ifdef CGAL_AUTOREF_USE_PROGRESS_DISPLAY +#include +#endif + +// output +#include +#include +#include + + +#ifdef CGAL_PMP_AUTOREFINE_USE_DEFAULT_VERBOSE +#define CGAL_PMP_AUTOREFINE_VERBOSE(X) std::cout << X << "\n"; +#endif + +#ifndef CGAL_PMP_AUTOREFINE_VERBOSE +#define CGAL_PMP_AUTOREFINE_VERBOSE(MSG) +#endif + +#ifdef CGAL_LINKED_WITH_TBB +#include +#if TBB_INTERFACE_VERSION < 12010 && !defined(TBB_PREVIEW_CONCURRENT_ORDERED_CONTAINERS) +#define CGAL_HAS_DEFINED_TBB_PREVIEW_CONCURRENT_ORDERED_CONTAINERS +#define TBB_PREVIEW_CONCURRENT_ORDERED_CONTAINERS 1 +#endif +#include +#include +#ifdef CGAL_AUTOREF_SET_POINT_IDS_USING_MUTEX +#include +#endif +#endif + +#include + +//#define CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS +//#define CGAL_AUTOREFINE_DEBUG_COUNTERS +//#define CGAL_AUTOREF_DEBUG_DEPTH + +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS +#include +#endif + +#if defined(CGAL_AUTOREFINE_DEBUG_COUNTERS) || defined(CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS) +#include +#endif + +namespace CGAL { +namespace Polygon_mesh_processing { + +namespace Autorefinement { + +/** \ingroup PMP_corefinement_grp + * %Default visitor model of `PMPAutorefinementVisitor`. + * All of its functions have an empty body. This class can be used as a + * base class if only some of the functions of the concept require to be + * overridden. + */ +struct Default_visitor +{ + inline void number_of_output_triangles(std::size_t /*nbt*/) {} + inline void verbatim_triangle_copy(std::size_t /*tgt_id*/, std::size_t /*src_id*/) {} + inline void new_subtriangle(std::size_t /*tgt_id*/, std::size_t /*src_id*/) {} +}; + +} // end of Autorefinement visitor + + +#ifndef DOXYGEN_RUNNING +namespace autorefine_impl { + +enum Segment_inter_type { NO_INTERSECTION=0, + POINT_INTERSECTION, + POINT_P, + POINT_Q, + POINT_R, + POINT_S, + COPLANAR_SEGMENT_PQ, + COPLANAR_SEGMENT_RS, + COPLANAR_SEGMENT_PS, + COPLANAR_SEGMENT_QS, + COPLANAR_SEGMENT_PR, + COPLANAR_SEGMENT_QR, + }; + +// test intersection in the interior of segment pq and rs with pq and rs being coplanar segments +// note that for coplanar cases, we might report identical endpoints +template +Segment_inter_type +do_coplanar_segments_intersect(std::size_t pi, std::size_t qi, + std::size_t ri, std::size_t si, + const std::vector& points, + const typename K::Vector_3& /* plane_normal */, + const K& k = K()) +{ + typename K::Collinear_are_ordered_along_line_3 cln_order = k.collinear_are_ordered_along_line_3_object(); + typename K::Coplanar_orientation_3 cpl_orient=k.coplanar_orientation_3_object(); + + const typename K::Point_3& p=points[pi]; + const typename K::Point_3& q=points[qi]; + const typename K::Point_3& r=points[ri]; + const typename K::Point_3& s=points[si]; + + // first handle case of shared endpoints + if (pi==ri) + { + if (si==qi || cpl_orient(p, q, s)!=COLLINEAR) return NO_INTERSECTION; + // can be s, q or nothing + if (cln_order(p,s,q)) + return POINT_S; + if (cln_order(p,q,s)) + return POINT_Q; + return NO_INTERSECTION; + } + else + { + if(pi==si) + { + if (qi==ri || cpl_orient(p, q, r)!=COLLINEAR) return NO_INTERSECTION; + // can be r, q or nothing + if (cln_order(p,r,q)) + return POINT_R; + if (cln_order(p,q,r)) + return POINT_Q; + return NO_INTERSECTION; + } + else + { + if (qi==ri) + { + if (pi==si || cpl_orient(p, q, s)!=COLLINEAR) return NO_INTERSECTION; + // can be p, s or nothing + if (cln_order(p,s,q)) + return POINT_S; + if (cln_order(q,p,s)) + return POINT_P; + return NO_INTERSECTION; + } + else + { + if (qi==si) + { + if (pi==ri || cpl_orient(p, q, r)!=COLLINEAR) return NO_INTERSECTION; + // can be p, r or nothing + if (cln_order(p,r,q)) + return POINT_R; + if (cln_order(q,p,r)) + return POINT_P; + return NO_INTERSECTION; + } + } + } + } + + // supporting_line intersects: points are coplanar + ::CGAL::Orientation pqr = cpl_orient(p, q, r); + ::CGAL::Orientation pqs = cpl_orient(p, q, s); + + if(pqr == COLLINEAR && pqs == COLLINEAR) + { + // segments are collinear + bool r_in_pq = cln_order(p, r, q), + s_in_pq = cln_order(p, s, q), + p_in_rs = cln_order(r, p, s); + + if (r_in_pq) + { + // intersection could be rs, pr or qr + if (s_in_pq) + return COPLANAR_SEGMENT_RS; + if (p_in_rs) + return COPLANAR_SEGMENT_PR; + CGAL_assertion(cln_order(r, q, s)); + return COPLANAR_SEGMENT_QR; + } + else + { + if (s_in_pq) + { + // intersection could be ps or qs + if (p_in_rs) + return COPLANAR_SEGMENT_PS; + CGAL_assertion(cln_order(r, q, s)); + return COPLANAR_SEGMENT_QS; + } + else + if (p_in_rs) + { + CGAL_assertion(cln_order(r, q, s)); + return COPLANAR_SEGMENT_PQ; + } + } + return NO_INTERSECTION; + } + + if(pqr != pqs) + { + ::CGAL::Orientation rsp = cpl_orient(r, s, p); + + if (rsp==COLLINEAR) + { + if (pqr==COLLINEAR || pqs==COLLINEAR) + { + throw std::runtime_error("no expected #1"); + } + return POINT_P; + } + ::CGAL::Orientation rsq = cpl_orient(r, s, q); + if (rsq==COLLINEAR) + { + if (pqr==COLLINEAR || pqs==COLLINEAR) + { + throw std::runtime_error("no expected #2"); + } + return POINT_Q; + } + if (rsp!=rsq) + { + if (pqr==COLLINEAR) return POINT_R; + if (pqs==COLLINEAR) return POINT_S; + return POINT_INTERSECTION; + } + } + + return NO_INTERSECTION; +} + +// imported from Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h +template +void coplanar_intersections(const std::array& t1, + const std::array& t2, + std::vector& inter_pts) +{ + const typename K::Point_3& p1 = t1[0], q1 = t1[1], r1 = t1[2]; + const typename K::Point_3& p2 = t2[0], q2 = t2[1], r2 = t2[2]; + + std::list> l_inter_pts; + l_inter_pts.push_back(Intersections::internal::Point_on_triangle(-1,0)); + l_inter_pts.push_back(Intersections::internal::Point_on_triangle(-1,1)); + l_inter_pts.push_back(Intersections::internal::Point_on_triangle(-1,2)); + + //intersect t2 with the three half planes which intersection defines t1 + K k; + Intersections::internal::intersection_coplanar_triangles_cutoff(p1,q1,r1,0,p2,q2,r2,k,l_inter_pts); //line p1q1 + Intersections::internal::intersection_coplanar_triangles_cutoff(q1,r1,p1,1,p2,q2,r2,k,l_inter_pts); //line q1r1 + Intersections::internal::intersection_coplanar_triangles_cutoff(r1,p1,q1,2,p2,q2,r2,k,l_inter_pts); //line r1p1 + + for (const Intersections::internal::Point_on_triangle& pot : l_inter_pts) + inter_pts.push_back( pot.point(p1,q1,r1,p2,q2,r2,k) ); +} + +// imported from Polygon_mesh_processing/internal/Corefinement/intersect_triangle_segment_3.h +template +void +find_intersection(const typename K::Point_3& p, const typename K::Point_3& q, //segment + const typename K::Point_3& a, const typename K::Point_3& b, const typename K::Point_3& c, //triangle + std::vector& inter_pts, + bool is_p_coplanar=false, bool is_q_coplanar=false) // note that in coref this was wrt a halfedge not p/q +{ + Orientation ab=orientation(p,q,a,b); + Orientation bc=orientation(p,q,b,c); + Orientation ca=orientation(p,q,c,a); + + if ( ab==POSITIVE || bc==POSITIVE || ca==POSITIVE ) + return; + + int nb_coplanar=(ab==COPLANAR?1:0) + (bc==COPLANAR?1:0) + (ca==COPLANAR?1:0); + + if (is_p_coplanar) + { + inter_pts.push_back(p); + return; + } + if (is_q_coplanar) + { + inter_pts.push_back(q); + return; + } + + if (nb_coplanar!=2) + { + inter_pts.push_back( + typename K::Construct_plane_line_intersection_point_3()(a, b, c, p, q) + ); + } + else + { + if (ab!=COPLANAR) + { + // intersection is c + inter_pts.push_back(c); + return; + } + + if (bc!=COPLANAR) + { + // intersection is a + inter_pts.push_back(a); + return; + } + CGAL_assertion(ca!=COPLANAR); + // intersection is b + inter_pts.push_back(b); + } +} + +template +void test_edge(const typename K::Point_3& p, const typename K::Point_3& q, + const typename K::Point_3& a, const typename K::Point_3& b, const typename K::Point_3& c, + const Orientation abcp, + const Orientation abcq, + std::vector& inter_pts) +{ + switch ( abcp ) { + case POSITIVE: + switch ( abcq ) { + case POSITIVE: + // the segment lies in the positive open halfspaces defined by the + // triangle's supporting plane + break; + case NEGATIVE: + // p sees the triangle in counterclockwise order + find_intersection(p,q,a,b,c,inter_pts); + break; + //case COPLANAR: + default: + // q belongs to the triangle's supporting plane + // p sees the triangle in counterclockwise order + find_intersection(p,q,a,b,c,inter_pts,false,true); + } + break; + case NEGATIVE: + switch ( abcq ) { + case POSITIVE: + // q sees the triangle in counterclockwise order + find_intersection(q,p,a,b,c,inter_pts); + break; + case NEGATIVE: + // the segment lies in the negative open halfspaces defined by the + // triangle's supporting plane + break; + // case COPLANAR: + default: + // q belongs to the triangle's supporting plane + // p sees the triangle in clockwise order + find_intersection(q,p,a,b,c,inter_pts,true,false); + } + break; + default: + //case COPLANAR: // p belongs to the triangle's supporting plane + switch ( abcq ) { + case POSITIVE: + // q sees the triangle in counterclockwise order + find_intersection(q,p,a,b,c,inter_pts,false, true); + break; + case NEGATIVE: + // q sees the triangle in clockwise order + find_intersection(p,q,a,b,c,inter_pts,true); + break; + //case COPLANAR: + default: + // the segment is coplanar with the triangle's supporting plane + // we test whether the segment intersects the triangle in the common + // supporting plane + //if ( ::CGAL::Intersections::internal::do_intersect_coplanar(a,b,c,p,q,K()) ) + //{ + //handle coplanar intersection + // nothing done as coplanar case handle in collect_intersections + // and other intersection points will be collected with non-coplanar edges + //} + break; + } + } +} + +template +bool collect_intersections(const std::array& t1, + const std::array& t2, + std::vector& inter_pts) +{ + // test edges of t1 vs t2 + std::array ori; + for (int i=0; i<3; ++i) + ori[i] = orientation(t2[0],t2[1],t2[2],t1[i]); + + if (ori[0]== COPLANAR && ori[1]==COPLANAR && ori[2]==COPLANAR) + { + coplanar_intersections(t1, t2, inter_pts); +#ifdef CGAL_AUTOREF_DEBUG_DEPTH + for (auto p : inter_pts) + if (depth(p)>2) throw std::runtime_error("Depth is not 4: "+std::to_string(depth(p))); +#endif + + return true; + } + + for (int i=0; i<3; ++i) + { + int j=(i+1)%3; + test_edge(t1[i], t1[j], t2[0], t2[1], t2[2], ori[i], ori[j], inter_pts); + } + + // test edges of t2 vs t1 + for (int i=0; i<3; ++i) + ori[i] = orientation(t1[0],t1[1],t1[2],t2[i]); + for (int i=0; i<3; ++i) + { + int j=(i+1)%3; + test_edge(t2[i], t2[j], t1[0], t1[1], t1[2], ori[i], ori[j], inter_pts); + } + + // because we don't handle intersection type and can have edge-edge edge-vertex duplicates + std::sort(inter_pts.begin(), inter_pts.end()); + auto last = std::unique(inter_pts.begin(), inter_pts.end()); + inter_pts.erase(last, inter_pts.end()); + +#ifdef CGAL_AUTOREF_DEBUG_DEPTH + for (auto p : inter_pts) + if (depth(p)>2) throw std::runtime_error("Depth is not 2: "+std::to_string(depth(p))); +#endif + + return false; +} + +template +void generate_subtriangles(std::size_t ti, + std::vector>& segments, + std::vector& points, + const std::vector& in_triangle_ids, + const std::set >& intersecting_triangles, + const std::set >& coplanar_triangles, + const std::vector>& triangles, + PointVector& new_triangles + ) +{ + typedef CGAL::Projection_traits_3 P_traits; + typedef CGAL::No_constraint_intersection_tag Itag; + + typedef CGAL::Constrained_Delaunay_triangulation_2 CDT_2; + //typedef CGAL::Constrained_triangulation_plus_2 CDT; + typedef CDT_2 CDT; + + const std::array& t = triangles[ti]; + + // positive triangle normal + typename EK::Vector_3 n = normal(t[0], t[1], t[2]); + typename EK::Point_3 o(CGAL::ORIGIN); + + bool orientation_flipped = false; + if ( typename EK::Less_xyz_3()(o+n,o) ) + { + n=-n; + orientation_flipped = true; + } + + P_traits cdt_traits(n); + CDT cdt(cdt_traits); + cdt.insert_outside_affine_hull(t[0]); + cdt.insert_outside_affine_hull(t[1]); + typename CDT::Vertex_handle v = cdt.tds().insert_dim_up(cdt.infinite_vertex(), orientation_flipped); + v->set_point(t[2]); + +#ifdef CGAL_AUTOREFINE_DEBUG_COUNTERS + struct Counter + { + int c1=0; + int c2=0; + int c3=0; + int c4=0; + int c5=0; + int total=0; + ~Counter() + { + std::cout << "intersection of 3 planes: " << c1 << "\n"; + std::cout << "coplanar segment intersection : " << c2 << "\n"; + std::cout << "coplanar segment overlap: " << c3 << "\n"; + std::cout << "no intersection: " << c4 << "\n"; + std::cout << "intersection filtered with bboxes: " << c5 << "\n"; + std::cout << "# pairs of segments : " << total << "\n"; + std::cout << "time computing segment intersections: " << timer1.time() << "\n"; + std::cout << "time sorting intersection points: " << timer2.time() << "\n"; + std::cout << "time for cdt of constraints: " << timer3.time() << "\n"; + std::cout << "time coplanar segment intersections: " << timer4.time() << "\n"; + std::cout << "time of do_coplanar_segments_intersect: " << timer5.time() << "\n"; + std::cout << "time of triplane intersection: " << timer6.time() << "\n"; + } + CGAL::Real_timer timer1, timer2, timer3, timer4, timer5, timer6; + }; + + static Counter counter; +#define CGAL_AUTOREF_COUNTER_INSTRUCTION(X) X +#else +#define CGAL_AUTOREF_COUNTER_INSTRUCTION(X) +#endif + + // pre-compute segment intersections + if (!segments.empty()) + { + std::size_t nbs = segments.size(); + + std::vector< std::vector > points_on_segments(nbs); + + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer1.start();) + + std::map point_id_map; + + for (std::size_t pid=0; pidsecond; + }; + + std::vector point_boxes(points.size()); + for (std::size_t i = 0; i segment_boxes(nbs); + for (std::size_t i = 0; i(segments[i].first, segments[i].second, + segments[j].first, segments[j].second, + points, n); + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer5.stop();) + + switch(seg_inter_type) + { + case POINT_P: + { + points_on_segments[j].push_back(segments[i].first); + break; + } + case POINT_Q: + { + points_on_segments[j].push_back(segments[i].second); + break; + } + case POINT_R: + { + points_on_segments[i].push_back(segments[j].first); + break; + } + case POINT_S: + { + points_on_segments[i].push_back(segments[j].second); + break; + } + case POINT_INTERSECTION: + { + if ( coplanar_triangles.count(CGAL::make_sorted_pair(in_triangle_ids[i], in_triangle_ids[j])) == 0 + && coplanar_triangles.count(CGAL::make_sorted_pair(ti, in_triangle_ids[j])) == 0 + && coplanar_triangles.count(CGAL::make_sorted_pair(in_triangle_ids[i], ti)) == 0) + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer6.start();) + typename EK::Point_3 pt = typename EK::Construct_planes_intersection_point_3()( + triangles[in_triangle_ids[i]][0], triangles[in_triangle_ids[i]][1],triangles[in_triangle_ids[i]][2], + triangles[in_triangle_ids[j]][0], triangles[in_triangle_ids[j]][1],triangles[in_triangle_ids[j]][2], + triangles[ti][0], triangles[ti][1],triangles[ti][2]); + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer6.stop();) + + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c1;) + std::size_t pid = get_point_id(pt); + points_on_segments[i].push_back(pid); + points_on_segments[j].push_back(pid); + } + else + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c2;) + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer4.start();) + typename EK::Point_3 pt = typename EK::Construct_coplanar_segments_intersection_point_3()( + points[segments[i].first], points[segments[i].second], + points[segments[j].first], points[segments[j].second]); + + std::size_t pid = get_point_id(pt); + points_on_segments[i].push_back(pid); + points_on_segments[j].push_back(pid); + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer4.stop();) + } + break; + } + case COPLANAR_SEGMENT_PQ: + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c3;) + points_on_segments[j].push_back(segments[i].first); + points_on_segments[j].push_back(segments[i].second); + break; + } + case COPLANAR_SEGMENT_RS: + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c3;) + points_on_segments[i].push_back(segments[j].first); + points_on_segments[i].push_back(segments[j].second); + break; + } + case COPLANAR_SEGMENT_PR: + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c3;) + points_on_segments[i].push_back(segments[j].first); + points_on_segments[j].push_back(segments[i].first); + break; + } + case COPLANAR_SEGMENT_QS: + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c3;) + points_on_segments[i].push_back(segments[j].second); + points_on_segments[j].push_back(segments[i].second); + break; + } + case COPLANAR_SEGMENT_PS: + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c3;) + points_on_segments[i].push_back(segments[j].second); + points_on_segments[j].push_back(segments[i].first); + break; + } + case COPLANAR_SEGMENT_QR: + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c3;) + points_on_segments[i].push_back(segments[j].first); + points_on_segments[j].push_back(segments[i].second); + break; + } + case NO_INTERSECTION: + { + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.c4;) + } + } + } + CGAL_AUTOREF_COUNTER_INSTRUCTION(++counter.total;) + } + } + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer1.stop();) + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer2.start();) + std::size_t nb_new_segments=0; + for (std::size_t i = 0; itgt[coord]) + { + std::swap(src_id, tgt_id); + std::swap(src, tgt); + } + + points_on_segments[i].push_back(src_id); + std::swap(points_on_segments[i].front(), points_on_segments[i].back()); + std::sort(std::next(points_on_segments[i].begin()), points_on_segments[i].end(), + [&](std::size_t id1, std::size_t id2) + { + if (id1==id2) return false; + return points[id1][coord](points.begin(), points.end()).size()); + CGAL_assertion(points.size()==point_id_map.size()); + } + + for (std::pair& s : segments) + if (s.second < s.first) + std::swap(s.first,s.second); + std::sort(segments.begin(), segments.end()); + auto last = std::unique(segments.begin(), segments.end()); + segments.erase(last, segments.end()); + + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer3.start();) + if (segments.empty()) + cdt.insert(points.begin(), points.end()); + else + cdt.insert_constraints(points.begin(), points.end(), segments.begin(), segments.end()); + CGAL_AUTOREF_COUNTER_INSTRUCTION(counter.timer3.stop();) + + for (typename CDT::Face_handle fh : cdt.finite_face_handles()) + { + if (orientation_flipped) + new_triangles.push_back( { CGAL::make_array(fh->vertex(0)->point(), + fh->vertex(cdt.cw(0))->point(), + fh->vertex(cdt.ccw(0))->point()), ti } ); + else + new_triangles.push_back( { CGAL::make_array(fh->vertex(0)->point(), + fh->vertex(cdt.ccw(0))->point(), + fh->vertex(cdt.cw(0))->point()), ti } ); + } +} + +} // end of autorefine_impl +#endif + +/** +* \ingroup PMP_corefinement_grp +* +* refines a soup of triangles so that no pair of triangles intersects. +* Output triangles may share a common edge or a common vertex (but with the same indexed position in `points`). +* Note that points in `soup_points` can only be added (intersection points) at the end of the container, with the initial order preserved. +* Note that if `soup_points` contains two or more identical points then only the first copy (following the order in the `soup_points`) +* will be used in `soup_triangles`. +* `soup_triangles` will be updated to contain both the input triangles and the new subdivided triangles. Degenerate triangles will be removed. +* Also triangles in `soup_triangles` will be triangles without intersection first, followed by triangles coming from a subdivision induced +* by an intersection. The named parameter `visitor()` can be used to track +* +* @tparam PointRange a model of the concept `RandomAccessContainer` +* whose value type is the point type +* @tparam TriangleRange a model of the concepts `RandomAccessContainer`, `BackInsertionSequence` and `Swappable`, whose +* value type is a model of the concept `RandomAccessContainer` whose value type is convertible to `std::size_t` and that +* is constructible from an `std::initializer_list` of size 3. +* @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" +* +* @param soup_points points of the soup of polygons +* @param soup_triangles each element in the range describes a triangle using the indexed position of the points in `soup_points` +* @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below +* +* \cgalNamedParamsBegin +* \cgalParamNBegin{concurrency_tag} +* \cgalParamDescription{a tag indicating if the task should be done using one or several threads.} +* \cgalParamType{Either `CGAL::Sequential_tag`, or `CGAL::Parallel_tag`, or `CGAL::Parallel_if_available_tag`} +* \cgalParamDefault{`CGAL::Sequential_tag`} +* \cgalParamNEnd +* \cgalParamNBegin{point_map} +* \cgalParamDescription{a property map associating points to the elements of the range `soup_points`} +* \cgalParamType{a model of `ReadWritePropertyMap` whose value type is a point type} +* \cgalParamDefault{`CGAL::Identity_property_map`} +* \cgalParamNEnd +* \cgalParamNBegin{geom_traits} +* \cgalParamDescription{an instance of a geometric traits class} +* \cgalParamType{a class model of `Kernel`} +* \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} +* \cgalParamExtra{The geometric traits class must be compatible with the point type.} +* \cgalParamNEnd +* \cgalParamNBegin{visitor} +* \cgalParamDescription{a visitor used to track the creation of new faces} +* \cgalParamType{a class model of `PMPAutorefinementVisitor`} +* \cgalParamDefault{`Autorefinement::Default_visitor`} +* \cgalParamExtra{The visitor will be copied.} +* \cgalParamNEnd +* \cgalNamedParamsEnd +* +*/ +template +void autorefine_triangle_soup(PointRange& soup_points, + TriangleRange& soup_triangles, + const NamedParameters& np = parameters::default_values()) +{ + using parameters::choose_parameter; + using parameters::get_parameter; + + typedef typename GetPolygonSoupGeomTraits::type GT; + typedef typename GetPointMap::const_type Point_map; + Point_map pm = choose_parameter(get_parameter(np, internal_np::point_map)); + + typedef typename internal_np::Lookup_named_param_def < + internal_np::concurrency_tag_t, + NamedParameters, + Sequential_tag + > ::type Concurrency_tag; + + // visitor + typedef typename internal_np::Lookup_named_param_def < + internal_np::visitor_t, + NamedParameters, + Autorefinement::Default_visitor//default + > ::type Visitor; + Visitor visitor(choose_parameter(get_parameter(np, internal_np::visitor))); + + + constexpr bool parallel_execution = std::is_same_v; + +#ifndef CGAL_LINKED_WITH_TBB + static_assert (!parallel_execution, + "Parallel_tag is enabled but TBB is unavailable."); +#endif + + typedef std::size_t Input_TID; + typedef std::pair Pair_of_triangle_ids; + + // no need for a concurrent vector as the called function itself + // takes care of sequentially writing into the output iterator + std::vector si_pairs; + + // collect intersecting pairs of triangles + CGAL_PMP_AUTOREFINE_VERBOSE("collect intersecting pairs"); + triangle_soup_self_intersections(soup_points, soup_triangles, std::back_inserter(si_pairs), np); + + if (si_pairs.empty()) + { + if constexpr (!std::is_same_v) + { + visitor.number_of_output_triangles(soup_triangles.size()); + for(std::size_t i=0; i is_degen(soup_triangles.size(), false); + + for (const Pair_of_triangle_ids& p : si_pairs) + if (p.first==p.second) // bbox inter reports (f,f) for degenerate faces + is_degen[p.first] = true; + + // assign an id per triangle involved in an intersection + // + the faces involved in the intersection + std::vector tri_inter_ids(soup_triangles.size(), -1); + std::vector intersected_faces; + int tiid=-1; + for (const Pair_of_triangle_ids& p : si_pairs) + { + if (tri_inter_ids[p.first]==-1 && !is_degen[p.first]) + { + tri_inter_ids[p.first]=++tiid; + intersected_faces.push_back(p.first); + } + if (tri_inter_ids[p.second]==-1 && !is_degen[p.second]) + { + tri_inter_ids[p.second]=++tiid; + intersected_faces.push_back(p.second); + } + } + + // init the vector of triangles used for the autorefinement of triangles + typedef CGAL::Exact_predicates_exact_constructions_kernel EK; + std::vector< std::array > triangles(tiid+1); + Cartesian_converter to_exact; + + for(Input_TID f : intersected_faces) + { + triangles[tri_inter_ids[f]]= CGAL::make_array( + to_exact( get(pm, soup_points[soup_triangles[f][0]]) ), + to_exact( get(pm, soup_points[soup_triangles[f][1]]) ), + to_exact( get(pm, soup_points[soup_triangles[f][2]]) ) ); + } + + std::vector< std::vector > > all_segments(triangles.size()); + std::vector< std::vector > all_points(triangles.size()); + std::vector< std::vector > all_in_triangle_ids(triangles.size()); + + CGAL_PMP_AUTOREFINE_VERBOSE("compute intersections"); +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + Real_timer t; + t.start(); +#endif + std::set > intersecting_triangles; + std::set > coplanar_triangles; + //TODO: PARALLEL_FOR #2 + for (const Pair_of_triangle_ids& p : si_pairs) + { + int i1 = tri_inter_ids[p.first], + i2 = tri_inter_ids[p.second]; + + if (i1==-1 || i2==-1) continue; //skip degenerate faces + + const std::array& t1 = triangles[i1]; + const std::array& t2 = triangles[i2]; + + std::vector inter_pts; + bool triangles_are_coplanar = autorefine_impl::collect_intersections(t1, t2, inter_pts); + + CGAL_assertion( + CGAL::do_intersect(EK::Triangle_3(t1[0], t1[1], t1[2]), EK::Triangle_3(t2[0], t2[1], t2[2])) + != inter_pts.empty()); + + if (!inter_pts.empty()) + { + std::size_t nbi = inter_pts.size(); + switch(nbi) + { + case 1: + all_points[i1].push_back(inter_pts[0]); + all_points[i2].push_back(inter_pts[0]); + break; + case 2: + all_segments[i1].push_back(CGAL::make_array(inter_pts[0], inter_pts[1])); + all_segments[i2].push_back(CGAL::make_array(inter_pts[0], inter_pts[1])); + all_in_triangle_ids[i1].push_back(i2); + all_in_triangle_ids[i2].push_back(i1); + break; + default: + for (std::size_t i=0;i>> all_segments_ids(all_segments.size()); + + auto deduplicate_inserted_segments = [&](std::size_t ti) + { + if (!all_segments[ti].empty()) + { + std::map point_id_map; + + + auto get_point_id = [&](const EK::Point_3& pt) + { + auto insert_res = point_id_map.insert(std::make_pair(pt, all_points[ti].size())); + if (insert_res.second) + all_points[ti].push_back(pt); + return insert_res.first->second; + }; + + + if (!all_points[ti].empty()) + { + using EPoint_3 = EK::Point_3; // workaround for MSVC 2022 bug + std::vector tmp; + tmp.swap(all_points[ti]); + for (const EPoint_3& pt : tmp) + get_point_id(pt); + } + + std::size_t nbs = all_segments[ti].size(); + std::vector> filtered_segments; + std::vector filtered_in_triangle_ids; + filtered_segments.reserve(nbs); + std::set> segset; + for (std::size_t si=0; si(0, triangles.size()), + [&](const tbb::blocked_range& r) { + for (size_t ti = r.begin(); ti != r.end(); ++ti) + deduplicate_inserted_segments(ti); + } + ); + } + else +#endif + for (std::size_t ti = 0; ti < triangles.size(); ++ti) { + deduplicate_inserted_segments(ti); + } + +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + t.stop(); + std::cout << t.time() << " sec. for #3" << std::endl; + t.reset(); +#endif + + CGAL_PMP_AUTOREFINE_VERBOSE("triangulate faces"); + // now refine triangles +#ifdef CGAL_LINKED_WITH_TBB + std::conditional_t, std::size_t>>, + std::vector, std::size_t>>> new_triangles; +#else + std::vector, std::size_t>> new_triangles; +#endif + +#ifdef CGAL_AUTOREF_USE_PROGRESS_DISPLAY + boost::timer::progress_display pd(triangles.size()); +#endif + + auto refine_triangles = [&](std::size_t ti) + { + if (all_segments[ti].empty() && all_points[ti].empty()) + new_triangles.push_back({triangles[ti], ti}); + else + { + autorefine_impl::generate_subtriangles(ti, all_segments_ids[ti], all_points[ti], all_in_triangle_ids[ti], intersecting_triangles, coplanar_triangles, triangles, new_triangles); + } + +#ifdef CGAL_AUTOREF_USE_PROGRESS_DISPLAY + ++pd; +#endif + }; + +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + t.start(); +#endif +#ifdef CGAL_LINKED_WITH_TBB + if (parallel_execution) + { + tbb::parallel_for(tbb::blocked_range(0, triangles.size()), + [&](const tbb::blocked_range& r) { + for (size_t ti = r.begin(); ti != r.end(); ++ti) + refine_triangles(ti); + } + ); + } + else +#endif + for (std::size_t ti = 0; ti < triangles.size(); ++ti) { + refine_triangles(ti); + } + +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + t.stop(); + std::cout << t.time() << " sec. for #1" << std::endl; + t.reset(); +#endif + + // brute force output: create a soup, orient and to-mesh + CGAL_PMP_AUTOREFINE_VERBOSE("create output soup"); + + Cartesian_converter to_input; + +#ifdef CGAL_LINKED_WITH_TBB + typedef std::conditional_t, + std::map> Point_id_map; +#else + typedef std::map Point_id_map; +#endif + Point_id_map point_id_map; + +#if ! defined(CGAL_NDEBUG) || defined(CGAL_DEBUG_PMP_AUTOREFINE) + std::vector exact_soup_points; +#endif + + // TODO: parallel_for? + // for input points, we on purpose keep duplicated points and isolated points + for (std::size_t pid = 0; pidfirst); +#endif + } + + TriangleRange soup_triangles_out; + soup_triangles_out.reserve(soup_triangles.size()); + + if constexpr (!std::is_same_v) + { + std::size_t nbt=0; + for (Input_TID f=0; f tri_inter_ids_inverse(triangles.size()); + for (Input_TID f=0; fsecond; + }; + +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + t.start(); +#endif + + std::size_t offset = soup_triangles_out.size(); +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + std::string mode = "parallel"; +#endif + +// It might be possible to optimise the hardcoded value below +// but the less triangles the faster will anyway be the operation. +// So it's probably not critical. +#ifdef CGAL_LINKED_WITH_TBB + if(parallel_execution && new_triangles.size() > 50) + { +#ifdef CGAL_AUTOREF_SET_POINT_IDS_USING_MUTEX + //option 1 (using a mutex) + CGAL_MUTEX point_container_mutex; + /// Lambda concurrent_get_point_id() + auto concurrent_get_point_id = [&](const EK::Point_3& pt) + { + auto insert_res = point_id_map.insert(std::make_pair(pt, -1)); + + if (insert_res.second) + { + CGAL_SCOPED_LOCK(point_container_mutex); + insert_res.first->second=soup_points.size(); + soup_points.push_back(to_input(pt)); +#if ! defined(CGAL_NDEBUG) || defined(CGAL_DEBUG_PMP_AUTOREFINE) + exact_soup_points.push_back(pt); +#endif + } + return insert_res.first; + }; + + soup_triangles_out.resize(offset + new_triangles.size()); + //use map iterator triple for triangles to create them concurrently and safely + std::vector> triangle_buffer(new_triangles.size()); + tbb::parallel_for(tbb::blocked_range(0, new_triangles.size()), + [&](const tbb::blocked_range& r) { + for (size_t ti = r.begin(); ti != r.end(); ++ti) { + const std::array& t = new_triangles[ti].first; + visitor.new_subtriangle(offset+ti, tri_inter_ids_inverse[new_triangles[ti].second]); + triangle_buffer[ti] = CGAL::make_array(concurrent_get_point_id(t[0]), concurrent_get_point_id(t[1]), concurrent_get_point_id(t[2])); + } + } + ); + tbb::parallel_for(tbb::blocked_range(0, new_triangles.size()), + [&](const tbb::blocked_range& r) { + for (size_t ti = r.begin(); ti != r.end(); ++ti) + { + soup_triangles_out[offset + ti] = + { triangle_buffer[ti][0]->second, + triangle_buffer[ti][1]->second, + triangle_buffer[ti][2]->second }; + } + } + ); +#else + //option 2 (without mutex) + /// Lambda concurrent_get_point_id() + tbb::concurrent_vector iterators; + auto concurrent_get_point_id = [&](const EK::Point_3& pt) + { + auto insert_res = point_id_map.insert(std::make_pair(pt, -1)); + if (insert_res.second) + iterators.push_back(insert_res.first); + return insert_res.first; + }; + + //use map iterator triple for triangles to create them concurrently and safely + soup_triangles_out.resize(offset + new_triangles.size()); + std::vector> triangle_buffer(new_triangles.size()); + tbb::parallel_for(tbb::blocked_range(0, new_triangles.size()), + [&](const tbb::blocked_range& r) { + for (size_t ti = r.begin(); ti != r.end(); ++ti) + { + const std::array& t = new_triangles[ti].first; + visitor.new_subtriangle(offset+ti, tri_inter_ids_inverse[new_triangles[ti].second]); + triangle_buffer[ti] = CGAL::make_array(concurrent_get_point_id(t[0]), concurrent_get_point_id(t[1]), concurrent_get_point_id(t[2])); + } + } + ); + + // the map is now filled we can safely set the point ids + std::size_t pid_offset=soup_points.size(); + soup_points.resize(pid_offset+iterators.size()); +#if ! defined(CGAL_NDEBUG) || defined(CGAL_DEBUG_PMP_AUTOREFINE) + exact_soup_points.resize(soup_points.size()); +#endif + + tbb::parallel_for(tbb::blocked_range(0, iterators.size()), + [&](const tbb::blocked_range& r) { + for (size_t ti = r.begin(); ti != r.end(); ++ti) + { + soup_points[pid_offset+ti] = to_input(iterators[ti]->first); +#if ! defined(CGAL_NDEBUG) || defined(CGAL_DEBUG_PMP_AUTOREFINE) + exact_soup_points[pid_offset+ti] = iterators[ti]->first; +#endif + iterators[ti]->second=pid_offset+ti; + } + } + ); + + tbb::parallel_for(tbb::blocked_range(0, new_triangles.size()), + [&](const tbb::blocked_range& r) { + for (size_t ti = r.begin(); ti != r.end(); ++ti) + { + soup_triangles_out[offset + ti] = + { triangle_buffer[ti][0]->second, + triangle_buffer[ti][1]->second, + triangle_buffer[ti][2]->second }; + } + } + ); +#endif + } + else +#endif + { +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + mode = "sequential"; +#endif + soup_triangles_out.reserve(offset + new_triangles.size()); + for (const std::pair, std::size_t>& t_and_id : new_triangles) + { + visitor.new_subtriangle(soup_triangles_out.size(), tri_inter_ids_inverse[t_and_id.second]); + soup_triangles_out.push_back({ get_point_id(t_and_id.first[0]), + get_point_id(t_and_id.first[1]), + get_point_id(t_and_id.first[2]) }); + } + } + + + +#ifdef CGAL_AUTOREF_USE_DEBUG_PARALLEL_TIMERS + t.stop(); + std::cout << t.time() << " sec. for #4 (" << mode << ")" << std::endl; + t.reset(); +#endif + +#ifndef CGAL_NDEBUG + CGAL_PMP_AUTOREFINE_VERBOSE("check soup"); + CGAL_assertion( !does_triangle_soup_self_intersect(exact_soup_points, soup_triangles_out) ); +#else +#ifdef CGAL_DEBUG_PMP_AUTOREFINE + CGAL_PMP_AUTOREFINE_VERBOSE("check soup"); + if (does_triangle_soup_self_intersect(exact_soup_points, soup_triangles_out)) + throw std::runtime_error("ERROR: invalid output, there is most probably a bug"); +#endif +#endif + using std::swap; + swap(soup_triangles, soup_triangles_out); + + CGAL_PMP_AUTOREFINE_VERBOSE("done"); +} + +/** + * \ingroup PMP_corefinement_grp + * refines a triangle mesh so that no triangles intersects in their interior. + * + * Note that this function is only provided as a shortcut for calling `autorefine_triangle_soup()` + * with a mesh. For any advance usage the aforementioned function should be called directly. + * + * @tparam TriangleMesh a model of `HalfedgeListGraph`, `FaceListGraph`, and `MutableFaceGraph` + * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * @param tm input triangulated surface mesh + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below + * + * @warning `clear(tm)` will be called before filling `tm` with the refined mesh. + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{concurrency_tag} + * \cgalParamDescription{a tag indicating if the task should be done using one or several threads.} + * \cgalParamType{Either `CGAL::Sequential_tag`, or `CGAL::Parallel_tag`, or `CGAL::Parallel_if_available_tag`} + * \cgalParamDefault{`CGAL::Sequential_tag`} + * \cgalParamNEnd + * \cgalParamNBegin{geom_traits} + * \cgalParamDescription{an instance of a geometric traits class} + * \cgalParamType{a class model of `PMPSelfIntersectionTraits`} + * \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} + * \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} + * \cgalParamNEnd + * \cgalParamNBegin{vertex_point_map} + * \cgalParamDescription{a property map associating points to the vertices of `tm`} + * \cgalParamType{a class model of `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` + * as key type and `%Point_3` as value type} + * \cgalParamDefault{`boost::get(CGAL::vertex_point, tm)`} + * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + * must be available in `TriangleMesh`.} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + */ +template +void +autorefine( TriangleMesh& tm, + const NamedParameters& np = parameters::default_values()) +{ + using parameters::choose_parameter; + using parameters::get_parameter; + + typedef typename GetGeomTraits::type GT; + // GT traits = choose_parameter(get_parameter(np, internal_np::geom_traits)); + + std::vector soup_points; + std::vector > soup_triangles; + + polygon_mesh_to_polygon_soup(tm, soup_points, soup_triangles, np); + + autorefine_triangle_soup(soup_points, soup_triangles, np); + + clear(tm); + repair_polygon_soup(soup_points, soup_triangles); + + duplicate_non_manifold_edges_in_polygon_soup(soup_points, soup_triangles); + polygon_soup_to_polygon_mesh(soup_points, soup_triangles, tm); +} + + +} } // end of CGAL::Polygon_mesh_processing + +#ifdef CGAL_LINKED_WITH_TBB +#ifdef CGAL_HAS_DEFINED_TBB_PREVIEW_CONCURRENT_ORDERED_CONTAINERS +#undef TBB_PREVIEW_CONCURRENT_ORDERED_CONTAINERS +#endif +#endif + +#endif // CGAL_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_H diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/bbox.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/bbox.h index a7506bb6..a8a2246a 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/bbox.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/bbox.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/bbox.h $ -// $Id: bbox.h bb0b9a8 2022-03-07T15:32:37+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/bbox.h $ +// $Id: include/CGAL/Polygon_mesh_processing/bbox.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,7 @@ #include #include -#include +#include namespace CGAL { @@ -179,6 +179,8 @@ namespace CGAL { using parameters::choose_parameter; using parameters::get_parameter; + CGAL_precondition(is_valid_edge_descriptor(ed, pmesh)); + typename GetVertexPointMap::const_type vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(CGAL::vertex_point, pmesh)); @@ -234,6 +236,8 @@ namespace CGAL { using parameters::choose_parameter; using parameters::get_parameter; + CGAL_precondition(is_valid_face_descriptor(fd, pmesh)); + typename GetVertexPointMap::const_type vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(CGAL::vertex_point, pmesh)); diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/border.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/border.h index 841568c4..0ef1f85d 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/border.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/border.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/border.h $ -// $Id: border.h bb0b9a8 2022-03-07T15:32:37+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/border.h $ +// $Id: include/CGAL/Polygon_mesh_processing/border.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,13 +19,13 @@ #include #include #include -#include +#include #include -#include #include #include +#include namespace CGAL{ namespace Polygon_mesh_processing { @@ -252,7 +252,7 @@ std::size_t border_size(typename boost::graph_traits::halfedge_desc /// @todo It could make sense to also return the length of each cycle. /// @todo It should probably go into BGL package (like the rest of this file). template - OutputIterator extract_boundary_cycles(PolygonMesh& pm, + OutputIterator extract_boundary_cycles(const PolygonMesh& pm, OutputIterator out) { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/clip.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/clip.h index da8de317..72825a45 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/clip.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/clip.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h $ -// $Id: clip.h 7d5e498 2022-09-13T12:32:17+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h $ +// $Id: include/CGAL/Polygon_mesh_processing/clip.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -444,8 +444,8 @@ generic_clip_impl( typedef typename GetVertexPointMap::type Vpm2; - CGAL_static_assertion((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); Vpm vpm1 = choose_parameter(get_parameter(np1, internal_np::vertex_point), get_property_map(boost::vertex_point, tm1)); @@ -721,7 +721,7 @@ bool clip(TriangleMesh& tm, using params::get_parameter; using params::choose_parameter; - if(boost::begin(faces(tm))==boost::end(faces(tm))) return true; + if(std::begin(faces(tm))==std::end(faces(tm))) return true; CGAL::Bbox_3 bbox = ::CGAL::Polygon_mesh_processing::bbox(tm); @@ -831,7 +831,7 @@ bool clip(TriangleMesh& tm, using params::get_parameter; using params::choose_parameter; - if(boost::begin(faces(tm))==boost::end(faces(tm))) return true; + if(std::begin(faces(tm))==std::end(faces(tm))) return true; TriangleMesh clipper; make_hexahedron(iso_cuboid[0], iso_cuboid[1], iso_cuboid[2], iso_cuboid[3], @@ -872,7 +872,8 @@ bool clip(TriangleMesh& tm, * \cgalParamNEnd * * \cgalParamNBegin{visitor} - * \cgalParamDescription{a visitor used to track the creation of new faces} + * \cgalParamDescription{(`np_tm` only) a visitor used to track a series of events such as the creation + * of new faces, edges... in both `tm` and `splitter`.} * \cgalParamType{a class model of `PMPCorefinementVisitor`} * \cgalParamDefault{`Corefinement::Default_visitor`} * \cgalParamNEnd diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/compute_normal.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/compute_normal.h index 4c75a0b1..15c978db 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/compute_normal.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/compute_normal.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h $ -// $Id: compute_normal.h 477353d 2022-04-20T15:55:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h $ +// $Id: include/CGAL/Polygon_mesh_processing/compute_normal.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include @@ -89,6 +89,8 @@ void sum_normals(const PM& pmesh, typedef typename boost::property_traits::reference Point_ref; + CGAL_precondition(is_valid_face_descriptor(f, pmesh)); + halfedge_descriptor he = halfedge(f, pmesh); vertex_descriptor v = source(he, pmesh); vertex_descriptor the = target(he,pmesh); @@ -172,6 +174,8 @@ compute_face_normal(typename boost::graph_traits::face_descriptor f using parameters::choose_parameter; using parameters::get_parameter; + CGAL_precondition(is_valid_face_descriptor(f, pmesh)); + typedef typename GetGeomTraits::type GT; GT traits = choose_parameter(get_parameter(np, internal_np::geom_traits)); @@ -612,9 +616,14 @@ compute_vertex_normal_as_sum_of_weighted_normals(typename boost::graph_traits::vertex_descript using parameters::is_default_parameter; using parameters::get_parameter; + CGAL_precondition(is_valid_vertex_descriptor(v, pmesh)); + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::face_descriptor face_descriptor; diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/connected_components.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/connected_components.h index 12476caa..58c47d46 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/connected_components.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/connected_components.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h $ -// $Id: connected_components.h 87f16af 2022-10-04T13:50:15+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h $ +// $Id: include/CGAL/Polygon_mesh_processing/connected_components.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -32,9 +32,6 @@ #include #include -#include -#include - #include #include #include @@ -42,7 +39,7 @@ #include #include -#include +#include namespace CGAL { namespace Polygon_mesh_processing{ @@ -556,7 +553,7 @@ std::size_t keep_large_connected_components(PolygonMesh& pmesh, >::type FaceSizeMap; typedef typename boost::property_traits::value_type Face_size; - CGAL_static_assertion((std::is_convertible::value)); + static_assert(std::is_convertible::value); typedef typename internal_np::Lookup_named_param_def corefine_and_compute_boolean_operations( TriangleMesh& tm1, TriangleMesh& tm2, - const std::array< boost::optional,4>& output, + const std::array< std::optional,4>& output, const NamedParameters1& np1 = parameters::default_values(), const NamedParameters2& np2 = parameters::default_values(), const std::tuple::type VPM1; typedef typename GetVertexPointMap::type VPM2; - CGAL_static_assertion((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); VPM1 vpm1 = choose_parameter(get_parameter(np1, internal_np::vertex_point), get_property_map(boost::vertex_point, tm1)); @@ -229,10 +229,10 @@ corefine_and_compute_boolean_operations( > VPM_out_tuple_helper; typedef std::tuple< - boost::optional< typename std::tuple_element<0, VPM_out_tuple_helper>::type::type >, - boost::optional< typename std::tuple_element<1, VPM_out_tuple_helper>::type::type >, - boost::optional< typename std::tuple_element<2, VPM_out_tuple_helper>::type::type >, - boost::optional< typename std::tuple_element<3, VPM_out_tuple_helper>::type::type > + std::optional< typename std::tuple_element<0, VPM_out_tuple_helper>::type::type >, + std::optional< typename std::tuple_element<1, VPM_out_tuple_helper>::type::type >, + std::optional< typename std::tuple_element<2, VPM_out_tuple_helper>::type::type >, + std::optional< typename std::tuple_element<3, VPM_out_tuple_helper>::type::type > > VPM_out_tuple; VPM_out_tuple vpm_out_tuple( @@ -251,24 +251,24 @@ corefine_and_compute_boolean_operations( // for now edges in a coplanar patch are not constrained so there is nothing to constrained here // \todo marked edges from input to output are not ported - if (output[Corefinement::UNION] != boost::none) + if (output[Corefinement::UNION] != std::nullopt) if (&tm1 != *output[Corefinement::UNION]) copy_face_graph(tm1, *(*output[Corefinement::UNION]), parameters::vertex_point_map(vpm1), parameters::vertex_point_map(*std::get(vpm_out_tuple))); - if (output[Corefinement::INTERSECTION] != boost::none) + if (output[Corefinement::INTERSECTION] != std::nullopt) if (&tm1 != *output[Corefinement::INTERSECTION]) copy_face_graph(tm1, *(*output[Corefinement::INTERSECTION]), parameters::vertex_point_map(vpm1), parameters::vertex_point_map(*std::get(vpm_out_tuple))); - if (output[Corefinement::TM1_MINUS_TM2] != boost::none) + if (output[Corefinement::TM1_MINUS_TM2] != std::nullopt) if (&tm1 == *output[Corefinement::TM1_MINUS_TM2]) clear(tm1); - if (output[Corefinement::TM2_MINUS_TM1] != boost::none) + if (output[Corefinement::TM2_MINUS_TM1] != std::nullopt) if (&tm1 == *output[Corefinement::TM2_MINUS_TM1]) clear(tm1); @@ -281,22 +281,22 @@ corefine_and_compute_boolean_operations( if(faces(tm2).empty()) { for (int i=0; i<4; ++i) - if (output[i] != boost::none) + if (output[i] != std::nullopt) clear(*(*output[i])); return CGAL::make_array(true, true, true, true); } // tm2 is not empty - if (output[Corefinement::UNION] != boost::none) + if (output[Corefinement::UNION] != std::nullopt) if (&tm2 != *output[Corefinement::UNION]) copy_face_graph(tm2, *(*output[Corefinement::UNION]), parameters::vertex_point_map(vpm2), parameters::vertex_point_map(*std::get(vpm_out_tuple))); - if (output[Corefinement::INTERSECTION] != boost::none) + if (output[Corefinement::INTERSECTION] != std::nullopt) clear(*(*output[Corefinement::INTERSECTION])); - if (output[Corefinement::TM1_MINUS_TM2] != boost::none) + if (output[Corefinement::TM1_MINUS_TM2] != std::nullopt) clear(*(*output[Corefinement::TM1_MINUS_TM2])); - if (output[Corefinement::TM2_MINUS_TM1] != boost::none) + if (output[Corefinement::TM2_MINUS_TM1] != std::nullopt) if (&tm2 != *output[Corefinement::TM2_MINUS_TM1]) copy_face_graph(tm2, *(*output[Corefinement::TM2_MINUS_TM1]), @@ -308,17 +308,17 @@ corefine_and_compute_boolean_operations( if (faces(tm2).empty()) { // tm1 is not empty - if (output[Corefinement::UNION] != boost::none) + if (output[Corefinement::UNION] != std::nullopt) if (&tm1 != *output[Corefinement::UNION]) copy_face_graph(tm1, *(*output[Corefinement::UNION]), parameters::vertex_point_map(vpm1), parameters::vertex_point_map(*std::get(vpm_out_tuple))); - if (output[Corefinement::INTERSECTION] != boost::none) + if (output[Corefinement::INTERSECTION] != std::nullopt) clear(*(*output[Corefinement::INTERSECTION])); - if (output[Corefinement::TM2_MINUS_TM1] != boost::none) + if (output[Corefinement::TM2_MINUS_TM1] != std::nullopt) clear(*(*output[Corefinement::TM2_MINUS_TM1])); - if (output[Corefinement::TM1_MINUS_TM2] != boost::none) + if (output[Corefinement::TM1_MINUS_TM2] != std::nullopt) if (&tm1 != *output[Corefinement::TM1_MINUS_TM2]) copy_face_graph(tm1, *(*output[Corefinement::TM1_MINUS_TM2]), @@ -394,10 +394,10 @@ corefine_and_compute_boolean_operations( // special case used for clipping open meshes if (choose_parameter(get_parameter(np1, internal_np::use_bool_op_to_clip_surface), false)) { - CGAL_assertion(output[Corefinement::INTERSECTION] != boost::none); - CGAL_assertion(output[Corefinement::UNION] == boost::none); - CGAL_assertion(output[Corefinement::TM1_MINUS_TM2] == boost::none); - CGAL_assertion(output[Corefinement::TM2_MINUS_TM1] == boost::none); + CGAL_assertion(output[Corefinement::INTERSECTION] != std::nullopt); + CGAL_assertion(output[Corefinement::UNION] == std::nullopt); + CGAL_assertion(output[Corefinement::TM1_MINUS_TM2] == std::nullopt); + CGAL_assertion(output[Corefinement::TM2_MINUS_TM1] == std::nullopt); const bool use_compact_clipper = choose_parameter(get_parameter(np1, internal_np::use_compact_clipper), true); ob.setup_for_clipping_a_surface(use_compact_clipper); @@ -523,7 +523,7 @@ corefine_and_compute_union( TriangleMesh& tm1, const NamedParametersOut& np_out = parameters::default_values()) { using namespace CGAL::parameters; - std::array< boost::optional,4> output; + std::array< std::optional,4> output; output[Corefinement::UNION]=&tm_out; return @@ -555,7 +555,7 @@ corefine_and_compute_intersection( TriangleMesh& tm1, const NamedParametersOut& np_out = parameters::default_values()) { using namespace CGAL::parameters; - std::array< boost::optional,4> output; + std::array< std::optional,4> output; output[Corefinement::INTERSECTION]=&tm_out; return @@ -588,7 +588,7 @@ corefine_and_compute_difference( TriangleMesh& tm1, { using namespace CGAL::parameters; using namespace CGAL::Polygon_mesh_processing::Corefinement; - std::array< boost::optional,4> output; + std::array< std::optional,4> output; output[TM1_MINUS_TM2]=&tm_out; return @@ -694,8 +694,8 @@ corefine( TriangleMesh& tm1, typedef typename GetVertexPointMap::type VPM1; typedef typename GetVertexPointMap::type VPM2; - CGAL_static_assertion((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); VPM1 vpm1 = choose_parameter(get_parameter(np1, internal_np::vertex_point), get_property_map(boost::vertex_point, tm1)); diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/detect_features.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/detect_features.h index 9fc8bc1f..54bcb391 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/detect_features.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/detect_features.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/detect_features.h $ -// $Id: detect_features.h bb0b9a8 2022-03-07T15:32:37+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/detect_features.h $ +// $Id: include/CGAL/Polygon_mesh_processing/detect_features.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include @@ -57,6 +57,8 @@ is_sharp(const typename boost::graph_traits::halfedge_descriptor h, typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + CGAL_precondition(is_valid_halfedge_descriptor(h, pmesh)); + if(is_border_edge(h, pmesh)) return false; diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/distance.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/distance.h index 8ee5c8d4..b80089bd 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/distance.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/distance.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h $ -// $Id: distance.h 8b5c57e 2022-05-13T15:51:12+02:00 Sebastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h $ +// $Id: include/CGAL/Polygon_mesh_processing/distance.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -43,7 +43,7 @@ #include #endif // CGAL_LINKED_WITH_TBB -#include +#include #include #include @@ -155,10 +155,10 @@ double max_distance_to_mesh_impl(const PointRange& sample_points, using FT = typename Kernel::FT; #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else - if(boost::is_convertible::value) + if(std::is_convertible::value) { Distance_computation f(tree, hint, sample_points); tbb::parallel_reduce(tbb::blocked_range(0, sample_points.size()), f); @@ -481,8 +481,8 @@ struct Triangle_structure_sampler_for_triangle_mesh void sample_points() { Property_map_to_unary_function unary(pmap); - this->out = std::copy(boost::make_transform_iterator(boost::begin(vertices(tm)), unary), - boost::make_transform_iterator(boost::end(vertices(tm)), unary), + this->out = std::copy(boost::make_transform_iterator(std::begin(vertices(tm)), unary), + boost::make_transform_iterator(std::end(vertices(tm)), unary), this->out); } @@ -747,7 +747,7 @@ struct Triangle_structure_sampler_for_triangle_soup * @tparam TriangleMesh a model of the concepts `EdgeListGraph` and `FaceListGraph` * @tparam PointOutputIterator a model of `OutputIterator` * holding objects of the same point type as - * the value type of the point type associated to the mesh `tm`, i.e. the value type of the vertex + * the value type of the point type associated to the mesh `tm`, i.e., the value type of the vertex * point map property map, if provided, or the value type of the internal point property map otherwise * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" * @@ -1037,7 +1037,7 @@ sample_triangle_soup(const PointRange& points, typedef typename PointRange::value_type Point_3; typedef typename Kernel_traits::Kernel GeomTraits; - CGAL_static_assertion_msg((std::is_same::value), "Wrong point type."); + static_assert(std::is_same::value, "Wrong point type."); CGAL_precondition(!triangles.empty()); @@ -1570,7 +1570,7 @@ bounded_error_squared_Hausdorff_distance_impl(const TriangleMesh1& tm1, candidate_triangles.pop(); // Only process the triangle if it can contribute to the Hausdorff distance, - // i.e. if its upper bound is higher than the currently known best lower bound + // i.e., if its upper bound is higher than the currently known best lower bound // and the difference between the bounds to be obtained is larger than the // user-given error. const auto& triangle_bounds = triangle_and_bounds.bounds; @@ -1818,10 +1818,10 @@ struct Bounded_error_preprocessing #ifdef CGAL_HAUSDORFF_DEBUG using Timer = CGAL::Real_timer; #endif - std::vector& tm_wrappers; + std::vector& tm_wrappers; // Constructor. - Bounded_error_preprocessing(std::vector& tm_wrappers) + Bounded_error_preprocessing(std::vector& tm_wrappers) : tm_wrappers(tm_wrappers) { } @@ -1830,8 +1830,8 @@ struct Bounded_error_preprocessing : tm_wrappers(s.tm_wrappers) { } - bool is_tm1_wrapper(const boost::any& operand) const { return operand.type() == typeid(TM1Wrapper); } - bool is_tm2_wrapper(const boost::any& operand) const { return operand.type() == typeid(TM2Wrapper); } + bool is_tm1_wrapper(const std::any& operand) const { return operand.type() == typeid(TM1Wrapper); } + bool is_tm2_wrapper(const std::any& operand) const { return operand.type() == typeid(TM2Wrapper); } // TODO: make AABB tree build parallel! void operator()(const tbb::blocked_range& range) @@ -1849,12 +1849,12 @@ struct Bounded_error_preprocessing auto& tm_wrapper = tm_wrappers[i]; if(is_tm1_wrapper(tm_wrapper)) { - TM1Wrapper& object = boost::any_cast(tm_wrapper); + TM1Wrapper& object = std::any_cast(tm_wrapper); object.build_tree(); } else if(is_tm2_wrapper(tm_wrapper)) { - TM2Wrapper& object = boost::any_cast(tm_wrapper); + TM2Wrapper& object = std::any_cast(tm_wrapper); object.build_tree(); } else @@ -1995,8 +1995,8 @@ bounded_error_squared_one_sided_Hausdorff_distance_impl(const TriangleMesh1& tm1 OutputIterator& out) { #if !defined(CGAL_LINKED_WITH_TBB) || !defined(CGAL_METIS_ENABLED) - CGAL_static_assertion_msg(!(boost::is_convertible::value), - "Parallel_tag is enabled but at least TBB or METIS is unavailable."); + static_assert(!std::is_convertible::value, + "Parallel_tag is enabled but at least TBB or METIS is unavailable."); #endif using FT = typename Kernel::FT; @@ -2031,7 +2031,7 @@ bounded_error_squared_one_sided_Hausdorff_distance_impl(const TriangleMesh1& tm1 std::vector tm1_parts; std::vector tm1_trees; - std::vector tm_wrappers; + std::vector tm_wrappers; #endif // defined(CGAL_LINKED_WITH_TBB) && defined(CGAL_METIS_ENABLED) #ifdef CGAL_HAUSDORFF_DEBUG @@ -2053,7 +2053,7 @@ bounded_error_squared_one_sided_Hausdorff_distance_impl(const TriangleMesh1& tm1 std::cout << "* num cores: " << nb_cores << std::endl; #endif - if(boost::is_convertible::value && + if(std::is_convertible::value && nb_cores > 1 && faces(tm1).size() >= min_nb_faces_to_split) { @@ -2207,7 +2207,7 @@ bounded_error_squared_one_sided_Hausdorff_distance_impl(const TriangleMesh1& tm1 #endif #if defined(CGAL_LINKED_WITH_TBB) && defined(CGAL_METIS_ENABLED) && defined(USE_PARALLEL_BEHD) - if(boost::is_convertible::value && + if(std::is_convertible::value && nb_cores > 1 && faces(tm1).size() >= min_nb_faces_to_split) { @@ -2270,8 +2270,8 @@ bounded_error_squared_symmetric_Hausdorff_distance_impl(const TriangleMesh1& tm1 OutputIterator2& out2) { #if !defined(CGAL_LINKED_WITH_TBB) || !defined(CGAL_METIS_ENABLED) - CGAL_static_assertion_msg(!(boost::is_convertible::value), - "Parallel_tag is enabled but at least TBB or METIS is unavailable."); + static_assert(!std::is_convertible::value, + "Parallel_tag is enabled but at least TBB or METIS is unavailable."); #endif // Optimized version. @@ -2455,9 +2455,8 @@ bounded_error_squared_Hausdorff_distance_naive_impl(const TriangleMesh1& tm1, /** * \ingroup PMP_distance_grp * - * returns an estimate on the Hausdorff distance between `tm1` and `tm2` that - * is at most `error_bound` away from the actual Hausdorff distance between - * the two given meshes. + * returns an estimate on the Hausdorff distance from `tm1` to `tm2` that + * is at most `error_bound` away from the actual Hausdorff distance from `tm1` to `tm2`. * * @tparam Concurrency_tag enables sequential versus parallel algorithm. * Possible values are `Sequential_tag` and `Parallel_tag`. diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/extrude.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/extrude.h index 4b53201f..c55482ae 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/extrude.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/extrude.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/extrude.h $ -// $Id: extrude.h bb0b9a8 2022-03-07T15:32:37+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/extrude.h $ +// $Id: include/CGAL/Polygon_mesh_processing/extrude.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -148,7 +148,7 @@ struct Identity_functor * \cgalParamDescription{a property map associating points to the vertices of `ouput`} * \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` * as key type and `%Point_3` as value type} - * \cgalParamDefault{`boost::get(CGAL::vertex_point, ouput)`} + * \cgalParamDefault{`boost::get(CGAL::vertex_point, output)`} * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` * should be available for the vertices of `ouput`.} * \cgalParamNEnd diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/fair.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/fair.h index c5c47824..e94e6be6 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/fair.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/fair.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h $ -// $Id: fair.h 7564b76 2022-11-07T14:11:10+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h $ +// $Id: include/CGAL/Polygon_mesh_processing/fair.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,14 +19,14 @@ #include #include -#include +#include #include #if defined(CGAL_EIGEN3_ENABLED) #include // for sparse linear system solver #endif -#include +#include namespace CGAL { @@ -76,7 +76,7 @@ bool fair(TriangleMesh& tmesh, do not suffice to solve constructed linear system. Note that if the vertex range to which fairing is applied contains all the vertices of the triangle mesh, - fairing does not fail, but the mesh gets shrinked to `CGAL::ORIGIN`. + fairing does not fail, but the mesh gets shrunk to `CGAL::ORIGIN`. @tparam TriangleMesh a model of `FaceGraph` and `MutableFaceGraph` @tparam VertexRange a range of vertex descriptors of `TriangleMesh`, model of `Range`. @@ -98,8 +98,8 @@ bool fair(TriangleMesh& tmesh, \cgalParamNEnd \cgalParamNBegin{fairing_continuity} - \cgalParamDescription{A value controling the tangential continuity of the output surface patch. - The possible values are 0, 1 and 2, refering to the C0, C1 + \cgalParamDescription{A value controlling the tangential continuity of the output surface patch. + The possible values are 0, 1 and 2, referring to the C0, C1 and C2 continuity.} \cgalParamType{unsigned int} \cgalParamDefault{`1`} @@ -151,12 +151,12 @@ bool fair(TriangleMesh& tmesh, #endif #if defined(CGAL_EIGEN3_ENABLED) - CGAL_static_assertion_msg( - (!boost::is_same::type, bool>::value) || EIGEN_VERSION_AT_LEAST(3, 2, 0), + static_assert( + (!std::is_same::type, bool>::value) || EIGEN_VERSION_AT_LEAST(3, 2, 0), "The function `fair` requires Eigen3 version 3.2 or later."); #else - CGAL_static_assertion_msg( - (!boost::is_same::type, bool>::value), + static_assert( + (!std::is_same::type, bool>::value), "The function `fair` requires Eigen3 version 3.2 or later."); #endif diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_Hausdorff_distance.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_Hausdorff_distance.h index bd44c8ff..deeaea4a 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_Hausdorff_distance.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_Hausdorff_distance.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_Hausdorff_distance.h $ -// $Id: AABB_traversal_traits_with_Hausdorff_distance.h aa5fd2e 2022-04-07T11:40:30+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_Hausdorff_distance.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_Hausdorff_distance.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_transformation.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_transformation.h index d1e0207d..de7f001c 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_transformation.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_transformation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_transformation.h $ -// $Id: AABB_traversal_traits_with_transformation.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_transformation.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_transformation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,7 +27,6 @@ #include #include -#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h index fde93136..61335bd2 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h $ -// $Id: Face_graph_output_builder.h 119cea4 2023-01-27T20:52:27+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -181,7 +181,7 @@ class Face_graph_output_builder Node_id_map vertex_to_node_id1, vertex_to_node_id2; // output meshes - const std::array, 4>& requested_output; + const std::array, 4>& requested_output; // input meshes closed ? /// \todo do we really need this? bool is_tm1_closed; @@ -273,7 +273,7 @@ class Face_graph_output_builder }; // detect if a polyline is incident to two patches that won't be imported - // for the current operation (polylines skipt are always incident to a + // for the current operation (polylines skipped are always incident to a // coplanar patch) template static @@ -411,7 +411,7 @@ class Face_graph_output_builder const VpmOutTuple& output_vpms, EdgeMarkMapTuple& out_edge_mark_maps, UserVisitor& user_visitor, - const std::array, 4 >& requested_output) + const std::array, 4 >& requested_output) : tm1(tm1), tm2(tm2) , vpm1(vpm1), vpm2(vpm2) , fids1(fids1), fids2(fids2) @@ -513,10 +513,10 @@ class Face_graph_output_builder const boost::dynamic_bitset<>& is_node_of_degree_one, const Mesh_to_map_node&) { - const bool used_to_classify_patches = requested_output[UNION]==boost::none && - requested_output[TM1_MINUS_TM2]==boost::none && - requested_output[TM2_MINUS_TM1]==boost::none && - requested_output[INTERSECTION]==boost::none; + const bool used_to_classify_patches = requested_output[UNION]==std::nullopt && + requested_output[TM1_MINUS_TM2]==std::nullopt && + requested_output[TM2_MINUS_TM1]==std::nullopt && + requested_output[INTERSECTION]==std::nullopt; CGAL_assertion( vertex_to_node_id1.size() <= nodes.size() ); CGAL_assertion( vertex_to_node_id2.size() <= nodes.size() ); @@ -707,7 +707,7 @@ class Face_graph_output_builder Border_edge_map is_marked_1(intersection_edges1, tm1); std::size_t nb_patches_tm1 = connected_components(tm1, - bind_property_maps(fids1,make_property_map(&tm1_patch_ids[0])), + make_compose_property_map(fids1,make_property_map(&tm1_patch_ids[0])), parameters::edge_is_constrained_map(is_marked_1) .face_index_map(fids1)); @@ -720,7 +720,7 @@ class Face_graph_output_builder Border_edge_map is_marked_2(intersection_edges2, tm2); std::size_t nb_patches_tm2 = connected_components(tm2, - bind_property_maps(fids2,make_property_map(&tm2_patch_ids[0])), + make_compose_property_map(fids2,make_property_map(&tm2_patch_ids[0])), parameters::edge_is_constrained_map(is_marked_2) .face_index_map(fids2)); @@ -1051,16 +1051,18 @@ class Face_graph_output_builder previous_bitvalue[2] = is_patch_inside_tm1.test(patch_id_q1); previous_bitvalue[3] = is_patch_inside_tm1.test(patch_id_q2); -#ifndef CGAL_NDEBUG +/* + // Note that this code is commented as impossible_operation flag could be set thanks to + // another polyline and such a `continue` would make us miss it. if (is_tm1_closed && is_tm2_closed) { - if (!patch_status_was_not_already_set[0] && - !patch_status_was_not_already_set[1] && - !patch_status_was_not_already_set[2] && - !patch_status_was_not_already_set[3]) - continue; // all patches were already classified, no need to redo it + if (!patch_status_was_not_already_set[0] && + !patch_status_was_not_already_set[1] && + !patch_status_was_not_already_set[2] && + !patch_status_was_not_already_set[3]) + continue; // all patches were already classified, no need to redo it } -#endif +*/ // check incompatibility of patch classifications auto inconsistent_classification = [&]() @@ -1084,6 +1086,25 @@ class Face_graph_output_builder } return false; }; +#ifndef CGAL_NDEBUG + auto debug_check_consistency = [&]() + { + if (!used_to_clip_a_surface && !used_to_classify_patches) + { + CGAL_assertion( patch_status_was_not_already_set[0] || (previous_bitvalue[0]==is_patch_inside_tm2[patch_id_p1]) ); + CGAL_assertion( patch_status_was_not_already_set[1] || (previous_bitvalue[1]==is_patch_inside_tm2[patch_id_p2]) ); + CGAL_assertion( patch_status_was_not_already_set[2] || (previous_bitvalue[2]==is_patch_inside_tm1[patch_id_q1]) ); + CGAL_assertion( patch_status_was_not_already_set[3] || (previous_bitvalue[3]==is_patch_inside_tm1[patch_id_q2]) ); + } + }; + is_patch_inside_tm2.reset(patch_id_p1); + is_patch_inside_tm2.reset(patch_id_p2); + is_patch_inside_tm1.reset(patch_id_q1); + is_patch_inside_tm1.reset(patch_id_q2); +#else + auto debug_check_consistency = [&](){}; + +#endif //indicates that patch status will be updated patch_status_not_set_tm1.reset(patch_id_p1); @@ -1140,6 +1161,7 @@ class Face_graph_output_builder if ( q2_is_between_p1p2 ) is_patch_inside_tm1.set(patch_id_q2); //case 1 else is_patch_inside_tm2.set(patch_id_p2); //case 2 if (inconsistent_classification()) return; + debug_check_consistency(); continue; } else{ @@ -1171,6 +1193,7 @@ class Face_graph_output_builder is_patch_inside_tm2.set(patch_id_p2); } //else case 4 if (inconsistent_classification()) return; + debug_check_consistency(); continue; } else @@ -1202,6 +1225,7 @@ class Face_graph_output_builder is_patch_inside_tm2.set(patch_id_p1); } // else case 6 if (inconsistent_classification()) return; + debug_check_consistency(); continue; } else{ @@ -1231,13 +1255,14 @@ class Face_graph_output_builder if ( q1_is_between_p1p2 ) is_patch_inside_tm1.set(patch_id_q1); //case 7 else is_patch_inside_tm2.set(patch_id_p1); //case 8 if (inconsistent_classification()) return; + debug_check_consistency(); continue; } } } } #ifdef CGAL_COREFINEMENT_POLYHEDRA_DEBUG - #warning At some point we should have a check if a patch status is already set, what we do is consistant otherwise --> ambiguous + #warning At some point we should have a check if a patch status is already set, what we do is consistent otherwise --> ambiguous #endif //CGAL_COREFINEMENT_POLYHEDRA_DEBUG CGAL_assertion( @@ -1393,13 +1418,7 @@ class Face_graph_output_builder } } if (inconsistent_classification()) return; - if (!used_to_clip_a_surface && !used_to_classify_patches) - { - CGAL_assertion( patch_status_was_not_already_set[0] || previous_bitvalue[0]==is_patch_inside_tm2[patch_id_p1] ); - CGAL_assertion( patch_status_was_not_already_set[1] || previous_bitvalue[1]==is_patch_inside_tm2[patch_id_p2] ); - CGAL_assertion( patch_status_was_not_already_set[2] || previous_bitvalue[2]==is_patch_inside_tm1[patch_id_q1] ); - CGAL_assertion( patch_status_was_not_already_set[3] || previous_bitvalue[3]==is_patch_inside_tm1[patch_id_q2] ); - } + debug_check_consistency(); } } @@ -1661,8 +1680,8 @@ class Face_graph_output_builder // special code to handle non-manifold vertices on the boundary for (vertex_descriptor vd : vertices(tm1)) { - boost::optional op_h = is_border(vd, tm1); - if (op_h == boost::none) continue; + std::optional op_h = is_border(vd, tm1); + if (op_h == std::nullopt) continue; halfedge_descriptor h = *op_h; CGAL_assertion( target(h, tm1) == vd); // check if the target of h is a non-manifold vertex diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h index 6510c56b..57dc97b9 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h $ -// $Id: Generic_clip_output_builder.h 258d704 2022-02-24T19:57:17+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Corefinement/Generic_clip_output_builder.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -148,7 +148,7 @@ class Generic_clip_output_builder std::size_t nb_patches_tm1 = connected_components(tm1, - bind_property_maps(fids1,make_property_map(&tm1_patch_ids[0])), + make_compose_property_map(fids1,make_property_map(&tm1_patch_ids[0])), parameters::edge_is_constrained_map(ecm1) .face_index_map(fids1)); @@ -228,7 +228,7 @@ class Generic_clip_output_builder } } - keep_connected_components(tm1, cc_to_keep, bind_property_maps(fids1,make_property_map(&tm1_patch_ids[0]))); + keep_connected_components(tm1, cc_to_keep, make_compose_property_map(fids1,make_property_map(&tm1_patch_ids[0]))); } }; diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Intersection_type.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Intersection_type.h index 11fb1821..3950375a 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Intersection_type.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Intersection_type.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Intersection_type.h $ -// $Id: Intersection_type.h f9a9d12 2021-07-21T11:33:48+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Intersection_type.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Corefinement/Intersection_type.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Output_builder_for_autorefinement.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Output_builder_for_autorefinement.h index 02ca0b9b..b056be11 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Output_builder_for_autorefinement.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Output_builder_for_autorefinement.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Output_builder_for_autorefinement.h $ -// $Id: Output_builder_for_autorefinement.h 258d704 2022-02-24T19:57:17+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Output_builder_for_autorefinement.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Corefinement/Output_builder_for_autorefinement.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -349,7 +349,7 @@ class Output_builder_for_autorefinement is_intersection(intersection_edges); std::size_t nb_patches = connected_components(tm, - bind_property_maps(fids,make_property_map(patch_ids)), + make_compose_property_map(fids,make_property_map(patch_ids)), parameters::edge_is_constrained_map(is_intersection) .face_index_map(fids)); diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h index 73b1a855..a64d79c6 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h $ -// $Id: Visitor.h b66d3a0 2022-06-21T17:37:22+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -465,7 +465,7 @@ class Surface_intersection_visitor_for_corefinement{ typedef std::vector Node_ids; typedef std::unordered_map On_face_map; typedef std::unordered_map On_edge_map; - //to keep the correspondance between node_id and vertex_handle in each mesh + //to keep the correspondence between node_id and vertex_handle in each mesh typedef internal::Node_id_to_vertex @@ -818,7 +818,7 @@ class Surface_intersection_visitor_for_corefinement{ break; case ON_VERTEX: { - //grab original vertex that is on commom intersection + //grab original vertex that is on common intersection mesh_to_vertices_on_inter[tm2_ptr].insert(std::make_pair(node_id,h_2)); Node_id_to_vertex& node_id_to_vertex=mesh_to_node_id_to_vertex[tm2_ptr]; if (node_id_to_vertex.size()<=node_id) @@ -841,7 +841,7 @@ class Surface_intersection_visitor_for_corefinement{ if ( is_target_coplanar ) { - //grab original vertex that is on commom intersection + //grab original vertex that is on common intersection mesh_to_vertices_on_inter[tm1_ptr].insert(std::make_pair(node_id,h_1)); Node_id_to_vertex& node_id_to_vertex=mesh_to_node_id_to_vertex[tm1_ptr]; if (node_id_to_vertex.size()<=node_id) @@ -854,7 +854,7 @@ class Surface_intersection_visitor_for_corefinement{ } else{ if ( is_source_coplanar ){ - //grab original vertex that is on commom intersection + //grab original vertex that is on common intersection halfedge_descriptor h_1_opp=opposite(h_1,tm1); mesh_to_vertices_on_inter[tm1_ptr].insert(std::make_pair(node_id,h_1_opp)); Node_id_to_vertex& node_id_to_vertex=mesh_to_node_id_to_vertex[tm1_ptr]; @@ -1111,7 +1111,7 @@ class Surface_intersection_visitor_for_corefinement{ Node_ids& node_ids=it2->second; CGAL_assertion( std::set(node_ids.begin(), node_ids.end()) .size()==node_ids.size() ); - //sort nodes along the egde to allow consecutive splits + //sort nodes along the edge to allow consecutive splits sort_vertices_along_hedge(node_ids,hedge,tm,vpm,nodes); //save original face and nodes for face of hedge (1) @@ -1438,7 +1438,7 @@ class Surface_intersection_visitor_for_corefinement{ insert_constrained_edges(node_ids,cdt,id_to_CDT_vh,constrained_edges); // insert constraints between points that are on the boundary - // (not a contrained on the triangle boundary) + // (not a constrained on the triangle boundary) if (it_fb!=face_boundaries.end()) //is f not a triangle ? { for (int i=0;i<3;++i) diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h index 9574d8b7..dca1497a 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h $ -// $Id: face_graph_utils.h a4f6f58 2022-10-04T13:50:24+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,13 +18,11 @@ #include #include -#include -#include -#include -#include #include #include #include +#include + namespace CGAL { namespace Polygon_mesh_processing { namespace Corefinement { @@ -305,7 +303,7 @@ struct Side_of_helper typedef CGAL::Pointer_property_map::type Id_to_box; Id_to_box id_to_box = CGAL::make_property_map(face_bboxes); - typedef Property_map_binder BPM; + typedef Compose_property_map BPM; BPM bpm(fid, id_to_box); Compute_bbox compute_bbox(bpm); @@ -386,32 +384,32 @@ struct TweakedGetVertexPointMap { typedef typename GetVertexPointMap::type Default_map; - typedef typename boost::is_same::value_type>::type Use_default_tag; - typedef typename boost::mpl::if_< - Use_default_tag, + typedef std::conditional_t< + Use_default_tag::value, Default_map, Dummy_default_vertex_point_map::vertex_descriptor > - >::type type; + > type; }; template -boost::optional< typename TweakedGetVertexPointMap::type > -get_vpm(const NP& np, boost::optional opm, boost::true_type) +std::optional< typename TweakedGetVertexPointMap::type > +get_vpm(const NP& np, std::optional opm, std::true_type) { - if (boost::none == opm) return boost::none; + if (std::nullopt == opm) return std::nullopt; return parameters::choose_parameter( parameters::get_parameter(np, internal_np::vertex_point), get_property_map(boost::vertex_point, *(*opm)) ); } template -boost::optional< typename TweakedGetVertexPointMap::type > -get_vpm(const NP&, boost::optional opm, boost::false_type) +std::optional< typename TweakedGetVertexPointMap::type > +get_vpm(const NP&, std::optional opm, std::false_type) { - if (boost::none == opm) return boost::none; + if (std::nullopt == opm) return std::nullopt; return typename TweakedGetVertexPointMap::type(); } // @@ -943,7 +941,7 @@ void import_polyline( halfedge_descriptor prev1=h1; halfedge_descriptor prev2=h2; - //set the correspondance + //set the correspondence pm1_to_output_edges.insert( std::make_pair(edge(prev1, pm1), edge(prev_out, output)) ); pm2_to_output_edges.insert( @@ -1362,7 +1360,7 @@ void fill_new_triangle_mesh( typedef typename GT::vertex_descriptor vertex_descriptor; typedef typename GT::edge_descriptor edge_descriptor; - // this is the miminal number of edges that will be marked (intersection edge). + // this is the minimal number of edges that will be marked (intersection edge). // We cannot easily have the total number since some patch interior edges might be marked output_shared_edges.reserve( std::accumulate(polylines.lengths.begin(),polylines.lengths.end(),std::size_t(0)) ); diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h index f84edd55..76bf5101 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h $ -// $Id: intersect_triangle_and_segment_3.h 808c93c 2020-05-26T10:14:06+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -98,7 +98,7 @@ intersection_type( typedef typename boost::property_traits::value_type Point_3; typedef typename Kernel_traits::Kernel Kernel; - CGAL_static_assertion((std::is_same::value_type>::value)); + static_assert(std::is_same::value_type>::value); halfedge_descriptor h_2=halfedge(f_2,tm2); diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_callbacks.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_callbacks.h index 9a0599fb..c25d2936 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_callbacks.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_callbacks.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_callbacks.h $ -// $Id: intersection_callbacks.h a7667b4 2022-06-16T16:48:28+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_callbacks.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_callbacks.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h index 3e9428d7..6f3669f8 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h $ -// $Id: intersection_impl.h 96d2f9e 2022-06-29T13:10:02+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -293,7 +293,7 @@ class Intersection_of_triangle_meshes if (non_manifold_feature_map.non_manifold_edges[eid].front()!=ed) continue; else - // make sure the halfedge used is consistant with stored one + // make sure the halfedge used is consistent with stored one h = halfedge(non_manifold_feature_map.non_manifold_edges[eid].front(), tm_e); } edge_boxes.push_back( Box( diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h index 76e4c4fc..e0ed91ee 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h $ -// $Id: intersection_nodes.h d594929 2022-06-22T16:56:51+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,6 @@ #include -#include #include namespace CGAL { @@ -31,7 +30,7 @@ template ::value_type >::Kernel::FT @@ -49,8 +48,8 @@ class Intersection_nodes::value_type Point_3; - CGAL_static_assertion((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); typedef typename Kernel_traits::Kernel Input_kernel; typedef std::vector Nodes_vector; @@ -151,8 +150,8 @@ class Intersection_nodes::value_type Point_3; - CGAL_static_assertion((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); typedef typename Kernel_traits::Kernel Input_kernel; @@ -266,9 +265,9 @@ class Intersection_nodes(&(*inter_res)); + std::get_if(&(*inter_res)); CGAL_assertion(pt!=nullptr); add_new_node(*pt); } @@ -328,8 +327,8 @@ class Intersection_nodes::value_type Point_3; - CGAL_static_assertion((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); typedef typename Kernel_traits::Kernel Input_kernel; typedef std::vector Nodes_vector; @@ -387,9 +386,9 @@ class Intersection_nodes(&(*inter_res)); + std::get_if(&(*inter_res)); CGAL_assertion(pt!=nullptr); add_new_node(*pt); } diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h index b444a0ad..4d0859bf 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h $ -// $Id: intersection_of_coplanar_triangles_3.h e63b032 2021-01-06T13:26:58+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -32,8 +32,8 @@ struct Intersect_coplanar_faces_3 // typedefs typedef typename boost::property_traits::value_type Point; - CGAL_static_assertion((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); typedef typename CGAL::Kernel_traits::Kernel Input_kernel; @@ -81,7 +81,7 @@ struct Intersect_coplanar_faces_3 //an intersection point between two edges. Otherwise, the point is a vertex of the second facet included into //the first facet. // - //(V,F) : point initialy constructed + //(V,F) : point initially constructed //(V,E) : (V,F) updated by get_orientation_and_update_info_2 (i.e lies on one edge) //(V,V) : (V,E) updated by get_orientation_and_update_info_2 (i.e lies on two edges) //(E,E) : created in the following function when prev and curr lie on the same edge @@ -243,9 +243,9 @@ struct Intersect_coplanar_faces_3 CGAL_assertion_code(int pt_added=0;) - Inter_pt_info* prev = &(*boost::prior(inter_pts.end())); + Inter_pt_info* prev = &(*std::prev(inter_pts.end())); bool inter_pts_size_g_2 = inter_pts.size() > 2; - Iterator stop = inter_pts_size_g_2 ? inter_pts.end() : boost::prior(inter_pts.end()); + Iterator stop = inter_pts_size_g_2 ? inter_pts.end() : std::prev(inter_pts.end()); for (Iterator it=inter_pts.begin();it!=stop;++it) { Inter_pt_info* curr=&(*it); @@ -253,7 +253,7 @@ struct Intersect_coplanar_faces_3 Orientation or_prev=orientations[prev],or_curr=orientations[curr]; if ( (or_prev==POSITIVE && or_curr==NEGATIVE) || (or_prev==NEGATIVE && or_curr==POSITIVE) ) { - Iterator it_curr = inter_pts_size_g_2 ? it:boost::next(it); + Iterator it_curr = inter_pts_size_g_2 ? it:std::next(it); prev=&(* inter_pts.insert( it_curr,operator()(*prev,*curr,h1,h2) ) ); orientations[prev]=COLLINEAR; CGAL_assertion_code(++pt_added;) @@ -278,7 +278,7 @@ struct Intersect_coplanar_faces_3 { if (orientations[&(*it)]==NEGATIVE){ inter_pts.erase(it++); - if (--nb_interpt == 2 && it!=inter_pts.end() && boost::next(it)==inter_pts.end()) should_revert_list=true; + if (--nb_interpt == 2 && it!=inter_pts.end() && std::next(it)==inter_pts.end()) should_revert_list=true; } else ++it; diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/predicates.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/predicates.h index a569567a..3e1748e4 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/predicates.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Corefinement/predicates.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/predicates.h $ -// $Id: predicates.h 00c185b 2021-03-12T12:06:20+01:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/predicates.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Corefinement/predicates.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h index 7b73d7b4..48c82444 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h $ -// $Id: Triangulate_hole_polygon_mesh.h 9e3a36c 2022-03-24T17:12:45+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,6 +22,7 @@ #endif #include #include +#include #include namespace CGAL { @@ -107,6 +108,11 @@ triangulate_hole_polygon_mesh(PolygonMesh& pmesh, Visitor& visitor, const typename Kernel::FT max_squared_distance) { +#ifdef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 + CGAL_USE(use_cdt); + CGAL_USE(max_squared_distance); +#endif + typedef Halfedge_around_face_circulator Hedge_around_face_circulator; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -174,7 +180,7 @@ triangulate_hole_polygon_mesh(PolygonMesh& pmesh, //#define CGAL_USE_WEIGHT_INCOMPLETE #ifdef CGAL_USE_WEIGHT_INCOMPLETE - typedef CGAL::internal::Weight_calculator, + typedef CGAL::internal::Weight_calculator, CGAL::internal::Is_valid_existing_edges_and_degenerate_triangle> WC; #else typedef CGAL::internal::Weight_calculator +#ifdef CGAL_TRIANGULATE_FACES_DO_NOT_USE_CDT2 +# ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 +# define CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 +# endif +#endif #include #ifndef CGAL_HOLE_FILLING_DO_NOT_USE_DT3 @@ -792,7 +797,7 @@ class Triangulate_hole_polyline_DT Triangulation tr; std::vector edge_exist; std::pair range(0, n-1); - std::tuple, bool, bool> res = construct_3D_triangulation(P, range, tr, edge_exist); + std::tuple, bool, bool> res = construct_3D_triangulation(P, range, tr, edge_exist); if(!std::get<2>(res)) { #ifdef CGAL_HOLE_FILLING_VERBOSE #ifndef CGAL_TEST_SUITE @@ -939,14 +944,14 @@ class Triangulate_hole_polyline_DT } // returns [h.first-h.second edge, true if all edges inside 3D triangulation, true if tr.dimension() >= 2] - std::tuple, bool, bool> + std::tuple, bool, bool> construct_3D_triangulation(const Polyline_3& P, std::pair h, Triangulation& tr, std::vector& edge_exist) const { // construct 3D tr with P[h.first], P[h.second] also assign ids from h.first to h.second - boost::optional e; + std::optional e; int n_border = h.second - h.first + 1; tr.insert(boost::make_transform_iterator(std::next(P.begin(), h.first), Auto_count(h.first)), boost::make_transform_iterator(std::next(P.begin(), h.second +1), Auto_count(h.first))); @@ -994,7 +999,7 @@ class Triangulate_hole_polyline_DT * + when switched to all-space, we use map based lookup tables. ************************************************************************/ Weight fill_by_incomplete_patches(Triangulation& tr, - boost::optional start_edge, + std::optional start_edge, std::vector& edge_exist, const Polyline_3& P, const Polyline_3& Q, @@ -1067,7 +1072,7 @@ class Triangulate_hole_polyline_DT // construct tr for next coming hole h = remaining_holes.back(); tr.clear(); - std::tuple, bool, bool> res = construct_3D_triangulation(P, h, tr, edge_exist); + std::tuple, bool, bool> res = construct_3D_triangulation(P, h, tr, edge_exist); if(!std::get<0>(res)) { #ifdef CGAL_HOLE_FILLING_VERBOSE CGAL_warning_msg(false, "Returning no output. Filling hole with incomplete patches is not successful!"); @@ -1270,7 +1275,7 @@ bool is_planar_2( const double n = static_cast(points.size() - 1); // the first equals to the last if (n < 3) { - return false; // cant be a plane! + return false; // can't be a plane! } // Compute centroid. @@ -1442,12 +1447,20 @@ triangulate_hole_polyline_with_cdt(const PointRange& points, vertices[v->info()] = v; } - for (std::size_t i = 0; i < size; ++i) { - const std::size_t ip = (i + 1) % size; - if (vertices[i] != vertices[ip]) { - cdt.insert_constraint(vertices[i], vertices[ip]); + try + { + for (std::size_t i = 0; i < size; ++i) { + const std::size_t ip = (i + 1) % size; + if (vertices[i] != vertices[ip]) { + cdt.insert_constraint(vertices[i], vertices[ip]); + } } } + catch(const typename CDT::Intersection_of_constraints_exception&) + { + visitor.end_planar_phase(false); + return false; + } // Mark external faces. for (typename CDT::All_faces_iterator fit = cdt.all_faces_begin(), @@ -1542,8 +1555,8 @@ triangulate_hole_polyline(const PointRange1& points, #endif typedef CGAL::internal::Triangulate_hole_polyline Fill; - std::vector P(boost::begin(points), boost::end(points)); - std::vector Q(boost::begin(third_points), boost::end(third_points)); + std::vector P(std::begin(points), std::end(points)); + std::vector Q(std::begin(third_points), std::end(third_points)); if(P.front() != P.back()){ P.push_back(P.front()); @@ -1563,6 +1576,9 @@ triangulate_hole_polyline(const PointRange1& points, w == WeightCalculator::Weight::NOT_VALID() &&!skip_cubic_algorithm) { +#ifdef CGAL_HOLE_FILLING_VERBOSE + std::cerr << "Delaunay failed\n"; +#endif w = Fill().operator()(P, Q, tracer, WC, visitor); } #endif diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/do_not_use_DT3.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/do_not_use_DT3.h index 9e1eed0a..ce800f49 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/do_not_use_DT3.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/do_not_use_DT3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/do_not_use_DT3.h $ -// $Id: do_not_use_DT3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/do_not_use_DT3.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Hole_filling/do_not_use_DT3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h index ce012787..2cfec0a3 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h $ -// $Id: AABB_filtered_projection_traits.h 678b9d8 2022-06-24T11:09:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -50,7 +50,7 @@ class Filtered_projection_traits typedef typename boost::property_traits::value_type Index_type; - typedef std::set::type> Set_of_indices; + typedef std::set> Set_of_indices; public: template diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h index 1feb844b..1bd0acc6 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h $ -// $Id: remesh_impl.h ead1795 2022-12-05T11:57:06+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -43,7 +43,6 @@ #include #include #include -#include #include #include @@ -54,6 +53,7 @@ #include #include #include +#include #ifdef CGAL_PMP_REMESHING_DEBUG #include @@ -72,7 +72,11 @@ #endif namespace CGAL { + namespace Polygon_mesh_processing { + +template class Uniform_sizing_field; + namespace internal { enum Halfedge_status { @@ -156,15 +160,15 @@ namespace internal { template bool same_range(const Range& r1, const Range& r2) { - return boost::begin(r1)==boost::begin(r2) && - boost::end(r1)==boost::end(r2); + return std::begin(r1)==std::begin(r2) && + std::end(r1)==std::end(r2); } template bool same_range(const Range1& r1, const Range2& r2) { - return std::distance(boost::begin(r1), boost::end(r1)) == - std::distance(boost::begin(r2), boost::end(r2)); + return std::distance(std::begin(r1), std::end(r1)) == + std::distance(std::begin(r2), std::end(r2)); } public: @@ -226,15 +230,13 @@ namespace internal { template + typename FacePatchMap, + typename SizingFunction> bool constraints_are_short_enough(const PM& pmesh, EdgeConstraintMap ecmap, - VertexPointMap vpmap, const FacePatchMap& fpm, - const double& high) + const SizingFunction& sizing) { - double sqh = high*high; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::edge_descriptor edge_descriptor; for(edge_descriptor e : edges(pmesh)) @@ -244,8 +246,7 @@ namespace internal { get(ecmap, e) || get(fpm, face(h,pmesh))!=get(fpm, face(opposite(h,pmesh),pmesh)) ) { - if (sqh < CGAL::squared_distance(get(vpmap, source(h, pmesh)), - get(vpmap, target(h, pmesh)))) + if (sizing.is_too_long(source(h, pmesh), target(h, pmesh), pmesh)) { return false; } @@ -377,42 +378,43 @@ namespace internal { } } - // split edges of edge_range that have their length > high // Note: only used to split a range of edges provided as input - template + template void split_long_edges(const EdgeRange& edge_range, - const double& high) + SizingFunction& sizing) { - typedef boost::bimap< - boost::bimaps::set_of, - boost::bimaps::multiset_of > > Boost_bimap; - typedef typename Boost_bimap::value_type long_edge; #ifdef CGAL_PMP_REMESHING_VERBOSE - std::cout << "Split long edges (" << high << ")..."; + std::cout << "Split long edges..."; std::cout.flush(); #endif - double sq_high = high*high; //collect long edges - Boost_bimap long_edges; + typedef std::pair H_and_sql; + std::multiset< H_and_sql, std::function > + long_edges( + [](const H_and_sql& p1, const H_and_sql& p2) + { return p1.second > p2.second; } + ); for(edge_descriptor e : edge_range) { - double sqlen = sqlength(e); - if (sqlen > sq_high) - long_edges.insert(long_edge(halfedge(e, mesh_), sqlen)); + const halfedge_descriptor he = halfedge(e, mesh_); + std::optional sqlen = sizing.is_too_long(source(he, mesh_), target(he, mesh_), mesh_); + if(sqlen != std::nullopt) + long_edges.emplace(he, sqlen.value()); } //split long edges +#ifdef CGAL_PMP_REMESHING_VERBOSE unsigned int nb_splits = 0; +#endif while (!long_edges.empty()) { //the edge with longest length - typename Boost_bimap::right_map::iterator eit = long_edges.right.begin(); - halfedge_descriptor he = eit->second; - double sqlen = eit->first; - long_edges.right.erase(eit); + auto eit = long_edges.begin(); + halfedge_descriptor he = eit->first; + long_edges.erase(eit); //split edge Point refinement_point = this->midpoint(he); @@ -420,7 +422,9 @@ namespace internal { // propagate the constrained status put(ecmap_, edge(hnew, mesh_), get(ecmap_, edge(he, mesh_))); CGAL_assertion(he == next(hnew, mesh_)); +#ifdef CGAL_PMP_REMESHING_VERBOSE ++nb_splits; +#endif //move refinement point vertex_descriptor vnew = target(hnew, mesh_); @@ -428,31 +432,41 @@ namespace internal { #ifdef CGAL_PMP_REMESHING_VERY_VERBOSE std::cout << " refinement point : " << refinement_point << std::endl; #endif + //update sizing field with the new point + sizing.register_split_vertex(vnew, mesh_); //check sub-edges - double sqlen_new = 0.25 * sqlen; - if (sqlen_new > sq_high) - { - //if it was more than twice the "long" threshold, insert them - long_edges.insert(long_edge(hnew, sqlen_new)); - long_edges.insert(long_edge(next(hnew, mesh_), sqlen_new)); - } + //if it was more than twice the "long" threshold, insert them + std::optional sqlen_new = sizing.is_too_long(source(hnew, mesh_), target(hnew, mesh_), mesh_); + if(sqlen_new != std::nullopt) + long_edges.emplace(hnew, sqlen_new.value()); + + const halfedge_descriptor hnext = next(hnew, mesh_); + sqlen_new = sizing.is_too_long(source(hnext, mesh_), target(hnext, mesh_), mesh_); + if (sqlen_new != std::nullopt) + long_edges.emplace(hnext, sqlen_new.value()); //insert new edges to keep triangular faces, and update long_edges if (!is_border(hnew, mesh_)) { + Patch_id patch_id = get_patch_id(face(hnew, mesh_)); halfedge_descriptor hnew2 = CGAL::Euler::split_face(hnew, next(next(hnew, mesh_), mesh_), mesh_); put(ecmap_, edge(hnew2, mesh_), false); + set_patch_id(face(hnew2, mesh_), patch_id); + set_patch_id(face(opposite(hnew2, mesh_), mesh_), patch_id); } //do it again on the other side if we're not on boundary halfedge_descriptor hnew_opp = opposite(hnew, mesh_); if (!is_border(hnew_opp, mesh_)) { + Patch_id patch_id = get_patch_id(face(hnew_opp, mesh_)); halfedge_descriptor hnew2 = CGAL::Euler::split_face(prev(hnew_opp, mesh_), next(hnew_opp, mesh_), mesh_); put(ecmap_, edge(hnew2, mesh_), false); + set_patch_id(face(hnew2, mesh_), patch_id); + set_patch_id(face(opposite(hnew2, mesh_), mesh_), patch_id); } } #ifdef CGAL_PMP_REMESHING_VERBOSE @@ -467,41 +481,43 @@ namespace internal { // "visits all edges of the mesh //if an edge is longer than the given threshold `high`, the edge //is split at its midpoint and the two adjacent triangles are bisected (2-4 split)" - void split_long_edges(const double& high) + template + void split_long_edges(SizingFunction& sizing) { - typedef boost::bimap< - boost::bimaps::set_of, - boost::bimaps::multiset_of > > Boost_bimap; - typedef typename Boost_bimap::value_type long_edge; - #ifdef CGAL_PMP_REMESHING_VERBOSE - std::cout << "Split long edges (" << high << ")..." << std::endl; + std::cout << "Split long edges..." << std::endl; #endif - double sq_high = high*high; - //collect long edges - Boost_bimap long_edges; + typedef std::pair H_and_sql; + std::multiset< H_and_sql, std::function > + long_edges( + [](const H_and_sql& p1, const H_and_sql& p2) + { return p1.second > p2.second; } + ); + for(edge_descriptor e : edges(mesh_)) { if (!is_split_allowed(e)) continue; - double sqlen = sqlength(e); - if(sqlen > sq_high) - long_edges.insert(long_edge(halfedge(e, mesh_), sqlen)); + const halfedge_descriptor he = halfedge(e, mesh_); + std::optional sqlen = sizing.is_too_long(source(he, mesh_), target(he, mesh_), mesh_); + if(sqlen != std::nullopt) + long_edges.emplace(halfedge(e, mesh_), sqlen.value()); } //split long edges +#ifdef CGAL_PMP_REMESHING_VERBOSE unsigned int nb_splits = 0; +#endif while (!long_edges.empty()) { //the edge with longest length - typename Boost_bimap::right_map::iterator eit = long_edges.right.begin(); - halfedge_descriptor he = eit->second; - double sqlen = eit->first; - long_edges.right.erase(eit); + auto eit = long_edges.begin(); + halfedge_descriptor he = eit->first; + long_edges.erase(eit); #ifdef CGAL_PMP_REMESHING_VERBOSE_PROGRESS - std::cout << "\r\t(" << long_edges.left.size() << " long edges, "; + std::cout << "\r\t(" << long_edges.size() << " long edges, "; std::cout << nb_splits << " splits)"; std::cout.flush(); #endif @@ -514,12 +530,13 @@ namespace internal { Patch_id patch_id_opp = get_patch_id(face(opposite(he, mesh_), mesh_)); //split edge - Point refinement_point = this->midpoint(he); + Point refinement_point = sizing.split_placement(he, mesh_); halfedge_descriptor hnew = CGAL::Euler::split_edge(he, mesh_); CGAL_assertion(he == next(hnew, mesh_)); put(ecmap_, edge(hnew, mesh_), get(ecmap_, edge(he, mesh_)) ); +#ifdef CGAL_PMP_REMESHING_VERBOSE ++nb_splits; - +#endif //move refinement point vertex_descriptor vnew = target(hnew, mesh_); put(vpmap_, vnew, refinement_point); @@ -532,14 +549,19 @@ namespace internal { halfedge_added(hnew, status(he)); halfedge_added(hnew_opp, status(opposite(he, mesh_))); + //update sizing field with the new point + sizing.register_split_vertex(vnew, mesh_); + //check sub-edges - double sqlen_new = 0.25 * sqlen; - if (sqlen_new > sq_high) - { - //if it was more than twice the "long" threshold, insert them - long_edges.insert(long_edge(hnew, sqlen_new)); - long_edges.insert(long_edge(next(hnew, mesh_), sqlen_new)); - } + //if it was more than twice the "long" threshold, insert them + std::optional sqlen_new = sizing.is_too_long(source(hnew, mesh_), target(hnew, mesh_), mesh_); + if(sqlen_new != std::nullopt) + long_edges.emplace(hnew, sqlen_new.value()); + + const halfedge_descriptor hnext = next(hnew, mesh_); + sqlen_new = sizing.is_too_long(source(hnext, mesh_), target(hnext, mesh_), mesh_); + if (sqlen_new != std::nullopt) + long_edges.emplace(hnext, sqlen_new.value()); //insert new edges to keep triangular faces, and update long_edges if (!is_on_border(hnew)) @@ -558,9 +580,9 @@ namespace internal { if (snew == PATCH) { - double sql = sqlength(hnew2); - if (sql > sq_high) - long_edges.insert(long_edge(hnew2, sql)); + std::optional sql = sizing.is_too_long(source(hnew2, mesh_), target(hnew2, mesh_), mesh_); + if(sql != std::nullopt) + long_edges.emplace(hnew2, sql.value()); } } @@ -581,9 +603,9 @@ namespace internal { if (snew == PATCH) { - double sql = sqlength(hnew2); - if (sql > sq_high) - long_edges.insert(long_edge(hnew2, sql)); + std::optional sql = sizing.is_too_long(source(hnew2, mesh_), target(hnew2, mesh_), mesh_); + if (sql != std::nullopt) + long_edges.emplace(hnew2, sql.value()); } } } @@ -605,8 +627,8 @@ namespace internal { // "collapses and thus removes all edges that are shorter than a // threshold `low`. [...] testing before each collapse whether the collapse // would produce an edge that is longer than `high`" - void collapse_short_edges(const double& low, - const double& high, + template + void collapse_short_edges(const SizingFunction& sizing, const bool collapse_constraints) { typedef boost::bimap< @@ -615,28 +637,29 @@ namespace internal { typedef typename Boost_bimap::value_type short_edge; #ifdef CGAL_PMP_REMESHING_VERBOSE - std::cout << "Collapse short edges (" << low << ", " << high << ")..." + std::cout << "Collapse short edges..." << std::endl; #endif #ifdef CGAL_PMP_REMESHING_VERBOSE_PROGRESS std::cout << "Fill bimap..."; std::cout.flush(); #endif - double sq_low = low*low; - double sq_high = high*high; Boost_bimap short_edges; for(edge_descriptor e : edges(mesh_)) { - double sqlen = sqlength(e); - if ((sqlen < sq_low) && is_collapse_allowed(e, collapse_constraints)) - short_edges.insert(short_edge(halfedge(e, mesh_), sqlen)); + std::optional sqlen = sizing.is_too_short(halfedge(e, mesh_), mesh_); + if(sqlen != std::nullopt + && is_collapse_allowed(e, collapse_constraints)) + short_edges.insert(short_edge(halfedge(e, mesh_), sqlen.value())); } #ifdef CGAL_PMP_REMESHING_VERBOSE_PROGRESS std::cout << "done." << std::endl; #endif +#ifdef CGAL_PMP_REMESHING_VERBOSE unsigned int nb_collapses = 0; +#endif while (!short_edges.empty()) { //the edge with shortest length @@ -724,7 +747,8 @@ namespace internal { for(halfedge_descriptor ha : halfedges_around_target(va, mesh_)) { vertex_descriptor va_i = source(ha, mesh_); - if (sqlength(vb, va_i) > sq_high) + std::optional sqha = sizing.is_too_long(vb, va_i, mesh_); + if (sqha != std::nullopt) { collapse_ok = false; break; @@ -773,12 +797,13 @@ namespace internal { vertex_descriptor vkept = CGAL::Euler::collapse_edge(e, mesh_, ecmap_); CGAL_assertion(is_valid(mesh_)); CGAL_assertion(vkept == vb);//is the constrained point still here +#ifdef CGAL_PMP_REMESHING_VERBOSE ++nb_collapses; - +#endif //fix constrained case CGAL_assertion((is_constrained(vkept) || is_corner(vkept) || is_on_patch_border(vkept)) == (is_va_constrained || is_vb_constrained || is_va_on_constrained_polyline || is_vb_on_constrained_polyline)); - if (fix_degenerate_faces(vkept, short_edges, sq_low, collapse_constraints)) + if (fix_degenerate_faces(vkept, short_edges, sizing, collapse_constraints)) { #ifdef CGAL_PMP_REMESHING_DEBUG debug_status_map(); @@ -788,9 +813,10 @@ namespace internal { //insert new/remaining short edges for (halfedge_descriptor ht : halfedges_around_target(vkept, mesh_)) { - double sqlen = sqlength(ht); - if ((sqlen < sq_low) && is_collapse_allowed(edge(ht, mesh_), collapse_constraints)) - short_edges.insert(short_edge(ht, sqlen)); + std::optional sqlen = sizing.is_too_short(ht, mesh_); + if (sqlen != std::nullopt + && is_collapse_allowed(edge(ht, mesh_), collapse_constraints)) + short_edges.insert(short_edge(ht, sqlen.value())); } } }//end if(collapse_ok) @@ -836,7 +862,9 @@ namespace internal { const double cap_threshold = std::cos(160. / 180 * CGAL_PI); +#ifdef CGAL_PMP_REMESHING_VERBOSE unsigned int nb_flips = 0; +#endif for(edge_descriptor e : edges(mesh_)) { //only the patch edges are allowed to be flipped @@ -900,8 +928,9 @@ namespace internal { put(degree, vc, vvc); put(degree, vd, vvd); +#ifdef CGAL_PMP_REMESHING_VERBOSE ++nb_flips; - +#endif #ifdef CGAL_PMP_REMESHING_VERBOSE_PROGRESS std::cout << "\r\t(" << nb_flips << " flips)"; std::cout.flush(); @@ -950,8 +979,9 @@ namespace internal { put(degree, vc, vvc); put(degree, vd, vvd); +#ifdef CGAL_PMP_REMESHING_VERBOSE --nb_flips; - +#endif CGAL_assertion_code(Halfedge_status s3 = status(he)); CGAL_assertion(s1 == s3); CGAL_assertion(!is_border(he, mesh_)); @@ -984,8 +1014,10 @@ namespace internal { // "applies an iterative smoothing filter to the mesh. // The vertex movement has to be constrained to the vertex tangent plane [...] // smoothing algorithm with uniform Laplacian weights" + template void tangential_relaxation_impl(const bool relax_constraints/*1d smoothing*/ - , const unsigned int nb_iterations) + , const unsigned int nb_iterations + , const SizingFunction& sizing) { #ifdef CGAL_PMP_REMESHING_VERBOSE std::cout << "Tangential relaxation (" << nb_iterations << " iter.)..."; @@ -1016,16 +1048,41 @@ namespace internal { auto constrained_vertices_pmap = boost::make_function_property_map(vertex_constraint); - tangential_relaxation( - vertices(mesh_), - mesh_, - CGAL::parameters::number_of_iterations(nb_iterations) - .vertex_point_map(vpmap_) - .geom_traits(gt_) - .edge_is_constrained_map(constrained_edges_pmap) - .vertex_is_constrained_map(constrained_vertices_pmap) - .relax_constraints(relax_constraints) - ); + if constexpr (std::is_same_v>) + { +#ifdef CGAL_PMP_REMESHING_VERBOSE + std::cout << " using tangential relaxation with weights equal to 1"; + std::cout << std::endl; +#endif + tangential_relaxation( + vertices(mesh_), + mesh_, + CGAL::parameters::number_of_iterations(nb_iterations) + .vertex_point_map(vpmap_) + .geom_traits(gt_) + .edge_is_constrained_map(constrained_edges_pmap) + .vertex_is_constrained_map(constrained_vertices_pmap) + .relax_constraints(relax_constraints) + ); + } + else + { +#ifdef CGAL_PMP_REMESHING_VERBOSE + std::cout << " using tangential relaxation weighted with the sizing field"; + std::cout << std::endl; +#endif + tangential_relaxation( + vertices(mesh_), + mesh_, + CGAL::parameters::number_of_iterations(nb_iterations) + .vertex_point_map(vpmap_) + .geom_traits(gt_) + .edge_is_constrained_map(constrained_edges_pmap) + .vertex_is_constrained_map(constrained_vertices_pmap) + .relax_constraints(relax_constraints) + .sizing_function(sizing) + ); + } CGAL_assertion(!input_mesh_is_valid_ || is_valid_polygon_mesh(mesh_)); @@ -1199,7 +1256,7 @@ namespace internal { halfedge_descriptor hopp = opposite(h, mesh_); //check whether h is the longest edge in its associated face - //overwise refinement will go for an endless loop + //otherwise refinement will go into an endless loop double sqh = sqlength(h); return sqh >= sqlength(next(h, mesh_)) && sqh >= sqlength(next(next(h, mesh_), mesh_)) @@ -1526,7 +1583,7 @@ namespace internal { } // update status using constrained edge map - if (!boost::is_same >::value) { for(edge_descriptor e : edges(mesh_)) @@ -1623,14 +1680,12 @@ namespace internal { // else keep current status for en and eno } - template + template bool fix_degenerate_faces(const vertex_descriptor& v, Bimap& short_edges, - const double& sq_low, + const SizingFunction& sizing, const bool collapse_constraints) { - CGAL_assertion_code(std::size_t nb_done = 0); - std::unordered_set degenerate_faces; for(halfedge_descriptor h : halfedges_around_target(halfedge(v, mesh_), mesh_)) @@ -1689,7 +1744,6 @@ namespace internal { continue; CGAL::Euler::flip_edge(hf, mesh_); - CGAL_assertion_code(++nb_done); done = true; //update status @@ -1707,9 +1761,9 @@ namespace internal { //insert new edges in 'short_edges' if (is_collapse_allowed(edge(hf, mesh_), collapse_constraints)) { - double sqlen = sqlength(hf); - if (sqlen < sq_low) - short_edges.insert(typename Bimap::value_type(hf, sqlen)); + std::optional sqlen = sizing.is_too_short(hf, mesh_); + if (sqlen != std::nullopt) + short_edges.insert(typename Bimap::value_type(hf, sqlen.value())); } if(!is_border(hf, mesh_) && @@ -1885,6 +1939,11 @@ namespace internal { else if(is_an_isolated_constraint(h)) nb_isolated++; else CGAL_assertion(false); } + CGAL_USE(nb_border); + CGAL_USE(nb_mesh); + CGAL_USE(nb_patch); + CGAL_USE(nb_patch_border); + CGAL_USE(nb_isolated); } #ifdef CGAL_PMP_REMESHING_DEBUG @@ -1920,7 +1979,7 @@ namespace internal { bool check_normals(const HalfedgeRange& hedges) const { std::size_t nb_patches = patch_id_to_index_map.size(); - //std::vector > normal_per_patch(nb_patches,boost::none); + //std::vector > normal_per_patch(nb_patches,std::nullopt); std::vector initialized(nb_patches,false); std::vector normal_per_patch(nb_patches); @@ -1944,7 +2003,7 @@ namespace internal { return false; } } - //normal_per_patch[index] = boost::make_optional(n); + //normal_per_patch[index] = std::make_optional(n); normal_per_patch[index] = n; initialized[index] = true; } diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Axis_parallel_plane_traits.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Axis_parallel_plane_traits.h index ad19a28d..4bd368f6 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Axis_parallel_plane_traits.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Axis_parallel_plane_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Axis_parallel_plane_traits.h $ -// $Id: Axis_parallel_plane_traits.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Axis_parallel_plane_traits.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Axis_parallel_plane_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,8 +14,8 @@ #include #include -#include -#include +#include +#include #ifndef CGAL_INTERNAL_POLYGON_MESH_SLICER_AXIS_PARALLEL_PLANE_TRAITS_H @@ -95,8 +95,8 @@ class Axis_parallel_plane_traits const typename Traits::Construct_source_3 m_source_3; const typename Traits::Construct_target_3 m_target_3; - typedef boost::variant Variant_type; - typedef boost::optional< Variant_type > result_type; + typedef std::variant Variant_type; + typedef std::optional< Variant_type > result_type; Intersect_3(const Axis_parallel_plane_traits& traits) : m_cst_coord(traits.m_cst_coord) diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Traversal_traits.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Traversal_traits.h index 6c8ab5e9..86c70781 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Traversal_traits.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Traversal_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Traversal_traits.h $ -// $Id: Traversal_traits.h 678b9d8 2022-06-24T11:09:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Traversal_traits.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Polygon_mesh_slicer/Traversal_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h index 80427fd0..0e9facb3 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h $ -// $Id: Point_inside_vertical_ray_cast.h 3b2da64 2020-07-01T21:03:31+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Point_inside_vertical_ray_cast.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,7 @@ #include #include -#include +#include #include namespace CGAL { @@ -78,9 +78,9 @@ class Point_inside_vertical_ray_cast //the direction of the vertical ray depends on the position of the point in the bbox //in order to limit the expected number of nodes visited. Ray query = ray_functor(point, vector_functor(0,0,(2*point.z() < bbox.zmax()+bbox.zmin()?-1:1))); - boost::optional res = is_inside_ray_tree_traversal(query, tree); + std::optional res = is_inside_ray_tree_traversal(query, tree); - if(res == boost::none) + if(res == std::nullopt) { CGAL::Random rg(seed); // seed some value for make it easy to debug Random_points_on_sphere_3 random_point(1.,rg); @@ -88,14 +88,14 @@ class Point_inside_vertical_ray_cast do { //retry with a random ray query = ray_functor(point, vector_functor(CGAL::ORIGIN,*random_point++)); res = is_inside_ray_tree_traversal(query, tree); - } while (res == boost::none); + } while (res == std::nullopt); } return *res; } private: template - boost::optional + std::optional is_inside_ray_tree_traversal(const Ray& ray, const AABBTree& tree) const { std::pair @@ -114,7 +114,7 @@ class Point_inside_vertical_ray_cast //otherwise the point is on the facet return ON_BOUNDARY; } - return boost::optional(); // indeterminate + return std::optional(); // indeterminate } }; diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h index 27a8cf5f..1137e6ce 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h $ -// $Id: Ray_3_Triangle_3_traversal_traits.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Sizing_field_base.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Sizing_field_base.h new file mode 100644 index 00000000..50081831 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Sizing_field_base.h @@ -0,0 +1,78 @@ +// Copyright (c) 2020 GeometryFactory (France) +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Sizing_field_base.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Sizing_field_base.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Jane Tournois + +#ifndef CGAL_PMP_REMESHING_SIZING_FIELD_H +#define CGAL_PMP_REMESHING_SIZING_FIELD_H + +#include + +#include +#include + +#include + +namespace CGAL +{ +namespace Polygon_mesh_processing +{ +namespace internal +{ +/*! +* \ingroup PMP_meshing_grp +* pure virtual class serving as a base for sizing field classes used in isotropic +* remeshing. +* +* \cgalModels{PMPSizingField} +* +* \sa `isotropic_remeshing()` +* \sa `Uniform_sizing_field` +* \sa `Adaptive_sizing_field` +* +* @tparam PolygonMesh model of `MutableFaceGraph` that +* has an internal property map for `CGAL::vertex_point_t`. +* @tparam VPMap property map associating points to the vertices of `pmesh`, +* model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` +* as key type and `%Point_3` as value type. Default is `boost::get(CGAL::vertex_point, pmesh)`. +*/ +template ::const_type> +class Sizing_field_base +{ +private: + typedef PolygonMesh PM; + typedef typename boost::property_traits::value_type Point; + +public: + typedef typename CGAL::Kernel_traits::Kernel K; + typedef typename boost::graph_traits::face_descriptor face_descriptor; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef Point Point_3; + typedef typename K::FT FT; + +public: + virtual FT at(const vertex_descriptor v, const PolygonMesh&) const = 0; + virtual std::optional is_too_long(const vertex_descriptor va, + const vertex_descriptor vb, + const PolygonMesh&) const = 0; + virtual std::optional is_too_short(const halfedge_descriptor h, + const PolygonMesh& pmesh) const = 0; + virtual Point_3 split_placement(const halfedge_descriptor h, const PolygonMesh& pmesh) const = 0; + virtual void register_split_vertex(const vertex_descriptor v, const PolygonMesh& pmesh) = 0; + +}; + +}//end namespace internal +}//end namespace Polygon_mesh_processing +}//end namespace CGAL + +#endif //CGAL_PMP_REMESHING_SIZING_FIELD_H diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/ceres_support.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/ceres_support.h index 4eafd110..15fbcc76 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/ceres_support.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/ceres_support.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/ceres_support.h $ -// $Id: ceres_support.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/ceres_support.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Smoothing/ceres_support.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h index 2eb91867..acbf4f86 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h $ -// $Id: curvature_flow_impl.h 7564b76 2022-11-07T14:11:10+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include @@ -70,13 +70,14 @@ class Shape_smoother Shape_smoother(TriangleMesh& mesh, VertexPointMap& vpmap, VertexConstraintMap& vcmap, - const GeomTraits& traits) + const bool scale_volume_after_smoothing = true, + const GeomTraits& traits = GeomTraits()) : mesh_(mesh), vpmap_(vpmap), vcmap_(vcmap), vimap_(get(Vertex_local_index(), mesh_)), - scale_volume_after_smoothing(true), + scale_volume_after_smoothing_(scale_volume_after_smoothing), traits_(traits), weight_calculator_(mesh_, vpmap_, traits_, false /*no clamping*/, false /*no bounding from below*/) { } @@ -101,15 +102,15 @@ class Shape_smoother constrained_flags_[get(vimap_, v)] = true; // scaling things cannot preserve the position of more than a single constrained point - if(anchor_point == boost::none) + if(anchor_point == std::nullopt) anchor_point = get(vpmap_, v); else - scale_volume_after_smoothing = false; + scale_volume_after_smoothing_ = false; } } if(!CGAL::is_closed(mesh_)) - scale_volume_after_smoothing = false; + scale_volume_after_smoothing_ = false; } void setup_system(Eigen_matrix& A, @@ -126,7 +127,7 @@ class Shape_smoother const Eigen_vector& bx, const Eigen_vector& by, const Eigen_vector& bz, SparseLinearSolver& solver) { - FT D; + double D; // calls compute once to factorize with the preconditioner if(!solver.factor(A, D)) @@ -222,14 +223,14 @@ class Shape_smoother { namespace PMP = CGAL::Polygon_mesh_processing; - if(!scale_volume_after_smoothing) + if(!scale_volume_after_smoothing_) return update_mesh_no_scaling(Xx, Xy, Xz); const FT old_vol = volume(mesh_, parameters::vertex_point_map(vpmap_).geom_traits(traits_)); - // If no vertex is constrained, then the smoothed mesh will simply share the same centroid as the input mesh + // If no vertex is constrained, then the smoothed mesh will share the same centroid as the input mesh Point pre_smooth_anchor_point; - if(anchor_point != boost::none) + if(anchor_point != std::nullopt) pre_smooth_anchor_point = *anchor_point; else pre_smooth_anchor_point = PMP::centroid(mesh_, parameters::vertex_point_map(vpmap_).geom_traits(traits_)); @@ -246,7 +247,7 @@ class Shape_smoother } Point post_smooth_anchor_point; - if(anchor_point != boost::none) + if(anchor_point != std::nullopt) post_smooth_anchor_point = *anchor_point; else post_smooth_anchor_point = PMP::centroid(mesh_, parameters::vertex_point_map(vpmap_).geom_traits(traits_)); @@ -362,8 +363,8 @@ class Shape_smoother // of volume. We need an anchor point to scale up, either a constrained point or the centroid // of the initial mesh if no vertex is constrained. If there is more than a constrained vertex, // then no scaling can be done without violating the constraint. - bool scale_volume_after_smoothing; - boost::optional anchor_point; + bool scale_volume_after_smoothing_; + std::optional anchor_point; // linear system data std::vector diagonal_; // index of vector -> index of vimap_ diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/mesh_smoothing_impl.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/mesh_smoothing_impl.h index fbf920b7..025d6d5e 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/mesh_smoothing_impl.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/mesh_smoothing_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/mesh_smoothing_impl.h $ -// $Id: mesh_smoothing_impl.h 29ddd67 2020-02-06T17:14:16+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/mesh_smoothing_impl.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Smoothing/mesh_smoothing_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -161,8 +161,9 @@ class Delaunay_edge_flipper put(marks, e, false); for(edge_descriptor e : edge_range) put(marks, e, true); - +#ifdef CGAL_PMP_SMOOTHING_DEBUG int flipped_n = 0; +#endif while(!edge_range.empty()) { edge_descriptor e = edge_range.back(); @@ -172,8 +173,9 @@ class Delaunay_edge_flipper if(should_be_flipped(e)) { +#ifdef CGAL_PMP_SMOOTHING_DEBUG ++flipped_n; - +#endif halfedge_descriptor h = halfedge(e, mesh_); #ifdef CGAL_PMP_SMOOTHING_DEBUG_PP @@ -384,15 +386,15 @@ class Area_smoother T* residual) const { // Defining this because I haven't found much difference empirically (auto-diff being maybe - // a couple % faster), but numeric differenciation should be stronger in the face - // of difficult cases. Leaving the auto-differenciation formulation in case somebody really + // a couple % faster), but numeric differentiation should be stronger in the face + // of difficult cases. Leaving the auto-differentiation formulation in case somebody really // cares about the extra speed. #define CGAL_CERES_USE_NUMERIC_DIFFERENCIATION #ifdef CGAL_CERES_USE_NUMERIC_DIFFERENCIATION residual[0] = evaluate(x[0], y[0], z[0]); #else - // Computations must be explicit so that automatic differenciation can be used + // Computations must be explicit so that automatic differentiation can be used T dqx = qx - x[0]; T dqy = qy - y[0]; T dqz = qz - z[0]; @@ -426,10 +428,10 @@ class Area_smoother const FT S_av = compute_average_area_around(v); - const FT initial_x = vp.x(); - const FT initial_y = vp.y(); - const FT initial_z = vp.z(); - FT x = initial_x, y = initial_y, z = initial_z; + const double initial_x = CGAL::to_double(vp.x()); + const double initial_y = CGAL::to_double(vp.y()); + const double initial_z = CGAL::to_double(vp.z()); + double x = initial_x, y = initial_y, z = initial_z; ceres::Problem problem; @@ -466,7 +468,7 @@ class Area_smoother // std::cout << "y : " << initial_y << " -> " << y << "\n"; // std::cout << "z : " << initial_z << " -> " << z << "\n"; - return Vector(x - initial_x, y - initial_y, z - initial_z); + return Vector(FT(x - initial_x), FT(y - initial_y), FT(z - initial_z)); #else CGAL_USE(v); return CGAL::NULL_VECTOR; diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/smoothing_evaluation.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/smoothing_evaluation.h index 32adcf3b..933a6921 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/smoothing_evaluation.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Smoothing/smoothing_evaluation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/smoothing_evaluation.h $ -// $Id: smoothing_evaluation.h f33618e 2020-02-06T09:54:35+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/smoothing_evaluation.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Smoothing/smoothing_evaluation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Snapping/helper.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Snapping/helper.h index c28d7c58..ab176e64 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Snapping/helper.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Snapping/helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/helper.h $ -// $Id: helper.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/helper.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Snapping/helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ #include #include #include -#include +#include namespace CGAL { namespace Polygon_mesh_processing { diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h index ebb75052..7e2d334f 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h $ -// $Id: snap.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include @@ -113,6 +113,7 @@ void simplify_range(HalfedgeRange& halfedge_range, std::set edges_to_test(halfedge_range.begin(), halfedge_range.end()); int collapsed_n = 0; + while(!edges_to_test.empty()) { const halfedge_descriptor h = *(edges_to_test.begin()); @@ -133,6 +134,7 @@ void simplify_range(HalfedgeRange& halfedge_range, { const halfedge_descriptor prev_h = prev(h, tm); const halfedge_descriptor next_h = next(h, tm); + const halfedge_descriptor prev_oh = prev(opposite(h, tm), tm); // check that the border has at least 4 edges not to create degenerate volumes if(border_size(h, tm) >= 4) @@ -151,11 +153,43 @@ void simplify_range(HalfedgeRange& halfedge_range, new_tolerance += CGAL::approximate_sqrt(CGAL::squared_distance(new_p, pt)); } - if (!CGAL::Euler::does_satisfy_link_condition(edge(h, tm), tm)) + // check that the collapse does not create a new degenerate face + bool do_collapse = true; + for(halfedge_descriptor he : halfedges_around_target(h, tm)) + { + if(he != prev_oh && // ignore the triangle incident to h that will disappear + !is_border(he, tm) && + collinear(get(vpm, source(he, tm)), new_p, get(vpm, target(next(he,tm),tm)))) + { + do_collapse = false; + break; + } + } + + if(!do_collapse) + continue; + + for(halfedge_descriptor he : halfedges_around_target(opposite(h,tm), tm)) + { + if(he != opposite(h,tm) && + !is_border(he, tm) && + collinear(get(vpm, source(he, tm)), new_p, get(vpm, target(next(he,tm),tm)))) + { + do_collapse = false; + break; + } + } + + if(!do_collapse) + continue; + + if(!CGAL::Euler::does_satisfy_link_condition(edge(h, tm), tm)) continue; + const halfedge_descriptor opoh = opposite(prev(opposite(h, tm), tm), tm); - if (is_border(opoh, tm)) - edges_to_test.erase( opoh ); + if(is_border(opoh, tm)) + edges_to_test.erase(opoh); + vertex_descriptor v = Euler::collapse_edge(edge(h, tm), tm); put(vpm, v, new_p); @@ -163,14 +197,13 @@ void simplify_range(HalfedgeRange& halfedge_range, if(get(range_halfedges, prev_h)) edges_to_test.insert(prev_h); - if(next_h!=opoh && get(range_halfedges, next_h)) + if(next_h != opoh && get(range_halfedges, next_h)) edges_to_test.insert(next_h); - ++collapsed_n; } } } - + CGAL_USE(collapsed_n); #ifdef CGAL_PMP_SNAP_DEBUG std::cout << "collapsed " << collapsed_n << " edges" << std::endl; #endif @@ -637,7 +670,6 @@ std::size_t split_edges(EdgesToSplitContainer& edges_to_split, typedef typename boost::property_traits::value_type Point; typedef typename boost::property_traits::reference Point_ref; - typedef typename GeomTraits::Vector_3 Vector; typedef std::pair Vertex_with_new_position; typedef std::vector Vertices_with_new_position; @@ -687,7 +719,12 @@ std::size_t split_edges(EdgesToSplitContainer& edges_to_split, bool do_split = true; - // Some splits can create degenerate faces, avoid that + // In case of self-snapping, avoid degenerate caps + const bool is_same_mesh = (&tm_T == &tm_S); + if(is_same_mesh && target(next(opposite(h_to_split, tm_T), tm_T), tm_T) == splitter_v) + do_split = false; + + // Do not split if it would create a degenerate needle if((new_position == get(vpm_T, target(h_to_split, tm_T))) || (new_position == get(vpm_T, source(h_to_split, tm_T)))) do_split = false; @@ -695,11 +732,58 @@ std::size_t split_edges(EdgesToSplitContainer& edges_to_split, if(!first_split && new_position == previous_split_position) do_split = false; + // check if the new faces after split will not be degenerate + const Point& p0 = new_position; + Point_ref p1 = get(vpm_T, source(h_to_split, tm_T)); + Point_ref p2 = get(vpm_T, target(next(opposite(h_to_split, tm_T), tm_T), tm_T)); + Point_ref p3 = get(vpm_T, target(h_to_split, tm_T)); + + /* Chooses the diagonal that will split the quad in two triangles that maximizes + * the scalar product of the un-normalized normals of the two triangles. + * + * The lengths of the un-normalized normals (computed using cross-products of two vectors) + * are proportional to the area of the triangles. + * Maximizing the scalar product of the two normals will avoid skinny triangles, + * and will also take into account the cosine of the angle between the two normals. + * + * In particular, if the two triangles are oriented in different directions, + * the scalar product will be negative. + */ + auto p1p3 = CGAL::cross_product(p2-p1, p3-p2) * CGAL::cross_product(p0-p3, p1-p0); + auto p0p2 = CGAL::cross_product(p1-p0, p1-p2) * CGAL::cross_product(p3-p2, p3-p0); + bool first_split_face = (p0p2 > p1p3); + + if(first_split_face) + { + if(p0p2 <= 0 || collinear(p0,p1,p2) || collinear(p0,p2,p3)) + do_split = false; + } + else + { + if(p1p3 <= 0 || collinear(p0,p1,p3) || collinear(p1,p2,p3)) + do_split = false; + } + + if(do_split && !is_source_mesh_fixed) + { + for(halfedge_descriptor h : halfedges_around_target(splitter_v, tm_S)) + { + if(!is_border(h,tm_S) && collinear(get(vpm_S, source(h,tm_S)), new_position, get(vpm_S, target(next(h,tm_S),tm_S)))) + { + do_split = false; + break; + } + } + + if(do_split) + put(vpm_S, splitter_v, new_position); + } + #ifdef CGAL_PMP_SNAP_DEBUG_PP std::cout << " -.-.-. Splitting " << edge(h_to_split, tm_T) << " |||| " << " Vs " << source(h_to_split, tm_T) << " (" << tm_T.point(source(h_to_split, tm_T)) << ")" << " --- Vt " << target(h_to_split, tm_T) << " (" << tm_T.point(target(h_to_split, tm_T)) << ")" << std::endl; - std::cout << "With point: " << vnp.second << std::endl; + std::cout << "With point: " << new_position << " (init: " << vnp.second << ")" << std::endl; std::cout << "Actually split? " << do_split << std::endl; #endif @@ -715,75 +799,27 @@ std::size_t split_edges(EdgesToSplitContainer& edges_to_split, visitor.after_vertex_edge_snap(new_v, tm_T); } - - if(!is_source_mesh_fixed) - put(vpm_S, splitter_v, new_position); + else + { + continue; + } first_split = false; previous_split_position = new_position; ++snapped_n; - // Everything below is choosing the diagonal to triangulate the quad formed by the edge split - // So, it's only relevant if splitting has been performed - if(!do_split) - continue; - - /* new_p - * / \ - * res / \ h_to_split - * / \ - * / \ - * left right - * | / - * | / - * | / - * | / - * | / - * | / - * opp - */ - - const halfedge_descriptor res = prev(h_to_split, tm_T); - const Point_ref left_pt = get(vpm_T, source(res, tm_T)); - const Point_ref right_pt = get(vpm_T, target(h_to_split, tm_T)); - const Point_ref opp = get(vpm_T, target(next(opposite(res, tm_T), tm_T), tm_T)); - - // Check if 'p' is "visible" from 'opp' (i.e. its projection on the plane 'Pl(left, opp, right)' - // falls in the cone with apex 'opp' and sides given by 'left' and 'right') - const Vector n = gt.construct_orthogonal_vector_3_object()(right_pt, left_pt, opp); - const Point trans_left_pt = gt.construct_translated_point_3_object()(left_pt, n); - const Point trans_right_pt = gt.construct_translated_point_3_object()(right_pt, n); - - const Point_ref new_p = get(vpm_T, new_v); - const bool left_of_left = (gt.orientation_3_object()(trans_left_pt, left_pt, opp, new_p) == CGAL::POSITIVE); - const bool right_of_right = (gt.orientation_3_object()(right_pt, trans_right_pt, opp, new_p) == CGAL::POSITIVE); - - const bool is_visible = (!left_of_left && !right_of_right); - -#ifdef CGAL_PMP_SNAP_DEBUG_PP - std::cout << "Left/Right: " << left_of_left << " " << right_of_right << std::endl; - std::cout << "visible from " << opp << " ? " << is_visible << std::endl; -#endif - - // h_to_split is equal to 'next(res)' after splitting - const halfedge_descriptor h_to_split_opp = opposite(h_to_split, tm_T); - - if(is_visible) - { - halfedge_descriptor h2 = prev(prev(h_to_split_opp, tm_T), tm_T); - halfedge_descriptor new_hd = CGAL::Euler::split_face(h_to_split_opp, - h2, tm_T); - h_to_split = opposite(prev(new_hd, tm_T), tm_T); - visitor.after_split_face(h_to_split_opp, h2, tm_T); - } + halfedge_descriptor v0, v1, v2, v3; + v0 = opposite(h_to_split, tm_T); + v1 = next(v0, tm_T); + v2 = next(v1, tm_T); + v3 = next(v2, tm_T); + // halfedge_descriptor new_hd = + first_split_face ? CGAL::Euler::split_face(v0, v2, tm_T) + : CGAL::Euler::split_face(v1, v3, tm_T); + if(first_split_face) + visitor.after_split_face(v0, v2, tm_T); else - { - halfedge_descriptor h2 = prev(h_to_split_opp, tm_T); - halfedge_descriptor new_hd = CGAL::Euler::split_face(opposite(res, tm_T), - h2, tm_T); - h_to_split = opposite(next(new_hd, tm_T), tm_T); - visitor.after_split_face(opposite(res, tm_T), h2, tm_T); - } + visitor.after_split_face(v1, v3, tm_T); } } @@ -925,7 +961,7 @@ std::size_t snap_non_conformal_one_way(const HalfedgeRange& halfedge_range_S, #endif #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else // CGAL_LINKED_WITH_TBB if(std::is_convertible::value) @@ -1009,7 +1045,7 @@ std::size_t snap_non_conformal_one_way(const HalfedgeRange& halfedge_range_S, } } -// \ingroup PMP_repairing_grp +// \ingroup PMP_geometric_repair_grp // // Attempts to snap the vertices in `halfedge_range_A` onto edges of `halfedge_range_B`, and reciprocally. // A vertex from the first range is only snapped to an edge of the second range if the distance to @@ -1406,6 +1442,8 @@ std::size_t snap_borders(TriangleMesh& tm, true /*self snapping*/, np, np); } +//TODO:add an option to preserve orientation? + } // end namespace experimental } // end namespace Polygon_mesh_processing } // end namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h index 8cb70ab8..0584c7d5 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h $ -// $Id: snap_vertices.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include @@ -99,7 +99,7 @@ struct Snapping_pair #ifdef CGAL_LINKED_WITH_TBB // Functor that forwards the pair of the two intersecting boxes // Note that Box_intersection_d does a lot of copies of the callback functor, but we are passing it -// with std::ref, so is always refering to the same reporter object (and importantly, the same counter) +// with std::ref, so is always referring to the same reporter object (and importantly, the same counter) template struct Intersecting_boxes_pairs_parallel_report { @@ -371,7 +371,7 @@ void find_vertex_vertex_matches_with_kd_tree(Unique_positions& unique_positions_ tree.insert(unique_positions_Bv.begin(), unique_positions_Bv.end()); #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else // parallel @@ -596,7 +596,7 @@ void find_vertex_vertex_matches_with_box_d(const Unique_positions& unique_positi boxes_B_ptr.push_back(&b); #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else // CGAL_LINKED_WITH_TBB if(std::is_convertible::value) @@ -611,7 +611,7 @@ void find_vertex_vertex_matches_with_box_d(const Unique_positions& unique_positi // Shenanigans to pass a reference as callback (which is copied by value by 'box_intersection_d') std::function callback(std::ref(box_callback)); - // Grab the boxes that are interesecting but don't do any extra filtering (in parallel) + // Grab the boxes that are intersecting but don't do any extra filtering (in parallel) CGAL::box_intersection_d(boxes_A_ptr.begin(), boxes_A_ptr.end(), boxes_B_ptr.begin(), boxes_B_ptr.end(), callback); @@ -706,6 +706,7 @@ std::size_t snap_vertices_two_way(const HalfedgeRange_A& halfedge_range_A, typedef typename GetGeomTraits::type GT; typedef typename GT::FT FT; typedef typename boost::property_traits::value_type Point; + typedef typename boost::property_traits::reference Point_ref; typedef std::vector Vertex_container; typedef std::pair Unique_vertex; @@ -729,7 +730,7 @@ std::size_t snap_vertices_two_way(const HalfedgeRange_A& halfedge_range_A, using parameters::get_parameter; using parameters::get_parameter_reference; - CGAL_static_assertion((std::is_same::value)); + static_assert(std::is_same::value); GT gt = choose_parameter(get_parameter(np_A, internal_np::geom_traits)); VPM_A vpm_A = choose_parameter(get_parameter(np_A, internal_np::vertex_point), @@ -955,8 +956,23 @@ std::size_t snap_vertices_two_way(const HalfedgeRange_A& halfedge_range_A, { if(is_second_mesh_fixed) { + const Point_ref new_p = get(vpm_B, vb); for(const halfedge_descriptor ha : vs_a) - put(vpm_A, target(ha, tm_A), get(vpm_B, vb)); + { + bool skip = false; + for(halfedge_descriptor haa : halfedges_around_target(ha, tm_A)) + { + if(!is_border(haa,tm_A) && + collinear(get(vpm_A, source(haa,tm_A)), new_p, get(vpm_A, target(next(haa,tm_A),tm_A)))) + { + skip = true; + break; + } + } + + if(!skip) + put(vpm_A, target(ha, tm_A), new_p); + } } else { @@ -972,12 +988,40 @@ std::size_t snap_vertices_two_way(const HalfedgeRange_A& halfedge_range_A, #endif for(const halfedge_descriptor ha : vs_a) - put(vpm_A, target(ha, tm_A), new_p); + { + bool skip = false; + for(halfedge_descriptor haa : halfedges_around_target(ha, tm_A)) + { + if(!is_border(haa,tm_A) && + collinear(get(vpm_A, source(haa,tm_A)), new_p, get(vpm_A, target(next(haa,tm_A),tm_A)))) + { + skip = true; + break; + } + } + + if(!skip) + put(vpm_A, target(ha, tm_A), new_p); + } for(const halfedge_descriptor hb : vs_b) - put(vpm_B, target(hb, tm_B), new_p); - } + { + bool skip = false; + for(halfedge_descriptor hbb : halfedges_around_target(hb, tm_B)) + { + if(!is_border(hbb,tm_B) && + collinear(get(vpm_B, source(hbb,tm_B)), new_p, get(vpm_B, target(next(hbb,tm_B),tm_B)))) + { + skip = true; + break; + } + } + if(!skip) + put(vpm_B, target(hb, tm_B), new_p); + } + } + //TODO: the counter shall depend on skip? ++counter; } @@ -1029,7 +1073,7 @@ std::size_t snap_vertices_two_way(const HalfedgeRange_A& halfedge_range_A, const vertex_descriptor va = target(ha, tm_A); const vertex_descriptor vb = target(hb, tm_B); - // The two folloing halfedges might not be in the range to snap, but it doesn't matter + // The two following halfedges might not be in the range to snap, but it doesn't matter const halfedge_descriptor nha = next(ha, tm_A); const halfedge_descriptor nhb = next(hb, tm_B); const bool is_stitchable_left = gt.equal_3_object()(get(vpm_A, source(ha, tm_A)), @@ -1140,7 +1184,7 @@ std::size_t snap_vertices_two_way(const HalfedgeRange_A& halfedge_range_A, namespace experimental { -// \ingroup PMP_repairing_grp +// \ingroup PMP_geometric_repair_grp // // Attempts to snap the vertices in `halfedge_range_A` and `halfedge_range_B`. // A vertex from the first range and a vertex from the second range are only snapped diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/do_no_use_CDT2.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/do_no_use_CDT2.h index 9b6603a8..96afadff 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/do_no_use_CDT2.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/do_no_use_CDT2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/do_no_use_CDT2.h $ -// $Id: do_no_use_CDT2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/do_no_use_CDT2.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/do_no_use_CDT2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h index a3a3d6e0..cde54c55 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h $ -// $Id: fair_impl.h 625848e 2021-10-04T13:21:47+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/fair_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -76,7 +76,7 @@ class Fair_Polyhedron_3 { vertex_descriptor v, int row_id, // which row to insert in [ frees stay left-hand side ] Solver_matrix& matrix, - double& x, double& y, double& z, // constants transfered to right-hand side + double& x, double& y, double& z, // constants transferred to right-hand side double multiplier, const std::map& vertex_id_map, unsigned int depth) @@ -122,8 +122,8 @@ class Fair_Polyhedron_3 { return false; } - std::set interior_vertices(boost::begin(vertices), - boost::end(vertices)); + std::set interior_vertices(std::begin(vertices), + std::end(vertices)); if(interior_vertices.empty()) { return true; } #ifdef CGAL_PMP_FAIR_DEBUG diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/mesh_to_point_set_hausdorff_distance.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/mesh_to_point_set_hausdorff_distance.h index 3c29f881..c31ee403 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/mesh_to_point_set_hausdorff_distance.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/mesh_to_point_set_hausdorff_distance.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/mesh_to_point_set_hausdorff_distance.h $ -// $Id: mesh_to_point_set_hausdorff_distance.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/mesh_to_point_set_hausdorff_distance.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/mesh_to_point_set_hausdorff_distance.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h index 74a22686..17116f4b 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h $ -// $Id: refine_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/refine_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -15,12 +15,6 @@ #include - -#include -#include -#include -#include - #include #ifdef CGAL_PMP_FAIR_DEBUG #include @@ -30,8 +24,14 @@ #include #include #include +#include #include +#include +#include +#include +#include + namespace CGAL { namespace Polygon_mesh_processing { @@ -42,6 +42,8 @@ template class Refine_Polyhedron_3 { //// typedefs typedef typename boost::property_traits::value_type Point_3; + typedef typename boost::property_traits::reference Point_3_ref; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::face_descriptor face_descriptor; @@ -49,15 +51,28 @@ class Refine_Polyhedron_3 { typedef Halfedge_around_face_circulator Halfedge_around_facet_circulator; typedef Halfedge_around_target_circulator Halfedge_around_vertex_circulator; + typedef typename CGAL::Kernel_traits::type Traits; + private: PolygonMesh& pmesh; VertexPointMap vpmap; + Traits traits = {}; - bool flippable(halfedge_descriptor h) { + bool flippable(halfedge_descriptor h) + { // this check is added so that edge flip does not break manifoldness // it might happen when there is an edge where flip_edge(h) will be placed (i.e. two edges collide after flip) vertex_descriptor v_tip_0 = target(next(h,pmesh),pmesh); vertex_descriptor v_tip_1 = target(next(opposite(h,pmesh),pmesh),pmesh); + +#ifdef CGAL_PMP_REFINE_DEBUG_PP + std::cout << "flippable() " << h << std::endl; + std::cout << "\t" << source(h, pmesh) << ": " << pmesh.point(source(h, pmesh)) << std::endl; + std::cout << "\t" << target(h, pmesh) << ": " << pmesh.point(target(h, pmesh)) << std::endl; + std::cout << "\t" << v_tip_0 << ": " << pmesh.point(v_tip_0) << std::endl; + std::cout << "\t" << v_tip_1 << ": " << pmesh.point(v_tip_1) << std::endl; +#endif + Halfedge_around_vertex_circulator v_cir(next(h,pmesh), pmesh), v_end(v_cir); do { if(target(opposite(*v_cir, pmesh),pmesh) == v_tip_1) { return false; } @@ -74,13 +89,20 @@ class Refine_Polyhedron_3 { bool relax(halfedge_descriptor h) { - typedef typename boost::property_traits::reference Point_3_ref; - Point_3_ref p = get(vpmap, target(h,pmesh)); - Point_3_ref q = get(vpmap, target(opposite(h,pmesh),pmesh)); +#ifdef CGAL_PMP_REFINE_DEBUG_PP + Point_3_ref p = get(vpmap, source(h,pmesh)); + Point_3_ref q = get(vpmap, target(h,pmesh)); Point_3_ref r = get(vpmap, target(next(h,pmesh),pmesh)); Point_3_ref s = get(vpmap, target(next(opposite(h,pmesh),pmesh),pmesh)); - if( (CGAL::ON_UNBOUNDED_SIDE != CGAL::side_of_bounded_sphere(p,q,r,s)) || - (CGAL::ON_UNBOUNDED_SIDE != CGAL::side_of_bounded_sphere(p,q,s,r)) ) + + std::cout << "relax() " << h << std::endl; + std::cout << "\t" << source(h, pmesh) << ": " << p << std::endl; + std::cout << "\t" << target(h, pmesh) << ": " << q << std::endl; + std::cout << "\t" << target(next(h,pmesh),pmesh) << ": " << r << std::endl; + std::cout << "\t" << target(next(opposite(h,pmesh),pmesh),pmesh) << ": " << s << std::endl; +#endif + + if(internal::should_flip(edge(h, pmesh), pmesh, vpmap, traits)) { if(flippable(h)) { Euler::flip_edge(h,pmesh); @@ -103,7 +125,7 @@ class Refine_Polyhedron_3 { { for(face_descriptor fd : faces) { - CGAL_assertion(fd != boost::graph_traits::null_face()); + CGAL_assertion(is_valid_face_descriptor(fd, pmesh)); vertex_descriptor vi = target(halfedge(fd,pmesh),pmesh); vertex_descriptor vj = target(next(halfedge(fd,pmesh),pmesh),pmesh); @@ -206,7 +228,7 @@ class Refine_Polyhedron_3 { const std::set& interior_map, bool accept_internal_facets) { - const Point_3& vp = get(vpmap, vh); + const Point_3_ref vp = get(vpmap, vh); Halfedge_around_target_circulator circ(halfedge(vh,pmesh),pmesh), done(circ); int deg = 0; double sum = 0; @@ -218,7 +240,7 @@ class Refine_Polyhedron_3 { { continue; } // which means current edge is an interior edge and should not be included in scale attribute calculation } - const Point_3& vq = get(vpmap, target(opposite(*circ,pmesh),pmesh)); + const Point_3_ref vq = get(vpmap, target(opposite(*circ,pmesh),pmesh)); sum += to_double(CGAL::approximate_sqrt(CGAL::squared_distance(vp, vq))); ++deg; } while(++circ != done); @@ -238,8 +260,7 @@ class Refine_Polyhedron_3 { Halfedge_around_face_circulator circ(halfedge(fd,pmesh),pmesh), done(circ); do { vertex_descriptor v = target(*circ,pmesh); - std::pair::iterator, bool> v_insert - = scale_attribute.insert(std::make_pair(v, 0)); + auto v_insert = scale_attribute.emplace(v, 0); if(!v_insert.second) { continue; } // already calculated v_insert.first->second = average_length(v, interior_map, accept_internal_facets); } while(++circ != done); @@ -285,7 +306,7 @@ class Refine_Polyhedron_3 { double alpha) { // do not use just std::set, the order effects the output (for the same input we want to get same output) - std::set interior_map(boost::begin(faces), boost::end(faces)); + std::set interior_map(std::begin(faces), std::end(faces)); // store boundary edges - to be used in relax std::set border_edges; @@ -304,7 +325,7 @@ class Refine_Polyhedron_3 { std::map scale_attribute; calculate_scale_attribute(faces, interior_map, scale_attribute, accept_internal_facets); - std::vector all_faces(boost::begin(faces), boost::end(faces)); + std::vector all_faces(std::begin(faces), std::end(faces)); #ifdef CGAL_PMP_REFINE_DEBUG CGAL::Timer total_timer; total_timer.start(); #endif diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/repair_extra.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/repair_extra.h index dca80c10..3d877921 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/repair_extra.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/repair_extra.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/repair_extra.h $ -// $Id: repair_extra.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/repair_extra.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/repair_extra.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/simplify_polyline.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/simplify_polyline.h index 9c5c643c..9f731669 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/simplify_polyline.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/internal/simplify_polyline.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/simplify_polyline.h $ -// $Id: simplify_polyline.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/simplify_polyline.h $ +// $Id: include/CGAL/Polygon_mesh_processing/internal/simplify_polyline.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -103,7 +103,7 @@ void simplify_polyline(const PointRangeIn& input, ++ei; // we skip ei-1 else { - bi=ei-1; // ei-1 shall not be skipt + bi=ei-1; // ei-1 shall not be skipped break; } } @@ -178,7 +178,7 @@ void simplify_polyline(const PointRangeIn& input, output.push_back(input[i]); put(out_pm, output.back(), get(in_pm, input[i])); } - //TODO if is_closed-==true, shall we add en extra step to see if we can remove output.front() and output[output.size()-2] (inital endpoints) + //TODO if is_closed-==true, shall we add en extra step to see if we can remove output.front() and output[output.size()-2] (initial endpoints) } } } diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/interpolated_corrected_curvatures.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/interpolated_corrected_curvatures.h new file mode 100644 index 00000000..020f7bcf --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/interpolated_corrected_curvatures.h @@ -0,0 +1,1193 @@ +// Copyright (c) 2022 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/interpolated_corrected_curvatures.h $ +// $Id: include/CGAL/Polygon_mesh_processing/interpolated_corrected_curvatures.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Hossam Saeed +// + +#ifndef CGAL_POLYGON_MESH_PROCESSING_INTERPOLATED_CORRECTED_CURVATURES_H +#define CGAL_POLYGON_MESH_PROCESSING_INTERPOLATED_CORRECTED_CURVATURES_H + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace CGAL { + +namespace Polygon_mesh_processing { + +/** + * \ingroup PMP_corrected_curvatures_grp + * + * \brief a struct for storing principal curvatures and directions. + * + * @tparam GT is the geometric traits class, model of `Kernel`. +*/ +template +struct Principal_curvatures_and_directions { + + /// min curvature magnitude + typename GT::FT min_curvature; + + /// max curvature magnitude + typename GT::FT max_curvature; + + /// min curvature direction vector + typename GT::Vector_3 min_direction; + + /// max curvature direction vector + typename GT::Vector_3 max_direction; + + Principal_curvatures_and_directions() { + min_curvature = 0; + max_curvature = 0; + min_direction = typename GT::Vector_3(0, 0, 0); + max_direction = typename GT::Vector_3(0, 0, 0); + } + + Principal_curvatures_and_directions( + typename GT::FT min_curvature, + typename GT::FT max_curvature, + typename GT::Vector_3 min_direction, + typename GT::Vector_3 max_direction + ) { + this->min_curvature = min_curvature; + this->max_curvature = max_curvature; + this->min_direction = min_direction; + this->max_direction = max_direction; + } +}; + +namespace internal { + +template +typename GT::FT average_edge_length(const PolygonMesh& pmesh) { + const std::size_t n = edges(pmesh).size(); + if (n == 0) + return 0; + + typename GT::FT avg_edge_length = 0; + for (auto e : edges(pmesh)) + avg_edge_length += edge_length(e, pmesh); + + avg_edge_length /= static_cast(n); + return avg_edge_length; +} + +template +struct Vertex_measures { + typename GT::FT area_measure = 0; + typename GT::FT mean_curvature_measure = 0; + typename GT::FT gaussian_curvature_measure = 0; + std::array anisotropic_measure = { 0, 0, 0, + 0, 0, 0, + 0, 0, 0 }; +}; + +template +typename GT::FT interpolated_corrected_area_measure_face(const std::vector& u, + const std::vector& x) +{ + const std::size_t n = x.size(); + CGAL_precondition(u.size() == n); + CGAL_precondition(n >= 3); + + typename GT::Construct_cross_product_vector_3 cross_product; + + // Triangle: use triangle formula + if (n == 3) + { + const typename GT::Vector_3 um = (u[0] + u[1] + u[2]) / 3.0; + return 0.5 * um * cross_product(x[1] - x[0], x[2] - x[0]); + } + // Quad: use the bilinear interpolation formula + else if (n == 4) + { + // for the formulas below, values of verices 2 & 3 are swapped (compared to paper) to correct order. + // the indices in paper vs in here are: 00 = 0, 10 = 1, 11 = 2, 01 = 3 + return (1.0 / 36.0) * ( + (4 * u[0] + 2 * u[1] + 2 * u[3] + u[2]) * cross_product(x[1] - x[0], x[3] - x[0]) + + (2 * u[0] + 4 * u[1] + u[3] + 2 * u[2]) * cross_product(x[1] - x[0], x[2] - x[1]) + + (2 * u[0] + u[1] + 4 * u[3] + 2 * u[2]) * cross_product(x[2] - x[3], x[3] - x[0]) + + (u[0] + 2 * u[1] + 2 * u[3] + 4 * u[2]) * cross_product(x[2] - x[3], x[2] - x[1]) + ); + } + // N-gon: split into n triangles by polygon center and use triangle formula for each + else + { + typename GT::FT mu0 = 0; + + // getting center of points + typename GT::Vector_3 xc = + std::accumulate(x.begin(), x.end(), typename GT::Vector_3(0, 0, 0)); + xc /= static_cast(n); + + // getting unit average normal of points + typename GT::Vector_3 uc = + std::accumulate(u.begin(), u.end(), typename GT::Vector_3(0, 0, 0)); + uc /= sqrt(uc * uc); + + // summing each triangle's measure after triangulation by barycenter split. + for (std::size_t i = 0; i < n; i++) + { + mu0 += interpolated_corrected_area_measure_face( + std::vector {u[i], u[(i + 1) % n], uc}, + std::vector {x[i], x[(i + 1) % n], xc} + ); + } + return mu0; + } +} + +template +typename GT::FT interpolated_corrected_mean_curvature_measure_face(const std::vector& u, + const std::vector& x) +{ + const std::size_t n = x.size(); + CGAL_precondition(u.size() == n); + CGAL_precondition(n >= 3); + + typename GT::Construct_cross_product_vector_3 cross_product; + + // Triangle: use triangle formula + if (n == 3) + { + const typename GT::Vector_3 um = (u[0] + u[1] + u[2]) / 3.0; + + return 0.5 * um * (cross_product(u[2] - u[1], x[0]) + + cross_product(u[0] - u[2], x[1]) + + cross_product(u[1] - u[0], x[2])); + } + // Quad: use the bilinear interpolation formula + else if (n == 4) + { + // for the formulas below, values of verices 2 & 3 are swapped (compared to paper) to correct order. + // the indices in paper vs in here are: 00 = 0, 10 = 1, 11 = 2, 01 = 3 + + const typename GT::Vector_3 u02 = u[2] - u[0]; + const typename GT::Vector_3 u13 = u[3] - u[1]; + const typename GT::Vector_3 x0_cross = cross_product(u13, x[0]); + const typename GT::Vector_3 x1_cross = -cross_product(u02, x[1]); + const typename GT::Vector_3 x3_cross = cross_product(u02, x[3]); + const typename GT::Vector_3 x2_cross = -cross_product(u13, x[2]); + + return (1.0 / 12.0) * ( + u[0] * (2 * x0_cross - cross_product((u[3] + u[2]), x[1]) + cross_product((u[1] + u[2]), x[3]) + x2_cross) + + u[1] * (cross_product((u[3] + u[2]), x[0]) + 2 * x1_cross + x3_cross - cross_product((u[0] + u[3]), x[2])) + + u[3] * (-cross_product((u[1] + u[2]), x[0]) + x1_cross + 2 * x3_cross + cross_product((u[0] + u[1]), x[2])) + + u[2] * (x0_cross + cross_product((u[0] + u[3]), x[1]) - cross_product((u[0] + u[1]), x[3]) + 2 * x2_cross) + ); + } + // N-gon: split into n triangles by polygon center and use triangle formula for each + else + { + typename GT::FT mu1 = 0; + + // getting center of points + typename GT::Vector_3 xc = + std::accumulate(x.begin(), x.end(), typename GT::Vector_3(0, 0, 0)); + xc /= static_cast(n); + + // getting unit average normal of points + typename GT::Vector_3 uc = + std::accumulate(u.begin(), u.end(), typename GT::Vector_3(0, 0, 0)); + uc /= sqrt(uc * uc); + + // summing each triangle's measure after triangulation by barycenter split. + for (std::size_t i = 0; i < n; i++) + { + mu1 += interpolated_corrected_mean_curvature_measure_face( + std::vector {u[i], u[(i + 1) % n], uc}, + std::vector {x[i], x[(i + 1) % n], xc} + ); + } + return mu1; + } +} + +template +typename GT::FT interpolated_corrected_Gaussian_curvature_measure_face(const std::vector& u) +{ + const std::size_t n = u.size(); + CGAL_precondition(n >= 3); + + typename GT::Construct_cross_product_vector_3 cross_product; + + // Triangle: use triangle formula + if (n == 3) + { + return 0.5 * u[0] * cross_product(u[1], u[2]); + } + // Quad: use the bilinear interpolation formula + else if (n == 4) + { + // for the formulas below, values of verices 2 & 3 are swapped (compared to paper) to correct order. + // the indices in paper vs in here are: 00 = 0, 10 = 1, 11 = 2, 01 = 3 + return (1.0 / 36.0) * ( + (4 * u[0] + 2 * u[1] + 2 * u[3] + u[2]) * cross_product(u[1] - u[0], u[3] - u[0]) + + (2 * u[0] + 4 * u[1] + u[3] + 2 * u[2]) * cross_product(u[1] - u[0], u[2] - u[1]) + + (2 * u[0] + u[1] + 4 * u[3] + 2 * u[2]) * cross_product(u[2] - u[3], u[3] - u[0]) + + (u[0] + 2 * u[1] + 2 * u[3] + 4 * u[2]) * cross_product(u[2] - u[3], u[2] - u[1]) + ); + } + // N-gon: split into n triangles by polygon center and use triangle formula for each + else + { + typename GT::FT mu2 = 0; + + // getting unit average normal of points + typename GT::Vector_3 uc = + std::accumulate(u.begin(), u.end(), typename GT::Vector_3(0, 0, 0)); + uc /= sqrt(uc * uc); + + // summing each triangle's measure after triangulation by barycenter split. + for (std::size_t i = 0; i < n; i++) + { + mu2 += interpolated_corrected_Gaussian_curvature_measure_face( + std::vector {u[i], u[(i + 1) % n], uc} + ); + } + return mu2; + } +} + +template +std::array interpolated_corrected_anisotropic_measure_face(const std::vector& u, + const std::vector& x) +{ + const std::size_t n = x.size(); + CGAL_precondition(u.size() == n); + CGAL_precondition(n >= 3); + + typename GT::Construct_cross_product_vector_3 cross_product; + std::array muXY{ 0 }; + + // Triangle: use triangle formula + if (n == 3) + { + const typename GT::Vector_3 u01 = u[1] - u[0]; + const typename GT::Vector_3 u02 = u[2] - u[0]; + const typename GT::Vector_3 x01 = x[1] - x[0]; + const typename GT::Vector_3 x02 = x[2] - x[0]; + const typename GT::Vector_3 um = (u[0] + u[1] + u[2]) / 3.0; + + for (unsigned int ix = 0; ix < 3; ix++) + { + typename GT::Vector_3 X; + if (ix == 0) + X = typename GT::Vector_3(1, 0, 0); + if (ix == 1) + X = typename GT::Vector_3(0, 1, 0); + if (ix == 2) + X = typename GT::Vector_3(0, 0, 1); + + for (unsigned int iy = 0; iy < 3; iy++) + muXY[ix * 3 + iy] = 0.5 * um * (cross_product(u02[iy] * X, x01) - cross_product(u01[iy] * X, x02)); + } + } + // Quad: use the bilinear interpolation formula + else if (n == 4) + { + // for the formulas below, values of verices 2 & 3 are swapped (compared to paper) to correct order. + // the indices in paper vs in here are: 00 = 0, 10 = 1, 11 = 2, 01 = 3 + for (unsigned int ix = 0; ix < 3; ix++) + { + typename GT::Vector_3 X; + if (ix == 0) + X = typename GT::Vector_3(1, 0, 0); + if (ix == 1) + X = typename GT::Vector_3(0, 1, 0); + if (ix == 2) + X = typename GT::Vector_3(0, 0, 1); + + const typename GT::Vector_3 u0xX = cross_product(u[0], X); + const typename GT::Vector_3 u1xX = cross_product(u[1], X); + const typename GT::Vector_3 u2xX = cross_product(u[2], X); + const typename GT::Vector_3 u3xX = cross_product(u[3], X); + + for (unsigned int iy = 0; iy < 3; iy++) + muXY[ix * 3 + iy] = (1.0 / 72.0) * ( + + u[0][iy] * (u0xX * (-x[0] - 11 * x[1] + 13 * x[3] - x[2]) + + u1xX * (-5 * x[0] - 7 * x[1] + 11 * x[3] + x[2]) + + u3xX * (x[0] - 7 * x[1] + 11 * x[3] - 5 * x[2]) + + u2xX * (-x[0] - 5 * x[1] + 7 * x[3] - x[2]) + ) + + u[1][iy] * (u0xX * (13 * x[0] - x[1] - 7 * x[3] - 5 * x[2]) + + u1xX * (17 * x[0] - 5 * x[1] - 5 * x[3] - 7 * x[2]) + + u3xX * (5 * x[0] + x[1] + x[3] - 7 * x[2]) + + u2xX * (7 * x[0] - x[1] + 5 * x[3] - 11 * x[2]) + ) + + u[2][iy] * (u0xX * (-11 * x[0] + 5 * x[1] - x[3] + 7 * x[2]) + + u1xX * (-7 * x[0] + x[1] + x[3] + 5 * x[2]) + + u3xX * (-7 * x[0] - 5 * x[1] - 5 * x[3] + 17 * x[2]) + + u2xX * (-5 * x[0] - 7 * x[1] - x[3] + 13 * x[2]) + ) + + u[3][iy] * (u0xX * (-x[0] + 7 * x[1] - 5 * x[3] - x[2]) + + u1xX * (-5 * x[0] + 11 * x[1] - 7 * x[3] + x[2]) + + u3xX * (x[0] + 11 * x[1] - 7 * x[3] - 5 * x[2]) + + u2xX * (-x[0] + 13 * x[1] - 11 * x[3] - x[2]) + ) + + ); + } + } + // N-gon: split into n triangles by polygon center and use triangle formula for each + else + { + // getting center of points + typename GT::Vector_3 xc = + std::accumulate(x.begin(), x.end(), typename GT::Vector_3(0, 0, 0)); + xc /= static_cast(n); + + // getting unit average normal of points + typename GT::Vector_3 uc = + std::accumulate(u.begin(), u.end(), typename GT::Vector_3(0, 0, 0)); + uc /= sqrt(uc * uc); + + // summing each triangle's measure after triangulation by barycenter split. + for (std::size_t i = 0; i < n; i++) + { + std::array muXY_curr_triangle = + interpolated_corrected_anisotropic_measure_face( + std::vector {u[i], u[(i + 1) % n], uc}, + std::vector {x[i], x[(i + 1) % n], xc} + ); + + for (std::size_t ix = 0; ix < 3; ix++) + for (std::size_t iy = 0; iy < 3; iy++) + muXY[ix * 3 + iy] += muXY_curr_triangle[ix * 3 + iy]; + } + } + return muXY; +} + +template +typename GT::FT face_in_ball_ratio(const std::vector& x, + const typename GT::FT r, + const typename GT::Vector_3 c) +{ + const std::size_t n = x.size(); + + // getting center of points + typename GT::Vector_3 xm = + std::accumulate(x.begin(), x.end(), typename GT::Vector_3(0, 0, 0)); + xm /= static_cast(n); + + // computing squared distance of furthest and closest point to ball center + typename GT::FT d_min = (xm - c).squared_length(); + typename GT::FT d_max = d_min; + + for (const typename GT::Vector_3 xi : x) + { + const typename GT::FT d_sq = (xi - c).squared_length(); + d_max = (std::max)(d_sq, d_max); + d_min = (std::min)(d_sq, d_min); + } + + // if the furthest point is inside ball, return 1 + if (d_max <= r * r) return 1.0; + // if the closest point is outside ball, return 0 + else if (r * r <= d_min) return 0.0; + + // else, approximate inclusion ratio of the triangle: + d_max = sqrt(d_max); + d_min = sqrt(d_min); + return (r - d_min) / (d_max - d_min); +} + +template +Principal_curvatures_and_directions principal_curvatures_and_directions_from_anisotropic_measures( + const std::array anisotropic_measure, + const typename GT::FT v_mu0, + const typename GT::Vector_3 u_GT, + const typename GT::FT avg_edge_length +) +{ + // putting anisotropic measure in matrix form + Eigen::Matrix v_muXY = Eigen::Matrix::Zero(); + + for (std::size_t ix = 0; ix < 3; ix++) + for (std::size_t iy = 0; iy < 3; iy++) + v_muXY(ix, iy) = anisotropic_measure[ix * 3 + iy]; + + // constant factor K to force the principal direction eigenvectors to be tangential to the surface + Eigen::Matrix u(u_GT.x(), u_GT.y(), u_GT.z()); + const typename GT::FT K = 1000 * avg_edge_length * v_mu0; + + // symmetrizing and adding the constant term + v_muXY = 0.5 * (v_muXY + v_muXY.transpose()) + K * u * u.transpose(); + + + // computing eigenvalues and eigenvectors + Eigen::SelfAdjointEigenSolver> eigensolver; + + eigensolver.computeDirect(v_muXY); + + if (eigensolver.info() != Eigen::Success) + return Principal_curvatures_and_directions(); + + const Eigen::Matrix eig_vals = eigensolver.eigenvalues(); + const Eigen::Matrix eig_vecs = eigensolver.eigenvectors(); + + const typename GT::Vector_3 min_eig_vec(eig_vecs(0, 1), eig_vecs(1, 1), eig_vecs(2, 1)); + const typename GT::Vector_3 max_eig_vec(eig_vecs(0, 0), eig_vecs(1, 0), eig_vecs(2, 0)); + + // returning principal curvatures and directions (with the correct sign) + return Principal_curvatures_and_directions( + (!is_zero(v_mu0)) ? -eig_vals[1] / v_mu0 : 0.0, + (!is_zero(v_mu0)) ? -eig_vals[0] / v_mu0 : 0.0, + min_eig_vec, + max_eig_vec + ); +} + +// measures are computed for faces only if they are adjacent to the vertex +template +Vertex_measures interpolated_corrected_measures_one_vertex_no_radius( + const PolygonMesh& pmesh, + const typename boost::graph_traits::vertex_descriptor v, + const bool is_mean_curvature_selected, + const bool is_Gaussian_curvature_selected, + const bool is_principal_curvatures_and_directions_selected, + const VPM vpm, + const VNM vnm +) +{ + typedef typename boost::graph_traits::face_descriptor face_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename GT::Point_3 Point_3; + typedef typename GT::Vector_3 Vector_3; + typedef typename GT::FT FT; + + Vertex_measures vertex_measures; + + std::vector x; + std::vector u; + + // compute for each face around the vertex (except the null (boundary) face) + for (face_descriptor f : faces_around_target(halfedge(v, pmesh), pmesh)) { + if (f != boost::graph_traits::null_face()) + { + // looping over vertices in face to get point coordinates and normal vectors + for (vertex_descriptor vi : vertices_around_face(halfedge(f, pmesh), pmesh)) + { + const Point_3& pi = get(vpm, vi); + const Vector_3& ui = get(vnm, vi); + x.push_back(Vector_3(pi.x(), pi.y(), pi.z())); + u.push_back(ui); + } + + // compute measures for selected curvatures (area is always computed) + vertex_measures.area_measure += interpolated_corrected_area_measure_face(u, x); + + if (is_mean_curvature_selected) + vertex_measures.mean_curvature_measure += interpolated_corrected_mean_curvature_measure_face(u, x); + + if (is_Gaussian_curvature_selected) + vertex_measures.gaussian_curvature_measure += interpolated_corrected_Gaussian_curvature_measure_face(u); + + if (is_principal_curvatures_and_directions_selected) + { + const std::array face_anisotropic_measure = interpolated_corrected_anisotropic_measure_face(u, x); + for (std::size_t i = 0; i < 3 * 3; i++) + vertex_measures.anisotropic_measure[i] += face_anisotropic_measure[i]; + } + } + + x.clear(); + u.clear(); + } + return vertex_measures; +} + +// measures are computed for faces only if they are in the ball of radius 'radius' centered at the vertex +template +Vertex_measures interpolated_corrected_measures_one_vertex( + const PolygonMesh& pmesh, + const typename boost::graph_traits::vertex_descriptor v, + const typename GT::FT radius, + const bool is_mean_curvature_selected, + const bool is_Gaussian_curvature_selected, + const bool is_principal_curvatures_and_directions_selected, + const VPM vpm, + const VNM vnm +) +{ + typedef typename boost::graph_traits::face_descriptor face_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename GT::Point_3 Point_3; + typedef typename GT::Vector_3 Vector_3; + typedef typename GT::FT FT; + + // the ball expansion is done using a BFS traversal from the vertex + std::queue bfs_queue; + std::unordered_set bfs_visited; + + Vertex_measures vertex_measures; + + const Point_3& vp = get(vpm, v); + Vector_3 c(vp.x(), vp.y(), vp.z()); + + for (face_descriptor f : faces_around_target(halfedge(v, pmesh), pmesh)) { + if (f != boost::graph_traits::null_face()) + { + bfs_queue.push(f); + bfs_visited.insert(f); + } + } + std::vector x; + std::vector u; + while (!bfs_queue.empty()) { + face_descriptor fi = bfs_queue.front(); + bfs_queue.pop(); + + // looping over vertices in face to get point coordinates and normal vectors + for (vertex_descriptor vi : vertices_around_face(halfedge(fi, pmesh), pmesh)) + { + const Point_3& pi = get(vpm, vi); + const Vector_3& ui = get(vnm, vi); + x.push_back(Vector_3(pi.x(), pi.y(), pi.z())); + u.push_back(ui); + } + + // approximate inclusion ratio of the face in the ball + const FT f_ratio = face_in_ball_ratio(x, radius, c); + + // if it is not 0 (not completely outside), compute measures for selected curvatures (area is always computed) + // and add neighboring faces to the bfs queue + if (!is_zero(f_ratio)) + { + vertex_measures.area_measure += f_ratio * interpolated_corrected_area_measure_face(u, x); + + if (is_mean_curvature_selected) + vertex_measures.mean_curvature_measure += f_ratio * interpolated_corrected_mean_curvature_measure_face(u, x); + + if (is_Gaussian_curvature_selected) + vertex_measures.gaussian_curvature_measure += f_ratio * interpolated_corrected_Gaussian_curvature_measure_face(u); + + if (is_principal_curvatures_and_directions_selected) + { + const std::array face_anisotropic_measure = interpolated_corrected_anisotropic_measure_face(u, x); + for (std::size_t i = 0; i < 3 * 3; i++) + vertex_measures.anisotropic_measure[i] += f_ratio * face_anisotropic_measure[i]; + } + + for (face_descriptor fj : faces_around_face(halfedge(fi, pmesh), pmesh)) + { + if (bfs_visited.find(fj) == bfs_visited.end() && fj != boost::graph_traits::null_face()) + { + bfs_queue.push(fj); + bfs_visited.insert(fj); + } + } + } + + x.clear(); + u.clear(); + } + return vertex_measures; +} + +template +void set_value(const T& value, std::reference_wrapper rw) +{ + rw.get()=value; +} + +template +void set_value(const T&, internal_np::Param_not_found) +{} + +// computes selected curvatures for one specific vertex +template +void interpolated_corrected_curvatures_one_vertex( + const PolygonMesh& pmesh, + const typename boost::graph_traits::vertex_descriptor v, + const NamedParameters& np) +{ + typedef typename GetGeomTraits::type GT; + typedef typename GetVertexPointMap::const_type Vertex_position_map; + + typedef dynamic_vertex_property_t Vector_map_tag; + typedef typename boost::property_map::const_type Default_vector_map; + typedef typename internal_np::Lookup_named_param_def::type Vertex_normal_map; + + using parameters::choose_parameter; + using parameters::get_parameter; + using parameters::is_default_parameter; + + Vertex_position_map vpm = choose_parameter(get_parameter(np, CGAL::vertex_point), + get_const_property_map(CGAL::vertex_point, pmesh)); + + Vertex_normal_map vnm = choose_parameter(get_parameter(np, internal_np::vertex_normal_map), + get(Vector_map_tag(), pmesh)); + + // if the normal map is not provided, compute it + if (is_default_parameter::value) + compute_vertex_normals(pmesh, vnm, np); + + // if no radius is given, we pass -1 which will make the expansion be only on the incident faces instead of a ball + typename GT::FT radius = choose_parameter(get_parameter(np, internal_np::ball_radius), -1); + + // calculate avg_edge_length as it is used in case radius is 0, and in the principal curvature computation later + typename GT::FT avg_edge_length = average_edge_length(pmesh); + + // if the radius is 0, we use a small epsilon to expand the ball (scaled with the average edge length) + if (is_zero(radius)) + radius = avg_edge_length * 1e-6; + + // determine which curvatures are selected + const bool is_mean_curvature_selected = !is_default_parameter::value; + const bool is_Gaussian_curvature_selected = !is_default_parameter::value; + const bool is_principal_curvatures_and_directions_selected = !is_default_parameter::value; + + Vertex_measures vertex_measures; + + // if the radius is negative, we do not expand the ball (only the incident faces) + if (is_negative(radius)) + { + vertex_measures = interpolated_corrected_measures_one_vertex_no_radius( + pmesh, + v, + is_mean_curvature_selected, + is_Gaussian_curvature_selected, + is_principal_curvatures_and_directions_selected, + vpm, + vnm + ); + } + else + { + vertex_measures = interpolated_corrected_measures_one_vertex( + pmesh, + v, + radius, + is_mean_curvature_selected, + is_Gaussian_curvature_selected, + is_principal_curvatures_and_directions_selected, + vpm, + vnm + ); + } + + // compute the selected curvatures from expanded measures + if (is_mean_curvature_selected) { + set_value(!is_zero(vertex_measures.area_measure) ? 0.5 * vertex_measures.mean_curvature_measure / vertex_measures.area_measure : 0, + get_parameter(np, internal_np::vertex_mean_curvature)); + } + + if (is_Gaussian_curvature_selected) { + set_value(!is_zero(vertex_measures.area_measure) ? vertex_measures.gaussian_curvature_measure / vertex_measures.area_measure : 0, + get_parameter(np, internal_np::vertex_Gaussian_curvature)); + } + + if (is_principal_curvatures_and_directions_selected) { + // compute the principal curvatures and directions from the anisotropic measures + const typename GT::Vector_3& v_normal = get(vnm, v); + const Principal_curvatures_and_directions principal_curvatures_and_directions = principal_curvatures_and_directions_from_anisotropic_measures( + vertex_measures.anisotropic_measure, + vertex_measures.area_measure, + v_normal, + avg_edge_length + ); + set_value(principal_curvatures_and_directions, get_parameter(np, internal_np::vertex_principal_curvatures_and_directions)); + } +} + + +template +class Interpolated_corrected_curvatures_computer +{ + typedef typename GetGeomTraits::type GT; + + typedef typename GT::FT FT; + typedef typename GT::Point_3 Point_3; + typedef typename GT::Vector_3 Vector_3; + + typedef typename boost::graph_traits::halfedge_descriptor Halfedge_descriptor; + typedef typename boost::graph_traits::edge_descriptor Edge_descriptor; + typedef typename boost::graph_traits::face_descriptor face_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + + typedef typename GetVertexPointMap::const_type Vertex_position_map; + + typedef dynamic_vertex_property_t Vector_map_tag; + typedef typename boost::property_map::const_type Default_vector_map; + typedef typename internal_np::Lookup_named_param_def::type Vertex_normal_map; + + typedef Constant_property_map Default_scalar_map; + typedef typename internal_np::Lookup_named_param_def::type Vertex_mean_curvature_map; + + typedef typename internal_np::Lookup_named_param_def::type Vertex_Gaussian_curvature_map; + + typedef Constant_property_map> Default_principal_map; + typedef typename internal_np::Lookup_named_param_def::type Vertex_principal_curvatures_and_directions_map; + + typedef typename boost::property_map>::const_type Face_scalar_measure_map; + typedef typename boost::property_map>>::const_type Face_anisotropic_measure_map; + +private: + const PolygonMesh& pmesh; + Vertex_position_map vpm; + Vertex_normal_map vnm; + FT ball_radius; + FT avg_edge_length; + + bool is_mean_curvature_selected; + bool is_Gaussian_curvature_selected; + bool is_principal_curvatures_and_directions_selected; + + Vertex_mean_curvature_map mean_curvature_map; + Vertex_Gaussian_curvature_map gaussian_curvature_map; + Vertex_principal_curvatures_and_directions_map principal_curvatures_and_directions_map; + + Face_scalar_measure_map mu0_map, mu1_map, mu2_map; + Face_anisotropic_measure_map muXY_map; + + void set_property_maps() { + mu0_map = get(CGAL::dynamic_face_property_t(), pmesh); + mu1_map = get(CGAL::dynamic_face_property_t(), pmesh); + mu2_map = get(CGAL::dynamic_face_property_t(), pmesh); + muXY_map = get(CGAL::dynamic_face_property_t>(), pmesh); + } + + void set_named_params(const NamedParameters& np) + { + using parameters::choose_parameter; + using parameters::get_parameter; + using parameters::is_default_parameter; + + vpm = choose_parameter(get_parameter(np, CGAL::vertex_point), + get_const_property_map(CGAL::vertex_point, pmesh)); + + vnm = choose_parameter(get_parameter(np, internal_np::vertex_normal_map), + get(Vector_map_tag(), pmesh)); + + // if no normal map is given, compute normals + if (is_default_parameter::value) + compute_vertex_normals(pmesh, vnm, np); + + // if no radius is given, we pass -1 which will make the expansion be only on the incident faces instead of a ball + const FT radius = choose_parameter(get_parameter(np, internal_np::ball_radius), -1); + avg_edge_length = average_edge_length(pmesh); + set_ball_radius(radius); + + // check which curvature maps are provided by the user (determines which curvatures are computed) + is_mean_curvature_selected = !is_default_parameter::value; + is_Gaussian_curvature_selected = !is_default_parameter::value; + is_principal_curvatures_and_directions_selected = !is_default_parameter::value; + + mean_curvature_map = choose_parameter(get_parameter(np, internal_np::vertex_mean_curvature_map), Default_scalar_map()); + gaussian_curvature_map = choose_parameter(get_parameter(np, internal_np::vertex_Gaussian_curvature_map), Default_scalar_map()); + principal_curvatures_and_directions_map = choose_parameter(get_parameter(np, internal_np::vertex_principal_curvatures_and_directions_map), Default_principal_map()); + } + + void set_ball_radius(const FT radius) { + // if given radius is 0, we use a small epsilon to expand the ball (scaled by the average edge length) + if (is_zero(radius)) + ball_radius = avg_edge_length * 1e-6; + else + ball_radius = radius; + } + +public: + + Interpolated_corrected_curvatures_computer(const PolygonMesh& pmesh,const NamedParameters& np) + : pmesh(pmesh) + { + set_named_params(np); + + if (is_mean_curvature_selected || is_Gaussian_curvature_selected || is_principal_curvatures_and_directions_selected) + { + set_property_maps(); + + compute_selected_curvatures(); + } + } + +private: + + // Computes the (selected) interpolated corrected measures for all faces + // and stores them in the property maps + void interpolated_corrected_selected_measures_all_faces() + { + std::vector x; + std::vector u; + // minimal number of vertices per face is 3 + x.reserve(3); + u.reserve(3); + + for (face_descriptor f : faces(pmesh)) + { + for (vertex_descriptor v : vertices_around_face(halfedge(f, pmesh), pmesh)) + { + const Point_3& p = get(vpm, v); + x.push_back(Vector_3(p.x(), p.y(), p.z())); + u.push_back(get(vnm, v)); + } + put(mu0_map, f, interpolated_corrected_area_measure_face(u, x)); + + if (is_mean_curvature_selected) + put(mu1_map, f, interpolated_corrected_mean_curvature_measure_face(u, x)); + + if (is_Gaussian_curvature_selected) + put(mu2_map, f, interpolated_corrected_Gaussian_curvature_measure_face(u)); + + if (is_principal_curvatures_and_directions_selected) + put(muXY_map, f, interpolated_corrected_anisotropic_measure_face(u, x)); + + x.clear(); + u.clear(); + } + } + + // expand the measures of the faces incident to v + Vertex_measures expand_interpolated_corrected_measure_vertex_no_radius(vertex_descriptor v) + { + Vertex_measures vertex_measures; + + // add the measures of the faces incident to v (excluding the null (boundary) face) + for (face_descriptor f : faces_around_target(halfedge(v, pmesh), pmesh)) { + if (f == boost::graph_traits::null_face()) + continue; + + // only add the measures for the selected curvatures (area measure is always added) + vertex_measures.area_measure += get(mu0_map, f); + + if (is_mean_curvature_selected) + vertex_measures.mean_curvature_measure += get(mu1_map, f); + + if (is_Gaussian_curvature_selected) + vertex_measures.gaussian_curvature_measure += get(mu2_map, f); + + if (is_principal_curvatures_and_directions_selected) + { + const std::array face_anisotropic_measure = get(muXY_map, f); + for (std::size_t i = 0; i < 3 * 3; i++) + vertex_measures.anisotropic_measure[i] += face_anisotropic_measure[i]; + } + } + + return vertex_measures; + } + + // expand the measures of the faces inside the ball of radius r around v + Vertex_measures expand_interpolated_corrected_measure_vertex(vertex_descriptor v) + { + // the ball expansion is done using a BFS traversal from the vertex + std::queue bfs_queue; + std::unordered_set bfs_visited; + + const Point_3& vp = get(vpm, v); + const Vector_3& c = Vector_3(vp.x(), vp.y(), vp.z()); + + Vertex_measures vertex_measures; + + // add the measures of the faces incident to v (excluding the null (boundary) face) + for (face_descriptor f : faces_around_target(halfedge(v, pmesh), pmesh)) { + if (f != boost::graph_traits::null_face()) + { + bfs_queue.push(f); + bfs_visited.insert(f); + } + } + while (!bfs_queue.empty()) { + face_descriptor fi = bfs_queue.front(); + bfs_queue.pop(); + + // looping over vertices in face to get point coordinates + std::vector x; + for (vertex_descriptor vi : vertices_around_face(halfedge(fi, pmesh), pmesh)) + { + const Point_3& pi = get(vpm, vi); + x.push_back(Vector_3(pi.x(), pi.y(), pi.z())); + } + + // compute the inclusion ratio of the face in the ball + const FT f_ratio = face_in_ball_ratio(x, ball_radius, c); + + // if the face is inside the ball, add the measures + // only add the measures for the selected curvatures (area measure is always added) + if (!is_zero(f_ratio)) + { + vertex_measures.area_measure += f_ratio * get(mu0_map, fi); + + if (is_mean_curvature_selected) + vertex_measures.mean_curvature_measure += f_ratio * get(mu1_map, fi); + + if (is_Gaussian_curvature_selected) + vertex_measures.gaussian_curvature_measure += f_ratio * get(mu2_map, fi); + + if (is_principal_curvatures_and_directions_selected) + { + const std::array face_anisotropic_measure = get(muXY_map, fi); + for (std::size_t i = 0; i < 3 * 3; i++) + vertex_measures.anisotropic_measure[i] += f_ratio * face_anisotropic_measure[i]; + } + + for (face_descriptor fj : faces_around_face(halfedge(fi, pmesh), pmesh)) + { + if (bfs_visited.find(fj) == bfs_visited.end() && fj != boost::graph_traits::null_face()) + { + bfs_queue.push(fj); + bfs_visited.insert(fj); + } + } + } + } + return vertex_measures; + } + + void compute_selected_curvatures() { + interpolated_corrected_selected_measures_all_faces(); + + for (vertex_descriptor v : vertices(pmesh)) + { + // expand the computed measures (on faces) to the vertices + Vertex_measures vertex_measures = (is_negative(ball_radius)) ? + expand_interpolated_corrected_measure_vertex_no_radius(v) : + expand_interpolated_corrected_measure_vertex(v); + + // compute the selected curvatures from the expanded measures and store them in the property maps + // if the area measure is zero, the curvature is set to zero + if (is_mean_curvature_selected) { + !is_zero(vertex_measures.area_measure) ? + put(mean_curvature_map, v, 0.5 * vertex_measures.mean_curvature_measure / vertex_measures.area_measure) : + put(mean_curvature_map, v, 0); + } + + if (is_Gaussian_curvature_selected) { + !is_zero(vertex_measures.area_measure) ? + put(gaussian_curvature_map, v, vertex_measures.gaussian_curvature_measure / vertex_measures.area_measure) : + put(gaussian_curvature_map, v, 0); + } + + if (is_principal_curvatures_and_directions_selected) { + // compute the principal curvatures and directions from the anisotropic measure + const Vector_3& v_normal = get(vnm, v); + const Principal_curvatures_and_directions principal_curvatures_and_directions = principal_curvatures_and_directions_from_anisotropic_measures( + vertex_measures.anisotropic_measure, + vertex_measures.area_measure, + v_normal, + avg_edge_length + ); + put(principal_curvatures_and_directions_map, v, principal_curvatures_and_directions); + } + } + } +}; + +} // namespace internal + +/** +* \ingroup PMP_corrected_curvatures_grp +* +* computes the interpolated corrected curvatures across the mesh `pmesh`. +* By providing mean, Gaussian and/or principal curvature and direction property maps as named parameters, the user +* can choose which quantites to compute. +* +* \note This function depends on the \eigen 3.1 (or later) library. +* +* @tparam PolygonMesh a model of `FaceListGraph`. +* @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters". +* +* @param pmesh the polygon mesh. +* @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below. +* `GT` stands for the type of the object provided to the named parameter `geom_traits()`. +* +* \cgalNamedParamsBegin +* +* \cgalParamNBegin{vertex_mean_curvature_map} +* \cgalParamDescription{a property map associating mean curvatures to the vertices of `pmesh`.} +* \cgalParamType{a class model of `WritablePropertyMap` with +* `boost::graph_traits::%vertex_descriptor` +* as key type and `GT::FT` as value type} +* \cgalParamExtra{If this parameter is omitted, mean curvatures will not be computed.} +* \cgalParamNEnd +* +* \cgalParamNBegin{vertex_Gaussian_curvature_map} +* \cgalParamDescription{a property map associating Gaussian curvatures to the vertices of `pmesh`.} +* \cgalParamType{a class model of `WritablePropertyMap` with +* `boost::graph_traits::%vertex_descriptor` +* as key type and `GT::FT` as value type.} +* \cgalParamExtra{If this parameter is omitted, Gaussian curvatures will not be computed.} +* \cgalParamNEnd +* +* \cgalParamNBegin{vertex_principal_curvatures_and_directions_map} +* \cgalParamDescription{a property map associating principal curvatures and directions to the vertices of `pmesh`.} +* \cgalParamType{a class model of `WritablePropertyMap` with +* `boost::graph_traits::%vertex_descriptor` +* as key type and `Principal_curvatures_and_directions` as value type.} +* \cgalParamExtra{If this parameter is omitted, principal curvatures and directions will not be computed.} +* \cgalParamNEnd +* +* \cgalParamNBegin{ball_radius} +* \cgalParamDescription{a strictly positive scalar value specifying the radius used for expanding curvature measures +* by summing measures of faces inside a ball of this radius centered at the +* vertex expanded from. The summed face measures are weighted by their +* inclusion ratio inside this ball.} +* \cgalParamType{`GT::FT`} +* \cgalParamDefault{`-1`} +* \cgalParamExtra{If this parameter is omitted (`-1`), the expansion is then just a sum of +* measures on faces around the vertex.} +* \cgalParamNEnd +* +* \cgalParamNBegin{vertex_point_map} +* \cgalParamDescription{a property map associating points to the vertices of `pmesh`.} +* \cgalParamType{a class model of `ReadablePropertyMap` with +* `boost::graph_traits::%vertex_descriptor` +* as key type and `GT::Point_3` as value type.} +* \cgalParamDefault{`boost::get(CGAL::vertex_point, pmesh)`.} +* \cgalParamExtra{If this parameter is omitted, an internal property map for +* `CGAL::vertex_point_t` must be available in `PolygonMesh`.} +* \cgalParamNEnd +* +* \cgalParamNBegin{vertex_normal_map} +* \cgalParamDescription{a property map associating normal vectors to the vertices of `pmesh`.} +* \cgalParamType{a class model of `ReadablePropertyMap` with +* `boost::graph_traits::%vertex_descriptor` +* as key type and `GT::Vector_3` as value type.} +* \cgalParamDefault{`get(dynamic_vertex_property_t(), pmesh)`.} +* \cgalParamExtra{If this parameter is omitted, vertex normals will be +* computed using `compute_vertex_normals()`.} +* \cgalParamNEnd +* +* \cgalParamNBegin{geom_traits} +* \cgalParamDescription{an instance of a geometric traits class.} +* \cgalParamType{a class model of `Kernel`} +* \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`.} +* \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} +* \cgalParamNEnd +* +* \cgalNamedParamsEnd +* +*/ +template +void interpolated_corrected_curvatures(const PolygonMesh& pmesh, + const CGAL_NP_CLASS& np = parameters::default_values()) +{ + internal::Interpolated_corrected_curvatures_computer(pmesh, np); +} + +/** +* \ingroup PMP_corrected_curvatures_grp +* computes the interpolated corrected curvatures at a vertex `v`. +* By providing mean, Gaussian and/or principal curvature and direction property maps as named parameters, the user +* can choose which quantites to compute. +* +* \note This function depends on the \eigen 3.1 (or later) library. +* +* @tparam PolygonMesh a model of `FaceListGraph`. +* @tparam VertexDescriptor must be convertible to `boost::graph_traits::%vertex_descriptor`. +* @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters". +* +* @param pmesh the polygon mesh. +* @param v the vertex of `pmesh` to compute the curvatures at. +* @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below. +* `GT` stands for the type of the object provided to the named parameter `geom_traits()`. +* +* \cgalNamedParamsBegin +* +* \cgalParamNBegin{vertex_mean_curvature} +* \cgalParamDescription{a reference to a scalar value to store the mean curvature at the vertex `v`.} +* \cgalParamType{`std::reference_wrapper`.} +* \cgalParamExtra{If this parameter is omitted, mean curvature will not be computed.} +* \cgalParamNEnd +* +* \cgalParamNBegin{vertex_Gaussian_curvature} +* \cgalParamDescription{a reference to a scalar value to store the Gaussian curvature at the vertex `v`.} +* \cgalParamType{`std::reference_wrapper`.} +* \cgalParamExtra{If this parameter is omitted, Gaussian curvature will not be computed.} +* \cgalParamNEnd +* +* \cgalParamNBegin{vertex_principal_curvatures_and_directions} +* \cgalParamDescription{a reference to a `Principal_curvatures_and_directions` object to store the principal curvatures and directions at the vertex `v`.} +* \cgalParamType{`std::reference_wrapper>`.} +* \cgalParamExtra{If this parameter is omitted, principal curvatures and directions will not be computed.} +* \cgalParamNEnd +* +* \cgalParamNBegin{ball_radius} +* \cgalParamDescription{a scalar value specifying the radius used for expanding curvature measures +* by summing measures of faces inside a ball of this radius centered at the +* vertex expanded from. The summed face measures are weighted by their +* inclusion ratio inside this ball.} +* \cgalParamType{`GT::FT`} +* \cgalParamDefault{`-1`} +* \cgalParamExtra{If this parameter is omitted (`-1`), the expansion is then just a sum of +* measures on faces around the vertex.} +* \cgalParamNEnd +* +* \cgalParamNBegin{vertex_point_map} +* \cgalParamDescription{a property map associating points to the vertices of `pmesh`.} +* \cgalParamType{a class model of `ReadablePropertyMap` with +* `boost::graph_traits::%vertex_descriptor` +* as key type and `GT::Point_3` as value type.} +* \cgalParamDefault{`boost::get(CGAL::vertex_point, pmesh)`.} +* \cgalParamExtra{If this parameter is omitted, an internal property map for +* `CGAL::vertex_point_t` must be available in `PolygonMesh`.} +* \cgalParamNEnd +* +* \cgalParamNBegin{vertex_normal_map} +* \cgalParamDescription{a property map associating normal vectors to the vertices of `pmesh`.} +* \cgalParamType{a class model of `ReadablePropertyMap` with +* `boost::graph_traits::%vertex_descriptor` +* as key type and `GT::Vector_3` as value type.} +* \cgalParamDefault{`get(dynamic_vertex_property_t(), pmesh)`.} +* \cgalParamExtra{If this parameter is omitted, vertex normals will be +* computed using `compute_vertex_normals()`.} +* \cgalParamNEnd +* +* \cgalParamNBegin{geom_traits} +* \cgalParamDescription{an instance of a geometric traits class.} +* \cgalParamType{a class model of `Kernel`} +* \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`.} +* \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} +* \cgalParamNEnd +* +* \cgalNamedParamsEnd +*/ +template +void interpolated_corrected_curvatures(VertexDescriptor v, + const PolygonMesh& pmesh, + const CGAL_NP_CLASS& np = parameters::default_values()) +{ + internal::interpolated_corrected_curvatures_one_vertex(pmesh, v, np); +} + +} // namespace Polygon_mesh_processing +} // namespace CGAL + +#endif // CGAL_POLYGON_MESH_PROCESSING_INTERPOLATED_CORRECTED_CURVATURES_H diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/intersection.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/intersection.h index c2d13de5..4cf314ba 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/intersection.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/intersection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h $ -// $Id: intersection.h bb0b9a8 2022-03-07T15:32:37+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h $ +// $Id: include/CGAL/Polygon_mesh_processing/intersection.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,20 +23,18 @@ #include #include #include -#include +#include #include #include #include #include -#include -#include -#include #include #include #include #include +#include namespace CGAL { namespace Polygon_mesh_processing{ @@ -416,8 +414,8 @@ compute_face_face_intersection(const FaceRange& face_range1, // make one box per facet std::vector boxes1; std::vector boxes2; - boxes1.reserve(std::distance(boost::begin(face_range1), boost::end(face_range1))); - boxes2.reserve(std::distance(boost::begin(face_range2), boost::end(face_range2))); + boxes1.reserve(std::distance(std::begin(face_range1), std::end(face_range1))); + boxes2.reserve(std::distance(std::begin(face_range2), std::end(face_range2))); typedef typename GetVertexPointMap::const_type VertexPointMap1; typedef typename GetVertexPointMap::const_type VertexPointMap2; @@ -426,8 +424,8 @@ compute_face_face_intersection(const FaceRange& face_range1, get_const_property_map(boost::vertex_point, tm1)); VertexPointMap2 vpmap2 = choose_parameter(get_parameter(np2, internal_np::vertex_point), get_const_property_map(boost::vertex_point, tm2)); - CGAL_static_assertion( - (boost::is_same< + static_assert( + (std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type >::value) ); @@ -544,12 +542,12 @@ compute_face_polyline_intersection(const FaceRange& face_range, VertexPointMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(boost::vertex_point, tm)); typedef typename boost::property_traits::value_type Point; - CGAL_static_assertion( - (boost::is_same::type>::value)); std::vector faces; - faces.reserve(std::distance(boost::begin(face_range), boost::end(face_range))); + faces.reserve(std::distance(std::begin(face_range), std::end(face_range))); typedef CGAL::Box_intersection_d::ID_FROM_BOX_ADDRESS Box_policy; typedef CGAL::Box_intersection_d::Box_with_info_d Box; @@ -557,8 +555,8 @@ compute_face_polyline_intersection(const FaceRange& face_range, // make one box per facet std::vector boxes1; std::vector boxes2; - boxes1.reserve(std::distance(boost::begin(face_range), boost::end(face_range))); - boxes2.reserve(std::distance(boost::begin(polyline), boost::end(polyline)) - 1); + boxes1.reserve(std::distance(std::begin(face_range), std::end(face_range))); + boxes2.reserve(std::distance(std::begin(polyline), std::end(polyline)) - 1); for(face_descriptor f : face_range) { @@ -682,10 +680,10 @@ compute_face_polylines_intersection(const FaceRange& face_range, get_const_property_map(boost::vertex_point, tm)); typedef typename boost::property_traits::value_type Point; typedef typename boost::range_value::type Polyline; - CGAL_static_assertion((boost::is_same::type>::value)); + static_assert(std::is_same::type>::value); std::vector faces; - faces.reserve(std::distance( boost::begin(face_range), boost::end(face_range) )); + faces.reserve(std::distance( std::begin(face_range), std::end(face_range) )); typedef CGAL::Box_intersection_d::ID_FROM_BOX_ADDRESS Box_policy; typedef CGAL::Box_intersection_d::Box_with_info_d, Box_policy> Box; @@ -693,12 +691,12 @@ compute_face_polylines_intersection(const FaceRange& face_range, // make one box per facet std::vector boxes1; std::vector boxes2; - boxes1.reserve(std::distance(boost::begin(face_range), boost::end(face_range))); + boxes1.reserve(std::distance(std::begin(face_range), std::end(face_range))); std::size_t polylines_size = 0; for(Polyline poly : polyline_range) { - polylines_size += std::distance( boost::begin(poly), boost::end(poly) ) -1; + polylines_size += std::distance( std::begin(poly), std::end(poly) ) -1; } boxes2.reserve(polylines_size); @@ -708,11 +706,11 @@ compute_face_polylines_intersection(const FaceRange& face_range, boxes1.push_back(Box(Polygon_mesh_processing::face_bbox(f, tm), std::make_pair(0, faces.size()-1))); } - std::size_t range_size = std::distance( boost::begin(polyline_range), boost::end(polyline_range) ); + std::size_t range_size = std::distance( std::begin(polyline_range), std::end(polyline_range) ); for(std::size_t j = 0; j < range_size; ++j) { Polyline poly = polyline_range[j]; - std::size_t size = std::distance( boost::begin(poly), boost::end(poly) ); + std::size_t size = std::distance( std::begin(poly), std::end(poly) ); for(std::size_t i =0; i< size - 1; ++i) { Point p1 = poly[i]; @@ -786,8 +784,8 @@ compute_polyline_polyline_intersection(const Polyline& polyline1, // make one box per facet std::vector boxes1; std::vector boxes2; - boxes1.reserve(std::distance(boost::begin(polyline1), boost::end(polyline1)) - 1); - boxes2.reserve(std::distance(boost::begin(polyline2), boost::end(polyline2)) - 1); + boxes1.reserve(std::distance(std::begin(polyline1), std::end(polyline1)) - 1); + boxes2.reserve(std::distance(std::begin(polyline2), std::end(polyline2)) - 1); for(std::size_t i =0; i< polyline1.size()-1; ++i) { @@ -871,7 +869,7 @@ compute_polylines_polylines_intersection(const PolylineRange& polylines1, CGAL::Bbox_3 b1, b2; for(Polyline poly : polylines1) { - polylines_size += std::distance( boost::begin(poly), boost::end(poly) ) -1; + polylines_size += std::distance( std::begin(poly), std::end(poly) ) -1; b1 += CGAL::bbox_3(poly.begin(), poly.end()); } boxes1.reserve( polylines_size ); @@ -879,7 +877,7 @@ compute_polylines_polylines_intersection(const PolylineRange& polylines1, polylines_size = 0; for(Polyline poly : polylines2) { - polylines_size += std::distance( boost::begin(poly), boost::end(poly) ) -1; + polylines_size += std::distance( std::begin(poly), std::end(poly) ) -1; b2 += CGAL::bbox_3(poly.begin(), poly.end()); } boxes2.reserve(polylines_size); @@ -887,11 +885,11 @@ compute_polylines_polylines_intersection(const PolylineRange& polylines1, if(!CGAL::do_overlap(b1,b2)) return out; - std::size_t range_size = std::distance( boost::begin(polylines1), boost::end(polylines1) ); + std::size_t range_size = std::distance( std::begin(polylines1), std::end(polylines1) ); for(std::size_t j = 0; j < range_size; ++j) { Polyline poly = polylines1[j]; - std::size_t size = std::distance( boost::begin(poly), boost::end(poly) ); + std::size_t size = std::distance( std::begin(poly), std::end(poly) ); for(std::size_t i =0; i< size - 1; ++i) { const Point& p1 = poly[i]; @@ -900,11 +898,11 @@ compute_polylines_polylines_intersection(const PolylineRange& polylines1, } } - range_size = std::distance( boost::begin(polylines2), boost::end(polylines2) ); + range_size = std::distance( std::begin(polylines2), std::end(polylines2) ); for(std::size_t j = 0; j < range_size; ++j) { Polyline poly = polylines2[j]; - std::size_t size = std::distance( boost::begin(poly), boost::end(poly) ); + std::size_t size = std::distance( std::begin(poly), std::end(poly) ); for(std::size_t i =0; i< size - 1; ++i) { const Point& p1 = poly[i]; @@ -1143,14 +1141,14 @@ template bool do_intersect(const PolylineRange& polylines1, const PolylineRange& polylines2 #ifndef DOXYGEN_RUNNING - , const typename boost::enable_if< - typename boost::has_range_iterator< + , const std::enable_if_t< + boost::has_range_iterator< typename boost::mpl::eval_if< boost::has_range_iterator, boost::range_value, - boost::false_type >::type - >::type - >::type* = 0//end enable_if + std::false_type >::type + >::value + >* = 0//end enable_if #endif ) { @@ -1187,18 +1185,18 @@ template bool do_intersect(const Polyline& polyline1, const Polyline& polyline2 #ifndef DOXYGEN_RUNNING - , const typename boost::enable_if< - typename boost::has_range_const_iterator::type - >::type* = 0, - const typename boost::disable_if< - typename boost::has_range_iterator< + , const std::enable_if_t< + boost::has_range_const_iterator::value + >* = 0, + const std::enable_if_t< + !boost::has_range_iterator< typename boost::mpl::eval_if< boost::has_range_iterator, boost::range_value, - boost::false_type + std::false_type >::type - >::type - >::type* = 0//end enable_if + >::value + >* = 0//end enable_if #endif ) { @@ -1275,9 +1273,9 @@ bool do_intersect(const TriangleMesh& tm1, const CGAL_NP_CLASS_1& np1 = parameters::default_values(), const CGAL_NP_CLASS_2& np2 = parameters::default_values() #ifndef DOXYGEN_RUNNING - , const typename boost::disable_if< - typename boost::has_range_const_iterator::type - >::type* = 0 + , const std::enable_if_t< + !boost::has_range_const_iterator::value + >* = 0 #endif ) { @@ -1361,15 +1359,15 @@ bool do_intersect(const TriangleMesh& tm, const PolylineRange& polylines, const NamedParameters& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , const typename boost::enable_if< - typename boost::has_range_iterator< + , const std::enable_if_t< + boost::has_range_iterator< typename boost::mpl::eval_if< boost::has_range_iterator, boost::range_value, - boost::false_type + std::false_type >::type - >::type - >::type* = 0//end enable_if + >::value + >* = 0//end enable_if #endif ) { @@ -1428,19 +1426,17 @@ bool do_intersect(const TriangleMesh& tm, const Polyline& polyline, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , const typename boost::disable_if< - typename boost::mpl::or_< - typename boost::is_same::type, // Added to please MSVC 2015 - typename boost::mpl::not_::type>::type, // not a range - typename boost::has_range_iterator< + , const std::enable_if_t || // Added to please MSVC 2015 + !boost::has_range_iterator::value || // not a range + boost::has_range_iterator< typename boost::mpl::eval_if< boost::has_range_iterator, boost::range_value, - boost::false_type - >::type - >::type // not a range of a range - >::type - >::type* = 0 + std::false_type>::type + >::value + ) + >* = 0 #endif ) { @@ -1576,7 +1572,7 @@ struct Mesh_callback * * detects and reports all the pairs of meshes intersecting in a range of triangulated surface meshes. * A pair of meshes intersecting is put in the output iterator `out` as a `std::pair`, - * each index refering to the index of the triangle mesh in the input range. + * each index referring to the index of the triangle mesh in the input range. * If `do_overlap_test_of_bounded_sides` is `true`, the overlap of bounded sides are tested as well. In that case, the meshes must be closed. * This function depends on the package \ref PkgBoxIntersectionD. * @@ -1743,8 +1739,8 @@ surface_intersection(const TriangleMesh& tm1, typedef typename GetVertexPointMap::const_type VPM1; typedef typename GetVertexPointMap::const_type VPM2; - CGAL_static_assertion((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); VPM1 vpm1 = parameters::choose_parameter(parameters::get_parameter(np1, internal_np::vertex_point), get_const_property_map(CGAL::vertex_point, tm1)); diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/locate.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/locate.h index 592a8ea6..b9c34abb 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/locate.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/locate.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h $ -// $Id: locate.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h $ +// $Id: include/CGAL/Polygon_mesh_processing/locate.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé, @@ -25,13 +25,12 @@ #include #include #include -#include +#include #include #include #include -#include -#include +#include #include #include @@ -44,7 +43,7 @@ // Everywhere in this file: // If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence // between the coordinates in `bc` and the vertices of the face `f` is the following: // - `w0` corresponds to `source(halfedge(f, tm), tm)` // - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -52,6 +51,36 @@ namespace CGAL { namespace Polygon_mesh_processing { + +/// \ingroup PMP_locate_grp +/// +/// A variant used in the function `get_descriptor_from_location()`. +template +using descriptor_variant = std::variant::vertex_descriptor, + typename boost::graph_traits::halfedge_descriptor, + typename boost::graph_traits::face_descriptor>; + +/// \ingroup PMP_locate_grp +/// +/// A triplet of coordinates describing the barycentric coordinates of a point +/// with respect to the vertices of a triangular face. +/// +/// \sa `Face_location` +template +using Barycentric_coordinates = std::array; + +/// \ingroup PMP_locate_grp +/// +/// If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence +/// between the coordinates in `bc` and the vertices of the face `f` is the following: +/// - `w0` corresponds to `source(halfedge(f, tm), tm)` +/// - `w1` corresponds to `target(halfedge(f, tm), tm)` +/// - `w2` corresponds to `target(next(halfedge(f, tm), tm), tm)` +template +using Face_location = std::pair::face_descriptor, + Barycentric_coordinates >; + namespace internal { // The Ray must have the same ambient dimension as the property map's value type (aka, the point type) @@ -85,51 +114,20 @@ struct Location_traits typedef typename boost::graph_traits::face_descriptor face_descriptor; - typedef std::array Barycentric_coordinates; - typedef std::pair Face_location; + typedef CGAL::Polygon_mesh_processing::Barycentric_coordinates Barycentric_coordinates; + typedef CGAL::Polygon_mesh_processing::Face_location Face_location; }; } // end namespace internal -/// \ingroup PMP_locate_grp -/// -/// A variant used in the function `get_descriptor_from_location()`. -template -using descriptor_variant = boost::variant::vertex_descriptor, - typename boost::graph_traits::halfedge_descriptor, - typename boost::graph_traits::face_descriptor>; - -/// \ingroup PMP_locate_grp -/// -/// A triplet of coordinates describing the barycentric coordinates of a point -/// with respect to the vertices of a triangular face. -/// -/// \sa `Face_location` -template -using Barycentric_coordinates = std::array; - -/// \ingroup PMP_locate_grp -/// -/// If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance -/// between the coordinates in `bc` and the vertices of the face `f` is the following: -/// - `w0` corresponds to `source(halfedge(f, tm), tm)` -/// - `w1` corresponds to `target(halfedge(f, tm), tm)` -/// - `w2` corresponds to `target(next(halfedge(f, tm), tm), tm)` -template -using Face_location = std::pair::face_descriptor, - Barycentric_coordinates >; - // forward declarations template -bool is_in_face(const std::pair::face_descriptor, - std::array >& loc, +bool is_in_face(const Face_location& loc, const TriangleMesh& tm); template descriptor_variant -get_descriptor_from_location(const std::pair::face_descriptor, - std::array >& loc, +get_descriptor_from_location(const Face_location& loc, const TriangleMesh& tm); // end of forward declarations @@ -138,8 +136,7 @@ namespace internal { template OutputIterator -incident_faces(const std::pair::face_descriptor, - std::array >& location, +incident_faces(const Face_location& loc, const TriangleMesh& tm, OutputIterator out) { @@ -147,15 +144,15 @@ incident_faces(const std::pair::face_ typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::face_descriptor face_descriptor; - const descriptor_variant dv = get_descriptor_from_location(location, tm); + const descriptor_variant dv = get_descriptor_from_location(loc, tm); - if(const vertex_descriptor* vd_ptr = boost::get(&dv)) + if(const vertex_descriptor* vd_ptr = std::get_if(&dv)) { const vertex_descriptor vd = *vd_ptr; for(face_descriptor fd : faces_around_target(halfedge(vd, tm), tm)) *out++ = fd; } - else if(const halfedge_descriptor* hd_ptr = boost::get(&dv)) + else if(const halfedge_descriptor* hd_ptr = std::get_if(&dv)) { const halfedge_descriptor hd = *hd_ptr; *out++ = face(hd, tm); @@ -163,7 +160,7 @@ incident_faces(const std::pair::face_ } else { - const face_descriptor fd = boost::get(dv); + const face_descriptor fd = std::get(dv); *out++ = fd; } @@ -173,7 +170,7 @@ incident_faces(const std::pair::face_ // Snapping coordinates for robustness template bool -snap_coordinates_to_border(std::array& coords, +snap_coordinates_to_border(Barycentric_coordinates& coords, const FT tolerance = std::numeric_limits::epsilon()) { #ifdef CGAL_PMP_LOCATE_DEBUG @@ -224,8 +221,7 @@ snap_coordinates_to_border(std::array& coords, template bool -snap_location_to_border(std::pair::face_descriptor, - std::array >& loc, +snap_location_to_border(Face_location& loc, const TriangleMesh /*tm*/, const FT tolerance = std::numeric_limits::epsilon()) { @@ -235,7 +231,7 @@ snap_location_to_border(std::pair::fa template struct Barycentric_coordinate_calculator // 2D version { - std::array + Barycentric_coordinates operator()(const P& ip, const P& iq, const P& ir, const P& iquery, const K& k) const { typedef typename K::FT FT; @@ -273,7 +269,7 @@ struct Barycentric_coordinate_calculator // 2D version template struct Barycentric_coordinate_calculator { - std::array + Barycentric_coordinates operator()(const P& ip, const P& iq, const P& ir, const P& iquery, const K& k) const { typedef typename K::FT FT; @@ -364,7 +360,7 @@ struct Barycentric_point_constructor // 3D version /// \pre `query` lies on the plane defined by `p`, `q`, and `r`. /// template -std::array +Barycentric_coordinates barycentric_coordinates(const Point& p, const Point& q, const Point& r, const Point& query, const GeomTraits& gt) { @@ -373,7 +369,7 @@ barycentric_coordinates(const Point& p, const Point& q, const Point& r, const Po } template -std::array::type::FT, 3> +Barycentric_coordinates::type::FT> barycentric_coordinates(const Point& p, const Point& q, const Point& r, const Point& query) { typedef typename CGAL::Kernel_traits::type Kernel; @@ -411,7 +407,7 @@ random_location_on_halfedge(typename boost::graph_traits::halfedge const int h_id = halfedge_index_in_face(hd, tm); const FT t(rnd.uniform_real(0., 1.)); - std::array coordinates; + Barycentric_coordinates coordinates; coordinates[h_id] = t; coordinates[(h_id+1)%3] = FT(1)-t; coordinates[(h_id+2)%3] = FT(0); @@ -442,8 +438,8 @@ random_location_on_face(typename boost::graph_traits::face_descrip CGAL::Random& rnd = get_default_random()) { CGAL_USE(tm); - CGAL_precondition(CGAL::is_triangle_mesh(tm)); - CGAL_precondition(fd != boost::graph_traits::null_face()); + CGAL_precondition(is_valid_face_descriptor(fd, tm)); + CGAL_precondition(is_triangle(halfedge(fd, tm), tm)); // calling 'rnd.uniform real' with double in case FT comes from an EPECK kernel (which doesn't seem to work too well) FT u(rnd.uniform_real(0., 1.)); @@ -510,8 +506,7 @@ descriptor_variant #ifdef DOXYGEN_RUNNING // just for convenience because template alias do not allow template deduction get_descriptor_from_location(const Face_location& loc, #else -get_descriptor_from_location(const std::pair::face_descriptor, - std::array >& loc, +get_descriptor_from_location(const Face_location& loc, #endif const TriangleMesh& tm) { @@ -523,8 +518,8 @@ get_descriptor_from_location(const std::pair::null_face()); + CGAL_precondition(is_valid_face_descriptor(fd, tm)); + CGAL_precondition(is_triangle(halfedge(fd, tm), tm)); CGAL_precondition(is_in_face(loc, tm)); // the first barycentric coordinate corresponds to source(halfedge(fd, tm), tm) @@ -589,12 +584,10 @@ get_descriptor_from_location(const std::pair #ifdef DOXYGEN_RUNNING Point -construct_point(const Face_location& loc, #else typename internal::Location_traits::Point -construct_point(const std::pair::face_descriptor, - std::array >& loc, #endif +construct_point(const Face_location& loc, const TriangleMesh& tm, const NamedParameters& np = parameters::default_values()) { @@ -631,7 +624,7 @@ construct_point(const std::pair::face /// \brief Given a location, returns whether the location is on the vertex `vd` or not. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -648,12 +641,7 @@ construct_point(const std::pair::face /// template bool -#ifdef DOXYGEN_RUNNING is_on_vertex(const Face_location& loc, -#else -is_on_vertex(const std::pair::face_descriptor, - std::array >& loc, -#endif const typename boost::graph_traits::vertex_descriptor vd, const TriangleMesh& tm) { @@ -664,7 +652,7 @@ is_on_vertex(const std::pair::face_de const descriptor_variant dv = get_descriptor_from_location(loc, tm); - if(const vertex_descriptor* vd_ptr = boost::get(&dv)) + if(const vertex_descriptor* vd_ptr = std::get_if(&dv)) return (vd == *vd_ptr); return false; @@ -675,7 +663,7 @@ is_on_vertex(const std::pair::face_de /// \brief Given a location, returns whether this location is on the halfedge `hd` or not. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -692,12 +680,7 @@ is_on_vertex(const std::pair::face_de /// template bool -#ifdef DOXYGEN_RUNNING is_on_halfedge(const Face_location& loc, -#else -is_on_halfedge(const std::pair::face_descriptor, - std::array >& loc, -#endif const typename boost::graph_traits::halfedge_descriptor hd, const TriangleMesh& tm) { @@ -709,9 +692,9 @@ is_on_halfedge(const std::pair::face_ const descriptor_variant dv = get_descriptor_from_location(loc, tm); - if(const vertex_descriptor* vd_ptr = boost::get(&dv)) + if(const vertex_descriptor* vd_ptr = std::get_if(&dv)) return (*vd_ptr == source(hd, tm) || *vd_ptr == target(hd, tm)); - else if(const halfedge_descriptor* hd_ptr = boost::get(&dv)) + else if(const halfedge_descriptor* hd_ptr = std::get_if(&dv)) return (*hd_ptr == hd); return false; @@ -724,7 +707,7 @@ is_on_halfedge(const std::pair::face_ /// that is, if all the barycentric coordinates are positive. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -738,11 +721,7 @@ is_on_halfedge(const std::pair::face_ /// template bool -#ifdef DOXYGEN_RUNNING is_in_face(const Barycentric_coordinates& bar, -#else -is_in_face(const std::array& bar, -#endif const TriangleMesh& tm) { CGAL_USE(tm); @@ -764,7 +743,7 @@ is_in_face(const std::array& bar, /// \brief Given a location, returns whether the location is in the face (boundary included) or not. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -780,12 +759,7 @@ is_in_face(const std::array& bar, /// template bool -#ifdef DOXYGEN_RUNNING is_in_face(const Face_location& loc, -#else -is_in_face(const std::pair::face_descriptor, - std::array >& loc, -#endif const TriangleMesh& tm) { return is_in_face(loc.second, tm); @@ -796,7 +770,7 @@ is_in_face(const std::pair::face_desc /// \brief Given a location, returns whether the location is on the boundary of the face or not. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -812,12 +786,7 @@ is_in_face(const std::pair::face_desc /// template bool -#ifdef DOXYGEN_RUNNING is_on_face_border(const Face_location& loc, -#else -is_on_face_border(const std::pair::face_descriptor, - std::array >& loc, -#endif const TriangleMesh& tm) { if(!is_in_face(loc, tm)) @@ -837,7 +806,7 @@ is_on_face_border(const std::pair::fa /// \brief Given a location, returns whether the location is on the border of the mesh or not. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -853,12 +822,7 @@ is_on_face_border(const std::pair::fa /// template bool -#ifdef DOXYGEN_RUNNING is_on_mesh_border(const Face_location& loc, -#else -is_on_mesh_border(const std::pair::face_descriptor, - std::array >& loc, -#endif const TriangleMesh& tm) { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -906,7 +870,7 @@ is_on_mesh_border(const std::pair::fa /// and the barycentric coordinates of the vertex `vd` in that face. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -942,11 +906,10 @@ locate_vertex(typename boost::graph_traits::vertex_descriptor vd, } } - CGAL_postcondition(!CGAL::is_border(hd, tm)); // must find a 'real' face incident to 'vd' + CGAL_postcondition(!is_border(hd, tm)); // must find a 'real' face incident to 'vd' + CGAL_assertion(target(hd, tm) == vd); face_descriptor fd = face(hd, tm); - - CGAL_assertion(target(hd, tm) == vd); CGAL_assertion(fd != boost::graph_traits::null_face()); // isolated vertex @@ -968,7 +931,7 @@ locate_vertex(typename boost::graph_traits::vertex_descriptor vd, /// of the vertex in `fd`. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -989,7 +952,7 @@ locate_vertex(const typename boost::graph_traits::vertex_descripto const typename boost::graph_traits::face_descriptor fd, const TriangleMesh& tm) { - CGAL_precondition(fd != boost::graph_traits::null_face()); + CGAL_precondition(is_valid_vertex_descriptor(vd, tm) && is_valid_face_descriptor(fd, tm)); FT coords[3] = { FT(0), FT(0), FT(0) }; std::size_t vertex_local_index = vertex_index_in_face(vd, fd, tm); @@ -1007,7 +970,7 @@ locate_vertex(const typename boost::graph_traits::vertex_descripto /// barycentric coordinates of that location in that face. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -1047,7 +1010,7 @@ locate_on_halfedge(const typename boost::graph_traits::halfedge_de /// `query` with respect to the vertices of `fd`. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -1121,14 +1084,14 @@ locate_in_face(const typename internal::Location_traits(get_parameter(np, internal_np::geom_traits)); FT snap_tolerance = choose_parameter(get_parameter(np, internal_np::snapping_tolerance), 0); - CGAL_precondition(fd != boost::graph_traits::null_face()); - vertex_descriptor vd0 = source(halfedge(fd, tm), tm); vertex_descriptor vd1 = target(halfedge(fd, tm), tm); vertex_descriptor vd2 = target(next(halfedge(fd, tm), tm), tm); @@ -1137,7 +1100,7 @@ locate_in_face(const typename internal::Location_traits coords = barycentric_coordinates(p0, p1, p2, query, gt); + Barycentric_coordinates coords = barycentric_coordinates(p0, p1, p2, query, gt); if(snap_tolerance != FT(0) && !is_in_face(coords, tm)) { @@ -1158,7 +1121,7 @@ locate_in_face(const typename internal::Location_traits Face_location -#ifdef DOXYGEN_RUNNING locate_in_adjacent_face(const Face_location& loc, -#else -locate_in_adjacent_face(const std::pair::face_descriptor, - std::array >& loc, -#endif const typename boost::graph_traits::face_descriptor fd, const TriangleMesh& tm) { @@ -1194,14 +1152,14 @@ locate_in_adjacent_face(const std::pair loc_in_fd = std::make_pair(fd, CGAL::make_array(FT(0), FT(0), FT(0))); const descriptor_variant dv = get_descriptor_from_location(loc, tm); - if(const vertex_descriptor* vd_ptr = boost::get(&dv)) + if(const vertex_descriptor* vd_ptr = std::get_if(&dv)) { int index_of_vd = vertex_index_in_face(*vd_ptr, fd, tm); loc_in_fd.second[index_of_vd] = FT(1); // Note that the barycentric coordinates were initialized to 0, // so the second and third coordinates are already set up properly. } - else if(const halfedge_descriptor* hd_ptr = boost::get(&dv)) + else if(const halfedge_descriptor* hd_ptr = std::get_if(&dv)) { // Note that, here, we know that we are _not_ on a vertex const halfedge_descriptor hd = *hd_ptr; @@ -1226,7 +1184,7 @@ locate_in_adjacent_face(const std::pair(dv);) + CGAL_assertion_code(const face_descriptor fd2 = std::get(dv);) CGAL_assertion(fd2 != boost::graph_traits::null_face()); CGAL_assertion(fd2 != fd); @@ -1248,11 +1206,9 @@ locate_in_adjacent_face(const std::pair bool -locate_in_common_face(std::pair::face_descriptor, - std::array >& known_location, +locate_in_common_face(Face_location& known_location, const typename internal::Location_traits::Point& query, - std::pair::face_descriptor, - std::array >& query_location, + Face_location& query_location, const TriangleMesh& tm, const NamedParameters& np, const FT tolerance = std::numeric_limits::epsilon()) @@ -1265,7 +1221,7 @@ locate_in_common_face(std::pair::face bool is_query_location_in_face = false; - if(const vertex_descriptor* vd_ptr = boost::get(&dv)) + if(const vertex_descriptor* vd_ptr = std::get_if(&dv)) { const vertex_descriptor vd = *vd_ptr; halfedge_descriptor hd = halfedge(vd, tm); @@ -1285,13 +1241,12 @@ locate_in_common_face(std::pair::face break; } } - else if(const halfedge_descriptor* hd_ptr = boost::get(&dv)) + else if(const halfedge_descriptor* hd_ptr = std::get_if(&dv)) { const halfedge_descriptor hd = *hd_ptr; - face_descriptor fd = face(hd, tm); - - if(fd != boost::graph_traits::null_face()) + if(!is_border(hd, tm)) { + face_descriptor fd = face(hd, tm); query_location = locate_in_face(query, fd, tm, np); internal::snap_location_to_border(query_location, tm, tolerance); // @tmp keep or not ? is_query_location_in_face = is_in_face(query_location, tm); @@ -1299,15 +1254,14 @@ locate_in_common_face(std::pair::face if(!is_query_location_in_face) { - fd = face(opposite(hd, tm), tm); + face_descriptor fd = face(opposite(hd, tm), tm); query_location = locate_in_face(query, fd, tm, np); is_query_location_in_face = is_in_face(query_location, tm); } } else { - const face_descriptor fd = boost::get(dv); - + const face_descriptor fd = std::get(dv); CGAL_precondition(fd != boost::graph_traits::null_face()); query_location = locate_in_face(query, fd, tm, np); @@ -1326,10 +1280,8 @@ locate_in_common_face(std::pair::face // - both locations must be known but can change template bool -locate_in_common_face(std::pair::face_descriptor, - std::array >& first_location, - std::pair::face_descriptor, - std::array >& second_location, +locate_in_common_face(Face_location& first_location, + Face_location& second_location, const TriangleMesh& tm) { typedef typename boost::graph_traits::face_descriptor face_descriptor; @@ -1492,10 +1444,10 @@ template void build_AABB_tree(const TriangleMesh& tm, AABB_tree& outTree, const VPM& wrapped_vpm, - typename std::enable_if< + std::enable_if_t< std::is_same< typename AABBTraits::Point_3, typename boost::property_traits::value_type - >::value>::type* = 0) + >::value>* = 0) { typename boost::graph_traits::face_iterator ffirst, fbeyond; boost::tie(ffirst, fbeyond) = faces(tm); @@ -1507,10 +1459,10 @@ template void build_AABB_tree(const TriangleMesh& tm, AABB_tree& outTree, const VPM& vpm, - typename std::enable_if< + std::enable_if_t< !std::is_same< typename AABBTraits::Point_3, typename boost::property_traits::value_type - >::value>::type* = 0) + >::value>* = 0) { typedef internal::Point_to_Point_3_VPM Wrapped_VPM; const Wrapped_VPM wrapped_vpm(vpm); @@ -1664,12 +1616,12 @@ locate_with_AABB_tree(const typename internal::Location_traits AABB_traits; typedef typename Primitive::Point Point_3; - CGAL_static_assertion((std::is_same::value)); + static_assert(std::is_same::value); typedef typename GetVertexPointMap::const_type VertexPointMap; typedef internal::Point_to_Point_3_VPM WrappedVPM; - const Point_3& p3 = P_to_P3()(p); + const Point_3 p3 = P_to_P3()(p); typename AABB_tree::Point_and_primitive_id result = tree.closest_point_and_primitive(p3); typedef typename GetGeomTraits::type Geom_traits; @@ -1757,7 +1709,7 @@ locate(const typename internal::Location_traits:: using parameters::get_parameter; using parameters::choose_parameter; - CGAL_static_assertion((std::is_same::value)); + static_assert(std::is_same::value); const VertexPointMap vpm = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), get_const_property_map(boost::vertex_point, tm)); @@ -1766,7 +1718,7 @@ locate(const typename internal::Location_traits:: AABB_tree tree; build_AABB_tree(tm, tree, parameters::vertex_point_map(wrapped_vpm)); - const Point_3& p3 = P_to_P3()(p); + const Point_3 p3 = P_to_P3()(p); return locate_with_AABB_tree(p3, tree, tm, parameters::vertex_point_map(wrapped_vpm)); } @@ -1849,7 +1801,7 @@ locate_with_AABB_tree(const typename internal::Location_traits AABB_traits; typedef AABB_tree AABB_face_graph_tree; typedef typename AABB_face_graph_tree::template Intersection_and_primitive_id::Type Intersection_type; - typedef boost::optional Ray_intersection; + typedef std::optional Ray_intersection; using parameters::get_parameter; using parameters::choose_parameter; @@ -1869,7 +1821,7 @@ locate_with_AABB_tree(const typename internal::Location_traits(&(intersections[i]->first)); + Point_3* intersection_point = std::get_if(&(intersections[i]->first)); if(intersection_point) { diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/manifoldness.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/manifoldness.h index 01d24935..b0c7f090 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/manifoldness.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/manifoldness.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/manifoldness.h $ -// $Id: manifoldness.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/manifoldness.h $ +// $Id: include/CGAL/Polygon_mesh_processing/manifoldness.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot, @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include @@ -33,7 +33,7 @@ namespace CGAL { namespace Polygon_mesh_processing { -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// \brief returns whether a vertex of a polygon mesh is non-manifold. /// @@ -284,7 +284,7 @@ std::size_t make_umbrella_manifold(typename boost::graph_traits::ha } // end namespace internal -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// \brief collects the non-manifold vertices (if any) present in the mesh. /// @@ -394,7 +394,7 @@ OutputIterator non_manifold_vertices(const PolygonMesh& pm, return out; } -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// duplicates all the non-manifold vertices of the input mesh. /// diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/measure.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/measure.h index 206a6a12..0e7d435d 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/measure.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/measure.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h $ -// $Id: measure.h 763c5e9 2022-03-30T08:05:20+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h $ +// $Id: include/CGAL/Polygon_mesh_processing/measure.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,8 +22,9 @@ #include #include #include -#include +#include +#include #include // needed for CGAL::exact(FT)/CGAL::exact(Lazy_exact_nt) @@ -31,6 +32,7 @@ #include #include +#include #include #include #include @@ -112,7 +114,7 @@ edge_length(typename boost::graph_traits::halfedge_descriptor h, using parameters::choose_parameter; using parameters::get_parameter; - CGAL_precondition(boost::graph_traits::null_halfedge() != h); + CGAL_precondition(is_valid_halfedge_descriptor(h, pmesh)); typename GetVertexPointMap::const_type vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), @@ -132,6 +134,8 @@ edge_length(typename boost::graph_traits::edge_descriptor e, const PolygonMesh& pmesh, const NamedParameters& np = parameters::default_values()) { + CGAL_precondition(is_valid_edge_descriptor(e, pmesh)); + return edge_length(halfedge(e, pmesh), pmesh, np); } @@ -187,7 +191,7 @@ squared_edge_length(typename boost::graph_traits::halfedge_descript using parameters::choose_parameter; using parameters::get_parameter; - CGAL_precondition(boost::graph_traits::null_halfedge() != h); + CGAL_precondition(is_valid_halfedge_descriptor(h, pmesh)); typename GetVertexPointMap::const_type vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), @@ -208,6 +212,8 @@ squared_edge_length(typename boost::graph_traits::edge_descriptor e const PolygonMesh& pmesh, const NamedParameters& np = parameters::default_values()) { + CGAL_precondition(is_valid_edge_descriptor(e, pmesh)); + return squared_edge_length(halfedge(e, pmesh), pmesh, np); } @@ -304,6 +310,7 @@ face_border_length(typename boost::graph_traits::halfedge_descripto * - `first`: a halfedge on the longest border. * The return type `halfedge_descriptor` is a halfedge descriptor. It is * deduced from the graph traits corresponding to the type `PolygonMesh`. + * `first` is among the halfedges reported by `extract_boundary_cycles()`. * - `second`: the length of the longest border * The return type `FT` is a number type either deduced from the `geom_traits` * \ref bgl_namedparameters "Named Parameters" if provided, @@ -314,6 +321,7 @@ face_border_length(typename boost::graph_traits::halfedge_descripto * will be performed approximately. * * @see `face_border_length()` + * @see `extract_boundary_cycles()` */ template @@ -330,28 +338,18 @@ longest_border(const PolygonMesh& pmesh, typename property_map_value::type>::Kernel::FT FT; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - std::unordered_set visited; + std::vector boundary_cycles; + extract_boundary_cycles(pmesh, std::back_inserter(boundary_cycles)); halfedge_descriptor result_halfedge = boost::graph_traits::null_halfedge(); FT result_len = 0; - for(halfedge_descriptor h : halfedges(pmesh)) + for(halfedge_descriptor h : boundary_cycles) { - if(visited.find(h)== visited.end()) + FT len = face_border_length(h, pmesh, np); + + if(result_len < len) { - if(is_border(h, pmesh)) - { - FT len = 0; - for(halfedge_descriptor haf : halfedges_around_face(h, pmesh)) - { - len += edge_length(haf, pmesh, np); - visited.insert(haf); - } - - if(result_len < len) - { - result_len = len; - result_halfedge = h; - } - } + result_len = len; + result_halfedge = h; } } return std::make_pair(result_halfedge, result_len); @@ -415,7 +413,7 @@ face_area(typename boost::graph_traits::face_descriptor f, typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - CGAL_precondition(boost::graph_traits::null_face() != f); + CGAL_precondition(is_valid_face_descriptor(f, tmesh)); typename GetVertexPointMap::const_type vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), @@ -486,7 +484,7 @@ squared_face_area(typename boost::graph_traits::face_descriptor f, typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - CGAL_precondition(boost::graph_traits::null_face() != f); + CGAL_precondition(is_valid_face_descriptor(f, tmesh)); typename GetVertexPointMap::const_type vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), @@ -741,7 +739,7 @@ face_aspect_ratio(typename boost::graph_traits::face_descriptor f, const TriangleMesh& tmesh, const CGAL_NP_CLASS& np = parameters::default_values()) { - CGAL_precondition(f != boost::graph_traits::null_face()); + CGAL_precondition(is_valid_face_descriptor(f, tmesh)); CGAL_precondition(is_triangle(halfedge(f, tmesh), tmesh)); typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -859,34 +857,38 @@ centroid(const TriangleMesh& tmesh, Vpm vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(CGAL::vertex_point, tmesh)); - typedef typename GetGeomTraits::type Kernel; - typedef typename Kernel::Point_3 Point_3; + typedef typename GetGeomTraits::type Kernel; + Kernel k = choose_parameter(get_parameter(np, internal_np::geom_traits)); + + typedef typename Kernel::FT FT; + typedef typename boost::property_traits::reference Point_3_ref; typedef typename Kernel::Vector_3 Vector_3; + typedef typename Kernel::Construct_translated_point_3 Construct_translated_point_3; typedef typename Kernel::Construct_vector_3 Construct_vector_3; typedef typename Kernel::Construct_normal_3 Construct_normal_3; typedef typename Kernel::Compute_scalar_product_3 Scalar_product; typedef typename Kernel::Construct_scaled_vector_3 Scale; typedef typename Kernel::Construct_sum_of_vectors_3 Sum; + typedef typename boost::graph_traits::face_descriptor face_descriptor; - typedef typename Kernel::FT FT; FT volume = 0; Vector_3 centroid(NULL_VECTOR); - Construct_translated_point_3 point; - Construct_vector_3 vector; - Construct_normal_3 normal; - Scalar_product scalar_product; - Scale scale; - Sum sum; + Construct_translated_point_3 point = k.construct_translated_point_3_object(); + Construct_vector_3 vector = k.construct_vector_3_object(); + Construct_normal_3 normal = k.construct_normal_3_object(); + Scalar_product scalar_product = k.compute_scalar_product_3_object(); + Scale scale = k.construct_scaled_vector_3_object(); + Sum sum = k.construct_sum_of_vectors_3_object(); for(face_descriptor fd : faces(tmesh)) { - const Point_3& p = get(vpm, target(halfedge(fd, tmesh), tmesh)); - const Point_3& q = get(vpm, target(next(halfedge(fd, tmesh), tmesh), tmesh)); - const Point_3& r = get(vpm, target(prev(halfedge(fd, tmesh), tmesh), tmesh)); + const Point_3_ref p = get(vpm, target(halfedge(fd, tmesh), tmesh)); + const Point_3_ref q = get(vpm, target(next(halfedge(fd, tmesh), tmesh), tmesh)); + const Point_3_ref r = get(vpm, target(prev(halfedge(fd, tmesh), tmesh), tmesh)); Vector_3 vp = vector(ORIGIN, p), vq = vector(ORIGIN, q), vr = vector(ORIGIN, r); @@ -987,8 +989,8 @@ void match_faces(const PolygonMesh1& m1, get_const_property_map(vertex_point, m1)); const VPMap2 vpm2 = choose_parameter(get_parameter(np2, internal_np::vertex_point), get_const_property_map(vertex_point, m2)); - CGAL_static_assertion_msg((boost::is_same::value_type, - typename boost::property_traits::value_type>::value), + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value, "Both vertex point maps must have the same point type."); const VIMap1 vim1 = get_initialized_vertex_index_map(m1, np1); diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h index c6e528ee..ca68a1b9 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h $ -// $Id: merge_border_vertices.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h $ +// $Id: include/CGAL/Polygon_mesh_processing/merge_border_vertices.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include @@ -65,7 +65,7 @@ struct Less_on_point_of_target // Given a container of vectors of halfedges whose target are geometrically identical, // check that the intervals described by these pairs are either disjoint or nested. // This is done to ensure valid combinatorics when we merge the vertices. -// If incompatible (overlapping) intervals are found, the pair representating the longest +// If incompatible (overlapping) intervals are found, the pair representing the longest // interval (arbitrary choice) is removed from the candidate list. template void sanitize_candidates(const std::vector::halfedge_descriptor, std::size_t> >& cycle_hedges, @@ -204,7 +204,7 @@ void detect_identical_mergeable_vertices( } } -// \ingroup PMP_repairing_grp +// \ingroup PMP_combinatorial_repair_grp // // merges target vertices of a list of halfedges. // Halfedges must be sorted in the list. @@ -222,7 +222,7 @@ void merge_vertices_in_range(const HalfedgeRange& sorted_hedges, typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - halfedge_descriptor in_h_kept = *boost::begin(sorted_hedges); + halfedge_descriptor in_h_kept = *std::begin(sorted_hedges); halfedge_descriptor out_h_kept = next(in_h_kept, pm); vertex_descriptor v_kept = target(in_h_kept, pm); @@ -259,7 +259,7 @@ void merge_vertices_in_range(const HalfedgeRange& sorted_hedges, } // end of internal -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// merges identical vertices around a cycle of boundary edges. /// @@ -292,6 +292,8 @@ void merge_duplicated_vertices_in_boundary_cycle(typename boost::graph_traits oriented; @@ -311,7 +311,7 @@ struct Polygon_soup_orienter V_ID i1 = polygons[index][(j+1)%size]; edges[i0][i1].insert(index); } - // "inverse the orientation of polygon #index + // inverse the orientation of polygon #index oriented[index] = true; stack.push(index); } @@ -323,7 +323,7 @@ struct Polygon_soup_orienter const P_ID index = *(it_other_orient->second.begin()); if(oriented[index]) continue; //nothing todo already processed and correctly oriented oriented[index] = true; - // "keep the orientation of polygon #index + // keep the orientation of polygon #index stack.push(index); } } @@ -483,12 +483,22 @@ struct Polygon_soup_orienter * * \brief tries to consistently orient a soup of polygons in 3D space. * - * When it is not possible to produce a combinatorial manifold surface, + * The algorithm re-orients polygons such that the orientation + * of adjacent polygons is consistent. Note that the adjacency is + * defined in a combinatorial sense, i.e. two polygons are sharing + * an edge if and only if the endpoints of this edge are represented + * by the same point indices in both faces (possibly in a different order); + * it is not sufficient for the points to be geometrically identical. + * One may use `CGAL::Polygon_mesh_processing::merge_duplicate_points_in_polygon_soup()` + * to convert geometrical point equality into combinatorial point equality. + * + * When it is not possible to produce a combinatorial manifold surface + * (for example, if the polygon soup makes up a Möbius strip), * some points are duplicated. * Because a polygon soup does not have any connectivity (each point * has as many occurrences as the number of polygons it belongs to), * duplicating one point (or a pair of points) - * amounts to duplicate the polygon to which it belongs. + * amounts to duplicating the polygon to which it belongs. * * These points are either an endpoint of an edge incident to more * than two polygons, an endpoint of an edge between @@ -520,8 +530,8 @@ struct Polygon_soup_orienter * \cgalParamNEnd * \cgalNamedParamsEnd * - * @return `true` if the orientation operation succeded. - * @return `false` if some points were duplicated, thus producing a self-intersecting polyhedron. + * @return `true` if the orientation operation succeeded. + * @return `false` if some points were duplicated, thus producing a combinatorially manifold but self-intersecting polyhedron. * * @sa `orient_triangle_soup_with_reference_triangle_mesh()` */ diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h index 2d2b708d..6a48e96f 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h $ -// $Id: orient_polygon_soup_extension.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h $ +// $Id: include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -159,7 +159,7 @@ void orient_triangle_soup_with_reference_triangle_soup(const ReferencePointRange typedef typename boost::property_traits::reference PM2_Point_ref; typedef typename boost::property_traits::value_type Point_3; - CGAL_static_assertion((std::is_same::value_type>::value)); + static_assert(std::is_same::value_type>::value); typedef typename CGAL::Kernel_traits::Kernel K; typedef typename K::Triangle_3 Triangle; @@ -215,8 +215,8 @@ void orient_triangle_soup_with_reference_triangle_soup(const ReferencePointRange }; #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(std::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #else if(std::is_convertible::value) tbb::parallel_for(std::size_t(0), faces.size(), std::size_t(1), process_facet); @@ -309,7 +309,7 @@ void orient_triangle_soup_with_reference_triangle_mesh(const TriangleMesh& tm_re PointMap point_map = NP_helper::get_const_point_map(points, np2); - CGAL_static_assertion((std::is_same::value_type>::value)); + static_assert(std::is_same::value_type>::value); K k = choose_parameter(get_parameter(np1, internal_np::geom_traits)); @@ -352,10 +352,10 @@ void orient_triangle_soup_with_reference_triangle_mesh(const TriangleMesh& tm_re }; #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #else - if (boost::is_convertible::value) + if (std::is_convertible::value) tbb::parallel_for(std::size_t(0), triangles.size(), std::size_t(1), process_facet); else #endif diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/orientation.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/orientation.h index 136d7bd8..5f152b50 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/orientation.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/orientation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h $ -// $Id: orientation.h 8a3184a 2023-02-24T16:13:44+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h $ +// $Id: include/CGAL/Polygon_mesh_processing/orientation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -434,7 +434,7 @@ void orient(TriangleMesh& tm, // set the connected component id of each face std::size_t nb_cc = connected_components(tm, - bind_property_maps(fid_map,make_property_map(face_cc)), + make_compose_property_map(fid_map,make_property_map(face_cc)), parameters::face_index_map(fid_map)); // extract a vertex with max z coordinate for each connected component @@ -844,7 +844,7 @@ volume_connected_components(const TriangleMesh& tm, // set the connected component id of each face const std::size_t nb_cc = connected_components(tm, - bind_property_maps(fid_map,make_property_map(face_cc)), + make_compose_property_map(fid_map,make_property_map(face_cc)), parameters::face_index_map(fid_map)); // contains for each CC the CC that are in its bounded side @@ -953,7 +953,7 @@ volume_connected_components(const TriangleMesh& tm, // init the main loop // similar as above but exclusively contains cc ids included by more that one CC. - // The result will be then merged with nested_cc_per_cc but temporarilly we need + // The result will be then merged with nested_cc_per_cc but temporarily we need // another container to not more than once the inclusion testing (in case a CC is // included by more than 2 CC) + associate such CC to only one volume std::vector > nested_cc_per_cc_shared(nb_cc); @@ -1145,7 +1145,7 @@ volume_connected_components(const TriangleMesh& tm, if (is_cc_outward_oriented[cc_id]==is_cc_outward_oriented[ncc_id]) { // the surface component has an incorrect orientation wrt to its parent: - // we dump it and all included surface components as independant volumes. + // we dump it and all included surface components as independent volumes. cc_volume_ids[ncc_id] = next_volume_id++; error_codes.push_back(INCOMPATIBLE_ORIENTATION); if (used_as_a_predicate) return 0; @@ -1378,7 +1378,7 @@ void orient_to_bound_a_volume(TriangleMesh& tm, parameters::vertex_point_map(vpm) .geom_traits(gt) .nesting_levels(boost::ref(nesting_levels)) - .face_connected_component_map(bind_property_maps(fid_map,make_property_map(face_cc))) + .face_connected_component_map(make_compose_property_map(fid_map,make_property_map(face_cc))) .i_used_for_volume_orientation(true) .do_orientation_tests(true) .is_cc_outward_oriented(boost::ref(is_cc_outward_oriented)) @@ -1626,6 +1626,10 @@ void merge_reversible_connected_components(PolygonMesh& pm, * identifies faces whose orientation must be reversed in order to enable stitching of connected components. * Each face is assigned a bit (`false` or `true`) * such that two faces have compatible orientations iff they are assigned the same bits. + * If `pm` features several connected components (ignoring edge orientations), the property map passed + * to the named parameter `face_partition_id_map` will indicate for each face to which connected component it belongs. + * Note that two faces in different connected components are not impacting each others' orientations, + * so comparing their associated bits in `face_bit_map` is irrelevant. * * @tparam PolygonMesh a model of `HalfedgeListGraph`, `FaceGraph`. * @tparam FaceBitMap a model of `WritablePropertyMap` with `face_descriptor` as key and `bool` as value_type diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h index 3aa6d8d5..c02f9523 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h $ -// $Id: polygon_mesh_to_polygon_soup.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h $ +// $Id: include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -39,7 +39,7 @@ struct PM_to_PS_point_converter { PS_Point operator()(const PM_Point& p) const { - CGAL_static_assertion((std::is_convertible::value)); + static_assert(std::is_convertible::value); return PS_Point(p); } }; @@ -55,7 +55,7 @@ struct PM_to_PS_point_converter > } // namespace internal -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// adds the vertices and faces of a mesh into a (possibly non-empty) polygon soup. /// @@ -84,7 +84,7 @@ struct PM_to_PS_point_converter > /// /// \cgalAdvancedBegin /// `PolygonRange` can also be a model of the concepts `RandomAccessContainer` and `BackInsertionSequence` -/// whose value type is an array, but it is the user's responsability to ensure that +/// whose value type is an array, but it is the user's responsibility to ensure that /// all faces have the same number of vertices, and that this number is equal to the size of the array. /// \cgalAdvancedEnd /// diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h index 56a5d584..29433c0d 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h $ -// $Id: polygon_soup_to_polygon_mesh.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h $ +// $Id: include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -42,7 +43,7 @@ namespace internal { template PM_Point convert_to_pm_point(const PS_Point& p) { - CGAL_static_assertion((std::is_convertible::value)); + static_assert(std::is_convertible::value); return PM_Point(p); } @@ -53,6 +54,18 @@ PM_Point convert_to_pm_point(const std::array& p) return PM_Point(p[0], p[1], p[2]); } +template ::type> +struct Polygon_and_Point_id_helper +{ + typedef std::remove_cv_t> type; +}; + +template +struct Polygon_and_Point_id_helper +{ + typedef std::size_t type; +}; + template ::const_type> @@ -74,15 +87,21 @@ class PS_to_PM_converter m_pm(pm) { } - template + template //polygonindex-2-face void operator()(PolygonMesh& pmesh, VertexPointMap vpm, + V2V i2v, + F2F i2f, const bool insert_isolated_vertices = true) { typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef typename boost::property_traits::value_type PM_Point; + typedef typename Polygon_and_Point_id_helper::type Point_id; + typedef typename Polygon_and_Point_id_helper::type Polygon_id; + reserve(pmesh, static_cast::vertices_size_type>(m_points.size()), static_cast::edges_size_type>(2*m_polygons.size()), static_cast::faces_size_type>(m_polygons.size())); @@ -101,7 +120,7 @@ class PS_to_PM_converter } std::vector vertices(m_points.size()); - for(std::size_t i = 0, end = m_points.size(); i < end; ++i) + for(Point_id i = 0, end = static_cast(m_points.size()); i < end; ++i) { if(!insert_isolated_vertices && !not_isolated.test(i)) continue; @@ -109,9 +128,10 @@ class PS_to_PM_converter vertices[i] = add_vertex(pmesh); PM_Point pi = convert_to_pm_point(get(m_pm, m_points[i])); put(vpm, vertices[i], pi); + *i2v++ = std::make_pair(i, vertices[i]); } - for(std::size_t i = 0, end = m_polygons.size(); i < end; ++i) + for(Polygon_id i = 0, end = static_cast(m_polygons.size()); i < end; ++i) { const Polygon& polygon = m_polygons[i]; const std::size_t size = polygon.size(); @@ -121,9 +141,9 @@ class PS_to_PM_converter for(std::size_t j = 0; j < size; ++j) vr[j] = vertices[polygon[j] ]; - CGAL_assertion_code(typename boost::graph_traits::face_descriptor fd =) - CGAL::Euler::add_face(vr, pmesh); - CGAL_assertion(fd != boost::graph_traits::null_face()); + typename boost::graph_traits::face_descriptor fd = CGAL::Euler::add_face(vr, pmesh); + CGAL_postcondition(is_valid_face_descriptor(fd, pmesh)); + *i2f++ = std::make_pair(i, fd); } } @@ -131,7 +151,11 @@ class PS_to_PM_converter void operator()(PolygonMesh& pmesh, const bool insert_isolated_vertices = true) { - return operator()(pmesh, get(CGAL::vertex_point, pmesh), insert_isolated_vertices); + return operator()(pmesh, + get(CGAL::vertex_point, pmesh), + CGAL::Emptyset_iterator(), + CGAL::Emptyset_iterator(), + insert_isolated_vertices); } private: @@ -143,7 +167,7 @@ class PS_to_PM_converter } // namespace internal /** -* \ingroup PMP_repairing_grp +* \ingroup PMP_combinatorial_repair_grp * * \brief returns `true` if the soup of polygons defines a valid polygon * mesh that can be handled by @@ -173,7 +197,7 @@ bool is_polygon_soup_a_polygon_mesh(const PolygonRange& polygons) typedef typename boost::range_value::type Polygon; typedef typename boost::range_value::type V_ID; - if(boost::begin(polygons) == boost::end(polygons)) + if(std::begin(polygons) == std::end(polygons)) return true; //check there is no duplicated ordered edge, and @@ -189,7 +213,7 @@ bool is_polygon_soup_a_polygon_mesh(const PolygonRange& polygons) return false; polygon_vertices.clear(); - V_ID prev = *std::prev(boost::end(polygon)); + V_ID prev = *std::prev(std::end(polygon)); for(V_ID id : polygon) { if(max_id::%vertex_descriptor>`} +* \cgalParamDefault{`Emptyset_iterator`} +* \cgalParamNEnd +* +* \cgalParamNBegin{polygon_to_face_output_iterator} +* \cgalParamDescription{an `OutputIterator` containing the pairs polygon-index +* from `polygons`, target-face.} +* \cgalParamType{a class model of `OutputIterator` accepting +* `std::pair::%face_descriptor>`} +* \cgalParamDefault{`Emptyset_iterator`} +* \cgalParamNEnd +* +* \cgalParamNBegin{point_to_vertex_map} +* \cgalParamDescription{a property map associating each soup point of `points` to a vertex of `out`.} +* \cgalParamType{a class model of `ReadablePropertyMap` with an integer type as key type and +* `boost::graph_traits::%vertex_descriptor` as value type.} +* \cgalParamDefault{unused} +* \cgalParamNEnd +* +* \cgalParamNBegin{polygon_to_face_map} +* \cgalParamDescription{a property map associating each soup polygon of `polygons` to a face of `out`} +* \cgalParamType{a class model of `ReadablePropertyMap` with an integer type as key type and +* `boost::graph_traits::%face_descriptor` as value type.} +* \cgalParamDefault{unused} +* \cgalParamNEnd +* * \cgalNamedParamsEnd * * @param np_pm an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below @@ -292,7 +347,18 @@ void polygon_soup_to_polygon_mesh(const PointRange& points, get_property_map(CGAL::vertex_point, out)); internal::PS_to_PM_converter converter(points, polygons, pm); - converter(out, vpm); + converter(out, vpm, + choose_parameter(get_parameter(np_ps, internal_np::point_to_vertex_output_iterator), + impl::make_functor(get_parameter(np_ps, internal_np::point_to_vertex_map))), + choose_parameter(get_parameter(np_ps, internal_np::polygon_to_face_output_iterator), + impl::make_functor(get_parameter(np_ps, internal_np::polygon_to_face_map)))); + + static_assert( + (parameters::is_default_parameter::value), + "Named parameter vertex_to_vertex_map was renamed point_to_vertex_map"); + static_assert( + (parameters::is_default_parameter::value), + "Named parameter face_to_face_map was renamed polygon_to_face_map"); } } // namespace Polygon_mesh_processing diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/random_perturbation.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/random_perturbation.h index c4c54f78..d8c809b7 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/random_perturbation.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/random_perturbation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/random_perturbation.h $ -// $Id: random_perturbation.h bb0b9a8 2022-03-07T15:32:37+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/random_perturbation.h $ +// $Id: include/CGAL/Polygon_mesh_processing/random_perturbation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/refine.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/refine.h index d48ccc49..68acf558 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/refine.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/refine.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/refine.h $ -// $Id: refine.h bb0b9a8 2022-03-07T15:32:37+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/refine.h $ +// $Id: include/CGAL/Polygon_mesh_processing/refine.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #include -#include +#include #include diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/refine_mesh_at_isolevel.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/refine_mesh_at_isolevel.h new file mode 100644 index 00000000..1fc10ade --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/refine_mesh_at_isolevel.h @@ -0,0 +1,174 @@ +// Copyright (c) 2021-2023 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/refine_mesh_at_isolevel.h $ +// $Id: include/CGAL/Polygon_mesh_processing/refine_mesh_at_isolevel.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Sebastien Loriot + +#ifndef CGAL_POLYGON_MESH_PROCESSING_REFINE_MESH_AT_ISOLEVEL_H +#define CGAL_POLYGON_MESH_PROCESSING_REFINE_MESH_AT_ISOLEVEL_H + +#include + +#include +#include + +#include +#include + +namespace CGAL { +namespace Polygon_mesh_processing { + +/*! + * \ingroup PkgPolygonMeshProcessingRef + * + * refines `pm` by adding new vertices on edges having their incident vertices associated with + * values respectively larger and smaller than `isovalue` in `value_map`. + * The placement of new vertices on edges will be done by linear interpolation + * using the aforementioned values. + * New vertices will be associated `isovalue` in `value_map` when created. + * Additionally, new edges will be added by connecting new vertices created sharing + * a common incident face. Note that in case more than two new vertices are added + * on a face boundary, no edges will be created in that face. + * + * @tparam PolygonMesh a model of the concepts `EdgeListGraph` and `FaceListGraph` + * @tparam ValueMap a model of the concept `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` + * as key type and with its value type being the type of the coordinates of points associated with vertices + * in the vertex map provided to the `vertex_point_map()` named parameter. + * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" for `pm` + * + * @param pm the polygon mesh to be refined. + * @param value_map the property map containing a value at each vertex for a given function defined over the mesh. + * @param isovalue the value used to refine + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{edge_is_constrained_map} + * \cgalParamDescription{an output property map associating `true` to all edges connecting vertices on the isolevel, + * and `false` for all other edges.} + * \cgalParamType{a class model of `WritablePropertyMap` with `boost::graph_traits::%edge_descriptor` + * as key type and `bool` as value type} + * \cgalParamDefault{No marks on edges will be put} + * \cgalParamNEnd + * + * \cgalParamNBegin{vertex_point_map} + * \cgalParamDescription{a property map associating points to the vertices of `pm`} + * \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` + * as key type and `%Point_3` as value type} + * \cgalParamDefault{`boost::get(CGAL::vertex_point, pm)`} + * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + * must be available in `PolygonMesh`.} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + */ +template +void refine_mesh_at_isolevel(PolygonMesh& pm, + ValueMap value_map, + typename boost::property_traits::value_type isovalue, + const NamedParameters& np = parameters::default_values()) +{ + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::edge_descriptor edge_descriptor; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::face_descriptor face_descriptor; + typedef typename boost::property_traits::value_type FT; + + using parameters::choose_parameter; + using parameters::get_parameter; + using parameters::is_default_parameter; + + typedef Static_boolean_property_map Default_ECM; + typedef typename internal_np::Lookup_named_param_def::type ECM; + typedef typename GetVertexPointMap < PolygonMesh, NamedParameters>::type VPM; + + VPM vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), + get_property_map(vertex_point, pm)); + + ECM ecm = choose_parameter(get_parameter(np, internal_np::edge_is_constrained), Default_ECM()); + + std::unordered_map > faces_to_split; + std::vector to_split; + std::unordered_set vertices_on_isoline; + for (edge_descriptor e : edges(pm)) + { + vertex_descriptor src = source(e, pm), tgt = target(e, pm); + + if (get(value_map, src)==isovalue) + { + vertices_on_isoline.insert(src); + if (get(value_map, tgt)==isovalue) + { + put(ecm, e, true); // special case for faces entirely on an isovalue + continue; + } + continue; + } + if (get(value_map, tgt)==isovalue) + { + vertices_on_isoline.insert(tgt); + continue; + } + if ( (get(value_map, tgt) < isovalue) != (get(value_map, src) < isovalue) ) + { + to_split.push_back(e); + } + } + + for (edge_descriptor e : to_split) + { + vertex_descriptor src = source(e, pm), tgt = target(e, pm); + FT ds = get(value_map, src); + FT dt = get(value_map, tgt); + FT alpha = (isovalue - dt) / (ds - dt); + halfedge_descriptor hnew = CGAL::Euler::split_edge(halfedge(e, pm), pm); + put(vpm, target(hnew, pm), barycenter(get(vpm,src), alpha, get(vpm, tgt), 1-alpha)); + put(value_map, target(hnew, pm) , isovalue); + face_descriptor f = face(hnew, pm); + if (f!=boost::graph_traits::null_face()) + faces_to_split[f].push_back(hnew); + hnew=pm.prev(opposite(hnew, pm)); + f = face(hnew, pm); + if (f!=boost::graph_traits::null_face()) + faces_to_split[f].push_back(hnew); + } + + for (vertex_descriptor vh : vertices_on_isoline) + { + for (halfedge_descriptor h : halfedges_around_target(vh, pm)) + { + face_descriptor f = face(h, pm); + if (f!=boost::graph_traits::null_face()) + faces_to_split[f].push_back(h); + } + } + + for (const auto& p : faces_to_split) + { + if(p.second.size()!=2) continue; + + std::pair res = edge(target(p.second[0],pm), + target(p.second[1],pm), pm); + if (res.second) + { + // no split as the edge already exists (the two vertices are on the isolevel) + put(ecm, res.first, true); + continue; + } + + halfedge_descriptor hnew = CGAL::Euler::split_face(p.second[0], p.second[1], pm); + put(ecm, edge(hnew, pm), true); + } +} + +} } // end of CGAL::Polygon_mesh_processing + + +#endif diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/region_growing.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/region_growing.h new file mode 100644 index 00000000..c871f308 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/region_growing.h @@ -0,0 +1,515 @@ +// Copyright (c) 2022 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Polygon_mesh_processing/region_growing.h $ +// $Id: include/CGAL/Polygon_mesh_processing/region_growing.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Sébastien Loriot + + +#ifndef CGAL_POLYGON_MESH_PROCESSING_REGION_GROWING_H +#define CGAL_POLYGON_MESH_PROCESSING_REGION_GROWING_H + +#include + +#include +#include +#include +#include +#include +#include + +namespace CGAL { +namespace Polygon_mesh_processing { + +namespace internal +{ + template + void fill_region_primitive_map(const std::vector&, internal_np::Param_not_found) {} + + template + void fill_plane_or_vector_map(const std::vector& normals, RegionMap region_map, typename GT::Vector_3) + { + typedef typename boost::property_traits::key_type KT; + for (KT i = 0 ; i(normals.size()); ++i) + put(region_map, i, normals[i].first.orthogonal_vector()); + } + + template + void fill_plane_or_vector_map(const std::vector& normals, RegionMap region_map, typename GT::Plane_3) + { + typedef typename boost::property_traits::key_type KT; + for (KT i = 0; i < static_cast(normals.size()); ++i) + put(region_map, i, normals[i].first); + } + + template + void fill_region_primitive_map(const std::vector& normals, RegionMap region_map) + { + fill_plane_or_vector_map(normals, region_map, typename boost::property_traits::value_type()); + } + +template +class One_ring_neighbor_query_with_constraints +{ + using face_descriptor = typename boost::graph_traits::face_descriptor; + using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; + using Face_graph = PolygonMesh; +public: + + using Item = typename boost::graph_traits::face_descriptor; + using Region = std::vector; + + One_ring_neighbor_query_with_constraints(const PolygonMesh& pmesh, ECM ecm) + : m_face_graph(pmesh) + , m_ecm(ecm) + {} + + void operator()( + const Item query, + std::vector& neighbors) const { + + neighbors.clear(); + const auto query_hedge = halfedge(query, m_face_graph); + + for (halfedge_descriptor h : halfedges_around_face(query_hedge, m_face_graph)) + { + if (get(m_ecm, edge(h, m_face_graph))) continue; + face_descriptor f=face(opposite(h,m_face_graph), m_face_graph); + if (f != boost::graph_traits::null_face()) + { + neighbors.push_back(f); + } + } + } + +private: + const Face_graph& m_face_graph; + ECM m_ecm; +}; + +} + +/*! + \ingroup PkgPolygonMeshProcessingRef + \brief applies a region growing algorithm to fit planes on faces of a mesh. + + See Section \ref Shape_detection_RegionGrowing for more details on the method. + + @tparam PolygonMesh a model of `FaceListGraph` + @tparam RegionMap a model of `WritablePropertyMap` with `boost::graph_traits::%face_descriptor` as key type and `std::size_t` as value type. + @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + + @param mesh the polygon mesh whose faces are used for region growing + @param region_map a property map storing the region index of each face. Values start at `0` up to the value returned minus `1`. + `std::size_t(-1)` is put for faces with no region assigned (can only happen if `minimum_region_size > 1`). + @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below + + @return the number of regions detected + + \cgalNamedParamsBegin + \cgalParamNBegin{maximum_distance} + \cgalParamDescription{the maximum distance from a face to a plane such that it is considered part of the region of the plane} + \cgalParamType{`GeomTraits::FT` with `GeomTraits` being the type of the parameter `geom_traits`} + \cgalParamDefault{1} + \cgalParamNEnd + \cgalParamNBegin{maximum_angle} + \cgalParamDescription{the maximum angle (in degrees) between the normals of the supporting planes of two adjacent faces + such that they are considered part of the same region} + \cgalParamType{`GeomTraits::FT` with `GeomTraits` being the type of the parameter `geom_traits`} + \cgalParamDefault{25 degrees} + \cgalParamExtra{this parameter and `cosine_of_maximum_angle` are exclusive} + \cgalParamNEnd + \cgalParamNBegin{postprocess_regions} + \cgalParamDescription{Apply a post-processing step to the output of the region growing algorithm.} + \cgalParamType{`bool`} + \cgalParamDefault{false} + \cgalParamNEnd + \cgalParamNBegin{cosine_of_maximum_angle} + \cgalParamDescription{The maximum angle, given as a cosine, between the normals of the supporting planes of adjacent faces + such that they are considered part of the same region} + \cgalParamType{`GeomTraits::FT` with `GeomTraits` being the type of the parameter `geom_traits`} + \cgalParamDefault{`cos(25 * PI / 180)`} + \cgalParamExtra{this parameter and `maximum_angle` are exclusive} + \cgalParamNEnd + \cgalParamNBegin{minimum_region_size} + \cgalParamDescription{the minimum number of faces such that a new region can be created from a set of faces} + \cgalParamType{`std::size_t`} + \cgalParamDefault{1} + \cgalParamNEnd + \cgalParamNBegin{vertex_point_map} + \cgalParamDescription{a property map associating points to the vertices of `mesh`} + \cgalParamType{a class model of `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` + as key type and `%Point_3` as value type} + \cgalParamDefault{`boost::get(CGAL::vertex_point, mesh)`} + \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + must be available in `PolygonMesh`.} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of a geometric traits class} + \cgalParamType{a class model of `Kernel`} + \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} + \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} + \cgalParamNEnd + \cgalParamNBegin{region_primitive_map} + \cgalParamDescription{a property map filled by this function and that will contain for each region + the plane (or only its orthognonal vector) estimated that approximates it.} + \cgalParamType{a class model of `WritablePropertyMap` with the value type of `RegionMap` as key and + `GeomTraits::Plane_3` or `GeomTraits::Vector_3` as value type, + `GeomTraits` being the type of the parameter `geom_traits`} + \cgalParamDefault{None} + \cgalParamNEnd + \cgalNamedParamsEnd + */ +template +std::size_t +region_growing_of_planes_on_faces(const PolygonMesh& mesh, + RegionMap region_map, + const NamedParameters& np = parameters::default_values()) +{ + namespace RG_PM = CGAL::Shape_detection::Polygon_mesh; + + using VPM = typename GetVertexPointMap < PolygonMesh, NamedParameters>::const_type; + using Traits = typename GetGeomTraits::type; + + using parameters::choose_parameter; + using parameters::get_parameter; + + typedef typename boost::graph_traits::edge_descriptor edge_descriptor; + typedef typename internal_np::Lookup_named_param_def < + internal_np::edge_is_constrained_t, + NamedParameters, + Static_boolean_property_map // default (no constraint pmap) + > ::type ECM; + ECM ecm = choose_parameter(get_parameter(np, internal_np::edge_is_constrained), + Static_boolean_property_map()); + + using Neighbor_query = internal::One_ring_neighbor_query_with_constraints; + using Region_type = RG_PM::Least_squares_plane_fit_region; + using Sorting = RG_PM::Least_squares_plane_fit_sorting; + using Region_growing = CGAL::Shape_detection::Region_growing; + + Neighbor_query neighbor_query(mesh, ecm); + Region_type region_type(mesh, np); + Sorting sorting(mesh, neighbor_query, np); + sorting.sort(); + + std::vector regions; + Region_growing region_growing( + faces(mesh), sorting.ordered(), neighbor_query, region_type, region_map); + + typedef typename boost::graph_traits::face_descriptor face_descriptor; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + std::vector > > tmp; + region_growing.detect(std::back_inserter(tmp)); + + if (choose_parameter(get_parameter(np, internal_np::postprocess_regions), false)) + { + // first try for a post-processing: look at regions made of one face and check if a + // larger region contains its 3 vertices and if so assigned it to it. + typedef typename boost::property_traits::value_type Id; + for (std::size_t i=0; i vertex_incidence; + halfedge_descriptor h0 = halfedge(f0, mesh); + for (int k=0; k<3; ++k) + { + std::set ids_for_v; + for (halfedge_descriptor h : halfedges_around_target(h0, mesh)) + { + if (!is_border(h, mesh)) + { + Id id = get(region_map, face(h, mesh)); + if (std::size_t(id)!=i) + ids_for_v.insert(id); + } + } + h0=next(h0, mesh); + for (Id id : ids_for_v) + vertex_incidence.insert(std::make_pair(id, 0)).first->second+=1; + } + std::set candidates; + for (const std::pair& p : vertex_incidence) + { + if (p.second == 3) + candidates.insert(p.first); + } + if (candidates.size() == 1) + { + Id new_id = *candidates.begin(); + put(region_map, f0, static_cast(new_id)); + tmp[new_id].second.push_back(f0); + tmp[i].second.clear(); + } + } + } + auto last = std::remove_if(tmp.begin(), tmp.end(), + [](const std::pair>& p) + {return p.second.empty();}); + tmp.erase(last, tmp.end()); + + //update region map + for (Id i=0; i(tmp.size()); ++i) + { + for (face_descriptor f : tmp[i].second) + put(region_map, f, i); + } + + } + + internal::fill_region_primitive_map(tmp, parameters::get_parameter(np, internal_np::region_primitive_map)); + + return tmp.size(); +} + +/*! + \ingroup PkgPolygonMeshProcessingRef + \brief detects the corners on the boundary of almost planar regions by applying the region growing algorithm fitting lines on segment edges of a partition of a mesh. + + More precisely, a corner on the boundary of a region is a vertex that is either shared by at least three regions (two if it is also a vertex on the boundary of the mesh), or that is incident to two segments edges assigned to different lines. + See Section \ref Shape_detection_RegionGrowing for more details on the method. + + @tparam PolygonMesh a model of `FaceListGraph` and `EdgeListGraph` + @tparam RegionMap a model of `ReadablePropertyMap` with `boost::graph_traits::%face_descriptor` as key type and `std::size_t` as value type. + @tparam CornerIdMap a model of `WritablePropertyMap` with `boost::graph_traits::%vertex_descriptor` as key type and `std::size_t` as value type. + @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + + @param mesh polygon mesh for region growing. + @param region_map property map providing the region index of each face, values must be in `[0, nb_regions-1]`. + @param corner_id_map property map storing the corner index of each vertex. Values start at `0` up to the value returned minus 1. + `std::size_t(-1)` is put for vertices that are not corners. + @param nb_regions the number of patches in the partition of `mesh` defined by `region_map` + @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below + + @return the number of corners detected + + \cgalNamedParamsBegin + \cgalParamNBegin{edge_is_constrained_map} + \cgalParamDescription{a property map filled by this function such that an edge is marked as constrained + if it is at the interface of two different regions or on the boundary of the mesh} + \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%edge_descriptor` + as key type and `bool` as value type} + \cgalParamDefault{Unused if not provided} + \cgalParamExtra{The value for each edge must be initialized to `false`.} + \cgalParamNEnd + \cgalParamNBegin{maximum_distance} + \cgalParamDescription{the maximum distance from a segment to a line such that it is considered part of the region of the line} + \cgalParamType{`GeomTraits::FT` with `GeomTraits` being the type of the parameter `geom_traits`} + \cgalParamDefault{1} + \cgalParamNEnd + \cgalParamNBegin{maximum_angle} + \cgalParamDescription{the maximum angle in degrees between two adjacent segments + such that they are considered part of the same region} + \cgalParamType{`GeomTraits::FT` with `GeomTraits` being the type of the parameter `geom_traits`} + \cgalParamDefault{25 degrees} + \cgalParamExtra{this parameter and `cosine_of_maximum_angle` are exclusive} + \cgalParamNEnd + \cgalParamNBegin{cosine_of_maximum_angle} + \cgalParamDescription{The maximum angle, given as a cosine, for the smallest angle + between the supporting line of a segment and an adjacent segment + such that they are considered part of the same region} + \cgalParamType{`GeomTraits::FT` with `GeomTraits` being the type of the parameter `geom_traits`} + \cgalParamDefault{`cos(25 * PI / 180)`} + \cgalParamExtra{this parameter and `maximum_angle` are exclusive} + \cgalParamNEnd + \cgalParamNBegin{vertex_point_map} + \cgalParamDescription{a property map associating points to the vertices of `mesh`} + \cgalParamType{a class model of `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` + as key type and `%Point_3` as value type} + \cgalParamDefault{`boost::get(CGAL::vertex_point, mesh)`} + \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + must be available in `PolygonMesh`.} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of a geometric traits class} + \cgalParamType{a class model of `Kernel`} + \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} + \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} + \cgalParamNEnd + \cgalNamedParamsEnd + */ +template +std::size_t +detect_corners_of_regions( + const PolygonMesh& mesh, + RegionMap region_map, + std::size_t nb_regions, + CornerIdMap corner_id_map, + const NamedParameters& np = parameters::default_values()) +{ + using parameters::choose_parameter; + using parameters::get_parameter; + using parameters::is_default_parameter; + + using Traits = typename GetGeomTraits::type; + using Graph_traits = boost::graph_traits; + using halfedge_descriptor = typename Graph_traits::halfedge_descriptor; + using edge_descriptor = typename Graph_traits::edge_descriptor; + using face_descriptor = typename Graph_traits::face_descriptor; + using vertex_descriptor = typename Graph_traits::vertex_descriptor; + + using Default_ecm = typename boost::template property_map >::const_type; + using Ecm = typename internal_np::Lookup_named_param_def < + internal_np::edge_is_constrained_t, + NamedParameters, + Default_ecm + > ::type; + + Default_ecm dynamic_ecm; + if(is_default_parameter::value) + { + dynamic_ecm = get(CGAL::dynamic_edge_property_t(), mesh); + for (edge_descriptor e : edges(mesh)) + put(dynamic_ecm, e, false); + } + Ecm ecm = choose_parameter(get_parameter(np, internal_np::edge_is_constrained), dynamic_ecm); + + using Polyline_graph = CGAL::Shape_detection::Polygon_mesh::Polyline_graph; + using Segment_map = typename Polyline_graph::Segment_map; + using Item = typename Polyline_graph::Item; + + using Line_region = CGAL::Shape_detection::Segment_set::Least_squares_line_fit_region; + using Line_sorting = CGAL::Shape_detection::Segment_set::Least_squares_line_fit_sorting; + using RG_lines = CGAL::Shape_detection::Region_growing; + + // mark as constrained edges at the interface of two regions + for (edge_descriptor e : edges(mesh)) + { + halfedge_descriptor h = halfedge(e, mesh); + face_descriptor f1 = face(h, mesh); + face_descriptor f2 = face(opposite(h, mesh), mesh); + // an edge is constrained if it is a border edge or if the regions assigned to the two faces are different + if (f1 == Graph_traits::null_face() || f2 == Graph_traits::null_face() || get(region_map,f1)!=get(region_map,f2)) + put(ecm, e, true); + } + + //init to -1 by default + for(vertex_descriptor v : vertices(mesh)) + { + put(corner_id_map, v, std::size_t(-1)); + } + + // filter trivial edges: incident to a plane with only one face + // such an edge cannot be removed and its vertices are corners + std::vector nb_faces_per_patch(nb_regions,0); + for(face_descriptor f : faces(mesh)) + { + std::size_t pid = get(region_map, f); + nb_faces_per_patch[pid]+=1; + } + + std::vector filtered_edges, trivial_edges; + for (edge_descriptor e : edges(mesh)) + { + halfedge_descriptor h=halfedge(e,mesh); + std::size_t r1 = is_border(h, mesh)?std::size_t(-1):get(region_map, face(h, mesh)); + h=opposite(h, mesh); + std::size_t r2 = is_border(h, mesh)?std::size_t(-1):get(region_map, face(h, mesh)); + if ( (r1!=std::size_t(-1) && nb_faces_per_patch[r1]==1) || (r2!=std::size_t(-1) && nb_faces_per_patch[r2]==1) ) + trivial_edges.push_back(e); + else + filtered_edges.push_back(e); + } + + Polyline_graph pgraph(mesh, filtered_edges, region_map); + const auto& segment_range = pgraph.segment_range(); + + Line_region line_region(np.segment_map(pgraph.segment_map())); + + std::vector< std::pair > > subregions; // TODO dump into pmap lines + if (!segment_range.empty()) + { + Line_sorting line_sorting( + segment_range, pgraph, CGAL::parameters::segment_map(pgraph.segment_map())); + line_sorting.sort(); + + RG_lines rg_lines( + segment_range, pgraph, line_region); + + rg_lines.detect(std::back_inserter(subregions)); + } + +#ifdef CGAL_DEBUG_DETECT_CORNERS_OF_REGIONS + std::ofstream debug_corners("corners.xyz"); + debug_corners.precision(17); + std::ofstream debug_edges("contraints.polylines.txt"); + debug_edges.precision(17); +#endif + + // detect vertex corner id + std::size_t cid=0; + for (const std::pair>& r : subregions) + { + std::vector vertex_count(num_vertices(mesh), 0); + std::vector line_vertices; + auto register_vertex = [&vertex_count, &line_vertices] + (vertex_descriptor v) + { + if (vertex_count[v]==0) + line_vertices.push_back(v); + vertex_count[v]+=1; + }; + for (edge_descriptor e : r.second) + { + put(ecm, e, true); + register_vertex(source(e, mesh)); + register_vertex(target(e, mesh)); +#ifdef CGAL_DEBUG_DETECT_CORNERS_OF_REGIONS + debug_edges << "2 " << mesh.point(source(e, mesh)) << " " << mesh.point(target(e, mesh)) << "\n"; +#endif + } + + for (vertex_descriptor v : line_vertices) + if (vertex_count[v]==1) + { + if (get(corner_id_map, v) == std::size_t(-1)) + { +#ifdef CGAL_DEBUG_DETECT_CORNERS_OF_REGIONS + debug_corners << mesh.point(v) << "\n"; +#endif + put(corner_id_map, v, cid++); + } + } + } + + // process trivial edges (could be done before if needed) + for(edge_descriptor e : trivial_edges) + { +#ifdef CGAL_DEBUG_DETECT_CORNERS_OF_REGIONS + debug_edges << "2 " << mesh.point(source(e, mesh)) << " " << mesh.point(target(e, mesh)) << "\n"; +#endif + put(ecm, e, true); + if (get(corner_id_map, source(e, mesh))==std::size_t(-1)) + { +#ifdef CGAL_DEBUG_DETECT_CORNERS_OF_REGIONS + debug_corners << mesh.point(source(e, mesh)) << "\n"; +#endif + put(corner_id_map, source(e, mesh), cid++); + } + if (get(corner_id_map, target(e, mesh))==std::size_t(-1)) + { +#ifdef CGAL_DEBUG_DETECT_CORNERS_OF_REGIONS + debug_corners << mesh.point(target(e, mesh)) << "\n"; +#endif + put(corner_id_map, target(e, mesh), cid++); + } + } + + return cid; +} + +} } // end of CGAL::Polygon_mesh_processing namespace + +#endif //CGAL_POLYGON_MESH_PROCESSING_REGION_GROWING_H diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/remesh.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/remesh.h index 0155fae2..13da65e8 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/remesh.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/remesh.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h $ -// $Id: remesh.h 477353d 2022-04-20T15:55:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h $ +// $Id: include/CGAL/Polygon_mesh_processing/remesh.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,9 +18,10 @@ #include #include +#include #include -#include +#include #ifdef CGAL_PMP_REMESHING_VERBOSE #include @@ -43,12 +44,15 @@ namespace Polygon_mesh_processing { * and `boost::graph_traits::%halfedge_descriptor` must be * models of `Hashable`. * @tparam FaceRange range of `boost::graph_traits::%face_descriptor`, - model of `Range`. Its iterator type is `ForwardIterator`. +* model of `Range`. Its iterator type is `ForwardIterator`. +* @tparam SizingFunction model of `PMPSizingField` * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" * * @param pmesh a polygon mesh with triangulated surface patches to be remeshed * @param faces the range of triangular faces defining one or several surface patches to be remeshed -* @param target_edge_length the edge length that is targeted in the remeshed patch. +* @param sizing field that determines a target length for individual edges. +* If a number convertible to a `double` is passed, `Uniform_sizing_field()` will be used, +* with the number as a target edge length. * If `0` is passed then only the edge-flip, tangential relaxation, and projection steps will be done. * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below * @@ -193,13 +197,15 @@ namespace Polygon_mesh_processing { */ template + , typename SizingFunction + , typename NamedParameters = parameters::Default_named_parameters + , typename = typename std::enable_if_t>> void isotropic_remeshing(const FaceRange& faces - , const double& target_edge_length + , SizingFunction& sizing , PolygonMesh& pmesh , const NamedParameters& np = parameters::default_values()) { - if (boost::begin(faces)==boost::end(faces)) + if (std::begin(faces)==std::end(faces)) return; typedef PolygonMesh PM; @@ -261,9 +267,6 @@ void isotropic_remeshing(const FaceRange& faces #endif ) ) ); - double low = 4. / 5. * target_edge_length; - double high = 4. / 3. * target_edge_length; - #if !defined(CGAL_NO_PRECONDITIONS) if(protect) { @@ -271,7 +274,7 @@ void isotropic_remeshing(const FaceRange& faces msg.append(" true with constraints larger than 4/3 * target_edge_length."); msg.append(" Remeshing aborted."); CGAL_precondition_msg( - internal::constraints_are_short_enough(pmesh, ecmap, vpmap, fpmap, high), + internal::constraints_are_short_enough(pmesh, ecmap, fpmap, sizing), msg.c_str()); } #endif @@ -303,8 +306,7 @@ void isotropic_remeshing(const FaceRange& faces #ifdef CGAL_PMP_REMESHING_VERBOSE std::cout << std::endl; - std::cout << "Remeshing (size = " << target_edge_length; - std::cout << ", #iter = " << nb_iterations << ")..." << std::endl; + std::cout << "Remeshing (#iter = " << nb_iterations << ")..." << std::endl; t.reset(); t.start(); #endif @@ -313,16 +315,14 @@ void isotropic_remeshing(const FaceRange& faces #ifdef CGAL_PMP_REMESHING_VERBOSE std::cout << " * Iteration " << (i + 1) << " *" << std::endl; #endif - if (target_edge_length>0) - { - if(do_split) - remesher.split_long_edges(high); - if(do_collapse) - remesher.collapse_short_edges(low, high, collapse_constraints); - } + + if(do_split) + remesher.split_long_edges(sizing); + if(do_collapse) + remesher.collapse_short_edges(sizing, collapse_constraints); if(do_flip) remesher.flip_edges_for_valence_and_shape(); - remesher.tangential_relaxation_impl(smoothing_1d, nb_laplacian); + remesher.tangential_relaxation_impl(smoothing_1d, nb_laplacian, sizing); if ( choose_parameter(get_parameter(np, internal_np::do_project), true) ) remesher.project_to_surface(get_parameter(np, internal_np::projection_functor)); #ifdef CGAL_PMP_REMESHING_VERBOSE @@ -332,12 +332,36 @@ void isotropic_remeshing(const FaceRange& faces #ifdef CGAL_PMP_REMESHING_VERBOSE t.stop(); - std::cout << "Remeshing done (size = " << target_edge_length; - std::cout << ", #iter = " << nb_iterations; + std::cout << "Remeshing done (#iter = " << nb_iterations; std::cout << ", " << t.time() << " sec )." << std::endl; #endif } +// Overload when using target_edge_length for sizing +template>> +void isotropic_remeshing(const FaceRange& faces + , const SizingValue target_edge_length + , PolygonMesh& pmesh + , const NamedParameters& np = parameters::default_values()) +{ + using parameters::choose_parameter; + using parameters::get_parameter; + + typedef typename GetVertexPointMap::type VPMap; + VPMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), + get_property_map(vertex_point, pmesh)); + + Uniform_sizing_field sizing(target_edge_length, vpmap); + if (target_edge_length > 0) + isotropic_remeshing(faces, sizing, pmesh, np); + else + isotropic_remeshing(faces, sizing, pmesh, np.do_split(false).do_collapse(false)); +} + /*! * \ingroup PMP_meshing_grp * @brief splits the edges listed in `edges` into sub-edges @@ -352,12 +376,13 @@ void isotropic_remeshing(const FaceRange& faces * has an internal property map for `CGAL::vertex_point_t`. * @tparam EdgeRange range of `boost::graph_traits::%edge_descriptor`, * model of `Range`. Its iterator type is `InputIterator`. +* @tparam SizingFunction model of `PMPSizingField` * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" * * @param pmesh a polygon mesh * @param edges the range of edges to be split if they are longer than given threshold -* @param max_length the edge length above which an edge from `edges` is split -* into to sub-edges +* @param sizing the sizing function that is used to split edges from 'edges' list. If a number convertible to +* a `double` is passed, `Uniform_sizing_field()` will be used, with the number as target edge length. * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below * \cgalNamedParamsBegin @@ -377,6 +402,17 @@ void isotropic_remeshing(const FaceRange& faces * \cgalParamDefault{an automatically indexed internal map} * \cgalParamNEnd * +* \cgalParamNBegin{face_patch_map} +* \cgalParamDescription{a property map with the patch id's associated to the faces of `faces`} +* \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%face_descriptor` +* as key type and the desired property, model of `CopyConstructible` and `LessThanComparable` as value type.} +* \cgalParamDefault{a default property map where each face is associated with the ID of +* the connected component it belongs to. Connected components are +* computed with respect to the constrained edges listed in the property map +* `edge_is_constrained_map`} +* \cgalParamExtra{The map is updated during the remeshing process while new faces are created.} +* \cgalParamNEnd +* * \cgalParamNBegin{edge_is_constrained_map} * \cgalParamDescription{a property map containing the constrained-or-not status of each edge of `pmesh`} * \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%edge_descriptor` @@ -391,9 +427,11 @@ void isotropic_remeshing(const FaceRange& faces */ template + , typename SizingFunction + , typename NamedParameters = parameters::Default_named_parameters + , typename = typename std::enable_if_t>> void split_long_edges(const EdgeRange& edges - , const double& max_length + , SizingFunction& sizing , PolygonMesh& pmesh , const NamedParameters& np = parameters::default_values()) { @@ -421,18 +459,42 @@ void split_long_edges(const EdgeRange& edges ECMap ecmap = choose_parameter(get_parameter(np, internal_np::edge_is_constrained), Static_boolean_property_map()); + typedef typename internal_np::Lookup_named_param_def < + internal_np::face_patch_t, + NamedParameters, + internal::Connected_components_pmap//default + > ::type FPMap; + FPMap fpmap = choose_parameter( + get_parameter(np, internal_np::face_patch), + internal::Connected_components_pmap(faces(pmesh), pmesh, ecmap, fimap, false)); + typename internal::Incremental_remesher, // no constraint pmap - internal::Connected_components_pmap, - FIMap + FPMap,FIMap > remesher(pmesh, vpmap, gt, false/*protect constraints*/, ecmap, Static_boolean_property_map(), - internal::Connected_components_pmap(faces(pmesh), pmesh, ecmap, fimap, false), + fpmap, fimap, false/*need aabb_tree*/); - remesher.split_long_edges(edges, max_length); + remesher.split_long_edges(edges, sizing); +} + +// Convenience overload when using max_length for sizing +template>> +void split_long_edges(const EdgeRange& edges + , const SizingValue max_length + , PolygonMesh& pmesh + , const NamedParameters& np = parameters::default_values()) +{ + // construct the uniform field, 3/4 as m_sq_long is stored with 4/3 of length + Uniform_sizing_field sizing(3. / 4. * max_length, pmesh); + split_long_edges(edges, sizing, pmesh, np); } } //end namespace Polygon_mesh_processing diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h new file mode 100644 index 00000000..b26bc61d --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h @@ -0,0 +1,1673 @@ +// Copyright (c) 2018-2023 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h $ +// $Id: include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Sébastien Loriot + +#ifndef CGAL_POLYGON_MESH_PROCESSING_REMESH_PLANAR_PATCHES_H +#define CGAL_POLYGON_MESH_PROCESSING_REMESH_PLANAR_PATCHES_H + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include + +namespace CGAL{ + +namespace Polygon_mesh_processing { + +namespace Planar_segmentation{ + +template +struct Face_map +{ + typedef typename boost::property_traits::value_type key_type; + typedef typename boost::property_traits::key_type value_type; + typedef value_type reference; + typedef boost::writable_property_map_tag category; + + Face_map(PM pm, const std::vector& face_ids) + : pm(pm) + , face_ids(face_ids) + {} + + friend + void put(Face_map m, key_type k, value_type v) + { + put(m.pm, v, static_cast(m.face_ids[k])); + } + + PM pm; + const std::vector& face_ids; +}; + +template +struct Vertex_map +{ + typedef typename boost::property_traits::value_type key_type; + typedef typename boost::property_traits::key_type value_type; + typedef value_type reference; + typedef boost::writable_property_map_tag category; + + Vertex_map(PM pm) : pm(pm) {} + + friend + void put(Vertex_map m, key_type k, value_type v) + { + put(m.pm, v, k); + } + + PM pm; +}; + +template +struct Default_visitor +{ + void operator()(TriangleMesh&) const {} +}; + +template +struct Face_index_tracker_base +{ + typedef boost::graph_traits GT; + + Face_index_tracker_base(VertexCornerMapOut vertex_corner_map) + : m_v2v2_map(vertex_corner_map) + {} + + Vertex_map v2v_map() + { + return m_v2v2_map; + } + + Vertex_map m_v2v2_map; +}; + +template +struct Face_index_tracker_base +{ + typedef boost::graph_traits GT; + using Vmap = Constant_property_map::vertex_descriptor>; + + Face_index_tracker_base(internal_np::Param_not_found) {} + Vmap v2v_map() { return Vmap(); } +}; + +template +struct Face_index_tracker + : public Face_index_tracker_base +{ + typedef boost::graph_traits GT; + + Face_index_tracker(VertexCornerMapOut vertex_corner_map, FacePatchMapOut face_patch_map) + : Face_index_tracker_base(vertex_corner_map) + , m_f2f_map(face_patch_map, face_ids) + {} + + std::vector face_ids; + + void register_faces_of_cc(std::size_t nb_faces, std::size_t i) + { + face_ids.insert(face_ids.end(), nb_faces, i); + } + + Face_map + f2f_map() + { + return m_f2f_map; + } + + Face_map m_f2f_map; +}; + + +template +struct Face_index_tracker + : public Face_index_tracker_base +{ + using Fmap = Constant_property_map::face_descriptor>; + + Face_index_tracker(VertexCornerMapOut vertex_corner_map,internal_np::Param_not_found) + : Face_index_tracker_base(vertex_corner_map) + {} + + void register_faces_of_cc(std::size_t /*nb_triangles*/, std::size_t /*in_patch_id*/) {} + + Fmap f2f_map() { return Fmap(); } +}; + +template +void init_face_normals(std::vector& face_normals, + std::size_t nb_patches, + PatchNormalMap patch_normal_map) +{ + face_normals.resize(nb_patches); + for (std::size_t i=0; i +void init_face_normals(std::vector& face_normals, + std::size_t nb_patches, + ::CGAL::internal_np::Param_not_found) +{ + face_normals.assign(nb_patches, NULL_VECTOR); +} + +inline std::size_t init_id() +{ + return std::size_t(-2); +} + +inline std::size_t default_id() +{ + return std::size_t(-1); +} + +inline bool is_init_id(std::size_t i) +{ + return i == init_id(); +} + +inline bool is_corner_id(std::size_t i) +{ + return i < init_id(); +} + +template +bool is_vector_positive(const Vector_3& normal) +{ + if (normal.x()==0) + { + if (normal.y()==0) + return normal.z() > 0; + else + return normal.y() > 0; + } + else + return normal.x() > 0; +} + +struct FaceInfo2 +{ + FaceInfo2():m_in_domain(-1){} + int m_in_domain; + + void set_in_domain() { m_in_domain=1; } + void set_out_domain() { m_in_domain=0; } + bool visited() const { return m_in_domain!=-1; } + bool in_domain() const { return m_in_domain==1; } +}; + +template +bool is_edge_between_coplanar_faces(edge_descriptor e, + const TriangleMesh& tm, + double coplanar_cos_threshold, + const VertexPointMap& vpm) +{ + typedef typename boost::property_traits::reference Point_ref_3; + if (is_border(e, tm)) return false; + typename boost::graph_traits::halfedge_descriptor + h = halfedge(e, tm); + Point_ref_3 p = get(vpm, source(h, tm) ); + Point_ref_3 q = get(vpm, target(h, tm) ); + Point_ref_3 r = get(vpm, target(next(h, tm), tm) ); + Point_ref_3 s = get(vpm, target(next(opposite(h, tm), tm), tm) ); + + if (coplanar_cos_threshold==-1) + return coplanar(p, q, r, s); + else + { + typename Kernel::Compare_dihedral_angle_3 pred; + return pred(p, q, r, s, typename Kernel::FT(coplanar_cos_threshold)) == CGAL::LARGER; + } +} + +template +bool is_target_vertex_a_corner(halfedge_descriptor h, + EdgeIsConstrainedMap edge_is_constrained, + const TriangleMesh& tm, + double coplanar_cos_threshold, + const VertexPointMap& vpm) +{ + typedef typename Kernel::Point_3 Point_3; + typedef typename boost::graph_traits graph_traits; + + halfedge_descriptor h2 = graph_traits::null_halfedge(); + for(halfedge_descriptor h_loop : halfedges_around_target(h, tm)) + { + if (h_loop==h) continue; + if (get(edge_is_constrained, edge(h_loop, tm))) + { + if (h2 != graph_traits::null_halfedge()) return true; + h2=h_loop; + } + } + + // handle case when the graph of constraints does not contains only cycle + // (for example when there is a tangency between surfaces and is shared) + if (h2 == graph_traits::null_halfedge()) return true; + + const Point_3& p = get(vpm, source(h, tm)); + const Point_3& q = get(vpm, target(h, tm)); + const Point_3& r = get(vpm, source(h2, tm)); + + if (coplanar_cos_threshold==-1) + return !collinear(p, q, r); + else + { + typename Kernel::Compare_angle_3 pred; + return pred(p, q, r, typename Kernel::FT(coplanar_cos_threshold))==CGAL::SMALLER; + } +} + +template +void +mark_constrained_edges( + const TriangleMesh& tm, + EdgeIsConstrainedMap edge_is_constrained, + double coplanar_cos_threshold, + const VertexPointMap& vpm) +{ + for(typename boost::graph_traits::edge_descriptor e : edges(tm)) + { + if (!get(edge_is_constrained,e)) + if (!is_edge_between_coplanar_faces(e, tm, coplanar_cos_threshold, vpm)) + put(edge_is_constrained, e, true); + } +} + +template +std::size_t +mark_corner_vertices( + const TriangleMesh& tm, + EdgeIsConstrainedMap& edge_is_constrained, + VertexCornerIdMap& vertex_corner_id, + double coplanar_cos_threshold, + const VertexPointMap& vpm) +{ + typedef boost::graph_traits graph_traits; + std::size_t corner_id = 0; + for(typename graph_traits::edge_descriptor e : edges(tm)) + { + if (get(edge_is_constrained, e)) + { + put(vertex_corner_id, source(e, tm), init_id()); + put(vertex_corner_id, target(e, tm), init_id()); + } + } + for(typename graph_traits::edge_descriptor e : edges(tm)) + { + if (!get(edge_is_constrained, e)) continue; + typename graph_traits::halfedge_descriptor h = halfedge(e, tm); + + if (is_init_id(get(vertex_corner_id, target(h, tm)))) + { + if (is_target_vertex_a_corner(h, edge_is_constrained, tm, coplanar_cos_threshold, vpm)) + put(vertex_corner_id, target(h, tm), corner_id++); + else + put(vertex_corner_id, target(h, tm), default_id()); + } + if (is_init_id(get(vertex_corner_id, source(h, tm)))) + { + if (is_target_vertex_a_corner(opposite(h, tm), edge_is_constrained, tm, coplanar_cos_threshold, vpm)) + put(vertex_corner_id, source(h, tm), corner_id++); + else + put(vertex_corner_id, source(h, tm), default_id()); + } + } + + return corner_id; +} + +template +void mark_face_triangles(CDT& cdt) +{ + //look for a triangle inside the domain of the face + typename CDT::Face_handle fh = cdt.infinite_face(); + fh->info().set_out_domain(); + std::vector queue; + for (int i=0; i<3; ++i) + queue.push_back(typename CDT::Edge(fh, i) ); + while(true) + { + typename CDT::Edge e = queue.back(); + queue.pop_back(); + e=cdt.mirror_edge(e); + if (e.first->info().visited()) continue; + if (cdt.is_constrained(e)) + { + queue.clear(); + queue.push_back(e); + break; + } + else + { + for(int i=1; i<3; ++i) + { + typename CDT::Edge candidate(e.first, (e.second+i)%3); + if (!candidate.first->neighbor(candidate.second)->info().visited()) + queue.push_back( candidate ); + } + e.first->info().set_out_domain(); + } + } + // now extract triangles inside the face + while(!queue.empty()) + { + typename CDT::Edge e = queue.back(); + queue.pop_back(); + if (e.first->info().visited()) continue; + e.first->info().set_in_domain(); + + for(int i=1; i<3; ++i) + { + typename CDT::Edge candidate(e.first, (e.second+i)%3); + if (!cdt.is_constrained(candidate) && + !candidate.first->neighbor(candidate.second)->info().visited()) + { + queue.push_back( cdt.mirror_edge(candidate) ); + } + } + } +} + +template < typename GT, + typename Vb = Triangulation_vertex_base_2 > +class Triangulation_vertex_with_corner_id_2 + : public Vb +{ + std::size_t _id = -1; +public: + template < typename TDS2 > + struct Rebind_TDS { + typedef typename Vb::template Rebind_TDS::Other Vb2; + typedef Triangulation_vertex_with_corner_id_2 Other; + }; + + template + Triangulation_vertex_with_corner_id_2(const T& ... t) + : Vb(t...) + {} + + const std::size_t& corner_id() const { return _id; } + std::size_t& corner_id() { return _id; } +}; + + +template +bool add_triangle_faces(const std::vector< std::pair >& csts, + typename Kernel::Vector_3 normal, + const std::vector& corners, + std::vector >& out_faces) +{ + typedef Projection_traits_3 P_traits; + typedef Triangulation_vertex_with_corner_id_2 Vb; + typedef Triangulation_face_base_with_info_2 Fbb; + typedef Constrained_triangulation_face_base_2 Fb; + typedef Triangulation_data_structure_2 TDS; + typedef No_constraint_intersection_requiring_constructions_tag Itag; + typedef Constrained_Delaunay_triangulation_2 CDT; + typedef typename CDT::Vertex_handle Vertex_handle; + typedef typename CDT::Face_handle Face_handle; + + typedef typename Kernel::Point_3 Point_3; + + std::size_t expected_nb_pts = csts.size()/2; + std::vector corner_ids; + corner_ids.reserve(expected_nb_pts); + + typedef std::pair Id_pair; + for(const Id_pair& p : csts) + { + CGAL_assertion(p.first::const_type Pmap; + typedef Spatial_sort_traits_adapter_2 Search_traits; + + spatial_sort(corner_ids.begin(), corner_ids.end(), + Search_traits(make_property_map(corners),p_traits)); + + Vertex_handle v_hint; + Face_handle hint; + for (std::size_t corner_id : corner_ids) + { + v_hint = cdt.insert(corners[corner_id], hint); + if (v_hint->corner_id()!=std::size_t(-1) && v_hint->corner_id()!=corner_id) + return false; // handle case of points being identical upon projection + v_hint->corner_id()=corner_id; + hint=v_hint->face(); + } + + // note that nbv might be different from points.size() in case of hole + // tangent to the principal CCB + CGAL_assertion_code(std::size_t nbv=cdt.number_of_vertices();) + + // insert constrained edges + std::unordered_map vertex_map; + for(typename CDT::Finite_vertices_iterator vit = cdt.finite_vertices_begin(), + end = cdt.finite_vertices_end(); vit!=end; ++vit) + { + vertex_map[vit->corner_id()]=vit; + } + + std::vector< std::pair > local_csts; + local_csts.reserve(csts.size()); + try{ + for(const Id_pair& p : csts) + { + CGAL_assertion(vertex_map.count(p.first)!=0 && vertex_map.count(p.second)!=0); + cdt.insert_constraint(vertex_map[p.first], vertex_map[p.second]); + } + }catch(typename CDT::Intersection_of_constraints_exception&) + { + // intersection of constraints probably due to the projection + return false; + } + CGAL_assertion(cdt.number_of_vertices() == nbv); + + if (cdt.dimension()!=2) return false; + + mark_face_triangles(cdt); + + for (typename CDT::Finite_faces_iterator fit=cdt.finite_faces_begin(), + end=cdt.finite_faces_end(); fit!=end; ++fit) + { + if (!fit->info().in_domain()) continue; + if (cdt.is_infinite(fit)) return false; + + if (reverse_face_orientation) + out_faces.push_back( {fit->vertex(1)->corner_id(), + fit->vertex(0)->corner_id(), + fit->vertex(2)->corner_id()} ); + else + out_faces.push_back( {fit->vertex(0)->corner_id(), + fit->vertex(1)->corner_id(), + fit->vertex(2)->corner_id()} ); + } + + return true; +} + +template +std::pair +tag_corners_and_constrained_edges(const TriangleMesh& tm, + double coplanar_cos_threshold, + VertexCornerIdMap& vertex_corner_id, + EdgeIsConstrainedMap& edge_is_constrained, + FaceCCIdMap& face_cc_ids, + const VertexPointMap& vpm) +{ + typedef typename boost::graph_traits graph_traits; + // mark constrained edges + mark_constrained_edges(tm, edge_is_constrained, coplanar_cos_threshold, vpm); + + // mark connected components (cc) delimited by constrained edges + std::size_t nb_cc = Polygon_mesh_processing::connected_components( + tm, face_cc_ids, parameters::edge_is_constrained_map(edge_is_constrained)); + + if (coplanar_cos_threshold!=-1) + { + for(typename graph_traits::edge_descriptor e : edges(tm)) + { + if (get(edge_is_constrained, e) && !is_border(e, tm)) + { + typename graph_traits::halfedge_descriptor h = halfedge(e, tm); + if ( get(face_cc_ids, face(h, tm))==get(face_cc_ids, face(opposite(h, tm), tm)) ) + put(edge_is_constrained, e, false); + } + } + } + + std::size_t nb_corners = + mark_corner_vertices(tm, edge_is_constrained, vertex_corner_id, coplanar_cos_threshold, vpm); + + return std::make_pair(nb_corners, nb_cc); +} + +template +bool decimate_impl(const TriangleMesh& tm, + std::pair& nb_corners_and_nb_cc, + VertexCornerIdMap& vertex_corner_id, + EdgeIsConstrainedMap& edge_is_constrained, + FaceCCIdMap& face_cc_ids, + const VertexPointMap& vpm, + bool do_not_triangulate_faces, + std::vector< typename Kernel::Point_3 >& corners, + std::vector< boost::container::small_vector >& out_faces, + IndexTracking& f_id_tracker, + std::vector< typename Kernel::Vector_3 >& face_normals) +{ + typedef typename boost::graph_traits graph_traits; + typedef typename graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::face_descriptor face_descriptor; + typedef std::pair Id_pair; + typedef typename boost::property_traits::value_type PID; + + // compute the new mesh + std::vector< std::vector< boost::container::small_vector > > faces_per_cc(nb_corners_and_nb_cc.second); + boost::dynamic_bitset<> cc_to_handle(nb_corners_and_nb_cc.second); + cc_to_handle.set(); + + bool all_patches_successfully_remeshed = true; + do + { + std::vector< std::vector > face_boundaries(nb_corners_and_nb_cc.second); + std::vector face_boundaries_valid(nb_corners_and_nb_cc.second, true); + + std::vector corner_id_to_vd(nb_corners_and_nb_cc.first, graph_traits::null_vertex()); + std::vector duplicated_corners(nb_corners_and_nb_cc.first, false); + auto check_corner = [&corner_id_to_vd, &duplicated_corners](std::size_t corner_id, vertex_descriptor vd) + { + if (corner_id_to_vd[corner_id]!=graph_traits::null_vertex() && corner_id_to_vd[corner_id]!=vd) + duplicated_corners[corner_id]=true; + }; + + // collect maximal constrained edges per cc + for(halfedge_descriptor h : halfedges(tm)) + { + if (!get(edge_is_constrained, edge(h, tm)) || is_border(h, tm)) continue; + + std::size_t i1 = get(vertex_corner_id, source(h, tm)); + if ( is_corner_id(i1) ) + { + check_corner(i1, source(h, tm)); + halfedge_descriptor h_init = h; + std::size_t cc_id = get(face_cc_ids, face(h_init, tm)); + if (!cc_to_handle.test(cc_id)) continue; + do{ + std::size_t i2 = get(vertex_corner_id, target(h_init, tm)); + if ( is_corner_id(i2) ) + { + check_corner(i2, target(h_init, tm)); + face_boundaries[ cc_id ].push_back( Id_pair(i1,i2) ); + if (face_normals[ cc_id ] == NULL_VECTOR) + { + face_normals[ cc_id ] = normal(get(vpm, source(h, tm)), + get(vpm, target(h, tm)), + get(vpm, target(next(h, tm), tm))); + } + break; + } + + do{ + h_init=opposite(next(h_init, tm), tm); + } while( !get(edge_is_constrained, edge(h_init, tm)) ); + h_init=opposite(h_init, tm); + } + while(true); + } + } + + for (std::size_t cc_id = cc_to_handle.find_first(); + cc_id < cc_to_handle.npos; + cc_id = cc_to_handle.find_next(cc_id)) + { + std::vector< boost::container::small_vector >& cc_faces = faces_per_cc[cc_id]; + cc_faces.clear(); + + std::vector< Id_pair >& csts = face_boundaries[cc_id]; + + if (!face_boundaries_valid[cc_id]) continue; + + // do not remesh a patch containing duplicated vertices + for (auto c : csts) + if (duplicated_corners[c.first] || duplicated_corners[c.second]) + { + csts.clear(); // this will trigger the copy of the current patch rather than a remeshing + break; + } +#ifdef CGAL_DEBUG_DECIMATION + std::cout << "csts.size() " << csts.size() << "\n"; +#endif + + if (csts.size()==3) + { + cc_faces.push_back( { csts[0].first, + csts[0].second, + csts[0].first==csts[1].first || + csts[0].second==csts[1].first ? + csts[1].second:csts[1].first} ); + cc_to_handle.set(cc_id, 0); + } + else + { + if (csts.size() > 3 && do_not_triangulate_faces) + { + // TODO this is not optimal at all since we already have the set of contraints, + // we could work on the graph on constraint and recover only the orientation + // of the edge. To be done if someone find it too slow. + std::vector hborders; + CGAL::Face_filtered_graph ffg(tm, static_cast(cc_id), face_cc_ids); + extract_boundary_cycles(ffg, std::back_inserter(hborders)); + + if (hborders.size()==1) + { + cc_faces.resize(1); + for (halfedge_descriptor h : halfedges_around_face(hborders[0], ffg)) + { + std::size_t cid = get(vertex_corner_id, target(h, tm)); + if (is_corner_id(cid)) + cc_faces.back().push_back(cid); + } + std::reverse(cc_faces.back().begin(), cc_faces.back().end()); + cc_to_handle.set(cc_id, 0); + continue; + } + } + + if (csts.size() > 3 && add_triangle_faces(csts, face_normals[cc_id], corners, cc_faces)) + cc_to_handle.set(cc_id, 0); + else + { + //TODO: shall we try to plug pseudo-cdt? +#ifdef CGAL_DEBUG_DECIMATION + static int fail_case_id=0; + std::cout << " DEBUG: Failed to remesh a patch, case #" << fail_case_id << std::endl; + std::ofstream debug("failed_remesh_"+std::to_string(fail_case_id)+".polylines.txt"); + debug << std::setprecision(17); + for (auto c : csts) + debug << "2 " << corners[c.first] << " " << corners[c.second] << "\n"; + debug.close(); + std::cout << " normal used is " << face_normals[cc_id] << "\n"; + debug.open("normal"+std::to_string(fail_case_id)+".polylines.txt"); + debug << "2 " << corners[csts[0].first] << " " << corners[csts[0].first]+face_normals[cc_id] << "\n"; + debug.close(); + ++fail_case_id; +#endif + all_patches_successfully_remeshed = false; + // make all vertices of the patch a corner + CGAL::Face_filtered_graph ffg(tm, static_cast(cc_id), face_cc_ids); + std::vector new_corners; + for (vertex_descriptor v : vertices(ffg)) + { + std::size_t i = get(vertex_corner_id, v); + if ( !is_corner_id(i) ) + { + i = nb_corners_and_nb_cc.first++; + put(vertex_corner_id, v, i); + corners.push_back(get(vpm, v)); + new_corners.push_back(v); + } + } + // add all the faces of the current patch + for (face_descriptor f : faces(ffg)) + { + halfedge_descriptor h = halfedge(f, tm); + cc_faces.push_back({ get(vertex_corner_id, source(h,tm)), + get(vertex_corner_id, target(h,tm)), + get(vertex_corner_id, target(next(h,tm), tm)) }); + } + // reset flag for neighbor connected components only if interface has changed + for (vertex_descriptor v : new_corners) + { + for (halfedge_descriptor h : halfedges_around_target(halfedge(v, tm), tm)) + { + if (!is_border(h, tm)) + { + std::size_t other_cc_id = get(face_cc_ids, face(h, tm)); + cc_to_handle.set(other_cc_id, 1); + face_boundaries_valid[ other_cc_id ]=false; + } + } + } + cc_to_handle.set(cc_id, 0); + } + } + } + } + while(cc_to_handle.any()); + + std::size_t cc_id=0; + for (const std::vector>& cc_trs : faces_per_cc) + { + out_faces.insert(out_faces.end(), cc_trs.begin(), cc_trs.end()); + f_id_tracker.register_faces_of_cc(cc_trs.size(), cc_id++); + } + + return all_patches_successfully_remeshed; +} + +template +bool decimate_impl(const TriangleMeshIn& tm_in, + PolygonMeshOut& pm_out, + std::pair nb_corners_and_nb_cc, + VertexCornerIdMap& vertex_corner_id, + EdgeIsConstrainedMap& edge_is_constrained, + FaceCCIdMap& face_cc_ids, + const VertexPointMapIn& vpm_in, + const VertexPointMapOut& vpm_out, + bool do_not_triangulate_faces, + VertexCornerMapOut vcorner_map_out, + FacePatchMapOut fpatch_map_out, + Visitor& visitor, + std::vector& face_normals) +{ + typedef typename boost::graph_traits graph_traits; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename Kernel::Point_3 Point_3; + + Face_index_tracker + f_id_tracker(vcorner_map_out, fpatch_map_out); + + //collect corners + std::vector< Point_3 > corners(nb_corners_and_nb_cc.first); + for(vertex_descriptor v : vertices(tm_in)) + { + std::size_t i = get(vertex_corner_id, v); + if ( is_corner_id(i) ) + { + corners[i]=get(vpm_in, v); + } + } + + std::vector< boost::container::small_vector > faces; + bool remeshing_failed = decimate_impl(tm_in, + nb_corners_and_nb_cc, + vertex_corner_id, + edge_is_constrained, + face_cc_ids, + vpm_in, + do_not_triangulate_faces, + corners, + faces, + f_id_tracker, + face_normals); + + if (!is_polygon_soup_a_polygon_mesh(faces)) + { + return false; + } + + visitor(pm_out); + polygon_soup_to_polygon_mesh(corners, faces, pm_out, + parameters::point_to_vertex_map(f_id_tracker.v2v_map()). + polygon_to_face_map(f_id_tracker.f2f_map()), + parameters::vertex_point_map(vpm_out)); + return remeshing_failed; +} + +template +void extract_meshes_containing_a_point( + const Point_3& pt, + const std::map >& point_to_vertex_maps, + OutputIterator out) +{ + typedef std::pair Pair_type; + for(const Pair_type& p : point_to_vertex_maps.find(pt)->second) + *out++=p.first; +} + +template +void mark_boundary_of_shared_patches_as_constrained_edges( + std::vector& mesh_ptrs, + std::map >& point_to_vertex_maps, + std::vector& edge_is_constrained_maps, + std::vector& vertex_shared_maps, + const std::vector& vpms) +{ + typedef boost::graph_traits graph_traits; + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename graph_traits::halfedge_descriptor halfedge_descriptor; + + std::size_t mesh_id = 0; + for(TriangleMesh* tm_ptr : mesh_ptrs) + { + TriangleMesh& tm=*tm_ptr; + EdgeIsConstrainedMap& edge_is_constrained = edge_is_constrained_maps[mesh_id]; + VertexIsSharedMap& is_vertex_shared = vertex_shared_maps[mesh_id]; + + for(edge_descriptor e : edges(tm)) + { + if (is_border(e, tm)) continue; //border edges will be automatically marked as constrained + + halfedge_descriptor h = halfedge(e, tm); + vertex_descriptor src = source(h, tm), tgt = target(h, tm); + if (get(is_vertex_shared, src) && get(is_vertex_shared, tgt)) + { + //extract the set of meshes having both vertices + std::set src_set, tgt_set, inter_set; + extract_meshes_containing_a_point(get(vpms[mesh_id], src), + point_to_vertex_maps, + std::inserter(src_set, src_set.begin())); + extract_meshes_containing_a_point(get(vpms[mesh_id], tgt), + point_to_vertex_maps, + std::inserter(tgt_set, tgt_set.begin())); + + std::set_intersection(src_set.begin(), src_set.end(), + tgt_set.begin(), tgt_set.end(), + std::inserter(inter_set, inter_set.begin())); + + std::multimap& mesh_to_vertex_src = + point_to_vertex_maps[get(vpms[mesh_id], src)]; + std::multimap& mesh_to_vertex_tgt = + point_to_vertex_maps[get(vpms[mesh_id], tgt)]; + + std::set incident_face_points; + incident_face_points.insert(get(vpms[mesh_id], target(next(h, tm), tm))); + h=opposite(h, tm); + incident_face_points.insert(get(vpms[mesh_id], target(next(h, tm), tm))); + + // we mark as constrained edge, any edge that is shared between more than 2 meshes + // such that at least one of the two incident faces to the edge are not present in + // all the meshes containing the edge + for(std::size_t other_mesh_id : inter_set) + { + TriangleMesh* other_tm_ptr = mesh_ptrs[other_mesh_id]; + if (other_tm_ptr==&tm) continue; + + std::vector srcs, tgts; + auto it = mesh_to_vertex_src.find(other_mesh_id); + while (it!=mesh_to_vertex_src.end() && it->first==other_mesh_id) + srcs.push_back(it++->second); + it = mesh_to_vertex_tgt.find(other_mesh_id); + while (it!=mesh_to_vertex_tgt.end() && it->first==other_mesh_id) + tgts.push_back(it++->second); + + for (vertex_descriptor other_src : srcs) + { + for (vertex_descriptor other_tgt : tgts) + { + std::pair hres = halfedge(other_src, other_tgt, *other_tm_ptr); + if (hres.second) + { + if (is_border_edge(hres.first, *other_tm_ptr)) + { + put(edge_is_constrained, e, true); + break; + } + if (incident_face_points.count( + get(vpms[other_mesh_id], target(next(hres.first, *other_tm_ptr), *other_tm_ptr)))==0) + { + put(edge_is_constrained, e, true); + break; + } + hres.first=opposite(hres.first, *other_tm_ptr); + if (incident_face_points.count( + get(vpms[other_mesh_id], target(next(hres.first, *other_tm_ptr), *other_tm_ptr)))==0) + { + put(edge_is_constrained, e, true); + break; + } + } + } + } + } + } + } + ++mesh_id; + } +} + +template +void propagate_corner_status( + std::vector& vertex_corner_id_maps, + std::map >& point_to_vertex_maps, + std::vector< std::pair >& nb_corners_and_nb_cc_all) +{ + typedef std::pair > Pair_type; + for(Pair_type& p : point_to_vertex_maps) + { + // if one vertex is a corner, all should be + typedef std::pair Map_pair_type; + bool is_corner=false; + for (Map_pair_type& mp : p.second) + { + std::size_t mesh_id = mp.first; + if ( is_corner_id( get(vertex_corner_id_maps[mesh_id], mp.second) )) + { + is_corner=true; + break; + } + } + if (is_corner) + { + for(Map_pair_type& mp : p.second) + { + std::size_t mesh_id = mp.first; + if ( !is_corner_id(get(vertex_corner_id_maps[mesh_id], mp.second)) ) + { + put(vertex_corner_id_maps[mesh_id], mp.second, + nb_corners_and_nb_cc_all[mesh_id].first++); + } + } + } + } +} + +template +bool decimate_meshes_with_common_interfaces_impl(TriangleMeshRange& meshes, + MeshMap mesh_map, + const TagFunction& tag_function, + const std::vector& vpms, + bool do_not_triangulate_faces) +{ + typedef typename boost::property_traits::value_type Triangle_mesh; + typedef typename std::iterator_traits::value_type Mesh_descriptor; + typedef typename boost::property_traits::value_type Point_3; + typedef typename boost::graph_traits graph_traits; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename graph_traits::face_descriptor face_descriptor; + typedef typename graph_traits::halfedge_descriptor halfedge_descriptor; + + // declare and init all property maps + typedef typename boost::property_map >::type Face_cc_map; + typedef typename boost::property_map >::type Edge_is_constrained_map; + typedef typename boost::property_map >::type Vertex_corner_id_map; + typedef typename boost::property_map >::type Vertex_is_shared_map; + + std::vector vertex_shared_maps; + std::vector edge_is_constrained_maps; + std::vector vertex_corner_id_maps; + std::vector face_cc_ids_maps; + const std::size_t nb_meshes = meshes.size(); + std::vector mesh_has_non_manifold_vertices(nb_meshes, false); + vertex_corner_id_maps.reserve(nb_meshes); + vertex_shared_maps.reserve(nb_meshes); + edge_is_constrained_maps.reserve(nb_meshes); + face_cc_ids_maps.reserve(nb_meshes); + + std::vector mesh_ptrs; + mesh_ptrs.reserve(nb_meshes); + for(Mesh_descriptor& md : meshes) + mesh_ptrs.push_back( &(mesh_map[md]) ); + + auto has_non_manifold_vertices = [](const Triangle_mesh& tm) + { + std::vector nmvs; + non_manifold_vertices(tm, std::back_inserter(nmvs)); + return !nmvs.empty(); + }; + + std::size_t mesh_id=0; + for(Triangle_mesh* tm_ptr : mesh_ptrs) + { + Triangle_mesh& tm = *tm_ptr; + mesh_has_non_manifold_vertices[mesh_id] = has_non_manifold_vertices(tm); + vertex_shared_maps.push_back( get(CGAL::dynamic_vertex_property_t(), tm) ); + for(vertex_descriptor v : vertices(tm)) + put(vertex_shared_maps.back(), v, false); + + edge_is_constrained_maps.push_back( get(CGAL::dynamic_edge_property_t(), tm) ); + for(edge_descriptor e : edges(tm)) + put(edge_is_constrained_maps.back(), e, false); + + vertex_corner_id_maps.push_back( get(CGAL::dynamic_vertex_property_t(), tm) ); + for(vertex_descriptor v : vertices(tm)) + put(vertex_corner_id_maps.back(), v, Planar_segmentation::init_id()); + + face_cc_ids_maps.push_back( get(CGAL::dynamic_face_property_t(), tm) ); + for(face_descriptor f : faces(tm)) + put(face_cc_ids_maps.back(), f, -1); + ++mesh_id; + } + + std::map > point_to_vertex_maps; + + //start by detecting and marking all shared vertices + mesh_id = 0; + for(Triangle_mesh* tm_ptr : mesh_ptrs) + { + Triangle_mesh& tm = *tm_ptr; + + for(vertex_descriptor v : vertices(tm)) + { + std::multimap& mesh_id_to_vertex = + point_to_vertex_maps[get(vpms[mesh_id], v)]; + if (!mesh_id_to_vertex.empty()) + put(vertex_shared_maps[mesh_id], v, true); + if (mesh_id_to_vertex.size()==1) + { + std::pair other=*mesh_id_to_vertex.begin(); + put(vertex_shared_maps[other.first], other.second, true); + } + mesh_id_to_vertex.insert( std::make_pair(mesh_id, v) ); + } + + ++mesh_id; + } + + //then detect edge on the boundary of shared patches and mark them as constrained + mark_boundary_of_shared_patches_as_constrained_edges(mesh_ptrs, point_to_vertex_maps, edge_is_constrained_maps, vertex_shared_maps, vpms); + + // first tag corners and constrained edges + std::vector< std::pair > nb_corners_and_nb_cc_all(nb_meshes); + mesh_id=0; + for(Triangle_mesh* tm_ptr : mesh_ptrs) + { + Triangle_mesh& tm = *tm_ptr; + + //reset face cc ids as it was set by coplanarity_segmentation_with_pca + for(face_descriptor f : faces(tm)) + put(face_cc_ids_maps[mesh_id], f, -1); + + if (!mesh_has_non_manifold_vertices[mesh_id]) + nb_corners_and_nb_cc_all[mesh_id] = tag_function(tm, + vertex_corner_id_maps[mesh_id], + edge_is_constrained_maps[mesh_id], + face_cc_ids_maps[mesh_id], + vpms[mesh_id]); + else + { + nb_corners_and_nb_cc_all[mesh_id]={0,1}; + for (vertex_descriptor vd : vertices(tm)) + { + if (get(vertex_shared_maps[mesh_id], vd)) + { + put(vertex_corner_id_maps[mesh_id], vd, true); + ++nb_corners_and_nb_cc_all[mesh_id].first; + } + } + } + ++mesh_id; + } + + // extra step to propagate is_corner to all meshes to make sure shared vertices are kept + propagate_corner_status(vertex_corner_id_maps, point_to_vertex_maps, nb_corners_and_nb_cc_all); + + // TODO: make identical patches normal identical (up to the sign). Needed only in the approximate case + +// now call the decimation + // storage of all new triangles and all corners + std::vector< std::vector< Point_3 > > all_corners(nb_meshes); + std::vector< std::vector< boost::container::small_vector > > all_faces(nb_meshes); + bool res = true; + std::vector to_be_processed(nb_meshes, true); + bool loop_again; +// bool no_remeshing_issue = true; + do{ + loop_again = false; + for(std::size_t mesh_id=0; mesh_id& corners = all_corners[mesh_id]; + if (corners.empty()) + { + corners.resize(nb_corners_and_nb_cc_all[mesh_id].first); + for(vertex_descriptor v : vertices(tm)) + { + std::size_t i = get(vertex_corner_id_maps[mesh_id], v); + if ( is_corner_id(i) ) + corners[i]=get(vpms[mesh_id], v); + } + } + std::size_t ncid=corners.size(); + + typedef internal_np::Param_not_found PNF; + PNF pnf; + Face_index_tracker tracker(pnf, pnf); + std::vector< typename Kernel::Vector_3 > face_normals(nb_corners_and_nb_cc_all[mesh_id].second, NULL_VECTOR); + bool all_patches_successfully_remeshed = + decimate_impl(tm, + nb_corners_and_nb_cc_all[mesh_id], + vertex_corner_id_maps[mesh_id], + edge_is_constrained_maps[mesh_id], + face_cc_ids_maps[mesh_id], + vpms[mesh_id], + do_not_triangulate_faces, + corners, + all_faces[mesh_id], + tracker, + face_normals) && + is_polygon_soup_a_polygon_mesh(all_faces[mesh_id]); +#ifdef CGAL_DEBUG_DECIMATION + std::cout << "all_patches_successfully_remeshed? " << all_patches_successfully_remeshed << "\n"; +#endif + if (!all_patches_successfully_remeshed) + { +// no_remeshing_issue=false; + // iterate over points newly marked as corners + std::set mesh_ids; + for (std::size_t cid=ncid; cid Map_pair_type; + auto find_res = point_to_vertex_maps.find(corners[cid]); + assert(find_res != point_to_vertex_maps.end()); + for(Map_pair_type& mp : find_res->second) + { + std::size_t other_mesh_id = mp.first; + if ( other_mesh_id!=mesh_id && !is_corner_id(get(vertex_corner_id_maps[other_mesh_id], mp.second))) + { + mesh_ids.insert(other_mesh_id); + put(vertex_corner_id_maps[other_mesh_id], mp.second, + nb_corners_and_nb_cc_all[other_mesh_id].first++); + if (!all_corners[other_mesh_id].empty()) + all_corners[other_mesh_id].push_back(corners[cid]); + } + } + } + for (std::size_t mid : mesh_ids) + if (!to_be_processed[mid]) + { +#ifdef CGAL_DEBUG_DECIMATION + if (!loop_again) + std::cout << "setting for another loop\n"; +#endif + loop_again=true; + to_be_processed[mid] = true; + } + } + to_be_processed[mesh_id] = false; + } + } + while(loop_again); + + // now create the new meshes: + for(std::size_t mesh_id=0; mesh_id +bool decimate_meshes_with_common_interfaces_impl(TriangleMeshRange& meshes, + MeshMap mesh_map, + double coplanar_cos_threshold, + const std::vector& vpms, + bool do_not_triangulate_faces) +{ + typedef typename boost::property_traits::value_type Triangle_mesh; + auto tag_function = [coplanar_cos_threshold](Triangle_mesh& tm, + typename boost::property_map >::type vertex_corner_id, + typename boost::property_map >::type edge_is_constrained, + typename boost::property_map >::type face_cc_ids, + VertexPointMap vpm) + { + return tag_corners_and_constrained_edges(tm, + coplanar_cos_threshold, + vertex_corner_id, + edge_is_constrained, + face_cc_ids, + vpm); + }; + + return decimate_meshes_with_common_interfaces_impl(meshes, + mesh_map, + tag_function, + vpms, + do_not_triangulate_faces); + +} + +} //end of namespace Planar_segmentation + + +/*! + * \ingroup PMP_meshing_grp + * generates a new triangle mesh `pm_out` with the minimal number of triangles while preserving the shape of `tm_in`. + * In practice, this means that connected components of edge-connected faces belonging to the same plane are + * first extracted (each such connected component is called a *patch*). Then, the connected components of + * vertex-connected patch border edges belonging to the same line are extracted. Endpoints of such components and + * vertices incident to more than two patches (or two patches + one mesh boundary) are called *corners*. + * `pm_out` contains the 2D constrained Delaunay triangulation of each patch using only corner vertices + * on the boundary of the patch. + * + * \warning if `tm_in` contains a non-manifold vertex, `pm_out` will be empty. Those vertices must be + * duplicated with `duplicate_non_manifold_vertices()` to get an output. + * + * \tparam TriangleMeshIn a model of `HalfedgeListGraph` and `FaceListGraph` + * \tparam PolygonMeshOut a model of `MutableFaceGraph` + * \tparam NamedParametersIn a sequence of \ref bgl_namedparameters "Named Parameters" + * \tparam NamedParametersOut a sequence of \ref bgl_namedparameters "Named Parameters" + * + * \param tm_in input triangle mesh + * \param pm_out output polygon mesh + * \param np_in an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{vertex_point_map} + * \cgalParamDescription{a property map associating points to the vertices of `tm_in`} + * \cgalParamType{a class model of `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` + * as key type and `GeomTraits::Point_3` as value type, `GeomTraits` being the type of the parameter `geom_traits`} + * \cgalParamDefault{`boost::get(CGAL::vertex_point, tm_in)`} + * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + * must be available in `TriangleMeshIn`.} + * \cgalParamNEnd + * \cgalParamNBegin{geom_traits} + * \cgalParamDescription{an instance of a geometric traits class} + * \cgalParamType{a class model of `Kernel`} + * \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} + * \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} + * \cgalParamNEnd + * \cgalParamNBegin{edge_is_constrained_map} + * \cgalParamDescription{a property map filled by this function and that will contain `true` if an edge is on the border of a patch and `false` otherwise.} + * \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%edge_descriptor` + * as key type and `bool` as value type} + * \cgalParamDefault{None} + * \cgalParamNEnd + * \cgalParamNBegin{face_patch_map} + * \cgalParamDescription{a property map filled by this function and that will contain for each face the id + * of its patch in the range `[0, number of patches - 1]`} + * \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%face_descriptor` + * as key type and `std::size_t` as value type} + * \cgalParamDefault{None} + * \cgalParamNEnd + * \cgalParamNBegin{vertex_corner_map} + * \cgalParamDescription{a property map filled by this function and that will contain for each vertex that is a corner + * an id in the range `[0, number of corners - 1]`, and `std::size_t(-1)` otherwise.} + * \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` + * as key type and `std::size_t` as value type} + * \cgalParamDefault{None} + * \cgalParamNEnd + * \cgalParamNBegin{cosine_of_maximum_angle} + * \cgalParamDescription{The maximum angle, given as a cosine, + * (i) between the normals of the supporting planes of adjacent faces such that they are considered coplanar, and + * (ii) for the smallest angle between the supporting line of a segment and an adjacent segment such that they are considered collinear.} + * \cgalParamType{`FT` type from the `geom_traits` parameter} + * \cgalParamDefault{1, which means exact coplanarity and collinearity} + * \cgalParamExtra{The value must be in the interval `[0,1]`} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + * \param np_out an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{do_not_triangulate_faces} + * \cgalParamDescription{if `true`, faces of `pm_out` will not be triangulated, but the one with more than one connected component of the boundary.} + * \cgalParamType{`bool`} + * \cgalParamDefault{false} + * \cgalParamNEnd + * \cgalParamNBegin{vertex_point_map} + * \cgalParamDescription{a property map associating points to the vertices of `pm_out`} + * \cgalParamType{a class model of `WritablePropertyMap` with `boost::graph_traits::%vertex_descriptor` + * as key type and `GeomTraits::Point_3` as value type, `GeomTraits` being the type of the parameter `geom_traits`} + * \cgalParamDefault{`boost::get(CGAL::vertex_point, pm_out)`} + * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + * must be available in `PolygonMeshOut`.} + * \cgalParamNEnd + * \cgalParamNBegin{face_patch_map} + * \cgalParamDescription{a property map filled by this function and that will contain for each face the id + * of its patch in the range `[0, number of patches - 1]`, + * the patch id of two identical patches in the input and output meshes being equal.} + * \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%face_descriptor` + * as key type and `std::size_t` as value type} + * \cgalParamDefault{None} + * \cgalParamNEnd + * \cgalParamNBegin{vertex_corner_map} + * \cgalParamDescription{a property map filled by this function and that will contain for each vertex its corner + * an id in the range `[0, number of corners - 1]`} + * \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` + * as key type and `std::size_t` as value type} + * \cgalParamDefault{None} + * \cgalParamNEnd + * \cgalParamNBegin{visitor} + * \cgalParamDescription{a callable with `visitor(pm_out)` being called once `tm_in` is no longer needed + * and before `pm_out` starts being built. It should be used in the case when `tm_in` and `pm_out` are the same mesh, + * so that `pm_out` can be cleared before being filled.} + * \cgalParamType{`visitor(pm_out)` must be a valid expression.} + * \cgalParamDefault{None} + * \cgalParamNEnd + * \cgalNamedParamsEnd + */ +template +void remesh_planar_patches(const TriangleMeshIn& tm_in, + PolygonMeshOut& pm_out, + const NamedParametersIn& np_in = parameters::default_values(), + const NamedParametersOut& np_out = parameters::default_values()) +{ + typedef typename GetGeomTraits::type Traits; + typedef typename GetVertexPointMap ::const_type VPM_in; + typedef typename GetVertexPointMap ::type VPM_out; + using parameters::choose_parameter; + using parameters::get_parameter; + + typedef typename boost::graph_traits graph_traits; + typedef typename graph_traits::edge_descriptor edge_descriptor; + typedef typename graph_traits::vertex_descriptor vertex_descriptor; + typedef typename graph_traits::face_descriptor face_descriptor; + + double coplanar_cos_threshold = - choose_parameter(get_parameter(np_in, internal_np::cosine_of_maximum_angle), 1); + CGAL_precondition(coplanar_cos_threshold<=0 && coplanar_cos_threshold>=-1); + + // initialize property maps (fill user provided or user internal ones) + typedef typename boost::property_map >::const_type Default_ECM; + typedef typename boost::property_map >::const_type Default_VCM; + typedef typename boost::property_map >::const_type Default_FCM; + + typename internal_np::Lookup_named_param_def< internal_np::edge_is_constrained_t, + NamedParametersIn, + Default_ECM>::type + edge_is_constrained = choose_parameter(get_parameter(np_in, internal_np::edge_is_constrained), + dynamic_edge_property_t(), tm_in); + + typename internal_np::Lookup_named_param_def< internal_np::vertex_corner_map_t, + NamedParametersIn, + Default_VCM>::type + vertex_corner_id = choose_parameter(get_parameter(np_in, internal_np::vertex_corner_map), + dynamic_vertex_property_t(), tm_in); + + typename internal_np::Lookup_named_param_def< internal_np::face_patch_t, + NamedParametersIn, + Default_FCM>::type + face_cc_ids = choose_parameter(get_parameter(np_in, internal_np::face_patch), + dynamic_face_property_t(), tm_in); + + for(edge_descriptor e : edges(tm_in)) put(edge_is_constrained, e, false); + for(vertex_descriptor v : vertices(tm_in)) put(vertex_corner_id, v, Planar_segmentation::default_id()); + for(face_descriptor f : faces(tm_in)) put(face_cc_ids, f, -1); + + VPM_in vpm_in = choose_parameter(get_parameter(np_in, internal_np::vertex_point), + get_const_property_map(vertex_point, tm_in)); + + VPM_out vpm_out = choose_parameter(get_parameter(np_out, internal_np::vertex_point), + get_property_map(vertex_point, pm_out)); + + typename internal_np::Lookup_named_param_def< internal_np::visitor_t, + NamedParametersOut, + Planar_segmentation::Default_visitor>::type + visitor = choose_parameter>(get_parameter(np_out, internal_np::visitor)); + + bool do_not_triangulate_faces = choose_parameter(get_parameter(np_out, internal_np::do_not_triangulate_faces), false); + + std::pair nb_corners_and_nb_cc = + Planar_segmentation::tag_corners_and_constrained_edges(tm_in, coplanar_cos_threshold, vertex_corner_id, edge_is_constrained, face_cc_ids, vpm_in); + std::vector< typename Traits::Vector_3 > face_normals(nb_corners_and_nb_cc.second, NULL_VECTOR); + Planar_segmentation::decimate_impl(tm_in, pm_out, + nb_corners_and_nb_cc, + vertex_corner_id, + edge_is_constrained, + face_cc_ids, + vpm_in, vpm_out, + do_not_triangulate_faces, + get_parameter(np_out, internal_np::vertex_corner_map), + get_parameter(np_out, internal_np::face_patch), + visitor, + face_normals); +} + +/*! + * \ingroup PMP_meshing_grp + * generates a new triangle mesh `pm_out` with the minimal number of triangles from a partition of `tm_in`. + * The terminology used here and the global idea is very similar to what is done by `remesh_planar_patches()` + * except that here the partition into patches and corner identification is provided by the user. + * It allows to have a remeshing of almost coplanar regions, detected for example using the region growing algorithm + * with the functions `region_growing_of_planes_on_faces()` and `detect_corners_of_regions()`. + * If a patch cannot be triangulated, it is left untouched in the output and all its vertices become corners + * so that the output is still a valid conformal triangle mesh. + * \returns `true` if all patches could be triangulated and `false` otherwise. + * + * \tparam TriangleMeshIn a model of `HalfedgeListGraph` and `FaceListGraph` + * \tparam PolygonMeshOut a model of `MutableFaceGraph` + * + * \tparam FacePatchMap a class model of `ReadablePropertyMap` with `boost::graph_traits::%face_descriptor` + * as key type and `std::size_t` as value type + * \tparam EdgeIsConstrainedMap a class model of `ReadablePropertyMap` with `boost::graph_traits::%edge_descriptor` + * as key type and `bool` as value type + * \tparam VertexCornerMap a class model of `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` + * as key type and `std::size_t` as value type + * \tparam NamedParametersIn a sequence of \ref bgl_namedparameters "Named Parameters" + * \tparam NamedParametersOut a sequence of \ref bgl_namedparameters "Named Parameters" + * + * \param tm_in input triangle mesh + * \param pm_out output polygon mesh + * \param nb_patches the number of patches in the partition + * \param nb_corners the number of corners + * \param face_patch_map a property map that contains for each face the id of its patch in the range `[0, nb_patches]` + * \param vertex_corner_map a property map that contains for each vertex that is a corner an id in the range `[0, nb_corners - 1]`, + and `std::size_t(-1)` otherwise. + * \param ecm a property map that contains `true` if an edge is on the border of a patch and `false` otherwise. + * \param np_in an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{patch_normal_map} + * \cgalParamDescription{a property map providing for each patch the normal of the supporting plane of the patch (used to triangulate it)} + * \cgalParamType{a class model of `ReadPropertyMap` with the value type of `FacePatchMap` as key and + * `GeomTraits::Vector_3` as value type, `GeomTraits` being the type of the parameter `geom_traits`} + * \cgalParamDefault{If not provided, patch normals will be estimated using corners of the patches} + * \cgalParamNEnd + * \cgalParamNBegin{vertex_point_map} + * \cgalParamDescription{a property map associating points to the vertices of `tm_in`} + * \cgalParamType{a class model of `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` + * as key type and `GeomTraits::Point_3` as value type, `GeomTraits` being the type of the parameter `geom_traits`} + * \cgalParamDefault{`boost::get(CGAL::vertex_point, tm_in)`} + * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + * must be available in `TriangleMeshIn`.} + * \cgalParamNEnd + * \cgalParamNBegin{geom_traits} + * \cgalParamDescription{an instance of a geometric traits class} + * \cgalParamType{a class model of `Kernel`} + * \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} + * \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + * \param np_out an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{do_not_triangulate_faces} + * \cgalParamDescription{if `true`, faces of `pm_out` will not be triangulated, but the one with more than one connected component of the boundary.} + * \cgalParamType{`bool`} + * \cgalParamDefault{false} + * \cgalParamNEnd + * \cgalParamNBegin{vertex_point_map} + * \cgalParamDescription{a property map associating points to the vertices of `pm_out`} + * \cgalParamType{a class model of `WritablePropertyMap` with `boost::graph_traits::%vertex_descriptor` + * as key type and `GeomTraits::Point_3` as value type, `GeomTraits` being the type of the parameter `geom_traits`} + * \cgalParamDefault{`boost::get(CGAL::vertex_point, pm_out)`} + * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + * must be available in `PolygonMeshOut`.} + * \cgalParamNEnd + * \cgalParamNBegin{face_patch_map} + * \cgalParamDescription{a property map filled by this function and that will contain for each face the id + * of its patch in the range `[0, number of patches - 1]`} + * \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%face_descriptor` + * as key type and `std::size_t` as value type} + * \cgalParamDefault{None} + * \cgalParamNEnd + * \cgalParamNBegin{vertex_corner_map} + * \cgalParamDescription{a property map filled by this function and that will contain for each vertex its corner + * an id in the range `[0, number of corners - 1]`} + * \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` + * as key type and `std::size_t` as value type} + * \cgalParamDefault{None} + * \cgalParamNEnd + * \cgalParamNBegin{visitor} + * \cgalParamDescription{a callable with `visitor(pm_out)` being called once `tm_in` is no longer needed + * and before `pm_out` starts being built. It should be used in the case when `tm_in` and `pm_out` are the same mesh, + * so that `pm_out` can be cleared before being filled.} + * \cgalParamType{`visitor(pm_out)` must be a valid expression.} + * \cgalParamDefault{None} + * \cgalParamNEnd + * \cgalNamedParamsEnd + */ +template +bool remesh_almost_planar_patches(const TriangleMeshIn& tm_in, + PolygonMeshOut& pm_out, + std::size_t nb_patches, + std::size_t nb_corners, + FacePatchMap face_patch_map, + VertexCornerMap vertex_corner_map, + EdgeIsConstrainedMap ecm, + const NamedParametersIn& np_in = parameters::default_values(), + const NamedParametersOut& np_out = parameters::default_values()) +{ + typedef typename GetGeomTraits::type Traits; + typedef typename GetVertexPointMap ::const_type VPM_in; + typedef typename GetVertexPointMap ::type VPM_out; + using parameters::choose_parameter; + using parameters::get_parameter; + + VPM_in vpm_in = choose_parameter(get_parameter(np_in, internal_np::vertex_point), + get_const_property_map(vertex_point, tm_in)); + + VPM_out vpm_out = choose_parameter(get_parameter(np_out, internal_np::vertex_point), + get_property_map(vertex_point, pm_out)); + + typename internal_np::Lookup_named_param_def< internal_np::visitor_t, + NamedParametersOut, + Planar_segmentation::Default_visitor>::type + visitor = choose_parameter>(get_parameter(np_out, internal_np::visitor)); + + bool do_not_triangulate_faces = choose_parameter(get_parameter(np_out, internal_np::do_not_triangulate_faces), false); + + std::vector< typename Traits::Vector_3 > face_normals; + Planar_segmentation::init_face_normals(face_normals, nb_patches, get_parameter(np_in, internal_np::patch_normal_map)); + return Planar_segmentation::decimate_impl(tm_in, pm_out, + std::make_pair(nb_corners, nb_patches), + vertex_corner_map, ecm, face_patch_map, vpm_in, vpm_out, + do_not_triangulate_faces, + get_parameter(np_out, internal_np::vertex_corner_map), + get_parameter(np_out, internal_np::face_patch), + visitor, + face_normals); +} + +#ifndef DOXYGEN_RUNNING +// MeshMap must be a mutable lvalue pmap with Triangle_mesh as value_type +template +bool decimate_meshes_with_common_interfaces(TriangleMeshRange& meshes, double coplanar_cos_threshold, MeshMap mesh_map, bool do_not_triangulate_faces=false) +{ + CGAL_assertion(coplanar_cos_threshold<0); + typedef typename boost::property_traits::value_type Triangle_mesh; + typedef typename std::iterator_traits::value_type Mesh_descriptor; + typedef typename boost::property_map::type VPM; + typedef typename boost::property_traits::value_type Point_3; + typedef typename Kernel_traits::type Kernel; + + // todo turn into a range of named parameter + std::vector::type > vpms; + vpms.reserve(meshes.size()); + + for(Mesh_descriptor& md : meshes) + vpms.push_back( get(boost::vertex_point, mesh_map[md]) ); + return Planar_segmentation::decimate_meshes_with_common_interfaces_impl(meshes, mesh_map, coplanar_cos_threshold, vpms, do_not_triangulate_faces); +} + +template +bool decimate_meshes_with_common_interfaces(std::vector& meshes, double coplanar_cos_threshold=-1) +{ + return decimate_meshes_with_common_interfaces(meshes, coplanar_cos_threshold, CGAL::Identity_property_map()); +} +#endif + +} } // end of CGAL::Polygon_mesh_processing + +#endif // CGAL_POLYGON_MESH_PROCESSING_REMESH_PLANAR_PATCHES_H diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/repair.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/repair.h index 9cb288e9..ddbe8347 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/repair.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/repair.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h $ -// $Id: repair.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h $ +// $Id: include/CGAL/Polygon_mesh_processing/repair.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -29,7 +29,7 @@ namespace CGAL { namespace Polygon_mesh_processing { -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_geometric_repair_grp /// /// \brief removes the isolated vertices from any polygon mesh. /// @@ -60,7 +60,7 @@ std::size_t remove_isolated_vertices(PolygonMesh& pmesh) return nb_removed; } -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_geometric_repair_grp /// /// \brief removes connected components whose area or volume is under a certain threshold value. /// diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h index 45bcf38d..7c3d1ca8 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h $ -// $Id: repair_degeneracies.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h $ +// $Id: include/CGAL/Polygon_mesh_processing/repair_degeneracies.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot, @@ -31,7 +31,6 @@ #endif #include -#include #include #include @@ -198,7 +197,7 @@ bool is_collapse_geometrically_valid(typename boost::graph_traits: // @todo handle boundary edges template -boost::optional +std::optional get_collapse_volume(typename boost::graph_traits::halfedge_descriptor h, const TriangleMesh& tmesh, const VPM& vpm, @@ -245,7 +244,7 @@ get_collapse_volume(typename boost::graph_traits::halfedge_descrip Vector_3 n1 = gt.construct_cross_product_vector_3_object()(v_ar, v_ab); Vector_3 n2 = gt.construct_cross_product_vector_3_object()(v_ak, v_ab); if(gt.compute_scalar_product_3_object()(n1, n2) <= 0) - return boost::none; + return std::nullopt; delta_vol += volume(b, a, removed, origin) + volume(a, b, kept, origin); // opposite orientation } @@ -269,33 +268,32 @@ get_best_edge_orientation(typename boost::graph_traits::edge_descr halfedge_descriptor h = halfedge(e, tmesh), ho = opposite(h, tmesh); - boost::optional dv1 = get_collapse_volume(h, tmesh, vpm, gt); - boost::optional dv2 = get_collapse_volume(ho, tmesh, vpm, gt); + std::optional dv1 = get_collapse_volume(h, tmesh, vpm, gt); + std::optional dv2 = get_collapse_volume(ho, tmesh, vpm, gt); // the resulting point of the collapse of a halfedge is the target of the halfedge before collapse if(get(vcm, source(h, tmesh))) - return dv2 != boost::none ? ho + return dv2 != std::nullopt ? ho : boost::graph_traits::null_halfedge(); if(get(vcm, target(h, tmesh))) - return dv1 != boost::none ? h + return dv1 != std::nullopt ? h : boost::graph_traits::null_halfedge(); - if(dv1 != boost::none) + if(dv1 != std::nullopt) { - if(dv2 != boost::none) + if(dv2 != std::nullopt) return (*dv1 < *dv2) ? h : ho; return h; } - if(dv2 != boost::none) + if(dv2 != std::nullopt) return ho; return boost::graph_traits::null_halfedge(); } -// adapted from triangulate_faces template bool should_flip(typename boost::graph_traits::edge_descriptor e, const TriangleMesh& tmesh, @@ -304,49 +302,23 @@ bool should_flip(typename boost::graph_traits::edge_descriptor e, { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef typename Traits::FT FT; + typedef typename Traits:: FT FT; typedef typename boost::property_traits::reference Point_ref; - typedef typename Traits::Vector_3 Vector_3; CGAL_precondition(!is_border(e, tmesh)); - halfedge_descriptor h = halfedge(e, tmesh); - - Point_ref p0 = get(vpm, target(h, tmesh)); - Point_ref p1 = get(vpm, target(next(h, tmesh), tmesh)); - Point_ref p2 = get(vpm, source(h, tmesh)); - Point_ref p3 = get(vpm, target(next(opposite(h, tmesh), tmesh), tmesh)); - - /* Chooses the diagonal that will split the quad in two triangles that maximize - * the scalar product of of the un-normalized normals of the two triangles. - * The lengths of the un-normalized normals (computed using cross-products of two vectors) - * are proportional to the area of the triangles. - * Maximize the scalar product of the two normals will avoid skinny triangles, - * and will also taken into account the cosine of the angle between the two normals. - * In particular, if the two triangles are oriented in different directions, - * the scalar product will be negative. - */ - -// CGAL::cross_product(p2-p1, p3-p2) * CGAL::cross_product(p0-p3, p1-p0); -// CGAL::cross_product(p1-p0, p1-p2) * CGAL::cross_product(p3-p2, p3-p0); + typename Traits::Compute_approximate_angle_3 angle = gt.compute_approximate_angle_3_object(); - const Vector_3 v01 = gt.construct_vector_3_object()(p0, p1); - const Vector_3 v12 = gt.construct_vector_3_object()(p1, p2); - const Vector_3 v23 = gt.construct_vector_3_object()(p2, p3); - const Vector_3 v30 = gt.construct_vector_3_object()(p3, p0); + const halfedge_descriptor h = halfedge(e, tmesh); - const FT p1p3 = gt.compute_scalar_product_3_object()( - gt.construct_cross_product_vector_3_object()(v12, v23), - gt.construct_cross_product_vector_3_object()(v30, v01)); + const Point_ref p0 = get(vpm, target(h, tmesh)); + const Point_ref p1 = get(vpm, target(next(h, tmesh), tmesh)); + const Point_ref p2 = get(vpm, source(h, tmesh)); + const Point_ref p3 = get(vpm, target(next(opposite(h, tmesh), tmesh), tmesh)); - const Vector_3 v21 = gt.construct_opposite_vector_3_object()(v12); - const Vector_3 v03 = gt.construct_opposite_vector_3_object()(v30); - - const FT p0p2 = gt.compute_scalar_product_3_object()( - gt.construct_cross_product_vector_3_object()(v01, v21), - gt.construct_cross_product_vector_3_object()(v23, v03)); - - return p0p2 <= p1p3; + const FT ap1 = angle(p0,p1,p2); + const FT ap3 = angle(p2,p3,p0); + return (ap1 + ap3 > FT(180)); } template @@ -511,7 +483,7 @@ struct Filter_wrapper_for_cap_needle_removal link_faces; collect_link_faces(e, link_faces); - Functor f = std::move(m_make_envelope(link_faces)); + Functor f = m_make_envelope(link_faces); Base base(m_tm, m_vpm, f); return base.collapse(e); } @@ -536,15 +508,95 @@ struct Filter_wrapper_for_cap_needle_removalneedle +/// if its longest edge is much longer than its shortest edge. A triangle is said to be a cap if one of +/// its angles is close to `180` degrees. Needles are removed by collapsing their shortest edges, while caps are +/// removed by flipping the edge opposite to the largest angle (with the exception of caps on the boundary that are +/// simply removed from the mesh). +/// +/// @pre `CGAL::is_triangle_mesh(tmesh)` +/// +/// @tparam TriangleMesh a model of `FaceListGraph` and `MutableFaceGraph` +/// @tparam FaceRange a model of `ConstRange` with `boost::graph_traits::%face_descriptor` as value type +/// @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" +/// +/// @param face_range the initial range of faces to be considered to look for badly shaped triangles. +/// Note that modifications of `tmesh` are not limited to faces in `face_range` +/// and neighbor faces might also be impacted. +/// @param tmesh the triangulated surface mesh to be modified +/// @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below +/// +/// \cgalNamedParamsBegin +/// \cgalParamNBegin{cap_threshold} +/// \cgalParamDescription{the cosine of a minimum angle such that if a face has an angle greater than this bound, +/// it is a cap. The threshold is in range `[-1 0]` and corresponds to an angle between `90` and `180` degrees.} +/// \cgalParamType{double} +/// \cgalParamDefault{the cosinus corresponding to an angle of 160 degrees} +/// \cgalParamNEnd +/// \cgalParamNBegin{needle_threshold} +/// \cgalParamDescription{a bound on the ratio of the lengths of the longest edge and the shortest edge, such that a face having a ratio +/// larger than the threshold is a needle.} +/// \cgalParamType{double} +/// \cgalParamDefault{4} +/// \cgalParamNEnd +/// \cgalParamNBegin{collapse_length_threshold} +/// \cgalParamDescription{if different from 0, an edge collapsed will be prevented if the edge is longer than the threshold given.} +/// \cgalParamType{double} +/// \cgalParamDefault{0} +/// \cgalParamNEnd +/// \cgalParamNBegin{flip_triangle_height_threshold} +/// \cgalParamDescription{if different from 0, an edge flip will be prevented if the height of the triangle (whose base is the edge to be flipped) +/// is longer than the threshold given.} +/// \cgalParamType{double} +/// \cgalParamDefault{0} +/// \cgalParamNEnd +/// \cgalParamNBegin{vertex_point_map} +/// \cgalParamDescription{a property map associating points to the vertices of `tmesh`.} +/// \cgalParamType{a class model of `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` +/// as key type and `%Point_3` as value type} +/// \cgalParamDefault{`boost::get(CGAL::vertex_point, tmesh)`.} +/// \cgalParamNEnd +/// \cgalParamNBegin{geom_traits} +/// \cgalParamDescription{an instance of a geometric traits class.} +/// \cgalParamType{A model of `Kernel`.} +/// \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`.} +/// \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} +/// \cgalParamNEnd +/// \cgalParamNBegin{edge_is_constrained_map} +/// \cgalParamDescription{a property map containing the constrained-or-not status of each edge of `tmesh`.} +/// \cgalParamType{a class model of `ReadablePropertyMap` with `boost::graph_traits::%edge_descriptor` +/// as key type and `bool` as value type.} +/// \cgalParamDefault{a default property map where no edge is constrained.} +/// \cgalParamExtra{A constrained edge can not be collapsed nor flipped.} +/// \cgalParamNEnd +/// \cgalParamNBegin{vertex_is_constrained_map} +/// \cgalParamDescription{a property map containing the constrained-or-not status of each vertex of `tmesh`.} +/// \cgalParamType{a class model of `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` +/// as key type and `bool` as value type.} +/// \cgalParamDefault{a default property map where no vertex is constrained.} +/// \cgalParamExtra{A constrained vertex is guaranteed to be present in `tmesh` after the function call.} +/// \cgalParamNEnd +/// \cgalParamNBegin{filter} +/// \cgalParamDescription{A function object providing `bool operator()(geom_traits::Point_3,geom_traits::Point_3,geom_traits::Point_3)`.} +/// \cgalParamType{The function object is queried each time a new triangle is about to be created by a flip or a collapse operation. +/// If `false` is returned, the operation is cancelled.} +/// \cgalParamDefault{a functor always returning `true`.} +/// \cgalParamNEnd +/// \cgalNamedParamsEnd +/// +/// \return `true` if no almost degenerate face could not be removed (due to topological constraints), and `false` otherwise. +/// +/// \sa `is_needle_triangle_face()` +/// \sa `is_cap_triangle_face()` +/// +/// @todo check what to use as priority queue with removable elements, set might not be optimal +/// template bool remove_almost_degenerate_faces(const FaceRange& face_range, TriangleMesh& tmesh, - const double cap_threshold, - const double needle_threshold, - const double collapse_length_threshold, const NamedParameters& np = parameters::default_values()) { using CGAL::parameters::choose_parameter; @@ -589,6 +641,13 @@ bool remove_almost_degenerate_faces(const FaceRange& face_range, typedef typename boost::property_map::type DVCM; DVCM vcm = get(Vertex_property_tag(), tmesh); + // parameters + const double cap_threshold = + choose_parameter(get_parameter(np, internal_np::cap_threshold), -0.939692621); // cos(160) + const double needle_threshold = + choose_parameter(get_parameter(np, internal_np::needle_threshold), 4.); + const double collapse_length_threshold = + choose_parameter(get_parameter(np, internal_np::collapse_length_threshold), 0.); const double flip_triangle_height_threshold_squared = CGAL::square(choose_parameter(get_parameter(np, internal_np::flip_triangle_height_threshold), 0)); @@ -948,18 +1007,16 @@ bool remove_almost_degenerate_faces(const FaceRange& face_range, return false; } +/// \ingroup PMP_geometric_repair_grp +/// removes all almost degenerate faces from a triangulated surface mesh. +/// Equivalent to `remove_almost_degenerate_faces(faces(tmesh), tmesh, np)` template bool remove_almost_degenerate_faces(TriangleMesh& tmesh, - const double cap_threshold, - const double needle_threshold, - const double collapse_length_threshold, const CGAL_NP_CLASS& np = parameters::default_values()) { - return remove_almost_degenerate_faces(faces(tmesh), tmesh, cap_threshold, needle_threshold, - collapse_length_threshold, np); + return remove_almost_degenerate_faces(faces(tmesh), tmesh, np); } -} // namespace experimental //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1242,7 +1299,7 @@ remove_a_border_edge(typename boost::graph_traits::edge_descriptor return remove_a_border_edge(ed, tm, input_range, edge_set, face_set); } -// \ingroup PMP_repairing_grp +// \ingroup PMP_geometric_repair_grp // // removes the degenerate edges from a triangulated surface mesh. // An edge is considered degenerate if its two extremities share the same location. @@ -1306,7 +1363,6 @@ bool remove_degenerate_edges(const EdgeRange& edge_range, typedef typename GetGeomTraits::type Traits; - std::size_t nb_deg_faces = 0; bool all_removed = false; bool some_removed = true; bool preserve_genus = choose_parameter(get_parameter(np, internal_np::preserve_genus), true); @@ -1327,7 +1383,7 @@ bool remove_degenerate_edges(const EdgeRange& edge_range, std::cout << "Found " << degenerate_edges_to_remove.size() << " null edges.\n"; #endif - // first try to remove all collapsable edges + // first try to remove all collapsible edges typename std::set::iterator it = degenerate_edges_to_remove.begin(); while(it != degenerate_edges_to_remove.end()) { @@ -1341,7 +1397,6 @@ bool remove_degenerate_edges(const EdgeRange& edge_range, // remove edges that could also be set for removal if(face(h, tmesh) != GT::null_face()) { - ++nb_deg_faces; const edge_descriptor prev_e = edge(prev(h, tmesh), tmesh); degenerate_edges_to_remove.erase(prev_e); local_edge_range.erase(prev_e); @@ -1350,7 +1405,6 @@ bool remove_degenerate_edges(const EdgeRange& edge_range, if(face(opposite(h, tmesh), tmesh) != GT::null_face()) { - ++nb_deg_faces; const edge_descriptor prev_opp_e = edge(prev(opposite(h, tmesh), tmesh), tmesh); degenerate_edges_to_remove.erase(prev_opp_e); local_edge_range.erase(prev_opp_e); @@ -1389,7 +1443,6 @@ bool remove_degenerate_edges(const EdgeRange& edge_range, // remove edges that could also be set for removal if(face(h, tmesh) != GT::null_face()) { - ++nb_deg_faces; const edge_descriptor prev_e = edge(prev(h, tmesh), tmesh); degenerate_edges_to_remove.erase(prev_e); local_edge_range.erase(prev_e); @@ -1398,7 +1451,6 @@ bool remove_degenerate_edges(const EdgeRange& edge_range, if(face(opposite(h, tmesh), tmesh)!=GT::null_face()) { - ++nb_deg_faces; const edge_descriptor prev_opp_e = edge(prev(opposite(h, tmesh), tmesh), tmesh); degenerate_edges_to_remove.erase(prev_opp_e); local_edge_range.erase(prev_opp_e); @@ -1662,7 +1714,7 @@ bool remove_degenerate_edges(const EdgeRange& edge_range, while(true); // @todo use the area criteria? this means maybe continue exploration of larger cc - // mark faces of completetly explored cc + // mark faces of completely explored cc for(index=0; index #include -#include +#include #include #include @@ -140,7 +140,7 @@ bool simplify_polygon(PointRange& points, return (removed_points_n != 0); } -// \ingroup PMP_repairing_grp +// \ingroup PMP_combinatorial_repair_grp // // For each polygon of the soup, removes consecutive identical (in a geometric sense) points. // @@ -194,7 +194,7 @@ std::size_t simplify_polygons_in_polygon_soup(PointRange& points, return simplified_polygons_n; } -// \ingroup PMP_repairing_grp +// \ingroup PMP_combinatorial_repair_grp // // splits "pinched" polygons, that is polygons for which a point appears more than once, // into multiple non-pinched polygons. @@ -203,22 +203,12 @@ std::size_t simplify_polygons_in_polygon_soup(PointRange& points, // \tparam PolygonRange a model of the concept `SequenceContainer` // whose `value_type` is itself a model of the concepts `SequenceContainer` // and `Swappable` whose `value_type` is `std::size_t`. -// \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" +// \tparam Traits a traits class providing `Equal_3` and `Less_xyz_3` for two 3D points // // \param points points of the soup of polygons // \param polygons a vector of polygons. Each element in the vector describes a polygon -// using the indices of the points in `points`. -// \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below -// -// \cgalNamedParamsBegin -// \cgalParamNBegin{geom_traits} -// \cgalParamDescription{an instance of a geometric traits class} -// \cgalParamType{The traits class must provide the nested functor `Less_xyz_3` -// to compare lexicographically two points a function `Less_xyz_3 less_xyz_3_object()`.} -// \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} -// \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} -// \cgalParamNEnd -// \cgalNamedParamsEnd +// using the indices of the points in `points`. +// \param traits an instance of traits // // \sa `repair_polygon_soup()` template @@ -301,7 +291,7 @@ std::size_t split_pinched_polygons_in_polygon_soup(PointRange& points, return new_polygons_n; } -// \ingroup PMP_repairing_grp +// \ingroup PMP_combinatorial_repair_grp // // removes polygons with fewer than 2 points from the soup. // @@ -309,11 +299,10 @@ std::size_t split_pinched_polygons_in_polygon_soup(PointRange& points, // \tparam PolygonRange a model of the concept `SequenceContainer` // whose `value_type` is itself a model of the concept `Container` // whose `value_type` is `std::size_t`. -// \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" // // \param points points of the soup of polygons // \param polygons a vector of polygons. Each element in the vector describes a polygon -// using the indices of the points in `points`. +// using the indices of the points in `points`. // // \sa `repair_polygon_soup()` template @@ -345,9 +334,70 @@ std::size_t remove_invalid_polygons_in_polygon_soup(PointRange& /*points*/, return removed_polygons_n; } +// \ingroup PMP_combinatorial_repair_grp +// +// Removes invalid array-based polygons, i.e. polygons which have two equal consecutive points. +// +// \tparam PointRange a model of the concept `Container` whose value type is the point type. +// \tparam PolygonRange a model of the concept `SequenceContainer` +// whose value_type is `std::array` with `N`. +// \tparam Traits Traits class providing `Equal_3` for two points. +// +// \param points points of the soup of polygons. +// \param polygons a vector of polygons. Each element in the vector describes a polygon +// using the indices of the points in `points`. +// \param traits an instance of the traits clas +// +template +std::size_t remove_invalid_polygons_in_array_polygon_soup(PointRange& points, + PolygonRange& polygons, + const Traits& traits = Traits()) +{ + typedef typename internal::Polygon_types::Polygon_3 Polygon_3; + + std::vector to_remove; + const std::size_t ini_polygons_size = polygons.size(); + for(std::size_t polygon_index=0; polygon_index!=ini_polygons_size; ++polygon_index) + { + const Polygon_3& polygon = polygons[polygon_index]; + const std::size_t N = polygon.size(), last = N-1; + CGAL_assertion(N > 2); + + for(std::size_t i=0; i 0) + std::cout << "Removed " << removed_polygons_n << " invalid polygon(s)" << std::endl; +#endif + + return removed_polygons_n; +} + } // end namespace internal -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// removes the isolated points from a polygon soup. /// A point is considered isolated if it does not appear in any polygon of the soup. @@ -450,7 +500,7 @@ std::size_t remove_isolated_points_in_polygon_soup(PointRange& points, return removed_points_n; } -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// \brief merges the duplicate points in a polygon soup. /// @@ -673,14 +723,14 @@ Polygon construct_canonical_polygon(const PointRange& points, return construct_canonical_polygon(points, polygon, useless, traits); } -template +template struct Polygon_hash { typedef std::size_t result_type; typedef typename internal::Polygon_types::Polygon_3 Polygon_3; - Polygon_hash(const PointRange& points, const PolygonRange& canonical_polygons, const Traits& traits) - : points(points), canonical_polygons(canonical_polygons), traits(traits) + Polygon_hash(const PointRange& points, const PolygonRange& canonical_polygons) + : points(points), canonical_polygons(canonical_polygons) { } template @@ -698,7 +748,6 @@ struct Polygon_hash private: const PointRange& points; const PolygonRange& canonical_polygons; - const Traits& traits; }; template @@ -768,7 +817,7 @@ struct Duplicate_collector void dump(CGAL::Emptyset_iterator) { } }; -// \ingroup PMP_repairing_grp +// \ingroup PMP_combinatorial_repair_grp // // collects duplicate polygons in a polygon soup, that is polygons that share the same vertices in the same // order. @@ -779,12 +828,14 @@ struct Duplicate_collector // and `ReversibleContainer` whose `value_type` is `std::size_t`. // \tparam DuplicateOutputIterator a model of `OutputIterator` with value type // `std::vector >`. +// \tparam Traits a traits class providing `Less_xyz_3` for two 3D points // // \param points points of the soup of polygons // \param polygons a vector of polygons. Each element in the vector describes a polygon // using the indices of the points in `points`. // \param out the output iterator in which duplicate polygons are put. Each entry is a vector of // polygon ids `i0`, `i1`, etc. such that `polygons[i0] = polygons[i1] = ...` +// \param traits an instance of traits // \param same_orientation whether two polygons should have the same orientation to be duplicates. // // \sa `repair_polygon_soup()` @@ -797,11 +848,11 @@ DuplicateOutputIterator collect_duplicate_polygons(const PointRange& points, { typedef typename internal::Polygon_types::P_ID P_ID; - typedef internal::Polygon_hash Hasher; + typedef internal::Polygon_hash Hasher; typedef boost::dynamic_bitset<> Reversed_markers; typedef internal::Polygon_equality_tester Equality; - typedef std::unordered_set Unique_polygons; + typedef std::unordered_set Unique_polygons; const std::size_t polygons_n = polygons.size(); @@ -819,7 +870,7 @@ DuplicateOutputIterator collect_duplicate_polygons(const PointRange& points, is_reversed.set(polygon_index); } - Hasher hash(points, canonical_polygons, traits); + Hasher hash(points, canonical_polygons); Equality equal(points, canonical_polygons, is_reversed, traits, same_orientation); Unique_polygons unique_polygons(polygons_n /*bucket size*/, hash, equal); @@ -846,7 +897,7 @@ DuplicateOutputIterator collect_duplicate_polygons(const PointRange& points, } // end namespace internal -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// merges the duplicate polygons in a polygon soup. Two polygons are duplicate if they share the same /// vertices in the same order. Note that the first vertex of the polygon does not matter, that is @@ -1031,15 +1082,21 @@ struct Polygon_soup_fixer > PolygonRange& polygons, const NamedParameters& np) const { - #ifdef CGAL_PMP_REPAIR_POLYGON_SOUP_VERBOSE + using parameters::get_parameter; + using parameters::choose_parameter; + + typedef typename GetPolygonGeomTraits::type Traits; + Traits traits = choose_parameter(get_parameter(np, internal_np::geom_traits), Traits()); + +#ifdef CGAL_PMP_REPAIR_POLYGON_SOUP_VERBOSE std::cout << "Repairing soup with " << points.size() << " points and " << polygons.size() << " arrays" << std::endl; - #endif +#endif merge_duplicate_points_in_polygon_soup(points, polygons, np); // skipped steps: // simplify_polygons_in_polygon_soup(points, polygons, traits); // split_pinched_polygons_in_polygon_soup(points, polygons, traits); - remove_invalid_polygons_in_polygon_soup(points, polygons); + remove_invalid_polygons_in_array_polygon_soup(points, polygons, traits); merge_duplicate_polygons_in_polygon_soup(points, polygons, np); remove_isolated_points_in_polygon_soup(points, polygons); } @@ -1047,7 +1104,7 @@ struct Polygon_soup_fixer > } // namespace internal -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// \brief cleans a given polygon soup through various repairing operations. /// @@ -1068,7 +1125,7 @@ struct Polygon_soup_fixer > /// /// \tparam PointRange a model of the concepts `SequenceContainer` and `Swappable` /// and whose value type is the point type. -/// \tparam PolygonRange a model of the concept `SequenceContainer`. +/// \tparam PolygonRange a model of the concept `SequenceContainer` /// whose `value_type` is itself a model of the concepts `SequenceContainer`, /// `Swappable`, and `ReversibleContainer` whose `value_type` is `std::size_t`. /// \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h index dc152e2b..93846d18 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h $ -// $Id: repair_self_intersections.h 898142d 2022-12-22T09:49:35+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h $ +// $Id: include/CGAL/Polygon_mesh_processing/repair_self_intersections.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot, @@ -178,7 +178,7 @@ FaceOutputIterator replace_faces_with_patch(const std::vector::value_type, Point>::value)); + static_assert(std::is_same::value_type, Point>::value); typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -251,7 +251,6 @@ FaceOutputIterator replace_faces_with_patch(const std::vector::null_face(); @@ -818,7 +816,7 @@ void dump_cc(const std::string filename, // Similarly if the edge is an internal sharp edge, we don't really want to use the opposite face because // there is by definition a strong discontinuity and it might thus mislead the hole filling algorithm. // -// Rather, we construct an artifical third point that is in the same plane as the face incident to `h`, +// Rather, we construct an artificial third point that is in the same plane as the face incident to `h`, // defined as the third point of the imaginary equilateral triangle incident to opp(h, tmesh) template typename boost::property_traits::value_type @@ -1152,6 +1150,9 @@ bool adapt_patch(std::vector >& point_patch, put(local_vpm, v, projector(get(local_vpm, v))); // The projector can create degenerate faces + for (halfedge_descriptor h : border_hedges) + if (is_degenerate_triangle_face(face(opposite(h, local_mesh), local_mesh), local_mesh)) + return !has_SI; if(!remove_degenerate_faces(local_mesh)) return !has_SI; @@ -1586,7 +1587,6 @@ bool fill_hole_with_constraints(std::vector visited_faces; std::vector > patch; - int cc_counter = 0; for(face_descriptor f : cc_faces) { if(!visited_faces.insert(f).second) // already visited that face @@ -1598,7 +1598,6 @@ bool fill_hole_with_constraints(std::vector #include -#include +#include #include #include @@ -43,6 +43,7 @@ #endif #include +#include #include #include @@ -54,6 +55,127 @@ namespace CGAL { namespace Polygon_mesh_processing { namespace internal { +template +struct Triangle_mesh_and_triangle_soup_wrapper +{ + typedef typename boost::graph_traits::face_descriptor face_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; // private + + static void get_face_vertices(face_descriptor fd, std::array& vh, const TM& tm) + { + CGAL_assertion(boost::graph_traits::null_face() != fd); + halfedge_descriptor h = halfedge(fd, tm); + vh[0]=source(h, tm); + vh[1]=target(h, tm); + vh[2]=target(next(h, tm), tm); + } + + static bool faces_have_a_shared_edge(face_descriptor f, face_descriptor g, std::array& vh, const TM& tm) + { + CGAL_assertion(boost::graph_traits::null_face() != f); + CGAL_assertion(boost::graph_traits::null_face() != g); + halfedge_descriptor h=halfedge(f, tm); + for(unsigned int i=0; i<3; ++i) + { + halfedge_descriptor opp_h = opposite(h, tm); + if(face(opp_h, tm) == g) + { + vh[0]=source(h, tm); + vh[1]=target(h, tm); + vh[2]=target(next(h, tm), tm); + vh[3]=target(next(opp_h, tm), tm); + return true; + } + h = next(h, tm); + } + return false; + } + + static bool is_pure_triangle(const TM& tm) + { + return is_triangle_mesh(tm); + } +}; + +template +struct Triangle_mesh_and_triangle_soup_wrapper< + std::pair> +{ + typedef std::size_t face_descriptor; + typedef std::size_t vertex_descriptor; + + typedef std::pair Soup; + + static void get_face_vertices(face_descriptor fd, std::array& vh, const Soup& soup) + { + const auto& face = soup.second[fd]; + vh[0]=face[0]; + vh[1]=face[1]; + vh[2]=face[2]; + } + + static bool faces_have_a_shared_edge(face_descriptor fd, face_descriptor gd, std::array& vh, const Soup& soup) + { + const auto& f = soup.second[fd]; + const auto& g = soup.second[gd]; + + for(unsigned int i=0; i<2; ++i) // no need to check f[2] if neither f[0] nor f[1] are shared + { + for(unsigned int j=0; j<3; ++j) + { + if (f[i]==g[j]) + { + vh[0]=f[i]; + vh[1]=f[i+1]; + vh[2]=f[(i+2)%3]; + + if (vh[1]==g[(j+1)%3]) + { + vh[3]=g[(j+2)%3]; + return true; + } + if (vh[1]==g[(j+2)%3]) + { + vh[3]=g[(j+1)%3]; + return true; + } + + if (i==0) + { + vh[1]=f[i]; + vh[2]=f[(i+1)%3]; + vh[0]=f[(i+2)%3]; + if (vh[0]==g[(j+1)%3]) + { + vh[3]=g[(j+2)%3]; + return true; + } + if (vh[0]==g[(j+2)%3]) + { + vh[3]=g[(j+1)%3]; + return true; + } + } + + return false; + } + } + } + + return false; + } + + static bool is_pure_triangle(const Soup& soup) + { + for (const typename std::iterator_traits::value_type& t : soup.second) + if (t.size()!=3) + return false; + return true; + } +}; + template struct Throw_at_count_reached_functor { @@ -82,59 +204,49 @@ struct Throw_at_count_reached_functor { // Checks for 'real' intersections, i.e. not simply a shared vertex or edge template -bool do_faces_intersect(typename boost::graph_traits::halfedge_descriptor h, - typename boost::graph_traits::halfedge_descriptor g, +bool do_faces_intersect(typename Triangle_mesh_and_triangle_soup_wrapper::face_descriptor fh, + typename Triangle_mesh_and_triangle_soup_wrapper::face_descriptor fg, const TM& tmesh, const VPM vpmap, const typename GT::Construct_segment_3& construct_segment, const typename GT::Construct_triangle_3& construct_triangle, const typename GT::Do_intersect_3& do_intersect) { - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef Triangle_mesh_and_triangle_soup_wrapper Wrapper; + typedef typename Wrapper::vertex_descriptor vertex_descriptor; - typedef typename GT::Segment_3 Segment; - typedef typename GT::Triangle_3 Triangle; + typedef typename GT::Segment_3 Segment; + typedef typename GT::Triangle_3 Triangle; - CGAL_assertion(!is_border(h, tmesh)); - CGAL_assertion(!is_border(g, tmesh)); - vertex_descriptor hv[3], gv[3]; - hv[0] = target(h, tmesh); - hv[1] = target(next(h, tmesh), tmesh); - hv[2] = source(h, tmesh); - - gv[0] = target(g, tmesh); - gv[1] = target(next(g, tmesh), tmesh); - gv[2] = source(g, tmesh); + std::array hv, gv; + Wrapper::get_face_vertices(fh, hv, tmesh); + Wrapper::get_face_vertices(fg, gv, tmesh); // check for shared edge - for(unsigned int i=0; i<3; ++i) + std::array verts; + if (Wrapper::faces_have_a_shared_edge(fh, fg, verts, tmesh)) { - halfedge_descriptor opp_h = opposite(h, tmesh); - if(face(opp_h, tmesh) == face(g, tmesh)) + if (verts[2]==verts[3]) return false; // only for a soup of triangles + + // there is an intersection if the four points are coplanar and the triangles overlap + if(CGAL::coplanar(get(vpmap, verts[0]), + get(vpmap, verts[1]), + get(vpmap, verts[2]), + get(vpmap, verts[3])) && + CGAL::coplanar_orientation(get(vpmap, verts[0]), + get(vpmap, verts[1]), + get(vpmap, verts[2]), + get(vpmap, verts[3])) + == CGAL::POSITIVE) { - // there is an intersection if the four points are coplanar and the triangles overlap - if(CGAL::coplanar(get(vpmap, hv[i]), - get(vpmap, hv[(i+1)%3]), - get(vpmap, hv[(i+2)%3]), - get(vpmap, target(next(opp_h, tmesh), tmesh))) && - CGAL::coplanar_orientation(get(vpmap, hv[(i+2)%3]), - get(vpmap, hv[i]), - get(vpmap, hv[(i+1)%3]), - get(vpmap, target(next(opp_h, tmesh), tmesh))) - == CGAL::POSITIVE) - { - return true; - } - else - { - // there is a shared edge but no intersection - return false; - } + return true; + } + else + { + // there is a shared edge but no intersection + return false; } - - h = next(h, tmesh); } // check for shared vertex --> maybe intersection, maybe not @@ -188,8 +300,6 @@ template struct Strict_intersect_faces // "strict" as in "not sharing a subface" { - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - mutable OutputIterator m_iterator; const TM& m_tmesh; const VPM m_vpmap; @@ -209,10 +319,7 @@ struct Strict_intersect_faces // "strict" as in "not sharing a subface" void operator()(const Box* b, const Box* c) const { - const halfedge_descriptor h = halfedge(b->info(), m_tmesh); - const halfedge_descriptor g = halfedge(c->info(), m_tmesh); - - if(do_faces_intersect(h, g, m_tmesh, m_vpmap, m_construct_segment, m_construct_triangle, m_do_intersect)) + if(do_faces_intersect(b->info(), c->info(), m_tmesh, m_vpmap, m_construct_segment, m_construct_triangle, m_do_intersect)) *m_iterator++ = std::make_pair(b->info(), c->info()); } }; @@ -229,15 +336,17 @@ self_intersections_impl(const FaceRange& face_range, const bool throw_on_SI, const NamedParameters& np) { - CGAL_precondition(CGAL::is_triangle_mesh(tmesh)); + typedef TriangleMesh TM; + typedef Triangle_mesh_and_triangle_soup_wrapper Wrapper; + + CGAL_precondition(Wrapper::is_pure_triangle(tmesh)); using CGAL::parameters::choose_parameter; using CGAL::parameters::get_parameter; using CGAL::parameters::is_default_parameter; - typedef TriangleMesh TM; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::face_descriptor face_descriptor; + typedef typename Wrapper::face_descriptor face_descriptor; + typedef typename Wrapper::vertex_descriptor vertex_descriptor; typedef CGAL::Box_intersection_d::ID_FROM_BOX_ADDRESS Box_policy; typedef CGAL::Box_intersection_d::Box_with_info_d Box; @@ -245,9 +354,9 @@ self_intersections_impl(const FaceRange& face_range, typedef typename GetGeomTraits::type GT; GT gt = choose_parameter(get_parameter(np, internal_np::geom_traits)); - typedef typename GetVertexPointMap::const_type VPM; - VPM vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), - get_const_property_map(boost::vertex_point, tmesh)); + typedef GetVertexPointMap VPM_helper; + typedef typename VPM_helper::const_type VPM; + VPM vpmap = VPM_helper::get_const_map(np, tmesh); const bool do_limit = !(is_default_parameter::value); const unsigned int maximum_number = choose_parameter(get_parameter(np, internal_np::maximum_number), 0); @@ -268,11 +377,13 @@ self_intersections_impl(const FaceRange& face_range, // This loop is very cheap, so there is hardly anything to gain from parallelizing it for(face_descriptor f : face_range) { - halfedge_descriptor h = halfedge(f, tmesh); + std::array vh; + Wrapper::get_face_vertices(f, vh, tmesh); + typename boost::property_traits::reference - p = get(vpmap, target(h,tmesh)), - q = get(vpmap, target(next(h, tmesh), tmesh)), - r = get(vpmap, target(prev(h, tmesh), tmesh)); + p = get(vpmap, vh[0]), + q = get(vpmap, vh[1]), + r = get(vpmap, vh[2]); // tiny fixme: if f is degenerate, we might still have a real intersection between f // and another face f', but right now we are not creating a box for f and thus not returning those @@ -312,7 +423,7 @@ self_intersections_impl(const FaceRange& face_range, Throwing_filter throwing_filter(tmesh, vpmap, gt, Throwing_output_iterator()); #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if(std::is_convertible::value) @@ -342,7 +453,7 @@ self_intersections_impl(const FaceRange& face_range, std::atomic atomic_counter(counter); Throw_functor throwing_count_functor(atomic_counter, maximum_number, std::back_inserter(face_pairs)); Throwing_after_count_output_iterator count_filter(throwing_count_functor); - Filtered_intersecting_faces_filter limited_callback(tmesh, vpmap, gt, count_filter); + Filtered_intersecting_faces_filter limited_callback(tmesh, vpmap, gt, count_filter); CGAL::box_self_intersection_d(box_ptr.begin(), box_ptr.end(), limited_callback, cutoff); } catch(const CGAL::internal::Throw_at_output_exception&) @@ -408,9 +519,9 @@ self_intersections_impl(const FaceRange& face_range, * * collects intersections between a subset of faces of a triangulated surface mesh. * Two faces are said to intersect if the corresponding triangles intersect - * and the intersection is not an edge nor a vertex incident to both faces. + * and the intersection is neither an edge nor a vertex incident to both faces. * - * This function depends on the package \ref PkgBoxIntersectionD + * This function depends on the package \ref PkgBoxIntersectionD. * * @pre `CGAL::is_triangle_mesh(tmesh)` * @@ -419,7 +530,8 @@ self_intersections_impl(const FaceRange& face_range, * @tparam FaceRange a model of `ConstRange` with value type `boost::graph_traits::%face_descriptor`. * @tparam TriangleMesh a model of `FaceListGraph` * @tparam FacePairOutputIterator a model of `OutputIterator` holding objects of type - * `std::pair::%face_descriptor, boost::graph_traits::%face_descriptor>` + * `std::pair::%face_descriptor, boost::graph_traits::%face_descriptor>`. + * It does not need to be thread-safe. * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" * * @param face_range the range of faces to check for self-intersection. @@ -475,9 +587,9 @@ self_intersections(const FaceRange& face_range, * * collects intersections between all the faces of a triangulated surface mesh. * Two faces are said to intersect if the corresponding triangles intersect - * and the intersection is not an edge nor a vertex incident to both faces. + * and the intersection is neither an edge nor a vertex incident to both faces. * - * This function depends on the package \ref PkgBoxIntersectionD + * This function depends on the package \ref PkgBoxIntersectionD. * * @pre `CGAL::is_triangle_mesh(tmesh)` * @@ -485,14 +597,15 @@ self_intersections(const FaceRange& face_range, * Possible values are `Sequential_tag`, `Parallel_tag`, and `Parallel_if_available_tag`. * @tparam TriangleMesh a model of `FaceListGraph` * @tparam FacePairOutputIterator a model of `OutputIterator` holding objects of type - * `std::pair::%face_descriptor, boost::graph_traits::%face_descriptor>` + * `std::pair::%face_descriptor, boost::graph_traits::%face_descriptor>`. + * It does not need to be thread-safe. * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" * * @param tmesh the triangulated surface mesh to be checked * @param out output iterator to be filled with all pairs of non-adjacent faces that intersect. - In case `tmesh` contains some degenerate faces, for each degenerate face `f` a pair `(f,f)` - will be put in `out` before any other self intersection between non-degenerate faces. - These are the only pairs where degenerate faces will be reported. + * In case `tmesh` contains some degenerate faces, for each degenerate face `f` a pair `(f,f)` + * will be put in `out` before any other self intersection between non-degenerate faces.
    + * Note that these are the only pairs where degenerate faces will be reported. * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below * * \cgalNamedParamsBegin @@ -541,7 +654,7 @@ self_intersections(const TriangleMesh& tmesh, * * \brief tests if a set of faces of a triangulated surface mesh self-intersects. * - * This function depends on the package \ref PkgBoxIntersectionD + * This function depends on the package \ref PkgBoxIntersectionD. * * @pre `CGAL::is_triangle_mesh(tmesh)` * @@ -584,8 +697,6 @@ bool does_self_intersect(const FaceRange& face_range, const TriangleMesh& tmesh, const NamedParameters& np = parameters::default_values()) { - CGAL_precondition(CGAL::is_triangle_mesh(tmesh)); - try { CGAL::Emptyset_iterator unused_out; @@ -614,7 +725,7 @@ bool does_self_intersect(const FaceRange& face_range, * * \brief tests if a triangulated surface mesh self-intersects. * - * This function depends on the package \ref PkgBoxIntersectionD + * This function depends on the package \ref PkgBoxIntersectionD. * * @pre `CGAL::is_triangle_mesh(tmesh)` * @@ -656,6 +767,219 @@ bool does_self_intersect(const TriangleMesh& tmesh, return does_self_intersect(faces(tmesh), tmesh, np); } + +#ifndef DOXYGEN_RUNNING +template +struct Property_map_for_soup +{ + typedef std::size_t key_type; + typedef typename boost::property_traits::value_type value_type; + //typedef typename boost::property_traits::category category; + typedef boost::readable_property_map_tag category; + typedef typename boost::property_traits::reference reference; + + const PointRange& points; + VPM vpm; + + Property_map_for_soup(const PointRange& points, VPM vpm) + : points(points) + , vpm(vpm) + {} + + inline friend + reference get(const Property_map_for_soup& map, key_type k) + { + return get(map.vpm, map.points[k]); + } +}; +#endif + +/** + * \ingroup PMP_intersection_grp + * + * collects intersections between all the triangles in a triangle soup. + * + * Two triangles of the soup are said to intersect if the corresponding geometric triangles intersect + * and the intersection is neither an edge nor a vertex of both triangles + * (with the same point ids, ignoring the orientation for an edge). + * + * This function depends on the package \ref PkgBoxIntersectionD. + * + * @tparam ConcurrencyTag enables sequential versus parallel algorithm. + * Possible values are `Sequential_tag`, `Parallel_tag`, and `Parallel_if_available_tag`. + * @tparam PointRange a model of the concept `RandomAccessContainer` + * whose value type is the point type + * @tparam TriangleRange a model of the concept `RandomAccessContainer` whose + * value type is a model of the concept `RandomAccessContainer` whose value type is `std::size_t` + * @tparam TriangleIdPairOutputIterator a model of `OutputIterator` holding objects of type + * `std::pair` + * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * @param points points of the soup of triangles + * @param triangles each element in the range describes a triangle using the indices of the points in `points` + * @param out output iterator to be filled with all pairs of ids of triangles intersecting (the id of a triangle is its position in `triangles`). + * In case the triangle soup contains some degenerate triangles, for each degenerate triangle `t` with id `i` a pair `(i,i)` + * will be put in `out` before any other self intersection between non-degenerate triangles.
    + * Note that these are the only pairs where degenerate triangles will be reported. + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{maximum_number} + * \cgalParamDescription{the maximum number of self intersections that will be detected and returned by the function.} + * \cgalParamType{unsigned int} + * \cgalParamDefault{No limit.} + * \cgalParamExtra{In parallel mode, the number of returned self-intersections is at least `maximum_number` + * (and not exactly that number) as no strong synchronization is put on threads for performance reasons.} + * \cgalParamNEnd + * + * \cgalParamNBegin{point_map} + * \cgalParamDescription{a property map associating points to the elements of the range `points`} + * \cgalParamType{a model of `ReadablePropertyMap` whose value type is a point type from a \cgal `Kernel`.} + * \cgalParamDefault{`CGAL::Identity_property_map`} + * \cgalParamNEnd + * + * \cgalParamNBegin{geom_traits} + * \cgalParamDescription{an instance of a geometric traits class} + * \cgalParamType{a class model of `PMPSelfIntersectionTraits`} + * \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} + * \cgalParamExtra{The geometric traits class must be compatible with the point type of the point map.} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + * @return `out` + * + * @sa `does_triangle_soup_self_intersect()` + * @sa `self_intersections()` + * @sa `does_self_intersect()` + */ +template +TriangleIdPairOutputIterator +triangle_soup_self_intersections(const PointRange& points, + const TriangleRange& triangles, + TriangleIdPairOutputIterator out, + const CGAL_NP_CLASS& np = parameters::default_values()) +{ + using parameters::choose_parameter; + using parameters::get_parameter; + using parameters::is_default_parameter; + + typedef typename CGAL::GetPointMap::const_type Point_map_base; + Point_map_base pm_base = choose_parameter(get_parameter(np, internal_np::point_map)); + typedef Property_map_for_soup Point_map; + typedef typename GetPolygonSoupGeomTraits::type GT; + GT gt = choose_parameter(get_parameter(np, internal_np::geom_traits)); + + const bool do_limit = !(is_default_parameter::value); + if (do_limit) + { + return self_intersections(boost::irange(0, triangles.size()), + std::make_pair(std::cref(points), std::cref(triangles)), + out, + parameters::vertex_point_map(Point_map(points,pm_base)). + geom_traits(gt). + maximum_number(choose_parameter(get_parameter(np, internal_np::maximum_number), 0))); + } + + return self_intersections(boost::irange(0, triangles.size()), + std::make_pair(std::cref(points), std::cref(triangles)), + out, + parameters::vertex_point_map(Point_map(points,pm_base)). + geom_traits(gt)); +} + +/** + * \ingroup PMP_intersection_grp + * + * \brief tests if a triangle soup self-intersects. + * + * A triangle soup self-intersects if at least two triangles of the soup intersect. + * Two triangles of the soup are said to intersect if the corresponding geometric triangles intersect + * and the intersection is neither an edge nor a vertex of both triangles + * (with the same point ids, ignoring the orientation for an edge). + * + * This function depends on the package \ref PkgBoxIntersectionD. + * + * @tparam ConcurrencyTag enables sequential versus parallel algorithm. + * Possible values are `Sequential_tag`, `Parallel_tag`, and `Parallel_if_available_tag`. + * @tparam PointRange a model of the concept `RandomAccessContainer` + * whose value type is the point type + * @tparam TriangleRange a model of the concept `RandomAccessContainer` whose + * value type is a model of the concept `RandomAccessContainer` whose value type is `std::size_t` + * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * @param points points of the soup of triangles + * @param triangles each element in the range describes a triangle using the indices of the points in `points` + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{point_map} + * \cgalParamDescription{a property map associating points to the elements of the range `points`} + * \cgalParamType{a model of `ReadablePropertyMap` whose value type is a point type from a \cgal `Kernel`.} + * \cgalParamDefault{`CGAL::Identity_property_map`} + * \cgalParamNEnd + * + * \cgalParamNBegin{geom_traits} + * \cgalParamDescription{an instance of a geometric traits class} + * \cgalParamType{a class model of `PMPSelfIntersectionTraits`} + * \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} + * \cgalParamExtra{The geometric traits class must be compatible with the point type of the point map.} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + * @return `true` if the triangle soup self-intersects, and `false` otherwise. + * + * @sa `triangle_soup_self_intersections()` + * @sa `self_intersections()` + * @sa `does_self_intersect()` + */ +template +bool does_triangle_soup_self_intersect(const PointRange& points, + const TriangleRange& triangles, + const CGAL_NP_CLASS& np = parameters::default_values()) +{ + try + { + using parameters::choose_parameter; + using parameters::get_parameter; + + CGAL::Emptyset_iterator unused_out; + typedef typename CGAL::GetPointMap::const_type Point_map_base; + Point_map_base pm_base = choose_parameter(get_parameter(np, internal_np::point_map)); + typedef Property_map_for_soup Point_map; + typedef typename GetPolygonSoupGeomTraits::type GT; + GT gt = choose_parameter(get_parameter(np, internal_np::geom_traits)); + + internal::self_intersections_impl(boost::irange(0, triangles.size()), + std::make_pair(std::cref(points), std::cref(triangles)), + unused_out, true /*throw*/, + parameters::vertex_point_map(Point_map(points,pm_base)) + .geom_traits(gt)); + } + catch (const CGAL::internal::Throw_at_output_exception&) + { + return true; + } + #if defined(CGAL_LINKED_WITH_TBB) && TBB_USE_CAPTURED_EXCEPTION + catch (const tbb::captured_exception& e) + { + const char* ti1 = e.name(); + const char* ti2 = typeid(const CGAL::internal::Throw_at_output_exception&).name(); + const std::string tn1(ti1); + const std::string tn2(ti2); + if (tn1 == tn2) return true; + else throw; + } + #endif + return false; +} + }// namespace Polygon_mesh_processing }// namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/shape_predicates.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/shape_predicates.h index acf08188..858852ae 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/shape_predicates.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/shape_predicates.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/shape_predicates.h $ -// $Id: shape_predicates.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/shape_predicates.h $ +// $Id: include/CGAL/Polygon_mesh_processing/shape_predicates.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include @@ -80,6 +80,8 @@ bool is_degenerate_edge(typename boost::graph_traits::edge_descript using parameters::get_parameter; using parameters::choose_parameter; + CGAL_precondition(is_valid_edge_descriptor(e, pm)); + typedef typename GetVertexPointMap::const_type VertexPointMap; VertexPointMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(vertex_point, pm)); @@ -190,11 +192,12 @@ bool is_degenerate_triangle_face(typename boost::graph_traits::fac const TriangleMesh& tm, const NamedParameters& np = parameters::default_values()) { - CGAL_precondition(CGAL::is_triangle(halfedge(f, tm), tm)); - using parameters::get_parameter; using parameters::choose_parameter; + CGAL_precondition(is_valid_face_descriptor(f, tm)); + CGAL_precondition(CGAL::is_triangle(halfedge(f, tm), tm)); + typedef typename GetVertexPointMap::const_type VertexPointMap; VertexPointMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(vertex_point, tm)); @@ -388,6 +391,7 @@ struct Is_edge_length_ratio_over_threshold /// If the face contains degenerate edges, a halfedge corresponding to one of these edges is returned. /// /// \sa `is_cap_triangle_face()` +/// \sa `remove_almost_degenerate_faces()` template typename boost::graph_traits::halfedge_descriptor is_needle_triangle_face(typename boost::graph_traits::face_descriptor f, @@ -395,14 +399,14 @@ is_needle_triangle_face(typename boost::graph_traits::face_descrip const double threshold, const NamedParameters& np = parameters::default_values()) { - CGAL_precondition(threshold >= 1.); - CGAL_precondition(f != boost::graph_traits::null_face()); - CGAL_precondition(CGAL::is_triangle(halfedge(f, tm), tm)); + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; using parameters::get_parameter; using parameters::choose_parameter; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + CGAL_precondition(is_valid_face_descriptor(f, tm)); + CGAL_precondition(CGAL::is_triangle(halfedge(f, tm), tm)); + CGAL_precondition(threshold >= 1.); typedef typename GetVertexPointMap::const_type VertexPointMap; VertexPointMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), @@ -536,6 +540,7 @@ struct Is_cap_angle_over_threshold /// \return the halfedge opposite of the largest angle if the face is a cap, and a null halfedge otherwise. /// /// \sa `is_needle_triangle_face()` +/// \sa `remove_almost_degenerate_faces()` template typename boost::graph_traits::halfedge_descriptor is_cap_triangle_face(typename boost::graph_traits::face_descriptor f, @@ -543,15 +548,15 @@ is_cap_triangle_face(typename boost::graph_traits::face_descriptor const double threshold, const NamedParameters& np = parameters::default_values()) { - CGAL_precondition(f != boost::graph_traits::null_face()); - CGAL_precondition(CGAL::is_triangle(halfedge(f, tm), tm)); - CGAL_precondition(threshold >= -1.); - CGAL_precondition(threshold <= 0.); + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; using parameters::get_parameter; using parameters::choose_parameter; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + CGAL_precondition(is_valid_face_descriptor(f, tm)); + CGAL_precondition(CGAL::is_triangle(halfedge(f, tm), tm)); + CGAL_precondition(threshold >= -1.); + CGAL_precondition(threshold <= 0.); typedef typename GetVertexPointMap::const_type VertexPointMap; VertexPointMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/smooth_mesh.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/smooth_mesh.h index 78938876..455310f5 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/smooth_mesh.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/smooth_mesh.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_mesh.h $ -// $Id: smooth_mesh.h 0d2b1cb 2022-03-31T16:50:40+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_mesh.h $ +// $Id: include/CGAL/Polygon_mesh_processing/smooth_mesh.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/smooth_shape.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/smooth_shape.h index a7a57767..b463198a 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/smooth_shape.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/smooth_shape.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_shape.h $ -// $Id: smooth_shape.h bb0b9a8 2022-03-07T15:32:37+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_shape.h $ +// $Id: include/CGAL/Polygon_mesh_processing/smooth_shape.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -61,6 +61,25 @@ namespace Polygon_mesh_processing { * \cgalParamDefault{`1`} * \cgalParamNEnd * +* \cgalParamNBegin{vertex_is_constrained_map} +* \cgalParamDescription{a property map containing the constrained-or-not status of each vertex of `tmesh`.} +* \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` +* as key type and `bool` as value type. It must be default constructible.} +* \cgalParamDefault{a default property map where no vertex is constrained} +* \cgalParamExtra{A constrained vertex cannot be modified at all during smoothing.} +* \cgalParamNEnd +* +* \cgalParamNBegin{do_scale} +* \cgalParamDescription{Whether to apply rescaling after smoothing. This is useful because +* the mean curvature flow tends to shrink the surface.} +* \cgalParamType{Boolean} +* \cgalParamDefault{`true`} +* \cgalParamExtra{Scaling can only be applied if the mesh is closed and if there is no more than +* a single constrained vertex.} +* \cgalParamExtra{If a vertex is constrained, it is the fixed point of the scaling, otherwise +* the centroid is used.} +* \cgalParamNEnd +* * \cgalParamNBegin{vertex_point_map} * \cgalParamDescription{a property map associating points to the vertices of `tmesh`} * \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` @@ -77,14 +96,6 @@ namespace Polygon_mesh_processing { * \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} * \cgalParamNEnd * -* \cgalParamNBegin{vertex_is_constrained_map} -* \cgalParamDescription{a property map containing the constrained-or-not status of each vertex of `tmesh`.} -* \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` -* as key type and `bool` as value type. It must be default constructible.} -* \cgalParamDefault{a default property map where no vertex is constrained} -* \cgalParamExtra{A constrained vertex cannot be modified at all during smoothing.} -* \cgalParamNEnd -* * \cgalParamNBegin{sparse_linear_solver} * \cgalParamDescription{an instance of the sparse linear solver used for smoothing} * \cgalParamType{a class model of `SparseLinearAlgebraWithFactorTraits_d`} @@ -97,9 +108,10 @@ namespace Polygon_mesh_processing { * * @warning This function involves linear algebra, that is computed using non-exact, floating-point arithmetic. * -* @see `smooth_mesh()` +* @see `angle_and_area_smoothing()` */ -template +template void smooth_shape(const FaceRange& faces, TriangleMesh& tmesh, const double time, @@ -125,6 +137,7 @@ void smooth_shape(const FaceRange& faces, VCMap vcmap = choose_parameter(get_parameter(np, internal_np::vertex_is_constrained), Static_boolean_property_map()); const unsigned int nb_iterations = choose_parameter(get_parameter(np, internal_np::number_of_iterations), 1); + const bool scale_after_smoothing = choose_parameter(get_parameter(np, internal_np::do_scale), true); #if defined(CGAL_EIGEN3_ENABLED) #if EIGEN_VERSION_AT_LEAST(3,2,0) @@ -141,12 +154,12 @@ void smooth_shape(const FaceRange& faces, #endif #if defined(CGAL_EIGEN3_ENABLED) - CGAL_static_assertion_msg( - (!boost::is_same::type, bool>::value) || EIGEN_VERSION_AT_LEAST(3, 2, 0), + static_assert( + (!std::is_same::type, bool>::value) || EIGEN_VERSION_AT_LEAST(3, 2, 0), "Eigen3 version 3.2 or later is required."); #else - CGAL_static_assertion_msg( - (!boost::is_same::type, bool>::value), + static_assert( + (!std::is_same::type, bool>::value), "Eigen3 version 3.2 or later is required."); #endif @@ -161,11 +174,11 @@ void smooth_shape(const FaceRange& faces, Eigen_vector bx(n), by(n), bz(n), Xx(n), Xy(n), Xz(n); std::vector > stiffness; - internal::Shape_smoother smoother(tmesh, vpmap, vcmap, gt); + internal::Shape_smoother smoother(tmesh, vpmap, vcmap, scale_after_smoothing, gt); smoother.init_smoothing(faces); - // For robustness reasons, the laplacian coefficients are computed only once (only the mass + // For robustness reasons, the Laplacian coefficients are computed only once (only the mass // matrix is updated at every iteration). See Kazdhan et al. "Can Mean-Curvature Flow Be Made Non-Singular?". smoother.calculate_stiffness_matrix_elements(stiffness); diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/stitch_borders.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/stitch_borders.h index a44d1a1d..cc2addd3 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/stitch_borders.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/stitch_borders.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h $ -// $Id: stitch_borders.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h $ +// $Id: include/CGAL/Polygon_mesh_processing/stitch_borders.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include @@ -33,7 +33,6 @@ #include #include -#include #include #include @@ -44,6 +43,7 @@ #include #include #include +#include #ifdef CGAL_PMP_STITCHING_DEBUG_PP # ifndef CGAL_PMP_STITCHING_DEBUG @@ -1063,7 +1063,7 @@ std::size_t stitch_boundary_cycle(const typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename std::pair halfedges_pair; - CGAL_precondition(h != boost::graph_traits::null_halfedge()); + CGAL_precondition(is_valid_halfedge_descriptor(h, pmesh)); CGAL_precondition(is_border(h, pmesh)); CGAL_precondition(is_valid(pmesh)); @@ -1119,7 +1119,7 @@ std::size_t stitch_boundary_cycle(const typename boost::graph_traits - >::type* = 0) + std::enable_if_t< + boost::has_range_iterator::value + >* = 0) { using parameters::choose_parameter; using parameters::get_parameter; @@ -1389,7 +1389,7 @@ std::size_t stitch_borders(const BorderHalfedgeRange& boundary_cycle_representat } // namespace internal -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// \brief Same as the other overload, but the pairs of halfedges to be stitched /// are automatically found amongst all border halfedges. @@ -1448,7 +1448,7 @@ std::size_t stitch_borders(PolygonMesh& pmesh, return stitch_borders(boundary_cycle_representatives, pmesh, dummy_maintainer, np); } -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// \brief Same as the other overload, but the pairs of halfedges to be stitched /// are automatically found amongst halfedges in cycles described by `boundary_cycle_representatives`. @@ -1511,9 +1511,9 @@ std::size_t stitch_borders(const BorderHalfedgeRange& boundary_cycle_representat PolygonMesh& pmesh, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::enable_if< - typename boost::has_range_iterator - >::type* = 0 + , std::enable_if_t< + boost::has_range_iterator::value + >* = 0 #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/surface_Delaunay_remeshing.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/surface_Delaunay_remeshing.h new file mode 100644 index 00000000..b6b82289 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/surface_Delaunay_remeshing.h @@ -0,0 +1,306 @@ +// Copyright (c) 2021 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Polygon_mesh_processing/surface_Delaunay_remeshing.h $ +// $Id: include/CGAL/Polygon_mesh_processing/surface_Delaunay_remeshing.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Jane Tournois + +#ifndef CGAL_POLYGON_MESH_PROCESSING_DELAUNAY_REMESHING_H +#define CGAL_POLYGON_MESH_PROCESSING_DELAUNAY_REMESHING_H + +#ifdef CGAL_PMP_REMESHING_VERBOSE +#define CGAL_MESH_3_VERBOSE 1 +#endif + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include + +namespace CGAL { + +namespace Polygon_mesh_processing { + +/*! +* \ingroup PMP_meshing_grp +* @brief remeshes a surface triangle mesh following the Delaunay refinement +* algorithm described in the \ref PkgMesh3 package. +* +* @tparam TriangleMesh model of `FaceListGraph` +* @tparam TriangleMeshOut model of `FaceListGraph`, model of `DefaultConstructible`, +* with an internal property map for `CGAL::vertex_point_t` with `geom_traits::Point_3` +* as value type. +* @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" +* +* @param tmesh a triangle surface mesh +* @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below +* +* @returns the triangulated surface mesh following the requirements of the input +* meshing criteria +* +* \cgalNamedParamsBegin +* \cgalParamNBegin{geom_traits} +* \cgalParamDescription{an instance of a geometric traits class} +* \cgalParamType{a class model of `Kernel`} +* \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} +* \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} +* \cgalParamExtra{Exact construction kernels are not supported by this function.} +* \cgalParamNEnd +* +* \cgalParamNBegin{vertex_point_map} +* \cgalParamDescription{a property map associating points to the vertices of `tmesh`} +* \cgalParamType{a class model of `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` +* as key type and `%Point_3` as value type} +* \cgalParamDefault{`boost::get(CGAL::vertex_point, tmesh)`} +* \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` +* must be available in `TriangleMesh`.} +* \cgalParamNEnd +* +* \cgalParamNBegin{features_angle_bound} +* \cgalParamDescription{the dihedral angle bound (in degrees) for detection of feature edges} +* \cgalParamType{A number type `FT`, either deduced from the `geom_traits` +* \ref bgl_namedparameters "Named Parameters" if provided, +* or from the geometric traits class deduced from the point property map +* of `TriangleMesh`.} +* \cgalParamDefault{`60`} +* \cgalParamExtra{Border edges are protected, along with detected sharp edges.} +* \cgalParamExtra{If the given value is `180`, only the border edges are protected.} +* \cgalParamNEnd +* +* \cgalParamNBegin{edge_is_constrained_map} +* \cgalParamDescription{a property map containing the constrained-or-not status of each edge of `tmesh`} +* \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%edge_descriptor` +* as key type and `bool` as value type. It must be default constructible.} +* \cgalParamDefault{a default property map where no edge is constrained} +* \cgalParamNEnd +* +* \cgalParamNBegin{polyline_constraints} +* \cgalParamDescription{a set of polylines that will be resampled and appear as protected +* polyline constraints in the output mesh} +* \cgalParamType{a class model of `Range`, of which value type is model of `MeshPolyline_3`} +* \cgalParamDefault{an empty range of segments} +* \cgalParamNEnd +* +* \cgalParamNBegin{protect_constraints} +* \cgalParamDescription{If `true`, the feature edges of the input are re-sampled and present in the output mesh. +* If `edge_is_constrained_map` is provided, the corresponding "constrained" edges are protected. +* Else, if `polyline_constraints` is provided, the corresponding polylines are protected. +* Otherwise, `features_angle_bound` is used, and the edges that form a sharp dihedral angle with +* respect to that bound are protected.} +* \cgalParamType{Boolean} +* \cgalParamDefault{`false`} +* \cgalParamExtra{Note that only one of these three input parameters is taken into account, +* in the priority order listed above.} +* \cgalParamNEnd +* +* \cgalParamNBegin{face_patch_map} +* \cgalParamDescription{a property map with the patch id's associated to the faces of `faces`} +* \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%face_descriptor` +* as key type and the desired property, model of `CopyConstructible` and `LessThanComparable`, as value type.} +* \cgalParamDefault{a default property map where each face is associated with the ID of +* the connected component it belongs to. Connected components are +* computed with respect to the constrained edges listed in the property map +* `edge_is_constrained_map`.} +* \cgalParamExtra{The map is updated during the remeshing process while new faces are created.} +* \cgalParamNEnd +* +* \cgalParamNBegin{mesh_edge_size} +* \cgalParamDescription{A scalar field (resp. a constant) providing a space-varying +* (resp. a uniform) upper bound for the lengths of curve edges. +* This parameter has to be set to a positive value when 1-dimensional features protection is used +* (when `protect_constraints` is `true`).} +* \cgalParamType{A number type `FT` model of the concept `Field`, or a model of the concept `MeshDomainField_3`} +* \cgalParamDefault{`(std::numeric_limits::%max)()`, with +* `FT` a number type, either deduced from the `geom_traits` \ref bgl_namedparameters +* "Named Parameters" if provided, or from the geometric traits class deduced from the +* point property map of `TriangleMesh`.} +* \cgalParamNEnd +* +* \cgalParamNBegin{mesh_facet_size} +* \cgalParamDescription{A scalar field (resp. a constant) describing a space-varying +* (resp. a uniform) upper bound for the radii of the surface Delaunay balls.} +* \cgalParamType{A number type `FT` model of the concept `Field`, or a model of the concept +* `MeshDomainField_3`} +* \cgalParamDefault{`0.`} +* \cgalParamNEnd +* +* \cgalParamNBegin{mesh_facet_angle} +* \cgalParamDescription{A lower bound for the angles (in degrees) of the surface mesh facets.} +* \cgalParamType{A number type `FT` model of the concept `Field`} +* \cgalParamDefault{`0.`} +* \cgalParamNEnd +* +* \cgalParamNBegin{mesh_facet_distance} +* \cgalParamDescription{A scalar field (resp. a constant) describing a space-varying +* (resp. a uniform) upper bound for the distance between the facet circumcenter +* and the center of its surface Delaunay ball.} +* \cgalParamType{A number type `FT` model of the concept `Field`, or a model of the concept +* `MeshDomainField_3`} +* \cgalParamDefault{`0.`} +* \cgalParamNEnd +* +* \cgalParamNBegin{mesh_facet_topology} +* \cgalParamDescription{The set of topological constraints which have to be verified +* by each surface facet. The default value is `CGAL::FACET_VERTICES_ON_SURFACE`. +* See `CGAL::Mesh_facet_topology` manual page for a description of the possible values.} +* \cgalParamType{\link PkgMesh3Enum `CGAL::Mesh_facet_topology` \endlink} +* \cgalParamDefault{`CGAL::FACET_VERTICES_ON_SURFACE`} +* \cgalParamNEnd +* \cgalNamedParamsEnd +* +* \pre `tmesh` must be free of self-intersections. +* +* @note Only one of the named parameters defining constrained edges is taken into account +* for meshing, in the following priority order : `edge_is_constrained_map`, +* `polyline_constraints`, and `features_angle_bound`. The selected edges are protected only +* if `protect_constraints` is set to `true`. +* +*/ +template +TriangleMeshOut +surface_Delaunay_remeshing(const TriangleMesh& tmesh, + const NamedParameters& np = parameters::default_values()) +{ + using parameters::get_parameter; + using parameters::choose_parameter; + using parameters::get_parameter_reference; + + using NP = NamedParameters; + using TM = TriangleMesh; + using GT = typename GetGeomTraits::type; + using Mesh_domain = CGAL::Polyhedral_mesh_domain_with_features_3; + using Tr = typename CGAL::Mesh_triangulation_3::type; + using C3t3 = CGAL::Mesh_complex_3_in_triangulation_3; + using Mesh_criteria = CGAL::Mesh_criteria_3; + using FT = typename GT::FT; + using Point_3 = typename GT::Point_3; + + if (!CGAL::is_triangle_mesh(tmesh)) { + std::cerr << "Input geometry is not triangulated." << std::endl; + return TriangleMeshOut(); + } + + // Create a vector with only one element: the pointer to the polyhedron. + std::vector poly_ptrs_vector(1); + poly_ptrs_vector[0] = &tmesh; + + // Create a polyhedral domain, with only one polyhedron, + // and no "bounding polyhedron", so the volumetric part of the domain will be + // empty. + Mesh_domain domain(poly_ptrs_vector.begin(), poly_ptrs_vector.end()); + + // Vertex point map + using VPMap = typename GetVertexPointMap::type; + VPMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), + get_const_property_map(vertex_point, tmesh)); + + // Features protection + const bool protect = choose_parameter(get_parameter(np, internal_np::protect_constraints), false); + if (protect) + { + // Features provided by user as a pmap on input edges + if (!parameters::is_default_parameter::value) + { + using edge_descriptor = typename boost::graph_traits::edge_descriptor; + using ECMap = typename internal_np::Lookup_named_param_def < + internal_np::edge_is_constrained_t, + NP, + Static_boolean_property_map // default (no constraint pmap) + >::type; + ECMap ecmap = choose_parameter(get_parameter(np, internal_np::edge_is_constrained), + Static_boolean_property_map()); + + std::vector > sharp_edges; + for (edge_descriptor e : edges(tmesh)) + { + if (get(ecmap, e)) + { + std::vector ev(2); + ev[0] = get(vpmap, source(halfedge(e, tmesh), tmesh)); + ev[1] = get(vpmap, target(halfedge(e, tmesh), tmesh)); + sharp_edges.push_back(ev); + } + } + + std::vector > features; + CGAL::polylines_to_protect(features, sharp_edges.begin(), sharp_edges.end()); + domain.add_features(features.begin(), features.end()); + } + else if (!parameters::is_default_parameter::value) + { + // Features - provided by user as a set of polylines + using Polylines = typename internal_np::Lookup_named_param_def < + internal_np::polyline_constraints_t, + NP, + std::vector > // default + >::reference; + std::vector > default_vector{}; + Polylines polylines + = choose_parameter(get_parameter_reference(np, internal_np::polyline_constraints), + default_vector); + + if (!polylines.empty()) + { + std::vector > features; + CGAL::polylines_to_protect(features, polylines.begin(), polylines.end()); + domain.add_features(features.begin(), features.end()); + } + } + else + { + // Sharp features - automatic detection + const FT angle_bound = choose_parameter(get_parameter(np, internal_np::features_angle_bound), 60.); + domain.detect_features(angle_bound); //includes detection of borders + } + }//end if(protect) + + // Mesh criteria + auto esize = choose_parameter(get_parameter(np, internal_np::mesh_edge_size), + (std::numeric_limits::max)()); + auto fsize = choose_parameter(get_parameter(np, internal_np::mesh_facet_size), 0.); + auto fangle = choose_parameter(get_parameter(np, internal_np::mesh_facet_angle), 0.); + auto fdist = choose_parameter(get_parameter(np, internal_np::mesh_facet_distance), 0.); + auto ftopo = choose_parameter(get_parameter(np, internal_np::mesh_facet_topology), + CGAL::FACET_VERTICES_ON_SURFACE); + + Mesh_criteria criteria(CGAL::parameters::edge_size = esize, + CGAL::parameters::facet_size = fsize, + CGAL::parameters::facet_angle = fangle, + CGAL::parameters::facet_distance = fdist, + CGAL::parameters::facet_topology = ftopo); + + // Mesh generation + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, + CGAL::parameters::no_perturb(), + CGAL::parameters::no_exude()); + + TriangleMeshOut out; + CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, out); + return out; +} + +} //end namespace Polygon_mesh_processing +} //end namespace CGAL + +#endif //CGAL_POLYGON_MESH_PROCESSIlNG_DELAUNAY_REMESHING_H diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h index 92c224b7..5e9a8935 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h @@ -1,14 +1,14 @@ -// Copyright (c) 2015-2021 GeometryFactory (France). +// Copyright (c) 2015-2023 GeometryFactory (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h $ -// $Id: tangential_relaxation.h d7d439f 2022-07-28T14:26:40+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h $ +// $Id: include/CGAL/Polygon_mesh_processing/tangential_relaxation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // -// Author(s) : Jane Tournois +// Author(s) : Jane Tournois, Ivan Paden #ifndef CGAL_POLYGON_MESH_PROCESSING_TANGENTIAL_RELAXATION_H @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -111,18 +112,27 @@ struct Allow_all_moves{ * \cgalParamNBegin{allow_move_functor} * \cgalParamDescription{A function object used to determinate if a vertex move should be allowed or not} * \cgalParamType{Unary functor that provides `bool operator()(vertex_descriptor v, Point_3 src, Point_3 tgt)` returning `true` -* if the vertex `v` can be moved from `src` to `tgt`; %Point_3` being the value type of the vertex point map } +* if the vertex `v` can be moved from `src` to `tgt`; `Point_3` being the value type of the vertex point map } * \cgalParamDefault{If not provided, all moves are allowed.} * \cgalParamNEnd * +* \cgalParamNBegin{sizing_function} +* \cgalParamDescription{An object containing sizing field for individual vertices. +* Used to derive smoothing weights.} +* \cgalParamType{A model of `PMPSizingField`.} +* \cgalParamDefault{If not provided, smoothing weights are the same for all vertices.} +* \cgalParamNEnd +* * \cgalNamedParamsEnd * * \todo check if it should really be a triangle mesh or if a polygon mesh is fine */ -template +template void tangential_relaxation(const VertexRange& vertices, TriangleMesh& tm, - const NamedParameters& np = parameters::default_values()) + const CGAL_NP_CLASS& np = parameters::default_values()) { typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -130,18 +140,19 @@ void tangential_relaxation(const VertexRange& vertices, using parameters::get_parameter; using parameters::choose_parameter; + using parameters::is_default_parameter; - typedef typename GetGeomTraits::type GT; + typedef typename GetGeomTraits::type GT; GT gt = choose_parameter(get_parameter(np, internal_np::geom_traits), GT()); - typedef typename GetVertexPointMap::type VPMap; + typedef typename GetVertexPointMap::type VPMap; VPMap vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, tm)); typedef Static_boolean_property_map Default_ECM; typedef typename internal_np::Lookup_named_param_def < internal_np::edge_is_constrained_t, - NamedParameters, + CGAL_NP_CLASS, Static_boolean_property_map // default (no constraint) > ::type ECM; ECM ecm = choose_parameter(get_parameter(np, internal_np::edge_is_constrained), @@ -149,12 +160,20 @@ void tangential_relaxation(const VertexRange& vertices, typedef typename internal_np::Lookup_named_param_def < internal_np::vertex_is_constrained_t, - NamedParameters, + CGAL_NP_CLASS, Static_boolean_property_map // default (no constraint) > ::type VCM; VCM vcm = choose_parameter(get_parameter(np, internal_np::vertex_is_constrained), Static_boolean_property_map()); + typedef typename internal_np::Lookup_named_param_def < + internal_np::sizing_function_t, + CGAL_NP_CLASS, + Uniform_sizing_field + > ::type SizingFunction; + SizingFunction sizing = choose_parameter(get_parameter(np, internal_np::sizing_function), + Uniform_sizing_field(-1, vpm)); + const bool relax_constraints = choose_parameter(get_parameter(np, internal_np::relax_constraints), false); const unsigned int nb_iterations = choose_parameter(get_parameter(np, internal_np::number_of_iterations), 1); @@ -188,6 +207,10 @@ void tangential_relaxation(const VertexRange& vertices, } prev = n; } + + if (first_run) + return true; //vertex incident only to degenerate faces + if (!get(ecm, edge(first_h, tm))) if (to_double(first * prev) <= 0) return false; @@ -197,7 +220,7 @@ void tangential_relaxation(const VertexRange& vertices, typedef typename internal_np::Lookup_named_param_def < internal_np::allow_move_functor_t, - NamedParameters, + CGAL_NP_CLASS, internal::Allow_all_moves// default > ::type Shall_move; Shall_move shall_move = choose_parameter(get_parameter(np, internal_np::allow_move_functor), @@ -214,6 +237,7 @@ void tangential_relaxation(const VertexRange& vertices, typedef std::tuple VNP; std::vector< VNP > barycenters; auto gt_barycenter = gt.construct_barycenter_3_object(); + auto gt_project = gt.construct_projected_point_3_object(); // at each vertex, compute vertex normal std::unordered_map vnormals; @@ -239,15 +263,41 @@ void tangential_relaxation(const VertexRange& vertices, { const Vector_3& vn = vnormals.at(v); Vector_3 move = CGAL::NULL_VECTOR; - unsigned int star_size = 0; - for(halfedge_descriptor h :interior_hedges) + if constexpr (std::is_same_v>) { - move = move + Vector_3(get(vpm, v), get(vpm, source(h, tm))); - ++star_size; + unsigned int star_size = 0; + for(halfedge_descriptor h :interior_hedges) + { + move = move + Vector_3(get(vpm, v), get(vpm, source(h, tm))); + ++star_size; + } + CGAL_assertion(star_size > 0); //isolated vertices have already been discarded + move = (1. / static_cast(star_size)) * move; + } + else + { + auto gt_centroid = gt.construct_centroid_3_object(); + auto gt_area = gt.compute_area_3_object(); + double weight = 0; + for(halfedge_descriptor h :interior_hedges) + { + // calculate weight + // need v, v1 and v2 + const vertex_descriptor v1 = target(next(h, tm), tm); + const vertex_descriptor v2 = source(h, tm); + + const double tri_area = gt_area(get(vpm, v), get(vpm, v1), get(vpm, v2)); + const double face_weight = tri_area + / (1. / 3. * (sizing.at(v, tm) + + sizing.at(v1, tm) + + sizing.at(v2, tm))); + weight += face_weight; + + const Point_3 centroid = gt_centroid(get(vpm, v), get(vpm, v1), get(vpm, v2)); + move = move + Vector_3(get(vpm, v), centroid) * face_weight; + } + move = move / weight; //todo ip: what if weight ends up being close to 0? } - CGAL_assertion(star_size > 0); //isolated vertices have already been discarded - move = (1. / static_cast(star_size)) * move; - barycenters.emplace_back(v, vn, get(vpm, v) + move); } else @@ -265,8 +315,17 @@ void tangential_relaxation(const VertexRange& vertices, //check squared cosine is < 0.25 (~120 degrees) if (0.25 < dot*dot / ( squared_distance(get(vpm,ph0), get(vpm, v)) * squared_distance(get(vpm,ph1), get(vpm, v))) ) - barycenters.emplace_back(v, vn, - gt_barycenter(get(vpm, ph0), 0.25, get(vpm, ph1), 0.25, get(vpm, v), 0.5)); + { + typename GT::Point_3 bary = gt_barycenter(get(vpm, ph0), 0.25, get(vpm, ph1), 0.25, get(vpm, v), 0.5); + // to avoid shrinking of borders, we project back onto the incident segments + typename GT::Segment_3 s1(get(vpm, ph0), get(vpm,v)), + s2(get(vpm, ph1), get(vpm,v)); + + typename GT::Point_3 p1 = gt_project(s1, bary), p2 = gt_project(s2, bary); + + bary = squared_distance(p1, bary) 0.03 //5 attempts maximum - && ( !check_normals(vp.first) - || !shall_move(vp.first, initial_pos, get(vpm, vp.first)))) //if a face has been inverted + && ( !check_normals(vp.first) + || !shall_move(vp.first, initial_pos, get(vpm, vp.first)))) //if a face has been inverted { frac = 0.5 * frac; put(vpm, vp.first, initial_pos + frac * move);//shorten the move by 2 @@ -319,7 +378,8 @@ void tangential_relaxation(const VertexRange& vertices, */ template -void tangential_relaxation(TriangleMesh& tm, const CGAL_NP_CLASS& np = parameters::default_values()) +void tangential_relaxation(TriangleMesh& tm, + const CGAL_NP_CLASS& np = parameters::default_values()) { tangential_relaxation(vertices(tm), tm, np); } diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/transform.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/transform.h index 36ecf758..c7da8732 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/transform.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/transform.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/transform.h $ -// $Id: transform.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/transform.h $ +// $Id: include/CGAL/Polygon_mesh_processing/transform.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,7 +14,7 @@ #include #include -#include +#include namespace CGAL{ namespace Polygon_mesh_processing{ diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/triangle.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/triangle.h new file mode 100644 index 00000000..fa332641 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/triangle.h @@ -0,0 +1,91 @@ +// Copyright (c) 2015 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangle.h $ +// $Id: include/CGAL/Polygon_mesh_processing/triangle.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Jane Tournois + +#ifndef CGAL_POLYGON_MESH_PROCESSING_TRIANGLE_H +#define CGAL_POLYGON_MESH_PROCESSING_TRIANGLE_H + +#include + + +#include + +#include +#include + +namespace CGAL { + + namespace Polygon_mesh_processing { + + /*! + * \ingroup PkgPolygonMeshProcessingRef + * + * computes a triangle for a face descriptor of a triangle mesh. + * + * @tparam TriangleMesh a model of `FaceGraph` + * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * @param tmesh the triangulated surface mesh + * @param fd the descriptor of the face to construct the triangle from + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{vertex_point_map} + * \cgalParamDescription{a property map associating points to the vertices of `tmesh`} + * \cgalParamType{a class model of `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` + * as key type and `%Point_3` as value type} + * \cgalParamDefault{`boost::get(CGAL::vertex_point, tmesh)`} + * \cgalParamNEnd + * + * \cgalParamNBegin{geom_traits} + * \cgalParamDescription{an instance of a geometric traits class} + * \cgalParamType{a class model of `Kernel`} + * \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} + * \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} + * \cgalParamNEnd + * \cgalNamedParamsEnd + */ +template +#ifdef DOXYGEN_RUNNING +Triangle_3 +#else +typename GetGeomTraits::type::Triangle_3 +#endif +triangle(typename boost::graph_traits::face_descriptor fd, + const TriangleMesh& tmesh, + const CGAL_NP_CLASS& np = parameters::default_values()) +{ + using CGAL::parameters::choose_parameter; + using CGAL::parameters::get_parameter; + + CGAL_precondition(is_valid_face_descriptor(fd, tmesh)); + + typename GetVertexPointMap::const_type + vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), + get_const_property_map(CGAL::vertex_point, tmesh)); + + typedef typename GetGeomTraits::type GT; + GT gt = choose_parameter(get_parameter(np, internal_np::geom_traits)); + typename GT::Construct_triangle_3 construct_triangle = gt.construct_triangle_3_object(); + + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + + halfedge_descriptor h = halfedge(fd, tmesh); + vertex_descriptor v1 = target(h, tmesh); + vertex_descriptor v2 = target(next(h, tmesh), tmesh); + vertex_descriptor v3 = target(next(next(h, tmesh), tmesh), tmesh); + return construct_triangle(get(vpm, v1), get(vpm, v2), get(vpm, v3)); +} + +} +} +#endif //CGAL_POLYGON_MESH_PROCESSING_TRIANGLE_H diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/triangulate_faces.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/triangulate_faces.h index 7efef9fc..6a82e5e2 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/triangulate_faces.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/triangulate_faces.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h $ -// $Id: triangulate_faces.h bb0b9a8 2022-03-07T15:32:37+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h $ +// $Id: include/CGAL/Polygon_mesh_processing/triangulate_faces.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -15,46 +15,37 @@ #include -#include +#include +#include #include #include - -#ifndef CGAL_TRIANGULATE_FACES_DO_NOT_USE_CDT2 -#include -#include -#include -#include -#else -#include -#endif - -#include -#include +#include #include -#include -#include +#include +#include +#include +#include #include -#include #include -#include +#include namespace CGAL { - namespace Polygon_mesh_processing { +namespace Triangulate_faces { -namespace Triangulate_faces -{ /** \ingroup PMP_meshing_grp * %Default new face visitor model of `PMPTriangulateFaceVisitor`. * All its functions have an empty body. This class can be used as a * base class if only some of the functions of the concept require to be -* overriden. +* overridden. */ template -struct Default_visitor { +struct Default_visitor + : public Hole_filling::Default_visitor +{ typedef boost::graph_traits GT; typedef typename GT::face_descriptor face_descriptor; @@ -63,245 +54,31 @@ struct Default_visitor { void after_subface_created(face_descriptor /*f_new*/) {} }; -} //end namespace Triangulate_faces +} // namespace Triangulate_faces namespace internal { -template -class Triangulate_modifier +template +class Triangulate_polygon_mesh_modifier { - typedef Kernel Traits; - - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::face_descriptor face_descriptor; - typedef typename boost::graph_traits::edge_descriptor edge_descriptor; - typedef typename Kernel::Point_3 Point; - - struct Face_info { - typename boost::graph_traits::halfedge_descriptor e[3]; - bool is_external; - }; - - typedef typename boost::property_traits::reference Point_ref; - VertexPointMap _vpmap; - Traits _traits; - -public: - Triangulate_modifier(VertexPointMap vpmap, const Traits& traits = Traits()) - : _vpmap(vpmap), _traits(traits) - { - } - - template - bool is_external(Face_handle fh) const { - return fh->info().is_external; - } - - bool triangulate_face(face_descriptor f, PM& pmesh, bool use_cdt, Visitor visitor) - { - typedef typename Traits::FT FT; - - typename Traits::Vector_3 normal = - Polygon_mesh_processing::compute_face_normal( - f, pmesh, CGAL::parameters::geom_traits(_traits) - .vertex_point_map(_vpmap)); - - if(normal == typename Traits::Vector_3(0,0,0)) - return false; - - std::size_t original_size = CGAL::halfedges_around_face(halfedge(f, pmesh), pmesh).size(); - if(original_size == 4) - { - halfedge_descriptor v0, v1, v2, v3; - v0 = halfedge(f, pmesh); - Point_ref p0 = get(_vpmap, target(v0, pmesh)); - v1 = next(v0, pmesh); - Point_ref p1 = get(_vpmap, target(v1, pmesh)); - v2 = next(v1, pmesh); - Point_ref p2 = get(_vpmap, target(v2, pmesh)); - v3 = next(v2, pmesh); - Point_ref p3 = get(_vpmap, target(v3, pmesh)); - - /* Chooses the diagonal that will split the quad in two triangles that maximize - * the scalar product of of the un-normalized normals of the two triangles. - * The lengths of the un-normalized normals (computed using cross-products of two vectors) - * are proportional to the area of the triangles. - * Maximize the scalar product of the two normals will avoid skinny triangles, - * and will also taken into account the cosine of the angle between the two normals. - * In particular, if the two triangles are oriented in different directions, - * the scalar product will be negative. - */ - FT p1p3 = CGAL::cross_product(p2-p1,p3-p2) * CGAL::cross_product(p0-p3,p1-p0); - FT p0p2 = CGAL::cross_product(p1-p0,p1-p2) * CGAL::cross_product(p3-p2,p3-p0); - visitor.before_subface_creations(f); - halfedge_descriptor res = (p0p2>p1p3) - ? CGAL::Euler::split_face(v0, v2, pmesh) - : CGAL::Euler::split_face(v1, v3, pmesh); - - visitor.after_subface_created(face(res,pmesh)); - visitor.after_subface_created(face(opposite(res,pmesh),pmesh)); - - visitor.after_subface_creations(); - } - else - { -#ifndef CGAL_TRIANGULATE_FACES_DO_NOT_USE_CDT2 - if (use_cdt) - { - typedef CGAL::Projection_traits_3 P_traits; - typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; - typedef CGAL::Triangulation_face_base_with_info_2 Fb1; - typedef CGAL::Constrained_triangulation_face_base_2 Fb; - typedef CGAL::Triangulation_data_structure_2 TDS; - typedef CGAL::Exact_intersections_tag Itag; - typedef CGAL::Constrained_Delaunay_triangulation_2 CDT; - P_traits cdt_traits(normal); - CDT cdt(cdt_traits); - return triangulate_face_with_CDT(f, pmesh, cdt, visitor); - } -#else - CGAL_USE(use_cdt); -#endif - return triangulate_face_with_hole_filling(f, pmesh, visitor); - } - return true; - } - - template - bool triangulate_face_with_CDT(face_descriptor f, PM& pmesh, CDT& cdt, Visitor visitor) - { - std::size_t original_size = CGAL::halfedges_around_face(halfedge(f, pmesh), pmesh).size(); - - // Halfedge_around_facet_circulator - typedef typename CDT::Vertex_handle Tr_Vertex_handle; - halfedge_descriptor start = halfedge(f, pmesh); - halfedge_descriptor h = start; - Tr_Vertex_handle previous, first; - do - { - Tr_Vertex_handle vh = cdt.insert(get(_vpmap, target(h, pmesh))); - if (first == Tr_Vertex_handle()) { - first = vh; - } - vh->info() = h; - if(previous != Tr_Vertex_handle() && previous != vh) { - cdt.insert_constraint(previous, vh); - } - previous = vh; - h = next(h, pmesh); - - } while( h != start ); - cdt.insert_constraint(previous, first); - - // sets mark is_external - for(typename CDT::All_faces_iterator fit = cdt.all_faces_begin(), - end = cdt.all_faces_end(); - fit != end; ++fit) - { - fit->info().is_external = false; - } - std::queue face_queue; - face_queue.push(cdt.infinite_vertex()->face()); - while(! face_queue.empty() ) - { - typename CDT::Face_handle fh = face_queue.front(); - face_queue.pop(); - - if(fh->info().is_external) - continue; - - fh->info().is_external = true; - for(int i = 0; i <3; ++i) - { - if(!cdt.is_constrained(typename CDT::Edge(fh, i))) - { - face_queue.push(fh->neighbor(i)); - } - } - } - - if(cdt.dimension() != 2 || - cdt.number_of_vertices() != original_size) - return false; - - - // then modify the polyhedron - visitor.before_subface_creations(f); - // make_hole. (see comment in function body) - this->make_hole(halfedge(f, pmesh), pmesh); - - for(typename CDT::Finite_edges_iterator eit = cdt.finite_edges_begin(), - end = cdt.finite_edges_end(); - eit != end; ++eit) - { - typename CDT::Face_handle fh = eit->first; - const int index = eit->second; - typename CDT::Face_handle opposite_fh = fh->neighbor(eit->second); - const int opposite_index = opposite_fh->index(fh); - - const Tr_Vertex_handle va = fh->vertex(cdt. cw(index)); - const Tr_Vertex_handle vb = fh->vertex(cdt.ccw(index)); - - if( ! (is_external(fh) && is_external(opposite_fh))//not both fh are external - && ! cdt.is_constrained(*eit) ) //and edge is not constrained - { - // strictly internal edge - halfedge_descriptor hnew = halfedge(add_edge(pmesh), pmesh), - hnewopp = opposite(hnew, pmesh); - - fh->info().e[index] = hnew; - opposite_fh->info().e[opposite_index] = hnewopp; - - set_target(hnew, target(va->info(), pmesh), pmesh); - set_target(hnewopp, target(vb->info(), pmesh), pmesh); - } - if( cdt.is_constrained(*eit) ) //edge is constrained - { - if(!is_external(fh)) { - fh->info().e[index] = va->info(); - } - if(!is_external(opposite_fh)) { - opposite_fh->info().e[opposite_index] = vb->info(); - } - } - } - for(typename CDT::Finite_faces_iterator fit = cdt.finite_faces_begin(), - end = cdt.finite_faces_end(); - fit != end; ++fit) - { - if(!is_external(fit)) - { - halfedge_descriptor h0 = fit->info().e[0]; - halfedge_descriptor h1 = fit->info().e[1]; - halfedge_descriptor h2 = fit->info().e[2]; - CGAL_assertion(h0 != halfedge_descriptor()); - CGAL_assertion(h1 != halfedge_descriptor()); - CGAL_assertion(h2 != halfedge_descriptor()); - - set_next(h0, h1, pmesh); - set_next(h1, h2, pmesh); - set_next(h2, h0, pmesh); - - Euler::fill_hole(h0, pmesh); - visitor.after_subface_created(face(h0, pmesh)); - } - } - visitor.after_subface_creations(); - return true; - } - - bool triangulate_face_with_hole_filling(face_descriptor f, PM& pmesh, Visitor visitor) + using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; + using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; + using face_descriptor = typename boost::graph_traits::face_descriptor; + +private: + template + bool triangulate_face_with_hole_filling(face_descriptor f, + PolygonMesh& pmesh, + const VPM vpm, + Visitor visitor, + const NamedParameters& np) { namespace PMP = CGAL::Polygon_mesh_processing; + using Point = typename boost::property_traits::value_type; + // gather halfedges around the face std::vector hole_points; std::vector border_vertices; @@ -309,7 +86,7 @@ class Triangulate_modifier for(halfedge_descriptor h : CGAL::halfedges_around_face(halfedge(f, pmesh), pmesh)) { vertex_descriptor v = source(h, pmesh); - hole_points.push_back( get(_vpmap, v) ); + hole_points.push_back(get(vpm, v)); border_vertices.push_back(v); } @@ -317,52 +94,53 @@ class Triangulate_modifier typedef CGAL::Triple Face_indices; std::vector patch; PMP::triangulate_hole_polyline(hole_points, std::back_inserter(patch), - parameters::geom_traits(_traits)); + np.use_2d_constrained_delaunay_triangulation(true)); if(patch.empty()) return false; // triangulate the hole - std::map< std::pair , halfedge_descriptor > halfedge_map; - int i=0; + std::map, halfedge_descriptor > halfedge_map; + int i = 0; for(halfedge_descriptor h : CGAL::halfedges_around_face(halfedge(f, pmesh), pmesh)) { int j = std::size_t(i+1) == hole_points.size() ? 0 : i+1; - halfedge_map[ std::make_pair(i, j) ] = h; + halfedge_map[std::make_pair(i, j)] = h; ++i; } visitor.before_subface_creations(f); + bool first = true; std::vector hedges; hedges.reserve(4); for(const Face_indices& triangle : patch) { - if (first) - first=false; + if(first) + first = false; else - f=add_face(pmesh); + f = add_face(pmesh); + visitor.after_subface_created(f); - std::array indices = - make_array( triangle.first, - triangle.second, - triangle.third, - triangle.first ); + std::array indices = make_array(triangle.first, + triangle.second, + triangle.third, + triangle.first); for (int i=0; i<3; ++i) { typename std::map< std::pair , halfedge_descriptor >::iterator insert_res = - halfedge_map.insert( - std::make_pair( std::make_pair(indices[i], indices[i+1]), - boost::graph_traits::null_halfedge() ) ).first; - if (insert_res->second == boost::graph_traits::null_halfedge()) + halfedge_map.emplace(std::make_pair(indices[i], indices[i+1]), + boost::graph_traits::null_halfedge()).first; + if(insert_res->second == boost::graph_traits::null_halfedge()) { halfedge_descriptor nh = halfedge(add_edge(pmesh), pmesh); - insert_res->second=nh; - halfedge_map[std::make_pair(indices[i+1], indices[i])]=opposite(nh, pmesh); + insert_res->second = nh; + halfedge_map[std::make_pair(indices[i+1], indices[i])] = opposite(nh, pmesh); } hedges.push_back(insert_res->second); } + hedges.push_back(hedges.front()); for(int i=0; i<3;++i) { @@ -370,59 +148,93 @@ class Triangulate_modifier set_face(hedges[i], f, pmesh); set_target(hedges[i], border_vertices[indices[i+1]], pmesh); } + set_halfedge(f, hedges[0], pmesh); hedges.clear(); } + visitor.after_subface_creations(); + return true; } - template - bool operator()(FaceRange face_range, PM& pmesh, bool use_cdt, Visitor visitor) +public: + template + bool operator()(face_descriptor f, + PolygonMesh& pmesh, + const NamedParameters& np) { - bool result = true; - // One need to store facet handles into a vector, because the list of - // facets of the polyhedron will be modified during the loop, and - // that invalidates the range [facets_begin(), facets_end()[. - std::vector facets; - facets.reserve(std::distance(boost::begin(face_range), boost::end(face_range))); - - //only consider non-triangular faces - for(face_descriptor fit : face_range) - if ( next( next( halfedge(fit, pmesh), pmesh), pmesh) - != prev( halfedge(fit, pmesh), pmesh) ) - facets.push_back(fit); - - // Iterates on the vector of face descriptors - for(face_descriptor f : facets) - { - if(!this->triangulate_face(f, pmesh, use_cdt, visitor)) - result = false; - } - return result; - } + using Traits = typename GetGeomTraits::type; + using VPM = typename GetVertexPointMap::type; - void make_hole(halfedge_descriptor h, PM& pmesh) - { - //we are not using Euler::make_hole because it has a precondition - //that the hole is not made on the boundary of the mesh - //here we allow making a hole on the boundary, and the pair(s) of - //halfedges that become border-border are fixed by the connectivity - //setting made in operator() - CGAL_assertion(!is_border(h, pmesh)); - face_descriptor fd = face(h, pmesh); - - for(halfedge_descriptor hd : halfedges_around_face(h, pmesh)) + using FT = typename Traits::FT; + using Point_ref = typename boost::property_traits::reference; + + using Visitor = typename internal_np::Lookup_named_param_def< + internal_np::visitor_t, + NamedParameters, + Triangulate_faces::Default_visitor // default + >::type; + + using parameters::choose_parameter; + using parameters::get_parameter; + + CGAL_precondition(is_valid_face_descriptor(f, pmesh)); + + Traits traits = choose_parameter(get_parameter(np, internal_np::geom_traits)); + VPM vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), + get_property_map(vertex_point, pmesh)); + Visitor visitor = choose_parameter(get_parameter(np, internal_np::visitor), + Triangulate_faces::Default_visitor()); + + typename Traits::Construct_cross_product_vector_3 cross_product = + traits.construct_cross_product_vector_3_object(); + + typename boost::graph_traits::degree_size_type original_size = degree(f, pmesh); + if(original_size <= 3) + return true; + + if(original_size == 4) { - CGAL::internal::set_border(hd, pmesh); - } - remove_face(fd, pmesh); - } + halfedge_descriptor v0, v1, v2, v3; + v0 = halfedge(f, pmesh); + Point_ref p0 = get(vpm, target(v0, pmesh)); + v1 = next(v0, pmesh); + Point_ref p1 = get(vpm, target(v1, pmesh)); + v2 = next(v1, pmesh); + Point_ref p2 = get(vpm, target(v2, pmesh)); + v3 = next(v2, pmesh); + Point_ref p3 = get(vpm, target(v3, pmesh)); + + /* Chooses the diagonal that will split the quad in two triangles that maximize + * the scalar product of the un-normalized normals of the two triangles. + * The lengths of the un-normalized normals (computed using cross-products of two vectors) + * are proportional to the area of the triangles. + * Maximize the scalar product of the two normals will avoid skinny triangles, + * and will also taken into account the cosine of the angle between the two normals. + * In particular, if the two triangles are oriented in different directions, + * the scalar product will be negative. + */ + visitor.before_subface_creations(f); + const FT p1p3 = cross_product(p2-p1, p3-p2) * cross_product(p0-p3, p1-p0); + const FT p0p2 = cross_product(p1-p0, p1-p2) * cross_product(p3-p2, p3-p0); + halfedge_descriptor res = (p0p2>p1p3) ? CGAL::Euler::split_face(v0, v2, pmesh) + : CGAL::Euler::split_face(v1, v3, pmesh); -}; // end class Triangulate_modifier + visitor.after_subface_created(face(res, pmesh)); + visitor.after_subface_created(face(opposite(res, pmesh), pmesh)); -}//end namespace internal + visitor.after_subface_creations(); + + return true; + } + + return triangulate_face_with_hole_filling(f, pmesh, vpm, visitor, np); + } +}; // class Triangulate_polygon_mesh_modifier + +} // namespace internal /** * \ingroup PMP_meshing_grp @@ -455,48 +267,30 @@ class Triangulate_modifier * * \cgalParamNBegin{visitor} * \cgalParamDescription{a visitor that enables to track how faces are triangulated into subfaces} -* \cgalParamType{a class model of `PMPTriangulateFaceVisitor`} +* \cgalParamType{a class model of `PMPTriangulateFaceVisitor` and `PMPHolefillingVisitor`} * \cgalParamDefault{`Triangulate_faces::Default_visitor`} * \cgalParamExtra{Note that the visitor will be copied, so * it must not have any data member that does not have a reference-like type.} * \cgalParamNEnd * \cgalNamedParamsEnd * +* This function calls `CGAL::Polygon_mesh_processing::triangulate_hole_polyline()`. +* Refer to its documentation for its named parameters. +* +* @pre The face `f` is not degenerate. +* * @return `true` if the face has been triangulated. * * @see `triangulate_faces()` */ -template +template bool triangulate_face(typename boost::graph_traits::face_descriptor f, PolygonMesh& pmesh, const NamedParameters& np = parameters::default_values()) { - using parameters::choose_parameter; - using parameters::get_parameter; - - //VertexPointMap - typedef typename GetVertexPointMap::type VPMap; - VPMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), - get_property_map(vertex_point, pmesh)); - - //Kernel - typedef typename GetGeomTraits::type Kernel; - Kernel traits = choose_parameter(get_parameter(np, internal_np::geom_traits)); - - //Option - bool use_cdt = choose_parameter(get_parameter(np, internal_np::use_delaunay_triangulation), true); - - typedef typename internal_np::Lookup_named_param_def< - internal_np::visitor_t, - NamedParameters, - Triangulate_faces::Default_visitor//default - >::type Visitor; - Visitor visitor = choose_parameter( - get_parameter(np, internal_np::visitor), - Triangulate_faces::Default_visitor()); - - internal::Triangulate_modifier modifier(vpmap, traits); - return modifier.triangulate_face(f, pmesh, use_cdt, visitor); + internal::Triangulate_polygon_mesh_modifier modifier; + return modifier(f, pmesh, np); } /** @@ -532,48 +326,47 @@ bool triangulate_face(typename boost::graph_traits::face_descriptor * * \cgalParamNBegin{visitor} * \cgalParamDescription{a visitor that enables to track how faces are triangulated into subfaces} -* \cgalParamType{a class model of `PMPTriangulateFaceVisitor`} +* \cgalParamType{a class model of `PMPTriangulateFaceVisitor` and `PMPHolefillingVisitor`} * \cgalParamDefault{`Triangulate_faces::Default_visitor`} * \cgalParamExtra{Note that the visitor will be copied, so * it must not have any data member that does not have a reference-like type.} -* `\cgalParamNEnd +* \cgalParamNEnd * \cgalNamedParamsEnd * +* This function calls `CGAL::Polygon_mesh_processing::triangulate_hole_polyline()` for each face. +* Refer to its documentation for its named parameters. +* +* @pre No face within `face_range` is degenerate. +* * @return `true` if all the faces have been triangulated. * * @see `triangulate_face()` +* @see `triangulate_polygons()` */ -template +template bool triangulate_faces(FaceRange face_range, PolygonMesh& pmesh, const NamedParameters& np = parameters::default_values()) { - using parameters::choose_parameter; - using parameters::get_parameter; - - //VertexPointMap - typedef typename GetVertexPointMap::type VPMap; - VPMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), - get_property_map(vertex_point, pmesh)); - - //Kernel - typedef typename GetGeomTraits::type Kernel; - Kernel traits = choose_parameter(get_parameter(np, internal_np::geom_traits)); - - //Option - bool use_cdt = choose_parameter(get_parameter(np, internal_np::use_delaunay_triangulation), true); - - typedef typename internal_np::Lookup_named_param_def< - internal_np::visitor_t, - NamedParameters, - Triangulate_faces::Default_visitor//default - >::type Visitor; - Visitor visitor = choose_parameter( - get_parameter(np, internal_np::visitor), - Triangulate_faces::Default_visitor()); - - internal::Triangulate_modifier modifier(vpmap, traits); - return modifier(face_range, pmesh, use_cdt, visitor); + using face_descriptor = typename boost::graph_traits::face_descriptor; + + bool result = true; + + // One needs to store the facets into a vector, because the list of + // facets of the polyhedron will be modified during the loop, and + // that invalidates the range [facets_begin(), facets_end()[. + std::vector facets(std::begin(face_range), std::end(face_range)); + + internal::Triangulate_polygon_mesh_modifier modifier; + for(face_descriptor f : facets) + { + if(!modifier(f, pmesh, np)) + result = false; + } + + return result; } /** @@ -606,16 +399,22 @@ bool triangulate_faces(FaceRange face_range, * * \cgalParamNBegin{visitor} * \cgalParamDescription{a visitor that enables to track how faces are triangulated into subfaces} -* \cgalParamType{a class model of `PMPTriangulateFaceVisitor`} +* \cgalParamType{a class model of `PMPTriangulateFaceVisitor` and `PMPHolefillingVisitor`} * \cgalParamDefault{`Triangulate_faces::Default_visitor`} * \cgalParamExtra{Note that the visitor will be copied, so * it must not have any data member that does not have a reference-like type.} * \cgalParamNEnd * \cgalNamedParamsEnd * +* This function calls `CGAL::Polygon_mesh_processing::triangulate_hole_polyline()` on all the faces of the polygon mesh. +* Refer to its documentation for its named parameters. +* +* @pre No face of `pmesh` is degenerate. +* * @return `true` if all the faces have been triangulated. * * @see `triangulate_face()` +* @see `triangulate_polygons()` */ template bool triangulate_faces(PolygonMesh& pmesh, @@ -624,10 +423,255 @@ bool triangulate_faces(PolygonMesh& pmesh, return triangulate_faces(faces(pmesh), pmesh, np); } -} // end namespace Polygon_mesh_processing +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Polygon Soup + +namespace Triangulate_polygons { + +/** \ingroup PMP_meshing_grp +* %Default new polygon visitor model of `PMPTriangulateFaceVisitor`. +* All its functions have an empty body. This class can be used as a +* base class if only some of the functions of the concept require to be +* overridden. +*/ +struct Default_visitor + : public Hole_filling::Default_visitor +{ + template + void before_subface_creations(const Polygon& /*f_old*/) {} + + template + void after_subface_created(const Polygon& /*f_new*/) {} + + void after_subface_creations() {} +}; + +} // namespace Triangulate_polygons -} // end namespace CGAL +namespace internal { + +class Triangulate_polygon_soup_modifier +{ +private: + template + bool triangulate_polygon_with_hole_filling(const Polygon& polygon, + const PointRange& points, + PolygonRange& triangulated_polygons, // output + PMap pm, + Visitor visitor, + const NamedParameters& np) + { + namespace PMP = CGAL::Polygon_mesh_processing; + + using Point = typename boost::property_traits::value_type; + + // gather halfedges around the face + std::vector hole_points; + std::vector hole_points_indices; + + for(std::size_t i : polygon) + { + hole_points.push_back(get(pm, points[i])); + hole_points_indices.push_back(i); + } + + // use hole filling + typedef CGAL::Triple Face_indices; + std::vector patch; + PMP::triangulate_hole_polyline(hole_points, std::back_inserter(patch), np); + + if(patch.empty()) + return false; + + visitor.before_subface_creations(polygon); + + for(const Face_indices& triangle : patch) + { + triangulated_polygons.push_back({hole_points_indices[triangle.first], + hole_points_indices[triangle.second], + hole_points_indices[triangle.third]}); + visitor.after_subface_created(triangulated_polygons.back()); + } + + visitor.after_subface_creations(); + return true; + } + +public: + template + bool operator()(const Polygon& polygon, + const PointRange& points, + PolygonRange& triangulated_polygons, + const NamedParameters& np) + { + // PointMap + using PMap = typename GetPointMap::const_type; + using Point_ref = typename boost::property_traits::reference; + + // Kernel + using Point = typename boost::property_traits::value_type; + using Def_Kernel = typename CGAL::Kernel_traits::Kernel; + using Traits = typename internal_np::Lookup_named_param_def< + internal_np::geom_traits_t, + NamedParameters, + Def_Kernel>::type; + using FT = typename Traits::FT; + + // Visitor + using Visitor = typename internal_np::Lookup_named_param_def< + internal_np::visitor_t, + NamedParameters, + Triangulate_polygons::Default_visitor // default + >::type; + + using parameters::choose_parameter; + using parameters::get_parameter; + + PMap pm = choose_parameter(get_parameter(np, internal_np::point_map)); + Traits traits = choose_parameter(get_parameter(np, internal_np::geom_traits)); + Visitor visitor = choose_parameter(get_parameter(np, internal_np::visitor), + Triangulate_polygons::Default_visitor()); + + typename Traits::Construct_cross_product_vector_3 cross_product = + traits.construct_cross_product_vector_3_object(); + + const std::size_t original_size = polygon.size(); + if(original_size == 4) + { + Point_ref p0 = get(pm, points[polygon[0]]); + Point_ref p1 = get(pm, points[polygon[1]]); + Point_ref p2 = get(pm, points[polygon[2]]); + Point_ref p3 = get(pm, points[polygon[3]]); + + /* Chooses the diagonal that will split the quad in two triangles that maximize + * the scalar product of the un-normalized normals of the two triangles. + * The lengths of the un-normalized normals (computed using cross-products of two vectors) + * are proportional to the area of the triangles. + * Maximize the scalar product of the two normals will avoid skinny triangles, + * and will also taken into account the cosine of the angle between the two normals. + * In particular, if the two triangles are oriented in different directions, + * the scalar product will be negative. + */ + visitor.before_subface_creations(polygon); + + const FT p1p3 = cross_product(p2-p1, p3-p2) * cross_product(p0-p3, p1-p0); + const FT p0p2 = cross_product(p1-p0, p1-p2) * cross_product(p3-p2, p3-p0); + if(p0p2 > p1p3) + { + triangulated_polygons.push_back({polygon[0], polygon[1], polygon[2]}); + triangulated_polygons.push_back({polygon[0], polygon[2], polygon[3]}); + } + else + { + triangulated_polygons.push_back({polygon[0], polygon[1], polygon[3]}); + triangulated_polygons.push_back({polygon[1], polygon[2], polygon[3]}); + } + + visitor.after_subface_created(triangulated_polygons[triangulated_polygons.size()-2]); + visitor.after_subface_created(triangulated_polygons[triangulated_polygons.size()-1]); + + visitor.after_subface_creations(); + + return true; + } + + return triangulate_polygon_with_hole_filling(polygon, points, triangulated_polygons, pm, visitor, np); + } +}; // class Triangulate_polygon_soup_modifier + +} // namespace internal + +/** +* \ingroup PMP_meshing_grp +* +* triangulates all polygons of a polygon soup. This function depends on the package \ref PkgTriangulation2. +* +* @tparam PointRange a model of `ConstRange`. The value type of its iterator is the point type. +* @tparam PolygonRange a model of the concepts `SequenceContainer` and `Swappable`, +* whose `value_type` is itself a model of the concept `SequenceContainer` +* whose `value_type` is `std::size_t`. +* @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" +* +* @param points the point geometry of the soup to be triangulated +* @param polygons the polygons to be triangulated +* @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below +* +* \cgalNamedParamsBegin +* \cgalParamNBegin{point_map} +* \cgalParamDescription{a property map associating points to the elements of the point set `points`} +* \cgalParamType{a model of `ReadablePropertyMap` whose key type is the value type +* of the iterator of `PointRange` and whose value type is `geom_traits::Point_3`} +* \cgalParamDefault{`CGAL::Identity_property_map`} +* \cgalParamNEnd +* +* \cgalParamNBegin{geom_traits} +* \cgalParamDescription{an instance of a geometric traits class} +* \cgalParamType{a class model of `Kernel`} +* \cgalParamDefault{a \cgal Kernel deduced from the point type, using `CGAL::Kernel_traits`} +* \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} +* \cgalParamNEnd +* +* \cgalParamNBegin{visitor} +* \cgalParamDescription{a visitor that enables to track how polygons are divided into triangles} +* \cgalParamType{a class model of `PMPTriangulateFaceVisitor` and `PMPHolefillingVisitor`} +* \cgalParamDefault{`Triangulate_polygons::Default_visitor`} +* \cgalParamExtra{Note that the visitor will be copied, so +* it must not have any data member that does not have a reference-like type.} +* \cgalParamNEnd +* \cgalNamedParamsEnd +* +* This function calls `CGAL::Polygon_mesh_processing::triangulate_hole_polyline()` for each polygon. +* Refer to its documentation for its named parameters. +* +* @pre No polygon within `polygons` is degenerate. +* +* @return `true` if all the polygons have been triangulated. +* +* @see `triangulate_faces()` +*/ +template +bool triangulate_polygons(const PointRange& points, + PolygonRange& polygons, + const NamedParameters& np = parameters::default_values()) +{ + using Polygon = typename boost::range_value::type; + + PolygonRange triangulated_polygons; + triangulated_polygons.reserve(polygons.size()); + + bool success = true; + + internal::Triangulate_polygon_soup_modifier modifier; + for(const Polygon& polygon : polygons) + { + if(polygon.size() <= 3) + { + triangulated_polygons.push_back(polygon); + continue; + } + + if(!modifier(polygon, points, triangulated_polygons, np)) + success = false; + } + + std::swap(polygons, triangulated_polygons); + + return success; +} -#include +} // namespace Polygon_mesh_processing +} // namespace CGAL #endif // CGAL_POLYGON_MESH_PROCESSING_TRIANGULATE_FACES_H diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index b513da96..fd27849d 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h $ -// $Id: triangulate_hole.h d01fa7b 2022-05-10T07:16:14+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h $ +// $Id: include/CGAL/Polygon_mesh_processing/triangulate_hole.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ilker O. Yaz @@ -23,7 +23,7 @@ #include #include -#include +#include #include @@ -70,19 +70,25 @@ namespace Polygon_mesh_processing { must not intersect the surface. Otherwise, additionally, the boundary of the hole must not contain any non-manifold vertex. The patch generated does not introduce non-manifold edges nor degenerate triangles. If a hole cannot be triangulated, - `pmesh` is not modified and nothing is recorded in `out`. + `pmesh` is not modified and nothing is recorded in the face output + iterator. @tparam PolygonMesh a model of `MutableFaceGraph` - @tparam OutputIterator a model of `OutputIterator` - holding `boost::graph_traits::%face_descriptor` for patch faces. @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" @param pmesh polygon mesh containing the hole @param border_halfedge a border halfedge incident to the hole - @param out iterator over patch faces @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below \cgalNamedParamsBegin + + \cgalParamNBegin{face_output_iterator} + \cgalParamDescription{iterator over patch faces} + \cgalParamType{a model of `OutputIterator` + holding `boost::graph_traits::%face_descriptor` for patch faces} + \cgalParamDefault{`Emptyset_iterator`} + \cgalParamNEnd + \cgalParamNBegin{vertex_point_map} \cgalParamDescription{a property map associating points to the vertices of `pmesh`} \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` @@ -145,7 +151,7 @@ namespace Polygon_mesh_processing { \cgalNamedParamsEnd - @return `out` + @return the face output iterator \todo handle islands @todo Replace border_halfedge by a range of border halfedges. @@ -156,19 +162,23 @@ namespace Polygon_mesh_processing { @todo handle the case where an island is reduced to a point */ template - OutputIterator + typename CGAL_NP_TEMPLATE_PARAMETERS> + auto triangulate_hole(PolygonMesh& pmesh, typename boost::graph_traits::halfedge_descriptor border_halfedge, - OutputIterator out, - const NamedParameters& np = parameters::default_values()) + const CGAL_NP_CLASS& np = parameters::default_values()) { using parameters::choose_parameter; using parameters::get_parameter; using parameters::get_parameter_reference; - typedef typename GetGeomTraits::type GeomTraits; + typedef typename GetGeomTraits::type GeomTraits; + + typedef typename internal_np::Lookup_named_param_def::type Face_output_iterator; + + Face_output_iterator out = choose_parameter(get_parameter(np, internal_np::face_output_iterator)); bool use_dt3 = #ifdef CGAL_HOLE_FILLING_DO_NOT_USE_DT3 @@ -210,37 +220,77 @@ namespace Polygon_mesh_processing { Hole_filling::Default_visitor default_visitor; - return internal::triangulate_hole_polygon_mesh( - pmesh, - border_halfedge, - out, - choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, pmesh)), - use_dt3, - choose_parameter(get_parameter(np, internal_np::geom_traits)), - use_cdt, - choose_parameter(get_parameter(np, internal_np::do_not_use_cubic_algorithm), false), - choose_parameter(get_parameter_reference(np, internal_np::visitor), default_visitor), - max_squared_distance).first; + return + internal::triangulate_hole_polygon_mesh( + pmesh, + border_halfedge, + out, + choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, pmesh)), + use_dt3, + choose_parameter(get_parameter(np, internal_np::geom_traits)), + use_cdt, + choose_parameter(get_parameter(np, internal_np::do_not_use_cubic_algorithm), false), + choose_parameter(get_parameter_reference(np, internal_np::visitor), default_visitor), + max_squared_distance).first; + } + +#ifndef CGAL_NO_DEPRECATED_CODE + /*! + \ingroup PMP_hole_filling_grp + + \deprecated This function is deprecated since \cgal 5.6 and the + overload with the named parameter `face_output_iterator` should be + used instead. + + \brief triangulates a hole in a polygon mesh. + + + @tparam PolygonMesh a model of `MutableFaceGraph` + @tparam OutputIterator a model of `OutputIterator` + holding `boost::graph_traits::%face_descriptor` for patch faces. + @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + */ + template + CGAL_DEPRECATED + OutputIterator + triangulate_hole(PolygonMesh& pmesh, + typename boost::graph_traits::halfedge_descriptor border_halfedge, + OutputIterator out, + const CGAL_NP_CLASS& np = parameters::default_values()) + { + return triangulate_hole(pmesh, border_halfedge,np.face_output_iterator(out)); } +#endif // CGAL_NO_DEPRECATED_CODE /*! \ingroup PMP_hole_filling_grp @brief triangulates and refines a hole in a polygon mesh. @tparam PolygonMesh must be model of `MutableFaceGraph` - @tparam FacetOutputIterator model of `OutputIterator` - holding `boost::graph_traits::%face_descriptor` for patch faces. - @tparam VertexOutputIterator model of `OutputIterator` - holding `boost::graph_traits::%vertex_descriptor` for patch vertices. @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" @param pmesh polygon mesh which has the hole @param border_halfedge a border halfedge incident to the hole - @param face_out output iterator over patch faces - @param vertex_out output iterator over patch vertices without including the boundary @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below \cgalNamedParamsBegin + + \cgalParamNBegin{face_output_iterator} + \cgalParamDescription{iterator over patch faces} + \cgalParamType{a model of `OutputIterator` + holding `boost::graph_traits::%face_descriptor` for patch faces} + \cgalParamDefault{`Emptyset_iterator`} + \cgalParamNEnd + + \cgalParamNBegin{vertex_output_iterator} + \cgalParamDescription{iterator over patch vertices} + \cgalParamType{a model of `OutputIterator` + holding `boost::graph_traits::%vertex_descriptor` for patch vertices} + \cgalParamDefault{`Emptyset_iterator`} + \cgalParamNEnd + \cgalParamNBegin{vertex_point_map} \cgalParamDescription{a property map associating points to the vertices of `pmesh`} \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` @@ -296,7 +346,7 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalParamNBegin{density_control_factor} - \cgalParamDescription{factor to control density of the ouput mesh, + \cgalParamDescription{factor to control density of the output mesh, where larger values cause denser refinements, as in `refine()`} \cgalParamType{double} \cgalParamDefault{\f$ \sqrt{2}\f$} @@ -309,7 +359,7 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalNamedParamsEnd - @return pair of `face_out` and `vertex_out` + @return pair of face and vertex output iterator \sa CGAL::Polygon_mesh_processing::triangulate_hole() \sa CGAL::Polygon_mesh_processing::refine() @@ -317,53 +367,108 @@ namespace Polygon_mesh_processing { \todo handle islands */ template - std::pair - triangulate_and_refine_hole(PolygonMesh& pmesh, + typename CGAL_NP_TEMPLATE_PARAMETERS> + auto + triangulate_and_refine_hole(PolygonMesh& pmesh, typename boost::graph_traits::halfedge_descriptor border_halfedge, - FaceOutputIterator face_out, - VertexOutputIterator vertex_out, - const NamedParameters& np = parameters::default_values()) + const CGAL_NP_CLASS& np = parameters::default_values()) { using parameters::choose_parameter; + using parameters::get_parameter; using parameters::get_parameter_reference; + typedef typename internal_np::Lookup_named_param_def::type Face_output_iterator; + + Face_output_iterator face_out = choose_parameter(get_parameter(np, internal_np::face_output_iterator)); + + typedef typename internal_np::Lookup_named_param_def::type Vertex_output_iterator; + + Vertex_output_iterator vertex_out = choose_parameter(get_parameter(np, internal_np::vertex_output_iterator)); + std::vector::face_descriptor> patch; - triangulate_hole(pmesh, border_halfedge, std::back_inserter(patch), np); + triangulate_hole(pmesh, border_halfedge, np.face_output_iterator(std::back_inserter(patch))); face_out = std::copy(patch.begin(), patch.end(), face_out); Hole_filling::Default_visitor default_visitor; typedef typename internal_np::Lookup_named_param_def::reference Visitor; Visitor visitor = choose_parameter(get_parameter_reference(np, internal_np::visitor), default_visitor); visitor.start_refine_phase(); - std::pair res = refine(pmesh, patch, face_out, vertex_out, np); + std::pair res = refine(pmesh, patch, face_out, vertex_out, np); visitor.end_refine_phase(); return res; } + +#ifndef CGAL_NO_DEPRECATED_CODE + /*! + \ingroup PMP_hole_filling_grp + + \deprecated This function is deprecated since \cgal 5.6 and the + overload with the named parameters `face_output_iterator` and + `vertex_output_iterator` should be used instead. + + @brief triangulates and refines a hole in a polygon mesh. + + @tparam PolygonMesh must be model of `MutableFaceGraph` + @tparam FaceOutputIterator model of `OutputIterator` + holding `boost::graph_traits::%face_descriptor` for patch faces. + @tparam VertexOutputIterator model of `OutputIterator` + holding `boost::graph_traits::%vertex_descriptor` for patch vertices. + @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + */ + + template + CGAL_DEPRECATED + std::pair + triangulate_and_refine_hole(PolygonMesh& pmesh, + typename boost::graph_traits::halfedge_descriptor border_halfedge, + FaceOutputIterator face_out, + VertexOutputIterator vertex_out, + const CGAL_NP_CLASS& np = parameters::default_values()) + { + return triangulate_and_refine_hole(pmesh, border_halfedge, + np.face_output_iterator(face_out).vertex_output_iterator(vertex_out)); + } +#endif // CGAL_NO_DEPRECATED_CODE + /*! \ingroup PMP_hole_filling_grp @brief triangulates, refines and fairs a hole in a polygon mesh. @tparam PolygonMesh a model of `MutableFaceGraph` - @tparam FaceOutputIterator model of `OutputIterator` - holding `boost::graph_traits::%face_descriptor` for patch faces - @tparam VertexOutputIterator model of `OutputIterator` - holding `boost::graph_traits::%vertex_descriptor` for patch vertices @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" @param pmesh polygon mesh which has the hole @param border_halfedge a border halfedge incident to the hole - @param face_out output iterator over patch faces - @param vertex_out output iterator over patch vertices without including the boundary + @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below \cgalNamedParamsBegin + + \cgalParamNBegin{face_output_iterator} + \cgalParamDescription{iterator over patch faces} + \cgalParamType{a model of `OutputIterator` + holding `boost::graph_traits::%face_descriptor` for patch faces} + \cgalParamDefault{`Emptyset_iterator`} + \cgalParamNEnd + + \cgalParamNBegin{vertex_output_iterator} + \cgalParamDescription{iterator over patch vertices} + \cgalParamType{a model of `OutputIterator` + holding `boost::graph_traits::%vertex_descriptor` for patch vertices} + \cgalParamDefault{`Emptyset_iterator`} + \cgalParamNEnd + \cgalParamNBegin{vertex_point_map} \cgalParamDescription{a property map associating points to the vertices of `pmesh`} \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` @@ -410,15 +515,15 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalParamNBegin{density_control_factor} - \cgalParamDescription{factor to control density of the ouput mesh, + \cgalParamDescription{factor to control density of the output mesh, where larger values cause denser refinements, as in `refine()`} \cgalParamType{double} \cgalParamDefault{\f$ \sqrt{2}\f$} \cgalParamNEnd \cgalParamNBegin{fairing_continuity} - \cgalParamDescription{A value controling the tangential continuity of the output surface patch. - The possible values are 0, 1 and 2, refering to the C0, C1 + \cgalParamDescription{A value controlling the tangential continuity of the output surface patch. + The possible values are 0, 1 and 2, referring to the C0, C1 and C2 continuity.} \cgalParamType{unsigned int} \cgalParamDefault{`1`} @@ -441,10 +546,8 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalNamedParamsEnd - @return tuple of - - `bool`: `true` if fairing is successful - - `face_out` - - `vertex_out` + @return tuple of `bool` with `true` if fairing is successful, and + the face and vertex output iterator \sa CGAL::Polygon_mesh_processing::triangulate_hole() \sa CGAL::Polygon_mesh_processing::refine() @@ -453,30 +556,41 @@ namespace Polygon_mesh_processing { \todo handle islands */ template - std::tuple + typename CGAL_NP_TEMPLATE_PARAMETERS> + auto triangulate_refine_and_fair_hole(PolygonMesh& pmesh, typename boost::graph_traits::halfedge_descriptor border_halfedge, - FaceOutputIterator face_out, - VertexOutputIterator vertex_out, - const NamedParameters& np = parameters::default_values()) + const CGAL_NP_CLASS& np = parameters::default_values()) { CGAL_precondition(CGAL::is_triangle_mesh(pmesh)); using parameters::choose_parameter; + using parameters::get_parameter; using parameters::get_parameter_reference; + CGAL_precondition(is_valid_halfedge_descriptor(border_halfedge, pmesh)); + + typedef typename internal_np::Lookup_named_param_def::type Face_output_iterator; + + Face_output_iterator face_out = choose_parameter(get_parameter(np, internal_np::face_output_iterator)); + + typedef typename internal_np::Lookup_named_param_def::type Vertex_output_iterator; + + Vertex_output_iterator vertex_out = choose_parameter(get_parameter(np, internal_np::vertex_output_iterator)); + std::vector::vertex_descriptor> patch; face_out = triangulate_and_refine_hole - (pmesh, border_halfedge, face_out, std::back_inserter(patch), np).first; + (pmesh, border_halfedge, np.face_output_iterator(face_out).vertex_output_iterator(std::back_inserter(patch))).first; CGAL_postcondition(CGAL::is_triangle_mesh(pmesh)); Hole_filling::Default_visitor default_visitor; typedef typename internal_np::Lookup_named_param_def::reference Visitor; Visitor visitor = choose_parameter(get_parameter_reference(np, internal_np::visitor), default_visitor); @@ -488,6 +602,39 @@ namespace Polygon_mesh_processing { return std::make_tuple(fair_success, face_out, vertex_out); } + #ifndef CGAL_NO_DEPRECATED_CODE + /*! + \ingroup PMP_hole_filling_grp + + \deprecated This function is deprecated since \cgal 5.6 and the + overload with the named parameters `face_output_iterator` and + `vertex_output_iterator` should be used instead. + + \brief triangulates, refines, and fairs a hole in a polygon mesh. + + @tparam PolygonMesh a model of `MutableFaceGraph` + @tparam FaceOutputIterator model of `OutputIterator` + holding `boost::graph_traits::%face_descriptor` for patch faces. + @tparam VertexOutputIterator model of `OutputIterator` + holding `boost::graph_traits::%vertex_descriptor` for patch vertices. + @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + */ + template + CGAL_DEPRECATED + std::tuple + triangulate_refine_and_fair_hole(PolygonMesh& pmesh, + typename boost::graph_traits::halfedge_descriptor border_halfedge, + FaceOutputIterator face_out, + VertexOutputIterator vertex_out, + const CGAL_NP_CLASS& np = parameters::default_values()) + { + return triangulate_refine_and_fair_hole(pmesh, border_halfedge, np.face_output_iterator(face_out).vertex_output_iterator(vertex_out)); + } +#endif // CGAL_NO_DEPRECATED_CODE + /*! \ingroup PMP_hole_filling_grp creates triangles to fill the hole defined by points in the range `points`. @@ -582,11 +729,8 @@ namespace Polygon_mesh_processing { using parameters::get_parameter; using parameters::get_parameter_reference; - bool use_cdt = -#ifdef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 - false; -#else - choose_parameter(get_parameter(np, internal_np::use_2d_constrained_delaunay_triangulation), false); +#ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 + bool use_cdt = choose_parameter(get_parameter(np, internal_np::use_2d_constrained_delaunay_triangulation), false); #endif bool use_dt3 = #ifdef CGAL_HOLE_FILLING_DO_NOT_USE_DT3 diff --git a/thirdparty/CGAL/include/CGAL/Polygon_mesh_slicer.h b/thirdparty/CGAL/include/CGAL/Polygon_mesh_slicer.h index 54d46515..5ef47e77 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_mesh_slicer.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_mesh_slicer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h $ -// $Id: Polygon_mesh_slicer.h 263ad6b 2020-08-20T18:25:01+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h $ +// $Id: include/CGAL/Polygon_mesh_slicer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,14 +23,13 @@ #include #include +#include #include #include #include -#include -#include -#include +#include #include #include @@ -56,14 +55,14 @@ namespace CGAL { /// orthogonal to a frame axis, the non-null coefficient being 1 or -1. /// The default is `true`. /// -/// The implemenation of this class depends on the package \ref PkgAABBTree. +/// The implementation of this class depends on the package \ref PkgAABBTree. /// \todo Shall we document more in details what is required? /// `Traits` must provide: /// - `Plane_3` /// - `Point_3` /// - `Segment_3` /// - `Oriented_side_3` with `Oriented_side operator()(Plane_3, Point_3)` -/// - `Do_intersect_3` with `boost::optional operator()(Plane_3,Segment_3)` +/// - `Do_intersect_3` with `std::optional operator()(Plane_3,Segment_3)` /// - `Do_intersect_3` with `bool operator()(Plane_3, Bbox_3)` /// /// \todo If we keep the traits for plane orthogonal to a frame axis, `Traits` must also provide: @@ -79,12 +78,12 @@ template::type >::type, + typename boost::property_map< TriangleMesh, vertex_point_t>::type >, Default, - VertexPointMap>::type> > >, + VertexPointMap>>>>, bool UseParallelPlaneOptimization=true> class Polygon_mesh_slicer { @@ -102,7 +101,7 @@ class Polygon_mesh_slicer typedef typename Traits::FT FT; /// typedefs for internal graph to get connectivity of the polylines - typedef boost::variant AL_vertex_info; + typedef std::variant AL_vertex_info; typedef boost::adjacency_list < boost::vecS, boost::vecS, @@ -181,9 +180,9 @@ class Polygon_mesh_slicer AL_vertex_info v1 = al_graph[nodes_for_orient.first]; AL_vertex_info v2 = al_graph[nodes_for_orient.second]; - if (const vertex_descriptor* vd1_ptr = boost::get(&v1) ) + if (const vertex_descriptor* vd1_ptr = std::get_if(&v1) ) { - if (const vertex_descriptor* vd2_ptr = boost::get(&v2) ) + if (const vertex_descriptor* vd2_ptr = std::get_if(&v2) ) { CGAL_assertion( halfedge(*vd1_ptr, *vd2_ptr, m_tmesh).second ); halfedge_descriptor h_opp = halfedge(*vd1_ptr, *vd2_ptr, m_tmesh).first; @@ -207,7 +206,7 @@ class Polygon_mesh_slicer else { // e2 is intersected in its interior - edge_descriptor e2 = boost::get(v2); + edge_descriptor e2 = std::get(v2); halfedge_descriptor h2 = halfedge(e2, m_tmesh); if ( target(next(h2, m_tmesh), m_tmesh) != *vd1_ptr ) h2=opposite(h2, m_tmesh); @@ -216,9 +215,9 @@ class Polygon_mesh_slicer } else { - edge_descriptor e1 = boost::get(v1); + edge_descriptor e1 = std::get(v1); halfedge_descriptor h1 = halfedge(e1, m_tmesh); - if (const vertex_descriptor* vd2_ptr = boost::get(&v2) ) + if (const vertex_descriptor* vd2_ptr = std::get_if(&v2) ) { // e1 is intersected in its interior if ( target(next(h1, m_tmesh), m_tmesh) != *vd2_ptr ) @@ -228,7 +227,7 @@ class Polygon_mesh_slicer else { // intersection in the interior of both edges - edge_descriptor e2 = boost::get(v2); + edge_descriptor e2 = std::get(v2); halfedge_descriptor h2 = halfedge(e2, m_tmesh); if ( face(h1, m_tmesh) != face(h2,m_tmesh) ) { @@ -265,20 +264,20 @@ class Polygon_mesh_slicer nodes_for_orient.second=node_id; AL_vertex_info v = al_graph[node_id]; - if (const vertex_descriptor* vd_ptr = boost::get(&v) ) + if (const vertex_descriptor* vd_ptr = std::get_if(&v) ) { current_poly.push_back( get(m_vpmap, *vd_ptr) ); } else { - edge_descriptor ed = boost::get(v); + edge_descriptor ed = std::get(v); Segment_3 s( get(m_vpmap, source(ed, m_tmesh)), get(m_vpmap,target(ed, m_tmesh)) ); const auto inter = intersect_3(m_plane, s); - CGAL_assertion(inter != boost::none); - const Point_3* pt_ptr = boost::get(&(*inter)); + CGAL_assertion(inter != std::nullopt); + const Point_3* pt_ptr = std::get_if(&(*inter)); current_poly.push_back( *pt_ptr ); } } @@ -316,7 +315,7 @@ class Polygon_mesh_slicer } /// Other private functions /// handle edge insertion in the adjacency_list graph - /// we add an edge betweem two edge_descriptor if they + /// we add an edge between two edge_descriptor if they /// share a common facet void update_al_graph_connectivity( edge_descriptor ed, diff --git a/thirdparty/CGAL/include/CGAL/Polygon_nop_decomposition_2.h b/thirdparty/CGAL/include/CGAL/Polygon_nop_decomposition_2.h index 662614e9..264408ff 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_nop_decomposition_2.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_nop_decomposition_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Polygon_nop_decomposition_2.h $ -// $Id: Polygon_nop_decomposition_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Polygon_nop_decomposition_2.h $ +// $Id: include/CGAL/Polygon_nop_decomposition_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Efi Fogel diff --git a/thirdparty/CGAL/include/CGAL/Polygon_offset_builder_2.h b/thirdparty/CGAL/include/CGAL/Polygon_offset_builder_2.h index 5ac72759..1787260a 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_offset_builder_2.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_offset_builder_2.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h $ -// $Id: Polygon_offset_builder_2.h b2d562e 2023-01-04T16:38:15+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h $ +// $Id: include/CGAL/Polygon_offset_builder_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -16,8 +16,8 @@ #include #include -#include -#include +#include +#include #include @@ -39,7 +39,7 @@ struct Default_polygon_offset_builder_2_visitor void on_offset_contour_started() const {} - void on_offset_point ( Point_2 const& ) const {} + void on_offset_point ( Point_2 const&, Halfedge_const_handle ) const {} Point_2 on_offset_point_overflowed( Halfedge_const_handle aBisector ) const { @@ -69,9 +69,9 @@ public : typedef typename Traits::FT FT ; typedef typename Traits::Point_2 Point_2 ; - typedef boost::optional OptionalPoint_2 ; + typedef std::optional OptionalPoint_2 ; - typedef boost::shared_ptr ContainerPtr ; + typedef std::shared_ptr ContainerPtr ; Polygon_offset_builder_2( Ss const& aSs, Traits const& aTraits = Traits(), Visitor const& aVisitor = Visitor() ) ; @@ -139,17 +139,18 @@ public : Trisegment_2_ptr GetTrisegment ( Vertex_const_handle aNode ) const ; +public: Comparison_result Compare_offset_against_event_time( FT aT, Vertex_const_handle aNode ) const { CGAL_precondition( aNode->is_skeleton() ) ; Comparison_result r = aNode->has_infinite_time() ? SMALLER - : static_cast(Compare_offset_against_event_time_2(mTraits)(aT,GetTrisegment(aNode))); + : static_cast(mTraits.compare_offset_against_event_time_2_object()(aT,GetTrisegment(aNode))); return r ; } -public: - boost::optional Construct_offset_point( FT aT, Halfedge_const_handle aBisector ) const + + std::optional Construct_offset_point( FT aT, Halfedge_const_handle aBisector ) const { CGAL_assertion(aBisector->is_bisector()); CGAL_assertion(handle_assigned(aBisector->opposite())); @@ -175,26 +176,12 @@ public : CGAL_POLYOFFSET_TRACE(3,"Seed node for " << e2str(*aBisector) << " is " << v2str(*lSeedNode) << " event=" << lSeedEvent ) ; } - OptionalPoint_2 p = Construct_offset_point_2(mTraits)(aT - ,CreateSegment(lBorderA) - ,CreateSegment(lBorderB) - ,lSeedEvent - ); - CGAL_stskel_intrinsic_test_assertion - ( - !p - || - ( p && !CGAL_SS_i::is_possibly_inexact_distance_clearly_not_zero - ( CGAL_SS_i::squared_distance_from_point_to_lineC2(p->x() - ,p->y() - ,lNodeS->point().x() - ,lNodeS->point().y() - ,lNodeT->point().x() - ,lNodeT->point().y() - ).to_nt() - ) - ) - ) ; + OptionalPoint_2 p = mTraits.construct_offset_point_2_object()( aT, + CreateSegment(lBorderA), + lBorderA->weight(), + CreateSegment(lBorderB), + lBorderB->weight(), + lSeedEvent ); return p ; } diff --git a/thirdparty/CGAL/include/CGAL/Polygon_offset_builder_traits_2.h b/thirdparty/CGAL/include/CGAL/Polygon_offset_builder_traits_2.h index 330f2ac3..c2464098 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_offset_builder_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_offset_builder_traits_2.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_traits_2.h $ -// $Id: Polygon_offset_builder_traits_2.h e9c3531 2020-10-08T22:36:36+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_traits_2.h $ +// $Id: include/CGAL/Polygon_offset_builder_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -18,7 +18,7 @@ #include #include -#include +#include namespace CGAL { @@ -40,7 +40,6 @@ struct Compare_offset_against_event_time_2 : Functor_base_2 } }; - template struct Construct_offset_point_2 : Functor_base_2 { @@ -51,67 +50,22 @@ struct Construct_offset_point_2 : Functor_base_2 typedef typename Base::Segment_2_with_ID Segment_2_with_ID ; typedef typename Base::Trisegment_2_ptr Trisegment_2_ptr ; - typedef boost::optional result_type ; - + typedef std::optional result_type ; result_type operator() ( FT const& aT , Segment_2_with_ID const& aE0 + , FT const& aWeight0 , Segment_2_with_ID const& aE1 + , FT const& aWeight1 , Trisegment_2_ptr const& aNode ) const { - typedef boost::optional< Line_2 > Optional_line; - No_cache lCoeff_cache; + No_caches no_caches; - result_type p = construct_offset_pointC2(aT,aE0,aE1,aNode,lCoeff_cache); - - CGAL_stskel_intrinsic_test_assertion(!p || (p && !is_point_calculation_clearly_wrong(aT,*p,aE0,aE1))); + result_type p = construct_offset_pointC2(aT,aE0,aWeight0,aE1,aWeight1,aNode, no_caches); return p ; } - - bool is_point_calculation_clearly_wrong( FT const& t, Point_2 const& p, - Segment_2_with_ID const& aE0, Segment_2_with_ID const& aE1 ) const - { - bool rR = false ; - - if ( is_possibly_inexact_time_clearly_not_zero(t) ) - { - Point_2 const& e0s = aE0.source(); - Point_2 const& e0t = aE0.target(); - - Point_2 const& e1s = aE1.source(); - Point_2 const& e1t = aE1.target(); - - FT const very_short(0.1); - FT const very_short_squared = CGAL_NTS square(very_short); - - FT l0 = squared_distance(e0s,e0t) ; - FT l1 = squared_distance(e1s,e1t) ; - - bool e0_is_not_very_short = l0 > very_short_squared ; - bool e1_is_not_very_short = l1 > very_short_squared ; - - FT d0 = squared_distance_from_point_to_lineC2(p.x(),p.y(),e0s.x(),e0s.y(),e0t.x(),e0t.y()).to_nt(); - FT d1 = squared_distance_from_point_to_lineC2(p.x(),p.y(),e1s.x(),e1s.y(),e1t.x(),e1t.y()).to_nt(); - - FT tt = CGAL_NTS square(t) ; - - bool e0_is_clearly_wrong = e0_is_not_very_short && is_possibly_inexact_distance_clearly_not_equal_to(d0,tt) ; - bool e1_is_clearly_wrong = e1_is_not_very_short && is_possibly_inexact_distance_clearly_not_equal_to(d1,tt) ; - - rR = e0_is_clearly_wrong || e1_is_clearly_wrong ; - - CGAL_stskel_intrinsic_test_trace_if(rR - , "\nOffset point calculation is clearly wrong:" - << "\ntime=" << t << " p=" << p2str(p) << " e0=" << s2str(aE0) << " e1=" << s2str(aE1) - << "\nl0=" << inexact_sqrt(l0) << " l1=" << inexact_sqrt(l1) - << "\nd0=" << d0 << " d1=" << d1 << " tt=" << tt - ) ; - } - - return rR ; - } }; @@ -124,22 +78,6 @@ struct Polygon_offset_builder_traits_2_functors typedef CGAL_SS_i::Compare_ss_event_times_2 Compare_ss_event_times_2 ; typedef CGAL_SS_i::Construct_offset_point_2 Construct_offset_point_2 ; typedef CGAL_SS_i::Construct_ss_event_time_and_point_2 Construct_ss_event_time_and_point_2 ; - - struct Construct_ss_trisegment_2 : CGAL_SS_i::Functor_base_2 - { - typedef CGAL_SS_i::Functor_base_2 Base ; - - typedef typename Base::Segment_2_with_ID Segment_2_with_ID ; - typedef typename Base::Trisegment_2 Trisegment_2 ; - typedef typename Base::Trisegment_2_ptr Trisegment_2_ptr ; - - typedef Trisegment_2_ptr result_type ; - - result_type operator() ( Segment_2_with_ID const& aS0, Segment_2_with_ID const& aS1, Segment_2_with_ID const& aS2 ) const - { - return CGAL_SS_i::construct_trisegment(aS0,aS1,aS2,0); - } - }; } ; template @@ -154,19 +92,18 @@ struct Polygon_offset_builder_traits_2_base typedef CGAL_SS_i::Segment_2_with_ID Segment_2_with_ID ; // for BOOST_MPL_HAS_XXX_TRAIT_DEF typedef CGAL::Trisegment_2 Trisegment_2 ; typedef typename Trisegment_2::Self_ptr Trisegment_2_ptr ; - - template F get( F const* = 0 ) const { return F(); } } ; -template class Polygon_offset_builder_traits_2_impl ; +template +class Polygon_offset_builder_traits_2_impl ; template -class Polygon_offset_builder_traits_2_impl : public Polygon_offset_builder_traits_2_base +class Polygon_offset_builder_traits_2_impl + : public Polygon_offset_builder_traits_2_base { typedef Polygon_offset_builder_traits_2_functors Unfiltering ; public: - typedef Unfiltered_predicate_adaptor Compare_offset_against_event_time_2 ; @@ -174,13 +111,12 @@ class Polygon_offset_builder_traits_2_impl : public Polygon_offset_ Compare_ss_event_times_2 ; typedef typename Unfiltering::Construct_offset_point_2 Construct_offset_point_2 ; - typedef typename Unfiltering::Construct_ss_trisegment_2 Construct_ss_trisegment_2 ; typedef typename Unfiltering::Construct_ss_event_time_and_point_2 Construct_ss_event_time_and_point_2 ; - } ; template -class Polygon_offset_builder_traits_2_impl : public Polygon_offset_builder_traits_2_base +class Polygon_offset_builder_traits_2_impl + : public Polygon_offset_builder_traits_2_base { typedef typename K::Exact_kernel EK ; typedef typename K::Approximate_kernel FK ; @@ -202,7 +138,6 @@ class Polygon_offset_builder_traits_2_impl : public Polygon_offset_b typedef CGAL_SS_i::SS_converter C2C ; public: - typedef Filtered_predicate : public Polygon_offset_b > Construct_offset_point_2 ; - typedef typename Unfiltering::Construct_ss_trisegment_2 Construct_ss_trisegment_2 ; - typedef CGAL_SS_i::Exceptionless_filtered_construction< typename Unfiltering::Construct_ss_event_time_and_point_2 , typename Exact ::Construct_ss_event_time_and_point_2 , typename Filtering::Construct_ss_event_time_and_point_2 @@ -244,13 +177,24 @@ template class Polygon_offset_builder_traits_2 : public Polygon_offset_builder_traits_2_impl::type,K> { -} ; + typedef Polygon_offset_builder_traits_2_impl::type,K> Base ; -CGAL_STRAIGHT_SKELETON_CREATE_FUNCTOR_ADAPTER(Compare_offset_against_event_time_2) -CGAL_STRAIGHT_SKELETON_CREATE_FUNCTOR_ADAPTER(Construct_offset_point_2) - -} // end namespace CGAL +public: + typedef typename Base::Compare_offset_against_event_time_2 Compare_offset_against_event_time_2 ; + typedef typename Base::Compare_ss_event_times_2 Compare_ss_event_times_2 ; + typedef typename Base::Construct_offset_point_2 Construct_offset_point_2 ; + typedef typename Base::Construct_ss_event_time_and_point_2 Construct_ss_event_time_and_point_2 ; + + Compare_offset_against_event_time_2 compare_offset_against_event_time_2_object() const + { return Compare_offset_against_event_time_2() ; } + Compare_ss_event_times_2 compare_ss_event_times_2_object() const + { return Compare_ss_event_times_2() ; } + Construct_offset_point_2 construct_offset_point_2_object() const + { return Construct_offset_point_2() ; } + Construct_ss_event_time_and_point_2 construct_ss_event_time_and_point_2_object() const + { return Construct_ss_event_time_and_point_2() ; } +} ; +} // namespace CGAL -#endif // CGAL_POLYGON_OFFSET_BUILDER_TRAITS_2_H // -// EOF // +#endif // CGAL_POLYGON_OFFSET_BUILDER_TRAITS_2_H diff --git a/thirdparty/CGAL/include/CGAL/Polygon_set_2.h b/thirdparty/CGAL/include/CGAL/Polygon_set_2.h index 44113dce..e0fc4764 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_set_2.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_set_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/Polygon_set_2.h $ -// $Id: Polygon_set_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/Polygon_set_2.h $ +// $Id: include/CGAL/Polygon_set_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -58,7 +58,7 @@ class Polygon_set_2 : {} /*! Constructor with traits object. */ - Polygon_set_2 (Traits_2& tr) : + Polygon_set_2 (const Traits_2& tr) : Base(tr) {} diff --git a/thirdparty/CGAL/include/CGAL/Polygon_traits_2.h b/thirdparty/CGAL/include/CGAL/Polygon_traits_2.h index 719aa029..ced665a8 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_traits_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon/include/CGAL/Polygon_traits_2.h $ -// $Id: Polygon_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon/include/CGAL/Polygon_traits_2.h $ +// $Id: include/CGAL/Polygon_traits_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polygon_triangulation_decomposition_2.h b/thirdparty/CGAL/include/CGAL/Polygon_triangulation_decomposition_2.h index c0cbe5f3..bdede8dc 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_triangulation_decomposition_2.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_triangulation_decomposition_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Polygon_triangulation_decomposition_2.h $ -// $Id: Polygon_triangulation_decomposition_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Polygon_triangulation_decomposition_2.h $ +// $Id: include/CGAL/Polygon_triangulation_decomposition_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Efi Fogel diff --git a/thirdparty/CGAL/include/CGAL/Polygon_vertical_decomposition_2.h b/thirdparty/CGAL/include/CGAL/Polygon_vertical_decomposition_2.h index b6d7a814..29310afb 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_vertical_decomposition_2.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_vertical_decomposition_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Polygon_vertical_decomposition_2.h $ -// $Id: Polygon_vertical_decomposition_2.h 414103f 2022-02-21T17:17:34+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Polygon_vertical_decomposition_2.h $ +// $Id: include/CGAL/Polygon_vertical_decomposition_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Efi Fogel @@ -93,7 +93,7 @@ class Polygon_vertical_decomposition_2 { // Data members: const Traits_2* m_traits; - bool m_own_traits; // inidicates whether the kernel should be freed up. + bool m_own_traits; // indicates whether the kernel should be freed up. Compare_x_2 f_cmp_x; Intersect_2 f_intersect; @@ -274,13 +274,13 @@ class Polygon_vertical_decomposition_2 { // Construct the vertical decomposition of the given arrangement. void vertical_decomposition(Arrangement_2& arr) const { - // For each vertex in the arrangment, locate the feature that lies + // For each vertex in the arrangement, locate the feature that lies // directly below it and the feature that lies directly above it. Vert_decomp_list vd_list; CGAL::decompose(arr, std::back_inserter(vd_list)); // Go over the vertices (given in ascending lexicographical xy-order), - // and add segements to the feautres below and above it. + // and add segments to the feautres below and above it. typename Vert_decomp_list::iterator it, prev = vd_list.end(); for (it = vd_list.begin(); it != vd_list.end(); ++it) { // If the feature above the previous vertex is not the current vertex, diff --git a/thirdparty/CGAL/include/CGAL/Polygon_with_holes_2.h b/thirdparty/CGAL/include/CGAL/Polygon_with_holes_2.h index af18504e..1641526a 100644 --- a/thirdparty/CGAL/include/CGAL/Polygon_with_holes_2.h +++ b/thirdparty/CGAL/include/CGAL/Polygon_with_holes_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon/include/CGAL/Polygon_with_holes_2.h $ -// $Id: Polygon_with_holes_2.h 78ff918 2021-06-23T23:34:14+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon/include/CGAL/Polygon_with_holes_2.h $ +// $Id: include/CGAL/Polygon_with_holes_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -33,7 +33,7 @@ types (`Kernel` and `Container`) that are used to instantiate the type `Polygon_2`. The latter is used to represents the outer boundary and the boundary of the holes (if any exist). -\cgalModels `GeneralPolygonWithHoles_2` +\cgalModels{GeneralPolygonWithHoles_2} */ template Polygon_with_holes_2 (const Polygon_2& pgn_boundary, @@ -71,6 +76,17 @@ class Polygon_with_holes_2 : Base (pgn_boundary, h_begin, h_end) {} + /*! Move constructor. + * \note In order to move the hole polygons a + * `std::move_iterator` may be used. + */ + template + Polygon_with_holes_2 (Polygon_2&& pgn_boundary, + HolesInputIterator h_begin, + HolesInputIterator h_end) : + Base (std::move(pgn_boundary), h_begin, h_end) + {} + /*! Obtain the bounding box of the polygon with holes */ Bbox_2 bbox() const { return this->outer_boundary().bbox(); } }; @@ -80,10 +96,10 @@ class Polygon_with_holes_2 : //-----------------------------------------------------------------------// /*! -This operator exports a polygon with holes to the output stream `out`. +This operator exports a polygon with holes to the output stream `os`. An \ascii and a binary format exist. The format can be selected with -the \cgal modifiers for streams, `set_ascii_mode()` and `set_binary_mode()` +the \cgal modifiers for streams, `set_ascii_mode()` and `set_binary_mode()`, respectively. The modifier `set_pretty_mode()` can be used to allow for (a few) structuring comments in the output. Otherwise, the output would be free of comments. The default for writing is \ascii without comments. @@ -120,7 +136,7 @@ std::ostream& operator<<(std::ostream &os, default: os << "Polygon_with_holes_2(" << std::endl; if(p.is_unbounded()) - os << "No outer bounary" << std::endl; + os << "No outer boundary" << std::endl; else { os << "Boundary(" << std::endl; @@ -143,14 +159,14 @@ std::ostream& operator<<(std::ostream &os, //-----------------------------------------------------------------------// /*! -This operator imports a polygon with holes from the input stream `in`. +This operator imports a polygon with holes from the input stream `is`. -Both ASCII and binary formats are supported, and the format is automatically detected. +Both \ascii and binary formats are supported, and the format is automatically detected. The format consists of the number of points of the outer boundary followed by the points themselves in counterclockwise order, followed by the number of holes, and for each hole, the number of points of the outer boundary is followed -by the points themselves in clockwise order. +by the points themselves, in clockwise order. \relates Polygon_with_holes_2 */ @@ -170,7 +186,7 @@ std::istream &operator>>(std::istream &is, { Polygon_2 hole; is >> hole; - p.add_hole(hole); + p.add_hole(std::move(hole)); } } diff --git a/thirdparty/CGAL/include/CGAL/Polygonal_schema.h b/thirdparty/CGAL/include/CGAL/Polygonal_schema.h index 7b2d51a9..8a12acf9 100644 --- a/thirdparty/CGAL/include/CGAL/Polygonal_schema.h +++ b/thirdparty/CGAL/include/CGAL/Polygonal_schema.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_topology/include/CGAL/Polygonal_schema.h $ -// $Id: Polygonal_schema.h 52186a0 2020-05-14T11:38:15+02:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_topology/include/CGAL/Polygonal_schema.h $ +// $Id: include/CGAL/Polygonal_schema.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -52,83 +52,83 @@ namespace Surface_mesh_topology { template struct Polygonal_schema_tools { - typedef typename CMap::Dart_handle Dart_handle; + typedef typename CMap::Dart_descriptor Dart_descriptor; - static Dart_handle + static Dart_descriptor add_edge_to_face(CMap& cmap, const std::string& s, - Dart_handle prev_dart, - Dart_handle dart_same_label, - Dart_handle dart_opposite_label, - std::unordered_map& + Dart_descriptor prev_dart, + Dart_descriptor dart_same_label, + Dart_descriptor dart_opposite_label, + std::unordered_map& edge_label_to_dart) { - if (dart_same_label!=CMap::null_handle && dart_opposite_label!=CMap::null_handle) + if (dart_same_label!=CMap::null_descriptor && dart_opposite_label!=CMap::null_descriptor) { std::cerr<<"Polygonal_schema ERROR: "<<"both labels "<(prev_dart, res); } - if (dart_opposite_label!=CMap::null_handle) + if (dart_opposite_label!=CMap::null_descriptor) { cmap.template link_beta<2>(res, dart_opposite_label); } return res; } - const std::string& get_label(CMap& cmap, Dart_handle dh) const + const std::string& get_label(CMap& cmap, Dart_descriptor dh) const { return cmap.info(dh).m_label; } }; template struct Polygonal_schema_tools { - typedef typename GMap::Dart_handle Dart_handle; + typedef typename GMap::Dart_descriptor Dart_descriptor; // In a GMap, if an edge is 2-free, only one of its two dart has one label. // Otherwise, d has one label and alpha<0,2>(d) the opposite label. - static Dart_handle + static Dart_descriptor add_edge_to_face(GMap& gmap, const std::string& s, - Dart_handle prev_dart, - Dart_handle dart_same_label, - Dart_handle dart_opposite_label, - std::unordered_map& + Dart_descriptor prev_dart, + Dart_descriptor dart_same_label, + Dart_descriptor dart_opposite_label, + std::unordered_map& edge_label_to_dart) { - if (dart_same_label!=GMap::null_handle && dart_opposite_label!=GMap::null_handle) + if (dart_same_label!=GMap::null_descriptor && dart_opposite_label!=GMap::null_descriptor) { std::cerr<<"Polygonal_schema ERROR: "<<"both labels "<(res, dh2); - if (prev_dart!=gmap.null_handle) + if (prev_dart!=gmap.null_descriptor) { gmap.template link_alpha<1>(res, gmap.template alpha<0>(prev_dart)); } - if (dart_same_label!=GMap::null_handle) - { // Here dart_same_label!=GMap::null_handle + if (dart_same_label!=GMap::null_descriptor) + { // Here dart_same_label!=GMap::null_descriptor std::string s2=internal::opposite_label(s); edge_label_to_dart[s2]=dh2; gmap.info(dh2).m_label=s2; @@ -136,11 +136,11 @@ namespace Surface_mesh_topology { gmap.template sew<2>(res, dart_same_label); } else - { // Here either dart_opposite_label!=GMap::null_handle, or both are GMap::null_handle + { // Here either dart_opposite_label!=GMap::null_descriptor, or both are GMap::null_descriptor edge_label_to_dart[s]=res; gmap.info(res).m_label=s; - if (dart_opposite_label!=GMap::null_handle) + if (dart_opposite_label!=GMap::null_descriptor) { std::string s2=internal::opposite_label(s); edge_label_to_dart[s2]=res; @@ -153,7 +153,7 @@ namespace Surface_mesh_topology { return res; } - std::string get_label(GMap& gmap, Dart_handle dh) const + std::string get_label(GMap& gmap, Dart_descriptor dh) const { if (gmap.info(dh).m_label.empty()) { @@ -181,14 +181,14 @@ namespace Surface_mesh_topology { typedef BaseModel Base; typedef Polygonal_schema_base Self; typedef BaseModel Map; // Either a GMap or a CMap - typedef typename Map::Dart_handle Dart_handle; - typedef typename Map::Dart_const_handle Dart_const_handle; + typedef typename Map::Dart_descriptor Dart_descriptor; + typedef typename Map::Dart_const_descriptor Dart_const_descriptor; typedef typename Map::size_type size_type; Polygonal_schema_base() : Base(), mark_perforated(this->get_new_mark()), - first_dart(this->null_handle), - prev_dart(this->null_handle), + first_dart(this->null_descriptor), + prev_dart(this->null_descriptor), facet_started(false) {} @@ -203,8 +203,8 @@ namespace Surface_mesh_topology { return; } - first_dart = this->null_handle; - prev_dart = this->null_handle; + first_dart = this->null_descriptor; + prev_dart = this->null_descriptor; facet_started=true; } @@ -220,15 +220,15 @@ namespace Surface_mesh_topology { return; } - Dart_handle dart_same_label=get_dart_labeled(s); - Dart_handle dart_opposite_label=get_dart_labeled + Dart_descriptor dart_same_label=get_dart_labeled(s); + Dart_descriptor dart_opposite_label=get_dart_labeled (internal::opposite_label(s)); - Dart_handle cur=internal::Polygonal_schema_tools:: + Dart_descriptor cur=internal::Polygonal_schema_tools:: add_edge_to_face(*this, s, prev_dart, dart_same_label, dart_opposite_label, edge_label_to_dart); - if (prev_dart==this->null_handle) + if (prev_dart==this->null_descriptor) { first_dart=cur; } prev_dart=cur; @@ -297,39 +297,39 @@ namespace Surface_mesh_topology { } /// End of the facet. Return the first dart of this facet. - Dart_handle finish_facet() + Dart_descriptor finish_facet() { if (!facet_started) { std::cerr<<"Polygonal_schema ERROR: " <<"you try to end a facet" <<" but the facet is not yet started."<null_handle && - prev_dart!=this->null_handle ); + CGAL_assertion( first_dart!=this->null_descriptor && + prev_dart!=this->null_descriptor ); this->set_next(prev_dart, first_dart); facet_started=false; return first_dart; } - /// @return dart with the given label, Map::null_handle if this dart does not exist. - Dart_handle get_dart_labeled(const std::string& s) const + /// @return dart with the given label, Map::null_descriptor if this dart does not exist. + Dart_descriptor get_dart_labeled(const std::string& s) const { auto ite=edge_label_to_dart.find(s); if (ite==edge_label_to_dart.end()) - { return Map::null_handle; } + { return Map::null_descriptor; } return ite->second; } - std::string get_label(Dart_handle dh) const + std::string get_label(Dart_descriptor dh) const { return internal::Polygonal_schema_tools::get_label(dh); } /// marks the whole facet containing dh as perforated /// @return the number of darts of the marked face - size_type perforate_facet(Dart_handle dh) + size_type perforate_facet(Dart_descriptor dh) { if (this->is_marked(dh, mark_perforated)) { return 0; } @@ -354,7 +354,7 @@ namespace Surface_mesh_topology { /// unmark the facet as being perforated, now the facet is filled /// @return the number of darts of the unmarked face - size_type fill_facet(Dart_handle dh) + size_type fill_facet(Dart_descriptor dh) { if (!this->is_marked(dh, mark_perforated)) { return 0; } @@ -378,7 +378,7 @@ namespace Surface_mesh_topology { } /// @return true iff dh is on a perforated facet - bool is_perforated(Dart_const_handle dh) const + bool is_perforated(Dart_const_descriptor dh) const { return this->is_marked(dh, mark_perforated); } /// same thing but using a label instead of a dart @@ -413,12 +413,12 @@ namespace Surface_mesh_topology { protected: // For each edge label, its corresponding dart. Stores both association // a -a, to allow users to start to add either a or -a. - std::unordered_map edge_label_to_dart; + std::unordered_map edge_label_to_dart; std::size_t mark_perforated; // mark for perforated facets. // Data members used when we create a facet. - Dart_handle first_dart; - Dart_handle prev_dart; + Dart_descriptor first_dart; + Dart_descriptor prev_dart; bool facet_started; }; @@ -435,8 +435,8 @@ namespace Surface_mesh_topology { typedef Combinatorial_map_base<2, Self, Items_, Alloc_, Storage_> CMap_base; typedef Polygonal_schema_base Base; - typedef typename Base::Dart_handle Dart_handle; - typedef typename Base::Dart_const_handle Dart_const_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; + typedef typename Base::Dart_const_descriptor Dart_const_descriptor; Polygonal_schema_with_combinatorial_map() : Base() {} @@ -494,8 +494,8 @@ namespace Surface_mesh_topology { typedef Generalized_map_base<2, Self, Items_, Alloc_, Storage_> GMap_base; typedef Polygonal_schema_base Base; - typedef typename Base::Dart_handle Dart_handle; - typedef typename Base::Dart_const_handle Dart_const_handle; + typedef typename Base::Dart_descriptor Dart_descriptor; + typedef typename Base::Dart_const_descriptor Dart_const_descriptor; Polygonal_schema_with_generalized_map() : Base() {} @@ -578,7 +578,7 @@ namespace Surface_mesh_topology { (random.get_int(1, static_cast(max_dart_per_face))); i(rand()%100) diff --git a/thirdparty/CGAL/include/CGAL/Polygonal_schema_min_items.h b/thirdparty/CGAL/include/CGAL/Polygonal_schema_min_items.h index f47f943a..95def3ab 100644 --- a/thirdparty/CGAL/include/CGAL/Polygonal_schema_min_items.h +++ b/thirdparty/CGAL/include/CGAL/Polygonal_schema_min_items.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_topology/include/CGAL/Polygonal_schema_min_items.h $ -// $Id: Polygonal_schema_min_items.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_topology/include/CGAL/Polygonal_schema_min_items.h $ +// $Id: include/CGAL/Polygonal_schema_min_items.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand diff --git a/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction.h b/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction.h index 05b1ca07..6096a3e4 100644 --- a/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction.h +++ b/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygonal_surface_reconstruction/include/CGAL/Polygonal_surface_reconstruction.h $ -// $Id: Polygonal_surface_reconstruction.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygonal_surface_reconstruction/include/CGAL/Polygonal_surface_reconstruction.h $ +// $Id: include/CGAL/Polygonal_surface_reconstruction.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Liangliang Nan @@ -18,6 +18,10 @@ #include #include #include +#include +#include +#include +#include #include @@ -28,7 +32,7 @@ namespace CGAL { /*! - \ingroup PkgPolygonalSurfaceReconstruction + \ingroup PkgPolygonalSurfaceReconstructionRef \brief @@ -455,7 +459,12 @@ namespace CGAL { // Converts from internal data structure to the required `PolygonMesh`. output_mesh.clear(); // make sure it is empty. - CGAL::copy_face_graph(target_mesh, output_mesh); + std::vector points; + std::vector > polygons; + CGAL::Polygon_mesh_processing::polygon_mesh_to_polygon_soup(target_mesh, points, polygons); + CGAL::Polygon_mesh_processing::merge_duplicate_points_in_polygon_soup(points, polygons); + CGAL::Polygon_mesh_processing::orient_polygon_soup(points, polygons); + CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh(points, polygons, output_mesh); } else { error_message_ = "solving the binary program failed"; diff --git a/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/alpha_shape_mesh.h b/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/alpha_shape_mesh.h index 27ff4773..7c0d6679 100644 --- a/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/alpha_shape_mesh.h +++ b/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/alpha_shape_mesh.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygonal_surface_reconstruction/include/CGAL/Polygonal_surface_reconstruction/internal/alpha_shape_mesh.h $ -// $Id: alpha_shape_mesh.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygonal_surface_reconstruction/include/CGAL/Polygonal_surface_reconstruction/internal/alpha_shape_mesh.h $ +// $Id: include/CGAL/Polygonal_surface_reconstruction/internal/alpha_shape_mesh.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Liangliang Nan diff --git a/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/compute_confidences.h b/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/compute_confidences.h index dad60d6b..41a27c9f 100644 --- a/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/compute_confidences.h +++ b/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/compute_confidences.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygonal_surface_reconstruction/include/CGAL/Polygonal_surface_reconstruction/internal/compute_confidences.h $ -// $Id: compute_confidences.h facabca 2021-09-10T17:47:17+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygonal_surface_reconstruction/include/CGAL/Polygonal_surface_reconstruction/internal/compute_confidences.h $ +// $Id: include/CGAL/Polygonal_surface_reconstruction/internal/compute_confidences.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Liangliang Nan diff --git a/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/hypothesis.h b/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/hypothesis.h index 13bc46dc..1d1cff74 100644 --- a/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/hypothesis.h +++ b/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/hypothesis.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygonal_surface_reconstruction/include/CGAL/Polygonal_surface_reconstruction/internal/hypothesis.h $ -// $Id: hypothesis.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygonal_surface_reconstruction/include/CGAL/Polygonal_surface_reconstruction/internal/hypothesis.h $ +// $Id: include/CGAL/Polygonal_surface_reconstruction/internal/hypothesis.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Liangliang Nan diff --git a/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/parameters.h b/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/parameters.h index 86a2992a..121d6262 100644 --- a/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/parameters.h +++ b/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/parameters.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygonal_surface_reconstruction/include/CGAL/Polygonal_surface_reconstruction/internal/parameters.h $ -// $Id: parameters.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygonal_surface_reconstruction/include/CGAL/Polygonal_surface_reconstruction/internal/parameters.h $ +// $Id: include/CGAL/Polygonal_surface_reconstruction/internal/parameters.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Liangliang Nan diff --git a/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/point_set_with_planes.h b/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/point_set_with_planes.h index 43767842..1e21677a 100644 --- a/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/point_set_with_planes.h +++ b/thirdparty/CGAL/include/CGAL/Polygonal_surface_reconstruction/internal/point_set_with_planes.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygonal_surface_reconstruction/include/CGAL/Polygonal_surface_reconstruction/internal/point_set_with_planes.h $ -// $Id: point_set_with_planes.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygonal_surface_reconstruction/include/CGAL/Polygonal_surface_reconstruction/internal/point_set_with_planes.h $ +// $Id: include/CGAL/Polygonal_surface_reconstruction/internal/point_set_with_planes.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Liangliang Nan @@ -67,6 +67,18 @@ namespace CGAL { delete supporting_plane_; supporting_plane_ = new Plane; CGAL::linear_least_squares_fitting_3(pts.begin(), pts.end(), *supporting_plane_, CGAL::Dimension_tag<0>()); + + // Check orientation + int vote_for_opposite = 0; + for (std::size_t i = 0; i < size(); i++) + if (supporting_plane_->orthogonal_vector() * point_set_->normal_map()[at(i)] < 0) + vote_for_opposite++; + else + vote_for_opposite--; + + if (vote_for_opposite > 0) + *supporting_plane_ = supporting_plane_->opposite(); + return supporting_plane_; } @@ -136,29 +148,23 @@ namespace CGAL { Base_class::resize(points.size()); Base_class::add_normal_map(); - // Gets to know the number of plane from the plane indices - int max_plane_index = 0; - for (typename PointRange::const_iterator it = points.begin(); it != points.end(); ++it) { - int plane_index = get(plane_index_map, *it); - if (plane_index > max_plane_index) - max_plane_index = plane_index; - } - std::size_t num_plane = max_plane_index + 1; // the first one has index 0 - - for (std::size_t i = 0; i < num_plane; ++i) - planar_segments_.push_back(new Planar_segment(this)); + std::map plane_index_remap; + // Gets to know the number of plane from the plane indices std::size_t idx = 0; for (typename PointRange::const_iterator it = points.begin(); it != points.end(); ++it) { Base_class::m_points[idx] = get(point_map, *it); Base_class::m_normals[idx] = get(normal_map, *it); int plane_index = get(plane_index_map, *it); if (plane_index != -1) { - Planar_segment* ps = planar_segments_[plane_index]; - ps->push_back(idx); + auto it_and_bool = plane_index_remap.emplace(plane_index, planar_segments_.size()); + if (it_and_bool.second) { + planar_segments_.push_back(new Planar_segment(this)); + planar_segments_.back()->push_back(idx); + } + else planar_segments_[it_and_bool.first->second]->push_back(idx); } - - ++idx; + idx++; } } diff --git a/thirdparty/CGAL/include/CGAL/PolyhedralSurf_neighbors.h b/thirdparty/CGAL/include/CGAL/PolyhedralSurf_neighbors.h index 76ba418d..c344cc85 100644 --- a/thirdparty/CGAL/include/CGAL/PolyhedralSurf_neighbors.h +++ b/thirdparty/CGAL/include/CGAL/PolyhedralSurf_neighbors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Ridges_3/include/CGAL/PolyhedralSurf_neighbors.h $ -// $Id: PolyhedralSurf_neighbors.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Ridges_3/include/CGAL/PolyhedralSurf_neighbors.h $ +// $Id: include/CGAL/PolyhedralSurf_neighbors.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Pouget and Frédéric Cazals @@ -100,7 +100,7 @@ class T_PolyhedralSurf_neighbors // vertex_neigh stores the vertex v and its 1Ring neighbors contour // stores halfedges, oriented CW, following the 1Ring disk border // OneRingSize is the max distance from v to its OneRing - // neighbors. (the tag is_visited is not mofified) + // neighbors. (the tag is_visited is not modified) void compute_one_ring(const vertex_descriptor v, std::vector &vertex_neigh, std::list &contour, diff --git a/thirdparty/CGAL/include/CGAL/Polyhedral_complex_mesh_domain_3.h b/thirdparty/CGAL/include/CGAL/Polyhedral_complex_mesh_domain_3.h index 5291cafe..0665b0e6 100644 --- a/thirdparty/CGAL/include/CGAL/Polyhedral_complex_mesh_domain_3.h +++ b/thirdparty/CGAL/include/CGAL/Polyhedral_complex_mesh_domain_3.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h $ -// $Id: Polyhedral_complex_mesh_domain_3.h c169c41 2022-01-12T13:33:49+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h $ +// $Id: include/CGAL/Polyhedral_complex_mesh_domain_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -85,64 +85,65 @@ surface, the sub-domain indices on both sides are known. \tparam Polyhedron stands for the type of the input polyhedral surface(s), model of `FaceListGraph`. -\tparam IGT_ stands for a geometric traits class +\tparam IGT stands for a geometric traits class providing the types and functors required to implement the intersection tests and intersection computations for polyhedral boundary surfaces. This parameter has to be instantiated with a model of the concept `IntersectionGeometricTraits_3`. -\cgalModels `MeshDomainWithFeatures_3` +\cgalModels{MeshDomainWithFeatures_3} -\sa `IntersectionGeometricTraits_3` -\sa `CGAL::make_mesh_3()`. -\sa `CGAL::Mesh_domain_with_polyline_features_3` -\sa `CGAL::Polyhedral_mesh_domain_3` -\sa `CGAL::Mesh_polyhedron_3` +\sa `CGAL::make_mesh_3()` +\sa `CGAL::Mesh_domain_with_polyline_features_3` +\sa `CGAL::Polyhedral_mesh_domain_3` +\sa `CGAL::Mesh_polyhedron_3` */ +#ifdef DOXYGEN_RUNNING +template < class IGT, + class Polyhedron = typename Mesh_polyhedron_3::type> +class Polyhedral_complex_mesh_domain_3 + : public Mesh_domain_with_polyline_features_3< + Polyhedral_mesh_domain_3 > +#else template < class IGT_, class Polyhedron_ = typename Mesh_polyhedron_3::type, - class TriangleAccessor=CGAL::Default - > + class TriangleAccessor = CGAL::Default> class Polyhedral_complex_mesh_domain_3 : public Mesh_domain_with_polyline_features_3< Polyhedral_mesh_domain_3< Polyhedron_, IGT_, - CGAL::Default, - int, //Use_patch_id_tag - Tag_true > >//Use_exact_intersection_tag + TriangleAccessor, + int, // Use_patch_id_tag + Tag_true > >// Use_exact_intersection_tag +#endif { public: - /// The base class + // The base class typedef Polyhedron_ Polyhedron; typedef Mesh_domain_with_polyline_features_3< - Polyhedral_mesh_domain_3< - Polyhedron, IGT_, CGAL::Default, - int, Tag_true > > Base; - /// @cond DEVELOPERS + Polyhedral_mesh_domain_3< + Polyhedron, IGT_, TriangleAccessor, int, Tag_true > > Base; + private: - typedef IGT_ IGT; + /// @cond DEVELOPERS typedef Polyhedral_mesh_domain_3 BaseBase; typedef Polyhedral_complex_mesh_domain_3 Self; /// @endcond public: - /*! - Numerical type. - */ + // Numerical type typedef typename Base::FT FT; - /// The polyhedron type + // The polyhedron type typedef Polyhedron Polyhedron_type; - /// \name Index types - /// @{ - /// The types are `int` or types compatible with `int`. + // The types are `int` or types compatible with `int`. typedef typename Base::Corner_index Corner_index; typedef typename Base::Curve_index Curve_index; typedef typename Base::Surface_patch_index Surface_patch_index; typedef typename Base::Subdomain_index Subdomain_index; - /// @} /// @cond DEVELOPERS typedef typename Base::Ray_3 Ray_3; @@ -154,6 +155,7 @@ class Polyhedral_complex_mesh_domain_3 typedef typename Base::AABB_primitive AABB_primitive; typedef typename Base::AABB_primitive_id AABB_primitive_id; typedef typename Base::Surface_patch_index Patch_id; + // Backward compatibility #ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX typedef Surface_patch_index Surface_index; @@ -178,15 +180,18 @@ class Polyhedral_complex_mesh_domain_3 boost::setS, // this avoids parallel edges boost::vecS, boost::undirectedS, - typename IGT::Point_3, + typename IGT_::Point_3, Set_of_indices> Featured_edges_copy_graph; /// @endcond public: - /// Constructor - /*! Constructs a domain defined by a set of polyhedral surfaces, - describing a polyhedral complex. + /// \name Creation + /// @{ + + /*! + constructs a domain defined by a set of polyhedral surfaces, describing a polyhedral complex. + @param begin first iterator on the input polyhedral surfaces @param end past the end iterator on the input polyhedral surfaces @param indices_begin first iterator on the pairs of subdomain indices @@ -206,15 +211,14 @@ class Polyhedral_complex_mesh_domain_3 */ template - Polyhedral_complex_mesh_domain_3 - ( InputPolyhedraIterator begin, - InputPolyhedraIterator end, - InputPairOfSubdomainIndicesIterator indices_begin, - InputPairOfSubdomainIndicesIterator indices_end + Polyhedral_complex_mesh_domain_3(InputPolyhedraIterator begin, + InputPolyhedraIterator end, + InputPairOfSubdomainIndicesIterator indices_begin, + InputPairOfSubdomainIndicesIterator indices_end #ifndef DOXYGEN_RUNNING - , CGAL::Random* p_rng = nullptr + , CGAL::Random* p_rng = nullptr #endif - ) + ) : Base(p_rng) , patch_indices(indices_begin, indices_end) , borders_detected_(false) @@ -246,7 +250,10 @@ class Polyhedral_complex_mesh_domain_3 this->build(); } + /// @} + /// @cond DEVELOPERS + Polyhedral_complex_mesh_domain_3 ( CGAL::Random* p_rng = nullptr @@ -258,17 +265,15 @@ class Polyhedral_complex_mesh_domain_3 const std::vector& polyhedra() const { return stored_polyhedra; } - /// @endcond - /// @cond DEVELOPERS /*! * construct_initial_points_object() is one of the very first functions called - * when make_mesh_3 starts + * when make_mesh_3 starts. * BEFORE make_mesh_3 starts, we have to make sure that (at least) the borders have * been detected, and the polyhedral complex internal data structures initialized * So, this function is overloaded to make sure they are (checking that - * borders_detected_ is false is enough) - * Then, call the base class function + * borders_detected_ is false is enough). + * Then, call the base class function. */ typename BaseBase::Construct_initial_points construct_initial_points_object() const { @@ -281,9 +286,13 @@ class Polyhedral_complex_mesh_domain_3 void detect_features(FT angle_in_degree, std::vector& p, const bool dont_protect);//if true, features will not be protected + + void detect_borders(std::vector& p, const bool dont_protect); + /// @endcond + /*! - Detects sharp features and boundaries of the polyhedral components of the complex + detects sharp features and boundaries of the polyhedral components of the complex (including potential internal polyhedra), and inserts them as features of the domain. `angle_bound` gives the maximum angle (in degrees) between the two normal vectors of adjacent triangles. @@ -295,13 +304,10 @@ class Polyhedral_complex_mesh_domain_3 detect_features(angle_bound, stored_polyhedra, false/*do protect*/); } - /// @cond DEVELOPERS - void detect_borders(std::vector& p, const bool dont_protect); - /// @endcond /*! - Detects border edges of the polyhedral components of the complex, + detects border edges of the polyhedral components of the complex, and inserts them as features of the domain. - This function should be called alone only, and not before or after `detect_features()`. + This function should only be called alone, and not before or after `detect_features()`. */ void detect_borders() { detect_borders(stored_polyhedra, false/*do protect*/); @@ -365,11 +371,10 @@ class Polyhedral_complex_mesh_domain_3 this->boundary_polyhedra_ids.push_back(poly_id); } } - /// @endcond - /// @cond DEVELOPERS template - void add_vertices_to_c3t3_on_patch_without_feature_edges(C3t3& c3t3) const { + void add_vertices_to_c3t3_on_patch_without_feature_edges(C3t3& c3t3) const + { #ifdef CGAL_MESH_3_VERBOSE std::cout << "add_vertices_to_c3t3_on_patch_without_feature_edges..."; std::cout.flush(); @@ -378,7 +383,7 @@ class Polyhedral_complex_mesh_domain_3 typedef typename C3t3::Triangulation Tr; typedef typename Tr::Weighted_point Weighted_point; - typedef typename IGT::Sphere_3 Sphere_3; + typedef typename IGT_::Sphere_3 Sphere_3; typedef typename Polyhedron::Vertex_const_handle Vertex_const_handle; Tr& tr = c3t3.triangulation(); @@ -456,9 +461,9 @@ class Polyhedral_complex_mesh_domain_3 // here we have a new free vertex on patch #`patch_id` if(random.uniform_smallint( - boost::uint32_t(0), - boost::uint32_t(nb_of_free_vertices_on_patch[patch_id])) - < boost::uint32_t(needed_vertices_on_patch[patch_id])) + std::uint32_t(0), + std::uint32_t(nb_of_free_vertices_on_patch[patch_id])) + < std::uint32_t(needed_vertices_on_patch[patch_id])) { several_vertices_on_patch[patch_id].push_back(vit); --needed_vertices_on_patch[patch_id]; @@ -519,13 +524,13 @@ class Polyhedral_complex_mesh_domain_3 Is_in_domain(const Polyhedral_complex_mesh_domain_3& domain) : r_domain_(domain) {} - boost::optional shoot_a_ray_1(const Ray_3 ray) const { + std::optional shoot_a_ray_1(const Ray_3 ray) const { return r_domain_.bounding_aabb_tree_ptr()-> first_intersected_primitive(ray); } - -#if USE_ALL_INTERSECTIONS - boost::optional shoot_a_ray_2(const Ray_3 ray) const { +#define CGAL_USE_ALL_INTERSECTIONS 0 +#if CGAL_USE_ALL_INTERSECTIONS + std::optional shoot_a_ray_2(const Ray_3& ray) const { const Point_3& p = ray.source(); typedef typename AABB_tree:: template Intersection_and_primitive_id::Type Inter_and_prim; @@ -533,25 +538,25 @@ class Polyhedral_complex_mesh_domain_3 r_domain_.bounding_aabb_tree_ptr()-> all_intersections(ray, std::back_inserter(all_intersections)); if(all_intersections.empty()) - return boost::none; + return std::nullopt; else { for(const Inter_and_prim& i_p: all_intersections) { - if(boost::get( &i_p.first) == 0) return AABB_primitive_id(); + if(std::get_if( &i_p.first) == 0) return AABB_primitive_id(); } auto it = std::min_element (all_intersections.begin(), all_intersections.end(), [p](const Inter_and_prim& a, const Inter_and_prim& b) { - const Point_3& pa = boost::get(a.first); - const Point_3& pb = boost::get(b.first); + const Point_3& pa = std::get(a.first); + const Point_3& pb = std::get(b.first); return compare_distance_to_point(p, pa, pb) == CGAL::SMALLER; }); return it->second; } } -#endif // USE_ALL_INTERSECTIONS +#endif // CGAL_USE_ALL_INTERSECTIONS Subdomain operator()(const Point_3& p) const { if(r_domain_.bounding_aabb_tree_ptr() == 0) return Subdomain(); @@ -565,23 +570,22 @@ class Polyhedral_complex_mesh_domain_3 } // Shoot ray - typename IGT::Construct_ray_3 ray = IGT().construct_ray_3_object(); - typename IGT::Construct_vector_3 vector = IGT().construct_vector_3_object(); + typename IGT_::Construct_ray_3 ray = IGT_().construct_ray_3_object(); + typename IGT_::Construct_vector_3 vector = IGT_().construct_vector_3_object(); while(true) { Random_points_on_sphere_3 random_point(1.); const Ray_3 ray_shot = ray(p, vector(CGAL::ORIGIN,*random_point)); -#define USE_ALL_INTERSECTIONS 0 -#if USE_ALL_INTERSECTIONS - boost::optional opt = shoot_a_ray_2(ray_shot); +#if CGAL_USE_ALL_INTERSECTIONS + std::optional opt = shoot_a_ray_2(ray_shot); #else // first_intersected_primitive - boost::optional opt = shoot_a_ray_1(ray_shot); + std::optional opt = shoot_a_ray_1(ray_shot); #endif // first_intersected_primitive // for(int i = 0; i < 20; ++i) { // const Ray_3 ray_shot2 = ray(p, vector(CGAL::ORIGIN,*random_point)); - // boost::optional opt2 = shoot_a_ray_1(ray_shot2); + // std::optional opt2 = shoot_a_ray_1(ray_shot2); // if(opt != opt2) { // if(!opt && *opt2 == 0) continue; // if(!opt2 && *opt == 0) continue; @@ -598,7 +602,7 @@ class Polyhedral_complex_mesh_domain_3 Surface_patch_index face_id = r_domain_.make_surface_index(*opt); const std::pair& pair = r_domain_.incident_subdomains_indices(face_id); - const typename IGT::Triangle_3 triangle = + const typename IGT_::Triangle_3 triangle = BaseBase::template Primitive_type::datum(*opt); const Point_3& a = triangle[0]; const Point_3& b = triangle[1]; @@ -612,7 +616,11 @@ class Polyhedral_complex_mesh_domain_3 return pair.second == 0 ? Subdomain() : Subdomain(Subdomain_index(pair.second)); - default: /* COPLANAR */ continue; // loop + default: /* COPLANAR */ + if (!triangle.has_on(p)) + continue; // loop + else + return Subdomain(Subdomain_index((std::max)(pair.first,pair.second))); // make a canonical choice } // end switch on the orientation } // opt } // end while(true) @@ -723,7 +731,7 @@ detect_features(FT angle_in_degree, G_copy g_copy; typedef typename boost::graph_traits::vertex_descriptor graph_vertex_descriptor; - typedef std::map P2vmap; // TODO: replace this map by and unordered_map P2vmap p2vmap; @@ -884,7 +892,7 @@ merge_duplicated_points(const PointSet& duplicated_points) typename Union_find_t::handle first_handle = handles[range_begin->second]; // In a second loop on the equal-range, update new_ids around p - for (it = boost::next(range_begin); it != range_end; ++it) + for (it = std::next(range_begin); it != range_end; ++it) { #if CGAL_MESH_3_VERBOSE > 10 std::cerr << " - #" << it->second << "\n"; @@ -989,6 +997,8 @@ add_featured_edges_to_graph(const Polyhedron_type& p, g_copy[pair.first].insert(get(fpm, face(he,p))); } } + else + std::cout << "self loop ignored at point " << get(vpm, source(e, graph)) << std::endl; } #if CGAL_MESH_3_PROTECTION_DEBUG & 2 diff --git a/thirdparty/CGAL/include/CGAL/Polyhedral_envelope.h b/thirdparty/CGAL/include/CGAL/Polyhedral_envelope.h index f25d4e8d..f15602fb 100644 --- a/thirdparty/CGAL/include/CGAL/Polyhedral_envelope.h +++ b/thirdparty/CGAL/include/CGAL/Polyhedral_envelope.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h $ -// $Id: Polyhedral_envelope.h 9159816 2022-12-07T08:02:35+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h $ +// $Id: include/CGAL/Polyhedral_envelope.h a484bfa $ // SPDX-License-Identifier: ( GPL-3.0-or-later OR LicenseRef-Commercial ) AND MIT // // Author(s) : Andreas Fabri @@ -194,7 +194,7 @@ struct Polyhedral_envelope { template Plane(const Point& p, const Point& q, const Point& r, - typename std::enable_if::value>::type* = 0) + std::enable_if_t::value>* = 0) : ep(p.x(),p.y(),p.z()), eq(q.x(),q.y(),q.z()), er(r.x(),r.y(),r.z()), eplane(ep,eq,er) {} ePoint_3 ep, eq, er; @@ -358,7 +358,7 @@ struct Polyhedral_envelope { * \cgalParamNEnd * \cgalNamedParamsEnd * - * \note The triangle mesh gets copied internally, that is it can be modifed after having passed as argument, + * \note The triangle mesh gets copied internally, that is it can be modified after having passed as argument, * while the queries are performed */ template @@ -458,7 +458,7 @@ struct Polyhedral_envelope { * \cgalParamNEnd * \cgalNamedParamsEnd * - * \note The triangle mesh gets copied internally, that is it can be modifed after having passed as argument, + * \note The triangle mesh gets copied internally, that is it can be modified after having passed as argument, * while the queries are performed */ template @@ -467,7 +467,7 @@ struct Polyhedral_envelope { double epsilon, const NamedParameters& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename std::enable_if::value>::type* = 0 + , std::enable_if_t::value>* = 0 #endif ) { @@ -572,7 +572,7 @@ struct Polyhedral_envelope { double epsilon, const NamedParameters& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename std::enable_if::value>::type* = 0 + , std::enable_if_t::value>* = 0 #endif ) { @@ -825,7 +825,7 @@ struct Polyhedral_envelope { for (unsigned int i = 0; i < cutp.size(); i++){ const Plane& plane_i = prism[cutp[i]]; - boost::optional op = intersection_point_for_polyhedral_envelope(line, plane_i.eplane); + std::optional op = intersection_point_for_polyhedral_envelope(line, plane_i.eplane); if(! op){ std::cout << "there must be an intersection 2" << std::endl; } @@ -950,7 +950,7 @@ struct Polyhedral_envelope { } for (unsigned int j = 0; j < cidl.size(); j++) { - boost::optional op = intersection_point_for_polyhedral_envelope(line, + std::optional op = intersection_point_for_polyhedral_envelope(line, halfspace[prismindex[queue[i]]][cidl[j]].eplane); const ePoint_3& ip = *op; inter = Implicit_Seg_Facet_interpoint_Out_Prism_return_local_id @@ -1032,7 +1032,7 @@ struct Polyhedral_envelope { bool - is_two_facets_neighbouring(const unsigned int & pid, const unsigned int &i, const unsigned int &j)const + is_two_facets_neighboring(const unsigned int & pid, const unsigned int &i, const unsigned int &j)const { std::size_t facesize = halfspace[pid].size(); if (i == j) return false; @@ -1046,6 +1046,9 @@ struct Polyhedral_envelope { if (j == 2 && i == facesize - 1) return true; return false; } + CGAL_DEPRECATED bool + is_two_facets_neighbouring(const unsigned int & pid, const unsigned int &i, const unsigned int &j)const + { return is_two_facets_neighboring(pid, i, j); } int @@ -1139,7 +1142,7 @@ struct Polyhedral_envelope { const Plane& plane_i = prism[cutp[i]]; const eLine_3& eline = *(seg[k]); - boost::optional op = intersection_point_for_polyhedral_envelope(eline, plane_i.eplane); + std::optional op = intersection_point_for_polyhedral_envelope(eline, plane_i.eplane); if(! op){ #ifdef CGAL_ENVELOPE_DEBUG std::cout << "there must be an intersection 6" << std::endl; @@ -1187,7 +1190,7 @@ struct Polyhedral_envelope { continue; if (true /* USE_ADJACENT_INFORMATION*/ ) { - bool neib = is_two_facets_neighbouring(cindex, cutp[i], cutp[j]); + bool neib = is_two_facets_neighboring(cindex, cutp[i], cutp[j]); if (neib == false) continue; } @@ -1224,7 +1227,7 @@ struct Polyhedral_envelope { } - boost::optional ipp = intersection_point_for_polyhedral_envelope(tri_eplane, prism[cutp[i]].eplane, prism[cutp[j]].eplane); + std::optional ipp = intersection_point_for_polyhedral_envelope(tri_eplane, prism[cutp[i]].eplane, prism[cutp[j]].eplane); if(ipp){ inter = is_3_triangle_cut_float_fast(etri0, etri1, etri2, n, @@ -1295,7 +1298,7 @@ struct Polyhedral_envelope { const int &prismid, const unsigned int &faceid)const { for (unsigned int i = 0; i < halfspace[prismid].size(); i++) { - /*bool neib = is_two_facets_neighbouring(prismid, i, faceid);// this works only when the polyhedron is convex and no two neighbour facets are coplanar + /*bool neib = is_two_facets_neighboring(prismid, i, faceid);// this works only when the polyhedron is convex and no two neighbor facets are coplanar if (neib == false) continue;*/ if (i == faceid) continue; if(oriented_side(halfspace[prismid][i].eplane, ip) == ON_POSITIVE_SIDE){ @@ -1664,7 +1667,7 @@ struct Polyhedral_envelope { if (!cut) continue; for (unsigned int j = 0; j < cidl.size(); j++) { - boost::optional op = intersection_point_for_polyhedral_envelope(eline, + std::optional op = intersection_point_for_polyhedral_envelope(eline, halfspace[prismindex[queue[i]]][cidl[j]].eplane); const ePoint_3& ip = *op; inter = Implicit_Seg_Facet_interpoint_Out_Prism_return_local_id(ip, idlist, jump1, check_id); @@ -1722,11 +1725,11 @@ struct Polyhedral_envelope { idlist.emplace_back(filtered_intersection[queue[0]]);// idlist contains the id in prismid//it is fine maybe it is not really intersected coverlist[queue[0]] = 1 ;//when filtered_intersection[i] is already in the cover list, coverlist[i]=true - std::vector neighbours;//local id + std::vector neighbors;//local id std::vector list; - std::vector*> neighbour_facets; + std::vector*> neighbor_facets; std::vector> idlistorder; - std::vector neighbour_cover; + std::vector neighbor_cover; idlistorder.emplace_back(intersect_face[queue[0]]); for (unsigned int i = 0; i < queue.size(); i++) { @@ -1748,7 +1751,7 @@ struct Polyhedral_envelope { } // now we know that there exists an intesection point - boost::optional op = intersection_point_for_polyhedral_envelope(eline, + std::optional op = intersection_point_for_polyhedral_envelope(eline, halfspace[filtered_intersection[queue[i]]][intersect_face[queue[i]][j]].eplane); const ePoint_3& ip = *op; @@ -1810,14 +1813,14 @@ struct Polyhedral_envelope { localtree.all_intersected_primitives(bounding_boxes[jump1], std::back_inserter(list)); - neighbours.resize(list.size()); - neighbour_facets.resize(list.size()); - neighbour_cover.resize(list.size()); + neighbors.resize(list.size()); + neighbor_facets.resize(list.size()); + neighbor_cover.resize(list.size()); for (unsigned int j = 0; j < list.size(); j++) { - neighbours[j] = filtered_intersection[list[j]]; - neighbour_facets[j] = &(intersect_face[list[j]]); - if (coverlist[list[j]] == 1) neighbour_cover[j] = 1; - else neighbour_cover[j] = 0; + neighbors[j] = filtered_intersection[list[j]]; + neighbor_facets[j] = &(intersect_face[list[j]]); + if (coverlist[list[j]] == 1) neighbor_cover[j] = 1; + else neighbor_cover[j] = 0; } for (unsigned int j = 0; j < i; j++) { @@ -1831,7 +1834,7 @@ struct Polyhedral_envelope { // We moved the intersection here // In case there is no intersection point we continue - boost::optional + std::optional op = intersection_point_for_polyhedral_envelope(etriangle_eplane, halfspace[jump1][intersect_face[queue[i]][k]].eplane, halfspace[jump2][intersect_face[queue[j]][h]].eplane); @@ -1864,7 +1867,7 @@ struct Polyhedral_envelope { if (inter == 1) { - inter = Implicit_Tri_Facet_Facet_interpoint_Out_Prism_return_local_id_with_face_order_jump_over(ip, neighbours, neighbour_facets, neighbour_cover, jump1, jump2, check_id); + inter = Implicit_Tri_Facet_Facet_interpoint_Out_Prism_return_local_id_with_face_order_jump_over(ip, neighbors, neighbor_facets, neighbor_cover, jump1, jump2, check_id); if (inter == 1) { @@ -2110,7 +2113,7 @@ struct Polyhedral_envelope { } ePoint_3 origin(env_vertices[env_faces[i][0]].x(), env_vertices[env_faces[i][0]].y(),env_vertices[env_faces[i][0]].z()); Surface_mesh esm; - halfspace_intersection_3(eplanes.begin(),eplanes.end(),esm , boost::make_optional(origin)); + halfspace_intersection_3(eplanes.begin(),eplanes.end(),esm , std::make_optional(origin)); copy_face_graph(esm,sm); } @@ -2234,7 +2237,7 @@ struct Polyhedral_envelope { operator()(const TriangleMesh& tmesh, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename std::enable_if::value>::type* = 0 + , std::enable_if_t::value>* = 0 #endif ) const { @@ -2326,7 +2329,7 @@ struct Polyhedral_envelope { bool operator()(const TriangleRange& triangle_range #ifndef DOXYGEN_RUNNING - , typename std::enable_if::value>::type* = 0 + , std::enable_if_t::value>* = 0 #endif ) const { diff --git a/thirdparty/CGAL/include/CGAL/Polyhedral_mesh_domain_3.h b/thirdparty/CGAL/include/CGAL/Polyhedral_mesh_domain_3.h index fb5b63e0..cd586a60 100644 --- a/thirdparty/CGAL/include/CGAL/Polyhedral_mesh_domain_3.h +++ b/thirdparty/CGAL/include/CGAL/Polyhedral_mesh_domain_3.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h $ -// $Id: Polyhedral_mesh_domain_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h $ +// $Id: include/CGAL/Polyhedral_mesh_domain_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -36,15 +36,13 @@ #include #include -#include +#include #include -#include #include #include #include -#include #include -#include +#include #include #include @@ -52,6 +50,7 @@ #include #include #include +#include #ifdef CGAL_LINKED_WITH_TBB # include @@ -59,9 +58,9 @@ // To handle I/O for Surface_patch_index if that is a pair of `int` (the // default) -#include +#include -#include +#include namespace CGAL { @@ -80,41 +79,71 @@ max_length(const Bbox_3& b) // ----------------------------------- // Geometric traits generator // ----------------------------------- -template < typename Gt, +template < typename GT, typename Use_exact_intersection_construction_tag > struct IGT_generator {}; -template < typename Gt > -struct IGT_generator +template < typename GT > +struct IGT_generator { #ifdef CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS - typedef CGAL::Mesh_3::Robust_intersection_traits_3_new type; + typedef CGAL::Mesh_3::Robust_intersection_traits_3_new type; #else // NOT CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS - typedef CGAL::Mesh_3::Robust_intersection_traits_3 type; + typedef CGAL::Mesh_3::Robust_intersection_traits_3 type; #endif // NOT CGAL_MESH_3_NEW_ROBUST_INTERSECTION_TRAITS typedef type Type; }; -template < typename Gt > -struct IGT_generator +template < typename GT > +struct IGT_generator { - typedef Gt type; + typedef GT type; typedef type Type; }; } // end namespace details } // end namespace Mesh_3 -/** - * @class Polyhedral_mesh_domain_3 - * - * - */ -template +#else // DOXYGEN_RUNNING +template +#endif // DOXYGEN_RUNNING class Polyhedral_mesh_domain_3 { public: @@ -124,7 +153,7 @@ class Polyhedral_mesh_domain_3 typedef Patch_id_ Patch_id; - /// Geometric object types + // Geometric object types typedef typename IGT::Point_3 Point_3; typedef typename IGT::Segment_3 Segment_3; typedef typename IGT::Ray_3 Ray_3; @@ -135,25 +164,25 @@ class Polyhedral_mesh_domain_3 //------------------------------------------------------- // Index Types //------------------------------------------------------- - /// Type of indexes for cells of the input complex + // Type of indexes for cells of the input complex typedef int Subdomain_index; - typedef boost::optional Subdomain; + typedef std::optional Subdomain; - /// Type of indexes for surface patch of the input complex + // Type of indexes for surface patch of the input complex typedef typename boost::property_map >::type Face_patch_id_pmap; typedef typename boost::property_traits< Face_patch_id_pmap>::value_type Surface_patch_index; - typedef boost::optional Surface_patch; - /// Type of indexes to characterize the lowest dimensional face of the input - /// complex on which a vertex lie + typedef std::optional Surface_patch; + + // Type of indexes to characterize the lowest dimensional face of the input + // complex on which a vertex lie typedef typename Mesh_3::internal::Index_generator< Subdomain_index, Surface_patch_index>::type Index; typedef std::tuple Intersection; - typedef typename IGT::FT FT; // Kernel_traits compatibility @@ -191,15 +220,13 @@ class Polyhedral_mesh_domain_3 Default, Ins_fctor_AABB_tree> Inside_functor; typedef typename Inside_functor::AABB_tree AABB_tree_; - BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((std::is_same::value)); typedef typename AABB_tree_::AABB_traits AABB_traits; typedef typename AABB_tree_::Primitive AABB_primitive; typedef typename AABB_tree_::Primitive_id AABB_primitive_id; typedef typename AABB_traits::Bounding_box Bounding_box; public: - - /// Default constructor Polyhedral_mesh_domain_3(CGAL::Random* p_rng = nullptr) : tree_() , bounding_tree_(&tree_) @@ -207,27 +234,43 @@ class Polyhedral_mesh_domain_3 { } - /** - * @brief Constructor. Contruction from a polyhedral surface - * @param polyhedron the polyhedron describing the polyhedral surface - */ - Polyhedral_mesh_domain_3(const Polyhedron& p, - CGAL::Random* p_rng = nullptr) + /// \name Creation + /// @{ + + /*! + Construction from a bounding polyhedral surface which must be closed, and free of intersections. + The inside of `bounding_polyhedron` will be meshed. + */ + Polyhedral_mesh_domain_3(const Polyhedron& bounding_polyhedron +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : tree_() , bounding_tree_(&tree_) // the bounding tree is tree_ , p_rng_(p_rng) { - this->add_primitives(p); - if(! is_triangle_mesh(p)) { + this->add_primitives(bounding_polyhedron); + if(! is_triangle_mesh(bounding_polyhedron)) { std::cerr << "Your input polyhedron must be triangulated!\n"; CGAL_error_msg("Your input polyhedron must be triangulated!"); } this->build(); } + /*! + Construction from a polyhedral surface, and a bounding polyhedral surface. + The first polyhedron must be entirely included inside `bounding_polyhedron`, which must be closed + and free of intersections. + Using this constructor enables to mesh a polyhedral surface which is not closed, or has holes. + The inside of `bounding_polyhedron` will be meshed. + */ Polyhedral_mesh_domain_3(const Polyhedron& p, - const Polyhedron& bounding_polyhedron, - CGAL::Random* p_rng = nullptr) + const Polyhedron& bounding_polyhedron +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : tree_() , bounding_tree_(new AABB_tree_) , p_rng_(p_rng) @@ -242,22 +285,25 @@ class Polyhedral_mesh_domain_3 this->build(); } - /** - * Constructor. - * + /*! * Constructor from a sequence of polyhedral surfaces, and a bounding * polyhedral surface. * - * @param InputPolyhedraPtrIterator must an iterator of a sequence of - * pointers to polyhedra + * @tparam InputPolyhedraPtrIterator must be a model of + * `ForwardIterator` and value type `Polyhedron*` * - * @param bounding_polyhedron reference to the bounding surface + * @param begin iterator for a sequence of pointers to polyhedra + * @param end iterator for a sequence of pointers to polyhedra + * @param bounding_polyhedron the bounding surface */ template Polyhedral_mesh_domain_3(InputPolyhedraPtrIterator begin, InputPolyhedraPtrIterator end, - const Polyhedron& bounding_polyhedron, - CGAL::Random* p_rng = nullptr) + const Polyhedron& bounding_polyhedron +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : p_rng_(p_rng) , delete_rng_(false) { @@ -275,20 +321,24 @@ class Polyhedral_mesh_domain_3 this->build(); } - /** - * Constructor. - * - * Constructor from a sequence of polyhedral surfaces, without bounding - * surface. The domain will always answer false to "is_in_domain" + /*! + * Constructor from a sequence of polyhedral surfaces, without a bounding + * surface. The domain will always answer `false` to `is_in_domain()` * queries. * - * @param InputPolyhedraPtrIterator must an iterator of a sequence of - * pointers to polyhedra + * @tparam InputPolyhedraPtrIterator must be a model of + * `ForwardIterator` and value type `Polyhedron*` + * + * @param begin iterator for a sequence of pointers to polyhedra + * @param end iterator for a sequence of pointers to polyhedra */ template - Polyhedral_mesh_domain_3(InputPolyhedraPtrIterator begin, - InputPolyhedraPtrIterator end, - CGAL::Random* p_rng = nullptr) + Polyhedral_mesh_domain_3(InputPolyhedraPtrIterator begin + , InputPolyhedraPtrIterator end +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : p_rng_(p_rng) { if(begin != end) { @@ -300,7 +350,9 @@ class Polyhedral_mesh_domain_3 bounding_tree_ = 0; } - /// Destructor + /// @} + + // Destructor ~Polyhedral_mesh_domain_3() { if(bounding_tree_ != 0 && bounding_tree_ != &tree_) { delete bounding_tree_; @@ -312,9 +364,9 @@ class Polyhedral_mesh_domain_3 } /** - * Constructs a set of \ccc{n} points on the surface, and output them to - * the output iterator \ccc{pts} whose value type is required to be - * \ccc{std::pair}. + * constructs a set of `n` points on the surface, and output them to + * the output iterator `pts` whose value type is required to be + * `std::pair`. */ struct Construct_initial_points { @@ -343,9 +395,9 @@ class Polyhedral_mesh_domain_3 /** - * Returns true if point~\ccc{p} is in the domain. If \ccc{p} is in the + * Returns true if point `p` is in the domain. If `p` is in the * domain, the parameter index is set to the index of the subdomain - * including $p$. It is set to the default value otherwise. + * including `p`. It is set to the default value otherwise. */ struct Is_in_domain { @@ -364,16 +416,16 @@ class Polyhedral_mesh_domain_3 return tree_.closest_point(p); } - /// Allowed query types + // Allowed query types typedef boost::mpl::vector Allowed_query_types; /** - * Returns true is the element \ccc{type} intersect properly any of the - * surface patches describing the either the domain boundary or some + * Returns `true` if the element `type` intersects properly any of the + * surface patches describing either the domain boundary or some * subdomain boundary. - * \ccc{Type} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}. + * `Type` is either `Segment_3`, `Ray_3` or `Line_3`. * Parameter index is set to the index of the intersected surface patch - * if \ccc{true} is returned and to the default \ccc{Surface_patch_index} + * if `true` is returned and to the default `Surface_patch_index` * value otherwise. */ struct Do_intersect_surface @@ -382,14 +434,14 @@ class Polyhedral_mesh_domain_3 : r_domain_(domain) {} template - typename boost::enable_if::type, - Surface_patch>::type + typename std::enable_if_t::value, + Surface_patch> operator()(const Query& q) const { CGAL_MESH_3_PROFILER(std::string("Mesh_3 profiler: ") + std::string(CGAL_PRETTY_FUNCTION)); - boost::optional primitive_id = r_domain_.tree_.any_intersected_primitive(q); + std::optional primitive_id = r_domain_.tree_.any_intersected_primitive(q); if ( primitive_id ) { r_domain_.cache_primitive(q, *primitive_id); @@ -409,12 +461,12 @@ class Polyhedral_mesh_domain_3 } /** - * Returns a point in the intersection of the primitive \ccc{type} + * Returns a point in the intersection of the primitive `type` * with some boundary surface. - * \ccc{Type1} is either \ccc{Segment_3}, \ccc{Ray_3} or \ccc{Line_3}. - * The integer \ccc{dimension} is set to the dimension of the lowest + * `Type1` is either `Segment_3`, `Ray_3` or `Line_3`. + * The integer `dimension` is set to the dimension of the lowest * dimensional face in the input complex containing the returned point, and - * \ccc{index} is set to the index to be stored at a mesh vertex lying + * `index` is set to the index to be stored at a mesh vertex lying * on this face. */ struct Construct_intersection @@ -423,15 +475,15 @@ class Polyhedral_mesh_domain_3 : r_domain_(domain) {} template - typename boost::enable_if::type, - Intersection>::type + typename std::enable_if_t::value, + Intersection> operator()(const Query& q) const { CGAL_MESH_3_PROFILER(std::string("Mesh_3 profiler: ") + std::string(CGAL_PRETTY_FUNCTION)); typedef typename AABB_tree_::template Intersection_and_primitive_id::Type Intersection_and_primitive_id; - typedef boost::optional AABB_intersection; + typedef std::optional AABB_intersection; typedef Point_3 Bare_point; AABB_intersection intersection; @@ -448,7 +500,7 @@ class Polyhedral_mesh_domain_3 { #ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 CGAL_precondition(r_domain_.do_intersect_surface_object()(q) - != boost::none); + != std::nullopt); #endif // NOT CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 intersection = r_domain_.tree_.any_intersection(q); @@ -460,7 +512,7 @@ class Polyhedral_mesh_domain_3 // intersection may be either a point or a segment if ( const Bare_point* p_intersect_pt = - boost::get( &(intersection->first) ) ) + std::get_if( &(intersection->first) ) ) { return Intersection(*p_intersect_pt, r_domain_.index_from_surface_patch_index( @@ -468,7 +520,7 @@ class Polyhedral_mesh_domain_3 2); } else if ( const Segment_3* p_intersect_seg = - boost::get(&(intersection->first))) + std::get_if(&(intersection->first))) { CGAL_MESH_3_PROFILER("Mesh_3 profiler: Intersection is a segment"); @@ -517,31 +569,31 @@ class Polyhedral_mesh_domain_3 /** * Returns the index to be stored in a vertex lying on the surface identified - * by \c index. + * by `index`. */ Index index_from_surface_patch_index(const Surface_patch_index& index) const { return Index(index); } /** * Returns the index to be stored in a vertex lying in the subdomain - * identified by \c index. + * identified by `index`. */ Index index_from_subdomain_index(const Subdomain_index& index) const { return Index(index); } /** - * Returns the \c Surface_patch_index of the surface patch - * where lies a vertex with dimension 2 and index \c index. + * Returns the `Surface_patch_index` of the surface patch + * where lies a vertex with dimension 2 and index `index`. */ Surface_patch_index surface_patch_index(const Index& index) const - { return boost::get(index); } + { return std::get(index); } /** * Returns the index of the subdomain containing a vertex - * with dimension 3 and index \c index. + * with dimension 3 and index `index`. */ Subdomain_index subdomain_index(const Index& index) const - { return boost::get(index); } + { return std::get(index); } // ----------------------------------- // Backward Compatibility @@ -608,7 +660,7 @@ class Polyhedral_mesh_domain_3 AABB_tree_* bounding_tree_; // cache queries and intersected primitive - typedef typename boost::make_variant_over::type Cached_query; + typedef std::variant Cached_query; struct Query_cache { Query_cache() : has_cache(false) {} @@ -692,13 +744,14 @@ Construct_initial_points::operator()(OutputIterator pts, typename IGT::Construct_vector_3 vector = IGT().construct_vector_3_object(); const Bounding_box bbox = r_domain_.tree_.bbox(); - const Point_3 center( FT( (bbox.xmin() + bbox.xmax()) / 2), - FT( (bbox.ymin() + bbox.ymax()) / 2), - FT( (bbox.zmin() + bbox.zmax()) / 2) ); + Point_3 center( FT( (bbox.xmin() + bbox.xmax()) / 2), + FT( (bbox.ymin() + bbox.ymax()) / 2), + FT( (bbox.zmin() + bbox.zmax()) / 2) ); CGAL::Random& rng = *(r_domain_.p_rng_ != 0 ? r_domain_.p_rng_ : new Random(0)); + Random_points_on_sphere_3 random_point(1., rng); int i = n; @@ -728,6 +781,15 @@ Construct_initial_points::operator()(OutputIterator pts, % (n - i) % n; # endif + + // If the source of the ray is on the surface, every ray will return its source + // so change the source to a random point in the bounding box + if(std::get<0>(intersection) == ray_shot.source()) + { + center = Point_3(rng.get_double(bbox.xmin(), bbox.xmax()), + rng.get_double(bbox.ymin(), bbox.ymax()), + rng.get_double(bbox.zmin(), bbox.zmax())); + } } ++random_point; } diff --git a/thirdparty/CGAL/include/CGAL/Polyhedral_mesh_domain_with_features_3.h b/thirdparty/CGAL/include/CGAL/Polyhedral_mesh_domain_with_features_3.h index 71ddc982..3701fdaa 100644 --- a/thirdparty/CGAL/include/CGAL/Polyhedral_mesh_domain_with_features_3.h +++ b/thirdparty/CGAL/include/CGAL/Polyhedral_mesh_domain_with_features_3.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h $ -// $Id: Polyhedral_mesh_domain_with_features_3.h 1e7785b 2022-01-04T16:00:38+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h $ +// $Id: include/CGAL/Polyhedral_mesh_domain_with_features_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -57,23 +57,56 @@ namespace CGAL { -/** - * @class Polyhedral_mesh_domain_with_features_3 - * - * - */ -template < class IGT_, - class Polyhedron_ = typename Mesh_polyhedron_3::type, - class TriangleAccessor= CGAL::Default, - class Patch_id=int, - class Use_exact_intersection_construction_tag = Tag_true > +/*! +\ingroup PkgMesh3Domains + +The class `Polyhedral_mesh_domain_with_features_3` implements a domain whose +boundary is a simplicial polyhedral surface. + +This surface must be free of intersections. It can either be closed, +included inside another polyhedral surface which is closed and free of intersections, +or open. In the latter case, the meshing process will only take care of the quality +of the 1D (features and boundaries) and 2D (surfaces) components of the mesh. + +It is a model of the concept `MeshDomainWithFeatures_3`. It also provides +a member function to automatically detect sharp features and boundaries from +the input polyhedral surface(s). + +\tparam IGT stands for a geometric traits class providing the types +and functors required to implement the intersection tests and intersection computations +for polyhedral boundary surfaces. This parameter has to be +instantiated with a model of the concept +`IntersectionGeometricTraits_3`. + +\tparam Polyhedron stands for the type of the input polyhedral surface(s), model of `FaceListGraph`. + +\cgalModels{MeshDomainWithFeatures_3} + +\sa `CGAL::Mesh_domain_with_polyline_features_3` +\sa `CGAL::Polyhedral_mesh_domain_3` +\sa `CGAL::Mesh_polyhedron_3` +*/ +#ifdef DOXYGEN_RUNNING +template ::type> class Polyhedral_mesh_domain_with_features_3 : public Mesh_domain_with_polyline_features_3< - Polyhedral_mesh_domain_3< Polyhedron_, - IGT_, - TriangleAccessor, - Patch_id, - Use_exact_intersection_construction_tag > > + Polyhedral_mesh_domain_3 > +#else +template ::type, + class TriangleAccessor = CGAL::Default, + class Patch_id = int, + class Use_exact_intersection_construction_tag = Tag_true> +class Polyhedral_mesh_domain_with_features_3 + : public Mesh_domain_with_polyline_features_3< + Polyhedral_mesh_domain_3 > +#endif { typedef Mesh_domain_with_polyline_features_3< Polyhedral_mesh_domain_3< @@ -97,8 +130,9 @@ class Polyhedral_mesh_domain_with_features_3 typedef typename Base::Surface_patch_index Surface_patch_index; typedef typename Base::Subdomain_index Subdomain_index; + // Backward-compatibility #ifndef CGAL_NO_DEPRECATED_CODE - typedef Curve_index Curve_segment_index; ///< Backward-compatibility + typedef Curve_index Curve_segment_index; #endif typedef typename boost::property_map Bare_polyline; typedef Mesh_3::Polyline_with_context Polyline_with_context; - /// Constructors - Polyhedral_mesh_domain_with_features_3(const Polyhedron& p, - CGAL::Random* p_rng = nullptr) + + /// \name Creation + /// @{ + + /*! + Constructor from a polyhedral surface. + No feature detection is done at this level. Note that a copy of `bounding_polyhedron` will be done. + The polyhedron `bounding_polyhedron` has to be closed and free of intersections. + The interior of `bounding_polyhedron` will be meshed. + */ + Polyhedral_mesh_domain_with_features_3(const Polyhedron& bounding_polyhedron +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : Base(p_rng) , borders_detected_(false) { stored_polyhedra.resize(1); - stored_polyhedra[0] = p; + stored_polyhedra[0] = bounding_polyhedron; get(face_patch_id_t(), stored_polyhedra[0]); this->add_primitives(stored_polyhedra[0]); this->build(); } #ifndef CGAL_NO_DEPRECATED_CODE - + /*! + \deprecated Constructor from an OFF file. No feature detection is done at this level. + Users must read the file into a `Polyhedron` and call the constructor above. + */ CGAL_DEPRECATED - Polyhedral_mesh_domain_with_features_3(const std::string& filename, - CGAL::Random* p_rng = nullptr) + Polyhedral_mesh_domain_with_features_3(const std::string& filename +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : Base(p_rng) , borders_detected_(false) { load_from_file(filename.c_str()); } +#ifndef DOXYGEN_RUNNING // The following is needed, because otherwise, when a "const char*" is // passed, the constructors templates are a better match, than the // constructor with `std::string`. @@ -153,31 +207,56 @@ class Polyhedral_mesh_domain_with_features_3 { load_from_file(filename); } +#endif // DOXYGEN_RUNNING #endif // not CGAL_NO_DEPRECATED_CODE - Polyhedral_mesh_domain_with_features_3(const Polyhedron& p, - const Polyhedron& bounding_p, - CGAL::Random* p_rng = nullptr) + /*! + Constructor from a polyhedral surface, and a bounding polyhedral surface. + The first polyhedron should be entirely included inside `bounding_polyhedron`, which has to be closed + and free of intersections. + Using this constructor enables to mesh a polyhedral surface which is not closed, or has holes. + The inside of `bounding_polyhedron` will be meshed. + */ + Polyhedral_mesh_domain_with_features_3(const Polyhedron& polyhedron, + const Polyhedron& bounding_polyhedron +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : Base(p_rng) , borders_detected_(false) { stored_polyhedra.resize(2); - stored_polyhedra[0] = p; - stored_polyhedra[1] = bounding_p; + stored_polyhedra[0] = polyhedron; + stored_polyhedra[1] = bounding_polyhedron; get(face_patch_id_t(), stored_polyhedra[0]); get(face_patch_id_t(), stored_polyhedra[1]); this->add_primitives(stored_polyhedra[0]); this->add_primitives(stored_polyhedra[1]); - if(CGAL::is_empty(bounding_p)) { + if(CGAL::is_empty(bounding_polyhedron)) { this->set_surface_only(); } else { this->add_primitives_to_bounding_tree(stored_polyhedra[1]); } } + /*! + * Constructor from a sequence of polyhedral surfaces, without a bounding + * surface. The domain will always answer `false` to `is_in_domain()` + * queries. + * + * @tparam InputPolyhedraPtrIterator must be a model of + * `ForwardIterator` with value type `Polyhedron*` + * + * @param begin iterator for a sequence of pointers to polyhedra + * @param end iterator for a sequence of pointers to polyhedra + */ template Polyhedral_mesh_domain_with_features_3(InputPolyhedraPtrIterator begin, - InputPolyhedraPtrIterator end, - CGAL::Random* p_rng = nullptr) + InputPolyhedraPtrIterator end +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : Base(p_rng) , borders_detected_(false) { stored_polyhedra.reserve(std::distance(begin, end)); @@ -190,11 +269,25 @@ class Polyhedral_mesh_domain_with_features_3 this->build(); } + /*! + * Constructor from a sequence of polyhedral surfaces, and a bounding + * polyhedral surface. + * + * @tparam InputPolyhedraPtrIterator must be a model of + * `ForwardIterator` with value type `Polyhedron*` + * + * @param begin iterator for a sequence of pointers to polyhedra + * @param end iterator for a sequence of pointers to polyhedra + * @param bounding_polyhedron the bounding surface + */ template Polyhedral_mesh_domain_with_features_3(InputPolyhedraPtrIterator begin, InputPolyhedraPtrIterator end, - const Polyhedron& bounding_polyhedron, - CGAL::Random* p_rng = nullptr) + const Polyhedron& bounding_polyhedron +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : Base(p_rng) , borders_detected_(false) { stored_polyhedra.reserve(std::distance(begin, end)+1); @@ -216,21 +309,44 @@ class Polyhedral_mesh_domain_with_features_3 this->build(); } - /// Destructor + /// @} + + // Destructor ~Polyhedral_mesh_domain_with_features_3() {} - /// Detect features + // Detect features void initialize_ts(Polyhedron& p); + void detect_borders(std::vector& p); + void detect_features(FT angle_in_degree, std::vector& p); - void detect_features(FT angle_in_degree = FT(60)) + + /// \name Operations + /// @{ + + /*! + detects sharp features and boundaries of the internal bounding polyhedron (and the potential + internal polyhedra) and inserts them as features of the domain. + + @param angle_bound gives the maximum angle (in degrees) between the two normal vectors of adjacent triangles. + For an edge of a polyhedron, if the angle between the two normal vectors of its + incident facets is bigger than the given bound, then the edge is considered as + a feature edge. + */ + void detect_features(FT angle_bound = FT(60)) { - detect_features(angle_in_degree, stored_polyhedra); + detect_features(angle_bound, stored_polyhedra); } - void detect_borders(std::vector& p); + /*! + detects border edges of the bounding polyhedron and inserts them as features of the domain. + + This function should only be called alone, and not before or after `detect_features()`. + */ void detect_borders() { detect_borders(stored_polyhedra); }; + /// @} + template void add_features(InputIterator first, InputIterator end) @@ -438,7 +554,9 @@ add_features_from_split_graph_into_polylines(Featured_edges_copy_graph& g_copy) Featured_edges_copy_graph > visitor(g_copy, polylines); Mesh_3::internal::Angle_tester angle_tester; - split_graph_into_polylines(g_copy, visitor, angle_tester); + split_graph_into_polylines( + g_copy, visitor, angle_tester, + [&](auto v1, auto v2) { return g_copy[v1] < g_copy[v2]; }); this->add_features_with_context(polylines.begin(), polylines.end()); @@ -475,7 +593,6 @@ add_featured_edges_to_graph(const Polyhedron& p, Featured_edges_graph orig_graph(p, pred); typedef Featured_edges_graph Graph; - typedef typename boost::graph_traits::vertex_descriptor Graph_vertex_descriptor; typedef typename boost::graph_traits::edge_descriptor Graph_edge_descriptor; typedef Featured_edges_copy_graph G_copy; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -485,22 +602,26 @@ add_featured_edges_to_graph(const Polyhedron& p, typedef typename boost::property_map::const_type Vpm; Vpm vpm = get(vertex_point, p); - for(Graph_vertex_descriptor v : make_range(vertices(graph))){ - vertex_descriptor vc; - typename P2vmap::iterator it = p2vmap.find(get(vpm,v)); + + auto get_vertex = [&](auto point) { + typename P2vmap::iterator it = p2vmap.find(point); + vertex_descriptor v; if(it == p2vmap.end()) { - vc = add_vertex(g_copy); - g_copy[vc] = get(vpm, v); - p2vmap[get(vpm,v)] = vc; + v = add_vertex(g_copy); + g_copy[v] = point; + p2vmap[point] = v; + } else { + v = it->second; } - } + return v; + }; typedef typename boost::property_map >::type Face_patch_id_pmap; Face_patch_id_pmap fpm = get(face_patch_id_t(),p); for(Graph_edge_descriptor e : make_range(edges(graph))){ - vertex_descriptor vs = p2vmap[get(vpm,source(e,graph))]; - vertex_descriptor vt = p2vmap[get(vpm,target(e,graph))]; + vertex_descriptor vs = get_vertex(get(vpm,source(e,graph))); + vertex_descriptor vt = get_vertex(get(vpm,target(e,graph))); CGAL_warning_msg(vs != vt, "ignore self loop"); if(vs != vt) { const std::pair pair = add_edge(vs,vt,g_copy); diff --git a/thirdparty/CGAL/include/CGAL/Polyhedron_3.h b/thirdparty/CGAL/include/CGAL/Polyhedron_3.h index c9a903e6..df5600b8 100644 --- a/thirdparty/CGAL/include/CGAL/Polyhedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Polyhedron_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/Polyhedron_3.h $ -// $Id: Polyhedron_3.h 3ad94a7 2022-05-17T12:04:52+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/Polyhedron_3.h $ +// $Id: include/CGAL/Polyhedron_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -855,6 +855,10 @@ class Polyhedron_3 { Facet_iterator facets_end() { return hds_.faces_end();} + // added for convenience + Facet_iterator faces_begin() { return hds_.faces_begin();} + Facet_iterator faces_end() { return hds_.faces_end();} + Facet_handles facet_handles() { return make_prevent_deref_range(facets_begin(), facets_end()); } @@ -886,11 +890,15 @@ class Polyhedron_3 { Facet_const_iterator facets_begin() const { return hds_.faces_begin();} Facet_const_iterator facets_end() const { return hds_.faces_end();} + // added for convenience + Facet_const_iterator faces_begin() const { return hds_.faces_begin();} + Facet_const_iterator faces_end() const { return hds_.faces_end();} + Facet_const_handles facet_handles() const { return make_prevent_deref_range(facets_begin(), facets_end()); } - // Auxiliary iterators for convinience + // Auxiliary iterators for convenience Point_iterator points_begin() { return vertices_begin();} Point_iterator points_end() { return vertices_end();} @@ -1302,7 +1310,7 @@ class Polyhedron_3 { // Three copies of the vertices and two new triangles will be // created. h,i,j will be incident to the first new triangle. The // returnvalue will be an halfedge iterator denoting the new - // halfegdes of the second new triangle which was h beforehand. + // halfedges of the second new triangle which was h beforehand. // Precondition: h,i,j are distinct, consecutive vertices of the // polyhedron and form a cycle: i.e. `h->vertex() == i->opposite() // ->vertex()', ..., `j->vertex() == h->opposite()->vertex()'. The @@ -1465,7 +1473,7 @@ class Polyhedron_3 { // removes all vertices, halfedges, and facets. void erase_all() { clear(); } - // equivalent to `clear()'. Depricated. + // equivalent to `clear()'. Deprecated. // Special Operations on Polyhedral Surfaces @@ -1583,7 +1591,7 @@ class Polyhedron_3 { << std::endl; break; } - // Distinct facets on each side of an halfegde. + // Distinct facets on each side of an halfedge. valid = valid && ( ! check_tag( Supports_halfedge_face()) || D.get_face(i) != D.get_face(i->opposite())); if ( ! valid) { diff --git a/thirdparty/CGAL/include/CGAL/Polyhedron_3_fwd.h b/thirdparty/CGAL/include/CGAL/Polyhedron_3_fwd.h index 88580693..0972fa52 100644 --- a/thirdparty/CGAL/include/CGAL/Polyhedron_3_fwd.h +++ b/thirdparty/CGAL/include/CGAL/Polyhedron_3_fwd.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/Polyhedron_3_fwd.h $ -// $Id: Polyhedron_3_fwd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/Polyhedron_3_fwd.h $ +// $Id: include/CGAL/Polyhedron_3_fwd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // diff --git a/thirdparty/CGAL/include/CGAL/Polyhedron_3_to_lcc.h b/thirdparty/CGAL/include/CGAL/Polyhedron_3_to_lcc.h index b274e3dc..3e3aec76 100644 --- a/thirdparty/CGAL/include/CGAL/Polyhedron_3_to_lcc.h +++ b/thirdparty/CGAL/include/CGAL/Polyhedron_3_to_lcc.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h $ -// $Id: Polyhedron_3_to_lcc.h 9a50c0f 2019-11-26T13:22:03+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h $ +// $Id: include/CGAL/Polyhedron_3_to_lcc.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -13,6 +13,9 @@ #ifndef CGAL_POLYHEDRON_3_TO_LCC_H #define CGAL_POLYHEDRON_3_TO_LCC_H +#include + + #include #include #include @@ -24,39 +27,39 @@ namespace CGAL { /** Import a given Polyhedron_3 into a Linear_cell_complex. * @param alcc the linear cell complex where Polyhedron_3 will be converted. * @param apoly the Polyhedron. - * @return A dart created during the convertion. + * @return A dart created during the conversion. */ template< class LCC, class Polyhedron > - typename LCC::Dart_handle import_from_polyhedron_3(LCC& alcc, + typename LCC::Dart_descriptor import_from_polyhedron_3(LCC& alcc, const Polyhedron &apoly) { - CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==3 ); + static_assert( LCC::dimension>=2 && LCC::ambient_dimension==3 ); typedef typename Polyhedron::Halfedge_const_handle Halfedge_handle; typedef typename Polyhedron::Facet_const_iterator Facet_iterator; typedef typename Polyhedron::Halfedge_around_facet_const_circulator HF_circulator; - typedef std::map < Halfedge_handle, typename LCC::Dart_handle> + typedef std::map < Halfedge_handle, typename LCC::Dart_descriptor> Halfedge_handle_map; typedef typename Halfedge_handle_map::iterator itmap_hds; Halfedge_handle_map TC; itmap_hds it; - typename LCC::Dart_handle d = LCC::null_handle, prev = LCC::null_handle; - typename LCC::Dart_handle firstFacet = LCC::null_handle, firstAll = LCC::null_handle; + typename LCC::Dart_descriptor d = LCC::null_descriptor, prev = LCC::null_descriptor; + typename LCC::Dart_descriptor firstFacet = LCC::null_descriptor, firstAll = LCC::null_descriptor; // First traversal to build the darts and link them. for (Facet_iterator i = apoly.facets_begin(); i != apoly.facets_end(); ++i) { HF_circulator j = i->facet_begin(); - prev = LCC::null_handle; + prev = LCC::null_descriptor; do { d = alcc.make_half_edge(); TC[j] = d; - if (prev != LCC::null_handle) alcc.set_next(prev, d); + if (prev != LCC::null_descriptor) alcc.set_next(prev, d); else firstFacet = d; if (!j->opposite()->is_border()) @@ -69,7 +72,7 @@ namespace CGAL { } while (++j != i->facet_begin()); alcc.set_next(prev, firstFacet); - if (firstAll == LCC::null_handle) firstAll = firstFacet; + if (firstAll == LCC::null_descriptor) firstAll = firstFacet; } // Second traversal to update the geometry. @@ -80,7 +83,7 @@ namespace CGAL { do { d = TC[j]; // Get the dart associated to the Halfedge - if (alcc.vertex_attribute(d)==LCC::null_handle) + if (alcc.vertex_attribute(d)==LCC::null_descriptor) { alcc.set_vertex_attribute (d, alcc.create_vertex_attribute(j->opposite()->vertex()->point())); @@ -94,16 +97,16 @@ namespace CGAL { /** Convert a Polyhedron_3 read into a flux into 3D linear cell complex. * @param alcc the linear cell complex where Polyhedron_3 will be converted. * @param ais the istream where read the Polyhedron_3. - * @return A dart created during the convertion. + * @return A dart created during the conversion. */ template < class LCC > - typename LCC::Dart_handle + typename LCC::Dart_descriptor import_from_polyhedron_3_flux(LCC& alcc, std::istream& ais) { if (!ais.good()) { std::cout << "Error reading flux." << std::endl; - return LCC::null_handle; + return LCC::null_descriptor; } CGAL::Polyhedron_3 P; ais >> P; diff --git a/thirdparty/CGAL/include/CGAL/Polyhedron_copy_3.h b/thirdparty/CGAL/include/CGAL/Polyhedron_copy_3.h index 2f8ed93a..5ba7150d 100644 --- a/thirdparty/CGAL/include/CGAL/Polyhedron_copy_3.h +++ b/thirdparty/CGAL/include/CGAL/Polyhedron_copy_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/Polyhedron_copy_3.h $ -// $Id: Polyhedron_copy_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/Polyhedron_copy_3.h $ +// $Id: include/CGAL/Polyhedron_copy_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polyhedron_incremental_builder_3.h b/thirdparty/CGAL/include/CGAL/Polyhedron_incremental_builder_3.h index 20af9bb8..8b20d71e 100644 --- a/thirdparty/CGAL/include/CGAL/Polyhedron_incremental_builder_3.h +++ b/thirdparty/CGAL/include/CGAL/Polyhedron_incremental_builder_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/Polyhedron_incremental_builder_3.h $ -// $Id: Polyhedron_incremental_builder_3.h 2c4a5db 2021-05-18T18:14:14+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/Polyhedron_incremental_builder_3.h $ +// $Id: include/CGAL/Polyhedron_incremental_builder_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -162,7 +162,7 @@ class Polyhedron_incremental_builder_3 { // // Polyhedron_incremental_builder_3 is an auxiliary class that // supports the incremental construction of polyhedral surfaces. This is -// for example convinient when constructing polyhedral surfaces from +// for example convenient when constructing polyhedral surfaces from // files. The incremental construction starts with a list of all point // coordinates and concludes with a list of all facet polygons. Edges are // not explicitly specified. They are derived from the incidence @@ -205,7 +205,7 @@ class Polyhedron_incremental_builder_3 { // starts the construction. v is the number of new // vertices to expect, f the number of new facets, and h the number of // new halfedges. If h is unspecified (`== 0') it is estimated using - // Euler equations (plus 5% for the so far unkown holes and genus + // Euler equations (plus 5% for the so far unknown holes and genus // of the object). These values are used to reserve space in the // polyhedron representation `HDS'. If the representation // supports insertion these values do not restrict the class of diff --git a/thirdparty/CGAL/include/CGAL/Polyhedron_items_3.h b/thirdparty/CGAL/include/CGAL/Polyhedron_items_3.h index b3177e82..9a0afa41 100644 --- a/thirdparty/CGAL/include/CGAL/Polyhedron_items_3.h +++ b/thirdparty/CGAL/include/CGAL/Polyhedron_items_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/Polyhedron_items_3.h $ -// $Id: Polyhedron_items_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/Polyhedron_items_3.h $ +// $Id: include/CGAL/Polyhedron_items_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polyhedron_items_with_id_3.h b/thirdparty/CGAL/include/CGAL/Polyhedron_items_with_id_3.h index 7015735e..b7281764 100644 --- a/thirdparty/CGAL/include/CGAL/Polyhedron_items_with_id_3.h +++ b/thirdparty/CGAL/include/CGAL/Polyhedron_items_with_id_3.h @@ -2,15 +2,18 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/Polyhedron_items_with_id_3.h $ -// $Id: Polyhedron_items_with_id_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/Polyhedron_items_with_id_3.h $ +// $Id: include/CGAL/Polyhedron_items_with_id_3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri, Fernando Cacciola #ifndef CGAL_POLYHEDRON_ITEMS_WITH_ID_3_H -#define CGAL_POLYHEDRON_ITEMS_WITH_ID_3_H 1 +#define CGAL_POLYHEDRON_ITEMS_WITH_ID_3_H + +#include + #include #include diff --git a/thirdparty/CGAL/include/CGAL/Polyhedron_min_items_3.h b/thirdparty/CGAL/include/CGAL/Polyhedron_min_items_3.h index 17bf21ae..10b212fa 100644 --- a/thirdparty/CGAL/include/CGAL/Polyhedron_min_items_3.h +++ b/thirdparty/CGAL/include/CGAL/Polyhedron_min_items_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/Polyhedron_min_items_3.h $ -// $Id: Polyhedron_min_items_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/Polyhedron_min_items_3.h $ +// $Id: include/CGAL/Polyhedron_min_items_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polyhedron_traits_3.h b/thirdparty/CGAL/include/CGAL/Polyhedron_traits_3.h index 08337e37..d8b24599 100644 --- a/thirdparty/CGAL/include/CGAL/Polyhedron_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Polyhedron_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/Polyhedron_traits_3.h $ -// $Id: Polyhedron_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/Polyhedron_traits_3.h $ +// $Id: include/CGAL/Polyhedron_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polyhedron_traits_with_normals_3.h b/thirdparty/CGAL/include/CGAL/Polyhedron_traits_with_normals_3.h index 7289ba61..a079ea73 100644 --- a/thirdparty/CGAL/include/CGAL/Polyhedron_traits_with_normals_3.h +++ b/thirdparty/CGAL/include/CGAL/Polyhedron_traits_with_normals_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/Polyhedron_traits_with_normals_3.h $ -// $Id: Polyhedron_traits_with_normals_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/Polyhedron_traits_with_normals_3.h $ +// $Id: include/CGAL/Polyhedron_traits_with_normals_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h index cfb5eef8..d7bb61a8 100644 --- a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h +++ b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h $ -// $Id: Hybrid_squared_distance_cost.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h $ +// $Id: include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -27,7 +27,7 @@ namespace Polyline_simplification_2 /// This class is a cost function which calculates the cost as the square of the distance between the original and simplified polylines, /// possibly scaled based on a factor. /// -/// \cgalModels `PolylineSimplificationCostFunction`. +/// \cgalModels{PolylineSimplificationCostFunction} template class Hybrid_squared_distance_cost { @@ -49,7 +49,7 @@ class Hybrid_squared_distance_cost /// \tparam CDT must be `CGAL::Constrained_Delaunay_triangulation_2` with a vertex type that /// is model of `PolylineSimplificationVertexBase_2`. template - boost::optional + std::optional operator()( const Constrained_triangulation_plus_2& pct , typename Constrained_triangulation_plus_2::Vertices_in_constraint_iterator vicq) const { @@ -65,8 +65,8 @@ class Hybrid_squared_distance_cost Construct_segment construct_segment = pct.geom_traits().construct_segment_2_object() ; typedef typename Constrained_triangulation_plus_2::Vertices_in_constraint_iterator Vertices_in_constraint_iterator; - Vertices_in_constraint_iterator vicp = boost::prior(vicq); - Vertices_in_constraint_iterator vicr = boost::next(vicq); + Vertices_in_constraint_iterator vicp = std::prev(vicq); + Vertices_in_constraint_iterator vicr = std::next(vicq); Point const& lP = (*vicp)->point(); Point const& lR = (*vicr)->point(); diff --git a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h index d78bf879..5ba3f416 100644 --- a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h +++ b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h $ -// $Id: Scaled_squared_distance_cost.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h $ +// $Id: include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -27,7 +27,7 @@ namespace Polyline_simplification_2 /// This class is a cost function which calculates the cost as a scaled variant of the square of the distance between the original and simplified polylines. /// -/// \cgalModels `PolylineSimplificationCostFunction` +/// \cgalModels{ PolylineSimplificationCostFunction} class Scaled_squared_distance_cost { @@ -44,7 +44,7 @@ class Scaled_squared_distance_cost /// \tparam CDT must be `CGAL::Constrained_Delaunay_triangulation_2` with a vertex type that /// is model of `PolylineSimplificationVertexBase_2`. template - boost::optional + std::optional operator()(const Constrained_triangulation_plus_2& pct , typename Constrained_triangulation_plus_2::Vertices_in_constraint_iterator vicq) const { @@ -61,8 +61,8 @@ class Scaled_squared_distance_cost Construct_segment construct_segment = pct.geom_traits().construct_segment_2_object() ; typedef typename Constrained_triangulation_plus_2::Vertices_in_constraint_iterator Vertices_in_constraint_iterator; - Vertices_in_constraint_iterator vicp = boost::prior(vicq); - Vertices_in_constraint_iterator vicr = boost::next(vicq); + Vertices_in_constraint_iterator vicp = std::prev(vicq); + Vertices_in_constraint_iterator vicr = std::next(vicq); Point const& lP = (*vicp)->point(); Point const& lR = (*vicr)->point(); @@ -94,8 +94,8 @@ class Scaled_squared_distance_cost }while(vc != done); return d2_uninitialized ? - boost::optional(boost::none) : - boost::optional(d1 / d2); + std::optional(std::nullopt) : + std::optional(d1 / d2); } }; diff --git a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h index b974bd3b..419ab4d8 100644 --- a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h +++ b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h $ -// $Id: Squared_distance_cost.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Squared_distance_cost.h $ +// $Id: include/CGAL/Polyline_simplification_2/Squared_distance_cost.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -34,7 +34,7 @@ namespace Polyline_simplification_2 /// This class is a cost function which calculates the cost as the square of the distance between the original and simplified polylines. /// -/// \cgalModels `PolylineSimplificationCostFunction`. +/// \cgalModels{PolylineSimplificationCostFunction} class Squared_distance_cost { @@ -50,7 +50,7 @@ class Squared_distance_cost /// is model of `PolylineSimplificationVertexBase_2`. template - boost::optional + std::optional operator()(const Constrained_triangulation_plus_2& pct , typename Constrained_triangulation_plus_2::Vertices_in_constraint_iterator vicq)const { @@ -66,8 +66,8 @@ class Squared_distance_cost Construct_segment construct_segment = pct.geom_traits().construct_segment_2_object() ; typedef typename Constrained_triangulation_plus_2::Vertices_in_constraint_iterator Vertices_in_constraint_iterator; - Vertices_in_constraint_iterator vicp = boost::prior(vicq); - Vertices_in_constraint_iterator vicr = boost::next(vicq); + Vertices_in_constraint_iterator vicp = std::prev(vicq); + Vertices_in_constraint_iterator vicr = std::next(vicq); Point const& lP = (*vicp)->point(); Point const& lR = (*vicr)->point(); diff --git a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h index 55580873..8ecec924 100644 --- a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h +++ b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h $ -// $Id: Stop_above_cost_threshold.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h $ +// $Id: include/CGAL/Polyline_simplification_2/Stop_above_cost_threshold.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -28,7 +28,7 @@ namespace Polyline_simplification_2 /// This class is a stop predicate returning `true` when the cost for /// simplifying a vertex is greater than a certain threshold. /// -/// \cgalModels `PolylineSimplificationStopPredicate`. +/// \cgalModels{PolylineSimplificationStopPredicate} class Stop_above_cost_threshold { public : diff --git a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h index 8eae4013..03d98107 100644 --- a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h +++ b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h $ -// $Id: Stop_below_count_ratio_threshold.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h $ +// $Id: include/CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -25,9 +25,9 @@ namespace Polyline_simplification_2 /// \ingroup PkgPolylineSimplification2Classes /// This class is a stop predicate returning `true` when the percentage -/// of remaning vertices is smaller than a certain threshold. +/// of remaining vertices is smaller than a certain threshold. /// -/// \cgalModels `PolylineSimplificationStopPredicate`. +/// \cgalModels{PolylineSimplificationStopPredicate} class Stop_below_count_ratio_threshold { public : diff --git a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Stop_below_count_threshold.h b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Stop_below_count_threshold.h index f75917f8..d813ecfe 100644 --- a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Stop_below_count_threshold.h +++ b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Stop_below_count_threshold.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Stop_below_count_threshold.h $ -// $Id: Stop_below_count_threshold.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Stop_below_count_threshold.h $ +// $Id: include/CGAL/Polyline_simplification_2/Stop_below_count_threshold.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -27,7 +27,7 @@ namespace Polyline_simplification_2 /// This class is a stop predicate returning `true` when the number of /// vertices is smaller than a certain threshold. /// -/// \cgalModels `PolylineSimplificationStopPredicate`. +/// \cgalModels{PolylineSimplificationStopPredicate} class Stop_below_count_threshold { public : diff --git a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Vertex_base_2.h index 4b5afd06..ef0ece14 100644 --- a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/Vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Vertex_base_2.h $ -// $Id: Vertex_base_2.h 53cb7cd 2021-02-16T13:41:28+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Vertex_base_2.h $ +// $Id: include/CGAL/Polyline_simplification_2/Vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Philipp Moeller @@ -25,7 +25,7 @@ namespace Polyline_simplification_2 { /// A vertex base class with data members needed by the simplification algorithm. /// \tparam Vb must be a model of the concept `TriangulationVertexBase_2` -/// \cgalModels `PolylineSimplificationVertexBase_2`. +/// \cgalModels{PolylineSimplificationVertexBase_2} template > class Vertex_base_2 : public Vb diff --git a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/simplify.h b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/simplify.h index ced010ac..0ea392ea 100644 --- a/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/simplify.h +++ b/thirdparty/CGAL/include/CGAL/Polyline_simplification_2/simplify.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h $ -// $Id: simplify.h c61fdb8 2021-11-30T13:49:39+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h $ +// $Id: include/CGAL/Polyline_simplification_2/simplify.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -154,11 +154,11 @@ class Polyline_simplification_2 (*it)->set_removable(false); ++it; for(; it != ite; ++it){ - if((boost::next(it) != ite) && (boost::prior(it)== boost::next(it))){ + if((std::next(it) != ite) && (std::prev(it)== std::next(it))){ (*it)->set_removable(false); } } - it = boost::prior(it); + it = std::prev(it); (*it)->set_removable(false); } @@ -211,7 +211,7 @@ class Polyline_simplification_2 it != pct.vertices_in_constraint_end(cid); ++it){ if((*it)->is_removable()){ - boost::optional dist = cost(pct, it); + std::optional dist = cost(pct, it); if(dist){ (*it)->set_cost(*dist); if(! (*mpq).contains(*it)){ @@ -245,9 +245,9 @@ class Polyline_simplification_2 } Vertex_handle vh = *it; - Vertices_in_constraint_iterator u = boost::prior(it); + Vertices_in_constraint_iterator u = std::prev(it); Vertex_handle uh = *u; - Vertices_in_constraint_iterator w = boost::next(it); + Vertices_in_constraint_iterator w = std::next(it); Vertex_handle wh = *w; typename Geom_traits::Orientation_2 orientation_2 = pct.geom_traits().orientation_2_object(); @@ -322,11 +322,11 @@ operator()() Vertices_in_constraint_iterator vit = vertex_to_iterator[v].front(); if(is_removable(vit)){ - Vertices_in_constraint_iterator u = boost::prior(vit), w = boost::next(vit); + Vertices_in_constraint_iterator u = std::prev(vit), w = std::next(vit); pct.simplify(vit); if((*u)->is_removable()){ - boost::optional dist = cost(pct, u); + std::optional dist = cost(pct, u); if(! dist){ // cost is undefined if( mpq->contains(*u) ){ @@ -344,7 +344,7 @@ operator()() } if((*w)->is_removable()){ - boost::optional dist = cost(pct, w); + std::optional dist = cost(pct, w); if(! dist){ // cost is undefined if( mpq->contains(*w) ){ diff --git a/thirdparty/CGAL/include/CGAL/Polynomial.h b/thirdparty/CGAL/include/CGAL/Polynomial.h index 9a5abe5f..8763f3b9 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial.h $ -// $Id: Polynomial.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial.h $ +// $Id: include/CGAL/Polynomial.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/Algebraic_structure_traits.h b/thirdparty/CGAL/include/CGAL/Polynomial/Algebraic_structure_traits.h index 93c2ac8c..343ee94f 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/Algebraic_structure_traits.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/Algebraic_structure_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/Algebraic_structure_traits.h $ -// $Id: Algebraic_structure_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/Algebraic_structure_traits.h $ +// $Id: include/CGAL/Polynomial/Algebraic_structure_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -273,9 +273,9 @@ class Polynomial_algebraic_structure_traits_base< POLY, Field_tag > template < class NT1, class NT2 > void operator()( const NT1& x, const NT2& y, POLY& q, POLY& r ) const { - CGAL_static_assertion((::boost::is_same< + static_assert(::std::is_same< typename Coercion_traits< NT1, NT2 >::Type, POLY - >::value)); + >::value); typename Coercion_traits< NT1, NT2 >::Cast cast; operator()( cast(x), cast(y), q, r ); diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/Cached_extended_euclidean_algorithm.h b/thirdparty/CGAL/include/CGAL/Polynomial/Cached_extended_euclidean_algorithm.h index 106bfe1d..d5ff9dea 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/Cached_extended_euclidean_algorithm.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/Cached_extended_euclidean_algorithm.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/Cached_extended_euclidean_algorithm.h $ -// $Id: Cached_extended_euclidean_algorithm.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/Cached_extended_euclidean_algorithm.h $ +// $Id: include/CGAL/Polynomial/Cached_extended_euclidean_algorithm.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/Chinese_remainder_traits.h b/thirdparty/CGAL/include/CGAL/Polynomial/Chinese_remainder_traits.h index 8e9b1aac..7386aed2 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/Chinese_remainder_traits.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/Chinese_remainder_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/Chinese_remainder_traits.h $ -// $Id: Chinese_remainder_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/Chinese_remainder_traits.h $ +// $Id: include/CGAL/Polynomial/Chinese_remainder_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/Coercion_traits.h b/thirdparty/CGAL/include/CGAL/Polynomial/Coercion_traits.h index 6a1cbd59..fbb99a3d 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/Coercion_traits.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/Coercion_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/Coercion_traits.h $ -// $Id: Coercion_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/Coercion_traits.h $ +// $Id: include/CGAL/Polynomial/Coercion_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/Degree.h b/thirdparty/CGAL/include/CGAL/Polynomial/Degree.h index 04c4da14..54d24d9e 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/Degree.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/Degree.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/Degree.h $ -// $Id: Degree.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/Degree.h $ +// $Id: include/CGAL/Polynomial/Degree.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/Fraction_traits.h b/thirdparty/CGAL/include/CGAL/Polynomial/Fraction_traits.h index 5171b1cd..d6f734c7 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/Fraction_traits.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/Fraction_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/Fraction_traits.h $ -// $Id: Fraction_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/Fraction_traits.h $ +// $Id: include/CGAL/Polynomial/Fraction_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/Get_arithmetic_kernel.h b/thirdparty/CGAL/include/CGAL/Polynomial/Get_arithmetic_kernel.h index a86e3263..c9141f60 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/Get_arithmetic_kernel.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/Get_arithmetic_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/Get_arithmetic_kernel.h $ -// $Id: Get_arithmetic_kernel.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/Get_arithmetic_kernel.h $ +// $Id: include/CGAL/Polynomial/Get_arithmetic_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/Interpolator.h b/thirdparty/CGAL/include/CGAL/Polynomial/Interpolator.h index 2f711d70..a703e93b 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/Interpolator.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/Interpolator.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/Interpolator.h $ -// $Id: Interpolator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/Interpolator.h $ +// $Id: include/CGAL/Polynomial/Interpolator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/Modular_traits.h b/thirdparty/CGAL/include/CGAL/Polynomial/Modular_traits.h index d0fa8995..1e635eb4 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/Modular_traits.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/Modular_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/Modular_traits.h $ -// $Id: Modular_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/Modular_traits.h $ +// $Id: include/CGAL/Polynomial/Modular_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/Monomial_representation.h b/thirdparty/CGAL/include/CGAL/Polynomial/Monomial_representation.h index 0248ba92..0bca5cec 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/Monomial_representation.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/Monomial_representation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/Monomial_representation.h $ -// $Id: Monomial_representation.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/Monomial_representation.h $ +// $Id: include/CGAL/Polynomial/Monomial_representation.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/Polynomial_type.h b/thirdparty/CGAL/include/CGAL/Polynomial/Polynomial_type.h index 5f0cac06..2c57a436 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/Polynomial_type.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/Polynomial_type.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/Polynomial_type.h $ -// $Id: Polynomial_type.h 625848e 2021-10-04T13:21:47+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/Polynomial_type.h $ +// $Id: include/CGAL/Polynomial/Polynomial_type.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -173,7 +173,7 @@ Polynomial_rep::Polynomial_rep(size_type n, ...) The important invariant to be preserved by all methods is that the coefficient sequence does not contain leading zero coefficients - (where leading means at the high-degree end), with the excpetion that + (where leading means at the high-degree end), with the exception that the zero polynomial is represented by a single zero coefficient. An empty coefficient sequence denotes an undefined value. @@ -486,9 +486,9 @@ class Polynomial // and NT would be changed by NTX typedef typename Fraction_traits::Is_fraction Is_fraction; typedef typename Coercion_traits::Type Type; - typedef typename ::boost::mpl::if_c< - ::boost::is_same::value, Is_fraction, CGAL::Tag_false - >::type If_decomposable_AND_Type_equals_NT; + typedef std::conditional_t< + std::is_same_v, Is_fraction, CGAL::Tag_false + > If_decomposable_AND_Type_equals_NT; return sign_at_(x,If_decomposable_AND_Type_equals_NT()); } @@ -545,8 +545,8 @@ class Polynomial * Also available as non-member function. */ CGAL::Sign sign() const { -// CGAL_static_assertion( (boost::is_same< typename Real_embeddable_traits::Is_real_embeddable, -// CGAL::Tag_true>::value) ); +// static_assert(std::is_same< typename Real_embeddable_traits::Is_real_embeddable, +// CGAL::Tag_true>::value); return CGAL::sign(lcoeff()); } diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/Real_embeddable_traits.h b/thirdparty/CGAL/include/CGAL/Polynomial/Real_embeddable_traits.h index 934eedce..f9c5592b 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/Real_embeddable_traits.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/Real_embeddable_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/Real_embeddable_traits.h $ -// $Id: Real_embeddable_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/Real_embeddable_traits.h $ +// $Id: include/CGAL/Polynomial/Real_embeddable_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/Scalar_factor_traits.h b/thirdparty/CGAL/include/CGAL/Polynomial/Scalar_factor_traits.h index 58117df8..5a18fcd4 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/Scalar_factor_traits.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/Scalar_factor_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/Scalar_factor_traits.h $ -// $Id: Scalar_factor_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/Scalar_factor_traits.h $ +// $Id: include/CGAL/Polynomial/Scalar_factor_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/bezout_matrix.h b/thirdparty/CGAL/include/CGAL/Polynomial/bezout_matrix.h index 7a993b20..eef28d6e 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/bezout_matrix.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/bezout_matrix.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/bezout_matrix.h $ -// $Id: bezout_matrix.h e9d41d7 2020-04-21T10:03:00+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/bezout_matrix.h $ +// $Id: include/CGAL/Polynomial/bezout_matrix.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/determinant.h b/thirdparty/CGAL/include/CGAL/Polynomial/determinant.h index 3ca6ceb1..364eb9db 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/determinant.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/determinant.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/determinant.h $ -// $Id: determinant.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/determinant.h $ +// $Id: include/CGAL/Polynomial/determinant.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/fwd.h b/thirdparty/CGAL/include/CGAL/Polynomial/fwd.h index 147eb000..66181b83 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/fwd.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/fwd.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/fwd.h $ -// $Id: fwd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/fwd.h $ +// $Id: include/CGAL/Polynomial/fwd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/hgdelta_update.h b/thirdparty/CGAL/include/CGAL/Polynomial/hgdelta_update.h index e613d59a..d307e0eb 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/hgdelta_update.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/hgdelta_update.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/hgdelta_update.h $ -// $Id: hgdelta_update.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/hgdelta_update.h $ +// $Id: include/CGAL/Polynomial/hgdelta_update.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/misc.h b/thirdparty/CGAL/include/CGAL/Polynomial/misc.h index 6eb3b28d..fc34c34b 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/misc.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/misc.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/misc.h $ -// $Id: misc.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/misc.h $ +// $Id: include/CGAL/Polynomial/misc.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,7 @@ namespace CGAL{ namespace internal{ // template meta function Innermost_coefficient_type -// returns the tpye of the innermost coefficient +// returns the type of the innermost coefficient template struct Innermost_coefficient_type{ typedef T Type; }; template struct Innermost_coefficient_type >{ diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/modular_filter.h b/thirdparty/CGAL/include/CGAL/Polynomial/modular_filter.h index 3e7ee818..d2941d53 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/modular_filter.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/modular_filter.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/modular_filter.h $ -// $Id: modular_filter.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/modular_filter.h $ +// $Id: include/CGAL/Polynomial/modular_filter.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd.h b/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd.h index 57decea7..4622360d 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/modular_gcd.h $ -// $Id: modular_gcd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/modular_gcd.h $ +// $Id: include/CGAL/Polynomial/modular_gcd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h b/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h index a836c554..743e8b64 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h $ -// $Id: modular_gcd_utcf_algorithm_M.h fdb17cb 2020-03-26T19:26:10+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h $ +// $Id: include/CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -118,7 +118,7 @@ Polynomial modular_gcd_utcf_algorithm_M( while(!solved){ do{ //--------------------------------------- - //choose prime not deviding f1 or f2 + //choose prime not dividing f1 or f2 MScalar tmp1, tmp2; do{ int current_prime = -1; diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd_utcf_dfai.h b/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd_utcf_dfai.h index 4ffb4a4f..50c47b14 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd_utcf_dfai.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd_utcf_dfai.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/modular_gcd_utcf_dfai.h $ -// $Id: modular_gcd_utcf_dfai.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/modular_gcd_utcf_dfai.h $ +// $Id: include/CGAL/Polynomial/modular_gcd_utcf_dfai.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -152,7 +152,7 @@ Polynomial modular_gcd_utcf_dfai( while(!solved){ do{ //--------------------------------------- - //choose prime not deviding f1 or f2 + //choose prime not dividing f1 or f2 MScalar tmp1, tmp2; do{ prime_index++; diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd_utils.h b/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd_utils.h index 51903373..0e189232 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd_utils.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/modular_gcd_utils.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/modular_gcd_utils.h $ -// $Id: modular_gcd_utils.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/modular_gcd_utils.h $ +// $Id: include/CGAL/Polynomial/modular_gcd_utils.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -51,7 +51,7 @@ void euclidean_division_obstinate(const Polynomial& F1, int d2 = F2.degree(); if ( d1 < d2 ) { Q = Polynomial(NT(0)); R = F1; - CGAL_postcondition( !(boost::is_same< typename Algebraic_structure_traits::Is_exact, + CGAL_postcondition( !(std::is_same< typename Algebraic_structure_traits::Is_exact, CGAL::Tag_true >::value) || F1 == Q*F2 + R); return; } diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/polynomial_gcd.h b/thirdparty/CGAL/include/CGAL/Polynomial/polynomial_gcd.h index eb55dc17..142d9bc4 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/polynomial_gcd.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/polynomial_gcd.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/polynomial_gcd.h $ -// $Id: polynomial_gcd.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/polynomial_gcd.h $ +// $Id: include/CGAL/Polynomial/polynomial_gcd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/polynomial_gcd_implementations.h b/thirdparty/CGAL/include/CGAL/Polynomial/polynomial_gcd_implementations.h index 899fdba7..0b19fa77 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/polynomial_gcd_implementations.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/polynomial_gcd_implementations.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/polynomial_gcd_implementations.h $ -// $Id: polynomial_gcd_implementations.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/polynomial_gcd_implementations.h $ +// $Id: include/CGAL/Polynomial/polynomial_gcd_implementations.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -168,7 +168,7 @@ Polynomial gcd_utcf_Integral_domain( Polynomial p1, Polynomial p2){ Polynomial q, r; - // TODO measure preformance of both methodes with respect to + // TODO measure performance of both methodes with respect to // univariat polynomials on Integeres // univariat polynomials on Sqrt_extension // multivariat polynomials @@ -190,7 +190,7 @@ Polynomial gcd_utcf_Integral_domain( Polynomial p1, Polynomial p2){ CGAL::internal::hgdelta_update(h, g, delta); } #else - // implentaion using just the 'naive' methode + // implementation using just the 'naive' method // but performed much better as the one by Cohen // (for univariat polynomials with Sqrt_extension coeffs ) NT dummy; diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/polynomial_gcd_ntl.h b/thirdparty/CGAL/include/CGAL/Polynomial/polynomial_gcd_ntl.h index 5686d62f..d2d56e57 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/polynomial_gcd_ntl.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/polynomial_gcd_ntl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/polynomial_gcd_ntl.h $ -// $Id: polynomial_gcd_ntl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/polynomial_gcd_ntl.h $ +// $Id: include/CGAL/Polynomial/polynomial_gcd_ntl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/prs_resultant.h b/thirdparty/CGAL/include/CGAL/Polynomial/prs_resultant.h index 42777545..89b8caec 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/prs_resultant.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/prs_resultant.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/prs_resultant.h $ -// $Id: prs_resultant.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/prs_resultant.h $ +// $Id: include/CGAL/Polynomial/prs_resultant.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/resultant.h b/thirdparty/CGAL/include/CGAL/Polynomial/resultant.h index 0839a7aa..ea3f49b0 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/resultant.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/resultant.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/resultant.h $ -// $Id: resultant.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/resultant.h $ +// $Id: include/CGAL/Polynomial/resultant.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -45,8 +45,8 @@ namespace CGAL { // all other functions are used for dispatching. // The implementation uses interpolatation for multivariate polynomials // Due to the recursive structuture of CGAL::Polynomial it is better -// to write the function such that the inner most variabel is eliminated. -// However, CGAL::internal::resultant(F,G) eliminates the outer most variabel. +// to write the function such that the inner most variable is eliminated. +// However, CGAL::internal::resultant(F,G) eliminates the outer most variable. // This is due to backward compatibility issues with code base on EXACUS. // In turn CGAL::internal::resultant_(F,G) eliminates the innermost variable. @@ -390,7 +390,7 @@ inline Coeff resultant( const CGAL::Polynomial& F_, const CGAL::Polynomial& G_){ - // make the variable to be elimnated the innermost one. + // make the variable to be eliminated the innermost one. typedef CGAL::Polynomial_traits_d > PT; CGAL::Polynomial F = typename PT::Move()(F_, PT::d-1, 0); CGAL::Polynomial G = typename PT::Move()(G_, PT::d-1, 0); diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/square_free_factorize.h b/thirdparty/CGAL/include/CGAL/Polynomial/square_free_factorize.h index 98b186e1..bc3b3b46 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/square_free_factorize.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/square_free_factorize.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/square_free_factorize.h $ -// $Id: square_free_factorize.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/square_free_factorize.h $ +// $Id: include/CGAL/Polynomial/square_free_factorize.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/sturm_habicht_sequence.h b/thirdparty/CGAL/include/CGAL/Polynomial/sturm_habicht_sequence.h index b858a4de..f8105265 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/sturm_habicht_sequence.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/sturm_habicht_sequence.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/sturm_habicht_sequence.h $ -// $Id: sturm_habicht_sequence.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/sturm_habicht_sequence.h $ +// $Id: include/CGAL/Polynomial/sturm_habicht_sequence.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomial/subresultants.h b/thirdparty/CGAL/include/CGAL/Polynomial/subresultants.h index 1ede3b05..52890715 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial/subresultants.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial/subresultants.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial/subresultants.h $ -// $Id: subresultants.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial/subresultants.h $ +// $Id: include/CGAL/Polynomial/subresultants.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Kerber @@ -775,7 +775,7 @@ namespace CGAL { CGAL::Integral_domain_without_division_tag) { // polynomial_subresultants_with_cofactors requires // a model of IntegralDomain as coefficient type; - CGAL_static_assertion(sizeof(Polynomial_traits_d)==0); + static_assert(sizeof(Polynomial_traits_d)==0); return sres_out; } diff --git a/thirdparty/CGAL/include/CGAL/Polynomial_traits_d.h b/thirdparty/CGAL/include/CGAL/Polynomial_traits_d.h index 0f25f65b..2b6b371e 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial_traits_d.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial_traits_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial_traits_d.h $ -// $Id: Polynomial_traits_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial_traits_d.h $ +// $Id: include/CGAL/Polynomial_traits_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -389,7 +389,7 @@ class Polynomial_traits_d_base { struct Substitute_homogeneous{ public: // this is the end of the recursion - // begin contains the homogeneous variabel + // begin contains the homogeneous variable // hdegree is the remaining degree template typename @@ -462,7 +462,7 @@ class Polynomial_traits_d_base< Polynomial< Coefficient_type_ >, // We use our own Strict Weak Ordering predicate in order to avoid - // problems when calling sort for a Exponents_coeff_pair where the + // problems when calling sort for an `Exponents_coeff_pair` where the // coeff type has no comparison operators available. private: struct Compare_exponents_coeff_pair @@ -566,7 +566,7 @@ class Polynomial_traits_d_base< Polynomial< Coefficient_type_ >, template Polynomial_d construct_value_type(Input_iterator begin, Input_iterator end, NT) const { typedef CGAL::Coercion_traits CT; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); typename CT::Cast cast; return Polynomial_d( boost::make_transform_iterator(begin,cast), @@ -618,7 +618,7 @@ class Polynomial_traits_d_base< Polynomial< Coefficient_type_ >, operator()( Input_iterator begin, Input_iterator end ) const { if(begin == end ) return Polynomial_d(0); typedef typename std::iterator_traits::value_type value_type; - typedef Boolean_tag::value> + typedef Boolean_tag::value> Is_coeff; std::vector vec(begin,end); return construct(vec.begin(),vec.end(),Is_coeff()); @@ -667,7 +667,7 @@ class Polynomial_traits_d_base< Polynomial< Coefficient_type_ >, typedef Polynomial_traits_d PT; typename PT::Construct_polynomial construct; - CGAL_static_assertion(PT::d != 0); // Coefficient_type is a Polynomial + static_assert(PT::d != 0); // Coefficient_type is a Polynomial std::vector coefficients; Coefficient_type zero(0); @@ -999,7 +999,7 @@ class Polynomial_traits_d_base< Polynomial< Coefficient_type_ >, // Sign_at, Sign_at_homogeneous, Compare // define XXX_ even though ICoeff may not be Real_embeddable - // select propoer XXX among XXX_ or Null_functor using ::boost::mpl::if_ + // select propoer XXX among XXX_ or Null_functor using ::std::conditional_t private: struct Sign_at_ { private: @@ -1036,8 +1036,8 @@ class Polynomial_traits_d_base< Polynomial< Coefficient_type_ >, typedef Real_embeddable_traits RET_IC; typedef typename RET_IC::Is_real_embeddable IC_is_real_embeddable; public: - typedef typename ::boost::mpl::if_::type Sign_at; - typedef typename ::boost::mpl::if_::type Sign_at_homogeneous; + typedef std::conditional_t Sign_at; + typedef std::conditional_t Sign_at_homogeneous; typedef typename Real_embeddable_traits::Compare Compare; diff --git a/thirdparty/CGAL/include/CGAL/Polynomial_type_generator.h b/thirdparty/CGAL/include/CGAL/Polynomial_type_generator.h index 72b6fc3e..f6d7e3d1 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomial_type_generator.h +++ b/thirdparty/CGAL/include/CGAL/Polynomial_type_generator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/Polynomial_type_generator.h $ -// $Id: Polynomial_type_generator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/Polynomial_type_generator.h $ +// $Id: include/CGAL/Polynomial_type_generator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Polynomials_1_2.h b/thirdparty/CGAL/include/CGAL/Polynomials_1_2.h index 96ae2032..be7d7fba 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomials_1_2.h +++ b/thirdparty/CGAL/include/CGAL/Polynomials_1_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_circles/include/CGAL/Polynomials_1_2.h $ -// $Id: Polynomials_1_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_circles/include/CGAL/Polynomials_1_2.h $ +// $Id: include/CGAL/Polynomials_1_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Polynomials_1_3.h b/thirdparty/CGAL/include/CGAL/Polynomials_1_3.h index a72cdc50..0ccbf898 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomials_1_3.h +++ b/thirdparty/CGAL/include/CGAL/Polynomials_1_3.h @@ -9,8 +9,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_spheres/include/CGAL/Polynomials_1_3.h $ -// $Id: Polynomials_1_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_spheres/include/CGAL/Polynomials_1_3.h $ +// $Id: include/CGAL/Polynomials_1_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/Polynomials_2_2.h b/thirdparty/CGAL/include/CGAL/Polynomials_2_2.h index da2d8b45..8071123f 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomials_2_2.h +++ b/thirdparty/CGAL/include/CGAL/Polynomials_2_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_circles/include/CGAL/Polynomials_2_2.h $ -// $Id: Polynomials_2_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_circles/include/CGAL/Polynomials_2_2.h $ +// $Id: include/CGAL/Polynomials_2_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Polynomials_2_3.h b/thirdparty/CGAL/include/CGAL/Polynomials_2_3.h index 3318dc4b..bf914a9d 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomials_2_3.h +++ b/thirdparty/CGAL/include/CGAL/Polynomials_2_3.h @@ -9,8 +9,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_spheres/include/CGAL/Polynomials_2_3.h $ -// $Id: Polynomials_2_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_spheres/include/CGAL/Polynomials_2_3.h $ +// $Id: include/CGAL/Polynomials_2_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/Polynomials_for_line_3.h b/thirdparty/CGAL/include/CGAL/Polynomials_for_line_3.h index a23f6707..183f6908 100644 --- a/thirdparty/CGAL/include/CGAL/Polynomials_for_line_3.h +++ b/thirdparty/CGAL/include/CGAL/Polynomials_for_line_3.h @@ -9,8 +9,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_spheres/include/CGAL/Polynomials_for_line_3.h $ -// $Id: Polynomials_for_line_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_spheres/include/CGAL/Polynomials_for_line_3.h $ +// $Id: include/CGAL/Polynomials_for_line_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/Polytope_distance_d.h b/thirdparty/CGAL/include/CGAL/Polytope_distance_d.h index ce943f48..2954077a 100644 --- a/thirdparty/CGAL/include/CGAL/Polytope_distance_d.h +++ b/thirdparty/CGAL/include/CGAL/Polytope_distance_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polytope_distance_d/include/CGAL/Polytope_distance_d.h $ -// $Id: Polytope_distance_d.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polytope_distance_d/include/CGAL/Polytope_distance_d.h $ +// $Id: include/CGAL/Polytope_distance_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -473,7 +473,7 @@ class Polytope_distance_d { // NOTE: an implicit conversion from ET to RT must be available! Point realizing_point_p( ) const - { CGAL_optimisation_precondition( is_finite()); + { CGAL_precondition( is_finite()); return tco.construct_point_d_object() ( ambient_dimension(), realizing_point_p_coordinates_begin(), @@ -481,7 +481,7 @@ class Polytope_distance_d { Point realizing_point_q( ) const - { CGAL_optimisation_precondition( is_finite()); + { CGAL_precondition( is_finite()); return tco.construct_point_d_object() ( ambient_dimension(), realizing_point_q_coordinates_begin(), @@ -512,7 +512,7 @@ class Polytope_distance_d { std::copy( p_first, p_last, std::back_inserter( p_points)); std::copy( q_first, q_last, std::back_inserter( q_points)); set_dimension(); - CGAL_optimisation_precondition_msg + CGAL_precondition_msg (check_dimension( p_points.begin(), p_points.end()) && check_dimension( q_points.begin(), q_points.end()), "Not all points have the same dimension."); @@ -527,7 +527,7 @@ class Polytope_distance_d { p_points.clear(); std::copy( p_first, p_last, std::back_inserter( p_points)); set_dimension(); - CGAL_optimisation_precondition_msg + CGAL_precondition_msg (check_dimension( p_points.begin(), p_points.end()), "Not all points have the same dimension."); @@ -541,7 +541,7 @@ class Polytope_distance_d { q_points.clear(); std::copy( q_first, q_last, std::back_inserter( q_points)); set_dimension(); - CGAL_optimisation_precondition_msg + CGAL_precondition_msg (check_dimension( q_points.begin(), q_points.end()), "Not all points have the same dimension."); @@ -551,7 +551,7 @@ class Polytope_distance_d { void insert_p( const Point& p) { - CGAL_optimisation_precondition + CGAL_precondition ( ( ! is_finite()) || ( tco.access_dimension_d_object()( p) == d)); p_points.push_back( p); @@ -562,7 +562,7 @@ class Polytope_distance_d { void insert_q( const Point& q) { - CGAL_optimisation_precondition + CGAL_precondition ( ( ! is_finite()) || ( tco.access_dimension_d_object()( q) == d)); q_points.push_back( q); @@ -575,12 +575,12 @@ class Polytope_distance_d { insert( InputIterator1 p_first, InputIterator1 p_last, InputIterator2 q_first, InputIterator2 q_last) { - CGAL_optimisation_precondition_code(int old_r = static_cast(p_points.size())); - CGAL_optimisation_precondition_code(int old_s = static_cast(q_points.size())); + CGAL_precondition_code(int old_r = static_cast(p_points.size())); + CGAL_precondition_code(int old_s = static_cast(q_points.size())); p_points.insert( p_points.end(), p_first, p_last); q_points.insert( q_points.end(), q_first, q_last); set_dimension(); - CGAL_optimisation_precondition_msg + CGAL_precondition_msg (check_dimension( p_points.begin()+old_r, p_points.end()) && check_dimension( q_points.begin()+old_s, q_points.end()), "Not all points have the same dimension."); @@ -591,10 +591,10 @@ class Polytope_distance_d { void insert_p( InputIterator p_first, InputIterator p_last) { - CGAL_optimisation_precondition_code(int old_r = static_cast(p_points.size())); + CGAL_precondition_code(int old_r = static_cast(p_points.size())); p_points.insert( p_points.end(), p_first, p_last); set_dimension(); - CGAL_optimisation_precondition_msg + CGAL_precondition_msg (check_dimension( p_points.begin()+old_r, p_points.end()), "Not all points have the same dimension."); compute_distance(); @@ -604,10 +604,10 @@ class Polytope_distance_d { void insert_q( InputIterator q_first, InputIterator q_last) { - CGAL_optimisation_precondition_code( int old_s = static_cast(q_points.size())); + CGAL_precondition_code( int old_s = static_cast(q_points.size())); q_points.insert( q_points.end(), q_first, q_last); set_dimension(); - CGAL_optimisation_precondition_msg + CGAL_precondition_msg (check_dimension( q_points.begin()+old_s, q_points.end()), "Not all points have the same dimension."); compute_distance(); @@ -681,7 +681,7 @@ class Polytope_distance_d { // construct program int n = 2 * d + static_cast(p_points.size() + q_points.size()); int m = d + 2; - CGAL_optimisation_precondition (p_points.size() > 0); + CGAL_precondition (p_points.size() > 0); QP qp (n, m, A_iterator (boost::counting_iterator(0), @@ -696,7 +696,7 @@ class Polytope_distance_d { Quadratic_program_options options; options.set_pricing_strategy(pricing_strategy(NT())); solver = new Solver(qp, options); - CGAL_optimisation_assertion(solver->status() == QP_OPTIMAL); + CGAL_assertion(solver->status() == QP_OPTIMAL); // compute support and realizing points ET et_0 = 0; int r = static_cast(p_points.size()); @@ -773,8 +773,8 @@ is_valid( bool verbose, int level) const // compute normal vector ET_vector normal( d), diff( d); ET et_0 = 0, den = p_coords[d]; - CGAL_optimisation_assertion (den > et_0); - CGAL_optimisation_assertion (den == q_coords[d]); + CGAL_assertion (den > et_0); + CGAL_assertion (den == q_coords[d]); int i, j; for ( j = 0; j < d; ++j) normal[ j] = p_coords[ j] - q_coords[ j]; @@ -917,7 +917,7 @@ operator << ( std::ostream& os, break; default: - CGAL_optimisation_assertion_msg( false, + CGAL_assertion_msg( false, "CGAL::IO::get_mode( os) invalid!"); break; } diff --git a/thirdparty/CGAL/include/CGAL/Polytope_distance_d_traits_2.h b/thirdparty/CGAL/include/CGAL/Polytope_distance_d_traits_2.h index 5d3f3fa8..bb9816f3 100644 --- a/thirdparty/CGAL/include/CGAL/Polytope_distance_d_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Polytope_distance_d_traits_2.h @@ -7,9 +7,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polytope_distance_d/include/CGAL/Polytope_distance_d_traits_2.h $ -// $Id: Polytope_distance_d_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polytope_distance_d/include/CGAL/Polytope_distance_d_traits_2.h $ +// $Id: include/CGAL/Polytope_distance_d_traits_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Sven Schoenherr @@ -17,6 +17,9 @@ #ifndef CGAL_POLYTOPE_DISTANCE_D_TRAITS_2_H #define CGAL_POLYTOPE_DISTANCE_D_TRAITS_2_H +#include + + // includes # include # include diff --git a/thirdparty/CGAL/include/CGAL/Polytope_distance_d_traits_3.h b/thirdparty/CGAL/include/CGAL/Polytope_distance_d_traits_3.h index 61b9693a..353c350e 100644 --- a/thirdparty/CGAL/include/CGAL/Polytope_distance_d_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Polytope_distance_d_traits_3.h @@ -7,9 +7,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polytope_distance_d/include/CGAL/Polytope_distance_d_traits_3.h $ -// $Id: Polytope_distance_d_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polytope_distance_d/include/CGAL/Polytope_distance_d_traits_3.h $ +// $Id: include/CGAL/Polytope_distance_d_traits_3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Sven Schoenherr @@ -17,6 +17,9 @@ #ifndef CGAL_POLYTOPE_DISTANCE_D_TRAITS_3_H #define CGAL_POLYTOPE_DISTANCE_D_TRAITS_3_H +#include + + // includes # include # include diff --git a/thirdparty/CGAL/include/CGAL/Polytope_distance_d_traits_d.h b/thirdparty/CGAL/include/CGAL/Polytope_distance_d_traits_d.h index cd28bfff..975c058b 100644 --- a/thirdparty/CGAL/include/CGAL/Polytope_distance_d_traits_d.h +++ b/thirdparty/CGAL/include/CGAL/Polytope_distance_d_traits_d.h @@ -7,9 +7,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polytope_distance_d/include/CGAL/Polytope_distance_d_traits_d.h $ -// $Id: Polytope_distance_d_traits_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polytope_distance_d/include/CGAL/Polytope_distance_d_traits_d.h $ +// $Id: include/CGAL/Polytope_distance_d_traits_d.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Sven Schoenherr @@ -17,6 +17,9 @@ #ifndef CGAL_POLYTOPE_DISTANCE_D_TRAITS_D_H #define CGAL_POLYTOPE_DISTANCE_D_TRAITS_D_H +#include + + // includes # include # include diff --git a/thirdparty/CGAL/include/CGAL/Profile_counter.h b/thirdparty/CGAL/include/CGAL/Profile_counter.h index 6da00798..1bd1b304 100644 --- a/thirdparty/CGAL/include/CGAL/Profile_counter.h +++ b/thirdparty/CGAL/include/CGAL/Profile_counter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Profiling_tools/include/CGAL/Profile_counter.h $ -// $Id: Profile_counter.h a885f9b 2021-08-25T13:02:11+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Profiling_tools/include/CGAL/Profile_counter.h $ +// $Id: include/CGAL/Profile_counter.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Profile_timer.h b/thirdparty/CGAL/include/CGAL/Profile_timer.h index 051c1974..4fca3386 100644 --- a/thirdparty/CGAL/include/CGAL/Profile_timer.h +++ b/thirdparty/CGAL/include/CGAL/Profile_timer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Profiling_tools/include/CGAL/Profile_timer.h $ -// $Id: Profile_timer.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Profiling_tools/include/CGAL/Profile_timer.h $ +// $Id: include/CGAL/Profile_timer.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Projection_on_sphere_traits_3.h b/thirdparty/CGAL/include/CGAL/Projection_on_sphere_traits_3.h index 7029e8b8..89ed0caa 100644 --- a/thirdparty/CGAL/include/CGAL/Projection_on_sphere_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Projection_on_sphere_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_on_sphere_2/include/CGAL/Projection_on_sphere_traits_3.h $ -// $Id: Projection_on_sphere_traits_3.h a7f8957 2021-04-01T13:28:13+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_on_sphere_2/include/CGAL/Projection_on_sphere_traits_3.h $ +// $Id: include/CGAL/Projection_on_sphere_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mariette Yvinec, @@ -17,8 +17,7 @@ #include #include - -#include +#include #include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Projection_traits_3.h b/thirdparty/CGAL/include/CGAL/Projection_traits_3.h index d8d69f08..48becb36 100644 --- a/thirdparty/CGAL/include/CGAL/Projection_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Projection_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Projection_traits_3.h $ -// $Id: Projection_traits_3.h dacbd18 2021-08-30T12:35:34+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Projection_traits_3.h $ +// $Id: include/CGAL/Projection_traits_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Projection_traits_xy_3.h b/thirdparty/CGAL/include/CGAL/Projection_traits_xy_3.h index 87e279f2..3c247f6f 100644 --- a/thirdparty/CGAL/include/CGAL/Projection_traits_xy_3.h +++ b/thirdparty/CGAL/include/CGAL/Projection_traits_xy_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Projection_traits_xy_3.h $ -// $Id: Projection_traits_xy_3.h 404cf8f 2023-01-09T11:13:29+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Projection_traits_xy_3.h $ +// $Id: include/CGAL/Projection_traits_xy_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Projection_traits_xz_3.h b/thirdparty/CGAL/include/CGAL/Projection_traits_xz_3.h index b036acf6..bb2e7b87 100644 --- a/thirdparty/CGAL/include/CGAL/Projection_traits_xz_3.h +++ b/thirdparty/CGAL/include/CGAL/Projection_traits_xz_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Projection_traits_xz_3.h $ -// $Id: Projection_traits_xz_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Projection_traits_xz_3.h $ +// $Id: include/CGAL/Projection_traits_xz_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Projection_traits_yz_3.h b/thirdparty/CGAL/include/CGAL/Projection_traits_yz_3.h index 95d09ac7..5379a43c 100644 --- a/thirdparty/CGAL/include/CGAL/Projection_traits_yz_3.h +++ b/thirdparty/CGAL/include/CGAL/Projection_traits_yz_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Projection_traits_yz_3.h $ -// $Id: Projection_traits_yz_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Projection_traits_yz_3.h $ +// $Id: include/CGAL/Projection_traits_yz_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_functions.h b/thirdparty/CGAL/include/CGAL/QP_functions.h index d3d872cb..f851899a 100644 --- a/thirdparty/CGAL/include/CGAL/QP_functions.h +++ b/thirdparty/CGAL/include/CGAL/QP_functions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_functions.h $ -// $Id: QP_functions.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_functions.h $ +// $Id: include/CGAL/QP_functions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_models.h b/thirdparty/CGAL/include/CGAL/QP_models.h index 4d8d709d..c258e9f9 100644 --- a/thirdparty/CGAL/include/CGAL/QP_models.h +++ b/thirdparty/CGAL/include/CGAL/QP_models.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_models.h $ -// $Id: QP_models.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_models.h $ +// $Id: include/CGAL/QP_models.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -1514,7 +1514,7 @@ class Quadratic_program_from_mps : return this->err2("expected number after '%' in section '%'", t, D_section); - // multiply by two if approriate: + // multiply by two if appropriate: if (multiply_by_two) val *= NT(2); diff --git a/thirdparty/CGAL/include/CGAL/QP_options.h b/thirdparty/CGAL/include/CGAL/QP_options.h index 0518d96d..5c00868c 100644 --- a/thirdparty/CGAL/include/CGAL/QP_options.h +++ b/thirdparty/CGAL/include/CGAL/QP_options.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_options.h $ -// $Id: QP_options.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_options.h $ +// $Id: include/CGAL/QP_options.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -86,7 +86,7 @@ class Quadratic_program_options // verbosity // --------- // 0: silent - // 1: short iteration summary (recommened for the user) + // 1: short iteration summary (recommended for the user) // >= 2: output of internal details (not recommend for the user) int verbosity_; diff --git a/thirdparty/CGAL/include/CGAL/QP_solution.h b/thirdparty/CGAL/include/CGAL/QP_solution.h index 301b8fc9..38141d6c 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solution.h +++ b/thirdparty/CGAL/include/CGAL/QP_solution.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solution.h $ -// $Id: QP_solution.h 3f10219 2021-01-06T09:34:57+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solution.h $ +// $Id: include/CGAL/QP_solution.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -297,7 +297,7 @@ class Quadratic_program_solution: Handle_for*> Quadratic_program_solution () : Handle_for*>(), et0(0) { - *(this->ptr()) = 0; // unitialized solution + *(this->ptr()) = 0; // uninitialized solution } Quadratic_program_solution (const QP_solver_base* s) diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/Initialization.h b/thirdparty/CGAL/include/CGAL/QP_solver/Initialization.h index 28a2d25c..eb87cd0d 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/Initialization.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/Initialization.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/Initialization.h $ -// $Id: Initialization.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/Initialization.h $ +// $Id: include/CGAL/QP_solver/Initialization.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -13,6 +13,11 @@ // Franz Wessendorp // Kaspar Fischer +#ifndef CGAL_QP_SOLVER_INITIALIZATION_H +#define CGAL_QP_SOLVER_INITIALIZATION_H + +#include + #include #include @@ -182,7 +187,7 @@ init_x_O_v_i() x_O_v_i.reserve(qp_n); x_O_v_i.resize (qp_n); - // constants for comparisions: + // constants for comparisons: const L_entry l0(0); const U_entry u0(0); @@ -372,7 +377,7 @@ init_basis() // Note: we maintain the information about the special artificial column in // the variable art_s_i and the vector s_art; in addition, however, we also // add a special "fake" column to art_A. This "fake" column has (in - // constrast to the special artificial column) only one nonzero entry, + // contrast to the special artificial column) only one nonzero entry, // namely a +-1 for the most infeasible row (see (C1) above). // add "fake" column to art_A: @@ -578,7 +583,7 @@ init_solution() if (art_s_i > 0) minus_c_B[art_A.size()-1] *= ET(qp_n+qp_m); // Note: the idea here is to // give more weight to the - // special artifical variable + // special artificial variable // so that it gets removed very // early, - todo kf: why? @@ -664,3 +669,5 @@ init_additional_data_members() } //namespace CGAL // ===== EOF ================================================================== + +#endif //CGAL_QP_SOLVER_INITIALIZATION_H diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP__filtered_base.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP__filtered_base.h index dc9b6fde..be63e9ff 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP__filtered_base.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP__filtered_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP__filtered_base.h $ -// $Id: QP__filtered_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP__filtered_base.h $ +// $Id: include/CGAL/QP_solver/QP__filtered_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP__filtered_base_impl.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP__filtered_base_impl.h index b0156485..31327c03 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP__filtered_base_impl.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP__filtered_base_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP__filtered_base_impl.h $ -// $Id: QP__filtered_base_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP__filtered_base_impl.h $ +// $Id: include/CGAL/QP_solver/QP__filtered_base_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -13,6 +13,11 @@ // Franz Wessendorp // Kaspar Fischer +#ifndef CGAL_QP_FILTERED_BASE_IMPL_H +#define CGAL_QP_FILTERED_BASE_IMPL_H + +#include + namespace CGAL { // ============================= @@ -370,3 +375,5 @@ transition( ) } //namespace CGAL // ===== EOF ================================================================== + +#endif // CGAL_QP_FILTERED_BASE_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP__partial_base.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP__partial_base.h index fe311c8b..42dd703e 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP__partial_base.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP__partial_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP__partial_base.h $ -// $Id: QP__partial_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP__partial_base.h $ +// $Id: include/CGAL/QP_solver/QP__partial_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP_basis_inverse.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP_basis_inverse.h index bde23ef8..e1537eff 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP_basis_inverse.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP_basis_inverse.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP_basis_inverse.h $ -// $Id: QP_basis_inverse.h a925a64 2021-01-05T18:42:53+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP_basis_inverse.h $ +// $Id: include/CGAL/QP_solver/QP_basis_inverse.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP_basis_inverse_impl.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP_basis_inverse_impl.h index 51e73279..9efed172 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP_basis_inverse_impl.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP_basis_inverse_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h $ -// $Id: QP_basis_inverse_impl.h a91f023 2021-01-29T10:05:48+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h $ +// $Id: include/CGAL/QP_solver/QP_basis_inverse_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -13,6 +13,11 @@ // Franz Wessendorp // Kaspar Fischer +#ifndef CGAL_QP_SOLVER_QP_BASIS_INVERSE_IMPL_H +#define CGAL_QP_SOLVER_QP_BASIS_INVERSE_IMPL_H + +#include + namespace CGAL { // ============================= @@ -700,3 +705,5 @@ print( ) } //namespace CGAL // ===== EOF ================================================================== + +#endif //CGAL_QP_SOLVER_QP_BASIS_INVERSE_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP_exact_bland_pricing.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP_exact_bland_pricing.h index 6722aa41..36864494 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP_exact_bland_pricing.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP_exact_bland_pricing.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP_exact_bland_pricing.h $ -// $Id: QP_exact_bland_pricing.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP_exact_bland_pricing.h $ +// $Id: include/CGAL/QP_solver/QP_exact_bland_pricing.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP_full_exact_pricing.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP_full_exact_pricing.h index 62596fd4..813590f9 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP_full_exact_pricing.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP_full_exact_pricing.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP_full_exact_pricing.h $ -// $Id: QP_full_exact_pricing.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP_full_exact_pricing.h $ +// $Id: include/CGAL/QP_solver/QP_full_exact_pricing.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP_full_filtered_pricing.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP_full_filtered_pricing.h index cd809f4e..9942f4d2 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP_full_filtered_pricing.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP_full_filtered_pricing.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP_full_filtered_pricing.h $ -// $Id: QP_full_filtered_pricing.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP_full_filtered_pricing.h $ +// $Id: include/CGAL/QP_solver/QP_full_filtered_pricing.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP_functions_impl.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP_functions_impl.h index 0fe83c3f..42055d17 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP_functions_impl.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP_functions_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP_functions_impl.h $ -// $Id: QP_functions_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP_functions_impl.h $ +// $Id: include/CGAL/QP_solver/QP_functions_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP_partial_exact_pricing.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP_partial_exact_pricing.h index c7e9f6fa..d98d2938 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP_partial_exact_pricing.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP_partial_exact_pricing.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP_partial_exact_pricing.h $ -// $Id: QP_partial_exact_pricing.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP_partial_exact_pricing.h $ +// $Id: include/CGAL/QP_solver/QP_partial_exact_pricing.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP_partial_filtered_pricing.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP_partial_filtered_pricing.h index e272e6e2..be3f7b1d 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP_partial_filtered_pricing.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP_partial_filtered_pricing.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP_partial_filtered_pricing.h $ -// $Id: QP_partial_filtered_pricing.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP_partial_filtered_pricing.h $ +// $Id: include/CGAL/QP_solver/QP_partial_filtered_pricing.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP_pricing_strategy.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP_pricing_strategy.h index a7e0f29f..105b40b3 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP_pricing_strategy.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP_pricing_strategy.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP_pricing_strategy.h $ -// $Id: QP_pricing_strategy.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP_pricing_strategy.h $ +// $Id: include/CGAL/QP_solver/QP_pricing_strategy.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP_solution_impl.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP_solution_impl.h index 60bff050..ed34ee68 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP_solution_impl.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP_solution_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP_solution_impl.h $ -// $Id: QP_solution_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP_solution_impl.h $ +// $Id: include/CGAL/QP_solver/QP_solution_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver.h index 6f44a40a..52732454 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP_solver.h $ -// $Id: QP_solver.h a91f023 2021-01-29T10:05:48+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP_solver.h $ +// $Id: include/CGAL/QP_solver/QP_solver.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -55,7 +55,7 @@ class QP_solver; template class QP_solution; -namespace QP_solver_impl { // namespace for implemenation details +namespace QP_solver_impl { // namespace for implementation details // -------------- // Tags generator // -------------- @@ -266,7 +266,7 @@ class QP_solver : public QP_solver_base { A_row_by_index_iterator; // Access to the matrix D sometimes converts to ET, and - // sometimes retruns the original input type + // sometimes returns the original input type typedef QP_matrix_pairwise_accessor< D_iterator, ET > D_pairwise_accessor; typedef boost::transform_iterator @@ -671,7 +671,7 @@ class QP_solver : public QP_solver_base { // - UPPER: the variable is sitting on its upper bound. // - FIXED: the variable is sitting on its lower and upper bound. // - ZERO: the variable has value zero and is sitting on its lower - // bound, its upper bound, or betweeen the two bounds. + // bound, its upper bound, or between the two bounds. // // Note: in the latter case you can call state_of_zero_nonbasic_variable() // to find out which bound is active, if any. diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver_bounds_impl.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver_bounds_impl.h index 3952b0bf..2ecdf67e 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver_bounds_impl.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver_bounds_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP_solver_bounds_impl.h $ -// $Id: QP_solver_bounds_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP_solver_bounds_impl.h $ +// $Id: include/CGAL/QP_solver/QP_solver_bounds_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -13,6 +13,11 @@ // Franz Wessendorp // Kaspar Fischer +#ifndef CGAL_QP_SOLVER_QP_SOLVER_BOUNDS_IMPL_H +#define CGAL_QP_SOLVER_QP_SOLVER_BOUNDS_IMPL_H + +#include + namespace CGAL { template < typename Q, typename ET, typename Tags > @@ -89,3 +94,5 @@ QP_solver::upper_bnd(int i) const } //namespace CGAL // ===== EOF ================================================================== + +#endif //CGAL_QP_SOLVER_QP_SOLVER_BOUNDS_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver_impl.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver_impl.h index 4f54b204..85bb02e9 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver_impl.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP_solver_impl.h $ -// $Id: QP_solver_impl.h 3f10219 2021-01-06T09:34:57+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP_solver_impl.h $ +// $Id: include/CGAL/QP_solver/QP_solver_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -13,6 +13,11 @@ // Franz Wessendorp // Kaspar Fischer +#ifndef CGAL_QP_SOLVER_IMPL_H +#define CGAL_QP_SOLVER_IMPL_H + +#include + #include #include @@ -1024,7 +1029,7 @@ ratio_test_2( Tag_false) // where x(mu_j(t_1)) is the current solution of the solver at this point // (i.e., at the beginning of ratio step 2). // - // By subtracting (2) from (1) we can thus eliminate the "unkown" x(0) + // By subtracting (2) from (1) we can thus eliminate the "unknown" x(0) // (which is cheaper than computing it): // // x(mu_j) = x(mu_j(t_1)) + (mu_j-mu_j(t_1)) q_it @@ -2831,7 +2836,7 @@ check_basis_inverse( Tag_true) Value_iterator q_it; - // BG: is this a real check?? How does the special artifical + // BG: is this a real check?? How does the special artificial // variable come in, e.g.? OK: it comes in through // ratio_test_init__A_Cj for ( col = 0; col < cols; ++col, ++i_it) { @@ -3393,3 +3398,5 @@ get_l() const } //namespace CGAL // ===== EOF ================================================================== + +#endif //CGAL_QP_SOLVER_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver_nonstandardform_impl.h b/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver_nonstandardform_impl.h index 4f6c0928..300cbedc 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver_nonstandardform_impl.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/QP_solver_nonstandardform_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/QP_solver_nonstandardform_impl.h $ -// $Id: QP_solver_nonstandardform_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/QP_solver_nonstandardform_impl.h $ +// $Id: include/CGAL/QP_solver/QP_solver_nonstandardform_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -13,6 +13,11 @@ // Franz Wessendorp // Kaspar Fischer +#ifndef CGAL_QP_SOLVER_NONSTANDARDFORM_IMPL_H +#define CGAL_QP_SOLVER_NONSTANDARDFORM_IMPL_H + +#include + namespace CGAL { // Looks in x_O_v_i which bound is present for variable i and returns @@ -219,3 +224,5 @@ init_w() } //namespace CGAL // ===== EOF ================================================================== + +#endif // CGAL_QP_SOLVER_NONSTANDARDFORM_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/Unbounded_direction.h b/thirdparty/CGAL/include/CGAL/QP_solver/Unbounded_direction.h index 810496e1..02598034 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/Unbounded_direction.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/Unbounded_direction.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/Unbounded_direction.h $ -// $Id: Unbounded_direction.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/Unbounded_direction.h $ +// $Id: include/CGAL/QP_solver/Unbounded_direction.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/assertions.h b/thirdparty/CGAL/include/CGAL/QP_solver/assertions.h index 829c35c9..b35ce9ab 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/assertions.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/assertions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/assertions.h $ -// $Id: assertions.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/assertions.h $ +// $Id: include/CGAL/QP_solver/assertions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/basic.h b/thirdparty/CGAL/include/CGAL/QP_solver/basic.h index 1c721b1d..7e46ff0e 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/basic.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/basic.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/basic.h $ -// $Id: basic.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/basic.h $ +// $Id: include/CGAL/QP_solver/basic.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/debug.h b/thirdparty/CGAL/include/CGAL/QP_solver/debug.h index e4e06975..fab62514 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/debug.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/debug.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/debug.h $ -// $Id: debug.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/debug.h $ +// $Id: include/CGAL/QP_solver/debug.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/QP_solver/functors.h b/thirdparty/CGAL/include/CGAL/QP_solver/functors.h index 3f5883c6..e83001c3 100644 --- a/thirdparty/CGAL/include/CGAL/QP_solver/functors.h +++ b/thirdparty/CGAL/include/CGAL/QP_solver/functors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/QP_solver/include/CGAL/QP_solver/functors.h $ -// $Id: functors.h 1257ec0 2022-05-09T18:25:41+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/QP_solver/include/CGAL/QP_solver/functors.h $ +// $Id: include/CGAL/QP_solver/functors.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/AlphaShapeGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/AlphaShapeGraphicsItem.h index 20c46872..3fa253d0 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/AlphaShapeGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/AlphaShapeGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/AlphaShapeGraphicsItem.h $ -// $Id: AlphaShapeGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/AlphaShapeGraphicsItem.h $ +// $Id: include/CGAL/Qt/AlphaShapeGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/ApolloniusGraphGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/ApolloniusGraphGraphicsItem.h index 6d6c8eb1..06a7c2b3 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/ApolloniusGraphGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/ApolloniusGraphGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/ApolloniusGraphGraphicsItem.h $ -// $Id: ApolloniusGraphGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/ApolloniusGraphGraphicsItem.h $ +// $Id: include/CGAL/Qt/ApolloniusGraphGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/Basic_viewer_qt.h b/thirdparty/CGAL/include/CGAL/Qt/Basic_viewer_qt.h index f59f0273..f1b58343 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/Basic_viewer_qt.h +++ b/thirdparty/CGAL/include/CGAL/Qt/Basic_viewer_qt.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h $ -// $Id: Basic_viewer_qt.h 0b63b76 2022-07-25T16:51:38+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/Basic_viewer_qt.h $ +// $Id: include/CGAL/Qt/Basic_viewer_qt.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #ifdef __GNUC__ @@ -1779,9 +1779,9 @@ class Basic_viewer_qt : public CGAL::QGLViewer static const unsigned int NB_VBO_BUFFERS=(END_POS-BEGIN_POS)+ (END_COLOR-BEGIN_COLOR)+2; // +2 for 2 vectors of normals - QGLBuffer buffers[NB_VBO_BUFFERS]; + QOpenGLBuffer buffers[NB_VBO_BUFFERS]; - // The following enum gives the indices of the differents vao. + // The following enum gives the indices of the different vao. enum { VAO_MONO_POINTS=0, VAO_COLORED_POINTS, @@ -1816,8 +1816,8 @@ class Basic_viewer_qt : public CGAL::QGLViewer namespace CGAL { - template - void draw(const T&, const char* ="", bool=false) + template + void draw(T...) { std::cerr<<"Impossible to draw, CGAL_USE_BASIC_VIEWER is not defined."< + + #include -#if defined(CGAL_Qt5_DLL) -# if defined(CGAL_Qt5_EXPORTS) +#if defined(CGAL_Qt6_DLL) +# if defined(CGAL_Qt6_EXPORTS) # define CGAL_QT_EXPORT Q_DECL_EXPORT # else # define CGAL_QT_EXPORT Q_DECL_IMPORT diff --git a/thirdparty/CGAL/include/CGAL/Qt/CircularArcGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/CircularArcGraphicsItem.h index e21cdefd..a54b275d 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/CircularArcGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/CircularArcGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/CircularArcGraphicsItem.h $ -// $Id: CircularArcGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/CircularArcGraphicsItem.h $ +// $Id: include/CGAL/Qt/CircularArcGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/ConstrainedTriangulationGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/ConstrainedTriangulationGraphicsItem.h index 3a055723..d2531153 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/ConstrainedTriangulationGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/ConstrainedTriangulationGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/ConstrainedTriangulationGraphicsItem.h $ -// $Id: ConstrainedTriangulationGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/ConstrainedTriangulationGraphicsItem.h $ +// $Id: include/CGAL/Qt/ConstrainedTriangulationGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/Converter.h b/thirdparty/CGAL/include/CGAL/Qt/Converter.h index 63dc8c72..88d845a3 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/Converter.h +++ b/thirdparty/CGAL/include/CGAL/Qt/Converter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/Converter.h $ -// $Id: Converter.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/Converter.h $ +// $Id: include/CGAL/Qt/Converter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -167,6 +167,15 @@ class Converter { return qp; } + QPolygonF operator()(const std::list< CGAL_Point_2 >& p) const + { + QPolygonF qp; + for(int i = 0; i < p.size(); i++){ + qp << operator()(p[i]); + } + return qp; + } + void operator()(std::list< CGAL_Point_2 >& p, const QPolygonF& qp) const { diff --git a/thirdparty/CGAL/include/CGAL/Qt/CreateOpenGLContext.h b/thirdparty/CGAL/include/CGAL/Qt/CreateOpenGLContext.h index 5b7a8829..8d4c9ee9 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/CreateOpenGLContext.h +++ b/thirdparty/CGAL/include/CGAL/Qt/CreateOpenGLContext.h @@ -3,29 +3,31 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h $ -// $Id: CreateOpenGLContext.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h $ +// $Id: include/CGAL/Qt/CreateOpenGLContext.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Laurent Rineau and Maxime Gimeno #ifndef CGAL_QT_CREATE_OPENGL_CONTEXT_H #define CGAL_QT_CREATE_OPENGL_CONTEXT_H +#include + + #include -#include + namespace CGAL{ namespace Qt{ -inline QGLContext* createOpenGLContext() +inline QOpenGLContext* createOpenGLContext() { QOpenGLContext *context = new QOpenGLContext(); QSurfaceFormat format; format.setVersion(2,1); format.setProfile(QSurfaceFormat::CompatibilityProfile); context->setFormat(format); - QGLContext *result = QGLContext::fromOpenGLContext(context); - result->create(); - return result; + context->create(); + return context; } } // namespace Qt } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Qt/DelaunayMeshTriangulationGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/DelaunayMeshTriangulationGraphicsItem.h index a454210a..29497e1f 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/DelaunayMeshTriangulationGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/DelaunayMeshTriangulationGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/DelaunayMeshTriangulationGraphicsItem.h $ -// $Id: DelaunayMeshTriangulationGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/DelaunayMeshTriangulationGraphicsItem.h $ +// $Id: include/CGAL/Qt/DelaunayMeshTriangulationGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/DemosMainWindow.h b/thirdparty/CGAL/include/CGAL/Qt/DemosMainWindow.h index de3f3279..21c9ab05 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/DemosMainWindow.h +++ b/thirdparty/CGAL/include/CGAL/Qt/DemosMainWindow.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/DemosMainWindow.h $ -// $Id: DemosMainWindow.h b80daff 2021-02-19T11:29:38+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/DemosMainWindow.h $ +// $Id: include/CGAL/Qt/DemosMainWindow.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -89,12 +89,12 @@ public Q_SLOTS: protected Q_SLOTS: void setUseAntialiasing(bool checked); - void setUseOpenGL(bool checked); void popupAboutCGAL(); void popupAboutDemo(); +#if QT_SVG_LIB void exportSVG(); - +#endif void openRecentFile_aux(); void addToRecentFiles(QString fileName); void updateRecentFileActions(); @@ -107,7 +107,6 @@ protected Q_SLOTS: GraphicsViewNavigation* navigation; QLabel* xycoord ; - QAction *actionUse_OpenGL; QAction *actionUse_Antialiasing; QAction *actionAbout; QAction *actionAboutCGAL; diff --git a/thirdparty/CGAL/include/CGAL/Qt/DemosMainWindow_impl.h b/thirdparty/CGAL/include/CGAL/Qt/DemosMainWindow_impl.h index 2edb1def..f876beab 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/DemosMainWindow_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/DemosMainWindow_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/DemosMainWindow_impl.h $ -// $Id: DemosMainWindow_impl.h c9a020b 2021-02-09T12:12:56+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/DemosMainWindow_impl.h $ +// $Id: include/CGAL/Qt/DemosMainWindow_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -32,15 +32,14 @@ #include #include #include -#include #include #include #include -#include -#include -#include +#include +#if QT_SVG_LIB +# include +#endif #include -#include #include // needed to get CGAL_VERSION_STR #include @@ -61,13 +60,6 @@ DemosMainWindow::DemosMainWindow(QWidget * parent, ::Qt::WindowFlags flags) xycoord->setMinimumSize(xycoord->sizeHint()); xycoord->clear(); - actionUse_OpenGL = new QAction(this); - actionUse_OpenGL->setObjectName("actionUse_OpenGL"); - actionUse_OpenGL->setCheckable(true); - actionUse_OpenGL->setText(tr("Use &OpenGL")); - actionUse_OpenGL->setStatusTip(tr("Make Qt use OpenGL to display the graphical items, instead of its native painting system.")); - actionUse_OpenGL->setShortcut(tr("Ctrl+G")); - actionUse_Antialiasing = new QAction(this); actionUse_Antialiasing->setObjectName("actionUse_Antialiasing"); actionUse_Antialiasing->setCheckable(true); @@ -150,15 +142,13 @@ DemosMainWindow::setupOptionsMenu(QMenu* menuOptions) if(!menuOptions->isEmpty()) { menuOptions->addSeparator(); } - menuOptions->addAction(actionUse_OpenGL); menuOptions->addAction(actionUse_Antialiasing); connect(actionUse_Antialiasing, SIGNAL(toggled(bool)), this, SLOT(setUseAntialiasing(bool))); - connect(actionUse_OpenGL, SIGNAL(toggled(bool)), - this, SLOT(setUseOpenGL(bool))); actionUse_Antialiasing->setChecked(true); } +#if QT_SVG_LIB CGAL_INLINE_FUNCTION void DemosMainWindow::setupExportSVG(QAction* action, QGraphicsView* view) @@ -189,6 +179,7 @@ void DemosMainWindow::exportSVG() this->view->render(&painter); painter.end(); } +#endif // QT_SVG_LIB CGAL_INLINE_FUNCTION void @@ -200,31 +191,6 @@ DemosMainWindow::setUseAntialiasing(bool checked) 1000); } -CGAL_INLINE_FUNCTION -void -DemosMainWindow::setUseOpenGL(bool checked) -{ - if(checked) { - QGLWidget* new_viewport = new QGLWidget; - - // Setup the format to allow antialiasing with OpenGL: - // one need to activate the SampleBuffers, if the graphic driver allows - // this. - QGLFormat glformat = new_viewport->format(); - glformat.setOption(QGL::SampleBuffers); - new_viewport->setFormat(glformat); - - view->setViewport(new_viewport); - } - else { - view->setViewport(new QWidget); - } - statusBar()->showMessage(tr("OpenGL %1activated").arg(checked?"":"de-"), - 1000); - view->viewport()->installEventFilter(navigation); - view->setFocus(); -} - CGAL_INLINE_FUNCTION QMenu* DemosMainWindow::getMenu(QString objectName, QString title) @@ -449,13 +415,7 @@ void DemosMainWindow::readState(QString groupname, Options /*what_to_save*/) resize(settings.value("size", this->size()).toSize()); QPoint pos = settings.value("pos", this->pos()).toPoint(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) if(QGuiApplication::screenAt(pos)) { -#else - QDesktopWidget* desktop = qApp->desktop(); - if(desktop->availableGeometry(pos).contains(pos)) { -#endif - move(pos); } settings.endGroup(); diff --git a/thirdparty/CGAL/include/CGAL/Qt/GraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/GraphicsItem.h index 9952fd0c..fa95736c 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/GraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/GraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/GraphicsItem.h $ -// $Id: GraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/GraphicsItem.h $ +// $Id: include/CGAL/Qt/GraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewCircleInput.h b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewCircleInput.h index d4a0b463..1f9b2fcc 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewCircleInput.h +++ b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewCircleInput.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/GraphicsViewCircleInput.h $ -// $Id: GraphicsViewCircleInput.h e28a3ac 2020-06-02T12:55:25+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/GraphicsViewCircleInput.h $ +// $Id: include/CGAL/Qt/GraphicsViewCircleInput.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewCircularArcInput.h b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewCircularArcInput.h index 8d9c7528..2fe75c11 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewCircularArcInput.h +++ b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewCircularArcInput.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/GraphicsViewCircularArcInput.h $ -// $Id: GraphicsViewCircularArcInput.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/GraphicsViewCircularArcInput.h $ +// $Id: include/CGAL/Qt/GraphicsViewCircularArcInput.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewInput.h b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewInput.h index d10808f5..460d7707 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewInput.h +++ b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewInput.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/GraphicsViewInput.h $ -// $Id: GraphicsViewInput.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/GraphicsViewInput.h $ +// $Id: include/CGAL/Qt/GraphicsViewInput.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewIsoRectangleInput.h b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewIsoRectangleInput.h index 4d1b7507..321c859b 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewIsoRectangleInput.h +++ b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewIsoRectangleInput.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/GraphicsViewIsoRectangleInput.h $ -// $Id: GraphicsViewIsoRectangleInput.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/GraphicsViewIsoRectangleInput.h $ +// $Id: include/CGAL/Qt/GraphicsViewIsoRectangleInput.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewLineInput.h b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewLineInput.h index b5a24f8f..2385ec0e 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewLineInput.h +++ b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewLineInput.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/GraphicsViewLineInput.h $ -// $Id: GraphicsViewLineInput.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/GraphicsViewLineInput.h $ +// $Id: include/CGAL/Qt/GraphicsViewLineInput.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewNavigation.h b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewNavigation.h index 86a7beab..464d90c8 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewNavigation.h +++ b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewNavigation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/GraphicsViewNavigation.h $ -// $Id: GraphicsViewNavigation.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/GraphicsViewNavigation.h $ +// $Id: include/CGAL/Qt/GraphicsViewNavigation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewNavigation_impl.h b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewNavigation_impl.h index 4ebb9eca..72a4482f 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewNavigation_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewNavigation_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/GraphicsViewNavigation_impl.h $ -// $Id: GraphicsViewNavigation_impl.h a9795c3 2020-06-11T13:11:36+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/GraphicsViewNavigation_impl.h $ +// $Id: include/CGAL/Qt/GraphicsViewNavigation_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPointInput.h b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPointInput.h index 4df43fdd..448836b1 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPointInput.h +++ b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPointInput.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Qt/GraphicsViewPointInput.h $ -// $Id: GraphicsViewPointInput.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Qt/GraphicsViewPointInput.h $ +// $Id: include/CGAL/Qt/GraphicsViewPointInput.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial #ifndef CGAL_QT_GRAPHICS_VIEW_POINT_INPUT_H diff --git a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h index 8f685546..4ed097d9 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h +++ b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h $ -// $Id: GraphicsViewPolygonWithHolesInput.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h $ +// $Id: include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPolylineInput.h b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPolylineInput.h index 3e85166e..c5e51f92 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPolylineInput.h +++ b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPolylineInput.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput.h $ -// $Id: GraphicsViewPolylineInput.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput.h $ +// $Id: include/CGAL/Qt/GraphicsViewPolylineInput.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -58,12 +58,12 @@ class CGAL_QT_EXPORT GraphicsViewPolylineInput_non_templated_base : public Graph bool closed = true); - // mousePressEvent returns true iff the event is consummed + // mousePressEvent returns true iff the event is consumed bool mousePressEvent(QGraphicsSceneMouseEvent *event); void mouseMoveEvent(QGraphicsSceneMouseEvent *event); - // keyPressEvent returns true iff the event is consummed + // keyPressEvent returns true iff the event is consumed bool keyPressEvent(QKeyEvent *event); void rubberbands(const QPointF& p); diff --git a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPolylineInput_impl.h b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPolylineInput_impl.h index 8bdb3c1b..ebc2328e 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPolylineInput_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/GraphicsViewPolylineInput_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput_impl.h $ -// $Id: GraphicsViewPolylineInput_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput_impl.h $ +// $Id: include/CGAL/Qt/GraphicsViewPolylineInput_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/ImageInterface.ui b/thirdparty/CGAL/include/CGAL/Qt/ImageInterface.ui new file mode 100644 index 00000000..0dfa667b --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Qt/ImageInterface.ui @@ -0,0 +1,306 @@ + + + ImageInterface + + + + 0 + 0 + 484 + 447 + + + + Image Settings + + + + 6 + + + 9 + + + 9 + + + 9 + + + 9 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Height of the image (in pixels) + + + px + + + 1 + + + 32000 + + + + + + + Width of the image (in pixels) + + + px + + + 1 + + + 32000 + + + + + + + Width + + + + + + + Qt::Horizontal + + + + 20 + 22 + + + + + + + + Height + + + + + + + Keep Ratio + + + true + + + + + + + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Oversampling + + + + + + + Antialiases image (when larger then 1.0) + + + x + + + 1 + + + 0.100000000000000 + + + 64.000000000000000 + + + 1.000000000000000 + + + 1.000000000000000 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + Use current background color + + + + + Use transparent background + + + + + Choose background color + + + + + + + + When image aspect ratio differs from viewer's one, expand frustum as needed. Fits inside current frustum otherwise. + + + Expand Frustum if Needed + + + + + + + Qt::Vertical + + + + 20 + 16 + + + + + + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Horizontal + + + + 131 + 31 + + + + + + + + OK + + + + + + + Cancel + + + + + + + + + + + okButton + clicked() + ImageInterface + accept() + + + 135 + 184 + + + 96 + 254 + + + + + cancelButton + clicked() + ImageInterface + reject() + + + 226 + 184 + + + 179 + 282 + + + + + diff --git a/thirdparty/CGAL/include/CGAL/Qt/LineGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/LineGraphicsItem.h index 6e385fb7..6cd2a83a 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/LineGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/LineGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/LineGraphicsItem.h $ -// $Id: LineGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/LineGraphicsItem.h $ +// $Id: include/CGAL/Qt/LineGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/PainterOstream.h b/thirdparty/CGAL/include/CGAL/Qt/PainterOstream.h index e1e3af56..d7aad2f2 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/PainterOstream.h +++ b/thirdparty/CGAL/include/CGAL/Qt/PainterOstream.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/PainterOstream.h $ -// $Id: PainterOstream.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/PainterOstream.h $ +// $Id: include/CGAL/Qt/PainterOstream.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/PointsGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/PointsGraphicsItem.h index ed047890..dca36df3 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/PointsGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/PointsGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/PointsGraphicsItem.h $ -// $Id: PointsGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/PointsGraphicsItem.h $ +// $Id: include/CGAL/Qt/PointsGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/PointsInKdTreeGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/PointsInKdTreeGraphicsItem.h index 4bf2f8bb..b6af4c95 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/PointsInKdTreeGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/PointsInKdTreeGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/PointsInKdTreeGraphicsItem.h $ -// $Id: PointsInKdTreeGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/PointsInKdTreeGraphicsItem.h $ +// $Id: include/CGAL/Qt/PointsInKdTreeGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/PolygonGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/PolygonGraphicsItem.h index b50e1bb2..38f2af15 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/PolygonGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/PolygonGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/PolygonGraphicsItem.h $ -// $Id: PolygonGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/PolygonGraphicsItem.h $ +// $Id: include/CGAL/Qt/PolygonGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/PolygonWithHolesGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/PolygonWithHolesGraphicsItem.h index da2ab4d7..9fbdb976 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/PolygonWithHolesGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/PolygonWithHolesGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/PolygonWithHolesGraphicsItem.h $ -// $Id: PolygonWithHolesGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/PolygonWithHolesGraphicsItem.h $ +// $Id: include/CGAL/Qt/PolygonWithHolesGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/PolylinesGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/PolylinesGraphicsItem.h index 15f47123..1de0ff7f 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/PolylinesGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/PolylinesGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/PolylinesGraphicsItem.h $ -// $Id: PolylinesGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/PolylinesGraphicsItem.h $ +// $Id: include/CGAL/Qt/PolylinesGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/PowerdiagramGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/PowerdiagramGraphicsItem.h index caf298b7..be4ba1b3 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/PowerdiagramGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/PowerdiagramGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/PowerdiagramGraphicsItem.h $ -// $Id: PowerdiagramGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/PowerdiagramGraphicsItem.h $ +// $Id: include/CGAL/Qt/PowerdiagramGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/RegularGridGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/RegularGridGraphicsItem.h index 8adb26eb..f9a5e1b0 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/RegularGridGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/RegularGridGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/RegularGridGraphicsItem.h $ -// $Id: RegularGridGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/RegularGridGraphicsItem.h $ +// $Id: include/CGAL/Qt/RegularGridGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/RegularGridVectorFieldGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/RegularGridVectorFieldGraphicsItem.h index 8e5ca351..fd23f465 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/RegularGridVectorFieldGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/RegularGridVectorFieldGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/RegularGridVectorFieldGraphicsItem.h $ -// $Id: RegularGridVectorFieldGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/RegularGridVectorFieldGraphicsItem.h $ +// $Id: include/CGAL/Qt/RegularGridVectorFieldGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/RegularTriangulationGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/RegularTriangulationGraphicsItem.h index f9f59de2..ef5c36bf 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/RegularTriangulationGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/RegularTriangulationGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/RegularTriangulationGraphicsItem.h $ -// $Id: RegularTriangulationGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/RegularTriangulationGraphicsItem.h $ +// $Id: include/CGAL/Qt/RegularTriangulationGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h index 4308abb8..dd44c4bd 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h $ -// $Id: SegmentDelaunayGraphGraphicsItem.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h $ +// $Id: include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h index 7f149356..ba986182 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h $ -// $Id: SegmentDelaunayGraphLinfGraphicsItem.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h $ +// $Id: include/CGAL/Qt/SegmentDelaunayGraphLinfGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/SegmentsGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/SegmentsGraphicsItem.h index 6f0347ed..40f95e86 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/SegmentsGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/SegmentsGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/SegmentsGraphicsItem.h $ -// $Id: SegmentsGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/SegmentsGraphicsItem.h $ +// $Id: include/CGAL/Qt/SegmentsGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/StreamLinesGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/StreamLinesGraphicsItem.h index ed07bf9c..6c1b9a58 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/StreamLinesGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/StreamLinesGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/StreamLinesGraphicsItem.h $ -// $Id: StreamLinesGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/StreamLinesGraphicsItem.h $ +// $Id: include/CGAL/Qt/StreamLinesGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/TriangulationGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/TriangulationGraphicsItem.h index c013e0ec..e2f6a4b9 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/TriangulationGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/TriangulationGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/TriangulationGraphicsItem.h $ -// $Id: TriangulationGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/TriangulationGraphicsItem.h $ +// $Id: include/CGAL/Qt/TriangulationGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/VoronoiGraphicsItem.h b/thirdparty/CGAL/include/CGAL/Qt/VoronoiGraphicsItem.h index 56f292d8..346bef6e 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/VoronoiGraphicsItem.h +++ b/thirdparty/CGAL/include/CGAL/Qt/VoronoiGraphicsItem.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/VoronoiGraphicsItem.h $ -// $Id: VoronoiGraphicsItem.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/VoronoiGraphicsItem.h $ +// $Id: include/CGAL/Qt/VoronoiGraphicsItem.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/camera.h b/thirdparty/CGAL/include/CGAL/Qt/camera.h index 4cbaef5c..2d3d10c1 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/camera.h +++ b/thirdparty/CGAL/include/CGAL/Qt/camera.h @@ -6,13 +6,14 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/camera.h $ -// $Id: camera.h b32619f 2022-05-16T17:12:00+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/camera.h $ +// $Id: include/CGAL/Qt/camera.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifndef QGLVIEWER_CAMERA_H #define QGLVIEWER_CAMERA_H +#include #include #include #include diff --git a/thirdparty/CGAL/include/CGAL/Qt/camera_impl.h b/thirdparty/CGAL/include/CGAL/Qt/camera_impl.h index 43366740..4a40fa41 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/camera_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/camera_impl.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/camera_impl.h $ -// $Id: camera_impl.h 225e3c2 2022-05-12T12:39:21+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/camera_impl.h $ +// $Id: include/CGAL/Qt/camera_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifdef CGAL_HEADER_ONLY @@ -1301,7 +1301,7 @@ void Camera::setFromProjectionMatrix(const qreal matrix[12]) { // divide the first 3 coordinates by the 4th one. // We derive the 4 dimensional vectorial product formula from the - // computation of a 4x4 determinant that is developped according to + // computation of a 4x4 determinant that is developed according to // its 4th column. This implies some 3x3 determinants. const Vec cam_pos = Vec(det(matrix[ind(0, 1)], matrix[ind(0, 2)], matrix[ind(0, 3)], diff --git a/thirdparty/CGAL/include/CGAL/Qt/constraint.h b/thirdparty/CGAL/include/CGAL/Qt/constraint.h index 19e02d98..1cb6b427 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/constraint.h +++ b/thirdparty/CGAL/include/CGAL/Qt/constraint.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/constraint.h $ -// $Id: constraint.h 1ef976e 2019-10-19T16:09:56+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/constraint.h $ +// $Id: include/CGAL/Qt/constraint.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifndef QGLVIEWER_CONSTRAINT_H #define QGLVIEWER_CONSTRAINT_H diff --git a/thirdparty/CGAL/include/CGAL/Qt/constraint_impl.h b/thirdparty/CGAL/include/CGAL/Qt/constraint_impl.h index ccec2152..8ffdefdd 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/constraint_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/constraint_impl.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/constraint_impl.h $ -// $Id: constraint_impl.h 23b1024 2021-02-18T13:51:04+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/constraint_impl.h $ +// $Id: include/CGAL/Qt/constraint_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifdef CGAL_HEADER_ONLY diff --git a/thirdparty/CGAL/include/CGAL/Qt/debug.h b/thirdparty/CGAL/include/CGAL/Qt/debug.h index d6203512..b15edad7 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/debug.h +++ b/thirdparty/CGAL/include/CGAL/Qt/debug.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/debug.h $ -// $Id: debug.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/debug.h $ +// $Id: include/CGAL/Qt/debug.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/debug_impl.h b/thirdparty/CGAL/include/CGAL/Qt/debug_impl.h index a733889d..22ac22c2 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/debug_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/debug_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/debug_impl.h $ -// $Id: debug_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/debug_impl.h $ +// $Id: include/CGAL/Qt/debug_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,6 @@ #include #include #include -#include #include namespace CGAL { namespace Qt { @@ -51,5 +50,5 @@ void traverse_resources(const QString& name, const QString& dirname, int indent) } } -} // namesapce Qt +} // namespace Qt } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Qt/frame.h b/thirdparty/CGAL/include/CGAL/Qt/frame.h index 98655337..9efac397 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/frame.h +++ b/thirdparty/CGAL/include/CGAL/Qt/frame.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/frame.h $ -// $Id: frame.h 9cd0d45 2021-02-09T11:31:34+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/frame.h $ +// $Id: include/CGAL/Qt/frame.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifndef QGLVIEWER_FRAME_H #define QGLVIEWER_FRAME_H @@ -106,7 +106,7 @@ class Constraint; the Frame. The default constraint() is \c nullptr resulting in no filtering. Use setConstraint() to attach a Constraint to a frame. - Constraints are especially usefull for the ManipulatedFrame instances, in + Constraints are especially useful for the ManipulatedFrame instances, in order to forbid some mouse motions. See the constrainedFrame, constrainedCamera and Derived classes The ManipulatedFrame class inherits Frame and implements a mouse motion - convertion, so that a Frame (and hence an object) can be manipulated in the + conversion, so that a Frame (and hence an object) can be manipulated in the scene with the mouse. \nosubgrouping */ diff --git a/thirdparty/CGAL/include/CGAL/Qt/frame_impl.h b/thirdparty/CGAL/include/CGAL/Qt/frame_impl.h index da919911..3768859a 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/frame_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/frame_impl.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/frame_impl.h $ -// $Id: frame_impl.h c9a020b 2021-02-09T12:12:56+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/frame_impl.h $ +// $Id: include/CGAL/Qt/frame_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifdef CGAL_HEADER_ONLY @@ -717,7 +717,7 @@ bool Frame::settingAsReferenceFrameWillCreateALoop(const Frame *const frame) { /*! Returns the Frame coordinates of a point \p src defined in the world coordinate system (converts from world to Frame). - inverseCoordinatesOf() performs the inverse convertion. transformOf() converts + inverseCoordinatesOf() performs the inverse conversion. transformOf() converts 3D vectors instead of 3D coordinates. See the frameTransform example @@ -733,7 +733,7 @@ Vec Frame::coordinatesOf(const Vec &src) const { /*! Returns the world coordinates of the point whose position in the Frame coordinate system is \p src (converts from Frame to world). - coordinatesOf() performs the inverse convertion. Use inverseTransformOf() to + coordinatesOf() performs the inverse conversion. Use inverseTransformOf() to transform 3D vectors instead of 3D coordinates. */ CGAL_INLINE_FUNCTION Vec Frame::inverseCoordinatesOf(const Vec &src) const { @@ -749,7 +749,7 @@ Vec Frame::inverseCoordinatesOf(const Vec &src) const { /*! Returns the Frame coordinates of a point \p src defined in the referenceFrame() coordinate system (converts from referenceFrame() to Frame). - localInverseCoordinatesOf() performs the inverse convertion. See also + localInverseCoordinatesOf() performs the inverse conversion. See also localTransformOf(). */ CGAL_INLINE_FUNCTION Vec Frame::localCoordinatesOf(const Vec &src) const { @@ -759,7 +759,7 @@ Vec Frame::localCoordinatesOf(const Vec &src) const { /*! Returns the referenceFrame() coordinates of a point \p src defined in the Frame coordinate system (converts from Frame to referenceFrame()). - localCoordinatesOf() performs the inverse convertion. See also + localCoordinatesOf() performs the inverse conversion. See also localInverseTransformOf(). */ CGAL_INLINE_FUNCTION Vec Frame::localInverseCoordinatesOf(const Vec &src) const { diff --git a/thirdparty/CGAL/include/CGAL/Qt/image_interface.h b/thirdparty/CGAL/include/CGAL/Qt/image_interface.h index 238b5de7..01ea208e 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/image_interface.h +++ b/thirdparty/CGAL/include/CGAL/Qt/image_interface.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/image_interface.h $ -// $Id: image_interface.h 1ef976e 2019-10-19T16:09:56+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/image_interface.h $ +// $Id: include/CGAL/Qt/image_interface.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifndef CGAL_IMAGE_INTERFACE_H diff --git a/thirdparty/CGAL/include/CGAL/Qt/init_ogl_context.h b/thirdparty/CGAL/include/CGAL/Qt/init_ogl_context.h index 9cd45469..a70e9798 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/init_ogl_context.h +++ b/thirdparty/CGAL/include/CGAL/Qt/init_ogl_context.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/init_ogl_context.h $ -// $Id: init_ogl_context.h 9a202e2 2021-01-12T13:27:31+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/init_ogl_context.h $ +// $Id: include/CGAL/Qt/init_ogl_context.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/keyFrameInterpolator.h b/thirdparty/CGAL/include/CGAL/Qt/keyFrameInterpolator.h index 7d164a28..03defd90 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/keyFrameInterpolator.h +++ b/thirdparty/CGAL/include/CGAL/Qt/keyFrameInterpolator.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/keyFrameInterpolator.h $ -// $Id: keyFrameInterpolator.h 9cd0d45 2021-02-09T11:31:34+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/keyFrameInterpolator.h $ +// $Id: include/CGAL/Qt/keyFrameInterpolator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifndef QGLVIEWER_KEY_FRAME_INTERPOLATOR_H #define QGLVIEWER_KEY_FRAME_INTERPOLATOR_H @@ -290,7 +290,7 @@ private Q_SLOTS: } private: - // Copy constructor and opertor= are declared private and undefined + // Copy constructor and operator= are declared private and undefined // Prevents everyone from trying to use them // KeyFrameInterpolator(const KeyFrameInterpolator& kfi); // KeyFrameInterpolator& operator=(const KeyFrameInterpolator& kfi); diff --git a/thirdparty/CGAL/include/CGAL/Qt/keyFrameInterpolator_impl.h b/thirdparty/CGAL/include/CGAL/Qt/keyFrameInterpolator_impl.h index 2d7b1fdf..6ed5bdaa 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/keyFrameInterpolator_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/keyFrameInterpolator_impl.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/keyFrameInterpolator_impl.h $ -// $Id: keyFrameInterpolator_impl.h 5efa544 2021-02-22T17:19:40+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/keyFrameInterpolator_impl.h $ +// $Id: include/CGAL/Qt/keyFrameInterpolator_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifdef CGAL_HEADER_ONLY #define CGAL_INLINE_FUNCTION inline @@ -355,7 +355,7 @@ void KeyFrameInterpolator::updateCurrentKeyFrameForTime(qreal time) { // TODO: Special case for loops when closed path is implemented !! if (!currentFrameValid_) - // Recompute everything from scrach + // Recompute everything from scratch currentFrame_[1]->toFront(); while (currentFrame_[1]->peekNext()->time() > time) { diff --git a/thirdparty/CGAL/include/CGAL/Qt/manipulatedCameraFrame.h b/thirdparty/CGAL/include/CGAL/Qt/manipulatedCameraFrame.h index 36be5a8d..03a2a494 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/manipulatedCameraFrame.h +++ b/thirdparty/CGAL/include/CGAL/Qt/manipulatedCameraFrame.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame.h $ -// $Id: manipulatedCameraFrame.h 9cd0d45 2021-02-09T11:31:34+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame.h $ +// $Id: include/CGAL/Qt/manipulatedCameraFrame.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifndef QGLVIEWER_MANIPULATED_CAMERA_FRAME_H @@ -174,7 +174,7 @@ public Q_SLOTS: Default value is (0,1,0), but it is updated by the Camera when this object is set as its Camera::frame(). Camera::setOrientation() and - Camera::setUpVector()) direclty modify this value and should be used instead. + Camera::setUpVector()) directly modify this value and should be used instead. */ Vec sceneUpVector() const { return sceneUpVector_; } diff --git a/thirdparty/CGAL/include/CGAL/Qt/manipulatedCameraFrame_impl.h b/thirdparty/CGAL/include/CGAL/Qt/manipulatedCameraFrame_impl.h index 1cfaf986..8b4a1f65 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/manipulatedCameraFrame_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/manipulatedCameraFrame_impl.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame_impl.h $ -// $Id: manipulatedCameraFrame_impl.h c9a020b 2021-02-09T12:12:56+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame_impl.h $ +// $Id: include/CGAL/Qt/manipulatedCameraFrame_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifdef CGAL_HEADER_ONLY @@ -193,7 +193,7 @@ void ManipulatedCameraFrame::mouseMoveEvent(QMouseEvent *const event, } case MOVE_FORWARD: { - Quaternion rot = pitchYawQuaternion(event->x(), event->y(), camera); + Quaternion rot = pitchYawQuaternion(event->position().x(), event->position().y(), camera); rotate(rot); //#CONNECTION# wheelEvent MOVE_FORWARD case // actual translation is made in flyUpdate(). @@ -202,7 +202,7 @@ void ManipulatedCameraFrame::mouseMoveEvent(QMouseEvent *const event, } case MOVE_BACKWARD: { - Quaternion rot = pitchYawQuaternion(event->x(), event->y(), camera); + Quaternion rot = pitchYawQuaternion(event->position().x(), event->position().y(), camera); rotate(rot); // actual translation is made in flyUpdate(). // translate(inverseTransformOf(Vec(0.0, 0.0, flySpeed()))); @@ -210,10 +210,10 @@ void ManipulatedCameraFrame::mouseMoveEvent(QMouseEvent *const event, } case DRIVE: { - Quaternion rot = turnQuaternion(event->x(), camera); + Quaternion rot = turnQuaternion(event->position().x(), camera); rotate(rot); // actual translation is made in flyUpdate(). - driveSpeed_ = 0.01 * (event->y() - pressPos_.y()); + driveSpeed_ = 0.01 * (event->position().y() - pressPos_.y()); break; } @@ -223,7 +223,7 @@ void ManipulatedCameraFrame::mouseMoveEvent(QMouseEvent *const event, } case LOOK_AROUND: { - Quaternion rot = pitchYawQuaternion(event->x(), event->y(), camera); + Quaternion rot = pitchYawQuaternion(event->position().x(), event->position().y(), camera); rotate(rot); break; } @@ -233,9 +233,9 @@ void ManipulatedCameraFrame::mouseMoveEvent(QMouseEvent *const event, if (rotatesAroundUpVector_) { // Multiply by 2.0 to get on average about the same speed as with the // deformed ball - qreal dx = 2.0 * rotationSensitivity() * (prevPos_.x() - event->x()) / + qreal dx = 2.0 * rotationSensitivity() * (prevPos_.x() - event->position().x()) / camera->screenWidth(); - qreal dy = 2.0 * rotationSensitivity() * (prevPos_.y() - event->y()) / + qreal dy = 2.0 * rotationSensitivity() * (prevPos_.y() - event->position().y()) / camera->screenHeight(); if (constrainedRotationIsReversed_) dx = -dx; @@ -243,7 +243,7 @@ void ManipulatedCameraFrame::mouseMoveEvent(QMouseEvent *const event, rot = Quaternion(verticalAxis, dx) * Quaternion(Vec(1.0, 0.0, 0.0), dy); } else { Vec trans = camera->projectedCoordinatesOf(pivotPoint()); - rot = deformedBallQuaternion(event->x(), event->y(), trans[0], trans[1], + rot = deformedBallQuaternion(event->position().x(), event->position().y(), trans[0], trans[1], camera); } //#CONNECTION# These two methods should go together (spinning detection and @@ -257,7 +257,7 @@ void ManipulatedCameraFrame::mouseMoveEvent(QMouseEvent *const event, case SCREEN_ROTATE: { Vec trans = camera->projectedCoordinatesOf(pivotPoint()); - const qreal angle = atan2(event->y() - trans[1], event->x() - trans[0]) - + const qreal angle = atan2(event->position().y() - trans[1], event->position().x() - trans[0]) - atan2(prevPos_.y() - trans[1], prevPos_.x() - trans[0]); Quaternion rot(Vec(0.0, 0.0, 1.0), angle); @@ -272,7 +272,7 @@ void ManipulatedCameraFrame::mouseMoveEvent(QMouseEvent *const event, case ROLL: { const qreal angle = - CGAL_PI * (event->x() - prevPos_.x()) / camera->screenWidth(); + CGAL_PI * (event->position().x() - prevPos_.x()) / camera->screenWidth(); Quaternion rot(Vec(0.0, 0.0, 1.0), angle); rotate(rot); setSpinningQuaternion(rot); @@ -284,9 +284,9 @@ void ManipulatedCameraFrame::mouseMoveEvent(QMouseEvent *const event, Vec trans; int dir = mouseOriginalDirection(event); if (dir == 1) - trans.setValue(prevPos_.x() - event->x(), 0.0, 0.0); + trans.setValue(prevPos_.x() - event->position().x(), 0.0, 0.0); else if (dir == -1) - trans.setValue(0.0, event->y() - prevPos_.y(), 0.0); + trans.setValue(0.0, event->position().y() - prevPos_.y(), 0.0); switch (camera->type()) { case Camera::PERSPECTIVE: diff --git a/thirdparty/CGAL/include/CGAL/Qt/manipulatedFrame.h b/thirdparty/CGAL/include/CGAL/Qt/manipulatedFrame.h index ae11e05e..6306474e 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/manipulatedFrame.h +++ b/thirdparty/CGAL/include/CGAL/Qt/manipulatedFrame.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/manipulatedFrame.h $ -// $Id: manipulatedFrame.h 9cd0d45 2021-02-09T11:31:34+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/manipulatedFrame.h $ +// $Id: include/CGAL/Qt/manipulatedFrame.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifndef QGLVIEWER_MANIPULATED_FRAME_H @@ -308,7 +308,7 @@ private Q_SLOTS: const Camera *const camera); MouseAction action_; - Constraint *previousConstraint_; // When manipulation is without Contraint. + Constraint *previousConstraint_; // When manipulation is without Constraint. virtual void startAction( int ma, diff --git a/thirdparty/CGAL/include/CGAL/Qt/manipulatedFrame_impl.h b/thirdparty/CGAL/include/CGAL/Qt/manipulatedFrame_impl.h index d936637e..a4b7191b 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/manipulatedFrame_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/manipulatedFrame_impl.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/manipulatedFrame_impl.h $ -// $Id: manipulatedFrame_impl.h c9a020b 2021-02-09T12:12:56+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/manipulatedFrame_impl.h $ +// $Id: include/CGAL/Qt/manipulatedFrame_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifdef CGAL_HEADER_ONLY @@ -93,10 +93,10 @@ illustration. */ CGAL_INLINE_FUNCTION void ManipulatedFrame::checkIfGrabsMouse(int x, int y, const Camera *const camera) { - const int thresold = 10; + const int threshold = 10; const Vec proj = camera->projectedCoordinatesOf(position()); - setGrabsMouse(keepsGrabbingMouse_ || ((fabs(x - proj.x) < thresold) && - (fabs(y - proj.y) < thresold))); + setGrabsMouse(keepsGrabbingMouse_ || ((fabs(x - proj.x) < threshold) && + (fabs(y - proj.y) < threshold))); } @@ -219,8 +219,8 @@ int ManipulatedFrame::mouseOriginalDirection(const QMouseEvent *const e) { CGAL_INLINE_FUNCTION qreal ManipulatedFrame::deltaWithPrevPos(QMouseEvent *const event, Camera *const camera) const { - qreal dx = qreal(event->x() - prevPos_.x()) / camera->screenWidth(); - qreal dy = qreal(event->y() - prevPos_.y()) / camera->screenHeight(); + qreal dx = qreal(event->position().x() - prevPos_.x()) / camera->screenWidth(); + qreal dy = qreal(event->position().y() - prevPos_.y()) / camera->screenHeight(); qreal value = fabs(dx) > fabs(dy) ? dx : dy; return value * zoomSensitivity(); @@ -319,7 +319,7 @@ void ManipulatedFrame::mouseMoveEvent(QMouseEvent *const event, const qreal prev_angle = atan2(prevPos_.y() - trans[1], prevPos_.x() - trans[0]); - const qreal angle = atan2(event->y() - trans[1], event->x() - trans[0]); + const qreal angle = atan2(event->position().y() - trans[1], event->position().x() - trans[0]); const Vec axis = transformOf(camera->frame()->inverseTransformOf(Vec(0.0, 0.0, -1.0))); @@ -336,9 +336,9 @@ void ManipulatedFrame::mouseMoveEvent(QMouseEvent *const event, Vec trans; int dir = mouseOriginalDirection(event); if (dir == 1) - trans.setValue(event->x() - prevPos_.x(), 0.0, 0.0); + trans.setValue(event->position().x() - prevPos_.x(), 0.0, 0.0); else if (dir == -1) - trans.setValue(0.0, prevPos_.y() - event->y(), 0.0); + trans.setValue(0.0, prevPos_.y() - event->position().y(), 0.0); switch (camera->type()) { case Camera::PERSPECTIVE: @@ -367,7 +367,7 @@ void ManipulatedFrame::mouseMoveEvent(QMouseEvent *const event, case ROTATE: { Vec trans = camera->projectedCoordinatesOf(position()); - Quaternion rot = deformedBallQuaternion(event->x(), event->y(), trans[0], + Quaternion rot = deformedBallQuaternion(event->position().x(), event->position().y(), trans[0], trans[1], camera); trans = Vec(-rot[0], -rot[1], -rot[2]); trans = camera->frame()->orientation().rotate(trans); diff --git a/thirdparty/CGAL/include/CGAL/Qt/mouseGrabber.h b/thirdparty/CGAL/include/CGAL/Qt/mouseGrabber.h index 739977fc..4e3a0375 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/mouseGrabber.h +++ b/thirdparty/CGAL/include/CGAL/Qt/mouseGrabber.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/mouseGrabber.h $ -// $Id: mouseGrabber.h 1ef976e 2019-10-19T16:09:56+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/mouseGrabber.h $ +// $Id: include/CGAL/Qt/mouseGrabber.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifndef QGLVIEWER_MOUSE_GRABBER_H @@ -269,7 +269,7 @@ class CGAL_QT_EXPORT MouseGrabber { //@} private: - // Copy constructor and opertor= are declared private and undefined + // Copy constructor and operator= are declared private and undefined // Prevents everyone from trying to use them MouseGrabber(const MouseGrabber &); MouseGrabber &operator=(const MouseGrabber &); diff --git a/thirdparty/CGAL/include/CGAL/Qt/mouseGrabber_impl.h b/thirdparty/CGAL/include/CGAL/Qt/mouseGrabber_impl.h index 9b4727c1..22a1cbea 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/mouseGrabber_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/mouseGrabber_impl.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/mouseGrabber_impl.h $ -// $Id: mouseGrabber_impl.h 1ef976e 2019-10-19T16:09:56+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/mouseGrabber_impl.h $ +// $Id: include/CGAL/Qt/mouseGrabber_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifdef CGAL_HEADER_ONLY diff --git a/thirdparty/CGAL/include/CGAL/Qt/qglviewer.h b/thirdparty/CGAL/include/CGAL/Qt/qglviewer.h index 1d3858e0..9df9d2bc 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/qglviewer.h +++ b/thirdparty/CGAL/include/CGAL/Qt/qglviewer.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/qglviewer.h $ -// $Id: qglviewer.h 37390bb 2022-06-08T12:03:25+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/qglviewer.h $ +// $Id: include/CGAL/Qt/qglviewer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifndef QGLVIEWER_QGLVIEWER_H @@ -30,10 +30,9 @@ #include #include #include -#include #include #include - +#include class QTabWidget; class QImage; @@ -71,9 +70,6 @@ class CGAL_QT_EXPORT QGLViewer : public QOpenGLWidget, public QOpenGLFunctions { Q_OBJECT public: - //todo check if this is used. If not remove it - explicit QGLViewer(QGLContext* context, QWidget *parent = nullptr, - ::Qt::WindowFlags flags = ::Qt::WindowType(0)); explicit QGLViewer(QOpenGLContext* context, QWidget *parent = nullptr, ::Qt::WindowFlags flags = ::Qt::WindowType(0)); explicit QGLViewer(QWidget *parent = nullptr, @@ -138,8 +134,8 @@ public Q_SLOTS: void setGridIsDrawn(bool draw = true) { if(!draw) { - grid_size=0; - g_axis_size=0; + grid_size = 0; + grid_axis_size = 0; } gridIsDrawn_ = draw; Q_EMIT gridIsDrawnChanged(draw); @@ -385,7 +381,7 @@ public Q_SLOTS: * of the world and the origin of the scene. It is relevant when the whole scene is translated * of a big number, because there is a useless loss of precision when drawing. * - * The offset must be added to the drawn coordinates, and substracted from the computation + * The offset must be added to the drawn coordinates, and subtracted from the computation * \attention the result of pointUnderPixel is the real item translated by the offset. * */ @@ -395,7 +391,7 @@ public Q_SLOTS: * returns the offset of the scene. * \see `setOffset()` */ - qglviewer::Vec offset()const; + const qglviewer::Vec& offset() const; public Q_SLOTS: void setFullScreen(bool fullScreen = true); @@ -411,7 +407,8 @@ public Q_SLOTS: //@{ public: void drawArrow(double r, double R, int prec, - qglviewer::Vec from, qglviewer::Vec to, qglviewer::Vec color, std::vector &data); + const qglviewer::Vec& from, const qglviewer::Vec& to, + std::vector &data); void drawAxis(qreal l = 1.0); void drawGrid(qreal size= 1.0, int nbSubdivisions = 10); @@ -840,33 +837,27 @@ compatible with raster mode): use \c glRasterPos3fv() instead. */ /*! @name Keyboard customization */ //@{ public: - unsigned int shortcut(qglviewer::KeyboardAction action) const; + QKeyCombination shortcut(qglviewer::KeyboardAction action) const; ::Qt::Key pathKey(unsigned int index) const; ::Qt::KeyboardModifiers addKeyFrameKeyboardModifiers() const; ::Qt::KeyboardModifiers playPathKeyboardModifiers() const; public Q_SLOTS: - void setShortcut(qglviewer::KeyboardAction action, unsigned int key); + void setShortcut(qglviewer::KeyboardAction action, QKeyCombination key); void setShortcut(qglviewer::KeyboardAction action, ::Qt::Modifier modifier, ::Qt::Key key) { - setShortcut(action, - static_cast(modifier)+ - static_cast(key)); + setShortcut(action, QKeyCombination{modifier, key}); } - void setKeyDescription(unsigned int key, QString description); + void setKeyDescription(QKeyCombination key, QString description); void setKeyDescription(::Qt::KeyboardModifier modifier, ::Qt::Key key, QString description) { - setKeyDescription(static_cast(modifier) + - static_cast(key), - description); + setKeyDescription(QKeyCombination{modifier, key}, description); } void setKeyDescription(::Qt::Modifier modifier, ::Qt::Key key, QString description) { - setKeyDescription(static_cast(modifier) + - static_cast(key), - description); + setKeyDescription(QKeyCombination{modifier, key}, description); } void clearShortcuts(); @@ -1076,8 +1067,8 @@ private Q_SLOTS: void setDefaultShortcuts(); QString cameraPathKeysString() const; QMap keyboardActionDescription_; - QMap keyboardBinding_; - QMap keyDescription_; + QMap keyboardBinding_; + QHash keyDescription_; // K e y F r a m e s s h o r t c u t s QMap< ::Qt::Key, unsigned int> pathIndex_; @@ -1157,7 +1148,7 @@ private Q_SLOTS: return modifiers < cbp.modifiers; if (button != cbp.button) return button < cbp.button; - return doubleClick != cbp.doubleClick; + return doubleClick < cbp.doubleClick; } }; #endif @@ -1180,27 +1171,31 @@ private Q_SLOTS: enum VBO { Grid = 0, - Grid_axis, - Axis, + Grid_axis_x, Grid_axis_y, + Axis_x, Axis_y, Axis_z, Pivot_point, VBO_size }; + enum VAO { GRID = 0, - GRID_AXIS, - AXIS, + GRID_AXIS_X, GRID_AXIS_Y, + AXIS_X, AXIS_Y, AXIS_Z, PIVOT_POINT, VAO_size }; + QOpenGLShaderProgram rendering_program; - QOpenGLShaderProgram rendering_program_light; QOpenGLVertexArrayObject vaos[VAO_size]; QVector vbos; + std::size_t grid_size; - std::size_t g_axis_size; + std::size_t grid_axis_size; std::size_t axis_size; + QOpenGLFramebufferObject* stored_fbo; + //S n a p s h o t QImage* takeSnapshot(qglviewer::SnapShotBackground background_color, QSize finalSize, double oversampling, bool expand); diff --git a/thirdparty/CGAL/include/CGAL/Qt/qglviewer_impl.h b/thirdparty/CGAL/include/CGAL/Qt/qglviewer_impl.h index a2316313..8963cc69 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/qglviewer_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/qglviewer_impl.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/qglviewer_impl.h $ -// $Id: qglviewer_impl.h 3a0a7fe 2022-10-04T13:50:20+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/qglviewer_impl.h $ +// $Id: include/CGAL/Qt/qglviewer_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifdef CGAL_HEADER_ONLY @@ -31,10 +31,11 @@ #include #include #include -#include +#include #include #include #include +#include #include #include #include @@ -185,6 +186,7 @@ CGAL::QGLViewer::~QGLViewer() { helpWidget()->close(); delete helpWidget_; } + disconnect(context(), &QOpenGLContext::aboutToBeDestroyed, this, &CGAL::QGLViewer::contextIsDestroyed); } @@ -194,7 +196,7 @@ This method is automatically called once, before the first call to paintGL(). Overload init() instead of this method to modify viewer specific OpenGL state. -If a 4.3 context could not be set, a ES 2.0 context will be used instead. +If a 4.3 context could not be set, an ES 2.0 context will be used instead. \see `isOpenGL_4_3()` */ CGAL_INLINE_FUNCTION @@ -252,201 +254,51 @@ void CGAL::QGLViewer::initializeGL() { if(!is_linked) { //Vertex source code - const char v_s[] = + const char vertex_source[] = { - "#version 150 \n" + "#version 150\n" "in vec4 vertex;\n" "uniform mat4 mvp_matrix;\n" "void main(void)\n" "{\n" - " gl_Position = mvp_matrix * vertex; \n" - "} \n" - "\n" + " gl_Position = mvp_matrix * vertex;\n" + "}" }; - const char v_source_comp[] = + const char vertex_source_comp[] = { "attribute highp vec4 vertex;\n" "uniform highp mat4 mvp_matrix;\n" "void main(void)\n" "{\n" - " gl_Position = mvp_matrix * vertex; \n" - "} \n" - "\n" + " gl_Position = mvp_matrix * vertex;\n" + "}" }; //Fragment source code - const char f_s[] = - { - "#version 150 \n" - "uniform vec4 color; \n" - "out vec4 out_color; \n" - "void main(void) { \n" - "out_color = color; \n" - "} \n" - "\n" - }; - const char f_source_comp[] = - { - "uniform highp vec4 color; \n" - "void main(void) { \n" - "gl_FragColor = color; \n" - "} \n" - "\n" - }; - - //It is said in the doc that a QOpenGLShader is - // only destroyed with the QOpenGLShaderProgram - //it has been linked with. - - QOpenGLShader vertex_shader(QOpenGLShader::Vertex); - QOpenGLShader fragment_shader(QOpenGLShader::Fragment); - if(is_ogl_4_3) - { - if(!vertex_shader.compileSourceCode(v_s)) - { - std::cerr<<"Compiling vertex source FAILED"<x() and e->y() as you want... + // Use e->position().x() and e->position().y() as you want... else CGAL::QGLViewer::mouseMoveEvent(e); } @@ -1367,7 +1221,7 @@ else CGAL_INLINE_FUNCTION void CGAL::QGLViewer::mouseMoveEvent(QMouseEvent *e) { if (mouseGrabber()) { - mouseGrabber()->checkIfGrabsMouse(e->x(), e->y(), camera()); + mouseGrabber()->checkIfGrabsMouse(e->position().x(), e->position().y(), camera()); if (mouseGrabber()->grabsMouse()) if (mouseGrabberIsAManipulatedCameraFrame_) (dynamic_cast(mouseGrabber())) @@ -1395,7 +1249,7 @@ void CGAL::QGLViewer::mouseMoveEvent(QMouseEvent *e) { manipulatedFrame()->mouseMoveEvent(e, camera()); else if (hasMouseTracking()) { Q_FOREACH (qglviewer::MouseGrabber *mg, qglviewer::MouseGrabber::MouseGrabberPool()) { - mg->checkIfGrabsMouse(e->x(), e->y(), camera()); + mg->checkIfGrabsMouse(e->position().x(), e->position().y(), camera()); if (mg->grabsMouse()) { setMouseGrabber(mg); // Check that MouseGrabber is not disabled @@ -1424,7 +1278,7 @@ void CGAL::QGLViewer::mouseReleaseEvent(QMouseEvent *e) { ->qglviewer::ManipulatedFrame::mouseReleaseEvent(e, camera()); else mouseGrabber()->mouseReleaseEvent(e, camera()); - mouseGrabber()->checkIfGrabsMouse(e->x(), e->y(), camera()); + mouseGrabber()->checkIfGrabsMouse(e->position().x(), e->position().y(), camera()); if (!(mouseGrabber()->grabsMouse())) setMouseGrabber(nullptr); // update(); @@ -1656,18 +1510,14 @@ QString CGAL::QGLViewer::clickActionString(CGAL::qglviewer::ClickAction ca) { return QString(); } -static QString keyString(unsigned int key) { -#if QT_VERSION >= 0x040100 - return QKeySequence(int(key)).toString(QKeySequence::NativeText); -#else - return QString(QKeySequence(key)); -#endif +static QString keyString(QKeyCombination key) { + return QKeySequence(key).toString(QKeySequence::NativeText); } CGAL_INLINE_FUNCTION QString CGAL::QGLViewer::formatClickActionPrivate(ClickBindingPrivate cbp) { bool buttonsBefore = cbp.buttonsBefore != ::Qt::NoButton; - QString keyModifierString = keyString(cbp.modifiers + cbp.key); + QString keyModifierString = keyString(QKeyCombination(cbp.modifiers, cbp.key)); if (!keyModifierString.isEmpty()) { #ifdef Q_OS_MAC // modifiers never has a '+' sign. Add one space to clearly separate @@ -1913,7 +1763,7 @@ QString CGAL::QGLViewer::mouseString() const { /*! Defines a custom keyboard shortcut description, that will be displayed in the help() window \c Keyboard tab. -The \p key definition is given as an \c int using Qt enumerated values. Set an +The \p key definition is given as an \c QKeyCombination using Qt enumerated values. Set an empty \p description to remove a shortcut description: \code setKeyDescription(::Qt::Key_W, "Toggles wireframe display"); setKeyDescription(::Qt::CTRL+::Qt::Key_L, "Loads a new scene"); @@ -1925,7 +1775,7 @@ See the keyboardAndMouse example for illustration and the keyboard page for details. */ CGAL_INLINE_FUNCTION -void CGAL::QGLViewer::setKeyDescription(unsigned int key, QString description) { +void CGAL::QGLViewer::setKeyDescription(QKeyCombination key, QString description) { if (description.isEmpty()) keyDescription_.remove(key); else @@ -2017,17 +1867,15 @@ QString CGAL::QGLViewer::keyboardString() const { "Description", "Description column header in help window mouse tab")); - QMap keyDescription; + QHash keyDescription; // 1 - User defined key descriptions - for (QMap::ConstIterator kd = keyDescription_.begin(), - kdend = keyDescription_.end(); + for (auto kd = keyDescription_.begin(), kdend = keyDescription_.end(); kd != kdend; ++kd) keyDescription[kd.key()] = kd.value(); // Add to text in sorted order - for (QMap::ConstIterator kb = keyDescription.begin(), - endb = keyDescription.end(); + for (auto kb = keyDescription.begin(), endb = keyDescription.end(); kb != endb; ++kb) text += tableLine(keyString(kb.key()), kb.value()); @@ -2040,18 +1888,15 @@ QString CGAL::QGLViewer::keyboardString() const { } // 3 - KeyboardAction bindings description - for (QMap::ConstIterator - it = keyboardBinding_.begin(), - end = keyboardBinding_.end(); + for (auto it = keyboardBinding_.begin(), end = keyboardBinding_.end(); it != end; ++it) - if ((it.value() != 0) && + if ((it.value() != QKeyCombination{}) && ((!cameraIsInRotateMode()) || ((it.key() != qglviewer::INCREASE_FLYSPEED) && (it.key() != qglviewer::DECREASE_FLYSPEED)))) keyDescription[it.value()] = keyboardActionDescription_[it.key()]; // Add to text in sorted order - for (QMap::ConstIterator kb2 = keyDescription.begin(), - endb2 = keyDescription.end(); + for (auto kb2 = keyDescription.begin(), endb2 = keyDescription.end(); kb2 != endb2; ++kb2) text += tableLine(keyString(kb2.key()), kb2.value()); @@ -2065,15 +1910,15 @@ QString CGAL::QGLViewer::keyboardString() const { .arg(cpks) + "\n"; text += tableLine( - keyString(playPathKeyboardModifiers()) + "" + + keyString(QKeyCombination(playPathKeyboardModifiers())) + "" + CGAL::QGLViewer::tr("Fx", "Generic function key (F1..F12)") + "", CGAL::QGLViewer::tr("Plays path (or resets saved position)")); text += tableLine( - keyString(addKeyFrameKeyboardModifiers()) + "" + + keyString(QKeyCombination(addKeyFrameKeyboardModifiers())) + "" + CGAL::QGLViewer::tr("Fx", "Generic function key (F1..F12)") + "", CGAL::QGLViewer::tr("Adds a key frame to path (or defines a position)")); text += tableLine( - keyString(addKeyFrameKeyboardModifiers()) + "" + + keyString(QKeyCombination(addKeyFrameKeyboardModifiers())) + "" + CGAL::QGLViewer::tr("Fx", "Generic function key (F1..F12)") + "+" + CGAL::QGLViewer::tr("Fx", "Generic function key (F1..F12)") + "", CGAL::QGLViewer::tr("Deletes path (or saved position)")); @@ -2217,11 +2062,8 @@ void CGAL::QGLViewer::keyPressEvent(QKeyEvent *e) { _first_tick = true; } const ::Qt::KeyboardModifiers modifiers = e->modifiers(); - QMap::ConstIterator it = keyboardBinding_ - .begin(), - end = - keyboardBinding_.end(); - const unsigned int target = key | modifiers; + auto it = keyboardBinding_.begin(), end = keyboardBinding_.end(); + const QKeyCombination target{modifiers, key}; while ((it != end) && (it.value() != target)) ++it; @@ -2384,17 +2226,17 @@ Here are some examples: setShortcut(EXIT_VIEWER, ::Qt::Key_Q); // Alt+M toggles camera mode -setShortcut(CAMERA_MODE, ::Qt::ALT + ::Qt::Key_M); +setShortcut(CAMERA_MODE, ::Qt::ALT | ::Qt::Key_M); // The DISPLAY_FPS action is disabled setShortcut(DISPLAY_FPS, 0); \endcode Only one shortcut can be assigned to a given CGAL::QGLViewer::KeyboardAction (new -bindings replace previous ones). If several KeyboardAction are binded to the +bindings replace previous ones). If several KeyboardAction are bound to the same shortcut, only one of them is active. */ CGAL_INLINE_FUNCTION -void CGAL::QGLViewer::setShortcut(qglviewer::KeyboardAction action, unsigned int key) { +void CGAL::QGLViewer::setShortcut(qglviewer::KeyboardAction action, QKeyCombination key) { keyboardBinding_[action] = key; } @@ -2416,11 +2258,11 @@ See the keyboard page for details and default values and the keyboardAndMouse example for a practical illustration. */ CGAL_INLINE_FUNCTION -unsigned int CGAL::QGLViewer::shortcut(qglviewer::KeyboardAction action) const { +QKeyCombination CGAL::QGLViewer::shortcut(qglviewer::KeyboardAction action) const { if (keyboardBinding_.contains(action)) return keyboardBinding_[action]; else - return 0; + return {}; } @@ -3100,39 +2942,45 @@ Limitation : One needs to have access to visualHint_ to overload this method. Removed from the documentation for this reason. */ CGAL_INLINE_FUNCTION void CGAL::QGLViewer::drawVisualHints() { + // G r i d - rendering_program.bind(); - vaos[GRID].bind(); - QMatrix4x4 mvpMatrix; - double mat[16]; + GLdouble mat[16]; camera()->getModelViewProjectionMatrix(mat); + + QMatrix4x4 mvpMatrix; for(int i=0; i < 16; i++) { - mvpMatrix.data()[i] = (float)mat[i]; + mvpMatrix.data()[i] = float(mat[i]); } + QMatrix4x4 mvMatrix; for(int i=0; i < 16; i++) { mvMatrix.data()[i] = float(camera()->orientation().inverse().matrix()[i]); } + + rendering_program.bind(); + vaos[GRID].bind(); rendering_program.setUniformValue("mvp_matrix", mvpMatrix); rendering_program.setUniformValue("color", QColor(::Qt::lightGray)); glDrawArrays(GL_LINES, 0, static_cast(grid_size)); vaos[GRID].release(); - rendering_program.release(); - rendering_program_light.bind(); - vaos[GRID_AXIS].bind(); + vaos[GRID_AXIS_X].bind(); + rendering_program.setUniformValue("color", QColor(::Qt::red)); +// glEnable(GL_POLYGON_OFFSET_FILL); +// glPolygonOffset(0.0f,-0.0f); + glDrawArrays(GL_TRIANGLES, 0, static_cast(grid_axis_size/3)); + vaos[GRID_AXIS_X].release(); + + vaos[GRID_AXIS_Y].bind(); + rendering_program.setUniformValue("color", QColor(::Qt::green)); + glDrawArrays(GL_TRIANGLES, 0, static_cast(grid_axis_size/3)); + vaos[GRID_AXIS_Y].release(); - rendering_program_light.setUniformValue("mvp_matrix", mvpMatrix); - rendering_program_light.setUniformValue("mv_matrix", mvMatrix); - glDrawArrays(GL_TRIANGLES, 0, static_cast(g_axis_size/9)); - vaos[GRID_AXIS].release(); -// glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); - glEnable(GL_POLYGON_OFFSET_FILL); - glPolygonOffset(3.0f,-3.0f); //A x i s CGAL::qglviewer::Camera::Type camera_type = camera()->type(); + camera()->setType(CGAL::qglviewer::Camera::ORTHOGRAPHIC); for(int i=0; i < 16; i++) { @@ -3141,15 +2989,14 @@ void CGAL::QGLViewer::drawVisualHints() { mvpMatrix.setToIdentity(); mvpMatrix.ortho(-1,1,-1,1,-1,1); mvpMatrix = mvpMatrix*mvMatrix; - rendering_program_light.setUniformValue("mvp_matrix", mvpMatrix); - rendering_program_light.setUniformValue("mv_matrix", mvMatrix); + rendering_program.setUniformValue("mvp_matrix", mvpMatrix); + camera()->setType(camera_type); - vaos[AXIS].bind(); + + // The viewport and the scissor are changed to fit the upper right corner. + // Original values are saved. int viewport[4]; int scissor[4]; - - // The viewport and the scissor are changed to fit the upper right - // corner. Original values are saved. glGetIntegerv(GL_VIEWPORT, viewport); glGetIntegerv(GL_SCISSOR_BOX, scissor); @@ -3157,12 +3004,25 @@ void CGAL::QGLViewer::drawVisualHints() { int size = 100; glViewport(width()*devicePixelRatio()-size, height()*devicePixelRatio()-size, size, size); glScissor (width()*devicePixelRatio()-size, height()*devicePixelRatio()-size, size, size); - glDrawArrays(GL_TRIANGLES, 0, static_cast(axis_size / 9)); + + vaos[AXIS_X].bind(); + rendering_program.setUniformValue("color", QColor(::Qt::red)); + glDrawArrays(GL_TRIANGLES, 0, static_cast(axis_size / 3)); + vaos[AXIS_X].release(); + + vaos[AXIS_Y].bind(); + rendering_program.setUniformValue("color", QColor(::Qt::green)); + glDrawArrays(GL_TRIANGLES, 0, static_cast(axis_size / 3)); + vaos[AXIS_Y].release(); + + vaos[AXIS_Z].bind(); + rendering_program.setUniformValue("color", QColor(::Qt::blue)); + glDrawArrays(GL_TRIANGLES, 0, static_cast(axis_size / 3)); + vaos[AXIS_Z].release(); + // The viewport and the scissor are restored. glScissor(scissor[0],scissor[1],scissor[2],scissor[3]); glViewport(viewport[0],viewport[1],viewport[2],viewport[3]); - vaos[AXIS].release(); - rendering_program_light.release(); //P i v o t - P o i n t if (visualHint_ & 1) @@ -3176,31 +3036,39 @@ void CGAL::QGLViewer::drawVisualHints() { vertices.push_back(y); vertices.push_back(0); } + rendering_program.bind(); vaos[PIVOT_POINT].bind(); vbos[Pivot_point].bind(); + vbos[Pivot_point].allocate(vertices.data(),static_cast(vertices.size()*sizeof(float))); rendering_program.enableAttributeArray("vertex"); rendering_program.setAttributeBuffer("vertex",GL_FLOAT,0,3); vbos[Pivot_point].release(); + mvpMatrix.setToIdentity(); mvpMatrix.ortho(-1,1,-1,1,-1,1); - size=30*devicePixelRatio(); rendering_program.setUniformValue("mvp_matrix", mvpMatrix); + const auto point_2d = camera()->projectedCoordinatesOf(camera()->pivotPoint()); + size = 30 * devicePixelRatio(); + glViewport(GLint(point_2d.x*devicePixelRatio()-size/2), GLint((height() - point_2d.y)*devicePixelRatio()-size/2), size, size); glScissor (GLint(point_2d.x*devicePixelRatio()-size/2), GLint((height() - point_2d.y)*devicePixelRatio()-size/2), size, size); + rendering_program.setUniformValue("color", QColor(::Qt::black)); glDisable(GL_DEPTH_TEST); glDrawArrays(GL_LINES, 0, static_cast(4)); rendering_program.setUniformValue("color", QColor(::Qt::white)); glDrawArrays(GL_LINES, 0, static_cast(4)); glEnable(GL_DEPTH_TEST); + // The viewport and the scissor are restored. glScissor(scissor[0],scissor[1],scissor[2],scissor[3]); glViewport(viewport[0],viewport[1],viewport[2],viewport[3]); + vaos[PIVOT_POINT].release(); rendering_program.release(); } @@ -3228,26 +3096,29 @@ void CGAL::QGLViewer::resetVisualHints() { visualHint_ = 0; } //////////////////////////////////////////////////////////////////////////////// /*! Draws a 3D arrow between the 3D point \p from and the 3D point \p to. -\p data is filled with the three components of a point, then its normal, and then its color, which makes it filled like this: -[P1.x-P1.y-P1.z-N1.x-N1.y-N1.z-C1.r-C1.g-C1.b|P2.x-P2.y-P2.z-N2.x-N2.y-N2.z-C2.r-C2.g-C2.b|...] +\p data is filled with the three components of a point, which makes it filled like this: +[P1.x-P1.y-P1.z|P2.x-P2.y-P2.z|...] */ CGAL_INLINE_FUNCTION -void CGAL::QGLViewer::drawArrow(double r,double R, int prec, CGAL::qglviewer::Vec from, - CGAL::qglviewer::Vec to, CGAL::qglviewer::Vec color, - std::vector &data) { +void CGAL::QGLViewer::drawArrow(double r, double R, int prec, + const CGAL::qglviewer::Vec& from, const CGAL::qglviewer::Vec& to, + std::vector &data) { using std::cos; using std::sin; using std::acos; + CGAL::qglviewer::Vec temp = to-from; QVector3D dir = QVector3D(float(temp.x), float(temp.y), float(temp.z)); + QMatrix4x4 mat; mat.setToIdentity(); mat.translate(float(from.x), float(from.y), float(from.z)); mat.scale(dir.length()); + dir.normalize(); - float angle = 0.0; + float angle = 0.f; if(std::sqrt((dir.x()*dir.x()+dir.y()*dir.y())) > 1) - angle = 90.0f; + angle = 90.f; else angle = float(acos(dir.y()/std::sqrt(dir.lengthSquared()))*180.0/CGAL_PI); @@ -3259,55 +3130,36 @@ void CGAL::QGLViewer::drawArrow(double r,double R, int prec, CGAL::qglviewer::Ve const float Rf = static_cast(R); for(int d = 0; d<360; d+= 360/prec) { - float D = (float) (d * CGAL_PI / 180.); - float a = (float) std::atan(Rf / 0.33); - QVector4D p(0., 1., 0, 1.); - QVector4D n(Rf*sin(D), sin(a), Rf*cos(D), 1.); - QVector4D pR = mat*p; - QVector4D nR = mat*n; + float D = float(d * CGAL_PI / 180.); +// float a = float(std::atan(Rf / 0.33)); //point A1 + QVector4D p(0.f, 1.f, 0.f, 1.f); + QVector4D pR = mat*p; +// QVector4D n(Rf*sin(D), sin(a), Rf*cos(D), 1.f); +// QVector4D nR = mat*n; data.push_back(pR.x()); data.push_back(pR.y()); data.push_back(pR.z()); - data.push_back(nR.x()); - data.push_back(nR.y()); - data.push_back(nR.z()); - data.push_back((float)color.x); - data.push_back((float)color.y); - data.push_back((float)color.z); //point B1 p = QVector4D(Rf*sin(D), 0.66f, Rf* cos(D), 1.f); - n = QVector4D(sin(D), sin(a), cos(D), 1.); pR = mat*p; - nR = mat*n; +// n = QVector4D(sin(D), sin(a), cos(D), 1.); +// nR = mat*n; data.push_back(pR.x()); data.push_back(pR.y()); data.push_back(pR.z()); - data.push_back(nR.x()); - data.push_back(nR.y()); - data.push_back(nR.z()); - data.push_back((float)color.x); - data.push_back((float)color.y); - data.push_back((float)color.z); + //point C1 D = float((d+360/prec)*CGAL_PI/180.0); p = QVector4D(Rf* sin(D), 0.66f, Rf* cos(D), 1.f); - n = QVector4D(sin(D), sin(a), cos(D), 1.0); pR = mat*p; - nR = mat*n; - +// n = QVector4D(sin(D), sin(a), cos(D), 1.f); +// nR = mat*n; data.push_back(pR.x()); data.push_back(pR.y()); data.push_back(pR.z()); - data.push_back(nR.x()); - data.push_back(nR.y()); - data.push_back(nR.z()); - data.push_back((float)color.x); - data.push_back((float)color.y); - data.push_back((float)color.z); - } //cylinder @@ -3316,98 +3168,62 @@ void CGAL::QGLViewer::drawArrow(double r,double R, int prec, CGAL::qglviewer::Ve for(int d = 0; d<360; d+= 360/prec) { //point A1 - float D = float(d*CGAL_PI/180.0); + float D = float(d*CGAL_PI/180.); QVector4D p(rf*sin(D), 0.66f, rf*cos(D), 1.f); - QVector4D n(sin(D), 0.f, cos(D), 1.f); QVector4D pR = mat*p; - QVector4D nR = mat*n; - +// QVector4D n(sin(D), 0.f, cos(D), 1.f); +// QVector4D nR = mat*n; data.push_back(pR.x()); data.push_back(pR.y()); data.push_back(pR.z()); - data.push_back(nR.x()); - data.push_back(nR.y()); - data.push_back(nR.z()); - data.push_back(float(color.x)); - data.push_back(float(color.y)); - data.push_back(float(color.z)); + //point B1 - p = QVector4D(rf * sin(D),0,rf*cos(D), 1.0); - n = QVector4D(sin(D), 0, cos(D), 1.0); + p = QVector4D(rf * sin(D), 0.f, rf*cos(D), 1.f); pR = mat*p; - nR = mat*n; - - +// n = QVector4D(sin(D), 0.f, cos(D), 1.f); +// nR = mat*n; data.push_back(pR.x()); data.push_back(pR.y()); data.push_back(pR.z()); - data.push_back(nR.x()); - data.push_back(nR.y()); - data.push_back(nR.z()); - data.push_back(float(color.x)); - data.push_back(float(color.y)); - data.push_back(float(color.z)); - //point C1 - D = float((d+360/prec)*CGAL_PI/180.0); - p = QVector4D(rf * sin(D),0,rf*cos(D), 1.0); - n = QVector4D(sin(D), 0, cos(D), 1.0); + + //point C1 + D = float((d + 360./prec) * CGAL_PI/180.0); + p = QVector4D(rf * sin(D), 0.f, rf*cos(D), 1.f); pR = mat*p; - nR = mat*n; +// n = QVector4D(sin(D), 0.f, cos(D), 1.f); +// nR = mat*n; data.push_back(pR.x()); data.push_back(pR.y()); data.push_back(pR.z()); - data.push_back(nR.x()); - data.push_back(nR.y()); - data.push_back(nR.z()); - data.push_back(float(color.x)); - data.push_back(float(color.y)); - data.push_back(float(color.z)); - //point A2 - D = float((d+360/prec)*CGAL_PI/180.0); - p = QVector4D(rf * sin(D),0,rf*cos(D), 1.0); - n = QVector4D(sin(D), 0, cos(D), 1.0); + //point A2 + D = float((d + 360./prec) * CGAL_PI/180.); + p = QVector4D(rf * sin(D), 0.f, rf*cos(D), 1.f); pR = mat*p; - nR = mat*n; +// n = QVector4D(sin(D), 0.f, cos(D), 1.f); +// nR = mat*n; data.push_back(pR.x()); data.push_back(pR.y()); data.push_back(pR.z()); - data.push_back(nR.x()); - data.push_back(nR.y()); - data.push_back(nR.z()); - data.push_back(float(color.x)); - data.push_back(float(color.y)); - data.push_back(float(color.z)); + //point B2 p = QVector4D(rf * sin(D), 0.66f, rf*cos(D), 1.f); - n = QVector4D(sin(D), 0, cos(D), 1.0); pR = mat*p; - nR = mat*n; +// n = QVector4D(sin(D), 0.f, cos(D), 1.f); +// nR = mat*n; data.push_back(pR.x()); data.push_back(pR.y()); data.push_back(pR.z()); - data.push_back(nR.x()); - data.push_back(nR.y()); - data.push_back(nR.z()); - data.push_back(float(color.x)); - data.push_back(float(color.y)); - data.push_back(float(color.z)); + //point C2 - D = float(d*CGAL_PI/180.0); + D = float(d * CGAL_PI/180.); p = QVector4D(rf * sin(D), 0.66f, rf*cos(D), 1.f); - n = QVector4D(sin(D), 0.f, cos(D), 1.f); pR = mat*p; - nR = mat*n; +// n = QVector4D(sin(D), 0.f, cos(D), 1.f); +// nR = mat*n; data.push_back(pR.x()); data.push_back(pR.y()); data.push_back(pR.z()); - data.push_back(nR.x()); - data.push_back(nR.y()); - data.push_back(nR.z()); - data.push_back(float(color.x)); - data.push_back(float(color.y)); - data.push_back(float(color.z)); - } } @@ -3419,30 +3235,41 @@ positive X, Y and Z directions in the top right corner of the screen. X arrow is red, Y arrow is green and Z arrow is blue.*/ CGAL_INLINE_FUNCTION void CGAL::QGLViewer::drawAxis(qreal length) { - std::vector data; - data.resize(0); - drawArrow(0.06,0.12,10, CGAL::qglviewer::Vec(0,0,0),CGAL::qglviewer::Vec(length,0,0),CGAL::qglviewer::Vec(1,0,0), data); - drawArrow(0.06,0.12,10, CGAL::qglviewer::Vec(0,0,0),CGAL::qglviewer::Vec(0,length,0),CGAL::qglviewer::Vec(0,1,0), data); - drawArrow(0.06,0.12,10, CGAL::qglviewer::Vec(0,0,0),CGAL::qglviewer::Vec(0,0,length),CGAL::qglviewer::Vec(0,0,1), data); - rendering_program_light.bind(); - vaos[AXIS].bind(); - vbos[Axis].bind(); - vbos[Axis].allocate(data.data(), static_cast(data.size() * sizeof(float))); - rendering_program_light.enableAttributeArray("vertex"); - rendering_program_light.setAttributeBuffer("vertex",GL_FLOAT,0,3, - static_cast(9*sizeof(float))); - - rendering_program_light.enableAttributeArray("normal"); - rendering_program_light.setAttributeBuffer("normal",GL_FLOAT,3*sizeof(float),3, - static_cast(9*sizeof(float))); - - rendering_program_light.enableAttributeArray("colors"); - rendering_program_light.setAttributeBuffer("colors",GL_FLOAT,6*sizeof(float),3, - static_cast(9*sizeof(float))); - vbos[Axis].release(); - vaos[AXIS].release(); - axis_size = data.size(); - rendering_program_light.release(); + std::vector axis_x_data, axis_y_data, axis_z_data; + + drawArrow(0.06,0.12,10, CGAL::qglviewer::Vec(0,0,0),CGAL::qglviewer::Vec(length,0,0), axis_x_data); + drawArrow(0.06,0.12,10, CGAL::qglviewer::Vec(0,0,0),CGAL::qglviewer::Vec(0,length,0), axis_y_data); + drawArrow(0.06,0.12,10, CGAL::qglviewer::Vec(0,0,0),CGAL::qglviewer::Vec(0,0,length), axis_z_data); + + rendering_program.bind(); + + vaos[AXIS_X].bind(); + vbos[Axis_x].bind(); + vbos[Axis_x].allocate(axis_x_data.data(), static_cast(axis_x_data.size() * sizeof(float))); + rendering_program.enableAttributeArray("vertex"); + rendering_program.setAttributeBuffer("vertex",GL_FLOAT,0,3); + vbos[Axis_x].release(); + vaos[AXIS_X].release(); + + vaos[AXIS_Y].bind(); + vbos[Axis_y].bind(); + vbos[Axis_y].allocate(axis_y_data.data(), static_cast(axis_y_data.size() * sizeof(float))); + rendering_program.enableAttributeArray("vertex"); + rendering_program.setAttributeBuffer("vertex",GL_FLOAT,0,3); + vbos[Axis_y].release(); + vaos[AXIS_Y].release(); + + vaos[AXIS_Z].bind(); + vbos[Axis_z].bind(); + vbos[Axis_z].allocate(axis_z_data.data(), static_cast(axis_z_data.size() * sizeof(float))); + rendering_program.enableAttributeArray("vertex"); + rendering_program.setAttributeBuffer("vertex",GL_FLOAT,0,3); + vbos[Axis_z].release(); + vaos[AXIS_Z].release(); + + rendering_program.release(); + + axis_size = axis_x_data.size(); // == axis_y_data.size() == axis_z_data.size() } /*! Draws a grid in the XY plane, centered on (0,0,0) (defined in the current @@ -3453,66 +3280,70 @@ CGAL_INLINE_FUNCTION void CGAL::QGLViewer::drawGrid(qreal size, int nbSubdivisions) { //The Grid - std::vector v_Grid; + std::vector grid_data; for (int i=0; i<=nbSubdivisions; ++i) { - const float pos = float(size*(2.0*i/nbSubdivisions-1.0)); - v_Grid.push_back(pos); - v_Grid.push_back(float(-size)); - v_Grid.push_back(0.f); + const float pos = float(size*(2.0*i/nbSubdivisions-1.0)); + grid_data.push_back(pos); + grid_data.push_back(float(-size)); + grid_data.push_back(0.f); - v_Grid.push_back(pos); - v_Grid.push_back(float(+size)); - v_Grid.push_back(0.f); + grid_data.push_back(pos); + grid_data.push_back(float(+size)); + grid_data.push_back(0.f); - v_Grid.push_back(float(-size)); - v_Grid.push_back(pos); - v_Grid.push_back(0.f); + grid_data.push_back(float(-size)); + grid_data.push_back(pos); + grid_data.push_back(0.f); - v_Grid.push_back( float(size)); - v_Grid.push_back( pos); - v_Grid.push_back( 0.f); + grid_data.push_back(float(size)); + grid_data.push_back(pos); + grid_data.push_back(0.f); } + rendering_program.bind(); vaos[GRID].bind(); vbos[Grid].bind(); - vbos[Grid].allocate(v_Grid.data(),static_cast(v_Grid.size()*sizeof(float))); + vbos[Grid].allocate(grid_data.data(),static_cast(grid_data.size()*sizeof(float))); rendering_program.enableAttributeArray("vertex"); rendering_program.setAttributeBuffer("vertex",GL_FLOAT,0,3); vbos[Grid].release(); vaos[GRID].release(); rendering_program.release(); - grid_size = v_Grid.size(); + grid_size = grid_data.size(); //The Axis - std::vector d_axis; - d_axis.resize(0); - //d_axis is filled by drawArrow always this way : V.x V.y V.z N.x N.y N.z C.r C.g C.b, so it is possible - //to use a single buffer with offset and stride - drawArrow(0.005*size,0.02*size,10, CGAL::qglviewer::Vec(0,0,0),CGAL::qglviewer::Vec(size,0,0),CGAL::qglviewer::Vec(1,0,0), d_axis); - drawArrow(0.005*size,0.02*size,10, CGAL::qglviewer::Vec(0,0,0),CGAL::qglviewer::Vec(0,size,0),CGAL::qglviewer::Vec(0,1,0), d_axis); + std::vector grid_axis_x_data, grid_axis_y_data; + grid_axis_x_data.reserve(270); // default subdivision parameter yields this amount + grid_axis_y_data.reserve(270); - rendering_program_light.bind(); - vaos[GRID_AXIS].bind(); - vbos[Grid_axis].bind(); - vbos[Grid_axis].allocate(d_axis.data(), static_cast(d_axis.size() * sizeof(float))); - rendering_program_light.enableAttributeArray("vertex"); - rendering_program_light.setAttributeBuffer("vertex",GL_FLOAT,0,3, - static_cast(9*sizeof(float))); + //axis_data is filled by drawArrow always this way : V.x V.y V.z + drawArrow(0.005,0.02,10, CGAL::qglviewer::Vec(0,0,0),CGAL::qglviewer::Vec(size,0,0), grid_axis_x_data); + drawArrow(0.005,0.02,10, CGAL::qglviewer::Vec(0,0,0),CGAL::qglviewer::Vec(0,size,0), grid_axis_y_data); - rendering_program_light.enableAttributeArray("normal"); - rendering_program_light.setAttributeBuffer("normal",GL_FLOAT,3*sizeof(float),3, - static_cast(9*sizeof(float))); + rendering_program.bind(); - rendering_program_light.enableAttributeArray("colors"); - rendering_program_light.setAttributeBuffer("colors",GL_FLOAT,6*sizeof(float),3, - static_cast(9*sizeof(float))); - vbos[Grid_axis].release(); + // X + vaos[GRID_AXIS_X].bind(); + vbos[Grid_axis_x].bind(); + vbos[Grid_axis_x].allocate(grid_axis_x_data.data(), static_cast(grid_axis_x_data.size() * sizeof(float))); + rendering_program.enableAttributeArray("vertex"); + rendering_program.setAttributeBuffer("vertex",GL_FLOAT,0,3); + vbos[Grid_axis_x].release(); + vaos[GRID_AXIS_X].release(); - vaos[GRID_AXIS].release(); - rendering_program_light.release(); + // Y + vaos[GRID_AXIS_Y].bind(); + vbos[Grid_axis_y].bind(); + vbos[Grid_axis_y].allocate(grid_axis_y_data.data(), static_cast(grid_axis_y_data.size() * sizeof(float))); + rendering_program.enableAttributeArray("vertex"); + rendering_program.setAttributeBuffer("vertex",GL_FLOAT,0,3); + vbos[Grid_axis_y].release(); + vaos[GRID_AXIS_Y].release(); + + rendering_program.release(); - g_axis_size = d_axis.size(); + grid_axis_size = grid_axis_x_data.size(); // == grid_axis_y_data.size() } //////////////////////////////////////////////////////////////////////////////// @@ -3529,7 +3360,7 @@ void CGAL::QGLViewer::copyBufferToTexture(GLint , GLenum ) { Use glBindTexture() to use this texture. Note that this is already done by copyBufferToTexture(). -Returns \c 0 is copyBufferToTexture() was never called or if the texure was +Returns \c 0 is copyBufferToTexture() was never called or if the texture was deleted using glDeleteTextures() since then. */ CGAL_INLINE_FUNCTION GLuint CGAL::QGLViewer::bufferTextureId() const { @@ -3543,7 +3374,7 @@ void CGAL::QGLViewer::setOffset(CGAL::qglviewer::Vec offset) } CGAL_INLINE_FUNCTION -CGAL::qglviewer::Vec CGAL::QGLViewer::offset()const +const CGAL::qglviewer::Vec& CGAL::QGLViewer::offset() const { return _offset; } @@ -3566,7 +3397,7 @@ void CGAL::QGLViewer::setSceneCenter(const CGAL::qglviewer::Vec ¢er) { CGAL_INLINE_FUNCTION void CGAL::QGLViewer::setSceneBoundingBox(const CGAL::qglviewer::Vec &min, - const CGAL::qglviewer::Vec &max) { + const CGAL::qglviewer::Vec &max) { camera()->setSceneBoundingBox(min + offset(), max + offset()); } @@ -3578,7 +3409,10 @@ void CGAL::QGLViewer::showEntireScene() { CGAL_INLINE_FUNCTION -QImage* CGAL::QGLViewer::takeSnapshot( CGAL::qglviewer::SnapShotBackground background_color, QSize finalSize, double oversampling, bool expand) +QImage* CGAL::QGLViewer::takeSnapshot(CGAL::qglviewer::SnapShotBackground background_color, + QSize finalSize, + double oversampling, + bool expand) { makeCurrent(); qreal aspectRatio = width() / static_cast(height()); @@ -3606,7 +3440,6 @@ QImage* CGAL::QGLViewer::takeSnapshot( CGAL::qglviewer::SnapShotBackground back QSize subSize(int(width()/oversampling), int(height()/oversampling)); QSize size=QSize(width(), height()); - qreal newAspectRatio = finalSize.width() / static_cast(finalSize.height()); qreal zNear = camera()->zNear(); diff --git a/thirdparty/CGAL/include/CGAL/Qt/qglviewer_impl_list.h b/thirdparty/CGAL/include/CGAL/Qt/qglviewer_impl_list.h index fc179b88..74fb32b4 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/qglviewer_impl_list.h +++ b/thirdparty/CGAL/include/CGAL/Qt/qglviewer_impl_list.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/qglviewer_impl_list.h $ -// $Id: qglviewer_impl_list.h 1ef976e 2019-10-19T16:09:56+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/qglviewer_impl_list.h $ +// $Id: include/CGAL/Qt/qglviewer_impl_list.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifndef QGLVIEWER_IMPL_LIST_H diff --git a/thirdparty/CGAL/include/CGAL/Qt/quaternion.h b/thirdparty/CGAL/include/CGAL/Qt/quaternion.h index 1a466d31..344ef557 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/quaternion.h +++ b/thirdparty/CGAL/include/CGAL/Qt/quaternion.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/quaternion.h $ -// $Id: quaternion.h 9cd0d45 2021-02-09T11:31:34+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/quaternion.h $ +// $Id: include/CGAL/Qt/quaternion.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifndef QGLVIEWER_QUATERNION_H @@ -36,7 +36,7 @@ namespace qglviewer { You can apply the Quaternion \c q rotation to the OpenGL matrices using: \code glMultMatrixd(q.matrix()); - // equvalent to glRotate(q.angle()*180.0/M_PI, q.axis().x, q.axis().y, + // equivalent to glRotate(q.angle()*180.0/M_PI, q.axis().x, q.axis().y, q.axis().z); \endcode Quaternion is part of the \c qglviewer namespace, specify \c diff --git a/thirdparty/CGAL/include/CGAL/Qt/quaternion_impl.h b/thirdparty/CGAL/include/CGAL/Qt/quaternion_impl.h index cdc0bab3..f89fb476 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/quaternion_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/quaternion_impl.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/quaternion_impl.h $ -// $Id: quaternion_impl.h c9a020b 2021-02-09T12:12:56+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/quaternion_impl.h $ +// $Id: include/CGAL/Qt/quaternion_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifdef CGAL_HEADER_ONLY diff --git a/thirdparty/CGAL/include/CGAL/Qt/resources.h b/thirdparty/CGAL/include/CGAL/Qt/resources.h index 575d537f..86b23ac1 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/resources.h +++ b/thirdparty/CGAL/include/CGAL/Qt/resources.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/resources.h $ -// $Id: resources.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/resources.h $ +// $Id: include/CGAL/Qt/resources.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/resources_impl.h b/thirdparty/CGAL/include/CGAL/Qt/resources_impl.h index 05230952..87a15e4c 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/resources_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/resources_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/resources_impl.h $ -// $Id: resources_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/resources_impl.h $ +// $Id: include/CGAL/Qt/resources_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/utility.h b/thirdparty/CGAL/include/CGAL/Qt/utility.h index f47bc4c9..042c8b17 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/utility.h +++ b/thirdparty/CGAL/include/CGAL/Qt/utility.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/utility.h $ -// $Id: utility.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/utility.h $ +// $Id: include/CGAL/Qt/utility.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/utility_impl.h b/thirdparty/CGAL/include/CGAL/Qt/utility_impl.h index 6423d6d3..3a643b1a 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/utility_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/utility_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/utility_impl.h $ -// $Id: utility_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/utility_impl.h $ +// $Id: include/CGAL/Qt/utility_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Qt/vec.h b/thirdparty/CGAL/include/CGAL/Qt/vec.h index e4293932..44e5900d 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/vec.h +++ b/thirdparty/CGAL/include/CGAL/Qt/vec.h @@ -6,13 +6,15 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/vec.h $ -// $Id: vec.h 9cd0d45 2021-02-09T11:31:34+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/vec.h $ +// $Id: include/CGAL/Qt/vec.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifndef QGLVIEWER_VEC_H #define QGLVIEWER_VEC_H +#include + #include #include diff --git a/thirdparty/CGAL/include/CGAL/Qt/vec_impl.h b/thirdparty/CGAL/include/CGAL/Qt/vec_impl.h index 1c0f1708..1997e194 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/vec_impl.h +++ b/thirdparty/CGAL/include/CGAL/Qt/vec_impl.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/vec_impl.h $ -// $Id: vec_impl.h c9a020b 2021-02-09T12:12:56+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/vec_impl.h $ +// $Id: include/CGAL/Qt/vec_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifdef CGAL_HEADER_ONLY @@ -59,7 +59,7 @@ void Vec::projectOnPlane(const Vec &normal) { /*! Returns a Vec orthogonal to the Vec. Its norm() depends on the Vec, but is zero only for a null Vec. Note that the function that associates an - orthogonalVec() to a Vec is not continous. */ + orthogonalVec() to a Vec is not continuous. */ CGAL_INLINE_FUNCTION Vec Vec::orthogonalVec() const { // Find smallest component. Keep equal case for null values. diff --git a/thirdparty/CGAL/include/CGAL/Qt/viewer_actions.h b/thirdparty/CGAL/include/CGAL/Qt/viewer_actions.h index 299281b3..f8d289d0 100644 --- a/thirdparty/CGAL/include/CGAL/Qt/viewer_actions.h +++ b/thirdparty/CGAL/include/CGAL/Qt/viewer_actions.h @@ -6,8 +6,8 @@ This file is part of a fork of the QGLViewer library version 2.7.0. *****************************************************************************/ -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/Qt/viewer_actions.h $ -// $Id: viewer_actions.h 06995b5 2020-09-30T16:28:25+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/Qt/viewer_actions.h $ +// $Id: include/CGAL/Qt/viewer_actions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-only #ifndef VIEWER_ACTIONS_H #define VIEWER_ACTIONS_H diff --git a/thirdparty/CGAL/include/CGAL/Quadtree.h b/thirdparty/CGAL/include/CGAL/Quadtree.h index 1bfa92ce..b534e06c 100644 --- a/thirdparty/CGAL/include/CGAL/Quadtree.h +++ b/thirdparty/CGAL/include/CGAL/Quadtree.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Orthtree/include/CGAL/Quadtree.h $ -// $Id: Quadtree.h 4d761ed 2021-04-01T14:21:01+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Orthtree/include/CGAL/Quadtree.h $ +// $Id: include/CGAL/Quadtree.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Quotient.h b/thirdparty/CGAL/include/CGAL/Quotient.h index 4b58e0cf..d0a36766 100644 --- a/thirdparty/CGAL/include/CGAL/Quotient.h +++ b/thirdparty/CGAL/include/CGAL/Quotient.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Quotient.h $ -// $Id: Quotient.h a037ca1 2021-10-04T17:01:41+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Quotient.h $ +// $Id: include/CGAL/Quotient.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -627,13 +627,13 @@ template< class NT > class Algebraic_structure_traits_quotient_base< Quotient::Sqrt, - Null_functor >::value, + typedef std::conditional_t< + !std::is_same_v< typename Algebraic_structure_traits::Sqrt, + Null_functor >, typename INTERN_QUOTIENT::Sqrt_selector< Type, Is_exact >::Sqrt, Null_functor - >::type Sqrt; + > Sqrt; class Simplify : public CGAL::cpp98::unary_function< Type&, void > { diff --git a/thirdparty/CGAL/include/CGAL/Quotient_fwd.h b/thirdparty/CGAL/include/CGAL/Quotient_fwd.h index c603bf80..d3f276c4 100644 --- a/thirdparty/CGAL/include/CGAL/Quotient_fwd.h +++ b/thirdparty/CGAL/include/CGAL/Quotient_fwd.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Quotient_fwd.h $ -// $Id: Quotient_fwd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Quotient_fwd.h $ +// $Id: include/CGAL/Quotient_fwd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/RS/Gmpfr_make_unique.h b/thirdparty/CGAL/include/CGAL/RS/Gmpfr_make_unique.h index 8c8927a7..71aa2c33 100644 --- a/thirdparty/CGAL/include/CGAL/RS/Gmpfr_make_unique.h +++ b/thirdparty/CGAL/include/CGAL/RS/Gmpfr_make_unique.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/Gmpfr_make_unique.h $ -// $Id: Gmpfr_make_unique.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/Gmpfr_make_unique.h $ +// $Id: include/CGAL/RS/Gmpfr_make_unique.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/RS/ak_1.h b/thirdparty/CGAL/include/CGAL/RS/ak_1.h index 856d940d..0f728b1e 100644 --- a/thirdparty/CGAL/include/CGAL/RS/ak_1.h +++ b/thirdparty/CGAL/include/CGAL/RS/ak_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/ak_1.h $ -// $Id: ak_1.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/ak_1.h $ +// $Id: include/CGAL/RS/ak_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/RS/ak_z_1.h b/thirdparty/CGAL/include/CGAL/RS/ak_z_1.h index d1a47ab1..d20e5139 100644 --- a/thirdparty/CGAL/include/CGAL/RS/ak_z_1.h +++ b/thirdparty/CGAL/include/CGAL/RS/ak_z_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/ak_z_1.h $ -// $Id: ak_z_1.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/ak_z_1.h $ +// $Id: include/CGAL/RS/ak_z_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/RS/algebraic_1.h b/thirdparty/CGAL/include/CGAL/RS/algebraic_1.h index b53777c6..b85f452b 100644 --- a/thirdparty/CGAL/include/CGAL/RS/algebraic_1.h +++ b/thirdparty/CGAL/include/CGAL/RS/algebraic_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/algebraic_1.h $ -// $Id: algebraic_1.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/algebraic_1.h $ +// $Id: include/CGAL/RS/algebraic_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda @@ -34,7 +34,7 @@ namespace RS_AK1{ // Refiner_()(const Polynomial_&,Bound_&,Bound_&,int p); // // The fourth template argument is a comparator, a function object that -// receives the polynomials and bounds defining two algebraic numbres and +// receives the polynomials and bounds defining two algebraic numbers and // just compares them, returning a CGAL::Comparison_result. The signature // of a comparator must be: // CGAL::Comparison_result diff --git a/thirdparty/CGAL/include/CGAL/RS/algebraic_z_1.h b/thirdparty/CGAL/include/CGAL/RS/algebraic_z_1.h index e1eec6e3..992af336 100644 --- a/thirdparty/CGAL/include/CGAL/RS/algebraic_z_1.h +++ b/thirdparty/CGAL/include/CGAL/RS/algebraic_z_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/algebraic_z_1.h $ -// $Id: algebraic_z_1.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/algebraic_z_1.h $ +// $Id: include/CGAL/RS/algebraic_z_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/RS/bisection_refiner_1.h b/thirdparty/CGAL/include/CGAL/RS/bisection_refiner_1.h index 946cd0e1..6c7cc1e5 100644 --- a/thirdparty/CGAL/include/CGAL/RS/bisection_refiner_1.h +++ b/thirdparty/CGAL/include/CGAL/RS/bisection_refiner_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/bisection_refiner_1.h $ -// $Id: bisection_refiner_1.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/bisection_refiner_1.h $ +// $Id: include/CGAL/RS/bisection_refiner_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/RS/comparator_1.h b/thirdparty/CGAL/include/CGAL/RS/comparator_1.h index 4a92bff7..768f1ae4 100644 --- a/thirdparty/CGAL/include/CGAL/RS/comparator_1.h +++ b/thirdparty/CGAL/include/CGAL/RS/comparator_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/comparator_1.h $ -// $Id: comparator_1.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/comparator_1.h $ +// $Id: include/CGAL/RS/comparator_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/RS/dyadic.h b/thirdparty/CGAL/include/CGAL/RS/dyadic.h index 0b0b2a19..9a24a6ab 100644 --- a/thirdparty/CGAL/include/CGAL/RS/dyadic.h +++ b/thirdparty/CGAL/include/CGAL/RS/dyadic.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/dyadic.h $ -// $Id: dyadic.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/dyadic.h $ +// $Id: include/CGAL/RS/dyadic.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/RS/exact_signat_1.h b/thirdparty/CGAL/include/CGAL/RS/exact_signat_1.h index be3d8183..db56e670 100644 --- a/thirdparty/CGAL/include/CGAL/RS/exact_signat_1.h +++ b/thirdparty/CGAL/include/CGAL/RS/exact_signat_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/exact_signat_1.h $ -// $Id: exact_signat_1.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/exact_signat_1.h $ +// $Id: include/CGAL/RS/exact_signat_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/RS/functors_1.h b/thirdparty/CGAL/include/CGAL/RS/functors_1.h index 4588dcb4..c9963577 100644 --- a/thirdparty/CGAL/include/CGAL/RS/functors_1.h +++ b/thirdparty/CGAL/include/CGAL/RS/functors_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/functors_1.h $ -// $Id: functors_1.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/functors_1.h $ +// $Id: include/CGAL/RS/functors_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/RS/functors_z_1.h b/thirdparty/CGAL/include/CGAL/RS/functors_z_1.h index c3275c55..e82589c2 100644 --- a/thirdparty/CGAL/include/CGAL/RS/functors_z_1.h +++ b/thirdparty/CGAL/include/CGAL/RS/functors_z_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/functors_z_1.h $ -// $Id: functors_z_1.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/functors_z_1.h $ +// $Id: include/CGAL/RS/functors_z_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/RS/polynomial_converter_1.h b/thirdparty/CGAL/include/CGAL/RS/polynomial_converter_1.h index db523265..6f791938 100644 --- a/thirdparty/CGAL/include/CGAL/RS/polynomial_converter_1.h +++ b/thirdparty/CGAL/include/CGAL/RS/polynomial_converter_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/polynomial_converter_1.h $ -// $Id: polynomial_converter_1.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/polynomial_converter_1.h $ +// $Id: include/CGAL/RS/polynomial_converter_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/RS/rs23_k_isolator_1.h b/thirdparty/CGAL/include/CGAL/RS/rs23_k_isolator_1.h index 5db170ed..9af05287 100644 --- a/thirdparty/CGAL/include/CGAL/RS/rs23_k_isolator_1.h +++ b/thirdparty/CGAL/include/CGAL/RS/rs23_k_isolator_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/rs23_k_isolator_1.h $ -// $Id: rs23_k_isolator_1.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/rs23_k_isolator_1.h $ +// $Id: include/CGAL/RS/rs23_k_isolator_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/RS/rs2_calls.h b/thirdparty/CGAL/include/CGAL/RS/rs2_calls.h index 83959f84..1091c32b 100644 --- a/thirdparty/CGAL/include/CGAL/RS/rs2_calls.h +++ b/thirdparty/CGAL/include/CGAL/RS/rs2_calls.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/rs2_calls.h $ -// $Id: rs2_calls.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/rs2_calls.h $ +// $Id: include/CGAL/RS/rs2_calls.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda @@ -29,8 +29,7 @@ // the version of MPFR is one of those buggy versions, abort the compilation // and instruct the user to update MPFR or don't use RS3. #ifdef CGAL_USE_RS3 -#include -BOOST_STATIC_ASSERT_MSG( +static_assert( MPFR_VERSION_MAJOR!=3 || MPFR_VERSION_MINOR!=1 || MPFR_VERSION_PATCHLEVEL<3 || MPFR_VERSION_PATCHLEVEL>6, diff --git a/thirdparty/CGAL/include/CGAL/RS/rs2_isolator_1.h b/thirdparty/CGAL/include/CGAL/RS/rs2_isolator_1.h index a1b5d6df..c34b239a 100644 --- a/thirdparty/CGAL/include/CGAL/RS/rs2_isolator_1.h +++ b/thirdparty/CGAL/include/CGAL/RS/rs2_isolator_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/rs2_isolator_1.h $ -// $Id: rs2_isolator_1.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/rs2_isolator_1.h $ +// $Id: include/CGAL/RS/rs2_isolator_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/RS/rs3_k_refiner_1.h b/thirdparty/CGAL/include/CGAL/RS/rs3_k_refiner_1.h index 9f9d6851..5efefbd4 100644 --- a/thirdparty/CGAL/include/CGAL/RS/rs3_k_refiner_1.h +++ b/thirdparty/CGAL/include/CGAL/RS/rs3_k_refiner_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/rs3_k_refiner_1.h $ -// $Id: rs3_k_refiner_1.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/rs3_k_refiner_1.h $ +// $Id: include/CGAL/RS/rs3_k_refiner_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/RS/rs3_refiner_1.h b/thirdparty/CGAL/include/CGAL/RS/rs3_refiner_1.h index fb7c5328..4786e6de 100644 --- a/thirdparty/CGAL/include/CGAL/RS/rs3_refiner_1.h +++ b/thirdparty/CGAL/include/CGAL/RS/rs3_refiner_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/rs3_refiner_1.h $ -// $Id: rs3_refiner_1.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/rs3_refiner_1.h $ +// $Id: include/CGAL/RS/rs3_refiner_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/RS/signat_1.h b/thirdparty/CGAL/include/CGAL/RS/signat_1.h index 40ff6562..35a2780f 100644 --- a/thirdparty/CGAL/include/CGAL/RS/signat_1.h +++ b/thirdparty/CGAL/include/CGAL/RS/signat_1.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_d/include/CGAL/RS/signat_1.h $ -// $Id: signat_1.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_d/include/CGAL/RS/signat_1.h $ +// $Id: include/CGAL/RS/signat_1.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda @@ -14,7 +14,6 @@ #include #include #include "exact_signat_1.h" -//#include #include namespace CGAL{ @@ -40,7 +39,7 @@ Signat_1::operator()(const Bound_ &x)const{ //typedef Algebraic_structure_traits AStraits; // This generic signat works only when Bound_ is an exact type. For // non-exact types, an implementation must be provided. - //BOOST_MPL_ASSERT((boost::is_same)); + //static_assert(std::is_same::value); int d=Degree()(pol); Bound h(pol[d]); for(int i=1;i<=d;++i) diff --git a/thirdparty/CGAL/include/CGAL/Random.h b/thirdparty/CGAL/include/CGAL/Random.h index b6bbebc3..cab1815d 100644 --- a/thirdparty/CGAL/include/CGAL/Random.h +++ b/thirdparty/CGAL/include/CGAL/Random.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Random_numbers/include/CGAL/Random.h $ -// $Id: Random.h 7e05923 2020-12-15T09:35:25+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Random_numbers/include/CGAL/Random.h $ +// $Id: include/CGAL/Random.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Random_access_adaptor.h b/thirdparty/CGAL/include/CGAL/Random_access_adaptor.h index b2661e09..21ad64c6 100644 --- a/thirdparty/CGAL/include/CGAL/Random_access_adaptor.h +++ b/thirdparty/CGAL/include/CGAL/Random_access_adaptor.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Random_access_adaptor.h $ -// $Id: Random_access_adaptor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Random_access_adaptor.h $ +// $Id: include/CGAL/Random_access_adaptor.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Random_access_value_adaptor.h b/thirdparty/CGAL/include/CGAL/Random_access_value_adaptor.h index cfc5ba33..628eee6e 100644 --- a/thirdparty/CGAL/include/CGAL/Random_access_value_adaptor.h +++ b/thirdparty/CGAL/include/CGAL/Random_access_value_adaptor.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Random_access_value_adaptor.h $ -// $Id: Random_access_value_adaptor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Random_access_value_adaptor.h $ +// $Id: include/CGAL/Random_access_value_adaptor.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Random_convex_hull_traits_2.h b/thirdparty/CGAL/include/CGAL/Random_convex_hull_traits_2.h index 34e63e90..855708da 100644 --- a/thirdparty/CGAL/include/CGAL/Random_convex_hull_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Random_convex_hull_traits_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generator/include/CGAL/Random_convex_hull_traits_2.h $ -// $Id: Random_convex_hull_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generator/include/CGAL/Random_convex_hull_traits_2.h $ +// $Id: include/CGAL/Random_convex_hull_traits_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Random_convex_set_traits_2.h b/thirdparty/CGAL/include/CGAL/Random_convex_set_traits_2.h index b03b78f4..2499dbba 100644 --- a/thirdparty/CGAL/include/CGAL/Random_convex_set_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Random_convex_set_traits_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generator/include/CGAL/Random_convex_set_traits_2.h $ -// $Id: Random_convex_set_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generator/include/CGAL/Random_convex_set_traits_2.h $ +// $Id: include/CGAL/Random_convex_set_traits_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Random_impl.h b/thirdparty/CGAL/include/CGAL/Random_impl.h index 7e145257..229f454a 100644 --- a/thirdparty/CGAL/include/CGAL/Random_impl.h +++ b/thirdparty/CGAL/include/CGAL/Random_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Random_numbers/include/CGAL/Random_impl.h $ -// $Id: Random_impl.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Random_numbers/include/CGAL/Random_impl.h $ +// $Id: include/CGAL/Random_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,6 +23,7 @@ #include #include #include +#include namespace CGAL { @@ -40,7 +41,7 @@ Random() std::time( &s); seed = (unsigned int)s; // initialize random numbers generator - rng.seed(static_cast(seed)); + rng.seed(static_cast(seed)); random_value = get_int(0, 1<<15); } @@ -55,7 +56,7 @@ Random(internal::Random_print_seed) seed = (unsigned int)s; std::cerr << "CGAL::Random()::get_seed() = " << seed << std::endl; // initialize random numbers generator - rng.seed(static_cast(seed)); + rng.seed(static_cast(seed)); random_value = get_int(0, 1<<15); } @@ -65,7 +66,7 @@ Random( unsigned int seed) : val(0), seed(seed) { // initialize random numbers generator - rng.seed(static_cast(seed)); + rng.seed(static_cast(seed)); random_value = get_int(0, 1<<15); } diff --git a/thirdparty/CGAL/include/CGAL/Random_polygon_2_sweep.h b/thirdparty/CGAL/include/CGAL/Random_polygon_2_sweep.h index eb79b3c4..a4d05a7b 100644 --- a/thirdparty/CGAL/include/CGAL/Random_polygon_2_sweep.h +++ b/thirdparty/CGAL/include/CGAL/Random_polygon_2_sweep.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generator/include/CGAL/Random_polygon_2_sweep.h $ -// $Id: Random_polygon_2_sweep.h 59e443d 2021-03-29T14:30:39+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generator/include/CGAL/Random_polygon_2_sweep.h $ +// $Id: include/CGAL/Random_polygon_2_sweep.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include @@ -156,9 +156,9 @@ less_than_in_tree(Vertex_index new_edge, Vertex_index tree_edge) const #if defined(CGAL_POLY_GENERATOR_DEBUG) std::cout << "less_than_in_tree; new: " << new_edge.as_int() << " tree edge: " << tree_edge.as_int() << std::endl; #endif - CGAL_polygon_precondition( + CGAL_precondition( m_vertex_data->edges[tree_edge.as_int()].is_in_tree); - CGAL_polygon_precondition( + CGAL_precondition( !m_vertex_data->edges[new_edge.as_int()].is_in_tree); Vertex_index left, mid, right; m_vertex_data->left_and_right_index(left, right, tree_edge); @@ -172,10 +172,10 @@ less_than_in_tree(Vertex_index new_edge, Vertex_index tree_edge) const case RIGHT_TURN: return false; case COLLINEAR: break; } - CGAL_polygon_assertion(m_vertex_data->less_xy_2( + CGAL_assertion(m_vertex_data->less_xy_2( m_vertex_data->point(left), m_vertex_data->point(mid))); - CGAL_polygon_assertion( m_vertex_data->less_xy_2( + CGAL_assertion( m_vertex_data->less_xy_2( m_vertex_data->point(mid), m_vertex_data->point(right))); m_vertex_data->is_simple_result = false; @@ -321,23 +321,23 @@ insertion_event(Tree *tree, Vertex_index prev_vt, std::pair result; if (left_turn) { result = tree->insert(prev_vt); - // CGAL_polygon_assertion(result.second) + // CGAL_assertion(result.second) td_prev.tree_it = result.first; td_prev.is_in_tree = true; if (!this->is_simple_result) return false; result = tree->insert(mid_vt); - // CGAL_polygon_assertion(result.second) + // CGAL_assertion(result.second) td_mid.tree_it = result.first; td_mid.is_in_tree = true; if (!this->is_simple_result) return false; } else { result = tree->insert(mid_vt); - // CGAL_polygon_assertion(result.second) + // CGAL_assertion(result.second) td_mid.tree_it = result.first; td_mid.is_in_tree = true; if (!this->is_simple_result) return false; result = tree->insert(prev_vt); - // CGAL_polygon_assertion(result.second) + // CGAL_assertion(result.second) td_prev.tree_it = result.first; td_prev.is_in_tree = true; if (!this->is_simple_result) return false; @@ -374,7 +374,7 @@ replacement_event(Tree *tree, Vertex_index cur_edge, Vertex_index next_edge) // check if continuation point is on the right side of neighbor segments typedef typename Tree::iterator It; Edge_data &td = edges[cur_edge.as_int()]; - CGAL_polygon_assertion(td.is_in_tree); + CGAL_assertion(td.is_in_tree); It cur_seg = td.tree_it; Vertex_index cur_vt = (td.is_left_to_right) ? next_edge : cur_edge; if (cur_seg != tree->begin()) { @@ -613,7 +613,7 @@ void make_simple_polygon(Iterator points_begin, Iterator points_end, #if defined(CGAL_POLY_GENERATOR_DEBUG) std::cout << "To swap: " << swap_interval.first << " " << swap_interval.second << std::endl; - CGAL_polygon_assertion(swap_interval.first >= -1 && + CGAL_assertion(swap_interval.first >= -1 && swap_interval.second >= -1 && swap_interval.first < size && swap_interval.second < size); diff --git a/thirdparty/CGAL/include/CGAL/Random_polygon_traits_2.h b/thirdparty/CGAL/include/CGAL/Random_polygon_traits_2.h index 25852ef6..709552bb 100644 --- a/thirdparty/CGAL/include/CGAL/Random_polygon_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Random_polygon_traits_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generator/include/CGAL/Random_polygon_traits_2.h $ -// $Id: Random_polygon_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generator/include/CGAL/Random_polygon_traits_2.h $ +// $Id: include/CGAL/Random_polygon_traits_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Range_segment_tree_traits.h b/thirdparty/CGAL/include/CGAL/Range_segment_tree_traits.h index 5f53baab..7e6ca897 100644 --- a/thirdparty/CGAL/include/CGAL/Range_segment_tree_traits.h +++ b/thirdparty/CGAL/include/CGAL/Range_segment_tree_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/SearchStructures/include/CGAL/Range_segment_tree_traits.h $ -// $Id: Range_segment_tree_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SearchStructures/include/CGAL/Range_segment_tree_traits.h $ +// $Id: include/CGAL/Range_segment_tree_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Range_tree_d.h b/thirdparty/CGAL/include/CGAL/Range_tree_d.h index 88ceaf47..bc97bc78 100644 --- a/thirdparty/CGAL/include/CGAL/Range_tree_d.h +++ b/thirdparty/CGAL/include/CGAL/Range_tree_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/SearchStructures/include/CGAL/Range_tree_d.h $ -// $Id: Range_tree_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SearchStructures/include/CGAL/Range_tree_d.h $ +// $Id: include/CGAL/Range_tree_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,7 +27,7 @@ // A d-dimensional Range Tree or a multilayer tree consisting of Range // and other trees that are derived public // Tree_base -// can be construced within this class. +// can be constructed within this class. // C_Data: container class which contains the d-dimensional data the tree holds. // C_Window: Query window -- a d-dimensional interval // C_Interface: Interface for the class with functions that allow to @@ -202,7 +202,7 @@ class Range_tree_d: public Tree_base< C_Data, C_Window> // recursive function // (current,last) describe an interval of length n of sorted elements, // for this interval a tree is build containing these elements. - // the most left child is returend in prevchild. + // the most left child is returned in prevchild. template void build_range_tree(int n, link_type& leftchild, @@ -222,18 +222,18 @@ class Range_tree_d: public Tree_base< C_Data, C_Window> link_type vleft = new Range_tree_node2( 0, 0, (*current), m_interface.get_key(*current) ); //CGAL_NIL CGAL_NIL first two arguments - CGAL_Tree_assertion( vleft != 0); + CGAL_assertion( vleft != 0); ++current; link_type vright = new Range_tree_node2( 0,0, (*current), m_interface.get_key(*current) ); //CGAL_NIL CGAL_NIL first two arguments - CGAL_Tree_assertion( vright != 0); + CGAL_assertion( vright != 0); current++; sublevel_last = current; link_type vparent = new Range_tree_node2( vleft, vright, vleft->key ); - CGAL_Tree_assertion( vparent != 0); + CGAL_assertion( vparent != 0); vleft->parent_link = vparent; vright->parent_link = vparent; @@ -260,7 +260,7 @@ class Range_tree_d: public Tree_base< C_Data, C_Window> link_type vright = new Range_tree_node2( 0, 0, (*current), m_interface.get_key(*current) ); //CGAL_NIL CGAL_NIL first two arguments - CGAL_Tree_assertion( vright != 0); //CGAL_NIL + CGAL_assertion( vright != 0); //CGAL_NIL current++; sublevel_last = current; prevchild = vright; @@ -268,7 +268,7 @@ class Range_tree_d: public Tree_base< C_Data, C_Window> } else { - // recursiv call for the construction. the interval is devided. + // recursiv call for the construction. the interval is divided. T sublevel_left, sublevel_right; build_range_tree(n - (int)n/2, leftchild, rightchild, prevchild, leftmostlink, current, last, @@ -276,7 +276,7 @@ class Range_tree_d: public Tree_base< C_Data, C_Window> link_type vparent = new Range_tree_node2( prevchild, 0, rightchild->key ); //CGAL_NIL argument - CGAL_Tree_assertion( vparent != 0); + CGAL_assertion( vparent != 0); prevchild->parent_link = vparent; diff --git a/thirdparty/CGAL/include/CGAL/Range_tree_k.h b/thirdparty/CGAL/include/CGAL/Range_tree_k.h index ad3bd842..638b4588 100644 --- a/thirdparty/CGAL/include/CGAL/Range_tree_k.h +++ b/thirdparty/CGAL/include/CGAL/Range_tree_k.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/SearchStructures/include/CGAL/Range_tree_k.h $ -// $Id: Range_tree_k.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SearchStructures/include/CGAL/Range_tree_k.h $ +// $Id: include/CGAL/Range_tree_k.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Rational_traits.h b/thirdparty/CGAL/include/CGAL/Rational_traits.h index 1220aa76..f6b93420 100644 --- a/thirdparty/CGAL/include/CGAL/Rational_traits.h +++ b/thirdparty/CGAL/include/CGAL/Rational_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_foundations/include/CGAL/Rational_traits.h $ -// $Id: Rational_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_foundations/include/CGAL/Rational_traits.h $ +// $Id: include/CGAL/Rational_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,8 @@ #include #include #include -#include + +#include namespace CGAL { @@ -79,11 +80,11 @@ struct Rational_traits_base { return make_rational(x.first, x.second); } template - Rational make_rational(const N& n, const D& d,typename boost::enable_if_c::value&&is_implicit_convertible::value,int>::type=0) const + Rational make_rational(const N& n, const D& d,std::enable_if_t::value&&is_implicit_convertible::value,int> = 0) const { return Compose()(n,d); } template - Rational make_rational(const N& n, const D& d,typename boost::enable_if_c::value||!is_implicit_convertible::value,int>::type=0) const + Rational make_rational(const N& n, const D& d,std::enable_if_t::value||!is_implicit_convertible::value,int> = 0) const { return n/d; } // Assume that n or d is already a fraction }; }// namespace internal @@ -92,9 +93,9 @@ struct Rational_traits_base template class Rational_traits : public internal::Rational_traits_base::Is_fraction,Tag_true>::value +::std::is_same::Is_fraction,Tag_true>::value && -::boost::is_same< +::std::is_same< typename Fraction_traits::Numerator_type, typename Fraction_traits::Denominator_type >::value > diff --git a/thirdparty/CGAL/include/CGAL/Ray_2.h b/thirdparty/CGAL/include/CGAL/Ray_2.h index 282376b6..50adbb49 100644 --- a/thirdparty/CGAL/include/CGAL/Ray_2.h +++ b/thirdparty/CGAL/include/CGAL/Ray_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Ray_2.h $ -// $Id: Ray_2.h 8fa0f55 2021-05-27T10:27:38+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Ray_2.h $ +// $Id: include/CGAL/Ray_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,13 +18,14 @@ #define CGAL_RAY_2_H #include -#include #include #include #include #include #include +#include + namespace CGAL { template @@ -41,7 +42,7 @@ class Ray_2 : public R_::Kernel_base::Ray_2 typedef typename R_::Kernel_base::Ray_2 RRay_2; typedef Ray_2 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Ray_3.h b/thirdparty/CGAL/include/CGAL/Ray_3.h index 64541afe..bbe1c594 100644 --- a/thirdparty/CGAL/include/CGAL/Ray_3.h +++ b/thirdparty/CGAL/include/CGAL/Ray_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Ray_3.h $ -// $Id: Ray_3.h 8fa0f55 2021-05-27T10:27:38+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Ray_3.h $ +// $Id: include/CGAL/Ray_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,6 @@ #define CGAL_RAY_3_H #include -#include #include #include #include @@ -37,7 +36,7 @@ class Ray_3 : public R_::Kernel_base::Ray_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Ray_3 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Real_embeddable_traits.h b/thirdparty/CGAL/include/CGAL/Real_embeddable_traits.h index 874fa1e3..2d978cd9 100644 --- a/thirdparty/CGAL/include/CGAL/Real_embeddable_traits.h +++ b/thirdparty/CGAL/include/CGAL/Real_embeddable_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_foundations/include/CGAL/Real_embeddable_traits.h $ -// $Id: Real_embeddable_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_foundations/include/CGAL/Real_embeddable_traits.h $ +// $Id: include/CGAL/Real_embeddable_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Real_timer.h b/thirdparty/CGAL/include/CGAL/Real_timer.h index b3ac59ed..8c7a0e16 100644 --- a/thirdparty/CGAL/include/CGAL/Real_timer.h +++ b/thirdparty/CGAL/include/CGAL/Real_timer.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Profiling_tools/include/CGAL/Real_timer.h $ -// $Id: Real_timer.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Profiling_tools/include/CGAL/Real_timer.h $ +// $Id: include/CGAL/Real_timer.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -68,7 +68,7 @@ class CGAL_EXPORT Real_timer { double time() const; int intervals() const { return interv; } double precision() const; - // Returns timer precison. Computes it dynamically at first call. + // Returns timer precision. Computes it dynamically at first call. // Returns -1.0 if timer system call fails, which, for a proper coded // test towards precision leads to an immediate stop of an otherwise // infinite loop (fixed tolerance * total time >= precision). diff --git a/thirdparty/CGAL/include/CGAL/Real_timer_impl.h b/thirdparty/CGAL/include/CGAL/Real_timer_impl.h index 3e304691..0ce27f56 100644 --- a/thirdparty/CGAL/include/CGAL/Real_timer_impl.h +++ b/thirdparty/CGAL/include/CGAL/Real_timer_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Profiling_tools/include/CGAL/Real_timer_impl.h $ -// $Id: Real_timer_impl.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Profiling_tools/include/CGAL/Real_timer_impl.h $ +// $Id: include/CGAL/Real_timer_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Reconstruction_triangulation_3.h b/thirdparty/CGAL/include/CGAL/Reconstruction_triangulation_3.h index 44918e9c..e9633f5b 100644 --- a/thirdparty/CGAL/include/CGAL/Reconstruction_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/Reconstruction_triangulation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Poisson_surface_reconstruction_3/include/CGAL/Reconstruction_triangulation_3.h $ -// $Id: Reconstruction_triangulation_3.h 4968d21 2022-05-17T10:31:07+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Poisson_surface_reconstruction_3/include/CGAL/Reconstruction_triangulation_3.h $ +// $Id: include/CGAL/Reconstruction_triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,11 +21,12 @@ #include #include #include -#include +#include #include #include #include +#include #include #include @@ -148,6 +149,12 @@ struct Reconstruction_triangulation_default_geom_traits_3 : public BaseGt }; +template < class BaseGt > +struct Triangulation_structural_filtering_traits > { + typedef typename Triangulation_structural_filtering_traits::Use_structural_filtering_tag Use_structural_filtering_tag; +}; + + /// \internal /// The Reconstruction_triangulation_3 class /// provides the interface requested by the Poisson_reconstruction_function class: diff --git a/thirdparty/CGAL/include/CGAL/Rectangular_p_center_traits_2.h b/thirdparty/CGAL/include/CGAL/Rectangular_p_center_traits_2.h index 4b9420ba..6c649769 100644 --- a/thirdparty/CGAL/include/CGAL/Rectangular_p_center_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Rectangular_p_center_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/Rectangular_p_center_traits_2.h $ -// $Id: Rectangular_p_center_traits_2.h 5da7e84 2021-02-02T10:58:31+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/Rectangular_p_center_traits_2.h $ +// $Id: include/CGAL/Rectangular_p_center_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ #include #include #include -#include +#include namespace CGAL { @@ -228,21 +228,21 @@ struct Rectangular_p_center_matrix_search_traits_2 { bool operator()(FT v) { - CGAL_optimisation_assertion(ld.size() == ld_size); + CGAL_assertion(ld.size() == ld_size); ld.r = v / FT(2); bool ok; pf(ld, Wastebasket< Point_2 >(), ok); - CGAL_optimisation_assertion(ld.size() == ld_size); + CGAL_assertion(ld.size() == ld_size); return ok; } template < class OutputIterator > OutputIterator operator()(FT v, OutputIterator o, bool& ok) { - CGAL_optimisation_assertion(ld.size() == ld_size); + CGAL_assertion(ld.size() == ld_size); ld.r = v / FT(2); OutputIterator n = pf(ld, o, ok); - CGAL_optimisation_assertion(ld.size() == ld_size); + CGAL_assertion(ld.size() == ld_size); return n; //pf(ld, o, ok); } @@ -250,7 +250,7 @@ struct Rectangular_p_center_matrix_search_traits_2 { // data members: LD ld; PiercingFunction pf; - CGAL_optimisation_assertion_code(typename LD::size_type ld_size;) + CGAL_assertion_code(typename LD::size_type ld_size;) // copying this would be too inefficient Rectangular_p_center_matrix_search_traits_2( diff --git a/thirdparty/CGAL/include/CGAL/Referenced_argument.h b/thirdparty/CGAL/include/CGAL/Referenced_argument.h index aec77ddd..859e8de1 100644 --- a/thirdparty/CGAL/include/CGAL/Referenced_argument.h +++ b/thirdparty/CGAL/include/CGAL/Referenced_argument.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/Referenced_argument.h $ -// $Id: Referenced_argument.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/Referenced_argument.h $ +// $Id: include/CGAL/Referenced_argument.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus, Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/Regular_complex_d.h b/thirdparty/CGAL/include/CGAL/Regular_complex_d.h index 02acf4a4..55b4d407 100644 --- a/thirdparty/CGAL/include/CGAL/Regular_complex_d.h +++ b/thirdparty/CGAL/include/CGAL/Regular_complex_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_d/include/CGAL/Regular_complex_d.h $ -// $Id: Regular_complex_d.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_d/include/CGAL/Regular_complex_d.h $ +// $Id: include/CGAL/Regular_complex_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -266,7 +266,7 @@ vertices. A $0$-simplex is a point, a $1$-simplex is a line segment, a $2$-simplex is a triangle, a $3$-simplex is a tetrahedron, etc.. \emph{The simplices is a concrete simplicial complex must satisfy the additional conditions that the points associated with the -vertices of any simplex are affinely independet and that the +vertices of any simplex are affinely independent and that the intersection of any two simplices is a face of both.} We will write simplicial complex instead of concrete simplicial complex in the sequel. @@ -298,7 +298,7 @@ the functions |C.simplex(v)| and |C.index(v)| return a pair $(s,i)$ such that |v = C.vertex_of(s,i)|. The class |regl_complex| has a static member |nil_point| of type -|Point_d|. This point is different (= not indentical) from any user +|Point_d|. This point is different (= not identical) from any user defined point and is the point associated with every vertex of an abstract simplicial complex. It simulates the use of |nil| to denote an undefined object. diff --git a/thirdparty/CGAL/include/CGAL/Regular_grid_2.h b/thirdparty/CGAL/include/CGAL/Regular_grid_2.h index 1a858751..b005e49a 100644 --- a/thirdparty/CGAL/include/CGAL/Regular_grid_2.h +++ b/thirdparty/CGAL/include/CGAL/Regular_grid_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_lines_2/include/CGAL/Regular_grid_2.h $ -// $Id: Regular_grid_2.h 1faa0e2 2021-04-28T10:55:26+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_lines_2/include/CGAL/Regular_grid_2.h $ +// $Id: include/CGAL/Regular_grid_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #include -#include +#include #include @@ -59,7 +59,7 @@ class Regular_grid_2 std::pair get_field(const Point_2 & p) const { - CGAL_streamlines_precondition(is_in_domain(p)); + CGAL_precondition(is_in_domain(p)); Vector_2 v = get_vector_field(p); FT density = get_density_field(p); return std::pair(v,density); @@ -126,7 +126,7 @@ template inline typename Regular_grid_2::Vector_2 Regular_grid_2::get_field(int i, int j) const { - CGAL_streamlines_precondition(is_in_samples(i,j)); + CGAL_precondition(is_in_samples(i,j)); int index = get_index(i,j); return Vector_2((*vector_field)[index], (*vector_field)[index+1]); } @@ -137,7 +137,7 @@ Regular_grid_2::set_field(int i, int j, const Vector_2 & v) { - CGAL_streamlines_precondition(is_in_samples(i,j)); + CGAL_precondition(is_in_samples(i,j)); int index = get_index(i,j); (*vector_field)[index++] = v.x(); (*vector_field)[index] = v.y(); diff --git a/thirdparty/CGAL/include/CGAL/Regular_triangulation.h b/thirdparty/CGAL/include/CGAL/Regular_triangulation.h index 0f8dd3ef..99239191 100644 --- a/thirdparty/CGAL/include/CGAL/Regular_triangulation.h +++ b/thirdparty/CGAL/include/CGAL/Regular_triangulation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/Regular_triangulation.h $ -// $Id: Regular_triangulation.h e511b68 2021-02-09T17:32:00+01:00 ROUVREAU Vincent +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/Regular_triangulation.h $ +// $Id: include/CGAL/Regular_triangulation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Clement Jamin @@ -129,12 +129,12 @@ class Regular_triangulation // Wrapper struct Power_side_of_power_sphere_for_non_maximal_dim_d { - boost::optional* fop; + std::optional* fop; Construct_flat_orientation_d cfo; In_flat_power_side_of_power_sphere_d ifpt; Power_side_of_power_sphere_for_non_maximal_dim_d( - boost::optional& x, + std::optional& x, Construct_flat_orientation_d const&y, In_flat_power_side_of_power_sphere_d const&z) : fop(&x), cfo(y), ifpt(z) {} @@ -144,7 +144,7 @@ class Regular_triangulation { if(!*fop) *fop=cfo(a,b); - return ifpt(fop->get(),a,b,p); + return ifpt(fop->value(),a,b,p); } }; @@ -652,7 +652,7 @@ ::remove( Vertex_handle v ) // 2. Find corresponding Facet on boundary of dark zone // 3. stitch. - // 1. Build a facet on the boudary of the light zone: + // 1. Build a facet on the boundary of the light zone: Full_cell_handle light_s = *simps.begin(); Facet light_ft(light_s, light_s->index(v)); diff --git a/thirdparty/CGAL/include/CGAL/Regular_triangulation_2.h b/thirdparty/CGAL/include/CGAL/Regular_triangulation_2.h index cab445c2..b81ad5ad 100644 --- a/thirdparty/CGAL/include/CGAL/Regular_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/Regular_triangulation_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Regular_triangulation_2.h $ -// $Id: Regular_triangulation_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Regular_triangulation_2.h $ +// $Id: include/CGAL/Regular_triangulation_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Frederic Fichel, Mariette Yvinec, Julia Floetotto @@ -18,11 +18,11 @@ #include #include +#include #include #include #include -#include #include #include @@ -393,12 +393,12 @@ class Regular_triangulation_2 template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< + std::enable_if_t< + std::is_convertible< typename std::iterator_traits::value_type, Weighted_point - > - >::type* = nullptr + >::value + >* = nullptr ) #else template < class InputIterator > @@ -514,12 +514,12 @@ class Regular_triangulation_2 std::ptrdiff_t insert(InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< + std::enable_if_t< + std::is_convertible< typename std::iterator_traits::value_type, std::pair::type> - > - >::type* = nullptr + >::value + >* = nullptr ) {return insert_with_info< std::pair::type> >(first,last);} @@ -527,12 +527,10 @@ class Regular_triangulation_2 std::ptrdiff_t insert(boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, - typename boost::enable_if< - boost::mpl::and_< - typename boost::is_convertible< typename std::iterator_traits::value_type, Weighted_point >, - typename boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - > - >::type* =nullptr + std::enable_if_t< + std::is_convertible_v< typename std::iterator_traits::value_type, Weighted_point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > + >* =nullptr ) {return insert_with_info< boost::tuple::type> >(first,last);} #endif //CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO @@ -563,7 +561,7 @@ class Regular_triangulation_2 Face_handle start = Face_handle()) const { - CGAL_triangulation_precondition(dimension() == 2); + CGAL_precondition(dimension() == 2); int li; Locate_type lt; Face_handle fh = locate(p,lt,li, start); @@ -640,7 +638,7 @@ class Regular_triangulation_2 } return make_triple(fit, eit, vit); } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return make_triple(fit, eit, vit); } @@ -771,7 +769,7 @@ copy_triangulation_() for(; hvit != hidden_vertices_end() ; ++hvit){ hvit->face()->vertex_list().push_back(hvit); } - CGAL_triangulation_postcondition(is_valid()); + CGAL_postcondition(is_valid()); } template < class Gt, class Tds > @@ -838,7 +836,7 @@ power_test(const Face_handle& f, int i, const Weighted_point &p) const // p is supposed to be on edge(f,i) // return ON_NEGATIVE_SIDE if p is above(f,i) // (p has to be hidden) - CGAL_triangulation_precondition(!is_infinite(f,i) && + CGAL_precondition(!is_infinite(f,i) && orientation(f->vertex(ccw(i))->point(), f->vertex(cw(i))->point(), p) == COLLINEAR); @@ -857,7 +855,7 @@ power_test(const Weighted_point &p0, const Weighted_point &p, bool perturb) const { - CGAL_triangulation_precondition(orientation(p0, p1, p2) == POSITIVE); + CGAL_precondition(orientation(p0, p1, p2) == POSITIVE); using namespace boost; @@ -887,7 +885,7 @@ power_test(const Weighted_point &p0, return o; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return ON_NEGATIVE_SIDE; } @@ -920,7 +918,7 @@ is_valid_face(Face_handle fh) const bool result = true; if(is_infinite(fh)) result = result && fh->vertex_list().empty(); if(!result) { show_face(fh);} - CGAL_triangulation_assertion(result); + CGAL_assertion(result); typename Vertex_list::iterator vlit = fh->vertex_list().begin(), vldone = fh->vertex_list().end(); @@ -928,7 +926,7 @@ is_valid_face(Face_handle fh) const result = result && power_test(fh,(*vlit)->point()) == ON_NEGATIVE_SIDE; result = result &&((*vlit)->face() == fh); if(!result) show_face(fh); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); } return result; } @@ -978,7 +976,7 @@ is_valid_vertex(Vertex_handle vh) const // show_face(vh->face()); // } } - CGAL_triangulation_assertion(result); + CGAL_assertion(result); return result; } @@ -1022,7 +1020,7 @@ is_valid(bool verbose, int /* level */) const it2->point(), it3->point()); result = result && s == COLLINEAR ; - CGAL_triangulation_assertion(result); + CGAL_assertion(result); ++it1 ; ++it2; ++it3; } } @@ -1030,18 +1028,18 @@ is_valid(bool verbose, int /* level */) const case 2 : for(Finite_faces_iterator it=finite_faces_begin(); it!=finite_faces_end(); it++) { - CGAL_triangulation_assertion(! is_infinite(it)); + CGAL_assertion(! is_infinite(it)); Orientation s = orientation(it->vertex(0)->point(), it->vertex(1)->point(), it->vertex(2)->point()); - CGAL_triangulation_assertion(s == LEFT_TURN); + CGAL_assertion(s == LEFT_TURN); result = result && (s == LEFT_TURN); for(int i = 0 ; i < 3 ; i++) { if(!is_infinite(it->vertex(i))) result = result && ON_POSITIVE_SIDE != power_test(it->neighbor(i), it->vertex(i)->point()); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); } } @@ -1053,7 +1051,7 @@ is_valid(bool verbose, int /* level */) const Orientation s = orientation(pc->point(), qc->point(), rc->point()); - CGAL_triangulation_assertion(s != LEFT_TURN); + CGAL_assertion(s != LEFT_TURN); result = result && (s != LEFT_TURN); ++pc ; ++qc ; ++rc; } while(pc != start); @@ -1063,7 +1061,7 @@ is_valid(bool verbose, int /* level */) const result = result && (number_of_faces() == 2*(number_of_vertices()+1) - 4 - degree(infinite_vertex())); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); break; } @@ -1075,7 +1073,7 @@ is_valid(bool verbose, int /* level */) const } result = result && (Base::number_of_vertices() == number_of_vertices() + number_of_hidden_vertices()); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); return result; } @@ -1167,7 +1165,7 @@ typename Regular_triangulation_2::Bare_point Regular_triangulation_2:: weighted_circumcenter(Face_handle f) const { - CGAL_triangulation_precondition(dimension() == 2 || !is_infinite(f)); + CGAL_precondition(dimension() == 2 || !is_infinite(f)); return weighted_circumcenter(f->vertex(0)->point(), f->vertex(1)->point(), f->vertex(2)->point()); @@ -1194,7 +1192,7 @@ dual(const Edge &e) const typedef typename Geom_traits::Ray_2 Ray; typedef typename Geom_traits::Segment_2 Segment; - CGAL_triangulation_precondition(! is_infinite(e)); + CGAL_precondition(! is_infinite(e)); if(dimension() == 1){ const Weighted_point& p = (e.first)->vertex(cw(e.second))->point(); const Weighted_point& q = (e.first)->vertex(ccw(e.second))->point(); @@ -1354,7 +1352,7 @@ typename Regular_triangulation_2::Vertex_handle Regular_triangulation_2:: reinsert(Vertex_handle v, Face_handle start) { - CGAL_triangulation_assertion(v->is_hidden()); + CGAL_assertion(v->is_hidden()); v->set_hidden(false); _hidden_vertices--; @@ -1385,8 +1383,8 @@ void Regular_triangulation_2:: exchange_hidden(Vertex_handle va, Vertex_handle vb) { - CGAL_triangulation_assertion(vb->is_hidden()); - CGAL_triangulation_assertion(vb == vb->face()->vertex_list().back()); + CGAL_assertion(vb->is_hidden()); + CGAL_assertion(vb == vb->face()->vertex_list().back()); // //to debug // std::cerr << "from exchange hidden 1" << std::endl; @@ -1411,7 +1409,7 @@ void Regular_triangulation_2:: exchange_incidences(Vertex_handle va, Vertex_handle vb) { - CGAL_triangulation_assertion(!vb->is_hidden()); + CGAL_assertion(!vb->is_hidden()); std::list faces; if(dimension() == 0) { faces.push_back(vb->face()); @@ -1421,7 +1419,7 @@ exchange_incidences(Vertex_handle va, Vertex_handle vb) faces.push_back(vb->face()->neighbor(1-i)); } else { - CGAL_triangulation_assertion(dimension() == 2); + CGAL_assertion(dimension() == 2); Face_circulator fc = incident_faces(vb), done(fc); do { faces.push_back(fc); @@ -1486,7 +1484,7 @@ void Regular_triangulation_2:: regularize(Vertex_handle v) { - CGAL_triangulation_precondition(v != infinite_vertex()); + CGAL_precondition(v != infinite_vertex()); Faces_around_stack faces_around; if(dimension() < 1) return; @@ -1553,8 +1551,8 @@ void Regular_triangulation_2:: remove(Vertex_handle v) { - CGAL_triangulation_precondition(v != Vertex_handle()); - CGAL_triangulation_precondition(!is_infinite(v)); + CGAL_precondition(v != Vertex_handle()); + CGAL_precondition(!is_infinite(v)); if(v->is_hidden()) return remove_hidden(v); @@ -1821,7 +1819,7 @@ void Regular_triangulation_2:: update_hidden_points_2_2(const Face_handle& f1, const Face_handle& f2) { - CGAL_triangulation_assertion(f1->has_neighbor(f2)); + CGAL_assertion(f1->has_neighbor(f2)); Vertex_list p_list; p_list.splice(p_list.begin(), f1->vertex_list()); @@ -1862,7 +1860,7 @@ update_hidden_points_2_2(const Face_handle& f1, const Face_handle& f2) int idx2 = f1->index(f2); Vertex_handle v0=f1->vertex(ccw(idx2)); Vertex_handle v1=f1->vertex(cw(idx2)); - CGAL_triangulation_assertion(!is_infinite(v0) && !is_infinite(v1)); + CGAL_assertion(!is_infinite(v0) && !is_infinite(v1)); while(! p_list.empty()) { @@ -1883,7 +1881,7 @@ Regular_triangulation_2:: update_hidden_points_1_3(const Face_handle& f1, const Face_handle& f2, const Face_handle& f3) { - CGAL_triangulation_assertion(f1->has_neighbor(f2) && + CGAL_assertion(f1->has_neighbor(f2) && f2->has_neighbor(f3) && f3->has_neighbor(f1)); @@ -1903,9 +1901,9 @@ update_hidden_points_1_3(const Face_handle& f1, const Face_handle& f2, v0 = f1->vertex(3-(idx2+idx3)), v1 = f2->vertex(f2->index(f1)); - CGAL_triangulation_assertion(f2->has_vertex(v0) && f1->has_vertex(v0)); - CGAL_triangulation_assertion(f3->has_vertex(v1)); - CGAL_triangulation_assertion(! is_infinite(v0)); + CGAL_assertion(f2->has_vertex(v0) && f1->has_vertex(v0)); + CGAL_assertion(f3->has_vertex(v1)); + CGAL_assertion(! is_infinite(v0)); // if two of f1, f2,and f3 are infinite // the list goes entirely to the third finite face @@ -2216,7 +2214,7 @@ typename Regular_triangulation_2::Vertex_handle Regular_triangulation_2:: finite_vertex() const { - CGAL_triangulation_precondition(number_of_vertices() >= 1); + CGAL_precondition(number_of_vertices() >= 1); return(finite_vertices_begin()); } diff --git a/thirdparty/CGAL/include/CGAL/Regular_triangulation_3.h b/thirdparty/CGAL/include/CGAL/Regular_triangulation_3.h index 4c0c0d0a..38b0ef4c 100644 --- a/thirdparty/CGAL/include/CGAL/Regular_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/Regular_triangulation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Regular_triangulation_3.h $ -// $Id: Regular_triangulation_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Regular_triangulation_3.h $ +// $Id: include/CGAL/Regular_triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -54,7 +54,6 @@ #include #endif -#include #include #include #include @@ -141,6 +140,25 @@ class Regular_triangulation_3 typedef typename Gt::Plane_3 Plane; typedef typename Gt::Object_3 Object; +#ifdef CGAL_LINKED_WITH_TBB + // For parallel methods, one store a hint (a `Vertex_handle`). + // We need to have a copy of the point of that vertex as a cache, because + // calls to `hint->point()` might not be thread-safe. + struct Vertex_handle_and_point { + Vertex_handle_and_point(Vertex_handle v) : vh(v), wpt(v->point()) + {} + Vertex_handle_and_point& operator=(Vertex_handle v) + { + vh = v; + wpt = v->point(); + return *this; + } + Vertex_handle vh; + Weighted_point wpt; + }; + using Hint = tbb::enumerable_thread_specific; +#endif // CGAL_LINKED_WITH_TBB + //Tag to distinguish Delaunay from regular triangulations typedef Tag_true Weighted_tag; @@ -195,14 +213,14 @@ class Regular_triangulation_3 Regular_triangulation_3(const Regular_triangulation_3& rt) : Tr_Base(rt), hidden_point_visitor(this) { - CGAL_triangulation_postcondition(is_valid()); + CGAL_postcondition(is_valid()); } Regular_triangulation_3(Regular_triangulation_3&& rt) noexcept(noexcept(Tr_Base(std::move(rt)))) : Tr_Base(std::move(rt)), hidden_point_visitor(this) { - CGAL_triangulation_postcondition(is_valid()); + CGAL_postcondition(is_valid()); } ~Regular_triangulation_3() = default; @@ -336,10 +354,10 @@ class Regular_triangulation_3 #ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< + std::enable_if_t< + std::is_convertible< typename std::iterator_traits::value_type, - Weighted_point> >::type* = nullptr) + Weighted_point>::value >* = nullptr) #else template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last) @@ -400,7 +418,7 @@ class Regular_triangulation_3 ++i; } - tbb::enumerable_thread_specific tls_hint(hint->vertex(0)); + Hint tls_hint(hint->vertex(0)); tbb::parallel_for(tbb::blocked_range(i, num_points), Insert_point(*this, points, tls_hint)); @@ -532,7 +550,7 @@ class Regular_triangulation_3 ++i; } - tbb::enumerable_thread_specific tls_hint(hint->vertex(0)); + Hint tls_hint(hint->vertex(0)); tbb::parallel_for(tbb::blocked_range(i, num_points), Insert_point_with_info(*this, points, infos, indices, tls_hint)); @@ -575,12 +593,12 @@ class Regular_triangulation_3 template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< + std::enable_if_t< + std::is_convertible< typename std::iterator_traits::value_type, std::pair::type> - > - >::type* = nullptr) + >::value + >* = nullptr) { return insert_with_info< std::pair > first, boost::zip_iterator< boost::tuple > last, - typename boost::enable_if< - boost::mpl::and_< - typename boost::is_convertible< typename std::iterator_traits::value_type, Weighted_point >, - typename boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - > >::type* =nullptr) + std::enable_if_t< + std::is_convertible_v< typename std::iterator_traits::value_type, Weighted_point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > + >* =nullptr) { return insert_with_info< boost::tuple= 2); + CGAL_precondition(dimension() >= 2); std::vector cells; cells.reserve(32); @@ -720,7 +737,7 @@ class Regular_triangulation_3 OutputIterator vertices_inside_conflict_zone(const Weighted_point&p, Cell_handle c, OutputIterator res) const { - CGAL_triangulation_precondition(dimension() >= 2); + CGAL_precondition(dimension() >= 2); // Get the facets on the boundary of the hole, and the cells of the hole std::vector cells; @@ -778,7 +795,7 @@ class Regular_triangulation_3 Cell_handle c, OutputIterator res) const { - CGAL_triangulation_precondition(dimension() >= 2); + CGAL_precondition(dimension() >= 2); // Get the facets on the boundary of the hole. std::vector facets; @@ -848,7 +865,7 @@ class Regular_triangulation_3 template < typename InputIterator > size_type remove(InputIterator first, InputIterator beyond) { - CGAL_triangulation_precondition(!this->does_repeat_in_range(first, beyond)); + CGAL_precondition(!this->does_repeat_in_range(first, beyond)); size_type n = number_of_vertices(); #ifdef CGAL_TRIANGULATION_3_PROFILING @@ -900,7 +917,7 @@ class Regular_triangulation_3 Vertex_remover remover(tmp); Tr_Base::remove_and_give_new_cells(v, remover, cit); - CGAL_triangulation_expensive_postcondition(is_valid()); + CGAL_expensive_postcondition(is_valid()); } // Displacement works only for regular triangulation @@ -984,9 +1001,10 @@ class Regular_triangulation_3 void dual_segment(Cell_handle c, int i, Bare_point& p, Bare_point&q) const; void dual_segment(const Facet& facet, Bare_point& p, Bare_point&q) const; - void dual_segment_exact(const Facet& facet, Bare_point& p, Bare_point&q) const; void dual_ray(Cell_handle c, int i, Ray& ray) const; void dual_ray(const Facet& facet, Ray& ray) const; + void dual_exact(const Facet& facet, const Weighted_point& p, Bare_point&q) const; + void dual_segment_exact(const Facet& facet, Bare_point& p, Bare_point&q) const; void dual_ray_exact(const Facet& facet, Ray& ray) const; template < class Stream> @@ -1057,7 +1075,7 @@ class Regular_triangulation_3 Vertex_handle w) const { // In case of equality, v is returned. - CGAL_triangulation_precondition(v != w); + CGAL_precondition(v != w); if(is_infinite(v)) return w; @@ -1069,21 +1087,21 @@ class Regular_triangulation_3 Oriented_side power_test(const Weighted_point& p, const Weighted_point& q) const { - CGAL_triangulation_precondition(this->equal(p, q)); + CGAL_precondition(this->equal(p, q)); return geom_traits().power_side_of_oriented_power_sphere_3_object()(p, q); } Oriented_side power_test(const Weighted_point& p, const Weighted_point& q, const Weighted_point& r) const { - CGAL_triangulation_precondition(this->collinear(p, q, r)); + CGAL_precondition(this->collinear(p, q, r)); return geom_traits().power_side_of_oriented_power_sphere_3_object()(p, q, r); } Oriented_side power_test(const Weighted_point& p, const Weighted_point& q, const Weighted_point& r, const Weighted_point& s) const { - CGAL_triangulation_precondition(this->coplanar(p, q, r, s)); + CGAL_precondition(this->coplanar(p, q, r, s)); return geom_traits().power_side_of_oriented_power_sphere_3_object()(p, q, r, s); } @@ -1243,7 +1261,7 @@ class Regular_triangulation_3 // Sequential version // "dummy" is here to allow the specialization (see below) - // See http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/285ab1eec49e1cb6 + // See https://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/285ab1eec49e1cb6 template class Hidden_point_visitor { @@ -1399,13 +1417,13 @@ class Regular_triangulation_3 RT& m_rt; const std::vector& m_points; - tbb::enumerable_thread_specific& m_tls_hint; + Hint& m_tls_hint; public: // Constructor Insert_point(RT& rt, const std::vector& points, - tbb::enumerable_thread_specific& tls_hint) + Hint& tls_hint) : m_rt(rt), m_points(points), m_tls_hint(tls_hint) {} @@ -1417,7 +1435,9 @@ class Regular_triangulation_3 "early withdrawals / late withdrawals / successes [Delaunay_tri_3::insert]"); #endif - Vertex_handle& hint = m_tls_hint.local(); + auto& vertex_hint_and_point = m_tls_hint.local(); + Vertex_handle& hint = vertex_hint_and_point.vh; + Weighted_point& hint_point_mem = vertex_hint_and_point.wpt; Vertex_validity_checker vertex_validity_check; for(size_t i_point = r.begin() ; i_point != r.end() ; ++i_point) @@ -1431,14 +1451,12 @@ class Regular_triangulation_3 // the hint. if(!vertex_validity_check(hint, m_rt.tds())) { - hint = m_rt.finite_vertices_begin(); + vertex_hint_and_point = m_rt.finite_vertices_begin(); continue; } // We need to make sure that while are locking the position P1 := hint->point(), 'hint' // does not get its position changed to P2 != P1. - const Weighted_point hint_point_mem = hint->point(); - if(m_rt.try_lock_point(hint_point_mem) && m_rt.try_lock_point(p)) { // Make sure that the hint is still valid (so that we can safely take hint->cell()) and @@ -1447,7 +1465,7 @@ class Regular_triangulation_3 if(!vertex_validity_check(hint, m_rt.tds()) || hint->point() != hint_point_mem) { - hint = m_rt.finite_vertices_begin(); + vertex_hint_and_point = m_rt.finite_vertices_begin(); m_rt.unlock_all_elements(); continue; } @@ -1463,7 +1481,7 @@ class Regular_triangulation_3 if(could_lock_zone) { - hint = (v == Vertex_handle() ? c->vertex(0) : v); + vertex_hint_and_point = (v == Vertex_handle() ? c->vertex(0) : v); m_rt.unlock_all_elements(); success = true; #ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING @@ -1502,7 +1520,7 @@ class Regular_triangulation_3 const std::vector& m_points; const std::vector& m_infos; const std::vector& m_indices; - tbb::enumerable_thread_specific& m_tls_hint; + Hint& m_tls_hint; public: // Constructor @@ -1510,7 +1528,7 @@ class Regular_triangulation_3 const std::vector& points, const std::vector& infos, const std::vector& indices, - tbb::enumerable_thread_specific& tls_hint) + Hint& tls_hint) : m_rt(rt), m_points(points), m_infos(infos), m_indices(indices), m_tls_hint(tls_hint) {} @@ -1523,7 +1541,9 @@ class Regular_triangulation_3 "early withdrawals / late withdrawals / successes [Delaunay_tri_3::insert]"); #endif - Vertex_handle& hint = m_tls_hint.local(); + auto& vertex_hint_and_point = m_tls_hint.local(); + Vertex_handle& hint = vertex_hint_and_point.vh; + Weighted_point& hint_point_mem = vertex_hint_and_point.wpt; Vertex_validity_checker vertex_validity_check; for(size_t i_idx = r.begin() ; i_idx != r.end() ; ++i_idx) @@ -1538,14 +1558,12 @@ class Regular_triangulation_3 // the hint. if(!vertex_validity_check(hint, m_rt.tds())) { - hint = m_rt.finite_vertices_begin(); + vertex_hint_and_point = m_rt.finite_vertices_begin(); continue; } // We need to make sure that while are locking the position P1 := hint->point(), 'hint' // does not get its position changed to P2 != P1. - const Weighted_point hint_point_mem = hint->point(); - if(m_rt.try_lock_point(hint_point_mem) && m_rt.try_lock_point(p)) { // Make sure that the hint is still valid (so that we can safely take hint->cell()) and @@ -1554,7 +1572,7 @@ class Regular_triangulation_3 if(!vertex_validity_check(hint, m_rt.tds()) || hint->point() != hint_point_mem) { - hint = m_rt.finite_vertices_begin(); + vertex_hint_and_point = m_rt.finite_vertices_begin(); m_rt.unlock_all_elements(); continue; } @@ -1572,12 +1590,12 @@ class Regular_triangulation_3 { if(v == Vertex_handle()) { - hint = c->vertex(0); + vertex_hint_and_point = c->vertex(0); } else { v->info() = m_infos[i_point]; - hint = v; + vertex_hint_and_point = v; } m_rt.unlock_all_elements(); @@ -1669,7 +1687,7 @@ nearest_power_vertex_in_cell(const Bare_point& p, Cell_handle c) const // Returns the finite vertex of the cell c with smaller // power distance to p. { - CGAL_triangulation_precondition(dimension() >= 1); + CGAL_precondition(dimension() >= 1); Vertex_handle nearest = nearest_power_vertex(p, c->vertex(0), c->vertex(1)); if(dimension() >= 2) { @@ -1735,8 +1753,8 @@ typename Regular_triangulation_3::Bare_point Regular_triangulation_3:: dual(Cell_handle c) const { - CGAL_triangulation_precondition(dimension()==3); - CGAL_triangulation_precondition(! is_infinite(c)); + CGAL_precondition(dimension()==3); + CGAL_precondition(! is_infinite(c)); return c->weighted_circumcenter(geom_traits()); } @@ -1767,7 +1785,7 @@ Regular_triangulation_3:: dual_ray(Cell_handle c, int i, Ray& ray) const { Cell_handle n = c->neighbor(i); - CGAL_triangulation_precondition((!is_infinite(c) != !is_infinite(n))); // xor + CGAL_precondition((!is_infinite(c) != !is_infinite(n))); // xor // either n or c is infinite int in; if(is_infinite(c)) @@ -1806,14 +1824,42 @@ dual_ray(const Facet& facet, Ray& ray) const return dual_ray(facet.first, facet.second, ray); } -// Exact versions of dual_segment() and dual_ray() for Mesh_3. +// Exact versions of dual(), dual_segment(), and dual_ray() for Mesh_3. // These functions are really dirty: they assume that the point type is nice enough // such that EPECK can manipulate it (e.g. convert it to EPECK::Point_3) AND // that the result of these manipulations will make sense. template < class Gt, class Tds, class Lds > void Regular_triangulation_3:: -dual_segment_exact(const Facet& facet, Bare_point& p, Bare_point&q) const +dual_exact(const Facet& f, const Weighted_point& s, Bare_point& cc) const +{ + typedef typename Kernel_traits::Kernel K; + typedef Exact_predicates_exact_constructions_kernel EK; + typedef Cartesian_converter To_exact; + typedef Cartesian_converter Back_from_exact; + + typedef EK Exact_Rt; + + To_exact to_exact; + Back_from_exact back_from_exact; + Exact_Rt::Construct_weighted_circumcenter_3 exact_weighted_circumcenter = + Exact_Rt().construct_weighted_circumcenter_3_object(); + + const Cell_handle c = f.first; + const int i = f.second; + + const typename Exact_Rt::Weighted_point_3& cp = to_exact(c->vertex((i+1)%4)->point()); + const typename Exact_Rt::Weighted_point_3& cq = to_exact(c->vertex((i+2)%4)->point()); + const typename Exact_Rt::Weighted_point_3& cr = to_exact(c->vertex((i+3)%4)->point()); + const typename Exact_Rt::Weighted_point_3& cs = to_exact(s); + + cc = back_from_exact(exact_weighted_circumcenter(cp, cq, cr, cs)); +} + +template < class Gt, class Tds, class Lds > +void +Regular_triangulation_3:: +dual_segment_exact(const Facet& facet, Bare_point& p, Bare_point& q) const { typedef typename Kernel_traits::Kernel K; typedef Exact_predicates_exact_constructions_kernel EK; @@ -1853,7 +1899,7 @@ dual_ray_exact(const Facet& facet, Ray& ray) const Cell_handle c = facet.first; int i = facet.second; Cell_handle n = c->neighbor(i); - CGAL_triangulation_precondition(!is_infinite(c) != !is_infinite(n)); // xor + CGAL_precondition(!is_infinite(c) != !is_infinite(n)); // xor // either n or c is infinite int in; if(is_infinite(c)) @@ -1911,12 +1957,12 @@ typename Regular_triangulation_3::Object Regular_triangulation_3:: dual(Cell_handle c, int i) const { - CGAL_triangulation_precondition(dimension()>=2); - CGAL_triangulation_precondition(! is_infinite(c,i)); + CGAL_precondition(dimension()>=2); + CGAL_precondition(! is_infinite(c,i)); if(dimension() == 2) { - CGAL_triangulation_precondition(i == 3); + CGAL_precondition(i == 3); return construct_object(construct_weighted_circumcenter(c->vertex(0)->point(), c->vertex(1)->point(), c->vertex(2)->point())); @@ -1975,7 +2021,7 @@ side_of_oriented_power_sphere(const Weighted_point& p0, const Weighted_point& p3, const Weighted_point& p, bool perturb) const { - CGAL_triangulation_precondition(orientation(p0, p1, p2, p3) == POSITIVE); + CGAL_precondition(orientation(p0, p1, p2, p3) == POSITIVE); using namespace boost; @@ -2008,7 +2054,7 @@ side_of_oriented_power_sphere(const Weighted_point& p0, return o; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return ON_NEGATIVE_SIDE; } @@ -2017,8 +2063,8 @@ Bounded_side Regular_triangulation_3:: side_of_power_sphere(Cell_handle c, const Weighted_point& p, bool perturb) const { - CGAL_triangulation_precondition(dimension() == 3); - int i3; + CGAL_precondition(dimension() == 3); + int i3=3; if(! c->has_vertex(infinite_vertex(), i3)) { return Bounded_side(side_of_oriented_power_sphere(c->vertex(0)->point(), @@ -2065,7 +2111,7 @@ side_of_bounded_power_circle(const Weighted_point& p0, const Weighted_point& p2, const Weighted_point& p, bool perturb) const { - CGAL_triangulation_precondition(coplanar_orientation(p0, p1, p2) != 0); + CGAL_precondition(coplanar_orientation(p0, p1, p2) != 0); if(coplanar_orientation(p0, p1, p2) == POSITIVE) return Bounded_side (side_of_oriented_power_circle(p0, p1, p2, p, perturb)); @@ -2084,7 +2130,7 @@ side_of_oriented_power_circle(const Weighted_point& p0, const Weighted_point& p2, const Weighted_point& p, bool perturb) const { - CGAL_triangulation_precondition(coplanar_orientation(p0, p1, p2) == POSITIVE); + CGAL_precondition(coplanar_orientation(p0, p1, p2) == POSITIVE); using namespace boost; @@ -2116,7 +2162,7 @@ side_of_oriented_power_circle(const Weighted_point& p0, return o; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return ON_NEGATIVE_SIDE; } @@ -2126,11 +2172,11 @@ Regular_triangulation_3:: side_of_power_circle(Cell_handle c, int i, const Weighted_point& p, bool perturb) const { - CGAL_triangulation_precondition(dimension() >= 2); - int i3 = 5; + CGAL_precondition(dimension() >= 2); + int i3 = 3; if(dimension() == 2) { - CGAL_triangulation_precondition(i == 3); + CGAL_precondition(i == 3); // the triangulation is supposed to be valid, ie the facet // with vertices 0 1 2 in this order is positively oriented if(! c->has_vertex(infinite_vertex(), i3)) @@ -2143,7 +2189,7 @@ side_of_power_circle(Cell_handle c, int i, const Weighted_point& p, // is positively oriented Vertex_handle v1 = c->vertex(ccw(i3)), v2 = c->vertex(cw(i3)); - CGAL_triangulation_assertion( + CGAL_assertion( coplanar_orientation(v1->point(), v2->point(), mirror_vertex(c, i3)->point()) == NEGATIVE); Orientation o = coplanar_orientation(v1->point(), v2->point(), p); @@ -2157,7 +2203,7 @@ side_of_power_circle(Cell_handle c, int i, const Weighted_point& p, } // dim 2 // else dimension == 3 - CGAL_triangulation_precondition((i >= 0) && (i < 4)); + CGAL_precondition((i >= 0) && (i < 4)); if((! c->has_vertex(infinite_vertex(),i3)) || (i3 != i)) { // finite facet @@ -2166,9 +2212,9 @@ side_of_power_circle(Cell_handle c, int i, const Weighted_point& p, int i0 = (i>0) ? 0 : 1; int i1 = (i>1) ? 1 : 2; int i2 = (i>2) ? 2 : 3; - CGAL_triangulation_precondition(this->coplanar(c->vertex(i0)->point(), - c->vertex(i1)->point(), - c->vertex(i2)->point(), p)); + CGAL_precondition(this->coplanar(c->vertex(i0)->point(), + c->vertex(i1)->point(), + c->vertex(i2)->point(), p)); return side_of_bounded_power_circle(c->vertex(i0)->point(), c->vertex(i1)->point(), c->vertex(i2)->point(), @@ -2218,7 +2264,7 @@ side_of_bounded_power_segment(const Weighted_point& p0, ; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return ON_UNBOUNDED_SIDE; } @@ -2227,7 +2273,7 @@ Bounded_side Regular_triangulation_3:: side_of_power_segment(Cell_handle c, const Weighted_point& p, bool perturb) const { - CGAL_triangulation_precondition(dimension() == 1); + CGAL_precondition(dimension() == 1); if(! is_infinite(c,0,1)) return side_of_bounded_power_segment(c->vertex(0)->point(), c->vertex(1)->point(), @@ -2240,7 +2286,7 @@ side_of_power_segment(Cell_handle c, const Weighted_point& p, bool perturb) cons // Either we compare weights, or we use the finite neighboring edge Cell_handle finite_neighbor = c->neighbor(c->index(infinite_vertex())); - CGAL_triangulation_assertion(!is_infinite(finite_neighbor,0,1)); + CGAL_assertion(!is_infinite(finite_neighbor,0,1)); return side_of_bounded_power_segment(finite_neighbor->vertex(0)->point(), finite_neighbor->vertex(1)->point(), p, perturb); @@ -2269,7 +2315,7 @@ bool Regular_triangulation_3:: is_Gabriel(Cell_handle c, int i) const { - CGAL_triangulation_precondition(dimension() == 3 && !is_infinite(c,i)); + CGAL_precondition(dimension() == 3 && !is_infinite(c,i)); typename Geom_traits::Power_side_of_bounded_power_sphere_3 side_of_bounded_orthogonal_sphere = geom_traits().power_side_of_bounded_power_sphere_3_object(); @@ -2307,7 +2353,7 @@ bool Regular_triangulation_3:: is_Gabriel(Cell_handle c, int i, int j) const { - CGAL_triangulation_precondition(dimension() == 3 && !is_infinite(c,i,j)); + CGAL_precondition(dimension() == 3 && !is_infinite(c,i,j)); typename Geom_traits::Power_side_of_bounded_power_sphere_3 side_of_bounded_orthogonal_sphere = geom_traits().power_side_of_bounded_power_sphere_3_object(); @@ -2416,7 +2462,7 @@ Regular_triangulation_3:: insert_in_hole(const Weighted_point& p, CellIt cell_begin, CellIt cell_end, Cell_handle begin, int i) { - CGAL_triangulation_precondition(cell_begin != cell_end); + CGAL_precondition(cell_begin != cell_end); get_hidden_point_visitor().process_cells_in_conflict(cell_begin,cell_end); @@ -2435,7 +2481,7 @@ Regular_triangulation_3:: insert_in_hole(const Weighted_point& p, CellIt cell_begin, CellIt cell_end, Cell_handle begin, int i, Vertex_handle newv) { - CGAL_triangulation_precondition(cell_begin != cell_end); + CGAL_precondition(cell_begin != cell_end); get_hidden_point_visitor().process_cells_in_conflict(cell_begin,cell_end); @@ -2542,7 +2588,7 @@ remove(Vertex_handle v) if(hv != Vertex_handle()) c = hv->cell(); } - CGAL_triangulation_expensive_postcondition(is_valid()); + CGAL_expensive_postcondition(is_valid()); } template < class Gt, class Tds, class Lds > @@ -2565,8 +2611,17 @@ remove(Vertex_handle v, bool *could_lock_zone) if(!vertex_validity_check(v, tds())) return true; // vertex is already gone from the TDS, nothing to do - Vertex_handle hint = v->cell()->vertex(0) == v ? v->cell()->vertex(1) : v->cell()->vertex(0); - +#ifndef CGAL_LINKED_WITH_TBB + using Vertex_handle_and_point = Vertex_handle; +#endif // not CGAL_LINKED_WITH_TBB + Vertex_handle_and_point hint_and_point{v->cell()->vertex(0) == v ? v->cell()->vertex(1) : v->cell()->vertex(0)}; +#ifdef CGAL_LINKED_WITH_TBB + const Vertex_handle& hint = hint_and_point.vh; + const Weighted_point& hint_point_mem = hint_and_point.wpt; +#else // not CGAL_LINKED_WITH_TBB + const Vertex_handle& hint = hint_and_point; + const Weighted_point& hint_point_mem = hint_and_point->point(); +#endif // not CGAL_LINKED_WITH_TBB Self tmp; Vertex_remover remover(tmp); removed = Tr_Base::remove(v, remover, could_lock_zone); @@ -2593,13 +2648,12 @@ remove(Vertex_handle v, bool *could_lock_zone) // the hint. if(!vertex_validity_check(hint, tds())) { - hint = finite_vertices_begin(); + hint_and_point = finite_vertices_begin(); continue; } // We need to make sure that while are locking the position P1 := hint->point(), 'hint' // does not get its position changed to P2 != P1. - const Weighted_point hint_point_mem = hint->point(); if(this->try_lock_point(hint_point_mem) && this->try_lock_point(wp)) { @@ -2609,7 +2663,7 @@ remove(Vertex_handle v, bool *could_lock_zone) if(!vertex_validity_check(hint, tds()) || hint->point() != hint_point_mem) { - hint = finite_vertices_begin(); + hint_and_point = finite_vertices_begin(); this->unlock_all_elements(); continue; } @@ -2620,7 +2674,7 @@ remove(Vertex_handle v, bool *could_lock_zone) { success = true; if(hv != Vertex_handle()) - hint = hv; + hint_and_point = hv; } } @@ -2629,7 +2683,7 @@ remove(Vertex_handle v, bool *could_lock_zone) } } - CGAL_triangulation_expensive_postcondition(is_valid()); + CGAL_expensive_postcondition(is_valid()); } } @@ -2649,7 +2703,7 @@ move_if_no_collision(Vertex_handle v, const Weighted_point& p) Vertex_inserter inserter(*this); Vertex_handle res = Tr_Base::move_if_no_collision(v,p,remover,inserter); - CGAL_triangulation_expensive_postcondition(is_valid()); + CGAL_expensive_postcondition(is_valid()); return res; } @@ -2658,7 +2712,7 @@ typename Regular_triangulation_3::Vertex_handle Regular_triangulation_3:: move(Vertex_handle v, const Weighted_point& p) { - CGAL_triangulation_precondition(!is_infinite(v)); + CGAL_precondition(!is_infinite(v)); if(v->point() == p) return v; @@ -2678,7 +2732,7 @@ is_valid(bool verbose, int level) const if(verbose) std::cerr << "invalid base triangulation" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -2701,7 +2755,7 @@ is_valid(bool verbose, int level) const if(verbose) std::cerr << "non-empty sphere " << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } @@ -2727,7 +2781,7 @@ is_valid(bool verbose, int level) const if(verbose) std::cerr << "non-empty circle " << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } @@ -2755,7 +2809,7 @@ is_valid(bool verbose, int level) const if(verbose) std::cerr << "non-empty edge " << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } diff --git a/thirdparty/CGAL/include/CGAL/Regular_triangulation_adaptation_policies_2.h b/thirdparty/CGAL/include/CGAL/Regular_triangulation_adaptation_policies_2.h index 0839dd6f..386f9448 100644 --- a/thirdparty/CGAL/include/CGAL/Regular_triangulation_adaptation_policies_2.h +++ b/thirdparty/CGAL/include/CGAL/Regular_triangulation_adaptation_policies_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Regular_triangulation_adaptation_policies_2.h $ -// $Id: Regular_triangulation_adaptation_policies_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Regular_triangulation_adaptation_policies_2.h $ +// $Id: include/CGAL/Regular_triangulation_adaptation_policies_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Regular_triangulation_adaptation_traits_2.h b/thirdparty/CGAL/include/CGAL/Regular_triangulation_adaptation_traits_2.h index d0d8b263..d30d9277 100644 --- a/thirdparty/CGAL/include/CGAL/Regular_triangulation_adaptation_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Regular_triangulation_adaptation_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Regular_triangulation_adaptation_traits_2.h $ -// $Id: Regular_triangulation_adaptation_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Regular_triangulation_adaptation_traits_2.h $ +// $Id: include/CGAL/Regular_triangulation_adaptation_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Regular_triangulation_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Regular_triangulation_cell_base_3.h index b021e785..6c72ee8c 100644 --- a/thirdparty/CGAL/include/CGAL/Regular_triangulation_cell_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Regular_triangulation_cell_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Regular_triangulation_cell_base_3.h $ -// $Id: Regular_triangulation_cell_base_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Regular_triangulation_cell_base_3.h $ +// $Id: include/CGAL/Regular_triangulation_cell_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Christophe Delage @@ -21,10 +21,8 @@ #include #include -#include -#include - #include +#include namespace CGAL { @@ -96,47 +94,47 @@ class Regular_triangulation_cell_base_3 // Memory_policy is Tag_true ------------------------------------------------- template - Point_iterator hidden_points_begin_internal(typename boost::enable_if_c::type* = nullptr) + Point_iterator hidden_points_begin_internal(std::enable_if_t* = nullptr) { return _hidden.begin(); } template - Point_iterator hidden_points_end_internal(typename boost::enable_if_c::type* = nullptr) + Point_iterator hidden_points_end_internal(std::enable_if_t* = nullptr) { return _hidden.end(); } template - Point_const_iterator hidden_points_begin_internal(typename boost::enable_if_c::type* = nullptr) const + Point_const_iterator hidden_points_begin_internal(std::enable_if_t* = nullptr) const { return _hidden.begin(); } template - Point_const_iterator hidden_points_end_internal(typename boost::enable_if_c::type* = nullptr) const + Point_const_iterator hidden_points_end_internal(std::enable_if_t* = nullptr) const { return _hidden.end(); } template - void hide_point_internal(const Point& p, typename boost::enable_if_c::type* = nullptr) + void hide_point_internal(const Point& p, std::enable_if_t* = nullptr) { _hidden.push_back(p); } template - void unhide_point_internal(const Point_iterator pit, typename boost::enable_if_c::type* = nullptr) + void unhide_point_internal(const Point_iterator pit, std::enable_if_t* = nullptr) { _hidden.erase(pit); } // Memory_policy is Tag_false ------------------------------------------------ template - Point_iterator hidden_points_begin_internal(typename boost::disable_if_c::type* = nullptr) + Point_iterator hidden_points_begin_internal(std::enable_if_t* = nullptr) { return hidden_points_end(); } template - Point_iterator hidden_points_end_internal(typename boost::disable_if_c::type* = nullptr) + Point_iterator hidden_points_end_internal(std::enable_if_t* = nullptr) { return _hidden.end(); } // const versions template - Point_const_iterator hidden_points_begin_internal(typename boost::disable_if_c::type* = nullptr) const + Point_const_iterator hidden_points_begin_internal(std::enable_if_t* = nullptr) const { return hidden_points_end(); } template - Point_const_iterator hidden_points_end_internal(typename boost::disable_if_c::type* = nullptr) const + Point_const_iterator hidden_points_end_internal(std::enable_if_t* = nullptr) const { return _hidden.end(); } template - void hide_point_internal(const Point&, typename boost::disable_if_c::type* = nullptr) + void hide_point_internal(const Point&, std::enable_if_t* = nullptr) { } template - void unhide_point_internal(const Point_iterator, typename boost::disable_if_c::type* = nullptr) + void unhide_point_internal(const Point_iterator, std::enable_if_t* = nullptr) { } template diff --git a/thirdparty/CGAL/include/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h b/thirdparty/CGAL/include/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h index ee9d7e87..19b0ca2a 100644 --- a/thirdparty/CGAL/include/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h +++ b/thirdparty/CGAL/include/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h $ -// $Id: Regular_triangulation_cell_base_with_weighted_circumcenter_3.h dbbee66 2020-04-02T18:31:00+05:30 rathod-sahaab +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h $ +// $Id: include/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -19,10 +19,9 @@ #include #include -#include +#include #include -#include #include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Regular_triangulation_euclidean_traits_3.h b/thirdparty/CGAL/include/CGAL/Regular_triangulation_euclidean_traits_3.h index a9287c1e..b57b76d2 100644 --- a/thirdparty/CGAL/include/CGAL/Regular_triangulation_euclidean_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Regular_triangulation_euclidean_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Regular_triangulation_euclidean_traits_3.h $ -// $Id: Regular_triangulation_euclidean_traits_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Regular_triangulation_euclidean_traits_3.h $ +// $Id: include/CGAL/Regular_triangulation_euclidean_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Regular_triangulation_face_base_2.h b/thirdparty/CGAL/include/CGAL/Regular_triangulation_face_base_2.h index ae754696..bab798e1 100644 --- a/thirdparty/CGAL/include/CGAL/Regular_triangulation_face_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Regular_triangulation_face_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Regular_triangulation_face_base_2.h $ -// $Id: Regular_triangulation_face_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Regular_triangulation_face_base_2.h $ +// $Id: include/CGAL/Regular_triangulation_face_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #include -#include +#include #include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Regular_triangulation_traits_adapter.h b/thirdparty/CGAL/include/CGAL/Regular_triangulation_traits_adapter.h index 171f2362..5d760961 100644 --- a/thirdparty/CGAL/include/CGAL/Regular_triangulation_traits_adapter.h +++ b/thirdparty/CGAL/include/CGAL/Regular_triangulation_traits_adapter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/Regular_triangulation_traits_adapter.h $ -// $Id: Regular_triangulation_traits_adapter.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/Regular_triangulation_traits_adapter.h $ +// $Id: include/CGAL/Regular_triangulation_traits_adapter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Clement Jamin diff --git a/thirdparty/CGAL/include/CGAL/Regular_triangulation_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Regular_triangulation_vertex_base_2.h index 489c323b..7cfba67b 100644 --- a/thirdparty/CGAL/include/CGAL/Regular_triangulation_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Regular_triangulation_vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Regular_triangulation_vertex_base_2.h $ -// $Id: Regular_triangulation_vertex_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Regular_triangulation_vertex_base_2.h $ +// $Id: include/CGAL/Regular_triangulation_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -16,8 +16,8 @@ #include - #include +#include namespace CGAL { @@ -81,7 +81,7 @@ operator<<(std::ostream &os, const Regular_triangulation_vertex_base_2 &v) // non combinatorial information. Default = point { - return os << static_cast(v) << v.point(); + return os << static_cast(v) << IO::serialize(v.point()); } } //namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Regular_triangulation_vertex_base_3.h b/thirdparty/CGAL/include/CGAL/Regular_triangulation_vertex_base_3.h index 38961fd1..eabef3de 100644 --- a/thirdparty/CGAL/include/CGAL/Regular_triangulation_vertex_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Regular_triangulation_vertex_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Regular_triangulation_vertex_base_3.h $ -// $Id: Regular_triangulation_vertex_base_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Regular_triangulation_vertex_base_3.h $ +// $Id: include/CGAL/Regular_triangulation_vertex_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -18,6 +18,7 @@ #include #include #include +#include namespace CGAL { @@ -75,7 +76,7 @@ std::ostream& operator<<(std::ostream &os, const Regular_triangulation_vertex_base_3 &v) // non combinatorial information. Default = point { - return os << static_cast(v) << v.point(); + return os << static_cast(v) << IO::serialize(v.point()); } } //namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Residue.h b/thirdparty/CGAL/include/CGAL/Residue.h index e64701c4..51a25f57 100644 --- a/thirdparty/CGAL/include/CGAL/Residue.h +++ b/thirdparty/CGAL/include/CGAL/Residue.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Modular_arithmetic/include/CGAL/Residue.h $ -// $Id: Residue.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Modular_arithmetic/include/CGAL/Residue.h $ +// $Id: include/CGAL/Residue.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Hemmer diff --git a/thirdparty/CGAL/include/CGAL/Ridges.h b/thirdparty/CGAL/include/CGAL/Ridges.h index ee67429b..807d4270 100644 --- a/thirdparty/CGAL/include/CGAL/Ridges.h +++ b/thirdparty/CGAL/include/CGAL/Ridges.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Ridges_3/include/CGAL/Ridges.h $ -// $Id: Ridges.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Ridges_3/include/CGAL/Ridges.h $ +// $Id: include/CGAL/Ridges.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Pouget and Frédéric Cazals @@ -22,9 +22,10 @@ #include #include #include -#include #include +#include + namespace CGAL { enum Ridge_interrogation_type {MAX_RIDGE, MIN_RIDGE, CREST_RIDGE}; @@ -189,10 +190,10 @@ class Ridge_approximation //requirements for the templates TriangleMesh and VertexFTMap or VertexVectorMap - CGAL_static_assertion((boost::is_same::value)); - CGAL_static_assertion((boost::is_same::value)); - CGAL_static_assertion((boost::is_same::value)); - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); + static_assert(std::is_same::value); + static_assert(std::is_same::value); + static_assert(std::is_same::value); typedef std::pair< halfedge_descriptor, FT> Ridge_halfedge; typedef Ridge_halfedge Ridge_halfhedge; // kept for backward compatibility diff --git a/thirdparty/CGAL/include/CGAL/Rigid_triangle_mesh_collision_detection.h b/thirdparty/CGAL/include/CGAL/Rigid_triangle_mesh_collision_detection.h index 417d8b07..71a7a776 100644 --- a/thirdparty/CGAL/include/CGAL/Rigid_triangle_mesh_collision_detection.h +++ b/thirdparty/CGAL/include/CGAL/Rigid_triangle_mesh_collision_detection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h $ -// $Id: Rigid_triangle_mesh_collision_detection.h 23678d0 2022-10-04T13:50:18+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h $ +// $Id: include/CGAL/Rigid_triangle_mesh_collision_detection.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -37,7 +37,7 @@ namespace CGAL { /*! - * \ingroup PkgPolygonMeshProcessing + * \ingroup PkgPolygonMeshProcessingRef * This class provides methods to perform some intersection tests between triangle meshes * that undergo affine transformations (rotation, translation, and scaling). * Meshes are added to an internal set and are referenced using an id assigned when added to the set. @@ -250,7 +250,7 @@ class Rigid_triangle_mesh_collision_detection { // handle vpm typedef typename CGAL::GetVertexPointMap::const_type Local_vpm; - CGAL_static_assertion( (boost::is_same::value) ); + static_assert(std::is_same::value); Vpm vpm = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), @@ -260,7 +260,7 @@ class Rigid_triangle_mesh_collision_detection CGAL_assertion( m_aabb_trees[id] == nullptr ); m_is_closed[id] = is_closed(tm); m_own_aabb_trees[id] = true; - Tree* t = new Tree(boost::begin(faces(tm)), boost::end(faces(tm)), tm, vpm); + Tree* t = new Tree(std::begin(faces(tm)), std::end(faces(tm)), tm, vpm); t->build(); m_aabb_trees[id] = t; m_traversal_traits[id] = Traversal_traits(m_aabb_trees[id]->traits()); @@ -562,7 +562,7 @@ class Rigid_triangle_mesh_collision_detection parameters::get_parameter(np, internal_np::apply_per_connected_component), true); typedef typename CGAL::GetVertexPointMap::const_type Local_vpm; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); Vpm vpm = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), @@ -579,7 +579,7 @@ class Rigid_triangle_mesh_collision_detection std::size_t nb_cc = Polygon_mesh_processing::connected_components( - tm, bind_property_maps(fid_map, make_property_map(cc_ids)), + tm, make_compose_property_map(fid_map, make_property_map(cc_ids)), parameters::face_index_map(fid_map)); if (nb_cc != 1) { @@ -600,7 +600,7 @@ class Rigid_triangle_mesh_collision_detection } } // only one CC - points.push_back( get(vpm, *boost::begin(vertices(tm))) ); + points.push_back( get(vpm, *std::begin(vertices(tm))) ); } /*! diff --git a/thirdparty/CGAL/include/CGAL/Robust_circumcenter_traits_3.h b/thirdparty/CGAL/include/CGAL/Robust_circumcenter_traits_3.h index 644b8963..bbe4ba98 100644 --- a/thirdparty/CGAL/include/CGAL/Robust_circumcenter_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Robust_circumcenter_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Robust_circumcenter_traits_3.h $ -// $Id: Robust_circumcenter_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Robust_circumcenter_traits_3.h $ +// $Id: include/CGAL/Robust_circumcenter_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Robust_construction.h b/thirdparty/CGAL/include/CGAL/Robust_construction.h index ad580c8f..da41d8a6 100644 --- a/thirdparty/CGAL/include/CGAL/Robust_construction.h +++ b/thirdparty/CGAL/include/CGAL/Robust_construction.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Robust_construction.h $ -// $Id: Robust_construction.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Robust_construction.h $ +// $Id: include/CGAL/Robust_construction.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion, Mariette Yvinec, Laurent Rineau @@ -16,7 +16,7 @@ namespace CGAL { -// This template class is a functor adaptor targetting geometric constructions. +// This template class is a functor adaptor targeting geometric constructions. // // They are "robust" in the following sense : the input and output are // approximate (doubles), but the internal computation tries to guarantees the diff --git a/thirdparty/CGAL/include/CGAL/Robust_weighted_circumcenter_filtered_traits_3.h b/thirdparty/CGAL/include/CGAL/Robust_weighted_circumcenter_filtered_traits_3.h index 2fc02061..1df0f5ce 100644 --- a/thirdparty/CGAL/include/CGAL/Robust_weighted_circumcenter_filtered_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Robust_weighted_circumcenter_filtered_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Robust_weighted_circumcenter_filtered_traits_3.h $ -// $Id: Robust_weighted_circumcenter_filtered_traits_3.h 1916290 2022-03-21T18:04:03+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Robust_weighted_circumcenter_filtered_traits_3.h $ +// $Id: include/CGAL/Robust_weighted_circumcenter_filtered_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,6 +18,7 @@ #include #include #include +#include #include namespace CGAL { @@ -54,7 +55,7 @@ class Robust_filtered_construct_circumcenter_3 if(! force_exact) { - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 FT num_x, num_y, num_z, den; determinants_for_circumcenterC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -86,7 +87,7 @@ class Robust_filtered_construct_circumcenter_3 { CGAL_precondition(! traits.collinear_3_object()(p, q, r)); - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 FT num_x, num_y, num_z, den; determinants_for_circumcenterC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -171,7 +172,7 @@ class Robust_filtered_compute_squared_radius_3 typename Kernel::Compute_squared_radius_3 sq_radius = traits.compute_squared_radius_3_object(); - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 const FT denom = compute_denom(p,q,r,s); if( ! CGAL_NTS is_zero(denom) ) { @@ -265,7 +266,7 @@ class Robust_filtered_construct_weighted_circumcenter_3 if(! force_exact) { - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 FT num_x, num_y, num_z, den; bool unweighted = (p.weight() == 0) && (q.weight() == 0) && (r.weight() == 0) && (s.weight() == 0); @@ -333,7 +334,7 @@ class Robust_filtered_construct_weighted_circumcenter_3 typename Kernel::Side_of_bounded_sphere_3 side_of_bounded_sphere = traits.side_of_bounded_sphere_3_object(); - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 FT num_x, num_y, num_z, den; determinants_for_weighted_circumcenterC3(p.x(), p.y(), p.z(), p.weight(), q.x(), q.y(), q.z(), q.weight(), @@ -417,7 +418,7 @@ class Robust_filtered_compute_squared_radius_smallest_orthogonal_sphere_3 const Weighted_point_3& r, const Weighted_point_3& s) const { - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 FT num_x, num_y, num_z, den; determinants_for_weighted_circumcenterC3(p.x(), p.y(), p.z(), p.weight(), q.x(), q.y(), q.z(), q.weight(), @@ -447,7 +448,7 @@ class Robust_filtered_compute_squared_radius_smallest_orthogonal_sphere_3 const Weighted_point_3& q, const Weighted_point_3& r) const { - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 FT num_x, num_y, num_z, den; determinants_for_weighted_circumcenterC3(p.x(), p.y(), p.z(), p.weight(), q.x(), q.y(), q.z(), q.weight(), @@ -475,7 +476,7 @@ class Robust_filtered_compute_squared_radius_smallest_orthogonal_sphere_3 FT operator()(const Weighted_point_3& p, const Weighted_point_3& q) const { - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 FT qpx = q.x() - p.x(); FT qpy = q.y() - p.y(); FT qpz = q.z() - p.z(); @@ -531,6 +532,13 @@ class Robust_circumcenter_filtered_traits_3 Robust_circumcenter_filtered_traits_3(const Kernel& k = Kernel()) : Kernel(k) { } }; + +template < class BaseGt > +struct Triangulation_structural_filtering_traits > { + typedef typename Triangulation_structural_filtering_traits::Use_structural_filtering_tag Use_structural_filtering_tag; +}; + + template class Robust_weighted_circumcenter_filtered_traits_3 : public Robust_circumcenter_filtered_traits_3 diff --git a/thirdparty/CGAL/include/CGAL/Root_for_circles_2_2.h b/thirdparty/CGAL/include/CGAL/Root_for_circles_2_2.h index e602430b..728b7051 100644 --- a/thirdparty/CGAL/include/CGAL/Root_for_circles_2_2.h +++ b/thirdparty/CGAL/include/CGAL/Root_for_circles_2_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_circles/include/CGAL/Root_for_circles_2_2.h $ -// $Id: Root_for_circles_2_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_circles/include/CGAL/Root_for_circles_2_2.h $ +// $Id: include/CGAL/Root_for_circles_2_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion @@ -22,10 +22,10 @@ #include +#include #include #include #include -#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Root_for_spheres_2_3.h b/thirdparty/CGAL/include/CGAL/Root_for_spheres_2_3.h index 885e8a18..905eed52 100644 --- a/thirdparty/CGAL/include/CGAL/Root_for_spheres_2_3.h +++ b/thirdparty/CGAL/include/CGAL/Root_for_spheres_2_3.h @@ -9,8 +9,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_spheres/include/CGAL/Root_for_spheres_2_3.h $ -// $Id: Root_for_spheres_2_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_spheres/include/CGAL/Root_for_spheres_2_3.h $ +// $Id: include/CGAL/Root_for_spheres_2_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/Root_of_traits.h b/thirdparty/CGAL/include/CGAL/Root_of_traits.h index 359c0971..76c5003e 100644 --- a/thirdparty/CGAL/include/CGAL/Root_of_traits.h +++ b/thirdparty/CGAL/include/CGAL/Root_of_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Root_of_traits.h $ -// $Id: Root_of_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Root_of_traits.h $ +// $Id: include/CGAL/Root_of_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -150,7 +150,7 @@ struct Root_of_traits_helper < FT, Field_tag > // We have the typedef as VC10 fails with // static_assert(FrT::Is_fraction::value) typedef typename FrT::Is_fraction ISF; - CGAL_static_assertion((ISF::value)); + static_assert(ISF::value); typedef typename FrT::Numerator_type RT; diff --git a/thirdparty/CGAL/include/CGAL/Root_of_traits_specializations.h b/thirdparty/CGAL/include/CGAL/Root_of_traits_specializations.h index e8cf3f2e..c9bb69d6 100644 --- a/thirdparty/CGAL/include/CGAL/Root_of_traits_specializations.h +++ b/thirdparty/CGAL/include/CGAL/Root_of_traits_specializations.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Root_of_traits_specializations.h $ -// $Id: Root_of_traits_specializations.h cdbd4c7 2021-02-17T23:25:52+01:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Root_of_traits_specializations.h $ +// $Id: include/CGAL/Root_of_traits_specializations.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Rotational_sweep_visibility_2.h b/thirdparty/CGAL/include/CGAL/Rotational_sweep_visibility_2.h index c5329cae..a4974915 100644 --- a/thirdparty/CGAL/include/CGAL/Rotational_sweep_visibility_2.h +++ b/thirdparty/CGAL/include/CGAL/Rotational_sweep_visibility_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Visibility_2/include/CGAL/Rotational_sweep_visibility_2.h $ -// $Id: Rotational_sweep_visibility_2.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Visibility_2/include/CGAL/Rotational_sweep_visibility_2.h $ +// $Id: include/CGAL/Rotational_sweep_visibility_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Runge_kutta_integrator_2.h b/thirdparty/CGAL/include/CGAL/Runge_kutta_integrator_2.h index 327a037d..fb91e04e 100644 --- a/thirdparty/CGAL/include/CGAL/Runge_kutta_integrator_2.h +++ b/thirdparty/CGAL/include/CGAL/Runge_kutta_integrator_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_lines_2/include/CGAL/Runge_kutta_integrator_2.h $ -// $Id: Runge_kutta_integrator_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_lines_2/include/CGAL/Runge_kutta_integrator_2.h $ +// $Id: include/CGAL/Runge_kutta_integrator_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/SCIP_mixed_integer_program_traits.h b/thirdparty/CGAL/include/CGAL/SCIP_mixed_integer_program_traits.h index 52ade8a8..a9c1651e 100644 --- a/thirdparty/CGAL/include/CGAL/SCIP_mixed_integer_program_traits.h +++ b/thirdparty/CGAL/include/CGAL/SCIP_mixed_integer_program_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Solver_interface/include/CGAL/SCIP_mixed_integer_program_traits.h $ -// $Id: SCIP_mixed_integer_program_traits.h 267a641 2021-05-31T14:01:08+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Solver_interface/include/CGAL/SCIP_mixed_integer_program_traits.h $ +// $Id: include/CGAL/SCIP_mixed_integer_program_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Liangliang Nan @@ -25,13 +25,18 @@ namespace CGAL { +#if (_MSC_VER == 1500) +#undef SCIP_CALL(x) +#define SCIP_CALL(x) (x) +#endif + /// \ingroup PkgSolverInterfaceMIP /// /// This class provides an interface for formulating and solving /// constrained or unconstrained mixed integer programs using /// \ref thirdpartySCIP (which must be available on the system). /// -/// \cgalModels `MixedIntegerProgramTraits` +/// \cgalModels{MixedIntegerProgramTraits} /// /// \sa `GLPK_mixed_integer_program_traits` template diff --git a/thirdparty/CGAL/include/CGAL/SEP_header.h b/thirdparty/CGAL/include/CGAL/SEP_header.h index a7aa9883..2d7a8224 100644 --- a/thirdparty/CGAL/include/CGAL/SEP_header.h +++ b/thirdparty/CGAL/include/CGAL/SEP_header.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/SEP_header.h $ -// $Id: SEP_header.h ef59128 2021-12-27T11:08:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/SEP_header.h $ +// $Id: include/CGAL/SEP_header.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -57,12 +56,12 @@ struct SEP_header_aux { using boost::get; visitor vis(this, get<0>(tuple)); - boost::apply_visitor(vis, get<1>(tuple)); + std::visit(vis, get<1>(tuple)); return *this; } private: - struct visitor : public boost::static_visitor<> { + struct visitor { SEP_header_aux* self; std::string key; visitor(SEP_header_aux* header, std::string key) @@ -72,7 +71,7 @@ struct SEP_header_aux template void operator()(const T& t) { - // std::cerr << "My assignement (" + // std::cerr << "My assignment (" // << typeid(t).name() << "): " // << key << "=" << t << std::endl; self->add(key, t); @@ -106,9 +105,9 @@ namespace CGAL { class SEP_header { - boost::array _n; - boost::array _d; - boost::array _o; + std::array _n; + std::array _d; + std::array _o; SEP_header_aux::String_dict _string_dict; @@ -262,7 +261,7 @@ class SEP_header { #endif // CGAL_SEP_READER_DEBUG } // end constructor of sep_header_grammar - typedef boost::variant value; typedef boost::tuple entry_type; diff --git a/thirdparty/CGAL/include/CGAL/SEP_to_ImageIO.h b/thirdparty/CGAL/include/CGAL/SEP_to_ImageIO.h index af75a1fa..88ce6395 100644 --- a/thirdparty/CGAL/include/CGAL/SEP_to_ImageIO.h +++ b/thirdparty/CGAL/include/CGAL/SEP_to_ImageIO.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/SEP_to_ImageIO.h $ -// $Id: SEP_to_ImageIO.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/SEP_to_ImageIO.h $ +// $Id: include/CGAL/SEP_to_ImageIO.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau diff --git a/thirdparty/CGAL/include/CGAL/SMDS_3/Dump_c3t3.h b/thirdparty/CGAL/include/CGAL/SMDS_3/Dump_c3t3.h new file mode 100644 index 00000000..b6d03567 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/SMDS_3/Dump_c3t3.h @@ -0,0 +1,143 @@ +// Copyright (c) 2012 GeometryFactory Sarl (France) +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/SMDS_3/Dump_c3t3.h $ +// $Id: include/CGAL/SMDS_3/Dump_c3t3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Laurent Rineau + +#ifndef CGAL_SMDS_3_DUMP_C3T3_H +#define CGAL_SMDS_3_DUMP_C3T3_H + +#include + +#include + +#include +#include + +#include + +#include +#include + +namespace CGAL { + +template ::value && + is_streamable::value + && + (is_streamable::value || + Output_rep::is_specialized) + && + (is_streamable::value || + Output_rep::is_specialized) + > +struct Dump_c3t3 { + void dump_c3t3(const C3t3& c3t3, std::string prefix, bool verbose) const + { + if (verbose) + std::clog<<"======dump c3t3===== to: " << prefix << std::endl; + std::ofstream medit_file((prefix+".mesh").c_str()); + medit_file.precision(17); + CGAL::IO::output_to_medit(medit_file, c3t3, false /*rebind*/, true /*show_patches*/); + medit_file.close(); + + std::string bin_filename = prefix; + bin_filename += ".binary.cgal"; + std::ofstream bin_file(bin_filename.c_str(), + std::ios_base::binary | std::ios_base::out); + std::string signature = CGAL::Get_io_signature()(); + CGAL_assertion(signature != std::string()); + bin_file << "binary CGAL c3t3 " << signature << "\n"; + CGAL::IO::set_binary_mode(bin_file); + bin_file << c3t3; + } +}; // end struct template Dump_c3t3 + +template +struct Dump_c3t3 +{ + void dump_c3t3(const C3t3&, std::string, bool) { + std::cerr << "Warning " << __FILE__ << ":" << __LINE__ << "\n" + << " the c3t3 object of following type:\n" + << typeid(C3t3).name() << std::endl + << " cannot be dumped because some types are not streamable:\n"; + if(!is_streamable::value) { + std::cerr << " - C3t3::Triangulation::Vertex is not streamble\n"; + std::cerr << " " + << typeid(typename C3t3::Triangulation::Vertex).name() + << "\n"; + } + + if(!is_streamable::value) { + std::cerr << " - C3t3::Triangulation::Cell is not streamble\n"; + std::cerr << " " + << typeid(typename C3t3::Triangulation::Cell).name() + << "\n"; + } + + if(!is_streamable::value && + !CGAL::Output_rep::is_specialized) + { + std::cerr << " - C3t3::Surface_patch_index is not streamable\n"; + std::cerr << " " + << typeid(typename C3t3::Surface_patch_index).name() + << "\n"; + } + if(!is_streamable::value && + !CGAL::Output_rep::is_specialized) + { + std::cerr << " - C3t3::Subdomain_index is not streamable\n"; + std::cerr << " " + << typeid(typename C3t3::Subdomain_index).name() + << "\n"; + } + } +}; // end struct template specialization Dump_c3t3 + +template +void dump_c3t3_edges(const C3t3& c3t3, std::string prefix) +{ + typename C3t3::Triangulation::Geom_traits::Construct_point_3 cp = + c3t3.triangulation().geom_traits().construct_point_3_object(); + + std::ofstream file((prefix+".polylines.txt").c_str()); + file.precision(17); + for(typename C3t3::Edges_in_complex_iterator + edge_it = c3t3.edges_in_complex_begin(), + end = c3t3.edges_in_complex_end(); + edge_it != end; ++edge_it) + { + const typename C3t3::Triangulation::Cell_handle c = edge_it->first; + const int i = edge_it->second; + const int j = edge_it->third; + const typename C3t3::Triangulation::Weighted_point& ei = c3t3.triangulation().point(c, i); + const typename C3t3::Triangulation::Weighted_point& ej = c3t3.triangulation().point(c, j); + file << "2 " << cp(ei) << " " << cp(ej) << "\n"; + } +} +template +void dump_c3t3(const C3t3& c3t3, std::string prefix, +#ifdef CGAL_MESH_3_VERBOSE + bool verbose = true) +#else + bool verbose = false) +#endif +{ + if(!prefix.empty()) { + Dump_c3t3 dump; + dump.dump_c3t3(c3t3, prefix, verbose); + } +} + +} // end namespace CGAL + +#include + +#endif // CGAL_SMDS_3_DUMP_C3T3_H diff --git a/thirdparty/CGAL/include/CGAL/SMDS_3/Mesh_complex_3_in_triangulation_3_fwd.h b/thirdparty/CGAL/include/CGAL/SMDS_3/Mesh_complex_3_in_triangulation_3_fwd.h new file mode 100644 index 00000000..1afc9707 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/SMDS_3/Mesh_complex_3_in_triangulation_3_fwd.h @@ -0,0 +1,53 @@ +// Copyright (C) 2020 GeometryFactory Sarl +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/SMDS_3/Mesh_complex_3_in_triangulation_3_fwd.h $ +// $Id: include/CGAL/SMDS_3/Mesh_complex_3_in_triangulation_3_fwd.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// + +#ifndef CGAL_SMDS_3_MESH_COMPLEX_3_IN_TRIANGULATION_3_FWD_H +#define CGAL_SMDS_3_MESH_COMPLEX_3_IN_TRIANGULATION_3_FWD_H + +/// \file Mesh_complex_3_in_triangulation_3_fwd.h +/// Forward declarations of the SMDS_3 package. + +#ifndef DOXYGEN_RUNNING +namespace CGAL { + +// fwdS for the public interface +template +class Mesh_complex_3_in_triangulation_3; + +namespace IO { + template + void output_to_medit(std::ostream& os, + const C3T3& c3t3, + bool rebind = false, + bool show_patches = false +#ifndef DOXYGEN_RUNNING + , bool all_vertices = true + , bool all_cells = false +#endif + ); +} //namespace IO + +namespace SMDS_3 { + + template + bool build_triangulation_from_file(std::istream& is, + Tr& tr, + bool verbose = false, + bool replace_domain_0 = false, + bool allow_non_manifold = false); + +} // namespace SMDS_3 +} // namespace CGAL +#endif + +#endif /* CGAL_SMDS_3_MESH_COMPLEX_3_IN_TRIANGULATION_3_FWD_H */ + + diff --git a/thirdparty/CGAL/include/CGAL/SMDS_3/internal/Boundary_of_subdomain_of_complex_3_in_triangulation_3_to_off.h b/thirdparty/CGAL/include/CGAL/SMDS_3/internal/Boundary_of_subdomain_of_complex_3_in_triangulation_3_to_off.h new file mode 100644 index 00000000..2293796b --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/SMDS_3/internal/Boundary_of_subdomain_of_complex_3_in_triangulation_3_to_off.h @@ -0,0 +1,93 @@ +// Copyright (c) 2008-2014 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/SMDS_3/internal/Boundary_of_subdomain_of_complex_3_in_triangulation_3_to_off.h $ +// $Id: include/CGAL/SMDS_3/internal/Boundary_of_subdomain_of_complex_3_in_triangulation_3_to_off.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Laurent Rineau and Sebastien Loriot + +#ifndef CGAL_INTERNAL_MESH_3_BOUNDARY_OF_SUDDOMAIN_OF_COMPLEX_3_IN_TRIANGULATION_3_TO_OFF_H +#define CGAL_INTERNAL_MESH_3_BOUNDARY_OF_SUDDOMAIN_OF_COMPLEX_3_IN_TRIANGULATION_3_TO_OFF_H + +#include + +#include + +namespace CGAL { + +namespace internal { + +template +std::ostream& +output_polygon_soup_to_off(const PointContainer& points, + const FaceContainer& faces, + std::ostream& out) +{ + typedef typename FaceContainer::value_type Face; + + const std::size_t np = points.size(); + const std::size_t nf = faces.size(); + + out << "OFF\n" << np << " " << nf << " 0\n"; + + for(std::size_t i=0; i +std::ostream& +output_boundary_of_c3t3_to_off(const C3T3& c3t3, + typename C3T3::Subdomain_index sd_index, + std::ostream& out, + bool normals_point_outside_of_the_subdomain = true) +{ + typedef typename C3T3::Triangulation::Geom_traits::Point_3 Point; + typedef std::vector Face; + typedef typename C3T3::Surface_patch_index Surface_patch_index; + + std::vector points; + std::vector faces; + std::vector patches; + + CGAL::SMDS_3::internal::facets_in_complex_3_to_triangle_soup(c3t3, sd_index, points, faces, + patches, normals_point_outside_of_the_subdomain); + + return output_polygon_soup_to_off(points, faces, out); +} + +template +std::ostream& +output_facets_in_complex_to_off(const C3T3& c3t3, + std::ostream& out) +{ + typedef typename C3T3::Triangulation::Geom_traits::Point_3 Point; + typedef typename C3T3::Surface_patch_index Surface_patch_index; + typedef std::vector Face; + + std::vector points; + std::vector faces; + std::vector patches; + + CGAL::SMDS_3::internal::facets_in_complex_3_to_triangle_soup(c3t3, points, faces, patches); + + return output_polygon_soup_to_off(points, faces, out); +} + +} } // end of namespace CGAL::internal + +#endif // CGAL_INTERNAL_MESH_3_BOUNDARY_OF_SUDDOMAIN_OF_COMPLEX_3_IN_TRIANGULATION_3_TO_OFF_H diff --git a/thirdparty/CGAL/include/CGAL/SMDS_3/internal/Handle_IO_for_pair_of_int.h b/thirdparty/CGAL/include/CGAL/SMDS_3/internal/Handle_IO_for_pair_of_int.h new file mode 100644 index 00000000..e56e0c64 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/SMDS_3/internal/Handle_IO_for_pair_of_int.h @@ -0,0 +1,95 @@ +// Copyright (c) 2016 GeometryFactory +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/SMDS_3/internal/Handle_IO_for_pair_of_int.h $ +// $Id: include/CGAL/SMDS_3/internal/Handle_IO_for_pair_of_int.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Laurent Rineau + +#ifndef CGAL_INTERNAL_MESH_3_INTERNAL_HANDLE_IO_FOR_PAIR_OF_INT_H +#define CGAL_INTERNAL_MESH_3_INTERNAL_HANDLE_IO_FOR_PAIR_OF_INT_H + +#include + +#include + +#include +#include +#include +#include +#include + +namespace CGAL { +template <> +struct Get_io_signature > { + std::string operator()() const + { + return std::string("std::pair"); + } +}; // end Get_io_signature > + +template <> +class Output_rep > : public IO_rep_is_specialized { + typedef std::pair T; + const T& t; +public: + //! initialize with a const reference to \a t. + Output_rep( const T& tt) : t(tt) {} + //! perform the output, calls \c operator\<\< by default. + std::ostream& operator()( std::ostream& out) const { + if(IO::is_ascii(out)) { + out << t.first << " " << t.second; + } else { + CGAL::write(out, t.first); + CGAL::write(out, t.second); + } + return out; + } +}; + +template <> +class Output_rep > > + : public IO_rep_is_specialized +{ + typedef std::variant > Variant; + const Variant& v; +public: + Output_rep(const Variant& v) : v(v) {} + std::ostream& operator()( std::ostream& out) const { + if(v.index() == 1) { + out << IO::oformat(std::get >(v)); + } else { + out << std::get(v); + } + return out; + } +}; + +template <> +class Input_rep > : public IO_rep_is_specialized { + typedef std::pair T; + T& t; +public: + //! initialize with a const reference to \a t. + Input_rep( T& tt) : t(tt) {} + //! perform the output, calls \c operator\<\< by default. + std::istream& operator()( std::istream& in) const { + if(IO::is_ascii(in)) { + in >> t.first >> t.second; + } else { + CGAL::read(in, t.first); + CGAL::read(in, t.second); + } + return in; + } +}; +} // end namespace CGAL + +#include + +#endif // CGAL_INTERNAL_MESH_3_INTERNAL_HANDLE_IO_FOR_PAIR_OF_INT_H diff --git a/thirdparty/CGAL/include/CGAL/SMDS_3/internal/SMDS_3_helper.h b/thirdparty/CGAL/include/CGAL/SMDS_3/internal/SMDS_3_helper.h new file mode 100644 index 00000000..45765c0d --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/SMDS_3/internal/SMDS_3_helper.h @@ -0,0 +1,68 @@ +// Copyright (c) 2021 GeometryFactory +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/SMDS_3/internal/SMDS_3_helper.h $ +// $Id: include/CGAL/SMDS_3/internal/SMDS_3_helper.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Jane Tournois + +#ifndef CGAL_INTERNAL_SMDS_3_HELPERS_H +#define CGAL_INTERNAL_SMDS_3_HELPERS_H + +#include + +#include + +#include +#include + +namespace CGAL { +namespace SMDS_3 { +namespace internal { + + template + bool is_convex(const Triangulation& tr) + { + typedef typename Triangulation::Vertex_handle Vertex_handle; + typedef typename Triangulation::Cell_handle Cell_handle; + typedef typename Triangulation::Geom_traits::Point_3 Point_3; + typename Triangulation::Geom_traits::Construct_point_3 cp + = tr.geom_traits().construct_point_3_object(); + typename Triangulation::Geom_traits::Orientation_3 orientation = + tr.geom_traits().orientation_3_object(); + + std::vector infcells; + tr.incident_cells(tr.infinite_vertex(), std::back_inserter(infcells)); + for (Cell_handle c : infcells) + { + const Cell_handle neigh = c->neighbor(c->index(tr.infinite_vertex())); + const int i = neigh->index(c); + + const std::array pfacet = { cp(neigh->vertex((i + 1) % 4)->point()), + cp(neigh->vertex((i + 2) % 4)->point()), + cp(neigh->vertex((i + 3) % 4)->point())}; + const CGAL::Orientation o = orientation( + pfacet[0], pfacet[1], pfacet[2], cp(neigh->vertex(i)->point())); + + for (Vertex_handle v : tr.finite_vertex_handles()) + { + if (c->has_vertex(v)) + continue; + if (o != orientation(pfacet[0], pfacet[1], pfacet[2], + cp(neigh->vertex(i)->point()))) + return false; + } + } + + return true; + } + +} // end namespace internal +} // end namespace SMDS_3 +} // end namespace CGAL + +#endif // CGAL_INTERNAL_SMDS_3_HELPERS_H diff --git a/thirdparty/CGAL/include/CGAL/SMDS_3/internal/indices_management.h b/thirdparty/CGAL/include/CGAL/SMDS_3/internal/indices_management.h new file mode 100644 index 00000000..e8bd88f8 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/SMDS_3/internal/indices_management.h @@ -0,0 +1,333 @@ +// Copyright (c) 2009 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/SMDS_3/internal/indices_management.h $ +// $Id: include/CGAL/SMDS_3/internal/indices_management.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Stéphane Tayeb +// +//****************************************************************************** +// File Description : +// +// +//****************************************************************************** + +#ifndef CGAL_INTERNAL_MESH_3_INDICES_MANAGEMENT_H +#define CGAL_INTERNAL_MESH_3_INDICES_MANAGEMENT_H + +#include + + +#include +#include +#include +#include + +#include +#include + +namespace CGAL { +namespace Mesh_3 { +namespace internal { + +// ----------------------------------- +// Index_generator +// Don't use std::variant if types are the same type +// ----------------------------------- +template < typename Subdomain_index, typename Surface_patch_index > +struct Index_generator +{ + typedef std::variant Index; + typedef Index type; +}; + +template < typename T > +struct Index_generator +{ + typedef T Index; + typedef Index type; +}; + +template ::value> +struct Indices_tuple_generator +{ + using type = std::tuple; +}; + +template +struct Indices_tuple_generator +{ + using type = std::tuple; +}; + +template +using Indices_tuple_t = typename Indices_tuple_generator::type; + +// Nasty meta-programming to get a std::variant of four types that +// may not be all different. +template struct seq1 { + typedef T0 type; +}; +template struct seq2 { + typedef std::variant type; +}; +template struct seq3 { + typedef std::variant type; +}; +template struct seq4 { + typedef std::variant type; +}; + +template struct insert; +template struct insert, U> { + typedef seq2 type; +}; +template struct insert, V> { + typedef seq3 type; +}; +template +struct insert, W> { + typedef seq4 type; +}; +template struct insert, T> { + typedef seq1 type; +}; +template struct insert, T> { + typedef seq2 type; +}; +template struct insert, U> { + typedef seq2 type; +}; +template struct insert, T> { + typedef seq3 type; +}; +template struct insert, U> { + typedef seq3 type; +}; +template struct insert, V> { + typedef seq3 type; +}; + +template < typename Subdomain_index, + typename Surface_patch_index, + typename Curves_index, + typename Corner_index> +struct Index_generator_with_features +{ + typedef typename insert< + typename insert< + typename insert, + Surface_patch_index + >::type, + Curves_index + >::type, + Corner_index>::type seq; + typedef typename seq::type Index; + typedef Index type; +}; + +template < typename T> +struct Index_generator_with_features +{ + typedef T Index; + typedef Index type; +}; + +template +const T& get_index(const Variant& x, + std::enable_if_t::value > * = 0) +{ return std::get(x); } + +template +const T& get_index(const T& x) { return x; } + +template ::value> +struct Read_mesh_domain_index { + // here we have has_feature==true + + typedef Mesh_domain MT; // was named "mesh traits" previously + + typename Mesh_domain::Index + operator()(int dimension, std::istream& is) const { + switch(dimension) { + case 0: + typename MT::Corner_index ci; + if(IO::is_ascii(is)) is >> ci; + else CGAL::read(is, ci); + return ci; + break; + case 1: + typename MT::Curve_index si; + if(IO::is_ascii(is)) is >> si; + else CGAL::read(is, si); + return si; + break; + default: + return Read_mesh_domain_index()(dimension, is); + } + } +}; // end template partial specialization + // Read_mesh_domain_index + +template ::value> +struct Write_mesh_domain_index { + // here we have has_feature==true + + typedef Mesh_domain MT; // was named "mesh traits" previously + typedef typename MT::Corner_index Ci; + typedef typename MT::Curve_index Si; + + void + operator()(std::ostream& os, int dimension, + const typename Mesh_domain::Index& index) const { + switch(dimension) { + case 0: { + const Ci& ci = get_index(index); + if(IO::is_ascii(os)) os << IO::oformat(ci); + else CGAL::write(os, ci); + } + break; + case 1: { + const Si& si = get_index(index); + if(IO::is_ascii(os)) os << IO::oformat(si); + else CGAL::write(os, si); + } + break; + default: + Write_mesh_domain_index()(os, dimension, index); + } + } +}; // end template partial specialization + // Write_mesh_domain_index + +template +struct Read_mesh_domain_index { + // here we have has_feature==false + + typedef Mesh_domain MT; // was named "mesh traits" previously + + typename Mesh_domain::Index + operator()(int dimension, std::istream& is) const { + switch(dimension) { + case 2: { + typename MT::Surface_patch_index spi; + if(IO::is_ascii(is)) is >> IO::iformat(spi); + else CGAL::read(is, spi); + return spi; + } + break; + default: {// 3 + typename MT::Subdomain_index di; + if(IO::is_ascii(is)) is >> IO::iformat(di); + else CGAL::read(is, di); + return di; + } + break; + } + } +}; // end template partial specialization + // Read_mesh_domain_index + +template +struct Write_mesh_domain_index { + // here we have has_feature==false + + typedef Mesh_domain MT; // was named "mesh traits" previously + typedef typename MT::Surface_patch_index Spi; + typedef typename MT::Subdomain_index Di; + + void + operator()(std::ostream& os, int dimension, + const typename Mesh_domain::Index& index) const { + switch(dimension) { + case 2: { + const Spi& spi = get_index(index); + if(IO::is_ascii(os)) os << IO::oformat(spi); + else CGAL::write(os, spi); + } + break; + default: {// 3 + const Di& di = get_index(index); + if(IO::is_ascii(os)) os << IO::oformat(di); + else CGAL::write(os, di); + } + break; + } + } +}; // end template partial specialization + // Write_mesh_domain_index + +template +struct Read_write_index { + void operator()(std::ostream& os, int, Index index) const { + if(IO::is_ascii(os)) os << IO::oformat(index); + else CGAL::write(os, index); + } + Index operator()(std::istream& is, int) const { + Index index; + if(IO::is_ascii(is)) is >> IO::iformat(index); + else CGAL::read(is, index); + return index; + } +}; + +struct Variant_write_visitor { + std::ostream& os; + template + void operator()(T v) const { + if(IO::is_ascii(os)) os << CGAL::IO::oformat(v); + else CGAL::write(os, v); + } +}; + +template +struct Variant_read_visitor { + std::istream& is; + Index& variant; + template + void operator()(T) const { + T v; + if(IO::is_ascii(is)) is >> CGAL::IO::iformat(v); + else CGAL::read(is, v); + variant = v; + } +}; + +template +struct Read_write_index> { + using Index = std::variant; + using index_seq = std::make_index_sequence::value>; + + template + Index get_index(int dimension, std::index_sequence) const{ + static const Index variants[] = { std::tuple_element_t{}... }; + return variants[dimension < 0 ? 0 : 3-dimension]; + } + + void operator()(std::ostream& os, int, Index index) const { + Variant_write_visitor visitor{os}; + std::visit(visitor, index); + } + Index operator()(std::istream& is, int dimension) const { + Index index = get_index(dimension, index_seq{}); + Variant_read_visitor visitor{is, index}; + std::visit(visitor, index); + return index; + } +}; + +} // end namespace internal +} // end namespace Mesh_3 +} // end namespace CGAL + +#endif // CGAL_INTERNAL_MESH_3_INDICES_MANAGEMENT_H diff --git a/thirdparty/CGAL/include/CGAL/SMDS_3/io_signature.h b/thirdparty/CGAL/include/CGAL/SMDS_3/io_signature.h new file mode 100644 index 00000000..340bea4b --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/SMDS_3/io_signature.h @@ -0,0 +1,363 @@ +// Copyright (c) 2006 INRIA Sophia-Antipolis (France). +// Copyright (c) 2011 GeometryFactory Sarl (France) +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/SMDS_3/io_signature.h $ +// $Id: include/CGAL/SMDS_3/io_signature.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Laurent RINEAU + +#ifndef CGAL_SMDS_3_IO_SIGNATURE_H +#define CGAL_SMDS_3_IO_SIGNATURE_H + +#include + +#define CGAL_MESH_3_IO_H // the old include macro, tested by other files + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CGAL_PERIODIC_3_MESH_3_CONFIG_H +#include +#include +#endif + +#include +#include +#include + +namespace CGAL { + +// SFINAE test +template +class has_io_signature +{ +private: + template struct helper; + template static char check(helper<&V::io_signature> *); + template static char (&check(...))[2]; + +public: + enum { value = (sizeof(check(0)) == sizeof(char)) }; +}; + +template +struct Get_io_signature_aux +{ + std::string operator() () const + { + return T::io_signature(); + } +}; // end struct template Get_io_signature_aux + +template +struct Get_io_signature_aux +{ + std::string operator()() const + { + std::cerr << "Type without signature: " << typeid(T).name() << std::endl; + return std::string(); + } +}; // end template partial specialization Get_io_signature_aux + + +template +struct Get_io_signature + : public Get_io_signature_aux< + T, + (has_io_signature::value || + has_io_signature::value || + has_io_signature::value ) // signature for + // static mem func + > +{ +}; + +template <> +struct Get_io_signature +{ + std::string operator()() { + return "i"; + } +}; + +template <> +struct Get_io_signature +{ + std::string operator()() { + return "ui"; + } +}; + +template <> +struct Get_io_signature +{ + std::string operator()() { + return "c"; + } +}; + +template <> +struct Get_io_signature +{ + std::string operator()() { + return "uc"; + } +}; + +template <> +struct Get_io_signature +{ + std::string operator()() { + return "sc"; + } +}; + +template <> +struct Get_io_signature +{ + std::string operator()() { + return "s"; + } +}; + +template <> +struct Get_io_signature +{ + std::string operator()() { + return "us"; + } +}; + +template <> +struct Get_io_signature +{ + std::string operator()() { + return "d"; + } +}; + +template +struct Get_io_signature > +{ + std::string operator()() { + return std::string("std::variant<") + + Get_io_signature()() + "," + + Get_io_signature()() + ">"; + } +}; + +template +struct Get_io_signature > +{ + std::string operator()() { + return std::string("std::pair<") + + Get_io_signature()() + "," + + Get_io_signature()() + ">"; + } +}; + +template +struct Get_io_signature > +{ + std::string operator()() { + return std::string("std::pair<") + + Get_io_signature()() + "," + + Get_io_signature()() + ">"; + } +}; + +template +struct Get_io_signature > +{ + std::string operator()() { + return std::string("std::variant<") + + Get_io_signature()() + "," + + Get_io_signature()() + "," + + Get_io_signature()() + ">"; + } +}; + +template +struct Get_io_signature > +{ + std::string operator()() { + return std::string("std::variant<") + + Get_io_signature()() + "," + + Get_io_signature()() + "," + + Get_io_signature()() + "," + + Get_io_signature()() + ">"; + } +}; + +template +struct Get_io_signature > +{ + std::string operator()() { + return "Point_3"; + } +}; + +template +struct Get_io_signature > +{ + std::string operator()() { + return std::string("Weighted_point<") + Get_io_signature >()() + ">"; + } +}; + +#ifdef CGAL_TRIANGULATION_3_H +template +struct +Get_io_signature > +{ + std::string operator()() { + return std::string("Triangulation_3(") + + Get_io_signature()() + + ",Vb(" + Get_io_signature()() + + "),Cb(" + Get_io_signature()() + + "))"; + } +}; +#endif + +#ifdef CGAL_DELAUNAY_TRIANGULATION_3_H +template +struct +Get_io_signature > +{ + std::string operator()() { + return Get_io_signature >()(); + } +}; +#endif + +#ifdef CGAL_REGULAR_TRIANGULATION_3_H +template +struct +Get_io_signature > +{ + std::string operator()() { + return Get_io_signature >()(); + } +}; +#endif + +#ifdef CGAL_PERIODIC_3_TRIANGULATION_3_H +template +struct +Get_io_signature > +{ + std::string operator()() { + return std::string("Periodic_3_triangulation_3(") + + Get_io_signature()() + + ",Vb(" + Get_io_signature()() + + "),Cb(" + Get_io_signature()() + + "))"; + } +}; +#endif + +#ifdef CGAL_PERIODIC_3_REGULAR_TRIANGULATION_3_H +template +struct +Get_io_signature > +{ + std::string operator()() { + return Get_io_signature >()(); + } +}; +#endif + +#ifdef CGAL_TRIANGULATION_VERTEX_BASE_3_H +template +struct Get_io_signature > +{ + std::string operator()() { + return "Tvb_3"; + } +}; +#endif + +#ifdef CGAL_REGULAR_TRIANGULATION_VERTEX_BASE_3_H +template +struct Get_io_signature > +{ + // identical to Triangulation_vertex_base_3 + std::string operator()() { + return "Tvb_3"; + } +}; +#endif + +#ifdef CGAL_TRIANGULATION_VERTEX_BASE_WITH_INFO_3_H +template +struct +Get_io_signature > +{ + std::string operator()() { + return Get_io_signature()(); + } +}; +#endif + +#ifdef CGAL_TRIANGULATION_CELL_BASE_3_H +template +struct +Get_io_signature > +{ + std::string operator()() { + return "Tcb_3"; + } +}; +#endif + +#ifdef CGAL_TRIANGULATION_CELL_BASE_WITH_INFO_3_H +template +struct +Get_io_signature > +{ + std::string operator()() { + return Get_io_signature()(); + } +}; +#endif + +#ifdef CGAL_REGULAR_TRIANGULATION_CELL_BASE_3_H +template +struct +Get_io_signature > +{ + std::string operator()() { + return "RTcb_3"; + } +}; +#endif + +#ifdef CGAL_REGULAR_TRIANGULATION_CELL_BASE_WITH_CIRCUMCENTER_3_H +template +struct +Get_io_signature > +{ + std::string operator()() { + return "RTWWCcb_3"; + } +}; +#endif + +} // end namespace CGAL + + +#endif // CGAL_SMDS_3_IO_SIGNATURE_H diff --git a/thirdparty/CGAL/include/CGAL/SMDS_3/tet_soup_to_c3t3.h b/thirdparty/CGAL/include/CGAL/SMDS_3/tet_soup_to_c3t3.h new file mode 100644 index 00000000..81ea382a --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/SMDS_3/tet_soup_to_c3t3.h @@ -0,0 +1,732 @@ +// Copyright (c) 2009 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h $ +// $Id: include/CGAL/SMDS_3/tet_soup_to_c3t3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Mael Rouxel-Labbé, Maxime Gimeno +// +//****************************************************************************** +// +//****************************************************************************** + +#ifndef CGAL_SMDS_3_TET_SOUP_TO_C3T3_H +#define CGAL_SMDS_3_TET_SOUP_TO_C3T3_H + +#include + +#include +#include + +#include + +#include +#include +#include +#include + +namespace CGAL { +namespace SMDS_3 { + +template +std::array make_ordered_vertex_array(const Vh vh0, const Vh vh1, const Vh vh2) +{ + std::array ft = { {vh0, vh1, vh2} }; + if (ft[1] < ft[0]) std::swap(ft[0], ft[1]); + if (ft[2] < ft[1]) std::swap(ft[1], ft[2]); + if (ft[1] < ft[0]) std::swap(ft[0], ft[1]); + return ft; +} + +template +void build_vertices(Tr& tr, + const PointRange& points, + std::vector& vertex_handle_vector) +{ + typedef typename Tr::Vertex_handle Vertex_handle; + typedef typename Tr::Point Point; + + vertex_handle_vector[0] = tr.tds().create_vertex(); // creates the infinite vertex + tr.set_infinite_vertex(vertex_handle_vector[0]); + + // build vertices + for(std::size_t i=0; iset_point(Point(points[i])); + } +} + +template +bool add_facet_to_incident_cells_map(const typename Tr::Cell_handle c, int i, + boost::unordered_map, + std::vector > >& incident_cells_map, + const bool verbose, + const bool allow_non_manifold) +{ + typedef typename Tr::Vertex_handle Vertex_handle; + typedef typename Tr::Cell_handle Cell_handle; + typedef std::array Facet_vvv; + typedef std::pair Incident_cell; + typedef boost::unordered_map > Incident_cells_map; + + bool success = true; + + // the opposite vertex of f in c is i + Facet_vvv f = CGAL::SMDS_3::make_ordered_vertex_array(c->vertex((i + 1) % 4), + c->vertex((i + 2) % 4), + c->vertex((i + 3) % 4)); + CGAL_precondition(f[0] != f[1] && f[1] != f[2]); + + Incident_cell e = std::make_pair(c, i); + std::vector vec; + vec.push_back(e); + std::pair is_insert_successful = + incident_cells_map.emplace(f, vec); + if(!is_insert_successful.second) // the entry already exists in the map + { + // A finite facet must have exactly two incident cells + // + // If there is a non-manifold edge on the boundary, the infinite facet being + // that edge + the infinite vertex has (strictly) more than 2 incident cells + if(is_insert_successful.first->second.size() != 1) + { + if(!allow_non_manifold) + { + success = false; + if(verbose) + std::cerr << "Error: " << is_insert_successful.first->second.size() << " previous incidences" << std::endl; + } + else if(verbose) + { + std::cerr << "Warning: " << is_insert_successful.first->second.size() << " previous incidences" << std::endl; + } + } + is_insert_successful.first->second.push_back(e); + } + return success; +} + +template +bool build_finite_cells(Tr& tr, + const CellRange& finite_cells, + const SubdomainsRange& subdomains, + const std::vector& vertex_handle_vector, + boost::unordered_map, + std::vector > >& incident_cells_map, + const FacetPatchMap& border_facets, + const bool verbose, + const bool replace_domain_0) +{ + typedef typename Tr::Vertex_handle Vertex_handle; + typedef typename Tr::Cell_handle Cell_handle; + typedef typename Tr::Cell::Surface_patch_index Surface_patch_index; + + bool success = true; + + CGAL_assertion_code( + typename Tr::Geom_traits::Construct_point_3 cp = tr.geom_traits().construct_point_3_object(); + typename Tr::Geom_traits::Orientation_3 orientation = tr.geom_traits().orientation_3_object(); + ) + + typename SubdomainsRange::value_type max_domain = 0; + if(replace_domain_0) + { + for(std::size_t i=0; i max_domain) + max_domain = subdomains[i]; + } + } + + // build the finite cells + for(std::size_t i=0; i vs; + + for(int j=0; j<4; ++j) + { + CGAL_precondition(static_cast(tet[j]) < tr.number_of_vertices() && tet[j] >= 0); + vs[j] = vertex_handle_vector.at(tet[j] + 1); + CGAL_postcondition(vs[j] != Vertex_handle()); + CGAL_postcondition(!tr.is_infinite(vs[j])); + vs[j]->set_dimension(3); + } + + // this assertion also tests for degeneracy + CGAL_assertion(orientation(cp(tr.point(vs[0])), cp(tr.point(vs[1])), + cp(tr.point(vs[2])), cp(tr.point(vs[3]))) == POSITIVE); + + Cell_handle c = tr.tds().create_cell(vs[0], vs[1], vs[2], vs[3]); + c->set_subdomain_index(subdomains[i]); // the cell's info keeps the reference of the tetrahedron + if(replace_domain_0 && subdomains[i] == 0) + c->set_subdomain_index(max_domain+1); // the cell's info keeps the reference of the tetrahedron + + // assign cells to vertices + for(int j=0; j<4; ++j) + { + if(vs[j]->cell() == Cell_handle()) + vs[j]->set_cell(c); + } + + // build the map used for adjacency later + for(int j=0; j<4; ++j) + { + // do not allow non-manifoldness in the finite cells case + if(!CGAL::SMDS_3::add_facet_to_incident_cells_map(c, j, incident_cells_map, verbose, false)) + success = false; + + if(border_facets.size() != 0) + { + std::array facet; + facet[0] = tet[(j+1) % 4]; + facet[1] = tet[(j+2) % 4]; + facet[2] = tet[(j+3) % 4]; + + // find the circular permutation that puts the smallest index in the first place. + int n0 = (std::min)({facet[0], facet[1], facet[2]}); + do + { + std::rotate(std::begin(facet), std::next(std::begin(facet)), std::end(facet)); + } + while(facet[0] != n0); + + typename FacetPatchMap::const_iterator it = border_facets.find(facet); + if(it != border_facets.end()) + { + c->set_surface_patch_index(j, it->second); + } + else + { + std::swap(facet[1], facet[2]); // facet[0] is still the smallest, no need to rotate again + + it = border_facets.find(facet); + if(it != border_facets.end()) + c->set_surface_patch_index(j, it->second); + else + c->set_surface_patch_index(j, Surface_patch_index()); + } + } + } + } + + return success; +} + +template +bool add_infinite_facets_to_incident_cells_map(typename Tr::Cell_handle c, + int inf_vert_pos, + boost::unordered_map, + std::vector > >& incident_cells_map, + const bool verbose, + const bool allow_non_manifold) +{ + int l = (inf_vert_pos + 1) % 4; + bool b1 = CGAL::SMDS_3::add_facet_to_incident_cells_map(c, l, incident_cells_map, verbose, allow_non_manifold); + l = (inf_vert_pos + 2) % 4; + bool b2 = CGAL::SMDS_3::add_facet_to_incident_cells_map(c, l, incident_cells_map, verbose, allow_non_manifold); + l = (inf_vert_pos + 3) % 4; + bool b3 = CGAL::SMDS_3::add_facet_to_incident_cells_map(c, l, incident_cells_map, verbose, allow_non_manifold); + + return b1 && b2 && b3; +} + +template +bool build_infinite_cells(Tr& tr, + boost::unordered_map, + std::vector > >& incident_cells_map, + const bool verbose, + const bool allow_non_manifold) +{ + typedef typename Tr::Vertex_handle Vertex_handle; + typedef typename Tr::Cell_handle Cell_handle; + typedef std::array Facet_vvv; + typedef std::pair Incident_cell; + typedef boost::unordered_map > Incident_cells_map; + + bool success = true; + + std::vector infinite_cells; + + // check the incident cells map for facets who only have one incident cell + // and build the infinite cell on the opposite side + typename Incident_cells_map::iterator it = incident_cells_map.begin(); + typename Incident_cells_map::iterator end = incident_cells_map.end(); + for(; it != end; ++it) + { + if(it->second.size() == 2) // facet already has both its incident cells + continue; + + CGAL_assertion(it->second.size() == 1); + + Cell_handle c = it->second[0].first; + int i = it->second[0].second; + + // the infinite cell that we are creating needs to be well oriented... + Cell_handle opp_c; + if(i == 0 || i == 2) + opp_c = tr.tds().create_cell(tr.infinite_vertex(), + c->vertex((i + 2) % 4), + c->vertex((i + 1) % 4), + c->vertex((i + 3) % 4)); + else + opp_c = tr.tds().create_cell(tr.infinite_vertex(), + c->vertex((i + 3) % 4), + c->vertex((i + 1) % 4), + c->vertex((i + 2) % 4)); + + infinite_cells.push_back(opp_c); + + // set the infinite_vertex's incident cell + if(tr.infinite_vertex()->cell() == Cell_handle()) + tr.infinite_vertex()->set_cell(opp_c); + + // the only finite facet + it->second.emplace_back(opp_c, 0); + CGAL_assertion(it->second.size() == 2); + + opp_c->set_surface_patch_index(0, c->surface_patch_index(i)); + } + +#ifdef CGAL_TET_SOUP_TO_C3T3_DEBUG + for (auto icit : incident_cells_map) + CGAL_assertion(icit.second.size() == 2); + + std::map facets; + for (const Cell_handle c : infinite_cells) + { + for (int i = 1; i < 4; ++i) + { + std::array vs = CGAL::SMDS_3::make_ordered_vertex_array(c->vertex((i + 1) % 4), + c->vertex((i + 2) % 4), + c->vertex((i + 3) % 4)); + if (facets.find(vs) == facets.end()) + facets.emplace(vs, 1); + else + facets[vs]++; + } + } + + for (auto fp : facets) + { + if (fp.second != 2) + { + std::cout << "Warning: non manifold edge" << std::endl; + std::cout << "fp.second = " << fp.second << std::endl; + std::cout << tr.point(fp.first[0]) << " " + << tr.point(fp.first[1]) << " " + << tr.point(fp.first[2]) << std::endl; + success = false; + } +// CGAL_assertion(fp.second == 2); + } +#endif + + // add the facets to the incident cells map + for (const Cell_handle& c : infinite_cells) + { + if(!CGAL::SMDS_3::add_infinite_facets_to_incident_cells_map(c, + c->index(tr.infinite_vertex()), + incident_cells_map, + verbose, + allow_non_manifold)) + success = false; + } + + return success; +} + +template +bool is_infinite(const std::array& f, + const Tr& tr) +{ + for (auto vh : f) + { + if (tr.infinite_vertex() == vh) + return true; + } + return false; +} + +template +bool assign_neighbors(Tr& tr, + const boost::unordered_map, + std::vector > >& incident_cells_map, + const bool allow_non_manifold) +{ + typedef typename Tr::Cell_handle Cell_handle; + typedef std::pair Incident_cell; + typedef boost::unordered_map, + std::vector > Incident_cells_map; + + bool success = true; + + typename Incident_cells_map::const_iterator icit = incident_cells_map.begin(); + for(; icit!=incident_cells_map.end(); ++icit) + { + const std::vector& adjacent_cells = icit->second; + if (adjacent_cells.size() == 2) + { + Cell_handle c0 = adjacent_cells[0].first; + int i0 = adjacent_cells[0].second; + Cell_handle c1 = adjacent_cells[1].first; + int i1 = adjacent_cells[1].second; + + tr.tds().set_adjacency(c0, i0, c1, i1); + } + else if(!allow_non_manifold) + { + CGAL_assertion_code(const auto& f = icit->first); + CGAL_assertion(is_infinite(f, tr)); + + CGAL_assertion(adjacent_cells.size() % 2 == 0); + success = false; + } + } + return success; +} + +template +bool build_triangulation_impl(Tr& tr, + const PointRange& points, + const CellRange& finite_cells, + const std::vector& subdomains, + const FacetPatchMap& border_facets, + std::vector& vertex_handle_vector, + const bool verbose,// = false, + const bool replace_domain_0,// = false, + const bool allow_non_manifold) // = false +{ + if (verbose) + std::cout << "build_triangulation_impl()..." << std::endl; + + typedef typename Tr::Vertex_handle Vertex_handle; + typedef typename Tr::Cell_handle Cell_handle; + typedef std::array Facet_vvv; + + // associate to a face the two (at most) incident tets and the id of the face in the cell + typedef std::pair Incident_cell; + typedef boost::unordered_map > Incident_cells_map; + + CGAL_precondition(!points.empty()); + + bool success = true; + Incident_cells_map incident_cells_map; + + // id to vertex_handle + // index 0 is for infinite vertex; 1 to n for points in `points` + vertex_handle_vector.resize(points.size() + 1); + + if(finite_cells.empty()) + { + if (verbose) + std::cout << "WARNING: No finite cells were provided. Only the points will be loaded." << std::endl; + } + + tr.tds().clear(); // not tr.clear() since it calls tr.init(), which we don't want + + build_vertices(tr, points, vertex_handle_vector); + for(Vertex_handle vh : vertex_handle_vector) + vh->set_dimension(-1); + + if(verbose) + std::cout << "build vertices done (" << tr.tds().number_of_vertices() << " vertices)" << std::endl; + + if (!finite_cells.empty()) + { + if (!CGAL::SMDS_3::build_finite_cells(tr, finite_cells, subdomains, vertex_handle_vector, + incident_cells_map, border_facets, verbose, replace_domain_0)) + { + if (verbose) + std::cerr << "Error: build_finite_cells went wrong!" << std::endl; + success = false; + } + else if(verbose) + { + std::cout << "build finite cells done (" << tr.tds().cells().size() << " cells)" << std::endl; + } + + if (!CGAL::SMDS_3::build_infinite_cells(tr, incident_cells_map, verbose, allow_non_manifold)) + { + if(verbose) + std::cerr << "Error: build_infinite_cells went wrong!" << std::endl; + success = false; + } + else if(verbose) + { + std::cout << "build infinite cells done (" << tr.tds().cells().size() << " cells)" << std::endl; + } + + tr.tds().set_dimension(3); + + if (!CGAL::SMDS_3::assign_neighbors(tr, incident_cells_map, allow_non_manifold)) + { + if(verbose) + std::cerr << "Error: assign_neighbors went wrong!" << std::endl; + success = false; + } + else if(verbose) + { + std::cout << "assign neighbors done" << std::endl; + } + + if (verbose) + { + std::cout << "built triangulation!" << std::endl; + } + } + + // disabled because the TDS is not valid when cells do not cover the convex hull of vertices + // return tr.tds().is_valid(); + + return success; + +} + +template +bool build_triangulation_one_subdomain(Tr& tr, + const PointRange& points, + const CellRange& finite_cells, + const typename Tr::Cell::Subdomain_index& subdomain, + const FacetPatchMap& border_facets, + std::vector& vertex_handle_vector, + const bool verbose,// = false, + const bool replace_domain_0,// = false + const bool allow_non_manifold)// = false +{ + std::vector subdomains(finite_cells.size(), subdomain); + return build_triangulation_impl(tr, points, finite_cells, subdomains, + border_facets, vertex_handle_vector, + verbose, replace_domain_0, + allow_non_manifold); +} + +template +bool build_triangulation_one_subdomain(Tr& tr, + const PointRange& points, + const CellRange& finite_cells, + const typename Tr::Cell::Subdomain_index& subdomain, + const FacetPatchMap& border_facets, + const bool verbose,// = false, + const bool replace_domain_0,// = false + const bool allow_non_manifold)//= false +{ + std::vector subdomains(finite_cells.size(), subdomain); + std::vector vertex_handle_vector; + return build_triangulation_impl(tr, points, finite_cells, subdomains, + border_facets, vertex_handle_vector, + verbose, replace_domain_0, + allow_non_manifold); +} + +template +bool build_triangulation_with_subdomains_range(Tr& tr, + const PointRange& points, + const CellRange& finite_cells, + const SubdomainsRange& subdomains, + const FacetPatchMap& border_facets, + const bool verbose,// = false + const bool replace_domain_0,// = false, + const bool allow_non_manifold) +{ + std::vector vertex_handle_vector; + std::vector subdomains_vector( + subdomains.begin(), subdomains.end()); + return build_triangulation_impl(tr, points, finite_cells, subdomains_vector, border_facets, + vertex_handle_vector, + verbose, replace_domain_0, + allow_non_manifold); +} + +template +bool build_triangulation_from_file(std::istream& is, + Tr& tr, + const bool verbose, + const bool replace_domain_0, + const bool allow_non_manifold) +{ + using Point_3 = typename Tr::Point; + using Subdomain_index = typename Tr::Cell::Subdomain_index; + + using Facet = std::array; // 3 = id + using Tet_with_ref = std::array; // 4 = id + + if(!is) + return false; + + std::vector finite_cells; + std::vector subdomains; + std::vector points; + boost::unordered_map border_facets; + + int dim; + int nv, nf, ntet, ref; + std::string word; + + is >> word >> dim; // MeshVersionFormatted 1 + is >> word >> dim; // Dimension 3 + + CGAL_assertion(dim == 3); + + if(verbose) + { + std::cout << "Reading .mesh file..." << std::endl; + std::cout << "Replace domain #0 = " << replace_domain_0 << std::endl; + std::cout << "Allow non-manifoldness = " << allow_non_manifold << std::endl; + } + + bool is_CGAL_mesh = false; + + while(is >> word && word != "End") + { + if (word.at(0) == '#') + { + is >> word; + if (word == "End") + { + break; + } + else if (word == "CGAL::Mesh_complex_3_in_triangulation_3") + { + is_CGAL_mesh = true; // with CGAL meshes, domain 0 should be kept + continue; + } + //else skip other comments + } + + if(word == "Vertices") + { + is >> nv; + for(int i=0; i> x >> y >> z >> ref)) + { + if(verbose) + std::cerr << "Issue while reading vertices" << std::endl; + return false; + } + points.emplace_back(x,y,z); + } + } + + if(word == "Triangles") + { + is >> nf; + for(int i=0; i> n[0] >> n[1] >> n[2] >> surface_patch_id)) + { + if(verbose) + std::cerr << "Issue while reading triangles" << std::endl; + return false; + } + + Facet facet; + facet[0] = n[0] - 1; + facet[1] = n[1] - 1; + facet[2] = n[2] - 1; + + if(verbose) + std::cout << "Looking at face #" << i << ": " << n[0] << " " << n[1] << " " << n[2] << std::endl; + + CGAL_warning_code( + for(int j=0; j<3; ++j) + for(int k=0; k<3; ++k) + if(j != k) + CGAL_warning(n[j] != n[k]); + ) + + // find the circular permutation that puts the smallest index in the first place. + int n0 = (std::min)({facet[0],facet[1], facet[2]}); + do + { + std::rotate(std::begin(facet), std::next(std::begin(facet)), std::end(facet)); + } + while(facet[0] != n0); + + border_facets.emplace(facet, surface_patch_id); + } + } + + if(word == "Tetrahedra") + { + is >> ntet; + for(int i=0; i> n[0] >> n[1] >> n[2] >> n[3] >> reference)) + { + if(verbose) + std::cerr << "Issue while reading tetrahedra" << std::endl; + return false; + } + + if(verbose) + std::cout << "Looking at tet #" << i << ": " << n[0] << " " << n[1] << " " << n[2] << " " << n[3] << std::endl; + + CGAL_warning_code( + for(int j=0; j<4; ++j) + for(int k=0; k<4; ++k) + if(j != k) + CGAL_warning(n[j] != n[k]); + ) + + Tet_with_ref t; + t[0] = n[0] - 1; + t[1] = n[1] - 1; + t[2] = n[2] - 1; + t[3] = n[3] - 1; + + finite_cells.push_back(t); + subdomains.push_back(reference); + } + } + } + + if (verbose) + { + std::cout << points.size() << " points" << std::endl; + std::cout << border_facets.size() << " border facets" << std::endl; + std::cout << finite_cells.size() << " cells" << std::endl; + } + + if(finite_cells.empty()) + return false; + + CGAL_assertion(finite_cells.size() == subdomains.size()); + + return build_triangulation_with_subdomains_range(tr, + points, finite_cells, subdomains, border_facets, + verbose, + replace_domain_0 && !is_CGAL_mesh, + allow_non_manifold); +} + +} // namespace SMDS_3 +} // namespace CGAL + +#endif // CGAL_SMDS_3_TET_SOUP_TO_C3T3_H diff --git a/thirdparty/CGAL/include/CGAL/SMDS_3/utilities.h b/thirdparty/CGAL/include/CGAL/SMDS_3/utilities.h new file mode 100644 index 00000000..3b043137 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/SMDS_3/utilities.h @@ -0,0 +1,121 @@ +// Copyright (c) 2009 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/SMDS_3/utilities.h $ +// $Id: include/CGAL/SMDS_3/utilities.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Stephane Tayeb +// +//****************************************************************************** +// File Description : +//****************************************************************************** + +#ifndef CGAL_SMDS_3_UTILITIES_H +#define CGAL_SMDS_3_UTILITIES_H + +#include + +#include +#include +#include +#include + +namespace CGAL { +namespace SMDS_3 { +namespace internal { + +struct Debug_messages_tools { + template + static std::string disp_vert(Vertex_handle v, Tag_true) { + std::stringstream ss; + ss.precision(17); + ss << (void*)(&*v) << "[ts=" << v->time_stamp() << "]" + << "(" << v->point() <<")"; + return ss.str(); + } + + template + static std::string disp_vert(Vertex_handle v, Tag_false) { + std::stringstream ss; + ss.precision(17); + ss << (void*)(&*v) << "(" << v->point() <<")"; + return ss.str(); + } + + template + static std::string disp_vert(Vertex_handle v) + { + typedef typename std::iterator_traits::value_type Vertex; + return disp_vert(v, CGAL::internal::Has_timestamp()); + } +}; + +/** + * @class First_of + * Function object which returns the first element of a pair + */ +template +struct First_of : + public CGAL::cpp98::unary_function +{ + typedef CGAL::cpp98::unary_function Base; + typedef typename Base::result_type result_type; + typedef typename Base::argument_type argument_type; + + result_type operator()(const argument_type& p) const { return p.first; } +}; // end class First_of + + +/** + * @class Ordered_pair + * Stores two elements in an ordered manner, i.e. first() < second() + */ +template +class Ordered_pair +{ +public: + Ordered_pair(const T& t1, const T& t2) + : data_(t1,t2) + { + if ( ! (t1 < t2) ) + { + data_.second = t1; + data_.first = t2; + } + } + + const T& first() const { return data_.first; } + const T& second() const { return data_.second; } + + bool operator<(const Ordered_pair& rhs) const { return data_ < rhs.data_; } + +private: + std::pair data_; +}; + + +/** + * @class Iterator_not_in_complex + * @brief A class to filter elements which do not belong to the complex + */ +template < typename C3T3 > +class Iterator_not_in_complex +{ + const C3T3& c3t3_; +public: + Iterator_not_in_complex(const C3T3& c3t3) : c3t3_(c3t3) { } + + template + bool operator()(Iterator it) const { return ! c3t3_.is_in_complex(*it); } +}; // end class Iterator_not_in_complex + + +} // end namespace internal +} // end namespace SMDS_3 +} //namespace CGAL + +#endif // CGAL_SMDS_3_UTILITIES_H diff --git a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/Has_features.h b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/Has_features.h new file mode 100644 index 00000000..f3d3922b --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/Has_features.h @@ -0,0 +1,41 @@ +// Copyright (c) 2009 INRIA Sophia-Antipolis (France). +// Copyright (c) 2011 GeometryFactory Sarl (France) +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/STL_Extension/internal/Has_features.h $ +// $Id: include/CGAL/STL_Extension/internal/Has_features.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Stéphane Tayeb, Laurent Rineau + +#ifndef CGAL_HAS_FEATURES_H +#define CGAL_HAS_FEATURES_H + +#include +#include + +namespace CGAL { +namespace internal { + + // A type has_Has_features to check if type 'Has_features' is a nested + // type of any class + BOOST_MPL_HAS_XXX_TRAIT_DEF(Has_features) + + template ::value> + struct Has_features : + public CGAL::Boolean_tag + // when Mesh_domain has the nested type Has_features + {}; + + template + struct Has_features : public CGAL::Tag_false + // when Mesh_domain does not have the nested type Has_features + {}; + +} // end namespace internal +} // end namespace CGAL + +#endif // CGAL_MESH_3_HAS_FEATURES_H diff --git a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/Has_member_visited.h b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/Has_member_visited.h index f325ba66..67405b85 100644 --- a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/Has_member_visited.h +++ b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/Has_member_visited.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/STL_Extension/internal/Has_member_visited.h $ -// $Id: Has_member_visited.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/STL_Extension/internal/Has_member_visited.h $ +// $Id: include/CGAL/STL_Extension/internal/Has_member_visited.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/Has_nested_type_Bare_point.h b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/Has_nested_type_Bare_point.h index 000f3531..491e3f55 100644 --- a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/Has_nested_type_Bare_point.h +++ b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/Has_nested_type_Bare_point.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/STL_Extension/internal/Has_nested_type_Bare_point.h $ -// $Id: Has_nested_type_Bare_point.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/STL_Extension/internal/Has_nested_type_Bare_point.h $ +// $Id: include/CGAL/STL_Extension/internal/Has_nested_type_Bare_point.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jane Tournois diff --git a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/array_binary_tree.hpp b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/array_binary_tree.hpp index 0f870f0c..1be08720 100644 --- a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/array_binary_tree.hpp +++ b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/array_binary_tree.hpp @@ -8,8 +8,8 @@ // https://www.boost.org/LICENSE_1_0.txt) //======================================================================= // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/STL_Extension/internal/boost/array_binary_tree.hpp $ -// $Id: array_binary_tree.hpp a93dda8 2021-09-10T17:43:47+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/STL_Extension/internal/boost/array_binary_tree.hpp $ +// $Id: include/CGAL/STL_Extension/internal/boost/array_binary_tree.hpp a484bfa $ // SPDX-License-Identifier: BSL-1.0 // // NOTE: this file have been taken from boost 1.46.1 for using diff --git a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/mutable_heap.hpp b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/mutable_heap.hpp index 9bc002e6..5123f395 100644 --- a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/mutable_heap.hpp +++ b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/mutable_heap.hpp @@ -8,8 +8,8 @@ // https://www.boost.org/LICENSE_1_0.txt) //======================================================================= // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/STL_Extension/internal/boost/mutable_heap.hpp $ -// $Id: mutable_heap.hpp 4ea7b65 2021-08-26T11:42:01+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/STL_Extension/internal/boost/mutable_heap.hpp $ +// $Id: include/CGAL/STL_Extension/internal/boost/mutable_heap.hpp a484bfa $ // SPDX-License-Identifier: BSL-1.0 // // NOTE: this file have been taken from boost 1.46.1 for using diff --git a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/mutable_queue.hpp b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/mutable_queue.hpp index 7855c7c8..e82ff8e8 100644 --- a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/mutable_queue.hpp +++ b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/mutable_queue.hpp @@ -8,8 +8,8 @@ // https://www.boost.org/LICENSE_1_0.txt) //======================================================================= // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/STL_Extension/internal/boost/mutable_queue.hpp $ -// $Id: mutable_queue.hpp e674e5f 2021-11-30T14:16:30+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/STL_Extension/internal/boost/mutable_queue.hpp $ +// $Id: include/CGAL/STL_Extension/internal/boost/mutable_queue.hpp a484bfa $ // SPDX-License-Identifier: BSL-1.0 // // NOTE: this file have been taken from boost 1.46.1 for using diff --git a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/relaxed_heap.hpp b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/relaxed_heap.hpp index 6a4f03e2..7ca61a6d 100644 --- a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/relaxed_heap.hpp +++ b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/boost/relaxed_heap.hpp @@ -3,14 +3,14 @@ // Copyright 2004 The Trustees of Indiana University. // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) +// https://www.boost.org/LICENSE_1_0.txt) // // Authors: Douglas Gregor // Andrew Lumsdaine //======================================================================= // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/STL_Extension/internal/boost/relaxed_heap.hpp $ -// $Id: relaxed_heap.hpp 4143d14 2022-08-16T17:23:07+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/STL_Extension/internal/boost/relaxed_heap.hpp $ +// $Id: include/CGAL/STL_Extension/internal/boost/relaxed_heap.hpp a484bfa $ // SPDX-License-Identifier: BSL-1.0 // // NOTE: this file has been taken from boost 1.77 to use @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include // for CHAR_BIT #include @@ -79,13 +79,13 @@ class relaxed_heap /** The value associated with this group. This value is only valid * when @c kind!=largest_key (which indicates a deleted - * element). Note that the use of boost::optional increases the + * element). Note that the use of std::optional increases the * memory requirements slightly but does not result in extraneous * memory allocations or deallocations. The optional could be * eliminated when @c value_type is a model of * DefaultConstructible. */ - ::boost::optional< value_type > value; + ::std::optional< value_type > value; /** * The kind of key stored at this group. This may be @c @@ -205,14 +205,14 @@ class relaxed_heap value_type& top() { find_smallest(); - CGAL_assertion(smallest_value->value != boost::none); + CGAL_assertion(smallest_value->value != std::nullopt); return *smallest_value->value; } const value_type& top() const { find_smallest(); - CGAL_assertion(smallest_value->value != boost::none); + CGAL_assertion(smallest_value->value != std::nullopt); return *smallest_value->value; } @@ -238,7 +238,7 @@ class relaxed_heap rank_type r = x->rank; group* p = x->parent; { - CGAL_assertion(x->value != boost::none); + CGAL_assertion(x->value != std::nullopt); // Find x's group size_type start = get(id, *x->value) - get(id, *x->value) % log_n; @@ -727,7 +727,7 @@ class relaxed_heap * are each log_n long, with the last group potentially being * smaller. */ - std::vector< ::boost::optional< value_type > > groups; + std::vector< ::std::optional< value_type > > groups; /** The list of active groups, indexed by rank. When A[r] is null, * there is no active group of rank r. Otherwise, A[r] is the active diff --git a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/info_check.h b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/info_check.h index f4d4bebf..48339051 100644 --- a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/info_check.h +++ b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/info_check.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/STL_Extension/internal/info_check.h $ -// $Id: info_check.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/STL_Extension/internal/info_check.h $ +// $Id: include/CGAL/STL_Extension/internal/info_check.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/mesh_option_classes.h b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/mesh_option_classes.h new file mode 100644 index 00000000..7a59328e --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/mesh_option_classes.h @@ -0,0 +1,236 @@ +// Copyright (c) 2009 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/STL_Extension/internal/mesh_option_classes.h $ +// $Id: include/CGAL/STL_Extension/internal/mesh_option_classes.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// + +#ifndef CGAL_MESH_OPTION_CLASSES_H +#define CGAL_MESH_OPTION_CLASSES_H + +#include + +namespace CGAL { + +enum Mesh_error_code { + CGAL_MESH_3_NO_ERROR = 0, + CGAL_MESH_3_MAXIMAL_NUMBER_OF_VERTICES_REACHED, + CGAL_MESH_3_STOPPED +}; + +namespace parameters { + +namespace internal { + +const int undef_parameter = -1; + +// Helpers +struct Optimization_options_base +{ + Optimization_options_base(bool b) + : b_(b), time_limit_(undef_parameter), bound_(undef_parameter) {} + + operator bool() const { return b_; } + + bool is_time_limit_set() const { return time_limit_ != undef_parameter; } + void set_time_limit(double d) { time_limit_ = d; } + double time_limit() const { return time_limit_; } + + bool is_bound_set() const { return bound_ != undef_parameter; } + void set_bound(double d) { bound_ = d; } + double bound() const { return bound_; } + +private: + bool b_; + double time_limit_; + double bound_; +}; + +struct Global_optimization_options_base +{ + Global_optimization_options_base() + : convergence_(undef_parameter), max_it_nb_(undef_parameter) {} + + bool is_convergence_set() const { return convergence_ != undef_parameter; } + void set_convergence(double d) { convergence_ = d; } + double convergence() const { return convergence_; } + + bool is_max_iteration_number_set() const { return max_it_nb_ != std::size_t(undef_parameter); } + void set_max_iteration_number(std::size_t i) { max_it_nb_ = i; } + std::size_t max_iteration_number() const { return max_it_nb_; } + +private: + double convergence_; + std::size_t max_it_nb_; +}; + +// Perturb +struct Perturb_options : public Optimization_options_base +{ + Perturb_options(bool b) : Optimization_options_base(b) {} +}; + +// Exude +struct Exude_options : public Optimization_options_base +{ + Exude_options(bool b) : Optimization_options_base(b) {} +}; + +// Odt +struct Odt_options : public Optimization_options_base +, public Global_optimization_options_base +{ + Odt_options(bool b) : Optimization_options_base(b) + , Global_optimization_options_base() {} +}; + +// Lloyd +struct Lloyd_options : public Optimization_options_base +, public Global_optimization_options_base +{ + Lloyd_options(bool b) : Optimization_options_base(b) + , Global_optimization_options_base() {} +}; + +// Manifold +struct Manifold_options { + enum { + NON_MANIFOLD = 0, + MANIFOLD_WITH_BOUNDARY = 8, + NO_BOUNDARY = 16, + MANIFOLD = 24 + }; + + Manifold_options(const int topology) + : mesh_topology(topology) + {} + Manifold_options() + : mesh_topology(NON_MANIFOLD) + {} + + int mesh_topology; +}; + +// Various Mesh_3 option +struct Mesh_3_options { +#ifndef CGAL_NO_ATOMIC + typedef std::atomic* Pointer_to_stop_atomic_boolean_t; +#else + typedef bool* Pointer_to_stop_atomic_boolean_t; +#endif + Mesh_3_options(bool nonlinear = false) + // This parameter `nonlinear` adds a compatibility with previous + // API of the constructor of `C3t3_initializer`. + // -- Laurent Rineau, 2019/05/03 + : dump_after_init_prefix() + , dump_after_refine_surface_prefix() + , dump_after_refine_prefix() + , dump_after_glob_opt_prefix() + , dump_after_perturb_prefix() + , dump_after_exude_prefix() + , number_of_initial_points(-1) + , nonlinear_growth_of_balls(nonlinear) + , maximal_number_of_vertices(0) + , pointer_to_error_code(0) +#ifndef CGAL_NO_ATOMIC + , pointer_to_stop_atomic_boolean(0) +#endif + {} + + std::string dump_after_init_prefix; + std::string dump_after_refine_surface_prefix; + std::string dump_after_refine_prefix; + std::string dump_after_glob_opt_prefix; + std::string dump_after_perturb_prefix; + std::string dump_after_exude_prefix; + int number_of_initial_points; + bool nonlinear_growth_of_balls; + std::size_t maximal_number_of_vertices; + Mesh_error_code* pointer_to_error_code; +#ifndef CGAL_NO_ATOMIC + Pointer_to_stop_atomic_boolean_t pointer_to_stop_atomic_boolean; +#endif + +}; // end struct Mesh_3_options + +// Features +struct Features_options +{ + Features_options(bool b) : b_(b) {} + bool features() const { return b_; } +private: + bool b_; +}; + +// ----------------------------------- +// Features generator +// ----------------------------------- +// struct Features_option_generator +template +struct Features_options_generator {}; + +template<> +struct Features_options_generator +{ + Features_options operator()() { return Features_options(true); } +}; + +template<> +struct Features_options_generator +{ + Features_options operator()() { return Features_options(false); } +}; + +// struct Domain_features_generator is designed to handle cases where +// MeshDomain::Has_features is not a valid type +template< typename MeshDomain, bool MeshDomainHasHasFeatures > +struct Domain_features_generator {}; + +template< typename MeshDomain > +struct Domain_features_generator< MeshDomain, false > +{ + Features_options operator()() + { + return Features_options_generator()(); + } +}; + +template< typename MeshDomain > +struct Domain_features_generator< MeshDomain, true > +{ + Features_options operator()() + { + return Features_options_generator()(); + } +}; + +} // end namespace internal + + +namespace default_values_for_mesh_3 { + +const double time_limit = 0.; + +// exude_mesh_3 +const double exude_sliver_bound = 0.; + +// perturb_mesh_3 +const double perturb_sliver_bound = 0.; + +// lloyd_optimize_mesh_3 +const double lloyd_freeze_ratio = 0.01; +const double lloyd_convergence_ratio = 0.02; + +// odt_optimize_mesh_3 +const double odt_freeze_ratio = 0.01; +const double odt_convergence_ratio = 0.02; + +// global optimizers +const bool do_freeze = true; + +} } } //namespace CGAL::parameters::def + +#endif diff --git a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/mesh_parameters_interface.h b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/mesh_parameters_interface.h new file mode 100644 index 00000000..03a938f0 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/mesh_parameters_interface.h @@ -0,0 +1,370 @@ +// Copyright (c) 2017 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/STL_Extension/internal/mesh_parameters_interface.h $ +// $Id: include/CGAL/STL_Extension/internal/mesh_parameters_interface.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// + +// List of named parameters special functions used in meshing packages of CGAL +// no guard on purpose as they are injected both in the parameter namespace +// and the Named_function_parameters class. + + +// ----------------------------------- +// Reset_c3t3 (undocumented) +// ----------------------------------- +inline +Named_function_parameters +reset_c3t3() +{ + typedef Named_function_parameters Param; + return CGAL_NP_BUILD(Param, true); +} + +inline +Named_function_parameters +no_reset_c3t3() +{ + typedef Named_function_parameters Param; + return CGAL_NP_BUILD(Param, false); +} + +// ----------------------------------- +// Perturb +// ----------------------------------- +template +Named_function_parameters<::CGAL::parameters::internal::Perturb_options, ::CGAL::internal_np::perturb_options_param_t, CGAL_NP_BASE> +perturb(const CGAL_NP_CLASS& np = parameters::default_values()) +{ + using ::CGAL::parameters::choose_parameter; + using ::CGAL::parameters::get_parameter; + double time_limit = choose_parameter(get_parameter(np,::CGAL::internal_np::maximum_running_time),::CGAL::parameters::internal::undef_parameter); + double sliver_bound = choose_parameter(get_parameter(np,::CGAL::internal_np::lower_sliver_bound),::CGAL::parameters::default_values_for_mesh_3::perturb_sliver_bound); + + ::CGAL::parameters::internal::Perturb_options options(true); + + if ( ::CGAL::parameters::internal::undef_parameter != time_limit) + options.set_time_limit(time_limit); + + options.set_bound(sliver_bound); + typedef Named_function_parameters<::CGAL::parameters::internal::Perturb_options, ::CGAL::internal_np::perturb_options_param_t, CGAL_NP_BASE> Param; + return CGAL_NP_BUILD(Param, options); +} + +template +Named_function_parameters<::CGAL::parameters::internal::Perturb_options, ::CGAL::internal_np::perturb_options_param_t, CGAL_NP_BASE> +perturb(const CGAL_NP_CLASS_1& np1, const CGAL_NP_CLASS_2& np2, const NP& ... nps) +{ + return perturb(::CGAL::internal_np::combine_named_parameters(np1, np2, nps...)); +} + + +inline Named_function_parameters<::CGAL::parameters::internal::Perturb_options, ::CGAL::internal_np::perturb_options_param_t, CGAL_NP_BASE> +no_perturb() +{ + typedef Named_function_parameters<::CGAL::parameters::internal::Perturb_options, ::CGAL::internal_np::perturb_options_param_t, CGAL_NP_BASE> Param; + return CGAL_NP_BUILD(Param,::CGAL::parameters::internal::Perturb_options(false)); +} + +#ifndef CGAL_NO_DEPRECATED_CODE +CGAL_DEPRECATED +inline +Named_function_parameters<::CGAL::parameters::internal::Perturb_options, ::CGAL::internal_np::perturb_options_param_t, CGAL_NP_BASE> +perturb(double time_limit_, + double sliver_bound_=0) +{ + return perturb(time_limit(time_limit_). + sliver_bound(sliver_bound_)); +} +#endif + +// ----------------------------------- +// Exude +// ----------------------------------- +template +Named_function_parameters<::CGAL::parameters::internal::Exude_options, ::CGAL::internal_np::exude_options_param_t, CGAL_NP_BASE> +exude(const CGAL_NP_CLASS& np = parameters::default_values()) +{ + using ::CGAL::parameters::choose_parameter; + using ::CGAL::parameters::get_parameter; + double time_limit = choose_parameter(get_parameter(np,::CGAL::internal_np::maximum_running_time),::CGAL::parameters::internal::undef_parameter); + double sliver_bound = choose_parameter(get_parameter(np,::CGAL::internal_np::lower_sliver_bound),::CGAL::parameters::default_values_for_mesh_3::exude_sliver_bound); + + ::CGAL::parameters::internal::Exude_options options(true); + + if ( ::CGAL::parameters::internal::undef_parameter != time_limit) + options.set_time_limit(time_limit); + options.set_bound(sliver_bound); + typedef Named_function_parameters<::CGAL::parameters::internal::Exude_options, ::CGAL::internal_np::exude_options_param_t, CGAL_NP_BASE> Param; + + return CGAL_NP_BUILD(Param, options); +} + +template +Named_function_parameters<::CGAL::parameters::internal::Exude_options, ::CGAL::internal_np::exude_options_param_t, CGAL_NP_BASE> +exude(const CGAL_NP_CLASS_1& np1, const CGAL_NP_CLASS_2& np2, const NP& ... nps) +{ + return exude(::CGAL::internal_np::combine_named_parameters(np1, np2, nps...)); +} + +inline Named_function_parameters<::CGAL::parameters::internal::Exude_options, ::CGAL::internal_np::exude_options_param_t, CGAL_NP_BASE> +no_exude() +{ + typedef Named_function_parameters<::CGAL::parameters::internal::Exude_options, ::CGAL::internal_np::exude_options_param_t, CGAL_NP_BASE> Param; + return CGAL_NP_BUILD(Param,::CGAL::parameters::internal::Exude_options(false)); +} + +#ifndef CGAL_NO_DEPRECATED_CODE +CGAL_DEPRECATED +inline +Named_function_parameters<::CGAL::parameters::internal::Exude_options, ::CGAL::internal_np::exude_options_param_t, CGAL_NP_BASE> +exude(double time_limit_, + double sliver_bound_ = 0) +{ + return exude(time_limit(time_limit_).sliver_bound(sliver_bound_)); +} +#endif + +// ----------------------------------- +// Odt +// ----------------------------------- +template +Named_function_parameters<::CGAL::parameters::internal::Odt_options, ::CGAL::internal_np::odt_options_param_t, CGAL_NP_BASE> +odt(const CGAL_NP_CLASS& np = parameters::default_values()) +{ + using ::CGAL::parameters::choose_parameter; + using ::CGAL::parameters::get_parameter; + double time_limit = choose_parameter(get_parameter(np,::CGAL::internal_np::maximum_running_time),0); + double freeze_bound = choose_parameter(get_parameter(np,::CGAL::internal_np::vertex_freeze_bound),::CGAL::parameters::default_values_for_mesh_3::odt_freeze_ratio); + double convergence = choose_parameter(get_parameter(np,::CGAL::internal_np::convergence_ratio), ::CGAL::parameters::default_values_for_mesh_3::odt_convergence_ratio); + std::size_t max_iteration_number = choose_parameter(get_parameter(np,::CGAL::internal_np::number_of_iterations), 0); + ::CGAL::parameters::internal::Odt_options options(true); + + options.set_time_limit(time_limit); + options.set_bound(freeze_bound); + options.set_convergence(convergence); + options.set_max_iteration_number(max_iteration_number); + typedef Named_function_parameters<::CGAL::parameters::internal::Odt_options, ::CGAL::internal_np::odt_options_param_t, CGAL_NP_BASE> Param; + return CGAL_NP_BUILD(Param,options); +} + +template +Named_function_parameters<::CGAL::parameters::internal::Odt_options, ::CGAL::internal_np::odt_options_param_t, CGAL_NP_BASE> +odt(const CGAL_NP_CLASS& ... nps) +{ + return odt(::CGAL::internal_np::combine_named_parameters(nps...)); +} + +inline Named_function_parameters<::CGAL::parameters::internal::Odt_options, ::CGAL::internal_np::odt_options_param_t, CGAL_NP_BASE> +no_odt() +{ + typedef Named_function_parameters<::CGAL::parameters::internal::Odt_options, ::CGAL::internal_np::odt_options_param_t, CGAL_NP_BASE> Param; + return CGAL_NP_BUILD(Param,::CGAL::parameters::internal::Odt_options(false)); +} + +#ifndef CGAL_NO_DEPRECATED_CODE +CGAL_DEPRECATED +inline +Named_function_parameters<::CGAL::parameters::internal::Odt_options, ::CGAL::internal_np::odt_options_param_t, CGAL_NP_BASE> +odt(double time_limit_, + std::size_t max_iteration_number_ = 0, + double convergence_ = 0.02, + double freeze_bound_ = 0.01, + bool do_freeze_ = true) +{ + return odt(time_limit(time_limit_). + max_iteration_number(max_iteration_number_). + convergence(convergence_). + freeze_bound(freeze_bound_). + do_freeze(do_freeze_)); +} +#endif + +// ----------------------------------- +// Lloyd +// ----------------------------------- +template +Named_function_parameters<::CGAL::parameters::internal::Lloyd_options, ::CGAL::internal_np::lloyd_options_param_t, CGAL_NP_BASE> +lloyd(const CGAL_NP_CLASS& np = parameters::default_values()) +{ + using ::CGAL::parameters::choose_parameter; + using ::CGAL::parameters::get_parameter; + double time_limit = choose_parameter(get_parameter(np,::CGAL::internal_np::maximum_running_time),0); + double freeze_bound = choose_parameter(get_parameter(np,::CGAL::internal_np::vertex_freeze_bound),::CGAL::parameters::default_values_for_mesh_3::lloyd_freeze_ratio); + double convergence = choose_parameter(get_parameter(np,::CGAL::internal_np::convergence_ratio), ::CGAL::parameters::default_values_for_mesh_3::lloyd_convergence_ratio); + std::size_t max_iteration_number = choose_parameter(get_parameter(np,::CGAL::internal_np::number_of_iterations), 0); + ::CGAL::parameters::internal::Lloyd_options options(true); + + options.set_time_limit(time_limit); + options.set_bound(freeze_bound); + options.set_convergence(convergence); + options.set_max_iteration_number(max_iteration_number); + + typedef Named_function_parameters<::CGAL::parameters::internal::Lloyd_options, ::CGAL::internal_np::lloyd_options_param_t, CGAL_NP_BASE> Param; + return CGAL_NP_BUILD(Param, options); +} + +template +Named_function_parameters<::CGAL::parameters::internal::Lloyd_options, ::CGAL::internal_np::lloyd_options_param_t, CGAL_NP_BASE> +lloyd(const CGAL_NP_CLASS& ... nps) +{ + return lloyd(::CGAL::internal_np::combine_named_parameters(nps...)); +} + +inline Named_function_parameters<::CGAL::parameters::internal::Lloyd_options, ::CGAL::internal_np::lloyd_options_param_t, CGAL_NP_BASE> +no_lloyd() +{ + typedef Named_function_parameters<::CGAL::parameters::internal::Lloyd_options, ::CGAL::internal_np::lloyd_options_param_t, CGAL_NP_BASE> Param; + return CGAL_NP_BUILD(Param, ::CGAL::parameters::internal::Lloyd_options(false)); +} + +#ifndef CGAL_NO_DEPRECATED_CODE +CGAL_DEPRECATED +inline +Named_function_parameters<::CGAL::parameters::internal::Lloyd_options, ::CGAL::internal_np::lloyd_options_param_t, CGAL_NP_BASE> +lloyd(double time_limit_, + std::size_t max_iteration_number_ = 0, + double convergence_ = 0.02, + double freeze_bound_ = 0.01, + bool do_freeze_= true) +{ + return lloyd(time_limit(time_limit_). + max_iteration_number(max_iteration_number_). + convergence(convergence_). + freeze_bound(freeze_bound_). + do_freeze(do_freeze_)); +} +#endif + +// ----------------------------------- +// Manifold options +// ----------------------------------- +template +Named_function_parameters<::CGAL::parameters::internal::Manifold_options, ::CGAL::internal_np::manifold_param_t, CGAL_NP_BASE> +manifold_options(const CGAL_NP_CLASS& np = parameters::default_values()) +{ + using ::CGAL::parameters::choose_parameter; + using ::CGAL::parameters::get_parameter; + int mesh_topology = choose_parameter(get_parameter(np, ::CGAL::internal_np::mesh_topology_number), -1); + ::CGAL::parameters::internal::Manifold_options options; + options.mesh_topology = mesh_topology; + + typedef Named_function_parameters<::CGAL::parameters::internal::Manifold_options, ::CGAL::internal_np::manifold_param_t, CGAL_NP_BASE> Param; + return CGAL_NP_BUILD(Param, options); +} + + +template +Named_function_parameters<::CGAL::parameters::internal::Manifold_options, ::CGAL::internal_np::manifold_param_t, CGAL_NP_BASE> +manifold_options(const CGAL_NP_CLASS& ... nps) +{ + return manifold_options(::CGAL::internal_np::combine_named_parameters(nps...)); +} + +inline Named_function_parameters<::CGAL::parameters::internal::Manifold_options, ::CGAL::internal_np::manifold_param_t, CGAL_NP_BASE> +manifold() +{ + typedef Named_function_parameters<::CGAL::parameters::internal::Manifold_options, ::CGAL::internal_np::manifold_param_t, CGAL_NP_BASE> Param; + return CGAL_NP_BUILD(Param, ::CGAL::parameters::internal::Manifold_options(::CGAL::parameters::internal::Manifold_options::MANIFOLD)); +} +inline Named_function_parameters<::CGAL::parameters::internal::Manifold_options, ::CGAL::internal_np::manifold_param_t, CGAL_NP_BASE> +manifold_with_boundary() +{ + typedef Named_function_parameters<::CGAL::parameters::internal::Manifold_options, ::CGAL::internal_np::manifold_param_t, CGAL_NP_BASE> Param; + return CGAL_NP_BUILD(Param,::CGAL::parameters::internal::Manifold_options( + ::CGAL::parameters::internal::Manifold_options::MANIFOLD_WITH_BOUNDARY)); +} +inline Named_function_parameters<::CGAL::parameters::internal::Manifold_options, ::CGAL::internal_np::manifold_param_t, CGAL_NP_BASE> +non_manifold() +{ + typedef Named_function_parameters<::CGAL::parameters::internal::Manifold_options, ::CGAL::internal_np::manifold_param_t, CGAL_NP_BASE> Param; + return CGAL_NP_BUILD(Param, ::CGAL::parameters::internal::Manifold_options(::CGAL::parameters::internal::Manifold_options::NON_MANIFOLD)); +} + +// ----------------------------------- +// Mesh options +// ----------------------------------- + +// Undocumented parameter for refine_mesh_3 and make_mesh_3. +// Allows to dump the mesh at given stage of the mesh generation +// algorithm. +template +Named_function_parameters<::CGAL::parameters::internal::Mesh_3_options, ::CGAL::internal_np::mesh_param_t, CGAL_NP_BASE> +mesh_3_options(const CGAL_NP_CLASS& np = parameters::default_values()) +{ + using ::CGAL::parameters::choose_parameter; + using ::CGAL::parameters::get_parameter; + ::CGAL::parameters::internal::Mesh_3_options options; + + options.dump_after_init_prefix=choose_parameter(get_parameter(np, ::CGAL::internal_np::dump_after_init_prefix_param), ""); + options.dump_after_refine_surface_prefix=choose_parameter(get_parameter(np, ::CGAL::internal_np::dump_after_refine_surface_prefix_param), ""); + options.dump_after_refine_prefix=choose_parameter(get_parameter(np, ::CGAL::internal_np::dump_after_refine_prefix_param), ""); + options.dump_after_glob_opt_prefix=choose_parameter(get_parameter(np, ::CGAL::internal_np::dump_after_glob_opt_prefix_param), ""); + options.dump_after_perturb_prefix=choose_parameter(get_parameter(np, ::CGAL::internal_np::dump_after_perturb_prefix_param), ""); + options.dump_after_exude_prefix=choose_parameter(get_parameter(np, ::CGAL::internal_np::dump_after_exude_prefix_param), ""); + options.number_of_initial_points=choose_parameter(get_parameter(np, ::CGAL::internal_np::number_of_initial_points_param), -1); + options.nonlinear_growth_of_balls = choose_parameter(get_parameter(np, ::CGAL::internal_np::nonlinear_growth_of_balls_param), false); + options.maximal_number_of_vertices=choose_parameter(get_parameter(np, ::CGAL::internal_np::maximal_number_of_vertices_param), 0); + options.pointer_to_error_code=choose_parameter(get_parameter(np, ::CGAL::internal_np::pointer_to_error_code_param), ((Mesh_error_code*)0)); +#ifndef CGAL_NO_ATOMIC + options.pointer_to_stop_atomic_boolean=choose_parameter(get_parameter(np, ::CGAL::internal_np::pointer_to_stop_atomic_boolean_param), + ((::CGAL::parameters::internal::Mesh_3_options::Pointer_to_stop_atomic_boolean_t)0)); +#endif + + typedef Named_function_parameters<::CGAL::parameters::internal::Mesh_3_options, ::CGAL::internal_np::mesh_param_t, CGAL_NP_BASE> Param; + return CGAL_NP_BUILD(Param, options); +} + +template +Named_function_parameters<::CGAL::parameters::internal::Mesh_3_options, ::CGAL::internal_np::mesh_param_t, CGAL_NP_BASE> +mesh_3_options(const CGAL_NP_CLASS& ... nps) +{ + return mesh_3_options(::CGAL::internal_np::combine_named_parameters(nps...)); +} + +// Undocumented parameter for refine_mesh_3 and make_mesh_3. +// Default Mesh_3_options: dump at every stage of the mesh generation. +inline +Named_function_parameters<::CGAL::parameters::internal::Mesh_3_options, ::CGAL::internal_np::mesh_param_t, CGAL_NP_BASE> +mesh_3_dump() +{ + typedef Named_function_parameters<::CGAL::parameters::internal::Mesh_3_options, ::CGAL::internal_np::mesh_param_t, CGAL_NP_BASE> Param; + ::CGAL::parameters::internal::Mesh_3_options options; + + options.dump_after_init_prefix = "mesh_dump_after_init"; + options.dump_after_refine_surface_prefix = "mesh_dump_after_refine_surface"; + options.dump_after_refine_prefix = "mesh_dump_after_refine"; + options.dump_after_glob_opt_prefix = "mesh_dump_after_glob_opt"; + options.dump_after_perturb_prefix = "mesh_dump_after_perturb"; + options.dump_after_exude_prefix = "mesh_dump_after_exude"; + + return CGAL_NP_BUILD(Param, options); +} + +// ----------------------------------- +// Features_options +// ----------------------------------- +inline Named_function_parameters<::CGAL::parameters::internal::Features_options, ::CGAL::internal_np::features_option_param_t, CGAL_NP_BASE> +features() { + typedef Named_function_parameters<::CGAL::parameters::internal::Features_options, ::CGAL::internal_np::features_option_param_t, CGAL_NP_BASE> Param; + return CGAL_NP_BUILD(Param, ::CGAL::parameters::internal::Features_options(true)); +} + +inline Named_function_parameters<::CGAL::parameters::internal::Features_options, ::CGAL::internal_np::features_option_param_t, CGAL_NP_BASE> +no_features() { + typedef Named_function_parameters<::CGAL::parameters::internal::Features_options, ::CGAL::internal_np::features_option_param_t, CGAL_NP_BASE> Param; + return CGAL_NP_BUILD(Param, ::CGAL::parameters::internal::Features_options(false)); } + +template < typename MeshDomain > +inline Named_function_parameters<::CGAL::parameters::internal::Features_options, ::CGAL::internal_np::features_option_param_t, CGAL_NP_BASE> +features(const MeshDomain& /*domain*/) +{ + typedef typename ::CGAL::parameters::internal::Domain_features_generator::value > Generator; + + typedef Named_function_parameters<::CGAL::parameters::internal::Features_options, ::CGAL::internal_np::features_option_param_t, CGAL_NP_BASE> Param; + return CGAL_NP_BUILD(Param,Generator()()); +} diff --git a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/parameters_interface.h b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/parameters_interface.h index 51e455f6..ff88f27d 100644 --- a/thirdparty/CGAL/include/CGAL/STL_Extension/internal/parameters_interface.h +++ b/thirdparty/CGAL/include/CGAL/STL_Extension/internal/parameters_interface.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h $ -// $Id: parameters_interface.h f372bbe 2022-12-19T14:35:16+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h $ +// $Id: include/CGAL/STL_Extension/internal/parameters_interface.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -29,9 +29,16 @@ CGAL_add_named_parameter(metis_options_t, METIS_options, METIS_options) CGAL_add_named_parameter(vertex_partition_id_t, vertex_partition_id, vertex_partition_id_map) CGAL_add_named_parameter(face_partition_id_t, face_partition_id, face_partition_id_map) +CGAL_add_named_parameter(vertex_output_iterator_t, vertex_output_iterator, vertex_output_iterator) +CGAL_add_named_parameter(face_output_iterator_t, face_output_iterator, face_output_iterator) + CGAL_add_named_parameter(vertex_to_vertex_output_iterator_t, vertex_to_vertex_output_iterator, vertex_to_vertex_output_iterator) CGAL_add_named_parameter(halfedge_to_halfedge_output_iterator_t, halfedge_to_halfedge_output_iterator, halfedge_to_halfedge_output_iterator) CGAL_add_named_parameter(face_to_face_output_iterator_t, face_to_face_output_iterator, face_to_face_output_iterator) +CGAL_add_named_parameter(point_to_vertex_output_iterator_t, point_to_vertex_output_iterator, point_to_vertex_output_iterator) +CGAL_add_named_parameter(polygon_to_face_output_iterator_t, polygon_to_face_output_iterator, polygon_to_face_output_iterator) +CGAL_add_named_parameter(point_to_vertex_map_t, point_to_vertex_map, point_to_vertex_map) +CGAL_add_named_parameter(polygon_to_face_map_t, polygon_to_face_map, polygon_to_face_map) CGAL_add_named_parameter(vertex_to_vertex_map_t, vertex_to_vertex_map, vertex_to_vertex_map) CGAL_add_named_parameter(halfedge_to_halfedge_map_t, halfedge_to_halfedge_map, halfedge_to_halfedge_map) @@ -40,6 +47,7 @@ CGAL_add_named_parameter(implementation_tag_t, implementation_tag, implementatio CGAL_add_named_parameter(prevent_unselection_t, prevent_unselection, prevent_unselection) CGAL_add_named_parameter(verbose_t, verbose, verbose) +CGAL_add_named_parameter(concurrency_tag_t, concurrency_tag, concurrency_tag) // List of named parameters used for IO CGAL_add_named_parameter(vertex_normal_output_iterator_t, vertex_normal_output_iterator, vertex_normal_output_iterator) @@ -63,6 +71,7 @@ CGAL_add_named_parameter(vertex_incident_patches_t, vertex_incident_patches, ver CGAL_add_named_parameter(density_control_factor_t, density_control_factor, density_control_factor) CGAL_add_named_parameter(use_delaunay_triangulation_t, use_delaunay_triangulation, use_delaunay_triangulation) CGAL_add_named_parameter(do_not_use_cubic_algorithm_t, do_not_use_cubic_algorithm, do_not_use_cubic_algorithm) +CGAL_add_named_parameter(do_not_triangulate_faces_t, do_not_triangulate_faces, do_not_triangulate_faces) CGAL_add_named_parameter(use_2d_constrained_delaunay_triangulation_t, use_2d_constrained_delaunay_triangulation, use_2d_constrained_delaunay_triangulation) CGAL_add_named_parameter(fairing_continuity_t, fairing_continuity, fairing_continuity) CGAL_add_named_parameter(sparse_linear_solver_t, sparse_linear_solver, sparse_linear_solver) @@ -85,6 +94,13 @@ CGAL_add_named_parameter(number_of_points_per_edge_t, number_of_points_per_edge, CGAL_add_named_parameter(number_of_points_on_edges_t, number_of_points_on_edges, number_of_points_on_edges) CGAL_add_named_parameter(nb_points_per_area_unit_t, nb_points_per_area_unit, number_of_points_per_area_unit) CGAL_add_named_parameter(nb_points_per_distance_unit_t, nb_points_per_distance_unit, number_of_points_per_distance_unit) +CGAL_add_named_parameter(vertex_mean_curvature_map_t, vertex_mean_curvature_map, vertex_mean_curvature_map) +CGAL_add_named_parameter(vertex_Gaussian_curvature_map_t, vertex_Gaussian_curvature_map, vertex_Gaussian_curvature_map) +CGAL_add_named_parameter(vertex_principal_curvatures_and_directions_map_t, vertex_principal_curvatures_and_directions_map, vertex_principal_curvatures_and_directions_map) +CGAL_add_named_parameter(vertex_mean_curvature_t, vertex_mean_curvature, vertex_mean_curvature) +CGAL_add_named_parameter(vertex_Gaussian_curvature_t, vertex_Gaussian_curvature, vertex_Gaussian_curvature) +CGAL_add_named_parameter(vertex_principal_curvatures_and_directions_t, vertex_principal_curvatures_and_directions, vertex_principal_curvatures_and_directions) +CGAL_add_named_parameter(ball_radius_t, ball_radius, ball_radius) CGAL_add_named_parameter(outward_orientation_t, outward_orientation, outward_orientation) CGAL_add_named_parameter(overlap_test_t, overlap_test, do_overlap_test_of_bounded_sides) CGAL_add_named_parameter(preserve_genus_t, preserve_genus, preserve_genus) @@ -130,7 +146,23 @@ CGAL_add_named_parameter(match_faces_t, match_faces, match_faces) CGAL_add_named_parameter(face_epsilon_map_t, face_epsilon_map, face_epsilon_map) CGAL_add_named_parameter(maximum_number_t, maximum_number, maximum_number) CGAL_add_named_parameter(use_one_sided_hausdorff_t, use_one_sided_hausdorff, use_one_sided_hausdorff) +CGAL_add_named_parameter(cap_threshold_t, cap_threshold, cap_threshold) +CGAL_add_named_parameter(needle_threshold_t, needle_threshold, needle_threshold) CGAL_add_named_parameter(flip_triangle_height_threshold_t, flip_triangle_height_threshold, flip_triangle_height_threshold) +CGAL_add_named_parameter(collapse_length_threshold_t, collapse_length_threshold, collapse_length_threshold) +CGAL_add_named_parameter(features_angle_bound_t, features_angle_bound, features_angle_bound) +CGAL_add_named_parameter(mesh_edge_size_t, mesh_edge_size, mesh_edge_size) +CGAL_add_named_parameter(mesh_facet_size_t, mesh_facet_size, mesh_facet_size) +CGAL_add_named_parameter(mesh_facet_angle_t, mesh_facet_angle, mesh_facet_angle) +CGAL_add_named_parameter(mesh_facet_distance_t, mesh_facet_distance, mesh_facet_distance) +CGAL_add_named_parameter(mesh_facet_topology_t, mesh_facet_topology, mesh_facet_topology) +CGAL_add_named_parameter(polyline_constraints_t, polyline_constraints, polyline_constraints) +CGAL_add_named_parameter(do_scale_t, do_scale, do_scale) +CGAL_add_named_parameter(vertex_corner_map_t, vertex_corner_map, vertex_corner_map) +CGAL_add_named_parameter(patch_normal_map_t, patch_normal_map, patch_normal_map) +CGAL_add_named_parameter(region_primitive_map_t, region_primitive_map, region_primitive_map) +CGAL_add_named_parameter(postprocess_regions_t, postprocess_regions, postprocess_regions) +CGAL_add_named_parameter(sizing_function_t, sizing_function, sizing_function) // List of named parameters that we use in the package 'Surface Mesh Simplification' CGAL_add_named_parameter(get_cost_policy_t, get_cost_policy, get_cost) @@ -199,10 +231,12 @@ CGAL_add_named_parameter(number_of_relaxations_t, number_of_relaxations, number_ CGAL_add_named_parameter(use_convex_hull_t, use_convex_hull, use_convex_hull) // meshing parameters +CGAL_add_named_parameter(boundary_subdivision_ratio_t, boundary_subdivision_ratio, boundary_subdivision_ratio) CGAL_add_named_parameter(subdivision_ratio_t, subdivision_ratio, subdivision_ratio) CGAL_add_named_parameter(relative_to_chord_t, relative_to_chord, relative_to_chord) CGAL_add_named_parameter(with_dihedral_angle_t, with_dihedral_angle, with_dihedral_angle) CGAL_add_named_parameter(optimize_anchor_location_t, optimize_anchor_location, optimize_anchor_location) +CGAL_add_named_parameter(optimize_boundary_anchor_location_t, optimize_boundary_anchor_location, optimize_boundary_anchor_location) CGAL_add_named_parameter(pca_plane_t, pca_plane, pca_plane) // tetrahedral remeshing parameters @@ -214,6 +248,17 @@ CGAL_add_named_parameter(smooth_constrained_edges_t, smooth_constrained_edges, s // List of named parameters used in Alpha_wrap_3 CGAL_add_named_parameter(do_enforce_manifoldness_t, do_enforce_manifoldness, do_enforce_manifoldness) CGAL_add_named_parameter(seed_points_t, seed_points, seed_points) +CGAL_add_named_parameter(refine_triangulation_t, refine_triangulation, refine_triangulation) +CGAL_add_named_parameter(keep_inner_connected_components_t, keep_inner_connected_components, keep_inner_connected_components) + +// SMDS_3 parameters +CGAL_add_named_parameter(surface_facets_t, surface_facets, surface_facets) +CGAL_add_named_parameter(subdomain_indices_t, subdomain_indices, subdomain_indices) +CGAL_add_named_parameter(all_vertices_t, all_vertices, all_vertices) +CGAL_add_named_parameter(all_cells_t, all_cells, all_cells) +CGAL_add_named_parameter(rebind_labels_t, rebind_labels, rebind_labels) +CGAL_add_named_parameter(show_patches_t, show_patches, show_patches) +CGAL_add_named_parameter(allow_non_manifold_t, allow_non_manifold, allow_non_manifold) // output parameters CGAL_add_named_parameter(face_proxy_map_t, face_proxy_map, face_proxy_map) @@ -227,9 +272,19 @@ CGAL_add_named_parameter(maximum_running_time_t, maximum_running_time, maximum_r CGAL_add_named_parameter(overlap_t, overlap, overlap) CGAL_add_named_parameter(maximum_normal_deviation_t, maximum_normal_deviation, maximum_normal_deviation) +// List of named parameters used in Shape_detection package +CGAL_add_named_parameter(maximum_angle_t, maximum_angle, maximum_angle) +CGAL_add_named_parameter(maximum_distance_t, maximum_distance, maximum_distance) +CGAL_add_named_parameter(minimum_region_size_t, minimum_region_size, minimum_region_size) +CGAL_add_named_parameter(sphere_radius_t, sphere_radius, sphere_radius) +CGAL_add_named_parameter(k_neighbors_t, k_neighbors, k_neighbors) +CGAL_add_named_parameter(item_map_t, item_map, item_map) +CGAL_add_named_parameter(cosine_of_maximum_angle_t, cosine_of_maximum_angle, cosine_of_maximum_angle) +CGAL_add_named_parameter(minimum_radius_t, minimum_radius, minimum_radius) +CGAL_add_named_parameter(maximum_radius_t, maximum_radius, maximum_radius) + // List of named parameters used in Shape_regularization package CGAL_add_named_parameter(minimum_length_t, minimum_length, minimum_length) -CGAL_add_named_parameter(maximum_angle_t, maximum_angle, maximum_angle) CGAL_add_named_parameter(maximum_offset_t, maximum_offset, maximum_offset) CGAL_add_named_parameter(regularize_parallelism_t, regularize_parallelism, regularize_parallelism) CGAL_add_named_parameter(regularize_orthogonality_t, regularize_orthogonality, regularize_orthogonality) @@ -239,3 +294,75 @@ CGAL_add_named_parameter(symmetry_direction_t, symmetry_direction, symmetry_dire CGAL_add_named_parameter(preserve_order_t, preserve_order, preserve_order) CGAL_add_named_parameter(adjust_directions_t, adjust_directions, adjust_directions) CGAL_add_named_parameter(segment_t, segment_map, segment_map) + +// List of named parameters used in Mesh_2 package +CGAL_add_named_parameter_with_compatibility(seeds_t, seeds, seeds) +CGAL_add_named_parameter_with_compatibility(domain_is_initialized_t, domain_is_initialized, domain_is_initialized) +CGAL_add_named_parameter_with_compatibility(seeds_are_in_domain_t, seeds_are_in_domain, seeds_are_in_domain) +CGAL_add_extra_named_parameter_with_compatibility(seeds_are_in_domain_t, seeds_are_in_domain, mark) +CGAL_add_named_parameter_with_compatibility(criteria_t, criteria, criteria) +CGAL_add_named_parameter_with_compatibility(convergence_ratio_t, convergence_ratio, convergence) +CGAL_add_named_parameter_with_compatibility(vertex_freeze_bound_t, vertex_freeze_bound, freeze_bound) +CGAL_add_named_parameter_with_compatibility(i_seed_begin_iterator_t, i_seed_begin_iterator, seeds_begin) +CGAL_add_named_parameter_with_compatibility(i_seed_end_iterator_t, i_seed_end_iterator, seeds_end) + +//List of named parameters used in exude_mesh_3.h +CGAL_add_named_parameter_with_compatibility(lower_sliver_bound_t,lower_sliver_bound,sliver_bound) +CGAL_add_named_parameter_with_compatibility(freeze_t,freeze,do_freeze) +//List of named parameters used in perturb_mesh_3.h +CGAL_add_named_parameter_with_compatibility(sliver_criteria_t, sliver_criteria, sliver_criterion) +CGAL_add_named_parameter_with_compatibility(perturb_vector_t, perturb_vector, perturbation_vector) + +//List of named parameters used in refine_mesh_3.h +CGAL_add_extra_named_parameter_with_compatibility(number_of_iterations_t, number_of_iterations, max_iteration_number) +CGAL_add_extra_named_parameter_with_compatibility(maximum_running_time_t, maximum_running_time, time_limit) +CGAL_add_named_parameter_with_compatibility(mesh_topology_number_t, mesh_topology_number, mesh_topology) +CGAL_add_named_parameter_with_compatibility(dump_after_init_prefix_param_t, dump_after_init_prefix_param, dump_after_init_prefix) +CGAL_add_named_parameter_with_compatibility(dump_after_refine_surface_prefix_param_t, dump_after_refine_surface_prefix_param, dump_after_refine_surface_prefix) +CGAL_add_named_parameter_with_compatibility(dump_after_refine_prefix_param_t, dump_after_refine_prefix_param, dump_after_refine_prefix) +CGAL_add_named_parameter_with_compatibility(dump_after_glob_opt_prefix_param_t, dump_after_glob_opt_prefix_param, dump_after_glob_opt_prefix) +CGAL_add_named_parameter_with_compatibility(dump_after_perturb_prefix_param_t, dump_after_perturb_prefix_param, dump_after_perturb_prefix) +CGAL_add_named_parameter_with_compatibility(dump_after_exude_prefix_param_t, dump_after_exude_prefix_param, dump_after_exude_prefix) +CGAL_add_named_parameter_with_compatibility(number_of_initial_points_param_t, number_of_initial_points_param, number_of_initial_points) +CGAL_add_named_parameter_with_compatibility(maximal_number_of_vertices_param_t, maximal_number_of_vertices_param, maximal_number_of_vertices) +CGAL_add_named_parameter_with_compatibility(nonlinear_growth_of_balls_param_t, nonlinear_growth_of_balls_param, nonlinear_growth_of_balls) +CGAL_add_named_parameter_with_compatibility(pointer_to_error_code_param_t, pointer_to_error_code_param, pointer_to_error_code) +CGAL_add_named_parameter_with_compatibility(pointer_to_stop_atomic_boolean_param_t, pointer_to_stop_atomic_boolean_param, pointer_to_stop_atomic_boolean) +CGAL_add_named_parameter_with_compatibility(exude_options_param_t, exude_options_param, exude_options) +CGAL_add_named_parameter_with_compatibility(perturb_options_param_t, perturb_options_param, perturb_options) +CGAL_add_named_parameter_with_compatibility(odt_options_param_t, odt_options_param, odt_options) +CGAL_add_named_parameter_with_compatibility(lloyd_options_param_t, lloyd_options_param, lloyd_options) +CGAL_add_named_parameter_with_compatibility(do_reset_c3t3_t, do_reset_c3t3, do_reset_c3t3) +CGAL_add_named_parameter_with_compatibility(mesh_param_t, mesh_param, mesh_options) +CGAL_add_named_parameter_with_compatibility(manifold_param_t, manifold_param, manifold_option) +CGAL_add_named_parameter_with_compatibility(features_option_param_t,features_options_param,features_options) + +CGAL_add_named_parameter_with_compatibility_cref_only(image_3_param_t, image_3_param, image) +CGAL_add_named_parameter_with_compatibility(iso_value_param_t, iso_value_param, iso_value) +CGAL_add_named_parameter_with_compatibility(image_subdomain_index_t, image_subdomain_index, image_values_to_subdomain_indices) +CGAL_add_named_parameter_with_compatibility(voxel_value_t, voxel_value, value_outside) +CGAL_add_named_parameter_with_compatibility(error_bound_t, error_bound, relative_error_bound) +CGAL_add_named_parameter_with_compatibility(rng_t, rng, p_rng) +CGAL_add_named_parameter_with_compatibility(null_subdomain_index_param_t,null_subdomain_index_param, null_subdomain_index) +CGAL_add_named_parameter_with_compatibility(surface_patch_index_t, surface_patch_index, construct_surface_patch_index) +CGAL_add_named_parameter_with_compatibility_ref_only(weights_param_t, weights_param, weights) +CGAL_add_named_parameter_with_compatibility(features_detector_param_t, features_detector_param, features_detector) +CGAL_add_named_parameter_with_compatibility(input_features_param_t, input_features_param, input_features) + +CGAL_add_named_parameter_with_compatibility(edge_size_param_t, edge_size_param, edge_size) +CGAL_add_named_parameter_with_compatibility(edge_min_size_param_t, edge_min_size_param, edge_min_size) +CGAL_add_named_parameter_with_compatibility(facet_angle_param_t, facet_angle_param, facet_angle) +CGAL_add_named_parameter_with_compatibility(facet_size_param_t, facet_size_param, facet_size) +CGAL_add_named_parameter_with_compatibility_cref_only(facet_distance_param_t, facet_distance_param, facet_distance) +CGAL_add_named_parameter_with_compatibility(facet_min_size_param_t, facet_min_size_param, facet_min_size) +CGAL_add_named_parameter_with_compatibility(facet_topology_param_t, facet_topology_param, facet_topology) +CGAL_add_named_parameter_with_compatibility(cell_radius_edge_ratio_param_t, cell_radius_edge_ratio_param, cell_radius_edge_ratio) +CGAL_add_named_parameter_with_compatibility(cell_size_param_t, cell_size_param, cell_size) +CGAL_add_named_parameter_with_compatibility(cell_min_size_param_t, cell_min_size_param, cell_min_size) + +CGAL_add_named_parameter_with_compatibility(function_param_t, function_param, function) +CGAL_add_named_parameter_with_compatibility(bounding_object_param_t, bounding_object_param, bounding_object) + +//List of named parameters used in Straight_skeleton_2 +CGAL_add_named_parameter_with_compatibility_ref_only(angles_param_t, angles_param, angles) +CGAL_add_named_parameter(maximum_height_t, maximum_height, maximum_height) diff --git a/thirdparty/CGAL/include/CGAL/Scalar_factor_traits.h b/thirdparty/CGAL/include/CGAL/Scalar_factor_traits.h index 4258ecf3..0dcd6dee 100644 --- a/thirdparty/CGAL/include/CGAL/Scalar_factor_traits.h +++ b/thirdparty/CGAL/include/CGAL/Scalar_factor_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_foundations/include/CGAL/Scalar_factor_traits.h $ -// $Id: Scalar_factor_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_foundations/include/CGAL/Scalar_factor_traits.h $ +// $Id: include/CGAL/Scalar_factor_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -85,13 +85,13 @@ class Scalar_factor_traits { // determine extractable scalar factor Scalar operator () (const NT& a) { - CGAL_static_assertion(( ::boost::is_same< NT,Scalar >::value)); + static_assert(::std::is_same< NT,Scalar >::value); typedef typename Algebraic_structure_traits::Algebraic_category SAT; return scalar_factor(a, SAT()); } // determine extractable scalar factor Scalar operator () (const NT& a, const Scalar& d) { - CGAL_static_assertion(( ::boost::is_same< NT,Scalar >::value)); + static_assert(::std::is_same< NT,Scalar >::value); typedef typename Algebraic_structure_traits::Algebraic_category SAT; return scalar_factor(a,d,SAT()); } diff --git a/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/Advancing_front_mesher.h b/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/Advancing_front_mesher.h index 36e483ab..638b2047 100644 --- a/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/Advancing_front_mesher.h +++ b/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/Advancing_front_mesher.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Advancing_front_mesher.h $ -// $Id: Advancing_front_mesher.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Advancing_front_mesher.h $ +// $Id: include/CGAL/Scale_space_reconstruction_3/Advancing_front_mesher.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Simon Giraudot @@ -33,7 +33,7 @@ namespace Scale_space_reconstruction_3 * with the possibility of using an upper bound on the length of the * produced facets. * - * \cgalModels CGAL::Scale_space_reconstruction_3::Mesher + * \cgalModels{CGAL::Scale_space_reconstruction_3::Mesher} * * \tparam Geom_traits geometric traits class. It must be a * model of `DelaunayTriangulationTraits_3`. It must have a diff --git a/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/Alpha_shape_mesher.h b/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/Alpha_shape_mesher.h index 95640c6b..c1c32893 100644 --- a/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/Alpha_shape_mesher.h +++ b/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/Alpha_shape_mesher.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Alpha_shape_mesher.h $ -// $Id: Alpha_shape_mesher.h e895f42 2021-01-06T14:29:37+01:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Alpha_shape_mesher.h $ +// $Id: include/CGAL/Scale_space_reconstruction_3/Alpha_shape_mesher.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Thijs van Lankveld, Simon Giraudot @@ -47,7 +47,7 @@ namespace Scale_space_reconstruction_3 * component of the surface where connected facets are locally oriented * towards the same side of the surface. * - * \cgalModels CGAL::Scale_space_reconstruction_3::Mesher + * \cgalModels{CGAL::Scale_space_reconstruction_3::Mesher} * * \tparam Geom_traits is the geometric traits class. It must be a * model of `DelaunayTriangulationTraits_3`. It must have a @@ -559,9 +559,6 @@ class Alpha_shape_mesher { std::set done; - unsigned int nb_facets_removed = 0; - - unsigned int nb_skipped = 0; for (Cell_iterator cit = _shape->cells_begin (); cit != _shape->cells_end (); ++ cit) { if (_shape->is_infinite (cit)) @@ -702,7 +699,6 @@ class Alpha_shape_mesher } else { - nb_facets_removed ++; mark_handled (f); _garbage.push_back (ordered_facet_indices (f)); } @@ -716,7 +712,6 @@ class Alpha_shape_mesher } else { - nb_facets_removed ++; mark_handled (_shape->mirror_facet (f)); _garbage.push_back (ordered_facet_indices (_shape->mirror_facet (f))); } @@ -782,7 +777,6 @@ class Alpha_shape_mesher // If number of layers is != 2, ignore volume and discard bubble if (layer != 1) { - nb_skipped ++; for (unsigned int i = 0; i < 2; ++ i) for (typename std::set::iterator fit = _bubbles.back()[i].begin (); fit != _bubbles.back()[i].end (); ++ fit) @@ -790,7 +784,6 @@ class Alpha_shape_mesher mark_handled (*fit); _map_f2b.erase (*fit); _garbage.push_back (ordered_facet_indices (*fit)); - nb_facets_removed ++; } _bubbles.pop_back (); } @@ -805,10 +798,6 @@ class Alpha_shape_mesher typedef std::map, std::set > Edge_shell_map_triples; typedef typename Edge_shell_map_triples::iterator Edge_shell_map_triples_iterator; - unsigned int nb_facets_removed = 0; - - unsigned int nb_nm_edges = 0; - // Store for each pair edge/shell the incident facets Edge_shell_map_triples eshell_triples; std::map map_t2f; @@ -841,8 +830,6 @@ class Alpha_shape_mesher if (eit->second.size () < 3) continue; - ++ nb_nm_edges; - Facet_iterator tit = _shells[eit->first.second]; Facet_iterator end = (eit->first.second == _shells.size () - 1) ? _surface.end () : _shells[eit->first.second + 1]; @@ -863,7 +850,6 @@ class Alpha_shape_mesher _map_f2s.erase (map_t2f[*current]); _surface.erase (current); - ++ nb_facets_removed; eit->second.erase (search); } @@ -931,14 +917,12 @@ class Alpha_shape_mesher _surface.splice(end, tmp, tmp.begin(), tmp.end()); } - unsigned int nb_facets_removed = 0; unsigned int nb_nm_vertices = 0; // Removing facets to fix non-manifold vertices might make some other vertices // become non-manifold, therefore we iterate until no facet needs to be removed. do { nb_nm_vertices = 0; - nb_facets_removed = 0; // Store for each pair vertex/shell the incident facets Vertex_shell_map_facets vshell_facets; @@ -1052,7 +1036,6 @@ class Alpha_shape_mesher _garbage.push_back (*current); _surface.erase (current); - ++ nb_facets_removed; ++ tindex; } diff --git a/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/Jet_smoother.h b/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/Jet_smoother.h index 1e6a766e..5cf7b223 100644 --- a/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/Jet_smoother.h +++ b/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/Jet_smoother.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Jet_smoother.h $ -// $Id: Jet_smoother.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Jet_smoother.h $ +// $Id: include/CGAL/Scale_space_reconstruction_3/Jet_smoother.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Simon Giraudot @@ -32,7 +32,7 @@ namespace Scale_space_reconstruction_3 * %Smoother for scale space reconstruction based on * `CGAL::jet_smooth_point_set()`. * - * \cgalModels CGAL::Scale_space_reconstruction_3::Smoother + * \cgalModels{CGAL::Scale_space_reconstruction_3::Smoother} * * \tparam Geom_traits geometric traits class. It must be a * model of `DelaunayTriangulationTraits_3`. It must have a @@ -52,8 +52,8 @@ template ::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else - if (boost::is_convertible::value) + if (std::is_convertible::value) tbb::parallel_for(tbb::blocked_range(begin, end), func); else #endif diff --git a/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/internal/Auto_count.h b/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/internal/Auto_count.h index 413941fe..238f5ac5 100644 --- a/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/internal/Auto_count.h +++ b/thirdparty/CGAL/include/CGAL/Scale_space_reconstruction_3/internal/Auto_count.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/internal/Auto_count.h $ -// $Id: Auto_count.h e893ac1 2020-08-18T10:06:51+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/internal/Auto_count.h $ +// $Id: include/CGAL/Scale_space_reconstruction_3/internal/Auto_count.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Thijs van Lankveld diff --git a/thirdparty/CGAL/include/CGAL/Scale_space_surface_reconstruction_3.h b/thirdparty/CGAL/include/CGAL/Scale_space_surface_reconstruction_3.h index d1b85f71..36aeb375 100644 --- a/thirdparty/CGAL/include/CGAL/Scale_space_surface_reconstruction_3.h +++ b/thirdparty/CGAL/include/CGAL/Scale_space_surface_reconstruction_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h $ -// $Id: Scale_space_surface_reconstruction_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h $ +// $Id: include/CGAL/Scale_space_surface_reconstruction_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Thijs van Lankveld, Simon Giraudot @@ -53,21 +53,23 @@ class Scale_space_surface_reconstruction_3 typedef std::array Facet; ///< defines a facet of the surface (triple of point indices). #ifdef DOXYGEN_RUNNING + typedef unspecified_type Point_range; ///< defines a range points. typedef unspecified_type Point_iterator; ///< defines an iterator over the points. typedef const unspecified_type Point_const_iterator; ///< defines a constant iterator over the points. #else - typedef typename std::vector Point_vector; - typedef typename Point_vector::iterator Point_iterator; - typedef typename Point_vector::const_iterator Point_const_iterator; + typedef typename std::vector Point_range; + typedef typename Point_range::iterator Point_iterator; + typedef typename Point_range::const_iterator Point_const_iterator; #endif #ifdef DOXYGEN_RUNNING - typedef unspecified_type Facet_iterator; ///< defines an iterator over the points. - typedef const unspecified_type Facet_const_iterator; ///< defines a constant iterator over the points. + typedef unspecified_type Facet_range; ///< defines a range of facets + typedef unspecified_type Facet_iterator; ///< defines an iterator over the facets. + typedef const unspecified_type Facet_const_iterator; ///< defines a constant iterator over the facets. #else - typedef typename std::vector Facet_vector; - typedef typename Facet_vector::iterator Facet_iterator; - typedef typename Facet_vector::const_iterator Facet_const_iterator; + typedef typename std::vector Facet_range; + typedef typename Facet_range::iterator Facet_iterator; + typedef typename Facet_range::const_iterator Facet_const_iterator; #endif // Default algorithms used (same as in old API) @@ -76,8 +78,8 @@ class Scale_space_surface_reconstruction_3 private: - Point_vector m_points; - Facet_vector m_facets; + Point_range m_points; + Facet_range m_facets; FT m_internal_squared_radius; // For backward compatibility @@ -233,6 +235,9 @@ class Scale_space_surface_reconstruction_3 /// gives the number of points of the surface. std::size_t number_of_points() const { return m_points.size(); } + /// gives the range of points + const Point_range& points() const { return m_points; } + /// gives an iterator to the first point at the current scale. /** \warning Changes to the scale-space do not cause an automatic update to * the surface. @@ -254,6 +259,9 @@ class Scale_space_surface_reconstruction_3 /// gives the number of facets of the surface. std::size_t number_of_facets() const { return m_facets.size(); } + /// gives the range of facets + const Facet_range& facets() const { return m_facets; } + /// gives an iterator to the first triple in the surface. /** \warning Changes to the surface may change its topology. */ @@ -292,16 +300,4 @@ std::ostream& operator<< (std::ostream& os, const CGAL::Scale_space_surface_reco } // namespace CGAL -template< typename T > -std::ostream& -operator<<( std::ostream& os, const std::array< T, 3 >& t ) { - return os << t[0] << " " << t[1] << " " << t[2]; -} - -template< typename T > -std::istream& -operator>>( std::istream& is, std::array< T, 3 >& t ) { - return is >> get<0>(t) >> get<1>(t) >> get<2>(t); -} - #endif // CGAL_SCALE_SPACE_SURFACE_RECONSTRUCTION_3_H diff --git a/thirdparty/CGAL/include/CGAL/Search_traits.h b/thirdparty/CGAL/include/CGAL/Search_traits.h index 5add9a58..3f1b3ef3 100644 --- a/thirdparty/CGAL/include/CGAL/Search_traits.h +++ b/thirdparty/CGAL/include/CGAL/Search_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Search_traits.h $ -// $Id: Search_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Search_traits.h $ +// $Id: include/CGAL/Search_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Search_traits_2.h b/thirdparty/CGAL/include/CGAL/Search_traits_2.h index b388748c..7e8d3a8b 100644 --- a/thirdparty/CGAL/include/CGAL/Search_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Search_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Search_traits_2.h $ -// $Id: Search_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Search_traits_2.h $ +// $Id: include/CGAL/Search_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Search_traits_3.h b/thirdparty/CGAL/include/CGAL/Search_traits_3.h index cd6c8907..2dd85d95 100644 --- a/thirdparty/CGAL/include/CGAL/Search_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Search_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Search_traits_3.h $ -// $Id: Search_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Search_traits_3.h $ +// $Id: include/CGAL/Search_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Search_traits_adapter.h b/thirdparty/CGAL/include/CGAL/Search_traits_adapter.h index e023d18b..6d09af67 100644 --- a/thirdparty/CGAL/include/CGAL/Search_traits_adapter.h +++ b/thirdparty/CGAL/include/CGAL/Search_traits_adapter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Search_traits_adapter.h $ -// $Id: Search_traits_adapter.h ecb987a 2022-12-23T13:20:13+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Search_traits_adapter.h $ +// $Id: include/CGAL/Search_traits_adapter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,8 +23,6 @@ #include #include -#include -#include #include namespace CGAL{ @@ -106,19 +104,17 @@ class Search_traits_adapter : public Base_traits{ // on the query point type. If the query point type is the same as // Point_with_info, we disable it. - template // boost::disable_if requires a template argument to work + template // enable_if_t requires a template argument to work typename Base_traits::Cartesian_const_iterator_d operator()(const Point& p, - typename boost::disable_if< - boost::is_same >::type* = 0 + std::enable_if_t< + !std::is_same::value >* = 0 ) const { return Base::operator() (p); } - template // boost::disable_if requires a template argument to work + template // std::enable_if_t requires a template argument to work typename Base_traits::Cartesian_const_iterator_d operator()(const Point& p, int, - typename boost::disable_if< - boost::is_same >::type* = 0 + std::enable_if_t< + !std::is_same::value >* = 0 ) const { return Base::operator() (p,0); } }; @@ -210,35 +206,34 @@ class Search_traits_adapter : public Base_traits{ // on the query point type. If the query point type is the same as // Point_with_info, we disable it. - template // boost::disable_if requires a template argument to work + template // std::enable_if_t requires a template argument to work No_lvalue_iterator operator()(const Point& p, - typename boost::disable_if< - boost::is_same >::type* = 0 + std::enable_if_t::value >* = 0 ) const { return No_lvalue_iterator(p); } - template // boost::disable_if requires a template argument to work + template // std::enable_if requires a template argument to work No_lvalue_iterator operator()(const Point& p, int, - typename boost::disable_if< - boost::is_same >::type* = 0 + std::enable_if_t< + !std::is_same::value >* = 0 ) const { return No_lvalue_iterator(p,0); } }; // Select type of iterator + construct class depending on whether // point map is lvalue or not - typedef typename boost::mpl::if_< - boost::is_reference::reference>, + typedef std::conditional_t< + std::is_reference_v::reference>, typename Base::Cartesian_const_iterator_d, - No_lvalue_iterator>::type + No_lvalue_iterator> Cartesian_const_iterator_d; - typedef typename boost::mpl::if_< - boost::is_reference::reference>, + typedef std::conditional_t< + std::is_reference_v::reference>, Construct_cartesian_const_iterator_d_lvalue, - Construct_cartesian_const_iterator_d_no_lvalue>::type + Construct_cartesian_const_iterator_d_no_lvalue> Construct_cartesian_const_iterator_d; struct Construct_iso_box_d: public Base::Construct_iso_box_d{ diff --git a/thirdparty/CGAL/include/CGAL/Search_traits_d.h b/thirdparty/CGAL/include/CGAL/Search_traits_d.h index 346fae85..9bdec2a4 100644 --- a/thirdparty/CGAL/include/CGAL/Search_traits_d.h +++ b/thirdparty/CGAL/include/CGAL/Search_traits_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Search_traits_d.h $ -// $Id: Search_traits_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Search_traits_d.h $ +// $Id: include/CGAL/Search_traits_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_2.h b/thirdparty/CGAL/include/CGAL/Segment_2.h index 7fbad646..64d0c0ba 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Segment_2.h $ -// $Id: Segment_2.h 8fa0f55 2021-05-27T10:27:38+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Segment_2.h $ +// $Id: include/CGAL/Segment_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,12 +18,13 @@ #define CGAL_SEGMENT_2_H #include -#include #include #include #include #include +#include + namespace CGAL { template @@ -39,7 +40,7 @@ class Segment_2 : public R_::Kernel_base::Segment_2 typedef typename R_::Kernel_base::Segment_2 RSegment_2; typedef Segment_2 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Segment_3.h b/thirdparty/CGAL/include/CGAL/Segment_3.h index 8e85665c..31b9f72b 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_3.h +++ b/thirdparty/CGAL/include/CGAL/Segment_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Segment_3.h $ -// $Id: Segment_3.h d39c774 2022-03-17T12:14:43+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Segment_3.h $ +// $Id: include/CGAL/Segment_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,6 @@ #define CGAL_SEGMENT_3_H #include -#include #include #include #include @@ -39,7 +38,7 @@ class Segment_3 : public R_::Kernel_base::Segment_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Segment_3 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2.h index 42690737..687cf29b 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2.h $ -// $Id: Segment_Delaunay_graph_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Are_parallel_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Are_parallel_C2.h index a37d99b0..6d216879 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Are_parallel_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Are_parallel_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Are_parallel_C2.h $ -// $Id: Are_parallel_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Are_parallel_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Are_parallel_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h index a3cd2a55..8980bbec 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h $ -// $Id: Are_same_points_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h index 6052a100..49383caa 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h $ -// $Id: Are_same_segments_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Arrangement_enum.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Arrangement_enum.h index d5fddda6..abbf416d 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Arrangement_enum.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Arrangement_enum.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Arrangement_enum.h $ -// $Id: Arrangement_enum.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Arrangement_enum.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Arrangement_enum.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_C2.h index 0c06b5a7..4f843187 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_C2.h $ -// $Id: Arrangement_type_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_non_intersecting_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_non_intersecting_C2.h index 2c371aeb..0c0dace2 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_non_intersecting_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_non_intersecting_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_non_intersecting_C2.h $ -// $Id: Arrangement_type_non_intersecting_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_non_intersecting_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Arrangement_type_non_intersecting_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h index 7cc8ba81..2e4acef6 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h $ -// $Id: Basic_predicates_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Basic_predicates_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Cartesian_converter.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Cartesian_converter.h index 2580e4c5..cdd2e47d 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Cartesian_converter.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Cartesian_converter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Cartesian_converter.h $ -// $Id: Cartesian_converter.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Cartesian_converter.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Cartesian_converter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Compare_x_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Compare_x_2.h index a2750ce2..19c5f431 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Compare_x_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Compare_x_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Compare_x_2.h $ -// $Id: Compare_x_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Compare_x_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Compare_x_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Compare_y_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Compare_y_2.h index 9fda5b39..4a08c12e 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Compare_y_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Compare_y_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Compare_y_2.h $ -// $Id: Compare_y_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Compare_y_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Compare_y_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_2.h index eea6da31..b90b08a3 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_2.h $ -// $Id: Construct_storage_site_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_with_info_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_with_info_2.h index 9383be23..b363516b 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_with_info_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_with_info_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_with_info_2.h $ -// $Id: Construct_storage_site_with_info_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_with_info_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Construct_storage_site_with_info_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Constructions_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Constructions_C2.h index a93345bd..d382c81f 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Constructions_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Constructions_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Constructions_C2.h $ -// $Id: Constructions_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Constructions_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Constructions_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h index 93691d54..245f6b17 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h $ -// $Id: Filtered_traits_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_concept_check_tags.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_concept_check_tags.h index 4fcedee9..48af750b 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_concept_check_tags.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_concept_check_tags.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_concept_check_tags.h $ -// $Id: Filtered_traits_concept_check_tags.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_concept_check_tags.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_concept_check_tags.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Finite_edge_interior_conflict_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Finite_edge_interior_conflict_C2.h index 7c85b523..0f156cf1 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Finite_edge_interior_conflict_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Finite_edge_interior_conflict_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Finite_edge_interior_conflict_C2.h $ -// $Id: Finite_edge_interior_conflict_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Finite_edge_interior_conflict_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Finite_edge_interior_conflict_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Infinite_edge_interior_conflict_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Infinite_edge_interior_conflict_C2.h index 3d72f8d9..94b63dde 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Infinite_edge_interior_conflict_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Infinite_edge_interior_conflict_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Infinite_edge_interior_conflict_C2.h $ -// $Id: Infinite_edge_interior_conflict_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Infinite_edge_interior_conflict_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Infinite_edge_interior_conflict_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Is_degenerate_edge_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Is_degenerate_edge_C2.h index 26ecfb08..3659df7b 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Is_degenerate_edge_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Is_degenerate_edge_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Is_degenerate_edge_C2.h $ -// $Id: Is_degenerate_edge_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Is_degenerate_edge_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Is_degenerate_edge_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h index e217569f..1f70f5c3 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h $ -// $Id: Kernel_wrapper_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Orientation_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Orientation_C2.h index 5a8ba5b6..d9a85447 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Orientation_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Orientation_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Orientation_C2.h $ -// $Id: Orientation_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Orientation_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Orientation_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h index c81c3635..b9dcef44 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h $ -// $Id: Oriented_side_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_of_bisector_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_of_bisector_C2.h index 7a572634..93339e18 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_of_bisector_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_of_bisector_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_of_bisector_C2.h $ -// $Id: Oriented_side_of_bisector_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_of_bisector_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Oriented_side_of_bisector_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Predicates_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Predicates_C2.h index ad50fbc0..12f27af5 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Predicates_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Predicates_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Predicates_C2.h $ -// $Id: Predicates_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Predicates_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Predicates_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h index 62b998ce..e2a36d79 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h @@ -3,13 +3,17 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h $ -// $Id: Segment_Delaunay_graph_2_impl.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Menelaos Karavelas +#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_2_SDG_2_IMPL_H +#define CGAL_SEGMENT_DELAUNAY_GRAPH_2_SDG_2_IMPL_H + +#include // class implementation continued //================================= @@ -2118,9 +2122,9 @@ remove_degree_d_vertex(const Vertex_handle& v) // here we find a site in the small diagram that serves as a // starting point for finding all conflicts. // To do that we find the nearest neighbor of t if t is a point; - // t is guarranteed to have a conflict with its nearest neighbor + // t is guaranteed to have a conflict with its nearest neighbor // If t is a segment, then one endpoint of t is enough; t is - // guarranteed to have a conflict with the Voronoi edges around + // guaranteed to have a conflict with the Voronoi edges around // this endpoint if ( t.is_point() ) { vn = sdg_small.nearest_neighbor( t.point() ); @@ -2876,7 +2880,7 @@ copy(Segment_Delaunay_graph_2& other, Handle_map& hm) // then copy the diagram DG::operator=(other); - // now we have to update the sotrage sites in each vertex of the + // now we have to update the storage sites in each vertex of the // diagram and also update the // then update the storage sites for each vertex @@ -3127,7 +3131,7 @@ Segment_Delaunay_graph_2:: file_output(std::ostream& os, Point_handle_mapper& P, bool print_point_container) const { - // ouput to a file + // output to a file size_type n = this->_tds.number_of_vertices(); size_type m = this->_tds.number_of_full_dim_faces(); @@ -3325,3 +3329,5 @@ file_input(std::istream& is, bool read_handle_vector, } //namespace CGAL // EOF + +#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_2_SDG_2_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_hierarchy_2_impl.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_hierarchy_2_impl.h index 01d629c2..a1d2c361 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_hierarchy_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_hierarchy_2_impl.h @@ -3,14 +3,17 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_hierarchy_2_impl.h $ -// $Id: Segment_Delaunay_graph_hierarchy_2_impl.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_hierarchy_2_impl.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_hierarchy_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Menelaos Karavelas +#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_2_SDG_HIERARCHY_IMPL_H +#define CGAL_SEGMENT_DELAUNAY_GRAPH_2_SDG_HIERARCHY_IMPL_H +#include // class implementation continued @@ -1145,3 +1148,5 @@ file_input(std::istream& is) // EOF + +#endif //CGAL_SEGMENT_DELAUNAY_GRAPH_2_SDG_HIERARCHY_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h index 615db3fb..9ddeff07 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h $ -// $Id: Sqrt_extension_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h index a6be3742..c989c3e5 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h $ -// $Id: Traits_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Menelaos Karavelas diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Traits_wrapper_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Traits_wrapper_2.h index 99b9df01..85922ddc 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Traits_wrapper_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Traits_wrapper_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Traits_wrapper_2.h $ -// $Id: Traits_wrapper_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Traits_wrapper_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Traits_wrapper_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Triangulation_face_base_with_edges_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Triangulation_face_base_with_edges_2.h index 61aa844e..5735acac 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Triangulation_face_base_with_edges_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Triangulation_face_base_with_edges_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Triangulation_face_base_with_edges_2.h $ -// $Id: Triangulation_face_base_with_edges_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Triangulation_face_base_with_edges_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Triangulation_face_base_with_edges_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,12 +17,7 @@ #include - - #include -#include - - namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Vertex_conflict_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Vertex_conflict_C2.h index 821d433f..5ccb337c 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Vertex_conflict_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Vertex_conflict_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Vertex_conflict_C2.h $ -// $Id: Vertex_conflict_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Vertex_conflict_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Vertex_conflict_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_C2.h index 24990eb1..b3a9023c 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_C2.h $ -// $Id: Voronoi_vertex_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h index 68793ea5..3ced8bcd 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h $ -// $Id: Voronoi_vertex_ring_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -1502,7 +1502,7 @@ class Voronoi_vertex_ring_C2 vertex_t v_type; - // index that indicates the refence point for the case PPS + // index that indicates the reference point for the case PPS short pps_idx; // the case ppp diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h index 709462fe..e73e3609 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h $ -// $Id: Voronoi_vertex_sqrt_field_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -1260,7 +1260,7 @@ class Voronoi_vertex_sqrt_field_C2 vertex_t v_type; - // index that indicates the refence point for the case PPS + // index that indicates the reference point for the case PPS short pps_idx; FT ux, uy, uz; diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_new_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_new_C2.h index 56221182..73305665 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_new_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_new_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_new_C2.h $ -// $Id: Voronoi_vertex_sqrt_field_new_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_new_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_new_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/basic.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/basic.h index a36e2f18..8c9588aa 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/basic.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/basic.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/basic.h $ -// $Id: basic.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/basic.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/basic.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/in_place_edge_list.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/in_place_edge_list.h index cb3000b1..bd5e8f38 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/in_place_edge_list.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_2/in_place_edge_list.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/in_place_edge_list.h $ -// $Id: in_place_edge_list.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/in_place_edge_list.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_2/in_place_edge_list.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2.h index 70c14a6a..5d21cddb 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2.h $ -// $Id: Segment_Delaunay_graph_Linf_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -43,6 +43,7 @@ #include #include +#include #include #include diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h index c0525a08..9054bf13 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h $ -// $Id: Basic_predicates_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -1010,7 +1010,7 @@ struct Basic_predicates_C2 // with the ray starting from corner and going to the // direction of the center of the infinite box - // corner has homogenuous coordinates cx, cy, cw + // corner has homogeneous coordinates cx, cy, cw RT cx, cy, cw; compute_intersection_of_lines(lhor, lver, cx, cy, cw); diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h index c43ad3cd..1f6ea9e3 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h $ -// $Id: Bisector_Linf.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -200,7 +200,7 @@ class Bisector_Linf else { Oriented_side side = lseg.oriented_side(pnt); - // point pp sould not lie on the supporting line of q + // point pp should not lie on the supporting line of q CGAL_assertion(! (side == ON_ORIENTED_BOUNDARY)); Point_2 points[3]; @@ -298,7 +298,7 @@ class Bisector_Linf && lseg.has_on_negative_side(pnt)) ) { // pcfirst is center of square, // pfirst = phor, upward direction - // pclast is center of sqaure, plast = pver, left direction + // pclast is center of square, plast = pver, left direction pcfirst = Point_2(pmid_pfirst_pnt.x(), pmid_pfirst_pnt.y()+seglenhalffirst); pclast = Point_2(pmid_plast_pnt.x()-seglenhalflast, @@ -321,7 +321,7 @@ class Bisector_Linf && lseg.has_on_negative_side(pnt)) ) { // pcfirst is center of square, // pfirst = pver, right direction - // pclast is center of sqaure, plast = phor, upward dir + // pclast is center of square, plast = phor, upward dir pcfirst = Point_2(pmid_pfirst_pnt.x()+seglenhalffirst, pmid_pfirst_pnt.y()); pclast = Point_2(pmid_plast_pnt.x(), diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h index 65151724..46f7cd28 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h $ -// $Id: Constructions_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -341,7 +341,7 @@ class Construct_sdg_bisector_2 && lseg.has_on_negative_side(pnt)) ) { //pcfirst is center of square, //pfirst = phor, upward direction - //pclast is center of sqaure, plast = pver, left direction + //pclast is center of square, plast = pver, left direction pcfirst = Point_2(pmid_pfirst_pnt.x(), pmid_pfirst_pnt.y()+seglenhalffirst); pclast = Point_2(pmid_plast_pnt.x()-seglenhalflast, @@ -363,7 +363,7 @@ class Construct_sdg_bisector_2 && lseg.has_on_negative_side(pnt)) ) { //pcfirst is center of square, //pfirst = pver, right direction - //pclast is center of sqaure, plast = phor, upward direction + //pclast is center of square, plast = phor, upward direction pcfirst = Point_2(pmid_pfirst_pnt.x()+seglenhalffirst, pmid_pfirst_pnt.y()); pclast = Point_2(pmid_plast_pnt.x(), @@ -637,7 +637,7 @@ class Construct_sdg_bisector_ray_2 || (compare_x_2(seg.source(),seg.target()) == LARGER && lseg.has_on_negative_side(pnt)) ) { //pcfirst is center of square , pfirst = phor, upward direction - //pclast is center of sqaure, plast = pver, left direction + //pclast is center of square, plast = pver, left direction pcfirst = Point_2(pmid_pfirst_pnt.x(), pmid_pfirst_pnt.y()+seglenhalffirst); pclast = Point_2(pmid_plast_pnt.x()-seglenhalflast, @@ -658,7 +658,7 @@ class Construct_sdg_bisector_ray_2 || (compare_x_2(seg.source(),seg.target()) == LARGER && lseg.has_on_negative_side(pnt)) ) { //pcfirst is center of square , pfirst = pver, right direction - //pclast is center of sqaure, plast = phor, upward direction + //pclast is center of square, plast = phor, upward direction pcfirst = Point_2(pmid_pfirst_pnt.x()+seglenhalffirst, pmid_pfirst_pnt.y()); pclast = Point_2(pmid_plast_pnt.x(), @@ -947,7 +947,7 @@ class Construct_sdg_bisector_segment_2 Point_2 pnt = (p.is_point()) ? p.point() : q.point(); Segment_2 seg = (p.is_segment()) ? p.segment() : q.segment(); Site_2 siteseg = (p.is_point()) ? q : p; - // lseg is the suporting line of the segment site + // lseg is the supporting line of the segment site Line_2 lseg = siteseg.supporting_site().segment().supporting_line(); // segment site is horizontal if (lseg.is_horizontal()) { @@ -1104,7 +1104,7 @@ class Construct_sdg_bisector_segment_2 || (compare_x_2(seg.source(),seg.target()) == LARGER && lseg.has_on_negative_side(pnt)) ) { //pcfirst is center of square, pfirst = phor, upward direction - //pclast is center of sqaure, plast = pver, left direction + //pclast is center of square, plast = pver, left direction pcfirst = Point_2(pmid_pfirst_pnt.x(), pmid_pfirst_pnt.y()+seglenhalffirst); pclast = Point_2(pmid_plast_pnt.x()-seglenhalflast, @@ -1125,7 +1125,7 @@ class Construct_sdg_bisector_segment_2 || (compare_x_2(seg.source(),seg.target()) == LARGER && lseg.has_on_negative_side(pnt)) ) { //pcfirst is center of square , pfirst = pver, right direction - //pclast is center of sqaure, plast = phor, upward direction + //pclast is center of square, plast = phor, upward direction pcfirst = Point_2(pmid_pfirst_pnt.x()+seglenhalffirst, pmid_pfirst_pnt.y()); pclast = Point_2(pmid_plast_pnt.x(), diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Filtered_traits_base_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Filtered_traits_base_2.h index 446daa45..452d25f8 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Filtered_traits_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Filtered_traits_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Filtered_traits_base_2.h $ -// $Id: Filtered_traits_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Filtered_traits_base_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Filtered_traits_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Finite_edge_interior_conflict_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Finite_edge_interior_conflict_C2.h index 6c63b305..a2c2f050 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Finite_edge_interior_conflict_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Finite_edge_interior_conflict_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Finite_edge_interior_conflict_C2.h $ -// $Id: Finite_edge_interior_conflict_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Finite_edge_interior_conflict_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Finite_edge_interior_conflict_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Infinite_edge_interior_conflict_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Infinite_edge_interior_conflict_C2.h index 406549eb..ee9c5317 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Infinite_edge_interior_conflict_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Infinite_edge_interior_conflict_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Infinite_edge_interior_conflict_C2.h $ -// $Id: Infinite_edge_interior_conflict_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Infinite_edge_interior_conflict_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Infinite_edge_interior_conflict_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Orientation_Linf_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Orientation_Linf_C2.h index 38198fdb..4cfa044c 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Orientation_Linf_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Orientation_Linf_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Orientation_Linf_C2.h $ -// $Id: Orientation_Linf_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Orientation_Linf_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Orientation_Linf_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_C2.h index 48743dcf..ca2e800c 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_C2.h $ -// $Id: Oriented_side_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_of_bisector_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_of_bisector_C2.h index d59beacd..899f818e 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_of_bisector_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_of_bisector_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_of_bisector_C2.h $ -// $Id: Oriented_side_of_bisector_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_of_bisector_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Oriented_side_of_bisector_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Predicates_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Predicates_C2.h index 87228a6c..35777b8b 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Predicates_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Predicates_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Predicates_C2.h $ -// $Id: Predicates_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Predicates_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Predicates_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_2_impl.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_2_impl.h index 358130f5..5fe38079 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_2_impl.h @@ -3,14 +3,19 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_2_impl.h $ -// $Id: Segment_Delaunay_graph_Linf_2_impl.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_2_impl.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Panagiotis Cheilaris, Sandeep Kumar Dey, Evanthia Papadopoulou //philaris@gmail.com, sandeep.kr.dey@gmail.com, evanthia.papadopoulou@usi.ch +#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_SDG_LINF_2_IMPL_H +#define CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_SDG_LINF_2_IMPL_H + +#include + namespace CGAL { // print face in standard output @@ -105,6 +110,7 @@ find_faces_to_split(const Vertex_handle& v, const Site_2& t, Face_circulator fc_start = fc; int n_inf = 0; int n_faces = 0; + CGAL_USE(n_faces); do { if ( is_infinite(fc) ) { n_inf++; } fc++; @@ -758,3 +764,5 @@ insert_point_on_segment(const Storage_site_2& ss, const Site_2& , } //namespace CGAL // EOF + +#endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_SDG_LINF_2_IMPL_H diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_hierarchy_2_impl.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_hierarchy_2_impl.h index 36c2ad4b..8bef64c6 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_hierarchy_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_hierarchy_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_hierarchy_2_impl.h $ -// $Id: Segment_Delaunay_graph_Linf_hierarchy_2_impl.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_hierarchy_2_impl.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Segment_Delaunay_graph_Linf_hierarchy_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Traits_base_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Traits_base_2.h index 9929a4db..237d5049 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Traits_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Traits_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Traits_base_2.h $ -// $Id: Traits_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Traits_base_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Traits_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Vertex_conflict_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Vertex_conflict_C2.h index 428e7273..53a8e589 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Vertex_conflict_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Vertex_conflict_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Vertex_conflict_C2.h $ -// $Id: Vertex_conflict_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Vertex_conflict_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Vertex_conflict_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h index 13b16520..2716b27b 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h $ -// $Id: Voronoi_vertex_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h index a392275d..e1091c4a 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h $ -// $Id: Voronoi_vertex_ring_C2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -3937,7 +3937,7 @@ class Voronoi_vertex_ring_C2 vertex_t v_type; - // index that indicates the refence point for the case PPS + // index that indicates the reference point for the case PPS short pps_idx; // philaris: different types are not needed any more diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_sqrt_field_new_C2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_sqrt_field_new_C2.h index cf7f621e..0188f637 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_sqrt_field_new_C2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_sqrt_field_new_C2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_sqrt_field_new_C2.h $ -// $Id: Voronoi_vertex_sqrt_field_new_C2.h ddd4968 2021-02-03T16:05:24+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_sqrt_field_new_C2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_sqrt_field_new_C2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/basic.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/basic.h index b6d37416..39ef3108 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/basic.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_2/basic.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/basic.h $ -// $Id: basic.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/basic.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_2/basic.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h index a4697ef1..b3aa3212 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h $ -// $Id: Segment_Delaunay_graph_Linf_filtered_traits_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h index 7256cb73..987135f6 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h $ -// $Id: Segment_Delaunay_graph_Linf_hierarchy_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_traits_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_traits_2.h index 6115ae63..62dcdcb2 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_Linf_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_traits_2.h $ -// $Id: Segment_Delaunay_graph_Linf_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_traits_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_Linf_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_adaptation_policies_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_adaptation_policies_2.h index 4a2ffed8..d03fc761 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_adaptation_policies_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_adaptation_policies_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Segment_Delaunay_graph_adaptation_policies_2.h $ -// $Id: Segment_Delaunay_graph_adaptation_policies_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Segment_Delaunay_graph_adaptation_policies_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_adaptation_policies_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_adaptation_traits_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_adaptation_traits_2.h index a54cfd8a..2dcf8e39 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_adaptation_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_adaptation_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Segment_Delaunay_graph_adaptation_traits_2.h $ -// $Id: Segment_Delaunay_graph_adaptation_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Segment_Delaunay_graph_adaptation_traits_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_adaptation_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_face_base_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_face_base_2.h index e81b6b9e..3f7adb2c 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_face_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_face_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_face_base_2.h $ -// $Id: Segment_Delaunay_graph_face_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_face_base_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_face_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h index c9919ad7..52d95693 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h $ -// $Id: Segment_Delaunay_graph_filtered_traits_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h index dccb9ef7..9d41f4ca 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h $ -// $Id: Segment_Delaunay_graph_hierarchy_2.h cc18ed3 2020-04-06T18:33:26+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_hierarchy_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h index 11e81ddc..50a5519d 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h $ -// $Id: Segment_Delaunay_graph_hierarchy_vertex_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_simple_site_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_simple_site_2.h index 45216bc1..3c38b2ad 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_simple_site_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_simple_site_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_simple_site_2.h $ -// $Id: Segment_Delaunay_graph_simple_site_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_simple_site_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_simple_site_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_simple_storage_site_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_simple_storage_site_2.h index 6cf8d4f3..d9e4ade9 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_simple_storage_site_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_simple_storage_site_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_simple_storage_site_2.h $ -// $Id: Segment_Delaunay_graph_simple_storage_site_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_simple_storage_site_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_simple_storage_site_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_site_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_site_2.h index 0caaa424..98de5df3 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_site_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_site_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_site_2.h $ -// $Id: Segment_Delaunay_graph_site_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_site_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_site_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_site_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_site_2.h index 453846af..c0d8a8ac 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_site_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_site_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_storage_site_2.h $ -// $Id: Segment_Delaunay_graph_storage_site_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_storage_site_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_storage_site_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_site_with_info_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_site_with_info_2.h index b0e5974e..45f5e848 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_site_with_info_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_site_with_info_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_storage_site_with_info_2.h $ -// $Id: Segment_Delaunay_graph_storage_site_with_info_2.h 980adeb 2020-04-09T13:27:13+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_storage_site_with_info_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_storage_site_with_info_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_traits_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_traits_2.h index f9602e00..83e49b7e 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_storage_traits_2.h $ -// $Id: Segment_Delaunay_graph_storage_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_storage_traits_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_storage_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_traits_with_info_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_traits_with_info_2.h index 7fccff7a..b087f3f1 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_traits_with_info_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_storage_traits_with_info_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_storage_traits_with_info_2.h $ -// $Id: Segment_Delaunay_graph_storage_traits_with_info_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_storage_traits_with_info_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_storage_traits_with_info_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_traits_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_traits_2.h index 2f1aefc0..0c5d5e6b 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_traits_2.h $ -// $Id: Segment_Delaunay_graph_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_traits_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_vertex_base_2.h index 00ef352a..46bbd85e 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Segment_Delaunay_graph_vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_vertex_base_2.h $ -// $Id: Segment_Delaunay_graph_vertex_base_2.h 87ecfae 2021-02-17T10:55:59+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_vertex_base_2.h $ +// $Id: include/CGAL/Segment_Delaunay_graph_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Segment_tree_d.h b/thirdparty/CGAL/include/CGAL/Segment_tree_d.h index d2c16198..fd97e849 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_tree_d.h +++ b/thirdparty/CGAL/include/CGAL/Segment_tree_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/SearchStructures/include/CGAL/Segment_tree_d.h $ -// $Id: Segment_tree_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SearchStructures/include/CGAL/Segment_tree_d.h $ +// $Id: include/CGAL/Segment_tree_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -263,7 +263,7 @@ class Segment_tree_d: public Tree_base< C_Data, C_Window> } else { - // recursiv call for the construction. the interval is devided. + // recursiv call for the construction. the interval is divided. build_segment_tree(n - (int)n/2, leftchild, rightchild, prevchild, leftmostlink, index, last, keys); link_type vparent = new_Segment_tree_node_t @@ -533,9 +533,9 @@ class Segment_tree_d: public Tree_base< C_Data, C_Window> } else { - CGAL_Tree_warning_msg(m_interface.comp(m_interface.get_left(*count), - m_interface.get_right(*count)), - "invalid segment ignored"); + CGAL_warning_msg(m_interface.comp(m_interface.get_left(*count), + m_interface.get_right(*count)), + "invalid segment ignored"); } count++; } @@ -627,9 +627,9 @@ class Segment_tree_d: public Tree_base< C_Data, C_Window> if(is_less_equal(m_interface.get_right_win(win), m_interface.get_left_win(win))) { - CGAL_Tree_warning_msg(m_interface.comp(m_interface.get_right_win(win), - m_interface.get_left_win(win)), - "invalid window -- query ignored"); + CGAL_warning_msg(m_interface.comp(m_interface.get_right_win(win), + m_interface.get_left_win(win)), + "invalid window -- query ignored"); return result; } link_type v = root(); @@ -680,9 +680,9 @@ class Segment_tree_d: public Tree_base< C_Data, C_Window> if(is_less_equal(m_interface.get_right_win(win), m_interface.get_left_win(win))) { - CGAL_Tree_warning_msg(m_interface.comp(m_interface.get_right_win(win), - m_interface.get_left_win(win)), - "invalid window -- query ignored"); + CGAL_warning_msg(m_interface.comp(m_interface.get_right_win(win), + m_interface.get_left_win(win)), + "invalid window -- query ignored"); return result; } link_type v = root(); diff --git a/thirdparty/CGAL/include/CGAL/Segment_tree_k.h b/thirdparty/CGAL/include/CGAL/Segment_tree_k.h index 47dddcc8..8bc9a08b 100644 --- a/thirdparty/CGAL/include/CGAL/Segment_tree_k.h +++ b/thirdparty/CGAL/include/CGAL/Segment_tree_k.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/SearchStructures/include/CGAL/Segment_tree_k.h $ -// $Id: Segment_tree_k.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SearchStructures/include/CGAL/Segment_tree_k.h $ +// $Id: include/CGAL/Segment_tree_k.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h b/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h index 1680a451..1a5a8dff 100644 --- a/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h +++ b/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h $ -// $Id: is_pullout_direction.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h $ +// $Id: include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Shahar @@ -151,7 +151,7 @@ is_pullout_direction(const CGAL::Polygon_2& pgn, segment_outer_circle.second, segment_outer_circle.first); if (!isordered) { - // unlikely, this if must be true atleast once for any polygon - add ref + // unlikely, this if must be true at least once for any polygon - add ref // to paper if (top_edge== pgn.edges_end()) top_edge=e_it; else return pgn.edges_end(); @@ -198,7 +198,7 @@ is_pullout_direction(const CGAL::Polygon_2& pgn, } } // namespace Single_mold_translational_casting -} // namesapce Set_movable_separability_2 -} // namesapce CGAL +} // namespace Set_movable_separability_2 +} // namespace CGAL #endif diff --git a/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h b/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h index 06cd23f4..8c66f769 100644 --- a/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h +++ b/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h $ -// $Id: pullout_directions.h 1f45360 2021-01-26T09:05:24+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h $ +// $Id: include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Shahar @@ -32,7 +32,7 @@ namespace Single_mold_translational_casting { * intersection in [firstClockwise,secondClockwise]. * When a new semicircle appear the possible cases are as such: * (let f:=firstClockwise, s:=secondClockwise, a:=newSemicircleFirstClockwise , b:=newSemicircleSecondClockwise) - * REMEBER THAT THIS ARE SEGMENTS ON A CIRCLE! NOT ON A LINE! + * REMEMBER THAT THIS ARE SEGMENTS ON A CIRCLE! NOT ON A LINE! * 1. [f,s] contained in [a,b] * f s * f s * f s * f s * a b * a b * a b * a b @@ -61,7 +61,7 @@ namespace Single_mold_translational_casting { * f s * f s * a b * b a * __________________* __________________ - * THIS CASE CANT HAPPEN!! [a,b] is an semicircle, and (f,s) is a semicircle or less + * THIS CASE CAN'T HAPPEN!! [a,b] is a semicircle, and (f,s) is a semicircle or less */ template std::pair diff --git a/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/internal/Circle_arrangment.h b/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/internal/Circle_arrangment.h index 1e2b26fd..f9cd6459 100644 --- a/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/internal/Circle_arrangment.h +++ b/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/internal/Circle_arrangment.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/internal/Circle_arrangment.h $ -// $Id: Circle_arrangment.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/internal/Circle_arrangment.h $ +// $Id: include/CGAL/Set_movable_separability_2/internal/Circle_arrangment.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Shahar @@ -242,7 +242,7 @@ class Circle_arrangment { * \param[in] segment_outer_circle - the outer circle of the current segment of * the polygon. * \param[in] edge_ite this segment iterator - * This is the main funtion of this code. It separates the cells in which the + * This is the main function of this code. It separates the cells in which the * endpoints of the new arc is contained to two parts and increase m_count * for all the cells that the new arc covers. In the end the function * merge_adjacent_2_edges_and_remove_empty is called to remove redundant cells @@ -409,7 +409,7 @@ class Circle_arrangment { * add_segment_outer_circle() which calls * merge_adjacent_2_edges_and_remove_empty(). * - * The funtions checks that the whole circle is a single cell, which can + * The functions checks that the whole circle is a single cell, which can * happen only if this cell is of depth 2, so there is no need to check the * depth as well. * \return if all of the arrangement is in depth 2+ diff --git a/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/internal/Utils.h b/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/internal/Utils.h index 221071ac..82369941 100644 --- a/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/internal/Utils.h +++ b/thirdparty/CGAL/include/CGAL/Set_movable_separability_2/internal/Utils.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/internal/Utils.h $ -// $Id: Utils.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/internal/Utils.h $ +// $Id: include/CGAL/Set_movable_separability_2/internal/Utils.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Shahar diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection.h b/thirdparty/CGAL/include/CGAL/Shape_detection.h index 64ca5129..177c1e5d 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection.h $ -// $Id: Shape_detection.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection.h $ +// $Id: include/CGAL/Shape_detection.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,7 +14,15 @@ #ifndef CGAL_SHAPE_DETECTION_H #define CGAL_SHAPE_DETECTION_H +/// \cond SKIP_IN_MANUAL #include +/// \endcond + +/** +* \ingroup PkgShapeDetectionRef +* \file CGAL/Shape_detection.h +* A convenience header that includes all classes for shape detection. +*/ #include #include diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC.h index ca18e4e9..d9883fae 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC.h $ -// $Id: Efficient_RANSAC.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC.h $ +// $Id: include/CGAL/Shape_detection/Efficient_RANSAC.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,7 +14,15 @@ #ifndef CGAL_SHAPE_DETECTION_EFFICIENT_RANSAC_HEADERS_H #define CGAL_SHAPE_DETECTION_EFFICIENT_RANSAC_HEADERS_H +/// \cond SKIP_IN_MANUAL #include +/// \endcond + +/** +* \ingroup PkgShapeDetectionRef +* \file CGAL/Shape_detection/Efficient_RANSAC.h +* A convenience header that includes all classes related to the efficient RANSAC algorithm. +*/ #include #include diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Cone.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Cone.h index 225e3af2..a53975f1 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Cone.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Cone.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Cone.h $ -// $Id: Cone.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Cone.h $ +// $Id: include/CGAL/Shape_detection/Efficient_RANSAC/Cone.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Cylinder.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Cylinder.h index 67620edb..d515f293 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Cylinder.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Cylinder.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Cylinder.h $ -// $Id: Cylinder.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Cylinder.h $ +// $Id: include/CGAL/Shape_detection/Efficient_RANSAC/Cylinder.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h index 900dc916..9e9445e2 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h $ -// $Id: Efficient_RANSAC.h 5f0ed6b 2021-07-29T15:26:22+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h $ +// $Id: include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -37,7 +37,7 @@ // boost -------------- #include -#include +#include #include //--------------------- @@ -104,36 +104,36 @@ class Efficient_RANSAC { #ifdef DOXYGEN_RUNNING typedef unspecified_type Shape_range; - ///< `Iterator_range` with a bidirectional constant iterator type with value type `boost::shared_ptr`. + ///< `Iterator_range` with a bidirectional constant iterator type with value type `std::shared_ptr`. typedef unspecified_type Plane_range; - ///< `Iterator_range` with a bidirectional constant iterator type with value type `boost::shared_ptr`. + ///< `Iterator_range` with a bidirectional constant iterator type with value type `std::shared_ptr`. #else struct Shape_range : public Iterator_range< - typename std::vector >::const_iterator> { + typename std::vector >::const_iterator> { typedef Iterator_range< - typename std::vector >::const_iterator> Base; + typename std::vector >::const_iterator> Base; - Shape_range(boost::shared_ptr > > + Shape_range(std::shared_ptr > > extracted_shapes) : Base(make_range(extracted_shapes->begin(), extracted_shapes->end())), m_extracted_shapes(extracted_shapes) {} private: - boost::shared_ptr > > + std::shared_ptr > > m_extracted_shapes; // keeps a reference to the shape vector }; struct Plane_range : public Iterator_range< - typename std::vector >::const_iterator> { + typename std::vector >::const_iterator> { typedef Iterator_range< - typename std::vector >::const_iterator> Base; + typename std::vector >::const_iterator> Base; - Plane_range(boost::shared_ptr > > + Plane_range(std::shared_ptr > > extracted_shapes) : Base(make_range(extracted_shapes->begin(), extracted_shapes->end())), m_extracted_shapes(extracted_shapes) {} private: - boost::shared_ptr > > + std::shared_ptr > > m_extracted_shapes; // keeps a reference to the shape vector }; @@ -291,7 +291,7 @@ class Efficient_RANSAC { clear(); m_extracted_shapes = - boost::make_shared > >(); + std::make_shared > >(); m_num_available_points = m_num_total_points = std::distance( m_input_iterator_first, m_input_iterator_beyond); @@ -435,7 +435,7 @@ class Efficient_RANSAC { std::vector().swap(m_shape_index); m_extracted_shapes = - boost::make_shared > >(); + std::make_shared > >(); m_num_available_points = m_num_total_points; @@ -488,7 +488,7 @@ class Efficient_RANSAC { // Reset data structures possibly used by former search m_extracted_shapes = - boost::make_shared > >(); + std::make_shared > >(); m_num_available_points = m_num_total_points; for (std::size_t i = 0; i < m_num_subsets; i++) { @@ -755,7 +755,7 @@ class Efficient_RANSAC { //1. add best candidate to final result. m_extracted_shapes->push_back( - boost::shared_ptr(best_candidate)); + std::shared_ptr(best_candidate)); if (callback && !callback(num_invalid / double(m_num_total_points))) { clear(num_invalid, candidates); @@ -874,7 +874,7 @@ class Efficient_RANSAC { /// @{ /*! Returns an `Iterator_range` with a bidirectional iterator with value type - `boost::shared_ptr` over the detected shapes in the order of detection. + `std::shared_ptr` over the detected shapes in the order of detection. Depending on the chosen probability for the detection, the shapes are ordered with decreasing size. */ @@ -884,21 +884,21 @@ class Efficient_RANSAC { /*! Returns an `Iterator_range` with a bidirectional iterator with - value type `boost::shared_ptr` over only the + value type `std::shared_ptr` over only the detected planes in the order of detection. Depending on the chosen probability for the detection, the planes are ordered with decreasing size. */ Plane_range planes() const { - boost::shared_ptr > > planes - = boost::make_shared > >(); + std::shared_ptr > > planes + = std::make_shared > >(); for (std::size_t i = 0; i < m_extracted_shapes->size(); ++i) { - boost::shared_ptr pshape - = boost::dynamic_pointer_cast((*m_extracted_shapes)[i]); + std::shared_ptr pshape + = std::dynamic_pointer_cast((*m_extracted_shapes)[i]); // Ignore all shapes other than plane - if (pshape != boost::shared_ptr()) + if (pshape != std::shared_ptr()) planes->push_back(pshape); } return Plane_range(planes); @@ -1218,7 +1218,7 @@ class Efficient_RANSAC { //give the index of the subset of point i std::vector m_index_subsets; - boost::shared_ptr > > m_extracted_shapes; + std::shared_ptr > > m_extracted_shapes; std::vector m_shape_factories; diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC_traits.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC_traits.h index 0963feec..6cae176b 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC_traits.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC_traits.h $ -// $Id: Efficient_RANSAC_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC_traits.h $ +// $Id: include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,7 @@ namespace CGAL { \ingroup PkgShapeDetectionRANSAC \brief %Default traits class for the `CGAL::Shape_detection::Efficient_RANSAC`. - \cgalModels `EfficientRANSACTraits` + \cgalModels{EfficientRANSACTraits} \tparam Gt must be a model of the concept `Kernel` with `Gt::FT` being `float` or `double`. diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Octree.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Octree.h index 0ad0bc21..bb79fc13 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Octree.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Octree.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Octree.h $ -// $Id: Octree.h 8e7ea14 2021-04-14T10:57:53+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Octree.h $ +// $Id: include/CGAL/Shape_detection/Efficient_RANSAC/Octree.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Plane.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Plane.h index cba1c6a0..26610eb2 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Plane.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Plane.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Plane.h $ -// $Id: Plane.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Plane.h $ +// $Id: include/CGAL/Shape_detection/Efficient_RANSAC/Plane.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Shape_base.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Shape_base.h index 5b2d3883..68048439 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Shape_base.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Shape_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Shape_base.h $ -// $Id: Shape_base.h ae8ec55 2021-01-19T09:54:58+01:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Shape_base.h $ +// $Id: include/CGAL/Shape_detection/Efficient_RANSAC/Shape_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Sphere.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Sphere.h index 1bb42c90..9f40b0d5 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Sphere.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Sphere.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Sphere.h $ -// $Id: Sphere.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Sphere.h $ +// $Id: include/CGAL/Shape_detection/Efficient_RANSAC/Sphere.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Torus.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Torus.h index e9a4f93d..aaf09c55 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Torus.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/Torus.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Torus.h $ -// $Id: Torus.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Torus.h $ +// $Id: include/CGAL/Shape_detection/Efficient_RANSAC/Torus.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/property_map.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/property_map.h index 66085994..a80f9dd5 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/property_map.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Efficient_RANSAC/property_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/property_map.h $ -// $Id: property_map.h 590ddf8 2021-10-08T15:38:47+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/property_map.h $ +// $Id: include/CGAL/Shape_detection/Efficient_RANSAC/property_map.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -31,7 +31,7 @@ namespace Shape_detection { class Point_to_shape_index_map { typedef CGAL::Shape_detection::Shape_base Shape; - boost::shared_ptr > m_indices; + std::shared_ptr > m_indices; public: typedef std::size_t key_type; ///< %Index of the point in the random access point range. @@ -50,7 +50,7 @@ namespace Shape_detection { \tparam ShapeRange must be an `Iterator_range` with a bidirectional constant iterator type with value type - `boost::shared_ptr >`. + `std::shared_ptr >`. */ template Point_to_shape_index_map (const PointRange& points, @@ -85,7 +85,7 @@ namespace Shape_detection { { public: typedef CGAL::Shape_detection::Plane Plane_shape; - typedef boost::shared_ptr key_type; + typedef std::shared_ptr key_type; typedef typename Traits::Plane_3 value_type; typedef value_type reference; typedef boost::read_write_property_map_tag category; diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing.h index b218ac5f..e546ffd7 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection/Region_growing.h $ -// $Id: Region_growing.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing.h $ +// $Id: include/CGAL/Shape_detection/Region_growing.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,10 +14,19 @@ #ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_HEADERS_H #define CGAL_SHAPE_DETECTION_REGION_GROWING_HEADERS_H +/// \cond SKIP_IN_MANUAL #include +/// \endcond + +/** +* \ingroup PkgShapeDetectionRef +* \file CGAL/Shape_detection/Region_growing.h +* A convenience header that includes all classes related to the region growing algorithm. +*/ #include -#include -#include +#include +#include +#include #endif // CGAL_SHAPE_DETECTION_REGION_GROWING_HEADERS_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set.h new file mode 100644 index 00000000..44979146 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set.h @@ -0,0 +1,42 @@ +// Copyright (c) 2018 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Point_set.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Florent Lafarge, Simon Giraudot, Thien Hoang, Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_H + +/// \cond SKIP_IN_MANUAL +#include +/// \endcond + +/** +* \ingroup PkgShapeDetectionRef +* \file CGAL/Shape_detection/Region_growing/Point_set.h +* A convenience header that includes all classes related to the region growing algorithm on a point set. +*/ + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/K_neighbor_query.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/K_neighbor_query.h new file mode 100644 index 00000000..d327f799 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/K_neighbor_query.h @@ -0,0 +1,245 @@ +// Copyright (c) 2018 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/K_neighbor_query.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Point_set/K_neighbor_query.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Florent Lafarge, Simon Giraudot, Thien Hoang, Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_K_NEIGHBOR_QUERY_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_K_NEIGHBOR_QUERY_H + +#include + +// CGAL includes. +#include +#include +#include +#include +#include +#include + +// Internal includes. +#include +#include + +namespace CGAL { +namespace Shape_detection { +namespace Point_set { + + /*! + \ingroup PkgShapeDetectionRGOnPoints + + \brief K nearest neighbors search in a set of 2D or 3D points. + + This class returns the K nearest neighbors of a query point in a point set. + + \tparam GeomTraits + a model of `Kernel` + + \tparam Item_ + a descriptor representing a given point. Must be a model of `Hashable`. + + \tparam PointMap + a model of `ReadablePropertyMap` whose key type is the value type of the input + range and value type is `Kernel::Point_2` or `Kernel::Point_3` + + \cgalModels{NeighborQuery} + */ + template< + typename GeomTraits, + typename Item_, + typename PointMap> + class K_neighbor_query { + + public: + /// \cond SKIP_IN_MANUAL + using Traits = GeomTraits; + using Point_map = PointMap; + using Point_type = typename boost::property_traits::value_type; + /// \endcond + + /// Item type. Needs to be compatible to Region_type::Item. + using Item = Item_; + using Region = std::vector; + + private: + using Search_base = typename std::conditional< + std::is_same::value, + CGAL::Search_traits_2, + CGAL::Search_traits_3 >::type; + + using Search_traits = + CGAL::Search_traits_adapter; + + using Distance = + CGAL::Distance_adapter< + Item, + PointMap, + CGAL::Euclidean_distance >; + + using Splitter = + CGAL::Sliding_midpoint; + + using Search_tree = + CGAL::Kd_tree; + + using Neighbor_search = + CGAL::Orthogonal_k_neighbor_search< + Search_traits, + Distance, + Splitter, + Search_tree>; + + using Tree = + typename Neighbor_search::Tree; + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes a Kd-tree with input points. + + \tparam InputRange + a model of `ConstRange` whose iterator type is `RandomAccessIterator` + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param input_range + an instance of `InputRange` with 2D or 3D points + + \param np + a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{item_map} + \cgalParamDescription{an instance of a model of `ReadablePropertyMap` with `InputRange::const_iterator` + as key type and `Item` as value type.} + \cgalParamDefault{A default is provided when `Item` is `InputRange::const_iterator` or its value type.} + \cgalParamNEnd + \cgalParamNBegin{k_neighbors} + \cgalParamDescription{the number of returned neighbors per each query point} + \cgalParamType{`std::size_t`} + \cgalParamDefault{12} + \cgalParamNEnd + \cgalParamNBegin{point_map} + \cgalParamDescription{an instance of `PointMap` that maps an item from `input_range` + to `Kernel::Point_2` or to `Kernel::Point_3`} + \cgalParamDefault{`PointMap()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `input_range.size() > 0` + \pre `K > 0` + */ + template + K_neighbor_query( + const InputRange& input_range, + const CGAL_NP_CLASS& np = parameters::default_values()) : + m_point_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::point_map))), + m_distance(m_point_map) + { + CGAL_precondition(input_range.size() > 0); + + using NP_helper = internal::Default_property_map_helper; + using Item_map = typename NP_helper::type; + Item_map item_map = NP_helper::get(np); + + m_tree_ptr.reset( new Tree(make_transform_iterator_from_property_map(make_prevent_deref(input_range.begin()), item_map), + make_transform_iterator_from_property_map(make_prevent_deref(input_range.end()), item_map), + Splitter(), + Search_traits(m_point_map)) ); + + const std::size_t K = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::k_neighbors), 12); + CGAL_precondition(K > 0); + m_number_of_neighbors = K; + m_tree_ptr->build(); + } + + /// @} + + /// \name Access + /// @{ + + /*! + \brief implements `NeighborQuery::operator()()`. + + This operator finds the `K` closest points to the point around the query point `query` + using a Kd-tree. These references to the points are returned in `neighbors`. + + \param query + `Item` of the query point + + \param neighbors + `Items` of points, which are neighbors of the query point + + \pre `query` is a valid const_iterator of InputRange + */ + void operator()( + const Item query, + std::vector& neighbors) const { + + neighbors.clear(); + Neighbor_search neighbor_search( + *m_tree_ptr, + get(m_point_map, query), + static_cast(m_number_of_neighbors), + 0, true, m_distance); + for (auto it = neighbor_search.begin(); it != neighbor_search.end(); ++it) + neighbors.push_back(it->first); + } + + /// @} + + /// \cond SKIP_IN_MANUAL + void set_k(const std::size_t k) { + m_number_of_neighbors = k; + } + /// \endcond + + private: + Point_map m_point_map; + std::size_t m_number_of_neighbors; + Distance m_distance; + std::shared_ptr m_tree_ptr; // TODO: move constructor? + }; + + /*! + \ingroup PkgShapeDetectionRGOnPointSet3 + shortcut to ease the definition of the class when using `CGAL::Point_set_3`. + To be used together with `make_k_neighbor_query()`. + \relates K_neighbor_query + */ + template + using K_neighbor_query_for_point_set = + K_neighbor_query::Kernel, + typename PointSet3::Index, + typename PointSet3::Point_map>; + + /*! + \ingroup PkgShapeDetectionRGOnPointSet3 + returns an instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`. + \relates K_neighbor_query + */ + template + K_neighbor_query_for_point_set + make_k_neighbor_query(const PointSet3& ps, CGAL_NP_CLASS np = parameters::default_values()) + { + return K_neighbor_query_for_point_set( + ps, np.point_map(ps.point_map())); + } + +} // namespace Point_set +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_K_NEIGHBOR_QUERY_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_circle_fit_region.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_circle_fit_region.h new file mode 100644 index 00000000..c96d35ed --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_circle_fit_region.h @@ -0,0 +1,410 @@ +// Copyright (c) 2020 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_circle_fit_region.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_circle_fit_region.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Simon Giraudot +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_CIRCLE_FIT_REGION_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_CIRCLE_FIT_REGION_H + +#include + +// Internal includes. +#include + +#include + +namespace CGAL { +namespace Shape_detection { +namespace Point_set { + + /*! + \ingroup PkgShapeDetectionRGOnPoints + + \brief Region type based on the quality of the least squares circle + fit applied to 2D points. + + This class fits a circle to chunks of points in a 2D point set and + controls the quality of this fit. If all quality conditions are + satisfied, the chunk is accepted as a valid region, otherwise + rejected. + + \tparam GeomTraits + a model of `Kernel` + + \tparam Item_ + a descriptor representing a given point. Must be a model of `Hashable`. + + \tparam PointMap + a model of `ReadablePropertyMap` whose key type is `Item` and value type is `Kernel::Point_2` + + \tparam NormalMap + a model of `ReadablePropertyMap` whose key type is `Item` and value type is `Kernel::Vector_2` + + \cgalModels{RegionType} + */ + template< + typename GeomTraits, + typename Item_, + typename PointMap, + typename NormalMap> + class Least_squares_circle_fit_region { + + public: + /// \name Types + /// @{ + + /// \cond SKIP_IN_MANUAL + using Point_map = PointMap; + using Normal_map = NormalMap; + /// \endcond + + /// Item type + using Item = Item_; + + /// Number type. + using FT = typename GeomTraits::FT; + + /// Region type. + using Region = std::vector; + +#ifdef DOXYGEN_RUNNING + /// Primitive + using Primitive = struct { + typename GeomTraits::Point_2 center; + typename GeomTraits::FT radius; + }; +#else + /// Primitive + using Primitive = struct P { + P(const typename GeomTraits::Point_2& c, typename GeomTraits::FT r) : center(c), radius(r) {} + + typename GeomTraits::Point_2 center; + typename GeomTraits::FT radius; + }; +#endif + /// Region map + using Region_unordered_map = std::unordered_map >; + using Region_index_map = boost::associative_property_map; + /// @} + + private: + using Point_2 = typename GeomTraits::Point_2; + using Vector_2 = typename GeomTraits::Vector_2; + + using Squared_distance_2 = typename GeomTraits::Compute_squared_distance_2; + using Get_sqrt = internal::Get_sqrt; + using Sqrt = typename Get_sqrt::Sqrt; + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param np + an optional sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{maximum_distance} + \cgalParamDescription{the maximum distance from a point to a circle} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{1} + \cgalParamNEnd + \cgalParamNBegin{maximum_angle} + \cgalParamDescription{the maximum angle in degrees between + the normal of a point and the radius of a circle} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{25 degrees} + \cgalParamNEnd + \cgalParamNBegin{cosine_of_maximum_angle} + \cgalParamDescription{the cos value computed as `cos(maximum_angle * PI / 180)`, + this parameter can be used instead of the `maximum_angle`} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{`cos(25 * PI / 180)`} + \cgalParamNEnd + \cgalParamNBegin{minimum_region_size} + \cgalParamDescription{the minimum number of 2D points a region must have} + \cgalParamType{`std::size_t`} + \cgalParamDefault{3} + \cgalParamNEnd + \cgalParamNBegin{minimum_radius} + \cgalParamDescription{the radius below which an estimated circle + is considered as invalid and discarded} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{0, no limit} + \cgalParamNEnd + \cgalParamNBegin{maximum_radius} + \cgalParamDescription{the radius above which an estimated circle + is considered as invalid and discarded.} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{+infinity, no limit} + \cgalParamNEnd + \cgalParamNBegin{point_map} + \cgalParamDescription{an instance of `PointMap` that maps an item to `Kernel::Point_2`} + \cgalParamDefault{`PointMap()`} + \cgalParamNEnd + \cgalParamNBegin{normal_map} + \cgalParamDescription{an instance of `NormalMap` that maps an item to `Kernel::Vector_2`} + \cgalParamDefault{`NormalMap()`} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of `GeomTraits`} + \cgalParamDefault{`GeomTraits()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `maximum_distance >= 0` + \pre `maximum_angle >= 0 && maximum_angle <= 90` + \pre `cosine_of_maximum_angle >= 0 && cosine_of_maximum_angle <= 1` + \pre `minimum_region_size > 0` + \pre `minimum_radius >= 0` + \pre `maximum_radius >= minimum_radius` + */ + template + Least_squares_circle_fit_region( + const CGAL_NP_CLASS& np = parameters::default_values()) : + m_point_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::point_map))), + m_normal_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::normal_map))), + m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))), + m_sqrt(Get_sqrt::sqrt_object(m_traits)), + m_squared_distance_2(m_traits.compute_squared_distance_2_object()) { + + const FT max_distance = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_distance), FT(1)); + CGAL_precondition(max_distance >= FT(0)); + m_distance_threshold = max_distance; + + const FT max_angle = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_angle), FT(25)); + CGAL_precondition(max_angle >= FT(0) && max_angle <= FT(90)); + + m_min_region_size = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::minimum_region_size), 3); + CGAL_precondition(m_min_region_size > 0); + + const FT default_cos_value = static_cast(std::cos(CGAL::to_double( + (max_angle * static_cast(CGAL_PI)) / FT(180)))); + const FT cos_value = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::cosine_of_maximum_angle), default_cos_value); + CGAL_precondition(cos_value >= FT(0) && cos_value <= FT(1)); + m_cos_value_threshold = cos_value; + + m_min_radius = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::minimum_radius), FT(0)); + CGAL_precondition(m_min_radius >= FT(0)); + + m_max_radius = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_radius), + FT((std::numeric_limits::max)())); + CGAL_precondition(m_max_radius >= m_min_radius); + } + + /// @} + + /// \name Access + /// @{ + + /*! + \brief implements `RegionType::region_index_map()`. + + This function creates an empty property map that maps iterators on the input range `Item` to std::size_t + */ + Region_index_map region_index_map() { + return Region_index_map(m_region_map); + } + + /*! + \brief implements `RegionType::primitive()`. + + This function provides the last primitive that has been fitted with the region. + + \return Primitive parameters that fits the region + + \pre `successful fitted primitive via successful call of update(region) with a sufficient large region` + */ + Primitive primitive() const { + return Primitive(m_center, m_radius); + } + + /*! + \brief implements `RegionType::is_part_of_region()`. + + This function controls if a point with the item `query` is within + the `maximum_distance` from the corresponding circle and if the angle between + its normal and the circle radius is within the `maximum_angle`. If both conditions + are satisfied, it returns `true`, otherwise `false`. + + \param query + item of the query point + + \param region + inlier items of the region + + \return Boolean `true` or `false` + + */ + bool is_part_of_region( + const Item query, + const Region& region) const { + + // First, we need to integrate at least 6 points so that the + // computed circle means something. + if (region.size() < 6) { + return true; + } + + // TODO: Why do we get so many nan in this class? + if (std::isnan(CGAL::to_double(m_radius))) { + return false; + } + + // If radius is out of bound, nothing fits, early ending. + if (m_radius < m_min_radius || m_radius > m_max_radius) { + return false; + } + + const Point_2& query_point = get(m_point_map, query); + Vector_2 normal = get(m_normal_map, query); + + const FT sq_dist = m_squared_distance_2(query_point, m_center); + if (std::isnan(CGAL::to_double(sq_dist))) return false; + const FT distance_to_center = m_sqrt(sq_dist); + const FT distance_to_circle = CGAL::abs(distance_to_center - m_radius); + + if (distance_to_circle > m_distance_threshold) { + return false; + } + + const FT sq_norm = normal * normal; + if (std::isnan(CGAL::to_double(sq_norm))) return false; + normal = normal / m_sqrt(sq_norm); + + Vector_2 ray(m_center, query_point); + const FT sq_ray = ray * ray; + if (std::isnan(CGAL::to_double(sq_ray))) return false; + ray = ray / m_sqrt(sq_ray); + + if (CGAL::abs(normal * ray) < m_cos_value_threshold) { + return false; + } + return true; + } + + /*! + \brief implements `RegionType::is_valid_region()`. + + This function controls if the estimated radius is between `minimum_radius` + and `maximum_radius` and if the `region` contains at least `min_region_size` points. + + \param region + indices of points included in the region + + \return Boolean `true` or `false` + */ + inline bool is_valid_region(const Region& region) const { + return ( + (m_min_radius <= m_radius && m_radius <= m_max_radius) && + (region.size() >= m_min_region_size) + ); + } + + /*! + \brief implements `RegionType::update()`. + + This function fits the least squares circle to all points from the `region`. + + \param region + indices of points included in the region + + \return Boolean `true` if the circle fitting succeeded and `false` otherwise + + \pre `region.size() > 0` + */ + bool update(const Region& region) { + + // Fit a circle. + CGAL_precondition(region.size() > 0); + FT radius; Point_2 center; + std::tie(radius, center) = internal::create_circle_2( + region, m_point_map, m_traits, false).first; + if (radius > FT(0)) { + m_radius = radius; + m_center = center; + } + return true; + } + + /// @} + + /// \cond SKIP_IN_MANUAL + std::pair get_circle( + const Region& region) const { + return internal::create_circle_2( + region, m_point_map, m_traits, false).first; + } + /// \endcond + + private: + const Point_map m_point_map; + const Normal_map m_normal_map; + const GeomTraits m_traits; + Region_unordered_map m_region_map; + + FT m_distance_threshold; + FT m_cos_value_threshold; + std::size_t m_min_region_size; + FT m_min_radius; + FT m_max_radius; + + const Sqrt m_sqrt; + const Squared_distance_2 m_squared_distance_2; + + FT m_radius; + Point_2 m_center; + }; + + /*! + \ingroup PkgShapeDetectionRGOnPointSet3 + shortcut to ease the definition of the class when using `CGAL::Point_set_3`. + To be used together with `make_least_squares_sphere_fit_sorting()`. + \relates Least_squares_circle_fit_region + */ + template + using Least_squares_circle_fit_region_for_point_set = + Least_squares_circle_fit_region::Kernel, + typename PointSet3::Index, + typename PointSet3::Point_map, + typename PointSet3::Vector_map>; + + /*! + \ingroup PkgShapeDetectionRGOnPointSet3 + returns an instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`. + \relates Least_squares_circle_fit_region + */ + template + Least_squares_circle_fit_region_for_point_set + make_least_squares_circle_fit_region(const PointSet3& ps, + CGAL_NP_CLASS np = parameters::default_values()) + { + return Least_squares_circle_fit_region_for_point_set( + np.point_map(ps.point_map()).normal_map(ps.normal_map())); + } + +} // namespace Point_set +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_CIRCLE_FIT_REGION_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_circle_fit_sorting.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_circle_fit_sorting.h new file mode 100644 index 00000000..f16f797f --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_circle_fit_sorting.h @@ -0,0 +1,245 @@ +// Copyright (c) 2021 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_circle_fit_sorting.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_circle_fit_sorting.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Simon Giraudot +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_CIRCLE_FIT_SORTING_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_CIRCLE_FIT_SORTING_H + +#include + +// Internal includes. +#include +#include + +namespace CGAL { +namespace Shape_detection { +namespace Point_set { + + /*! + \ingroup PkgShapeDetectionRGOnPoints + + \brief Sorting of 2D points with respect to the local circle fit quality. + + Indices of 2D input points are sorted with respect to the quality of the + least squares circle fit applied to the neighboring points of each point. + + \tparam GeomTraits + a model of `Kernel` + + \tparam Item_ + a descriptor representing a given point. Must be a model of `Hashable`. + + \tparam NeighborQuery + a model of `NeighborQuery` + + \tparam PointMap + a model of `ReadablePropertyMap` whose key type is the value type of the input + range and value type is `Kernel::Point_2` + */ + template< + typename GeomTraits, + typename Item_, + typename NeighborQuery, + typename PointMap> + class Least_squares_circle_fit_sorting { + + public: + /// \name Types + /// @{ + + /// \cond SKIP_IN_MANUAL + using Traits = GeomTraits; + using Neighbor_query = NeighborQuery; + using Point_map = PointMap; + /// \endcond + + /// Item type. + using Item = Item_; + + /// Seed range. + using Seed_range = std::vector; + + /// @} + + private: + using FT = typename Traits::FT; + using Compare_scores = internal::Compare_scores; + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + + \tparam InputRange + a model of `ConstRange` whose iterator type is `RandomAccessIterator` + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param input_range + an instance of `InputRange` with 2D points + + \param neighbor_query + an instance of `NeighborQuery` that is used internally to + access point's neighbors + + \param np + a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{item_map} + \cgalParamDescription{an instance of a model of `ReadablePropertyMap` with `InputRange::const_iterator` + as key type and `Item` as value type.} + \cgalParamDefault{A default is provided when `Item` is `InputRange::const_iterator` or its value type.} + \cgalParamNEnd + \cgalParamNBegin{point_map} + \cgalParamDescription{an instance of `PointMap` that maps an item to `Kernel::Point_2`} + \cgalParamDefault{`PointMap()`} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of `GeomTraits`} + \cgalParamDefault{`GeomTraits()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `input_range.size() > 0` + */ + template + Least_squares_circle_fit_sorting( + const InputRange& input_range, + NeighborQuery& neighbor_query, + const CGAL_NP_CLASS& np = parameters::default_values()) : + m_neighbor_query(neighbor_query), + m_point_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::point_map))), + m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))) + { + CGAL_precondition(input_range.size() > 0); + + m_ordered.resize(input_range.size()); + + using NP_helper = internal::Default_property_map_helper; + using Item_map = typename NP_helper::type; + Item_map item_map = NP_helper::get(np); + + std::size_t index = 0; + for (auto it = input_range.begin(); it != input_range.end(); it++) + m_ordered[index++] = get(item_map, it); + + m_scores.resize(input_range.size()); + } + + /// @} + + /// \name Sorting + /// @{ + + /*! + \brief sorts `Items` of input points. + */ + void sort() { + std::size_t seed_cutoff = compute_scores(); + + CGAL_precondition(m_scores.size() > 0); + Compare_scores cmp(m_scores); + + std::vector order(m_ordered.size()); + std::iota(order.begin(), order.end(), 0); + std::sort(order.begin(), order.end(), cmp); + + order.resize(m_ordered.size() - seed_cutoff); + + std::vector tmp(order.size()); + for (std::size_t i = 0; i < order.size(); i++) + tmp[i] = m_ordered[order[i]]; + + m_ordered.swap(tmp); + } + /// @} + + /// \name Access + /// @{ + + /*! + \brief returns an instance of `Seed_range` to access the ordered `Items` + of input points. + */ + const Seed_range ordered() { + return m_ordered; + } + /// @} + + private: + Neighbor_query& m_neighbor_query; + const Point_map m_point_map; + const Traits m_traits; + Seed_range m_ordered; + std::vector m_scores; + + std::size_t compute_scores() { + + std::vector neighbors; + std::size_t idx = 0; + std::size_t seed_cutoff = 0; + for (const Item& item :m_ordered) { + neighbors.clear(); + m_neighbor_query(item, neighbors); + neighbors.push_back(item); + + m_scores[idx] = internal::create_circle_2( + neighbors, m_point_map, m_traits, true).second; + + if (m_scores[idx] == -(std::numeric_limits::max)()) + seed_cutoff++; + + idx++; + } + + return seed_cutoff; + } + }; + + /*! + \ingroup PkgShapeDetectionRGOnPointSet3 + shortcut to ease the definition of the class when using `CGAL::Point_set_3`. + To be used together with `make_least_squares_circle_fit_sorting()`. + \relates Least_squares_circle_fit_sorting + */ + template + using Least_squares_circle_fit_sorting_for_point_set = + Least_squares_circle_fit_sorting::Kernel, + typename PointSet3::Index, + NeighborQuery, + typename PointSet3::Point_map>; + + /*! + \ingroup PkgShapeDetectionRGOnPointSet3 + returns an instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`. + \relates Least_squares_circle_fit_sorting + */ + template + Least_squares_circle_fit_sorting_for_point_set + make_least_squares_circle_fit_sorting(const PointSet3& ps, + NeighborQuery& neighbor_query, + const CGAL_NP_CLASS np = parameters::default_values()) + { + return Least_squares_circle_fit_sorting_for_point_set + (ps, neighbor_query, np.point_map(ps.point_map())); + } + +} // namespace Point_set +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_LINE_FIT_SORTING_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_region.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_region.h new file mode 100644 index 00000000..02994502 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_region.h @@ -0,0 +1,417 @@ +// Copyright (c) 2020 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_region.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_region.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Simon Giraudot +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_CYLINDER_FIT_REGION_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_CYLINDER_FIT_REGION_H + +#include + + +// Internal includes. +#include +#include + +namespace CGAL { +namespace Shape_detection { +namespace Point_set { + + /*! + \ingroup PkgShapeDetectionRGOnPoints + + \brief Region type based on the quality of the least squares cylinder + fit applied to 3D points. + + This class fits an infinite cylinder to chunks of points in a 3D + point set and controls the quality of this fit. If all quality + conditions are satisfied, the chunk is accepted as a valid region, + otherwise rejected. + + \tparam GeomTraits + a model of `Kernel` + + \tparam Item_ + a descriptor representing a given point. Must be a model of `Hashable`. + + \tparam PointMap + a model of `ReadablePropertyMap` whose key type `Item` and value type is `Kernel::Point_3` + + \tparam NormalMap + a model of `ReadablePropertyMap` whose key type is `Item` and value type is `Kernel::Vector_3` + + \cgalModels{RegionType} + */ + template< + typename GeomTraits, + typename Item_, + typename PointMap, + typename NormalMap> + class Least_squares_cylinder_fit_region { + + public: + /// \name Types + /// @{ + + /// \cond SKIP_IN_MANUAL + using Point_map = PointMap; + using Normal_map = NormalMap; + /// \endcond + + /// Number type. + typedef typename GeomTraits::FT FT; + + /// Item type. + using Item = Item_; + using Region = std::vector; + + /// Primitive +#ifdef DOXYGEN_RUNNING + using Primitive = struct { + typename GeomTraits::Line_3 axis; + typename GeomTraits::FT radius; + }; +#else + using Primitive = struct P { + P(const typename GeomTraits::Line_3& a, const typename GeomTraits::FT r) : axis(a), radius(r) {} + + typename GeomTraits::Line_3 axis; + typename GeomTraits::FT radius; + }; +#endif + + /// Region map + using Region_unordered_map = std::unordered_map >; + using Region_index_map = boost::associative_property_map; + /// @} + + private: + using Point_3 = typename GeomTraits::Point_3; + using Vector_3 = typename GeomTraits::Vector_3; + using Line_3 = typename GeomTraits::Line_3; + + using Squared_distance_3 = typename GeomTraits::Compute_squared_distance_3; + using Get_sqrt = internal::Get_sqrt; + using Sqrt = typename Get_sqrt::Sqrt; + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param np + a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{maximum_distance} + \cgalParamDescription{the maximum distance from a point to a cylinder} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{1} + \cgalParamNEnd + \cgalParamNBegin{maximum_angle} + \cgalParamDescription{the maximum angle in degrees between + the normal of a point and the radius of a cylinder} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{25 degrees} + \cgalParamNEnd + \cgalParamNBegin{cosine_of_maximum_angle} + \cgalParamDescription{the cos value computed as `cos(maximum_angle * PI / 180)`, + this parameter can be used instead of the `maximum_angle`} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{`cos(25 * PI / 180)`} + \cgalParamNEnd + \cgalParamNBegin{minimum_region_size} + \cgalParamDescription{the minimum number of 3D points a region must have} + \cgalParamType{`std::size_t`} + \cgalParamDefault{3} + \cgalParamNEnd + \cgalParamNBegin{minimum_radius} + \cgalParamDescription{the radius below which an estimated cylinder + is considered as invalid and discarded} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{0, no limit} + \cgalParamNEnd + \cgalParamNBegin{maximum_radius} + \cgalParamDescription{the radius above which an estimated cylinder + is considered as invalid and discarded.} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{+infinity, no limit} + \cgalParamNEnd + \cgalParamNBegin{point_map} + \cgalParamDescription{an instance of `PointMap` that maps an item to `GeomTraits::Point_3`} + \cgalParamDefault{`PointMap()`} + \cgalParamNEnd + \cgalParamNBegin{normal_map} + \cgalParamDescription{ an instance of `NormalMap` that maps an item to `GeomTraits::Vector_3`} + \cgalParamDefault{`NormalMap()`} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of `GeomTraits`} + \cgalParamDefault{`GeomTraits()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `maximum_distance >= 0` + \pre `maximum_angle >= 0 && maximum_angle <= 90` + \pre `cosine_of_maximum_angle >= 0 && cosine_of_maximum_angle <= 1` + \pre `minimum_region_size > 0` + \pre `minimum_radius >= 0` + \pre `maximum_radius >= minimum_radius` + */ + template + Least_squares_cylinder_fit_region( + const CGAL_NP_CLASS& np = parameters::default_values()) : + m_point_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::point_map))), + m_normal_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::normal_map))), + m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))), + m_sqrt(Get_sqrt::sqrt_object(m_traits)), + m_squared_distance_3(m_traits.compute_squared_distance_3_object()) { + + const FT max_distance = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_distance), FT(1)); + CGAL_precondition(max_distance >= FT(0)); + m_distance_threshold = max_distance; + + const FT max_angle = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_angle), FT(25)); + CGAL_precondition(max_angle >= FT(0) && max_angle <= FT(90)); + + m_min_region_size = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::minimum_region_size), 3); + CGAL_precondition(m_min_region_size > 0); + + const FT default_cos_value = static_cast(std::cos(CGAL::to_double( + (max_angle * static_cast(CGAL_PI)) / FT(180)))); + const FT cos_value = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::cosine_of_maximum_angle), default_cos_value); + CGAL_precondition(cos_value >= FT(0) && cos_value <= FT(1)); + m_cos_value_threshold = cos_value; + + m_min_radius = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::minimum_radius), FT(0)); + CGAL_precondition(m_min_radius >= FT(0)); + + m_max_radius = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_radius), + FT((std::numeric_limits::max)())); + CGAL_precondition(m_max_radius >= m_min_radius); + } + + /// @} + + /// \name Access + /// @{ + + /*! + \brief implements `RegionType::region_index_map()`. + + This function creates an empty property map that maps iterators on the input range `Item` to std::size_t + */ + Region_index_map region_index_map() { + return Region_index_map(m_region_map); + } + + /*! + \brief implements `RegionType::primitive()`. + + This function provides the last primitive that has been fitted with the region. + + \return Primitive parameters that fits the region + + \pre `successful fitted primitive via successful call of update(region) with a sufficient large region` + */ + Primitive primitive() const { + return Primitive(m_axis, m_radius); + } + + /*! + \brief implements `RegionType::is_part_of_region()`. + + This function controls if a point with the index `query_index` is within + the `maximum_distance` from the corresponding cylinder and if the angle between + its normal and the cylinder radius is within the `maximum_angle`. If both conditions + are satisfied, it returns `true`, otherwise `false`. + + \param query + item of the query point + + \param region + inlier items of the region + + \return Boolean `true` or `false` + + */ + bool is_part_of_region( + const Item query, + const Region& region) const { + + // First, we need to integrate at least 6 points so that the + // computed cylinder means something. + if (region.size() < 6) { + return true; + } + + if (std::isnan(CGAL::to_double(m_radius))) { + return false; + } + + // If radius is out of bound, nothing fits, early ending. + if (m_radius < m_min_radius || m_radius > m_max_radius) { + return false; + } + + const Point_3& query_point = get(m_point_map, query); + Vector_3 normal = get(m_normal_map, query); + + if (m_axis.to_vector() == Vector_3(0, 0, 0)) return false; + const FT sq_dist = m_squared_distance_3(query_point, m_axis); + if (std::isnan(CGAL::to_double(sq_dist))) return false; + const FT distance_to_center = m_sqrt(sq_dist); + const FT distance_to_cylinder = CGAL::abs(distance_to_center - m_radius); + + if (distance_to_cylinder > m_distance_threshold) { + return false; + } + + const FT sq_norm = normal * normal; + if (std::isnan(CGAL::to_double(sq_norm))) return false; + normal = normal / m_sqrt(sq_norm); + + const Point_3 proj = m_axis.projection(query_point); + Vector_3 ray(proj, query_point); + const FT sq_ray = ray * ray; + if (std::isnan(CGAL::to_double(sq_ray))) return false; + ray = ray / m_sqrt(sq_ray); + + if (CGAL::abs(normal * ray) < m_cos_value_threshold) { + return false; + } + return true; + } + + /*! + \brief implements `RegionType::is_valid_region()`. + + This function controls if the estimated radius is between `minimum_radius` + and `maximum_radius` and if the `region` contains at least `min_region_size` points. + + \param region + indices of points included in the region + + \return Boolean `true` or `false` + */ + inline bool is_valid_region(const Region& region) const { + return ( + (m_min_radius <= m_radius && m_radius <= m_max_radius) && + (region.size() >= m_min_region_size) + ); + } + + /*! + \brief implements `RegionType::update()`. + + This function fits the least squares cylinder to all points from the `region`. + + \param region + indices of points included in the region + + \return Boolean `true` if the cylinder fitting succeeded and `false` otherwise + + \pre `region.size() > 0` + */ + bool update(const Region& region) { + if (region.size() < 6) + return true; + + // Fit a cylinder. + CGAL_precondition(region.size() >= 6); + FT radius; Line_3 axis; + std::tie(radius, axis) = internal::create_cylinder( + region, m_point_map, m_normal_map, + m_traits).first; + + if (radius >= FT(0)) { + m_radius = radius; + m_axis = axis; + } + else return false; + + return true; + } + + /// @} + + /// \cond SKIP_IN_MANUAL + std::pair get_cylinder( + const Region& region) const { + return internal::create_cylinder( + region, m_point_map, m_normal_map, + m_traits).first; + } + /// \endcond + + private: + const Point_map m_point_map; + const Normal_map m_normal_map; + const GeomTraits m_traits; + Region_unordered_map m_region_map; + + FT m_distance_threshold; + FT m_cos_value_threshold; + std::size_t m_min_region_size; + FT m_min_radius; + FT m_max_radius; + + const Sqrt m_sqrt; + const Squared_distance_3 m_squared_distance_3; + + FT m_radius; + Line_3 m_axis; + }; + + /*! + \ingroup PkgShapeDetectionRGOnPointSet3 + shortcut to ease the definition of the class when using `CGAL::Point_set_3`. + To be used together with `make_least_squares_cylinder_fit_region()`. + \relates Least_squares_cylinder_fit_region + */ + template + using Least_squares_cylinder_fit_region_for_point_set = + Least_squares_cylinder_fit_region::Kernel, + typename PointSet3::Index, + typename PointSet3::Point_map, + typename PointSet3::Vector_map>; + + /*! + \ingroup PkgShapeDetectionRGOnPointSet3 + returns an instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`. + \relates Least_squares_cylinder_fit_region + */ + template + Least_squares_cylinder_fit_region_for_point_set + make_least_squares_cylinder_fit_region(const PointSet3& ps, + const CGAL_NP_CLASS np = parameters::default_values()) + { + return Least_squares_cylinder_fit_region_for_point_set + (np.point_map(ps.point_map()).normal_map(ps.normal_map())); + } + +} // namespace Point_set +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_CYLINDER_FIT_REGION_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_sorting.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_sorting.h new file mode 100644 index 00000000..cc2dfdd7 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_sorting.h @@ -0,0 +1,255 @@ +// Copyright (c) 2021 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_sorting.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_sorting.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Simon Giraudot +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_CYLINDER_FIT_SORTING_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_CYLINDER_FIT_SORTING_H + +#include + +// Internal includes. +#include +#include + +namespace CGAL { +namespace Shape_detection { +namespace Point_set { + + /*! + \ingroup PkgShapeDetectionRGOnPoints + + \brief Sorting of 3D points with respect to the local cylinder fit quality. + + Indices of 3D input points are sorted with respect to the quality of the + least squares cylinder fit applied to the neighboring points of each point. + + \tparam GeomTraits + a model of `Kernel` + + \tparam Item_ + a descriptor representing a given point. Must be a model of `Hashable`. + + \tparam NeighborQuery + a model of `NeighborQuery` + + \tparam PointMap + a model of `ReadablePropertyMap` whose key type `Item` and value type is `Kernel::Point_3` + + \tparam NormalMap + a model of `ReadablePropertyMap` whose key type is `Item` and value type is `Kernel::Vector_3` + */ + template< + typename GeomTraits, + typename Item_, + typename NeighborQuery, + typename PointMap, + typename NormalMap> + class Least_squares_cylinder_fit_sorting { + + public: + /// \name Types + /// @{ + + /// \cond SKIP_IN_MANUAL + using Traits = GeomTraits; + using Neighbor_query = NeighborQuery; + using Point_map = PointMap; + using Normal_map = NormalMap; + /// \endcond + + /// Item type. + using Item = Item_; + + /// Seed range. + using Seed_range = std::vector; + + /// @} + + private: + using FT = typename Traits::FT; + using Compare_scores = internal::Compare_scores; + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + + \tparam InputRange + a model of `ConstRange` whose iterator type is `RandomAccessIterator` + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param input_range + an instance of `InputRange` with 3D points + + \param neighbor_query + an instance of `NeighborQuery` that is used internally to + access point's neighbors + + \param np + a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{item_map} + \cgalParamDescription{an instance of a model of `ReadablePropertyMap` with `InputRange::const_iterator` + as key type and `Item` as value type.} + \cgalParamDefault{A default is provided when `Item` is `InputRange::const_iterator` or its value type.} + \cgalParamNEnd + \cgalParamNBegin{point_map} + \cgalParamDescription{an instance of `PointMap` that maps an item to `Kernel::Point_3`} + \cgalParamDefault{`PointMap()`} + \cgalParamNEnd + \cgalParamNBegin{normal_map} + \cgalParamDescription{ an instance of `NormalMap` that maps an item to `Kernel::Vector_3`} + \cgalParamDefault{`NormalMap()`} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of `GeomTraits`} + \cgalParamDefault{`GeomTraits()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `input_range.size() > 0` + */ + template + Least_squares_cylinder_fit_sorting( + const InputRange& input_range, + NeighborQuery& neighbor_query, + const CGAL_NP_CLASS& np = parameters::default_values()) : + m_neighbor_query(neighbor_query), + m_point_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::point_map))), + m_normal_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::normal_map))), + m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))) { + + CGAL_precondition(input_range.size() > 0); + + using NP_helper = internal::Default_property_map_helper; + using Item_map = typename NP_helper::type; + Item_map item_map = NP_helper::get(np); + + m_ordered.resize(input_range.size()); + + std::size_t index = 0; + for (auto it = input_range.begin(); it != input_range.end(); it++) + m_ordered[index++] = get(item_map, it); + + m_scores.resize(input_range.size()); + } + + /// @} + + /// \name Sorting + /// @{ + + /*! + \brief sorts indices of input points. + */ + void sort() { + std::size_t seed_cutoff = compute_scores(); + CGAL_postcondition(m_scores.size() > 0); + Compare_scores cmp(m_scores); + + std::vector order(m_ordered.size()); + std::iota(order.begin(), order.end(), 0); + std::sort(order.begin(), order.end(), cmp); + + order.resize(m_ordered.size() - seed_cutoff); + + std::vector tmp(order.size()); + for (std::size_t i = 0; i < order.size(); i++) + tmp[i] = m_ordered[order[i]]; + + m_ordered.swap(tmp); + } + /// @} + + /// \name Access + /// @{ + + /*! + \brief returns an instance of `Seed_range` to access the ordered `Items` + of input points. + */ + const Seed_range ordered() { + return m_ordered; + } + /// @} + + private: + Neighbor_query& m_neighbor_query; + const Point_map m_point_map; + const Normal_map m_normal_map; + const Traits m_traits; + Seed_range m_ordered; + std::vector m_scores; + + std::size_t compute_scores() { + + std::vector neighbors; + std::size_t idx = 0; + std::size_t seed_cutoff = 0; + for (const Item& item : m_ordered) { + neighbors.clear(); + m_neighbor_query(item, neighbors); + neighbors.push_back(item); + + m_scores[idx] = -internal::create_cylinder( + neighbors, m_point_map, m_normal_map, m_traits).second; + + if (m_scores[idx] == -(std::numeric_limits::max)()) + seed_cutoff++; + + idx++; + } + + return seed_cutoff; + } + }; + + /*! + \ingroup PkgShapeDetectionRGOnPointSet3 + shortcut to ease the definition of the class when using `CGAL::Point_set_3`. + To be used together with `make_least_squares_cylinder_fit_sorting()`. + \relates Least_squares_cylinder_fit_sorting + */ + template + using Least_squares_cylinder_fit_sorting_for_point_set = + Least_squares_cylinder_fit_sorting::Kernel, + typename PointSet3::Index, + NeighborQuery, + typename PointSet3::Point_map, + typename PointSet3::Vector_map>; + + /*! + \ingroup PkgShapeDetectionRGOnPointSet3 + returns an instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`. + \relates Least_squares_cylinder_fit_sorting + */ + template + Least_squares_cylinder_fit_sorting_for_point_set + make_least_squares_cylinder_fit_sorting(const PointSet3& ps, + NeighborQuery& neighbor_query, + const CGAL_NP_CLASS np = parameters::default_values()) + { + return Least_squares_cylinder_fit_sorting_for_point_set + (ps, neighbor_query, np.point_map(ps.point_map()).normal_map(ps.normal_map())); + } + +} // namespace Point_set +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_CYLINDER_FIT_SORTING_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_line_fit_region.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_line_fit_region.h new file mode 100644 index 00000000..dc89f613 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_line_fit_region.h @@ -0,0 +1,394 @@ +// Copyright (c) 2018 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_line_fit_region.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_line_fit_region.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Florent Lafarge, Simon Giraudot, Thien Hoang, Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_LINE_FIT_REGION_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_LINE_FIT_REGION_H + +#include + +// Internal includes. +#include + +#include + +namespace CGAL { +namespace Shape_detection { +namespace Point_set { + + /*! + \ingroup PkgShapeDetectionRGOnPoints + + \brief Region type based on the quality of the least squares line + fit applied to 2D points. + + This class fits a line, using \ref PkgPrincipalComponentAnalysisDRef "PCA", + to chunks of points in a 2D point set and controls the quality of this fit. + If all quality conditions are satisfied, the chunk is accepted as a valid region, + otherwise rejected. + + \tparam GeomTraits + a model of `Kernel` + + \tparam Item_ + a descriptor representing a given point. Must be a model of `Hashable`. + + \tparam PointMap + a model of `ReadablePropertyMap` whose key type is the value type of the input + range and value type is `Kernel::Point_2` + + \tparam NormalMap + a model of `ReadablePropertyMap` whose key type is the value type of the input + range and value type is `Kernel::Vector_2` + + \cgalModels{RegionType} + */ + template< + typename GeomTraits, + typename Item_, + typename PointMap, + typename NormalMap> + class Least_squares_line_fit_region { + + public: + /// \name Types + /// @{ + + /// \cond SKIP_IN_MANUAL + using Point_map = PointMap; + using Normal_map = NormalMap; + /// \endcond + + /// Number type. + typedef typename GeomTraits::FT FT; + + /// Item type. + using Item = Item_; + using Region = std::vector; + + /// Primitive + using Primitive = typename GeomTraits::Line_2; + + /// Region map + using Region_unordered_map = std::unordered_map >; + using Region_index_map = boost::associative_property_map; + /// @} + + private: + using Point_2 = typename GeomTraits::Point_2; + using Vector_2 = typename GeomTraits::Vector_2; + using Line_2 = typename GeomTraits::Line_2; + + using Squared_length_2 = typename GeomTraits::Compute_squared_length_2; + using Squared_distance_2 = typename GeomTraits::Compute_squared_distance_2; + using Scalar_product_2 = typename GeomTraits::Compute_scalar_product_2; + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param np + a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{maximum_distance} + \cgalParamDescription{the maximum distance from a point to a line} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{1} + \cgalParamNEnd + \cgalParamNBegin{maximum_angle} + \cgalParamDescription{the maximum angle in degrees between + the normal of a point and the normal of a line} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{25 degrees} + \cgalParamNEnd + \cgalParamNBegin{cosine_of_maximum_angle} + \cgalParamDescription{the cos value computed as `cos(maximum_angle * PI / 180)`, + this parameter can be used instead of the `maximum_angle`} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{`cos(25 * PI / 180)`} + \cgalParamNEnd + \cgalParamNBegin{minimum_region_size} + \cgalParamDescription{the minimum number of 2D points a region must have} + \cgalParamType{`std::size_t`} + \cgalParamDefault{2} + \cgalParamNEnd + \cgalParamNBegin{point_map} + \cgalParamDescription{an instance of `PointMap` that maps an item to `Kernel::Point_2`} + \cgalParamDefault{`PointMap()`} + \cgalParamNEnd + \cgalParamNBegin{normal_map} + \cgalParamDescription{ an instance of `NormalMap` that maps an item to `Kernel::Vector_2`} + \cgalParamDefault{`NormalMap()`} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of `GeomTraits`} + \cgalParamDefault{`GeomTraits()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `maximum_distance >= 0` + \pre `maximum_angle >= 0 && maximum_angle <= 90` + \pre `cosine_of_maximum_angle >= 0 && cosine_of_maximum_angle <= 1` + \pre `minimum_region_size > 0` + */ + template + Least_squares_line_fit_region( + const CGAL_NP_CLASS& np = parameters::default_values()) : + m_point_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::point_map))), + m_normal_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::normal_map))), + m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))), + m_squared_length_2(m_traits.compute_squared_length_2_object()), + m_squared_distance_2(m_traits.compute_squared_distance_2_object()), + m_scalar_product_2(m_traits.compute_scalar_product_2_object()) { + + const FT max_distance = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_distance), FT(1)); + CGAL_precondition(max_distance >= FT(0)); + m_distance_threshold = max_distance; + + const FT max_angle = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_angle), FT(25)); + CGAL_precondition(max_angle >= FT(0) && max_angle <= FT(90)); + + m_min_region_size = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::minimum_region_size), 2); + CGAL_precondition(m_min_region_size > 0); + + const FT default_cos_value = static_cast(std::cos(CGAL::to_double( + (max_angle * static_cast(CGAL_PI)) / FT(180)))); + const FT cos_value = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::cosine_of_maximum_angle), default_cos_value); + CGAL_precondition(cos_value >= FT(0) && cos_value <= FT(1)); + m_cos_value_threshold = cos_value; + } + + /// @} + + /// \name Access + /// @{ + + /*! + \brief implements `RegionType::region_index_map()`. + + This function creates an empty property map that maps iterators on the input range `Item` to `std::size_t`. + */ + Region_index_map region_index_map() { + return Region_index_map(m_region_map); + } + + /*! + \brief implements `RegionType::primitive()`. + + This function provides the last primitive that has been fitted with the region. + + \return Primitive parameters that fits the region + + \pre `successful fitted primitive via successful call of update(region) with a sufficient large region` + */ + Primitive primitive() const { + return m_line_of_best_fit; + } + + /*! + \brief implements `RegionType::is_part_of_region()`. + + This function controls if a point with the index `query_index` is within + the `maximum_distance` from the corresponding line and if the angle between + its normal and the line's normal is within the `maximum_angle`. If both conditions + are satisfied, it returns `true`, otherwise `false`. + + \param query + item of the query point + + The last parameter is not used in this implementation. + + \return Boolean `true` or `false` + */ + bool is_part_of_region( + const Item query, + const Region&) const { + + const Point_2& query_point = get(m_point_map, query); + const Vector_2& query_normal = get(m_normal_map, query); + + const FT a = CGAL::abs(m_line_of_best_fit.a()); + const FT b = CGAL::abs(m_line_of_best_fit.b()); + const FT c = CGAL::abs(m_line_of_best_fit.c()); + if (a == FT(0) && b == FT(0) && c == FT(0)) + return false; + + const FT squared_distance_to_fitted_line = + m_squared_distance_2(query_point, m_line_of_best_fit); + const FT squared_distance_threshold = + m_distance_threshold * m_distance_threshold; + + const FT cos_value = + m_scalar_product_2(query_normal, m_normal_of_best_fit); + const FT squared_cos_value = cos_value * cos_value; + + FT squared_cos_value_threshold = + m_cos_value_threshold * m_cos_value_threshold; + squared_cos_value_threshold *= m_squared_length_2(query_normal); + squared_cos_value_threshold *= m_squared_length_2(m_normal_of_best_fit); + + return ( + ( squared_distance_to_fitted_line <= squared_distance_threshold ) && + ( squared_cos_value >= squared_cos_value_threshold )); + } + + /*! + \brief implements `RegionType::is_valid_region()`. + + This function controls if the `region` contains at least `minimum_region_size` points. + + \param region + indices of points included in the region + + \return Boolean `true` or `false` + */ + inline bool is_valid_region(const Region& region) const { + return (region.size() >= m_min_region_size); + } + + /*! + \brief implements `RegionType::update()`. + + This function fits the least squares line to all points from the `region`. + + \param region + indices of points included in the region + + \return Boolean `true` if the line fitting succeeded and `false` otherwise + + \pre `region.size() > 0` + */ + bool update(const Region& region) { + + CGAL_precondition(region.size() > 0); + if (region.size() == 1) { // create new reference line and normal + const Item item = region[0]; + + // The best fit line will be a line through this point with + // its normal being the point's normal. + const Point_2& point = get(m_point_map, item); + const Vector_2& normal = get(m_normal_map, item); + + if (normal == CGAL::NULL_VECTOR) + return false; + + m_line_of_best_fit = Line_2(point, normal).perpendicular(point); + m_normal_of_best_fit = m_line_of_best_fit.perpendicular( + m_line_of_best_fit.point(0)).to_vector(); + + } else { // update reference line and normal + CGAL_precondition(region.size() >= 2); + std::tie(m_line_of_best_fit, m_normal_of_best_fit) = + get_line_and_normal(region); + } + return true; + } + + /// @} + + /// \cond SKIP_IN_MANUAL + std::pair get_line_and_normal( + const Region& region) const { + + // The best fit line will be a line fitted to all region points with + // its normal being perpendicular to the line. + CGAL_precondition(region.size() > 0); + const Line_2 unoriented_line_of_best_fit = + internal::create_line_2( + region, m_point_map, m_traits).first; + const Vector_2 unoriented_normal_of_best_fit = + unoriented_line_of_best_fit.perpendicular( + unoriented_line_of_best_fit.point(0)).to_vector(); + + // Flip the line's normal to agree with all input normals. + long votes_to_keep_normal = 0; + for (auto item : region) { + const Vector_2& normal = get(m_normal_map, item); + const bool agrees = + m_scalar_product_2(normal, unoriented_normal_of_best_fit) > FT(0); + votes_to_keep_normal += (agrees ? 1 : -1); + } + const bool flip_normal = (votes_to_keep_normal < 0); + + const Line_2 line_of_best_fit = flip_normal + ? unoriented_line_of_best_fit.opposite() + : unoriented_line_of_best_fit; + const Vector_2 normal_of_best_fit = flip_normal + ? (-1 * unoriented_normal_of_best_fit) + : unoriented_normal_of_best_fit; + + return std::make_pair(line_of_best_fit, normal_of_best_fit); + } + /// \endcond + + private: + const Point_map m_point_map; + const Normal_map m_normal_map; + const GeomTraits m_traits; + Region_unordered_map m_region_map; + + FT m_distance_threshold; + FT m_cos_value_threshold; + std::size_t m_min_region_size; + + const Squared_length_2 m_squared_length_2; + const Squared_distance_2 m_squared_distance_2; + const Scalar_product_2 m_scalar_product_2; + + Line_2 m_line_of_best_fit; + Vector_2 m_normal_of_best_fit; + }; + + /*! + \ingroup PkgShapeDetectionRGOnPointSet3 + shortcut to ease the definition of the class when using `CGAL::Point_set_3`. + To be used together with `make_least_squares_line_fit_region()`. + \relates Least_squares_line_fit_region + */ + template + using Least_squares_line_fit_region_for_point_set = + Least_squares_line_fit_region::Kernel, + typename PointSet3::Index, + typename PointSet3::Point_map, + typename PointSet3::Vector_map>; + + /*! + \ingroup PkgShapeDetectionRGOnPointSet3 + returns an instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`. + \relates Least_squares_line_fit_region + */ + template + Least_squares_line_fit_region_for_point_set + make_least_squares_line_fit_region(const PointSet3& ps, + const CGAL_NP_CLASS np = parameters::default_values()) + { + return Least_squares_line_fit_region_for_point_set + (np.point_map(ps.point_map()).normal_map(ps.normal_map())); + } + +} // namespace Point_set +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_LINE_FIT_REGION_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_line_fit_sorting.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_line_fit_sorting.h new file mode 100644 index 00000000..8e729b00 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_line_fit_sorting.h @@ -0,0 +1,233 @@ +// Copyright (c) 2018 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_line_fit_sorting.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_line_fit_sorting.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Florent Lafarge, Simon Giraudot, Thien Hoang, Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_LINE_FIT_SORTING_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_LINE_FIT_SORTING_H + +#include + +// Internal includes. +#include +#include + +namespace CGAL { +namespace Shape_detection { +namespace Point_set { + + /*! + \ingroup PkgShapeDetectionRGOnPoints + + \brief Sorting of 2D points with respect to the local line fit quality. + + Indices of 2D input points are sorted with respect to the quality of the + least squares line fit applied to the neighboring points of each point. + + \tparam GeomTraits + a model of `Kernel` + + \tparam Item_ + a descriptor representing a given point. Must be a model of `Hashable`. + + \tparam NeighborQuery + a model of `NeighborQuery` + + \tparam PointMap + a model of `ReadablePropertyMap` whose key type is the value type of the input + range and value type is `Kernel::Point_2` + */ + template< + typename GeomTraits, + typename Item_, + typename NeighborQuery, + typename PointMap> + class Least_squares_line_fit_sorting { + + public: + /// \name Types + /// @{ + + /// \cond SKIP_IN_MANUAL + using Traits = GeomTraits; + using Neighbor_query = NeighborQuery; + using Point_map = PointMap; + /// \endcond + + /// Item type. + using Item = Item_; + + /// Seed range. + using Seed_range = std::vector; + + /// @} + + private: + using FT = typename Traits::FT; + using Compare_scores = internal::Compare_scores; + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + + \tparam InputRange + a model of `ConstRange` whose iterator type is `RandomAccessIterator` + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param input_range + an instance of `InputRange` with 2D points + + \param neighbor_query + an instance of `NeighborQuery` that is used internally to + access point's neighbors + + \param np + a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{item_map} + \cgalParamDescription{an instance of a model of `ReadablePropertyMap` with `InputRange::const_iterator` + as key type and `Item` as value type.} + \cgalParamDefault{A default is provided when `Item` is `InputRange::const_iterator` or its value type.} + \cgalParamNEnd + \cgalParamNBegin{point_map} + \cgalParamDescription{an instance of `PointMap` that maps an item to `Kernel::Point_2`} + \cgalParamDefault{`PointMap()`} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of `GeomTraits`} + \cgalParamDefault{`GeomTraits()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `input_range.size() > 0` + */ + template + Least_squares_line_fit_sorting( + const InputRange& input_range, + NeighborQuery& neighbor_query, + const CGAL_NP_CLASS& np = parameters::default_values()) : + m_neighbor_query(neighbor_query), + m_point_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::point_map))), + m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))) { + + CGAL_precondition(input_range.size() > 0); + + using NP_helper = internal::Default_property_map_helper; + using Item_map = typename NP_helper::type; + Item_map item_map = NP_helper::get(np); + + m_ordered.resize(input_range.size()); + + std::size_t index = 0; + for (auto it = input_range.begin(); it != input_range.end(); it++) + m_ordered[index++] = get(item_map, it); + + m_scores.resize(input_range.size()); + } + + /// @} + + /// \name Sorting + /// @{ + + /*! + \brief sorts indices of input points. + */ + void sort() { + compute_scores(); + CGAL_precondition(m_scores.size() > 0); + Compare_scores cmp(m_scores); + + std::vector order(m_ordered.size()); + std::iota(order.begin(), order.end(), 0); + std::sort(order.begin(), order.end(), cmp); + + std::vector tmp(m_ordered.size()); + for (std::size_t i = 0; i < m_ordered.size(); i++) + tmp[i] = m_ordered[order[i]]; + + m_ordered.swap(tmp); + } + /// @} + + /// \name Access + /// @{ + + /*! + \brief returns an instance of `Seed_range` to access the ordered `Items` + of input points. + */ + const Seed_range ordered() { + return m_ordered; + } + /// @} + + private: + Neighbor_query& m_neighbor_query; + const Point_map m_point_map; + const Traits m_traits; + Seed_range m_ordered; + std::vector m_scores; + + void compute_scores() { + + std::vector neighbors; + std::size_t idx = 0; + for (const Item& item : m_ordered) { + neighbors.clear(); + m_neighbor_query(item, neighbors); + neighbors.push_back(item); + m_scores[idx++] = internal::create_line_2( + neighbors, m_point_map, m_traits).second; + } + } + }; + + /*! + \ingroup PkgShapeDetectionRGOnPointSet3 + shortcut to ease the definition of the class when using `CGAL::Point_set_3`. + To be used together with `make_least_squares_line_fit_sorting()`. + \relates Least_squares_line_fit_sorting + */ + template + using Least_squares_line_fit_sorting_for_point_set = + Least_squares_line_fit_sorting::Kernel, + typename PointSet3::Index, + NeighborQuery, + typename PointSet3::Point_map>; + + /*! + \ingroup PkgShapeDetectionRGOnPointSet3 + returns an instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`. + \relates Least_squares_line_fit_sorting + */ + template + Least_squares_line_fit_sorting_for_point_set + make_least_squares_line_fit_sorting(const PointSet3& ps, + NeighborQuery& neighbor_query, + const CGAL_NP_CLASS np = parameters::default_values()) + { + return Least_squares_line_fit_sorting_for_point_set + (ps, neighbor_query, np.point_map(ps.point_map())); + } + +} // namespace Point_set +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_LINE_FIT_SORTING_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_region.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_region.h new file mode 100644 index 00000000..d8ab6f04 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_region.h @@ -0,0 +1,395 @@ +// Copyright (c) 2018 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_region.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_region.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Florent Lafarge, Simon Giraudot, Thien Hoang, Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_PLANE_FIT_REGION_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_PLANE_FIT_REGION_H + +#include + +// Internal includes. +#include + +#include + +namespace CGAL { +namespace Shape_detection { +namespace Point_set { + + /*! + \ingroup PkgShapeDetectionRGOnPoints + + \brief Region type based on the quality of the least squares plane + fit applied to 3D points. + + This class fits a plane, using \ref PkgPrincipalComponentAnalysisDRef "PCA", + to chunks of points in a 3D point set and controls the quality of this fit. + If all quality conditions are satisfied, the chunk is accepted as a valid region, + otherwise rejected. + + \tparam GeomTraits + a model of `Kernel` + + \tparam Item_ + a descriptor representing a given point. Must be a model of `Hashable`. + + \tparam PointMap + a model of `ReadablePropertyMap` whose key type is the value type of the input + range and value type is `Kernel::Point_3` + + \tparam NormalMap + a model of `ReadablePropertyMap` whose key type is the value type of the input + range and value type is `Kernel::Vector_3` + + + \cgalModels{RegionType} + */ + template< + typename GeomTraits, + typename Item_, + typename PointMap, + typename NormalMap> + class Least_squares_plane_fit_region { + + public: + /// \name Types + /// @{ + + /// \cond SKIP_IN_MANUAL + using Point_map = PointMap; + using Normal_map = NormalMap; + /// \endcond + + /// Number type. + typedef typename GeomTraits::FT FT; + + /// Item type. + using Item = Item_; + using Region = std::vector; + + /// Primitive + using Primitive = typename GeomTraits::Plane_3; + + /// Region map + using Region_unordered_map = std::unordered_map >; + using Region_index_map = boost::associative_property_map; + /// @} + + private: + using Point_3 = typename GeomTraits::Point_3; + using Vector_3 = typename GeomTraits::Vector_3; + using Plane_3 = typename GeomTraits::Plane_3; + + using Squared_length_3 = typename GeomTraits::Compute_squared_length_3; + using Squared_distance_3 = typename GeomTraits::Compute_squared_distance_3; + using Scalar_product_3 = typename GeomTraits::Compute_scalar_product_3; + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param np + a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{maximum_distance} + \cgalParamDescription{the maximum distance from a point to a plane} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{1} + \cgalParamNEnd + \cgalParamNBegin{maximum_angle} + \cgalParamDescription{the maximum angle in degrees between + the normal of a point and the normal of a plane} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{25 degrees} + \cgalParamNEnd + \cgalParamNBegin{cosine_of_maximum_angle} + \cgalParamDescription{the cos value computed as `cos(maximum_angle * PI / 180)`, + this parameter can be used instead of the `maximum_angle`} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{`cos(25 * PI / 180)`} + \cgalParamNEnd + \cgalParamNBegin{minimum_region_size} + \cgalParamDescription{the minimum number of 3D points a region must have} + \cgalParamType{`std::size_t`} + \cgalParamDefault{3} + \cgalParamNEnd + \cgalParamNBegin{point_map} + \cgalParamDescription{an instance of `PointMap` that maps an item to `Kernel::Point_3`} + \cgalParamDefault{`PointMap()`} + \cgalParamNEnd + \cgalParamNBegin{normal_map} + \cgalParamDescription{an instance of `NormalMap` that maps an item to `Kernel::Vector_3`} + \cgalParamDefault{`NormalMap()`} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of `GeomTraits`} + \cgalParamDefault{`GeomTraits()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `maximum_distance >= 0` + \pre `maximum_angle >= 0 && maximum_angle <= 90` + \pre `cosine_of_maximum_angle >= 0 && cosine_of_maximum_angle <= 1` + \pre `minimum_region_size > 0` + */ + template + Least_squares_plane_fit_region( + const CGAL_NP_CLASS& np = parameters::default_values()) : + m_point_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::point_map))), + m_normal_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::normal_map))), + m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))), + m_squared_length_3(m_traits.compute_squared_length_3_object()), + m_squared_distance_3(m_traits.compute_squared_distance_3_object()), + m_scalar_product_3(m_traits.compute_scalar_product_3_object()) { + + const FT max_distance = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_distance), FT(1)); + CGAL_precondition(max_distance >= FT(0)); + m_distance_threshold = max_distance; + + const FT max_angle = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_angle), FT(25)); + CGAL_precondition(max_angle >= FT(0) && max_angle <= FT(90)); + + m_min_region_size = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::minimum_region_size), 3); + CGAL_precondition(m_min_region_size > 0); + + const FT default_cos_value = static_cast(std::cos(CGAL::to_double( + (max_angle * static_cast(CGAL_PI)) / FT(180)))); + const FT cos_value = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::cosine_of_maximum_angle), default_cos_value); + CGAL_precondition(cos_value >= FT(0) && cos_value <= FT(1)); + m_cos_value_threshold = cos_value; + } + + /// @} + + /// \name Access + /// @{ + + /*! + \brief implements `RegionType::region_index_map()`. + + This function creates an empty property map that maps iterators on the input range `Item` to std::size_t. + */ + Region_index_map region_index_map() { + return Region_index_map(m_region_map); + } + + /*! + \brief implements `RegionType::primitive()`. + + This function provides the last primitive that has been fitted with the region. + + \return Primitive parameters that fits the region + + \pre `successful fitted primitive via successful call of update(region) with a sufficient large region` + */ + Primitive primitive() const { + return m_plane_of_best_fit; + } + + /*! + \brief implements `RegionType::is_part_of_region()`. + + This function controls if the point `query` is within + the `maximum_distance` from the corresponding plane and if the angle between + its normal and the plane's normal is within the `maximum_angle`. If both conditions + are satisfied, it returns `true`, otherwise `false`. + + \param query + `Item` of the query point + + The last parameter is not used in this implementation. + + \return Boolean `true` or `false` + + */ + bool is_part_of_region( + const Item query, + const Region&) const { + + const Point_3& query_point = get(m_point_map, query); + const Vector_3& query_normal = get(m_normal_map, query); + + const FT a = CGAL::abs(m_plane_of_best_fit.a()); + const FT b = CGAL::abs(m_plane_of_best_fit.b()); + const FT c = CGAL::abs(m_plane_of_best_fit.c()); + const FT d = CGAL::abs(m_plane_of_best_fit.d()); + if (a == FT(0) && b == FT(0) && c == FT(0) && d == FT(0)) + return false; + + const FT squared_distance_to_fitted_plane = + m_squared_distance_3(query_point, m_plane_of_best_fit); + const FT squared_distance_threshold = + m_distance_threshold * m_distance_threshold; + + const FT cos_value = + m_scalar_product_3(query_normal, m_normal_of_best_fit); + const FT squared_cos_value = cos_value * cos_value; + + FT squared_cos_value_threshold = + m_cos_value_threshold * m_cos_value_threshold; + squared_cos_value_threshold *= m_squared_length_3(query_normal); + squared_cos_value_threshold *= m_squared_length_3(m_normal_of_best_fit); + + return ( + ( squared_distance_to_fitted_plane <= squared_distance_threshold ) && + ( squared_cos_value >= squared_cos_value_threshold )); + } + + /*! + \brief implements `RegionType::is_valid_region()`. + + This function controls if the `region` contains at least `minimum_region_size` points. + + \param region + Points of the region represented as `Items`. + + \return Boolean `true` or `false` + */ + inline bool is_valid_region(const Region& region) const { + return (region.size() >= m_min_region_size); + } + + /*! + \brief implements `RegionType::update()`. + + This function fits the least squares plane to all points from the `region`. + + \param region + Points of the region represented as `Items`. + + \return Boolean `true` if the plane fitting succeeded and `false` otherwise + + \pre `region.size() > 0` + */ + bool update(const Region& region) { + + CGAL_precondition(region.size() > 0); + if (region.size() == 1) { // create new reference plane and normal + const Item item = region[0]; + + // The best fit plane will be a plane through this point with + // its normal being the point's normal. + const Point_3& point = get(m_point_map, item); + const Vector_3& normal = get(m_normal_map, item); + if (normal == CGAL::NULL_VECTOR) return false; + + CGAL_precondition(normal != CGAL::NULL_VECTOR); + m_plane_of_best_fit = Plane_3(point, normal); + m_normal_of_best_fit = m_plane_of_best_fit.orthogonal_vector(); + + } else { // update reference plane and normal + if (region.size() < 3) return false; + CGAL_precondition(region.size() >= 3); + std::tie(m_plane_of_best_fit, m_normal_of_best_fit) = + get_plane_and_normal(region); + } + return true; + } + + /// @} + + /// \cond SKIP_IN_MANUAL + std::pair get_plane_and_normal( + const Region& region) const { + + // The best fit plane will be a plane fitted to all region points with + // its normal being perpendicular to the plane. + CGAL_precondition(region.size() > 0); + const Plane_3 unoriented_plane_of_best_fit = + internal::create_plane( + region, m_point_map, m_traits).first; + const Vector_3 unoriented_normal_of_best_fit = + unoriented_plane_of_best_fit.orthogonal_vector(); + + // Flip the plane's normal to agree with all input normals. + long votes_to_keep_normal = 0; + for (Item item : region) { + const Vector_3& normal = get(m_normal_map, item); + const bool agrees = + m_scalar_product_3(normal, unoriented_normal_of_best_fit) > FT(0); + votes_to_keep_normal += (agrees ? 1 : -1); + } + const bool flip_normal = (votes_to_keep_normal < 0); + + const Plane_3 plane_of_best_fit = flip_normal + ? unoriented_plane_of_best_fit.opposite() + : unoriented_plane_of_best_fit; + const Vector_3 normal_of_best_fit = flip_normal + ? (-1 * unoriented_normal_of_best_fit) + : unoriented_normal_of_best_fit; + + return std::make_pair(plane_of_best_fit, normal_of_best_fit); + } + /// \endcond + + private: + const Point_map m_point_map; + const Normal_map m_normal_map; + const GeomTraits m_traits; + Region_unordered_map m_region_map; + + FT m_distance_threshold; + FT m_cos_value_threshold; + std::size_t m_min_region_size; + + const Squared_length_3 m_squared_length_3; + const Squared_distance_3 m_squared_distance_3; + const Scalar_product_3 m_scalar_product_3; + + Plane_3 m_plane_of_best_fit; + Vector_3 m_normal_of_best_fit; + }; + +/*! + \ingroup PkgShapeDetectionRGOnPointSet3 + shortcut to ease the definition of the class when using `CGAL::Point_set_3`. + To be used together with `make_least_squares_plane_fit_region()`. + \relates Least_squares_plane_fit_region + */ +template +using Least_squares_plane_fit_region_for_point_set = + Least_squares_plane_fit_region::Kernel, + typename PointSet3::Index, + typename PointSet3::Point_map, + typename PointSet3::Vector_map>; + +/*! + \ingroup PkgShapeDetectionRGOnPointSet3 + returns an instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`. + \relates Least_squares_plane_fit_region + */ +template +Least_squares_plane_fit_region_for_point_set +make_least_squares_plane_fit_region(const PointSet3& ps, + const CGAL_NP_CLASS np = parameters::default_values()) +{ + return Least_squares_plane_fit_region_for_point_set + (np.point_map(ps.point_map()).normal_map(ps.normal_map())); +} + +} // namespace Point_set +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_PLANE_FIT_REGION_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_sorting.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_sorting.h new file mode 100644 index 00000000..78e60b20 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_sorting.h @@ -0,0 +1,234 @@ +// Copyright (c) 2018 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_sorting.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_sorting.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Florent Lafarge, Simon Giraudot, Thien Hoang, Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_PLANE_FIT_SORTING_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_PLANE_FIT_SORTING_H + +#include + +// Internal includes. +#include +#include + +namespace CGAL { +namespace Shape_detection { +namespace Point_set { + + /*! + \ingroup PkgShapeDetectionRGOnPoints + + \brief Sorting of 3D points with respect to the local plane fit quality. + + Indices of 3D input points are sorted with respect to the quality of the + least squares plane fit applied to the neighboring points of each point. + + \tparam GeomTraits + a model of `Kernel` + + \tparam Item_ + a descriptor representing a given point. Must be a model of `Hashable`. + + \tparam NeighborQuery + a model of `NeighborQuery` + + \tparam PointMap + a model of `ReadablePropertyMap` whose key type is the value type of the input + range and value type is `Kernel::Point_3` + */ + template< + typename GeomTraits, + typename Item_, + typename NeighborQuery, + typename PointMap> + class Least_squares_plane_fit_sorting { + + public: + /// \name Types + /// @{ + + /// \cond SKIP_IN_MANUAL + using Traits = GeomTraits; + using Neighbor_query = NeighborQuery; + using Point_map = PointMap; + /// \endcond + + /// Item type. + using Item = Item_; + + /// Seed range. + using Seed_range = std::vector; + + /// @} + + private: + using FT = typename Traits::FT; + using Compare_scores = internal::Compare_scores; + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + + \tparam InputRange + a model of `ConstRange` whose iterator type is `RandomAccessIterator` + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param input_range + an instance of `InputRange` with 3D points + + \param neighbor_query + an instance of `NeighborQuery` that is used internally to + access point's neighbors + + \param np + a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{item_map} + \cgalParamDescription{an instance of a model of `ReadablePropertyMap` with `InputRange::const_iterator` + as key type and `Item` as value type.} + \cgalParamDefault{A default is provided when `Item` is `InputRange::const_iterator` or its value type.} + \cgalParamNEnd + \cgalParamNBegin{point_map} + \cgalParamDescription{an instance of `PointMap` that maps an item to `Kernel::Point_3`} + \cgalParamDefault{`PointMap()`} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of `GeomTraits`} + \cgalParamDefault{`GeomTraits()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `input_range.size() > 0` + */ + template + Least_squares_plane_fit_sorting( + const InputRange& input_range, + NeighborQuery& neighbor_query, + const CGAL_NP_CLASS& np = parameters::default_values()) : + m_neighbor_query(neighbor_query), + m_point_map(Point_set_processing_3_np_helper::get_const_point_map(input_range, np)), + m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))) + { + CGAL_precondition(input_range.size() > 0); + + using NP_helper = internal::Default_property_map_helper; + using Item_map = typename NP_helper::type; + Item_map item_map = NP_helper::get(np); + + m_ordered.resize(input_range.size()); + + std::size_t index = 0; + for (auto it = input_range.begin(); it != input_range.end(); it++) + m_ordered[index++] = get(item_map, it); + + m_scores.resize(input_range.size()); + } + + /// @} + + /// \name Sorting + /// @{ + + /*! + \brief sorts `Items` of input points. + */ + void sort() { + compute_scores(); + CGAL_precondition(m_scores.size() > 0); + Compare_scores cmp(m_scores); + + std::vector order(m_ordered.size()); + std::iota(order.begin(), order.end(), 0); + std::sort(order.begin(), order.end(), cmp); + std::vector tmp(m_ordered.size()); + for (std::size_t i = 0; i < m_ordered.size(); i++) + tmp[i] = m_ordered[order[i]]; + + m_ordered.swap(tmp); + } + /// @} + + /// \name Access + /// @{ + + /*! + \brief returns an instance of `Seed_range` to access the ordered `Items` + of input points. + */ + const Seed_range &ordered() { + return m_ordered; + } + /// @} + + private: + Neighbor_query& m_neighbor_query; + const Point_map m_point_map; + const Traits m_traits; + + Seed_range m_ordered; + std::vector m_scores; + + void compute_scores() { + + std::vector neighbors; + std::size_t idx = 0; + for (const Item& item : m_ordered) { + neighbors.clear(); + m_neighbor_query(item, neighbors); + neighbors.push_back(item); + + m_scores[idx++] = internal::create_plane( + neighbors, m_point_map, m_traits).second; + } + } + }; + +/*! + \ingroup PkgShapeDetectionRGOnPointSet3 + shortcut to ease the definition of the class when using `CGAL::Point_set_3`. + To be used together with `make_least_squares_plane_fit_sorting()`. + \relates Least_squares_plane_fit_sorting + */ +template +using Least_squares_plane_fit_sorting_for_point_set = + Least_squares_plane_fit_sorting::Kernel, + typename PointSet3::Index, + NeighborQuery, + typename PointSet3::Point_map>; + +/*! + \ingroup PkgShapeDetectionRGOnPointSet3 + returns an instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`. + \relates Least_squares_plane_fit_sorting + */ +template +Least_squares_plane_fit_sorting_for_point_set +make_least_squares_plane_fit_sorting(const PointSet3& ps, + NeighborQuery& neighbor_query, + const CGAL_NP_CLASS np = parameters::default_values()) +{ + return Least_squares_plane_fit_sorting_for_point_set + (ps, neighbor_query, np.point_map(ps.point_map())); +} + +} // namespace Point_set +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_PLANE_FIT_SORTING_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_sphere_fit_region.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_sphere_fit_region.h new file mode 100644 index 00000000..57a430bc --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_sphere_fit_region.h @@ -0,0 +1,399 @@ +// Copyright (c) 2020 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_sphere_fit_region.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_sphere_fit_region.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Simon Giraudot +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_SPHERE_FIT_REGION_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_SPHERE_FIT_REGION_H + +#include + +// Internal includes. +#include + +#include + +namespace CGAL { +namespace Shape_detection { +namespace Point_set { + + /*! + \ingroup PkgShapeDetectionRGOnPoints + + \brief Region type based on the quality of the least squares sphere + fit applied to 3D points. + + This class fits a sphere to chunks of points in a 3D point set and + controls the quality of this fit. If all quality conditions are + satisfied, the chunk is accepted as a valid region, otherwise + rejected. + + \tparam GeomTraits + a model of `Kernel` + + \tparam Item_ + a descriptor representing a given point. Must be a model of `Hashable`. + + \tparam PointMap + a model of `ReadablePropertyMap` whose key type is the value type of the input + range and value type is `Kernel::Point_3` + + \tparam NormalMap + a model of `ReadablePropertyMap` whose key type is the value type of the input + range and value type is `Kernel::Vector_3` + + \cgalModels{RegionType} + */ + template< + typename GeomTraits, + typename Item_, + typename PointMap, + typename NormalMap> + class Least_squares_sphere_fit_region { + + public: + /// \name Types + /// @{ + + /// \cond SKIP_IN_MANUAL + using Point_map = PointMap; + using Normal_map = NormalMap; + /// \endcond + + /// Number type. + typedef typename GeomTraits::FT FT; + + /// Item type. + using Item = Item_; + using Region = std::vector; + + /// Primitive + using Primitive = typename GeomTraits::Sphere_3; + + /// Region map + using Region_unordered_map = std::unordered_map >; + using Region_index_map = boost::associative_property_map; + /// @} + + private: + using Point_3 = typename GeomTraits::Point_3; + using Vector_3 = typename GeomTraits::Vector_3; + using Sphere_3 = typename GeomTraits::Sphere_3; + + using Squared_distance_3 = typename GeomTraits::Compute_squared_distance_3; + using Get_sqrt = internal::Get_sqrt; + using Sqrt = typename Get_sqrt::Sqrt; + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param np + a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{maximum_distance} + \cgalParamDescription{the maximum distance from a point to a sphere} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{1} + \cgalParamNEnd + \cgalParamNBegin{maximum_angle} + \cgalParamDescription{the maximum angle in degrees between + the normal of a point and the radius of a sphere} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{25 degrees} + \cgalParamNEnd + \cgalParamNBegin{cosine_of_maximum_angle} + \cgalParamDescription{the cos value computed as `cos(maximum_angle * PI / 180)`, + this parameter can be used instead of the `maximum_angle`} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{`cos(25 * PI / 180)`} + \cgalParamNEnd + \cgalParamNBegin{minimum_region_size} + \cgalParamDescription{the minimum number of 3D points a region must have} + \cgalParamType{`std::size_t`} + \cgalParamDefault{3} + \cgalParamNEnd + \cgalParamNBegin{minimum_radius} + \cgalParamDescription{the radius below which an estimated sphere + is considered as invalid and discarded} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{0, no limit} + \cgalParamNEnd + \cgalParamNBegin{maximum_radius} + \cgalParamDescription{the radius above which an estimated sphere + is considered as invalid and discarded.} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{+infinity, no limit} + \cgalParamNEnd + \cgalParamNBegin{point_map} + \cgalParamDescription{an instance of `PointMap` that maps an item to `Kernel::Point_3`} + \cgalParamDefault{`PointMap()`} + \cgalParamNEnd + \cgalParamNBegin{normal_map} + \cgalParamDescription{an instance of `NormalMap` that maps an item to `Kernel::Vector_3`} + \cgalParamDefault{`NormalMap()`} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of `GeomTraits`} + \cgalParamDefault{`GeomTraits()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `maximum_distance >= 0` + \pre `maximum_angle >= 0 && maximum_angle <= 90` + \pre `cosine_of_maximum_angle >= 0 && cosine_of_maximum_angle <= 1` + \pre `minimum_region_size > 0` + \pre `minimum_radius >= 0` + \pre `maximum_radius >= minimum_radius` + */ + template + Least_squares_sphere_fit_region( + const CGAL_NP_CLASS& np = parameters::default_values()) : + m_point_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::point_map))), + m_normal_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::normal_map))), + m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))), + m_sqrt(Get_sqrt::sqrt_object(m_traits)), + m_squared_distance_3(m_traits.compute_squared_distance_3_object()) { + + const FT max_distance = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_distance), FT(1)); + CGAL_precondition(max_distance >= FT(0)); + m_distance_threshold = max_distance; + + const FT max_angle = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_angle), FT(25)); + CGAL_precondition(max_angle >= FT(0) && max_angle <= FT(90)); + + m_min_region_size = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::minimum_region_size), 3); + CGAL_precondition(m_min_region_size > 0); + + const FT default_cos_value = static_cast(std::cos(CGAL::to_double( + (max_angle * static_cast(CGAL_PI)) / FT(180)))); + const FT cos_value = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::cosine_of_maximum_angle), default_cos_value); + CGAL_precondition(cos_value >= FT(0) && cos_value <= FT(1)); + m_cos_value_threshold = cos_value; + + m_min_radius = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::minimum_radius), FT(0)); + CGAL_precondition(m_min_radius >= FT(0)); + + m_max_radius = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_radius), + FT((std::numeric_limits::max)())); + CGAL_precondition(m_max_radius >= m_min_radius); + } + + /// @} + + /// \name Access + /// @{ + + /*! + \brief implements `RegionType::region_index_map()`. + + This function creates an empty property map that maps iterators on the input range `Item` to std::size_t + */ + + Region_index_map region_index_map() { + return Region_index_map(m_region_map); + } + + /*! + \brief implements `RegionType::primitive()`. + + This function provides the last primitive that has been fitted with the region. + + \return Primitive parameters that fits the region + + \pre `fitted primitive via successful call of update(region) with a sufficient large region` + */ + + Primitive primitive() const { + return Sphere_3(m_center, m_radius * m_radius); + } + + /*! + \brief implements `RegionType::is_part_of_region()`. + + This function controls if a point with the index `query_index` is within + the `maximum_distance` from the corresponding sphere and if the angle between + its normal and the sphere radius is within the `maximum_angle`. If both conditions + are satisfied, it returns `true`, otherwise `false`. + + \param query + item of the query point + + \param region + inlier items of the region + + \return Boolean `true` or `false` + */ + bool is_part_of_region( + const Item query, + const Region& region) const { + + // First, we need to integrate at least 6 points so that the + // computed sphere means something. + if (region.size() < 6) { + return true; + } + + if (std::isnan(CGAL::to_double(m_radius))) { + return false; + } + + // If radius is out of bound, nothing fits, early ending. + if (m_radius <= m_min_radius || m_radius > m_max_radius) { + return false; + } + + const Point_3& query_point = get(m_point_map, query); + Vector_3 normal = get(m_normal_map, query); + + const FT sq_dist = m_squared_distance_3(query_point, m_center); + if (std::isnan(CGAL::to_double(sq_dist))) return false; + const FT distance_to_center = m_sqrt(sq_dist); + const FT distance_to_sphere = CGAL::abs(distance_to_center - m_radius); + + if (distance_to_sphere > m_distance_threshold) { + return false; + } + + const FT sq_norm = normal * normal; + if (std::isnan(CGAL::to_double(sq_norm))) return false; + normal = normal / m_sqrt(sq_norm); + + Vector_3 ray(m_center, query_point); + const FT sq_ray = ray * ray; + if (std::isnan(CGAL::to_double(sq_ray))) return false; + ray = ray / m_sqrt(sq_ray); + + if (CGAL::abs(normal * ray) < m_cos_value_threshold) { + return false; + } + return true; + } + + /*! + \brief implements `RegionType::is_valid_region()`. + + This function controls if the estimated radius is between `minimum_radius` + and `maximum_radius` and if the `region` contains at least `min_region_size` points. + + \param region + indices of points included in the region + + \return Boolean `true` or `false` + */ + inline bool is_valid_region(const Region& region) const { + return ( + (m_min_radius <= m_radius && m_radius <= m_max_radius) && + (region.size() >= m_min_region_size) + ); + } + + /*! + \brief implements `RegionType::update()`. + + This function fits the least squares sphere to all points from the `region`. + + \param region + indices of points included in the region + + \return Boolean `true` if the sphere fitting succeeded and `false` otherwise + + \pre `region.size() > 0` + */ + bool update(const Region& region) { + // Fit a sphere. + CGAL_precondition(region.size() > 0); + FT radius; Point_3 center; + std::tie(radius, center) = internal::create_sphere( + region, m_point_map, m_traits, false).first; + if (radius > FT(0)) { + m_radius = radius; + m_center = center; + } + return true; + } + + /// @} + + /// \cond SKIP_IN_MANUAL + std::pair get_sphere( + const Region& region) const { + return internal::create_sphere( + region, m_point_map, m_traits, false).first; + } + /// \endcond + + private: + const Point_map m_point_map; + const Normal_map m_normal_map; + const GeomTraits m_traits; + Region_unordered_map m_region_map; + + FT m_distance_threshold; + FT m_cos_value_threshold; + std::size_t m_min_region_size; + FT m_min_radius; + FT m_max_radius; + + const Sqrt m_sqrt; + const Squared_distance_3 m_squared_distance_3; + + FT m_radius; + Point_3 m_center; + }; + + +/*! + \ingroup PkgShapeDetectionRGOnPointSet3 + shortcut to ease the definition of the class when using `CGAL::Point_set_3`. + To be used together with `make_least_squares_sphere_fit_region()`. + \relates Least_squares_sphere_fit_region + */ +template +using Least_squares_sphere_fit_region_for_point_set = + Least_squares_sphere_fit_region::Kernel, + typename PointSet3::Index, + typename PointSet3::Point_map, + typename PointSet3::Vector_map>; + +/*! + \ingroup PkgShapeDetectionRGOnPointSet3 + returns an instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`. + \relates Least_squares_sphere_fit_region + */ +template +Least_squares_sphere_fit_region_for_point_set +make_least_squares_sphere_fit_region(const PointSet3& ps, + const CGAL_NP_CLASS np = parameters::default_values()) +{ + return Least_squares_sphere_fit_region_for_point_set + (np.point_map(ps.point_map()).normal_map(ps.normal_map())); +} + +} // namespace Point_set +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_SPHERE_FIT_REGION_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_sphere_fit_sorting.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_sphere_fit_sorting.h new file mode 100644 index 00000000..f8b64bcb --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_sphere_fit_sorting.h @@ -0,0 +1,244 @@ +// Copyright (c) 2021 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_sphere_fit_sorting.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_sphere_fit_sorting.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Simon Giraudot +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_SPHERE_FIT_SORTING_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_SPHERE_FIT_SORTING_H + +#include + +// Internal includes. +#include +#include + +namespace CGAL { +namespace Shape_detection { +namespace Point_set { + + /*! + \ingroup PkgShapeDetectionRGOnPoints + + \brief Sorting of 3D points with respect to the local sphere fit quality. + + Indices of 3D input points are sorted with respect to the quality of the + least squares sphere fit applied to the neighboring points of each point. + + \tparam GeomTraits + a model of `Kernel` + + \tparam Item_ + a descriptor representing a given point. Must be a model of `Hashable`. + + \tparam NeighborQuery + a model of `NeighborQuery` + + \tparam PointMap + a model of `ReadablePropertyMap` whose key type is the value type of the input + range and value type is `Kernel::Point_3` + */ + template< + typename GeomTraits, + typename Item_, + typename NeighborQuery, + typename PointMap> + class Least_squares_sphere_fit_sorting { + + public: + /// \name Types + /// @{ + + /// \cond SKIP_IN_MANUAL + using Traits = GeomTraits; + using Neighbor_query = NeighborQuery; + using Point_map = PointMap; + /// \endcond + + /// Item type. + using Item = Item_; + + /// Seed range. + using Seed_range = std::vector; + + /// @} + + private: + using FT = typename Traits::FT; + using Compare_scores = internal::Compare_scores; + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + + \tparam InputRange + a model of `ConstRange` whose iterator type is `RandomAccessIterator` + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param input_range + an instance of `InputRange` with 3D points + + \param neighbor_query + an instance of `NeighborQuery` that is used internally to + access point's neighbors + + \param np + a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{item_map} + \cgalParamDescription{an instance of a model of `ReadablePropertyMap` with `InputRange::const_iterator` + as key type and `Item` as value type.} + \cgalParamDefault{A default is provided when `Item` is `InputRange::const_iterator` or its value type.} + \cgalParamNEnd + \cgalParamNBegin{point_map} + \cgalParamDescription{an instance of `PointMap` that maps an item to `Kernel::Point_3`} + \cgalParamDefault{`PointMap()`} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of `GeomTraits`} + \cgalParamDefault{`GeomTraits()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `input_range.size() > 0` + */ + template + Least_squares_sphere_fit_sorting( + const InputRange& input_range, + NeighborQuery& neighbor_query, + const CGAL_NP_CLASS& np = parameters::default_values()) : + m_neighbor_query(neighbor_query), + m_point_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::point_map))), + m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))) { + + CGAL_precondition(input_range.size() > 0); + + using NP_helper = internal::Default_property_map_helper; + using Item_map = typename NP_helper::type; + Item_map item_map = NP_helper::get(np); + + m_ordered.resize(input_range.size()); + + std::size_t index = 0; + for (auto it = input_range.begin(); it != input_range.end(); it++) + m_ordered[index++] = get(item_map, it); + + m_scores.resize(input_range.size()); + } + + /// @} + + /// \name Sorting + /// @{ + + /*! + \brief sorts indices of input points. + */ + void sort() { + std::size_t seed_cutoff = compute_scores(); + CGAL_postcondition(m_scores.size() > 0); + Compare_scores cmp(m_scores); + + std::vector order(m_ordered.size()); + std::iota(order.begin(), order.end(), 0); + std::sort(order.begin(), order.end(), cmp); + + order.resize(m_ordered.size() - seed_cutoff); + + std::vector tmp(order.size()); + for (std::size_t i = 0; i < order.size(); i++) + tmp[i] = m_ordered[order[i]]; + + m_ordered.swap(tmp); + } + /// @} + + /// \name Access + /// @{ + + /*! + \brief returns an instance of `Seed_range` to access the ordered `Items` + of input points. + */ + const Seed_range &ordered() { + return m_ordered; + } + /// @} + + private: + Neighbor_query& m_neighbor_query; + const Point_map m_point_map; + const Traits m_traits; + Seed_range m_ordered; + std::vector m_scores; + + std::size_t compute_scores() { + + std::vector neighbors; + std::size_t idx = 0; + std::size_t seed_cutoff = 0; + for (const Item& item : m_ordered) { + neighbors.clear(); + m_neighbor_query(item, neighbors); + neighbors.push_back(item); + + m_scores[idx] = internal::create_sphere( + neighbors, m_point_map, m_traits, true).second; + + if (m_scores[idx] == -(std::numeric_limits::max)()) + seed_cutoff++; + + idx++; + } + + return seed_cutoff; + } + }; + +/*! + \ingroup PkgShapeDetectionRGOnPointSet3 + shortcut to ease the definition of the class when using `CGAL::Point_set_3`. + To be used together with `make_least_squares_sphere_fit_sorting()`. + \relates Least_squares_sphere_fit_sorting + */ +template +using Least_squares_sphere_fit_sorting_for_point_set = + Least_squares_sphere_fit_sorting::Kernel, + typename PointSet3::Index, + NeighborQuery, + typename PointSet3::Point_map>; + +/*! + \ingroup PkgShapeDetectionRGOnPointSet3 + returns an instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`. + \relates Least_squares_sphere_fit_sorting + */ +template +Least_squares_sphere_fit_sorting_for_point_set +make_least_squares_sphere_fit_sorting(const PointSet3& ps, + NeighborQuery& neighbor_query, + const CGAL_NP_CLASS np = parameters::default_values()) +{ + return Least_squares_sphere_fit_sorting_for_point_set + (ps, neighbor_query, np.point_map(ps.point_map())); +} + +} // namespace Point_set +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_SPHERE_FIT_SORTING_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Sphere_neighbor_query.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Sphere_neighbor_query.h new file mode 100644 index 00000000..00b20727 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Point_set/Sphere_neighbor_query.h @@ -0,0 +1,243 @@ +// Copyright (c) 2018 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Sphere_neighbor_query.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Point_set/Sphere_neighbor_query.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Florent Lafarge, Simon Giraudot, Thien Hoang, Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_SPHERE_NEIGHBOR_QUERY_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_SPHERE_NEIGHBOR_QUERY_H + +#include + +// CGAL includes. +#include +#include +#include +#include +#include +#include + +// Internal includes. +#include + +namespace CGAL { +namespace Shape_detection { +namespace Point_set { + +/*! + \ingroup PkgShapeDetectionRGOnPoints + + \brief Fuzzy sphere neighbors search in a set of 2D or 3D points. + + This class returns all neighbors of a query point, which fall in a sphere of + the fixed radius centered at this point. + + \tparam GeomTraits + a model of `Kernel` + + \tparam Item_ + a descriptor representing a given point. Must be a model of `Hashable`. + + \tparam PointMap + a model of `ReadablePropertyMap` whose key type is `Item_` and value type is `GeomTraits::Point_2` or `GeomTraits::Point_3` + + \cgalModels{NeighborQuery} +*/ +template< +typename GeomTraits, +typename Item_, +typename PointMap> +class Sphere_neighbor_query { + +public: + /// \name Types + /// @{ + + /// \cond SKIP_IN_MANUAL + using Traits = GeomTraits; + using Point_map = PointMap; + using Point_type = typename boost::property_traits::value_type; + + using Item = Item_; + using Region = std::vector; + /// \endcond + + /// Number type. + typedef typename GeomTraits::FT FT; + + /// @} + +private: + using Search_base = typename std::conditional< + std::is_same::value, + CGAL::Search_traits_2, + CGAL::Search_traits_3 >::type; + + using Search_traits = + CGAL::Search_traits_adapter; + + using Splitter = + CGAL::Sliding_midpoint; + + using Fuzzy_sphere + = CGAL::Fuzzy_sphere; + + using Tree + = CGAL::Kd_tree; + +public: + /// \name Initialization + /// @{ + + /*! + \brief initializes a Kd-tree with input points. + + \tparam InputRange + a model of `ConstRange` whose iterator type is `RandomAccessIterator` + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param input_range + an instance of `InputRange` with 2D or 3D points + + \param np + a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{item_map} + \cgalParamDescription{an instance of a model of `ReadablePropertyMap` with `InputRange::const_iterator` + as key type and `Item` as value type.} + \cgalParamDefault{A default is provided when `Item` is `InputRange::const_iterator` or its value type.} + \cgalParamNEnd + \cgalParamNBegin{sphere_radius} + \cgalParamDescription{the fixed radius of the fuzzy sphere used for + searching neighbors of a query point} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{1} + \cgalParamNEnd + \cgalParamNBegin{point_map} + \cgalParamDescription{an instance of `PointMap` that maps an item from `input_range` + to `Kernel::Point_2` or to `Kernel::Point_3`} + \cgalParamDefault{`PointMap()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `input_range.size() > 0` + \pre `sphere_radius > 0` + */ + template + Sphere_neighbor_query( + const InputRange& input_range, + const CGAL_NP_CLASS& np = parameters::default_values()) : + m_point_map(parameters::choose_parameter(parameters::get_parameter(np, internal_np::point_map))) + { + using NP_helper = internal::Default_property_map_helper; + using Item_map = typename NP_helper::type; + Item_map item_map = NP_helper::get(np); + + m_tree_ptr.reset( new Tree(make_transform_iterator_from_property_map(make_prevent_deref(input_range.begin()), item_map), + make_transform_iterator_from_property_map(make_prevent_deref(input_range.end()), item_map), + Splitter(), + Search_traits(m_point_map)) ); + + CGAL_precondition(input_range.size() > 0); + m_sphere_radius = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::sphere_radius), FT(1)); + CGAL_precondition(m_sphere_radius > FT(0)); + m_tree_ptr->build(); + } + + /// @} + + /// \name Access + /// @{ + + /*! + \brief implements `NeighborQuery::operator()()`. + + This operator finds all points, which fall into a sphere + of the fixed radius `sphere_radius` centered at the query point. + The references of those neighbors are returned in `neighbors`. + + \param query + `Item` of the query point + + \param neighbors + `Items` of points, which are neighbors of the query point + + \pre `query` is a valid const_iterator of InputRange + */ + void operator()( + const Item query, + std::vector& neighbors) const { + + neighbors.clear(); + const Fuzzy_sphere sphere( + get(m_point_map, query), m_sphere_radius, FT(0), m_tree_ptr->traits()); + m_tree_ptr->search(std::back_inserter(neighbors), sphere); + } + + /// @} + + /// \cond SKIP_IN_MANUAL + void set_sphere_radius(const FT sphere_radius) { + m_sphere_radius = sphere_radius; + } + + void operator()( + const Point_type& sphere_center, + std::vector& neighbors) const { + + neighbors.clear(); + const Fuzzy_sphere sphere( + sphere_center, m_sphere_radius, FT(0), m_tree_ptr->traits()); + m_tree_ptr->search(std::back_inserter(neighbors), sphere); + } + /// \endcond + +private: + const Point_map m_point_map; + + FT m_sphere_radius; + std::shared_ptr m_tree_ptr; +}; + +/*! + \ingroup PkgShapeDetectionRGOnPointSet3 + shortcut to ease the definition of the class when using `CGAL::Point_set_3`. + To be used together with `make_sphere_neighbor_query()`. + \relates Sphere_neighbor_query + */ +template +using Sphere_neighbor_query_for_point_set = + Sphere_neighbor_query::Kernel, + typename PointSet3::Index, + typename PointSet3::Point_map>; + +/*! + \ingroup PkgShapeDetectionRGOnPointSet3 + returns an instance of the sorting class to be used with `CGAL::Point_set_3`, with point and normal maps added to `np`. + \relates Sphere_neighbor_query + */ +template +Sphere_neighbor_query_for_point_set +make_sphere_neighbor_query(const PointSet3& ps, CGAL_NP_CLASS np = parameters::default_values()) +{ + return Sphere_neighbor_query_for_point_set( + ps, np.point_map(ps.point_map())); +} + +} // namespace Point_set +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_SPHERE_NEIGHBOR_QUERY_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh.h new file mode 100644 index 00000000..ae08d7b4 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh.h @@ -0,0 +1,33 @@ +// Copyright (c) 2018 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Polygon_mesh.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Polygon_mesh.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Florent Lafarge, Simon Giraudot, Thien Hoang, Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POLYGON_MESH_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POLYGON_MESH_H + +/// \cond SKIP_IN_MANUAL +#include +/// \endcond + +/** +* \ingroup PkgShapeDetectionRef +* \file CGAL/Shape_detection/Region_growing/Polygon_mesh.h +* A convenience header that includes all classes related to the region growing algorithm on a polygon mesh. +*/ + +#include +#include + +#include +#include + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POLYGON_MESH_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_region.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_region.h new file mode 100644 index 00000000..bc429d2b --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_region.h @@ -0,0 +1,436 @@ +// Copyright (c) 2018 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_region.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_region.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Florent Lafarge, Simon Giraudot, Thien Hoang, Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POLYGON_MESH_LEAST_SQUARES_PLANE_FIT_REGION_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POLYGON_MESH_LEAST_SQUARES_PLANE_FIT_REGION_H + +#include + +// Internal includes. +#include +#include + +namespace CGAL { +namespace Shape_detection { +namespace Polygon_mesh { + + /*! + \ingroup PkgShapeDetectionRGOnMesh + + \brief Region type based on the quality of the least squares plane + fit applied to faces of a polygon mesh. + + This class fits a plane, using \ref PkgPrincipalComponentAnalysisDRef "PCA", + to chunks of faces in a polygon mesh and controls the quality of this fit. + If all quality conditions are satisfied, the chunk is accepted as a valid region, + otherwise rejected. + + \tparam GeomTraits + a model of `Kernel` + + \tparam PolygonMesh + a model of `FaceListGraph` + + \tparam VertexToPointMap + a model of `ReadablePropertyMap` whose key type is the vertex type of a polygon mesh and + value type is `Kernel::Point_3` + + \cgalModels{RegionType} + */ + template< + typename GeomTraits, + typename PolygonMesh, + typename VertexToPointMap = typename boost::property_map::const_type> + class Least_squares_plane_fit_region { + + public: + /// \name Types + /// @{ + + /// \cond SKIP_IN_MANUAL + using Face_graph = PolygonMesh; + using Vertex_to_point_map = VertexToPointMap; + + using face_descriptor = typename boost::graph_traits::face_descriptor; + /// \endcond + + /// Number type. + typedef typename GeomTraits::FT FT; + + /// Item type. + using Item = face_descriptor; + using Region = std::vector; + + /// Primitive + using Primitive = typename GeomTraits::Plane_3; + + /// Region map + using Region_index_map = typename boost::property_map >::const_type; + + /// @} + + private: + using Point_3 = typename GeomTraits::Point_3; + using Vector_3 = typename GeomTraits::Vector_3; + using Plane_3 = typename GeomTraits::Plane_3; + + using Squared_length_3 = typename GeomTraits::Compute_squared_length_3; + using Squared_distance_3 = typename GeomTraits::Compute_squared_distance_3; + using Scalar_product_3 = typename GeomTraits::Compute_scalar_product_3; + using Cross_product_3 = typename GeomTraits::Construct_cross_product_vector_3; + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param pmesh + an instance of `PolygonMesh` that represents a polygon mesh + + \param np + a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{maximum_distance} + \cgalParamDescription{the maximum distance from the furthest vertex of a face to a plane} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{1} + \cgalParamNEnd + \cgalParamNBegin{maximum_angle} + \cgalParamDescription{the maximum angle in degrees between + the normal of a face and the normal of a plane} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{25 degrees} + \cgalParamNEnd + \cgalParamNBegin{cosine_of_maximum_angle} + \cgalParamDescription{the cosine value `cos(maximum_angle * PI / 180)` to be used instead of the parameter `maximum_angle()`} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{`cos(25 * PI / 180)`} + \cgalParamNEnd + \cgalParamNBegin{minimum_region_size} + \cgalParamDescription{the minimum number of faces a region must have} + \cgalParamType{`std::size_t`} + \cgalParamDefault{1} + \cgalParamNEnd + \cgalParamNBegin{vertex_point_map} + \cgalParamDescription{an instance of `VertexToPointMap` that maps a polygon mesh + vertex to `Kernel::Point_3`} + \cgalParamDefault{`boost::get(CGAL::vertex_point, pmesh)`} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of `GeomTraits`} + \cgalParamDefault{`GeomTraits()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `faces(tmesh).size() > 0` + \pre `maximum_distance >= 0` + \pre `maximum_angle >= 0 && maximum_angle <= 90` + \pre `cosine_of_maximum_angle >= 0 && cosine_of_maximum_angle <= 1` + \pre `minimum_region_size > 0` + */ + template + Least_squares_plane_fit_region( + const PolygonMesh& pmesh, + const CGAL_NP_CLASS& np = parameters::default_values()) : + m_face_graph(pmesh), + m_vertex_to_point_map(parameters::choose_parameter(parameters::get_parameter( + np, internal_np::vertex_point), get_const_property_map(CGAL::vertex_point, pmesh))), + m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))), + m_squared_length_3(m_traits.compute_squared_length_3_object()), + m_squared_distance_3(m_traits.compute_squared_distance_3_object()), + m_scalar_product_3(m_traits.compute_scalar_product_3_object()), + m_cross_product_3(m_traits.construct_cross_product_vector_3_object()) { + + CGAL_precondition(faces(m_face_graph).size() > 0); + const FT max_distance = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_distance), FT(1)); + CGAL_precondition(max_distance >= FT(0)); + m_distance_threshold = max_distance; + + const FT max_angle = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_angle), FT(25)); + CGAL_precondition(max_angle >= FT(0) && max_angle <= FT(90)); + + m_min_region_size = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::minimum_region_size), 1); + CGAL_precondition(m_min_region_size > 0); + + const FT default_cos_value = static_cast(std::cos(CGAL::to_double( + (max_angle * static_cast(CGAL_PI)) / FT(180)))); + const FT cos_value = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::cosine_of_maximum_angle), default_cos_value); + CGAL_precondition(cos_value >= FT(0) && cos_value <= FT(1)); + m_cos_value_threshold = cos_value; + } + + /// @} + + /// \name Access + /// @{ + + /*! + \brief implements `RegionType::region_index_map()`. + + This function creates an empty property map that maps each face to a std::size_t + */ + Region_index_map region_index_map() { + return get(CGAL::dynamic_face_property_t(), m_face_graph); + } + + /*! + \brief implements `RegionType::primitive()`. + + This function provides the last primitive that has been fitted with the region. + + \return Primitive parameters that fits the region. + + \pre `successful fitted primitive via successful call of update(region) with a sufficient large region` + */ + + Primitive primitive() const { + return m_plane_of_best_fit; + } + + /*! + \brief implements `RegionType::is_part_of_region()`. + + This function controls if the face `query` is within + the `maximum_distance` from the corresponding plane and if the angle between + its normal and the plane's normal is within the `maximum_angle`. If both conditions + are satisfied, it returns `true`, otherwise `false`. + + \param query + `Item` of the query face + + The last parameter is not used in this implementation. + + \return Boolean `true` or `false` + + \pre `query` is a valid const_iterator of `input_range` + */ + bool is_part_of_region( + const Item query, + const Region&) const { + + const FT squared_distance_to_fitted_plane = get_max_squared_distance(query); + if (squared_distance_to_fitted_plane < FT(0)) return false; + const FT squared_distance_threshold = + m_distance_threshold * m_distance_threshold; + + const Vector_3 face_normal = get_face_normal(query); + const FT cos_value = m_scalar_product_3(face_normal, m_normal_of_best_fit); + const FT squared_cos_value = cos_value * cos_value; + + FT squared_cos_value_threshold = + m_cos_value_threshold * m_cos_value_threshold; + squared_cos_value_threshold *= m_squared_length_3(face_normal); + squared_cos_value_threshold *= m_squared_length_3(m_normal_of_best_fit); + + return ( + ( squared_distance_to_fitted_plane <= squared_distance_threshold ) && + ( squared_cos_value >= squared_cos_value_threshold )); + } + + /*! + \brief implements `RegionType::is_valid_region()`. + + This function controls if the `region` contains at least `minimum_region_size` faces. + + \param region + Faces of the region represented as `Items`. + + \return Boolean `true` or `false` + */ + inline bool is_valid_region(const Region& region) const { + return (region.size() >= m_min_region_size); + } + + /*! + \brief implements `RegionType::update()`. + + This function fits the least squares plane to all vertices of the faces + from the `region`. + + \param region + Faces of the region represented as `Items`. + + \return Boolean `true` if the plane fitting succeeded and `false` otherwise + + \pre `region.size() > 0` + */ + bool update(const Region& region) { + + CGAL_precondition(region.size() > 0); + if (region.size() == 1) { // create new reference plane and normal + const Item face = region[0]; + + // The best fit plane will be a plane through this face centroid with + // its normal being the face's normal. + const Point_3 face_centroid = get_face_centroid(face); + const Vector_3 face_normal = get_face_normal(face); + if (face_normal == CGAL::NULL_VECTOR) return false; + + CGAL_precondition(face_normal != CGAL::NULL_VECTOR); + m_plane_of_best_fit = Plane_3(face_centroid, face_normal); + m_normal_of_best_fit = m_plane_of_best_fit.orthogonal_vector(); + + } else { // update reference plane and normal + CGAL_precondition(region.size() >= 2); + std::tie(m_plane_of_best_fit, m_normal_of_best_fit) = + get_plane_and_normal(region); + } + return true; + } + + /// @} + + /// \cond SKIP_IN_MANUAL + std::pair get_plane_and_normal( + const Region& region) const { + + // The best fit plane will be a plane fitted to all vertices of all + // region faces with its normal being perpendicular to the plane. + // Given that the points, and no normals, are used in estimating + // the plane, the estimated normal will point into an arbitray + // one of the two possible directions. + // We flip it into the correct direction (the one that the majority + // of faces agree with) below. + // This fix is proposed by nh2: + // https://github.com/CGAL/cgal/pull/4563 + const Plane_3 unoriented_plane_of_best_fit = + internal::create_plane_from_faces( + m_face_graph, region, m_vertex_to_point_map, m_traits).first; + const Vector_3 unoriented_normal_of_best_fit = + unoriented_plane_of_best_fit.orthogonal_vector(); + + // Compute actual direction of plane's normal sign + // based on faces, which belong to that region. + // Approach: each face gets one vote to keep or flip the current plane normal. + long votes_to_keep_normal = 0; + for (const auto &face : region) { + const Vector_3 face_normal = get_face_normal(face); + const bool agrees = + m_scalar_product_3(face_normal, unoriented_normal_of_best_fit) > FT(0); + votes_to_keep_normal += (agrees ? 1 : -1); + } + const bool flip_normal = (votes_to_keep_normal < 0); + + const Plane_3 plane_of_best_fit = flip_normal + ? unoriented_plane_of_best_fit.opposite() + : unoriented_plane_of_best_fit; + const Vector_3 normal_of_best_fit = flip_normal + ? (-1 * unoriented_normal_of_best_fit) + : unoriented_normal_of_best_fit; + + return std::make_pair(plane_of_best_fit, normal_of_best_fit); + } + /// \endcond + + private: + const Face_graph& m_face_graph; + const Vertex_to_point_map m_vertex_to_point_map; + const GeomTraits m_traits; + + FT m_distance_threshold; + FT m_cos_value_threshold; + std::size_t m_min_region_size; + + const Squared_length_3 m_squared_length_3; + const Squared_distance_3 m_squared_distance_3; + const Scalar_product_3 m_scalar_product_3; + const Cross_product_3 m_cross_product_3; + + Plane_3 m_plane_of_best_fit; + Vector_3 m_normal_of_best_fit; + + // Compute centroid of the face. + template + Point_3 get_face_centroid(const Face& face) const { + + const auto hedge = halfedge(face, m_face_graph); + const auto vertices = vertices_around_face(hedge, m_face_graph); + CGAL_precondition(vertices.size() > 0); + + FT sum = FT(0), x = FT(0), y = FT(0), z = FT(0); + for (const auto vertex : vertices) { + const Point_3& point = get(m_vertex_to_point_map, vertex); + x += point.x(); + y += point.y(); + z += point.z(); + sum += FT(1); + } + CGAL_precondition(sum > FT(0)); + x /= sum; + y /= sum; + z /= sum; + return Point_3(x, y, z); + } + + // Compute normal of the face. + template + Vector_3 get_face_normal(const Face& face) const { + + const auto hedge = halfedge(face, m_face_graph); + const auto vertices = vertices_around_face(hedge, m_face_graph); + CGAL_precondition(vertices.size() >= 3); + + auto vertex = vertices.begin(); + const Point_3& point1 = get(m_vertex_to_point_map, *vertex); ++vertex; + const Point_3& point2 = get(m_vertex_to_point_map, *vertex); ++vertex; + const Point_3& point3 = get(m_vertex_to_point_map, *vertex); + + const Vector_3 u = point2 - point1; + const Vector_3 v = point3 - point1; + const Vector_3 face_normal = m_cross_product_3(u, v); + return face_normal; + } + + // The maximum squared distance from the vertices of the face + // to the best fit plane. + template + FT get_max_squared_distance(const Face& face) const { + + FT max_squared_distance = -FT(1); + const FT a = CGAL::abs(m_plane_of_best_fit.a()); + const FT b = CGAL::abs(m_plane_of_best_fit.b()); + const FT c = CGAL::abs(m_plane_of_best_fit.c()); + const FT d = CGAL::abs(m_plane_of_best_fit.d()); + if (a == FT(0) && b == FT(0) && c == FT(0) && d == FT(0)) + return max_squared_distance; + + const auto hedge = halfedge(face, m_face_graph); + const auto vertices = vertices_around_face(hedge, m_face_graph); + CGAL_precondition(vertices.size() > 0); + + for (const auto vertex : vertices) { + const Point_3& point = get(m_vertex_to_point_map, vertex); + const FT squared_distance = m_squared_distance_3(point, m_plane_of_best_fit); + max_squared_distance = (CGAL::max)(squared_distance, max_squared_distance); + } + CGAL_precondition(max_squared_distance >= FT(0)); + return max_squared_distance; + } + }; + +} // namespace Polygon_mesh +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POLYGON_MESH_LEAST_SQUARES_PLANE_FIT_REGION_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_sorting.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_sorting.h new file mode 100644 index 00000000..1c4ef54c --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_sorting.h @@ -0,0 +1,196 @@ +// Copyright (c) 2018 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_sorting.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_sorting.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Florent Lafarge, Simon Giraudot, Thien Hoang, Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POLYGON_MESH_LEAST_SQUARES_PLANE_FIT_SORTING_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POLYGON_MESH_LEAST_SQUARES_PLANE_FIT_SORTING_H + +#include + +// Internal includes. +#include +#include + +namespace CGAL { +namespace Shape_detection { +namespace Polygon_mesh { + + /*! + \ingroup PkgShapeDetectionRGOnMesh + + \brief Sorting of polygon mesh faces with respect to the local plane fit quality. + + `Items` of faces in a polygon mesh are sorted with respect to the quality of the + least squares plane fit applied to the vertices of incident faces of each face. + + \tparam GeomTraits + a model of `Kernel` + + \tparam PolygonMesh + a model of `FaceListGraph` + + \tparam NeighborQuery + a model of `NeighborQuery` + + \tparam VertexToPointMap + a model of `ReadablePropertyMap` whose key type is the vertex type of a polygon mesh and + value type is `Kernel::Point_3` + */ + template< + typename GeomTraits, + typename PolygonMesh, + typename NeighborQuery, + typename VertexToPointMap = typename boost::property_map::const_type> + class Least_squares_plane_fit_sorting { + + public: + /// \name Types + /// @{ + + /// \cond SKIP_IN_MANUAL + using Face_graph = PolygonMesh; + using Neighbor_query = NeighborQuery; + using Vertex_to_point_map = VertexToPointMap; + /// \endcond + + /// Item type. + using Item = typename boost::graph_traits::face_descriptor; + + /// Seed range. + using Seed_range = std::vector; + + /// @} + + private: + using FT = typename GeomTraits::FT; + using Compare_scores = internal::Compare_scores; + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param pmesh + an instance of `PolygonMesh` that represents a polygon mesh + + \param neighbor_query + an instance of `NeighborQuery` that is used internally to + access face's neighbors + + \param np + a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{vertex_point_map} + \cgalParamDescription{an instance of `VertexToPointMap` that maps a polygon mesh + vertex to `Kernel::Point_3`} + \cgalParamDefault{`boost::get(CGAL::vertex_point, pmesh)`} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of `GeomTraits`} + \cgalParamDefault{`GeomTraits()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `faces(pmesh).size() > 0` + */ + template + Least_squares_plane_fit_sorting( + const PolygonMesh& pmesh, + NeighborQuery& neighbor_query, + const CGAL_NP_CLASS& np = parameters::default_values()) : + m_face_graph(pmesh), + m_neighbor_query(neighbor_query), + m_vertex_to_point_map(parameters::choose_parameter(parameters::get_parameter( + np, internal_np::vertex_point), get_const_property_map(CGAL::vertex_point, pmesh))), + m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))) { + + CGAL_precondition(faces(pmesh).size() > 0); + + m_ordered.resize(faces(pmesh).size()); + + std::size_t index = 0; + for (Item item : faces(pmesh)) + m_ordered[index++] = item; + m_scores.resize(m_ordered.size()); + } + + /// @} + + /// \name Sorting + /// @{ + + /*! + \brief sorts `Items` of input faces. + */ + void sort() { + compute_scores(); + CGAL_precondition(m_scores.size() > 0); + Compare_scores cmp(m_scores); + + std::vector order(m_ordered.size()); + std::iota(order.begin(), order.end(), 0); + std::sort(order.begin(), order.end(), cmp); + + std::vector tmp(m_ordered.size()); + for (std::size_t i = 0; i < m_ordered.size(); i++) + tmp[i] = m_ordered[order[i]]; + + m_ordered.swap(tmp); + } + /// @} + + /// \name Access + /// @{ + + /*! + \brief returns an instance of `Seed_range` to access the ordered `Items` + of input faces. + */ + const Seed_range &ordered() { + return m_ordered; + } + /// @} + + private: + const Face_graph& m_face_graph; + Neighbor_query& m_neighbor_query; + const Vertex_to_point_map m_vertex_to_point_map; + const GeomTraits m_traits; + Seed_range m_ordered; + std::vector m_scores; + + void compute_scores() { + + std::vector neighbors; + std::size_t idx = 0; + for (Item item : m_ordered) { + neighbors.clear(); + m_neighbor_query(item, neighbors); + neighbors.push_back(item); + m_scores[idx++] = internal::create_plane_from_faces( + m_face_graph, neighbors, m_vertex_to_point_map, m_traits).second; + } + } + }; + +} // namespace Polygon_mesh +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POLYGON_MESH_LEAST_SQUARES_PLANE_FIT_SORTING_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/One_ring_neighbor_query.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/One_ring_neighbor_query.h new file mode 100644 index 00000000..7bb87e0f --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/One_ring_neighbor_query.h @@ -0,0 +1,114 @@ +// Copyright (c) 2018 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/One_ring_neighbor_query.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Polygon_mesh/One_ring_neighbor_query.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Florent Lafarge, Simon Giraudot, Thien Hoang, Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POLYGON_MESH_ONE_RING_NEIGHBOR_QUERY_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POLYGON_MESH_ONE_RING_NEIGHBOR_QUERY_H + +#include + +// Internal includes. +#include + +namespace CGAL { +namespace Shape_detection { +namespace Polygon_mesh { + + /*! + \ingroup PkgShapeDetectionRGOnMesh + + \brief Edge-adjacent faces connectivity in a polygon mesh. + + This class returns all faces, which are edge-adjacent to a query face in a + polygon mesh being a `PolygonMesh`. + + \tparam PolygonMesh + a model of `FaceListGraph` + + \tparam FaceRange + a model of `ConstRange` whose iterator type is `RandomAccessIterator` and + value type is the face type of a polygon mesh + + \cgalModels{NeighborQuery} + */ + template + class One_ring_neighbor_query + { + using face_descriptor = typename boost::graph_traits::face_descriptor; + using Face_graph = PolygonMesh; + public: + /// Item type. + using Item = typename boost::graph_traits::face_descriptor; + using Region = std::vector; + + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + + \param pmesh + an instance of a `PolygonMesh` that represents a polygon mesh + + \pre `faces(pmesh).size() > 0` + */ + One_ring_neighbor_query(const PolygonMesh& pmesh) + : m_face_graph(pmesh) + {} + + /// @} + + /// \name Access + /// @{ + + /*! + \brief implements `NeighborQuery::operator()()`. + + This operator retrieves all faces, + which are edge-adjacent to the face `query`. + These `Items` are returned in `neighbors`. + + \param query + `Item` of the query face + + \param neighbors + `Items` of faces, which are neighbors of the query face + + \pre `query_index < faces(pmesh).size()` + */ + void operator()( + const Item query, + std::vector& neighbors) const { + + neighbors.clear(); + const auto query_hedge = halfedge(query, m_face_graph); + + for (face_descriptor face : faces_around_face(query_hedge, m_face_graph)) + { + if (face != boost::graph_traits::null_face()) + { + neighbors.push_back(face); + } + } + } + + /// @} + + private: + const Face_graph& m_face_graph; + }; + +} // namespace Polygon_mesh +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POLYGON_MESH_ONE_RING_NEIGHBOR_QUERY_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Polyline_graph.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Polyline_graph.h new file mode 100644 index 00000000..166bf632 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Polyline_graph.h @@ -0,0 +1,341 @@ +// Copyright (c) 2020 GeometryFactory SARL (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Polyline_graph.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Polyline_graph.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POLYGON_MESH_POLYLINE_GRAPH_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_POLYGON_MESH_POLYLINE_GRAPH_H + +#include + +// Internal includes. +#include + +namespace CGAL { +namespace Shape_detection { +namespace Polygon_mesh { + + /*! + \ingroup PkgShapeDetectionRGOnMesh + + \brief Polygon mesh edges connected into a graph. + + This class returns all edges, which form polylines splitting the polygon mesh + being a `PolygonMesh` into planar regions. + + \tparam PolygonMesh + a model of `FaceListGraph` + + \tparam VertexPointMap + a model of `ReadablePropertyMap` whose key type is the vertex type of a polygon mesh and + value type is `Point_3` from a \cgal %Kernel + + \cgalModels{NeighborQuery} + */ + template< + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::const_type + > + class Polyline_graph { + + using face_descriptor = typename boost::graph_traits::face_descriptor; + using edge_descriptor = typename boost::graph_traits::edge_descriptor; + using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; + using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; + + private: + + struct PEdge { + std::size_t index = std::size_t(-1); + edge_descriptor ed; + std::vector neighbors; + std::pair regions; + }; + + using EdgeIndexMap = typename boost::property_map >::const_type; + + public: + /// \name Types + /// @{ + + /// Item type. + using Item = typename boost::graph_traits::edge_descriptor; + + #ifdef DOXYGEN_RUNNING + /*! + a model of `ConstRange` whose iterator type is `RandomAccessIterator` and + value type is `edge_descriptor` of the `PolygonMesh`. + */ + typedef unspecified_type Segment_range; + + /*! + a model of `ReadablePropertyMap` whose key type is the value type of `Segment_range` + and value type is `Kernel::Segment_3`. + */ + typedef unspecified_type Segment_map; + #else + /// Segment_range type. + using Segment_range = std::vector; + + using Segment_map = Segment_from_edge_descriptor_map; + #endif + + /// @} + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + \tparam FaceToRegionMap + a model of `ReadablePropertyMap` whose key type is `face_descriptor` of the `PolygonMesh` + and value type is `std::size_t` + + \tparam NamedParameters + a sequence of optional \ref bgl_namedparameters "Named Parameters" + + \param pmesh a polygon mesh + + \param face_to_region_map maps each face of `pmesh` to + a corresponding planar region id + + \param np a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{vertex_point_map} + \cgalParamDescription{an instance of `VertexPointMap` that maps a polygon mesh + vertex to `Kernel::Point_3`} + \cgalParamDefault{`boost::get(CGAL::vertex_point, pmesh)`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `faces(pmesh).size() > 0` + \pre `edges(pmesh).size() > 0` + */ + template + Polyline_graph( + const PolygonMesh& pmesh, + FaceToRegionMap face_to_region_map, + const CGAL_NP_CLASS& np = parameters::default_values()) + : Polyline_graph(pmesh, edges(pmesh), face_to_region_map, np) + {} + + /*! + \brief initializes all internal data structures. + \tparam FaceToRegionMap + a model of `ReadablePropertyMap` whose key type is `face_descriptor` of the `PolygonMesh` + and value type is `std::size_t` + + \tparam EdgeRange a model of `ConstRange` with `edge_descriptor` as iterator value type. + + \tparam NamedParameters + a sequence of optional \ref bgl_namedparameters "Named Parameters" + + \param pmesh a polygon mesh + + \param edge_range contains all edges in `pmesh` to be considered in the graph + + \param face_to_region_map maps each face of `pmesh` to + a corresponding planar region id + + \param np a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \cgalNamedParamsBegin + \cgalParamNBegin{vertex_point_map} + \cgalParamDescription{an instance of `VertexPointMap` that maps a polygon mesh + vertex to `Kernel::Point_3`} + \cgalParamDefault{`boost::get(CGAL::vertex_point, pmesh)`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `faces(pmesh).size() > 0` + \pre `edges(pmesh).size() > 0` + */ + template + Polyline_graph( + const PolygonMesh& pmesh, + const EdgeRange& edge_range, + FaceToRegionMap face_to_region_map, + const NamedParameters& np = parameters::default_values()) + : m_vpm(parameters::choose_parameter(parameters::get_parameter( + np, internal_np::vertex_point), + get_const_property_map(CGAL::vertex_point, pmesh))), + m_segment_map(&pmesh, m_vpm) + { + clear(); + + m_eimap = get(CGAL::dynamic_edge_property_t(), pmesh); + + // init map + for(edge_descriptor e : edges(pmesh)) + put(m_eimap, e, std::size_t(-1)); + + // collect edges either on the boundary or having two different incident regions + for (auto edge = edge_range.begin(); edge != edge_range.end(); edge++) { + halfedge_descriptor h1 = halfedge(*edge, pmesh), + h2 = opposite(h1, pmesh); + + face_descriptor f1 = face(h1, pmesh), + f2 = face(h2, pmesh); + + std::size_t r1 = -1, r2 = -1; + + if (f1 != boost::graph_traits::null_face()) + r1 = get(face_to_region_map, f1); + if (f2 != boost::graph_traits::null_face()) + r2 = get(face_to_region_map, f2); + + if (r1 != r2) { + m_segments.push_back(*edge); + add_graph_edge(m_segments.begin() + (m_segments.size() - 1), r1, r2); + } + } + + // build adjacency between edges + typedef typename boost::property_map >::const_type VisitedVertexMap; + VisitedVertexMap visited_vertices = get(CGAL::dynamic_vertex_property_t(), pmesh); + for (std::size_t i = 0; i < m_pedges.size(); ++i) + { + put(visited_vertices, source(m_pedges[i].ed, pmesh), false); + put(visited_vertices, target(m_pedges[i].ed, pmesh), false); + } + + for (std::size_t i = 0; i < m_pedges.size(); ++i) + { + auto& pedge = m_pedges[i]; + CGAL_precondition(pedge.regions.first != pedge.regions.second); + CGAL_precondition(pedge.index != std::size_t(-1)); + + std::array vrts = { source(pedge.ed, pmesh), target(pedge.ed, pmesh) }; + + for (int k = 0; k < 2; ++k) + { + if (!get(visited_vertices, vrts[k])) + { + add_vertex_neighbors(vrts[k], pmesh); + put(visited_vertices, vrts[k], true); + } + } + } + } + /// @} + + /// \name Access + /// @{ + + /*! + \brief implements `NeighborQuery::operator()()`. + + This operator retrieves all edges from `segment_range()`, + which are neighbors of the edge `query`. + The `Items` are returned in `neighbors`. + + \param query + Iterator of EdgeRange of the query edge + + \param neighbors + Iterators of Segment_range of edges, which are adjacent to the query edge + + \pre `query` is a valid element of the input edge_range + */ + template + void operator()( + const I query, + std::vector& neighbors) const + { + neighbors.clear(); + const auto& pedge = m_pedges[get(m_eimap, query)]; + neighbors.resize(pedge.neighbors.size()); + for (std::size_t i = 0; i < pedge.neighbors.size(); i++) + neighbors[i] = m_pedges[pedge.neighbors[i]].ed; + } + + /*! + \brief returns an instance of `Segment_range` to access edges, which + form polylines + */ + const Segment_range &segment_range() const { + return m_segments; + } + + /*! + \brief returns an instance of `Segment_map` that maps an edge from `segment_range()` + to `Kernel::Segment_3`. + */ + const Segment_map& segment_map() const { + return m_segment_map; + } + /// @} + + /// \cond SKIP_IN_MANUAL + void clear() { + m_pedges.clear(); + } + + void release_memory() { + m_pedges.shrink_to_fit(); + } + /// \endcond + + private: + const VertexPointMap m_vpm; + EdgeIndexMap m_eimap; + + const Segment_map m_segment_map; + std::vector m_pedges; + Segment_range m_segments; + + void add_graph_edge( + typename Segment_range::const_iterator edge, const std::size_t region1, const std::size_t region2) + { + PEdge pedge; + CGAL_precondition(region1 != region2); + const std::size_t ei = m_pedges.size(); + put(m_eimap, *edge, ei); + + pedge.index = ei; + pedge.ed = *edge; + pedge.regions = {region1, region2}; + m_pedges.push_back(pedge); + } + + void add_vertex_neighbors( + const vertex_descriptor vertex, + const PolygonMesh& pmesh) + { + std::vector nei; + for (const auto& hedge : halfedges_around_target(vertex, pmesh)) + { + const auto e = edge(hedge, pmesh); + const std::size_t ei = get(m_eimap, e); + if (ei == std::size_t(-1)) continue; + if (nei.size()==2) return; + nei.push_back(ei); + } + if (nei.size()==2) + { + m_pedges[nei[0]].neighbors.push_back(nei[1]); + m_pedges[nei[1]].neighbors.push_back(nei[0]); + } + } + }; + +} // namespace Polygon_mesh +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_POLYGON_MESH_POLYLINE_GRAPH_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Region_growing.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Region_growing.h index 5b845f47..f78dfe0e 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Region_growing.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Region_growing.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection/Region_growing/Region_growing.h $ -// $Id: Region_growing.h 393f547 2020-11-26T14:21:10+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Region_growing.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Region_growing.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,14 +19,32 @@ // STL includes. #include #include +#include // CGAL includes. #include +#include #include +#include +#include +#include namespace CGAL { namespace Shape_detection { +namespace internal { + template ::value> + struct RM_creator{ + static RegionMap create(RegionType) { return RegionMap(); } + }; + + template + struct RM_creator{ + static RegionMap create(RegionType& r ) { return r.region_index_map(); } + }; +} + /*! \ingroup PkgShapeDetectionRG @@ -36,47 +54,117 @@ namespace Shape_detection { of user-defined items - given a way to access neighbors of each item via the `NeighborQuery` parameter class and - control if items form a valid region type via the `RegionType` parameter class, - - the `SeedMap` property map enables to define the seeding order of items and skip unnecessary items. - - \tparam InputRange - must be a model of `ConstRange`. + - optional `SeedRange` defining the seeding order of items and skipping unnecessary items. \tparam NeighborQuery - must be a model of `NeighborQuery`. + a model of `NeighborQuery` \tparam RegionType - must be a model of `RegionType`. + a model of `RegionType` - \tparam SeedMap - must be an `LvaluePropertyMap` whose key and value types are `std::size_t`. - %Default is `CGAL::Identity_property_map`. + \tparam RegionMap a model of `ReadWritePropertyMap` whose key type is `Item` + and value type is `std::size_t`. */ template< - typename InputRange, - typename NeighborQuery, - typename RegionType, - typename SeedMap = CGAL::Identity_property_map > + typename NeighborQuery, + typename RegionType, + typename RegionMap = typename RegionType::Region_index_map> class Region_growing { public: - + /// \name Types /// \cond SKIP_IN_MANUAL - using Input_range = InputRange; using Neighbor_query = NeighborQuery; using Region_type = RegionType; - using Seed_map = SeedMap; - - using Visited_items = std::vector; - using Running_queue = std::queue; - using Indices = std::vector; /// \endcond - /// \name Initialization + /// Item type. + using Item = typename RegionType::Item; + using Region = std::vector; + + /// Primitive and region type + using Primitive_and_region = std::pair; + + /// Item to region property map. + using Region_map = RegionMap; + + private: + using Running_queue = std::queue; + + public: + /// \name Initialization (RegionMap is the default type) /// @{ /*! \brief initializes the region growing algorithm. + \tparam InputRange + a model of `ConstRange` + + \tparam ItemMap + a model of `ReadablePropertyMap` with `InputRange::const_iterator` as key type and `Item` as value type. + A default can be deduced using the value type of `InputRange` and `Item` to be + either `CGAL::Dereference_property_map` or `CGAL::Identity_property_map`. + + \param input_range + a range of input items for region growing. + + \param neighbor_query + an instance of `NeighborQuery` that is used internally to + access item's neighbors + + \param region_type + an instance of `RegionType` that is used internally to + control if items form a valid region type + + \param item_map + an instance of the property map to retrieve items from input values + + \pre `input_range.size() > 0` + */ + template + Region_growing( + const InputRange& input_range, + NeighborQuery& neighbor_query, + RegionType& region_type, + ItemMap item_map = ItemMap() +#ifndef DOXYGEN_RUNNING + , std::enable_if_t::value>* = 0 +#endif + ) : + m_neighbor_query(neighbor_query), + m_region_type(region_type), + m_region_map(internal::RM_creator::create(region_type)), + m_visited(m_visited_map) + { + CGAL_precondition(input_range.size() > 0); + m_seed_range.resize(input_range.size()); + + using Item_helper = internal::Item_map_helper; + using Item_map = typename Item_helper::type; + Item_map item_map_ = Item_helper::get(item_map); + + std::size_t idx = 0; + for (auto it = input_range.begin(); it != input_range.end(); it++) + m_seed_range[idx++] = get(item_map_, it); + + clear(input_range, item_map_); + } + + /*! + \brief initializes the region growing algorithm. + + \tparam InputRange + a model of `ConstRange` + + \tparam SeedRange + a model of `ConstRange` with `Item` as value type + + \tparam ItemMap + a model of `ReadablePropertyMap` with `InputRange::const_iterator` as key type and `Item` as value type. + A default can be deduced using the value type of `InputRange` and `Item` to be + either `CGAL::Dereference_property_map` or `CGAL::Identity_property_map`. + \param input_range a range of input items for region growing @@ -88,25 +176,167 @@ namespace Shape_detection { an instance of `RegionType` that is used internally to control if items form a valid region type - \param seed_map - an instance of `SeedMap` property map that is used internally to - set the order of items in the region growing processing queue. If it maps - to `std::size_t(-1)`, the corresponding item is skipped. + \param seed_range + a vector of `Item` that is used as seeds for the region growing. + Defaults to the full input_range. + + \param item_map + an instance of the property map to retrieve items from input values \pre `input_range.size() > 0` */ + template Region_growing( const InputRange& input_range, + SeedRange& seed_range, NeighborQuery& neighbor_query, RegionType& region_type, - const SeedMap seed_map = SeedMap()) : - m_input_range(input_range), - m_neighbor_query(neighbor_query), - m_region_type(region_type), - m_seed_map(seed_map) { + ItemMap item_map = ItemMap() +#ifndef DOXYGEN_RUNNING + , std::enable_if_t::value>* = 0 +#endif + ) : + m_neighbor_query(neighbor_query), + m_region_type(region_type), + m_region_map(internal::RM_creator::create(region_type)), + m_visited(m_visited_map) { + + CGAL_precondition(input_range.size() > 0); + CGAL_precondition(seed_range.size() > 0); + m_seed_range.resize(seed_range.size()); + + using Item_helper = internal::Item_map_helper; + using Item_map = typename Item_helper::type; + Item_map item_map_ = Item_helper::get(item_map); + + std::size_t idx = 0; + for (auto it = seed_range.begin(); it != seed_range.end(); it++) + m_seed_range[idx++] = *it; + + clear(input_range, item_map_); + } + /// @} + + /// \name Initialization (RegionMap is a user provided type) + /// @{ + + /*! + \brief initializes the region growing algorithm. + + \tparam InputRange + a model of `ConstRange` + + \tparam ItemMap + a model of `ReadablePropertyMap` with `InputRange::const_iterator` as key type and `Item` as value type. + A default can be deduced using the value type of `InputRange` and `Item` to be + either `CGAL::Dereference_property_map` or `CGAL::Identity_property_map`. + + \param input_range + a range of input items for region growing. + \param neighbor_query + an instance of `NeighborQuery` that is used internally to + access item's neighbors + + \param region_type + an instance of `RegionType` that is used internally to + control if items form a valid region type + + \param item_map + an instance of the property map to retrieve items from input values + + \param rm external property map that will be filled when calling `detect()` + + \pre `input_range.size() > 0` + */ + template + Region_growing( + const InputRange& input_range, + NeighborQuery& neighbor_query, + RegionType& region_type, + Region_map rm, + ItemMap item_map = ItemMap()) : + m_neighbor_query(neighbor_query), + m_region_type(region_type), + m_region_map(rm), + m_visited(m_visited_map) + { CGAL_precondition(input_range.size() > 0); - clear(); + m_seed_range.resize(input_range.size()); + + using Item_helper = internal::Item_map_helper; + using Item_map = typename Item_helper::type; + Item_map item_map_ = Item_helper::get(item_map); + + std::size_t idx = 0; + for (auto it = input_range.begin(); it != input_range.end(); it++) + m_seed_range[idx++] = get(item_map_, it); + + clear(input_range, item_map_); + } + + /*! + \brief initializes the region growing algorithm. + + \tparam InputRange + a model of `ConstRange` + + \tparam SeedRange + a model of `ConstRange` with `Item` as value type + + \tparam ItemMap + a model of `ReadablePropertyMap` with `InputRange::const_iterator` as key type and `Item` as value type. + A default can be deduced using the value type of `InputRange` and `Item` to be + either `CGAL::Dereference_property_map` or `CGAL::Identity_property_map`. + + \param input_range + a range of input items for region growing + + \param neighbor_query + an instance of `NeighborQuery` that is used internally to + access item's neighbors + + \param region_type + an instance of `RegionType` that is used internally to + control if items form a valid region type + + \param seed_range + a vector of `Item` that is used as seeds for the region growing. + Defaults to the full input_range. + + \param item_map + an instance of the property map to retrieve items from input values + + \param rm external property map that will be filled when calling `detect()` + + \pre `input_range.size() > 0` + */ + template + Region_growing( + const InputRange& input_range, + SeedRange& seed_range, + NeighborQuery& neighbor_query, + RegionType& region_type, + Region_map rm, + ItemMap item_map = ItemMap()) : + m_neighbor_query(neighbor_query), + m_region_type(region_type), + m_region_map(rm), + m_visited(m_visited_map) { + + CGAL_precondition(input_range.size() > 0); + CGAL_precondition(seed_range.size() > 0); + m_seed_range.resize(seed_range.size()); + + using Item_helper = internal::Item_map_helper; + using Item_map = typename Item_helper::type; + Item_map item_map_ = Item_helper::get(item_map); + + std::size_t idx = 0; + for (auto it = seed_range.begin(); it != seed_range.end(); it++) + m_seed_range[idx++] = *it; + + clear(input_range, item_map_); } /// @} @@ -116,46 +346,54 @@ namespace Shape_detection { /*! \brief runs the region growing algorithm and fills an output iterator - with the found regions. + with the fitted primitive and their region. - \tparam OutputIterator - must be an output iterator whose value type is `std::vector`. + \tparam PrimitiveAndRegionOutputIterator + a model of `OutputIterator` whose value type is `Primitive_and_region` - \param regions - an output iterator that stores regions, where each region is returned - as a vector of indices of the items, which belong to this region + \param region_out + an output iterator of type `PrimitiveAndRegionOutputIterator`. \return past-the-end position in the output sequence */ - template - OutputIterator detect(OutputIterator regions) { + template + PrimitiveAndRegionOutputIterator detect(PrimitiveAndRegionOutputIterator region_out = PrimitiveAndRegionOutputIterator()) { + // clear(); TODO: this is not valid to comment this clear() + m_visited_map.clear(); // tmp replacement for the line above - clear(); - Indices region; + Region region; + m_nb_regions = 0; // Grow regions. - for (std::size_t i = 0; i < m_input_range.size(); ++i) { - const std::size_t seed_index = get(m_seed_map, i); - - // Skip items that user does not want to use. - if (seed_index == std::size_t(-1)) - continue; - - CGAL_precondition( - seed_index < m_input_range.size()); + for (auto it = m_seed_range.begin(); it != m_seed_range.end(); it++) { + const Item seed = *it; // Try to grow a new region from the index of the seed item. - if (!m_visited[seed_index]) { - propagate(seed_index, region); + if (!get(m_visited, seed)) { + const bool is_success = propagate(seed, region); // Check global conditions. - if (!m_region_type.is_valid_region(region)) + if (!is_success || !m_region_type.is_valid_region(region)) { revert(region); - else - *(regions++) = region; + } + else { + fill_region_map(m_nb_regions++, region); + if (!std::is_same::value) + *region_out++ = std::make_pair(m_region_type.primitive(), std::move(region)); + } } } - return regions; + + return region_out; + } + + /*! + \brief provides a property map that provides the region index (or std::size_t(-1)) for each input element. + + \return Property map that maps each iterator of the input range to a region index. + */ + const Region_map& region_map() { + return m_region_map; } /// @} @@ -164,33 +402,41 @@ namespace Shape_detection { /// @{ /*! - \brief fills an output iterator with indices of all unassigned items. + \brief fills an output iterator with all unassigned items. - \tparam OutputIterator - must be an output iterator whose value type is `std::size_t`. + \tparam ItemOutputIterator + a model of `OutputIterator` whose value type is `Item` - \param output - an output iterator that stores indices of all items, which are not assigned - to any region + \tparam InputRange + a model of `ConstRange` - \return past-the-end position in the output sequence - */ - template - OutputIterator unassigned_items(OutputIterator output) const { + \tparam ItemMap + a model of `ReadablePropertyMap` with `InputRange::const_iterator` as key type and `Item` as value type. + A default can be deduced using the value type of `InputRange` and `Item` to be + either `CGAL::Dereference_property_map` or `CGAL::Identity_property_map`. - // Return indices of all unassigned items. - for (std::size_t i = 0; i < m_input_range.size(); ++i) { - const std::size_t seed_index = get(m_seed_map, i); + \param input_range + a range of input items for region growing - // Skip items that user does not want to use. - if (seed_index == std::size_t(-1)) - continue; + \param output + an iterator of type `PrimitiveAndRegionOutputIterator`. - CGAL_precondition( - seed_index < m_input_range.size()); + \param item_map + an instance of the property map to retrieve items from input values - if (!m_visited[seed_index]) - *(output++) = seed_index; + \return past-the-end position in the output sequence + */ + template + ItemOutputIterator unassigned_items(const InputRange& input_range, ItemOutputIterator output, ItemMap item_map = ItemMap()) const + { + using Item_helper = internal::Item_map_helper; + using Item_map = typename Item_helper::type; + Item_map item_map_ = Item_helper::get(item_map); + + for (auto it = input_range.begin(); it != input_range.end(); it++) { + Item i = get(item_map_,it); + if (!get(m_visited, i)) + *(output++) = i; } return output; } @@ -198,22 +444,49 @@ namespace Shape_detection { /// @} /// \cond SKIP_IN_MANUAL - void clear() { - - m_visited.clear(); - m_visited.resize(m_input_range.size(), false); + template + void clear(const InputRange& input_range, ItemMap item_map = ItemMap()) { + using Item_helper = internal::Item_map_helper; + using Item_map = typename Item_helper::type; + Item_map item_map_ = Item_helper::get(item_map); + + m_nb_regions = 0; + typename boost::property_traits::value_type init_value(-1); + for (auto it = input_range.begin(); it != input_range.end(); it++) { + Item item = get(item_map_, it); + put(m_region_map, item, init_value); + } + // TODO if we want to allow subranges while NeighborQuery operates on the full range + // (like for faces in a PolygonMesh) we should fill a non-visited map rather than a visited map + m_visited_map.clear(); } - void release_memory() { - - m_visited.clear(); - m_visited.shrink_to_fit(); + std::size_t number_of_regions_detected() const + { + return m_nb_regions; } /// \endcond private: + Neighbor_query& m_neighbor_query; + Region_type& m_region_type; + Region_map m_region_map; + + std::vector m_seed_range; + std::size_t m_nb_regions = 0; + + using VisitedMap = std::unordered_set >; + VisitedMap m_visited_map; + Boolean_property_map m_visited; + + void fill_region_map(std::size_t idx, const Region& region) { + typedef typename boost::property_traits::value_type Id; + for (auto item : region) { + put(m_region_map, item, static_cast(idx)); + } + } - void propagate(const std::size_t seed_index, Indices& region) { + bool propagate(const Item &seed, Region& region) { region.clear(); // Use two queues, while running on this queue, push to the other queue; @@ -223,67 +496,107 @@ namespace Shape_detection { bool depth_index = 0; // Once the index of an item is pushed to the queue, it is pushed to the region too. - m_visited[seed_index] = true; - running_queue[depth_index].push(seed_index); - region.push_back(seed_index); + put(m_visited, seed, true); + running_queue[depth_index].push(seed); + region.push_back(seed); // Update internal properties of the region. - m_region_type.update(region); - - Indices neighbors; - while ( - !running_queue[depth_index].empty() || - !running_queue[!depth_index].empty()) { - - // Call the next item index of the queue and remove it from the queue. - const std::size_t item_index = running_queue[depth_index].front(); - running_queue[depth_index].pop(); - - // Get neighbors of the current item. - neighbors.clear(); - m_neighbor_query(item_index, neighbors); + const bool is_well_created = m_region_type.update(region); + if (!is_well_created) return false; + + bool grown = true; + std::vector > rejected, rejected_swap; + while (grown) { + grown = false; + + Region neighbors; + while ( + !running_queue[depth_index].empty() || + !running_queue[!depth_index].empty()) { + + while (!running_queue[depth_index].empty()) { + + // Call the next item index of the queue and remove it from the queue. + const Item item = running_queue[depth_index].front(); + running_queue[depth_index].pop(); + + // Get neighbors of the current item. + neighbors.clear(); + m_neighbor_query(item, neighbors); + + // Visit all found neighbors. + for (Item neighbor : neighbors) { + + if (!get(m_visited, neighbor)) { + if (m_region_type.is_part_of_region(neighbor, region)) { + + // Add this neighbor to the other queue so that we can visit it later. + put(m_visited, neighbor, true); + running_queue[!depth_index].push(neighbor); + region.push_back(neighbor); + grown = true; + } + else { + // Add this neighbor to the rejected queue so I won't be checked again before refitting the primitive. + put(m_visited, neighbor, true); + rejected.push_back(std::pair(item, neighbor)); + } + } + } + } + depth_index = !depth_index; + } - // Visit all found neighbors. - for (const std::size_t neighbor_index : neighbors) { + // Update internal properties of the region. + // The region expanded with the current primitive to its largest extent. + // After refitting the growing may continue, but it is only continued if the refitted primitive still fits all elements of the region. + if (grown) { + m_region_type.update(region); - // Skip items that user does not want to use. - if (neighbor_index == std::size_t(-1)) - continue; + // Verify that associated elements are still within the tolerance. + bool fits = true; + for (Item item : region) { + if (!m_region_type.is_part_of_region(item, region)) { + fits = false; + break; + } + } - CGAL_precondition( - neighbor_index < m_input_range.size()); + // The refitted primitive does not fit all elements of the region, so the growing stops here. + if (!fits) { + // Reset visited flags for items that were rejected + for (const std::pair& p : rejected) + put(m_visited, p.second, false); + return true; + } - if (!m_visited[neighbor_index] && - m_region_type.is_part_of_region(item_index, neighbor_index, region)) { + // Try to continue growing the region by considering formerly rejected elements. + for (const std::pair& p : rejected) { + if (m_region_type.is_part_of_region(p.second, region)) { - // Add this neighbor to the other queue so that we can visit it later. - m_visited[neighbor_index] = true; - running_queue[!depth_index].push(neighbor_index); - region.push_back(neighbor_index); + // Add this neighbor to the other queue so that we can visit it later. + put(m_visited, p.second, true); + running_queue[depth_index].push(p.second); + region.push_back(p.second); + } + else rejected_swap.push_back(p); } + rejected.clear(); + rejected.swap(rejected_swap); } + } - // Update internal properties of the region. - if (running_queue[depth_index].empty()) { + // Reset visited flags for items that were rejected + for (const std::pair& p : rejected) + put(m_visited, p.second, false); - m_region_type.update(region); - depth_index = !depth_index; - } - } + return true; } - void revert(const Indices& region) { - for (const std::size_t item_index : region) - m_visited[item_index] = false; + void revert(const Region& region) { + for (Item item : region) + put(m_visited, item, false); } - - // Fields. - const Input_range& m_input_range; - Neighbor_query& m_neighbor_query; - Region_type& m_region_type; - const Seed_map m_seed_map; - - Visited_items m_visited; }; } // namespace Shape_detection diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Segment_set.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Segment_set.h new file mode 100644 index 00000000..52f3af60 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Segment_set.h @@ -0,0 +1,30 @@ +// Copyright (c) 2020 GeometryFactory SARL (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Segment_set.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Segment_set.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_SEGMENT_SET_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_SEGMENT_SET_H + +/// \cond SKIP_IN_MANUAL +#include +/// \endcond + +/** +* \ingroup PkgShapeDetectionRef +* \file CGAL/Shape_detection/Region_growing/Segment_set.h +* A convenience header that includes all classes related to the region growing algorithm on a segment set. +*/ + +#include +#include + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_SEGMENT_SET_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Segment_set/Least_squares_line_fit_region.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Segment_set/Least_squares_line_fit_region.h new file mode 100644 index 00000000..57aa3fd7 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Segment_set/Least_squares_line_fit_region.h @@ -0,0 +1,364 @@ +// Copyright (c) 2020 GeometryFactory SARL (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Segment_set/Least_squares_line_fit_region.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Segment_set/Least_squares_line_fit_region.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_SEGMENT_SET_LEAST_SQUARES_LINE_FIT_REGION_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_SEGMENT_SET_LEAST_SQUARES_LINE_FIT_REGION_H + +#include + +// CGAL includes. +#include + +// Internal includes. +#include + +namespace CGAL { +namespace Shape_detection { +namespace Segment_set { + + /*! + \ingroup PkgShapeDetectionRGOnSegments + + \brief Region type based on the quality of the least squares line + fit applied to a segment set. + + This class fits a line, using \ref PkgPrincipalComponentAnalysisDRef "PCA", + to chunks of 2D or 3D segments and controls the quality of this fit. + If all quality conditions are satisfied, the chunk is accepted as a valid region, + otherwise rejected. + + \tparam GeomTraits + a model of `Kernel` + + \tparam Item_ + a descriptor representing a given segment. Must be a model of `Hashable`. + + \tparam SegmentMap + a model of `ReadablePropertyMap` whose key type is `Item` + and value type is `Kernel::Segment_2` or `Kernel::Segment_3` + + \cgalModels{RegionType} + */ + template< + typename GeomTraits, + typename Item_, + typename SegmentMap> + class Least_squares_line_fit_region { + + private: + using Segment_set_traits = typename std::conditional< + std::is_same::value, + internal::Region_growing_traits_2, + internal::Region_growing_traits_3 >::type; + + public: + /// \name Types + /// @{ + + /// \cond SKIP_IN_MANUAL + using Segment_map = SegmentMap; + using Segment_type = typename Segment_map::value_type; + /// \endcond + + /// Number type. + typedef typename GeomTraits::FT FT; + + /// Item type. + using Item = Item_; + using Region = std::vector; + + /// Primitive type depends on the dimension of the input data. +#ifdef DOXYGEN_RUNNING + using Primitive = typename GeomTraits::Line_2 or typename GeomTraits::Line_3 +#else + using Primitive = typename Segment_set_traits::Line; +#endif + + /// Region map + using Region_unordered_map = std::unordered_map>; + using Region_index_map = boost::associative_property_map; + /// @} + + private: + using Point = typename Segment_set_traits::Point; + using Segment = typename Segment_set_traits::Segment; + using Vector = typename Segment_set_traits::Vector; + using Line = typename Segment_set_traits::Line; + + using Squared_length = typename Segment_set_traits::Compute_squared_length; + using Squared_distance = typename Segment_set_traits::Compute_squared_distance; + using Scalar_product = typename Segment_set_traits::Compute_scalar_product; + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param np + a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \tparam InputRange + a model of `ConstRange` whose iterator type is `RandomAccessIterator` + + \cgalNamedParamsBegin + \cgalParamNBegin{maximum_distance} + \cgalParamDescription{the maximum distance from the furthest vertex of a segment to a line} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{1} + \cgalParamNEnd + \cgalParamNBegin{maximum_angle} + \cgalParamDescription{the maximum angle in degrees between the direction of a segment and the direction of a line} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{25 degrees} + \cgalParamNEnd + \cgalParamNBegin{cosine_of_maximum_angle} + \cgalParamDescription{the cosine value `cos(maximum_angle * PI / 180)` to be used instead of the parameter `maximum_angle()`} + \cgalParamType{`GeomTraits::FT`} + \cgalParamDefault{`cos(25 * PI / 180)`} + \cgalParamNEnd + \cgalParamNBegin{minimum_region_size} + \cgalParamDescription{the minimum number of segments a region must have} + \cgalParamType{`std::size_t`} + \cgalParamDefault{1} + \cgalParamNEnd + \cgalParamNBegin{segment_map} + \cgalParamDescription{an instance of `SegmentMap` that maps an item from `input_range` + to `Kernel::Segment_2` or `Kernel::Segment_3`} + \cgalParamDefault{`SegmentMap()`} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of `GeomTraits`} + \cgalParamDefault{`GeomTraits()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `maximum_distance >= 0` + \pre `maximum_angle >= 0 && maximum_angle <= 90` + \pre `cosine_of_maximum_angle >= 0 && cosine_of_maximum_angle <= 1` + \pre `minimum_region_size > 0` + */ + template + Least_squares_line_fit_region( + const NamedParameters& np = parameters::default_values()) : + m_segment_map(parameters::choose_parameter(parameters::get_parameter( + np, internal_np::segment_map))), + m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))), + m_segment_set_traits(m_traits), + m_squared_length(m_segment_set_traits.compute_squared_length_object()), + m_squared_distance(m_segment_set_traits.compute_squared_distance_object()), + m_scalar_product(m_segment_set_traits.compute_scalar_product_object()) { + + const FT max_distance = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_distance), FT(1)); + CGAL_precondition(max_distance >= FT(0)); + m_distance_threshold = max_distance; + + const FT max_angle = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::maximum_angle), FT(25)); + CGAL_precondition(max_angle >= FT(0) && max_angle <= FT(90)); + + m_min_region_size = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::minimum_region_size), 1); + CGAL_precondition(m_min_region_size > 0); + + const FT default_cos_value = static_cast(std::cos(CGAL::to_double( + (max_angle * static_cast(CGAL_PI)) / FT(180)))); + const FT cos_value = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::cosine_of_maximum_angle), default_cos_value); + CGAL_precondition(cos_value >= FT(0) && cos_value <= FT(1)); + m_cos_value_threshold = cos_value; + } + + /// @} + + /// \name Access + /// @{ + + /*! + \brief implements `RegionType::region_index_map()`. + + This function creates an empty property map that maps iterators on the input range `Item` to std::size_t. + */ + Region_index_map region_index_map() { + return Region_index_map(m_region_map); + } + + /*! + \brief implements `RegionType::primitive()`. + + This function provides the last primitive that has been fitted with the region. + + \return Primitive parameters that fits the region + + \pre `successful fitted primitive via successful call of update(region) with a sufficient large region` + */ + Primitive primitive() const { + return m_line_of_best_fit; + } + + /*! + \brief implements `RegionType::is_part_of_region()`. + + This function controls if a segment with the index `query` is within + the `maximum_distance` from the corresponding line and if the angle between the + direction of this segment and the line's direction is within the `maximum_angle`. + If both conditions are satisfied, it returns `true`, otherwise `false`. + + \param query + `Item` of the query segment + + The last parameter is not used in this implementation. + + \return Boolean `true` or `false` + + */ + bool is_part_of_region( + const Item query, + const Region&) const { + + const Segment& query_segment = get(m_segment_map, query); + const Point& query_source = query_segment.source(); + const Point& query_target = query_segment.target(); + const Vector query_direction(query_source, query_target); + + const FT squared_distance_to_fitted_line = + get_max_squared_distance(query_segment); + const FT squared_distance_threshold = + m_distance_threshold * m_distance_threshold; + + const FT cos_value = + m_scalar_product(query_direction, m_direction_of_best_fit); + const FT squared_cos_value = cos_value * cos_value; + + FT squared_cos_value_threshold = + m_cos_value_threshold * m_cos_value_threshold; + squared_cos_value_threshold *= m_squared_length(query_direction); + squared_cos_value_threshold *= m_squared_length(m_direction_of_best_fit); + + return ( + ( squared_distance_to_fitted_line <= squared_distance_threshold ) && + ( squared_cos_value >= squared_cos_value_threshold )); + } + + /*! + \brief implements `RegionType::is_valid_region()`. + + This function controls if the `region` contains at least `minimum_region_size` segments. + + \param region + Segments of the region represented as `Items`. + + \return Boolean `true` or `false` + */ + inline bool is_valid_region(const Region& region) const { + return (region.size() >= m_min_region_size); + } + + /*! + \brief implements `RegionType::update()`. + + This function fits the least squares line to all segments from the `region`. + + \param region + Segments of the region represented as `Items`. + + \return Boolean `true` if the line fitting succeeded and `false` otherwise + + \pre `region.size() > 0` + */ + bool update(const Region& region) { + + CGAL_precondition(region.size() > 0); + if (region.size() == 1) { // create new reference line and direction + const Item item = region[0]; + + // The best fit line will be a line obtained from this segment + // with the same direction. + const Segment& segment = get(m_segment_map, item); + const Point& source = segment.source(); + const Point& target = segment.target(); + if (source == target) return false; + + CGAL_precondition(source != target); + m_line_of_best_fit = Line(source, target); + m_direction_of_best_fit = m_line_of_best_fit.to_vector(); + + } else { // update reference line and direction + CGAL_precondition(region.size() >= 2); + std::tie(m_line_of_best_fit, m_direction_of_best_fit) = + get_line_and_direction(region); + } + return true; + } + + /// @} + + /// \cond SKIP_IN_MANUAL + std::pair get_line_and_direction( + const Region& region) const { + + // The best fit line will be a line fitted to all region segments with + // its direction being the line's direction. + CGAL_precondition(region.size() > 0); + const Line line_of_best_fit = + m_segment_set_traits.create_line( + region, m_segment_map).first; + const Vector direction_of_best_fit = + line_of_best_fit.to_vector(); + + return std::make_pair(line_of_best_fit, direction_of_best_fit); + } + /// \endcond + + private: + const Segment_map m_segment_map; + const GeomTraits m_traits; + const Segment_set_traits m_segment_set_traits; + Region_unordered_map m_region_map; + + FT m_distance_threshold; + FT m_cos_value_threshold; + std::size_t m_min_region_size; + + const Squared_length m_squared_length; + const Squared_distance m_squared_distance; + const Scalar_product m_scalar_product; + + Line m_line_of_best_fit; + Vector m_direction_of_best_fit; + + // The maximum squared distance from the vertices of the segment + // to the best fit line. + FT get_max_squared_distance(const Segment& segment) const { + + const Point& source = segment.source(); + const Point& target = segment.target(); + const FT squared_distance_source = + m_squared_distance(source, m_line_of_best_fit); + const FT squared_distance_target = + m_squared_distance(target, m_line_of_best_fit); + return (CGAL::max)(squared_distance_source, squared_distance_target); + } + }; + +} // namespace Segment_set +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_SEGMENT_SET_LEAST_SQUARES_LINE_FIT_REGION_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Segment_set/Least_squares_line_fit_sorting.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Segment_set/Least_squares_line_fit_sorting.h new file mode 100644 index 00000000..7e18320c --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/Segment_set/Least_squares_line_fit_sorting.h @@ -0,0 +1,221 @@ +// Copyright (c) 2020 GeometryFactory SARL (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/Segment_set/Least_squares_line_fit_sorting.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/Segment_set/Least_squares_line_fit_sorting.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_SEGMENT_SET_LEAST_SQUARES_LINE_FIT_SORTING_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_SEGMENT_SET_LEAST_SQUARES_LINE_FIT_SORTING_H + +#include + +// Internal includes. +#include +#include + +namespace CGAL { +namespace Shape_detection { +namespace Segment_set { + + /*! + \ingroup PkgShapeDetectionRGOnSegments + + \brief Sorting of segments with respect to the local line fit quality. + + Indices of input segments are sorted with respect to the quality of the + least squares line fit applied to the vertices of incident segments of each segment. + + \tparam GeomTraits + a model of `Kernel` + + \tparam NeighborQuery + a model of `NeighborQuery` + + \tparam Item_ + a descriptor representing a given segment. Must be a model of `Hashable`. + + \tparam SegmentMap + a model of `ReadablePropertyMap` whose key type is the value type of the input + range and value type is `Kernel::Segment_2` or `Kernel::Segment_3` + */ + template< + typename GeomTraits, + typename Item_, + typename NeighborQuery, + typename SegmentMap> + class Least_squares_line_fit_sorting { + + public: + /// \name Types + /// @{ + + /// \cond SKIP_IN_MANUAL + using Neighbor_query = NeighborQuery; + using Segment_map = SegmentMap; + using Segment_type = typename boost::property_traits::value_type; + /// \endcond + + /// Item type. + using Item = Item_; + + /// Seed range. + using Seed_range = std::vector; + + /// @} + + private: + using FT = typename GeomTraits::FT; + using Segment_set_traits = typename std::conditional< + std::is_same::value, + internal::Region_growing_traits_2, + internal::Region_growing_traits_3 >::type; + using Compare_scores = internal::Compare_scores; + + public: + /// \name Initialization + /// @{ + + /*! + \brief initializes all internal data structures. + + \tparam NamedParameters + a sequence of \ref bgl_namedparameters "Named Parameters" + + \param input_range + an instance of `InputRange` with 2D or 3D segments + + \param neighbor_query + an instance of `NeighborQuery` that is used internally to + access vertex's neighbors + + \param np + a sequence of \ref bgl_namedparameters "Named Parameters" + among the ones listed below + + \tparam InputRange + a model of `ConstRange` whose iterator type is `InputIterator` + + \cgalNamedParamsBegin + \cgalParamNBegin{segment_map} + \cgalParamDescription{an instance of `SegmentMap` that maps the `Item` of a segment + to `Kernel::Segment_2` or `Kernel::Segment_3`} + \cgalParamDefault{`SegmentMap()`} + \cgalParamNEnd + \cgalParamNBegin{item_map} + \cgalParamDescription{an instance of a model of `ReadablePropertyMap` with `InputRange::const_iterator` + as key type and `Item` as value type.} + \cgalParamDefault{A default is provided when `Item` is `InputRange::const_iterator` or its value type.} + \cgalParamNEnd + \cgalParamNBegin{geom_traits} + \cgalParamDescription{an instance of `GeomTraits`} + \cgalParamDefault{`GeomTraits()`} + \cgalParamNEnd + \cgalNamedParamsEnd + + \pre `input_range.size() > 0` + */ + template + Least_squares_line_fit_sorting( + const InputRange& input_range, + NeighborQuery& neighbor_query, + const NamedParameters& np = parameters::default_values()) + : m_neighbor_query(neighbor_query) + , m_segment_map(parameters::choose_parameter(parameters::get_parameter( + np, internal_np::segment_map))) + , m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))) + , m_segment_set_traits(m_traits) + { + CGAL_precondition(input_range.size() > 0); + + using NP_helper = internal::Default_property_map_helper; + using Item_map = typename NP_helper::type; + Item_map item_map = NP_helper::get(np); + + m_ordered.resize(input_range.size()); + + std::size_t index = 0; + for (auto it = input_range.begin(); it != input_range.end(); it++) + m_ordered[index++] = get(item_map, it); + + m_scores.resize(input_range.size()); + } + + /// @} + + /// \name Sorting + /// @{ + + /*! + \brief sorts `Items` of input segments. + */ + void sort() { + + compute_scores(); + CGAL_precondition(m_scores.size() > 0); + Compare_scores cmp(m_scores); + + std::vector order(m_ordered.size()); + std::iota(order.begin(), order.end(), 0); + std::sort(order.begin(), order.end(), cmp); + + std::vector tmp(m_ordered.size()); + for (std::size_t i = 0; i < m_ordered.size(); i++) + tmp[i] = m_ordered[order[i]]; + + m_ordered.swap(tmp); + } + /// @} + + /// \name Access + /// @{ + + /*! + \brief returns an instance of `Seed_range` to access the ordered `Items` + of input segments. + */ + const Seed_range &ordered() { + return m_ordered; + } + /// @} + + private: + Neighbor_query& m_neighbor_query; + const Segment_map m_segment_map; + const GeomTraits m_traits; + const Segment_set_traits m_segment_set_traits; + Seed_range m_ordered; + std::vector m_scores; + + void compute_scores() { + + std::vector neighbors; + std::size_t idx = 0; + for (const Item& item : m_ordered) { + neighbors.clear(); + m_neighbor_query(item, neighbors); + neighbors.push_back(item); + + const auto& segment = get(m_segment_map, item); + const auto& source = segment.source(); + const auto& target = segment.target(); + if (source == target) + m_scores[idx++] = FT(0); // put it at the very back + else + m_scores[idx++] = + m_segment_set_traits.create_line(neighbors, m_segment_map).second; + } + } + }; + +} // namespace Segment_set +} // namespace Shape_detection +} // namespace CGAL + +#endif // #define CGAL_SHAPE_DETECTION_REGION_GROWING_SEGMENT_SET_LEAST_SQUARES_LINE_FIT_SORTING_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/cylinder_fitting.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/cylinder_fitting.h new file mode 100644 index 00000000..9e05f554 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/cylinder_fitting.h @@ -0,0 +1,267 @@ +// Copyright (c) 2022 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/internal/cylinder_fitting.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/internal/cylinder_fitting.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Sven Oesau + +// Header of the original source +// This file incorporates work covered by the following copyright and +// permission notice: +// +// David Eberly, Geometric Tools, Redmond WA 98052 +// Copyright (c) 1998-2022 +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt +// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt +// +// Permission is hereby granted, free of charge, to any person or organization +// obtaining a copy of the software and accompanying documentation covered by +// this license(the "Software") to use, reproduce, display, distribute, +// execute, and transmit the Software, and to prepare derivative works of the +// Software, and to permit third - parties to whom the Software is furnished to +// do so, all subject to the following : +// +// The copyright notices in the Software and this entire statement, including +// the above license grant, this restriction and the following disclaimer, +// must be included in all copies of the Software, in whole or in part, and +// all derivative works of the Software, unless such copies or derivative +// works are solely in the form of machine - executable object code generated +// by a source language processor. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON - INFRINGEMENT.IN NO EVENT +// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. +// +// The code below uses the version of +// https://github.com/davideberly/GeometricTools available on 30th of May 2022. +// Version: 6.0.2022.01.06 +// + + +#ifndef CGAL_SHAPE_DETECTION_INTERNAL_CYLINDER_FITTING_H +#define CGAL_SHAPE_DETECTION_INTERNAL_CYLINDER_FITTING_H + +#include +#include +#include +#include +#include +#include + +// The algorithm for least-squares fitting of a point set by a cylinder is +// described in +// https://www.geometrictools.com/Documentation/CylinderFitting.pdf + +namespace CGAL +{ + namespace internal { + template + void preprocess(const Region& indices, + const PointMap point_map, + typename Kernel::Vector_3& average, + Eigen::VectorXd& mu, + Eigen::MatrixXd& f0, + Eigen::MatrixXd& f1, + Eigen::MatrixXd& f2) { + + average = typename Kernel::Vector_3(0, 0, 0); + + for (auto item : indices) { + average += get(point_map, item) - CGAL::ORIGIN; + } + + average = average / static_cast(indices.size()); + + Eigen::MatrixXd prod(indices.size(), 6); + prod.setZero(); + + for (std::size_t i = 0; i < indices.size(); i++) { + typename Kernel::Vector_3 p = get(point_map, indices[i]) + - average - CGAL::ORIGIN; + prod(i, 0) = p.x() * p.x(); + prod(i, 1) = p.x() * p.y(); + prod(i, 2) = p.x() * p.z(); + prod(i, 3) = p.y() * p.y(); + prod(i, 4) = p.y() * p.z(); + prod(i, 5) = p.z() * p.z(); + mu[0] += prod(i, 0); + mu[1] += 2 * prod(i, 1); + mu[2] += 2 * prod(i, 2); + mu[3] += prod(i, 3); + mu[4] += 2 * prod(i, 4); + mu[5] += prod(i, 5); + } + + mu /= static_cast(indices.size()); + + for (size_t i = 0; i < indices.size(); i++) { + Eigen::VectorXd delta(6); + delta[0] = prod(i, 0) - mu[0]; + delta[1] = 2.0 * prod(i, 1) - mu[1]; + delta[2] = 2.0 * prod(i, 2) - mu[2]; + delta[3] = prod(i, 3) - mu[3]; + delta[4] = 2.0 * prod(i, 4) - mu[4]; + delta[5] = prod(i, 5) - mu[5]; + + f0(0, 0) += prod(i, 0); + f0(0, 1) += prod(i, 1); + f0(0, 2) += prod(i, 2); + f0(1, 1) += prod(i, 3); + f0(1, 2) += prod(i, 4); + f0(2, 2) += prod(i, 5); + + typename Kernel::Vector_3 tmp = get(point_map, indices[i]) + - average - CGAL::ORIGIN; + Eigen::Vector3d v(tmp[0], tmp[1], tmp[2]); + + f1 += v * delta.transpose(); + f2 += delta * delta.transpose(); + } + + f0 = f0 * (1.0 / indices.size()); + f0(1, 0) = f0(0, 1); + f0(2, 0) = f0(0, 2); + f0(2, 1) = f0(1, 2); + f1 = f1 * (1.0 / indices.size()); + f2 = f2 * (1.0 / indices.size()); + } + + template + typename Kernel::FT fit_cylinder( + typename Kernel::Line_3& line, + typename Kernel::FT& squared_radius, + typename Kernel::Vector_3& direction, + typename Kernel::Vector_3& average, + typename Eigen::VectorXd& mu, + typename Eigen::MatrixXd& f0, + typename Eigen::MatrixXd& f1, + typename Eigen::MatrixXd& f2) { + + Eigen::VectorXd dir(3); + dir[0] = direction.x(); + dir[1] = direction.y(); + dir[2] = direction.z(); + + Eigen::MatrixXd P(3, 3); + P.setIdentity(); + P = P - (dir * dir.transpose()); + + Eigen::MatrixXd S(3, 3); + S(0, 0) = S(1, 1) = S(2, 2) = 0; + S(0, 1) = -direction.z(); + S(0, 2) = direction.y(); + S(1, 0) = direction.z(); + S(1, 2) = -direction.x(); + S(2, 0) = -direction.y(); + S(2, 1) = direction.x(); + + Eigen::MatrixXd A, Ahat, A2hat, Q; + A = P * f0 * P; + Ahat = -(S * A * S); + A2hat = Ahat * A; + + double trace = A2hat(0, 0) + A2hat(1, 1) + A2hat(2, 2); + Q = Ahat * (1.0 / trace); + + Eigen::VectorXd p(6), a, b; + p[0] = P(0, 0); + p[1] = P(0, 1); + p[2] = P(0, 2); + p[3] = P(1, 1); + p[4] = P(1, 2); + p[5] = P(2, 2); + + a = f1 * p; + b = Q * a; + + double t0 = p.transpose() * (f2 * p); + double t1 = 4.0 * a.transpose() * b; + double t2 = 4.0 * b.transpose() * f0 * b; + + line = typename Kernel::Line_3(typename Kernel::Point_3(b[0] + average[0], + b[1] + average[1], b[2] + average[2]), direction); + + squared_radius = (p.transpose() * mu) + double(b.transpose() * b); + + return t0 - t1 + t2; + } + } + + template< + typename Kernel, + typename Region, + typename PointMap, + typename NormalMap> + typename Kernel::FT fit_cylinder( + const Region& region, const PointMap point_map, + const NormalMap normal_map, + typename Kernel::Line_3& line, + typename Kernel::FT& squared_radius, + const Kernel &traits) { + + using FT = typename Kernel::FT; + using Vector_3 = typename Kernel::Vector_3; + typename Kernel::Construct_cross_product_vector_3 cross_product = + traits.construct_cross_product_vector_3_object(); + + squared_radius = -1.0; + + std::size_t nb = 0; + Vector_3 mean_axis = CGAL::NULL_VECTOR; + + // Axis direction estimation from sample normals by averaging. + for (std::size_t i = 0; i < region.size() - 1; ++i) { + Vector_3 v0 = get(normal_map, region[i]); + v0 = v0 / sqrt(v0 * v0); + Vector_3 v1 = get(normal_map, region[i + 1]); + v1 = v1 / sqrt(v1 * v1); + Vector_3 axis = cross_product(v0, v1); + if (sqrt(axis.squared_length()) < FT(1) / FT(100)) { + continue; + } + axis = axis / sqrt(axis * axis); + + if (nb != 0 && (axis * mean_axis < 0)) { + axis = -axis; + } + mean_axis = mean_axis + axis; + ++nb; + } + + // If no proper mean axis can be derived the fitting fails. + if (mean_axis * mean_axis < FT(1) / FT(100)) + return (std::numeric_limits::max)(); + + mean_axis = mean_axis / sqrt(mean_axis * mean_axis); + + typename Kernel::Vector_3 average; + + Eigen::VectorXd mu(6); + mu.setZero(); + Eigen::MatrixXd f0(3, 3); + f0.setZero(); + Eigen::MatrixXd f1(3, 6); + f1.setZero(); + Eigen::MatrixXd f2(6, 6); + f2.setZero(); + + internal::preprocess + (region, point_map, average, mu, f0, f1, f2); + + return internal::fit_cylinder + (line, squared_radius, mean_axis, average, mu, f0, f1, f2); + } +} + +#endif diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/property_map.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/property_map.h index 8ae324c0..28de1e7f 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/property_map.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/property_map.h @@ -3,176 +3,82 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection/Region_growing/internal/property_map.h $ -// $Id: property_map.h 590ddf8 2021-10-08T15:38:47+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/internal/property_map.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/internal/property_map.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Florent Lafarge, Simon Giraudot, Thien Hoang, Dmitry Anisimov // -#include +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_INTERNAL_PROPERTY_MAP_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_INTERNAL_PROPERTY_MAP_H -// STL includes. -#include -#include -#include +#include // CGAL includes. -#include #include +#include +#include +#include -#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_INTERNAL_PROPERTY_MAP_H -#define CGAL_SHAPE_DETECTION_REGION_GROWING_INTERNAL_PROPERTY_MAP_H +// Boost includes. +#include namespace CGAL { namespace Shape_detection { namespace internal { - template< - typename ItemRange, - typename PropertyMap> - class Item_property_map { - - public: - using Item_range = ItemRange; - using Property_map = PropertyMap; - - using value_type = typename Property_map::value_type; - using reference = const value_type&; - using key_type = std::size_t; - using category = boost::lvalue_property_map_tag; - - Item_property_map( - const Item_range& item_range, - const Property_map& property_map) : - m_item_range(item_range), - m_property_map(property_map) - { } - - reference operator[](const key_type item_index) const { - CGAL_precondition(item_index < m_item_range.size()); - - const auto& key = *(m_item_range.begin() + item_index); - return get(m_property_map, key); - } - - friend inline reference get(const Item_property_map& item_map, - const key_type key) { - return item_map[key]; - } - - private: - const Item_range& m_item_range; - const Property_map& m_property_map; - }; - - template - class Item_to_index_property_map { - - public: - using Item_range = ItemRange; - - using Iterator = typename Item_range::const_iterator; - using Item = typename Iterator::value_type; - - using value_type = std::size_t; - using reference = std::size_t; - using key_type = Item; - using category = boost::readable_property_map_tag; - - using Item_map = std::map; - - Item_to_index_property_map(const Item_range& item_range) : - m_item_range(item_range) { - - value_type i = 0; - for (const auto& item : item_range) { - - m_item_map[item] = i; - ++i; - } - } - - value_type operator[](const key_type& key) const { - - const auto& value = m_item_map.find(key); - - if (value == m_item_map.end()) - return value_type(-1); - - return value->second; - } - - friend inline value_type get(const Item_to_index_property_map& item_to_index_map, - const key_type& key) { - return item_to_index_map[key]; - } - - private: - const Item_range& m_item_range; - Item_map m_item_map; - }; - - class Seed_property_map { - - public: - using key_type = std::size_t; - using value_type = std::size_t; - using category = boost::readable_property_map_tag; - - Seed_property_map(const std::vector& seeds) - : m_seeds(seeds) - { } - - value_type operator[](const key_type key) const { - return m_seeds[key]; - } - - friend value_type get(const Seed_property_map& seed_map, - const key_type key) { - return seed_map[key]; - } - - private: - const std::vector& m_seeds; - }; +template ::type, Default>::value > +struct Default_property_map_helper +{ + using type = typename internal_np::Lookup_named_param_def::type; + static type get(const NP& np) + { + return parameters::get_parameter(np, Tag()); + } +}; + +template +struct Default_property_map_helper +{ + struct No_property_map_given_in_named_parameters_and_no_deducible_default {}; + static const bool iterator_is_item = std::is_same::value; + static const bool value_type_is_item = std::is_same::value_type>::value; + using type = std::conditional_t, + std::conditional_t, + No_property_map_given_in_named_parameters_and_no_deducible_default>>; + + static type get(const NP&) + { + return type(); + } +}; + +template +struct Item_map_helper +{ + using type = ItemMap; + static const ItemMap& get(const ItemMap& m) + { + return m; + } +}; + +template +struct Item_map_helper +{ + using type = typename Default_property_map_helper::type; + static type get(Default) + { + return type(); + } +}; } // namespace internal - -namespace RG { - - class Point_to_shape_index_map { - - public: - using key_type = std::size_t; - using value_type = int; - using reference = value_type; - using category = boost::readable_property_map_tag; - - Point_to_shape_index_map() { } - - template - Point_to_shape_index_map(const PointRange& points, - const std::vector< std::vector >& regions) - : m_indices(new std::vector(points.size(), -1)) - { - for (std::size_t i = 0; i < regions.size(); ++i) - for (const std::size_t idx : regions[i]) - (*m_indices)[idx] = static_cast(i); - } - - inline friend value_type get(const Point_to_shape_index_map& point_to_shape_index_map, - const key_type key) { - const auto& indices = *(point_to_shape_index_map.m_indices); - return indices[key]; - } - - private: - std::shared_ptr< std::vector > m_indices; - }; - -} // namespace RG } // namespace Shape_detection } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/region_growing_traits.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/region_growing_traits.h new file mode 100644 index 00000000..1b35ccf0 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/region_growing_traits.h @@ -0,0 +1,98 @@ +// Copyright (c) 2020 GeometryFactory SARL (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/internal/region_growing_traits.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/internal/region_growing_traits.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Dmitry Anisimov +// + +#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_INTERNAL_TRAITS_H +#define CGAL_SHAPE_DETECTION_REGION_GROWING_INTERNAL_TRAITS_H + +#include + +// Internal includes. +#include + +namespace CGAL { +namespace Shape_detection { +namespace internal { + + template + struct Region_growing_traits_2 { + using Point = typename GeomTraits::Point_2; + using Segment = typename GeomTraits::Segment_2; + using Vector = typename GeomTraits::Vector_2; + using Line = typename GeomTraits::Line_2; + + using Compute_squared_length = typename GeomTraits::Compute_squared_length_2; + using Compute_squared_distance = typename GeomTraits::Compute_squared_distance_2; + using Compute_scalar_product = typename GeomTraits::Compute_scalar_product_2; + + const GeomTraits& m_traits; + Region_growing_traits_2(const GeomTraits& traits) : + m_traits(traits) + { } + + decltype(auto) compute_squared_length_object() const { + return m_traits.compute_squared_length_2_object(); + } + decltype(auto) compute_squared_distance_object() const { + return m_traits.compute_squared_distance_2_object(); + } + decltype(auto) compute_scalar_product_object() const { + return m_traits.compute_scalar_product_2_object(); + } + + template + decltype(auto) create_line( + const Region& region, const ItemMap item_map) const { + return internal::create_line_2( + region, item_map, m_traits); + } + }; + + template + struct Region_growing_traits_3 { + using Point = typename GeomTraits::Point_3; + using Segment = typename GeomTraits::Segment_3; + using Vector = typename GeomTraits::Vector_3; + using Line = typename GeomTraits::Line_3; + + using Compute_squared_length = typename GeomTraits::Compute_squared_length_3; + using Compute_squared_distance = typename GeomTraits::Compute_squared_distance_3; + using Compute_scalar_product = typename GeomTraits::Compute_scalar_product_3; + + const GeomTraits& m_traits; + Region_growing_traits_3(const GeomTraits& traits) : + m_traits(traits) + { } + + decltype(auto) compute_squared_length_object() const { + return m_traits.compute_squared_length_3_object(); + } + decltype(auto) compute_squared_distance_object() const { + return m_traits.compute_squared_distance_3_object(); + } + decltype(auto) compute_scalar_product_object() const { + return m_traits.compute_scalar_product_3_object(); + } + + template + decltype(auto) create_line( + const Region& region, const ItemMap item_map) const { + return internal::create_line_3( + region, item_map, m_traits); + } + }; + +} // namespace internal +} // namespace Shape_detection +} // namespace CGAL + +#endif // CGAL_SHAPE_DETECTION_REGION_GROWING_INTERNAL_TRAITS_H diff --git a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/utils.h b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/utils.h index 7e0467a6..2ee1e5b5 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/utils.h +++ b/thirdparty/CGAL/include/CGAL/Shape_detection/Region_growing/internal/utils.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_detection/include/CGAL/Shape_detection/Region_growing/internal/utils.h $ -// $Id: utils.h f2d9066 2021-08-19T12:05:30+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_detection/include/CGAL/Shape_detection/Region_growing/internal/utils.h $ +// $Id: include/CGAL/Shape_detection/Region_growing/internal/utils.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -15,25 +15,72 @@ #define CGAL_SHAPE_DETECTION_REGION_GROWING_INTERNAL_UTILS_H #include +#include // STL includes. +#include +#include +#include #include +#include +#include +#include // Boost headers. +#include #include +#include +#include + +// Named parameters. +#include +#include // CGAL includes. #include #include #include #include +#include #include +#include #include +#include namespace CGAL { namespace Shape_detection { namespace internal { + template + struct reference_iterator_generator { + using result_type = T; + reference_iterator_generator(T iterator) : it(iterator) { } + result_type operator() () const { + return it++; + } + mutable T it; + }; + + // TODO: this should be customisable in named function parameters + template::value> + struct hash_item {}; + + template + struct hash_item { + std::size_t operator()(T i) const { + using boost::hash_value; + return hash_value(i); + } + }; + + template + struct hash_item { + std::size_t operator()(T i) const { + using boost::hash_value; + return boost::hash_value(i.operator->()); + } + }; + template class Default_sqrt { @@ -88,139 +135,553 @@ namespace internal { template struct Compare_scores { - const std::vector& m_scores; + const std::vector& m_scores; Compare_scores(const std::vector& scores) : m_scores(scores) { } bool operator()(const std::size_t i, const std::size_t j) const { - CGAL_precondition(i < m_scores.size()); CGAL_precondition(j < m_scores.size()); - return m_scores[i] > m_scores[j]; } }; template< - typename InputRange, - typename PointMap, - typename Plane_3> - void create_planes_from_points( - const InputRange& input_range, - const PointMap point_map, - std::vector< std::vector >& regions, - std::vector& planes) { - - using Traits = typename Kernel_traits::Kernel; + typename Traits, + typename Region, + typename PrimitiveMap> + std::pair + create_line_2( + const Region& region, const PrimitiveMap primitive_map, const Traits&) { + using FT = typename Traits::FT; + using Line_2 = typename Traits::Line_2; - using Local_traits = - CGAL::Exact_predicates_inexact_constructions_kernel; - using To_local_converter = - Cartesian_converter; + using ITraits = CGAL::Exact_predicates_inexact_constructions_kernel; + using IConverter = CGAL::Cartesian_converter; - using Local_FT = typename Local_traits::FT; - using Local_point_3 = typename Local_traits::Point_3; - using Local_plane_3 = typename Local_traits::Plane_3; + using IFT = typename ITraits::FT; + using IPoint_2 = typename ITraits::Point_2; + using ILine_2 = typename ITraits::Line_2; - planes.clear(); - planes.reserve(regions.size()); + using Item = typename boost::property_traits::key_type; + using Primitive = typename boost::property_traits::value_type; + using EPIC_Primitive = typename std::conditional< + std::is_same::value, + typename ITraits::Point_2, typename ITraits::Segment_2 >::type; - std::vector points; - const To_local_converter to_local_converter = To_local_converter(); + std::vector elements; + CGAL_precondition(region.size() > 0); + elements.reserve(region.size()); + const IConverter iconverter = IConverter(); - for (const auto& region : regions) { - CGAL_assertion(region.size() > 0); + for (Item item : region) { + const Primitive& element = get(primitive_map, item); + elements.push_back(iconverter(element)); + } + CGAL_precondition(elements.size() == region.size()); + + ILine_2 fitted_line; + IPoint_2 fitted_centroid; + const IFT score = CGAL::linear_least_squares_fitting_2( + elements.begin(), elements.end(), + fitted_line, fitted_centroid, + CGAL::Dimension_tag::value>(), ITraits(), + CGAL::Eigen_diagonalize_traits()); + + const Line_2 line( + static_cast(fitted_line.a()), + static_cast(fitted_line.b()), + static_cast(fitted_line.c())); + + return std::make_pair(line, static_cast(score)); + } - points.clear(); - for (std::size_t i = 0; i < region.size(); ++i) { + template< + typename Traits, + typename Region, + typename PrimitiveMap> + std::pair + create_line_3( + const Region& region, const PrimitiveMap primitive_map, const Traits&) { - CGAL_precondition(region[i] < input_range.size()); + using FT = typename Traits::FT; + using Line_3 = typename Traits::Line_3; + using Point_3 = typename Traits::Point_3; + using Direction_3 = typename Traits::Direction_3; - const auto& key = *(input_range.begin() + region[i]); - points.push_back(to_local_converter(get(point_map, key))); - } - CGAL_postcondition(points.size() == region.size()); - - Local_plane_3 fitted_plane; - Local_point_3 fitted_centroid; - - CGAL::linear_least_squares_fitting_3( - points.begin(), points.end(), - fitted_plane, fitted_centroid, - CGAL::Dimension_tag<0>(), - Local_traits(), - CGAL::Eigen_diagonalize_traits()); - - const Plane_3 plane = Plane_3( - static_cast(fitted_plane.a()), - static_cast(fitted_plane.b()), - static_cast(fitted_plane.c()), - static_cast(fitted_plane.d())); - planes.push_back(plane); - } - CGAL_postcondition(planes.size() == regions.size()); + using ITraits = CGAL::Exact_predicates_inexact_constructions_kernel; + using IConverter = CGAL::Cartesian_converter; + + using IFT = typename ITraits::FT; + using IPoint_3 = typename ITraits::Point_3; + using ILine_3 = typename ITraits::Line_3; + + using Item = typename boost::property_traits::key_type; + using Primitive = typename boost::property_traits::value_type; + using EPIC_Primitive = typename std::conditional< + std::is_same::value, + typename ITraits::Point_3, typename ITraits::Segment_3 >::type; + + std::vector elements; + CGAL_precondition(region.size() > 0); + elements.reserve(region.size()); + const IConverter iconverter = IConverter(); + + for (Item item : region) { + const Primitive& element = get(primitive_map, item); + elements.push_back(iconverter(element)); + } + CGAL_precondition(elements.size() == region.size()); + + ILine_3 fitted_line; + IPoint_3 fitted_centroid; + const IFT score = CGAL::linear_least_squares_fitting_3( + elements.begin(), elements.end(), + fitted_line, fitted_centroid, + CGAL::Dimension_tag::value>(), ITraits(), + CGAL::Eigen_diagonalize_traits()); + + const auto p = fitted_line.point(0); + const auto d = fitted_line.direction(); + const Point_3 init( + static_cast(p.x()), + static_cast(p.y()), + static_cast(p.z())); + const Direction_3 direction( + static_cast(d.dx()), + static_cast(d.dy()), + static_cast(d.dz())); + const Line_3 line(init, direction); + + return std::make_pair(line, static_cast(score)); } -} // namespace internal + template< + typename Traits, + typename Region, + typename ItemMap> + std::pair + create_plane( + const Region& region, const ItemMap item_map, const Traits&) { -namespace RG { + using FT = typename Traits::FT; + using Plane_3 = typename Traits::Plane_3; - template - class Plane { + using ITraits = CGAL::Exact_predicates_inexact_constructions_kernel; + using IConverter = CGAL::Cartesian_converter; + + using IFT = typename ITraits::FT; + using IPoint_3 = typename ITraits::Point_3; + using IPlane_3 = typename ITraits::Plane_3; + + using Input_type = typename ItemMap::value_type; + using Element = typename std::conditional< + std::is_same::value, + typename ITraits::Point_3, typename ITraits::Segment_3 >::type; + + std::vector elements; + CGAL_precondition(region.size() > 0); + elements.reserve(region.size()); + const IConverter iconverter = IConverter(); + + for (auto item : region) { + const auto& element = get(item_map, item); + elements.push_back(iconverter(element)); + } + CGAL_precondition(elements.size() == region.size()); + + IPlane_3 fitted_plane; + IPoint_3 fitted_centroid; + const IFT score = CGAL::linear_least_squares_fitting_3( + elements.begin(), elements.end(), + fitted_plane, fitted_centroid, + CGAL::Dimension_tag::value>(), ITraits(), + CGAL::Eigen_diagonalize_traits()); + + const Plane_3 plane( + static_cast(fitted_plane.a()), + static_cast(fitted_plane.b()), + static_cast(fitted_plane.c()), + static_cast(fitted_plane.d())); + + return std::make_pair(plane, static_cast(score)); + } + + + template< + typename Traits, + typename InputRange, + typename Region, + typename ItemMap> + std::pair + create_plane( + const InputRange &input_range, + const ItemMap item_map, const Region& region, const Traits& traits) { + std::vector tmp; + tmp.resize(region.size()); + + for (std::size_t idx : region) + tmp[idx] = input_range.begin() + idx; + + return create_plane(tmp, item_map, traits); + } + + template< + typename Traits, + typename FaceGraph, + typename Region, + typename VertexToPointMap> + std::pair + create_plane_from_faces( + const FaceGraph& face_graph, + const Region& region, + const VertexToPointMap vertex_to_point_map, const Traits&) { - public: - using Traits = GeomTraits; using FT = typename Traits::FT; - using Point_2 = typename Traits::Point_2; - using Point_3 = typename Traits::Point_3; using Plane_3 = typename Traits::Plane_3; - using Vector_3 = typename Traits::Vector_3; - - template< - typename Input_range, - typename Point_map> - Plane( - const Input_range& input_range, - const Point_map point_map, - const std::vector& region, - const Plane_3& plane) { - - FT x = FT(0), y = FT(0), z = FT(0); - for (const std::size_t idx : region) { - const auto& p = get(point_map, *(input_range.begin() + idx)); - x += p.x(); - y += p.y(); - z += p.z(); + + using ITraits = CGAL::Exact_predicates_inexact_constructions_kernel; + using IConverter = CGAL::Cartesian_converter; + + using IFT = typename ITraits::FT; + using IPoint_3 = typename ITraits::Point_3; + using ITriangle_3 = typename ITraits::Triangle_3; + using IPlane_3 = typename ITraits::Plane_3; + + std::vector triangles; + CGAL_precondition(region.size() > 0); + triangles.reserve(region.size()); + const IConverter iconverter = IConverter(); + + for (const typename Region::value_type face : region) { + const auto hedge = halfedge(face, face_graph); + const auto vertices = vertices_around_face(hedge, face_graph); + CGAL_precondition(vertices.size() > 0); + + std::vector points; + for (const auto vertex : vertices) { + const auto& point = get(vertex_to_point_map, vertex); + points.push_back(iconverter(point)); } - x /= static_cast(region.size()); - y /= static_cast(region.size()); - z /= static_cast(region.size()); + if (points.size()==3) + triangles.push_back(ITriangle_3(points[0], points[1], points[2])); + else + { + //use a triangulation using the centroid + std::size_t nb_edges = points.size(); + IPoint_3 c = CGAL::centroid(points.begin(), points.end()); + points.push_back(points.front()); + for (std::size_t i=0; i= region.size()); + IPlane_3 fitted_plane; + IPoint_3 fitted_centroid; + const IFT score = CGAL::linear_least_squares_fitting_3( + triangles.begin(), triangles.end(), + fitted_plane, fitted_centroid, + CGAL::Dimension_tag<2>(), ITraits(), + CGAL::Eigen_diagonalize_traits()); + + const Plane_3 plane( + static_cast(fitted_plane.a()), + static_cast(fitted_plane.b()), + static_cast(fitted_plane.c()), + static_cast(fitted_plane.d())); + return std::make_pair(plane, static_cast(score)); + } + + template< + typename Traits, + typename Region, + typename PointMap> + std::pair, + typename Traits::FT> + create_circle_2( + const Region ®ion, const PointMap point_map, + const Traits&, const bool compute_score) { + + using FT = typename Traits::FT; + using Point_2 = typename Traits::Point_2; + + typename Get_sqrt::Sqrt sqrt; + typename Traits::Compute_squared_distance_2 squared_distance_2; + + using ITraits = CGAL::Exact_predicates_inexact_constructions_kernel; + using IFT = typename ITraits::FT; + + using Diagonalize_traits = Eigen_diagonalize_traits; + using Covariance_matrix = typename Diagonalize_traits::Covariance_matrix; - m_centroid = Point_3(x, y, z); - m_base1 = plane.base1() / static_cast(CGAL::sqrt( - CGAL::to_double(plane.base1() * plane.base1()))); - m_base2 = plane.base2() / static_cast(CGAL::sqrt( - CGAL::to_double(plane.base2() * plane.base2()))); + using Vector = typename Diagonalize_traits::Vector; + using Matrix = typename Diagonalize_traits::Matrix; + + // Use bbox to compute diagonalization with smaller coordinates to + // avoid loss of precision when inverting large coordinates. + FT xmin = +FT(1000000000000); + FT ymin = +FT(1000000000000); + for (auto item : region) { + const auto& point = get(point_map, item); + xmin = (CGAL::min)(xmin, point.x()); + ymin = (CGAL::min)(ymin, point.y()); } - Point_2 to_2d(const Point_3& query) const { - const Vector_3 v(m_centroid, query); - return Point_2(v * m_base1, v * m_base2); + // Circle least squares fitting: + // Circle of center (a, b) and radius R: + // Ri = sqrt((xi - a)^2 + (yi - b)^2) + // Minimize sum(Ri^2 - R^2)^2 + // -> Minimize sum(xi^2 + yi^2 − 2 * a * xi − 2 * b * yi + a^2 + b^2 − R^2)^2 + // Let B = -2a; C = -2b; D = a^2 + b^2 - R^2; and ri = x^2 + y^2. + // -> Minimize sum(D + B * xi + C * yi + ri)^2 + // -> Minimize sum(1 + B / D * xi + C / D * yi + ri / D)^2 + // -> system of linear equations + // -> diagonalize matrix + // NB x y r + // xx xy xr + // yy yr + // rr + // -> center coordinates = [ + // -0.5 * eigenvector(1) / eigenvector(3); + // -0.5 * eigenvector(2) / eigenvector(3); ] + Covariance_matrix A = { + IFT(0), IFT(0), IFT(0), IFT(0), IFT(0), + IFT(0), IFT(0), IFT(0), IFT(0), IFT(0) + }; + + A[0] = static_cast(region.size()); + for (auto &item : region) { + const auto& point = get(point_map, item); + + const IFT x = static_cast(CGAL::to_double(point.x() - xmin)); + const IFT y = static_cast(CGAL::to_double(point.y() - ymin)); + const IFT r = x * x + y * y; + + A[1] += x; + A[2] += y; + A[3] += r; + A[4] += x * x; + A[5] += x * y; + A[6] += x * r; + A[7] += y * y; + A[8] += y * r; + A[9] += r * r; } - Point_3 to_3d(const Point_2& query) const { - return m_centroid + query.x() * m_base1 + query.y() * m_base2; + Vector eigenvalues = { + IFT(0), IFT(0), IFT(0), IFT(0) + }; + Matrix eigenvectors = { + IFT(0), IFT(0), IFT(0), IFT(0), + IFT(0), IFT(0), IFT(0), IFT(0), + IFT(0), IFT(0), IFT(0), IFT(0), + IFT(0), IFT(0), IFT(0), IFT(0) + }; + Diagonalize_traits:: + diagonalize_selfadjoint_covariance_matrix(A, eigenvalues, eigenvectors); + + // Perfect line case, no circle can be fitted. + if (eigenvectors[3] == IFT(0)) { + return std::make_pair( + std::make_pair(FT(-1), Point_2()), + -static_cast(((std::numeric_limits::max))())); + } + CGAL_assertion(eigenvectors[3] != IFT(0)); + + // Other cases. + const FT half = FT(1) / FT(2); + const Point_2 fitted_center = Point_2( + xmin - half * static_cast(eigenvectors[1] / eigenvectors[3]), + ymin - half * static_cast(eigenvectors[2] / eigenvectors[3]) + ); + + FT fitted_radius = FT(0); + for (auto &item : region) { + const auto& point = get(point_map, item); + fitted_radius += sqrt(squared_distance_2(point, fitted_center)); + } + fitted_radius /= static_cast(region.size()); + + // Compute score. + FT score = FT(-1); + if (compute_score) { + score = FT(0); + for (auto &item : region) { + const auto& point = get(point_map, item); + score -= CGAL::abs(sqrt(squared_distance_2(point, fitted_center)) + - fitted_radius); + } } - private: - Point_3 m_centroid; - Vector_3 m_base1, m_base2; - }; + return std::make_pair( + std::make_pair(fitted_radius, fitted_center), score); + } + + template< + typename Traits, + typename Region, + typename PointMap> + std::pair, + typename Traits::FT> + create_sphere( + const Region ®ion, const PointMap point_map, + const Traits&, const bool compute_score) { + + using FT = typename Traits::FT; + using Point_3 = typename Traits::Point_3; + + typename Get_sqrt::Sqrt sqrt; + typename Traits::Compute_squared_distance_3 squared_distance_3; -} // namespace RG + using ITraits = CGAL::Exact_predicates_inexact_constructions_kernel; + using IFT = typename ITraits::FT; + + using Diagonalize_traits = Eigen_diagonalize_traits; + using Covariance_matrix = typename Diagonalize_traits::Covariance_matrix; + + using Vector = typename Diagonalize_traits::Vector; + using Matrix = typename Diagonalize_traits::Matrix; + + // Use bbox to compute diagonalization with smaller coordinates to + // avoid loss of precision when inverting large coordinates. + FT xmin = +FT(1000000000000); + FT ymin = +FT(1000000000000); + FT zmin = +FT(1000000000000); + for (auto item : region) { + const auto& point = get(point_map, item); + xmin = (CGAL::min)(xmin, point.x()); + ymin = (CGAL::min)(ymin, point.y()); + zmin = (CGAL::min)(zmin, point.z()); + } + + // Sphere least squares fitting. + // See create_circle_2() above for more details on computation. + Covariance_matrix A = { + IFT(0), IFT(0), IFT(0), IFT(0), IFT(0), + IFT(0), IFT(0), IFT(0), IFT(0), IFT(0), + IFT(0), IFT(0), IFT(0), IFT(0), IFT(0) + }; + + A[0] = static_cast(region.size()); + for (auto item : region) { + const auto& point = get(point_map, item); + + const IFT x = static_cast(CGAL::to_double(point.x() - xmin)); + const IFT y = static_cast(CGAL::to_double(point.y() - ymin)); + const IFT z = static_cast(CGAL::to_double(point.z() - zmin)); + const IFT r = x * x + y * y + z * z; + + A[1] += x; + A[2] += y; + A[3] += z; + A[4] += r; + A[5] += x * x; + A[6] += x * y; + A[7] += x * z; + A[8] += x * r; + A[9] += y * y; + A[10] += y * z; + A[11] += y * r; + A[12] += z * z; + A[13] += z * r; + A[14] += r * r; + } + + Vector eigenvalues = { + IFT(0), IFT(0), IFT(0), IFT(0), IFT(0) + }; + Matrix eigenvectors = { + IFT(0), IFT(0), IFT(0), IFT(0), IFT(0), + IFT(0), IFT(0), IFT(0), IFT(0), IFT(0), + IFT(0), IFT(0), IFT(0), IFT(0), IFT(0), + IFT(0), IFT(0), IFT(0), IFT(0), IFT(0), + IFT(0), IFT(0), IFT(0), IFT(0), IFT(0) + }; + Diagonalize_traits:: + diagonalize_selfadjoint_covariance_matrix(A, eigenvalues, eigenvectors); + + // Perfect plane case, no sphere can be fitted. + if (eigenvectors[4] == IFT(0)) { + return std::make_pair( + std::make_pair(FT(-1), Point_3()), + -static_cast((std::numeric_limits::max)())); + } + CGAL_assertion(eigenvectors[4] != IFT(0)); + + // Other cases. + const FT half = FT(1) / FT(2); + const Point_3 fitted_center = Point_3( + xmin - half * static_cast(eigenvectors[1] / eigenvectors[4]), + ymin - half * static_cast(eigenvectors[2] / eigenvectors[4]), + zmin - half * static_cast(eigenvectors[3] / eigenvectors[4]) + ); + + FT fitted_radius = FT(0); + for (auto item : region) { + const auto& point = get(point_map, item); + fitted_radius += sqrt(squared_distance_3(point, fitted_center)); + } + fitted_radius /= static_cast(region.size()); + + // Compute score. + FT score = FT(-1); + if (compute_score) { + score = FT(0); + for (auto item : region) { + const auto& point = get(point_map, item); + score -= CGAL::abs(sqrt(squared_distance_3(point, fitted_center)) + - fitted_radius); + } + } + + return std::make_pair( + std::make_pair(fitted_radius, fitted_center), score); + } + + template< + typename Traits, + typename Region, + typename PointMap, + typename NormalMap> + std::pair, + typename Traits::FT> + create_cylinder( + const Region& region, const PointMap point_map, + const NormalMap normal_map, + const Traits& traits) { + + if (region.size() < 6) + return std::make_pair( + std::make_pair + (-1.0, typename Traits::Line_3()), + (std::numeric_limits::max)()); + + using FT = typename Traits::FT; + using Line_3 = typename Traits::Line_3; + + Line_3 fitted_axis; + FT squared_radius; + + FT error = fit_cylinder + (region, point_map, normal_map, fitted_axis, + squared_radius, traits); + + // A negative squared_radius is returned if the cylinder fitting failed. + // This can be the case if the normals are very close to each other. + if (squared_radius < 0) + return std::make_pair( + std::make_pair + (-1.0, typename Traits::Line_3()), + (std::numeric_limits::max)()); + + return std::make_pair( + std::make_pair(sqrt(squared_radius), fitted_axis), error); + } + +} // namespace internal } // namespace Shape_detection } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization.h b/thirdparty/CGAL/include/CGAL/Shape_regularization.h index 50e54011..b9687336 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization.h $ -// $Id: Shape_regularization.h cfd9b85 2021-06-30T11:51:19+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization.h $ +// $Id: include/CGAL/Shape_regularization.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/Contours/Longest_direction_2.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/Contours/Longest_direction_2.h index 9d5b0938..3dc814e6 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/Contours/Longest_direction_2.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/Contours/Longest_direction_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/Contours/Longest_direction_2.h $ -// $Id: Longest_direction_2.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/Contours/Longest_direction_2.h $ +// $Id: include/CGAL/Shape_regularization/Contours/Longest_direction_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -42,7 +42,7 @@ namespace Contours { range and value type is `GeomTraits::Point_2`. The default is `CGAL::Identity_property_map`. - \cgalModels `ContourDirections` + \cgalModels{ContourDirections} */ template< typename GeomTraits, diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/Contours/Multiple_directions_2.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/Contours/Multiple_directions_2.h index 9c346846..d4b1b080 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/Contours/Multiple_directions_2.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/Contours/Multiple_directions_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/Contours/Multiple_directions_2.h $ -// $Id: Multiple_directions_2.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/Contours/Multiple_directions_2.h $ +// $Id: include/CGAL/Shape_regularization/Contours/Multiple_directions_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -48,7 +48,7 @@ namespace Contours { range and value type is `GeomTraits::Point_2`. The default is `CGAL::Identity_property_map`. - \cgalModels `ContourDirections` + \cgalModels{ContourDirections} */ template< typename GeomTraits, diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/Contours/User_defined_directions_2.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/Contours/User_defined_directions_2.h index fc224bc0..8f703215 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/Contours/User_defined_directions_2.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/Contours/User_defined_directions_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/Contours/User_defined_directions_2.h $ -// $Id: User_defined_directions_2.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/Contours/User_defined_directions_2.h $ +// $Id: include/CGAL/Shape_regularization/Contours/User_defined_directions_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -42,7 +42,7 @@ namespace Contours { range and value type is `GeomTraits::Point_2`. The default is `CGAL::Identity_property_map`. - \cgalModels `ContourDirections` + \cgalModels{ContourDirections} */ template< typename GeomTraits, diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/QP_regularization.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/QP_regularization.h index abef71fe..f8150fe2 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/QP_regularization.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/QP_regularization.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/QP_regularization.h $ -// $Id: QP_regularization.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/QP_regularization.h $ +// $Id: include/CGAL/Shape_regularization/QP_regularization.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/Segments/Angle_regularization_2.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/Segments/Angle_regularization_2.h index 917f2a59..f79a6b41 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/Segments/Angle_regularization_2.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/Segments/Angle_regularization_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/Segments/Angle_regularization_2.h $ -// $Id: Angle_regularization_2.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/Segments/Angle_regularization_2.h $ +// $Id: include/CGAL/Shape_regularization/Segments/Angle_regularization_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -46,7 +46,7 @@ namespace Segments { range and value type is `GeomTraits::Segment_2`. The default is `CGAL::Identity_property_map`. - \cgalModels `RegularizationType` + \cgalModels{RegularizationType} */ template< typename GeomTraits, diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/Segments/Delaunay_neighbor_query_2.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/Segments/Delaunay_neighbor_query_2.h index cf58596e..425f73d4 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/Segments/Delaunay_neighbor_query_2.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/Segments/Delaunay_neighbor_query_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/Segments/Delaunay_neighbor_query_2.h $ -// $Id: Delaunay_neighbor_query_2.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/Segments/Delaunay_neighbor_query_2.h $ +// $Id: include/CGAL/Shape_regularization/Segments/Delaunay_neighbor_query_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -52,7 +52,7 @@ namespace Segments { and value type is `GeomTraits::Segment_2`. The default is `CGAL::Identity_property_map`. - \cgalModels `NeighborQuery` + \cgalModels{NeighborQuery} */ template< typename GeomTraits, diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/Segments/Offset_regularization_2.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/Segments/Offset_regularization_2.h index 3494f7cd..daf90d2f 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/Segments/Offset_regularization_2.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/Segments/Offset_regularization_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/Segments/Offset_regularization_2.h $ -// $Id: Offset_regularization_2.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/Segments/Offset_regularization_2.h $ +// $Id: include/CGAL/Shape_regularization/Segments/Offset_regularization_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -51,7 +51,7 @@ namespace Segments { and value type is `GeomTraits::Segment_2`. The default is `CGAL::Identity_property_map`. - \cgalModels `RegularizationType` + \cgalModels{RegularizationType} */ template< typename GeomTraits, diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Closed_contour_2.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Closed_contour_2.h index 7bdce905..a551d7dc 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Closed_contour_2.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Closed_contour_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/internal/Closed_contour_2.h $ -// $Id: Closed_contour_2.h 614f536 2021-08-06T10:50:42+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/internal/Closed_contour_2.h $ +// $Id: include/CGAL/Shape_regularization/internal/Closed_contour_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Collinear_groups_2.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Collinear_groups_2.h index 6a1b4473..3f48c311 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Collinear_groups_2.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Collinear_groups_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/internal/Collinear_groups_2.h $ -// $Id: Collinear_groups_2.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/internal/Collinear_groups_2.h $ +// $Id: include/CGAL/Shape_regularization/internal/Collinear_groups_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Contour_base_2.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Contour_base_2.h index 09949c95..2bb8ff7d 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Contour_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Contour_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/internal/Contour_base_2.h $ -// $Id: Contour_base_2.h fb8313a 2022-05-05T18:50:46+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/internal/Contour_base_2.h $ +// $Id: include/CGAL/Shape_regularization/internal/Contour_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -755,10 +755,10 @@ namespace internal { typename CGAL::cpp11::result_of::type result = CGAL::intersection(line_1, line_2); if (result) { - if (const Line_2* line = boost::get(&*result)) { + if (const Line_2* line = std::get_if(&*result)) { return false; } else { - const Point_2* point = boost::get(&*result); + const Point_2* point = std::get_if(&*result); in_point = *point; return true; } } diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Contour_regularization_2.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Contour_regularization_2.h index 7c77a648..ae755188 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Contour_regularization_2.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Contour_regularization_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/internal/Contour_regularization_2.h $ -// $Id: Contour_regularization_2.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/internal/Contour_regularization_2.h $ +// $Id: include/CGAL/Shape_regularization/internal/Contour_regularization_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Open_contour_2.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Open_contour_2.h index 9ca7c52a..d2495507 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Open_contour_2.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Open_contour_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/internal/Open_contour_2.h $ -// $Id: Open_contour_2.h 614f536 2021-08-06T10:50:42+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/internal/Open_contour_2.h $ +// $Id: include/CGAL/Shape_regularization/internal/Open_contour_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Orthogonal_groups_2.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Orthogonal_groups_2.h index 6df1ecdd..985f7b20 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Orthogonal_groups_2.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Orthogonal_groups_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/internal/Orthogonal_groups_2.h $ -// $Id: Orthogonal_groups_2.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/internal/Orthogonal_groups_2.h $ +// $Id: include/CGAL/Shape_regularization/internal/Orthogonal_groups_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Parallel_groups_2.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Parallel_groups_2.h index aeb9ce00..da4456ee 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Parallel_groups_2.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Parallel_groups_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/internal/Parallel_groups_2.h $ -// $Id: Parallel_groups_2.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/internal/Parallel_groups_2.h $ +// $Id: include/CGAL/Shape_regularization/internal/Parallel_groups_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Segment_wrapper_2.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Segment_wrapper_2.h index 1e4f88a4..870c84ce 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Segment_wrapper_2.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Segment_wrapper_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/internal/Segment_wrapper_2.h $ -// $Id: Segment_wrapper_2.h 542f67b 2021-06-11T12:59:00+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/internal/Segment_wrapper_2.h $ +// $Id: include/CGAL/Shape_regularization/internal/Segment_wrapper_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Unique_segments_2.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Unique_segments_2.h index b00b44cc..0b525c1b 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Unique_segments_2.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/Unique_segments_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/internal/Unique_segments_2.h $ -// $Id: Unique_segments_2.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/internal/Unique_segments_2.h $ +// $Id: include/CGAL/Shape_regularization/internal/Unique_segments_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/utils.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/utils.h index eef57cd5..de99d6fa 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/utils.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/internal/utils.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/internal/utils.h $ -// $Id: utils.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/internal/utils.h $ +// $Id: include/CGAL/Shape_regularization/internal/utils.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -508,7 +508,7 @@ namespace internal { std::vector< std::vector > listp(nb_planes); for (std::size_t i = 0; i < points.size(); ++i) { - const int idx = get(index_map, i); + const int idx = static_cast(get(index_map, i)); if (idx != -1) { listp[std::size_t(idx)].push_back( get(point_map, *(points.begin() + i))); diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/regularize_contours.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/regularize_contours.h index 25b90388..875ea9f4 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/regularize_contours.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/regularize_contours.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/regularize_contours.h $ -// $Id: regularize_contours.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/regularize_contours.h $ +// $Id: include/CGAL/Shape_regularization/regularize_contours.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/regularize_planes.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/regularize_planes.h index 48324ac9..dfe8b782 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/regularize_planes.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/regularize_planes.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/regularize_planes.h $ -// $Id: regularize_planes.h 477353d 2022-04-20T15:55:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/regularize_planes.h $ +// $Id: include/CGAL/Shape_regularization/regularize_planes.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -296,7 +296,7 @@ namespace Planes { using PlaneIndexMap = typename CGAL::Point_set_processing_3::GetPlaneIndexMap::type; - CGAL_static_assertion_msg((!is_default_parameter::value), + static_assert(!is_default_parameter::value, "Error: no plane index map"); const PlaneIndexMap index_map = diff --git a/thirdparty/CGAL/include/CGAL/Shape_regularization/regularize_segments.h b/thirdparty/CGAL/include/CGAL/Shape_regularization/regularize_segments.h index 4b72dbdd..bda4de05 100644 --- a/thirdparty/CGAL/include/CGAL/Shape_regularization/regularize_segments.h +++ b/thirdparty/CGAL/include/CGAL/Shape_regularization/regularize_segments.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Shape_regularization/include/CGAL/Shape_regularization/regularize_segments.h $ -// $Id: regularize_segments.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Shape_regularization/include/CGAL/Shape_regularization/regularize_segments.h $ +// $Id: include/CGAL/Shape_regularization/regularize_segments.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -70,6 +70,9 @@ namespace Segments { that should be addressed. The function is based on the class `QP_regularization`. Please refer to that class and these concepts for more information. + This class requires a `QPSolver` model which defaults to the \ref thirdpartyOSQP "OSQP" + library, which must be available on the system. + \tparam InputRange a model of `ConstRange` whose iterator type is `RandomAccessIterator` diff --git a/thirdparty/CGAL/include/CGAL/Side_of_bounded_square_2.h b/thirdparty/CGAL/include/CGAL/Side_of_bounded_square_2.h index 9a20ccdc..de8d76db 100644 --- a/thirdparty/CGAL/include/CGAL/Side_of_bounded_square_2.h +++ b/thirdparty/CGAL/include/CGAL/Side_of_bounded_square_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Side_of_bounded_square_2.h $ -// $Id: Side_of_bounded_square_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Side_of_bounded_square_2.h $ +// $Id: include/CGAL/Side_of_bounded_square_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Side_of_oriented_square_2.h b/thirdparty/CGAL/include/CGAL/Side_of_oriented_square_2.h index c8793783..1cf6c39f 100644 --- a/thirdparty/CGAL/include/CGAL/Side_of_oriented_square_2.h +++ b/thirdparty/CGAL/include/CGAL/Side_of_oriented_square_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Segment_Delaunay_graph_Linf_2/include/CGAL/Side_of_oriented_square_2.h $ -// $Id: Side_of_oriented_square_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Segment_Delaunay_graph_Linf_2/include/CGAL/Side_of_oriented_square_2.h $ +// $Id: include/CGAL/Side_of_oriented_square_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Side_of_triangle_mesh.h b/thirdparty/CGAL/include/CGAL/Side_of_triangle_mesh.h index b696b29b..7b6dd596 100644 --- a/thirdparty/CGAL/include/CGAL/Side_of_triangle_mesh.h +++ b/thirdparty/CGAL/include/CGAL/Side_of_triangle_mesh.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h $ -// $Id: Side_of_triangle_mesh.h bb0b9a8 2022-03-07T15:32:37+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h $ +// $Id: include/CGAL/Side_of_triangle_mesh.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -99,7 +99,7 @@ class Side_of_triangle_mesh typename GeomTraits::Construct_ray_3 ray_functor; typename GeomTraits::Construct_vector_3 vector_functor; const TriangleMesh* tm_ptr; - boost::optional opt_vpm; + std::optional opt_vpm; bool own_tree; CGAL::Bbox_3 box; #ifdef CGAL_HAS_THREADS @@ -255,7 +255,7 @@ class Side_of_triangle_mesh CGAL_SCOPED_LOCK(tree_mutex); tree_ptr = const_cast(atomic_tree_ptr.load(std::memory_order_relaxed)); #endif - CGAL_assertion(tm_ptr != nullptr && opt_vpm!=boost::none); + CGAL_assertion(tm_ptr != nullptr && opt_vpm!=std::nullopt); if (tree_ptr==nullptr) { tree_ptr = new AABB_tree(faces(*tm_ptr).first, @@ -297,7 +297,7 @@ class Side_of_triangle_mesh CGAL_SCOPED_LOCK(tree_mutex); tree_ptr = const_cast(atomic_tree_ptr.load(std::memory_order_relaxed)); #endif - CGAL_assertion(tm_ptr != nullptr && opt_vpm!=boost::none); + CGAL_assertion(tm_ptr != nullptr && opt_vpm!=std::nullopt); if (tree_ptr==nullptr) { tree_ptr = new AABB_tree(faces(*tm_ptr).first, diff --git a/thirdparty/CGAL/include/CGAL/Simple_cartesian.h b/thirdparty/CGAL/include/CGAL/Simple_cartesian.h index 395be28b..2f51027c 100644 --- a/thirdparty/CGAL/include/CGAL/Simple_cartesian.h +++ b/thirdparty/CGAL/include/CGAL/Simple_cartesian.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/Simple_cartesian.h $ -// $Id: Simple_cartesian.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/Simple_cartesian.h $ +// $Id: include/CGAL/Simple_cartesian.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Simple_circular_kernel_2.h b/thirdparty/CGAL/include/CGAL/Simple_circular_kernel_2.h index aab9f99d..4930f26d 100644 --- a/thirdparty/CGAL/include/CGAL/Simple_circular_kernel_2.h +++ b/thirdparty/CGAL/include/CGAL/Simple_circular_kernel_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/Simple_circular_kernel_2.h $ -// $Id: Simple_circular_kernel_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/Simple_circular_kernel_2.h $ +// $Id: include/CGAL/Simple_circular_kernel_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Julien Hazebrouck, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Simple_homogeneous.h b/thirdparty/CGAL/include/CGAL/Simple_homogeneous.h index 03067d50..b701912d 100644 --- a/thirdparty/CGAL/include/CGAL/Simple_homogeneous.h +++ b/thirdparty/CGAL/include/CGAL/Simple_homogeneous.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Homogeneous_kernel/include/CGAL/Simple_homogeneous.h $ -// $Id: Simple_homogeneous.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Homogeneous_kernel/include/CGAL/Simple_homogeneous.h $ +// $Id: include/CGAL/Simple_homogeneous.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Simple_polygon_visibility_2.h b/thirdparty/CGAL/include/CGAL/Simple_polygon_visibility_2.h index 9772d820..06e3fc0e 100644 --- a/thirdparty/CGAL/include/CGAL/Simple_polygon_visibility_2.h +++ b/thirdparty/CGAL/include/CGAL/Simple_polygon_visibility_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Visibility_2/include/CGAL/Simple_polygon_visibility_2.h $ -// $Id: Simple_polygon_visibility_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Visibility_2/include/CGAL/Simple_polygon_visibility_2.h $ +// $Id: include/CGAL/Simple_polygon_visibility_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -205,7 +205,7 @@ namespace CGAL { mutable Arr_point_location point_location; - /*! Stack of visibile points; manipulated when going through the sequence + /*! Stack of visible points; manipulated when going through the sequence of input vertices; contains the vertices of the visibility region after the run of the algorithm*/ mutable std::stack stack; @@ -306,7 +306,7 @@ namespace CGAL { Location_result result = point_location.ray_shoot_up(q); if(const Halfedge_const_handle* e = - boost::get(&(result))) + std::get_if(&(result))) { CGAL_assertion((*e)->face() == face); Point_2 p(q.x(), @@ -321,7 +321,7 @@ namespace CGAL { return (*e)->next()->ccb(); } else if (const Vertex_const_handle* v = - boost::get(&(result))) + std::get_if(&(result))) { Halfedge_around_vertex_const_circulator cir = (*v)->incident_halfedges(); @@ -340,7 +340,7 @@ namespace CGAL { /*! Main method of the algorithm - initializes the stack and variables - and calles the corresponding methods acc. to the algorithm's state; + and calls the corresponding methods acc. to the algorithm's state; 'q' - query point; 'i' - current vertex' index 'w' - endpoint of ray shot from query point */ @@ -589,7 +589,7 @@ namespace CGAL { } } - /*! Find the first edge interecting the segment (v_0, s_t) */ + /*! Find the first edge intersecting the segment (v_0, s_t) */ void scanb(Size_type& i, Point_2& w) const { if ( i == vertices.size() - 1 ) { upcase = FINISH; diff --git a/thirdparty/CGAL/include/CGAL/Simple_spherical_kernel_3.h b/thirdparty/CGAL/include/CGAL/Simple_spherical_kernel_3.h index cc31cf3f..41c7b986 100644 --- a/thirdparty/CGAL/include/CGAL/Simple_spherical_kernel_3.h +++ b/thirdparty/CGAL/include/CGAL/Simple_spherical_kernel_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Simple_spherical_kernel_3.h $ -// $Id: Simple_spherical_kernel_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Simple_spherical_kernel_3.h $ +// $Id: include/CGAL/Simple_spherical_kernel_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, diff --git a/thirdparty/CGAL/include/CGAL/Simplicial_mesh_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Simplicial_mesh_cell_base_3.h new file mode 100644 index 00000000..d231abd4 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Simplicial_mesh_cell_base_3.h @@ -0,0 +1,250 @@ +// Copyright (c) 2006-2007 INRIA Sophia-Antipolis (France). +// Copyright (c) 2008,2011 GeometryFactory Sarl (France) +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/Simplicial_mesh_cell_base_3.h $ +// $Id: include/CGAL/Simplicial_mesh_cell_base_3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Laurent Rineau, Stephane Tayeb, Andreas Fabri, Jane Tournois + + +#ifndef CGAL_SIMPLICIAL_MESH_CELL_BASE_3_H +#define CGAL_SIMPLICIAL_MESH_CELL_BASE_3_H + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#ifdef CGAL_LINKED_WITH_TBB +# include +#endif + +namespace CGAL { + +/*! +\ingroup PkgSMDS3Classes + +The class `Simplicial_mesh_cell_base_3` +is a model of the concept `SimplicialMeshCellBase_3`. +It is designed to serve as cell base class for 3D simplicial mesh data structures. +It stores and gives access to data about the complex the cell belongs to, such as the +subdomain it belongs to or surface it takes part to. + +\tparam Gt is the geometric traits class. +It must be a model of the concept `TriangulationTraits_3` + +\tparam SubdomainIndex Type of indices for subdomains of the discretized geometric domain. +Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible` +and `EqualityComparable`. The default constructed value must match the label +of the exterior of the domain (which contains at least the unbounded component). +It must match `MeshDomain_3::Subdomain_index` when used for mesh generation. + +\tparam SurfacePatchIndex Type of indices for surface patches (boundaries and interfaces) +of the discretized geometric domain. +Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible` +and `EqualityComparable`. The default constructed value must be the index value +assigned to a non surface facet. +It must match `MeshDomain_3::Surface_patch_index` when used for mesh generation. + +\tparam Cb is the cell base class from which `Simplicial_mesh_cell_base_3` derives. +It must be a model of the concept `TriangulationCellBase_3`. + +\cgalModels{SimplicialMeshCellBase_3} + +\sa `CGAL::Mesh_complex_3_in_triangulation_3` +\sa \link Mesh_cell_base_3 `CGAL::Mesh_cell_base_3`\endlink +\sa `MeshDomain_3` +\sa `MeshDomainWithFeatures_3` +*/ +template > +class Simplicial_mesh_cell_base_3 + : public Cb +{ +public: + using Vertex_handle = typename Cb::Vertex_handle; + using Cell_handle = typename Cb::Cell_handle; + + using Geom_traits = Gt; + + // Index Type + using Subdomain_index = SubdomainIndex; + using Surface_patch_index = SurfacePatchIndex; + +public: + template + struct Rebind_TDS + { + using Cb2 = typename Cb::template Rebind_TDS::Other; + using Other = Simplicial_mesh_cell_base_3; + }; + +public: + Simplicial_mesh_cell_base_3() + : time_stamp_(std::size_t(-1)) + {} + + Simplicial_mesh_cell_base_3(const Simplicial_mesh_cell_base_3& rhs) + : Cb(static_cast(rhs)), + time_stamp_(rhs.time_stamp_), + subdomain_index_(rhs.subdomain_index_) + { + for(int i=0; i <4; ++i) + surface_index_table_[i] = rhs.surface_index_table_[i]; + } + + Simplicial_mesh_cell_base_3(Vertex_handle v0, Vertex_handle v1, + Vertex_handle v2, Vertex_handle v3) + : Cb(v0, v1, v2, v3) + { } + + Simplicial_mesh_cell_base_3(Vertex_handle v0, Vertex_handle v1, + Vertex_handle v2, Vertex_handle v3, + Cell_handle n0, Cell_handle n1, + Cell_handle n2, Cell_handle n3) + : Cb(v0, v1, v2, v3, n0, n1, n2, n3) + { } + + // Returns the index of the cell of the input complex that contains the cell + Subdomain_index subdomain_index() const { return subdomain_index_; } + + // Sets the index of the cell of the input complex that contains the cell + void set_subdomain_index(const Subdomain_index& index) + { subdomain_index_ = index; } + + /// Set surface index of \c facet to \c index + void set_surface_patch_index(const int facet, const Surface_patch_index& index) + { + CGAL_precondition(facet>=0 && facet<4); + surface_index_table_[facet] = index; + } + + /// Returns surface index of facet \c facet + Surface_patch_index surface_patch_index(const int facet) const + { + CGAL_precondition(facet>=0 && facet<4); + return surface_index_table_[facet]; + } + + /// Returns true if facet lies on a surface patch + bool is_facet_on_surface(const int facet) const + { + CGAL_precondition(facet>=0 && facet<4); + return ( !( Surface_patch_index() == surface_index_table_[facet] )); + } + + // ----------------------------------- + // Backward Compatibility + // ----------------------------------- +#ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX + typedef Surface_patch_index Surface_index; + + void set_surface_index(const int facet, const Surface_index& index) + { set_surface_patch_index(facet,index); } + + /// Returns surface index of facet \c facet + Surface_index surface_index(const int facet) const + { return surface_patch_index(facet); } +#endif // CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX + // ----------------------------------- + // End backward Compatibility + // ----------------------------------- + + static + std::string io_signature() + { + return + Get_io_signature()() + + "+(" + Get_io_signature()() + ")[4]"; + } + + /// For the determinism of Compact_container iterators + ///@{ + typedef Tag_true Has_timestamp; + + std::size_t time_stamp() const { + return time_stamp_; + } + void set_time_stamp(const std::size_t& ts) { + time_stamp_ = ts; + } + ///@} + +private: + + /// Stores surface_index for each facet of the cell + std::array surface_index_table_ = {}; + + std::size_t time_stamp_; + + // The index of the cell of the input complex that contains me + Subdomain_index subdomain_index_ = {}; + +public: + + friend std::istream& operator>>(std::istream& is, + Simplicial_mesh_cell_base_3& c) + { + Subdomain_index index; + if(IO::is_ascii(is)) + is >> index; + else + read(is, index); + + if(is) { + c.set_subdomain_index(index); + for(int i = 0; i < 4; ++i) + { + Surface_patch_index i2; + if(IO::is_ascii(is)) + is >> IO::iformat(i2); + else + { + read(is, i2); + } + c.set_surface_patch_index(i, i2); + } + } + return is; + } + + friend + std::ostream& operator<<(std::ostream& os, + const Simplicial_mesh_cell_base_3& c) + { + if(IO::is_ascii(os)) + os << c.subdomain_index(); + else + write(os, c.subdomain_index()); + + for(int i = 0; i < 4; ++i) + { + if(IO::is_ascii(os)) + os << ' ' << IO::oformat(c.surface_patch_index(i)); + else + write(os, c.surface_patch_index(i)); + } + + return os; + } +}; + +} // namespace CGAL + +#endif // CGAL_SIMPLICIAL_MESH_CELL_BASE_3_H diff --git a/thirdparty/CGAL/include/CGAL/Simplicial_mesh_vertex_base_3.h b/thirdparty/CGAL/include/CGAL/Simplicial_mesh_vertex_base_3.h new file mode 100644 index 00000000..65984a38 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Simplicial_mesh_vertex_base_3.h @@ -0,0 +1,274 @@ +// Copyright (c) 2009 INRIA Sophia-Antipolis (France). +// Copyright (c) 2011 GeometryFactory Sarl (France) +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/Simplicial_mesh_vertex_base_3.h $ +// $Id: include/CGAL/Simplicial_mesh_vertex_base_3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Stéphane Tayeb, Andreas Fabri, Jane Tournois +// +//****************************************************************************** +// File Description : +// +// +//****************************************************************************** + + +#ifndef CGAL_SIMPLICIAL_MESH_VERTEX_BASE_3_H +#define CGAL_SIMPLICIAL_MESH_VERTEX_BASE_3_H + +#include + +#include + +#include +#include +#include +#include + + +#include + +namespace CGAL { + +// Adds information to Vb about the localization of the vertex in regards to the 3D input complex. + +/*! +\ingroup PkgSMDS3Classes + +The class `Simplicial_mesh_vertex_base_3` is a model of the concept +`SimplicialMeshVertexBase_3`. +It is designed to serve as vertex base class for 3D simplicial mesh data structures. +It stores and gives access to data about the complex the vertex belongs to, such as the +index of the subcomplex it belongs to. + +\tparam Gt is the geometric traits class. +It must be a model of the concept `TriangulationTraits_3` + +\tparam SubdomainIndex Type of indices for subdomains of the discretized geometric domain. +Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible` +and `EqualityComparable`. The default constructed value must match the label +of the exterior of the domain (which contains at least the unbounded component). +It must match `MeshDomain_3::Subdomain_index` when used for mesh generation. + +\tparam SurfacePatchIndex Type of indices for surface patches (boundaries and interfaces) +of the discretized geometric domain. +Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible` +and `EqualityComparable`. The default constructed value must be the index value +assigned to a non surface facet. +It must match `MeshDomain_3::Surface_patch_index` when used for mesh generation. + +\tparam CurveIndex Type of indices for curves (i.e. \f$ 1\f$-dimensional features) +of the discretized geometric domain. +Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible` and +`LessThanComparable`. The default constructed value must be the value for an edge which +does not approximate a 1-dimensional feature of the geometric domain. +It must match `MeshDomainWithFeatures_3::Curve_index` when used for mesh generation. + +\tparam CornerIndex Type of indices for corners (i.e.\f$ 0\f$--dimensional features) +of the discretized geometric domain. +It must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible` and +`LessThanComparable`. +It must match `MeshDomainWithFeatures_3::Corner_index` when used for mesh generation. + +\tparam Vb is the vertex base class from which `Simplicial_mesh_vertex_base_3` derives. +It must be a model of the concept `TriangulationVertexBase_3`. + +\cgalModels{SimplicialMeshVertexBase_3} + +\sa `CGAL::Mesh_complex_3_in_triangulation_3` +\sa \link Mesh_vertex_base_3 `CGAL::Mesh_vertex_base_3`\endlink +\sa `MeshDomain_3` +\sa `MeshDomainWithFeatures_3` +*/ +template > +class Simplicial_mesh_vertex_base_3 + : public Vb +{ +private : + using Cmvb3_base = Vb; + +public: + using Vertex_handle = typename Vb::Vertex_handle; + + // Types + using Subdomain_index = SubdomainIndex; + using Surface_patch_index = SurfacePatchIndex; + using Curve_index = CurveIndex; + using Corner_index = CornerIndex; + + using Index = Variant_with_no_duplicate_t; + + using FT = typename Gt::FT; + +public: + template + struct Rebind_TDS + { + using Vb2 = typename Vb::template Rebind_TDS::Other; + using Other = Simplicial_mesh_vertex_base_3; + }; + +public: + Simplicial_mesh_vertex_base_3() + : Vb() + , number_of_incident_facets_(0) + , number_of_components_(0) + , index_() + , dimension_(-1) + , cache_validity(false) + , time_stamp_(std::size_t(-1)) + {} + + // Default copy constructor and assignment operator are ok + + // Returns the dimension of the lowest dimensional face of the input 3D + // complex that contains the vertex + int in_dimension() const { + if(dimension_ < -1) return -2-dimension_; + else return dimension_; + } + + // Sets the dimension of the lowest dimensional face of the input 3D complex + // that contains the vertex + void set_dimension(const int dimension) { + CGAL_assertion(dimension < 4); + dimension_ = short(dimension); + } + + // Returns the index of the lowest dimensional face of the input 3D complex + // that contains the vertex + Index index() const { return index_; } + + // Sets the index of the lowest dimensional face of the input 3D complex + // that contains the vertex + void set_index(const Index& index) { index_ = index; } + + /// For the determinism of Compact_container iterators + ///@{ + typedef Tag_true Has_timestamp; + + std::size_t time_stamp() const { + return time_stamp_; + } + void set_time_stamp(const std::size_t& ts) { + time_stamp_ = ts; + } + ///@} + + bool is_c2t3_cache_valid() const { + return cache_validity; + } + + void invalidate_c2t3_cache() + { + cache_validity = false; + } + + void set_c2t3_cache(const std::size_t i, const std::size_t j) + { + number_of_incident_facets_ = i; + number_of_components_ = j; + cache_validity = true; + } + + std::size_t cached_number_of_incident_facets() const + { + return number_of_incident_facets_; + } + + std::size_t cached_number_of_components() const + { + return number_of_components_; + } + + static + std::string io_signature() + { + return + Get_io_signature()() + "+" + + Get_io_signature()() + "+" + + Get_io_signature()(); + } +private: + + std::size_t number_of_incident_facets_; + std::size_t number_of_components_; // number of components in the adjacency + // graph of incident facets (in complex) + + + // Index of the lowest dimensional face of the input 3D complex + // that contains me + Index index_; + + // Dimension of the lowest dimensional face of the input 3D complex + // that contains me. Negative values are a marker for special vertices. + short dimension_; + bool cache_validity; + std::size_t time_stamp_; + +public: + friend std::istream& operator>>(std::istream& is, + Simplicial_mesh_vertex_base_3& v) + { + is >> static_cast(v); + int dimension; + if(IO::is_ascii(is)) { + is >> dimension; + + } else { + CGAL::read(is, dimension); + } + v.set_dimension(dimension); + CGAL_assertion(v.in_dimension() >= -1); + CGAL_assertion(v.in_dimension() < 4); + + using Indices_tuple = std::tuple; + Index index = + Mesh_3::internal::Read_write_index()(is, v.in_dimension()); + v.set_index(index); + return is; + } + + friend std::ostream& operator<<(std::ostream& os, + const Simplicial_mesh_vertex_base_3& v) + { + os << static_cast(v); + if(IO::is_ascii(os)) { + os << " " << v.in_dimension() + << " "; + } else { + CGAL::write(os, v.in_dimension()); + } + using Indices_tuple = std::tuple; + Mesh_3::internal::Read_write_index()(os, + v.in_dimension(), + v.index()); + return os; + } +}; + +} // namespace CGAL + +#endif // CGAL_SIMPLICIAL_MESH_VERTEX_BASE_3_H diff --git a/thirdparty/CGAL/include/CGAL/Single.h b/thirdparty/CGAL/include/CGAL/Single.h index 0dc09fc6..6c6f940f 100644 --- a/thirdparty/CGAL/include/CGAL/Single.h +++ b/thirdparty/CGAL/include/CGAL/Single.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Single.h $ -// $Id: Single.h ff845cc 2020-08-25T13:48:48+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Single.h $ +// $Id: include/CGAL/Single.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Sixtuple.h b/thirdparty/CGAL/include/CGAL/Sixtuple.h index 50ceaffe..95e2efda 100644 --- a/thirdparty/CGAL/include/CGAL/Sixtuple.h +++ b/thirdparty/CGAL/include/CGAL/Sixtuple.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Sixtuple.h $ -// $Id: Sixtuple.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Sixtuple.h $ +// $Id: include/CGAL/Sixtuple.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Sizing_field_with_aabb_tree.h b/thirdparty/CGAL/include/CGAL/Sizing_field_with_aabb_tree.h new file mode 100644 index 00000000..5a042aeb --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Sizing_field_with_aabb_tree.h @@ -0,0 +1,703 @@ +// Copyright (c) 2010-2012-2016 GeometryFactory Sarl (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h $ +// $Id: include/CGAL/Sizing_field_with_aabb_tree.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Laurent Rineau +// + +#ifndef CGAL_MESH_3_SIZING_FIELD_WITH_AABB_TREE_H +#define CGAL_MESH_3_SIZING_FIELD_WITH_AABB_TREE_H + +#include + +#include +#include +#include // for weight_modifier + +#include +#include +#include + +#include +#include +#include + +#include +#if defined(CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY) || defined(CGAL_NO_ASSERTIONS) == 0 +# include +# include +#endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY || (! CGAL_NO_ASSERTIONS) + +namespace CGAL { +/*! +* @ingroup PkgMesh3DomainFields +* +* The class `Sizing_field_with_aabb_tree` is a model of concept `MeshDomainField_3`. +* It provides a sizing field to be used in the meshing process of a polyhedral surface with features. +* +* At each query point `p`, the field value is the minimum of the distances to +* - the surface patches `p` does not belong to, and +* - for each curve `C` it does belong to, the intersection points of `C` with +* the plane orthogonal to `C` and passing through `p`. +* +* This sizing field is designed to be used for the edges of the mesh complex, +* in `Mesh_edge_criteria_3` or as `edge_size` in `Mesh_criteria_3`. +* Using this sizing field for complex edges provides a high-quality hint +* to the protecting balls placement algorithm, since it ensures that no +* protecting ball will intersect a surface patch to which the +* corresponding vertex does not belong. +* +* @tparam GT is the geometric traits class. It must match the type `Triangulation::Geom_traits`, +* where `Triangulation` is the nested type of the model of `MeshComplex_3InTriangulation_3` used +* in the meshing process. +* @tparam MeshDomain is the type of the domain. It must be a model of `MeshDomainWithFeatures_3`, +* and derive from `CGAL::Polyhedral_mesh_domain_with_features_3` + + +* @cgalModels{MeshDomainField_3} +*/ +template +struct Sizing_field_with_aabb_tree +{ + using FT = typename GT::FT; + using Point_3 = typename GT::Point_3; + using Index = typename MeshDomain::Index; + +private: + typedef typename MeshDomain::Corner_index Corner_index; + typedef typename MeshDomain::Curve_index Curve_index; + typedef typename MeshDomain::Surface_patch_index Patch_index; + + typedef boost::container::flat_set Curves_ids; + typedef boost::container::flat_set Patches_ids; + + typedef std::map Corners_indices; + typedef std::vector Corners; + typedef std::vector Corners_incident_curves; + typedef std::vector Corners_incident_patches; + typedef std::vector Curves_incident_patches; + + typedef GT Kernel_; + typedef CGAL::Delaunay_triangulation_3 Dt; + + using Input_facets_AABB_tree = typename CGAL::Default::Get< + Input_facets_AABB_tree_, + typename MeshDomain::AABB_tree + >::type; + using AABB_traits = typename Input_facets_AABB_tree::AABB_traits; + using Point_and_primitive_id = typename AABB_traits::Point_and_primitive_id; + typedef typename Input_facets_AABB_tree::Primitive Input_facets_AABB_tree_primitive_; + typedef typename MeshDomain::Curves_AABB_tree Input_curves_AABB_tree_; + typedef typename Input_curves_AABB_tree_::Primitive Input_curves_AABB_tree_primitive_; + + using Get_curve_index = typename CGAL::Default::Get< + Get_curve_index_, + CGAL::Mesh_3::Get_curve_index + >::type; + using Facet_patch_id_map = typename CGAL::Default::Get< + Facet_patch_id_map_, + CGAL::Mesh_3::Facet_patch_id_map + >::type; + +public: + /// \name Creation + /// @{ + + /*! + * Constructor for the sizing field. + * @param d the maximal value returned by `operator()`, corresponding + * to an upper bound on feature edge lengths in the output mesh. + * @param domain the mesh domain to be meshed + */ + Sizing_field_with_aabb_tree(const FT& d, const MeshDomain& domain) + : Sizing_field_with_aabb_tree(d, + domain, + domain.aabb_tree(), + Get_curve_index(), + Facet_patch_id_map()) + {} + + /// @} + + struct Face_ids_traversal_traits { + using Limits = std::numeric_limits; + Patch_index min{(Limits::max)()}; + Patch_index max{Limits::lowest()}; + Facet_patch_id_map index_map{}; + + bool go_further() const { return true; } + template bool do_intersect(std::nullptr_t, const T&) { return true; } + + template void intersection(std::nullptr_t, const P& primitive) { + const Patch_index id = get(index_map, primitive.id()); + if (id < min) min = id; + if (id > max) max = id; + } + }; + +#ifndef DOXYGEN_RUNNING + Sizing_field_with_aabb_tree + (const typename Kernel_::FT d, + const MeshDomain& domain, + const Input_facets_AABB_tree& aabb_tree, + Get_curve_index get_curve_index = Get_curve_index(), + Facet_patch_id_map facet_patch_id_map = Facet_patch_id_map() + ) + : d_ptr{std::make_shared(d, + domain, + aabb_tree, + get_curve_index, + facet_patch_id_map)} + { + if(!d_ptr->aabb_tree.empty()) { + // Initialize the per-patch kd-trees + // - First compute the number of patches and min/max patch ids + Face_ids_traversal_traits traversal_traits; + d_ptr->aabb_tree.traversal(nullptr, traversal_traits); +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + std::cerr << "min: " << traversal_traits.min << ", max: " << traversal_traits.max << '\n'; +#endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + d_ptr->min_patch_id = traversal_traits.min; + d_ptr->kd_trees_ptrs.resize(traversal_traits.max - d_ptr->min_patch_id + 1); + + using Node = CGAL::AABB_node; + using Primitive = typename AABB_traits::Primitive; + using Point_and_primitive_id = typename AABB_traits::Point_and_primitive_id; + + std::vector> vertices_per_patch; + vertices_per_patch.resize(d_ptr->kd_trees_ptrs.size()); + + // - then fill sets of vertices per patch + auto push_vertex = [&](const auto& primitive) { + const Patch_index id = get(d_ptr->facet_patch_id_map, primitive.id()); + const Point_3& p = primitive.reference_point(); + vertices_per_patch[id - d_ptr->min_patch_id].emplace(p, primitive.id()); + }; + + struct Visit_all_primitives { + decltype(push_vertex) register_vertex; + bool go_further() const { return true; } + bool do_intersect(std::nullptr_t, const Node&) { return true; } + void intersection(std::nullptr_t, const Primitive& primitive) + { + register_vertex(primitive); + } + } visit_all_primitives{push_vertex}; + d_ptr->aabb_tree.traversal(nullptr, visit_all_primitives); + + // - then create the kd-trees + for(std::size_t i = 0; i < vertices_per_patch.size(); ++i) { + if(!vertices_per_patch[i].empty()) { + d_ptr->kd_trees_ptrs[i] = std::make_unique(vertices_per_patch[i].begin(), + vertices_per_patch[i].end()); + } + } + } + { + Corner_index maximal_corner_index = 0; + typedef std::pair Corner_index_and_point; + std::vector corners_tmp; + d_ptr->domain.get_corners(std::back_inserter(corners_tmp)); + for(const Corner_index_and_point& pair : corners_tmp) + { + // Fill `corners_indices` + if(pair.first > maximal_corner_index) maximal_corner_index = pair.first; + d_ptr->corners_indices. + insert(typename Corners_indices::value_type(pair.second, pair.first)); + } + d_ptr->corners.resize(maximal_corner_index+1); + for(const Corner_index_and_point& pair : corners_tmp) + { + // Fill `corners` + d_ptr->corners[pair.first] = pair.second; + } + } + + //fill incidences of corners with curves + d_ptr->corners_incident_curves.resize(d_ptr->corners.size()); + for(const typename Corners_indices::value_type& pair : d_ptr->corners_indices) { + d_ptr->dt.insert(pair.first); + + // Fill `corners_incident_curves[corner_id]` + Curves_ids& incident_curves = d_ptr->corners_incident_curves[pair.second]; + d_ptr->domain.get_corner_incident_curves(pair.second, + std::inserter(incident_curves, + incident_curves.end())); + // For each incident loops, insert a point on the loop, as far as + // possible. + for(Curve_index curve_index : incident_curves) { + if(domain.is_loop(curve_index)) { + FT curve_length = d_ptr->domain.curve_length(curve_index); + Point_3 other_point = + d_ptr->domain.construct_point_on_curve(pair.first, + curve_index, + curve_length / 2); + d_ptr->dt.insert(other_point); + } + } + } + + if (d_ptr->aabb_tree.empty()) + return;//there is no surface --> no surface patches + + //fill incidences with patches + d_ptr->curves_incident_patches.resize(domain.maximal_curve_index()+1); + d_ptr->corners_incident_patches.resize(d_ptr->corners.size()); + for (Curve_index curve_id = 1; + std::size_t(curve_id) < d_ptr->curves_incident_patches.size(); + ++curve_id) + { + const typename MeshDomain::Surface_patch_index_set& incident_patches = + d_ptr->domain.get_incidences(curve_id); + + // Fill `curves_incident_patches[curve_id]` + d_ptr->curves_incident_patches[curve_id]. + insert(boost::container::ordered_unique_range, + incident_patches.begin(), incident_patches.end()); + } + for(const typename Corners_indices::value_type& pair : d_ptr->corners_indices) { + // Get `corners_incident_curves[corner_id]` + Curves_ids& incident_curves = d_ptr->corners_incident_curves[pair.second]; + + // Fill `corners_incident_patches[corner_id]` + Patches_ids& incident_patches = d_ptr->corners_incident_patches[pair.second]; + for(Curve_index curve_index : incident_curves) { + const Patches_ids& curve_incident_patches = + d_ptr->curves_incident_patches[curve_index]; + incident_patches.insert(boost::container::ordered_unique_range, + curve_incident_patches.begin(), + curve_incident_patches.end()); + } + } + } + + std::optional + closest_point_on_surfaces(const Point_3& p, + const Patches_ids& patch_ids_to_ignore) const + { + std::optional result{}; + if(d_ptr->aabb_tree.empty()) return result; + for(std::size_t i = 0; i < d_ptr->kd_trees_ptrs.size(); ++i) { + const auto patch_id = static_cast(i + d_ptr->min_patch_id); + if(patch_ids_to_ignore.find(patch_id) != patch_ids_to_ignore.end()) continue; + if(d_ptr->kd_trees_ptrs[i]) { + const Kd_tree& kd_tree = *d_ptr->kd_trees_ptrs[i]; + const Point_and_primitive_id closest_point = kd_tree.closest_point(p); + if(!result || CGAL::compare_distance(p, closest_point.first, result->first) == CGAL::SMALLER) + { + result = closest_point; + } + } + } + if(!result) return result; + CGAL::Mesh_3::Filtered_projection_traits< + AABB_traits, + Facet_patch_id_map + > projection_traits(*result, + patch_ids_to_ignore.begin(), patch_ids_to_ignore.end(), + d_ptr->aabb_tree.traits(), + d_ptr->facet_patch_id_map); + d_ptr->aabb_tree.traversal(p, projection_traits); + result = projection_traits.closest_point_and_primitive(); + return result; + } +#endif // DOXYGEN_RUNNING + +public: + /// \name Operations + /// @{ + + /*! + * returns the value of the sizing field at the point `p`, + * assumed to be included in the input complex feature with dimension `dimension` + * and mesh subcomplex index `id`. + */ + double operator()(const Point_3& p, + const int dim, + const Index& id) const + { + CGAL_PROFILER("Sizing field"); +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + if(dim <= 1) { + std::cerr << "Sizing(" << p << ", dim=" << dim + << ", index=#" << CGAL::IO::oformat(id) << "): "; + } +#endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + FT result = d_ptr->d_; + if(dim == 0) { + if(d_ptr->dt.dimension() < 1) { +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + std::cerr << result << "(dt.dimension() < 1)\n"; +#endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + return result; + } + typename Dt::Point nearest; + + typename Dt::Locate_type lt; + int li, lj; + const typename Dt::Cell_handle ch = d_ptr->dt.locate(p, lt, li, lj); + if(lt == Dt::VERTEX) { +// std::cerr << "lt == Dt::VERTEX\n"; + const typename Dt::Vertex_handle vh = ch->vertex(li); + std::vector vs; + vs.reserve(32); + d_ptr->dt.finite_adjacent_vertices(vh, std::back_inserter(vs)); + CGAL_assertion(!vs.empty()); + nearest = d_ptr->dt.point(vs[0]); +// std::cerr << "sq_dist = " << CGAL::squared_distance(p, nearest) +// << std::endl; + typename Kernel_::Compare_distance_3 compare_dist; + for (typename std::vector::const_iterator + it = vs.begin(); it != vs.end(); ++it) + { +// std::cerr << "sq_dist = " << CGAL::squared_distance(p, dt.point(*it)) +// << std::endl; + if(compare_dist(p, d_ptr->dt.point(*it), nearest) == CGAL::SMALLER) { +// std::cerr << " nearest!\n"; + nearest = d_ptr->dt.point(*it); + } + } + } else { +// std::cerr << "lt=" << lt << std::endl; + const typename Dt::Vertex_handle vh = d_ptr->dt.nearest_vertex(p, ch); + nearest = d_ptr->dt.point(vh); + } + const FT dist = CGAL_NTS sqrt(CGAL::squared_distance( nearest, p)); + // std::cerr << (std::min)(dist / FT(1.5), d_) << "\n"; + result = (std::min)(dist * FT(0.5), result); + + // now search in the AABB tree + typename Corners_indices::const_iterator ids_it = + d_ptr->corners_indices.find(p); + if(ids_it == d_ptr->corners_indices.end()) { + std::cerr << "ERROR at " << __FILE__ << " line " << __LINE__ << "\n"; + } + else if(!d_ptr->aabb_tree.empty()) { + const Patches_ids& ids = d_ptr->corners_incident_patches[ids_it->second]; + CGAL_assertion(! ids.empty()); + + const auto closest_point_and_primitive = closest_point_on_surfaces(p, ids); + + if(closest_point_and_primitive != std::nullopt) { + result = + (std::min)(FT(0.9 / CGAL::sqrt(CGAL::Mesh_3::internal::weight_modifier) * + CGAL_NTS + sqrt(CGAL::squared_distance(p, + closest_point_and_primitive->first))), + result); +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + { + std::stringstream s; + + using boost::io::group; + using std::setprecision; + s << boost::format("\nSizing field is %1% at point (%2%)" + " on corner!\n" + "Closest face id: %3%\n" + "Closest point: %4%\n" + "Ids are { ") + % group(setprecision(17),result) + % group(setprecision(17),p) + % CGAL::IO::oformat(get(d_ptr->facet_patch_id_map, + closest_point_and_primitive->second)) + % group(setprecision(17), + closest_point_and_primitive->first); + for(Patch_index i : ids) { + s << CGAL::IO::oformat(i) << " "; + } + s << "}\n"; + std::cerr << s.str(); + std::cerr << result << " (result)\n"; + } +#endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + } else { +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + std::cerr << result << " (projection not found)\n"; +#endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + } + } // end if(corners.find(p) != corners.end()) and !aabb_tree.empty() + } // end if(dim == 0) + else if(dim != 1) { +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + std::cerr << result << "\n"; +#endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + return result; + } + else { // dim == 1 + const typename MeshDomain::Curve_index& curve_id = + d_ptr->domain.curve_index(id); + const Patches_ids& ids = d_ptr->curves_incident_patches[curve_id]; + CGAL_assertion(! ids.empty()); + + if(!d_ptr->aabb_tree.empty()) { + //Compute distance to surface patches + const auto closest_point_and_primitive = closest_point_on_surfaces(p, ids); + if(closest_point_and_primitive == std::nullopt) { +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + std::cerr << result << " (projection not found) ids:"; + for(Patch_index i : ids) { + std::cerr << " " << CGAL::IO::oformat(i); + } + std::cerr << "\n"; + +#endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + return result; + } + + CGAL_assertion(ids.count(get(d_ptr->facet_patch_id_map, + closest_point_and_primitive->second)) == 0); + + result = + (std::min)(FT(0.9 / CGAL::sqrt(CGAL::Mesh_3::internal::weight_modifier) * + CGAL_NTS + sqrt(CGAL::squared_distance(p, + closest_point_and_primitive->first))), + result); + +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + { + std::stringstream s; + + s << boost::format("\nSizing field is %1% at point (%2%)" + " on curve #%3% !\n" + "Closest face id: %4%\n" + "Ids are { ") + % result % p % curve_id + % CGAL::IO::oformat(get(d_ptr->facet_patch_id_map, + closest_point_and_primitive->second)); + for(Patch_index i : ids) { + s << CGAL::IO::oformat(i) << " "; + } + s << "}\n"; + std::cerr << s.str(); + std::cerr << result << " (result)\n"; + } +#endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY +#ifndef CGAL_NO_ASSERTIONS + if(result <= 0) { + std::stringstream s; + + s << boost::format("Sizing field is %1% at point (%2%)" + " on curve #%3% !\n" + "Closest face id: %4%\n" + "Ids are { ") + % result % p % curve_id + % CGAL::IO::oformat(get(d_ptr->facet_patch_id_map, + closest_point_and_primitive->second)); + for(Patch_index i : ids) { + s << CGAL::IO::oformat(i) << " "; + } + s << "}\n"; + CGAL_assertion_msg(result <=0, s.str().c_str()); + } +#ifdef PROTECTION_DEBUG + else if (result <= (d_ / 1e7)) { + std::stringstream s; + s << boost::format("Sizing field is %1% at point (%2%)" + " on curve #%3% !\n" + "Closest face id: %4%\n" + "Ids are { ") + % result % p % curve_id + % closest_point_and_primitive->second->patch_id(); + for(Patch_index i : ids) { + s << CGAL::IO::oformat(i) << " "; + } + s << "}\n"; + std::cerr << "ERROR at " << __FILE__ << " line " << __LINE__ << " :\n" + << s.str() << std::endl; + } +#endif // PROTECTION_DEBUG +#endif // CGAL_NO_ASSERTIONS + } // end if(!aabb_tree.empty()) + //Compute distance to the curves, and exclude the one on which p lies + CGAL::Mesh_3::Filtered_projection_traits + curves_projection_traits(curve_id, + d_ptr->domain.curves_aabb_tree().traits(), + d_ptr->get_curve_index); + + d_ptr->domain.curves_aabb_tree().traversal(p, curves_projection_traits); + + //Compute distance to the curve on which p lies + typedef typename GT::Segment_3 Segment_3; + typedef typename GT::Plane_3 Plane_3; + + const typename Input_curves_AABB_tree_::Point_and_primitive_id& ppid + = d_ptr->domain.curves_aabb_tree().closest_point_and_primitive(p); + + Segment_3 curr_segment(*ppid.second.second, *(ppid.second.second + 1)); + Plane_3 curr_ortho_plane(p, curr_segment.to_vector()/*normal*/); + Input_curves_AABB_tree_primitive_ curr_prim(ppid.second); + + std::vector prims; + d_ptr->domain.curves_aabb_tree(). + all_intersected_primitives(curr_ortho_plane, std::back_inserter(prims)); + +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + std::cerr << std::endl; + std::cerr << "p = " << p << std::endl; + std::cerr << "curr_ortho_plane = " << curr_ortho_plane << std::endl; + std::cerr << "PRIMITIVES FOUND : " << prims.size() << std::endl; +#endif + + Point_3 closest_intersection; + Input_curves_AABB_tree_primitive_ closest_primitive = prims[0]; + FT sqd_intersection = -1; + for(Input_curves_AABB_tree_primitive_ prim : prims) + { + if (prim.id() == curr_prim.id()) + continue;//curr_prim is the closest primitive + + if (curve_id != prim.id().first->first) + continue;//don't deal with the same curves as what is done above + + const auto int_res = CGAL::intersection(prim.datum(), curr_ortho_plane); + if (int_res) + { + if (const Point_3* pp = std::get_if(&*int_res)) + { + FT new_sqd = CGAL::squared_distance(p, *pp); + FT dist = CGAL::abs(d_ptr->domain.signed_geodesic_distance(p, *pp, curve_id)); + +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + std::cerr << "Intersection point : Point_3(" << *pp << ") "; + std::cerr << "\n new_sqd = " << new_sqd ; + std::cerr << "\n dist = " << dist << "\n"; +#endif + if (new_sqd * 1e10 < CGAL::squared_distance(curr_segment.source(), + curr_segment.target())) + { +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + std::cerr << " too close, compared to possible rounding errors, " + << "SKIPPED\n"; +#endif + continue; + } + if (CGAL_NTS sqrt(new_sqd) > 0.9 * dist) + continue; + if (sqd_intersection == -1 || new_sqd < sqd_intersection) + { + sqd_intersection = new_sqd; + closest_intersection = *pp; + closest_primitive = prim; + } + } + else + continue;// intersection is a segment : collinear case + } + else + CGAL_assertion(false);//prim was returned as an intersected primitive + } + + //compare closest_projection and closest_intersection, and keep the closest + if (curves_projection_traits.found()) + { + FT tmp_sqd = CGAL::squared_distance(p, curves_projection_traits.closest_point()); + if (sqd_intersection == -1 || tmp_sqd < sqd_intersection) + { + sqd_intersection = tmp_sqd; + closest_intersection = curves_projection_traits.closest_point(); + closest_primitive = Input_curves_AABB_tree_primitive_( + curves_projection_traits.closest_point_and_primitive().second); + } + } +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + std::cout << " curve_id = " << curve_id + << " proj_cid = " << closest_primitive.id().first->first + << " (" << get(d_ptr->get_curve_index, closest_primitive.id()) << ")" + << std::endl; + std::cerr << " --- domain.curves_aabb_tree().traversal \n"; +#endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + if (sqd_intersection > 0) + { +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + std::cerr << "FOUND!\n"; + std::cerr << " closest_point: " << closest_intersection << "\n" + << " distance = " << CGAL_NTS sqrt(sqd_intersection) << std::endl; +#endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + FT new_result = + (std::min)(FT(0.45 / CGAL::sqrt(CGAL::Mesh_3::internal::weight_modifier) * + CGAL_NTS sqrt(sqd_intersection)), + d_ptr->d_); + +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + std::cerr << "result = " << result << "\n"; + std::cerr << "new_result = " << new_result << "\n"; +#endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + if(result > new_result) { + result = new_result; +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + std::stringstream s; + + s << boost::format("\nSizing field is %1% at point (%2%)" + " on curve #%3% !\n" + "Closest CURVE id: %4%\n" + "Ids are { ") + % result % p % curve_id + % closest_primitive.id().first->first; + for(int i : ids) { + s << i << " "; + } + s << "}\n"; + std::cerr << s.str(); + std::cerr << result << " (result)\n"; +#endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + } + } + } // end dim == 1 +#ifdef CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + std::cerr << result << std::endl; +#endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY + return result; + } + + /// @} + +private: + using Kd_tree = CGAL::AABB_search_tree; + struct Private_data { + using FT = typename Kernel_::FT; + Private_data(FT d, + const MeshDomain& domain, + const Input_facets_AABB_tree& aabb_tree, + Get_curve_index get_curve_index, + Facet_patch_id_map facet_patch_id_map) + : d_(d) + , domain(domain) + , aabb_tree(aabb_tree) + , get_curve_index(get_curve_index) + , facet_patch_id_map(facet_patch_id_map) + {} + FT d_; + const MeshDomain& domain; + const Input_facets_AABB_tree& aabb_tree; + Get_curve_index get_curve_index; + Facet_patch_id_map facet_patch_id_map; + Dt dt{}; + Corners corners{}; + Corners_indices corners_indices{}; + Curves_incident_patches curves_incident_patches{}; + Corners_incident_patches corners_incident_patches{}; + Corners_incident_curves corners_incident_curves{}; + std::vector> kd_trees_ptrs{}; + Patch_index min_patch_id{}; + }; + std::shared_ptr d_ptr; +}; + +}//end namespace CGAL + +#endif // CGAL_MESH_3_SIZING_FIELD_WITH_AABB_TREE_H diff --git a/thirdparty/CGAL/include/CGAL/Skin_surface_3.h b/thirdparty/CGAL/include/CGAL/Skin_surface_3.h index 67e6d8bd..2ad77c0d 100644 --- a/thirdparty/CGAL/include/CGAL/Skin_surface_3.h +++ b/thirdparty/CGAL/include/CGAL/Skin_surface_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/Skin_surface_3.h $ -// $Id: Skin_surface_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/Skin_surface_3.h $ +// $Id: include/CGAL/Skin_surface_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Skin_surface_base_3.h b/thirdparty/CGAL/include/CGAL/Skin_surface_base_3.h index 20a21087..b08d2832 100644 --- a/thirdparty/CGAL/include/CGAL/Skin_surface_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Skin_surface_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/Skin_surface_base_3.h $ -// $Id: Skin_surface_base_3.h 74c029c 2021-09-09T11:44:36+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/Skin_surface_base_3.h $ +// $Id: include/CGAL/Skin_surface_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -42,7 +42,6 @@ #include -#include #include namespace CGAL { @@ -655,8 +654,8 @@ locate_in_tmc(const Bare_point &p0, TMC_Cell_handle start) const if (start->has_vertex(_tmc.infinite_vertex(), ind_inf) ) start = start->neighbor(ind_inf); - CGAL_triangulation_precondition(start != TMC_Cell_handle()); - CGAL_triangulation_precondition(!start->has_vertex(_tmc.infinite_vertex())); + CGAL_precondition(start != TMC_Cell_handle()); + CGAL_precondition(!start->has_vertex(_tmc.infinite_vertex())); // We implement the remembering visibility/stochastic walk. diff --git a/thirdparty/CGAL/include/CGAL/Skin_surface_filtered_traits_3.h b/thirdparty/CGAL/include/CGAL/Skin_surface_filtered_traits_3.h index c82b33d7..8e29b322 100644 --- a/thirdparty/CGAL/include/CGAL/Skin_surface_filtered_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Skin_surface_filtered_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/Skin_surface_filtered_traits_3.h $ -// $Id: Skin_surface_filtered_traits_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/Skin_surface_filtered_traits_3.h $ +// $Id: include/CGAL/Skin_surface_filtered_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Skin_surface_marching_tetrahedra_observer_3.h b/thirdparty/CGAL/include/CGAL/Skin_surface_marching_tetrahedra_observer_3.h index 6524f38e..5fe721d4 100644 --- a/thirdparty/CGAL/include/CGAL/Skin_surface_marching_tetrahedra_observer_3.h +++ b/thirdparty/CGAL/include/CGAL/Skin_surface_marching_tetrahedra_observer_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/Skin_surface_marching_tetrahedra_observer_3.h $ -// $Id: Skin_surface_marching_tetrahedra_observer_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/Skin_surface_marching_tetrahedra_observer_3.h $ +// $Id: include/CGAL/Skin_surface_marching_tetrahedra_observer_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Skin_surface_polyhedral_items_3.h b/thirdparty/CGAL/include/CGAL/Skin_surface_polyhedral_items_3.h index 73c82d18..b8637c0c 100644 --- a/thirdparty/CGAL/include/CGAL/Skin_surface_polyhedral_items_3.h +++ b/thirdparty/CGAL/include/CGAL/Skin_surface_polyhedral_items_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/Skin_surface_polyhedral_items_3.h $ -// $Id: Skin_surface_polyhedral_items_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/Skin_surface_polyhedral_items_3.h $ +// $Id: include/CGAL/Skin_surface_polyhedral_items_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Skin_surface_polyhedral_items_with_face_information.h b/thirdparty/CGAL/include/CGAL/Skin_surface_polyhedral_items_with_face_information.h index f07b7f41..5ccc9af5 100644 --- a/thirdparty/CGAL/include/CGAL/Skin_surface_polyhedral_items_with_face_information.h +++ b/thirdparty/CGAL/include/CGAL/Skin_surface_polyhedral_items_with_face_information.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/Skin_surface_polyhedral_items_with_face_information.h $ -// $Id: Skin_surface_polyhedral_items_with_face_information.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/Skin_surface_polyhedral_items_with_face_information.h $ +// $Id: include/CGAL/Skin_surface_polyhedral_items_with_face_information.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Skin_surface_quadratic_surface_3.h b/thirdparty/CGAL/include/CGAL/Skin_surface_quadratic_surface_3.h index bdfc801b..0b1870f8 100644 --- a/thirdparty/CGAL/include/CGAL/Skin_surface_quadratic_surface_3.h +++ b/thirdparty/CGAL/include/CGAL/Skin_surface_quadratic_surface_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/Skin_surface_quadratic_surface_3.h $ -// $Id: Skin_surface_quadratic_surface_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/Skin_surface_quadratic_surface_3.h $ +// $Id: include/CGAL/Skin_surface_quadratic_surface_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Skin_surface_refinement_policy_3.h b/thirdparty/CGAL/include/CGAL/Skin_surface_refinement_policy_3.h index 61de68f4..d7fe42dd 100644 --- a/thirdparty/CGAL/include/CGAL/Skin_surface_refinement_policy_3.h +++ b/thirdparty/CGAL/include/CGAL/Skin_surface_refinement_policy_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/Skin_surface_refinement_policy_3.h $ -// $Id: Skin_surface_refinement_policy_3.h 0d28171 2021-06-23T17:40:25+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/Skin_surface_refinement_policy_3.h $ +// $Id: include/CGAL/Skin_surface_refinement_policy_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Skin_surface_traits_3.h b/thirdparty/CGAL/include/CGAL/Skin_surface_traits_3.h index cfeaa01f..0562f1b7 100644 --- a/thirdparty/CGAL/include/CGAL/Skin_surface_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Skin_surface_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/Skin_surface_traits_3.h $ -// $Id: Skin_surface_traits_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/Skin_surface_traits_3.h $ +// $Id: include/CGAL/Skin_surface_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Skiplist.h b/thirdparty/CGAL/include/CGAL/Skiplist.h index 4239086e..feb5fc87 100644 --- a/thirdparty/CGAL/include/CGAL/Skiplist.h +++ b/thirdparty/CGAL/include/CGAL/Skiplist.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Skiplist.h $ -// $Id: Skiplist.h 34ad804 2022-06-16T14:46:36+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Skiplist.h $ +// $Id: include/CGAL/Skiplist.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Philipp Moeller diff --git a/thirdparty/CGAL/include/CGAL/Small_side_angle_bisector_decomposition_2.h b/thirdparty/CGAL/include/CGAL/Small_side_angle_bisector_decomposition_2.h index 8b4c2e94..ae23d6e2 100644 --- a/thirdparty/CGAL/include/CGAL/Small_side_angle_bisector_decomposition_2.h +++ b/thirdparty/CGAL/include/CGAL/Small_side_angle_bisector_decomposition_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/Small_side_angle_bisector_decomposition_2.h $ -// $Id: Small_side_angle_bisector_decomposition_2.h 414103f 2022-02-21T17:17:34+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/Small_side_angle_bisector_decomposition_2.h $ +// $Id: include/CGAL/Small_side_angle_bisector_decomposition_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein @@ -94,7 +94,7 @@ class Small_side_angle_bisector_decomposition_2 { typedef std::vector Point_vector_2; const Kernel* m_kernel; - bool m_own_kernel; // inidicates whether the kernel should be freed up. + bool m_own_kernel; // indicates whether the kernel should be freed up. // Data members: Equal_2 f_equal; @@ -256,7 +256,7 @@ class Small_side_angle_bisector_decomposition_2 { private: - /*! Return the succesive index of a 'point info' vector. */ + /*! Return the successive index of a 'point info' vector. */ inline unsigned int _vec_succ(const Point_vector_2& vec, unsigned int i) const { @@ -357,7 +357,7 @@ class Small_side_angle_bisector_decomposition_2 { { CGAL_precondition(vec[v_ind].is_reflex); - // Check whether the visiblity status is already known. + // Check whether the visibility status is already known. if (vec[v_ind].is_visible(u_ind)) return (true); if (vec[v_ind].is_non_visible(u_ind)) return (false); diff --git a/thirdparty/CGAL/include/CGAL/Small_unordered_map.h b/thirdparty/CGAL/include/CGAL/Small_unordered_map.h index 71422644..11a2fc23 100644 --- a/thirdparty/CGAL/include/CGAL/Small_unordered_map.h +++ b/thirdparty/CGAL/include/CGAL/Small_unordered_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Small_unordered_map.h $ -// $Id: Small_unordered_map.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Small_unordered_map.h $ +// $Id: include/CGAL/Small_unordered_map.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/Small_unordered_set.h b/thirdparty/CGAL/include/CGAL/Small_unordered_set.h index 8eacc296..86f29dfd 100644 --- a/thirdparty/CGAL/include/CGAL/Small_unordered_set.h +++ b/thirdparty/CGAL/include/CGAL/Small_unordered_set.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Small_unordered_set.h $ -// $Id: Small_unordered_set.h b51be55 2020-08-12T12:50:10+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Small_unordered_set.h $ +// $Id: include/CGAL/Small_unordered_set.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -33,7 +33,7 @@ namespace CGAL unicity test is done element by element, in linear time - when the number of elements exceed MaxSize, a - `std::unordered_set` is instanciated, all the elements of the + `std::unordered_set` is instantiated, all the elements of the array are inserted in it and from that point the container behaves like a `std::unordered_set` diff --git a/thirdparty/CGAL/include/CGAL/Snap_rounding_2.h b/thirdparty/CGAL/include/CGAL/Snap_rounding_2.h index ca6fc18f..63d4e7e9 100644 --- a/thirdparty/CGAL/include/CGAL/Snap_rounding_2.h +++ b/thirdparty/CGAL/include/CGAL/Snap_rounding_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Snap_rounding_2/include/CGAL/Snap_rounding_2.h $ -// $Id: Snap_rounding_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Snap_rounding_2/include/CGAL/Snap_rounding_2.h $ +// $Id: include/CGAL/Snap_rounding_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Snap_rounding_kd_2.h b/thirdparty/CGAL/include/CGAL/Snap_rounding_kd_2.h index e6e6d293..bc80c3a9 100644 --- a/thirdparty/CGAL/include/CGAL/Snap_rounding_kd_2.h +++ b/thirdparty/CGAL/include/CGAL/Snap_rounding_kd_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h $ -// $Id: Snap_rounding_kd_2.h 3c7eb2c 2020-01-07T15:31:07+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h $ +// $Id: include/CGAL/Snap_rounding_kd_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,6 @@ #include #include -#include #include #include #include @@ -27,8 +26,6 @@ #include #include -#include - #include #include #include @@ -108,7 +105,7 @@ class Search_traits_kd_tree_2 { template class Multiple_kd_tree { - CGAL_static_assertion_msg((boost::is_pointer::value), "SAVED_OBJECT is not a pointer."); + static_assert(std::is_pointer::value, "SAVED_OBJECT is not a pointer."); private: typedef Traits_ Traits; typedef typename Traits::FT NT; @@ -411,7 +408,7 @@ class Multiple_kd_tree { int * kd_counter = new int[number_of_trees]; std::size_t number_of_segments = seg_list.size(); - // auxilary directions + // auxiliary directions Direction_list directions; double buffer_angle; Line_2 li; diff --git a/thirdparty/CGAL/include/CGAL/Snap_rounding_traits_2.h b/thirdparty/CGAL/include/CGAL/Snap_rounding_traits_2.h index d5e48836..84d180fd 100644 --- a/thirdparty/CGAL/include/CGAL/Snap_rounding_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Snap_rounding_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Snap_rounding_2/include/CGAL/Snap_rounding_traits_2.h $ -// $Id: Snap_rounding_traits_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Snap_rounding_2/include/CGAL/Snap_rounding_traits_2.h $ +// $Id: include/CGAL/Snap_rounding_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Sorted_matrix_search_traits_adaptor.h b/thirdparty/CGAL/include/CGAL/Sorted_matrix_search_traits_adaptor.h index ae42fd72..a43544ec 100644 --- a/thirdparty/CGAL/include/CGAL/Sorted_matrix_search_traits_adaptor.h +++ b/thirdparty/CGAL/include/CGAL/Sorted_matrix_search_traits_adaptor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Matrix_search/include/CGAL/Sorted_matrix_search_traits_adaptor.h $ -// $Id: Sorted_matrix_search_traits_adaptor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Matrix_search/include/CGAL/Sorted_matrix_search_traits_adaptor.h $ +// $Id: include/CGAL/Sorted_matrix_search_traits_adaptor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Spatial_lock_grid_3.h b/thirdparty/CGAL/include/CGAL/Spatial_lock_grid_3.h index ce56cd62..7cc59454 100644 --- a/thirdparty/CGAL/include/CGAL/Spatial_lock_grid_3.h +++ b/thirdparty/CGAL/include/CGAL/Spatial_lock_grid_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Spatial_lock_grid_3.h $ -// $Id: Spatial_lock_grid_3.h 288c283 2021-08-30T19:24:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Spatial_lock_grid_3.h $ +// $Id: include/CGAL/Spatial_lock_grid_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Clement Jamin @@ -209,7 +209,7 @@ class Spatial_lock_grid_base_3 int index_x = static_cast( (CGAL::to_double(point.x()) - m_bbox.xmin()) * m_resolution_x); //index_x = std::max( 0, std::min(index_x, m_num_grid_cells_per_axis - 1) ); index_x = - (index_x < 0 ? + (index_x < 0 ? /// @TODO: use std::clamp 0 : (index_x >= m_num_grid_cells_per_axis ? m_num_grid_cells_per_axis - 1 @@ -556,7 +556,7 @@ class Spatial_lock_grid_3 } else if (old_value > this_thread_priority) { - // Another "more prioritary" thread owns the lock, we back off + // Another "more priority" thread owns the lock, we back off return false; } else diff --git a/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/Get_dimension_tag.h b/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/Get_dimension_tag.h index c62421b1..7a361d08 100644 --- a/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/Get_dimension_tag.h +++ b/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/Get_dimension_tag.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Spatial_searching/internal/Get_dimension_tag.h $ -// $Id: Get_dimension_tag.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Spatial_searching/internal/Get_dimension_tag.h $ +// $Id: include/CGAL/Spatial_searching/internal/Get_dimension_tag.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/K_neighbor_search.h b/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/K_neighbor_search.h index 061b1ab5..086ad9f0 100644 --- a/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/K_neighbor_search.h +++ b/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/K_neighbor_search.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Spatial_searching/internal/K_neighbor_search.h $ -// $Id: K_neighbor_search.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Spatial_searching/internal/K_neighbor_search.h $ +// $Id: include/CGAL/Spatial_searching/internal/K_neighbor_search.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -60,8 +60,8 @@ class K_neighbor_search { public: - Distance_larger(bool search_the_nearest_neighbour) - : search_nearest(search_the_nearest_neighbour) + Distance_larger(bool search_the_nearest_neighbor) + : search_nearest(search_the_nearest_neighbor) {} bool operator()(const Point_ptr_with_transformed_distance& p1, diff --git a/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/Search_helpers.h b/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/Search_helpers.h index 8dd1e3a6..0da03b05 100644 --- a/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/Search_helpers.h +++ b/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/Search_helpers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Spatial_searching/internal/Search_helpers.h $ -// $Id: Search_helpers.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Spatial_searching/internal/Search_helpers.h $ +// $Id: include/CGAL/Spatial_searching/internal/Search_helpers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/bounded_priority_queue.h b/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/bounded_priority_queue.h index d52ba271..a740ced6 100644 --- a/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/bounded_priority_queue.h +++ b/thirdparty/CGAL/include/CGAL/Spatial_searching/internal/bounded_priority_queue.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Spatial_searching/internal/bounded_priority_queue.h $ -// $Id: bounded_priority_queue.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Spatial_searching/internal/bounded_priority_queue.h $ +// $Id: include/CGAL/Spatial_searching/internal/bounded_priority_queue.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,7 +22,6 @@ #include #include #include -#include namespace CGAL { namespace internal{ @@ -124,7 +123,7 @@ class bounded_priority_queue void sort() { -std::sort(m_data.begin(), boost::next(m_data.begin(),m_count), m_comp); +std::sort(m_data.begin(), std::next(m_data.begin(),m_count), m_comp); } protected: diff --git a/thirdparty/CGAL/include/CGAL/Spatial_sort_traits_adapter_2.h b/thirdparty/CGAL/include/CGAL/Spatial_sort_traits_adapter_2.h index ff44a545..1e7921e4 100644 --- a/thirdparty/CGAL/include/CGAL/Spatial_sort_traits_adapter_2.h +++ b/thirdparty/CGAL/include/CGAL/Spatial_sort_traits_adapter_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Spatial_sort_traits_adapter_2.h $ -// $Id: Spatial_sort_traits_adapter_2.h 8a252f1 2022-03-31T07:07:01+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Spatial_sort_traits_adapter_2.h $ +// $Id: include/CGAL/Spatial_sort_traits_adapter_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot diff --git a/thirdparty/CGAL/include/CGAL/Spatial_sort_traits_adapter_3.h b/thirdparty/CGAL/include/CGAL/Spatial_sort_traits_adapter_3.h index 515bb3c1..619364bc 100644 --- a/thirdparty/CGAL/include/CGAL/Spatial_sort_traits_adapter_3.h +++ b/thirdparty/CGAL/include/CGAL/Spatial_sort_traits_adapter_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Spatial_sort_traits_adapter_3.h $ -// $Id: Spatial_sort_traits_adapter_3.h 8a252f1 2022-03-31T07:07:01+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Spatial_sort_traits_adapter_3.h $ +// $Id: include/CGAL/Spatial_sort_traits_adapter_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot diff --git a/thirdparty/CGAL/include/CGAL/Spatial_sort_traits_adapter_d.h b/thirdparty/CGAL/include/CGAL/Spatial_sort_traits_adapter_d.h index 3f7327dc..86b1029d 100644 --- a/thirdparty/CGAL/include/CGAL/Spatial_sort_traits_adapter_d.h +++ b/thirdparty/CGAL/include/CGAL/Spatial_sort_traits_adapter_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Spatial_sort_traits_adapter_d.h $ -// $Id: Spatial_sort_traits_adapter_d.h 8a252f1 2022-03-31T07:07:01+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Spatial_sort_traits_adapter_d.h $ +// $Id: include/CGAL/Spatial_sort_traits_adapter_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot diff --git a/thirdparty/CGAL/include/CGAL/Spatial_sorting/internal/Transform_coordinates_traits_3.h b/thirdparty/CGAL/include/CGAL/Spatial_sorting/internal/Transform_coordinates_traits_3.h index f20e0739..981fd159 100644 --- a/thirdparty/CGAL/include/CGAL/Spatial_sorting/internal/Transform_coordinates_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Spatial_sorting/internal/Transform_coordinates_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/Spatial_sorting/internal/Transform_coordinates_traits_3.h $ -// $Id: Transform_coordinates_traits_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/Spatial_sorting/internal/Transform_coordinates_traits_3.h $ +// $Id: include/CGAL/Spatial_sorting/internal/Transform_coordinates_traits_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/Sphere_3.h b/thirdparty/CGAL/include/CGAL/Sphere_3.h index 85c5a0ed..f711cf92 100644 --- a/thirdparty/CGAL/include/CGAL/Sphere_3.h +++ b/thirdparty/CGAL/include/CGAL/Sphere_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Sphere_3.h $ -// $Id: Sphere_3.h e7357ac 2021-07-19T14:53:27+02:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Sphere_3.h $ +// $Id: include/CGAL/Sphere_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,12 +18,13 @@ #define CGAL_SPHERE_3_H #include -#include #include #include #include #include +#include + namespace CGAL { template @@ -36,7 +37,7 @@ class Sphere_3 : public R_::Kernel_base::Sphere_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Sphere_3 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Spherical_kernel_3.h b/thirdparty/CGAL/include/CGAL/Spherical_kernel_3.h index a87fde74..0edf4207 100644 --- a/thirdparty/CGAL/include/CGAL/Spherical_kernel_3.h +++ b/thirdparty/CGAL/include/CGAL/Spherical_kernel_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Spherical_kernel_3.h $ -// $Id: Spherical_kernel_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Spherical_kernel_3.h $ +// $Id: include/CGAL/Spherical_kernel_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, diff --git a/thirdparty/CGAL/include/CGAL/Spherical_kernel_intersections.h b/thirdparty/CGAL/include/CGAL/Spherical_kernel_intersections.h index 93f0d881..4af70999 100644 --- a/thirdparty/CGAL/include/CGAL/Spherical_kernel_intersections.h +++ b/thirdparty/CGAL/include/CGAL/Spherical_kernel_intersections.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Spherical_kernel_intersections.h $ -// $Id: Spherical_kernel_intersections.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Spherical_kernel_intersections.h $ +// $Id: include/CGAL/Spherical_kernel_intersections.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/Spherical_kernel_type_equality_wrapper.h b/thirdparty/CGAL/include/CGAL/Spherical_kernel_type_equality_wrapper.h index 8aee8a6c..6e41ab6e 100644 --- a/thirdparty/CGAL/include/CGAL/Spherical_kernel_type_equality_wrapper.h +++ b/thirdparty/CGAL/include/CGAL/Spherical_kernel_type_equality_wrapper.h @@ -9,9 +9,9 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/Spherical_kernel_type_equality_wrapper.h $ -// $Id: Spherical_kernel_type_equality_wrapper.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/Spherical_kernel_type_equality_wrapper.h $ +// $Id: include/CGAL/Spherical_kernel_type_equality_wrapper.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud // Sylvain Pion @@ -22,6 +22,9 @@ #ifndef CGAL_SPHERICAL_KERNEL_TYPE_EQUALITY_WRAPPER_H #define CGAL_SPHERICAL_KERNEL_TYPE_EQUALITY_WRAPPER_H +#include + + #include #include #include diff --git a/thirdparty/CGAL/include/CGAL/Splitters.h b/thirdparty/CGAL/include/CGAL/Splitters.h index 25b865a1..1b2a8a5e 100644 --- a/thirdparty/CGAL/include/CGAL/Splitters.h +++ b/thirdparty/CGAL/include/CGAL/Splitters.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Splitters.h $ -// $Id: Splitters.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Splitters.h $ +// $Id: include/CGAL/Splitters.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension.h index 915a31bc..54a75ad7 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension.h $ -// $Id: Sqrt_extension.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension.h $ +// $Id: include/CGAL/Sqrt_extension.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h index aacfd96e..3c7bc954 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h $ -// $Id: Algebraic_extension_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h $ +// $Id: include/CGAL/Sqrt_extension/Algebraic_extension_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h index 862e950e..f6251d31 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h $ -// $Id: Algebraic_structure_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h $ +// $Id: include/CGAL/Sqrt_extension/Algebraic_structure_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -204,10 +204,10 @@ class Algebraic_structure_traits< Sqrt_extension< COEFF_, ROOT_, ACDE_TAG,FP_TAG typedef Sqrt_extension< COEFF_, ROOT_, ACDE_TAG,FP_TAG > Type; // Tag_true if COEFF and ROOT are exact - typedef typename ::boost::mpl::if_c< - bool( ::boost::is_same::Is_exact,::CGAL::Tag_true>::value )&& - bool( ::boost::is_same::Is_exact,::CGAL::Tag_true>::value ) - ,::CGAL::Tag_true,::CGAL::Tag_false>::type Is_exact; + typedef std::conditional_t< + std::is_same_v::Is_exact,::CGAL::Tag_true> && + std::is_same_v::Is_exact,::CGAL::Tag_true> + ,::CGAL::Tag_true,::CGAL::Tag_false> Is_exact; typedef typename Algebraic_structure_traits::Is_numerical_sensitive Is_numerical_sensitive; diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h index 448049af..579acbce 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h $ -// $Id: Chinese_remainder_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h $ +// $Id: include/CGAL/Sqrt_extension/Chinese_remainder_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Coercion_traits.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Coercion_traits.h index e0fe6afd..8f5d18db 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Coercion_traits.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Coercion_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension/Coercion_traits.h $ -// $Id: Coercion_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension/Coercion_traits.h $ +// $Id: include/CGAL/Sqrt_extension/Coercion_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -178,12 +178,12 @@ template struct CT_ext_not_to_fwsqrt; // template struct Coercion_traits_for_level, B , CTL_SQRT_EXT> -:public ::boost::mpl::if_c< +:public std::conditional_t< // if B is fwsqrt ::boost::is_base_and_derived< Field_with_sqrt_tag, typename Algebraic_structure_traits::Algebraic_category >::value || - ::boost::is_same< + ::std::is_same< Field_with_sqrt_tag, typename Algebraic_structure_traits::Algebraic_category >::value , @@ -192,7 +192,7 @@ typename Algebraic_structure_traits::Algebraic_category >::value , //else take Intern::Coercion_traits not for fwsqrt INTERN_CT::CT_ext_not_to_fwsqrt< Sqrt_extension ,B> - >::type + > {}; // diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Eigen_NumTraits.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Eigen_NumTraits.h index 2cfa8125..45c18811 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Eigen_NumTraits.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Eigen_NumTraits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension/Eigen_NumTraits.h $ -// $Id: Eigen_NumTraits.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension/Eigen_NumTraits.h $ +// $Id: include/CGAL/Sqrt_extension/Eigen_NumTraits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Fraction_traits.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Fraction_traits.h index 277ca6c0..c475401c 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Fraction_traits.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Fraction_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension/Fraction_traits.h $ -// $Id: Fraction_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension/Fraction_traits.h $ +// $Id: include/CGAL/Sqrt_extension/Fraction_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,11 +24,11 @@ namespace CGAL { //################################# CGAL::Fraction_traits ################## // Select the right alternative as Fraction_traits // The actual Type traits is Intern::Sqrt_ext_Ftr_base_2 -// The selction is done in two steps: +// The selection is done in two steps: // 1. Inter::Sqrt_ext_Ftr_base_1 selects by the BOOL_TAG whether the COEFF type // Is_fraction // 2. Intern::Sqrt_ext_Ftr_base_2 checks whether the internal type of the ROOT -// is still implicite convertible to the new COEFF type. +// is still implicitly convertible to the new COEFF type. // since the ROOT type it self can not be converted. namespace Intern{ template class Sqrt_ext_Ftr_base_2; @@ -41,9 +41,9 @@ namespace Intern{ * * Extensions provide suitable specializations of \c CGAL::Fraction_traits. * They are decomposable iff their coefficient type is. - * The denominator \e d of a Extension \e ext is a low common multiple + * The denominator \e d of an extension \e ext is a low common multiple * (see \c CGAL::Fraction_traits::Common_factor for details) of the - * denominators of its coefficients. The numerator is the Extenion + * denominators of its coefficients. The numerator is the extenion * \e d*ext with a fraction-free coefficient type. * * This works for nested Sqrt_extensions, too. @@ -147,7 +147,7 @@ template class Sqrt_ext_Ftr_base_1< Sqrt_extension, CGAL::Tag_true > : public Sqrt_ext_Ftr_base_2< Sqrt_extension, - ::boost::is_same< typename CGAL::Coercion_traits::Numerator_type>::Type, + ::std::is_same< typename CGAL::Coercion_traits::Numerator_type>::Type, typename CGAL::Fraction_traits::Numerator_type>::value > { //nothing new diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Get_arithmetic_kernel.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Get_arithmetic_kernel.h index 5f256862..09f731a7 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Get_arithmetic_kernel.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Get_arithmetic_kernel.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension/Get_arithmetic_kernel.h $ -// $Id: Get_arithmetic_kernel.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension/Get_arithmetic_kernel.h $ +// $Id: include/CGAL/Sqrt_extension/Get_arithmetic_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Modular_traits.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Modular_traits.h index 81f0b396..684d239c 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Modular_traits.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Modular_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension/Modular_traits.h $ -// $Id: Modular_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension/Modular_traits.h $ +// $Id: include/CGAL/Sqrt_extension/Modular_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Real_embeddable_traits.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Real_embeddable_traits.h index 190f2001..1d83f858 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Real_embeddable_traits.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Real_embeddable_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension/Real_embeddable_traits.h $ -// $Id: Real_embeddable_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension/Real_embeddable_traits.h $ +// $Id: include/CGAL/Sqrt_extension/Real_embeddable_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Scalar_factor_traits.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Scalar_factor_traits.h index b7df520d..24e3f413 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Scalar_factor_traits.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Scalar_factor_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension/Scalar_factor_traits.h $ -// $Id: Scalar_factor_traits.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension/Scalar_factor_traits.h $ +// $Id: include/CGAL/Sqrt_extension/Scalar_factor_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Sqrt_extension_type.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Sqrt_extension_type.h index a48166a9..d626e509 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Sqrt_extension_type.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Sqrt_extension_type.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h $ -// $Id: Sqrt_extension_type.h 0d66e19 2020-07-24T17:05:10+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h $ +// $Id: include/CGAL/Sqrt_extension/Sqrt_extension_type.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -32,10 +32,11 @@ #include #include #include -#include -#include +#include #include +#include + #define CGAL_int(T) typename First_if_different::Type namespace CGAL { @@ -91,7 +92,7 @@ template <> class Interval_optional_caching< ::CGAL::Tag_true > { protected: - typedef boost::optional< std::pair > Cached_interval; + typedef std::optional< std::pair > Cached_interval; mutable Cached_interval interval_; void invalidate_interval() {interval_=Cached_interval();} bool is_cached() const {return (interval_?true:false);} @@ -177,10 +178,10 @@ class Sqrt_extension : public internal::Interval_optional_caching, */ template explicit Sqrt_extension(const NTX& a, const NTX& b, const NTX& c, const bool is_smaller, - typename boost::enable_if< boost::mpl::and_< - boost::is_same< typename Fraction_traits::Numerator_type,NTX >, - boost::is_same< typename Fraction_traits::Numerator_type,NTX > - > >::type* = 0 ) + std::enable_if_t< + std::is_same_v< typename Fraction_traits::Numerator_type,NTX > && + std::is_same_v< typename Fraction_traits::Numerator_type,NTX > + >* = 0 ) { typename Fraction_traits::Compose compose_nt; typename Fraction_traits::Compose compose_root; @@ -228,7 +229,7 @@ class Sqrt_extension : public internal::Interval_optional_caching, //! Access operator for is_extended_, \c const inline const bool& is_extended() const { return is_extended_; } inline bool is_rational() const { - CGAL_precondition( (boost::is_same::value) || !"NT and ROOT should be identical and rational"); + CGAL_precondition( (std::is_same::value) || !"NT and ROOT should be identical and rational"); return !is_extended_;} //for backward compatibility //!check if the number is an extension (test the values) and update the internal flag @@ -594,7 +595,7 @@ CGAL::Comparison_result sign_right = ZERO; } - // Check whether on of the terms is zero. In this case, the comparsion + // Check whether on of the terms is zero. In this case, the comparison // result is simpler: if (sign_left == ZERO) { @@ -627,7 +628,7 @@ CGAL::Comparison_result // We now square both terms and look at the sign of the one-root number: // ((a1 - a2)^2 - (b12*c1 + b22*c2)) + 2*b1*b2*sqrt(c1*c2) // - // If both signs are negative, we should swap the comparsion result + // If both signs are negative, we should swap the comparison result // we eventually compute. const NT A = diff_a0*diff_a0 - (x_sqr + y_sqr); const NT B = 2 * a1_ * y.a1_; @@ -661,10 +662,6 @@ CGAL::Comparison_result // NT friend bool operator == (const Sqrt_extension& p, const NT& num) { return (p-num).is_zero();} - friend bool operator < (const Sqrt_extension& p, const NT& num) - { return ( p.compare(num) == CGAL::SMALLER ); } - friend bool operator > (const Sqrt_extension& p, const NT& num) - { return ( p.compare(num) == CGAL::LARGER ); } //CGAL_int(NT) friend bool operator == (const Sqrt_extension& p, CGAL_int(NT) num) @@ -675,6 +672,19 @@ CGAL::Comparison_result { return ( p.compare(num) == CGAL::LARGER ); } }; +// The two operators are moved out of the class scope (where they were friends) +// in order to work around a VC2017 compilation problem +template +bool operator < (const Sqrt_extension& p, const NT& num) +{ + return (p.compare(num) == CGAL::SMALLER); +} + +template +bool operator > (const Sqrt_extension& p, const NT& num) +{ + return (p.compare(num) == CGAL::LARGER); +} /*! * Compute the square of a one-root number. */ diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Wang_traits.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Wang_traits.h index e2b08d8d..b5e3c032 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension/Wang_traits.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension/Wang_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension/Wang_traits.h $ -// $Id: Wang_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension/Wang_traits.h $ +// $Id: include/CGAL/Sqrt_extension/Wang_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension/convert_to_bfi.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension/convert_to_bfi.h index b67db7a7..8e1d0e02 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension/convert_to_bfi.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension/convert_to_bfi.h @@ -3,14 +3,14 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension/convert_to_bfi.h $ -// $Id: convert_to_bfi.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension/convert_to_bfi.h $ +// $Id: include/CGAL/Sqrt_extension/convert_to_bfi.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Michael Hemmer -// This files adds an optional static cache to convert_to_bfi for Sqrt_extension +// This file adds an optional static cache to convert_to_bfi for Sqrt_extension #ifndef CGAL_SQRT_EXTENSION_CONVERT_TO_BFI_H #define CGAL_SQRT_EXTENSION_CONVERT_TO_BFI_H @@ -23,7 +23,7 @@ #include -// Disbale SQRT_EXTENSION_TO_BFI_CACHE by default +// Disable SQRT_EXTENSION_TO_BFI_CACHE by default #ifndef CGAL_USE_SQRT_EXTENSION_TO_BFI_CACHE #define CGAL_USE_SQRT_EXTENSION_TO_BFI_CACHE 0 #endif diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension/io.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension/io.h index 70f3a5be..45b50c41 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension/io.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension/io.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension/io.h $ -// $Id: io.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension/io.h $ +// $Id: include/CGAL/Sqrt_extension/io.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Sqrt_extension_fwd.h b/thirdparty/CGAL/include/CGAL/Sqrt_extension_fwd.h index d7bfa6e9..d843d605 100644 --- a/thirdparty/CGAL/include/CGAL/Sqrt_extension_fwd.h +++ b/thirdparty/CGAL/include/CGAL/Sqrt_extension_fwd.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/Sqrt_extension_fwd.h $ -// $Id: Sqrt_extension_fwd.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/Sqrt_extension_fwd.h $ +// $Id: include/CGAL/Sqrt_extension_fwd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Static_filtered_predicate.h b/thirdparty/CGAL/include/CGAL/Static_filtered_predicate.h index 27b8c555..339fa0f2 100644 --- a/thirdparty/CGAL/include/CGAL/Static_filtered_predicate.h +++ b/thirdparty/CGAL/include/CGAL/Static_filtered_predicate.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Filtered_kernel/include/CGAL/Static_filtered_predicate.h $ -// $Id: Static_filtered_predicate.h c4b8c37 2022-03-11T10:21:51+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Filtered_kernel/include/CGAL/Static_filtered_predicate.h $ +// $Id: include/CGAL/Static_filtered_predicate.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri, Laurent Rineau diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2.h index 9ded2970..078b1cf9 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_2.h $ -// $Id: Straight_skeleton_2.h 7513752 2020-10-05T18:35:08+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_2.h $ +// $Id: include/CGAL/Straight_skeleton_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -92,20 +92,20 @@ private : public : - static int id ( Vertex_const_handle h ) + static int id ( Vertex_const_handle v ) { Vertex_const_handle null ; - return h != null ? h->id() : -1 ; + return v != null ? v->id() : -1 ; } static int id ( Halfedge_const_handle h ) { Halfedge_const_handle null ; return h != null ? h->id() : -1 ; } - static int id ( Face_const_handle h ) + static int id ( Face_const_handle f ) { Face_const_handle null ; - return h != null ? 0 : -1 ; + return f != null ? f->id() : -1 ; } // Partial skeletons are used when constructing offsets, to avoid building larger-than-needed skeletons. @@ -213,7 +213,7 @@ public : if ( begin->is_border()) ++nb; } - CGAL_STSKEL_VALIDITY_TRACE("summe border halfedges (2*nb) = " << 2 * nb ); + CGAL_STSKEL_VALIDITY_TRACE("sum of border halfedges (2*nb) = " << 2 * nb ); bool nvalid = ( n == this->size_of_halfedges()); @@ -272,7 +272,9 @@ public : Halfedge_const_handle g = h; do { - CGAL_STSKEL_VALIDITY_TRACE(" v->halfedge(): " << id(h) << ", ->next(): " << id(h->next()) + CGAL_STSKEL_VALIDITY_TRACE(" v->halfedge(): " << id(h) + << ", ->face(): " << id(h->face()) + << ", ->next(): " << id(h->next()) << ", ->next()->opposite(): " << id(h->next()->opposite()) ); ++n; @@ -336,7 +338,7 @@ public : Halfedge_const_handle g = h; do { - CGAL_STSKEL_VALIDITY_TRACE(" f->halfedge():" << id(h) << ", ->next(): " << id(h->next())); + CGAL_STSKEL_VALIDITY_TRACE(" f->halfedge(): " << id(h) << ", ->face(): " << id(h->face()) << ", ->next(): " << id(h->next())); ++n; h = h->next(); valid = valid && ( n <= this->size_of_halfedges() && n!=0); diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/IO/Dxf_stream.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/IO/Dxf_stream.h new file mode 100644 index 00000000..695e1b89 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/IO/Dxf_stream.h @@ -0,0 +1,321 @@ +// Copyright (c) 2007 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/IO/Dxf_stream.h $ +// $Id: include/CGAL/Straight_skeleton_2/IO/Dxf_stream.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Fernando Cacciola +// +// Descriptions of the file format can be found at +// https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf + +#ifndef CGAL_DXF_STREAM_H +#define CGAL_DXF_STREAM_H + +#include + + +#include +#include + +#include + +#include +#include +#include + +namespace CGAL { + +class Dxf_layer +{ +public: + + Dxf_layer( std::string aStr ) : mStr(aStr) {} + + std::string str() const { return mStr ; } + +private: + + std::string mStr ; +} ; + +template +class Dxf_stream +{ +public: + + typedef Kernel_ Kernel; + + // Define the kernel objects. + typedef typename Kernel::FT NT; + typedef typename Kernel::Point_2 Point_2; + typedef typename Kernel::Segment_2 Segment_2; + typedef typename Kernel::Ray_2 Ray_2; + typedef typename Kernel::Line_2 Line_2; + typedef typename Kernel::Triangle_2 Triangle_2; + typedef typename Kernel::Iso_rectangle_2 Iso_rectangle_2; + typedef CGAL::Polygon_2 Polygon_2; + typedef typename Kernel::Circle_2 Circle_2; + +protected: + + // Data members: + Dxf_writer mWriter ; + int mDefaultDxfColor; + int mDxfColor; + IO::Color mCgalColor ; + std::string mLayer ; + + struct Color_less + { + bool operator() ( IO::Color const& a, IO::Color const& b ) const + { + return Color_value(a) < Color_value(b); + } + + static int Color_value ( IO::Color const& c ) + { + return ( int(c.r()) << 16 ) + ( int(c.g()) << 8 ) + ( int(c.b()) ) ; + } + } ; + + typedef std::map Color_table ; + typedef typename Color_table::const_iterator Color_table_iterator ; + Color_table mColorTable ; + +private: + + // Copy constructor and assignment operator - not supported. + Dxf_stream (const Dxf_stream& ); + const Dxf_stream& operator= (const Dxf_stream& ); + +public: + + /// \name Constructors and destructor. + //@{ + + /*! + * Constructor. + * \param filename The name of the output FIG file. + */ + Dxf_stream ( std::ostream& out ) + : + mWriter (out) + ,mDefaultDxfColor (255) + ,mDxfColor (255) + ,mCgalColor (IO::white()) + ,mLayer ("0") + { + setup_initial_color_table(); + } + + /*! + * Destructor. + */ + virtual ~Dxf_stream () {} + //@} + + /// \name Accessing drawing properties. + //@{ + + /*! + * Get the current layer. + */ + std::string layer() const { return mLayer ; } + + /*! + * Get the current CGAL color. + */ + IO::Color color () const { return mCgalColor ; } + + /*! + * Get the current DXF color. + */ + int dxf_color () const { return mDxfColor ; } + + /*! + * Get the current DXF color. + */ + int default_dxf_color () const { return mDefaultDxfColor ; } + + // @} + + /// \name Set the drawing properties. + //@{ + + /*! + * Set the current layer. + */ + void set_layer ( std::string aLayer ) { mLayer = aLayer ; } + + /*! + * Set the current color. + * \pre The color must be defined. + */ + void set_color ( IO::Color aColor ) + { + mCgalColor = aColor ; + + Color_table_iterator f = mColorTable.find(aColor); + if ( f != mColorTable.end() ) + mDxfColor = f->second ; + else mDxfColor = mDefaultDxfColor ; + } + + + /*! + * Sets the default DXF color in case a CGAL color is unmapped. + * \param aDxfColor The default DXF color. + */ + void define_default_dxf_color ( int aDxfColor ) + { + mDefaultDxfColor = aDxfColor ; + } + + /*! + * Adds a mapping between a CGAL Color and a DXF color. + * \param aCgalColor The CGAL color. + * \param aDxfColor The DXF color. + */ + void define_color ( IO::Color const& aCgalColor, int aDxfColor ) + { + mColorTable.insert( std::make_pair(aCgalColor,aDxfColor) ) ; + } + + //@} + + /// \name Writing objects. + //@{ + + /*! + * Write a 2D segment. + */ + void write_segment_2 (const Segment_2& seg) + { + mWriter.add_segment_2( seg.source(), seg.target(), mLayer, mDxfColor ) ; + } + + + /*! + * Write a 2D polyline. + * \param begin An iterator of the control points (of type Point_2). + * \param end A past-the-end iterator for the control points. + */ + template + void write_polyline_2 (const Input_iterator& begin, const Input_iterator& end) + { + mWriter.add_polyline_2( begin, end, false, mLayer, mDxfColor ) ; + } + + /*! + * Write a 2D polygon (there is an added segment between the last vertex and the first) + * \param begin An iterator of the control points (of type Point_2). + * \param end A past-the-end iterator for the control points. + */ + template + void write_polygon_2 (const Input_iterator& begin, const Input_iterator& end) + { + mWriter.add_polyline_2( begin, end, true, mLayer, mDxfColor ) ; + } + + /*! + * Write a 2D polyline but as a sequence of line segments + * \param begin An iterator of the control points (of type Point_2). + * \param end A past-the-end iterator for the control points. + */ + template + void write_open_segment_chain_2 (const Input_iterator& begin, const Input_iterator& end) + { + mWriter.add_segments_2( begin, end, false, mLayer, mDxfColor ) ; + } + + /*! + * Write a 2D closed polyline but as a sequence of line segments + * \param begin An iterator of the control points (of type Point_2). + * \param end A past-the-end iterator for the control points. + */ + template + void write_closed_segment_chain_2 (const Input_iterator& begin, const Input_iterator& end) + { + mWriter.add_segments_2( begin, end, true, mLayer, mDxfColor ) ; + } + + /*! + * Write a 2D (closed) polygon. + */ + void write_polygon (const Polygon_2& pgn) + { + mWriter.add_polyline_2( pgn.begin(), pgn.end(), true, mLayer, mDxfColor ) ; + } + + //@} + + /// \name Setting the draw properties via the << operator. + //@{ + + /*! + * Set the current layer. + */ + Dxf_stream& operator<< ( Dxf_layer const& aLayer ) + { + set_layer ( aLayer.str() ); + return (*this); + } + + /*! + * Set the current color. + */ + Dxf_stream& operator<< ( IO::Color const& aColor ) + { + set_color (aColor); + return (*this); + } + + //@} + + /// \name Drawing objects via the << operator. + //@{ + + /*! + * Write a line segment. + */ + Dxf_stream& operator<< (const Segment_2& seg) + { + write_segment_2 (seg); + return (*this); + } + + /*! + * Write a polygon. + */ + Dxf_stream& operator<< (const Polygon_2& pgn) + { + write_polygon_2 (pgn); + return (*this); + } + + //@} + +protected: + + void setup_initial_color_table() + { + define_color(IO::black(),0); + define_color(IO::red(),1); + define_color(IO::yellow(),2); + define_color(IO::green(),3); + define_color(IO::purple(),4); + define_color(IO::blue(),5); + define_color(IO::violet(),6); + define_color(IO::white(),7); + define_color(IO::gray(),8); + } + +}; + +} // end namespace CGAL + +#endif diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/IO/Dxf_writer.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/IO/Dxf_writer.h new file mode 100644 index 00000000..75c4daa7 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/IO/Dxf_writer.h @@ -0,0 +1,283 @@ +// Copyright (c) 2007 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/IO/Dxf_writer.h $ +// $Id: include/CGAL/Straight_skeleton_2/IO/Dxf_writer.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Fernando Cacciola +// +// Description of the file format can be found at the following address: +// https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf + +#ifndef CGAL_IO_DXF_WRITER_H +#define CGAL_IO_DXF_WRITER_H + +#include + + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace CGAL { + +class Dxf_writer +{ + typedef std::list Lines ; + typedef Lines::iterator Line_iterator ; + + typedef std::set Layers ; + typedef Layers::iterator Layer_iterator ; + +public: + + Dxf_writer ( std::ostream& out ) : mOut(out), mHandle(32) + { + mPos = mLines.end(); + add_header(); + } + + ~Dxf_writer() + { + add_footer(); + dump(); + } + + template + void add_segment_2 ( XY const& aSrc + , XY const& aTgt + , std::string aLayer = "" + , int aColor = 255 + ) + { + add_entity ( "LINE" , aLayer ) ; + add_code ( 62 , to_str ( aColor ) ) ; + add_code ( 10 , to_str ( to_double(aSrc.x()) ) ) ; + add_code ( 20 , to_str ( to_double(aSrc.y()) ) ) ; + add_code ( 30 , to_str ( to_double(0.0 ) ) ) ; + add_code ( 11 , to_str ( to_double(aTgt.x()) ) ) ; + add_code ( 21 , to_str ( to_double(aTgt.y()) ) ) ; + add_code ( 31 , to_str ( to_double(0.0 ) ) ) ; + } + + + template + void add_polyline_2 ( XY_Iterator aVerticesBegin + , XY_Iterator aVerticesEnd + , bool aIsClosed + , std::string aLayer = "" + , int aColor = 255 + ) + { + if ( aVerticesBegin < aVerticesEnd ) + { + add_entity ( "POLYLINE" , aLayer) ; + add_code ( 62 , to_str ( aColor ) ) ; + add_code ( 66 , to_str ( 1 ) ) ; + add_code ( 10 , to_str ( 0.0 ) ) ; + add_code ( 20 , to_str ( 0.0 ) ) ; + add_code ( 30 , to_str ( 0.0 ) ) ; + add_code ( 70 , to_str ( aIsClosed ? 1 : 0 ) ) ; + + while ( aVerticesBegin != aVerticesEnd ) + { + add_entity ( "VERTEX" , aLayer) ; + add_code ( 10 , to_str ( to_double( aVerticesBegin->x() ) ) ) ; + add_code ( 20 , to_str ( to_double( aVerticesBegin->y() ) ) ) ; + add_code ( 30 , to_str ( to_double( 0.0 ) ) ) ; + ++ aVerticesBegin ; + } + + add_entity ( "SEQEND" , aLayer) ; + } + } + + template + void add_segments_2 ( XY_Iterator aVerticesBegin + , XY_Iterator aVerticesEnd + , bool aIsClosed + , std::string aLayer = "" + , int aColor = 255 + ) + { + if ( aVerticesBegin < aVerticesEnd ) + { + XY_Iterator lFirstVertex = aVerticesBegin ; + XY_Iterator lLastVertex = aVerticesEnd ; -- lLastVertex ; + + if ( lFirstVertex != lLastVertex ) + { + XY_Iterator lCurrVertex = aVerticesBegin ; + + while ( lCurrVertex != aVerticesEnd ) + { + XY_Iterator lNextVertex = ( lCurrVertex == lLastVertex ? lFirstVertex : std::next(lCurrVertex) ) ; + + add_segment_2 ( *lCurrVertex, *lNextVertex, aLayer, aColor ) ; + + ++ lCurrVertex ; + } + + if ( aIsClosed ) + add_segment_2 ( *lLastVertex, *lFirstVertex, aLayer, aColor ) ; + } + } + + } + +private: + + std::string get_entity_handle() + { + std::ostringstream oss; + oss << boost::format("%5x") % mHandle++; + return oss.str(); + } + + std::string to_str ( int aN ) + { + std::ostringstream oss; + oss << boost::format("%6d") % aN; + return oss.str(); + } + + + std::string to_str ( double aN ) + { + std::ostringstream oss; + oss << boost::format("%6.6f") % aN; + return oss.str(); + } + + void insert_line ( Line_iterator aPos, std::string aLine ) + { + mLines.insert(aPos,aLine); + } + + void add_line ( std::string aLine ) + { + insert_line(mPos,aLine); + } + + void add_code ( int aCode, std::string aValue ) + { + add_line( to_str(aCode) ) ; + add_line( aValue ) ; + } + + void add_group_begin ( std::string aGroup, std::string aName ) + { + add_code ( 0 , aGroup ) ; + add_code ( 2 , aName ) ; + } + + void add_group_end ( std::string aGroup ) + { + add_code ( 0 , aGroup ) ; + } + + void add_entity ( std::string aName, std::string aLayer ) + { + add_code ( 0 , aName ) ; + add_code ( 5 , get_entity_handle() ) ; + + if ( !aLayer.empty() && aLayer != "0" ) + { + mLayers.insert(aLayer); + add_code ( 8 , aLayer ) ; + } + } + + void add_header() + { + add_group_begin ( "SECTION" , "HEADER" ) ; + add_group_end ( "ENDSEC" ) ; + + add_group_begin ( "SECTION" , "TABLES" ) ; + add_group_begin ( "TABLE" , "LTYPE" ) ; + add_code ( 70 , to_str ( 1 ) ) ; + add_code ( 0 , "LTYPE" ) ; + add_code ( 2 , "CONTINUOUS" ) ; + add_code ( 70 , to_str ( 0 ) ) ; + add_code ( 3 , "Solid line" ) ; + add_code ( 72 , to_str ( 65 ) ) ; + add_code ( 73 , to_str ( 0 ) ) ; + add_code ( 40 , to_str ( 0.0 ) ) ; + add_group_end ( "ENDTAB" ) ; + add_group_begin ( "TABLE" , "APPID" ) ; + add_code ( 70 , to_str ( 1 ) ) ; + add_code ( 0 , "APPID" ) ; + add_code ( 2 , "ACAD" ) ; + add_code ( 70 , to_str ( 0 ) ) ; + add_group_end ( "ENDTAB" ) ; + + mLayersTablePos = mPos ; -- mLayersTablePos ; + + add_group_end ( "ENDSEC" ) ; + + add_group_begin ( "SECTION" , "ENTITIES" ) ; + } + + void add_footer() + { + add_group_end( "ENDSEC" ) ; + add_group_end( "EOF" ) ; + + insert_layers(); + } + + void insert_layers() + { + if ( mLayers.size() > 0 ) + { + mPos = mLayersTablePos ; ++ mPos ; + + add_group_begin ( "TABLE" , "LAYER" ) ; + add_code ( 70 , to_str ( int(mLayers.size() + 1) ) ) ; + add_code ( 0 , "LAYER" ) ; + add_code ( 2 , "0" ) ; + add_code ( 70 , to_str ( 0 ) ) ; + add_code ( 62 , to_str ( 7 ) ) ; + add_code ( 6 , "CONTINUOUS" ) ; + + for ( Layer_iterator lit = mLayers.begin() ; lit != mLayers.end() ; ++ lit ) + { + add_code ( 0 , "LAYER" ) ; + add_code ( 2 , *lit ) ; + add_code ( 70 , to_str ( 0 ) ) ; + add_code ( 62 , to_str ( 0 ) ) ; + add_code ( 6 , "CONTINUOUS" ) ; + } + add_group_end ( "ENDTAB" ) ; + } + } + + void dump() + { + std::copy(mLines.begin(),mLines.end(), std::ostream_iterator(mOut,"\n")); + } + + + std::ostream& mOut ; + Lines mLines ; + Line_iterator mPos ; + Line_iterator mLayersTablePos ; + Layers mLayers ; + int mHandle ; + +} ; + +} // end namespace CGAL + +#include + +#endif // CGAL_IO_DXF_WRITER_H diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/IO/print.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/IO/print.h new file mode 100644 index 00000000..53ac8533 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/IO/print.h @@ -0,0 +1,161 @@ +// Copyright (c) 2007 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/IO/print.h $ +// $Id: include/CGAL/Straight_skeleton_2/IO/print.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Fernando Cacciola + +#ifndef CGAL_SLS_IO_PRINT_H +#define CGAL_SLS_IO_PRINT_H + +#include + + +#include +#include +#include +#include + +namespace CGAL { +namespace Straight_skeletons_2 { +namespace IO { + +template +void print_point ( CGAL::Point_2 const& p ) +{ + std::cout << "(" << p.x() << "," << p.y() << ")" ; +} + +template +void print_vertex ( HDS_V const& v ) +{ + if(v->has_infinite_time()) + std::cout << "F" << v->id() << " " ; + else + std::cout << "N" << v->id() << " " ; +} + +template +void print_polygon ( CGAL::Polygon_2 const& poly ) +{ + typedef CGAL::Polygon_2 Polygon ; + + std::cout << "Polygon with " << poly.size() << " vertices" << std::endl ; + + for( typename Polygon::Vertex_const_iterator vi = poly.vertices_begin() ; vi != poly.vertices_end() ; ++ vi ) + { + print_point(*vi); std::cout << std::endl ; + } +} + +template +void print_polygons ( std::vector< std::shared_ptr< CGAL::Polygon_2 > > const& polies ) +{ + typedef std::vector< std::shared_ptr< CGAL::Polygon_2 > > PolygonVector ; + + std::cout << "Polygon list with " << polies.size() << " polygons" << std::endl ; + + for( typename PolygonVector::const_iterator pi = polies.begin() ; pi != polies.end() ; ++ pi ) + print_polygon(**pi); +} + +template +void print_polygon_with_holes ( CGAL::Polygon_with_holes_2 const& polywh ) +{ + typedef CGAL::Polygon_with_holes_2 PolygonWithHoles ; + + std::cout << "Polygon_with_holes having " << polywh.number_of_holes() << " holes" << std::endl ; + + print_polygon(polywh.outer_boundary()); + + for( typename PolygonWithHoles::Hole_const_iterator hi = polywh.holes_begin() ; hi != polywh.holes_end() ; ++ hi ) + print_polygon(*hi); +} + +template +void print_polygons_with_holes ( std::vector< std::shared_ptr< CGAL::Polygon_with_holes_2 > > const& polies ) +{ + + typedef std::vector< std::shared_ptr< CGAL::Polygon_with_holes_2 > > PolygonWithHolesVector ; + + std::cout << "Polygon_with_holes list with " << polies.size() << " element" << std::endl ; + + for( typename PolygonWithHolesVector::const_iterator pi = polies.begin() ; pi != polies.end() ; ++ pi ) + print_polygon_with_holes(**pi); +} + + +template +void print_straight_skeleton( CGAL::Straight_skeleton_2 const& ss ) +{ + typedef CGAL::Straight_skeleton_2 Ss ; + + typedef typename Ss::Vertex_const_handle Vertex_const_handle ; + typedef typename Ss::Halfedge_const_handle Halfedge_const_handle ; + typedef typename Ss::Halfedge_const_iterator Halfedge_const_iterator ; + + Halfedge_const_handle null_halfedge ; + Vertex_const_handle null_vertex ; + + std::cout << "Straight skeleton with " << ss.size_of_vertices() + << " vertices, " << ss.size_of_halfedges() + << " halfedges and " << ss.size_of_faces() + << " faces" << std::endl ; + + std::cout << "Faces " << std::endl; + for ( Halfedge_const_iterator h = ss.halfedges_begin(); h != ss.halfedges_end(); ++h ) + { + if(h->is_inner_bisector() || h->is_bisector()) + continue; + + Halfedge_const_iterator end = h; + for(;;) + { + if(h->is_inner_bisector()) + std::cout << "IBH" << h->id() << " " << std::flush ; + else if(h->is_bisector()) + std::cout << "BH" << h->id() << " " << std::flush ; + else + std::cout << "CH" << h->id() << " " << std::flush ; + + print_vertex(h->vertex()); + + h = h->next(); + if(h == end) + break; + + std::cout << " ==> " << std::flush ; + } + + std::cout << std::endl; + } + + std::cout << "All halfedges: " << std::endl; + + for ( Halfedge_const_iterator h = ss.halfedges_begin(); h != ss.halfedges_end(); ++h ) + { + if(h->is_inner_bisector()) + std::cout << "IBH" << h->id() << " " << std::flush ; + else if(h->is_bisector()) + std::cout << "BH" << h->id() << " " << std::flush ; + else + std::cout << "CH" << h->id() << " " << std::flush ; + + print_vertex(h->prev()->vertex()) ; + print_point(h->prev()->vertex()->point()) ; + std::cout << " ==> " << std::flush ; + print_vertex(h->vertex()); + print_point(h->vertex()->point()) ; + std::cout << std::endl; + } +} + +} // namespace IO +} // namespace Straight_skeletons_2 +} // namespace CGAL + +#endif // CGAL_SLS_IO_PRINT_H diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Polygon_iterators.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Polygon_iterators.h index a6d73d23..d518b727 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Polygon_iterators.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Polygon_iterators.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_iterators.h $ -// $Id: Polygon_iterators.h 9051fc1 2020-10-08T22:54:11+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_iterators.h $ +// $Id: include/CGAL/Straight_skeleton_2/Polygon_iterators.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -13,72 +13,64 @@ #include -#include +#include -#include +#include + +#include namespace CGAL { namespace CGAL_SS_i { -// to distinguish between SequenceContainers of points, and GeneralPolygonWithHoles_2 -BOOST_MPL_HAS_XXX_TRAIT_DEF(Hole_const_iterator) - -// Generic container -template -inline typename Poly::const_iterator vertices_begin ( Poly const& aPoly ) -{ return aPoly.begin() ; } - -template -inline typename Poly::const_iterator vertices_end ( Poly const& aPoly ) -{ return aPoly.end() ; } - -template -inline typename Poly::const_iterator vertices_begin ( boost::shared_ptr const& aPoly ) -{ return aPoly->begin() ; } - -template -inline typename Poly::const_iterator vertices_end ( boost::shared_ptr const& aPoly ) -{ return aPoly->end() ; } - -// Polygon_2 -template -inline typename Polygon_2::Vertex_const_iterator -vertices_begin ( Polygon_2 const& aPoly ) -{ return aPoly.vertices_begin() ; } - -template -inline typename Polygon_2::Vertex_const_iterator -vertices_end( Polygon_2 const& aPoly ) -{ return aPoly.vertices_end() ; } - -template -inline typename Polygon_2::Vertex_const_iterator vertices_begin ( boost::shared_ptr > const& aPoly ) -{ return aPoly->vertices_begin() ; } - -template -inline typename Polygon_2::Vertex_const_iterator vertices_end( boost::shared_ptr > const& aPoly ) -{ return aPoly->vertices_end() ; } - -// Polygon_with_holes_2 -template -inline typename Polygon_with_holes_2::Polygon_2::Vertex_const_iterator -vertices_begin ( Polygon_with_holes_2 const& aPoly ) -{ return aPoly.outer_boundary().vertices_begin() ; } - -template -inline typename Polygon_with_holes_2::Polygon_2::Vertex_const_iterator -vertices_end( Polygon_with_holes_2 const& aPoly ) -{ return aPoly.outer_boundary().vertices_end() ; } - -template -inline typename Polygon_with_holes_2::Polygon_2::Vertex_const_iterator -vertices_begin ( boost::shared_ptr > const& aPoly ) -{ return aPoly->outer_boundary().vertices_begin() ; } - -template -inline typename Polygon_with_holes_2::Polygon_2::Vertex_const_iterator -vertices_end( boost::shared_ptr > const& aPoly ) -{ return aPoly->outer_boundary().vertices_end() ; } +// Polygon_2-type container +template +inline typename Poly::const_iterator +vertices_begin(const Poly& aPoly, + std::enable_if_t::value>* = nullptr) +{ return aPoly.begin(); } + +template +inline typename Poly::const_iterator +vertices_end(const Poly& aPoly, + std::enable_if_t::value>* = nullptr) +{ return aPoly.end(); } + +template +inline typename Poly::const_iterator +vertices_begin(const std::shared_ptr& aPoly, + std::enable_if_t::value>* = nullptr) +{ return aPoly->begin(); } + +template +inline typename Poly::const_iterator +vertices_end(const std::shared_ptr & aPoly, + std::enable_if_t::value>* = nullptr) +{ return aPoly->end(); } + +// Polygon_with_holes_2-type container +template +inline typename PolyWithHoles::Polygon_2::const_iterator +vertices_begin(const PolyWithHoles& aPoly, + std::enable_if_t::value>* = nullptr) +{ return aPoly.outer_boundary().begin(); } + +template +inline typename PolyWithHoles::Polygon_2::const_iterator +vertices_end(const PolyWithHoles& aPoly, + std::enable_if_t::value>* = nullptr) +{ return aPoly.outer_boundary().end(); } + +template +inline typename PolyWithHoles::Polygon_2::const_iterator +vertices_begin(const std::shared_ptr& aPoly, + std::enable_if_t::value>* = nullptr) +{ return aPoly->outer_boundary().begin(); } + +template +inline typename PolyWithHoles::Polygon_2::const_iterator +vertices_end(const std::shared_ptr& aPoly, + std::enable_if_t::value>* = nullptr) +{ return aPoly->outer_boundary().end(); } } // namespace CGAL_SS_i } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h index 68e0c025..0eff0905 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h $ -// $Id: Polygon_offset_builder_2_impl.h b2d562e 2023-01-04T16:38:15+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h $ +// $Id: include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -55,7 +55,7 @@ Polygon_offset_builder_2::LocateHook( FT , Hook_position& rPos ) { - CGAL_POLYOFFSET_TRACE(2,"Locate hook at " << aTime ) ; + CGAL_POLYOFFSET_TRACE(2,"Locate hook at T=" << aTime ) ; CGAL_POLYOFFSET_TRACE(2,"Start halfedge: " << e2str(*aBisector) ) ; Halfedge_const_handle rHook ; @@ -66,7 +66,8 @@ Polygon_offset_builder_2::LocateHook( FT Halfedge_const_handle lNext = aBisector->next(); CGAL_POLYOFFSET_TRACE(2,"Testing hook on " << e2str(*aBisector) ) ; - CGAL_POLYOFFSET_TRACE(4, "Next: " << e2str(*lNext) << " ; Prev: " << e2str(*lPrev) ) ; + CGAL_POLYOFFSET_TRACE(4, "Next: " << e2str(*lNext) ) ; + CGAL_POLYOFFSET_TRACE(4, "Prev: " << e2str(*lPrev) ) ; if ( !IsVisited(aBisector) ) { @@ -111,26 +112,22 @@ Polygon_offset_builder_2::LocateHook( FT // if ( lTimeWrtSrcTime != lTimeWrtTgtTime ) { - CGAL_stskel_intrinsic_test_assertion( !CGAL_SS_i::is_time_clearly_not_within_possibly_inexact_bisector_time_interval(aTime,aBisector) ) ; - rPos = ( lTimeWrtTgtTime == EQUAL ? TARGET : lTimeWrtSrcTime == EQUAL ? SOURCE : INSIDE ) ; rHook = aBisector ; - CGAL_POLYOFFSET_TRACE(2, " Hook found here at " << Hook_position2Str(rPos) ) ; + CGAL_POLYOFFSET_TRACE(2, " Hook found here on " << e2str(*aBisector) << "(" << Hook_position2Str(rPos) << ")" ) ; break ; } else { - CGAL_stskel_intrinsic_test_assertion( !CGAL_SS_i::is_time_clearly_within_possibly_inexact_bisector_time_interval(aTime,aBisector) ) ; - - CGAL_POLYOFFSET_TRACE(2, " Hook not found here.") ; + CGAL_POLYOFFSET_TRACE(2, " Hook not found on." << e2str(*aBisector) ) ; } } else { - CGAL_POLYOFFSET_TRACE(2,"Bisector is a roof peak (zero slope)."); + CGAL_POLYOFFSET_TRACE(2, e2str(*aBisector) << " is a roof peak (zero slope)."); } } else @@ -180,7 +177,7 @@ template typename Polygon_offset_builder_2::Halfedge_const_handle Polygon_offset_builder_2::LocateSeed( FT aTime ) { - CGAL_POLYOFFSET_TRACE(2,"Searching for a starting seed at " << aTime ) ; + CGAL_POLYOFFSET_TRACE(2,"Searching for a starting seed at T=" << aTime ) ; Halfedge_const_handle rSeed ; @@ -211,10 +208,9 @@ void Polygon_offset_builder_2::AddOffsetVertex( FT CGAL_POLYOFFSET_TRACE(1,"Found offset point p=" << p2str(*lP) << " at offset " << aTime << " along bisector " << e2str(*aHook) << " reaching " << v2str(*aHook->vertex()) ) ; - mVisitor.on_offset_point(*lP); - if ( lP != mLastPoint ) { + mVisitor.on_offset_point(*lP,aHook); aPoly->push_back(*lP); mLastPoint = lP ; } @@ -312,7 +308,7 @@ OutputIterator Polygon_offset_builder_2::construct_offset_co mVisitor.on_construction_started(aTime); - mLastPoint = boost::none ; + mLastPoint = std::nullopt ; ResetBisectorData(); diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h index 6a914bd1..883ae968 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h $ -// $Id: Straight_skeleton_aux.h c38ff2b 2023-01-04T16:26:31+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h $ +// $Id: include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -17,15 +17,15 @@ #include #include -#include +#include + +#include #include -#include -#include -#include +#include #include +#include -// The heap objects used in this implementation are intrusively reference counted. Thus, they inherit from Ref_counted_base. namespace CGAL { namespace CGAL_SS_i { @@ -35,12 +35,10 @@ struct Has_inexact_constructions { typedef typename K::FT FT ; - typedef typename boost::mpl::if_< boost::mpl::or_< boost::is_same - , boost::is_same - > - , Tag_true - , Tag_false - >::type type ; + typedef std::conditional_t< std::is_same_v || std::is_same_v + , Tag_true + , Tag_false + > type ; } ; template @@ -50,6 +48,8 @@ struct Segment_2_with_ID typedef typename K::Segment_2 Base; typedef typename K::Point_2 Point_2; + std::size_t id() const { return mID; } + public: Segment_2_with_ID() : Base(), mID(-1) { } Segment_2_with_ID(Base const& aS) : Base(aS), mID(-1) { } @@ -171,29 +171,70 @@ class Triedge Handle mE[3]; } ; +template +struct Is_same_type { typedef Tag_false type ; } ; -} // namespace CGAL_SS_i +template +struct Is_same_type { typedef Tag_true type ; } ; + +// to distinguish between SequenceContainers of points, and GeneralPolygonWithHoles_2 +BOOST_MPL_HAS_XXX_TRAIT_DEF(Hole_const_iterator) -class Ref_counted_base +// The return type of create_(weighted)_interior/exterior_skeleton_and_offset_polygons_2: +// - if polygon input is a model of 'GeneralPolygonWithHoles_2', the return type +// should be the internal (hole-less) polygon type GeneralPolygonWithHoles_2::Polygon_2 +// - if polygon input is just a sequence container of points (e.g. Polygon_2), then the same type +// is expected in output +template ::value> +struct Default_return_polygon_type // Polygon type supports holes { -private: - mutable long mCount ; - Ref_counted_base( Ref_counted_base const &); - Ref_counted_base& operator=( Ref_counted_base const &); -protected: - Ref_counted_base(): mCount(0) {} - virtual ~Ref_counted_base() noexcept(!CGAL_ASSERTIONS_ENABLED) {} -public: - void AddRef() const { ++mCount; } - void Release() const - { - if( --mCount == 0 ) - delete this; - } + typedef typename std::conditional::type>::Kernel, + OfK>::value, + typename Polygon::Polygon_2, // correct kernel + CGAL::Polygon_2 /*incorrect kernel*/ >::type type; +}; + +template +struct Default_return_polygon_type // Polygon type does NOT support holes +{ + typedef typename std::conditional::type>::Kernel, + OfK>::value, + Polygon, // correct kernel + CGAL::Polygon_2 /*incorrect kernel*/ >::type type; +}; + +// The return type of create_interior/exterior_skeleton_and_offset_polygons_with_holes_2: +// - if polygon input is a model of 'GeneralPolygonWithHoles_2', the return type should be the same +// - if polygon input is just a sequence container of points (e.g. Polygon_2), then use +// General_polygon_with_holes_2 +template ::value> +struct Default_return_polygon_with_holes_type // Polygon type supports holes +{ + typedef typename std::conditional::type>::Kernel, + OfK>::value, + Polygon, // correct kernel + CGAL::Polygon_with_holes_2 /*incorrect kernel*/ >::type type; }; -inline void intrusive_ptr_add_ref( Ref_counted_base const* p ) { p->AddRef(); } -inline void intrusive_ptr_release( Ref_counted_base const* p ) { p->Release(); } +template +struct Default_return_polygon_with_holes_type // Polygon type does NOT support holes +{ + // Maybe on paper the `conditional` should be `General_polygon_with_holes_2`... + typedef typename std::conditional::type>::Kernel, + OfK>::value, + CGAL::Polygon_with_holes_2, // correct kernel but no holes + CGAL::Polygon_with_holes_2 /*incorrect kernel*/ >::type type; +}; + +} // namespace CGAL_SS_i } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h index aa848fbc..a4b0224a 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h $ -// $Id: Straight_skeleton_builder_2_impl.h b2d562e 2023-01-04T16:38:15+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h $ +// $Id: include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -15,6 +15,8 @@ #include #include +#include +#include #include #include @@ -32,7 +34,7 @@ namespace CGAL { template -Straight_skeleton_builder_2::Straight_skeleton_builder_2 ( boost::optional aMaxTime, Traits const& aTraits, Visitor const& aVisitor ) +Straight_skeleton_builder_2::Straight_skeleton_builder_2 ( std::optional aMaxTime, Traits const& aTraits, Visitor const& aVisitor ) : mTraits(aTraits) ,mVisitor(aVisitor) @@ -46,6 +48,10 @@ Straight_skeleton_builder_2::Straight_skeleton_builder_2 ( boost::optio ,mPQ(mEventCompare) ,mSSkel( new SSkel() ) { + if( mMaxTime ) + { + CGAL_STSKEL_BUILDER_TRACE(4, "Init with mMaxTime = " << *mMaxTime); + } } template @@ -70,7 +76,7 @@ template void Straight_skeleton_builder_2::InsertEventInPQ( EventPtr aEvent ) { mPQ.push(aEvent); - CGAL_STSKEL_BUILDER_TRACE(4, "Enque: " << *aEvent); + CGAL_STSKEL_BUILDER_TRACE(4, "Enqueue: " << *aEvent); } template @@ -86,7 +92,9 @@ Straight_skeleton_builder_2::PopEventFromPQ() // template typename Straight_skeleton_builder_2::EventPtr -Straight_skeleton_builder_2::FindEdgeEvent( Vertex_handle aLNode, Vertex_handle aRNode, Triedge const& aPrevEventTriedge ) +Straight_skeleton_builder_2::FindEdgeEvent( Vertex_handle aLNode, + Vertex_handle aRNode, + Triedge const& aPrevEventTriedge ) { EventPtr rResult ; @@ -98,6 +106,9 @@ Straight_skeleton_builder_2::FindEdgeEvent( Vertex_handle aLNode, Verte { Trisegment_2_ptr lTrisegment = CreateTrisegment(lTriedge,aLNode,aRNode); + CGAL_STSKEL_BUILDER_TRACE(4, "\n[] Considering E" << lTrisegment->e0().mID << " E" << lTrisegment->e1().mID << " E" << lTrisegment->e2().mID + << " Collinearity: " << trisegment_collinearity_to_string(lTrisegment->collinearity()) ) ; + // The 02 collinearity configuration is problematic: 01 or 12 collinearity has a seed position // giving the point through which the bisector passes. However, for 02, it is not a given. // @@ -163,7 +174,9 @@ Straight_skeleton_builder_2::FindEdgeEvent( Vertex_handle aLNode, Verte } else { - CGAL_STSKEL_BUILDER_TRACE(4, "Edge event: " << lTriedge << " is in the past. Compared to L=" << lLNodeD << " to R=" << lRNodeD ) ; + CGAL_STSKEL_BUILDER_TRACE(4, "Edge event: " << lTriedge << " is in the past." ) ; + CGAL_STSKEL_BUILDER_TRACE(4, "\tCompared to L=" << aLNode->id() << " (" << lLNodeD << ")" ) ; + CGAL_STSKEL_BUILDER_TRACE(4, "\tCompared to R=" << aRNode->id() << " (" << lRNodeD << ")" ) ; } } } @@ -273,12 +286,11 @@ void Straight_skeleton_builder_2::CollectSplitEvents( Vertex_handle aNo Halfedge_handle lRBorder = lTriedge.e1(); CGAL_STSKEL_BUILDER_TRACE(3 - ,"Finding SplitEvent for N" << aNode->id() + ,"Finding SplitEvents for N" << aNode->id() << " LBorder: E" << lLBorder->id() << " RBorder: E" << lRBorder->id() ); - ComputeUpperBoundForValidSplitEvents(GetPrevInLAV(aNode), aNode, GetNextInLAV(aNode), - mContourHalfedges.begin(), mContourHalfedges.end()); + ComputeUpperBoundForValidSplitEvents(aNode, mContourHalfedges.begin(), mContourHalfedges.end()); for ( Halfedge_handle_vector_iterator i = mContourHalfedges.begin(); i != mContourHalfedges.end(); ++ i ) { @@ -295,9 +307,7 @@ void Straight_skeleton_builder_2::CollectSplitEvents( Vertex_handle aNo } } -#ifdef CGAL_STRAIGHT_SKELETON_ENABLE_TRACE - std::cout << " local queue size --> " << GetVertexData(aNode).mSplitEvents.size() << std::endl; -#endif + CGAL_STSKEL_BUILDER_TRACE(4, "#Split Events=" << GetVertexData(aNode).mSplitEvents.size()); } @@ -318,27 +328,26 @@ void Straight_skeleton_builder_2::CollectNewEvents( Vertex_handle aNode // // An 'Event' is the collision of 2 wavefronts. // Each event changes the topology of the shrinking polygon; that is, at the event, the current polygon differs from the - // inmediately previous polygon in the number of vertices. + // immediately previous polygon in the number of vertices. // // If 2 vertex wavefronts sharing a common edge collide, the event is called an edge event. At the time of the event, the current - // polygon doex not have the common edge anynmore, and the two vertices become one. This new 'skeleton' vertex generates a new + // polygon doex not have the common edge anymore, and the two vertices become one. This new 'skeleton' vertex generates a new // vertex wavefront which can further collide with other wavefronts, producing for instance, more edge events. // - // If a refex vertex wavefront collide with an edge wavefront, the event is called a split event. At the time of the event, the current + // If a reflex vertex wavefront collide with an edge wavefront, the event is called a split event. At the time of the event, the current // polygon is split in two unconnected polygons, each one containing a portion of the edge hit and split by the reflex wavefront. // - // If 2 reflex wavefronts collide each other, the event is called a vertex event. At the time of the event, the current polygon + // If 2 reflex wavefronts collide with each other, the event is called a vertex event. At the time of the event, the current polygon // is split in two unconnected polygons. Each one contains a different combination of the colliding reflex edges. That is, if the // wavefront (edgea,edgeb) collides with (edgec,edged), the two resulting polygons will contain (edgea,edgec) and (edgeb,edged). - // Furthermore, one of the new vertices can be a reflex vertex generating a reflex wavefront which can further produce more split or - // vertex events (or edge events of course) + // Furthermore, one of the new vertices can be a reflex vertex generating a reflex wavefront which can further produces more split + // or vertex events (or edge events of course). // // Each vertex wavefront (reflex or not) results in one and only one event from a set of possible events. - // It can result in a edge event against the vertex wavefronts emerging from the adjacent vertices (in the current polygon, not + // It can result in an edge event against the vertex wavefronts emerging from the adjacent vertices (in the current polygon, not // in the input polygon); or it can result in a split event (or vertex event) against any other wavefront in the rest of // current polygon. - // Adjacent vertices in the current polygon containing aNode (called LAV) Vertex_handle lPrev = GetPrevInLAV(aNode) ; Vertex_handle lNext = GetNextInLAV(aNode) ; @@ -353,7 +362,9 @@ void Straight_skeleton_builder_2::CollectNewEvents( Vertex_handle aNode CollectSplitEvents(aNode, aPrevEventTriedge) ; EventPtr lLEdgeEvent = FindEdgeEvent( lPrev , aNode, aPrevEventTriedge ) ; + CGAL_STSKEL_BUILDER_TRACE(2, "Done Left " << (lLEdgeEvent ? "Found" : "Not Found")); EventPtr lREdgeEvent = FindEdgeEvent( aNode , lNext, aPrevEventTriedge ) ; + CGAL_STSKEL_BUILDER_TRACE(2, "Done Right " << (lREdgeEvent ? "Found" : "Not Found")); bool lAcceptL = !!lLEdgeEvent ; bool lAcceptR = !!lREdgeEvent ; @@ -387,11 +398,10 @@ void Straight_skeleton_builder_2::HandleSimultaneousEdgeEvent( Vertex_h Vertex_handle lOBV = lOB->vertex() ; // Vertex_handle lIBV = lIB->vertex() ; - CGAL_STSKEL_BUILDER_TRACE ( 2 - , "OA: B" << lOA->id() << '\n' - << "IA: B" << lIA->id() << '\n' - << "OB: B" << lOB->id() << '\n' - << "IB: B" << lIB->id() + CGAL_STSKEL_BUILDER_TRACE ( 2 , "OA: B" << lOA->id() << " V" << lOA->vertex()->id() << '\n' + << "IA: B" << lIA->id() << " V" << lIA->vertex()->id() << '\n' + << "OB: B" << lOB->id() << " V" << lOB->vertex()->id() << '\n' + << "IB: B" << lIB->id() << " V" << lIB->vertex()->id() ) ; SetIsProcessed(aA) ; @@ -409,42 +419,74 @@ void Straight_skeleton_builder_2::HandleSimultaneousEdgeEvent( Vertex_h (void) lOB_Prev; // may be unused (void) lIB_Next; // may be unused - CGAL_STSKEL_BUILDER_TRACE ( 2 - , "OA_Prev: B" << lOA_Prev->id() << '\n' - << "IA_Next: B" << lIA_Next->id() << '\n' - << "OB_Prev: B" << lOB_Prev->id() << '\n' - << "IB_Next: B" << lIB_Next->id() - ) ; + CGAL_STSKEL_BUILDER_TRACE ( 2 , "OA_Prev: B" << lOA_Prev->id() << " V" << lOA_Prev->vertex()->id() << '\n' + << "IA_Next: B" << lIA_Next->id() << " V" << lIA_Next->vertex()->id() << '\n' + << "OB_Prev: B" << lOB_Prev->id() << " V" << lOB_Prev->vertex()->id() << '\n' + << "IB_Next: B" << lIB_Next->id() << " V" << lIB_Next->vertex()->id() + ) ; + + // For weighted skeletons of polygons with holes, one can have a skeleton face wrap + // around an input hole. In that case, we have a configuration of two fictous vertices + // meeting from each side after going around the hole, as well as the fictous vertex + // from the hole edge where the simultaneous event occurs. We then have to close the "strait" + // and ensure that the contour edge corresponding to the wrapping face still has + // a fictous vertex to continue its progression beyond the hole. + + Halfedge_handle lIA_Prev = lIA->prev() ; + CGAL_STSKEL_BUILDER_TRACE ( 2, "lIA_Prev: B" << lIA_Prev->id() << " V" << lIA_Prev->vertex()->id() ) ; + + if ( lIA_Prev != lOB ) + { + CGAL_STSKEL_BUILDER_TRACE ( 2, "Closing A-strait N" << lOBV->id() << " N" << lIA_Prev->vertex()->id() ) ; + + Halfedge_handle lOB_Next = lOB->next() ; + CrossLinkFwd(lIA_Prev, lOB_Next ); + + SetNextInLAV( lOB_Next->vertex(), lIA_Prev->prev()->vertex() ) ; + SetPrevInLAV( lIA_Prev->prev()->vertex(), lOB_Next->vertex() ) ; + } + + Halfedge_handle lIB_Prev = lIB->prev() ; + CGAL_STSKEL_BUILDER_TRACE ( 2, "lIB_Prev: B" << lIB_Prev->id() << " V" << lIB_Prev->vertex()->id() ) ; + + if ( lIB_Prev != lOA ) + { + CGAL_STSKEL_BUILDER_TRACE ( 2, "Closing B-strait N" << lOAV->id() << " N" << lIB_Prev->vertex()->id() ) ; + + Halfedge_handle lOA_Next = lOA->next() ; + CrossLinkFwd(lIB_Prev, lOA_Next ); + + SetNextInLAV( lOA_Next->vertex(), lIB_Prev->prev()->vertex() ) ; + SetPrevInLAV( lIB_Prev->prev()->vertex(), lOA_Next->vertex() ) ; + } + + // Merge the two bisectors CrossLinkFwd(lOB, lIA_Next ); CrossLinkFwd(lOA_Prev, lIB ); Link(lOB,aA); - CGAL_STSKEL_BUILDER_TRACE ( 1, "B" << lOA->id() << " and B" << lIA->id() << " erased." ) ; - mDanglingBisectors.push_back(lOA); - - // // The code above corrects the links for vertices aA/aB to the erased halfedges lOA and lIA. - // However, any of these vertices (aA/aB) maybe one of the twin vertices of a split event. - // If that's the case, the erased halfedge maybe be linked to a 'couple' of those vertices. + // However, any of these vertices (aA/aB) may be one of the twin vertices of a split event. + // If that's the case, the erased halfedge may be be linked to a 'couple' of those vertices. // This situation is corrected below: - if ( !lOAV->has_infinite_time() && lOAV != aA && lOAV != aB ) { Link(lOAV,lIB); CGAL_STSKEL_BUILDER_TRACE ( 1, "N" << lOAV->id() << " has B" << lOA->id() - << " as it's halfedge. Replacing it with B" << lIB->id() + << " as its halfedge. Replacing it with B" << lIB->id() ) ; } + if ( !lIAV->has_infinite_time() && lIAV != aA && lIAV != aB ) { Link(lIAV,lOB); CGAL_STSKEL_BUILDER_TRACE ( 1, "N" << lIAV->id() << " has B" << lIA->id() - << " as it's halfedge. Replacing it with B" << lOB->id() + << " as its halfedge. Replacing it with B" << lOB->id() ) ; } @@ -468,6 +510,9 @@ void Straight_skeleton_builder_2::HandleSimultaneousEdgeEvent( Vertex_h CGAL_STSKEL_BUILDER_TRACE ( 2, "Fictitious N" << lOBV->id() << " erased." ) ; EraseNode(lOBV); } + + CGAL_STSKEL_BUILDER_TRACE ( 1, "B" << lOA->id() << " and B" << lIA->id() << " erased." ) ; + EraseBisector(lOA); // `edges_erase(h)` removes `h` and `h->opposite()` } // Returns true if the skeleton edges 'aA' and 'aB' are defined by the same pair of contour edges (but possibly in reverse order) @@ -506,12 +551,13 @@ void Straight_skeleton_builder_2::UpdatePQ( Vertex_handle aNode, Triedg Halfedge_handle lOBisector_C = aNode->primary_bisector() ; Halfedge_handle lOBisector_N = lNext->primary_bisector() ; + // @todo it's pointless to collect for both the left and the right for contour nodes if ( AreBisectorsCoincident(lOBisector_C,lOBisector_P) ) HandleSimultaneousEdgeEvent( aNode, lPrev ) ; else if ( AreBisectorsCoincident(lOBisector_C,lOBisector_N) ) HandleSimultaneousEdgeEvent( aNode, lNext ) ; else - CollectNewEvents(aNode,aPrevEventTriedge); + CollectNewEvents(aNode,aPrevEventTriedge); } template void Straight_skeleton_builder_2::CreateInitialEvents() @@ -605,6 +651,8 @@ void Straight_skeleton_builder_2::CreateContourBisectors() template void Straight_skeleton_builder_2::HarmonizeSpeeds(boost::mpl::bool_) { + CGAL_STSKEL_BUILDER_TRACE ( 2, "Harmonize speeds..." ) ; + // Collinear input edges might not have the exact same speed if an inexact square root is used. // This might cause some inconsistencies in time, resulting in invalid skeletons. Therefore, // if the square root is not exact, we enforce that collinear input edges have the same speed, @@ -646,13 +694,17 @@ void Straight_skeleton_builder_2::HarmonizeSpeeds(boost::mpl::bool_SSkel::Base::faces_begin(); fit != mSSkel->SSkel::Base::faces_end(); ++fit) { Halfedge_handle lBorder = fit->halfedge() ; - Segment_2 lS = CreateSegment ( lBorder ) ; - - std::pair rRes = lOrdered_halfedges.insert ( lBorder ) ; - if ( ! rRes.second ) // some collinear edge is already in the set - mTraits.InitializeLineCoeffs ( lBorder->id(), (*rRes.first)->id() ); + auto lRes = lOrdered_halfedges.insert(lBorder); + if(!lRes.second) // successful insertion (i.e., not collinear to any previously inserted halfedge) + { + CGAL_STSKEL_BUILDER_TRACE(4, "Harmonize " << lBorder->id() << " with " << (*lRes.first)->id() ) ; + mTraits.InitializeLineCoeffs(lBorder->id(), (*lRes.first)->id()); + } else - mTraits.InitializeLineCoeffs ( lS ); + { + const Segment_2 lBS = CreateSegment(lBorder); + mTraits.InitializeLineCoeffs(lBS); + } } } @@ -682,12 +734,6 @@ Straight_skeleton_builder_2::ConstructEdgeEventNode( EdgeEvent& aEvent SetTrisegment(lNewNode,aEvent.trisegment()); - CGAL_STSKEL_BUILDER_TRACE - ( 3 - , "LSeed: N" << lLSeed->id() << " processed\n" - << "RSeed: N" << lRSeed->id() << " processed" - ) ; - SetIsProcessed(lLSeed) ; SetIsProcessed(lRSeed) ; GLAV_remove(lLSeed); @@ -755,7 +801,7 @@ Straight_skeleton_builder_2::LookupOnSLAV ( Halfedge_handle aBorder, Ev CGAL_STSKEL_BUILDER_TRACE ( 3, "Split point found at the " << ( rSite == AT_SOURCE ? "SOURCE vertex" : ( rSite == AT_TARGET ? "TARGET vertex" : "strict inside" ) ) - << " of the offset edge." + << " of the offset edge " << vh2str(lPrevN) << " " << vh2str(v) ) ; break ; } @@ -776,7 +822,7 @@ Straight_skeleton_builder_2::LookupOnSLAV ( Halfedge_handle aBorder, Ev } else { - CGAL_STSKEL_BUILDER_TRACE(1,"Split event is no longer valid. Point not inside the opposite edge offset zone."); + CGAL_STSKEL_BUILDER_TRACE(1,"Split event is no longer valid. Point not inside the opposite edge's offset zone."); } } #endif @@ -809,8 +855,6 @@ Straight_skeleton_builder_2::ConstructSplitEventNodes( SplitEvent& aEve Vertex_handle lSeed = aEvent.seed0() ; - CGAL_STSKEL_BUILDER_TRACE ( 3, "Seed: N" << lSeed->id() << " processed" ) ; - SetIsProcessed(lSeed) ; GLAV_remove(lSeed); @@ -862,14 +906,6 @@ Straight_skeleton_builder_2::ConstructPseudoSplitEventNodes( PseudoSpli SetTrisegment(lNewNodeA,aEvent.trisegment()); SetTrisegment(lNewNodeB,aEvent.trisegment()); - CGAL_STSKEL_BUILDER_TRACE - ( - 3 - , "LSeed: N" << lLSeed->id() << " processed\n" - << "RSeed: N" << lRSeed->id() << " processed" - ) ; - - SetIsProcessed(lLSeed) ; SetIsProcessed(lRSeed) ; GLAV_remove(lLSeed); @@ -909,6 +945,9 @@ Straight_skeleton_builder_2::ConstructPseudoSplitEventNodes( PseudoSpli template bool Straight_skeleton_builder_2::IsProcessed( EventPtr aEvent ) { + CGAL_STSKEL_BUILDER_TRACE(4, "Event is processed? V" << aEvent->seed0()->id() << ": " << IsProcessed(aEvent->seed0()) << "; V" + << aEvent->seed1()->id() << ": " << IsProcessed(aEvent->seed1()) ); + return IsProcessed(aEvent->seed0()) || IsProcessed(aEvent->seed1()) ; } @@ -961,8 +1000,6 @@ bool Straight_skeleton_builder_2::IsValidEvent( EventPtr aEvent ) template bool Straight_skeleton_builder_2::IsValidEdgeEvent( EdgeEvent const& aEvent ) { - bool rResult = false ; - Vertex_handle lLSeed = aEvent.seed0() ; Vertex_handle lRSeed = aEvent.seed1() ; @@ -979,32 +1016,35 @@ bool Straight_skeleton_builder_2::IsValidEdgeEvent( EdgeEvent const& aE CGAL_STSKEL_BUILDER_TRACE(3, "PrevLSeed=N" << lPrevLSeed->id() << " PrevE0=E" << lPrevE0->id() ) ; CGAL_STSKEL_BUILDER_TRACE(3, "NextRSeed=N" << lNextRSeed->id() << " NextE2=E" << lNextE2->id() ) ; - Oriented_side lLSide = EventPointOrientedSide(aEvent, lPrevE0, lE0 , lPrevLSeed, false ) ; - Oriented_side lRSide = EventPointOrientedSide(aEvent, lE2 , lNextE2, lNextRSeed, true ) ; - + CGAL_STSKEL_BUILDER_TRACE(3, "- Check left E" << lPrevE0->id() << " E" << lE0->id() << " N" << lPrevLSeed->id() ) ; + Oriented_side lLSide = EventPointOrientedSide(aEvent, lPrevE0, lE0, lPrevLSeed, false /*aE0isPrimary*/ ) ; bool lLSideOK = ( lLSide != ON_POSITIVE_SIDE ) ; - bool lRSideOK = ( lRSide != ON_NEGATIVE_SIDE ) ; + if ( ! lLSideOK ) + { + CGAL_STSKEL_BUILDER_TRACE(3, "Invalid edge event on the left side: " << aEvent.triedge() + << " NewNode is before E" << lE0->id() + << " source N" << lPrevLSeed->id() ) ; - CGAL_STSKEL_BUILDER_TRACE_IF( !lLSideOK - ,3 - ,"Invalid edge event: " << aEvent.triedge() << " NewNode is before E" << lE0->id() - << " source N" << lPrevLSeed->id() - ) ; + return false; + } - CGAL_STSKEL_BUILDER_TRACE_IF( !lRSideOK - ,3 - ,"Invalid edge event: " << aEvent.triedge() << " NewNode is past E" << lE2->id() - << " target N" << lNextRSeed->id() - ) ; + CGAL_STSKEL_BUILDER_TRACE(3, "- Check right E" << lE2->id() << " E" << lNextE2->id() << " N" << lNextRSeed->id() ) ; + Oriented_side lRSide = EventPointOrientedSide(aEvent, lE2, lNextE2, lNextRSeed, true /*aE0isPrimary*/ ) ; + bool lRSideOK = ( lRSide != ON_NEGATIVE_SIDE ) ; + if ( ! lRSideOK ) + { + CGAL_STSKEL_BUILDER_TRACE(3, "Invalid edge event on the right side: " << aEvent.triedge() + << " NewNode is past E" << lE2->id() + << " target N" << lNextRSeed->id() ) ; + } - rResult = lLSideOK && lRSideOK ; + return lRSideOK ; // lLSideOK is `true` if we are here } else { - // Triangle collapse. No need to test explicitely. - rResult = true ; + // Triangle collapse. No need to test explicitly. + return true ; } - return rResult ; } template @@ -1012,7 +1052,7 @@ void Straight_skeleton_builder_2::HandleEdgeEvent( EventPtr aEvent ) { EdgeEvent& lEvent = dynamic_cast(*aEvent) ; - CGAL_STSKEL_BUILDER_TRACE( 2, "Edge event." ); + CGAL_STSKEL_BUILDER_TRACE( 2, "\n== Edge event." ); if ( IsValidEdgeEvent(lEvent) ) { @@ -1051,7 +1091,7 @@ void Straight_skeleton_builder_2::HandleEdgeEvent( EventPtr aEvent ) SetBisectorSlope(lLSeed,lNewNode); SetBisectorSlope(lRSeed,lNewNode); - CGAL_STSKEL_BUILDER_TRACE( 1, "E" << e2str(*(lRSeed->halfedge()->defining_contour_edge())) << " collapsed." ); + CGAL_STSKEL_BUILDER_TRACE( 1, e2str(*(lRSeed->halfedge()->defining_contour_edge())) << " collapsed." ); CGAL_STSKEL_BUILDER_TRACE( 3, "fictitious node along collapsed face is N" << lRIFicNode->id() << " between " << e2str(*lROBisector) << " and " << e2str(*lLIBisector) ) ; @@ -1125,36 +1165,36 @@ void Straight_skeleton_builder_2::HandleSplitEvent( EventPtr aEvent, Ve Vertex_handle lOppL = aOpp.first ; Vertex_handle lOppR = aOpp.second ; + CGAL_USE(lOppL); - CGAL_STSKEL_BUILDER_TRACE( 4, "TriEdge e0 = " << e2str(*lEvent.triedge().e0()) ); - CGAL_STSKEL_BUILDER_TRACE( 4, "TriEdge e1 = " << e2str(*lEvent.triedge().e1()) ); - CGAL_STSKEL_BUILDER_TRACE( 4, "TriEdge e2 = " << e2str(*lEvent.triedge().e2()) ); - CGAL_STSKEL_BUILDER_TRACE( 4, "lOppL = " << v2str(*lOppL) ); - CGAL_STSKEL_BUILDER_TRACE( 4, "lOppR = " << v2str(*lOppR) ); - - Halfedge_handle lOppIBisector_L = lOppL->primary_bisector()->opposite(); Halfedge_handle lOppOBisector_R = lOppR->primary_bisector(); + Halfedge_handle lOppIBisector_L = lOppOBisector_R->next(); Vertex_handle lOppFicNode = lOppOBisector_R->vertex() ; (void)lOppFicNode; // variable may be unused - CGAL_assertion(lOppOBisector_R->next() == lOppIBisector_L ) ; - CGAL_assertion(lOppIBisector_L->prev() == lOppOBisector_R ) ; - CGAL_assertion(lOppFicNode->has_infinite_time()); + CGAL_STSKEL_BUILDER_TRACE( 4, "TriEdge e0 = " << e2str(*lEvent.triedge().e0()) ); + CGAL_STSKEL_BUILDER_TRACE( 4, "TriEdge e1 = " << e2str(*lEvent.triedge().e1()) ); + CGAL_STSKEL_BUILDER_TRACE( 4, "TriEdge e2 = " << e2str(*lEvent.triedge().e2()) ); + CGAL_STSKEL_BUILDER_TRACE( 4, "lOppL = " << v2str(*lOppL) ); + CGAL_STSKEL_BUILDER_TRACE( 4, "lOppR = " << v2str(*lOppR) ); + CGAL_STSKEL_BUILDER_TRACE( 4, "lOppLPrimary = " << e2str(*lOppL->primary_bisector()) ); + CGAL_STSKEL_BUILDER_TRACE( 4, "lOppRPrimary = " << e2str(*lOppR->primary_bisector()) ); - CGAL_STSKEL_BUILDER_TRACE(2,"Splitted face: N" << lOppR->id() + CGAL_STSKEL_BUILDER_TRACE(2,"Split face: N" << lOppR->id() << "->B" << lOppOBisector_R->id() << "->N" << lOppFicNode->id() << "->B" << lOppIBisector_L->id() - << "->N" << lOppL->id() - ) ; + << "->N" << lOppL->id()); CGAL_STSKEL_BUILDER_TRACE(2,"fictitious node for right half of opposite edge: N" << lOppFicNode->id() ) ; + CGAL_assertion(lOppFicNode->has_infinite_time()); + Halfedge_handle lOppBorder = lEvent.triedge().e2() ; Vertex_handle lNewNode_L, lNewNode_R ; - boost::tie(lNewNode_L,lNewNode_R) = ConstructSplitEventNodes(lEvent,lOppR); + std::tie(lNewNode_L,lNewNode_R) = ConstructSplitEventNodes(lEvent,lOppR); // Triedge lTriedge = aEvent->triedge(); @@ -1195,7 +1235,6 @@ void Straight_skeleton_builder_2::HandleSplitEvent( EventPtr aEvent, Ve Link(lNOBisector_L,lXOFicNode); - CrossLinkFwd(lXOBisector ,lNOBisector_L); CrossLinkFwd(lNOBisector_L ,lXONextBisector); CrossLinkFwd(lXIPrevBisector,lNIBisector_R); @@ -1380,7 +1419,7 @@ void Straight_skeleton_builder_2::HandlePseudoSplitEvent( EventPtr aEve CGAL_STSKEL_BUILDER_TRACE( 4, "LReed = " << v2str(*lRSeed) ); Vertex_handle lNewNode_L, lNewNode_R ; - boost::tie(lNewNode_L,lNewNode_R) = ConstructPseudoSplitEventNodes(lEvent); + std::tie(lNewNode_L,lNewNode_R) = ConstructPseudoSplitEventNodes(lEvent); Halfedge_handle lNBisector_LO = SSkelEdgesPushBack( Halfedge(mEdgeID ),Halfedge(mEdgeID+1) ); Halfedge_handle lNBisector_RO = SSkelEdgesPushBack( Halfedge(mEdgeID+2),Halfedge(mEdgeID+3) ); @@ -1532,16 +1571,16 @@ void Straight_skeleton_builder_2::Propagate() if ( !mPQ.empty() ) { #ifdef CGAL_SLS_PRINT_QUEUE_BEFORE_EACH_POP - std::cout << "MAIN QUEUE -------------------------------------------------- " << std::endl; - std::cout << "Queue size: " << mPQ.size() << std::endl; + CGAL_STSKEL_BUILDER_TRACE(4, "MAIN QUEUE -------------------------------------------------- "); + CGAL_STSKEL_BUILDER_TRACE(4, "Queue size: " << mPQ.size()); auto mpq = mPQ; while(!mpq.empty()) { EventPtr event = mpq.top(); mpq.pop(); - std::cout << *event << std::endl; + CGAL_STSKEL_BUILDER_TRACE(4, *event); } - std::cout << "END MAIN QUEUE --------------------------------------------- " << std::endl; + CGAL_STSKEL_BUILDER_TRACE(4, "END MAIN QUEUE --------------------------------------------- "); #endif EventPtr lEvent = PopEventFromPQ(); @@ -1549,11 +1588,12 @@ void Straight_skeleton_builder_2::Propagate() if ( lEvent->type() != Event::cEdgeEvent ) AllowNextSplitEvent(lEvent->seed0()); - CGAL_STSKEL_BUILDER_TRACE (3,"\nTentative Event: " << *lEvent << " at ID: " << mStepID) ; + CGAL_STSKEL_BUILDER_TRACE(3, " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " ); + CGAL_STSKEL_BUILDER_TRACE(3, "\n\tS" << mStepID << " Tentative Event: " << *lEvent ) ; if ( !IsProcessed(lEvent) ) { - CGAL_STSKEL_BUILDER_TRACE (1,"\nS" << mStepID << " Event: " << *lEvent ) ; + CGAL_STSKEL_BUILDER_TRACE (1,"\n\tS" << mStepID << " Event: " << *lEvent ) ; SetEventTimeAndPoint(*lEvent) ; @@ -1562,6 +1602,7 @@ void Straight_skeleton_builder_2::Propagate() case Event::cEdgeEvent : HandleEdgeEvent (lEvent) ; break ; case Event::cSplitEvent : HandleSplitOrPseudoSplitEvent(lEvent) ; break ; case Event::cPseudoSplitEvent: HandlePseudoSplitEvent (lEvent) ; break ; + default: CGAL_assertion(false); } ++ mStepID ; @@ -1581,7 +1622,7 @@ template void Straight_skeleton_builder_2::MergeSplitNodes ( Vertex_handle_pair aSplitNodes ) { Vertex_handle lLNode, lRNode ; - boost::tie(lLNode,lRNode)=aSplitNodes; + std::tie(lLNode,lRNode)=aSplitNodes; Halfedge_handle lIBisectorL1 = lLNode->primary_bisector()->opposite(); Halfedge_handle lIBisectorR1 = lRNode->primary_bisector()->opposite(); @@ -1634,7 +1675,7 @@ template void TraceMultinode( char const* t, Halfedge_handle b, Halfedge_handle e ) { std::ostringstream ss ; - ss.precision(19); + ss.precision(17); ss << t ; ss << "before: B" << b->prev()->id() << " N" << b->prev()->vertex()->id() << " Pt: " << b->prev()->vertex()->point() << "\n" ; @@ -1883,7 +1924,7 @@ template bool Straight_skeleton_builder_2::MergeCoincidentNodes() { // - // NOTE: This code might be executed on a topologically incosistent HDS, thus the need to check + // NOTE: This code might be executed on a topologically inconsistent HDS, thus the need to check // the structure along the way. // @@ -1893,16 +1934,16 @@ bool Straight_skeleton_builder_2::MergeCoincidentNodes() // // While circulating the bisectors along the face for edge Ei we find all those edges E* which // are or become consecutive to Ei during the wavefront propagation. Each bisector along the face: - // (Ei,Ea), (Ei,Eb), (Ei,Ec), etcc pairs Ei with such other edge. + // (Ei,Ea), (Ei,Eb), (Ei,Ec), etc pairs Ei with such other edge. // Between one bisector (Ei,Ea) and the next (Ei,Eb) there is skeleton node which represents // the collision between the 3 edges (Ei,Ea,Eb). - // It follows from the pairing that any skeleton node Ni, for example (Ei,Ea,Eb), neccesarily + // It follows from the pairing that any skeleton node Ni, for example (Ei,Ea,Eb), necessarily // shares two edges (Ei and Eb precisely) with any next skeleton node Ni+1 around the face. // That is, the triedge of defining edges that correspond to each skeleton node around the face follow this // sequence: (Ei,Ea,Eb), (Ei,Eb,Ec), (Ei,Ec,Ed), ... // // Any 2_ consecutive_ skeleton nodes around a face share 2 out of the 3 defining edges, which is one of the - // neccesary conditions for "coincidence". Therefore, coincident nodes can only come as consecutive along a face + // necessary conditions for "coincidence". Therefore, coincident nodes can only come as consecutive along a face // MultinodeVector lMultinodes ; @@ -1994,6 +2035,374 @@ bool Straight_skeleton_builder_2::MergeCoincidentNodes() return true; } +// For weighted skeletons of polygons with holes, one can create non-simply-connected skeleton faces. +// This is a problem both because it is not a valid HDS, and because we walk skeleton face borders +// in polygon offseting. We add so-called artificial nodes and bisectors to ensure that faces +// are simply-connected by shooting rays from the topmost vertex of the bisectors of the skeleton +// of the hole(s). +template +void Straight_skeleton_builder_2::EnforceSimpleConnectedness() +{ + CGAL_STSKEL_BUILDER_TRACE(1, "Ensuring simple connectedness..."); + + // Associates to contour halfedges a range of holes, each hole being represented by a halfedge + // pointing to the vertex farthest from the contour halfedge. + std::vector > skeleton_face_holes ( mContourHalfedges.size() ); + std::size_t max_id = std::prev(mSSkel->halfedges_end())->id(); + std::vector visited_halfedges (max_id + 1, false ); + + for ( Halfedge_handle h = mSSkel->halfedges_begin() ; h != mSSkel->halfedges_end() ; ++ h ) + { + if ( h->is_border() ) + continue; + + if ( visited_halfedges.at(h->id()) ) + continue; + + // Walk the halfedge cycle; if it doesn't contain its contour halfedge, then it is a hole + // in the skeleton face. + + Halfedge_handle contour_h = h->defining_contour_edge() ; + bool is_contour_h_in_boundary = false ; + + Halfedge_handle done = h; + do + { + visited_halfedges.at(h->id()) = true ; + + if ( h == contour_h ) + is_contour_h_in_boundary = true; + + h = h->next() ; + } + while ( h != done ); + + if ( is_contour_h_in_boundary ) + continue ; + + CGAL_STSKEL_BUILDER_TRACE(4, "Face incident to border E" << contour_h->id() << " has a hole at E" << h->id() ); + + // This is a hole, find the vertex of the hole that is farthest from the defining border + // as to ensure that the artificial bisectors will not intersect the hole + Halfedge_handle extreme_h = h ; + do + { + CGAL::Comparison_result res = CompareEvents( h->vertex() , extreme_h->vertex() ) ; + if ( res == CGAL::LARGER ) + extreme_h = h ; + + h = h->next() ; + } + while ( h != done ); + + CGAL_STSKEL_BUILDER_TRACE(4, "Extremum: E" << extreme_h->id() << " V" << extreme_h->vertex()->id() ); + + // contour halfedges are the first N *even* halfedges + skeleton_face_holes[ contour_h->id() / 2 ].push_back( extreme_h ) ; + } + + // For each face with hole(s), create the extra halfedges to bridge the gap between + // the skeleton face's border and the holes by shooting a ray from a vertex hole to a halfedge + // .first is the source of the ray + // .second is th event creating the intersection of the ray with an halfedge + + // Collect first for all faces, apply later because one might split + std::vector > artifical_events; + + for ( Halfedge_handle_vector_iterator contour_hi = mContourHalfedges.begin(); contour_hi != mContourHalfedges.end(); ++contour_hi ) + { + Halfedge_handle contour_h = *contour_hi; + std::vector& holes = skeleton_face_holes[contour_h->id() / 2]; + + if( holes.empty() ) + continue; + + const Direction_2 orth_dir = CreatePerpendicularDirection( contour_h ) ; + + CGAL_STSKEL_BUILDER_TRACE(4, "E" << contour_h->id() << " has " << holes.size() << " hole(s)." ); + + // First, order the holes such that extreme points (one by hole) are from closest + // to farthest from the contour border + std::sort( holes.begin(), holes.end(), + [this](Halfedge_handle h1, Halfedge_handle h2) + { + return CompareEvents( h1->vertex(), h2->vertex() ) == CGAL::SMALLER ; + } + ) ; + + // Shoot a ray from each hole's extreme point to find the closest halfedge of another hole + // or of the face's main contour + for(auto hole_hi = holes.begin(); hole_hi != holes.end(); ++hole_hi) + { + Halfedge_handle extreme_h = *hole_hi; + + typename K::Ray_2 r ( extreme_h->vertex()->point(), orth_dir ) ; + + CGAL_STSKEL_BUILDER_TRACE(4, "Shooting ray from " << extreme_h->vertex()->point() ); + + EventPtr closest_artificial_event = nullptr; + + auto test_halfedge = [&](const Halfedge_handle h) -> void + { + // @partial_wsls_pwh Don't compute an intersection with a halfedge incident to a fictitious vertex + if(h->vertex()->has_infinite_time() || h->prev()->vertex()->has_infinite_time()) + return; + + Triedge artificial_triedge(contour_h, contour_h, h); + Trisegment_2_ptr artificial_trisegment = CreateTrisegment(artificial_triedge, extreme_h->vertex()); + CGAL_assertion(bool(artificial_trisegment->child_l())); + + if(!ExistEvent(artificial_trisegment)) + return; + + EventPtr artificial_event = EventPtr(new ArtificialEvent(artificial_triedge, artificial_trisegment, extreme_h->vertex())); + if(closest_artificial_event == nullptr || + CompareEvents(artificial_event, closest_artificial_event) == CGAL::SMALLER) + { + closest_artificial_event = artificial_event; + } + }; + + // Seek an intersection with other holes. Only need to check holes that are farther + // than the one we are tracing from. + Halfedge_handle_vector_iterator hole_hj = std::next(hole_hi); + for(;;) + { + if(hole_hj == holes.end()) + break; + + // @todo same spatial searching required as in filtering bound computations + Halfedge_handle other_hole_done = *hole_hj, other_hole_h = *hole_hj; + do + { + test_halfedge(other_hole_h); + other_hole_h = other_hole_h->next() ; // next halfedge of the hole + } + while(other_hole_h != other_hole_done); + + // can't break yet: a yet farther hole might have a closer intersection + hole_hj = std::next(hole_hj) ; // next hole + } + + // Whether an intersection has been found or not, we still need to check with the border + // of the face, because it could be pinched and be closer than a hole + Halfedge_handle done = contour_h, h = contour_h->next(); // no point checking the contour edge + do + { + test_halfedge(h); + h = h->next() ; + } + while(h != done); + + // @partial_wsls_pwh support partial weighted skeleton of polygons with holes + // In partial skeletons, we might the face (and possibly even holes!) are not closed, + // so we could potentially not find a halfedge + CGAL_warning(closest_artificial_event != nullptr); + if(closest_artificial_event != nullptr) + { + SetEventTimeAndPoint(*closest_artificial_event); + artifical_events.emplace_back(extreme_h, closest_artificial_event); + } + } // holes + } // contours + + CGAL_STSKEL_BUILDER_TRACE(2, artifical_events.size() << " artificial events to add"); + + // Splits need to be sorted right to left such that consecutive splits do not tangle the HDS + // Since we can have splits from both side of an edge, we sort events globally + std::sort(artifical_events.begin(), artifical_events.end(), + [&](const auto& e1, const auto& e2) + { + EventPtr artificial_event_1 = e1.second; + EventPtr artificial_event_2 = e2.second; + + Halfedge_handle split_h_1 = artificial_event_1->triedge().e2(); + Halfedge_handle split_h_2 = artificial_event_2->triedge().e2(); + Halfedge_handle canonical_split_h_1 = (split_h_1->id() < split_h_1->opposite()->id()) ? split_h_1 : split_h_1->opposite(); + Halfedge_handle canonical_split_h_2 = (split_h_2->id() < split_h_2->opposite()->id()) ? split_h_2 : split_h_2->opposite(); + + bool is_same_edge = (canonical_split_h_1 == canonical_split_h_2); + if(!is_same_edge) + return canonical_split_h_1->id() < canonical_split_h_2->id(); // arbitrary + + Halfedge_handle contour_h = canonical_split_h_1->defining_contour_edge(); + + // @fixme this should be a predicate... + const Point_2& split_p_1 = artificial_event_1->point(); + const Point_2& split_p_2 = artificial_event_2->point(); + + return K().left_turn_2_object()( contour_h->vertex()->point(), split_p_1, split_p_2 ); + } ); + + // Apply the splits + + /* + + <---------------- <--------- <---------- + split_h split_h | | split_h_prev + new_up_h | | new_down_h + . | | + / \ -----> / \ +extreme_h / \ extreme_h / \ + / \ / \ + + */ + + for(const auto& e : artifical_events) + { + Halfedge_handle extreme_h = e.first; + EventPtr artificial_event = e.second; + + // Halfedge_handle contour_h = artificial_event->triedge().e0() ; + + Halfedge_handle split_h = artificial_event->triedge().e2() ; + Halfedge_handle split_h_prev = split_h->prev() ; + Halfedge_handle split_h_next = split_h->next() ; + Halfedge_handle split_h_opp = split_h->opposite() ; + Halfedge_handle split_h_opp_prev = split_h_opp->prev() ; + Halfedge_handle split_h_opp_next = split_h_opp->next() ; + + Vertex_handle split_h_sv = split_h_opp->vertex() ; + Vertex_handle split_h_tv = split_h->vertex() ; + + Halfedge_handle extreme_h_next = extreme_h->next() ; + + const Point_2& split_p = artificial_event->point() ; + FT split_t = artificial_event->time() ; + + CGAL_STSKEL_BUILDER_TRACE(4, "Splitting E" << split_h->id() << " at pos " << split_p << " time " << split_t ); + + // Create the new "vertical" (w.r.t. the contour edge) halfedges + Halfedge new_up(mEdgeID++), new_down(mEdgeID++); + Halfedge_handle new_up_h = SSkelEdgesPushBack(new_up, new_down); + Halfedge_handle new_down_h = new_up_h->opposite(); + + SetBisectorSlope(new_up_h, POSITIVE); + SetBisectorSlope(new_down_h, NEGATIVE); + + new_down_h->HBase_base::set_vertex( extreme_h->vertex() ); + new_up_h->HBase_base::set_face( extreme_h->face() ); + new_down_h->HBase_base::set_face( extreme_h->face() ); + + new_down_h->HBase_base::set_next( extreme_h_next ); + extreme_h_next->HBase_base::set_prev( new_down_h ); + extreme_h->HBase_base::set_next( new_up_h ); + new_up_h->HBase_base::set_prev( extreme_h ); + + if(split_p == split_h_tv->point()) + { + new_up_h->HBase_base::set_vertex( split_h_tv ); + + new_up_h->HBase_base::set_next( split_h_next ); + split_h_next->HBase_base::set_prev( new_up_h ); + + split_h->HBase_base::set_next( new_down_h ); + new_down_h->HBase_base::set_prev( split_h ); + } + else if (split_p == split_h_sv->point()) + { + new_up_h->HBase_base::set_vertex( split_h_sv ); + + new_up_h->HBase_base::set_next( split_h ); + split_h->HBase_base::set_prev( new_up_h ); + + new_down_h->HBase_base::set_prev( split_h_prev ); + split_h_prev->HBase_base::set_next( new_down_h ); + } + else + { + // Create the new artificial vertex + Vertex_handle new_v = mSSkel->SSkel::Base::vertices_push_back( Vertex (mVertexID++, split_p, split_t, false, false) ) ; + InitVertexData(new_v); + + // This is not a valid triedge because split_h is not a contour halfedge, but we need + // to know which skeleton bisector the line orthogonal to contour_h interscets. + // The pair of identical contour halfedges at e0 and e1 is the marker for artifical vertices + SetVertexTriedge(new_v, artificial_event->triedge()); + SetTrisegment(new_v, artificial_event->trisegment()); + + new_up_h->HBase_base::set_vertex( new_v ) ; + new_v->VBase::set_halfedge( new_up_h ) ; + + // Split the halfedge + + Halfedge new_horizontal(mEdgeID++), new_horizontal_opp(mEdgeID++) ; // split new prev + Halfedge_handle new_hor_h = SSkelEdgesPushBack(new_horizontal, new_horizontal_opp) ; + + SetBisectorSlope(new_hor_h, split_h->slope() ); + SetBisectorSlope(new_hor_h->opposite(), split_h_opp->slope() ); + + new_hor_h->HBase_base::set_face( split_h->face() ); + new_hor_h->opposite()->HBase_base::set_face( split_h_opp->face() ); + + // A skeleton edge might be split from both sides, so we have previously ordered + // these artificial vertices from the right to the left, and we want split_h/split_h_opp + // to remain on the leftmost when looking from the canonical halfedge's side. + // Thus: + // - if we are on the canonical halfedge, split_h is on the left after the split + // - if we are not on the canonical halfedge, split_h is on the right after the split + Halfedge_handle left_h, right_h; + if(split_h->id() < split_h_opp->id()) + { + left_h = split_h; + right_h = new_hor_h; + } + else + { + left_h = new_hor_h; + right_h = split_h; + } + + Halfedge_handle left_h_opp = left_h->opposite(); + Halfedge_handle right_h_opp = right_h->opposite(); + + CGAL_STSKEL_BUILDER_TRACE(4, "Split actors\n" + << " left_h: H" << left_h->id() << "\n" + << " right_h: H" << right_h->id() << "\n" + << " left_h_opp: H" << left_h_opp->id() << "\n" + << " right_h_opp: H" << right_h_opp->id()); + + // Update the canonical halfedge of the vertices only if they are not contour vertices + if(!split_h_sv->is_contour()) + split_h_sv->VBase::set_halfedge( right_h_opp ) ; + if(!split_h_tv->is_contour()) + split_h_tv->VBase::set_halfedge( left_h ) ; + + // vertex incidences + right_h->HBase_base::set_vertex( new_v ); + right_h_opp->HBase_base::set_vertex( split_h_sv ); + left_h->HBase_base::set_vertex( split_h_tv ); + left_h_opp->HBase_base::set_vertex( new_v ); + + new_up_h->HBase_base::set_next( left_h ); + left_h->HBase_base::set_prev( new_up_h ); + + left_h->HBase_base::set_next( split_h_next ); + split_h_next->HBase_base::set_prev( left_h ); + + split_h_opp_prev->HBase_base::set_next( left_h_opp ); + left_h_opp->HBase_base::set_prev( split_h_opp_prev ); + + left_h_opp->HBase_base::set_next( right_h_opp ); + right_h_opp->HBase_base::set_prev( left_h_opp ); + + right_h_opp->HBase_base::set_next( split_h_opp_next ); + split_h_opp_next->HBase_base::set_prev( right_h_opp ); + + split_h_prev->HBase_base::set_next( right_h ); + right_h->HBase_base::set_prev( split_h_prev ); + + right_h->HBase_base::set_next( new_down_h ); + new_down_h->HBase_base::set_prev( right_h ); + + CGAL_STSKEL_BUILDER_TRACE(4, "New vertex V" << new_v->id() << " at position " << new_v->point() + << " [between V" << split_h_sv->id() << " and V" << split_h_tv->id() << "]" + << " at time " << new_v->time() + << " [between " << split_h_sv->time() << " and " << split_h_tv->time() << "]" ); + } + } +} + template bool Straight_skeleton_builder_2::FinishUp() { @@ -2006,15 +2415,11 @@ bool Straight_skeleton_builder_2::FinishUp() ,[this](Vertex_handle_pair p){ this->MergeSplitNodes(p); } ) ; - std::for_each( mDanglingBisectors.begin() - ,mDanglingBisectors.end () - ,[this](Halfedge_handle db){ this->EraseBisector(db); } - ) ; // MergeCoincidentNodes() locks all extremities of halfedges that have a vertex involved in a multinode. // However, both extremities might have different (combinatorially and geometrically) vertices. // With a single pass, it would prevent one of the extremities from being properly simplified. - // The simpliest is to just run it again as the skeleton structure is small compared to the rest + // The simplest is to just run it again as the skeleton structure is small compared to the rest // of the algorithm. for(;;) { @@ -2022,9 +2427,13 @@ bool Straight_skeleton_builder_2::FinishUp() break; } + // For weighted polygons with holes, some faces might not be simply connected. In this case, + // add extra, manually constructed bisectors to ensure that this property is present in all faces + EnforceSimpleConnectedness(); + mVisitor.on_cleanup_finished(); - // @todo if 'mMaxTime' is sufficiently large, it will be a full skeleton and should be validated as such + // If 'mMaxTime' is sufficiently large, it will be a full skeleton and could be validated as such... if(mMaxTime) // might be a partial skeleton return mSSkel->is_valid(true); else @@ -2062,6 +2471,7 @@ typename Straight_skeleton_builder_2::SSkelPtr Straight_skeleton_builde if ( !ok ) { CGAL_STSKEL_BUILDER_TRACE(0,"Invalid result."); + if ( aNull_if_failed ) mSSkel = SSkelPtr() ; } diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_events_2.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_events_2.h index 4f26fee2..a3183865 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_events_2.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_events_2.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_events_2.h $ -// $Id: Straight_skeleton_builder_events_2.h 4d85f84 2020-09-29T20:00:27+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_events_2.h $ +// $Id: include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_events_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -15,8 +15,6 @@ #include -#include - #include namespace CGAL { @@ -24,17 +22,14 @@ namespace CGAL { namespace CGAL_SS_i { template -class Event_2 : public Ref_counted_base +class Event_2 { typedef SSkel_ SSkel ; typedef Traits_ Traits ; public: - typedef Event_2 Self ; - typedef boost::intrusive_ptr SelfPtr ; - typedef typename Traits::Point_2 Point_2 ; typedef typename Traits::FT FT ; typedef typename Traits::Trisegment_2_ptr Trisegment_2_ptr ; @@ -46,7 +41,7 @@ class Event_2 : public Ref_counted_base typedef CGAL_SS_i::Triedge Triedge ; - enum Type { cEdgeEvent, cSplitEvent, cPseudoSplitEvent } ; + enum Type { cEdgeEvent, cSplitEvent, cPseudoSplitEvent, cArficialEvent } ; public: @@ -178,7 +173,7 @@ private : virtual void dump ( std::ostream& ss ) const { this->Base::dump(ss); - ss << " (Split Event, Seed=" << mSeed->id() << " (" << mSeed->point() << ") OppBorder=" << this->triedge().e2()->id() << ')' ; + ss << " (Split Event, Seed=" << mSeed->id() << " pos=(" << mSeed->point() << ") OppBorder=" << this->triedge().e2()->id() << ')' ; } private : @@ -247,6 +242,48 @@ private : bool mOppositeIs0 ; } ; + +template +class Artificial_event_2 : public Event_2 +{ + typedef SSkel_ SSkel ; + typedef Traits_ Traits ; + + typedef Event_2 Base ; + + typedef typename SSkel::Halfedge_handle Halfedge_handle ; + typedef typename SSkel::Vertex_handle Vertex_handle ; + + typedef typename Base::Type Type ; + typedef typename Base::Triedge Triedge ; + typedef typename Base::Trisegment_2_ptr Trisegment_2_ptr ; + +public: + Artificial_event_2 ( Triedge const& aTriedge, + Trisegment_2_ptr const& aTrisegment, + Vertex_handle aSeed ) + : + Base(aTriedge,aTrisegment) + , mSeed(aSeed) + {} + + virtual Type type() const { return this->cArficialEvent ; } + + virtual Vertex_handle seed0() const { return mSeed ; } + virtual Vertex_handle seed1() const { return mSeed ; } + +private : + virtual void dump ( std::ostream& ss ) const + { + this->Base::dump(ss); + + ss << " (Artificial Event, Seed=" << mSeed->id() << ")" ; + } + +private : + Vertex_handle mSeed ; +}; + } } // end namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h index db515a8b..23d14a4f 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h $ -// $Id: Straight_skeleton_builder_traits_2_aux.h c38ff2b 2023-01-04T16:26:31+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h $ +// $Id: include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -25,24 +25,22 @@ #include #include #include +#include -#include -#include -#include -#include #include #include #include #include #include +#include namespace CGAL { namespace CGAL_SS_i { template -T const& validate ( boost::optional const& o ) +T const& validate ( std::optional const& o ) { if ( !o ) throw std::overflow_error("Arithmetic overflow"); @@ -57,17 +55,16 @@ NT const& validate( NT const& n ) return n ; } -// boost::make_optional is provided in Boost >= 1.34, but not before, so we define our own versions here. template -boost::optional cgal_make_optional( T const& v ) +std::optional cgal_make_optional( T const& v ) { - return boost::optional(v) ; + return std::optional(v) ; } template -boost::optional cgal_make_optional( bool cond, T const& v ) +std::optional cgal_make_optional( bool cond, T const& v ) { - return cond ? boost::optional(v) : boost::optional() ; + return cond ? std::optional(v) : std::optional() ; } template @@ -115,10 +112,23 @@ class Exceptionless_filtered_construction has_smaller_relative_precision(point.y(), precision); } - bool has_enough_precision(const boost::tuple& time_and_point, double precision) const + bool has_enough_precision(const std::tuple& time_and_point, double precision) const { - return has_smaller_relative_precision(boost::get<0>(time_and_point), precision) && - has_enough_precision(boost::get<1>(time_and_point), precision); + return has_smaller_relative_precision(std::get<0>(time_and_point), precision) && + has_enough_precision(std::get<1>(time_and_point), precision); + } + + bool has_enough_precision(const CGAL::Trisegment_2 >& trisegment, double precision) const + { + return has_enough_precision(trisegment.e0().source(), precision) && + has_enough_precision(trisegment.e0().target(), precision) && + has_smaller_relative_precision(trisegment.w0(), precision) && + has_enough_precision(trisegment.e1().source(), precision) && + has_enough_precision(trisegment.e1().target(), precision) && + has_smaller_relative_precision(trisegment.w1(), precision) && + has_enough_precision(trisegment.e2().source(), precision) && + has_enough_precision(trisegment.e2().target(), precision) && + has_smaller_relative_precision(trisegment.w2(), precision); } public: @@ -190,89 +200,41 @@ class Rational NT mN, mD ; } ; -template -struct No_cache -{ - bool IsCached ( std::size_t ) { return false; } - - Info Get ( std::size_t ) - { - CGAL_error(); - return Info(); - } - - void Set ( std::size_t, Info const& ) { } - void Reset ( std::size_t ) { } -}; // Debug struct template struct FPU_checker; -template -struct FPU_checker > > +template +struct FPU_checker > > { static bool is_valid() { - return !std::is_same >::value || + return !std::is_same >::value || FPU_get_cw() == CGAL_FE_UPWARD; } }; -template -struct FPU_checker > > +template +struct FPU_checker > > { static bool is_valid() { - return !std::is_same >::value || + return !std::is_same >::value || FPU_get_cw() == CGAL_FE_UPWARD; } }; -//TODO: call reserve, but how? #input vertices + n*m estimation? -template -struct Info_cache +template +struct FPU_checker > > { - std::vector mValues ; - std::vector mAlreadyComputed ; - - bool IsCached ( std::size_t i ) - { - return ( (mAlreadyComputed.size() > i) && mAlreadyComputed[i] ) ; - } - - Info const& Get(std::size_t i) - { - CGAL_precondition ( IsCached(i) ) ; - CGAL_precondition ( FPU_checker::is_valid() ) ; - return mValues[i] ; - } - - void Set ( std::size_t i, Info const& aValue) - { - CGAL_precondition ( FPU_checker::is_valid() ) ; - if (mValues.size() <= i ) - { - mValues.resize(i+1) ; - mAlreadyComputed.resize(i+1, false) ; - } - - mAlreadyComputed[i] = true ; - mValues[i] = aValue ; - } - - void Reset ( std::size_t i ) + static bool is_valid() { - if ( IsCached(i) ) // needed if approx info is set but not exact info - mAlreadyComputed[i] = false ; + return !std::is_same >::value || + FPU_get_cw() == CGAL_FE_UPWARD; } }; -template -using Time_cache = Info_cache< boost::optional< CGAL_SS_i::Rational< typename K::FT > > > ; - -template -using Coeff_cache = Info_cache< boost::optional< Line_2 > > ; template struct Functor_base_2 @@ -312,20 +274,20 @@ struct SS_converter : Converter typedef Trisegment_2 Source_trisegment_2 ; typedef Trisegment_2 Target_trisegment_2 ; - typedef boost::tuple Source_time_and_point_2 ; - typedef boost::tuple Target_time_and_point_2 ; + typedef std::tuple Source_time_and_point_2 ; + typedef std::tuple Target_time_and_point_2 ; - typedef boost::optional Source_opt_FT ; - typedef boost::optional Target_opt_FT ; + typedef std::optional Source_opt_FT ; + typedef std::optional Target_opt_FT ; - typedef boost::optional Source_opt_point_2 ; - typedef boost::optional Target_opt_point_2 ; + typedef std::optional Source_opt_point_2 ; + typedef std::optional Target_opt_point_2 ; - typedef boost::optional Source_opt_time_and_point_2 ; - typedef boost::optional Target_opt_time_and_point_2 ; + typedef std::optional Source_opt_time_and_point_2 ; + typedef std::optional Target_opt_time_and_point_2 ; - typedef boost::optional Source_opt_segment_2 ; - typedef boost::optional Target_opt_segment_2 ; + typedef std::optional Source_opt_segment_2 ; + typedef std::optional Target_opt_segment_2 ; typedef typename Source_trisegment_2::Self_ptr Source_trisegment_2_ptr ; typedef typename Target_trisegment_2::Self_ptr Target_trisegment_2_ptr ; @@ -359,7 +321,7 @@ struct SS_converter : Converter { Source_FT t ; Source_point_2 p ; - boost::tie(t,p) = v ; + std::tie(t,p) = v ; return Target_time_and_point_2(cvt_n(t),cvt_p(p)); } @@ -368,8 +330,11 @@ struct SS_converter : Converter CGAL_precondition( tri!= Source_trisegment_2_ptr() ) ; return Target_trisegment_2_ptr ( new Target_trisegment_2(cvt_s(tri->e0()) + ,cvt_n(tri->w0()) ,cvt_s(tri->e1()) + ,cvt_n(tri->w1()) ,cvt_s(tri->e2()) + ,cvt_n(tri->w2()) ,tri->collinearity() ,tri->id() ) @@ -449,9 +414,10 @@ struct SS_converter : Converter }; BOOST_MPL_HAS_XXX_TRAIT_DEF(Filters_split_events_tag) +BOOST_MPL_HAS_XXX_TRAIT_DEF(Protector) BOOST_MPL_HAS_XXX_TRAIT_DEF(Segment_2_with_ID) -template ::value> +template ::value> struct Get_protector{ struct type{}; }; template @@ -460,29 +426,7 @@ struct Get_protector typedef typename GT::Protector type; }; - } // namespace CGAL_SS_i +} // namespace CGAL - -// -// This macro defines a global functor adapter which allows users to use it in the followig ways: -// -// Given a 'Functor' provided by a given 'Traits' (or Kernel): -// -// typedef typename CGAL::Functor::type Functor ; -// result r = CGAL::Functor(traits)(a,b,c); -// -#define CGAL_STRAIGHT_SKELETON_CREATE_FUNCTOR_ADAPTER(functor) \ - template \ - typename K :: functor functor ( K const& aK ) \ - { \ - return aK.get((typename K :: functor const*)0); \ - } - - -} // end namespace CGAL - - -#endif // CGAL_STRAIGHT_SKELETON_BUILDER_TRAITS_2_AUX_H // - -// EOF // +#endif // CGAL_STRAIGHT_SKELETON_BUILDER_TRAITS_2_AUX_H diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_caches.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_caches.h new file mode 100644 index 00000000..48a4bf8b --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_caches.h @@ -0,0 +1,129 @@ +// Copyright (c) 2006 Fernando Luis Cacciola Carballal. All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_caches.h $ +// $Id: include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_caches.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Fernando Cacciola +// +#ifndef CGAL_STRAIGHT_SKELETON_BUILDER_TRAITS_2_CACHES_H +#define CGAL_STRAIGHT_SKELETON_BUILDER_TRAITS_2_CACHES_H + +#include + +#include + +#include + +#include + +namespace CGAL { +namespace CGAL_SS_i { + +template +struct FPU_checker; + +template +class Rational; + +template +struct No_cache +{ + bool IsCached ( std::size_t ) const { return false; } + + Info Get ( std::size_t ) const + { + CGAL_error(); + return Info(); + } + + void Set ( std::size_t, Info const& ) { } + void Reset ( std::size_t ) { } +}; + +//TODO: call reserve, but how? #input vertices + n*m estimation? +template +struct Info_cache +{ + std::vector mValues ; + std::vector mAlreadyComputed ; + + bool IsCached ( std::size_t i ) const + { + return ( (mAlreadyComputed.size() > i) && mAlreadyComputed[i] ) ; + } + + Info const& Get(std::size_t i) const + { + CGAL_precondition ( IsCached(i) ) ; + CGAL_precondition ( FPU_checker::is_valid() ) ; + return mValues[i] ; + } + + void Set ( std::size_t i, Info const& aValue) + { + CGAL_precondition ( FPU_checker::is_valid() ) ; + if (mValues.size() <= i ) + { + mValues.resize(i+1) ; + mAlreadyComputed.resize(i+1, false) ; + } + + mAlreadyComputed[i] = true ; + mValues[i] = aValue ; + } + + void Reset ( std::size_t i ) + { + if ( IsCached(i) ) // needed if approx info is set but not exact info + mAlreadyComputed[i] = false ; + } +}; + +template +using Coeff_cache = Info_cache > ; + +template +using Time_cache = Info_cache > > ; + +template +using Point_cache = Info_cache > ; + +template +struct Caches +{ + void Reset ( std::size_t i ) + { + // !WARNING! subtlety here: + // - The coefficient caches are attached to *contour edge IDs*. + // There is never any reason to reset coefficient caches because the geometry does not change. + // - The time and point caches are attached to *trisegment IDs* + // There is a reason to reset trisegment caches to not waste memory when a trisegment is ignored. + // + // mCoeff_cache.Reset(i) ; + + mTime_cache.Reset(i) ; + mPoint_cache.Reset(i) ; + } + + Coeff_cache mCoeff_cache; + Time_cache mTime_cache; + Point_cache mPoint_cache; +}; + +template +struct No_caches +{ + void Reset ( std::size_t ) { } + + No_cache > mCoeff_cache; + No_cache > > mTime_cache; + No_cache > mPoint_cache; +}; + +} // namespace CGAL_SS_i +} // namespace CGAL + +#endif // CGAL_STRAIGHT_SKELETON_BUILDER_TRAITS_2_CACHES_H diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/assertions.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/assertions.h index 61853eb5..6f983d4b 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/assertions.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/assertions.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/assertions.h $ -// $Id: assertions.h 07120b8 2020-12-04T17:43:14+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/assertions.h $ +// $Id: include/CGAL/Straight_skeleton_2/assertions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -15,18 +15,6 @@ #include -#if defined(CGAL_STRAIGHT_SKELETON_NO_POSTCONDITIONS) \ - || defined(CGAL_NO_POSTCONDITIONS) \ - || (!defined(CGAL_STRAIGHT_SKELETON_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) -# define CGAL_stskel_expensive_postcondition(EX) (static_cast(0)) -# define CGAL_stskel_expensive_postcondition_msg(EX,MSG) (static_cast(0)) -# define CGAL_stskel_expensive_postcondition_code(CODE) -#else -# define CGAL_stskel_expensive_postcondition(EX) (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__)) -# define CGAL_stskel_expensive_postcondition_msg(EX,MSG) (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG)) -# define CGAL_stskel_expensive_postcondition_code(CODE) CODE -#endif - namespace CGAL { @@ -44,4 +32,3 @@ template inline bool handle_assigned ( Handle const& aH ) #endif // CGAL_STRAIGHT_SKELETON_ASSERTIONS_H // // EOF // - diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/debug.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/debug.h index 2191549e..1e40c10b 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/debug.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/debug.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/debug.h $ -// $Id: debug.h b1b7cac 2023-01-04T16:26:09+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/debug.h $ +// $Id: include/CGAL/Straight_skeleton_2/debug.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -18,37 +18,20 @@ #ifdef CGAL_USE_CORE # include #endif +#include -#if defined(CGAL_STRAIGHT_SKELETON_ENABLE_TRACE) \ - || defined(CGAL_POLYGON_OFFSET_ENABLE_TRACE) \ - || defined(CGAL_STRAIGHT_SKELETON_TRAITS_ENABLE_TRACE) \ - || defined(CGAL_STRAIGHT_SKELETON_ENABLE_VALIDITY_TRACE) \ - || defined(CGAL_STRAIGHT_SKELETON_ENABLE_INTRINSIC_TESTING) -# -# define CGAL_STSKEL_TRACE_ON -bool sEnableTrace = true ; -# define CGAL_STSKEL_ENABLE_TRACE sEnableTrace = true ; -# define CGAL_STSKEL_DISABLE_TRACE sEnableTrace = false ; -# include -# include -# include -# include -# define CGAL_STSKEL_TRACE(m) \ - if ( sEnableTrace ) \ - { \ - std::ostringstream ss ; \ - ss << std::setprecision(19) << m ; \ - std::string s = ss.str(); \ - Straight_skeleton_external_trace(s); \ - } +#include -#include -#include +#include +#include +#include +#include template -inline std::string o2str( boost::optional const& o ) +inline std::string o2str( std::optional const& o ) { - std::ostringstream ss ; ss << std::setprecision(19) ; + std::ostringstream ss ; + ss << std::setprecision(17) ; if ( o ) ss << *o ; else ss << "·NONE·" ; @@ -56,12 +39,14 @@ inline std::string o2str( boost::optional const& o ) } template -inline std::string ptr2str( boost::intrusive_ptr const& ptr ) +inline std::string ptr2str( std::shared_ptr const& ptr ) { - std::ostringstream ss ; ss << std::setprecision(19) ; + std::ostringstream ss ; + ss << std::setprecision(17) ; if ( ptr ) - ss << *ptr ; - else ss << "·nullptr·" ; + ss << *ptr ; + else + ss << "·nullptr·" ; return ss.str(); } @@ -69,14 +54,12 @@ template inline std::string n2str( N const& n ) { std::ostringstream ss ; - ss << std::setprecision(19); - ss << CGAL_NTS to_double(n); + ss << std::setprecision(17); + ss << n; return ss.str(); } - #if 0 //CGAL_USE_CORE - inline CORE::BigFloat to_big_float( CGAL::MP_Float const& n ) { return n.to_rational() ; @@ -97,10 +80,10 @@ inline CORE::BigFloat to_big_float( NT const& n ) return CORE::BigFloat( CGAL_NTS to_double(n) ) ; } - inline std::string n2str( CGAL::MP_Float const& n ) { std::ostringstream ss ; + ss << std::setprecision(17) ; ss << to_big_float(n) ; return ss.str(); } @@ -108,21 +91,24 @@ inline std::string n2str( CGAL::MP_Float const& n ) inline std::string n2str( CGAL::Quotient< CGAL::MP_Float > const& n ) { std::ostringstream ss ; + ss << std::setprecision(17) ; ss << to_big_float(n) ; return ss.str(); } #else inline std::string n2str( CGAL::MP_Float const& n ) { - std::ostringstream ss ; ss << std::setprecision(19) ; - ss << CGAL_NTS to_double(n) ; + std::ostringstream ss ; + ss << std::setprecision(17) ; + ss << n ; return ss.str(); } inline std::string n2str( CGAL::Quotient< CGAL::MP_Float > const& n ) { - std::ostringstream ss ; ss << std::setprecision(19) ; - ss << CGAL_NTS to_double(n) ; + std::ostringstream ss ; + ss << std::setprecision(17) ; + ss << n ; return ss.str(); } #endif @@ -156,7 +142,8 @@ inline std::string op2str( OP const& op ) template inline std::string v2str( V const& v ) { - std::ostringstream ss ; ss << std::setprecision(19) ; + std::ostringstream ss ; + ss << std::setprecision(17) ; ss << "V" << v.id() << " " << p2str(v.point()) << " [" << v.time() << "]" ; return ss.str(); } @@ -181,7 +168,8 @@ inline std::string s2str( S const& seg ) { return s2str(seg.source(),seg.target( template inline std::string e2str( E const& e ) { - std::ostringstream ss ; ss << std::setprecision(19) ; + std::ostringstream ss ; + ss << std::setprecision(17) ; if ( e.is_bisector() ) { ss << "B" << e.id() @@ -215,7 +203,7 @@ inline std::string newb2str( char const* name, BH const& b ) << " is B" << b->id() << " [E" << b->defining_contour_edge()->id() << ",E" << b->opposite()->defining_contour_edge()->id() - << "] {N" << b->prev()->opposite()->vertex()->id() + << "] {N" << b->prev()->prev()->vertex()->id() << "->B" << b->prev()->id() << "->N" << b->prev()->vertex()->id() << "->B" << b->id() @@ -231,6 +219,7 @@ template inline std::string newn2str( char const* name, VH const& v, Triedge const& aTriedge ) { std::ostringstream ss ; + ss << std::setprecision(17) ; ss << "New Node " << name <<" is N" << v->id() << " at " << v->point() << " [E" << aTriedge.e0()->id() @@ -242,6 +231,28 @@ inline std::string newn2str( char const* name, VH const& v, Triedge const& aTrie return ss.str(); } +#if defined(CGAL_STRAIGHT_SKELETON_ENABLE_TRACE) \ + || defined(CGAL_POLYGON_OFFSET_ENABLE_TRACE) \ + || defined(CGAL_STRAIGHT_SKELETON_TRAITS_ENABLE_TRACE) \ + || defined(CGAL_STRAIGHT_SKELETON_VALIDITY_ENABLE_TRACE) +# +# define CGAL_STSKEL_TRACE_ON +bool sEnableTrace = true ; +# define CGAL_STSKEL_ENABLE_TRACE sEnableTrace = true ; +# define CGAL_STSKEL_DISABLE_TRACE sEnableTrace = false ; +# include +# include +# include +# include +# define CGAL_STSKEL_TRACE(m) \ + if ( sEnableTrace ) \ + { \ + std::ostringstream ss ; \ + ss << std::setprecision(17) << m ; \ + std::string s = ss.str(); \ + Straight_skeleton_external_trace(s); \ + } + #endif #ifdef CGAL_STRAIGHT_SKELETON_ENABLE_TRACE @@ -271,6 +282,7 @@ bool sEnableTraitsTrace = true; if ( sEnableTraitsTrace ) \ { \ std::ostringstream ss ; \ + ss << std::setprecision(17) ; \ ss << m ; \ std::string s = ss.str(); \ Straight_skeleton_traits_external_trace(s); \ @@ -283,7 +295,7 @@ bool sEnableTraitsTrace = true; #endif -#ifdef CGAL_STRAIGHT_SKELETON_ENABLE_VALIDITY_TRACE +#ifdef CGAL_STRAIGHT_SKELETON_VALIDITY_ENABLE_TRACE # define CGAL_STSKEL_VALIDITY_TRACE(m) CGAL_STSKEL_TRACE(m) # define CGAL_STSKEL_VALIDITY_TRACE_IF(cond,m) if ( cond ) CGAL_STSKEL_VALIDITY_TRACE(m) #else diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/test.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/test.h index 788f48c9..2cf9fa5a 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/test.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_2/test.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/test.h $ -// $Id: test.h 655d427 2020-09-11T15:00:12+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/test.h $ +// $Id: include/CGAL/Straight_skeleton_2/test.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -18,30 +18,6 @@ #include #include -// -// INTRINSIC UNIT TESTING macros. -// -// These are OFF by default and should only be turn on by the testsuite. -// - -// -// These are assertions that may not be true unless certain external conditions are met, such as the kernel -// beigng exact or the input being specifically designed to be non-degenerate, avoid significant round-off, etc. -// -#ifdef CGAL_STRAIGHT_SKELETON_ENABLE_INTRINSIC_TESTING -# define CGAL_stskel_intrinsic_test_assertion(EX) ((EX)?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, 0)) -# define CGAL_stskel_intrinsic_test_assertion_msg(EX,MSG) ((EX)?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG)) -# define CGAL_stskel_intrinsic_test_assertion_code(CODE) CODE -# define CGAL_stskel_intrinsic_test_trace(m) std::cerr << m << std::endl -# define CGAL_stskel_intrinsic_test_trace_if(EX,m) if ( (EX) ) { std::cerr << m << std::endl ; } -#else -# define CGAL_stskel_intrinsic_test_assertion(EX) (static_cast(0)) -# define CGAL_stskel_intrinsic_test_assertion_msg(EX,MSG) (static_cast(0)) -# define CGAL_stskel_intrinsic_test_assertion_code(CODE) -# define CGAL_stskel_intrinsic_test_trace(m) -# define CGAL_stskel_intrinsic_test_trace_if(EX,m) -#endif - namespace CGAL { namespace CGAL_SS_i { diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_builder_2.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_builder_2.h index d6fca2b2..0fad7872 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_builder_2.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_builder_2.h @@ -3,8 +3,8 @@ // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h $ -// $Id: Straight_skeleton_builder_2.h b2d562e 2023-01-04T16:38:15+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h $ +// $Id: include/CGAL/Straight_skeleton_builder_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -22,17 +22,14 @@ #include #include -#include -#include -#include -#include #include #include #include #include -#include #include +#include +#include #include #include #include @@ -111,7 +108,7 @@ class Straight_skeleton_builder_2 typedef SSkel_ SSkel ; typedef Visitor_ Visitor ; - typedef boost::shared_ptr SSkelPtr ; + typedef std::shared_ptr SSkelPtr ; private : @@ -119,9 +116,10 @@ private : typedef typename Traits::FT FT ; typedef typename Traits::Point_2 Point_2 ; + typedef typename Traits::Segment_2 Segment_2 ; typedef typename Traits::Vector_2 Vector_2 ; typedef typename Traits::Direction_2 Direction_2 ; - typedef typename Traits::Segment_2 Segment_2 ; + typedef typename Traits::Trisegment_2 Trisegment_2 ; typedef typename Traits::Trisegment_2_ptr Trisegment_2_ptr ; @@ -155,8 +153,9 @@ private : typedef CGAL_SS_i::Edge_event_2 EdgeEvent ; typedef CGAL_SS_i::Split_event_2 SplitEvent ; typedef CGAL_SS_i::Pseudo_split_event_2 PseudoSplitEvent ; + typedef CGAL_SS_i::Artificial_event_2 ArtificialEvent ; - typedef boost::intrusive_ptr EventPtr ; + typedef std::shared_ptr EventPtr ; typedef std::pair Vertex_handle_pair ; @@ -180,7 +179,7 @@ private : enum Site { AT_SOURCE = -1 , INSIDE = 0, AT_TARGET = +1 } ; - struct Multinode : public Ref_counted_base + struct Multinode { Multinode ( Halfedge_handle b, Halfedge_handle e ) : @@ -199,7 +198,7 @@ private : Vertex_handle_vector nodes_to_remove ; } ; - typedef boost::intrusive_ptr MultinodePtr ; + typedef std::shared_ptr MultinodePtr ; struct MultinodeComparer { @@ -218,7 +217,7 @@ private : public: - Straight_skeleton_builder_2 ( boost::optional aMaxTime = boost::none, Traits const& = Traits(), Visitor const& aVisitor = Visitor() ) ; + Straight_skeleton_builder_2 ( std::optional aMaxTime = std::nullopt, Traits const& = Traits(), Visitor const& aVisitor = Visitor() ) ; SSkelPtr construct_skeleton( bool aNull_if_failed = true ) ; @@ -309,10 +308,10 @@ private : Comparison_result CompareEventsSupportAnglesSplitSplit ( EventPtr const& aA, EventPtr const& aB ) { CGAL_precondition ( aA->triedge().e0() == aB->triedge().e0() && aA->triedge().e1() == aB->triedge().e1() ) ; - return Compare_ss_event_angles_2(mTraits)( CreateVector(aA->triedge().e0()), - CreateVector(aA->triedge().e1()), - CreateVector(aA->triedge().e2()), - CreateVector(aB->triedge().e2()) ); + return mTraits.compare_ss_event_angles_2_object()( CreateVector(aA->triedge().e0()), + CreateVector(aA->triedge().e1()), + CreateVector(aA->triedge().e2()), + CreateVector(aB->triedge().e2()) ); } Comparison_result CompareEventsSupportAnglesSplitPseudoSplit ( EventPtr const& aA, EventPtr const& aB ) @@ -322,17 +321,17 @@ private : PseudoSplitEvent& lPSEvent = dynamic_cast(*aB) ; if(lPSEvent.is_at_source_vertex()) { - return Compare_ss_event_angles_2(mTraits)( CreateVector(aA->triedge().e0()), - CreateVector(aA->triedge().e1()), - CreateVector(aA->triedge().e2()), - CreateVector(aB->triedge().e2()) ); + return mTraits.compare_ss_event_angles_2_object()( CreateVector(aA->triedge().e0()), + CreateVector(aA->triedge().e1()), + CreateVector(aA->triedge().e2()), + CreateVector(aB->triedge().e2()) ); } else { - return Compare_ss_event_angles_2(mTraits)( CreateVector(aA->triedge().e0()), - CreateVector(aA->triedge().e1()), - CreateVector(aA->triedge().e2()), - K().construct_opposite_vector_2_object()( CreateVector(aB->triedge().e2())) ); + return mTraits.compare_ss_event_angles_2_object()( CreateVector(aA->triedge().e0()), + CreateVector(aA->triedge().e1()), + CreateVector(aA->triedge().e2()), + K().construct_opposite_vector_2_object()( CreateVector(aB->triedge().e2())) ); } } @@ -347,34 +346,34 @@ private : { if(lPSEventB.is_at_source_vertex()) { - return Compare_ss_event_angles_2(mTraits)( CreateVector(aA->triedge().e0()), - CreateVector(aA->triedge().e1()), - CreateVector(aA->triedge().e2()), - CreateVector(aB->triedge().e2()) ); + return mTraits.compare_ss_event_angles_2_object()( CreateVector(aA->triedge().e0()), + CreateVector(aA->triedge().e1()), + CreateVector(aA->triedge().e2()), + CreateVector(aB->triedge().e2()) ); } else { - return Compare_ss_event_angles_2(mTraits)( CreateVector(aA->triedge().e0()), - CreateVector(aA->triedge().e1()), - CreateVector(aA->triedge().e2()), - K().construct_opposite_vector_2_object()( CreateVector(aB->triedge().e2())) ); + return mTraits.compare_ss_event_angles_2_object()( CreateVector(aA->triedge().e0()), + CreateVector(aA->triedge().e1()), + CreateVector(aA->triedge().e2()), + K().construct_opposite_vector_2_object()( CreateVector(aB->triedge().e2())) ); } } else // aA is a Pseudo-split Event at the target { if(lPSEventB.is_at_source_vertex()) { - return Compare_ss_event_angles_2(mTraits)( CreateVector(aA->triedge().e0()), - CreateVector(aA->triedge().e1()), - K().construct_opposite_vector_2_object()( CreateVector(aA->triedge().e2()) ), - CreateVector(aB->triedge().e2()) ); + return mTraits.compare_ss_event_angles_2_object()( CreateVector(aA->triedge().e0()), + CreateVector(aA->triedge().e1()), + K().construct_opposite_vector_2_object()( CreateVector(aA->triedge().e2()) ), + CreateVector(aB->triedge().e2()) ); } else { - return Compare_ss_event_angles_2(mTraits)( CreateVector(aA->triedge().e0()), - CreateVector(aA->triedge().e1()), - K().construct_opposite_vector_2_object()( CreateVector(aA->triedge().e2())), - K().construct_opposite_vector_2_object()( CreateVector(aB->triedge().e2())) ); + return mTraits.compare_ss_event_angles_2_object()( CreateVector(aA->triedge().e0()), + CreateVector(aA->triedge().e1()), + K().construct_opposite_vector_2_object()( CreateVector(aA->triedge().e2())), + K().construct_opposite_vector_2_object()( CreateVector(aB->triedge().e2())) ); } } } @@ -447,7 +446,7 @@ private : } } - // @todo Should split events always have lower priority than split events? + // @todo Should split events always have lower priority than edge events? Comparison_result CompareEventsSupportAngles ( EventPtr const& aA, EventPtr const& aB ) { CGAL_precondition ( aA->type() != Event::cEdgeEvent && aB->type() != Event::cEdgeEvent ) ; @@ -552,7 +551,7 @@ private : typedef std::priority_queue,Split_event_compare> SplitPQ ; - struct Vertex_data : public Ref_counted_base + struct Vertex_data { Vertex_data ( Vertex_handle aVertex, Split_event_compare const& aComparer ) : @@ -579,10 +578,9 @@ private : bool mHasSimultaneousEvents ; SplitPQ mSplitEvents ; Triedge mTriedge ; // Here, E0,E1 corresponds to the vertex (unlike *event* triedges) - Trisegment_2_ptr mTrisegment ; // Skeleton nodes cache the full trisegment tree that defines the originating event } ; - typedef boost::intrusive_ptr Vertex_data_ptr ; + typedef std::shared_ptr Vertex_data_ptr ; typedef std::priority_queue,Event_compare> PQ ; @@ -628,14 +626,11 @@ private : // Null if aV is a contour or infinite node Trisegment_2_ptr const& GetTrisegment ( Vertex_handle aV ) const { - return GetVertexData(aV).mTrisegment ; + return aV->trisegment() ; } void SetTrisegment ( Vertex_handle aV, Trisegment_2_ptr const& aTrisegment ) { - // @todo could get rid of the 'mTrisegment' in vertex data - // since it's also stored in the vertex directly (to be used during offset construction...) - GetVertexData(aV).mTrisegment = aTrisegment ; aV->set_trisegment(aTrisegment) ; } @@ -661,31 +656,31 @@ private : typename K::Segment_2 CreateRawSegment ( Halfedge_const_handle aH ) const { - Point_2 s = aH->opposite()->vertex()->point() ; - Point_2 t = aH->vertex()->point() ; + const Point_2& s = aH->opposite()->vertex()->point() ; + const Point_2& t = aH->vertex()->point() ; return K().construct_segment_2_object()(s,t); } - template // actually just equal to 'Traits', but gotta template for SFINAE to work + template // this is 'Traits', but templating is required for SFINAE Segment_2 CreateSegment ( Halfedge_const_handle aH, - typename std::enable_if< - ! CGAL_SS_i::has_Segment_2_with_ID::value>::type* = nullptr ) const + std::enable_if_t< + ! CGAL_SS_i::has_Segment_2_with_ID::value>* = nullptr ) const { return Segment_2(CreateRawSegment(aH)) ; } - template // actually just equal to 'Traits', but gotta template for SFINAE to work + template // this is 'Traits', but templating is required for SFINAE Segment_2 CreateSegment ( Halfedge_const_handle aH, - typename std::enable_if< - CGAL_SS_i::has_Segment_2_with_ID::value>::type* = nullptr ) const + std::enable_if_t< + CGAL_SS_i::has_Segment_2_with_ID::value>* = nullptr ) const { return Segment_2(CreateRawSegment(aH), aH->id()); } Vector_2 CreateVector ( Halfedge_const_handle aH ) const { - Point_2 s = aH->opposite()->vertex()->point() ; - Point_2 t = aH->vertex()->point() ; + const Point_2& s = aH->opposite()->vertex()->point() ; + const Point_2& t = aH->vertex()->point() ; return K().construct_vector_2_object()(s,t); } @@ -694,18 +689,68 @@ private : return K().construct_direction_2_object()( CreateVector(aH) ); } + Direction_2 CreatePerpendicularDirection ( Halfedge_const_handle aH ) const + { + const Direction_2 lD = CreateDirection(aH); + return K().construct_perpendicular_direction_2_object()( lD, CGAL::COUNTERCLOCKWISE ); + } + Trisegment_2_ptr CreateTrisegment ( Triedge const& aTriedge ) const { CGAL_precondition(aTriedge.is_valid() && aTriedge.is_skeleton()); - Trisegment_2_ptr r = Construct_ss_trisegment_2(mTraits)(CreateSegment(aTriedge.e0()) - ,CreateSegment(aTriedge.e1()) - ,CreateSegment(aTriedge.e2()) - ); - - CGAL_STSKEL_BUILDER_TRACE(5,"Trisegment for " << aTriedge << ":" << r ) ; - - CGAL_postcondition_msg((r!= Trisegment_2_ptr()), "Unable to determine edges collinearity"); + Trisegment_2_ptr r = mTraits.construct_ss_trisegment_2_object()( CreateSegment(aTriedge.e0()), + aTriedge.e0()->weight(), + CreateSegment(aTriedge.e1()), + aTriedge.e1()->weight(), + CreateSegment(aTriedge.e2()), + aTriedge.e2()->weight() ); + + CGAL_STSKEL_BUILDER_TRACE(5,"Trisegment for " << aTriedge << ":\n" << r ) ; + + // Consecutive collinear segments must not have the same weight + CGAL_assertion_code(if(r->collinearity() == TRISEGMENT_COLLINEARITY_01)) + CGAL_assertion_code(if(aTriedge.e0()->weight() != aTriedge.e1()->weight()) {) + CGAL_STSKEL_BUILDER_TRACE(5, "Collinear check: " << CGAL_SS_i::are_edges_orderly_collinear(r->e0(), r->e1())); + CGAL_assertion(aTriedge.e1() != aTriedge.e0()->opposite()->prev()->opposite() && + aTriedge.e0() != aTriedge.e1()->opposite()->prev()->opposite()); + CGAL_assertion_code(}) + + CGAL_assertion_code(if(r->collinearity() == TRISEGMENT_COLLINEARITY_12)) + CGAL_assertion_code(if(aTriedge.e1()->weight() != aTriedge.e2()->weight()) {) + CGAL_STSKEL_BUILDER_TRACE(5, "Collinear check: " << CGAL_SS_i::are_edges_orderly_collinear(r->e1(), r->e2())); + CGAL_assertion(aTriedge.e2() != aTriedge.e1()->opposite()->prev()->opposite() && + aTriedge.e1() != aTriedge.e2()->opposite()->prev()->opposite()); + CGAL_assertion_code(}) + + CGAL_assertion_code(if(r->collinearity() == TRISEGMENT_COLLINEARITY_02)) + CGAL_assertion_code(if(aTriedge.e0()->weight() != aTriedge.e2()->weight()) {) + CGAL_STSKEL_BUILDER_TRACE(5, "Collinear check: " << CGAL_SS_i::are_edges_orderly_collinear(r->e0(), r->e2())); + CGAL_assertion(aTriedge.e2() != aTriedge.e0()->opposite()->prev()->opposite() && + aTriedge.e0() != aTriedge.e2()->opposite()->prev()->opposite()); + CGAL_assertion_code(}) + + CGAL_assertion_code(if(r->collinearity() == TRISEGMENT_COLLINEARITY_ALL) {) + CGAL_assertion_code(if(aTriedge.e0()->weight() != aTriedge.e1()->weight()) {) + CGAL_STSKEL_BUILDER_TRACE(5, "Collinear check: " << CGAL_SS_i::are_edges_orderly_collinear(r->e0(), r->e1())); + CGAL_assertion(aTriedge.e1() != aTriedge.e0()->opposite()->prev()->opposite() && + aTriedge.e0() != aTriedge.e1()->opposite()->prev()->opposite()); + CGAL_assertion_code(}) + + CGAL_assertion_code(if(aTriedge.e1()->weight() != aTriedge.e2()->weight()) {) + CGAL_STSKEL_BUILDER_TRACE(5, "Collinear check: " << CGAL_SS_i::are_edges_orderly_collinear(r->e1(), r->e2())); + CGAL_assertion(aTriedge.e2() != aTriedge.e1()->opposite()->prev()->opposite() && + aTriedge.e1() != aTriedge.e2()->opposite()->prev()->opposite()); + CGAL_assertion_code(}) + + CGAL_assertion_code(if(aTriedge.e0()->weight() != aTriedge.e2()->weight()) {) + CGAL_STSKEL_BUILDER_TRACE(5, "Collinear check: " << CGAL_SS_i::are_edges_orderly_collinear(r->e0(), r->e2())); + CGAL_assertion(aTriedge.e2() != aTriedge.e0()->opposite()->prev()->opposite() && + aTriedge.e0() != aTriedge.e2()->opposite()->prev()->opposite()); + CGAL_assertion_code(}) + CGAL_assertion_code(}) + + CGAL_postcondition_msg((r != nullptr), "Unable to determine edges collinearity"); return r ; } @@ -786,6 +831,8 @@ private : void SetIsProcessed ( Vertex_handle aV ) { + CGAL_STSKEL_BUILDER_TRACE(2, "Set V" << aV->id() << " Processed"); + GetVertexData(aV).mIsProcessed = true ; mVisitor.on_vertex_processed(aV); @@ -818,7 +865,7 @@ private : if ( !lPQ.empty() ) { // When there are simultaneous split events, we sort them to handle nearby pseudo split events - // together as to avoid multiple fronts crossing each other without seeing + // together as to avoid multiple fronts crossing each other without noticing each other. // and creating an invalid SLS. // // Unfortunately, the way that this sorting is performed requires knowing whether an event @@ -860,14 +907,17 @@ private : bool ExistEvent ( Trisegment_2_ptr const& aS ) { - return Do_ss_event_exist_2(mTraits)(aS,mMaxTime); + return mTraits.do_ss_event_exist_2_object()( aS, mMaxTime ) ; } bool IsOppositeEdgeFacingTheSplitSeed( Vertex_handle aSeed, Halfedge_handle aOpposite ) const { if ( aSeed->is_skeleton() ) - return Is_edge_facing_ss_node_2(mTraits)( GetTrisegment(aSeed), CreateSegment(aOpposite) ) ; - else return Is_edge_facing_ss_node_2(mTraits)( aSeed->point() , CreateSegment(aOpposite) ) ; + return mTraits.is_edge_facing_ss_node_2_object()( GetTrisegment(aSeed), + CreateSegment(aOpposite) ) ; + else + return mTraits.is_edge_facing_ss_node_2_object()( aSeed->point(), + CreateSegment(aOpposite) ) ; } Oriented_side EventPointOrientedSide( Event const& aEvent @@ -877,22 +927,27 @@ private : , bool aE0isPrimary ) const { - return Oriented_side_of_event_point_wrt_bisector_2(mTraits)( aEvent.trisegment() - , CreateSegment(aE0) - , CreateSegment(aE1) - , GetTrisegment(aV01) // Can be null - , aE0isPrimary - ) ; + return mTraits.oriented_side_of_event_point_wrt_bisector_2_object()( aEvent.trisegment(), + CreateSegment(aE0), + aE0->weight(), + CreateSegment(aE1), + aE1->weight(), + GetTrisegment(aV01), // Can be null + aE0isPrimary ) ; } Comparison_result CompareEvents ( Trisegment_2_ptr const& aA, Trisegment_2_ptr const& aB ) const { - return Compare_ss_event_times_2(mTraits)(aA,aB) ; + return mTraits.compare_ss_event_times_2_object()( aA, aB ) ; } Comparison_result CompareEvents ( EventPtr const& aA, EventPtr const& aB ) const { - return aA->triedge() != aB->triedge() ? CompareEvents( aA->trisegment(), aB->trisegment() ) : EQUAL ; + Comparison_result rResult = aA->triedge() != aB->triedge() ? CompareEvents( aA->trisegment(), aB->trisegment() ) + : EQUAL; + + CGAL_STSKEL_BUILDER_TRACE(3, "Compare events " << aA->triedge() << " and " << aB->triedge() << " -> " << rResult); + return rResult; } Comparison_result CompareEvents( Trisegment_2_ptr const& aTrisegment, Vertex_handle aSeedNode ) const @@ -933,7 +988,7 @@ private : bool AreEventsSimultaneous( Trisegment_2_ptr const& x, Trisegment_2_ptr const& y ) const { - return Are_ss_events_simultaneous_2(mTraits)(x,y) ; + return mTraits.are_ss_events_simultaneous_2_object()( x, y ) ; } bool AreEventsSimultaneous( EventPtr const& x, EventPtr const& y ) const @@ -1009,9 +1064,9 @@ private : } } - boost::tuple ConstructEventTimeAndPoint( Trisegment_2_ptr const& aS ) const + std::tuple ConstructEventTimeAndPoint( Trisegment_2_ptr const& aS ) const { - boost::optional< boost::tuple > r = Construct_ss_event_time_and_point_2(mTraits)(aS); + std::optional< std::tuple > r = mTraits.construct_ss_event_time_and_point_2_object()( aS ) ; CGAL_postcondition_msg(!!r, "Unable to compute skeleton node coordinates"); return *r ; } @@ -1020,7 +1075,7 @@ private : { FT lTime ; Point_2 lP ; - boost::tie(lTime,lP) = ConstructEventTimeAndPoint(aE.trisegment()); + std::tie(lTime,lP) = ConstructEventTimeAndPoint(aE.trisegment()); aE.SetTimeAndPoint(lTime,lP); } @@ -1149,6 +1204,8 @@ private : // returns 'true' if something was merged bool MergeCoincidentNodes() ; + void EnforceSimpleConnectedness() ; + bool FinishUp(); bool Run(); @@ -1165,10 +1222,8 @@ private : std::vector> mLAVLists; Vertex_handle_vector mReflexVertices ; - Halfedge_handle_vector mDanglingBisectors ; Halfedge_handle_vector mContourHalfedges ; - Vertex_handle_pair_vector mSplitNodes ; Event_compare mEventCompare ; @@ -1179,7 +1234,7 @@ private : int mEventID ; int mStepID ; - boost::optional mMaxTime ; + std::optional mMaxTime ; PQ mPQ ; @@ -1202,7 +1257,7 @@ private : InputPointIterator lCurr = aBegin ; // InputPointIterator lPrev = aBegin ; - int c = 0 ; + CGAL_precondition_code(int c = 0 ;) while ( lCurr != aEnd ) { @@ -1218,7 +1273,7 @@ private : Face_handle lFace = mSSkel->SSkel::Base::faces_push_back( Face(mFaceID++) ) ; - ++ c ; + CGAL_precondition_code(++ c ;) lCCWBorder->HBase_base::set_face(lFace); lFace ->FBase ::set_halfedge(lCCWBorder); @@ -1303,25 +1358,26 @@ private : return CanSafelyIgnoreSplitEventImpl(lEvent, typename CGAL_SS_i::has_Filters_split_events_tag::type()); } - void ComputeUpperBoundForValidSplitEventsImpl(Vertex_handle, Vertex_handle, Vertex_handle, - Halfedge_handle_vector_iterator, Halfedge_handle_vector_iterator, + void ComputeUpperBoundForValidSplitEventsImpl(Vertex_handle, + Halfedge_handle_vector_iterator, + Halfedge_handle_vector_iterator, boost::mpl::bool_) const { } - void ComputeUpperBoundForValidSplitEventsImpl(Vertex_handle lPrev, Vertex_handle aNode, Vertex_handle lNext, + void ComputeUpperBoundForValidSplitEventsImpl(Vertex_handle aNode, Halfedge_handle_vector_iterator contour_halfedges_begin, Halfedge_handle_vector_iterator contour_halfedges_end, boost::mpl::bool_) const { - return mTraits.ComputeFilteringBound(lPrev, aNode, lNext, contour_halfedges_begin, contour_halfedges_end); + return mTraits.ComputeFilteringBound(aNode, contour_halfedges_begin, contour_halfedges_end); } - void ComputeUpperBoundForValidSplitEvents(Vertex_handle lPrev, Vertex_handle aNode, Vertex_handle lNext, + void ComputeUpperBoundForValidSplitEvents(Vertex_handle aNode, Halfedge_handle_vector_iterator contour_halfedges_begin, Halfedge_handle_vector_iterator contour_halfedges_end) const { - return ComputeUpperBoundForValidSplitEventsImpl(lPrev, aNode, lNext, contour_halfedges_begin, contour_halfedges_end, + return ComputeUpperBoundForValidSplitEventsImpl(aNode, contour_halfedges_begin, contour_halfedges_end, typename CGAL_SS_i::has_Filters_split_events_tag::type()); } @@ -1383,11 +1439,40 @@ private : return enter_contour(aBegin, aEnd, Cartesian_converter(), aCheckValidity); } + template + Straight_skeleton_builder_2& enter_contour_weights(WeightIterator aWeightsBegin, + WeightIterator aWeightsEnd, + const Converter& cvt) + { + const auto lWeightsN = std::distance(aWeightsBegin, aWeightsEnd); + CGAL_assertion(std::size_t(lWeightsN) <= mSSkel->SSkel::Base::size_of_faces()); + + Face_iterator fit = std::next(mSSkel->SSkel::Base::faces_end(), -lWeightsN); + + for(; aWeightsBegin!=aWeightsEnd; ++aWeightsBegin, ++fit) + { + CGAL_assertion(fit != mSSkel->SSkel::Base::faces_end()); + + Halfedge_handle lBorder = fit->halfedge(); + FT lWeight = *aWeightsBegin; + CGAL_assertion(lBorder->opposite()->is_border()); + CGAL_STSKEL_BUILDER_TRACE(4, "Assign " << lWeight << " cvt to " << cvt(lWeight) << " to E" << lBorder->id()); + lBorder->set_weight(cvt(lWeight)); + } + + return *this; + } + + template + Straight_skeleton_builder_2& enter_contour_weights(WeightIterator aWeightsBegin, + WeightIterator aWeightsEnd) + { + return enter_contour_weightsg(aWeightsBegin, aWeightsEnd, NT_converter()); + } } ; -} // end namespace CGAL +} // namespace CGAL #include -#endif // CGAL_STRAIGHT_SKELETON_BUILDER_2_H // -// EOF // +#endif // CGAL_STRAIGHT_SKELETON_BUILDER_2_H diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_builder_traits_2.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_builder_traits_2.h index fe4253e3..f1ab65af 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_builder_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_builder_traits_2.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_traits_2.h $ -// $Id: Straight_skeleton_builder_traits_2.h 29b6963 2020-11-06T12:28:30+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_traits_2.h $ +// $Id: include/CGAL/Straight_skeleton_builder_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -16,14 +16,14 @@ #include #include #include +#include #include #include #include #include -#include -#include +#include #include #include @@ -39,20 +39,30 @@ struct Construct_ss_trisegment_2 : Functor_base_2 typedef typename Base::Segment_2_with_ID Segment_2_with_ID ; typedef typename Base::Trisegment_2_ptr Trisegment_2_ptr ; + typedef typename Base::FT FT ; typedef Trisegment_2_ptr result_type ; - template - Construct_ss_trisegment_2(const Traits& traits) - : mNext_ID(traits.trisegment_ID()) + Construct_ss_trisegment_2(std::size_t& aNext_ID, Caches& aCaches) + : mNext_ID(aNext_ID), mCaches(aCaches) {} - result_type operator() ( Segment_2_with_ID const& aS0, Segment_2_with_ID const& aS1, Segment_2_with_ID const& aS2 ) const + result_type operator() ( Segment_2_with_ID const& aS0, + FT const& aW0, + Segment_2_with_ID const& aS1, + FT const& aW1, + Segment_2_with_ID const& aS2, + FT const& aW2 ) const { - return construct_trisegment(aS0,aS1,aS2,mNext_ID++) ; + Trisegment_2_ptr rRes = construct_trisegment(aS0,aW0,aS1,aW1,aS2,aW2,mNext_ID,mCaches) ; + if(rRes) + ++mNext_ID; + return rRes; } - std::size_t& mNext_ID ; +private: + std::size_t& mNext_ID; + Caches& mCaches; }; template @@ -65,13 +75,13 @@ struct Do_ss_event_exist_2 : Functor_base_2 typedef Uncertain result_type ; - Do_ss_event_exist_2(Time_cache& aTime_cache, Coeff_cache& aCoeff_cache) - : mTime_cache(aTime_cache), mCoeff_cache(aCoeff_cache) + Do_ss_event_exist_2(Caches& aCaches) + : mCaches(aCaches) {} - Uncertain operator() ( Trisegment_2_ptr const& aTrisegment, boost::optional aMaxTime ) const + Uncertain operator() ( Trisegment_2_ptr const& aTrisegment, std::optional aMaxTime ) const { - Uncertain rResult = exist_offset_lines_isec2(aTrisegment,aMaxTime,mTime_cache,mCoeff_cache) ; + Uncertain rResult = exist_offset_lines_isec2(aTrisegment, aMaxTime, mCaches); CGAL_STSKEL_ASSERT_PREDICATE_RESULT(rResult,K,"Exist_event",aTrisegment); @@ -79,8 +89,7 @@ struct Do_ss_event_exist_2 : Functor_base_2 } private: - Time_cache& mTime_cache ; - Coeff_cache& mCoeff_cache ; + Caches& mCaches; }; template @@ -94,8 +103,8 @@ struct Is_edge_facing_ss_node_2 : Functor_base_2 typedef Uncertain result_type ; - Is_edge_facing_ss_node_2(Coeff_cache& aCoeff_cache) - : mCoeff_cache(aCoeff_cache) + Is_edge_facing_ss_node_2(Caches& aCaches) + : mCaches(aCaches) { } Uncertain operator() ( Point_2 const& aContourNode, Segment_2_with_ID const& aEdge ) const @@ -105,11 +114,11 @@ struct Is_edge_facing_ss_node_2 : Functor_base_2 Uncertain operator() ( Trisegment_2_ptr const& aSkeletonNode, Segment_2_with_ID const& aEdge ) const { - return is_edge_facing_offset_lines_isecC2(aSkeletonNode,aEdge,mCoeff_cache) ; + return is_edge_facing_offset_lines_isecC2(aSkeletonNode, aEdge, mCaches); } private: - Coeff_cache& mCoeff_cache ; + Caches& mCaches; }; template @@ -121,22 +130,19 @@ struct Compare_ss_event_times_2 : Functor_base_2 typedef Uncertain result_type ; - Compare_ss_event_times_2(Time_cache& aTime_cache, Coeff_cache& aCoeff_cache) - : mTime_cache(aTime_cache), mCoeff_cache(aCoeff_cache) + Compare_ss_event_times_2(Caches& aCaches) + : mCaches(aCaches) {} Uncertain operator() ( Trisegment_2_ptr const& aL, Trisegment_2_ptr const& aR ) const { - Uncertain rResult = compare_offset_lines_isec_timesC2(aL,aR,mTime_cache,mCoeff_cache) ; - + Uncertain rResult = compare_offset_lines_isec_timesC2(aL, aR, mCaches); CGAL_STSKEL_ASSERT_PREDICATE_RESULT(rResult,K,"Compare_event_times","L: " << aL << "\nR:" << aR ); - return rResult ; } private: - Time_cache& mTime_cache ; - Coeff_cache& mCoeff_cache ; + Caches& mCaches; }; template @@ -144,7 +150,6 @@ struct Compare_ss_event_angles_2 : Functor_base_2 { typedef Functor_base_2 Base ; - typedef typename Base::Trisegment_2_ptr Trisegment_2_ptr ; typedef typename Base::FT FT ; typedef typename Base::Vector_2 Vector_2 ; @@ -170,21 +175,24 @@ struct Oriented_side_of_event_point_wrt_bisector_2 : Functor_base_2 typedef typename Base::Segment_2_with_ID Segment_2_with_ID ; typedef typename Base::Trisegment_2_ptr Trisegment_2_ptr ; typedef typename Base::Point_2 Point_2 ; + typedef typename Base::FT FT; typedef Uncertain result_type ; - Oriented_side_of_event_point_wrt_bisector_2(Coeff_cache& aCoeff_cache) - : mCoeff_cache(aCoeff_cache) + Oriented_side_of_event_point_wrt_bisector_2(Caches& aCaches) + : mCaches(aCaches) {} Uncertain operator() ( Trisegment_2_ptr const& aEvent , Segment_2_with_ID const& aE0 + , FT const& aW0 , Segment_2_with_ID const& aE1 + , FT const& aW1 , Trisegment_2_ptr const& aE01Event , bool aE0isPrimary ) const { - Uncertain rResult = oriented_side_of_event_point_wrt_bisectorC2(aEvent,aE0,aE1,aE01Event,aE0isPrimary,mCoeff_cache) ; + Uncertain rResult = oriented_side_of_event_point_wrt_bisectorC2(aEvent,aE0,aW0,aE1,aW1,aE01Event,aE0isPrimary,mCaches) ; CGAL_STSKEL_ASSERT_PREDICATE_RESULT(rResult,K,"Oriented_side_of_event_point_wrt_bisector_2","Event=" << aEvent << " E0=" << aE0 << " E1=" << aE1 ); @@ -192,7 +200,7 @@ struct Oriented_side_of_event_point_wrt_bisector_2 : Functor_base_2 } private: - Coeff_cache& mCoeff_cache ; + Caches& mCaches; }; @@ -205,13 +213,13 @@ struct Are_ss_events_simultaneous_2 : Functor_base_2 typedef Uncertain result_type ; - Are_ss_events_simultaneous_2(Time_cache& aTime_cache, Coeff_cache& aCoeff_cache) - : mTime_cache(aTime_cache), mCoeff_cache(aCoeff_cache) + Are_ss_events_simultaneous_2(Caches& aCaches) + : mCaches(aCaches) {} Uncertain operator() ( Trisegment_2_ptr const& aA, Trisegment_2_ptr const& aB ) const { - Uncertain rResult = are_events_simultaneousC2(aA,aB,mTime_cache,mCoeff_cache); + Uncertain rResult = are_events_simultaneousC2(aA,aB, mCaches); CGAL_STSKEL_ASSERT_PREDICATE_RESULT(rResult,K,"Are_events_simultaneous","A=" << aA << "\nB=" << aB); @@ -219,51 +227,9 @@ struct Are_ss_events_simultaneous_2 : Functor_base_2 } private: - Time_cache& mTime_cache ; - Coeff_cache& mCoeff_cache ; -}; - -// Not actually in use -template -struct Are_ss_edges_collinear_2 : Functor_base_2 -{ - typedef Functor_base_2 Base ; - - typedef typename Base::Segment_2_with_ID Segment_2_with_ID ; - - typedef Uncertain result_type ; - - Uncertain operator() ( Segment_2_with_ID const& aA, Segment_2_with_ID const& aB ) const - { - Uncertain rResult = are_edges_collinearC2(aA,aB); - - CGAL_STSKEL_ASSERT_PREDICATE_RESULT(rResult,K,"Are_ss_edges_collinear","A=" << aA << "\nB=" << aB); - - return rResult ; - } -}; - -// Not actually in use -template -struct Are_ss_edges_parallel_2 : Functor_base_2 -{ - typedef Functor_base_2 Base ; - - typedef typename Base::Segment_2_with_ID Segment_2_with_ID ; - - typedef Uncertain result_type ; - - Uncertain operator() ( Segment_2_with_ID const& aA, Segment_2_with_ID const& aB ) const - { - Uncertain rResult = are_edges_parallelC2(aA,aB); - - CGAL_STSKEL_ASSERT_PREDICATE_RESULT(rResult,K,"Are_ss_edges_parallel","A=" << aA << "\nB=" << aB); - - return rResult ; - } + Caches& mCaches; }; - template struct Construct_ss_event_time_and_point_2 : Functor_base_2 { @@ -274,12 +240,12 @@ struct Construct_ss_event_time_and_point_2 : Functor_base_2 typedef typename Base::Segment_2_with_ID Segment_2_with_ID ; typedef typename Base::Trisegment_2_ptr Trisegment_2_ptr ; - typedef boost::tuple rtype ; + typedef std::tuple rtype ; - typedef boost::optional result_type ; + typedef std::optional result_type ; - Construct_ss_event_time_and_point_2(Time_cache& aTime_cache, Coeff_cache& aCoeff_cache) - : mTime_cache(aTime_cache), mCoeff_cache(aCoeff_cache) + Construct_ss_event_time_and_point_2(Caches& aCaches) + : mCaches(aCaches) {} result_type operator() ( Trisegment_2_ptr const& aTrisegment ) const @@ -289,81 +255,27 @@ struct Construct_ss_event_time_and_point_2 : Functor_base_2 FT t(0) ; Point_2 i = ORIGIN ; - boost::optional< Rational > ot = compute_offset_lines_isec_timeC2(aTrisegment,mTime_cache,mCoeff_cache); + std::optional< Rational > ot = compute_offset_lines_isec_timeC2(aTrisegment, mCaches); if ( !!ot && certainly( CGAL_NTS certified_is_not_zero(ot->d()) ) ) { t = ot->n() / ot->d(); - boost::optional oi = construct_offset_lines_isecC2(aTrisegment,mCoeff_cache); + std::optional oi = construct_offset_lines_isecC2(aTrisegment, mCaches); if ( oi ) { i = *oi ; - CGAL_stskel_intrinsic_test_assertion(!is_point_calculation_clearly_wrong(t,i,aTrisegment)); lOK = true ; } } CGAL_STSKEL_ASSERT_CONSTRUCTION_RESULT(lOK,K,"Construct_ss_event_time_and_point_2",aTrisegment); - return cgal_make_optional(lOK,boost::make_tuple(t,i)) ; - } - bool is_point_calculation_clearly_wrong( FT const& t, Point_2 const& p, Trisegment_2_ptr const& aTrisegment ) const - { - bool rR = false ; - - if ( is_possibly_inexact_time_clearly_not_zero(t) ) - { - Segment_2_with_ID const& e0 = aTrisegment->e0() ; - Segment_2_with_ID const& e1 = aTrisegment->e1() ; - Segment_2_with_ID const& e2 = aTrisegment->e2() ; - - Point_2 const& e0s = e0.source(); - Point_2 const& e0t = e0.target(); - - Point_2 const& e1s = e1.source(); - Point_2 const& e1t = e1.target(); - - Point_2 const& e2s = e2.source(); - Point_2 const& e2t = e2.target(); - - FT const very_short(0.1); - FT const very_short_squared = CGAL_NTS square(very_short); - - FT l0 = squared_distance(e0s,e0t) ; - FT l1 = squared_distance(e1s,e1t) ; - FT l2 = squared_distance(e2s,e2t) ; - - bool e0_is_not_very_short = l0 > very_short_squared ; - bool e1_is_not_very_short = l1 > very_short_squared ; - bool e2_is_not_very_short = l2 > very_short_squared ; - - FT d0 = squared_distance_from_point_to_lineC2(p.x(),p.y(),e0s.x(),e0s.y(),e0t.x(),e0t.y()).to_nt(); - FT d1 = squared_distance_from_point_to_lineC2(p.x(),p.y(),e1s.x(),e1s.y(),e1t.x(),e1t.y()).to_nt(); - FT d2 = squared_distance_from_point_to_lineC2(p.x(),p.y(),e2s.x(),e2s.y(),e2t.x(),e2t.y()).to_nt(); - - FT tt = CGAL_NTS square(t); - - bool e0_is_clearly_wrong = e0_is_not_very_short && is_possibly_inexact_distance_clearly_not_equal_to(d0,tt) ; - bool e1_is_clearly_wrong = e1_is_not_very_short && is_possibly_inexact_distance_clearly_not_equal_to(d1,tt) ; - bool e2_is_clearly_wrong = e2_is_not_very_short && is_possibly_inexact_distance_clearly_not_equal_to(d2,tt) ; - - rR = e0_is_clearly_wrong || e1_is_clearly_wrong || e2_is_clearly_wrong ; - - CGAL_stskel_intrinsic_test_trace_if(rR - , "\nSkeleton node point calculation is clearly wrong:" - << "\ntime=" << t << " p=" << p2str(p) << " e0=" << s2str(e0) << " e1=" << s2str(e1) << " e2=" << s2str(e2) - << "\nl0=" << inexact_sqrt(l0) << " l1=" << inexact_sqrt(l1) << " l2=" << inexact_sqrt(l2) - << "\nd0=" << d0 << " d1=" << d1 << " d2=" << d2 << " tt=" << tt - ) ; - } - - return rR ; + return cgal_make_optional(lOK,std::make_tuple(t,i)) ; } private: - Time_cache& mTime_cache ; - Coeff_cache& mCoeff_cache ; + Caches& mCaches; }; } // namespace CGAL_SS_i @@ -377,8 +289,6 @@ struct Straight_skeleton_builder_traits_2_functors typedef CGAL_SS_i::Is_edge_facing_ss_node_2 Is_edge_facing_ss_node_2 ; typedef CGAL_SS_i::Oriented_side_of_event_point_wrt_bisector_2 Oriented_side_of_event_point_wrt_bisector_2 ; typedef CGAL_SS_i::Are_ss_events_simultaneous_2 Are_ss_events_simultaneous_2 ; - typedef CGAL_SS_i::Are_ss_edges_parallel_2 Are_ss_edges_parallel_2 ; - typedef CGAL_SS_i::Are_ss_edges_collinear_2 Are_ss_edges_collinear_2 ; typedef CGAL_SS_i::Construct_ss_event_time_and_point_2 Construct_ss_event_time_and_point_2 ; typedef CGAL_SS_i::Construct_ss_trisegment_2 Construct_ss_trisegment_2 ; } ; @@ -397,9 +307,6 @@ struct Straight_skeleton_builder_traits_2_base typedef CGAL_SS_i::Segment_2_with_ID Segment_2_with_ID ; // for BOOST_MPL_HAS_XXX_TRAIT_DEF typedef CGAL::Trisegment_2 Trisegment_2 ; typedef typename Trisegment_2::Self_ptr Trisegment_2_ptr ; - - template F get( F const* = 0 ) const { return F(); } - } ; @@ -427,7 +334,7 @@ class Straight_skeleton_builder_traits_2_impl - Is_edge_facing_ss_node_2 ; + Is_edge_facing_ss_node_2 ; typedef Unfiltered_predicate_adaptor Oriented_side_of_event_point_wrt_bisector_2 ; @@ -435,58 +342,47 @@ class Straight_skeleton_builder_traits_2_impl Are_ss_events_simultaneous_2 ; - typedef Unfiltered_predicate_adaptor - Are_ss_edges_parallel_2 ; - - typedef Unfiltered_predicate_adaptor - Are_ss_edges_collinear_2 ; - typedef typename Unfiltering::Construct_ss_event_time_and_point_2 Construct_ss_event_time_and_point_2 ; typedef typename Unfiltering::Construct_ss_trisegment_2 Construct_ss_trisegment_2 ; - using Straight_skeleton_builder_traits_2_base::get; - - Is_edge_facing_ss_node_2 - get(Is_edge_facing_ss_node_2 const* = 0 ) const + Is_edge_facing_ss_node_2 is_edge_facing_ss_node_2_object() const { - return Is_edge_facing_ss_node_2(mCoeff_cache); + return Is_edge_facing_ss_node_2(mCaches); } - Compare_ss_event_times_2 - get(Compare_ss_event_times_2 const* = 0 ) const + Compare_ss_event_times_2 compare_ss_event_times_2_object() const { - return Compare_ss_event_times_2(mTime_cache, mCoeff_cache); + return Compare_ss_event_times_2(mCaches); } + Compare_ss_event_angles_2 compare_ss_event_angles_2_object() const + { + return Compare_ss_event_angles_2(); + } - Oriented_side_of_event_point_wrt_bisector_2 - get(Oriented_side_of_event_point_wrt_bisector_2 const* = 0 ) const + Oriented_side_of_event_point_wrt_bisector_2 oriented_side_of_event_point_wrt_bisector_2_object() const { - return Oriented_side_of_event_point_wrt_bisector_2(mCoeff_cache); + return Oriented_side_of_event_point_wrt_bisector_2(mCaches); } - Do_ss_event_exist_2 - get(Do_ss_event_exist_2 const* = 0 ) const + Do_ss_event_exist_2 do_ss_event_exist_2_object() const { - return Do_ss_event_exist_2(mTime_cache, mCoeff_cache); + return Do_ss_event_exist_2(mCaches); } - Are_ss_events_simultaneous_2 - get(Are_ss_events_simultaneous_2 const* = 0 ) const + Are_ss_events_simultaneous_2 are_ss_events_simultaneous_2_object() const { - return Are_ss_events_simultaneous_2(mTime_cache, mCoeff_cache); + return Are_ss_events_simultaneous_2(mCaches); } - Construct_ss_event_time_and_point_2 - get(Construct_ss_event_time_and_point_2 const* = 0 ) const + Construct_ss_event_time_and_point_2 construct_ss_event_time_and_point_2_object() const { - return Construct_ss_event_time_and_point_2(mTime_cache, mCoeff_cache); + return Construct_ss_event_time_and_point_2(mCaches); } - Construct_ss_trisegment_2 - get( Construct_ss_trisegment_2 const* = 0 ) const + Construct_ss_trisegment_2 construct_ss_trisegment_2_object() const { - return Construct_ss_trisegment_2(*this); + return Construct_ss_trisegment_2(trisegment_ID(), mCaches); } // ID functions @@ -495,21 +391,21 @@ class Straight_skeleton_builder_traits_2_impl const& aBorderS ) { - CGAL_SS_i::compute_normalized_line_ceoffC2 ( aBorderS, mCoeff_cache ) ; + CGAL_SS_i::compute_normalized_line_coeffC2(aBorderS, mCaches); } void InitializeLineCoeffs ( std::size_t aID, std::size_t aOtherID ) { - if ( mCoeff_cache.Get( aOtherID ) ) - mCoeff_cache.Set( aID, CGAL_SS_i::cgal_make_optional(*(mCoeff_cache.Get(aOtherID))) ) ; + if(mCaches.mCoeff_cache.Get(aOtherID)) + mCaches.mCoeff_cache.Set(aID, CGAL_SS_i::cgal_make_optional(*(mCaches.mCoeff_cache.Get(aOtherID)))); else - mCoeff_cache.Set( aID, boost::none ) ; + mCaches.mCoeff_cache.Set(aID, std::nullopt); } // functions and tag for filtering split events @@ -523,11 +419,13 @@ class Straight_skeleton_builder_traits_2_impltrisegment() ; - boost::optional > lOptTime = - CGAL_SS_i::compute_offset_lines_isec_timeC2(tri, mTime_cache, mCoeff_cache); + std::optional > lOptTime = + CGAL_SS_i::compute_offset_lines_isec_timeC2(tri, mCaches); if ( lOptTime && lOptTime->to_nt() > *mFilteringBound ) { + CGAL_STSKEL_TRAITS_TRACE("Ignoring potential split event"); + // avoid filling the cache vectors with times of trisegments that will be removed reset_trisegment(tri->id()); return true; @@ -538,67 +436,93 @@ class Straight_skeleton_builder_traits_2_impl - void ComputeFilteringBound(Vertex_handle lPrev, Vertex_handle aNode, Vertex_handle lNext, + void ComputeFilteringBound(Vertex_handle aNode, Halfedge_handle_vector_iterator contour_halfedges_begin, Halfedge_handle_vector_iterator contour_halfedges_end) const { - mFilteringBound = boost::none; - - if ( ! aNode->is_contour() ) - return ; - + typedef typename K::FT FT; + typedef typename K::Point_2 Point_2; typedef typename K::Vector_2 Vector_2; typedef typename K::Segment_2 Segment_2; typedef typename K::Ray_2 Ray_2; typedef typename K::Line_2 Line_2; - Segment_2 s1(lPrev->point(), aNode->point()); - Segment_2 s2(aNode->point(), lNext->point()); + CGAL_STSKEL_TRAITS_TRACE("Computing filtering bound of V" << aNode->id() << " [" << typeid(FT).name() << "]" ); - // @todo? These are not input segments, but it might still worth caching (just gotta assign them an ID) - boost::optional< Line_2 > l1 = CGAL_SS_i::compute_normalized_line_ceoffC2(s1); - boost::optional< Line_2 > l2 = CGAL_SS_i::compute_normalized_line_ceoffC2(s2); + mFilteringBound = std::nullopt; - Vector_2 lV1(l1->a(), l1->b()) ; - Vector_2 lV2(l2->a(), l2->b()) ; - Vector_2 lV12 = lV1 + lV2 ; - Ray_2 bisect_ray(aNode->point(), lV12) ; + // No gain observed on norway while doing it for more than contour nodes + if(!aNode->is_contour()) + return; - // F2C to_input; - // std::cout << "bisect " << aNode->point() << " " << aNode->point() + to_input(lV12) << "\n"; + // get the contour input segments on each side of the bisector spawned ataNode + auto lHL = aNode->halfedge()->defining_contour_edge(); + auto lHR = ( aNode->is_contour() ) ? lHL->opposite()->prev()->opposite() + : aNode->halfedge()->opposite()->defining_contour_edge() ; - for ( Halfedge_handle_vector_iterator i = contour_halfedges_begin; i != contour_halfedges_end; ++ i ) + CGAL_SS_i::Segment_2_with_ID lSL (lHL->opposite()->vertex()->point(), + lHL->vertex()->point(), + lHL->id()); + CGAL_SS_i::Segment_2_with_ID lSR (lHR->opposite()->vertex()->point(), + lHR->vertex()->point(), + lHR->id()); + + std::optional< Line_2 > lL = CGAL_SS_i::compute_weighted_line_coeffC2(lSL, lHL->weight(), mCaches); + std::optional< Line_2 > lR = CGAL_SS_i::compute_weighted_line_coeffC2(lSR, lHR->weight(), mCaches); + + Vector_2 lVL( lL->b(), - lL->a()) ; + Vector_2 lVR(- lR->b(), lR->a()) ; + Vector_2 lVLR = lVL + lVR ; + const Point_2& laP = aNode->point(); + Ray_2 bisect_ray(laP, lVLR) ; + + // @todo this should use some kind of spatial searching + for ( Halfedge_handle_vector_iterator h = contour_halfedges_begin; h != contour_halfedges_end; ++h ) { - CGAL_assertion((*i)->vertex()->is_contour() && (*i)->opposite()->vertex()->is_contour() ); - Segment_2 s_h((*i)->opposite()->vertex()->point(), (*i)->vertex()->point()); + CGAL_assertion((*h)->vertex()->is_contour() && (*h)->opposite()->vertex()->is_contour() ); - auto inter = K().do_intersect_2_object()(s_h, bisect_ray); - auto orient = K().orientation_2_object()(s_h[0], s_h[1], aNode->point()); + // @todo could be a line as long as we are in a convex area + Segment_2 s_h((*h)->opposite()->vertex()->point(), (*h)->vertex()->point()); // we use segments of the input polygon intersected by the bisector and such that // they are oriented such that the reflex vertex is on the left side of the segment - if (!is_certain(inter) || !is_certain(orient) || !inter || orient != LEFT_TURN) + auto orient = K().orientation_2_object()(s_h[0], s_h[1], aNode->point()); + if (!is_certain(orient) || orient != LEFT_TURN) continue; - // Note that we don't need the normalization - boost::optional< Line_2 > lh = CGAL_SS_i::compute_normalized_line_ceoffC2(s_h); + auto inter = K().do_intersect_2_object()(s_h, bisect_ray); + if (!is_certain(inter) || !inter) + continue; + + // See the other function for the equations + CGAL_SS_i::Segment_2_with_ID lSh (s_h, (*h)->id()); + std::optional< Line_2 > lh = CGAL_SS_i::compute_normalized_line_coeffC2(lSh, mCaches); - typename K::FT lBound = ( - lh->c() - lh->a()*aNode->point().x() - lh->b()*aNode->point().y() ) / - ( lh->a()*lV12.x() + lh->b()*lV12.y() ); + FT lLambda = - ( lh->a()*laP.x() + lh->b()*laP.y() + lh->c() ) / + ( lh->a()*lVLR.x() + lh->b()*lVLR.y() ) ; - if( ! is_finite(lBound) ) + Point_2 lP = laP + lVLR; + FT lBound = lLambda * ( lL->a()*lP.x() + lL->b()*lP.y() + lL->c() ) ; + + if(!is_finite(lBound) || !is_positive(lBound)) continue; - if ( ! mFilteringBound || *mFilteringBound > lBound ) + if(!mFilteringBound || *mFilteringBound > lBound) mFilteringBound = lBound; } + + if(mFilteringBound) + { + CGAL_STSKEL_TRAITS_TRACE("Filtering bound: " << *mFilteringBound); + } else { + CGAL_STSKEL_TRAITS_TRACE("Filtering bound: none"); + } } public: mutable std::size_t mTrisegment_ID = 0 ; - mutable CGAL_SS_i::Time_cache mTime_cache ; - mutable CGAL_SS_i::Coeff_cache mCoeff_cache ; - mutable boost::optional< typename K::FT > mFilteringBound ; + mutable CGAL_SS_i::Caches mCaches ; + mutable std::optional< typename K::FT > mFilteringBound ; } ; template @@ -670,20 +594,6 @@ class Straight_skeleton_builder_traits_2_impl Are_ss_events_simultaneous_2 ; - typedef Filtered_predicate< typename Exact ::Are_ss_edges_parallel_2 - , typename Filtering::Are_ss_edges_parallel_2 - , C2E - , C2F - > - Are_ss_edges_parallel_2 ; - - typedef Filtered_predicate< typename Exact ::Are_ss_edges_collinear_2 - , typename Filtering::Are_ss_edges_collinear_2 - , C2E - , C2F - > - Are_ss_edges_collinear_2 ; - typedef CGAL_SS_i::Exceptionless_filtered_construction< typename Unfiltering::Construct_ss_event_time_and_point_2 , typename Exact ::Construct_ss_event_time_and_point_2 , typename Filtering ::Construct_ss_event_time_and_point_2 @@ -694,68 +604,63 @@ class Straight_skeleton_builder_traits_2_impl Construct_ss_event_time_and_point_2 ; - typedef typename Unfiltering::Construct_ss_trisegment_2 Construct_ss_trisegment_2 ; - - using Straight_skeleton_builder_traits_2_base::get; + typedef CGAL_SS_i::Exceptionless_filtered_construction< typename Unfiltering::Construct_ss_trisegment_2 + , typename Exact ::Construct_ss_trisegment_2 + , typename Filtering ::Construct_ss_trisegment_2 + , C2E + , C2F + , E2C + , F2C + > + Construct_ss_trisegment_2 ; // constructor of predicates using time caching - Compare_ss_event_times_2 - get(Compare_ss_event_times_2 const* = 0 ) const + Compare_ss_event_times_2 compare_ss_event_times_2_object() const { - return Compare_ss_event_times_2( typename Exact::Compare_ss_event_times_2( - mExact_traits.mTime_cache, mExact_traits.mCoeff_cache), - typename Filtering::Compare_ss_event_times_2( - mApproximate_traits.mTime_cache, mApproximate_traits.mCoeff_cache) ); + return Compare_ss_event_times_2(typename Exact::Compare_ss_event_times_2(mExact_traits.mCaches), + typename Filtering::Compare_ss_event_times_2(mApproximate_traits.mCaches)); } - Is_edge_facing_ss_node_2 - get(Is_edge_facing_ss_node_2 const* = 0 ) const + Compare_ss_event_angles_2 compare_ss_event_angles_2_object() const { - return Is_edge_facing_ss_node_2( typename Exact::Is_edge_facing_ss_node_2(mExact_traits.mCoeff_cache), - typename Filtering::Is_edge_facing_ss_node_2(mApproximate_traits.mCoeff_cache) ); + return Compare_ss_event_angles_2(); } - Oriented_side_of_event_point_wrt_bisector_2 - get(Oriented_side_of_event_point_wrt_bisector_2 const* = 0 ) const + Is_edge_facing_ss_node_2 is_edge_facing_ss_node_2_object() const { - return Oriented_side_of_event_point_wrt_bisector_2( typename Exact::Oriented_side_of_event_point_wrt_bisector_2( - mExact_traits.mCoeff_cache), - typename Filtering::Oriented_side_of_event_point_wrt_bisector_2( - mApproximate_traits.mCoeff_cache) ); + return Is_edge_facing_ss_node_2(typename Exact::Is_edge_facing_ss_node_2(mExact_traits.mCaches), + typename Filtering::Is_edge_facing_ss_node_2(mApproximate_traits.mCaches)); } - Do_ss_event_exist_2 - get(Do_ss_event_exist_2 const* = 0 ) const + Oriented_side_of_event_point_wrt_bisector_2 oriented_side_of_event_point_wrt_bisector_2_object() const { - return Do_ss_event_exist_2( typename Exact::Do_ss_event_exist_2( - mExact_traits.mTime_cache, mExact_traits.mCoeff_cache), - typename Filtering::Do_ss_event_exist_2( - mApproximate_traits.mTime_cache, mApproximate_traits.mCoeff_cache) ); + return Oriented_side_of_event_point_wrt_bisector_2(typename Exact::Oriented_side_of_event_point_wrt_bisector_2(mExact_traits.mCaches), + typename Filtering::Oriented_side_of_event_point_wrt_bisector_2(mApproximate_traits.mCaches)); } - Are_ss_events_simultaneous_2 - get(Are_ss_events_simultaneous_2 const* = 0 ) const + Do_ss_event_exist_2 do_ss_event_exist_2_object() const { - return Are_ss_events_simultaneous_2( typename Exact::Are_ss_events_simultaneous_2( - mExact_traits.mTime_cache, mExact_traits.mCoeff_cache), - typename Filtering::Are_ss_events_simultaneous_2( - mApproximate_traits.mTime_cache, mApproximate_traits.mCoeff_cache) ); + return Do_ss_event_exist_2(typename Exact::Do_ss_event_exist_2(mExact_traits.mCaches), + typename Filtering::Do_ss_event_exist_2(mApproximate_traits.mCaches)); } - Construct_ss_event_time_and_point_2 - get(Construct_ss_event_time_and_point_2 const* = 0 ) const + Are_ss_events_simultaneous_2 are_ss_events_simultaneous_2_object() const { - return Construct_ss_event_time_and_point_2( typename Exact::Construct_ss_event_time_and_point_2( - mExact_traits.mTime_cache, mExact_traits.mCoeff_cache), - typename Filtering::Construct_ss_event_time_and_point_2( - mApproximate_traits.mTime_cache, mApproximate_traits.mCoeff_cache) ); + return Are_ss_events_simultaneous_2(typename Exact::Are_ss_events_simultaneous_2(mExact_traits.mCaches), + typename Filtering::Are_ss_events_simultaneous_2(mApproximate_traits.mCaches)); + } + + Construct_ss_event_time_and_point_2 construct_ss_event_time_and_point_2_object() const + { + return Construct_ss_event_time_and_point_2(typename Exact::Construct_ss_event_time_and_point_2(mExact_traits.mCaches), + typename Filtering::Construct_ss_event_time_and_point_2(mApproximate_traits.mCaches) ); } // constructor of trisegments using global id stored in the traits - Construct_ss_trisegment_2 - get( Construct_ss_trisegment_2 const* = 0 ) const + Construct_ss_trisegment_2 construct_ss_trisegment_2_object() const { - return Construct_ss_trisegment_2(*this); + return Construct_ss_trisegment_2(typename Exact::Construct_ss_trisegment_2(trisegment_ID(), mExact_traits.mCaches), + typename Filtering::Construct_ss_trisegment_2(trisegment_ID(), mApproximate_traits.mCaches)); } // ID functions @@ -766,8 +671,8 @@ class Straight_skeleton_builder_traits_2_impl > lOptTime = - CGAL_SS_i::compute_offset_lines_isec_timeC2( - tri, mApproximate_traits.mTime_cache, mApproximate_traits.mCoeff_cache); + std::optional > lOptTime = + CGAL_SS_i::compute_offset_lines_isec_timeC2(tri, mApproximate_traits.mCaches); if ( lOptTime && lOptTime->to_nt() > *mApproximate_traits.mFilteringBound ) { + CGAL_STSKEL_TRAITS_TRACE("Ignoring potential split event"); + // avoid filling the cache vectors with times of trisegments that will be removed reset_trisegment(tri->id()); return true; @@ -836,76 +742,164 @@ class Straight_skeleton_builder_traits_2_impl - void ComputeFilteringBound(Vertex_handle lPrev, Vertex_handle aNode, Vertex_handle lNext, + void ComputeFilteringBound(Vertex_handle aNode, Halfedge_handle_vector_iterator contour_halfedges_begin, Halfedge_handle_vector_iterator contour_halfedges_end) const { - mApproximate_traits.mFilteringBound = boost::none; - - if ( ! aNode->is_contour() ) - return ; - + typedef typename FK::FT Target_FT; typedef typename FK::Point_2 Target_Point_2; typedef typename FK::Vector_2 Target_Vector_2; typedef typename FK::Segment_2 Target_Segment_2; typedef typename FK::Ray_2 Target_Ray_2; typedef typename FK::Line_2 Target_Line_2; + typedef decltype(aNode->halfedge()) Halfedge_handle; + typedef CGAL_SS_i::Segment_2_with_ID Target_Segment_with_ID_2; + + CGAL_STSKEL_TRAITS_TRACE("Computing approximate filtering bound of V" << aNode->id() << " [" << typeid(Target_FT).name() << "]" ); + + mApproximate_traits.mFilteringBound = std::nullopt; + + // No gain observed on norway while doing it for more than contour nodes + if(!aNode->is_contour()) + return; + typename FK::FT::Protector protector; - C2F to_FK; + C2F lToFiltered; - Target_Point_2 laP = to_FK(aNode->point()); - Target_Segment_2 s1(to_FK(lPrev->point()), laP); - Target_Segment_2 s2(laP, to_FK(lNext->point())); + // get the contour input segments on each side of the bisector spawned ataNode + Halfedge_handle lHL = aNode->halfedge()->defining_contour_edge(); + Halfedge_handle lHR = ( aNode->is_contour() ) ? lHL->opposite()->prev()->opposite() + : aNode->halfedge()->opposite()->defining_contour_edge() ; - // @todo? These are not input segments, but it might still worth caching (just gotta assign them an ID) - boost::optional< Target_Line_2 > l1 = CGAL_SS_i::compute_normalized_line_ceoffC2(s1); - boost::optional< Target_Line_2 > l2 = CGAL_SS_i::compute_normalized_line_ceoffC2(s2); + Target_Segment_with_ID_2 lSL (lToFiltered(lHL->opposite()->vertex()->point()), + lToFiltered(lHL->vertex()->point()), + lHL->id()); + Target_Segment_with_ID_2 lSR (lToFiltered(lHR->opposite()->vertex()->point()), + lToFiltered(lHR->vertex()->point()), + lHR->id()); - Target_Vector_2 lV1(l1->a(), l1->b()) ; - Target_Vector_2 lV2(l2->a(), l2->b()) ; - Target_Vector_2 lV12 = lV1 + lV2 ; - Target_Ray_2 bisect_ray(laP, lV12) ; + std::optional lL = CGAL_SS_i::compute_weighted_line_coeffC2(lSL, lToFiltered(lHL->weight()), mApproximate_traits.mCaches); + std::optional lR = CGAL_SS_i::compute_weighted_line_coeffC2(lSR, lToFiltered(lHR->weight()), mApproximate_traits.mCaches); - // F2C to_input; - // std::cout << "bisect " << aNode->point() << " " << aNode->point() + to_input(lV12) << "\n"; + Target_Point_2 laP = lToFiltered(aNode->point()); - for ( Halfedge_handle_vector_iterator i = contour_halfedges_begin; i != contour_halfedges_end; ++ i ) + // These are weighted direction of the lines supporting the contour segments. + // Coefficients for SR are negated because aNode is at the "source" of SR. + Target_Vector_2 lVL( lL->b(), - lL->a()) ; + Target_Vector_2 lVR(- lR->b(), lR->a()) ; + Target_Vector_2 lVLR = lVL + lVR ; + Target_Ray_2 bisect_ray(laP, lVLR) ; + + // @todo this should use some kind of spatial searching + for ( Halfedge_handle_vector_iterator h = contour_halfedges_begin; h != contour_halfedges_end; ++h ) { try { - CGAL_assertion((*i)->vertex()->is_contour() && (*i)->opposite()->vertex()->is_contour() ); - Target_Segment_2 s_h(to_FK((*i)->opposite()->vertex()->point()), to_FK((*i)->vertex()->point())); + CGAL_assertion((*h)->vertex()->is_contour() && (*h)->opposite()->vertex()->is_contour() ); - Uncertain inter = FK().do_intersect_2_object()(s_h, bisect_ray); - Uncertain orient = FK().orientation_2_object()(s_h[0], s_h[1], laP); + // @todo could be a line as long as we are in a convex area + Target_Segment_2 s_h(lToFiltered((*h)->opposite()->vertex()->point()), + lToFiltered((*h)->vertex()->point())); // we use segments of the input polygon intersected by the bisector and such that // they are oriented such that the reflex vertex is on the left side of the segment - if (!is_certain(inter) || !is_certain(orient) || !inter || orient != LEFT_TURN) + Uncertain orient = FK().orientation_2_object()(s_h[0], s_h[1], laP); + if (!is_certain(orient) || orient != LEFT_TURN) continue; - // Note that we don't need the normalization - boost::optional< Target_Line_2 > lh = CGAL_SS_i::compute_normalized_line_ceoffC2(s_h); - - typename FK::FT lBound = ( - lh->c() - lh->a()*laP.x() - lh->b()*laP.y() ) / - ( lh->a()*lV12.x() + lh->b()*lV12.y() ); + Uncertain inter = FK().do_intersect_2_object()(bisect_ray, s_h); + if (!is_certain(inter) || !inter) + continue; - if ( ! is_finite(lBound) ) + // We want the time it takes to get from aNode to h along the primary bisector of aNode. + // + // Let d0 be the weighted direction of the defining contour edge to the left of aNode, that is (-b0, a0) / w0. + // Let d1 be the weighted, opposite direction of the defining contour edge to the right of aNode, that is (b1, -a1) / w1. + // The bisector has direction n0 + n1. + // Let n2 be the unweighted normal of 'h', that is v3 = (a, b) if h is defined as la*x+lb*y+lc = 0 + // + // Projecting aNode onto h orthogonally, we create a right triangle. + // Let theta be the angle between the line orthogonal to h through aNode and the primary bisector of aNode. + // Let T be the distance between aNode and the projection of aNode onto h. + // Let H be the distance between aNode and the intersection of aNode and h along the primary bisector of aNode. + // + // We have: + // cos(theta) = (d0 + d1) * n2 / (|d0 + d1| * |n2|) [note that |n2| = 1] + // and on the other hand: + // cos(theta) = T / H + // If we express H as lambda * |d0 + d1|, we get: + // lambda = - T / (d0 + d1) * n2 + + Target_Segment_with_ID_2 lSh (s_h, (*h)->id()); + std::optional lh = CGAL_SS_i::compute_normalized_line_coeffC2(lSh, mApproximate_traits.mCaches); + + Target_FT lLambda = - ( lh->a()*laP.x() + lh->b()*laP.y() + lh->c() ) / + ( lh->a()*lVLR.x() + lh->b()*lVLR.y() ) ; + + // Scale it because |d0 + d1| doesn't send aNode to the t=1 line, but to t=lL(aNode+d0+d1)=lR(aNode+d0+d1) + Target_Point_2 lP = laP + lVLR; + Target_FT lBound = lLambda * ( lL->a()*lP.x() + lL->b()*lP.y() + lL->c() ) ; + +#if 0 + std::cout << "E" << (*h)->id() << " s_h = " << s_h << std::endl; + std::cout << "left/right E" << lHL->id() << " E" << lHR->id() << std::endl; + std::cout << "V" << aNode->id() << std::endl; + std::cout << "lSL: " << lSL << std::endl; + std::cout << "lSR: " << lSR << std::endl; + std::cout << "lHL->weight(): " << lHL->weight() << std::endl; + std::cout << "lHR->weight(): " << lHR->weight() << std::endl; + std::cout << "lVL " << lVL << std::endl; + std::cout << "lVR " << lVR << std::endl; + std::cout << "lVLR " << lVLR << std::endl; + std::cout << "lAP " << laP << std::endl; + std::cout << "lAP + lVL " << laP + lVL << std::endl; + std::cout << "lAP + lVR " << laP + lVR << std::endl; + std::cout << "lAP+v " << laP + lVLR << std::endl; + std::cout << "Inter pt: " << *ip << std::endl; + + std::optional lh1 = CGAL_SS_i::compute_weighted_line_coeffC2(lSR, lToFiltered(lHR->weight()), mApproximate_traits.mCaches); + + std::cout << "lh0 check" << square(lh0->a()) + square(lh0->b()) << std::endl; + std::cout << "lh1 check" << square(lh1->a()) + square(lh1->b()) << std::endl; + std::cout << "l0 time at aNode: " << lh0->a()*laP.x() + lh0->b()*laP.y() + lh0->c() << std::endl; + std::cout << "l1 time at aNode: " << lh1->a()*laP.x() + lh1->b()*laP.y() + lh1->c() << std::endl; + std::cout << "l0 time at aNode + lVLR: " << lh0->a()*(laP + lVLR).x() + lh0->b()*(laP + lVLR).y() + lh0->c() << std::endl; + std::cout << "l1 time at aNode + lVLR: " << lh1->a()*(laP + lVLR).x() + lh1->b()*(laP + lVLR).y() + lh1->c() << std::endl; + + auto ipp = FK().intersect_2_object()(s_h, bisect_ray); + Target_Point_2* ip = std::get(&*ipp); + std::cout << "l0 time at inter pt: " << lh0->a()*ip->x() + lh0->b()*ip->y() + lh0->c() << std::endl; + std::cout << "l1 time at inter pt: " << lh1->a()*ip->x() + lh1->b()*ip->y() + lh1->c() << std::endl; + std::cout << "lh-> " << lh->a() << " " << lh->b() << " " << square(lh->a()) + square(lh->b()) << std::endl; + std::cout << "lh time at inter pt: " << lh->a()*ip->x() + lh->b()*ip->y() + lh->c() << std::endl; + std::cout << "lLambda: " << lLambda << std::endl; + std::cout << "lBound: " << lBound << std::endl; + CGAL_assertion(lBound == lh0->a()*ip->x() + lh0->b()*ip->y() + lh0->c()); +#endif + + if(!is_finite(lBound) || !is_positive(lBound)) continue; - if ( ! mApproximate_traits.mFilteringBound || *mApproximate_traits.mFilteringBound > lBound ) - mApproximate_traits.mFilteringBound = lBound ; + if(!mApproximate_traits.mFilteringBound || *mApproximate_traits.mFilteringBound > lBound) + mApproximate_traits.mFilteringBound = lBound; } catch(CGAL::Uncertain_conversion_exception&) {} } + + if(mApproximate_traits.mFilteringBound) + { + CGAL_STSKEL_TRAITS_TRACE("Filtering bound: " << *mApproximate_traits.mFilteringBound); + } else { + CGAL_STSKEL_TRAITS_TRACE("Filtering bound: none"); + } } public: - // TODO: as soon as an exact value we could refine the interval one. Not sure if it is worth it - Exact mExact_traits ; + // @todo as soon as an exact value we could refine the interval one. Not sure if it is worth it + Straight_skeleton_builder_traits_2_impl mExact_traits ; // Below is only used for the cached variables not the functor types Straight_skeleton_builder_traits_2_impl mApproximate_traits ; @@ -916,17 +910,6 @@ class Straight_skeleton_builder_traits_2 : public Straight_skeleton_builder_traits_2_impl::type, K> {} ; -CGAL_STRAIGHT_SKELETON_CREATE_FUNCTOR_ADAPTER(Do_ss_event_exist_2) -CGAL_STRAIGHT_SKELETON_CREATE_FUNCTOR_ADAPTER(Compare_ss_event_times_2) -CGAL_STRAIGHT_SKELETON_CREATE_FUNCTOR_ADAPTER(Compare_ss_event_angles_2) -CGAL_STRAIGHT_SKELETON_CREATE_FUNCTOR_ADAPTER(Is_edge_facing_ss_node_2) -CGAL_STRAIGHT_SKELETON_CREATE_FUNCTOR_ADAPTER(Oriented_side_of_event_point_wrt_bisector_2) -CGAL_STRAIGHT_SKELETON_CREATE_FUNCTOR_ADAPTER(Are_ss_events_simultaneous_2) -CGAL_STRAIGHT_SKELETON_CREATE_FUNCTOR_ADAPTER(Are_ss_edges_parallel_2) -CGAL_STRAIGHT_SKELETON_CREATE_FUNCTOR_ADAPTER(Are_ss_edges_collinear_2) -CGAL_STRAIGHT_SKELETON_CREATE_FUNCTOR_ADAPTER(Construct_ss_event_time_and_point_2) -CGAL_STRAIGHT_SKELETON_CREATE_FUNCTOR_ADAPTER(Construct_ss_trisegment_2) - } // end namespace CGAL #endif // CGAL_STRAIGHT_SKELETON_BUILDER_TRAITS_2_H // diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_converter_2.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_converter_2.h index d72b0074..c8756108 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_converter_2.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_converter_2.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h $ -// $Id: Straight_skeleton_converter_2.h aa1cb4b 2023-01-05T12:39:58+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h $ +// $Id: include/CGAL/Straight_skeleton_converter_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -19,8 +19,8 @@ #include #include -#include -#include +#include + #include @@ -46,18 +46,19 @@ struct Straight_skeleton_items_converter_2: Cartesian_converter< typename Source typedef CGAL_SS_i::Segment_2_with_ID Source_segment_2_with_ID; typedef CGAL_SS_i::Segment_2_with_ID Target_segment_2_with_ID; + typedef typename Source_traits::FT Source_FT; typedef typename Source_traits::Segment_2 Source_segment_2; typedef typename Target_traits::Segment_2 Target_segment_2; typedef Trisegment_2 Source_trisegment_2; typedef Trisegment_2 Target_trisegment_2; - typedef boost::intrusive_ptr Source_trisegment_2_ptr; - typedef boost::intrusive_ptr Target_trisegment_2_ptr; + typedef Trisegment_2_ptr Source_trisegment_2_ptr; + typedef Trisegment_2_ptr Target_trisegment_2_ptr; // Same as above, but for Segment with IDs... typedef Trisegment_2 Source_trisegment_2_with_ID; typedef Trisegment_2 Target_trisegment_2_with_ID; - typedef boost::intrusive_ptr Source_trisegment_2_with_ID_ptr; - typedef boost::intrusive_ptr Target_trisegment_2_with_ID_ptr; + typedef Trisegment_2_ptr Source_trisegment_2_with_ID_ptr; + typedef Trisegment_2_ptr Target_trisegment_2_with_ID_ptr; typedef Cartesian_converter Base ; @@ -69,13 +70,15 @@ struct Straight_skeleton_items_converter_2: Cartesian_converter< typename Source typedef typename Target_skeleton::Halfedge Target_halfedge ; typedef typename Target_skeleton::Face Target_face ; + using Base::operator(); + Target_vertex operator() ( Source_vertex_const_handle aV ) const { CGAL_assertion( handle_assigned(aV) ) ; return Target_vertex( aV->id() - , this->Base::operator()(aV->point()) - , this->Base::operator()(aV->time ()) + , this->operator()(aV->point()) + , this->operator()(aV->time ()) , aV->is_split() , aV->has_infinite_time() ) ; @@ -97,7 +100,7 @@ struct Straight_skeleton_items_converter_2: Cartesian_converter< typename Source Target_segment_2_with_ID operator() ( const Source_segment_2_with_ID& aS ) const { - return Target_segment_2_with_ID(this->Base::operator()( + return Target_segment_2_with_ID(this->operator()( static_cast(aS)), aS.mID); } @@ -107,13 +110,20 @@ struct Straight_skeleton_items_converter_2: Cartesian_converter< typename Source const auto& lSe1 = aT->e1(); const auto& lSe2 = aT->e2(); + const Source_FT& lW0 = aT->w0(); + const Source_FT& lW1 = aT->w1(); + const Source_FT& lW2 = aT->w2(); + Trisegment_collinearity lCollinearity = aT->collinearity(); std::size_t lId = aT->id(); Target_trisegment_2_ptr rT = Target_trisegment_2_ptr( new Target_trisegment_2(this->operator()(lSe0), + this->operator()(lW0), this->operator()(lSe1), + this->operator()(lW1), this->operator()(lSe2), + this->operator()(lW2), lCollinearity, lId)); if ( aT->child_l() ) @@ -132,13 +142,20 @@ struct Straight_skeleton_items_converter_2: Cartesian_converter< typename Source const auto& lSe1 = aT->e1(); const auto& lSe2 = aT->e2(); + const Source_FT& lW0 = aT->w0(); + const Source_FT& lW1 = aT->w1(); + const Source_FT& lW2 = aT->w2(); + Trisegment_collinearity lCollinearity = aT->collinearity(); std::size_t lId = aT->id(); Target_trisegment_2_with_ID_ptr rT = Target_trisegment_2_with_ID_ptr( new Target_trisegment_2_with_ID(this->operator()(lSe0), + this->operator()(lW0), this->operator()(lSe1), + this->operator()(lW1), this->operator()(lSe2), + this->operator()(lW2), lCollinearity, lId)); if ( aT->child_l() ) @@ -163,7 +180,7 @@ struct Straight_skeleton_converter_2 typedef typename Source_skeleton::Traits Source_traits ; typedef typename Target_skeleton::Traits Target_traits ; - typedef boost::shared_ptr Target_skeleton_ptr ; + typedef std::shared_ptr Target_skeleton_ptr ; typedef typename Source_skeleton::Vertex_const_iterator Source_vertex_const_iterator ; typedef typename Source_skeleton::Halfedge_const_iterator Source_halfedge_const_iterator ; @@ -333,7 +350,7 @@ private : } ; template -boost::shared_ptr +std::shared_ptr convert_straight_skeleton_2 ( Source_skeleton const& aSrc, Items_converter const& ic ) { typedef Straight_skeleton_converter_2 Skeleton_converter ; @@ -345,7 +362,7 @@ convert_straight_skeleton_2 ( Source_skeleton const& aSrc, Items_converter const } template -boost::shared_ptr +std::shared_ptr convert_straight_skeleton_2 ( Source_skeleton const& aSrc ) { typedef Straight_skeleton_items_converter_2 Items_converter ; diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_face_base_2.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_face_base_2.h index d01205dc..500267cc 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_face_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_face_base_2.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_face_base_2.h $ -// $Id: Straight_skeleton_face_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_face_base_2.h $ +// $Id: include/CGAL/Straight_skeleton_face_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_halfedge_base_2.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_halfedge_base_2.h index 79a9d75e..504c163c 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_halfedge_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_halfedge_base_2.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_halfedge_base_2.h $ -// $Id: Straight_skeleton_halfedge_base_2.h 2410d8e 2023-01-04T16:36:34+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_halfedge_base_2.h $ +// $Id: include/CGAL/Straight_skeleton_halfedge_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -13,13 +13,14 @@ #include +#include #include #include namespace CGAL { -template < class Refs > +template < class Refs, class FT > class Straight_skeleton_halfedge_base_base_2 { public: @@ -38,35 +39,24 @@ class Straight_skeleton_halfedge_base_base_2 typedef typename Refs::Vertex Vertex; typedef typename Refs::Face Face; - typedef Straight_skeleton_halfedge_base_base_2 Base_base ; + typedef Straight_skeleton_halfedge_base_base_2 Base_base ; protected: - Straight_skeleton_halfedge_base_base_2() : mF(Face_handle()), mID(-1), mSlope(ZERO) {} + Straight_skeleton_halfedge_base_base_2() + : mF(Face_handle()), mID(-1), mSlope(ZERO), mWeight(1) + {} - Straight_skeleton_halfedge_base_base_2( int aID ) : mF(Face_handle()), mID(aID), mSlope(ZERO) {} + Straight_skeleton_halfedge_base_base_2( int aID ) + : mF(Face_handle()), mID(aID), mSlope(ZERO), mWeight(1) + {} - Straight_skeleton_halfedge_base_base_2( int aID, Sign aSlope ) : mF(Face_handle()), mID(aID), mSlope(aSlope) {} + Straight_skeleton_halfedge_base_base_2( int aID, Sign aSlope ) + : mF(Face_handle()), mID(aID), mSlope(aSlope), mWeight(1) + {} public: - int id() const { return mID ; } - - bool is_bisector() const - { - return !this->is_border() && !this->opposite()->is_border() ; - } - - bool is_inner_bisector() const - { - return !this->vertex()->is_contour() && !this->opposite()->vertex()->is_contour(); - } - - bool has_infinite_time() const { return this->vertex()->has_infinite_time() ; } - - Halfedge_const_handle defining_contour_edge() const { return this->face()->halfedge() ; } - Halfedge_handle defining_contour_edge() { return this->face()->halfedge() ; } - Halfedge_handle opposite() { return mOpp;} Halfedge_const_handle opposite() const { return mOpp;} Halfedge_handle next () { return mNxt;} @@ -78,8 +68,6 @@ class Straight_skeleton_halfedge_base_base_2 Face_handle face () { return mF; } Face_const_handle face () const { return mF; } - Sign slope() const { return mSlope ; } - bool is_border() const { return mF == Face_handle();} void set_opposite( Halfedge_handle h) { mOpp = h; } @@ -88,9 +76,29 @@ class Straight_skeleton_halfedge_base_base_2 void set_vertex ( Vertex_handle w) { mV = w; } void set_face ( Face_handle g) { mF = g; } + int id() const { CGAL_assertion(mID != -1); return mID ; } + void reset_id ( int aID ) { mID = aID ; } + + bool is_bisector() const + { + return !this->is_border() && !this->opposite()->is_border() ; + } + + bool is_inner_bisector() const + { + return !this->vertex()->is_contour() && !this->opposite()->vertex()->is_contour(); + } + + bool has_infinite_time() const { return this->vertex()->has_infinite_time() ; } + + Halfedge_const_handle defining_contour_edge() const { return this->face()->halfedge() ; } + Halfedge_handle defining_contour_edge() { return this->face()->halfedge() ; } + + Sign slope() const { return mSlope ; } void set_slope( Sign aSlope ) { mSlope = aSlope ; } - void reset_id ( int aID ) { mID = aID ; } + FT weight() const { return mWeight ; } + void set_weight( FT aWeight ) { mWeight = aWeight ; } private: @@ -101,10 +109,11 @@ class Straight_skeleton_halfedge_base_base_2 Face_handle mF; int mID ; Sign mSlope ; + FT mWeight ; }; -template < class Refs > -class Straight_skeleton_halfedge_base_2 : public Straight_skeleton_halfedge_base_base_2 +template < class Refs, class FT > +class Straight_skeleton_halfedge_base_2 : public Straight_skeleton_halfedge_base_base_2 { public: @@ -112,8 +121,8 @@ class Straight_skeleton_halfedge_base_2 : public Straight_skeleton_halfedge_base typedef typename Refs::Halfedge_handle Halfedge_handle; typedef typename Refs::Face_handle Face_handle; - typedef Straight_skeleton_halfedge_base_base_2 Base_base ; - typedef Straight_skeleton_halfedge_base_2 Base ; + typedef Straight_skeleton_halfedge_base_base_2 Base_base ; + typedef Straight_skeleton_halfedge_base_2 Base ; Straight_skeleton_halfedge_base_2() {} diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_items_2.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_items_2.h index 66a28114..d9139022 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_items_2.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_items_2.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_items_2.h $ -// $Id: Straight_skeleton_items_2.h b6333ed 2020-10-05T18:29:34+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_items_2.h $ +// $Id: include/CGAL/Straight_skeleton_items_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -35,7 +35,8 @@ class Straight_skeleton_items_2 template struct Halfedge_wrapper { - typedef Straight_skeleton_halfedge_base_2 < Refs > Halfedge; + typedef typename Traits::FT FT ; + typedef Straight_skeleton_halfedge_base_2 < Refs, FT > Halfedge; }; template diff --git a/thirdparty/CGAL/include/CGAL/Straight_skeleton_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Straight_skeleton_vertex_base_2.h index 3d0ec9a3..fb8886b0 100644 --- a/thirdparty/CGAL/include/CGAL/Straight_skeleton_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Straight_skeleton_vertex_base_2.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h $ -// $Id: Straight_skeleton_vertex_base_2.h 6b5954d 2023-01-04T22:11:13+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h $ +// $Id: include/CGAL/Straight_skeleton_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -161,7 +161,7 @@ protected : typedef CGAL_SS_i::Segment_2_with_ID Segment_2 ; typedef CGAL_SS_i::Segment_2_with_ID Segment_2_with_ID ; // for BOOST_MPL_HAS_XXX_TRAIT_DEF typedef CGAL::Trisegment_2 Trisegment_2 ; - typedef boost::intrusive_ptr Trisegment_2_ptr; + typedef CGAL::Trisegment_2_ptr Trisegment_2_ptr; public: @@ -251,7 +251,7 @@ protected : // of these trisegments will become incoherent with the straight skeleton, but // that's OK because it is still valid to compute purely geometrical information // such as the node position and its time, which is all that is required for offset tracing. - Trisegment_2_ptr trisegment() const { return mTrisegment ; } + Trisegment_2_ptr const& trisegment() const { return mTrisegment ; } void set_trisegment( Trisegment_2_ptr const& aTrisegment ) { mTrisegment = aTrisegment ; } public : @@ -263,11 +263,10 @@ public : int mID ; Halfedge_handle mHE ; - Triedge mEventTriedge ; - Trisegment_2_ptr mTrisegment ; Point_2 mP; FT mTime ; unsigned char mFlags ; + Trisegment_2_ptr mTrisegment ; }; template < class Refs, class P, class N > @@ -303,8 +302,6 @@ class Straight_skeleton_vertex_base_2 : public Straight_skeleton_vertex_base_bas {} } ; -} // end namespace CGAL +} // namespace CGAL #endif // CGAL_STRAIGHT_SKELETON_VERTEX_BASE_2_H // -// EOF // - diff --git a/thirdparty/CGAL/include/CGAL/Stream_lines_2.h b/thirdparty/CGAL/include/CGAL/Stream_lines_2.h index aaaff544..80bdabc9 100644 --- a/thirdparty/CGAL/include/CGAL/Stream_lines_2.h +++ b/thirdparty/CGAL/include/CGAL/Stream_lines_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_lines_2/include/CGAL/Stream_lines_2.h $ -// $Id: Stream_lines_2.h 1faa0e2 2021-04-28T10:55:26+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_lines_2/include/CGAL/Stream_lines_2.h $ +// $Id: include/CGAL/Stream_lines_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -26,7 +26,7 @@ #include -#include +#include #include #include // undocumented class @@ -392,7 +392,7 @@ Stream_lines_2::integrate_forward(const Vector_fiel { Point_2 ex_old_point = old_point; old_point = new_point; - CGAL_streamlines_precondition(vector_field_2.is_in_domain(old_point)); + CGAL_precondition(vector_field_2.is_in_domain(old_point)); new_point = integrator(old_point,vector_field_2,true); bEnd = !vector_field_2.is_in_domain(new_point); bEnd = bEnd || (new_point == old_point);/* to review */ @@ -521,7 +521,7 @@ void Stream_lines_2::integrate_backward(const Vecto Point_2 ex_old_point = old_point; old_point = new_point; std::pair field_vector; - CGAL_streamlines_precondition(vector_field_2.is_in_domain(old_point)); + CGAL_precondition(vector_field_2.is_in_domain(old_point)); new_point = integrator(old_point,vector_field_2,false); bEnd = !vector_field_2.is_in_domain(new_point); FT dist_ = distance(ex_old_point,new_point); diff --git a/thirdparty/CGAL/include/CGAL/Stream_support/internal/Geometry_container.h b/thirdparty/CGAL/include/CGAL/Stream_support/internal/Geometry_container.h index 1b3b3d30..7115d228 100644 --- a/thirdparty/CGAL/include/CGAL/Stream_support/internal/Geometry_container.h +++ b/thirdparty/CGAL/include/CGAL/Stream_support/internal/Geometry_container.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_support/include/CGAL/Stream_support/internal/Geometry_container.h $ -// $Id: Geometry_container.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_support/include/CGAL/Stream_support/internal/Geometry_container.h $ +// $Id: include/CGAL/Stream_support/internal/Geometry_container.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno @@ -16,7 +16,7 @@ #define GEOMETRY_CONTAINER_H #include #include -#include +#include struct Dummy_deleter{ template @@ -45,7 +45,7 @@ struct Geometry_container{ typedef typename Range::const_reverse_iterator const_reverse_iterator; typedef typename Range::size_type size_type; typedef typename Range::value_type value_type; - boost::shared_ptr range; + std::shared_ptr range; bool must_delete; // // Default constructor. diff --git a/thirdparty/CGAL/include/CGAL/Subdivision_method_3/internal/Euler_extensions.h b/thirdparty/CGAL/include/CGAL/Subdivision_method_3/internal/Euler_extensions.h index 47743380..3748e851 100644 --- a/thirdparty/CGAL/include/CGAL/Subdivision_method_3/internal/Euler_extensions.h +++ b/thirdparty/CGAL/include/CGAL/Subdivision_method_3/internal/Euler_extensions.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Subdivision_method_3/include/CGAL/Subdivision_method_3/internal/Euler_extensions.h $ -// $Id: Euler_extensions.h e893ac1 2020-08-18T10:06:51+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Subdivision_method_3/include/CGAL/Subdivision_method_3/internal/Euler_extensions.h $ +// $Id: include/CGAL/Subdivision_method_3/internal/Euler_extensions.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Subdivision_method_3/internal/subdivision_hosts_impl_3.h b/thirdparty/CGAL/include/CGAL/Subdivision_method_3/internal/subdivision_hosts_impl_3.h index 50a9bc82..16b3df8f 100644 --- a/thirdparty/CGAL/include/CGAL/Subdivision_method_3/internal/subdivision_hosts_impl_3.h +++ b/thirdparty/CGAL/include/CGAL/Subdivision_method_3/internal/subdivision_hosts_impl_3.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Subdivision_method_3/include/CGAL/Subdivision_method_3/internal/subdivision_hosts_impl_3.h $ -// $Id: subdivision_hosts_impl_3.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Subdivision_method_3/include/CGAL/Subdivision_method_3/internal/subdivision_hosts_impl_3.h $ +// $Id: include/CGAL/Subdivision_method_3/internal/subdivision_hosts_impl_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -81,6 +81,7 @@ void PQQ_1step(Poly& p, VertexPointMap vpm, Mask mask) { int i=0; std::unordered_map v_index; for(vertex_descriptor vh : p_vertices){ + vertex_point_buffer[i] = get(vpm, vh); v_index[vh]= i++; } diff --git a/thirdparty/CGAL/include/CGAL/Subdivision_method_3/subdivision_hosts_3.h b/thirdparty/CGAL/include/CGAL/Subdivision_method_3/subdivision_hosts_3.h index 9afe8729..b0aaced6 100644 --- a/thirdparty/CGAL/include/CGAL/Subdivision_method_3/subdivision_hosts_3.h +++ b/thirdparty/CGAL/include/CGAL/Subdivision_method_3/subdivision_hosts_3.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Subdivision_method_3/include/CGAL/Subdivision_method_3/subdivision_hosts_3.h $ -// $Id: subdivision_hosts_3.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Subdivision_method_3/include/CGAL/Subdivision_method_3/subdivision_hosts_3.h $ +// $Id: include/CGAL/Subdivision_method_3/subdivision_hosts_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Subdivision_method_3/subdivision_masks_3.h b/thirdparty/CGAL/include/CGAL/Subdivision_method_3/subdivision_masks_3.h index d7e3ef04..c0221120 100644 --- a/thirdparty/CGAL/include/CGAL/Subdivision_method_3/subdivision_masks_3.h +++ b/thirdparty/CGAL/include/CGAL/Subdivision_method_3/subdivision_masks_3.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Subdivision_method_3/include/CGAL/Subdivision_method_3/subdivision_masks_3.h $ -// $Id: subdivision_masks_3.h 45696cd 2021-10-30T13:35:17+03:00 Dimitris Papavasiliou +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Subdivision_method_3/include/CGAL/Subdivision_method_3/subdivision_masks_3.h $ +// $Id: include/CGAL/Subdivision_method_3/subdivision_masks_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -88,7 +88,7 @@ class Linear_mask_3 : public PQQ_stencil_3 { public: Linear_mask_3(Mesh* pmesh) - : Base(pmesh, get(vertex_point, pmesh)) + : Base(pmesh, get(vertex_point, *pmesh)) { } Linear_mask_3(Mesh* pmesh, VertexPointMap vpmap) @@ -118,7 +118,7 @@ class Linear_mask_3 : public PQQ_stencil_3 { } void border_node(halfedge_descriptor edge, Point& ept, Point& /*vpt*/){ - edge_node(edge, ept); + edge_node(edge, ept); } }; @@ -142,7 +142,7 @@ such as `Polyhedron_3` and `Surface_mesh`. \image html CCBorderMask.svg -\cgalModels `PQQMask_3` +\cgalModels{PQQMask_3} \sa `CGAL::Subdivision_method_3` */ @@ -266,7 +266,7 @@ such as `Polyhedron_3` and `Surface_mesh`. \image html LoopBorderMask.png \image latex LoopBorderMask.png -\cgalModels `PTQMask_3` +\cgalModels{PTQMask_3} \sa `CGAL::Subdivision_method_3` @@ -429,7 +429,7 @@ such as `Polyhedron_3` and `Surface_mesh`. \image html DSCornerMask.png \image latex DSCornerMask.png -\cgalModels `DQQMask_3` +\cgalModels{DQQMask_3} \sa `CGAL::Subdivision_method_3` @@ -523,7 +523,7 @@ such as `Polyhedron_3` and `Surface_mesh`. \tparam PolygonMesh must be a model of the concept `MutableFaceGraph`. Additionally all faces must be triangles. \tparam VertexPointMap must be a model of `WritablePropertyMap` with value type `Point_3` -\cgalModels `Sqrt3Mask_3` +\cgalModels{Sqrt3Mask_3} \sa `CGAL::Subdivision_method_3` @@ -571,12 +571,12 @@ class Sqrt3_mask_3 : public Linear_mask_3 { /// computes the \f$ \sqrt{3}\f$ vertex-point `pt` of the vertex `vd`. void vertex_node(vertex_descriptor vertex, Point& pt) { Halfedge_around_target_circulator vcir(vertex, *(this->pmesh)); - const typename boost::graph_traits::degree_size_type n = degree(vertex, *(this->pmesh)); + const int n = static_cast(degree(vertex, *(this->pmesh))); const FT a = (FT) ((4.0-2.0*std::cos(2.0*CGAL_PI/(double)n))/9.0); Vector cv = ((FT)(1.0-a)) * (get(this->vpmap, vertex) - CGAL::ORIGIN); - for (typename boost::graph_traits::degree_size_type i = 1; i <= n; ++i, --vcir) { + for (int i = 1; i <= n; ++i, --vcir) { cv = cv + (a/FT(n))*(get(this->vpmap, target(opposite(*vcir, *(this->pmesh)), *(this->pmesh)))-CGAL::ORIGIN); } diff --git a/thirdparty/CGAL/include/CGAL/Subdivision_method_3/subdivision_methods_3.h b/thirdparty/CGAL/include/CGAL/Subdivision_method_3/subdivision_methods_3.h index 788aadb9..aba5a783 100644 --- a/thirdparty/CGAL/include/CGAL/Subdivision_method_3/subdivision_methods_3.h +++ b/thirdparty/CGAL/include/CGAL/Subdivision_method_3/subdivision_methods_3.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Subdivision_method_3/include/CGAL/Subdivision_method_3/subdivision_methods_3.h $ -// $Id: subdivision_methods_3.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Subdivision_method_3/include/CGAL/Subdivision_method_3/subdivision_methods_3.h $ +// $Id: include/CGAL/Subdivision_method_3/subdivision_methods_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -74,6 +74,7 @@ Catmull-Clark subdivision. \sa `CGAL::DooSabin_mask_3` +\sa `CGAL::Linear_mask_3` */ /// @{ @@ -121,7 +122,6 @@ void CatmullClark_subdivision(PolygonMesh& pmesh, int step) { * \cgalParamNEnd * \cgalNamedParamsEnd * - * \pre `pmesh` must be a triangle mesh. **/ template void CatmullClark_subdivision(PolygonMesh& pmesh, const NamedParameters& np = parameters::default_values()) { @@ -179,6 +179,8 @@ void Loop_subdivision(PolygonMesh& pmesh, int step) { * \cgalParamDefault{`1`} * \cgalParamNEnd * \cgalNamedParamsEnd + * + * \pre `pmesh` must be a triangle mesh. **/ template void Loop_subdivision(PolygonMesh& pmesh, const NamedParameters& np = parameters::default_values()) { diff --git a/thirdparty/CGAL/include/CGAL/Subiterator.h b/thirdparty/CGAL/include/CGAL/Subiterator.h index 4a8158c5..f2aed925 100644 --- a/thirdparty/CGAL/include/CGAL/Subiterator.h +++ b/thirdparty/CGAL/include/CGAL/Subiterator.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/Subiterator.h $ -// $Id: Subiterator.h 3efe2ec 2021-03-31T09:40:19+02:00 Simon Giraudot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/Subiterator.h $ +// $Id: include/CGAL/Subiterator.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot // @@ -13,6 +13,9 @@ #ifndef CGAL_PCA_SUBITERATOR_H #define CGAL_PCA_SUBITERATOR_H +#include + + #include namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh.h b/thirdparty/CGAL/include/CGAL/Surface_mesh.h index e0fae216..d51b2003 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh/include/CGAL/Surface_mesh.h $ -// $Id: Surface_mesh.h 2f4e49b 2020-03-23T09:47:01+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh/include/CGAL/Surface_mesh.h $ +// $Id: include/CGAL/Surface_mesh.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Phlipp Moeller diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh/IO.h b/thirdparty/CGAL/include/CGAL/Surface_mesh/IO.h index 422aa21a..e94ed0db 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh/IO.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh/IO.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh/include/CGAL/Surface_mesh/IO.h $ -// $Id: IO.h 56025fb 2021-05-04T14:38:47+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh/include/CGAL/Surface_mesh/IO.h $ +// $Id: include/CGAL/Surface_mesh/IO.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh/IO/3MF.h b/thirdparty/CGAL/include/CGAL/Surface_mesh/IO/3MF.h index c476ef4f..0318e2f7 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh/IO/3MF.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh/IO/3MF.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh/include/CGAL/Surface_mesh/IO/3MF.h $ -// $Id: 3MF.h 56025fb 2021-05-04T14:38:47+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh/include/CGAL/Surface_mesh/IO/3MF.h $ +// $Id: include/CGAL/Surface_mesh/IO/3MF.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh/IO/OFF.h b/thirdparty/CGAL/include/CGAL/Surface_mesh/IO/OFF.h index edf9d050..e63ba3cd 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh/IO/OFF.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh/IO/OFF.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h $ -// $Id: OFF.h 477353d 2022-04-20T15:55:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h $ +// $Id: include/CGAL/Surface_mesh/IO/OFF.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -286,7 +286,7 @@ bool read_OFF_with_or_without_vnormals(std::istream& is, /// \cgalParamDescription{a property map associating normals to the vertices of `sm`} /// \cgalParamType{a class model of `WritablePropertyMap` with `Surface_mesh::Vertex_index` /// as key type and a 3D vector type issued from the same kernel as `Point` as value type} -/// \cgalParamDefault{If this parameter is unsused, vertex normals (if they exist) +/// \cgalParamDefault{If this parameter is unused, vertex normals (if they exist) /// will be written in an internal property map called `v:normal`.} /// \cgalParamNEnd /// @@ -294,7 +294,7 @@ bool read_OFF_with_or_without_vnormals(std::istream& is, /// \cgalParamDescription{a property map associating colors to the vertices of `sm`} /// \cgalParamType{a class model of `WritablePropertyMap` with `Surface_mesh::Vertex_index` /// as key type and `CGAL::IO::Color` as value type} -/// \cgalParamDefault{If this parameter is unsused, vertex colors (if they exist) +/// \cgalParamDefault{If this parameter is unused, vertex colors (if they exist) /// will be written in an internal property map called `v:color`.} /// \cgalParamNEnd /// @@ -302,7 +302,7 @@ bool read_OFF_with_or_without_vnormals(std::istream& is, /// \cgalParamDescription{a property map associating textures to the vertices of `sm`} /// \cgalParamType{a class model of `WritablePropertyMap` with `Surface_mesh::Vertex_index` /// as key type and a 2D vector type issued from the same kernel as `Point` as value type} -/// \cgalParamDefault{If this parameter is unsused, vertex textures (if they exist) +/// \cgalParamDefault{If this parameter is unused, vertex textures (if they exist) /// will be written in an internal property map called `v:texcoords`.} /// \cgalParamNEnd /// @@ -310,7 +310,7 @@ bool read_OFF_with_or_without_vnormals(std::istream& is, /// \cgalParamDescription{a property map associating colors to the faces of `sm`} /// \cgalParamType{a class model of `WritablePropertyMap` with `Surface_mesh::Face_index` /// as key type and `CGAL::IO::Color` as value type} -/// \cgalParamDefault{If this parameter is unsused, face colors (if they exist) +/// \cgalParamDefault{If this parameter is unused, face colors (if they exist) /// will be written in an internal property map called `f:color`.} /// \cgalParamNEnd /// \cgalNamedParamsEnd diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh/IO/PLY.h b/thirdparty/CGAL/include/CGAL/Surface_mesh/IO/PLY.h index 6f1bdb18..6a0a5a1c 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh/IO/PLY.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh/IO/PLY.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h $ -// $Id: PLY.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h $ +// $Id: include/CGAL/Surface_mesh/IO/PLY.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -145,10 +145,10 @@ class Surface_mesh_filler const std::string& name = property->name(); if(name == "vertex_indices" || name == "vertex_index") { - CGAL_assertion(dynamic_cast*>(property) - || dynamic_cast*>(property)); + CGAL_assertion(dynamic_cast*>(property) + || dynamic_cast*>(property)); m_index_tag = name; - m_use_int32_t = dynamic_cast*>(property); + m_use_int32_t = dynamic_cast*>(property); return true; } if(name == "red" || @@ -205,10 +205,42 @@ class Surface_mesh_filler instantiate_properties(element, m_halfedge_properties); } + template + void instantiate_properties_impl(PLY_element& element, + std::vector& properties, + internal::PLY_read_number* property, + std::tuple) + { + if(dynamic_cast*>(property)) + { + properties.push_back(new PLY_property_to_surface_mesh_property(m_mesh, property->name())); + return; + } + if(dynamic_cast*>(property)) + { + properties.push_back(new PLY_property_to_surface_mesh_property>(m_mesh, property->name())); + return; + } + instantiate_properties_impl(element, properties, property, std::tuple()); + } + + template + void instantiate_properties_impl(PLY_element&, + std::vector&, + internal::PLY_read_number*, + std::tuple<>) + {} + template void instantiate_properties(PLY_element& element, std::vector& properties) { + typedef std::tuple Type_tuple; + for(std::size_t j = 0; j < element.number_of_properties(); ++ j) { internal::PLY_read_number* property = element.property(j); @@ -216,40 +248,7 @@ class Surface_mesh_filler if(has_simplex_specific_property(property, Simplex())) continue; - const std::string& name = property->name(); - - if(dynamic_cast*>(property)) - { - properties.push_back(new PLY_property_to_surface_mesh_property(m_mesh, name)); - } - else if(dynamic_cast*>(property)) - { - properties.push_back(new PLY_property_to_surface_mesh_property(m_mesh, name)); - } - else if(dynamic_cast*>(property)) - { - properties.push_back(new PLY_property_to_surface_mesh_property(m_mesh, name)); - } - else if(dynamic_cast*>(property)) - { - properties.push_back(new PLY_property_to_surface_mesh_property(m_mesh, name)); - } - else if(dynamic_cast*>(property)) - { - properties.push_back(new PLY_property_to_surface_mesh_property(m_mesh, name)); - } - else if(dynamic_cast*>(property)) - { - properties.push_back(new PLY_property_to_surface_mesh_property(m_mesh, name)); - } - else if(dynamic_cast*>(property)) - { - properties.push_back(new PLY_property_to_surface_mesh_property(m_mesh, name)); - } - else if(dynamic_cast*>(property)) - { - properties.push_back(new PLY_property_to_surface_mesh_property(m_mesh, name)); - } + instantiate_properties_impl(element, properties, property, Type_tuple()); } } @@ -289,10 +288,22 @@ class Surface_mesh_filler if(m_vcolors == 3) { - unsigned char r, g, b; - element.assign(r, "red"); - element.assign(g, "green"); - element.assign(b, "blue"); + unsigned char r=0, g=0, b=0; + float rf=0, gf=0, bf=0; + if(element.has_property("red",r)) + { + element.assign(r, "red"); + element.assign(g, "green"); + element.assign(b, "blue"); + }else if(element.has_property("red", rf)) + { + element.assign(rf, "red"); + element.assign(gf, "green"); + element.assign(bf, "blue"); + r = static_cast(std::floor(rf*255)); + g = static_cast(std::floor(gf*255)); + b = static_cast(std::floor(bf*255)); + } m_vcolor_map[vi] = CGAL::IO::Color(r, g, b); } } @@ -302,9 +313,9 @@ class Surface_mesh_filler Face_index fi = m_mesh.null_face(); if(m_use_int32_t) - process_line(element, fi); + process_line(element, fi); else - process_line(element, fi); + process_line(element, fi); if(fi == Surface_mesh::null_face()) return false; @@ -331,10 +342,22 @@ class Surface_mesh_filler if(m_fcolors == 3) { - unsigned char r, g, b; - element.assign(r, "red"); - element.assign(g, "green"); - element.assign(b, "blue"); + unsigned char r=0, g=0, b=0; + float rf=0, gf=0, bf=0; + if(element.has_property("red",r)) + { + element.assign(r, "red"); + element.assign(g, "green"); + element.assign(b, "blue"); + } else if(element.has_property("red", rf)) + { + element.assign(rf, "red"); + element.assign(gf, "green"); + element.assign(bf, "blue"); + r = static_cast(std::floor(rf*255)); + g = static_cast(std::floor(gf*255)); + b = static_cast(std::floor(bf*255)); + } m_fcolor_map[fi] = CGAL::IO::Color(r, g, b); } } @@ -344,9 +367,9 @@ class Surface_mesh_filler Edge_index ei = m_mesh.null_edge(); if(m_use_int32_t) - process_line(element, ei); + process_line(element, ei); else - process_line(element, ei); + process_line(element, ei); if(ei == Surface_mesh::null_edge()) return false; @@ -377,9 +400,9 @@ class Surface_mesh_filler Halfedge_index hi = m_mesh.null_halfedge(); if(m_use_int32_t) - process_line(element, hi); + process_line(element, hi); else - process_line(element, hi); + process_line(element, hi); if(hi == Surface_mesh::null_halfedge()) return false; @@ -421,7 +444,7 @@ bool fill_simplex_specific_header(std::ostream& os, if(prop == "v:point") { - if(boost::is_same::value) + if(std::is_same::value) { os << "property float x" << std::endl << "property float y" << std::endl @@ -441,10 +464,10 @@ bool fill_simplex_specific_header(std::ostream& os, if(prop == "v:normal") { Vector_map pmap; - boost::tie(pmap, okay) = sm.template property_map(prop); + std::tie(pmap, okay) = sm.template property_map(prop); if(okay) { - if(boost::is_same::value) + if(std::is_same::value) { os << "property float nx" << std::endl << "property float ny" << std::endl @@ -464,7 +487,7 @@ bool fill_simplex_specific_header(std::ostream& os, if(prop == "v:color") { Vcolor_map pmap; - boost::tie(pmap, okay) = sm.template property_map(prop); + std::tie(pmap, okay) = sm.template property_map(prop); if(okay) { os << "property uchar red" << std::endl @@ -487,9 +510,9 @@ bool fill_simplex_specific_header(std::ostream& os, typename Surface_mesh::Face_index>*>& printers, const std::string& prop) { - typedef Surface_mesh SMesh; - typedef typename SMesh::Face_index FIndex; - typedef typename SMesh::template Property_map Fcolor_map; + typedef typename Surface_mesh::Face_index FIndex; + typedef CGAL::IO::Color Color; + typedef typename Surface_mesh::template Property_map Fcolor_map; if(prop == "f:connectivity" || prop == "f:removed") return true; @@ -498,7 +521,7 @@ bool fill_simplex_specific_header(std::ostream& os, if(prop == "f:color") { Fcolor_map pmap; - boost::tie(pmap, okay) = sm.template property_map(prop); + std::tie(pmap, okay) = sm.template property_map(prop); if(okay) { os << "property uchar red" << std::endl @@ -575,133 +598,156 @@ std::string get_property_raw_name(const std::string& prop, typename Surface_mesh return name; } -template +template ::value > +struct add_color_map { + add_color_map() {} + void operator()(std::vector*>&, + typename Surface_mesh::template Property_map&) { + } +}; + +template +struct add_color_map { + add_color_map() {} + + void operator()(std::vector*>& printers, + typename Surface_mesh::template Property_map& pmap) { + printers.push_back(new Property_printer::template Property_map>(pmap)); + } + + void operator()(std::vector*>& printers, + CGAL::internal::Dynamic, typename Surface_mesh::template Property_map >& pmap) { + printers.push_back(new Property_printer::template Property_map>(*pmap.map_)); + } +}; + +template +struct add_color_map { + add_color_map() {} + void operator()(std::vector*>&, + typename Surface_mesh::template Property_map&) { + } + void operator()(std::vector*>&, + CGAL::internal::Dynamic, typename Surface_mesh::template Property_map >&) { + } +}; + +template +void fill_header_impl(std::tuple, + const char* const type_strings[], + const Surface_mesh& sm, + const std::string& pname, + std::ostream& os, + std::vector*>& printers) +{ + constexpr std::size_t cid = s-std::tuple_size>::value; + bool okay = false; + { + typedef typename Surface_mesh::template Property_map Pmap; + Pmap pmap; + std::tie(pmap, okay) = sm.template property_map(pname); + if(okay) + { + std::string name = get_property_raw_name(pname, Simplex()); + os << "property " << type_strings[cid] << " " << name << std::endl; + printers.push_back(new internal::Simple_property_printer(pmap)); + return; + } + } + { + typedef typename Surface_mesh::template Property_map> Pmap; + Pmap pmap; + std::tie(pmap, okay) = sm.template property_map>(pname); + if(okay) + { + std::string name = get_property_raw_name(pname, Simplex()); + os << "property list uchar " << type_strings[cid] << " " << name << std::endl; + printers.push_back(new internal::Simple_property_vector_printer(pmap)); + return; + } + } + fill_header_impl(std::tuple(),type_strings, sm, pname, os, printers); +} + +template +void fill_header_impl(std::tuple<>, + const char* const [], + const Surface_mesh&, + const std::string&, + std::ostream&, + std::vector*>&) +{} + +template void fill_header(std::ostream& os, const Surface_mesh& sm, - std::vector*>& printers) + std::vector*>& printers, + const CGAL_NP_CLASS& np = parameters::default_values()) { - typedef Surface_mesh SMesh; - typedef typename SMesh::template Property_map Int8_map; - typedef typename SMesh::template Property_map Uint8_map; - typedef typename SMesh::template Property_map Int16_map; - typedef typename SMesh::template Property_map Uint16_map; - typedef typename SMesh::template Property_map Int32_map; - typedef typename SMesh::template Property_map Uint32_map; - typedef typename SMesh::template Property_map Int64_map; - typedef typename SMesh::template Property_map Uint64_map; - typedef typename SMesh::template Property_map Float_map; - typedef typename SMesh::template Property_map Double_map; + typedef std::tuple Type_tuple; + + static constexpr const char* type_strings[] = + { "char", "uchar", "short", "ushort","int", "uint", "int", "uint", "float", "double" }; + + typedef typename Surface_mesh::Face_index FIndex; + typedef typename Surface_mesh::Vertex_index VIndex; + + using VCM = typename internal_np::Lookup_named_param_def< + internal_np::vertex_color_map_t, + CGAL_NP_CLASS, + typename Surface_mesh::template Property_map >::type; + + using parameters::choose_parameter; + using parameters::is_default_parameter; + using parameters::get_parameter; + + VCM vcm = choose_parameter(get_parameter(np, internal_np::vertex_color_map), VCM()); + bool has_vcolor = !is_default_parameter::value; + + using FCM = typename internal_np::Lookup_named_param_def< + internal_np::face_color_map_t, + CGAL_NP_CLASS, + typename Surface_mesh::template Property_map >::type; + FCM fcm = choose_parameter(get_parameter(np, internal_np::face_color_map), FCM()); + bool has_fcolor = !is_default_parameter::value; std::vector prop = sm.template properties(); + if (std::is_same::value && has_fcolor) { + os << "property uchar red" << std::endl + << "property uchar green" << std::endl + << "property uchar blue" << std::endl + << "property uchar alpha" << std::endl; + add_color_map()(printers, fcm); + } + + if (std::is_same::value && has_vcolor) + { + os << "property uchar red" << std::endl + << "property uchar green" << std::endl + << "property uchar blue" << std::endl + << "property uchar alpha" << std::endl; + + add_color_map()(printers, vcm); + } + for(std::size_t i = 0; i < prop.size(); ++i) { - if(fill_simplex_specific_header(os, sm, printers, prop[i])) + // Override internal color maps if additional ones are provided via named parameters. + if (has_vcolor && prop[i] == "v:color") continue; - // Cut the "v:" prefix - std::string name = get_property_raw_name(prop[i], Simplex()); + if (has_fcolor && prop[i] == "f:color") + continue; - bool okay = false; - { - Int8_map pmap; - boost::tie(pmap, okay) = sm.template property_map(prop[i]); - if(okay) - { - os << "property char " << name << std::endl; - printers.push_back(new internal::Char_property_printer(pmap)); - continue; - } - } - { - Uint8_map pmap; - boost::tie(pmap, okay) = sm.template property_map(prop[i]); - if(okay) - { - os << "property uchar " << name << std::endl; - printers.push_back(new internal::Char_property_printer(pmap)); - continue; - } - } - { - Int16_map pmap; - boost::tie(pmap, okay) = sm.template property_map(prop[i]); - if(okay) - { - os << "property short " << name << std::endl; - printers.push_back(new internal::Simple_property_printer(pmap)); - continue; - } - } - { - Uint16_map pmap; - boost::tie(pmap, okay) = sm.template property_map(prop[i]); - if(okay) - { - os << "property ushort " << name << std::endl; - printers.push_back(new internal::Simple_property_printer(pmap)); - continue; - } - } - { - Int32_map pmap; - boost::tie(pmap, okay) = sm.template property_map(prop[i]); - if(okay) - { - os << "property int " << name << std::endl; - printers.push_back(new internal::Simple_property_printer(pmap)); - continue; - } - } - { - Uint32_map pmap; - boost::tie(pmap, okay) = sm.template property_map(prop[i]); - if(okay) - { - os << "property uint " << name << std::endl; - printers.push_back(new internal::Simple_property_printer(pmap)); - continue; - } - } - { - Int64_map pmap; - boost::tie(pmap, okay) = sm.template property_map(prop[i]); - if(okay) - { - os << "property int " << name << std::endl; - printers.push_back(new internal::Simple_property_printer(pmap)); - continue; - } - } - { - Uint64_map pmap; - boost::tie(pmap, okay) = sm.template property_map(prop[i]); - if(okay) - { - os << "property uint " << name << std::endl; - printers.push_back(new internal::Simple_property_printer(pmap)); - continue; - } - } - { - Float_map pmap; - boost::tie(pmap, okay) = sm.template property_map(prop[i]); - if(okay) - { - os << "property float " << name << std::endl; - printers.push_back(new internal::Simple_property_printer(pmap)); - continue; - } - } - { - Double_map pmap; - boost::tie(pmap, okay) = sm.template property_map(prop[i]); - if(okay) - { - os << "property double " << name << std::endl; - printers.push_back(new internal::Simple_property_printer(pmap)); - continue; - } - } + if(fill_simplex_specific_header(os, sm, printers, prop[i])) + continue; + + fill_header_impl::value>(Type_tuple(), type_strings, sm, prop[i], os, printers); } } @@ -942,19 +988,19 @@ bool write_PLY(std::ostream& os, os << "element vertex " << sm.number_of_vertices() << std::endl; std::vector*> vprinters; - internal::fill_header(os, sm, vprinters); + internal::fill_header(os, sm, vprinters, np); os << "element face " << sm.number_of_faces() << std::endl; os << "property list uchar int vertex_indices" << std::endl; std::vector*> fprinters; - internal::fill_header(os, sm, fprinters); + internal::fill_header(os, sm, fprinters, np); std::vector*> eprinters; if(sm.template properties().size() > 1) { std::ostringstream oss; - internal::fill_header(oss, sm, eprinters); + internal::fill_header(oss, sm, eprinters, np); if(!eprinters.empty()) { @@ -969,7 +1015,7 @@ bool write_PLY(std::ostream& os, if(sm.template properties().size() > 1) { std::ostringstream oss; - internal::fill_header(oss, sm, hprinters); + internal::fill_header(oss, sm, hprinters, np); if(!hprinters.empty()) { diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh/Properties.h b/thirdparty/CGAL/include/CGAL/Surface_mesh/Properties.h index 55b8160e..7d9dea0e 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh/Properties.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh/Properties.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh/include/CGAL/Surface_mesh/Properties.h $ -// $Id: Properties.h 090c61c 2022-04-20T17:08:05+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh/include/CGAL/Surface_mesh/Properties.h $ +// $Id: include/CGAL/Surface_mesh/Properties.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // @@ -67,7 +67,7 @@ class Base_property_array /// Return a deep copy of self. virtual Base_property_array* clone () const = 0; - /// Return a empty copy of self. + /// Return an empty copy of self. virtual Base_property_array* empty_clone () const = 0; /// Return the type_info of the property @@ -528,7 +528,7 @@ class Property_container /// @tparam Key The key type of the property map. It must be a model of `Index`. /// @tparam Value The value type of the property. /// -/// \cgalModels `LvaluePropertyMap` +/// \cgalModels{LvaluePropertyMap} /// template class Property_map_base @@ -538,8 +538,6 @@ class Property_map_base CRTP_derived_class> /// @endcond { - typedef void (Property_map_base::*bool_type)() const; - void this_type_does_not_support_comparisons() const {} public: typedef I key_type; typedef T value_type; @@ -596,11 +594,19 @@ class Property_map_base /// can be used, and \c false otherwise. operator bool () const; #else - operator bool_type() const { - return parray_ != nullptr ? - &Property_map_base::this_type_does_not_support_comparisons : 0; + explicit operator bool() const { + return parray_ != nullptr; } #endif + + bool operator==(const Property_map_base& pm) const { + return parray_ == pm.parray_; + } + + bool operator!=(const Property_map_base& pm) const { + return parray_ != pm.parray_; + } + /// Access the property associated with the key \c i. reference operator[](const I& i) { diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh/Surface_mesh.h b/thirdparty/CGAL/include/CGAL/Surface_mesh/Surface_mesh.h index 88a11dec..198a1fa1 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh/Surface_mesh.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h $ -// $Id: Surface_mesh.h 3072b93 2022-04-23T16:11:18+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h $ +// $Id: include/CGAL/Surface_mesh/Surface_mesh.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // @@ -29,11 +29,11 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -59,7 +59,7 @@ namespace CGAL { class SM_Index { public: - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; /// Constructor. %Default construction creates an invalid index. /// We write -1, which is /// (std::numeric_limits::max)() @@ -82,6 +82,10 @@ namespace CGAL { size_type idx() const { return idx_; } + // For convenience + size_type id() const { + return idx_; + } /// increments the internal index. This operation does not /// guarantee that the index is valid or undeleted after the @@ -234,7 +238,7 @@ namespace CGAL { class SM_Edge_index { public: - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; SM_Edge_index() : halfedge_((std::numeric_limits::max)()) { } @@ -321,7 +325,7 @@ namespace CGAL { /// @tparam P The type of the \em point property of a vertex. There is no requirement on `P`, /// besides being default constructible and assignable. /// In typical use cases it will be a 2D or 3D point type. - /// \cgalModels `MutableFaceGraph` and `FaceListGraph` + /// \cgalModels{MutableFaceGraph,FaceListGraph} /// /// \sa \ref PkgBGLConcepts "Graph Concepts" @@ -359,7 +363,7 @@ class Surface_mesh typedef P Point; /// The type used to represent an index. - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; ///@} @@ -371,9 +375,7 @@ class Surface_mesh #ifdef DOXYGEN_RUNNING /// This class represents a vertex. - /// \cgalModels `Index` - /// \cgalModels `LessThanComparable` - /// \cgalModels `Hashable` + /// \cgalModels{Index,LessThanComparable,Hashable} /// \sa `Halfedge_index`, `Edge_index`, `Face_index` class Vertex_index { @@ -394,9 +396,7 @@ class Surface_mesh #ifdef DOXYGEN_RUNNING /// This class represents a halfedge. - /// \cgalModels `Index` - /// \cgalModels `LessThanComparable` - /// \cgalModels `Hashable` + /// \cgalModels{Index,LessThanComparable,Hashable} /// \sa `Vertex_index`, `Edge_index`, `Face_index` class Halfedge_index { @@ -418,9 +418,7 @@ class Surface_mesh #ifdef DOXYGEN_RUNNING /// This class represents a face - /// \cgalModels `Index` - /// \cgalModels `LessThanComparable` - /// \cgalModels `Hashable` + /// \cgalModels{Index,LessThanComparable,Hashable} /// \sa `Vertex_index`, `Halfedge_index`, `Edge_index` class Face_index { @@ -440,9 +438,7 @@ class Surface_mesh #ifdef DOXYGEN_RUNNING /// This class represents an edge. - /// \cgalModels `Index` - /// \cgalModels `LessThanComparable` - /// \cgalModels `Hashable` + /// \cgalModels{Index,LessThanComparable,Hashable} /// \sa `Vertex_index`, `Halfedge_index`, `Face_index` class Edge_index { @@ -506,13 +502,14 @@ class Surface_mesh class Index_iterator : public boost::iterator_facade< Index_iterator, Index_, - std::random_access_iterator_tag + std::random_access_iterator_tag, + Index_ > { typedef boost::iterator_facade< Index_iterator, Index_, - std::random_access_iterator_tag - > Facade; + std::random_access_iterator_tag, + Index_> Facade; public: Index_iterator() : hnd_(), mesh_(nullptr) {} Index_iterator(const Index_& h, const Surface_mesh* m) @@ -590,7 +587,7 @@ class Surface_mesh return this->hnd_ == other.hnd_; } - Index_& dereference() const { return const_cast(hnd_); } + Index_ dereference() const { return hnd_; } Index_ hnd_; const Surface_mesh* mesh_; @@ -914,6 +911,7 @@ class Surface_mesh /// Copy constructor: copies `rhs` to `*this`. Performs a deep copy of all properties. Surface_mesh(const Surface_mesh& rhs) { *this = rhs; } + /// Move constructor. Surface_mesh(Surface_mesh&& sm) : vprops_(std::move(sm.vprops_)) , hprops_(std::move(sm.hprops_)) @@ -940,7 +938,7 @@ class Surface_mesh /// assigns `rhs` to `*this`. Performs a deep copy of all properties. Surface_mesh& operator=(const Surface_mesh& rhs); - + /// move assignment Surface_mesh& operator=(Surface_mesh&& sm) { vprops_ = std::move(sm.vprops_); @@ -1077,7 +1075,7 @@ class Surface_mesh /// \returns the face index of the added face, or `Surface_mesh::null_face()` if the face could not be added. Face_index add_face(Vertex_index v0, Vertex_index v1, Vertex_index v2) { - boost::array + std::array v = {{v0, v1, v2}}; return add_face(v); } @@ -1086,7 +1084,7 @@ class Surface_mesh /// \returns the face index of the added face, or `Surface_mesh::null_face()` if the face could not be added. Face_index add_face(Vertex_index v0, Vertex_index v1, Vertex_index v2, Vertex_index v3) { - boost::array + std::array v = {{v0, v1, v2, v3}}; return add_face(v); } @@ -1208,6 +1206,10 @@ class Surface_mesh fprops_.resize(nfaces); } + /// copies the simplices from `other`, and copies values of + /// properties that already exist under the same name in `*this`. + /// In case `*this` has a property that does not exist in `other` + /// the copied simplices get the default value of the property. bool join(const Surface_mesh& other) { // increase capacity @@ -1321,7 +1323,7 @@ class Surface_mesh /// Note however that by garbage collecting elements get new indices. /// In case you store indices in an auxiliary data structure /// or in a property these indices are potentially no longer - /// refering to the right elements. + /// referring to the right elements. /// When adding elements, by default elements that are marked as removed /// are recycled. @@ -1389,7 +1391,7 @@ class Surface_mesh /// \attention By garbage collecting elements get new indices. /// In case you store indices in an auxiliary data structure /// or in a property these indices are potentially no longer - /// refering to the right elements. + /// referring to the right elements. void collect_garbage(); //undocumented convenience function that allows to get old-index->new-index information @@ -1465,7 +1467,7 @@ class Surface_mesh /// perform an expensive validity check on the data structure and /// print found errors to `std::cerr` when `verbose == true`. - bool is_valid(bool verbose = true) const + bool is_valid(bool verbose = false) const { bool valid = true; size_type vcount = 0, hcount = 0, fcount = 0; @@ -1577,23 +1579,37 @@ class Surface_mesh } /// performs a validity check on a single vertex. - bool is_valid(Vertex_index v) const { + bool is_valid(Vertex_index v, + bool verbose = false) const + { + Verbose_ostream verr(verbose); + if(!has_valid_index(v)) - return false; + { + verr << "Vertex has invalid index: " << (size_type)v << std::endl; + return false; + } Halfedge_index h = vconn_[v].halfedge_; - if(h!= null_halfedge() && (!has_valid_index(h) || is_removed(h))) { - std::cerr << "Vertex connectivity halfedge error in " << (size_type)v - << " with " << (size_type)h << std::endl; - return false; + if(h != null_halfedge() && (!has_valid_index(h) || is_removed(h))) { + verr << "Vertex connectivity halfedge error: Vertex " << (size_type)v + << " with " << (size_type)h << std::endl; + return false; } return true; } /// performs a validity check on a single halfedge. - bool is_valid(Halfedge_index h) const { + bool is_valid(Halfedge_index h, + bool verbose = false) const + { + Verbose_ostream verr(verbose); + if(!has_valid_index(h)) + { + verr << "Halfedge has invalid index: " << (size_type)h << std::endl; return false; + } Face_index f = hconn_[h].face_; Vertex_index v = hconn_[h].vertex_; @@ -1604,30 +1620,30 @@ class Surface_mesh // don't validate the face if this is a border halfedge if(!is_border(h)) { if(!has_valid_index(f) || is_removed(f)) { - std::cerr << "Halfedge connectivity Face " - << (!has_valid_index(f) ? "invalid" : "removed") - << " in " << (size_type)h << std::endl; + verr << "Halfedge connectivity error: Face " + << (!has_valid_index(f) ? "invalid" : "removed") + << " in " << (size_type)h << std::endl; valid = false; } } if(!has_valid_index(v) || is_removed(v)) { - std::cerr << "Halfedge connectivity Vertex " - << (!has_valid_index(v) ? "invalid" : "removed") - << " in " << (size_type)h << std::endl; + verr << "Halfedge connectivity error: Vertex " + << (!has_valid_index(v) ? "invalid" : "removed") + << " in " << (size_type)h << std::endl; valid = false; } if(!has_valid_index(hn) || is_removed(hn)) { - std::cerr << "Halfedge connectivity hnext " - << (!has_valid_index(hn) ? "invalid" : "removed") - << " in " << (size_type)h << std::endl; + verr << "Halfedge connectivity error: hnext " + << (!has_valid_index(hn) ? "invalid" : "removed") + << " in " << (size_type)h << std::endl; valid = false; } if(!has_valid_index(hp) || is_removed(hp)) { - std::cerr << "Halfedge connectivity hprev " - << (!has_valid_index(hp) ? "invalid" : "removed") - << " in " << (size_type)h << std::endl; + verr << "Halfedge connectivity error: hprev " + << (!has_valid_index(hp) ? "invalid" : "removed") + << " in " << (size_type)h << std::endl; valid = false; } return valid; @@ -1635,25 +1651,39 @@ class Surface_mesh /// performs a validity check on a single edge. - bool is_valid(Edge_index e) const { + bool is_valid(Edge_index e, + bool verbose = false) const + { + Verbose_ostream verr(verbose); + if(!has_valid_index(e)) + { + verr << "Edge has invalid index: " << (size_type)e << std::endl; return false; + } Halfedge_index h = halfedge(e); - return is_valid(h) && is_valid(opposite(h)); + return is_valid(h, verbose) && is_valid(opposite(h), verbose); } /// performs a validity check on a single face. - bool is_valid(Face_index f) const { + bool is_valid(Face_index f, + bool verbose = false) const + { + Verbose_ostream verr(verbose); + if(!has_valid_index(f)) + { + verr << "Face has invalid index: " << (size_type)f << std::endl; return false; + } Halfedge_index h = fconn_[f].halfedge_; if(!has_valid_index(h) || is_removed(h)) { - std::cerr << "Face connectivity halfedge error in " << (size_type)f - << " with " << (size_type)h << std::endl; - return false; + verr << "Face connectivity halfedge error: Face " << (size_type)f + << " with " << (size_type)h << std::endl; + return false; } return true; } @@ -2214,7 +2244,7 @@ class Surface_mesh /// \relates Surface_mesh /// Inserts `other` into `sm`. /// Shifts the indices of vertices of `other` by `sm.number_of_vertices() + sm.number_of_removed_vertices()` - /// and analoguously for halfedges, edges, and faces. + /// and analogously for halfedges, edges, and faces. /// Copies entries of all property maps which have the same name in `sm` and `other`. /// that is, property maps which are only in `other` are ignored. /// Also copies elements which are marked as removed, and concatenates the freelists of `sm` and `other`. @@ -2684,6 +2714,7 @@ collect_garbage(Visitor &visitor) garbage_ = false; } +#ifndef DOXYGEN_RUNNING namespace collect_garbage_internal { struct Dummy_visitor{ template @@ -2692,6 +2723,7 @@ struct Dummy_visitor{ }; } +#endif template void diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh/Surface_mesh_fwd.h b/thirdparty/CGAL/include/CGAL/Surface_mesh/Surface_mesh_fwd.h index 2c31eb0d..837878cd 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh/Surface_mesh_fwd.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh/Surface_mesh_fwd.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/Surface_mesh/Surface_mesh_fwd.h $ -// $Id: Surface_mesh_fwd.h 65c1a4f 2020-01-28T11:28:02+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/Surface_mesh/Surface_mesh_fwd.h $ +// $Id: include/CGAL/Surface_mesh/Surface_mesh_fwd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_approximation/L21_metric_plane_proxy.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_approximation/L21_metric_plane_proxy.h index 48a727d6..66504721 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_approximation/L21_metric_plane_proxy.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_approximation/L21_metric_plane_proxy.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/L21_metric_plane_proxy.h $ -// $Id: L21_metric_plane_proxy.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/L21_metric_plane_proxy.h $ +// $Id: include/CGAL/Surface_mesh_approximation/L21_metric_plane_proxy.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -31,7 +31,7 @@ namespace Surface_mesh_approximation { /// \ingroup PkgTSMARef /// @brief Approximation L21 metric of vector proxy. /// -/// \cgalModels `ErrorMetricProxy` +/// \cgalModels{ErrorMetricProxy} /// /// @tparam TriangleMesh a triangle `FaceGraph` /// @tparam VertexPointMap a class model of `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_approximation/L2_metric_plane_proxy.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_approximation/L2_metric_plane_proxy.h index f0c0d84d..5183b9e9 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_approximation/L2_metric_plane_proxy.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_approximation/L2_metric_plane_proxy.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/L2_metric_plane_proxy.h $ -// $Id: L2_metric_plane_proxy.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/L2_metric_plane_proxy.h $ +// $Id: include/CGAL/Surface_mesh_approximation/L2_metric_plane_proxy.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -32,7 +32,7 @@ namespace Surface_mesh_approximation { /// \ingroup PkgTSMARef /// @brief Approximation L2 metric of plane proxy. /// -/// \cgalModels `ErrorMetricProxy` +/// \cgalModels{ErrorMetricProxy} /// /// @tparam TriangleMesh a triangle `FaceGraph` /// @tparam VertexPointMap a class model of `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_approximation/approximate_triangle_mesh.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_approximation/approximate_triangle_mesh.h index 254750c7..d1059c64 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_approximation/approximate_triangle_mesh.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_approximation/approximate_triangle_mesh.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/approximate_triangle_mesh.h $ -// $Id: approximate_triangle_mesh.h 477353d 2022-04-20T15:55:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/approximate_triangle_mesh.h $ +// $Id: include/CGAL/Surface_mesh_approximation/approximate_triangle_mesh.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,10 +24,10 @@ #include #include -#include #include #include +#include namespace CGAL { namespace Surface_mesh_approximation { diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_cell_base_3.h index de570910..52590be5 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_cell_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_cell_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesh_cell_base_3.h $ -// $Id: Surface_mesh_cell_base_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesh_cell_base_3.h $ +// $Id: include/CGAL/Surface_mesh_cell_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Steve Oudot, David Rey, Mariette Yvinec, Laurent Rineau, Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h index fce00b44..50d62170 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h $ -// $Id: Surface_mesh_complex_2_in_triangulation_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h $ +// $Id: include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_default_criteria_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_default_criteria_3.h index b082712a..7b7d60e0 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_default_criteria_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_default_criteria_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesh_default_criteria_3.h $ -// $Id: Surface_mesh_default_criteria_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesh_default_criteria_3.h $ +// $Id: include/CGAL/Surface_mesh_default_criteria_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_default_edges_criteria_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_default_edges_criteria_3.h index e85a70be..e7cdd596 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_default_edges_criteria_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_default_edges_criteria_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesh_default_edges_criteria_3.h $ -// $Id: Surface_mesh_default_edges_criteria_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesh_default_edges_criteria_3.h $ +// $Id: include/CGAL/Surface_mesh_default_edges_criteria_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_default_triangulation_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_default_triangulation_3.h index 4f51c3e5..05f320d3 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_default_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_default_triangulation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesh_default_triangulation_3.h $ -// $Id: Surface_mesh_default_triangulation_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesh_default_triangulation_3.h $ +// $Id: include/CGAL/Surface_mesh_default_triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_deformation.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_deformation.h index 4042f734..f3016f8f 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_deformation.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_deformation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h $ -// $Id: Surface_mesh_deformation.h f0443a6 2022-11-08T14:43:19+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h $ +// $Id: include/CGAL/Surface_mesh_deformation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Yin Xu, Andreas Fabri and Ilker O. Yaz diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h index 1cd1f5d0..f3a301c3 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h $ -// $Id: ARAP_parameterizer_3.h 7564b76 2022-11-07T14:11:10+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -33,7 +33,7 @@ #if defined(CGAL_EIGEN3_ENABLED) #include -#ifdef CGAL_SMP_USE_SPARSESUITE_SOLVERS +#ifdef CGAL_SMP_USE_SUITESPARSE_SOLVERS #include #endif #endif @@ -83,7 +83,6 @@ #include #include -#include #include #include @@ -93,6 +92,7 @@ #include #include #include +#include /// \file ARAP_parameterizer_3.h @@ -134,11 +134,11 @@ namespace Surface_mesh_parameterization { /// /// A one-to-one mapping is *not* guaranteed. /// -/// \cgalModels `Parameterizer_3` +/// \cgalModels{Parameterizer_3} /// /// \tparam TriangleMesh_ must be a model of `FaceGraph`. /// -/// \tparam BorderParameterizer_ is a Strategy to parameterize the surface border +/// \tparam BorderParameterizer_ is a strategy to parameterize the surface border /// and must be a model of `Parameterizer_3`.
    /// %Default: /// \code @@ -154,7 +154,7 @@ namespace Surface_mesh_parameterization { /// CGAL::Eigen_solver_traits< /// Eigen::SparseLU::EigenType> > /// \endcode -/// Moreover, if SparseSuite solvers are available, which is greatly preferable for speed, +/// Moreover, if SuiteSparse solvers are available, which is greatly preferable for speed, /// then the default parameter is: /// \code /// CGAL::Eigen_solver_traits< @@ -162,7 +162,7 @@ namespace Surface_mesh_parameterization { /// \endcode /// /// \sa `CGAL::Surface_mesh_parameterization::Fixed_border_parameterizer_3` -/// \sa `CGAL::Iterative_authalic_parameterizer_3` +/// \sa `CGAL::Surface_mesh_parameterization::Iterative_authalic_parameterizer_3` /// template < class TriangleMesh_, class BorderParameterizer_ = Default, @@ -176,14 +176,14 @@ class ARAP_parameterizer_3 Two_vertices_parameterizer_3 >::type Border_parameterizer; #if !defined(CGAL_EIGEN3_ENABLED) - CGAL_static_assertion_msg(!(boost::is_same::value), + static_assert(!(std::is_same::value), "Error: You must either provide 'SolverTraits_' or link CGAL with the Eigen library"); #endif typedef typename Default::Get< SolverTraits_, #if defined(CGAL_EIGEN3_ENABLED) - #ifdef CGAL_SMP_USE_SPARSESUITE_SOLVERS + #ifdef CGAL_SMP_USE_SUITESPARSE_SOLVERS CGAL::Eigen_solver_traits< Eigen::UmfPackLU::EigenType> > #else @@ -505,7 +505,7 @@ class ARAP_parameterizer_3 // - compute w_ii = - sum of w_ijs. // // \pre Vertices must be indexed. - // \pre Vertex i musn't be already parameterized. + // \pre Vertex i mustn't be already parameterized. // \pre Line i of A must contain only zeros. template Error_code fill_linear_system_matrix(Matrix& A, @@ -561,7 +561,6 @@ class ARAP_parameterizer_3 Error_code status = OK; // compute A - unsigned int count = 0; for(vertex_descriptor vd : vertices) { if(!get(vpmap, vd)) { // not yet parameterized // Compute the line i of the matrix A @@ -571,7 +570,6 @@ class ARAP_parameterizer_3 } else { // fixed vertices int index = get(vimap, vd); A.set_coef(index, index, 1, true /*new*/); - ++count; } } return status; @@ -1019,7 +1017,7 @@ class ARAP_parameterizer_3 // - call compute_b_ij() for each neighbor v_j to compute the B coefficient b_i // // \pre Vertices must be indexed. - // \pre Vertex i musn't be already parameterized. + // \pre Vertex i mustn't be already parameterized. // \pre Lines i of Bu and Bv must be zero. template Error_code fill_linear_system_rhs(const Triangle_mesh& mesh, @@ -1080,7 +1078,6 @@ class ARAP_parameterizer_3 // Initialize the right hand side B in the linear system "A*X = B" Error_code status = OK; - unsigned int count = 0; for(vertex_descriptor vd : vertices) { if(!get(vpmap, vd)) { // not yet parameterized // Compute the lines i of the vectors Bu and Bv @@ -1093,7 +1090,6 @@ class ARAP_parameterizer_3 const Point_2& uv = get(uvmap, vd); Bu.set(index, uv.x()); Bv.set(index, uv.y()); - ++count; } } return status; @@ -1129,7 +1125,7 @@ class ARAP_parameterizer_3 // Solve "A*Xu = Bu". On success, the solution is (1/Du) * Xu. // Solve "A*Xv = Bv". On success, the solution is (1/Dv) * Xv. - NT Du, Dv; + double Du, Dv; if(!get_linear_algebra_traits().linear_solver(A, Bu, Xu, Du) || !get_linear_algebra_traits().linear_solver(A, Bv, Xv, Dv)) { std::cerr << "Could not solve linear system" << std::endl; @@ -1294,9 +1290,9 @@ class ARAP_parameterizer_3 /// /// \param mesh a triangulated surface. /// \param bhd a halfedge descriptor on the boundary of `mesh`. - /// \param uvmap an instanciation of the class `VertexUVmap`. - /// \param vimap an instanciation of the class `VertexIndexMap`. - /// \param vpmap an instanciation of the class `VertexParameterizedMap`. + /// \param uvmap an instantiation of the class `VertexUVmap`. + /// \param vimap an instantiation of the class `VertexIndexMap`. + /// \param vpmap an instantiation of the class `VertexParameterizedMap`. /// /// \pre `mesh` must be a triangular mesh. /// \pre The vertices must be indexed (vimap must be initialized). diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h index 5ee4aa78..9fbceaab 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h $ -// $Id: Barycentric_mapping_parameterizer_3.h a4b645a 2021-06-08T12:48:15+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy @@ -49,11 +49,11 @@ namespace Surface_mesh_parameterization { /// the matrix `A` for `j` neighbor vertex of `i`, based on Tutte Barycentric /// Mapping method. /// -/// \cgalModels `Parameterizer_3` +/// \cgalModels{Parameterizer_3} /// /// \tparam TriangleMesh_ must be a model of `FaceGraph`. /// -/// \tparam BorderParameterizer_ is a Strategy to parameterize the surface border +/// \tparam BorderParameterizer_ is a strategy to parameterize the surface border /// and must be a model of `Parameterizer_3`.
    /// %Default: /// \code @@ -157,8 +157,7 @@ class Barycentric_mapping_parameterizer_3 // Default copy constructor and operator =() are fine /// returns whether the 3D -> 2D mapping is one-to-one. - template + template bool is_one_to_one_mapping(const Triangle_mesh& mesh, halfedge_descriptor bhd, const VertexUVMap uvmap) const diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Circular_border_parameterizer_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Circular_border_parameterizer_3.h index b1ed2f56..48e54fc5 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Circular_border_parameterizer_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Circular_border_parameterizer_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Circular_border_parameterizer_3.h $ -// $Id: Circular_border_parameterizer_3.h 93a70d3 2020-07-21T16:46:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Circular_border_parameterizer_3.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/Circular_border_parameterizer_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy @@ -50,7 +50,7 @@ namespace Surface_mesh_parameterization { /// `TriangleMesh` class and does not know the parameterization algorithm /// requirements or the kind of sparse linear system used. /// -/// \cgalModels `Parameterizer_3` +/// \cgalModels{Parameterizer_3} /// /// \tparam TriangleMesh_ must be a model of `FaceGraph`. /// @@ -119,8 +119,8 @@ class Circular_border_parameterizer_3 /// /// \param mesh a triangulated surface. /// \param bhd a halfedge descriptor on the boundary of `mesh`. - /// \param uvmap an instanciation of the class `VertexUVmap`. - /// \param vpmap an instanciation of the class `VertexParameterizedMap`. + /// \param uvmap an instantiation of the class `VertexUVmap`. + /// \param vpmap an instantiation of the class `VertexParameterizedMap`. /// /// \pre `mesh` must be a triangular mesh. /// \pre The vertices must be indexed (vimap must be initialized). @@ -182,7 +182,7 @@ class Circular_border_parameterizer_3 /// algorithm. This class implements only `compute_edge_length()` to compute a /// segment's length. /// -/// \cgalModels `Parameterizer_3` +/// \cgalModels{Parameterizer_3} /// /// \sa `CGAL::Surface_mesh_parameterization::Circular_border_parameterizer_3` /// \sa `CGAL::Surface_mesh_parameterization::Circular_border_arc_length_parameterizer_3` @@ -231,7 +231,7 @@ class Circular_border_uniform_parameterizer_3 /// The class `Circular_border_parameterizer_3` implements most of the border /// parameterization algorithm. /// -/// \cgalModels `Parameterizer_3` +/// \cgalModels{Parameterizer_3} /// /// \tparam TriangleMesh_ must be a model of `FaceGraph`. /// diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h index e2021478..99cba06c 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h $ -// $Id: Discrete_authalic_parameterizer_3.h 936b02b 2022-10-20T17:30:18+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy @@ -50,11 +50,11 @@ namespace Surface_mesh_parameterization { /// - implements `compute_w_ij()` to compute `w_ij`, the `(i,j)`-coefficient of the matrix `A` /// for `j` neighbor vertex of `i`, based on Discrete Authalic Parameterization algorithm. /// -/// \cgalModels `Parameterizer_3` +/// \cgalModels{Parameterizer_3} /// /// \tparam TriangleMesh_ must be a model of `FaceGraph`. /// -/// \tparam BorderParameterizer_ is a Strategy to parameterize the surface border +/// \tparam BorderParameterizer_ is a strategy to parameterize the surface border /// and must be a model of `Parameterizer_3`.
    /// %Default: /// \code diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h index a286b6a2..ec4c8f57 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h $ -// $Id: Discrete_conformal_map_parameterizer_3.h 936b02b 2022-10-20T17:30:18+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy @@ -50,11 +50,11 @@ namespace Surface_mesh_parameterization { /// - implements `compute_w_ij()` to compute `w_ij`, the `(i,j)`-coefficient of matrix `A`, /// for `j` neighbor vertex of `i`, based on Discrete Conformal Map method. /// -/// \cgalModels `Parameterizer_3` +/// \cgalModels{Parameterizer_3} /// /// \tparam TriangleMesh_ must be a model of `FaceGraph` /// -/// \tparam BorderParameterizer_ is a Strategy to parameterize the surface border +/// \tparam BorderParameterizer_ is a strategy to parameterize the surface border /// and must be a model of `Parameterizer_3`.
    /// %Default: /// \code diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Error_code.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Error_code.h index e1b57cef..db3ad22a 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Error_code.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Error_code.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Error_code.h $ -// $Id: Error_code.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Error_code.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/Error_code.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h index 90fec165..29deba38 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h $ -// $Id: Fixed_border_parameterizer_3.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy @@ -32,9 +32,9 @@ #endif #include -#include #include +#include /// \file Fixed_border_parameterizer_3.h @@ -64,11 +64,11 @@ namespace Surface_mesh_parameterization { // from the linear systems in order to have a symmetric positive definite // matrix for Tutte Barycentric Mapping and Discrete Conformal Map algorithms. /// -/// \cgalModels `Parameterizer_3` +/// \cgalModels{Parameterizer_3} /// /// \tparam TriangleMesh_ must be a model of `FaceGraph`. /// -/// \tparam BorderParameterizer_ is a Strategy to parameterize the surface border +/// \tparam BorderParameterizer_ is a strategy to parameterize the surface border /// and must be a model of `Parameterizer_3`.
    /// %Default: /// \code @@ -104,7 +104,7 @@ class Fixed_border_parameterizer_3 Circular_border_arc_length_parameterizer_3 >::type Border_parameterizer; #if !defined(CGAL_EIGEN3_ENABLED) - CGAL_static_assertion_msg(!(boost::is_same::value), + static_assert(!(std::is_same::value), "Error: You must either provide 'SolverTraits_' or link CGAL with the Eigen library"); #endif @@ -190,9 +190,9 @@ class Fixed_border_parameterizer_3 /// /// \param mesh a triangulated surface. /// \param bhd a halfedge descriptor on the boundary of `mesh`. - /// \param uvmap an instanciation of the class `VertexUVmap`. - /// \param vimap an instanciation of the class `VertexIndexMap`. - /// \param vpmap an instanciation of the class `VertexParameterizedMap`. + /// \param uvmap an instantiation of the class `VertexUVmap`. + /// \param vimap an instantiation of the class `VertexIndexMap`. + /// \param vpmap an instantiation of the class `VertexParameterizedMap`. /// /// \pre `mesh` must be a triangular mesh. /// \pre The mesh border must be mapped onto a convex polygon. @@ -255,7 +255,6 @@ class Fixed_border_parameterizer_3 main_border.insert(v); } - int count = 0; for(vertex_descriptor v : vertices){ // inner vertices only if(main_border.find(v) == main_border.end()){ @@ -263,14 +262,12 @@ class Fixed_border_parameterizer_3 status = setup_inner_vertex_relations(A, Bu, Bv, mesh, v, vimap); if(status != OK) return status; - } else { - count++; } } // Solve "A*Xu = Bu". On success, solution is (1/Du) * Xu. // Solve "A*Xv = Bv". On success, solution is (1/Dv) * Xv. - NT Du = 0, Dv = 0; + double Du = 0, Dv = 0; if(!get_linear_algebra_traits().linear_solver(A, Bu, Xu, Du) || !get_linear_algebra_traits().linear_solver(A, Bv, Xv, Dv)) { @@ -323,8 +320,8 @@ class Fixed_border_parameterizer_3 /// \param Bv the right hand side vector in the linear system of y coordinates /// \param mesh a triangulated surface. /// \param bhd a halfedge descriptor on the boundary of `mesh`. - /// \param uvmap an instanciation of the class `VertexUVmap`. - /// \param vimap an instanciation of the class `VertexIndexMap`. + /// \param uvmap an instantiation of the class `VertexUVmap`. + /// \param vimap an instantiation of the class `VertexIndexMap`. /// /// \pre Vertices must be indexed (`vimap` must be initialized). /// \pre `A`, `Bu`, and `Bv` must be allocated. @@ -364,7 +361,7 @@ class Fixed_border_parameterizer_3 /// - compute w_ii = - sum of w_ijs. /// /// \pre Vertices must be indexed. - /// \pre Vertex i musn't be already parameterized. + /// \pre Vertex i mustn't be already parameterized. /// \pre Line i of A must contain only zeros. // TODO: check if this must be virtual // virtual diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/IO/File_off.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/IO/File_off.h index b08c8890..9f653cc7 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/IO/File_off.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/IO/File_off.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/IO/File_off.h $ -// $Id: File_off.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/IO/File_off.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/IO/File_off.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h index 90f36562..420580ee 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h $ -// $Id: Iterative_authalic_parameterizer_3.h dfe3ff5 2022-10-20T17:31:22+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -50,7 +50,7 @@ #include #include -#define DEBUG_L0 1 // @fixme +#define CGAL_SMP_IA_DEBUG_L0 0 /// \file Iterative_authalic_parameterizer_3.h @@ -69,7 +69,7 @@ namespace Surface_mesh_parameterization { /// the \f$ L_2\f$ stretch - as defined by Sander et al. \cgalCite{cgal:ssgh-tmpm-01} - over the mesh. /// /// \tparam TriangleMesh_ must be a model of `FaceGraph`. -/// \tparam BorderParameterizer_ is a Strategy to parameterize the surface border +/// \tparam BorderParameterizer_ is a strategy to parameterize the surface border /// and must be a model of `Parameterizer_3`.
    /// %Default: /// \code @@ -304,30 +304,6 @@ class Iterative_authalic_parameterizer_3 } // Computation helpers -protected: - // `operator=(onst Matrix& other)` isn't part of the concept... - template - void copy_sparse_matrix(const Matrix& src, - Matrix& dest, - const Triangle_mesh& tmesh, - const Vertex_set& vertices, - const VertexIndexMap vimap) - { - CGAL_precondition(src.row_dimension() == dest.row_dimension()); - CGAL_precondition(src.column_dimension() == dest.column_dimension()); - - for(vertex_descriptor vertex : vertices) - { - const int i = get(vimap, vertex); - vertex_around_target_circulator v_j(halfedge(vertex, tmesh), tmesh), end = v_j; - CGAL_For_all(v_j, end) - { - const int j = get(vimap, *v_j); - dest.set_coef(i, j, src.get_coef(i, j), false); - } - } - } - private: double compute_vertex_L2(const Triangle_mesh& tmesh, const vertex_descriptor v) const @@ -571,9 +547,9 @@ class Iterative_authalic_parameterizer_3 for(int j=0; j 100) // @fixme is that reasonnable + else if(err[i] > 100) // @fixme is that reasonable { break; } @@ -1099,9 +1075,9 @@ class Iterative_authalic_parameterizer_3 /// /// \param tmesh a triangulated surface /// \param bhd a halfedge descriptor on the boundary of `mesh` - /// \param uvmap an instanciation of the class `VertexUVmap` - /// \param vimap an instanciation of the class `VertexIndexMap` - /// \param vpmap an instanciation of the class `VertexParameterizedMap` + /// \param uvmap an instantiation of the class `VertexUVmap` + /// \param vimap an instantiation of the class `VertexIndexMap` + /// \param vpmap an instantiation of the class `VertexParameterizedMap` /// \param iterations an integer number of iterations to run the parameterization /// /// \pre `tmesh` must be a triangular mesh. diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h index 1e9dc906..298dc24c 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h $ -// $Id: LSCM_parameterizer_3.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy @@ -29,7 +29,6 @@ #ifdef CGAL_EIGEN3_ENABLED #include #endif -#include #include @@ -57,11 +56,11 @@ namespace Surface_mesh_parameterization { /// of the surface onto a convex polygon (only two pinned vertices are needed /// to ensure a unique solution), but a one-to-one mapping is *not* guaranteed. /// -/// \cgalModels `Parameterizer_3` +/// \cgalModels{Parameterizer_3} /// /// \tparam TriangleMesh_ must be a model of `FaceGraph`. /// -/// \tparam BorderParameterizer_ is a Strategy to parameterize the surface border +/// \tparam BorderParameterizer_ is a strategy to parameterize the surface border /// and must be a model of `Parameterizer_3`.
    /// %Default: /// \code @@ -77,10 +76,7 @@ namespace Surface_mesh_parameterization { /// \code /// CGAL::Eigen_solver_traits > > /// \endcode -/// Otherwise, it uses CGAL's wrapping function to the OpenNL library: -/// \code -/// OpenNL::SymmetricLinearSolverTraits -/// \endcode +/// /// /// \sa `CGAL::Surface_mesh_parameterization::Two_vertices_parameterizer_3` /// @@ -95,16 +91,18 @@ class LSCM_parameterizer_3 BorderParameterizer_, Two_vertices_parameterizer_3 >::type Border_parameterizer; +#if !defined(CGAL_EIGEN3_ENABLED) + static_assert(!(std::is_same::value), + "Error: You must either provide 'SolverTraits_' or link CGAL with the Eigen library"); + #endif + typedef typename Default::Get< SolverTraits_, #if defined(CGAL_EIGEN3_ENABLED) - // WARNING: at the moment, the choice of SolverTraits_ is completely - // ignored (see LeastSquaresSolver typedef) and `OpenNL::LinearSolver` - // is always used... CGAL::Eigen_solver_traits< Eigen::SimplicialLDLT::EigenType> > #else - OpenNL::SymmetricLinearSolverTraits + SolverTraits_ // no parameter provided, and Eigen is not enabled: so don't compile! #endif >::type Solver_traits; #else @@ -141,7 +139,13 @@ class LSCM_parameterizer_3 typedef typename Solver_traits::Vector Vector; typedef typename Solver_traits::Matrix Matrix; - typedef typename OpenNL::LinearSolver LeastSquaresSolver; +// Fields +private: + // %Object that maps (at least two) border vertices onto a 2D space + Border_parameterizer m_borderParameterizer; + + // Traits object to solve a sparse linear system + Solver_traits m_linearAlgebra; // Public operations public: @@ -155,6 +159,15 @@ class LSCM_parameterizer_3 // Default copy constructor and operator =() are fine +// Private accessors +private: + // Get the object that maps the surface's border onto a 2D space. + Border_parameterizer& get_border_parameterizer() { return m_borderParameterizer; } + + // Get the sparse linear algebra (traits object to access the linear system). + Solver_traits& get_linear_algebra_traits() { return m_linearAlgebra; } + +public: /// returns whether the 3D -> 2D mapping is one-to-one. template bool is_one_to_one_mapping(const Triangle_mesh& mesh, @@ -182,9 +195,9 @@ class LSCM_parameterizer_3 /// /// \param mesh a triangulated surface. /// \param bhd a halfedge descriptor on the boundary of `mesh`. - /// \param uvmap an instanciation of the class `VertexUVmap`. - /// \param vimap an instanciation of the class `VertexIndexMap`. - /// \param vpmap an instanciation of the class `VertexParameterizedMap`. + /// \param uvmap an instantiation of the class `VertexUVmap`. + /// \param vimap an instantiation of the class `VertexIndexMap`. + /// \param vpmap an instantiation of the class `VertexParameterizedMap`. /// /// \pre `mesh` must be a triangular mesh. /// \pre The vertices must be indexed (`vimap` must be initialized). @@ -218,88 +231,59 @@ class LSCM_parameterizer_3 // Compute (u,v) for (at least two) border vertices // and mark them as "parameterized" - Error_code status = - get_border_parameterizer().parameterize(mesh, bhd, uvmap, vimap, vpmap); + Error_code status = get_border_parameterizer().parameterize(mesh, bhd, uvmap, vimap, vpmap); if(status != OK) return status; - // Create sparse linear system "A*X = B" of size 2*nbVertices x 2*nbVertices - // (in fact, we need only 2 lines per triangle x 1 column per vertex) - LeastSquaresSolver solver(2 * nbVertices); - solver.set_least_squares(true) ; - - // Initialize the "A*X = B" linear system after - // (at least two) border vertices parameterization - initialize_system_from_mesh_border(solver, ccvertices, uvmap, vimap, vpmap); + // Vertices that are already parameterized are not part of the system + std::vector fvi(nbVertices); // vimap to free vertex index + int index = 0; + for(vertex_descriptor vd : ccvertices) { + if(get(vpmap,vd)) { + fvi[get(vimap, vd)] = -1; + } else { + fvi[get(vimap, vd)] = index++; + } + } - // Fill the matrix for the other vertices - solver.begin_system(); + // Create sparse linear system "A*X = B" + int nbFreeVertices = index; + int nbVariables = 2 * nbFreeVertices; + Matrix A(nbVariables, nbVariables); // the constant matrix used in the linear system A*X = B + Vector X(nbVariables), B(nbVariables); for(face_descriptor fd : ccfaces) { // Create two lines in the linear system per triangle (one for u, one for v) - status = setup_triangle_relations(solver, mesh, fd, vimap); + status = setup_triangle_relations(mesh, fd, uvmap, vimap, vpmap, fvi, A, B); if (status != OK) return status; } - solver.end_system(); - // Solve the "A*X = B" linear system in the least squares sense - if(!solver.solve()) + double D; + if(!get_linear_algebra_traits().linear_solver(A, B, X, D)) { + std::cerr << "Could not solve linear system" << std::endl; status = ERROR_CANNOT_SOLVE_LINEAR_SYSTEM; - - if(status != OK) return status; + } // Copy X coordinates into the (u,v) pair of each vertex - //set_mesh_uv_from_system(mesh, solver, uvmap); - for(vertex_descriptor vd : ccvertices) { + if(get(vpmap,vd)) + continue; + int index = get(vimap,vd); - NT u = solver.variable(2 * index).value(); - NT v = solver.variable(2 * index + 1).value(); + NT u = X[2 * fvi[index]]; + NT v = X[2 * fvi[index] + 1]; put(uvmap, vd, Point_2(u,v)); } + return status; } // Private operations private: - // Initialize "A*X = B" linear system after - // (at least two) border vertices are parameterized. - // - // \pre Vertices must be indexed. - // \pre X and B must be allocated and empty. - // \pre At least 2 border vertices must be parameterized. - template - void initialize_system_from_mesh_border(LeastSquaresSolver& solver, - const std::unordered_set& ccvertices, - UVmap uvmap, - VertexIndexMap vimap, - VertexParameterizedMap vpmap) const - { - for(vertex_descriptor v : ccvertices) { - // Get vertex index in sparse linear system - int index = get(vimap, v); - - // Get vertex (u,v) (meaningless if vertex is not parameterized) - const Point_2& uv = get(uvmap, v); - // TODO: it is meaningless but must it be called for non-border vertices?? - // Write (u,v) in X (meaningless if vertex is not parameterized) - // Note : 2*index --> u - // 2*index + 1 --> v - solver.variable(2 * index ).set_value(uv.x()); - solver.variable(2 * index + 1).set_value(uv.y()); - - // Copy (u,v) in B if vertex is parameterized - if (get(vpmap,v)) { - solver.variable(2 * index ).lock(); - solver.variable(2 * index + 1).lock(); - } - } - } - // Utility for setup_triangle_relations(): // Computes the coordinates of the vertices of a triangle // in a local 2D orthonormal basis of the triangle's plane. @@ -342,11 +326,18 @@ class LSCM_parameterizer_3 // Zk = xk + i.yk is the complex number corresponding to local (x,y) coords // cool: no divide with this expression; makes it more numerically stable // in presence of degenerate triangles - template - Error_code setup_triangle_relations(LeastSquaresSolver& solver, - const Triangle_mesh& mesh, + template + Error_code setup_triangle_relations(const Triangle_mesh& mesh, face_descriptor facet, - VertexIndexMap vimap) const + UVmap uvmap, + VertexIndexMap vimap, + VertexParameterizedMap vpmap, + const FreeVertexIndices& fvi, + Matrix& A, + Vector& B) const { const PPM ppmap = get(vertex_point, mesh); @@ -359,11 +350,6 @@ class LSCM_parameterizer_3 halfedge_descriptor h2 = next(h1, mesh); v2 = target(h2, mesh); - // Get the vertices index - int id0 = get(vimap, v0); - int id1 = get(vimap, v1); - int id2 = get(vimap, v2); - // Get the vertices position const Point_3& p0 = get(ppmap, v0); const Point_3& p1 = get(ppmap, v1); @@ -390,51 +376,75 @@ class LSCM_parameterizer_3 // // Note : 2*index --> u // 2*index + 1 --> v - int u0_id = 2*id0 ; - int v0_id = 2*id0 + 1; - int u1_id = 2*id1 ; - int v1_id = 2*id1 + 1; - int u2_id = 2*id2 ; - int v2_id = 2*id2 + 1; + + std::vector vals; + std::vector ids; + std::vector fvals; + std::vector pvals; + + auto add_coefficient = [&](const vertex_descriptor v, const double a, const bool is_u) + { + if(get(vpmap, v)) { + const Point_2& uv = get(uvmap, v); + fvals.push_back(a); + pvals.push_back(is_u ? uv.x() : uv.y()); + } else { + const int index = 2 * fvi[get(vimap, v)] + !is_u; + CGAL_assertion(index >= 0); + vals.push_back(a); + ids.push_back(index); + } + }; + + auto add_u_coefficient = [&](const vertex_descriptor v, const double a) { + return add_coefficient(v, a, true /*is u*/); + }; + auto add_v_coefficient = [&](const vertex_descriptor v, const double a) { + return add_coefficient(v, a, false /*is not u*/); + }; + + auto accumulate = [&]() + { + const std::size_t nf = vals.size(); + const std::size_t nl = fvals.size(); + + for(std::size_t i=0; ivertex(0); Vertex_handle vh1 = fh->vertex(1); Vertex_handle vh2 = fh->vertex(2); @@ -598,7 +598,7 @@ class MVC_post_processor_3 { Error_code status = OK; - NT Du, Dv; + double Du, Dv; if(!get_linear_algebra_traits().linear_solver(A, Bu, Xu, Du) || !get_linear_algebra_traits().linear_solver(A, Bv, Xv, Dv)) { status = ERROR_CANNOT_SOLVE_LINEAR_SYSTEM; @@ -726,8 +726,8 @@ class MVC_post_processor_3 /// /// \param mesh a triangulated surface. /// \param bhd a halfedge descriptor on the boundary of `mesh`. - /// \param uvmap an instanciation of the class `VertexUVmap`. - /// \param vimap an instanciation of the class `VertexIndexMap`. + /// \param uvmap an instantiation of the class `VertexUVmap`. + /// \param vimap an instantiation of the class `VertexIndexMap`. /// template diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h index 69afe590..42742775 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h $ -// $Id: Mean_value_coordinates_parameterizer_3.h 936b02b 2022-10-20T17:30:18+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy @@ -49,11 +49,11 @@ namespace Surface_mesh_parameterization { /// for `j` neighbor vertex of `i` based on Floater Mean Value Coordinates parameterization. /// - It implements an optimized version of `is_one_to_one_mapping()`. /// -/// \cgalModels `Parameterizer_3` +/// \cgalModels{Parameterizer_3} /// /// \tparam TriangleMesh_ must be a model of `FaceGraph`. /// -/// \tparam BorderParameterizer_ is a Strategy to parameterize the surface border +/// \tparam BorderParameterizer_ is a strategy to parameterize the surface border /// and must be a model of `Parameterizer_3`.
    /// %Default: /// \code diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h index 54ef6583..22ef32c3 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h $ -// $Id: Orbifold_Tutte_parameterizer_3.h 7564b76 2022-11-07T14:11:10+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -34,14 +33,12 @@ #if defined(CGAL_EIGEN3_ENABLED) #include -#ifdef CGAL_SMP_USE_SPARSESUITE_SOLVERS +#ifdef CGAL_SMP_USE_SUITESPARSE_SOLVERS #include #endif #endif -#include #include -#include #include #include @@ -51,6 +48,7 @@ #include #include #include +#include /// \file Orbifold_Tutte_parameterizer_3.h @@ -65,8 +63,8 @@ namespace Surface_mesh_parameterization { /// \ingroup PkgSurfaceMeshParameterizationOrbifoldHelperFunctions /// -/// reads a serie of cones from an input stream. Cones are passed as an -/// integer value that is the index of a vertex handle in the mesh tm`, using +/// reads a series of cones from an input stream. Cones are passed as an +/// integer value that is the index of a vertex handle in the mesh `tm`, using /// the vertex index property map `vpmap` for correspondency. /// /// \attention The mesh is here `tm`, it is the base mesh of the `CGAL::Seam_mesh` @@ -369,7 +367,7 @@ bool locate_unordered_cones(const SeamMesh& mesh, /// CGAL::Eigen_solver_traits< /// Eigen::SparseLU::EigenType> > /// \endcode -/// Moreover, if SparseSuite solvers are available, which is greatly preferable for speed, +/// Moreover, if SuiteSparse solvers are available, which is greatly preferable for speed, /// then the default parameter is: /// \code /// CGAL::Eigen_solver_traits< @@ -385,14 +383,14 @@ class Orbifold_Tutte_parameterizer_3 public: #ifndef DOXYGEN_RUNNING #if !defined(CGAL_EIGEN3_ENABLED) - CGAL_static_assertion_msg(!(boost::is_same::value), + static_assert(!(std::is_same::value), "Error: You must either provide 'SolverTraits_' or link CGAL with the Eigen library"); #endif typedef typename Default::Get< SolverTraits_, #if defined(CGAL_EIGEN3_ENABLED) - #ifdef CGAL_SMP_USE_SPARSESUITE_SOLVERS + #ifdef CGAL_SMP_USE_SUITESPARSE_SOLVERS CGAL::Eigen_solver_traits< Eigen::UmfPackLU::EigenType> > #else @@ -502,7 +500,7 @@ class Orbifold_Tutte_parameterizer_3 // ( L A' ) ( Xf ) = ( C ) // ( A 0 ) ( Xf ) = ( 0 ) - // Iterate on both rows ot the 2x2 matrix T + // Iterate on both rows of the 2x2 matrix T for(int vert_ind=0; vert_ind<2; ++vert_ind) { // building up the equations by summing up the terms @@ -840,7 +838,7 @@ class Orbifold_Tutte_parameterizer_3 const int big_n = M.row_dimension(); const std::size_t n = 2 * num_vertices(mesh); - NT D; + double D; Vector Xf(big_n); CGAL::Timer task_timer; @@ -892,8 +890,8 @@ class Orbifold_Tutte_parameterizer_3 /// \param cmap a mapping of the `vertex_descriptor`s of `mesh` that are cones /// to their respective \link PkgSurfaceMeshParameterizationEnums Cone_type \endlink /// classification. - /// \param uvmap an instanciation of the class `VertexUVmap`. - /// \param vimap an instanciation of the class `VertexIndexMap`. + /// \param uvmap an instantiation of the class `VertexUVmap`. + /// \param vimap an instantiation of the class `VertexIndexMap`. /// /// \pre `mesh` must be a triangular mesh. /// \pre The underlying mesh of `mesh` is a topological ball. diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Square_border_parameterizer_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Square_border_parameterizer_3.h index 6cc15f27..ab4fbf4b 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Square_border_parameterizer_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Square_border_parameterizer_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Square_border_parameterizer_3.h $ -// $Id: Square_border_parameterizer_3.h 440a8df 2022-02-03T08:41:04+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Square_border_parameterizer_3.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/Square_border_parameterizer_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy @@ -61,7 +61,7 @@ namespace Surface_mesh_parameterization { /// `TriangleMesh` class and does not know the parameterization algorithm /// requirements or the kind of sparse linear system used. /// -/// \cgalModels `Parameterizer_3` +/// \cgalModels{Parameterizer_3} /// /// \tparam TriangleMesh_ must be a model of `FaceGraph`. /// @@ -273,8 +273,8 @@ class Square_border_parameterizer_3 /// /// \param mesh a triangulated surface. /// \param bhd a halfedge descriptor on the boundary of `mesh`. - /// \param uvmap an instanciation of the class `VertexUVmap`. - /// \param vpmap an instanciation of the class `VertexParameterizedMap`. + /// \param uvmap an instantiation of the class `VertexUVmap`. + /// \param vpmap an instantiation of the class `VertexParameterizedMap`. /// /// \pre `mesh` must be a triangular mesh. /// \pre The vertices must be indexed (vimap must be initialized). @@ -398,7 +398,7 @@ class Square_border_parameterizer_3 /// if an input border vertex has valence `1` and if it is mapped to the same edge of the square /// as its two adjacent (border) vertices, for example. /// -/// \cgalModels `Parameterizer_3` +/// \cgalModels{Parameterizer_3} /// /// \sa `CGAL::Surface_mesh_parameterization::Square_border_parameterizer_3` /// \sa `CGAL::Surface_mesh_parameterization::Square_border_arc_length_parameterizer_3` @@ -470,7 +470,7 @@ class Square_border_uniform_parameterizer_3 /// /// \tparam TriangleMesh_ must be a model of `FaceGraph`. /// -/// \cgalModels `Parameterizer_3` +/// \cgalModels{Parameterizer_3} /// /// \sa `CGAL::Surface_mesh_parameterization::Square_border_parameterizer_3` /// \sa `CGAL::Surface_mesh_parameterization::Square_border_uniform_parameterizer_3` diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Two_vertices_parameterizer_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Two_vertices_parameterizer_3.h index 7bb5c2d6..c9b1e12e 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Two_vertices_parameterizer_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/Two_vertices_parameterizer_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Two_vertices_parameterizer_3.h $ -// $Id: Two_vertices_parameterizer_3.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Two_vertices_parameterizer_3.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/Two_vertices_parameterizer_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy @@ -47,7 +47,7 @@ namespace Surface_mesh_parameterization { /// `TriangleMesh` class and does not know the parameterization algorithm /// requirements or the kind of sparse linear system used. /// -/// \cgalModels `Parameterizer_3` +/// \cgalModels{Parameterizer_3} /// /// \tparam TriangleMesh_ must be a model of `FaceGraph`. /// @@ -143,13 +143,13 @@ class Two_vertices_parameterizer_3 for(vertex_descriptor vd : vertices) { const Point_3& position = get(ppmap,vd); - xmin = (std::min)(position.x(), xmin); - ymin = (std::min)(position.y(), ymin); - zmin = (std::min)(position.z(), zmin); + xmin = (std::min)(CGAL::to_double(position.x()), xmin); + ymin = (std::min)(CGAL::to_double(position.y()), ymin); + zmin = (std::min)(CGAL::to_double(position.z()), zmin); - xmax = (std::max)(position.x(), xmax); - ymax = (std::max)(position.y(), ymax); - zmax = (std::max)(position.z(), zmax); + xmax = (std::max)(CGAL::to_double(position.x()), xmax); + ymax = (std::max)(CGAL::to_double(position.y()), ymax); + zmax = (std::max)(CGAL::to_double(position.z()), zmax); } // Find longest bounding box axes @@ -288,9 +288,9 @@ class Two_vertices_parameterizer_3 /// /// \param mesh a triangulated surface. /// \param bhd a halfedge descriptor on the boundary of `mesh`. - /// \param uvmap an instanciation of the class `VertexUVmap`. - /// \param vimap an instanciation of the class `VertexIndexMap`. - /// \param vpmap an instanciation of the class `VertexParameterizedMap`. + /// \param uvmap an instantiation of the class `VertexUVmap`. + /// \param vimap an instantiation of the class `VertexIndexMap`. + /// \param vpmap an instantiation of the class `VertexParameterizedMap`. /// /// \pre `mesh` must be a triangular mesh. /// \pre The vertices must be indexed (vimap must be initialized). diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/Bool_property_map.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/Bool_property_map.h index 998d9928..c27f6234 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/Bool_property_map.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/Bool_property_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/Bool_property_map.h $ -// $Id: Bool_property_map.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/Bool_property_map.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/internal/Bool_property_map.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/Containers_filler.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/Containers_filler.h index 2edbcb5b..212759fd 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/Containers_filler.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/Containers_filler.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/Containers_filler.h $ -// $Id: Containers_filler.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/Containers_filler.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/internal/Containers_filler.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/kernel_traits.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/kernel_traits.h index 620c99ed..2158c990 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/kernel_traits.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/kernel_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/kernel_traits.h $ -// $Id: kernel_traits.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/kernel_traits.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/internal/kernel_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/orbifold_cone_helper.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/orbifold_cone_helper.h index 688d77e8..110b9e81 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/orbifold_cone_helper.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/orbifold_cone_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/orbifold_cone_helper.h $ -// $Id: orbifold_cone_helper.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/orbifold_cone_helper.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/internal/orbifold_cone_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -193,7 +193,7 @@ bool check_cone_validity(const SeamMesh& mesh, } else { if(it->second != Duplicated_cone) { - std::cerr << "Error: Unknow cone type: " << it->second << std::endl; + std::cerr << "Error: Unknown cone type: " << it->second << std::endl; return false; } ++duplicated_cone_counter; diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/validity.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/validity.h index ea1cc584..78957f89 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/validity.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/internal/validity.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/validity.h $ -// $Id: validity.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/validity.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/internal/validity.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -26,9 +26,9 @@ #include #include -#include #include #include +#include namespace CGAL { @@ -132,7 +132,7 @@ class Intersect_facets halfedge_descriptor h = halfedge(a->info(), mesh); halfedge_descriptor g = halfedge(b->info(), mesh); - // check for shared egde + // check for shared edge if(face(opposite(h, mesh), mesh) == b->info() || face(opposite(prev(h, mesh), mesh), mesh) == b->info() || face(opposite(next(h, mesh), mesh), mesh) == b->info()) { @@ -242,9 +242,9 @@ template - >::type* = nullptr) + std::enable_if_t< + boost::has_range_iterator::value + >* = nullptr) { typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -272,11 +272,11 @@ bool is_one_to_one_mapping(const TriangleMesh& mesh, const Point_2& p1 = get(uvmap, vd1); const Point_2& p2 = get(uvmap, vd2); - Bbox_2 b = p0.bbox(); - b += p1.bbox(); - b += p2.bbox(); - - boxes.push_back(Box(b, fd)); + NT bx[2] = { (std::min)(p0[0], (std::min)(p1[0], p2[0])), + (std::min)(p0[1], (std::min)(p1[1], p2[1])) }; + NT by[2] = { (std::max)(p0[0], (std::max)(p1[0], p2[0])), + (std::max)(p0[1], (std::max)(p1[1], p2[1])) }; + boxes.emplace_back(bx, by, fd); } std::vector boxes_ptr; diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/measure_distortion.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/measure_distortion.h index 57d69605..a45ec025 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/measure_distortion.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/measure_distortion.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/measure_distortion.h $ -// $Id: measure_distortion.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/measure_distortion.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/measure_distortion.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -50,7 +50,7 @@ double compute_L2_stretch(const VertexRange& vertex_range, Face_double_map area_2D = get(Face_double_tag(), tmesh); Face_double_map area_3D = get(Face_double_tag(), tmesh); - // iterate fpr all inner vertices and for each vertex + // iterate for all inner vertices and for each vertex std::vector area_dist; double A_3D = 0.; diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h index 1f661b15..69ac2fbd 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h $ -// $Id: orbifold_enums.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/orbifold_enums.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -45,7 +45,7 @@ enum Cone_type /// \ingroup PkgSurfaceMeshParameterizationEnums /// -/// The four Orbifold types available in the Orbifold Tutte parameterization. +/// The four orbifold types available in the Orbifold Tutte parameterization. /// The different shapes result from the number of cones and the angle constraints /// at the cones. enum Orbifold_type @@ -59,7 +59,7 @@ enum Orbifold_type /// \ingroup PkgSurfaceMeshParameterizationEnums /// \brief Convert the orbifold type to a literal message. /// \param orb_type the integer value in the enum -/// \return the string describing the Orbifold type. +/// \return the string describing the orbifold type. const char* get_orbifold_type(int orb_type) { // Messages corresponding to the different orbifold types. diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h index 146ada46..0ede7c5a 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h $ -// $Id: orbifold_shortest_path.h 7c20752 2022-05-04T17:38:32+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -18,7 +18,7 @@ #include -#include +#include #include #include diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/parameterize.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/parameterize.h index 4a2b5ec6..a1a6e4cc 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/parameterize.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_parameterization/parameterize.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/parameterize.h $ -// $Id: parameterize.h d5185e6 2020-07-21T13:38:47+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/parameterize.h $ +// $Id: include/CGAL/Surface_mesh_parameterization/parameterize.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -39,7 +39,7 @@ namespace Surface_mesh_parameterization { /// \tparam TriangleMesh must be a model of `FaceGraph`. /// \tparam Parameterizer must be a model of `Parameterizer_3`. /// \tparam HD must be the halfedge_descriptor type corresponding to the graph -/// traits of TriangleMesh. +/// traits of `TriangleMesh`. /// \tparam VertexUVmap must be a model of `ReadWritePropertyMap` with /// `boost::graph_traits::%vertex_descriptor` as key type and /// %Point_2 (type deduced from `TriangleMesh` using `Kernel_traits`) @@ -48,7 +48,7 @@ namespace Surface_mesh_parameterization { /// \param mesh a triangulated surface. /// \param parameterizer a parameterizer. /// \param bhd a halfedge descriptor on the boundary of `mesh`. -/// \param uvmap an instanciation of the class `VertexUVmap`. +/// \param uvmap an instantiation of the class `VertexUVmap`. /// /// \pre `mesh` must be a triangular mesh. /// \pre The mesh border must be mapped onto a convex polygon @@ -87,7 +87,7 @@ Error_code parameterize(TriangleMesh& mesh, /// /// \tparam TriangleMesh must be a model of `FaceGraph`. /// \tparam HD must be the halfedge_descriptor type corresponding to the graph -/// traits of TriangleMesh. +/// traits of `TriangleMesh`. /// \tparam VertexUVmap must be a model of `ReadWritePropertyMap` with /// `boost::graph_traits::%vertex_descriptor` as key type and /// %Point_2 (type deduced from `TriangleMesh` using `Kernel_traits`) @@ -95,7 +95,7 @@ Error_code parameterize(TriangleMesh& mesh, /// /// \param mesh a triangulated surface. /// \param bhd a halfedge descriptor on the boundary of `mesh`. -/// \param uvmap an instanciation of the class `VertexUVmap`. +/// \param uvmap an instantiation of the class `VertexUVmap`. /// /// \pre `mesh` must be a triangular mesh. /// \pre The vertices must be indexed (vimap must be initialized). diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/AABB_traits.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/AABB_traits.h index 9eeb4395..1c9c47f8 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/AABB_traits.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/AABB_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traits.h $ -// $Id: AABB_traits.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traits.h $ +// $Id: include/CGAL/Surface_mesh_segmentation/internal/AABB_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ilker O. Yaz @@ -17,9 +17,10 @@ #include -#include #include +#include + namespace CGAL { @@ -45,9 +46,9 @@ class AABB_traits_SDF : // activate functions below if K::FT is floating point and fast_bbox_intersection = true template - typename boost::enable_if_c< - boost::is_floating_point::value && fast_bbox_intersection, - bool >::type + std::enable_if_t< + std::is_floating_point::value && fast_bbox_intersection, + bool > operator()(const CGAL::Segment_3& segment, const Bounding_box& bbox) const { const Point_3& p = segment.source(); const Point_3& q = segment.target(); @@ -63,9 +64,9 @@ class AABB_traits_SDF : } template - typename boost::enable_if_c< - boost::is_floating_point::value && fast_bbox_intersection, - bool >::type + std::enable_if_t< + std::is_floating_point::value && fast_bbox_intersection, + bool > operator()(const CGAL::Ray_3& ray, const Bounding_box& bbox) const { const Point_3& p = ray.source(); const Point_3& q = ray.second_point(); diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/AABB_traversal_traits.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/AABB_traversal_traits.h index 4b753337..436414b5 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/AABB_traversal_traits.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/AABB_traversal_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traversal_traits.h $ -// $Id: AABB_traversal_traits.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traversal_traits.h $ +// $Id: include/CGAL/Surface_mesh_segmentation/internal/AABB_traversal_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ilker O. Yaz @@ -23,7 +23,7 @@ namespace CGAL /** * @class Special case for ray/segment-triangle - * the only difference with the offical one (Listing_intersection_traits) is that + * the only difference with the official one (Listing_intersection_traits) is that * is the do_intersect which is made prior to the intersection call. */ template @@ -54,7 +54,7 @@ class Listing_intersection_traits_ray_or_segment_triangle if ( GeomTraits().do_intersect_3_object()(query, primitive.datum(m_traits.shared_data())) ) { - boost::optional intersection + std::optional intersection = m_traits.intersection_object()(query, primitive); if(intersection) { *m_out_it++ = *intersection; diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Disk_samplers.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Disk_samplers.h index be3e9218..546a2a12 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Disk_samplers.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Disk_samplers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Disk_samplers.h $ -// $Id: Disk_samplers.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Disk_samplers.h $ +// $Id: include/CGAL/Surface_mesh_segmentation/internal/Disk_samplers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ilker O. Yaz @@ -98,7 +98,7 @@ class Vogel_disk_sampling for(std::size_t i = 0; i < number_of_points; ++i) { double Q = i * golden_ratio * CGAL_PI; double R = std::pow(static_cast(i) / number_of_points, custom_power); - // use uniform weigths, since we already give importance to locations that are close to center. + // use uniform weights, since we already give importance to locations that are close to center. *out_it++ = Tuple(R * cos(Q), R * sin(Q), 1.0); } } diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Expectation_maximization.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Expectation_maximization.h index 242811dd..daff52a7 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Expectation_maximization.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Expectation_maximization.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Expectation_maximization.h $ -// $Id: Expectation_maximization.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Expectation_maximization.h $ +// $Id: include/CGAL/Surface_mesh_segmentation/internal/Expectation_maximization.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ilker O. Yaz @@ -66,7 +66,7 @@ class Expectation_maximization } /** * Probability density function (pdf). - * Note that result is not devided to \f$ \sqrt {2\pi} \f$ , since it does not effect EM algorithm. + * Note that result is not divided to \f$ \sqrt {2\pi} \f$ , since it does not effect EM algorithm. * @param x data * @return pdf result (without dividing \f$ \sqrt {2\pi} \f$) */ @@ -238,7 +238,7 @@ class Expectation_maximization for(std::size_t i = 0; i < centers.size(); ++i) { if(member_count[i] == 0) { CGAL_assertion( false && - "There is a cluster which does not contain any points, it will not cause an error but associated probabilites to this cluster will be 0."); + "There is a cluster which does not contain any points, it will not cause an error but associated probabilities to this cluster will be 0."); } else { centers[i].deviation = std::sqrt(centers[i].deviation / member_count[i]); } diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Filters.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Filters.h index 2d48481f..134382cc 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Filters.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Filters.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Filters.h $ -// $Id: Filters.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Filters.h $ +// $Id: include/CGAL/Surface_mesh_segmentation/internal/Filters.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ilker O. Yaz @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include @@ -63,8 +63,8 @@ class Bilateral_filtering void operator()(const Polyhedron& mesh, std::size_t window_size, ValuePropertyMap values, - boost::optional spatial_parameter = boost::optional(), - boost::optional range_parameter = boost::optional() + std::optional spatial_parameter = std::optional(), + std::optional range_parameter = std::optional() ) const { typedef typename boost::graph_traits::face_descriptor face_descriptor; typedef typename boost::graph_traits::face_iterator face_iterator; @@ -319,7 +319,7 @@ class Neighbor_selector_by_vertex // if insertion is OK, then check its level facet_queue.push( new_pair); // if its level is equal to max_level do not put it in - } // queue since we do not want to traverse its childs + } // queue since we do not want to traverse its children } } while(++vertex_circulator != done); } while((edge = next(edge,polyhedron)) != halfedge(facet_front,polyhedron)); diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h index c7cc1095..62999351 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h $ -// $Id: K_means_clustering.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h $ +// $Id: include/CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ilker O. Yaz @@ -48,7 +48,7 @@ class Selector * T2 should be constructable by T1 * * Implementation note: it is a variant of Floyd generator, and has uniform distribution - * where k = number of centers = complexity is O(k log k), and mem overhead is O(k) + * where k = number of centers = complexity is \cgalBigO{k log k}, and mem overhead is \cgalBigO{k} * * I also left previous implementation below, it might be useful where number of centers close to number of points */ @@ -78,7 +78,7 @@ class Selector // To future reference, I also left prev implementation which is a variant of Fisher–Yates shuffle, however to keep `points` intact I use another vector to // store and swap indices. - // where n = number of points; complexity = O(n), memory overhead = O(n) + // where n = number of points; complexity = \cgalBigO{n}, memory overhead = \cgalBigO{n} /* template void forgy_initialization(std::size_t number_of_centers, const std::vector& points, std::vector& centers) @@ -141,7 +141,7 @@ class Selector // this can not select end(), since random_ds < total_probability (i.e. distance_square_cumulative.back()) // this can not select an already selected item since either (by considering that upper bounds returns greater) - // - aready selected item is at 0, and its value is 0.0 + // - already selected item is at 0, and its value is 0.0 // - or its value is equal to value of previous element std::size_t selection_index = std::upper_bound( distance_square_cumulative.begin(), distance_square_cumulative.end(), random_ds) diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/SDF_calculation.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/SDF_calculation.h index 459b066d..201c6292 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/SDF_calculation.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/SDF_calculation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/SDF_calculation.h $ -// $Id: SDF_calculation.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/SDF_calculation.h $ +// $Id: include/CGAL/Surface_mesh_segmentation/internal/SDF_calculation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ilker O. Yaz @@ -26,7 +26,7 @@ #include #include -#include +#include #define CGAL_NUMBER_OF_MAD 1.5 @@ -200,7 +200,7 @@ class SDF_calculation disk_sampler(number_of_rays, std::back_inserter(disk_samples)); for( ; facet_begin != facet_end; ++facet_begin) { - boost::optional sdf_value = calculate_sdf_value_of_facet(*facet_begin, + std::optional sdf_value = calculate_sdf_value_of_facet(*facet_begin, cone_angle, true, disk_samples); if(sdf_value) { @@ -233,7 +233,7 @@ class SDF_calculation * \note: normal should have unit length */ template - boost::optional calculate_sdf_value_of_point( + std::optional calculate_sdf_value_of_point( Point center, Vector normal, SkipPrimitiveFunctor skip, @@ -250,7 +250,7 @@ class SDF_calculation * Overload for taking DiskSampling as template parameter */ template - boost::optional calculate_sdf_value_of_point( + std::optional calculate_sdf_value_of_point( Point center, Vector normal, SkipPrimitiveFunctor skip, @@ -270,7 +270,7 @@ class SDF_calculation * Overload for directly taking sampled points from disk as parameter */ template - boost::optional calculate_sdf_value_of_point( + std::optional calculate_sdf_value_of_point( const Point& center, const Vector& normal, SkipPrimitiveFunctor skip, @@ -346,10 +346,10 @@ class SDF_calculation } if(ray_distances.empty()) { - return boost::none; + return std::nullopt; } - return boost::optional(remove_outliers_and_calculate_sdf_value( + return std::optional(remove_outliers_and_calculate_sdf_value( ray_distances)); } @@ -369,7 +369,7 @@ class SDF_calculation * @param samples sampled points from a unit-disk which are corresponds to rays picked from cone * @return calculated SDF value */ - boost::optional calculate_sdf_value_of_facet( + std::optional calculate_sdf_value_of_facet( face_handle facet, double cone_angle, bool accept_if_acute, @@ -379,11 +379,11 @@ class SDF_calculation const Point p2 = get(vertex_point_map,target(next(halfedge(facet,mesh),mesh),mesh)); const Point p3 = get(vertex_point_map,target(prev(halfedge(facet,mesh),mesh),mesh)); const Point center = centroid_functor(p1, p2, p3); - if (collinear_functor(p1, p2, p3)) return boost::none; + if (collinear_functor(p1, p2, p3)) return std::nullopt; Vector normal = normal_functor(p2, p1, p3); normal=scale_functor(normal, FT(1.0/std::sqrt(to_double(normal.squared_length())))); - if (normal!=normal) return boost::none; + if (normal!=normal) return std::nullopt; CGAL::internal::SkipPrimitiveFunctor skip(facet); CGAL::internal::FirstIntersectionVisitor @@ -434,7 +434,7 @@ class SDF_calculation } const Point* i_point; - if(!(i_point = boost::get(&object))) { + if(!(i_point = std::get_if(&object))) { continue; // continue in case of segment. } @@ -478,12 +478,12 @@ class SDF_calculation boost::tuple ray_casting( const Ray& query, SkipFunctor s, bool accept_if_acute) const { - const boost::optional< typename Tree::template Intersection_and_primitive_id::Type > + const std::optional< typename Tree::template Intersection_and_primitive_id::Type > min_intersection = tree.first_intersection(query, s); if(!min_intersection) return boost::make_tuple(false, false, 0.0, Primitive_id()); - const Point* i_point = boost::get( &min_intersection->first ); + const Point* i_point = std::get_if( &min_intersection->first ); if (!i_point) //segment case ignored return boost::make_tuple(false, false, 0.0, Primitive_id()); diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Surface_mesh_segmentation.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Surface_mesh_segmentation.h index 61572bdf..165eb445 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Surface_mesh_segmentation.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/Surface_mesh_segmentation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Surface_mesh_segmentation.h $ -// $Id: Surface_mesh_segmentation.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Surface_mesh_segmentation.h $ +// $Id: include/CGAL/Surface_mesh_segmentation/internal/Surface_mesh_segmentation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ilker O. Yaz @@ -324,8 +324,8 @@ class Surface_mesh_segmentation CGAL_precondition( (! (face(edge,mesh)==boost::graph_traits::null_face())) && (! (face(opposite(edge,mesh),mesh)==boost::graph_traits::null_face())) ); - const Point a = get(vertex_point_pmap,target(edge,mesh)); - const Point b = get(vertex_point_pmap,target(prev(edge,mesh),mesh)); + const Point a = get(vertex_point_pmap,source(edge,mesh)); + const Point b = get(vertex_point_pmap,target(edge,mesh)); const Point c = get(vertex_point_pmap,target(next(edge,mesh),mesh)); const Point d = get(vertex_point_pmap,target(next(opposite(edge,mesh),mesh),mesh)); // As far as I check: if, say, dihedral angle is 5, this returns 175, diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h index e77f1dcc..1bc427cb 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h $ -// $Id: graph.h b45e788 2022-06-23T16:25:21+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h $ +// $Id: include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h a484bfa $ // Re-licensed for CGAL distribution to: // SPDX-License-Identifier: GPL-3.0-or-later // Original license is: @@ -53,10 +53,10 @@ This program is available under dual licence: 1) Under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Note that any program that incorporates the code under this licence must, under the terms of the GNU GPL, be released under a licence compatible with the GPL. GNU GPL does not permit incorporating this program into proprietary programs. If you wish to do this, please see the alternative licence available below. -GNU General Public License can be found at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html +GNU General Public License can be found at https://www.gnu.org/licenses/old-licenses/gpl-2.0.html 2) Proprietary Licence from UCL Business PLC. -To enable programers to include the MaxFlow software in a proprietary system (which is not allowed by the GNU GPL), this licence gives you the right to incorporate the software in your program and distribute under any licence of your choosing. The full terms of the licence and applicable fee, are available from the Licensors at: http://www.uclb-elicensing.com/optimisation_software/maxflow_computervision.html +To enable programmers to include the MaxFlow software in a proprietary system (which is not allowed by the GNU GPL), this licence gives you the right to incorporate the software in your program and distribute under any licence of your choosing. The full terms of the licence and applicable fee, are available from the Licensors at: http://www.uclb-elicensing.com/optimisation_software/maxflow_computervision.html ################################################################## @@ -637,7 +637,7 @@ class Graph arcs_for[MF_ARC_BLOCK_SIZE]; /* all arcs must be at even addresses */ union { arc_forward dummy; - node *LAST_NODE; /* used in graph consruction */ + node *LAST_NODE; /* used in graph construction */ } LAST_NODE; } arc_for_block; @@ -651,7 +651,7 @@ class Graph arcs_rev[MF_ARC_BLOCK_SIZE]; /* all arcs must be at even addresses */ union { arc_reverse dummy; - node *LAST_NODE; /* used in graph consruction */ + node *LAST_NODE; /* used in graph construction */ } LAST_NODE; } arc_rev_block; @@ -661,7 +661,7 @@ class Graph DBlock *nodeptr_block; void (*error_function)(const char - *); /* this function is called if a error occurs, + *); /* this function is called if an error occurs, with a corresponding error message (or exit(1) is called if it's nullptr) */ diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path.h index d1677751..a48af25c 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path.h $ -// $Id: Surface_mesh_shortest_path.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path.h $ +// $Id: include/CGAL/Surface_mesh_shortest_path.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Stephen Kiazyk diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h index d5ba8ac6..bb5ec1bd 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h $ -// $Id: Surface_mesh_shortest_path.h c519bde 2022-07-08T20:21:02+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h $ +// $Id: include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Stephen Kiazyk @@ -36,6 +36,7 @@ #include #include #include +#include namespace CGAL { @@ -44,7 +45,7 @@ namespace CGAL { \brief Computes shortest surface paths from one or more source points on a surface mesh. -\details Uses an optimized variation of Chen and Han's \f$ O(n^2) \f$ algorithm by Xin and Wang. +\details Uses an optimized variation of Chen and Han's \cgalBigO{n^2} algorithm by Xin and Wang. Refer to those respective papers for the details of the implementation. \tparam Traits a model of `SurfaceMeshShortestPathTraits`. @@ -143,7 +144,7 @@ class Surface_mesh_shortest_path /// \brief An ordered pair specifying a location on the surface of the `Triangle_mesh`. /// \details If `tm` is the input graph and given the pair (`f`, `bc`) such that `bc` is `(w0, w1, w2)`, - /// the correspondance with the weights in `bc` and the vertices of the face `f` is the following: + /// the correspondence with the weights in `bc` and the vertices of the face `f` is the following: /// - `w0 = source(halfedge(f,tm),tm)` /// - `w1 = target(halfedge(f,tm),tm)` /// - `w2 = target(next(halfedge(f,tm),tm),tm)` @@ -845,10 +846,10 @@ class Surface_mesh_shortest_path * \ / * v3 * The source S must reach all Vi, so for each side of the edge, there are two windwows being spawned: - * - v0v1 targetting v2 propagating only on the left (v0v2) - * - v2v0 targetting v1 propagating only on the left (v2v1) - * - v1v0 targetting v3 propagating only on the left (v1v3) - * - v3v1 targetting v0 propagating only on the left (v3v0) + * - v0v1 targeting v2 propagating only on the left (v0v2) + * - v2v0 targeting v1 propagating only on the left (v2v1) + * - v1v0 targeting v3 propagating only on the left (v1v3) + * - v3v1 targeting v0 propagating only on the left (v3v0) * * If v0v1 is a border edge, spawn 3 children in the face, and none on the other side */ @@ -878,11 +879,11 @@ class Surface_mesh_shortest_path Triangle_2 layoutFace(pt3t2(face3d)); Point_2 sourcePoint(construct_barycenter_in_triangle_2(layoutFace, edgeSourceLocations[side])); - // v0v1 targetting v2 + // v0v1 targeting v2 if (m_debugOutput) { std::cout << std::endl << " ~~~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl; - std::cout << "\tExpanding edge root, side #" << side << ", targetting LOCAL 'v2'" << std::endl; + std::cout << "\tExpanding edge root, side #" << side << ", targeting LOCAL 'v2'" << std::endl; std::cout << "\t\t3D Face = " << face3d << std::endl; std::cout << "\t\t2D Face = " << layoutFace << std::endl; std::cout << "\t\tBarycentric coordinates: " << edgeSourceLocations[side][0] @@ -903,7 +904,7 @@ class Surface_mesh_shortest_path edgeRoot->push_middle_child(v2_Child); process_node(v2_Child); - // v2v0 targetting v1 + // v2v0 targeting v1 face3d = triangle_from_halfedge(prev(baseEdges[side], m_graph)); layoutFace = pt3t2(face3d); @@ -915,7 +916,7 @@ class Surface_mesh_shortest_path if (m_debugOutput) { std::cout << std::endl << " ~~~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl; - std::cout << "\tExpanding edge root, side #" << side << ", targetting LOCAL 'v1'" << std::endl; + std::cout << "\tExpanding edge root, side #" << side << ", targeting LOCAL 'v1'" << std::endl; std::cout << "\t\t3D Face = " << face3d << std::endl; std::cout << "\t\t2D Face = " << layoutFace << std::endl; std::cout << "\t\tBarycentric coordinates: " << edgeSourceLocations[side][0] @@ -1081,7 +1082,7 @@ class Surface_mesh_shortest_path { const auto cgalIntersection = i2(cl2(segment), cl2(leftBoundary)); - if (!cgalIntersection || !boost::get(&*cgalIntersection)) + if (!cgalIntersection || !std::get_if(&*cgalIntersection)) { if (m_debugOutput) { @@ -1091,7 +1092,7 @@ class Surface_mesh_shortest_path } else { - const Point_2* result = boost::get(&*cgalIntersection); + const Point_2* result = std::get_if(&*cgalIntersection); FT t0 = pdas2(cs2(segment), ct2(segment), *result); if (t0 >= FT(1)) @@ -1139,7 +1140,7 @@ class Surface_mesh_shortest_path { const auto cgalIntersection = i2(cl2(segment), cl2(rightBoundary)); - if (!cgalIntersection || !boost::get(&*cgalIntersection)) + if (!cgalIntersection || !std::get_if(&*cgalIntersection)) { if (m_debugOutput) { @@ -1149,7 +1150,7 @@ class Surface_mesh_shortest_path } else { - const Point_2* result = boost::get(&*cgalIntersection); + const Point_2* result = std::get_if(&*cgalIntersection); FT t0 = pdas2(cs2(segment), ct2(segment), *result); if (t0 <= FT(0)) @@ -1347,7 +1348,7 @@ class Surface_mesh_shortest_path // Propagating a pseudo-source on a boundary vertex can result in a cone on a null face // In such a case, we only care about the part of the cone pointing at the vertex (i.e. the middle child), - // so we can avoid propagating over the (non-existant) left opposite edge + // so we can avoid propagating over the (non-existent) left opposite edge if (node->is_null_face()) { propagateLeft = false; @@ -1445,7 +1446,7 @@ class Surface_mesh_shortest_path else // there is already an occupier, at a strictly smaller distance { // this is an application of "one angle one split" - if (c != CGAL::LARGER) // propage on the left if the node's ray is left of the occupier's + if (c != CGAL::LARGER) // propagate on the left if the node's ray is left of the occupier's propagateLeft = true; if (c != CGAL::SMALLER && !node->is_source_node()) // by convention a source node only points at the left edge propagateRight = true; @@ -1777,7 +1778,7 @@ class Surface_mesh_shortest_path CGAL_assertion(bool(cgalIntersection)); - const Point_2* result = boost::get(&*cgalIntersection); + const Point_2* result = std::get_if(&*cgalIntersection); if (!result) result = ¤tSourceImage; @@ -2494,7 +2495,7 @@ class Surface_mesh_shortest_path { // It is a feature of C++11 that `const_iterator` may be used in calls to `erase()`, however // in order to support C++98, we must use `iterator`. Semantically, this is correct, but - // I must cast away the const-ness to hide the internal uglyness + // I must cast away the const-ness to hide the internal ugliness return Source_point_iterator(const_cast&>(m_faceLocations).begin()); } @@ -3048,7 +3049,7 @@ class Surface_mesh_shortest_path typename Traits::Construct_barycentric_coordinates cbc(traits.construct_barycentric_coordinates_object()); typename Traits::Compute_squared_distance_3 csd3(traits.compute_squared_distance_3_object()); typedef typename AABB_face_graph_tree::template Intersection_and_primitive_id::Type Intersection_type; - typedef boost::optional Ray_intersection; + typedef std::optional Ray_intersection; std::vector intersections; @@ -3063,7 +3064,7 @@ class Surface_mesh_shortest_path { if (intersections[i]) { - Point_3* intersectionPoint = boost::get(&(intersections[i]->first)); + Point_3* intersectionPoint = std::get_if(&(intersections[i]->first)); if (intersectionPoint) { diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h index 5d766bb6..7d595107 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h $ -// $Id: Surface_mesh_shortest_path_traits.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h $ +// $Id: include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Stephen Kiazyk @@ -22,8 +22,6 @@ #include #include -#include - namespace CGAL { /*! @@ -36,7 +34,7 @@ as required by the `Surface_mesh_shortest_path` class. \tparam TriangleMesh A model of `FaceListGraph` -\cgalModels `SurfaceMeshShortestPathTraits` +\cgalModels{SurfaceMeshShortestPathTraits} */ template < class K, @@ -178,7 +176,7 @@ model which uses an exact Kernel during the unfolding operations to achieve bett \tparam TriangleMesh triangle mesh type -\cgalModels `SurfaceMeshShortestPathTraits` +\cgalModels{SurfaceMeshShortestPathTraits} */ template < class K, diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/barycentric.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/barycentric.h index f9ee3807..31773d9e 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/barycentric.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/barycentric.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/barycentric.h $ -// $Id: barycentric.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/barycentric.h $ +// $Id: include/CGAL/Surface_mesh_shortest_path/barycentric.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Stephen Kiazyk diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/function_objects.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/function_objects.h index dbfbb6a6..18a53fcb 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/function_objects.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/function_objects.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/function_objects.h $ -// $Id: function_objects.h 64b9bbd 2022-06-28T15:48:56+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/function_objects.h $ +// $Id: include/CGAL/Surface_mesh_shortest_path/function_objects.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Stephen Kiazyk @@ -465,7 +465,7 @@ class Compare_relative_intersection_along_segment_2 CGAL_assertion(bool(intersectResult1)); if (!intersectResult1) return CGAL::SMALLER; - const Point_2* p1_ptr = boost::get(&*intersectResult1); + const Point_2* p1_ptr = std::get_if(&*intersectResult1); CGAL_assertion(p1_ptr && "Intersection should have been a point"); if (!p1_ptr) return CGAL::SMALLER; @@ -477,7 +477,7 @@ class Compare_relative_intersection_along_segment_2 CGAL_assertion(bool(intersectResult2)); if (!intersectResult2) return CGAL::SMALLER; - const Point_2* p2_ptr = boost::get(&*intersectResult2); + const Point_2* p2_ptr = std::get_if(&*intersectResult2); CGAL_assertion(p2_ptr && "Intersection should have been a point"); if (!p2_ptr) return CGAL::SMALLER; diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/internal/Cone_expansion_event.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/internal/Cone_expansion_event.h index 37dc9946..004dc76e 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/internal/Cone_expansion_event.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/internal/Cone_expansion_event.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/internal/Cone_expansion_event.h $ -// $Id: Cone_expansion_event.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/internal/Cone_expansion_event.h $ +// $Id: include/CGAL/Surface_mesh_shortest_path/internal/Cone_expansion_event.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Stephen Kiazyk diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/internal/Cone_tree.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/internal/Cone_tree.h index 465302e8..d89a8e20 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/internal/Cone_tree.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/internal/Cone_tree.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/internal/Cone_tree.h $ -// $Id: Cone_tree.h 89b7bb1 2022-07-05T15:39:29+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/internal/Cone_tree.h $ +// $Id: include/CGAL/Surface_mesh_shortest_path/internal/Cone_tree.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Stephen Kiazyk diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h index b4a3c00a..6d3e7133 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h $ -// $Id: misc_functions.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h $ +// $Id: include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Stephen Kiazyk diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h index 0b160d75..64b3d134 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h $ -// $Id: Edge_collapse_visitor_base.h ff09c5d 2019-10-25T16:35:53+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -46,9 +46,9 @@ struct Edge_collapse_visitor_base void OnStarted(Triangle_mesh&) {} void OnFinished(Triangle_mesh&) {} void OnStopConditionReached(const Profile&) {} - void OnCollected(const Profile&, const boost::optional&) {} - void OnSelected(const Profile&, const boost::optional&, size_type, size_type) {} - void OnCollapsing(const Profile&, const boost::optional&) {} + void OnCollected(const Profile&, const std::optional&) {} + void OnSelected(const Profile&, const std::optional&, size_type, size_type) {} + void OnCollapsing(const Profile&, const std::optional&) {} void OnCollapsed(const Profile&, const vertex_descriptor&) {} void OnNonCollapsable(const Profile&) {} }; diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h index 6bdcee55..c3b5725c 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h $ -// $Id: Bounded_distance_placement.h d6d8fbe 2020-04-27T16:06:43+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno, @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -49,7 +49,7 @@ class Bounded_distance_placement template void initialize_tree(const Profile& profile) const { - CGAL_static_assertion((std::is_same::value)); + static_assert(std::is_same::value); typedef typename Profile::Triangle_mesh Triangle_mesh; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -93,12 +93,12 @@ class Bounded_distance_placement } template - boost::optional + std::optional operator()(const Profile& profile) const { typedef typename Profile::Point Point; - boost::optional op = m_base_placement(profile); + std::optional op = m_base_placement(profile); if(op) { if(m_tree_ptr == nullptr) @@ -121,7 +121,7 @@ class Bounded_distance_placement m_tree_ptr->do_intersect(CGAL::Sphere_3(p, m_sq_threshold_dist))) return op; - return boost::optional(); + return std::optional(); } return op; @@ -153,13 +153,13 @@ class Bounded_distance_placement > { } template - boost::optional + std::optional operator()(const Profile& profile) const { typedef typename Profile::Geom_traits Geom_traits; typedef typename Profile::Point Point; - boost::optional op = m_base_placement(profile); + std::optional op = m_base_placement(profile); if(op) { CGAL_assertion(m_tree_ptr != nullptr); @@ -173,7 +173,7 @@ class Bounded_distance_placement > m_tree_ptr->do_intersect(CGAL::Sphere_3(p, m_sq_threshold_dist))) return op; - return boost::optional(); + return std::optional(); } return op; diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h index f4157213..a4cbf4f1 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h $ -// $Id: Bounded_normal_change_filter.h e1c1e1f 2020-11-04T11:28:02+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_filter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -15,7 +15,7 @@ #include #include -#include +#include namespace CGAL { namespace Surface_mesh_simplification { @@ -31,8 +31,8 @@ class Bounded_normal_change_filter template - boost::optional - operator()(const Profile& profile, boost::optional op) const + std::optional + operator()(const Profile& profile, std::optional op) const { typedef typename Profile::VertexPointMap Vertex_point_map; @@ -78,7 +78,7 @@ class Bounded_normal_change_filter Vector n2 = gt.construct_cross_product_vector_3_object()(eq2p, eq2r); if(!is_positive(gt.compute_scalar_product_3_object()(n1, n2))) - return boost::optional(); + return std::optional(); ++it; } diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h index 40616477..84494f08 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h $ -// $Id: Bounded_normal_change_placement.h ff09c5d 2019-10-25T16:35:53+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_normal_change_placement.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -15,7 +15,7 @@ #include -#include +#include namespace CGAL { namespace Surface_mesh_simplification { @@ -29,7 +29,7 @@ class Bounded_normal_change_placement {} template - boost::optional + std::optional operator()(const Profile& profile) const { typedef typename Profile::VertexPointMap Vertex_point_map; @@ -43,7 +43,7 @@ class Bounded_normal_change_placement const Geom_traits& gt = profile.geom_traits(); const Vertex_point_map& vpm = profile.vertex_point_map(); - boost::optional op = m_get_placement(profile); + std::optional op = m_get_placement(profile); if(op) { // triangles returns the triangles of the star of the vertices of the edge to collapse @@ -76,7 +76,7 @@ class Bounded_normal_change_placement Vector n2 = gt.construct_cross_product_vector_3_object()(eq2p, eq2r); if(!is_positive(gt.compute_scalar_product_3_object()(n1, n2))) - return boost::optional(); + return std::optional(); ++it; } diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h index 74041e39..ba7de8cd 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h $ -// $Id: Constrained_placement.h ff09c5d 2019-10-25T16:35:53+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Constrained_placement.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot @@ -31,7 +31,7 @@ class Constrained_placement {} template - boost::optional operator()(const Profile& profile) const + std::optional operator()(const Profile& profile) const { typedef typename Profile::TM TM; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h index f89070ec..3503c5e1 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h $ -// $Id: Count_ratio_stop_predicate.h ff09c5d 2019-10-25T16:35:53+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -13,48 +13,24 @@ #include -#include -#include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_REPLACEMENT_HEADER "" +#include + +#include + +#ifndef CGAL_NO_DEPRECATED_CODE namespace CGAL { namespace Surface_mesh_simplification { -//******************************************************************************************************************* -// -= stopping condition predicate =- -// -// Determines whether the simplification has finished. -// The arguments are (current_cost,vertex,vertex,is_edge,initial_pair_count,current_pair_count,surface) and the result is bool -// -//******************************************************************************************************************* - -// Stops when the ratio of initial to current vertex pairs is below some value. +// Stops when the ratio of initial to current number of edges is below some value. template -class Count_ratio_stop_predicate -{ -public: - typedef TM_ TM; - typedef typename boost::graph_traits::edges_size_type size_type; - - Count_ratio_stop_predicate(const double ratio) - : m_ratio(ratio) - { - CGAL_warning(0. < ratio && ratio <= 1.); - } - - template - bool operator()(const F& /*current_cost*/, - const Profile& /*profile*/, - size_type initial_edge_count, - size_type current_edge_count) const - { - return (static_cast(current_edge_count) / static_cast(initial_edge_count)) < m_ratio; - } - -private: - double m_ratio; -}; +using Count_ratio_stop_predicate CGAL_DEPRECATED = Edge_count_ratio_stop_predicate; } // namespace Surface_mesh_simplification } // namespace CGAL +#endif // CGAL_NO_DEPRECATED_CODE + #endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_COUNT_RATIO_STOP_PREDICATE_H diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h index 4cf1a2bc..3bb313eb 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h $ -// $Id: Count_stop_predicate.h ff09c5d 2019-10-25T16:35:53+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -13,46 +13,24 @@ #include -#include -#include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_REPLACEMENT_HEADER "" +#include + +#include + +#ifndef CGAL_NO_DEPRECATED_CODE namespace CGAL { namespace Surface_mesh_simplification { -//******************************************************************************************************************* -// -= stopping condition predicate =- -// -// Determines whether the simplification has finished. -// The arguments are (current_cost,vertex,vertex,is_edge,initial_pair_count,current_pair_count,surface) and the result is bool -// -//******************************************************************************************************************* - // Stops when the number of edges left falls below a given number. template -class Count_stop_predicate -{ -public: - typedef TM_ TM; - typedef typename boost::graph_traits::edges_size_type size_type; - - Count_stop_predicate(const std::size_t edge_count_threshold) - : m_edge_count_threshold(edge_count_threshold) - { } - - template - bool operator()(const F& /*current_cost*/, - const Profile& /*profile*/, - std::size_t /*initial_edge_count*/, - std::size_t current_edge_count) const - { - return current_edge_count < m_edge_count_threshold; - } - -private: - std::size_t m_edge_count_threshold; -}; +using Count_stop_predicate CGAL_DEPRECATED = Edge_count_stop_predicate; } // namespace Surface_mesh_simplification } // namespace CGAL +#endif // CGAL_NO_DEPRECATED_CODE + #endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_COUNT_STOP_PREDICATE_H diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h new file mode 100644 index 00000000..8f13201e --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h @@ -0,0 +1,52 @@ +// Copyright (c) 2006 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Fernando Cacciola +// +#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_EDGE_COUNT_RATIO_STOP_PREDICATE_H +#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_EDGE_COUNT_RATIO_STOP_PREDICATE_H + +#include + +#include +#include + +namespace CGAL { +namespace Surface_mesh_simplification { + +// Stops when the ratio of initial to current number of edges is below some value. +template +class Edge_count_ratio_stop_predicate +{ +public: + typedef TM_ TM; + typedef typename boost::graph_traits::edges_size_type size_type; + + Edge_count_ratio_stop_predicate(const double ratio) + : m_ratio(ratio) + { + CGAL_warning(0. < ratio && ratio <= 1.); + } + + template + bool operator()(const F& /*current_cost*/, + const Profile& /*profile*/, + size_type initial_edge_count, + size_type current_edge_count) const + { + return (static_cast(current_edge_count) / static_cast(initial_edge_count)) < m_ratio; + } + +private: + double m_ratio; +}; + +} // namespace Surface_mesh_simplification +} // namespace CGAL + +#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_EDGE_COUNT_RATIO_STOP_PREDICATE_H diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_stop_predicate.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_stop_predicate.h new file mode 100644 index 00000000..57b26eb9 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_stop_predicate.h @@ -0,0 +1,50 @@ +// Copyright (c) 2006 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_stop_predicate.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_stop_predicate.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Fernando Cacciola +// +#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_EDGE_COUNT_STOP_PREDICATE_H +#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_EDGE_COUNT_STOP_PREDICATE_H + +#include + +#include +#include + +namespace CGAL { +namespace Surface_mesh_simplification { + +// Stops when the number of edges falls below a given number. +template +class Edge_count_stop_predicate +{ +public: + typedef TM_ TM; + typedef typename boost::graph_traits::edges_size_type size_type; + + Edge_count_stop_predicate(const std::size_t edge_count_threshold) + : m_edge_count_threshold(edge_count_threshold) + { } + + template + bool operator()(const F& /*current_cost*/, + const Profile& /*profile*/, + std::size_t /*initial_edge_count*/, + std::size_t current_edge_count) const + { + return current_edge_count < m_edge_count_threshold; + } + +private: + std::size_t m_edge_count_threshold; +}; + +} // namespace Surface_mesh_simplification +} // namespace CGAL + +#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_EDGE_COUNT_STOP_PREDICATE_H diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h index a7a086b7..4f431332 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h $ -// $Id: Edge_length_cost.h ff09c5d 2019-10-25T16:35:53+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -27,9 +27,9 @@ class Edge_length_cost Edge_length_cost() {} template - boost::optional operator()(const Profile& profile, const T& /*placement*/) const + std::optional operator()(const Profile& profile, const T& /*placement*/) const { - typedef boost::optional result_type; + typedef std::optional result_type; return result_type(profile.geom_traits().compute_squared_distance_3_object()(profile.p0(), profile.p1())); } }; diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_stop_predicate.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_stop_predicate.h index 45e515d2..c38bc1d5 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_stop_predicate.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_stop_predicate.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_stop_predicate.h $ -// $Id: Edge_length_stop_predicate.h ff09c5d 2019-10-25T16:35:53+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_stop_predicate.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_stop_predicate.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h index 4d7e2a75..4cae73a9 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h $ -// $Id: Edge_profile.h a1b00f9 2021-12-22T12:02:53+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h new file mode 100644 index 00000000..5226d322 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h @@ -0,0 +1,56 @@ +// Copyright (c) 2006 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Fernando Cacciola +// +#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_COUNT_RATIO_STOP_PREDICATE_H +#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_COUNT_RATIO_STOP_PREDICATE_H + +#include + +#include +#include +#include + +namespace CGAL { +namespace Surface_mesh_simplification { + +// Stops when the ratio of initial to current number of faces is below some value. +template +class Face_count_ratio_stop_predicate +{ +public: + typedef TM_ TM; + typedef typename boost::graph_traits::edges_size_type size_type; + + Face_count_ratio_stop_predicate(const double ratio, + const TM& tmesh) + : m_ratio(ratio), m_initial_face_count(CGAL::internal::exact_num_faces(tmesh)) + { + CGAL_warning(0. < ratio && ratio <= 1.); + } + + template + bool operator()(const F& /*current_cost*/, + const Profile& profile, + size_type /*initial_edge_count*/, + size_type /*current_edge_count*/) const + { + const std::size_t current_face_count = CGAL::internal::exact_num_faces(profile.surface_mesh()); + return (static_cast(current_face_count) / static_cast(m_initial_face_count)) < m_ratio; + } + +private: + const double m_ratio; + const std::size_t m_initial_face_count; +}; + +} // namespace Surface_mesh_simplification +} // namespace CGAL + +#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_COUNT_RATIO_STOP_PREDICATE_H diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_stop_predicate.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_stop_predicate.h new file mode 100644 index 00000000..567369fe --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_stop_predicate.h @@ -0,0 +1,52 @@ +// Copyright (c) 2006 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_stop_predicate.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_stop_predicate.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Fernando Cacciola +// +#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_COUNT_STOP_PREDICATE_H +#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_COUNT_STOP_PREDICATE_H + +#include + +#include +#include +#include + +namespace CGAL { +namespace Surface_mesh_simplification { + +// Stops when the number of faces falls below a given number. +template +class Face_count_stop_predicate +{ +public: + typedef TM_ TM; + typedef typename boost::graph_traits::faces_size_type size_type; + + Face_count_stop_predicate(const std::size_t face_count_threshold) + : m_face_count_threshold(face_count_threshold) + { } + + template + bool operator()(const F& /*current_cost*/, + const Profile& profile, + std::size_t /*initial_edge_count*/, + std::size_t /*current_edge_count*/) const + { + const std::size_t current_face_count = CGAL::internal::exact_num_faces(profile.surface_mesh()); + return (current_face_count < m_face_count_threshold); + } + +private: + std::size_t m_face_count_threshold; +}; + +} // namespace Surface_mesh_simplification +} // namespace CGAL + +#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_COUNT_STOP_PREDICATE_H diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h index d7918240..46fe671d 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h $ -// $Id: FastEnvelope_filter.h deeff23 2020-09-14T17:03:40+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -43,7 +43,7 @@ class FastEnvelope_filter template void initialize_envelope(const Profile& profile) const { - CGAL_static_assertion((std::is_same::value)); + static_assert(std::is_same::value); typedef typename Profile::Triangle_mesh Triangle_mesh; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -97,8 +97,8 @@ class FastEnvelope_filter template - boost::optional - operator()(const Profile& profile, boost::optional op) const + std::optional + operator()(const Profile& profile, std::optional op) const { typedef typename Profile::Point Point; typedef typename Profile::vertex_descriptor_vector Link; @@ -116,7 +116,7 @@ class FastEnvelope_filter if(m_fast_envelope->is_outside(vecp)){ // the new placement is outside envelope - return boost::none; + return std::nullopt; } const Link link = profile.link(); @@ -133,8 +133,8 @@ class FastEnvelope_filter std::array triangle = { vecp, vecv, vecw}; if(m_fast_envelope->is_outside(triangle)){ - // the triange intersects the envelope - return boost::none; + // the triangle intersects the envelope + return std::nullopt; } vecv = vecw; diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_policies.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_policies.h index 8ffc2832..f159a09a 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_policies.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_policies.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_policies.h $ -// $Id: GarlandHeckbert_plane_policies.h 776cfd6 2022-03-31T23:24:20+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_policies.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_policies.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baskin Burak Senbaslar, diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h index a122ab13..ac96b59b 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h $ -// $Id: GarlandHeckbert_policies.h 522a88b 2022-04-08T11:10:20+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_policies.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baskin Burak Senbaslar, diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_plane_policies.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_plane_policies.h index c6d73073..cfc971ad 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_plane_policies.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_plane_policies.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_plane_policies.h $ -// $Id: GarlandHeckbert_probabilistic_plane_policies.h 776cfd6 2022-03-31T23:24:20+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_plane_policies.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_plane_policies.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baskin Burak Senbaslar, @@ -64,7 +64,7 @@ class Probabilistic_plane_quadric_calculator { } Probabilistic_plane_quadric_calculator(TriangleMesh& tmesh, - typename boost::enable_if >::type* = nullptr) + std::enable_if_t::value >* = nullptr) { // try to initialize the face variance map using the estimated variance // parameters are constants defined for this class diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_triangle_policies.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_triangle_policies.h index 0f886e70..344e4ad5 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_triangle_policies.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_triangle_policies.h @@ -1,8 +1,8 @@ // Copyright (c) 2019 GeometryFactory (France). All rights reserved. // // This file is part of CGAL (www.cgal.org). -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_triangle_policies.h $ -// $Id: GarlandHeckbert_probabilistic_triangle_policies.h 776cfd6 2022-03-31T23:24:20+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_triangle_policies.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_triangle_policies.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baskin Burak Senbaslar, @@ -61,7 +61,7 @@ class Probabilistic_triangle_quadric_calculator { } Probabilistic_triangle_quadric_calculator(TriangleMesh& tmesh, - typename boost::enable_if >::type* = nullptr) + std::enable_if_t::value >* = nullptr) { // try to initialize the face variance map using the estimated variance // parameters are constants defined for this class diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_triangle_policies.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_triangle_policies.h index b8d2d861..04333dc7 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_triangle_policies.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_triangle_policies.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_triangle_policies.h $ -// $Id: GarlandHeckbert_triangle_policies.h 776cfd6 2022-03-31T23:24:20+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_triangle_policies.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_triangle_policies.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baskin Burak Senbaslar, diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk.h index dff68927..15fc55fb 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk.h $ -// $Id: LindstromTurk.h ff09c5d 2019-10-25T16:35:53+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h index 9df8e687..7d6ba25f 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h $ -// $Id: LindstromTurk_cost.h ff09c5d 2019-10-25T16:35:53+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_cost.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -32,9 +32,9 @@ class LindstromTurk_cost {} template - boost::optional + std::optional operator()(const Profile& profile, - const boost::optional& placement) const + const std::optional& placement) const { return internal::LindstromTurkCore(m_LT_params, profile).compute_cost(placement); } diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h index 3d000dc6..c3bbccb7 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h $ -// $Id: LindstromTurk_placement.h ff09c5d 2019-10-25T16:35:53+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/LindstromTurk_placement.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -31,7 +31,7 @@ class LindstromTurk_placement {} template - boost::optional operator()(const Profile& profile) const + std::optional operator()(const Profile& profile) const { return internal::LindstromTurkCore(m_LT_params, profile).compute_placement(); } diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h index 74f29620..f528ec99 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h $ -// $Id: Midpoint_placement.h ff09c5d 2019-10-25T16:35:53+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -29,9 +29,9 @@ class Midpoint_placement Midpoint_placement() {} template - boost::optional operator()(const Profile& profile) const + std::optional operator()(const Profile& profile) const { - typedef boost::optional result_type; + typedef std::optional result_type; return result_type(profile.geom_traits().construct_midpoint_3_object()(profile.p0(), profile.p1())); } }; diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h index cf991c8a..ef64a26a 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h $ -// $Id: Polyhedral_envelope_filter.h 02db50a 2021-01-04T10:36:14+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -21,7 +21,7 @@ #include -#include +#include #include #include @@ -34,15 +34,15 @@ namespace internal { struct Dummy_filter2 { template inline - const boost::optional - operator()(const Profile&, const boost::optional& op) const + const std::optional + operator()(const Profile&, const std::optional& op) const { return op; } }; -} // namesapce internal +} // namespace internal template class Polyhedral_envelope_filter @@ -58,7 +58,7 @@ class Polyhedral_envelope_filter template void initialize_envelope(const Profile& profile) const { - CGAL_static_assertion((std::is_same::value)); + static_assert(std::is_same::value); typedef typename Profile::Triangle_mesh Triangle_mesh; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -109,8 +109,8 @@ class Polyhedral_envelope_filter template - boost::optional - operator()(const Profile& profile, boost::optional op) const + std::optional + operator()(const Profile& profile, std::optional op) const { typedef typename Profile::Point Point; typedef typename Profile::vertex_descriptor_vector Link; @@ -127,7 +127,7 @@ class Polyhedral_envelope_filter if(! (*m_envelope)(p)){ // the new placement is outside envelope - return boost::none; + return std::nullopt; } const Link link = profile.link(); @@ -140,8 +140,8 @@ class Polyhedral_envelope_filter Point pw = get(profile.vertex_point_map(),w); if(! (*m_envelope)(p, pv, pw)){ - // the triange intersects the envelope - return boost::none; + // the triangle intersects the envelope + return std::nullopt; } pv = pw; diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_functions.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_functions.h index cc929669..481a406b 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_functions.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_functions.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_functions.h $ -// $Id: GarlandHeckbert_functions.h e2aa7d2 2022-03-22T14:35:42+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_functions.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_functions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé, diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_policy_base.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_policy_base.h index 5cdaf9b9..d18f5084 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_policy_base.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_policy_base.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_policy_base.h $ -// $Id: GarlandHeckbert_policy_base.h 776cfd6 2022-03-31T23:24:20+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_policy_base.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/GarlandHeckbert_policy_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baskin Burak Senbaslar, @@ -22,7 +22,7 @@ #include -#include +#include namespace CGAL { namespace Surface_mesh_simplification { @@ -199,14 +199,14 @@ class GarlandHeckbert_cost_and_placement public: // Cost template - boost::optional + std::optional operator()(const Profile& profile, - const boost::optional& placement) const + const std::optional& placement) const { - typedef boost::optional Optional_FT; + typedef std::optional Optional_FT; if(!placement) - return boost::optional(); + return std::optional(); CGAL_precondition(!get(vcm(), profile.v0()).isZero(0)); CGAL_precondition(!get(vcm(), profile.v1()).isZero(0)); @@ -222,7 +222,7 @@ class GarlandHeckbert_cost_and_placement public: // Placement template - boost::optional operator()(const Profile& profile) const + std::optional operator()(const Profile& profile) const { CGAL_precondition(!get(vcm(), profile.v0()).isZero(0)); CGAL_precondition(!get(vcm(), profile.v1()).isZero(0)); @@ -236,7 +236,7 @@ class GarlandHeckbert_cost_and_placement const Col_4 opt = construct_optimum(combined_matrix, p0, p1); - boost::optional pt = typename Profile::Point(opt(0) / opt(3), + std::optional pt = typename Profile::Point(opt(0) / opt(3), opt(1) / opt(3), opt(2) / opt(3)); diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/LindstromTurk_params.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/LindstromTurk_params.h index bf933255..cac33b8c 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/LindstromTurk_params.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/LindstromTurk_params.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/LindstromTurk_params.h $ -// $Id: LindstromTurk_params.h ff09c5d 2019-10-25T16:35:53+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/LindstromTurk_params.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/LindstromTurk_params.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h index 2efbb17b..ff6681d9 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h $ -// $Id: Lindstrom_Turk_core.h bd60028 2021-01-08T10:20:34+01:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h $ +// $Id: include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -55,9 +55,9 @@ class LindstromTurkCore typedef typename Geom_traits::FT FT; typedef typename Geom_traits::Vector_3 Vector; - typedef boost::optional Optional_FT; - typedef boost::optional Optional_point; - typedef boost::optional Optional_vector; + typedef std::optional Optional_FT; + typedef std::optional Optional_point; + typedef std::optional Optional_vector; typedef MatrixC33 Matrix; @@ -119,9 +119,133 @@ private : const Geom_traits& geom_traits() const { return mProfile.geom_traits(); } const TM& surface() const { return mProfile.surface(); } +#if 0 + // a*b - c*d + // The next two functions are from https://stackoverflow.com/questions/63665010/accurate-floating-point-computation-of-the-sum-and-difference-of-two-products + static double diff_of_products_kahan(const double a, const double b, const double c, const double d) + { + double w = d * c; + double e = std::fma(c, -d, w); + double f = std::fma(a, b, -w); + return f + e; + } + + static double diff_of_products_cht(const double a, const double b, const double c, const double d) + { + double p1 = a * b; + double p2 = c * d; + double e1 = std::fma (a, b, -p1); + double e2 = std::fma (c, -d, p2); + double r = p1 - p2; + double e = e1 + e2; + return r + e; + } + + static double diff_of_products(const double a, const double b, const double c, const double d) + { + // the next two are equivalent in results and speed + return diff_of_products_kahan(a, b, c, d); + // return diff_of_products_cht(a, b, c, d); + } + + template + static OFT diff_of_products(const OFT& a, const OFT& b, const OFT& c, const OFT& d) + { + return a*b - c*d; + } +#endif + +#ifdef __AVX__ + static Vector SL_cross_product_avx(const Vector& A, const Vector& B) + { + const FT ax=A.x(), ay=A.y(), az=A.z(); + const FT bx=B.x(), by=B.y(), bz=B.z(); + + __m256d a = _mm256_set_pd(ay, az, ax, 1.0); + __m256d b = _mm256_set_pd(bz, bx, by, 1.0); + __m256d c = _mm256_set_pd(az, ax, ay, 1.0); + __m256d d = _mm256_set_pd(by, bz, bx, 1.0); + + __m256d s1 = _mm256_sub_pd(b, c); + __m256d s2 = _mm256_sub_pd(a, d); + + b = _mm256_mul_pd(a, s1); + d = _mm256_mul_pd(c, s2); + a = _mm256_add_pd(b, d); + + double res[4]; + _mm256_storeu_pd(res, a); + +// a * (b - c ) + c * ( a - d); +// FT x = ay * (bz - az) + az * (ay - by); +// FT y = az * (bx - ax) + ax * (az - bz); +// FT z = ax * (by - ay) + ay * (ax - bx); + + return Vector(res[3], res[2], res[1]); + } +#endif + + static Vector SL_cross_product(const Vector& a, const Vector& b) + { + const FT ax=a.x(), ay=a.y(), az=a.z(); + const FT bx=b.x(), by=b.y(), bz=b.z(); + + auto minor = [](double ai, double bi, double aj, double bj) + { + // The main idea is that we expect ai and bi (and aj and bj) to have roughly the same magnitude + // since this function is used to compute the cross product of two vectors that are defined + // as (ORIGIN, pa) and (ORIGIN, pb) and pa and pb are part of the same triangle. + // + // We can abuse this fact to trade 2 extra subtractions to lower the error. + return ai * (bj - aj) + aj * (ai - bi); + }; + + // ay* + FT x = minor(ay, by, az, bz); + FT y = minor(az, bz, ax, bx); + FT z = minor(ax, bx, ay, by); + + return Vector(x, y, z); + } + +#if 0 + static Vector exact_cross_product(const Vector& a, const Vector& b) + { + CGAL::Cartesian_converter to_exact; + CGAL::Cartesian_converter to_approx; + auto exv = cross_product(to_exact(a), to_exact(b)); + exv.exact(); + return to_approx(exv); + } +#endif + + static Vector X_product(const Vector& u, const Vector& v) + { +#if 0 + // this can create large errors and spiky meshes for kernels with inexact constructions + return CGAL::cross_product(u,v); +#elif 0 + // improves the problem mentioned above a bit, but not enough + return { std::fma(u.y(), v.z(), -u.z()*v.y()), + std::fma(u.z(), v.x(), -u.x()*v.z()), + std::fma(u.x(), v.y(), -u.y()*v.x()) }; +#elif 0 + // this is the best without resorting to exact, but it inflicts a 20% slowdown + return { diff_of_products(u.y(), v.z(), u.z(), v.y()), + diff_of_products(u.z(), v.x(), u.x(), v.z()), + diff_of_products(u.x(), v.y(), u.y(), v.x()) }; +#elif 1 + // balanced solution based on abusing the fact that here we expect u and v to have similar coordinates + return SL_cross_product(u, v); +#elif 0 + // obviously too slow + return exact_cross_product(u, v); +#endif + } + static Vector point_cross_product(const Point& a, const Point& b) { - return cross_product(a-ORIGIN, b-ORIGIN); + return X_product(a-ORIGIN, b-ORIGIN); } // This is the (uX)(Xu) product described in the Lindstrom-Turk paper @@ -152,7 +276,7 @@ private : static bool is_finite(const Matrix& m) { return is_finite(m.r0()) && is_finite(m.r1()) && is_finite(m.r2()); } template - static boost::optional filter_infinity(const T& n) { return is_finite(n) ? boost::optional(n) : boost::optional(); } + static std::optional filter_infinity(const T& n) { return is_finite(n) ? std::optional(n) : std::optional(); } private: @@ -264,7 +388,7 @@ compute_placement() // 'Ai' is a (row) vector and 'bi' a scalar. // // The vertex is completely determined with 3 such constraints, - // so is the solution to the folloing system: + // so is the solution to the following system: // // A.r0(). * v = b0 // A1 * v = b1 @@ -298,7 +422,7 @@ compute_placement() if(mConstraints_n == 3) { // If the matrix is singular it's inverse cannot be computed so an 'absent' value is returned. - boost::optional lOptional_Ai = inverse_matrix(mConstraints_A); + std::optional lOptional_Ai = inverse_matrix(mConstraints_A); if(lOptional_Ai) { const Matrix& lAi = *lOptional_Ai; diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/edge_collapse.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/edge_collapse.h index 51868f25..ffea9711 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/edge_collapse.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/edge_collapse.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h $ -// $Id: edge_collapse.h c169c41 2022-01-12T13:33:49+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h $ +// $Id: include/CGAL/Surface_mesh_simplification/edge_collapse.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/internal/Common.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/internal/Common.h index f9dcbca3..48e99c9c 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/internal/Common.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/internal/Common.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Common.h $ -// $Id: Common.h 8166579 2021-10-11T19:58:07+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Common.h $ +// $Id: include/CGAL/Surface_mesh_simplification/internal/Common.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include @@ -40,15 +40,15 @@ namespace internal { struct Dummy_filter { template inline - const boost::optional - operator()(const Profile&, const boost::optional& op) const + const std::optional + operator()(const Profile&, const std::optional& op) const { return op; } }; -} // namesapce internal +} // namespace internal template inline bool handle_assigned(Handle h) { Handle null; return h != null; } @@ -94,7 +94,7 @@ inline std::string matrix_to_string(const Matrix& m) { } template -inline std::string optional_to_string(const boost::optional& o) { +inline std::string optional_to_string(const std::optional& o) { if(o) return boost::str(boost::format("%1%") % *o); else return std::string("NONE"); diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/internal/Edge_collapse.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/internal/Edge_collapse.h index dd24d45a..0bdfa3d6 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/internal/Edge_collapse.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_simplification/internal/Edge_collapse.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Edge_collapse.h $ -// $Id: Edge_collapse.h 45193b1 2022-03-10T10:50:06+05:30 G Yuvan Shankar +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Edge_collapse.h $ +// $Id: include/CGAL/Surface_mesh_simplification/internal/Edge_collapse.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -127,8 +127,8 @@ class EdgeCollapse typedef typename Geom_traits::Vector_3 Vector; typedef typename Geom_traits::Equal_3 Equal_3; - typedef boost::optional Cost_type; - typedef boost::optional Placement_type; + typedef std::optional Cost_type; + typedef std::optional Placement_type; struct Compare_id { @@ -149,9 +149,9 @@ class EdgeCollapse bool operator()(const halfedge_descriptor a, const halfedge_descriptor b) const { - // NOTE: A cost is a boost::optional<> value. + // NOTE: A cost is a std::optional<> value. // Absent optionals are ordered first; that is, "none < T" and "T > none" for any defined T != none. - // In consequence, edges with undefined costs will be promoted to the top of the priority queue and poped out first. + // In consequence, edges with undefined costs will be promoted to the top of the priority queue and popped out first. return m_algorithm->get_data(a).cost() < m_algorithm->get_data(b).cost(); } @@ -179,7 +179,7 @@ class EdgeCollapse : CGAL_BOOST_PENDING_MUTABLE_QUEUE; typedef Modifiable_priority_queue PQ; - // An Edge_data is associated with EVERY _ edge in the mesh (collapsable or not). + // An Edge_data is associated with EVERY _ edge in the mesh (collapsible or not). // It contains the edge status wrt the priority queue // It also relates the edge with a policy-based cache struct Edge_data @@ -333,9 +333,9 @@ class EdgeCollapse CGAL_expensive_assertion(!mPQ->contains(h)); } - boost::optional pop_from_PQ() + std::optional pop_from_PQ() { - boost::optional opt_h = mPQ->extract_top(); + std::optional opt_h = mPQ->extract_top(); if(opt_h) { CGAL_assertion(is_primary_edge(*opt_h)); @@ -499,7 +499,7 @@ collect() if(is_constrained(h)) { CGAL_assertion_code(++num_not_inserted); - continue; // no not insert constrainted edges + continue; // no not insert constrained edges } const Profile profile = create_profile(h); @@ -592,7 +592,7 @@ loop() // Pops and processes each edge from the PQ - boost::optional opt_h; + std::optional opt_h; #ifdef CGAL_SURF_SIMPL_INTERMEDIATE_STEPS_PRINTING int i_rm = 0; @@ -630,7 +630,7 @@ loop() std::cout << "step " << i_rm << " " << get(m_vpm, source(*h, m_tm)) << " " << get(m_vpm, target(*h, m_tm)) << "\n"; #endif - if(m_should_ignore(profile, placement)!= boost::none){ + if(m_should_ignore(profile, placement)!= std::nullopt){ collapse(profile, placement); } else @@ -639,7 +639,7 @@ loop() m_visitor.OnNonCollapsable(profile); - CGAL_SMS_TRACE(1, edge_to_string(*opt_h) << " NOT Collapsable" ); + CGAL_SMS_TRACE(1, edge_to_string(*opt_h) << " NOT Collapsible" ); } #ifdef CGAL_SURF_SIMPL_INTERMEDIATE_STEPS_PRINTING @@ -660,7 +660,7 @@ loop() m_visitor.OnNonCollapsable(profile); - CGAL_SMS_TRACE(1, edge_to_string(*opt_h) << " NOT Collapsable" ); + CGAL_SMS_TRACE(1, edge_to_string(*opt_h) << " NOT Collapsible" ); } } else @@ -696,8 +696,8 @@ is_constrained(const vertex_descriptor v) const return false; } -// Some edges are NOT collapsable: doing so would break the topological consistency of the mesh. -// This function returns true if a edge 'p->q' can be collapsed. +// Some edges are NOT collapsible: doing so would break the topological consistency of the mesh. +// This function returns true if an edge 'p->q' can be collapsed. // // An edge p->q can be collapsed iff it satisfies the "link condition" // (as described in the "Mesh Optimization" article of Hoppe et al (1993)) @@ -1183,7 +1183,7 @@ collapse(const Profile& profile, << "(V" << get(m_vim, profile.v0()) << "->V" << get(m_vim, profile.v1()) << ")"); - // Perform the actuall collapse. + // Perform the actual collapse. // This is an external function. // It's REQUIRED to remove ONLY 1 vertex (P or Q) and edges PQ, PT and QB // (PT and QB are removed if they are not null). diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_skeletonization/internal/Curve_skeleton.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_skeletonization/internal/Curve_skeleton.h index ff1cc7af..0794b71b 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_skeletonization/internal/Curve_skeleton.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_skeletonization/internal/Curve_skeleton.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_skeletonization/include/CGAL/Surface_mesh_skeletonization/internal/Curve_skeleton.h $ -// $Id: Curve_skeleton.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_skeletonization/include/CGAL/Surface_mesh_skeletonization/internal/Curve_skeleton.h $ +// $Id: include/CGAL/Surface_mesh_skeletonization/internal/Curve_skeleton.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Xiang Gao @@ -214,16 +214,16 @@ class Curve_skeleton MCFSKEL_DEBUG( std::cerr <<"init" << std::endl; ) int nb_edges = static_cast(num_edges(hg)); - int num_faces = static_cast(hg.size_of_facets()); + int nb_faces = static_cast(num_faces(hg)); int nb_vertices = static_cast(num_vertices(hg)); edge_to_face.resize(nb_edges); edge_to_vertex.resize(nb_edges); vertex_to_edge.resize(nb_vertices); - face_to_edge.resize(num_faces); + face_to_edge.resize(nb_faces); is_vertex_deleted.resize(nb_vertices, false); is_edge_deleted.resize(nb_edges, false); - is_face_deleted.resize(num_faces, false); + is_face_deleted.resize(nb_faces, false); record.resize(nb_vertices); for (size_t i = 0; i < record.size(); ++i) diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_skeletonization/internal/Debug.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_skeletonization/internal/Debug.h index 7f081a92..7d6342d2 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_skeletonization/internal/Debug.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_skeletonization/internal/Debug.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_skeletonization/include/CGAL/Surface_mesh_skeletonization/internal/Debug.h $ -// $Id: Debug.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_skeletonization/include/CGAL/Surface_mesh_skeletonization/internal/Debug.h $ +// $Id: include/CGAL/Surface_mesh_skeletonization/internal/Debug.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Xiang Gao diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_skeletonization/internal/Detect_degeneracy.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_skeletonization/internal/Detect_degeneracy.h index d4bbb2cb..24e0ca8e 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_skeletonization/internal/Detect_degeneracy.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_skeletonization/internal/Detect_degeneracy.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_skeletonization/include/CGAL/Surface_mesh_skeletonization/internal/Detect_degeneracy.h $ -// $Id: Detect_degeneracy.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_skeletonization/include/CGAL/Surface_mesh_skeletonization/internal/Detect_degeneracy.h $ +// $Id: include/CGAL/Surface_mesh_skeletonization/internal/Detect_degeneracy.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Xiang Gao diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Edge_weight_functor.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Edge_weight_functor.h index 9a1718fe..810042b4 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Edge_weight_functor.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Edge_weight_functor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Edge_weight_functor.h $ -// $Id: Edge_weight_functor.h 19d7e19 2020-04-06T09:13:47+02:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Edge_weight_functor.h $ +// $Id: include/CGAL/Surface_mesh_topology/internal/Edge_weight_functor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Thien Hoang @@ -33,12 +33,12 @@ template struct Euclidean_length_weight_functor { using Weight_t=double; - using Dart_const_handle=typename Get_map::type::Dart_const_handle; + using Dart_const_descriptor=typename Get_map::type::Dart_const_descriptor; Euclidean_length_weight_functor(const Mesh& m) : m_mesh(m), m_map(m) {} - Weight_t operator() (Dart_const_handle dh) const + Weight_t operator() (Dart_const_descriptor dh) const { return CGAL::sqrt(CGAL::squared_distance (Get_traits::get_point(m_mesh, dh), diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Facewidth.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Facewidth.h index 73baa0ba..284e2695 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Facewidth.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Facewidth.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Facewidth.h $ -// $Id: Facewidth.h a09b8b1 2020-04-21T08:49:10+02:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Facewidth.h $ +// $Id: include/CGAL/Surface_mesh_topology/internal/Facewidth.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Thien Hoang @@ -31,11 +31,11 @@ class Facewidth using Mesh=Mesh_; using Original_map_wrapper=internal::Generic_map_selector; - using Original_dart_const_handle=typename Original_map_wrapper::Dart_const_handle_original; + using Original_dart_const_descriptor=typename Original_map_wrapper::Dart_const_descriptor_original; using Local_map =typename Original_map_wrapper::Generic_map; - using Dart_handle =typename Local_map::Dart_handle; - using Dart_const_handle=typename Local_map::Dart_const_handle; + using Dart_descriptor =typename Local_map::Dart_descriptor; + using Dart_const_descriptor=typename Local_map::Dart_const_descriptor; using size_type = typename Local_map::size_type; using Path = CGAL::Surface_mesh_topology::Path_on_surface; @@ -73,7 +73,7 @@ class Facewidth m_radial_map.is_marked(it, original_darts)) { m_radial_map.template mark_cell<2>(it, face_treated); - Dart_handle new_vertex=m_radial_map.insert_cell_0_in_cell_2(it); + Dart_descriptor new_vertex=m_radial_map.insert_cell_0_in_cell_2(it); for (auto itv=m_radial_map.template darts_of_cell_basic<0>(new_vertex, m_mark_new_vertex).begin(), itvend=m_radial_map.template darts_of_cell_basic<0>(new_vertex, m_mark_new_vertex).end(); itv!=itvend; ++itv) @@ -112,7 +112,7 @@ class Facewidth } } - std::vector compute_face_width(bool display_time=false) + std::vector compute_face_width(bool display_time=false) { CGAL::Timer t; if (display_time) @@ -122,11 +122,11 @@ class Facewidth Path_on_surface edgewidth_of_radial_map= m_snc_to_find_facewidth->compute_edge_width(); - std::vector cycle; + std::vector cycle; cycle.reserve(edgewidth_of_radial_map.length()); for (std::size_t i=0, n=edgewidth_of_radial_map.length(); i(*edgewidth_of_radial_map.get_ith_real_dart(i))); if (!m_radial_map.is_marked(dh, m_mark_new_vertex)) { cycle.push_back(m_radial_to_original[dh]); } diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h index c613ec40..12f7cfde 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h $ -// $Id: Functors_for_face_graph_wrapper.h 3fb644e 2020-04-10T17:40:30+02:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h $ +// $Id: include/CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -20,7 +20,7 @@ //////////////////////////////////////////////////////////////////////////////// /** This file contains the following functors for Face_graph_wrapper: * Get_beta:: - operator() (const HEG& heg, Dart_const_handle dh) + operator() (const HEG& heg, Dart_const_descriptor dh) * Index_from_halfedge_descriptor::run(m, h) * Halfedge_descriptor_from_index::run(m, i) * Is_index_used::run(m, i) @@ -37,9 +37,9 @@ namespace internal { template struct Get_beta { - typedef typename boost::graph_traits::halfedge_descriptor Dart_const_handle; + typedef typename boost::graph_traits::halfedge_descriptor Dart_const_descriptor; - static Dart_const_handle value(const HEG& /*heg*/, Dart_const_handle /*dh*/) + static Dart_const_descriptor value(const HEG& /*heg*/, Dart_const_descriptor /*dh*/) { std::cout<<"ERROR Get_beta"< struct Get_beta { - typedef typename boost::graph_traits::halfedge_descriptor Dart_const_handle; - static Dart_const_handle value(const HEG& heg, Dart_const_handle dh) + typedef typename boost::graph_traits::halfedge_descriptor Dart_const_descriptor; + static Dart_const_descriptor value(const HEG& heg, Dart_const_descriptor dh) { return prev(dh, heg); } }; template struct Get_beta { - typedef typename boost::graph_traits::halfedge_descriptor Dart_const_handle; - static Dart_const_handle value(const HEG& heg, Dart_const_handle dh) + typedef typename boost::graph_traits::halfedge_descriptor Dart_const_descriptor; + static Dart_const_descriptor value(const HEG& heg, Dart_const_descriptor dh) { return next(dh, heg); } }; template struct Get_beta { - typedef typename boost::graph_traits::halfedge_descriptor Dart_const_handle; - static Dart_const_handle value(const HEG& heg, Dart_const_handle dh) + typedef typename boost::graph_traits::halfedge_descriptor Dart_const_descriptor; + static Dart_const_descriptor value(const HEG& heg, Dart_const_descriptor dh) { return opposite(dh, heg); } }; //////////////////////////////////////////////////////////////////////////////// template struct Index_from_halfedge_descriptor { - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; typedef typename boost::template graph_traits::halfedge_descriptor halfedge_descriptor; @@ -88,7 +88,7 @@ template struct Index_from_halfedge_descriptor > { using Mesh=CGAL::Surface_mesh

    ; - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; typedef typename boost::template graph_traits::halfedge_descriptor halfedge_descriptor; @@ -99,7 +99,7 @@ struct Index_from_halfedge_descriptor > template struct Halfedge_descriptor_from_index { - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; typedef typename boost::template graph_traits::halfedge_descriptor halfedge_descriptor; @@ -115,7 +115,7 @@ template struct Halfedge_descriptor_from_index > { using Mesh=CGAL::Surface_mesh

    ; - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; typedef typename boost::template graph_traits::halfedge_descriptor halfedge_descriptor; @@ -126,7 +126,7 @@ struct Halfedge_descriptor_from_index > template struct Is_index_used { - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; static bool run(const Mesh& m, size_type i) { return i struct Is_index_used > { using Mesh=CGAL::Surface_mesh

    ; - typedef boost::uint32_t size_type; + typedef std::uint32_t size_type; static bool run(const Mesh& m, size_type i) { return i<(m.number_of_halfedges()+m.number_of_removed_halfedges()) && diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Generic_map_selector.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Generic_map_selector.h index ccf60848..fd2aa76b 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Generic_map_selector.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Generic_map_selector.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Generic_map_selector.h $ -// $Id: Generic_map_selector.h faadbaa 2022-02-09T09:37:41+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Generic_map_selector.h $ +// $Id: include/CGAL/Surface_mesh_topology/internal/Generic_map_selector.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Thien Hoang @@ -43,11 +43,11 @@ namespace internal { { using Mesh_original = Mesh_; using Generic_map = CGAL::Generalized_map<2, Items_>; - using Dart_const_handle_original = typename Mesh_original::Dart_const_handle; - using Copy_to_origin_map = std::unordered_map; - using Origin_to_copy_map = std::unordered_map; + using Dart_const_descriptor_original = typename Mesh_original::Dart_const_descriptor; + using Copy_to_origin_map = std::unordered_map; + using Origin_to_copy_map = std::unordered_map; static void copy(Generic_map& target, const Mesh_original& source, Origin_to_copy_map& origin_to_copy, @@ -63,11 +63,11 @@ namespace internal { { using Mesh_original = Mesh_; using Generic_map = CGAL::Combinatorial_map<2, Items_>; - using Dart_const_handle_original = typename Mesh_original::Dart_const_handle; - using Copy_to_origin_map = std::unordered_map; - using Origin_to_copy_map = std::unordered_map; + using Dart_const_descriptor_original = typename Mesh_original::Dart_const_descriptor; + using Copy_to_origin_map = std::unordered_map; + using Origin_to_copy_map = std::unordered_map; static void copy(Generic_map& target, const Mesh_original& source, Origin_to_copy_map& origin_to_copy, Copy_to_origin_map& copy_to_origin, @@ -82,11 +82,11 @@ namespace internal { { using Mesh_original = Mesh_; using Generic_map = CGAL::Combinatorial_map<2, Items_>; - using Dart_const_handle_original = typename boost::graph_traits::halfedge_descriptor; - using Copy_to_origin_map = std::unordered_map; - using Origin_to_copy_map = std::unordered_map; + using Dart_const_descriptor_original = typename boost::graph_traits::halfedge_descriptor; + using Copy_to_origin_map = std::unordered_map; + using Origin_to_copy_map = std::unordered_map; static void copy(Generic_map& target, const Mesh_original& source, Origin_to_copy_map& origin_to_copy, Copy_to_origin_map& copy_to_origin, diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Iterators_for_face_graph_wrapper.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Iterators_for_face_graph_wrapper.h index 139045fa..3631692b 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Iterators_for_face_graph_wrapper.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Iterators_for_face_graph_wrapper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Iterators_for_face_graph_wrapper.h $ -// $Id: Iterators_for_face_graph_wrapper.h 1de5666 2020-04-20T14:39:05+02:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Iterators_for_face_graph_wrapper.h $ +// $Id: include/CGAL/Surface_mesh_topology/internal/Iterators_for_face_graph_wrapper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -33,7 +33,7 @@ namespace internal { typedef FGW_dart_iterator_basic_of_all Self; typedef Map_ Map; - typedef typename Map::Dart_handle Dart_handle; + typedef typename Map::Dart_descriptor Dart_descriptor; typedef typename Map::size_type size_type; public: @@ -44,7 +44,7 @@ namespace internal { {} /// Constructor with a dart in parameter (for end iterator). - FGW_dart_iterator_basic_of_all(const Map& amap, Dart_handle /*adart*/): + FGW_dart_iterator_basic_of_all(const Map& amap, Dart_descriptor /*adart*/): mmap(amap), m_it(halfedges(amap.get_fg()).end()) {} @@ -61,7 +61,7 @@ namespace internal { return *this; } - operator Dart_handle() const + operator Dart_descriptor() const { return operator*(); } bool operator==(const Self& other) const @@ -95,7 +95,7 @@ namespace internal { { Self res=*this; operator --(); return res; } - Dart_handle operator*() const + Dart_descriptor operator*() const { CGAL_assertion(m_it!=halfedges(this->mmap.get_fg()).end()); return *m_it; @@ -113,22 +113,22 @@ namespace internal { public: typedef FGW_basis_for_cell_iterator Self; typedef Map_ Map; - typedef typename Map::Dart_handle Dart_handle; + typedef typename Map::Dart_descriptor Dart_descriptor; typedef typename Map::size_type size_type; /// Main constructor. - FGW_basis_for_cell_iterator(const Map& amap, Dart_handle adart): + FGW_basis_for_cell_iterator(const Map& amap, Dart_descriptor adart): mmap(amap), m_firstdart(adart), m_curdart(adart) {} /// Constructor with two darts in parameter (for end iterator). - FGW_basis_for_cell_iterator(const Map& amap, Dart_handle adart, - Dart_handle /* d2 */): + FGW_basis_for_cell_iterator(const Map& amap, Dart_descriptor adart, + Dart_descriptor /* d2 */): mmap(amap), m_firstdart(adart), - m_curdart(Dart_handle()) + m_curdart(Dart_descriptor()) {} bool operator==(const Self& other) const @@ -138,18 +138,18 @@ namespace internal { bool operator!=(const Self& other) const { return !(this->operator==(other)); } - operator Dart_handle() const + operator Dart_descriptor() const { return operator*(); } - Dart_handle operator*() const + Dart_descriptor operator*() const { - CGAL_assertion(m_curdart!=Dart_handle()); + CGAL_assertion(m_curdart!=Dart_descriptor()); return m_curdart; } protected: const Map& mmap; - Dart_handle m_firstdart, m_curdart; + Dart_descriptor m_firstdart, m_curdart; }; //////////////////////////////////////////////////////////////////////////////// template @@ -164,16 +164,16 @@ namespace internal { typedef FGW_cell_iterator Self; typedef FGW_basis_for_cell_iterator Base; typedef Map_ Map; - typedef typename Map::Dart_handle Dart_handle; + typedef typename Map::Dart_descriptor Dart_descriptor; typedef typename Map::size_type size_type; - FGW_cell_iterator(const Map& amap, Dart_handle adart) : Base(amap, adart), + FGW_cell_iterator(const Map& amap, Dart_descriptor adart) : Base(amap, adart), m_second_way(false) {} /// Constructor with two darts in parameter (for end iterator). - FGW_cell_iterator(const Map& amap, Dart_handle adart, - Dart_handle d2): Base(amap, adart, d2) + FGW_cell_iterator(const Map& amap, Dart_descriptor adart, + Dart_descriptor d2): Base(amap, adart, d2) {} /// Prefix ++ operator. @@ -186,21 +186,21 @@ namespace internal { m_second_way=true; this->m_curdart=this->mmap.template beta<0>(this->m_firstdart); if (this->mmap.template is_free<2>(this->m_curdart)) - { this->m_curdart=Dart_handle(); } + { this->m_curdart=Dart_descriptor(); } else { this->m_curdart=this->mmap.template beta<2>(this->m_curdart); } } else { this->m_curdart=this->mmap.template beta<2, 1>(this->m_curdart); if (this->m_curdart==this->m_firstdart) - { this->m_curdart=Dart_handle(); } + { this->m_curdart=Dart_descriptor(); } } } else { this->m_curdart=this->mmap.template beta<0>(this->m_curdart); if (this->mmap.template is_free<2>(this->m_curdart)) - { this->m_curdart=Dart_handle(); } + { this->m_curdart=Dart_descriptor(); } else { this->m_curdart=this->mmap.template beta<2>(this->m_curdart); } } @@ -222,15 +222,15 @@ class FGW_cell_iterator: public FGW_basis_for_cell_iterator // E typedef FGW_cell_iterator Self; typedef FGW_basis_for_cell_iterator Base; typedef Map_ Map; - typedef typename Map::Dart_handle Dart_handle; + typedef typename Map::Dart_descriptor Dart_descriptor; typedef typename Map::size_type size_type; - FGW_cell_iterator(const Map& amap, Dart_handle adart) : Base(amap, adart) + FGW_cell_iterator(const Map& amap, Dart_descriptor adart) : Base(amap, adart) {} /// Constructor with two darts in parameter (for end iterator). - FGW_cell_iterator(const Map& amap, Dart_handle adart, - Dart_handle d2): Base(amap, adart, d2) + FGW_cell_iterator(const Map& amap, Dart_descriptor adart, + Dart_descriptor d2): Base(amap, adart, d2) {} /// Prefix ++ operator. @@ -239,11 +239,11 @@ class FGW_cell_iterator: public FGW_basis_for_cell_iterator // E if (this->m_curdart==this->m_firstdart) { if (this->mmap.template is_free<2>(this->m_curdart)) - { this->m_curdart=Dart_handle(); } + { this->m_curdart=Dart_descriptor(); } else { this->m_curdart=this->mmap.template beta<2>(this->m_curdart); } } else - { this->m_curdart=Dart_handle(); } + { this->m_curdart=Dart_descriptor(); } return *this; } @@ -259,15 +259,15 @@ class FGW_cell_iterator: public FGW_basis_for_cell_iterator // Fa typedef FGW_cell_iterator Self; typedef FGW_basis_for_cell_iterator Base; typedef Map_ Map; - typedef typename Map::Dart_handle Dart_handle; + typedef typename Map::Dart_descriptor Dart_descriptor; typedef typename Map::size_type size_type; - FGW_cell_iterator(const Map& amap, Dart_handle adart) : Base(amap, adart) + FGW_cell_iterator(const Map& amap, Dart_descriptor adart) : Base(amap, adart) {} /// Constructor with two darts in parameter (for end iterator). - FGW_cell_iterator(const Map& amap, Dart_handle adart, - Dart_handle d2): Base(amap, adart, d2) + FGW_cell_iterator(const Map& amap, Dart_descriptor adart, + Dart_descriptor d2): Base(amap, adart, d2) {} /// Prefix ++ operator. @@ -275,7 +275,7 @@ class FGW_cell_iterator: public FGW_basis_for_cell_iterator // Fa { this->m_curdart=this->mmap.template beta<1>(this->m_curdart); if (this->m_curdart==this->m_firstdart) - { this->m_curdart=Dart_handle(); } + { this->m_curdart=Dart_descriptor(); } return *this; } @@ -291,15 +291,15 @@ class FGW_cell_iterator: public FGW_basis_for_cell_iterator // CC typedef FGW_cell_iterator Self; typedef FGW_basis_for_cell_iterator Base; typedef Map_ Map; - typedef typename Map::Dart_handle Dart_handle; + typedef typename Map::Dart_descriptor Dart_descriptor; typedef typename Map::size_type size_type; - FGW_cell_iterator(const Map& amap, Dart_handle adart) : Base(amap, adart) + FGW_cell_iterator(const Map& amap, Dart_descriptor adart) : Base(amap, adart) { m_mark=this->mmap.get_new_mark(); } /// Constructor with two darts in parameter (for end iterator). - FGW_cell_iterator(const Map& amap, Dart_handle adart, - Dart_handle d2): Base(amap, adart, d2) + FGW_cell_iterator(const Map& amap, Dart_descriptor adart, + Dart_descriptor d2): Base(amap, adart, d2) { m_mark=this->mmap.get_new_mark(); } ~FGW_cell_iterator() @@ -321,7 +321,7 @@ class FGW_cell_iterator: public FGW_basis_for_cell_iterator // CC } if (m_to_treat.empty()) - { this->m_curdart=Dart_handle(); } + { this->m_curdart=Dart_descriptor(); } else { this->m_curdart=m_to_treat.top(); m_to_treat.pop(); } @@ -334,7 +334,7 @@ class FGW_cell_iterator: public FGW_basis_for_cell_iterator // CC protected: typename Map_::size_type m_mark; - std::stack m_to_treat; + std::stack m_to_treat; }; //////////////////////////////////////////////////////////////////////////////// diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Minimal_quadrangulation.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Minimal_quadrangulation.h index 1f2e0426..23ff1a02 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Minimal_quadrangulation.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Minimal_quadrangulation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Minimal_quadrangulation.h $ -// $Id: Minimal_quadrangulation.h c5c6098 2022-01-27T11:02:17+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Minimal_quadrangulation.h $ +// $Id: include/CGAL/Surface_mesh_topology/internal/Minimal_quadrangulation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -106,26 +106,26 @@ class Minimal_quadrangulation typedef Mesh_ Mesh; typedef typename Get_map::type Original_map; // Mesh seen as a 2-map - typedef typename Original_map::Dart_const_handle Original_dart_const_handle; + typedef typename Original_map::Dart_const_descriptor Original_dart_const_descriptor; typedef typename Original_map::size_type Original_size_type; typedef CGAL::Combinatorial_map<2, Minimal_quadrangulation_local_map_items> Local_map; - typedef typename Local_map::Dart_handle Dart_handle; - typedef typename Local_map::Dart_const_handle Dart_const_handle; + typedef typename Local_map::Dart_descriptor Dart_descriptor; + typedef typename Local_map::Dart_const_descriptor Dart_const_descriptor; typedef typename Local_map::size_type size_type; // Associate each dart of the original map, not removed, a pair of darts in // the reduced map. - typedef std::unordered_map > TPaths; + typedef std::unordered_map > TPaths; // Associations between original darts and their copy. // Use only locally during the construction of the minimal quadrangulation. - typedef std::unordered_map Origin_to_copy; - typedef std::unordered_map Copy_to_origin; + typedef std::unordered_map Origin_to_copy; + typedef std::unordered_map Copy_to_origin; #ifdef CGAL_PWRLE_TURN_V2 - typedef std::unordered_map TDartIds; + typedef std::unordered_map TDartIds; #endif //CGAL_PWRLE_TURN_V2 /// @return the original map @@ -241,7 +241,7 @@ class Minimal_quadrangulation std::cout<<"Paths are all valid ? "<<(are_paths_valid()?"YES":"NO") <::max)(); } - Dart_const_handle ddh1=dh1; + Dart_const_descriptor ddh1=dh1; std::size_t res=1; while (get_local_map().template beta<1>(ddh1)!=dh2) { @@ -493,8 +493,8 @@ class Minimal_quadrangulation /// @return the negative turn between the two given darts. /// i.e. turning right if the face bounded by a dart lays on its left /// and left otherwise - std::size_t negative_turn(Dart_const_handle dh1, - Dart_const_handle dh2) const + std::size_t negative_turn(Dart_const_descriptor dh1, + Dart_const_descriptor dh2) const { #if defined(CGAL_PWRLE_TURN_V2) || defined(CGAL_PWRLE_TURN_V3) return compute_negative_turn_given_ids @@ -514,7 +514,7 @@ class Minimal_quadrangulation dh1=get_local_map().template beta<2>(dh1); dh2=get_local_map().template beta<2>(dh2); - Dart_const_handle ddh1=dh1; + Dart_const_descriptor ddh1=dh1; std::size_t res=1; while (get_local_map().template beta<0>(ddh1)!=dh2) { @@ -613,7 +613,7 @@ class Minimal_quadrangulation protected: /// @return true iff the dart dh is contracted, i.e. if it belongs to T - bool is_contracted(Original_dart_const_handle dh) const + bool is_contracted(Original_dart_const_descriptor dh) const { return get_original_map().is_marked(dh, m_mark_T); } void count_edges_of_path_on_torus @@ -622,8 +622,8 @@ class Minimal_quadrangulation { CGAL_assertion(local_map_is_a_torus()); - Dart_const_handle dha=get_local_map().darts().begin(); - Dart_const_handle dhb=get_local_map().template beta<1>(dha); + Dart_const_descriptor dha=get_local_map().darts().begin(); + Dart_const_descriptor dhb=get_local_map().template beta<1>(dha); a=0; b=0; for (std::size_t i=0; i res(get_local_map()); if (path.is_empty()) return res; - Dart_const_handle cur; + Dart_const_descriptor cur; for (std::size_t i=0; i(adart), amark); @@ -727,7 +727,7 @@ class Minimal_quadrangulation /// copy) from the associative array copy_to_origin, and erase the /// corresponding edge (which belongs to the map get_original_map()) from the /// array origin_to_copy - void erase_edge_from_associative_arrays(Dart_handle adart, + void erase_edge_from_associative_arrays(Dart_descriptor adart, Origin_to_copy& origin_to_copy, Copy_to_origin & copy_to_origin) { @@ -742,10 +742,10 @@ class Minimal_quadrangulation copy_to_origin.erase(adart); } - Original_dart_const_handle prev_in_boundary(Original_dart_const_handle d) + Original_dart_const_descriptor prev_in_boundary(Original_dart_const_descriptor d) { CGAL_assertion(get_original_map().template is_free<2>(d)); - Original_dart_const_handle res=get_original_map().template beta<0>(d); + Original_dart_const_descriptor res=get_original_map().template beta<0>(d); while(!get_original_map().template is_free<2>(res)) { res=get_original_map().template beta<2, 0>(res); } return res; @@ -758,9 +758,9 @@ class Minimal_quadrangulation /// Marks all darts belonging to T using a BFS void compute_T() { - Original_dart_const_handle dh; + Original_dart_const_descriptor dh; auto grey=get_original_map().get_new_mark(); - std::queue queue; + std::queue queue; get_original_map().template mark_cell<0> (get_original_map().darts().begin(), grey); queue.push(get_original_map().darts().begin()); @@ -798,7 +798,7 @@ class Minimal_quadrangulation m_paths.clear(); compute_T(); - Dart_handle d1, d2; + Dart_descriptor d1, d2; for (typename Original_map::Dart_range::const_iterator it=get_original_map().darts().begin(), itend=get_original_map().darts().end(); it!=itend; ++it) @@ -819,7 +819,7 @@ class Minimal_quadrangulation m_paths[it]=std::make_pair(d1, nullptr); // Initialize m_paths } - else if (Original_dart_const_handle(it)< + else if (Original_dart_const_descriptor(it)< get_original_map().template beta<2>(it)) { d1=get_local_map().create_dart(); @@ -843,7 +843,7 @@ class Minimal_quadrangulation } /// Now we only need to do the basic_link_beta_1 - Original_dart_const_handle dd1; + Original_dart_const_descriptor dd1; for (typename Original_map::Dart_range::const_iterator it=get_original_map().darts().begin(), itend=get_original_map().darts().end(); it!=itend; ++it) @@ -876,10 +876,10 @@ class Minimal_quadrangulation /// Marks all darts belonging to L using a BFS void compute_L(size_type toremove, Copy_to_origin& copy_to_origin) { - Dart_handle dh; - Dart_handle ddh; + Dart_descriptor dh; + Dart_descriptor ddh; auto grey=get_local_map().get_new_mark(); - std::queue queue; + std::queue queue; for (auto it=get_local_map().darts().begin(), itend=get_local_map().darts().end(); it!=itend; ++it) @@ -929,8 +929,8 @@ class Minimal_quadrangulation Copy_to_origin& copy_to_origin) { // std::cout<<"************************************************"<& p=itp->second; + std::pair& p=itp->second; if (p.second!=nullptr) { // Edge between two real faces, removed during the quadrangulation CGAL_assertion(!get_local_map().is_marked(p.first, m_mark_perforated)); @@ -1216,7 +1216,7 @@ class Minimal_quadrangulation { int deg; bool hole_detected; - Dart_handle dh; + Dart_descriptor dh; for (auto it=get_local_map().darts().begin(), itend=get_local_map().darts().end(); it!=itend; ++it) { @@ -1250,7 +1250,7 @@ class Minimal_quadrangulation void initialize_ids() { std::size_t id; - Dart_handle dh, ddh; + Dart_descriptor dh, ddh; auto treated=get_local_map().get_new_mark(); for (auto it=get_local_map().darts().begin(), @@ -1311,7 +1311,7 @@ class Minimal_quadrangulation get_local_map().free_mark(treated); } - std::size_t get_dart_id(Dart_const_handle dh) const + std::size_t get_dart_id(Dart_const_descriptor dh) const { #ifdef CGAL_PWRLE_TURN_V2 return m_dart_ids.at(dh); @@ -1323,9 +1323,9 @@ class Minimal_quadrangulation return (std::numeric_limits::max)(); } - /// @return the positive turn given two darts using their ids (unsed for CGAL_PWRLE_TURN_V2 and V3) - std::size_t compute_positive_turn_given_ids(Dart_const_handle dh1, - Dart_const_handle dh2) const + /// @return the positive turn given two darts using their ids (unused for CGAL_PWRLE_TURN_V2 and V3) + std::size_t compute_positive_turn_given_ids(Dart_const_descriptor dh1, + Dart_const_descriptor dh2) const { if (get_local_map().template info<0>(dh1)<0) {// there is no hole around dh1 and dh2 @@ -1333,7 +1333,7 @@ class Minimal_quadrangulation { return get_dart_id(dh2)-get_dart_id(dh1); } - // here we have to add the degree (i.e. substract the vertex info) + // here we have to add the degree (i.e. subtract the vertex info) return get_dart_id(dh2)-get_local_map().template info<0>(dh1)-get_dart_id(dh1); } // here we know there is a hole just before the dart 0 (plus maybe other ones) @@ -1346,9 +1346,9 @@ class Minimal_quadrangulation return get_dart_id(dh2)-get_dart_id(dh1); } - /// @return the negative turn given two darts using their ids (unsed for CGAL_PWRLE_TURN_V2 and V3) - std::size_t compute_negative_turn_given_ids(Dart_const_handle dh1, - Dart_const_handle dh2) const + /// @return the negative turn given two darts using their ids (unused for CGAL_PWRLE_TURN_V2 and V3) + std::size_t compute_negative_turn_given_ids(Dart_const_descriptor dh1, + Dart_const_descriptor dh2) const { if (get_local_map().template info<0>(dh1)<0) {// there is no hole around dh1 and dh2 @@ -1356,7 +1356,7 @@ class Minimal_quadrangulation { return get_dart_id(dh1)-get_dart_id(dh2); } - // here we have to add the degree (i.e. substract the vertex info) + // here we have to add the degree (i.e. subtract the vertex info) return get_dart_id(dh1)-get_local_map().template info<0>(dh1)-get_dart_id(dh2); } // here we know there is a hole just before the dart 0 (plus maybe other ones) @@ -1373,7 +1373,7 @@ class Minimal_quadrangulation /// @return true iff the edge containing adart is associated with a path. /// (used for debug purpose because we are suppose to be able to /// test this by using directly the mark m_mark_T). - bool is_edge_has_path(Original_dart_const_handle adart) const + bool is_edge_has_path(Original_dart_const_descriptor adart) const { if (get_original_map().template is_free<2>(adart) || adart(adart)) @@ -1382,8 +1382,8 @@ class Minimal_quadrangulation } /// @return true iff the edge containing adart is associated with a path - /// of only 1 dart (case of an edge bewteen two perforated faces) - bool edge_path_has_only_one_dart(Original_dart_const_handle adart) const + /// of only 1 dart (case of an edge between two perforated faces) + bool edge_path_has_only_one_dart(Original_dart_const_descriptor adart) const { return (get_original_map().is_perforated(adart) && @@ -1395,8 +1395,8 @@ class Minimal_quadrangulation /// @return the pair of darts associated with the edge containing adart /// in get_original_map(). /// @pre the edge containing adart must not belong to T. - std::pair& get_pair_of_darts - (Original_dart_const_handle adart) + std::pair& get_pair_of_darts + (Original_dart_const_descriptor adart) { CGAL_assertion(!is_contracted(adart)); CGAL_assertion(is_edge_has_path(adart)); @@ -1414,7 +1414,7 @@ class Minimal_quadrangulation * There is a special case for an edge between two perforated faces. In this * case there is only one dart in the path. */ - Dart_const_handle get_first_dart_of_the_path(Original_dart_const_handle adart, + Dart_const_descriptor get_first_dart_of_the_path(Original_dart_const_descriptor adart, bool flip=false, bool isquadrangulation=true) const { @@ -1428,13 +1428,13 @@ class Minimal_quadrangulation if (get_original_map().template is_free<2>(adart) || adart(adart)) { - const std::pair& + const std::pair& p=m_paths.find(adart)->second; return flip?get_local_map().template beta<2>(p.first):p.first; } else { - const std::pair& + const std::pair& p=m_paths.find(get_original_map().template beta<2>(adart))->second; return flip?p.first:get_local_map().template beta<2>(p.first); } @@ -1448,14 +1448,14 @@ class Minimal_quadrangulation if (get_original_map().template is_free<2>(adart) || adart(adart)) { - const std::pair& + const std::pair& p=m_paths.find(adart)->second; return flip? (isquadrangulation?get_local_map().template beta<2>(p.second):p.second): p.first; } - const std::pair& + const std::pair& p=m_paths.find(get_original_map().template beta<2>(adart))->second; return flip? @@ -1471,7 +1471,7 @@ class Minimal_quadrangulation * @pre edge containing adart should be incident to at least one non * perforated face. */ - Dart_const_handle get_second_dart_of_the_path(Original_dart_const_handle adart, + Dart_const_descriptor get_second_dart_of_the_path(Original_dart_const_descriptor adart, bool flip=false, bool isquadrangulation=true) const { @@ -1484,14 +1484,14 @@ class Minimal_quadrangulation if (get_original_map().template is_free<2>(adart) || adart(adart)) { - const std::pair& + const std::pair& p=m_paths.find(adart)->second; return flip? (isquadrangulation?get_local_map().template beta<2>(p.first):p.first): p.second; } - const std::pair& + const std::pair& p=m_paths.find(get_original_map().template beta<2>(adart))->second; return flip? p.second: @@ -1500,7 +1500,7 @@ class Minimal_quadrangulation /// @return the first dart of the path, direct version without taking into /// account possible flip and the two case of torus/quadrangulation. - Dart_handle get_first_dart_of_the_path_direct(Original_dart_const_handle adart) const + Dart_descriptor get_first_dart_of_the_path_direct(Original_dart_const_descriptor adart) const { CGAL_assertion(is_edge_has_path(adart)); @@ -1510,8 +1510,8 @@ class Minimal_quadrangulation return m_paths.find(get_original_map().template beta<2>(adart))->second.second; } - void set_first_dart_of_the_path(Original_dart_const_handle adart, - Dart_handle d) + void set_first_dart_of_the_path(Original_dart_const_descriptor adart, + Dart_descriptor d) { CGAL_assertion(is_edge_has_path(adart)); @@ -1522,8 +1522,8 @@ class Minimal_quadrangulation { m_paths.find(get_original_map().template beta<2>(adart))->second.second=d; } } - void set_second_dart_of_the_path(Original_dart_const_handle adart, - Dart_handle d) + void set_second_dart_of_the_path(Original_dart_const_descriptor adart, + Dart_descriptor d) { CGAL_assertion(is_edge_has_path(adart)); @@ -1675,7 +1675,7 @@ class Minimal_quadrangulation { if (!is_contracted(it)) { - Dart_const_handle d1=get_first_dart_of_the_path(it); + Dart_const_descriptor d1=get_first_dart_of_the_path(it); if (d1==nullptr) { std::cout<<"ERROR: an edge is associated with a null dart in m_paths" @@ -1684,7 +1684,7 @@ class Minimal_quadrangulation } else if (!edge_path_has_only_one_dart(it)) { - Dart_const_handle d2=get_second_dart_of_the_path(it); + Dart_const_descriptor d2=get_second_dart_of_the_path(it); if (d2==nullptr) { std::cout<<"ERROR: an edge is associated with a null dart in m_paths" @@ -1693,7 +1693,7 @@ class Minimal_quadrangulation } else { - Dart_const_handle dd1=get_local_map().other_extremity(d1); + Dart_const_descriptor dd1=get_local_map().other_extremity(d1); CGAL_assertion(dd1!=NULL); if (!CGAL::belong_to_same_cell (get_local_map(), dd1, d2)) @@ -1715,7 +1715,7 @@ class Minimal_quadrangulation /// @return A pair of final path and correspondent ordering std::pair, std::unordered_map>> compute_perturbation(const Path_on_surface& p) const { - std::vector pr; + std::vector pr; pr.reserve(p.length()); for(std::size_t i = 0; i < p.length(); ++i) { @@ -1734,7 +1734,7 @@ class Minimal_quadrangulation for (std::size_t i = 0; i < pr.size(); ++i) { - Dart_const_handle dh = pr[i]; + Dart_const_descriptor dh = pr[i]; auto dart_id = get_absolute_idx(dh); rb_nodes.emplace_back(i); auto& node = rb_nodes.back(); @@ -1743,12 +1743,12 @@ class Minimal_quadrangulation if (i > 0 && switchable[i]) { // Look at the t-1 turn of [i-1, i, i + 1] - Dart_const_handle dleft = get_local_map().template beta<0, 2>(dh); + Dart_const_descriptor dleft = get_local_map().template beta<0, 2>(dh); size_type dleft_id = get_absolute_idx(dleft); if(trees[dleft_id].size() > 0) { std::size_t max_turn_idx = is_absolutely_directed(dleft) ? trees[dleft_id].begin()->m_idx : trees[dleft_id].rbegin()->m_idx; - Dart_const_handle dprev = get_previous_relative_to(pr, max_turn_idx, dleft); + Dart_const_descriptor dprev = get_previous_relative_to(pr, max_turn_idx, dleft); // If there exists a crossing that can be avoided, switch if(get_order_relative_to(pr[i - 1], dleft) > get_order_relative_to(dprev, dleft)) { @@ -1815,7 +1815,7 @@ class Minimal_quadrangulation { current_dividing_idx -= p.length(); } - Dart_const_handle dbase = p[last_same_idx], + Dart_const_descriptor dbase = p[last_same_idx], dcur = p[current_dividing_idx], d0 = p[path_end_dividing_idx]; @@ -1826,7 +1826,7 @@ class Minimal_quadrangulation else { std::size_t key_prev_order = this->get_order_relative_to(pr[key - 1], pr[key]); - Dart_const_handle bprev = this->get_previous_relative_to(pr, b.m_idx, pr[key]); + Dart_const_descriptor bprev = this->get_previous_relative_to(pr, b.m_idx, pr[key]); std::size_t b_prev_order = this->get_order_relative_to(bprev, pr[key]); return less_than_in_tree(key_prev_order, b_prev_order); } @@ -1866,7 +1866,7 @@ class Minimal_quadrangulation if (!get_local_map().is_marked(it, marktemp)) { std::stack> parenthesis_pairing; - Dart_const_handle dh2=it; + Dart_const_descriptor dh2=it; do { get_local_map().mark(dh2, marktemp); @@ -1983,7 +1983,7 @@ class Minimal_quadrangulation } /// Actually switch the dart in a vector of darts - void switch_dart(std::vector& p, std::size_t i, std::vector& switchable) const + void switch_dart(std::vector& p, std::size_t i, std::vector& switchable) const { CGAL_assertion(static_cast(switchable[i])); p[i] = get_local_map().template beta<0, 2>(p[i]); @@ -2006,7 +2006,7 @@ class Minimal_quadrangulation /// Essentially compute the positive turn between ref and x /// Requires x and ref outgoing at the same vertex - size_type get_order_relative_to(Dart_const_handle x, Dart_const_handle ref) const + size_type get_order_relative_to(Dart_const_descriptor x, Dart_const_descriptor ref) const { CGAL_assertion(get_local_map().template belong_to_same_cell<0>(get_local_map().opposite2(x), ref)); #if defined(CGAL_PWRLE_TURN_V2) || defined(CGAL_PWRLE_TURN_V3) @@ -2022,7 +2022,7 @@ class Minimal_quadrangulation /// Extend p[i] towards the reverse direction of ref /// Requires p[i] and ref on the same 1-cell /// @return the index - int get_previous_idx_relative_to(const std::vector& p, std::size_t i, Dart_const_handle ref) const + int get_previous_idx_relative_to(const std::vector& p, std::size_t i, Dart_const_descriptor ref) const { CGAL_assertion(get_local_map().template belong_to_same_cell<1>(p[i], ref)); return p[i] == ref ? (static_cast(i) - 1) : (static_cast(i) + 1); @@ -2031,7 +2031,7 @@ class Minimal_quadrangulation /// Extend p[i] towards the reverse direction of ref /// Requires p[i] and ref on the same 1-cell /// @return whether the extension is viable without crossing the first and the last dart - bool has_previous_relative_to(const std::vector& p, std::size_t i, Dart_const_handle ref) const + bool has_previous_relative_to(const std::vector& p, std::size_t i, Dart_const_descriptor ref) const { CGAL_assertion(get_local_map().template belong_to_same_cell<1>(p[i], ref)); int j = get_previous_idx_relative_to(p, i, ref); @@ -2041,7 +2041,7 @@ class Minimal_quadrangulation /// Extend p[i] towards the reverse direction of ref /// Requires p[i] and ref on the same 1-cell /// @return the actual dart, wrap around if reaching boundary - Dart_const_handle get_previous_relative_to(const std::vector& p, std::size_t i, Dart_const_handle ref) const + Dart_const_descriptor get_previous_relative_to(const std::vector& p, std::size_t i, Dart_const_descriptor ref) const { CGAL_assertion(get_local_map().template belong_to_same_cell<1>(p[i], ref)); if (p[i] == ref) @@ -2057,7 +2057,7 @@ class Minimal_quadrangulation /// Extend p[i] towards the direction of ref /// Requires p[i] and ref on the same 1-cell /// @return the index - int get_next_idx_relative_to(const std::vector& p, std::size_t i, Dart_const_handle ref) const + int get_next_idx_relative_to(const std::vector& p, std::size_t i, Dart_const_descriptor ref) const { CGAL_assertion(get_local_map().template belong_to_same_cell<1>(p[i], ref)); return p[i] == ref ? (static_cast(i) + 1) : (static_cast(i) - 1); @@ -2066,7 +2066,7 @@ class Minimal_quadrangulation /// Extend p[i] towards the direction of ref /// Requires p[i] and ref on the same 1-cell /// @return whether the extension is viable without crossing the first and the last dart - bool has_next_relative_to(const std::vector& p, std::size_t i, Dart_const_handle ref) const + bool has_next_relative_to(const std::vector& p, std::size_t i, Dart_const_descriptor ref) const { CGAL_assertion(get_local_map().template belong_to_same_cell<1>(p[i], ref)); int j = get_next_idx_relative_to(p, i, ref); @@ -2076,7 +2076,7 @@ class Minimal_quadrangulation /// Extend p[i] towards the direction of ref /// Requires p[i] and ref on the same 1-cell /// @return the actual dart, wrap around if reaching boundary - Dart_const_handle get_next_relative_to(const std::vector& p, std::size_t i, Dart_const_handle ref) const + Dart_const_descriptor get_next_relative_to(const std::vector& p, std::size_t i, Dart_const_descriptor ref) const { CGAL_assertion(get_local_map().template belong_to_same_cell<1>(p[i], ref)); if (p[i] == ref) @@ -2090,20 +2090,20 @@ class Minimal_quadrangulation } /// @return a unique 1-cell id for the dart - size_type get_absolute_idx(Dart_const_handle dh) const + size_type get_absolute_idx(Dart_const_descriptor dh) const { return (std::min)(get_local_map().darts().index(dh), get_local_map().darts().index(get_local_map().opposite(dh))); } /// @return true if the dart is the representative for the unique 1-cell id - bool is_absolutely_directed(Dart_const_handle dh) const + bool is_absolutely_directed(Dart_const_descriptor dh) const { return get_local_map().darts().index(dh) < get_local_map().darts().index(get_local_map().opposite(dh)); } /// @return true if p[ref] -> p[ref + 1] forms the same corner as p[j] /// Requires p[j] and p[ref] on the same 1-cell - bool is_same_corner(const std::vector& p, std::size_t j, std::size_t ref) const + bool is_same_corner(const std::vector& p, std::size_t j, std::size_t ref) const { if (!has_next_relative_to(p, j, p[ref])) { diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Path_generators.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Path_generators.h index 2b13846b..11622c18 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Path_generators.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Path_generators.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_generators.h $ -// $Id: Path_generators.h 440a8df 2022-02-03T08:41:04+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_generators.h $ +// $Id: include/CGAL/Surface_mesh_topology/internal/Path_generators.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -81,17 +81,17 @@ void generate_random_positive_bracket(Path& path, } template -typename LCC::Dart_const_handle +typename LCC::Dart_const_descriptor generate_random_connected_set_of_faces(const LCC& lcc, std::size_t nb, CGAL::Random& random, std::unordered_set - & set, + & set, typename LCC::size_type amark) { set.clear(); if (lcc.is_empty()) { return NULL; } - std::unordered_map border_faces; + std::unordered_map border_faces; std::size_t index=static_cast (random.get_int(0, static_cast(lcc.darts().capacity()))); @@ -101,7 +101,7 @@ generate_random_connected_set_of_faces(const LCC& lcc, std::size_t nb, if (index==lcc.darts().capacity()) { index=0; } } - typename LCC::Dart_const_handle dh1=lcc.darts().iterator_to(lcc.darts()[index]); + typename LCC::Dart_const_descriptor dh1=lcc.darts().iterator_to(lcc.darts()[index]); border_faces[0]=dh1; set.insert(dh1); lcc.template mark_cell<2>(dh1, amark); @@ -113,7 +113,7 @@ generate_random_connected_set_of_faces(const LCC& lcc, std::size_t nb, (0, static_cast(border_faces.size()))); int nbborder=0; - typename LCC::Dart_const_handle dh1_init=border_faces[facenumber]; + typename LCC::Dart_const_descriptor dh1_init=border_faces[facenumber]; dh1=dh1_init; do { @@ -149,10 +149,10 @@ generate_random_connected_set_of_faces(const LCC& lcc, std::size_t nb, // Then we update the list of border faces (because some of them could be // no more border due to the adding of the new face) - std::unordered_map + std::unordered_map border_faces_new; for (typename std::unordered_map::iterator it=border_faces.begin(), + typename LCC::Dart_const_descriptor>::iterator it=border_faces.begin(), itend=border_faces.end(); it!=itend; ++it) { bool isborder=false; @@ -176,7 +176,7 @@ generate_random_connected_set_of_faces(const LCC& lcc, std::size_t nb, } CGAL_assertion(border_faces.size()!=0); - typename LCC::Dart_const_handle dhres=border_faces[0]; + typename LCC::Dart_const_descriptor dhres=border_faces[0]; while(lcc.template is_free<2>(dhres) || lcc.is_marked(lcc.template beta<2>(dhres), amark)) { dhres=lcc.template beta<1>(dhres); } @@ -188,10 +188,10 @@ template void generate_random_closed_path(Path& p, std::size_t nb, CGAL::Random& random) { - std::unordered_set faces; + std::unordered_set faces; typename Path::Map::size_type amark=p.get_map().get_new_mark(); - typename Path::Map::Dart_const_handle dhi= + typename Path::Map::Dart_const_descriptor dhi= generate_random_connected_set_of_faces(p.get_map(), nb, random, faces, amark); @@ -201,7 +201,7 @@ void generate_random_closed_path(Path& p, std::size_t nb, return; // We have selected all the faces. } - typename Path::Map::Dart_const_handle dh=dhi; + typename Path::Map::Dart_const_descriptor dh=dhi; do { CGAL_assertion(p.get_map().template is_free<2>(dh) || @@ -214,7 +214,7 @@ void generate_random_closed_path(Path& p, std::size_t nb, } while(dh!=dhi); - for (typename std::template unordered_set::iterator + for (typename std::template unordered_set::iterator it=faces.begin(), itend=faces.end(); it!=itend; ++it) { p.get_map().template unmark_cell<2>(*it, amark); } diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h index 55f6d6a7..9fd542bc 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h $ -// $Id: Path_on_surface_with_rle.h c5c6098 2022-01-27T11:02:17+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h $ +// $Id: include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -42,14 +42,14 @@ template class CFlat { typedef Map_ Map; - typedef typename Map::Dart_const_handle Dart_const_handle; + typedef typename Map::Dart_const_descriptor Dart_const_descriptor; typedef CFlat Self; public: - CFlat(Dart_const_handle dh) : begin(dh), end(dh), length(0) + CFlat(Dart_const_descriptor dh) : begin(dh), end(dh), length(0) {} - CFlat(Dart_const_handle dh1, Dart_const_handle dh2, int l) : + CFlat(Dart_const_descriptor dh1, Dart_const_descriptor dh2, int l) : begin(dh1), end(dh2), length(l) {} @@ -65,7 +65,7 @@ class CFlat return os; } - Dart_const_handle begin, end; + Dart_const_descriptor begin, end; int length; // Length of the flat, positive flat if >0, negative flat if <0 }; @@ -77,7 +77,7 @@ class Light_MQ // MQ for minimal quadrangulation public: typedef Map_ Local_map; typedef Map_ Mesh; - typedef typename Map_::Dart_const_handle Dart_const_handle; + typedef typename Map_::Dart_const_descriptor Dart_const_descriptor; Light_MQ(const Local_map& m): m_map(m) {} @@ -86,10 +86,10 @@ class Light_MQ // MQ for minimal quadrangulation const Local_map& get_local_map() const { return m_map; } - std::size_t positive_turn(Dart_const_handle d1, Dart_const_handle d2) const + std::size_t positive_turn(Dart_const_descriptor d1, Dart_const_descriptor d2) const { return m_map.positive_turn(d1, d2); } - std::size_t negative_turn(Dart_const_handle d1, Dart_const_handle d2) const + std::size_t negative_turn(Dart_const_descriptor d1, Dart_const_descriptor d2) const { return m_map.negative_turn(d1, d2); } protected: @@ -103,8 +103,8 @@ class Path_on_surface_with_rle typedef Path_on_surface_with_rle Self; typedef typename MQ::Local_map Map; typedef typename MQ::Mesh Mesh; - typedef typename Map::Dart_handle Dart_handle; - typedef typename Map::Dart_const_handle Dart_const_handle; + typedef typename Map::Dart_descriptor Dart_descriptor; + typedef typename Map::Dart_const_descriptor Dart_const_descriptor; typedef CFlat Flat; typedef std::list List_of_flats; typedef typename List_of_flats::iterator List_iterator; @@ -123,7 +123,7 @@ class Path_on_surface_with_rle typedef std::unordered_set Set_of_it; #ifdef CGAL_PWRLE_TURN_V2 - typedef std::unordered_map TDartIds; + typedef std::unordered_map TDartIds; #endif //CGAL_PWRLE_TURN_V2 /// Constructor @@ -314,7 +314,7 @@ class Path_on_surface_with_rle bool is_flat_valid(const List_iterator& flat) const { CGAL_assertion(is_valid_iterator(flat)); - Dart_const_handle dhend=flat->begin; + Dart_const_descriptor dhend=flat->begin; int nb=0; while(nb!=flat->length) { @@ -344,7 +344,7 @@ class Path_on_surface_with_rle if (is_empty()) { return !is_closed(); } // an empty past is not closed unsigned int nbdarts=0,i=0; - Dart_const_handle prev=(is_closed()?back():nullptr); // Last dart of the path + Dart_const_descriptor prev=(is_closed()?back():nullptr); // Last dart of the path for (auto it=m_path.begin(); it!=m_path.end(); ++it) { if (prev!=nullptr && !get_map().template belong_to_same_cell<0> @@ -421,7 +421,7 @@ class Path_on_surface_with_rle /// @return the first dart of the path /// @pre !is_empty() - Dart_const_handle front() + Dart_const_descriptor front() { CGAL_assertion(!is_empty()); return begin_of_flat(m_path.begin()); @@ -429,14 +429,14 @@ class Path_on_surface_with_rle /// @return the last dart of the path /// @pre !is_empty() - Dart_const_handle back() + Dart_const_descriptor back() { CGAL_assertion(!is_empty()); return end_of_flat(std::prev(m_path.end())); } /// @return true iff df can be added at the end of the path. - bool can_be_pushed(Dart_const_handle dh) + bool can_be_pushed(Dart_const_descriptor dh) { // This assert is too long // CGAL_assertion(get_map().darts().owns(dh)); @@ -448,9 +448,9 @@ class Path_on_surface_with_rle /// Add the given dart at the end of this path. /// @pre can_be_pushed(dh) - void push_back(Dart_const_handle dh, bool update_isclosed=true) + void push_back(Dart_const_descriptor dh, bool update_isclosed=true) { - CGAL_assertion(dh!=Map::null_handle); + CGAL_assertion(dh!=Map::null_descriptor); // This assert is too long, it is tested in the is_valid method. // CGAL_assertion(can_be_pushed(dh)); @@ -488,8 +488,8 @@ class Path_on_surface_with_rle if (is_empty()) { m_is_closed=false; } else { - Dart_const_handle pend=get_map().other_extremity(back()); - if (pend==Map::null_handle) { m_is_closed=false; } + Dart_const_descriptor pend=get_map().other_extremity(back()); + if (pend==Map::null_descriptor) { m_is_closed=false; } else { m_is_closed=get_map().template belong_to_same_cell<0>(front(), pend); } } @@ -545,14 +545,14 @@ class Path_on_surface_with_rle } /// @return the beginning of the flat - Dart_const_handle begin_of_flat(const List_iterator& it) + Dart_const_descriptor begin_of_flat(const List_iterator& it) { CGAL_assertion(is_valid_iterator(it)); return it->begin; } /// @return the end of the flat - Dart_const_handle end_of_flat(const List_iterator& it) + Dart_const_descriptor end_of_flat(const List_iterator& it) { CGAL_assertion(is_valid_iterator(it)); return it->end; @@ -586,20 +586,20 @@ class Path_on_surface_with_rle else { --(it->length); } } - void set_begin_of_flat(const List_iterator& it, Dart_const_handle dh) + void set_begin_of_flat(const List_iterator& it, Dart_const_descriptor dh) { CGAL_assertion(is_valid_iterator(it)); it->begin=dh; } - void set_end_of_flat(const List_iterator& it, Dart_const_handle dh) + void set_end_of_flat(const List_iterator& it, Dart_const_descriptor dh) { CGAL_assertion(is_valid_iterator(it)); it->end=dh; } /// @return the second dart of the given flat. - Dart_const_handle second_dart_of_a_flat(const List_iterator& it) + Dart_const_descriptor second_dart_of_a_flat(const List_iterator& it) { if (flat_length(it)>0) { return get_map().template beta<1, 2, 1>(begin_of_flat(it)); } @@ -609,7 +609,7 @@ class Path_on_surface_with_rle } /// @return the dart before the last dart of the given flat. - Dart_const_handle before_last_dart_of_a_flat(const List_iterator& it) + Dart_const_descriptor before_last_dart_of_a_flat(const List_iterator& it) { if (flat_length(it)>0) { return get_map().template beta<0, 2, 0>(end_of_flat(it)); } @@ -729,10 +729,10 @@ class Path_on_surface_with_rle } /// Reduce the length of the flat part starting at 'it' from its beginning - /// 'it' moves to the previous flat if the current flat disapeared. + /// 'it' moves to the previous flat if the current flat disappeared. /// The path could be not valid after this operation (consistency with next /// element should be ensure, by possibly updating the next flat part). - /// @return true iff the flat disapeared after its reduction. + /// @return true iff the flat disappeared after its reduction. bool reduce_flat_from_beginning(List_iterator& it, Set_of_it& modified_flats) { @@ -755,10 +755,10 @@ class Path_on_surface_with_rle } /// Reduce the length of the flat part starting at 'it' from its end. - /// 'it' moves to the previous flat if the current flat disapeared. + /// 'it' moves to the previous flat if the current flat disappeared. /// The path could be not valid after this operation (consistency with next /// element should be ensure, by possibly updating the next flat part). - /// @return true iff the flat disapeared after its reduction. + /// @return true iff the flat disappeared after its reduction. bool reduce_flat_from_end(List_iterator& it, Set_of_it& modified_flats) { @@ -1155,7 +1155,7 @@ class Path_on_surface_with_rle /// @return true iff the flat before flat 'it' can be extended by adding /// dart 'dh' to its end. bool is_prev_flat_can_be_extended_at_end(const List_iterator& it, - Dart_const_handle dh, + Dart_const_descriptor dh, bool& positive_flat, bool& negative_flat) { @@ -1167,7 +1167,7 @@ class Path_on_surface_with_rle if (!m_use_only_positive && m_MQ.negative_turn(end_of_flat(ittemp), dh)==2) { negative_flat=true; } - if (flat_length(ittemp)==0) // Case of flat lengh 0 + if (flat_length(ittemp)==0) // Case of flat length 0 { return positive_flat || negative_flat; } return (flat_length(ittemp)>0 && positive_flat) || @@ -1177,7 +1177,7 @@ class Path_on_surface_with_rle /// @return true iff the flat before flat 'it' can be extended by adding /// dart 'dh' to its end. bool is_prev_flat_can_be_extended_at_end(const List_iterator& it, - Dart_const_handle dh) + Dart_const_descriptor dh) { bool dummy1, dummy2; return is_prev_flat_can_be_extended_at_end(it, dh, dummy1, dummy2); @@ -1186,7 +1186,7 @@ class Path_on_surface_with_rle /// @return true iff the flat after flat 'it' can be extended by adding /// dart 'dh' to its beginning. bool is_next_flat_can_be_extended_at_beginning(const List_iterator& it, - Dart_const_handle dh, + Dart_const_descriptor dh, bool& positive_flat, bool& negative_flat) { @@ -1200,7 +1200,7 @@ class Path_on_surface_with_rle if (!m_use_only_positive && m_MQ.negative_turn(dh, begin_of_flat(ittemp))==2) { negative_flat=true; } - if (flat_length(ittemp)==0) // Case of flat lengh 0 + if (flat_length(ittemp)==0) // Case of flat length 0 { return positive_flat || negative_flat; } return (flat_length(ittemp)>0 && positive_flat) || @@ -1210,7 +1210,7 @@ class Path_on_surface_with_rle /// @return true iff the flat after flat 'it' can be extended by adding /// dart 'dh' to its beginning. bool is_next_flat_can_be_extended_at_beginning(const List_iterator& it, - Dart_const_handle dh) + Dart_const_descriptor dh) { bool dummy1, dummy2; return is_next_flat_can_be_extended_at_beginning(it, dh, dummy1, dummy2); @@ -1226,7 +1226,7 @@ class Path_on_surface_with_rle } /// Add the given dart 'dh' before the flat 'it'. - void add_dart_before(const List_iterator& it, Dart_const_handle dh, + void add_dart_before(const List_iterator& it, Dart_const_descriptor dh, Set_of_it& modified_flats) { CGAL_assertion(is_valid_iterator(it)); @@ -1249,7 +1249,7 @@ class Path_on_surface_with_rle } /// Add the given dart 'dh' after the flat 'it'. - void add_dart_after(const List_iterator& it, Dart_const_handle dh, + void add_dart_after(const List_iterator& it, Dart_const_descriptor dh, Set_of_it& modified_flats) { CGAL_assertion(is_valid_iterator(it)); @@ -1299,8 +1299,8 @@ class Path_on_surface_with_rle if (flat_length(it1)>0) // Case where the first flat is positive { // We split the flat in two parts CGAL_assertion(flat_length(it1)>=1); - Dart_const_handle dh1=begin_of_flat(it1); - Dart_const_handle dh2=end_of_flat(it1); + Dart_const_descriptor dh1=begin_of_flat(it1); + Dart_const_descriptor dh2=end_of_flat(it1); if (flat_length(it1)==1) // only one flat with two darts { reduce_flat_from_end(it1, modified_flats); @@ -1336,7 +1336,7 @@ class Path_on_surface_with_rle if (flat_length(it1)>0) // Case where the first flat is positive { // We split the flat in two parts - Dart_const_handle dh=end_of_flat(it1); // last dart of the first flat + Dart_const_descriptor dh=end_of_flat(it1); // last dart of the first flat reduce_flat_from_end(it1, modified_flats); it1=m_path.insert(it2, Flat(dh)); // insert dh before it2 ++m_length; @@ -1345,7 +1345,7 @@ class Path_on_surface_with_rle if (flat_length(it2)>0) // Case where the second flat is positive, we need to { // split it into two parts - Dart_const_handle dh=begin_of_flat(it2); // first dart of the second flat + Dart_const_descriptor dh=begin_of_flat(it2); // first dart of the second flat reduce_flat_from_beginning(it2, modified_flats); it2=m_path.insert(it2, Flat(dh)); // insert dh before the second flat ++m_length; @@ -1355,12 +1355,12 @@ class Path_on_surface_with_rle // CGAL_assertion(is_valid(false)); // CGAL_assertion(is_l_shape(it1)); - Dart_const_handle dh1=get_map().template beta<2,1>(begin_of_flat(it1)); - Dart_const_handle dh2=get_map().template beta<1>(dh1); - Dart_const_handle dh3=get_map().template beta<2,1,2,0>(end_of_flat(it1)); - Dart_const_handle dh4=get_map().template beta<2,0,2,1>(begin_of_flat(it2)); - Dart_const_handle dh5=get_map().template beta<2,0,0>(end_of_flat(it2)); - Dart_const_handle dh6=get_map().template beta<1>(dh5); + Dart_const_descriptor dh1=get_map().template beta<2,1>(begin_of_flat(it1)); + Dart_const_descriptor dh2=get_map().template beta<1>(dh1); + Dart_const_descriptor dh3=get_map().template beta<2,1,2,0>(end_of_flat(it1)); + Dart_const_descriptor dh4=get_map().template beta<2,0,2,1>(begin_of_flat(it2)); + Dart_const_descriptor dh5=get_map().template beta<2,0,0>(end_of_flat(it2)); + Dart_const_descriptor dh6=get_map().template beta<1>(dh5); bool first_flat_zero=(flat_length(it1)==0); bool second_flat_zero=(flat_length(it2)==0); diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Shortest_noncontractible_cycle.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Shortest_noncontractible_cycle.h index 2600b8b7..f9ac351d 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Shortest_noncontractible_cycle.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_topology/internal/Shortest_noncontractible_cycle.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Shortest_noncontractible_cycle.h $ -// $Id: Shortest_noncontractible_cycle.h 2f5841e 2021-10-14T17:53:01+02:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Shortest_noncontractible_cycle.h $ +// $Id: include/CGAL/Surface_mesh_topology/internal/Shortest_noncontractible_cycle.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Thien Hoang @@ -31,16 +31,16 @@ namespace internal { template struct Get_original_dart { - static typename SNC::Original_dart_const_handle - run(SNC* snc, typename SNC::Dart_handle dh) + static typename SNC::Original_dart_const_descriptor + run(SNC* snc, typename SNC::Dart_descriptor dh) { return snc->m_copy_to_origin[dh]; } }; template struct Get_original_dart { - static typename SNC::Original_dart_const_handle - run(SNC* /* snc */, typename SNC::Dart_handle dh) + static typename SNC::Original_dart_const_descriptor + run(SNC* /* snc */, typename SNC::Dart_descriptor dh) { return dh; } }; @@ -54,19 +54,19 @@ class Shortest_noncontractible_cycle friend struct Get_original_dart; using Original_map_wrapper=internal::Generic_map_selector; - using Original_dart_const_handle=typename Original_map_wrapper::Dart_const_handle_original; + using Original_dart_const_descriptor=typename Original_map_wrapper::Dart_const_descriptor_original; using Local_map =typename Original_map_wrapper::Generic_map; - using Dart_handle =typename Local_map::Dart_handle; - using Dart_const_handle=typename Local_map::Dart_const_handle; + using Dart_descriptor =typename Local_map::Dart_descriptor; + using Dart_const_descriptor=typename Local_map::Dart_const_descriptor; using size_type = typename Local_map::size_type; - using Dart_container=std::vector; + using Dart_container=std::vector; using Path =CGAL::Surface_mesh_topology::Path_on_surface; // Associations between original darts and their copy. - using Origin_to_copy=std::unordered_map; - using Copy_to_origin=std::unordered_map; + using Origin_to_copy=std::unordered_map; + using Copy_to_origin=std::unordered_map; /// @return the local map const Local_map& get_local_map() const @@ -124,7 +124,7 @@ class Shortest_noncontractible_cycle } template - Path compute_cycle(Original_dart_const_handle root_vertex, + Path compute_cycle(Original_dart_const_descriptor root_vertex, typename WeightFunctor::Weight_t* length, const WeightFunctor& wf, bool display_time=false) @@ -134,7 +134,7 @@ class Shortest_noncontractible_cycle { t.start(); } m_cycle.clear(); - Dart_handle root=m_origin_to_copy[root_vertex]; + Dart_descriptor root=m_origin_to_copy[root_vertex]; this->compute_cycle(root, m_cycle, length, nullptr, wf); if (display_time) @@ -147,13 +147,13 @@ class Shortest_noncontractible_cycle } template - Path compute_cycle(Original_dart_const_handle root_vertex, + Path compute_cycle(Original_dart_const_descriptor root_vertex, typename WeightFunctor::Weight_t* length, bool display_time=false) { return compute_cycle(root_vertex, length, WeightFunctor(), display_time); } template - Path compute_cycle(Original_dart_const_handle root_vertex, + Path compute_cycle(Original_dart_const_descriptor root_vertex, bool display_time=false) { return compute_cycle(root_vertex, nullptr, display_time); } @@ -172,7 +172,7 @@ class Shortest_noncontractible_cycle for (auto it=get_local_map().template attributes<0>().begin(), itend=get_local_map().template attributes<0>().end(); it!=itend; ++it) { - Dart_handle dh=get_local_map().template dart_of_attribute<0>(it); + Dart_descriptor dh=get_local_map().template dart_of_attribute<0>(it); typename WeightFunctor::Weight_t temp_length; if (first_check) { @@ -208,9 +208,9 @@ class Shortest_noncontractible_cycle { return compute_shortest_non_contractible_cycle(nullptr, display_time); } protected: - int vertex_info(Dart_handle dh) const + int vertex_info(Dart_descriptor dh) const { return get_local_map().template info<0>(dh); } - int& vertex_info(Dart_handle dh) + int& vertex_info(Dart_descriptor dh) { return get_local_map().template info<0>(dh); } void create_vertex_info() @@ -232,7 +232,7 @@ class Shortest_noncontractible_cycle } template - void compute_spanning_tree(Dart_handle root, Dart_container& spanning_tree, + void compute_spanning_tree(Dart_descriptor root, Dart_container& spanning_tree, std::vector& distance_from_root, std::vector& trace_index, const WeightFunctor& wf) @@ -257,7 +257,7 @@ class Shortest_noncontractible_cycle /// Create a spanning tree using Dijkstra template - void compute_Dijkstra_tree(Dart_handle root, Dart_container& spanning_tree, + void compute_Dijkstra_tree(Dart_descriptor root, Dart_container& spanning_tree, std::vector& distance_from_root, std::vector& trace_index, const WeightFunctor& wf) @@ -266,10 +266,10 @@ class Shortest_noncontractible_cycle Dijkstra_comparator dc(distance_from_root); //std::priority_queue, Dijkstra_comparator > pq(dc); typedef boost::heap::fibonacci_heap>> Heap; - typedef typename Heap::handle_type heap_handle; + typedef typename Heap::handle_type heap_descriptor; Heap pq(dc); - std::unordered_map inqueue; + std::unordered_map inqueue; int vertex_index=0; size_type vertex_visited=get_local_map().get_new_mark(); @@ -287,12 +287,12 @@ class Shortest_noncontractible_cycle inqueue.erase(u_index); - Dart_handle u=(u_index==0)?root:get_local_map().next(spanning_tree[u_index-1]); + Dart_descriptor u=(u_index==0)?root:get_local_map().next(spanning_tree[u_index-1]); CGAL_assertion(u_index==vertex_info(u)); - Dart_handle it=u; + Dart_descriptor it=u; do { - Dart_handle v=get_local_map().next(it); + Dart_descriptor v=get_local_map().next(it); Distance_ w=wf(Get_original_dart::run(this, nonhole_dart_of_same_edge(it))); if (!get_local_map().is_marked(v, vertex_visited)) { @@ -333,7 +333,7 @@ class Shortest_noncontractible_cycle /// Create a spanning tree using BFS template - void compute_BFS_tree(Dart_handle root, Dart_container& spanning_tree, + void compute_BFS_tree(Dart_descriptor root, Dart_container& spanning_tree, std::vector& distance_from_root, std::vector& trace_index) { @@ -351,12 +351,12 @@ class Shortest_noncontractible_cycle { int u_index=q.front(); q.pop(); - Dart_handle u=(u_index==0)?root:get_local_map().next(spanning_tree[u_index-1]); + Dart_descriptor u=(u_index==0)?root:get_local_map().next(spanning_tree[u_index-1]); CGAL_assertion(u_index==vertex_info(u)); - Dart_handle it=u; + Dart_descriptor it=u; do { - Dart_handle v=get_local_map().next(it); + Dart_descriptor v=get_local_map().next(it); if (!get_local_map().is_marked(v, vertex_visited)) { int v_index=++vertex_index; @@ -379,10 +379,10 @@ class Shortest_noncontractible_cycle /// Check if there is only one unmarked edge around a face. /// If there is, let dh_only_edge=the edge separating it and its only adjacent face. - bool is_degree_one_face(Dart_handle dh_face, Dart_handle& dh_only_edge, + bool is_degree_one_face(Dart_descriptor dh_face, Dart_descriptor& dh_only_edge, size_type edge_deleted) { - Dart_handle dh=dh_face; + Dart_descriptor dh=dh_face; dh_only_edge=nullptr; do { @@ -411,7 +411,7 @@ class Shortest_noncontractible_cycle if (!get_local_map().is_marked(dh, edge_deleted)) { get_local_map().template mark_cell<1>(dh, edge_deleted); } } - std::queue degree_one_faces; + std::queue degree_one_faces; // Add to queue the degree-1 faces for (auto it=get_local_map().darts().begin(), itend=get_local_map().darts().end(); it!=itend; ++it) @@ -423,7 +423,7 @@ class Shortest_noncontractible_cycle } else if (!get_local_map().is_marked(it, tested)) { - Dart_handle dh=it, dh_only_edge=nullptr; + Dart_descriptor dh=it, dh_only_edge=nullptr; bool degree_one=true; do // Here we do not use is_degree_one_face method because we want to { // mark tested all darts of the face in the same loop. @@ -452,16 +452,16 @@ class Shortest_noncontractible_cycle // Remove the degree-1 faces while (!degree_one_faces.empty()) { - Dart_handle dh_face=degree_one_faces.front(); + Dart_descriptor dh_face=degree_one_faces.front(); degree_one_faces.pop(); if (!get_local_map().is_marked(dh_face, edge_deleted)) { get_local_map().template mark_cell<1>(dh_face, edge_deleted); } if (!get_local_map().is_marked(dh_face, face_deleted)) { get_local_map().template mark_cell<2>(dh_face, face_deleted); } - Dart_handle dh_adj_face=get_local_map().opposite2(dh_face); + Dart_descriptor dh_adj_face=get_local_map().opposite2(dh_face); if (!get_local_map().is_marked(dh_adj_face, face_deleted)) { - Dart_handle dh_only_edge=nullptr; + Dart_descriptor dh_only_edge=nullptr; if (is_degree_one_face(dh_adj_face, dh_only_edge, edge_deleted)) { degree_one_faces.push(dh_only_edge); @@ -487,7 +487,7 @@ class Shortest_noncontractible_cycle get_local_map().free_mark(face_deleted); } - Dart_handle nonhole_dart_of_same_edge(Dart_handle dh) + Dart_descriptor nonhole_dart_of_same_edge(Dart_descriptor dh) { CGAL_assertion(dh!=nullptr); if (get_local_map().is_marked(dh, m_is_perforated)) @@ -496,7 +496,7 @@ class Shortest_noncontractible_cycle return dh; } - Dart_handle nonhole_dart_of_same_edge(Dart_handle dh, bool& flip) + Dart_descriptor nonhole_dart_of_same_edge(Dart_descriptor dh, bool& flip) { CGAL_assertion(dh!=nullptr); if (get_local_map().is_marked(dh, m_is_perforated)) @@ -508,10 +508,10 @@ class Shortest_noncontractible_cycle return dh; } - void add_to_cycle(Dart_handle dh, Path& cycle, bool flip) + void add_to_cycle(Dart_descriptor dh, Path& cycle, bool flip) { dh=nonhole_dart_of_same_edge(dh, flip); - Original_dart_const_handle + Original_dart_const_descriptor dh_original=Get_original_dart::run(this, dh); if (cycle.can_be_pushed(dh_original, flip)) { cycle.push_back(dh_original, flip, false); } @@ -523,7 +523,7 @@ class Shortest_noncontractible_cycle } template - bool compute_cycle(Dart_handle root, Path& cycle, + bool compute_cycle(Dart_descriptor root, Path& cycle, typename WeightFunctor::Weight_t* length, const typename WeightFunctor::Weight_t* max_length, const WeightFunctor& wf) @@ -537,11 +537,11 @@ class Shortest_noncontractible_cycle bool first_check=true; typename WeightFunctor::Weight_t min_distance=0; - Dart_handle min_noncon_edge; + Dart_descriptor min_noncon_edge; int min_a=-1, min_b=-1; for (auto dh : m_noncon_edges) { - Dart_handle a=dh, b=get_local_map().next(dh); + Dart_descriptor a=dh, b=get_local_map().next(dh); int index_a=vertex_info(a), index_b=vertex_info(b); typename WeightFunctor::Weight_t sum_distance= distance_from_root[index_a]+distance_from_root[index_b] diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_traits_generator_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_traits_generator_3.h index be069f73..0b857224 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_traits_generator_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_traits_generator_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesh_traits_generator_3.h $ -// $Id: Surface_mesh_traits_generator_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesh_traits_generator_3.h $ +// $Id: include/CGAL/Surface_mesh_traits_generator_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau @@ -22,14 +22,14 @@ namespace CGAL { template class Sphere_3; -/** Defaut traits class. +/** Default traits class. * Partial specialization will be in other headers */ template struct Surface_mesh_traits_generator_3 { typedef typename Surface::Surface_mesher_traits_3 Type; - typedef Type type; // for Boost compatiblity (meta-programming) + typedef Type type; // for Boost compatibility (meta-programming) }; // specialization for Kernel::Sphere_3 @@ -37,7 +37,7 @@ template struct Surface_mesh_traits_generator_3 > { typedef Surface_mesher::Sphere_oracle_3 Type; - typedef Type type; // for Boost compatiblity (meta-programming) + typedef Type type; // for Boost compatibility (meta-programming) }; } // end namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_triangulation_generator_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_triangulation_generator_3.h index 74167f32..05584b88 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_triangulation_generator_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_triangulation_generator_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesh_triangulation_generator_3.h $ -// $Id: Surface_mesh_triangulation_generator_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesh_triangulation_generator_3.h $ +// $Id: include/CGAL/Surface_mesh_triangulation_generator_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesh_vertex_base_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesh_vertex_base_3.h index ae863eb5..ed9573d8 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesh_vertex_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesh_vertex_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesh_vertex_base_3.h $ -// $Id: Surface_mesh_vertex_base_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesh_vertex_base_3.h $ +// $Id: include/CGAL/Surface_mesh_vertex_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Combining_oracle.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Combining_oracle.h index 05aaf867..426ff4c1 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Combining_oracle.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Combining_oracle.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h $ -// $Id: Combining_oracle.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h $ +// $Id: include/CGAL/Surface_mesher/Combining_oracle.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -51,9 +51,9 @@ namespace CGAL { typedef typename Oracle_a::Intersection_point Intersection_point; - CGAL_static_assertion((::boost::is_same< + static_assert(::std::is_same< Intersection_point, - typename Oracle_b::Intersection_point>::value)); + typename Oracle_b::Intersection_point>::value); typedef ::CGAL::Multi_surface_3 diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Intersection_data_structure_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Intersection_data_structure_3.h index b23ae384..d3d66d9e 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Intersection_data_structure_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Intersection_data_structure_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Intersection_data_structure_3.h $ -// $Id: Intersection_data_structure_3.h 24a5fdb 2021-01-05T18:37:28+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Intersection_data_structure_3.h $ +// $Id: include/CGAL/Surface_mesher/Intersection_data_structure_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent RINEAU diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Null_oracle_visitor.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Null_oracle_visitor.h index df0271b4..ff05930f 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Null_oracle_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Null_oracle_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Null_oracle_visitor.h $ -// $Id: Null_oracle_visitor.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Null_oracle_visitor.h $ +// $Id: include/CGAL/Surface_mesher/Null_oracle_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h index a1788537..4a1d362a 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h $ -// $Id: Point_surface_indices_oracle_visitor.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h $ +// $Id: include/CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Poisson_implicit_surface_oracle_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Poisson_implicit_surface_oracle_3.h index 2ed958fa..51b28826 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Poisson_implicit_surface_oracle_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Poisson_implicit_surface_oracle_3.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Poisson_surface_reconstruction_3/include/CGAL/Surface_mesher/Poisson_implicit_surface_oracle_3.h $ -// $Id: Poisson_implicit_surface_oracle_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Poisson_surface_reconstruction_3/include/CGAL/Surface_mesher/Poisson_implicit_surface_oracle_3.h $ +// $Id: include/CGAL/Surface_mesher/Poisson_implicit_surface_oracle_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -46,46 +46,6 @@ namespace CGAL { namespace Surface_mesher { - /** - Type and functions required in GT: - - Compute_scalar_product_3 (from rev. 29646) - - Compute_squared_distance_3 - - Compute_squared_radius_3 - - Construct_center_3 - - Construct_midpoint_3 - - Construct_point_on_3 (from rev. 29646) - - Construct_scaled_vector_3 - - Construct_segment_3 (from rev. 29646) - - Construct_translated_point_3 - - Construct_vector_3 - - FT - - Has_on_bounded_side_3 (from rev. 29646) - - Line_3 - - Point_3 - - Ray_3 - - Segment_3 - - Sphere_3 - - Vector_3 (from rev. 29646) - - compute_scalar_product_3_object (from rev. 29646) - - compute_squared_distance_3_object - - compute_squared_radius_3_object - - construct_center_3_object - - construct_line_3_object (no longer, since rev. 29646) - - construct_midpoint_3_object - - construct_point_on_3_object (from rev. 29646) - - construct_scaled_vector_3_object - - construct_segment_3_object (from rev. 29646) - - construct_translated_point_3_object - - construct_vector_3_object - - has_on_bounded_side_3_object (from rev. 29646) -(Computed by use of: - perl -ne '/GT\(\)\.([a-zA-Z_0-9]+)/ - && print "$1\n";' {implicit_surface_oracle_3.h,Sphere_oracle_3.h} | sort -u - perl -ne '/GT::([a-zA-Z_0-9]+)/ - && print "$1\n";' {implicit_surface_oracle_3.h,Sphere_oracle_3.h} | sort -u -) - */ - template < class GT, diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Polyhedral_oracle.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Polyhedral_oracle.h index b35d4d34..b1cc49bd 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Polyhedral_oracle.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Polyhedral_oracle.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Polyhedral_oracle.h $ -// $Id: Polyhedral_oracle.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Polyhedral_oracle.h $ +// $Id: include/CGAL/Surface_mesher/Polyhedral_oracle.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Profile_counter.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Profile_counter.h index 830704d5..a1a1089f 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Profile_counter.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Profile_counter.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Profile_counter.h $ -// $Id: Profile_counter.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Profile_counter.h $ +// $Id: include/CGAL/Surface_mesher/Profile_counter.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Laurent Rineau @@ -16,6 +16,9 @@ #ifndef CGAL_SURFACE_MESHER_PROFILE_COUNTER_H #define CGAL_SURFACE_MESHER_PROFILE_COUNTER_H +#include + + #include #ifdef CGAL_SURFACE_MESHER_PROFILE diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Profile_timer.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Profile_timer.h index 5eeef4b1..b336eb5e 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Profile_timer.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Profile_timer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Profile_timer.h $ -// $Id: Profile_timer.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Profile_timer.h $ +// $Id: include/CGAL/Surface_mesher/Profile_timer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Sphere_oracle_3.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Sphere_oracle_3.h index f3c59bca..1356b14c 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Sphere_oracle_3.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Sphere_oracle_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Sphere_oracle_3.h $ -// $Id: Sphere_oracle_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Sphere_oracle_3.h $ +// $Id: include/CGAL/Surface_mesher/Sphere_oracle_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -298,7 +298,7 @@ namespace CGAL { const Point original_a = a; const Vector ab = vector(a, b); a = translated_point(original_a, scaled_vector(ab, root_1)); - if( root_2 <= FT(1) ) /// move b iif root_2 <=1 + if( root_2 <= FT(1) ) /// move b if root_2 <=1 { b = translated_point(original_a, scaled_vector(ab, root_2)); } diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Standard_criteria.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Standard_criteria.h index e00376ca..1f1ee676 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Standard_criteria.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Standard_criteria.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Standard_criteria.h $ -// $Id: Standard_criteria.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Standard_criteria.h $ +// $Id: include/CGAL/Surface_mesher/Standard_criteria.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher.h index 4b84bc7c..c63d250b 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h $ -// $Id: Surface_mesher.h 0b4f136 2022-01-10T10:41:44+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h $ +// $Id: include/CGAL/Surface_mesher/Surface_mesher.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -387,7 +387,7 @@ namespace CGAL { error_msg << boost::format("Surface_mesher ERROR: " "A facet is not in conflict with its refinement point!\n" - "Debugging informations:\n" + "Debugging information:\n" " Facet: (%1%, %2%) = (%6%, %7%, %8%)\n" " Dual: (%3%, %4%)\n" " Refinement point: %5%\n") diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_edges_level.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_edges_level.h index 61bb6ea2..30a58edf 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_edges_level.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_edges_level.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_edges_level.h $ -// $Id: Surface_mesher_edges_level.h 6ac74ca 2022-01-07T09:26:10+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_edges_level.h $ +// $Id: include/CGAL/Surface_mesher/Surface_mesher_edges_level.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h index 4d7618a1..753e3103 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h $ -// $Id: Surface_mesher_edges_level_visitor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h $ +// $Id: include/CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_manifold.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_manifold.h index 03dce079..63465b81 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_manifold.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_manifold.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_manifold.h $ -// $Id: Surface_mesher_manifold.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_manifold.h $ +// $Id: include/CGAL/Surface_mesher/Surface_mesher_manifold.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -107,15 +107,17 @@ namespace CGAL { { #ifdef CGAL_SURFACE_MESHER_VERBOSE std::cerr << "scanning vertices" << std::endl; -#endif int n = 0; +#endif for (Finite_vertices_iterator vit = SMMBB::tr.finite_vertices_begin(); vit != SMMBB::tr.finite_vertices_end(); ++vit) { if ( (SMMBB::c2t3.face_status(vit) // @TODO: appeler is_regular == C2t3::SINGULAR) ) { bad_vertices.insert( vit ); +#ifdef CGAL_SURFACE_MESHER_VERBOSE ++n; +#endif } } bad_vertices_initialized = true; diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h index 07a8f475..1b5dcd66 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h $ -// $Id: Surface_mesher_regular_edges.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h $ +// $Id: include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -213,8 +213,8 @@ namespace CGAL { if(withBoundary) std::cerr << "(boundaries allowed)"; std::cerr << "...\n"; -#endif int n = 0; +#endif for (Finite_edges_iterator eit = SMB::tr.finite_edges_begin(); eit != SMB::tr.finite_edges_end(); ++eit) { if ( (SMB::c2t3.face_status(*eit) @@ -223,7 +223,9 @@ namespace CGAL { (SMB::c2t3.face_status(*eit) == C2t3::BOUNDARY) ) ) { bad_edges.insert( edge_to_edgevv(*eit) ); +#ifdef CGAL_SURFACE_MESHER_VERBOSE ++n; +#endif } } bad_edges_initialized = true; diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_visitor.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_visitor.h index 058a7867..dcbe1db1 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Surface_mesher_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_visitor.h $ -// $Id: Surface_mesher_visitor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_visitor.h $ +// $Id: include/CGAL/Surface_mesher/Surface_mesher_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Types_generators.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Types_generators.h index 68e9cf03..20877679 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Types_generators.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Types_generators.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Types_generators.h $ -// $Id: Types_generators.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Types_generators.h $ +// $Id: include/CGAL/Surface_mesher/Types_generators.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Verbose_flag.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Verbose_flag.h index b2fc6b15..da2cccb0 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Verbose_flag.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Verbose_flag.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Verbose_flag.h $ -// $Id: Verbose_flag.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Verbose_flag.h $ +// $Id: include/CGAL/Surface_mesher/Verbose_flag.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h index 639a8b90..5d25d945 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h $ -// $Id: Vertices_on_the_same_psc_element_criterion.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h $ +// $Id: include/CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h b/thirdparty/CGAL/include/CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h index 1dc4b9fe..36e1edfd 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h $ -// $Id: Vertices_on_the_same_surface_criterion.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h $ +// $Id: include/CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_mesher_generator.h b/thirdparty/CGAL/include/CGAL/Surface_mesher_generator.h index b22ae994..91e22443 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_mesher_generator.h +++ b/thirdparty/CGAL/include/CGAL/Surface_mesher_generator.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/Surface_mesher_generator.h $ -// $Id: Surface_mesher_generator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/Surface_mesher_generator.h $ +// $Id: include/CGAL/Surface_mesher_generator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2.h index cca5d6b6..c03dd7b7 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2.h $ -// $Id: Surface_sweep_2.h 6b64dc8 2020-11-11T09:38:55+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2.h $ +// $Id: include/CGAL/Surface_sweep_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman @@ -24,7 +24,6 @@ #include #include -#include #include #include #include @@ -102,7 +101,7 @@ class Surface_sweep_2 : public No_intersection_surface_sweep_2 { typedef typename Base::Status_line_iterator Status_line_iterator; typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_result; typedef std::vector Intersection_vector; typedef Random_access_output_iterator @@ -122,12 +121,12 @@ class Surface_sweep_2 : public No_intersection_surface_sweep_2 { // Data members: Subcurve_container m_overlap_subCurves; // Contains all of the new sub-curves - // creaed by an overlap. + // created by an overlap. Intersection_vector m_x_objects; // Auxiliary vector for storing the // intersection objects. - X_monotone_curve_2 m_sub_cv1; // Auxiliary varibales + X_monotone_curve_2 m_sub_cv1; // Auxiliary variables X_monotone_curve_2 m_sub_cv2; // (for splitting curves). public: @@ -145,7 +144,7 @@ class Surface_sweep_2 : public No_intersection_surface_sweep_2 { Base(traits, visitor) {} - /*! Destrcut. */ + /*! Destruct. */ virtual ~Surface_sweep_2() {} protected: @@ -184,10 +183,10 @@ class Surface_sweep_2 : public No_intersection_surface_sweep_2 { * \param overlap_cv the overlapping curve. * \param c1 first subcurve contributing to the overlap. * \param c2 second subcurve contributing to the overlap. - * \param all_leaves_diff not empty in case c1 and c2 have common ancesters. + * \param all_leaves_diff not empty in case c1 and c2 have common ancestors. * It contains the set of curves not contained in first_parent * that are in the other subcurve - * \param first_parent only used when c1 and c2 have common ancesters. + * \param first_parent only used when c1 and c2 have common ancestors. * It is either c1 or c2 (the one having the more leaves) * */ @@ -222,7 +221,7 @@ class Surface_sweep_2 : public No_intersection_surface_sweep_2 { * \param c2 The second curve. */ void _create_intersection_point(const Point_2& xp, - unsigned int mult, + Multiplicity mult, Subcurve*& c1, Subcurve*& c2); }; diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h index a6fba911..ce9e4c8f 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h $ -// $Id: Arr_basic_insertion_traits_2.h 6b64dc8 2020-11-11T09:38:55+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h $ +// $Id: include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ /*! \file * - * Defintion of the Arr_basic_insertion_traits_2 class. + * Definition of the Arr_basic_insertion_traits_2 class. */ #include @@ -440,7 +440,7 @@ class Arr_basic_insertion_traits_2 { { return (m_base_eq(p1.base(), p2.base())); } }; - /*! Obtain a Equal_2 function object */ + /*! Obtain an `Equal_2` function object */ Equal_2 equal_2_object() const { return (Equal_2(m_base_traits->equal_2_object())); } diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_batched_pl_ss_visitor.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_batched_pl_ss_visitor.h index 92cfc131..ed481e5b 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_batched_pl_ss_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_batched_pl_ss_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_batched_pl_ss_visitor.h $ -// $Id: Arr_batched_pl_ss_visitor.h 5985db1 2021-07-28T16:17:10+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_batched_pl_ss_visitor.h $ +// $Id: include/CGAL/Surface_sweep_2/Arr_batched_pl_ss_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_event.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_event.h index 994a9c10..1d38766f 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_event.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_event.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event.h $ -// $Id: Arr_construction_event.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event.h $ +// $Id: include/CGAL/Surface_sweep_2/Arr_construction_event.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Tali Zvi @@ -50,7 +50,7 @@ namespace Ss2 = Surface_sweep_2; * parameters of the surface-sweep visitor class templates. It enables the * definition of these two types, which refer one to another; (the curves to the * right of an event and the curves to its left are data members of the event, - * and the two events associated with the endpoints of a curve are data memebrs + * and the two events associated with the endpoints of a curve are data members * of the curve.) * * If you need to represent an event with additional data members, introduce a diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h index a82a6a95..bc617c38 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h $ -// $Id: Arr_construction_event_base.h 5985db1 2021-07-28T16:17:10+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h $ +// $Id: include/CGAL/Surface_sweep_2/Arr_construction_event_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Tali Zvi @@ -40,10 +40,10 @@ namespace Ss2 = Surface_sweep_2; * information is stored, in order to expedite the insertion of curves into the * arrangement. * - * The additional infomation contains the following: + * The additional information contains the following: * - among the left curves of the event, we keep the highest halfedge that * was inserted into the arrangement at any given time and when there are no - * left curves, we keep the highest halfedge that was inseted to the right. + * left curves, we keep the highest halfedge that was inserted to the right. * * \tparam GeometryTraits_2 the geometry traits. * \tparam Allocator_ a type of an element that is used to acquire/release @@ -174,7 +174,7 @@ class Arr_construction_event_base : } /*! Return true iff 'curve' is the toppest curve among the halfedges - * to the right fo the event that were already were inserted to the + * to the right of the event that were already were inserted to the * arrangement. */ bool is_curve_largest(Subcurve *curve) diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h index 1fe827f0..88bb9c67 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h $ -// $Id: Arr_construction_ss_visitor.h 6e1fc8a 2021-09-02T16:53:07+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h $ +// $Id: include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -637,7 +637,7 @@ add_subcurve(const X_monotone_curve_2& cv, Subcurve* sc) #endif } - // Update the last event with the inserted halfegde (if necessary) + // Update the last event with the inserted halfedge (if necessary) // and check if we have to update the auxiliary information on the location // of holes. if ((last_event->number_of_left_curves() == 0) && @@ -747,7 +747,7 @@ insert_at_vertices(const X_monotone_curve_2& cv, #endif // Use the helper class to determine whether the order of predecessor - // halfedges should be swaped, to that the edge directed from prev1->target() + // halfedges should be swapped, to that the edge directed from prev1->target() // to prev2->target() is incident to the new face (in case a new face is // created). Halfedge_handle res; diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h index 5b8f9433..fef64b6c 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h $ -// $Id: Arr_construction_subcurve.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h $ +// $Id: include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Tali Zvi @@ -200,7 +200,7 @@ class Arr_construction_subcurve : typedef typename Base::Event_ptr Event_ptr; typedef typename Base::Halfedge_indices_list Halfedge_indices_list; - /*! Construct deafult. */ + /*! Construct default. */ Arr_construction_subcurve() {} /*! Constructor from an x-monotone curve. */ diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_default_overlay_traits_base.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_default_overlay_traits_base.h index cbc996d6..c653bf35 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_default_overlay_traits_base.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_default_overlay_traits_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_default_overlay_traits_base.h $ -// $Id: Arr_default_overlay_traits_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_default_overlay_traits_base.h $ +// $Id: include/CGAL/Surface_sweep_2/Arr_default_overlay_traits_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_insertion_ss_visitor.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_insertion_ss_visitor.h index 05b5f044..0689c56b 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_insertion_ss_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_insertion_ss_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_ss_visitor.h $ -// $Id: Arr_insertion_ss_visitor.h 6e1fc8a 2021-09-02T16:53:07+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_ss_visitor.h $ +// $Id: include/CGAL/Surface_sweep_2/Arr_insertion_ss_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Baruch Zukerman diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h index 067b7e10..0cf513bf 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h $ -// $Id: Arr_insertion_traits_2.h 4158542 2020-04-01T12:31:51+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h $ +// $Id: include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ /*! \file * - * Defintion of the Arr_insertion_traits_2 class. + * Definition of the Arr_insertion_traits_2 class. */ #include @@ -98,9 +98,9 @@ class Arr_insertion_traits_2 : OutputIterator oi) { typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_result; - typedef boost::variant + typedef std::variant Intersection_base_result; Halfedge_handle invalid_he; @@ -120,13 +120,13 @@ class Arr_insertion_traits_2 : // X_monotone_curve_2 for (const auto& xection : xections) { const Intersection_point* - p_p = boost::get(&xection); + p_p = std::get_if(&xection); if (p_p != nullptr) { - *oi++ = Intersection_result(xection); + *oi++ = Intersection_result(*p_p); continue; } const Base_x_monotone_curve_2* base_cv_p = - boost::get(&xection); + std::get_if(&xection); CGAL_assertion(base_cv_p); // Add halfedge handles to the resulting curve. diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_no_intersection_insertion_ss_visitor.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_no_intersection_insertion_ss_visitor.h index e2a78f35..b12f3985 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_no_intersection_insertion_ss_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_no_intersection_insertion_ss_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_no_intersection_insertion_ss_visitor.h $ -// $Id: Arr_no_intersection_insertion_ss_visitor.h 6e1fc8a 2021-09-02T16:53:07+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_no_intersection_insertion_ss_visitor.h $ +// $Id: include/CGAL/Surface_sweep_2/Arr_no_intersection_insertion_ss_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,7 @@ * This class can be further split into two, where one derives from the other, * such that the derived class handles the case of inserting non-intersecting * curves into a non-empty arrangement, and the base class handles the case of - * inserting non-intersecting curves into a empty arrangement. + * inserting non-intersecting curves into an empty arrangement. */ #include diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_event.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_event.h index bb081655..a90beb9d 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_event.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_event.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_event.h $ -// $Id: Arr_overlay_event.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_event.h $ +// $Id: include/CGAL/Surface_sweep_2/Arr_overlay_event.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Tali Zvi diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h index 48541ae5..52760dd4 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h $ -// $Id: Arr_overlay_ss_visitor.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h $ +// $Id: include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,9 +22,8 @@ * Definition of the Arr_overlay_ss_visitor class-template. */ -#include -#include -#include +#include +#include #include @@ -289,50 +288,50 @@ class Arr_overlay_ss_visitor : /*! * Update the boundary vertices map. * This function is used when the parameter space has an identified (or - * contructed) boundary side. We assume that if the parameter space has a - * contructed boundary side, it also must have an identified boundary side. + * constructed) boundary side. We assume that if the parameter space has a + * constructed boundary side, it also must have an identified boundary side. * \param event The event. * \param v The vertex. * \param tag The tag used for dispatching. */ void _map_boundary_vertices(Event* event, Vertex_handle v, - boost::mpl::bool_ /* tag */); + std::bool_constant /* tag */); /*! * Update the boundary vertices map. * This function is used when the parameter space does not have an identified - * boundary side, and thus, neither it has a contructed boundary side. + * boundary side, and thus, neither it has a constructed boundary side. * \param event The event. * \param v The vertex. * \param tag The tag used for dispatching. */ void _map_boundary_vertices(Event* event, Vertex_handle v, - boost::mpl::bool_ /* tag */); + std::bool_constant /* tag */); /*! * Update a newly created vertex using the overlay traits. * This function is used when the parameter space has an identified (or - * contructed) boundary side. We assume that if the parameter space has a - * contructed boundary side, it also must have an identified boundary side. + * constructed) boundary side. We assume that if the parameter space has a + * constructed boundary side, it also must have an identified boundary side. * \param event The event associated with the new vertex. * \param res_v The new vertex in the overlaid arrangement. * \param sc The subcurve incident to the event. * \param tag The tag used for dispatching. */ void _create_vertex(Event* event, Vertex_handle res_v, Subcurve* sc, - boost::mpl::bool_ /* tag */); + std::bool_constant /* tag */); /*! * Update a newly created vertex using the overlay traits. * This function is used when the parameter space does not have an identified - * boundary side, and thus, neither it has a contructed boundary side. + * boundary side, and thus, neither it has a constructed boundary side. * \param event The event associated with the new vertex. * \param res_v The new vertex in the overlaid arrangement. * \param sc The subcurve incident to the event. * \param tag The tag used for dispatching. */ void _create_vertex(Event* event, Vertex_handle res_v, Subcurve* sc, - boost::mpl::bool_ /* tag */); + std::bool_constant /* tag */); /*! * Update a newly created edge using the overlay traits. @@ -344,7 +343,7 @@ class Arr_overlay_ss_visitor : //@} /*! A visitor class to facilitate the call to create_vertex(). */ - class Create_vertex_visitor : public boost::static_visitor<> { + class Create_vertex_visitor { private: Overlay_traits* m_overlay_traits; Vertex_handle m_vertex_handle; @@ -524,11 +523,11 @@ void Arr_overlay_ss_visitor::update_event(Event* e, CGAL_assertion(sc->color() == Gt2::RED); Halfedge_handle_red red_he = sc->red_halfedge_handle(); - pt.set_red_cell(boost::make_optional(Cell_handle_red(red_he))); + pt.set_red_cell(std::make_optional(Cell_handle_red(red_he))); } else if (pt.is_blue_cell_empty()) { Halfedge_handle_blue blue_he = sc->blue_halfedge_handle(); - pt.set_blue_cell(boost::make_optional(Cell_handle_blue(blue_he))); + pt.set_blue_cell(std::make_optional(Cell_handle_blue(blue_he))); } } @@ -563,7 +562,7 @@ void Arr_overlay_ss_visitor::after_sweep() const Cell_handle_blue& blue_handle = info.second; Vertex_handle v = (*it).first; Create_vertex_visitor visitor(m_overlay_traits, v); - boost::apply_visitor(visitor, red_handle, blue_handle); + std::visit(visitor, red_handle, blue_handle); } // When the sweep-line process is over, the remaining arrangement face @@ -923,7 +922,7 @@ _map_halfedge_and_twin(Halfedge_handle he, // template void Arr_overlay_ss_visitor:: -_map_boundary_vertices(Event* event, Vertex_handle v, boost::mpl::bool_) +_map_boundary_vertices(Event* event, Vertex_handle v, std::bool_constant) { // Update the red and blue object if the last event on sc is on the boundary. if ((event->parameter_space_in_x() != ARR_INTERIOR) || @@ -938,8 +937,8 @@ _map_boundary_vertices(Event* event, Vertex_handle v, boost::mpl::bool_) const Cell_handle_red* red_handle_p = pt.red_cell_handle(); if (red_handle_p) info.first = *red_handle_p; - if (!boost::get(&(info.first)) && - !boost::get(&(info.second))) + if (!std::get_if(&(info.first)) && + !std::get_if(&(info.second))) { // If both, the red and blue, variants do not represent face handles, // they must represt either vertex or edge handles. In this case it is @@ -949,7 +948,7 @@ _map_boundary_vertices(Event* event, Vertex_handle v, boost::mpl::bool_) const Cell_handle_blue& blue_handle = info.second; Vertex_handle v = (*it).first; Create_vertex_visitor visitor(m_overlay_traits, v); - boost::apply_visitor(visitor, red_handle, blue_handle); + std::visit(visitor, red_handle, blue_handle); m_vertices_map.erase(it); } } @@ -961,7 +960,7 @@ _map_boundary_vertices(Event* event, Vertex_handle v, boost::mpl::bool_) template void Arr_overlay_ss_visitor:: _map_boundary_vertices(Event* /* event */, Vertex_handle /* v */, - boost::mpl::bool_) + std::bool_constant) {} /* Notify the overlay traits about a newly created vertex. @@ -975,7 +974,7 @@ void Arr_overlay_ss_visitor:: _create_vertex(Event* event, Vertex_handle new_v, Subcurve* sc, - boost::mpl::bool_) + std::bool_constant) { const Point_2& pt = event->point(); const Cell_handle_red* red_handle = pt.red_cell_handle(); @@ -1012,7 +1011,7 @@ _create_vertex(Event* event, return; } - _create_vertex(event, new_v, sc, boost::mpl::bool_()); + _create_vertex(event, new_v, sc, std::bool_constant()); } /* Notify the overlay traits about a newly created vertex. */ @@ -1021,7 +1020,7 @@ void Arr_overlay_ss_visitor:: _create_vertex(Event* event, Vertex_handle new_v, Subcurve* sc, - boost::mpl::bool_) + std::bool_constant) { const Point_2& pt = event->point(); const Cell_handle_red* red_handle = pt.red_cell_handle(); @@ -1035,7 +1034,7 @@ _create_vertex(Event* event, CGAL_assertion(blue_handle != nullptr); const Vertex_handle_blue& blue_v = - boost::get(*blue_handle); + std::get(*blue_handle); m_overlay_traits->create_vertex(red_f, blue_v, new_v); return; } @@ -1049,13 +1048,13 @@ _create_vertex(Event* event, CGAL_assertion(red_handle != nullptr); const Vertex_handle_red& red_v = - boost::get(*red_handle); + std::get(*red_handle); m_overlay_traits->create_vertex(red_v, blue_f, new_v); return; } Create_vertex_visitor visitor(m_overlay_traits, new_v); - boost::apply_visitor(visitor, *red_handle, *blue_handle); + std::visit(visitor, *red_handle, *blue_handle); } //----------------------------------------------------------------------------- diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h index 7197cf84..dd563ab8 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h $ -// $Id: Arr_overlay_subcurve.h b0c3c84 2019-12-18T09:05:45+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h $ +// $Id: include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h index ad703655..31c989f3 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h $ -// $Id: Arr_overlay_traits_2.h 6b64dc8 2020-11-11T09:38:55+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h $ +// $Id: include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,11 +19,11 @@ /*! \file * - * Defintion of the Arr_overlay_traits_2 class-template. + * Definition of the Arr_overlay_traits_2 class-template. */ -#include -#include +#include +#include #include @@ -105,21 +105,21 @@ class Arr_overlay_traits_2 { RB_OVERLAP // Red-blue overlap. }; - typedef boost::variant Cell_handle_red; - typedef boost::optional Optional_cell_red; + typedef std::optional Optional_cell_red; - typedef boost::variant Cell_handle_blue; - typedef boost::optional Optional_cell_blue; + typedef std::optional Optional_cell_blue; template Optional_cell_red make_optional_cell_red(Handle_red handle_red) - { return boost::make_optional(Cell_handle_red(handle_red)); } + { return std::make_optional(Cell_handle_red(handle_red)); } template Optional_cell_red make_optional_cell_blue(Handle_blue handle_blue) - { return boost::make_optional(Cell_handle_blue(handle_blue)); } + { return std::make_optional(Cell_handle_blue(handle_blue)); } private: const Gt2* m_base_traits; // The base traits object. @@ -323,14 +323,14 @@ class Arr_overlay_traits_2 { /*! Obtain the red vertex handle or nullptr if it doesn't exist. */ const Vertex_handle_red* red_vertex_handle() const { - return m_red_cell ? boost::get(&(*m_red_cell)) : nullptr; + return m_red_cell ? std::get_if(&(*m_red_cell)) : nullptr; } /*! Obtain the blue vertex handle or nullptr if it doesn't exist. */ const Vertex_handle_blue* blue_vertex_handle() const { return - m_blue_cell ? boost::get(&(*m_blue_cell)) : nullptr; + m_blue_cell ? std::get_if(&(*m_blue_cell)) : nullptr; } }; @@ -371,10 +371,10 @@ class Arr_overlay_traits_2 { OutputIterator oi) { typedef std::pair Intersection_point; - typedef boost::variant + typedef std::variant Intersection_result; typedef std::pair Intersection_base_point; - typedef boost::variant + typedef std::variant Intersection_base_result; // In case the curves originate from the same arrangement, they are @@ -437,10 +437,10 @@ class Arr_overlay_traits_2 { intersector(xcv2.base(), xcv1.base(), std::back_inserter(xections)); // Convert objects that are associated with Base_x_monotone_curve_2 to - // the exteneded X_monotone_curve_2. + // the extended X_monotone_curve_2. for (const auto& xection : xections) { const Intersection_base_point* base_ipt = - boost::get(&xection); + std::get_if(&xection); if (base_ipt != nullptr) { // We have a red-blue intersection point, so we attach the // intersecting red and blue halfedges to it. @@ -450,16 +450,16 @@ class Arr_overlay_traits_2 { if (xcv1.color() == RED) { CGAL_assertion(xcv2.color() == BLUE); red_cell = - boost::make_optional(Cell_handle_red(xcv1.red_halfedge_handle())); + std::make_optional(Cell_handle_red(xcv1.red_halfedge_handle())); blue_cell = - boost::make_optional(Cell_handle_blue(xcv2.blue_halfedge_handle())); + std::make_optional(Cell_handle_blue(xcv2.blue_halfedge_handle())); } else { CGAL_assertion((xcv2.color() == RED) && (xcv1.color() == BLUE)); red_cell = - boost::make_optional(Cell_handle_red(xcv2.red_halfedge_handle())); + std::make_optional(Cell_handle_red(xcv2.red_halfedge_handle())); blue_cell = - boost::make_optional(Cell_handle_blue(xcv1.blue_halfedge_handle())); + std::make_optional(Cell_handle_blue(xcv1.blue_halfedge_handle())); } // Create the extended point and add the multiplicity. @@ -470,7 +470,7 @@ class Arr_overlay_traits_2 { } const Base_x_monotone_curve_2* overlap_xcv = - boost::get(&xection); + std::get_if(&xection); CGAL_assertion(overlap_xcv != nullptr); // We have a red-blue overlap, so we mark the curve accordingly. @@ -574,15 +574,15 @@ class Arr_overlay_traits_2 { red_cell = (! xcv.red_halfedge_handle()->target()->is_at_open_boundary() && m_base_equal(base_p, xcv.red_halfedge_handle()->target()->point())) ? - boost::make_optional(Cell_handle_red(xcv.red_halfedge_handle()->target())) : - boost::make_optional(Cell_handle_red(xcv.red_halfedge_handle())); + std::make_optional(Cell_handle_red(xcv.red_halfedge_handle()->target())) : + std::make_optional(Cell_handle_red(xcv.red_halfedge_handle())); if ((xcv.color() == BLUE) || (xcv.color() == RB_OVERLAP)) blue_cell = (! xcv.blue_halfedge_handle()->target()->is_at_open_boundary() && m_base_equal(base_p, xcv.blue_halfedge_handle()->target()->point())) ? - boost::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle()->target())) : - boost::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle())); + std::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle()->target())) : + std::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle())); return Point_2(base_p, red_cell, blue_cell); } @@ -631,15 +631,15 @@ class Arr_overlay_traits_2 { red_cell = (! xcv.red_halfedge_handle()->source()->is_at_open_boundary() && m_base_equal(base_p, xcv.red_halfedge_handle()->source()->point())) ? - boost::make_optional(Cell_handle_red(xcv.red_halfedge_handle()->source())) : - boost::make_optional(Cell_handle_red(xcv.red_halfedge_handle())); + std::make_optional(Cell_handle_red(xcv.red_halfedge_handle()->source())) : + std::make_optional(Cell_handle_red(xcv.red_halfedge_handle())); if ((xcv.color() == BLUE) || (xcv.color() == RB_OVERLAP)) blue_cell = (! xcv.blue_halfedge_handle()->source()->is_at_open_boundary() && m_base_equal(base_p, xcv.blue_halfedge_handle()->source()->point())) ? - boost::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle()->source())) : - boost::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle())); + std::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle()->source())) : + std::make_optional(Cell_handle_blue(xcv.blue_halfedge_handle())); return (Point_2(base_p, red_cell, blue_cell)); } @@ -705,7 +705,7 @@ class Arr_overlay_traits_2 { { return m_base_equal(xcv1.base(), xcv2.base()); } }; - /*! Obtain a Equal_2 functor object. */ + /*! Obtain an `Equal_2` functor object. */ Equal_2 equal_2_object() const { return Equal_2(m_base_traits->equal_2_object()); } @@ -753,7 +753,7 @@ class Arr_overlay_traits_2 { public: Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { - // Check if there wither points represent red or blue vertices. + // Check if there whether points represent red or blue vertices. const Vertex_handle_red* vr1 = p1.red_vertex_handle(); const Vertex_handle_red* vr2 = p2.red_vertex_handle(); const Vertex_handle_blue* vb1 = p1.blue_vertex_handle(); @@ -983,7 +983,7 @@ class Arr_overlay_traits_2 { Is_on_x_identification_2 is_on_x_identification_2_object() const { return Is_on_x_identification_2(m_base_traits); } - /*! A functor that compares the y-values of pointss on the + /*! A functor that compares the y-values of points on the * boundary of the parameter space. */ class Compare_y_on_boundary_2 { @@ -1115,7 +1115,7 @@ class Arr_overlay_traits_2 { Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(m_base_traits); } - /*! A functor that compares the y-values of pointss on the + /*! A functor that compares the y-values of points on the * boundary of the parameter space. */ class Compare_x_on_boundary_2 { diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_vert_decomp_ss_visitor.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_vert_decomp_ss_visitor.h index f7c69286..da3d6a26 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_vert_decomp_ss_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Arr_vert_decomp_ss_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_vert_decomp_ss_visitor.h $ -// $Id: Arr_vert_decomp_ss_visitor.h 5985db1 2021-07-28T16:17:10+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_vert_decomp_ss_visitor.h $ +// $Id: include/CGAL/Surface_sweep_2/Arr_vert_decomp_ss_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Ron Wein @@ -20,7 +20,7 @@ * Definition of the Arr_vert_decomp_ss_visitor class-template. */ -#include +#include namespace CGAL { @@ -66,10 +66,10 @@ class Arr_vert_decomp_ss_visitor : typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; typedef typename Arrangement_2::Face_const_handle Face_const_handle; - typedef boost::variant Cell_type; - typedef boost::optional Vert_type; + typedef std::optional Vert_type; typedef std::pair Vert_pair; typedef std::pair Vert_entry; diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Curve_comparer.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Curve_comparer.h index 51ccc8a6..7c7eb58b 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Curve_comparer.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Curve_comparer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/Curve_comparer.h $ -// $Id: Curve_comparer.h 2a3fbc0 2019-11-19T09:47:44+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/Curve_comparer.h $ +// $Id: include/CGAL/Surface_sweep_2/Curve_comparer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Tali Zvi diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_event.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_event.h index 97640326..0baa6d86 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_event.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_event.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event.h $ -// $Id: Default_event.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event.h $ +// $Id: include/CGAL/Surface_sweep_2/Default_event.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Tali Zvi , @@ -19,7 +19,7 @@ /*! \file * - * Defintion of the Default_event class. + * Definition of the Default_event class. */ #include @@ -44,7 +44,7 @@ namespace Surface_sweep_2 { * parameters of the surface-sweep visitor class templates. It enables the * definition of these two types, which refer one to another; (the curves to the * right of an event and the curves to its left are data members of the event, - * and the two events associated with the endpoints of a curve are data memebrs + * and the two events associated with the endpoints of a curve are data members * of the curve.) * * If you need to represent an event with additional data members, introduce a diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_event_base.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_event_base.h index b4fc9eb0..0d016baf 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_event_base.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_event_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event_base.h $ -// $Id: Default_event_base.h 092cf8e 2019-10-25T16:26:17+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event_base.h $ +// $Id: include/CGAL/Surface_sweep_2/Default_event_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Tali Zvi , @@ -19,7 +19,7 @@ /*! \file * - * Defintion of the Default_event_base class. + * Definaition of the Default_event_base class. */ #include @@ -30,7 +30,7 @@ namespace Surface_sweep_2 { /*! \class Default_event_base * * A class associated with an event in a sweep line algorithm. - * An intersection point in the sweep line algorithm is refered to as an event. + * An intersection point in the sweep line algorithm is referred to as an event. * This class contains the information that is associated with any given * event point. This information contains the following: * - the actual point @@ -86,7 +86,7 @@ class Default_event_base : if ((curve == *iter) || (*iter)->is_inner_node(curve)) return; // Replace the existing curve in case of overlap, only if the set of - // ancesters of curve contains the set of ancesters of *iter + // ancestors of curve contains the set of ancestors of *iter if (curve->has_common_leaf(*iter)) { if (curve->number_of_original_curves() > (*iter)->number_of_original_curves()) diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_subcurve.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_subcurve.h index 4c6c21f4..15c30438 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_subcurve.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_subcurve.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_subcurve.h $ -// $Id: Default_subcurve.h a3d04af 2021-07-28T16:19:20+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_subcurve.h $ +// $Id: include/CGAL/Surface_sweep_2/Default_subcurve.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Tali Zvi , @@ -19,7 +19,7 @@ /*! \file * - * Defintion of the Default_subcurve class, which is an extended curve + * Definition of the Default_subcurve class, which is an extended curve * type, referred to as Subcurve, used by the surface-sweep framework. * * The surface-sweep framework is implemented as a template that is @@ -59,7 +59,7 @@ namespace Surface_sweep_2 { * * The information contained in this class is: * - two pointers to subcurves that are the originating subcurves in case of - * an overlap, otherwise thay are both nullptr. + * an overlap, otherwise they are both nullptr. */ template @@ -104,6 +104,17 @@ class Default_subcurve_base : public: + + void reset_left_event() + { + this->set_left_event(static_cast(nullptr)); + if (m_orig_subcurve1) + { + m_orig_subcurve1->reset_left_event(); + m_orig_subcurve2->reset_left_event(); + } + } + /*! Get the subcurves that originate an overlap. */ Subcurve* originating_subcurve1() { return m_orig_subcurve1; } @@ -299,7 +310,7 @@ class Default_subcurve_base : * structure, and to construct/destroy the elements in that * memory. The type must meet the requirements of Allocator. * \tparam Subcurve_ the type of the subcurve or Default. If the default is not - * overriden it implies that the type is + * overridden it implies that the type is * No_overlap_subcurve */ template diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_visitor_base.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_visitor_base.h index 52d83232..b9177f8f 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_visitor_base.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Default_visitor_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_visitor_base.h $ -// $Id: Default_visitor_base.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_visitor_base.h $ +// $Id: include/CGAL/Surface_sweep_2/Default_visitor_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman @@ -84,7 +84,7 @@ class Default_visitor_base { /*! Destructor */ virtual ~Default_visitor_base() {} - /*! Attach the a sweep-line object. */ + /*! Attach a sweep-line object. */ void attach(Surface_sweep_2* sl) { m_surface_sweep = sl; } /*! diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Do_interior_intersect_visitor.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Do_interior_intersect_visitor.h index ba50f9db..6216dd84 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Do_interior_intersect_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Do_interior_intersect_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/Do_interior_intersect_visitor.h $ -// $Id: Do_interior_intersect_visitor.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/Do_interior_intersect_visitor.h $ +// $Id: include/CGAL/Surface_sweep_2/Do_interior_intersect_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Event_comparer.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Event_comparer.h index 696455dc..60176b3b 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Event_comparer.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Event_comparer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/Event_comparer.h $ -// $Id: Event_comparer.h 4c15a1c 2021-10-18T11:15:14+01:00 Michael Bell +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/Event_comparer.h $ +// $Id: include/CGAL/Surface_sweep_2/Event_comparer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Tali Zvi diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Intersection_points_visitor.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Intersection_points_visitor.h index cac02dc8..69a4f2b6 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Intersection_points_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Intersection_points_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/Intersection_points_visitor.h $ -// $Id: Intersection_points_visitor.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/Intersection_points_visitor.h $ +// $Id: include/CGAL/Surface_sweep_2/Intersection_points_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_intersection_surface_sweep_2_impl.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_intersection_surface_sweep_2_impl.h index df121034..3d69ce32 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_intersection_surface_sweep_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_intersection_surface_sweep_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_intersection_surface_sweep_2_impl.h $ -// $Id: No_intersection_surface_sweep_2_impl.h facabca 2021-09-10T17:47:17+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_intersection_surface_sweep_2_impl.h $ +// $Id: include/CGAL/Surface_sweep_2/No_intersection_surface_sweep_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman @@ -70,7 +70,7 @@ No_intersection_surface_sweep_2(const Gt2* traits, Visitor* visitor) : { m_visitor->attach(this); } //----------------------------------------------------------------------------- -// Destrcutor. +// Destructor. // template No_intersection_surface_sweep_2::~No_intersection_surface_sweep_2() @@ -402,7 +402,7 @@ void No_intersection_surface_sweep_2::_handle_left_curves() { print_event_info(m_currentEvent); }); // Use the status-line to sort all left subcurves incident to the current - // event (no geometric comparisons are neede at all). + // event (no geometric comparisons are needed at all). _sort_left_curves(); // Now the event is updated, with its left subcurved properly sorted, and diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_overlap_event.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_overlap_event.h index a094030e..b2b88c3c 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_overlap_event.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_overlap_event.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event.h $ -// $Id: No_overlap_event.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event.h $ +// $Id: include/CGAL/Surface_sweep_2/No_overlap_event.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Tali Zvi , @@ -19,7 +19,7 @@ /*! \file * - * Defintion of the No_overlap_event class. + * Definition of the No_overlap_event class. */ #include @@ -45,7 +45,7 @@ namespace Surface_sweep_2 { * parameters of the surface-sweep visitor class templates. It enables the * definition of these two types, which refer one to another; (the curves to the * right of an event and the curves to its left are data members of the event, - * and the two events associated with the endpoints of a curve are data memebrs + * and the two events associated with the endpoints of a curve are data members * of the curve.) * * If you need to represent an event with additional data members, introduce a diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_overlap_event_base.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_overlap_event_base.h index 252bca65..d593b734 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_overlap_event_base.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_overlap_event_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event_base.h $ -// $Id: No_overlap_event_base.h efa642a 2021-03-25T15:43:48+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event_base.h $ +// $Id: include/CGAL/Surface_sweep_2/No_overlap_event_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Tali Zvi , @@ -19,7 +19,7 @@ /*! \file * - * Defintion of the No_overlap_event_base class. + * Definition of the No_overlap_event_base class. */ #include @@ -84,7 +84,7 @@ class Event_base_for_compact_container /*! \class No_overlap_event_base * * A class associated with an event in a surface-sweep algorithm. - * An intersection point in the sweep line algorithm is refered to as an event. + * An intersection point in the sweep line algorithm is referred to as an event. * This class contains the information that is associated with any given * event point. This information contains the following: * - the actual point @@ -485,7 +485,7 @@ class No_overlap_event_base { } /*! Check if the two curves are negihbors to the left of the event. */ - bool are_left_neighbours(Subcurve* c1, Subcurve* c2) + bool are_left_neighbors(Subcurve* c1, Subcurve* c2) { Subcurve_iterator left_iter = m_left_curves.begin(); for (; left_iter != m_left_curves.end(); ++left_iter) { @@ -506,6 +506,10 @@ class No_overlap_event_base { return false; } + /*! \copydoc are_left_neighbors + * \deprecated please use #are_left_neighbors */ + CGAL_DEPRECATED bool are_left_neighbours(Subcurve* c1, Subcurve* c2) + { return are_left_neighbors(c1, c2); } #ifdef CGAL_SS_VERBOSE void Print() const; diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_overlap_subcurve.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_overlap_subcurve.h index 33e3abaf..5848b33f 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_overlap_subcurve.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/No_overlap_subcurve.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_subcurve.h $ -// $Id: No_overlap_subcurve.h a3d04af 2021-07-28T16:19:20+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_subcurve.h $ +// $Id: include/CGAL/Surface_sweep_2/No_overlap_subcurve.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Tali Zvi , @@ -19,7 +19,7 @@ /*! \file * - * Defintion of the No_overlap_subcurve class, which is an + * Definition of the No_overlap_subcurve class, which is an * extended curve type, referred to as Subcurve, used by the surface-sweep * framework. * @@ -122,7 +122,7 @@ class No_overlap_subcurve_base { * No_overlap_subcurve_base class template. * * The information contained in this class (in addition to the information - * contaisn in its base) is: + * contained in its base) is: * - the remaining x-monotone curve that is to the right of the current sweep * line. * \tparam GeometryTraits_2 the geometry traits. @@ -132,7 +132,7 @@ class No_overlap_subcurve_base { * structure, and to construct/destroy the elements in that * memory. The type must meet the requirements of Allocator. * \tparam Subcurve_ the type of the subcurve or Default. If the default is not - * overriden it implies that the type is No_overlap_subcurve. + * overridden it implies that the type is No_overlap_subcurve. */ template diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Subcurves_visitor.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Subcurves_visitor.h index fb4c8667..6c4fe367 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Subcurves_visitor.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Subcurves_visitor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/Subcurves_visitor.h $ -// $Id: Subcurves_visitor.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/Subcurves_visitor.h $ +// $Id: include/CGAL/Surface_sweep_2/Subcurves_visitor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Baruch Zukerman diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Surface_sweep_2_debug.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Surface_sweep_2_debug.h index 140e53c0..b425cc96 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Surface_sweep_2_debug.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Surface_sweep_2_debug.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_debug.h $ -// $Id: Surface_sweep_2_debug.h 63e52b0 2021-03-25T15:42:47+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_debug.h $ +// $Id: include/CGAL/Surface_sweep_2/Surface_sweep_2_debug.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h index e080f7c7..b3e41858 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h $ -// $Id: Surface_sweep_2_impl.h 89e6a98 2021-03-26T09:26:36+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h $ +// $Id: include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Baruch Zukerman @@ -30,7 +30,7 @@ namespace Surface_sweep_2 { template void Surface_sweep_2::_init_structures() { - // Initailize the structures maintained by the base sweep-line class. + // Initialize the structures maintained by the base sweep-line class. Base::_init_structures(); } @@ -172,7 +172,7 @@ void Surface_sweep_2::_handle_left_curves() ++left_iter; //remove curve from the status line (also checks intersection - //between the neighbouring curves,only if the curve is removed for good) + //between the neighboring curves,only if the curve is removed for good) _remove_curve_from_status_line(leftCurve, remove_for_good); } @@ -298,6 +298,14 @@ void Surface_sweep_2::_handle_overlaps_in_right_curves() template void Surface_sweep_2::_handle_right_curves() { + + for(Event_subcurve_iterator sc_it = this->m_currentEvent->right_curves_begin(), + sc_it_end = this->m_currentEvent->right_curves_end(); + sc_it!=sc_it_end; ++sc_it) + { + (*sc_it)->reset_left_event(); + } + CGAL_SS_PRINT_START("handling right curves at ("); CGAL_SS_DEBUG(this->PrintEvent(this->m_currentEvent)); CGAL_SS_PRINT_TEXT(")"); @@ -347,9 +355,9 @@ void Surface_sweep_2::_handle_right_curves() CGAL_SS_PRINT_STATUS_LINE(); - // If the two curves used to be neighbours before, we do not need to + // If the two curves used to be neighbors before, we do not need to // intersect them again. - if (!this->m_currentEvent->are_left_neighbours(*currentOne, *prevOne)) + if (!this->m_currentEvent->are_left_neighbors(*currentOne, *prevOne)) _intersect(*prevOne, *currentOne); prevOne = currentOne; @@ -468,7 +476,7 @@ void Surface_sweep_2::_remove_curve_from_status_line(Subcurve* leftCurve, if (! remove_for_good) { // the subcurve is not removed for good, so we dont need to intersect - // its neighbours after its removal. + // its neighbors after its removal. CGAL_SS_PRINT_ERASE(*sliter); this->m_statusLine.erase(sliter); CGAL_SS_PRINT_END_EOL("Removing a curve from the status line"); @@ -476,7 +484,7 @@ void Surface_sweep_2::_remove_curve_from_status_line(Subcurve* leftCurve, } // the subcurve will be removed for good from the stauts line, we need - // to check for intersection between his two neighbours (below and above him) + // to check for intersection between his two neighbors (below and above him) // but we need to make sure that its not the first or last subcurve // at the status line. CGAL_assertion(sliter != this->m_statusLine.end()); @@ -515,13 +523,13 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, CGAL_assertion(c1 != c2); - // look up for c1 in the table of c2 (or vice versa if c2intersection_exists(c2) : c2->intersection_exists(c1))) { CGAL_SS_PRINT_END_EOL("computing intersection (already computed)"); return; //the curves have already been checked for intersection } - // handle overlapping curves with common ancesters + // handle overlapping curves with common ancestors Subcurve_vector all_leaves_diff; Subcurve* first_parent = nullptr; if ((c1->originating_subcurve1() != nullptr) || @@ -565,10 +573,12 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, Event* left_event = first_parent->left_event(); Event* right_event = first_parent->right_event(); - if (! second_parent->is_start_point(left_event)) - left_event->add_curve_to_left(second_parent); - else - left_event->remove_curve_from_right(second_parent); + if (left_event != nullptr) { + if (! second_parent->is_start_point(left_event)) + left_event->add_curve_to_left(second_parent); + else + left_event->remove_curve_from_right(second_parent); + } CGAL_SS_PRINT_CURVE(c1); CGAL_SS_PRINT_TEXT(" + "); @@ -588,7 +598,8 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, // add the overlapping curve kept of the right of the left end right_event->add_curve_to_left(first_parent); - _add_curve_to_right(left_event, first_parent); + if (left_event != nullptr) + _add_curve_to_right(left_event, first_parent); this->m_visitor->found_overlap(c1, c2, first_parent); @@ -605,7 +616,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, // This is needed rather than simply computing the intersection of // the last curves of first_parent and second_parent as some traits // classes (such as Arr_curve_data_traits_2) override the Intersect_2 - // functor and expects the curve to have no common ancesters + // functor and expects the curve to have no common ancestors // (Arr_curve_data_traits_2 is used in the testsuite to sum up // the overlapping degree of a curve) CGAL_SS_PRINT_TEXT("First parent is: "); @@ -624,7 +635,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, intersector(xc, (*sc_it)->last_curve(), vector_inserter(xections)); CGAL_assertion(xections.size() == 1); auto& item = xections.front(); - xc = *boost::get(&item); + xc = *std::get_if(&item); } CGAL_assertion @@ -667,7 +678,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, this->m_traits->is_closed_2_object()(c1->last_curve(), ARR_MIN_END) && this->m_traits->is_closed_2_object()(c2->last_curve(), ARR_MIN_END)) { - if ((boost::get(&(*vi)) != nullptr) && + if ((std::get_if(&(*vi)) != nullptr) && this->m_traits->equal_2_object()(ctr_min(c1->last_curve()), ctr_min(c2->last_curve()))) { @@ -685,7 +696,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, vector_inserter vi_last = vi_end; --vi_last; - if (boost::get(&(*vi_last)) != nullptr) { + if (std::get_if(&(*vi_last)) != nullptr) { CGAL_SS_PRINT_TEXT("Skipping common right endpoint..."); CGAL_SS_PRINT_EOL(); --vi_end; @@ -712,7 +723,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, vector_inserter vi_last = vi_end; --vi_last; - if (boost::get(&(*vi_last)) != nullptr) { + if (std::get_if(&(*vi_last)) != nullptr) { CGAL_SS_PRINT_TEXT("Skipping common right endpoint on boundary..."); CGAL_SS_PRINT_EOL(); --vi_end; @@ -725,7 +736,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, // SL: curves are split and no event strictly before the current event should // be reported if (vi != vi_end) { - const Intersection_point* xp_point = boost::get(&(*vi)); + const Intersection_point* xp_point = std::get_if(&(*vi)); if (xp_point != nullptr) { // Skip the intersection point if it is not larger than the current event. // To correctly do so, we have to set the ps_x and ps_y for xp_point->first @@ -744,7 +755,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, bool first_i = true; for (; vi != vi_end; ++vi) { Multiplicity multiplicity = 0; - const Intersection_point* xp_point = boost::get(&(*vi)); + const Intersection_point* xp_point = std::get_if(&(*vi)); if (xp_point != nullptr) { Point_2 xp = xp_point->first; multiplicity = xp_point->second; @@ -753,7 +764,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, _create_intersection_point(xp, multiplicity, c1, c2); } else { - const X_monotone_curve_2 icv = *boost::get(&(*vi)); + const X_monotone_curve_2 icv = *std::get_if(&(*vi)); // CGAL_assertion(icv != nullptr); CGAL_SS_PRINT_TEXT("Found an overlap"); @@ -773,7 +784,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, // template void Surface_sweep_2::_create_intersection_point(const Point_2& xp, - unsigned int multiplicity, + Multiplicity multiplicity, Subcurve*& c1, Subcurve*& c2) { @@ -804,7 +815,7 @@ void Surface_sweep_2::_create_intersection_point(const Point_2& xp, // Act according to the multiplicity: if (multiplicity == 0) { - // The multiplicity of the intersection point is unkown or undefined: + // The multiplicity of the intersection point is unknown or undefined: _add_curve_to_right(e, c1); _add_curve_to_right(e, c2); if (e->is_right_curve_bigger(c1, c2, this->m_traits)) std::swap(c1, c2); diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Surface_sweep_2_utils.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Surface_sweep_2_utils.h index 03ca034c..022298ac 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Surface_sweep_2_utils.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2/Surface_sweep_2_utils.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_utils.h $ -// $Id: Surface_sweep_2_utils.h 708469f 2020-06-12T14:06:58+03:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_utils.h $ +// $Id: include/CGAL/Surface_sweep_2/Surface_sweep_2_utils.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -51,7 +51,7 @@ void make_x_monotone(CurveInputIter begin, CurveInputIter end, { typedef typename Traits::Point_2 Point_2; typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2; - typedef boost::variant Make_x_monotone_result; + typedef std::variant Make_x_monotone_result; // Split the input curves into x-monotone objects. std::size_t num_of_curves = std::distance(begin, end); @@ -63,14 +63,14 @@ void make_x_monotone(CurveInputIter begin, CurveInputIter end, // Transform each object to either a point or an x-monotone curve. for (const auto& obj : object_vec) { - const X_monotone_curve_2* xcv = boost::get(&obj); + const X_monotone_curve_2* xcv = std::get_if(&obj); if (xcv != nullptr) { // The object is an x-monotone curve. *x_curves++ = *xcv; continue; } // The object is an isolated point. - const Point_2* pt = boost::get(&obj); + const Point_2* pt = std::get_if(&obj); CGAL_assertion(pt != nullptr); *iso_points++ = *pt; } diff --git a/thirdparty/CGAL/include/CGAL/Surface_sweep_2_algorithms.h b/thirdparty/CGAL/include/CGAL/Surface_sweep_2_algorithms.h index 1f6da87f..42714883 100644 --- a/thirdparty/CGAL/include/CGAL/Surface_sweep_2_algorithms.h +++ b/thirdparty/CGAL/include/CGAL/Surface_sweep_2_algorithms.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Surface_sweep_2_algorithms.h $ -// $Id: Surface_sweep_2_algorithms.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Surface_sweep_2_algorithms.h $ +// $Id: include/CGAL/Surface_sweep_2_algorithms.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -33,6 +33,7 @@ #include #include #include +#include namespace CGAL { @@ -54,16 +55,18 @@ struct Default_arr_traits > typedef CGAL::Arr_segment_traits_2 Traits; }; -template -struct Default_arr_traits > +template +struct Default_arr_traits, + typename Kernel::Point_2>> { - typedef CGAL::Arr_polyline_traits_2 Traits; + using Subtraits = CGAL::Arr_segment_traits_2; + typedef CGAL::Arr_polyline_traits_2 Traits; }; template -struct Default_arr_traits > +struct Default_arr_traits > { typedef CGAL::Arr_conic_traits_2 Traits; diff --git a/thirdparty/CGAL/include/CGAL/Sweep_line_2_algorithms.h b/thirdparty/CGAL/include/CGAL/Sweep_line_2_algorithms.h index 1d0c8474..7c1a86ed 100644 --- a/thirdparty/CGAL/include/CGAL/Sweep_line_2_algorithms.h +++ b/thirdparty/CGAL/include/CGAL/Sweep_line_2_algorithms.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_sweep_2/include/CGAL/Sweep_line_2_algorithms.h $ -// $Id: Sweep_line_2_algorithms.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_sweep_2/include/CGAL/Sweep_line_2_algorithms.h $ +// $Id: include/CGAL/Sweep_line_2_algorithms.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Efi Fogel diff --git a/thirdparty/CGAL/include/CGAL/TDS_2/internal/Edge_hash_function.h b/thirdparty/CGAL/include/CGAL/TDS_2/internal/Edge_hash_function.h index 7e723620..0c3cd2f7 100644 --- a/thirdparty/CGAL/include/CGAL/TDS_2/internal/Edge_hash_function.h +++ b/thirdparty/CGAL/include/CGAL/TDS_2/internal/Edge_hash_function.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_2/include/CGAL/TDS_2/internal/Edge_hash_function.h $ -// $Id: Edge_hash_function.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_2/include/CGAL/TDS_2/internal/Edge_hash_function.h $ +// $Id: include/CGAL/TDS_2/internal/Edge_hash_function.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/TDS_2/internal/edge_list.h b/thirdparty/CGAL/include/CGAL/TDS_2/internal/edge_list.h index 62452123..3ebd4fc3 100644 --- a/thirdparty/CGAL/include/CGAL/TDS_2/internal/edge_list.h +++ b/thirdparty/CGAL/include/CGAL/TDS_2/internal/edge_list.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_2/include/CGAL/TDS_2/internal/edge_list.h $ -// $Id: edge_list.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_2/include/CGAL/TDS_2/internal/edge_list.h $ +// $Id: include/CGAL/TDS_2/internal/edge_list.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/TDS_3/internal/Dummy_tds_3.h b/thirdparty/CGAL/include/CGAL/TDS_3/internal/Dummy_tds_3.h index c901bb81..bc1fbc6f 100644 --- a/thirdparty/CGAL/include/CGAL/TDS_3/internal/Dummy_tds_3.h +++ b/thirdparty/CGAL/include/CGAL/TDS_3/internal/Dummy_tds_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_3/include/CGAL/TDS_3/internal/Dummy_tds_3.h $ -// $Id: Dummy_tds_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_3/include/CGAL/TDS_3/internal/Dummy_tds_3.h $ +// $Id: include/CGAL/TDS_3/internal/Dummy_tds_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/TDS_3/internal/Triangulation_ds_circulators_3.h b/thirdparty/CGAL/include/CGAL/TDS_3/internal/Triangulation_ds_circulators_3.h index 240ec95f..6e09e4a1 100644 --- a/thirdparty/CGAL/include/CGAL/TDS_3/internal/Triangulation_ds_circulators_3.h +++ b/thirdparty/CGAL/include/CGAL/TDS_3/internal/Triangulation_ds_circulators_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_3/include/CGAL/TDS_3/internal/Triangulation_ds_circulators_3.h $ -// $Id: Triangulation_ds_circulators_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_3/include/CGAL/TDS_3/internal/Triangulation_ds_circulators_3.h $ +// $Id: include/CGAL/TDS_3/internal/Triangulation_ds_circulators_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -15,7 +15,7 @@ #include -#include +#include #include #include @@ -45,43 +45,43 @@ class Triangulation_ds_cell_circulator_3 Triangulation_ds_cell_circulator_3(Cell_handle c, int s, int t) : _s(c->vertex(s)), _t(c->vertex(t)), pos(c) { - CGAL_triangulation_precondition( c != Cell_handle() && - s >= 0 && s < 4 && - t >= 0 && t < 4 ); + CGAL_precondition( c != Cell_handle() && + s >= 0 && s < 4 && + t >= 0 && t < 4 ); } Triangulation_ds_cell_circulator_3(const Edge & e) : _s(e.first->vertex(e.second)), _t(e.first->vertex(e.third)), pos(e.first) { - CGAL_triangulation_precondition( e.first != Cell_handle() && - e.second >=0 && e.second < 4 && - e.third >=0 && e.third < 4); + CGAL_precondition( e.first != Cell_handle() && + e.second >=0 && e.second < 4 && + e.third >=0 && e.third < 4); } Triangulation_ds_cell_circulator_3(Cell_handle c, int s, int t, Cell_handle start) : _s(c->vertex(s)), _t(c->vertex(t)), pos(start) { - CGAL_triangulation_precondition( c != Cell_handle() && - s >= 0 && s < 4 && - t >= 0 && t < 4 && - start->has_vertex( _s ) && - start->has_vertex( _t ) ); + CGAL_precondition( c != Cell_handle() && + s >= 0 && s < 4 && + t >= 0 && t < 4 && + start->has_vertex( _s ) && + start->has_vertex( _t ) ); } Triangulation_ds_cell_circulator_3(const Edge & e, Cell_handle start) : _s(e.first->vertex(e.second)), _t(e.first->vertex(e.third)), pos(start) { - CGAL_triangulation_precondition( e.first != Cell_handle() && - e.second >=0 && e.second < 4 && - e.third >=0 && e.third < 4 && - start->has_vertex( _s ) && - start->has_vertex( _t ) ); + CGAL_precondition( e.first != Cell_handle() && + e.second >=0 && e.second < 4 && + e.third >=0 && e.third < 4 && + start->has_vertex( _s ) && + start->has_vertex( _t ) ); } Cell_circulator & operator++() { - CGAL_triangulation_precondition( pos != Cell_handle() ); + CGAL_precondition( pos != Cell_handle() ); //then dimension() cannot be < 3 pos = pos->neighbor(next_around_edge(pos->index(_s), pos->index(_t))); @@ -97,7 +97,7 @@ class Triangulation_ds_cell_circulator_3 Cell_circulator & operator--() { - CGAL_triangulation_precondition( pos != Cell_handle() ); + CGAL_precondition( pos != Cell_handle() ); pos = pos->neighbor(next_around_edge(pos->index(_t), pos->index(_s))); return *this; @@ -140,9 +140,9 @@ class Triangulation_ds_cell_circulator_3 return ch != pos; } - bool operator==(std::nullptr_t CGAL_triangulation_assertion_code(n)) const + bool operator==(std::nullptr_t CGAL_assertion_code(n)) const { - CGAL_triangulation_assertion( n == nullptr); + CGAL_assertion( n == nullptr); return pos == Cell_handle(); } @@ -207,34 +207,34 @@ class Triangulation_ds_facet_circulator_3 Triangulation_ds_facet_circulator_3(Cell_handle c, int s, int t) : _s(c->vertex(s)), _t(c->vertex(t)), pos(c) { - CGAL_triangulation_precondition( c != Cell_handle() && - s >= 0 && s < 4 && - t >= 0 && t < 4 ); + CGAL_precondition( c != Cell_handle() && + s >= 0 && s < 4 && + t >= 0 && t < 4 ); } Triangulation_ds_facet_circulator_3(const Edge & e) : _s(e.first->vertex(e.second)), _t(e.first->vertex(e.third)), pos(e.first) { - CGAL_triangulation_precondition( e.first != Cell_handle() && - e.second >= 0 && e.second < 4 && - e.third >= 0 && e.third < 4); + CGAL_precondition( e.first != Cell_handle() && + e.second >= 0 && e.second < 4 && + e.third >= 0 && e.third < 4); } Triangulation_ds_facet_circulator_3(Cell_handle c, int s, int t, Cell_handle start, int f) : _s(c->vertex(s)), _t(c->vertex(t)) { - CGAL_triangulation_precondition( c != Cell_handle() && - s >= 0 && s < 4 && - t >= 0 && t < 4 && - f >= 0 && f < 4 && - start->has_vertex( _s ) && - start->has_vertex( _t ) ); + CGAL_precondition( c != Cell_handle() && + s >= 0 && s < 4 && + t >= 0 && t < 4 && + f >= 0 && f < 4 && + start->has_vertex( _s ) && + start->has_vertex( _t ) ); int i = start->index( _s ); int j = start->index( _t ); - CGAL_triangulation_precondition( f!=i && f!=j ); + CGAL_precondition( f!=i && f!=j ); if ( f == next_around_edge(i,j) ) pos = start; @@ -246,16 +246,16 @@ class Triangulation_ds_facet_circulator_3 const Facet & start) : _s(c->vertex(s)), _t(c->vertex(t)) { - CGAL_triangulation_precondition( c != Cell_handle() && - s >= 0 && s < 4 && - t >= 0 && t < 4 && - start.first->has_vertex( _s ) && - start.first->has_vertex( _t ) ); + CGAL_precondition( c != Cell_handle() && + s >= 0 && s < 4 && + t >= 0 && t < 4 && + start.first->has_vertex( _s ) && + start.first->has_vertex( _t ) ); int i = start.first->index( _s ); int j = start.first->index( _t ); - CGAL_triangulation_precondition( start.second !=i && start.second !=j ); + CGAL_precondition( start.second !=i && start.second !=j ); if ( start.second == next_around_edge(i,j) ) pos = start.first; @@ -266,17 +266,17 @@ class Triangulation_ds_facet_circulator_3 Triangulation_ds_facet_circulator_3(const Edge & e, Cell_handle start, int f) : _s(e.first->vertex(e.second)), _t(e.first->vertex(e.third)) { - CGAL_triangulation_precondition( e.first != Cell_handle() && - e.second >= 0 && e.second < 4 && - e.third >= 0 && e.third < 4 && - f >= 0 && f < 4 && - start->has_vertex( _s ) && - start->has_vertex( _t ) ); + CGAL_precondition( e.first != Cell_handle() && + e.second >= 0 && e.second < 4 && + e.third >= 0 && e.third < 4 && + f >= 0 && f < 4 && + start->has_vertex( _s ) && + start->has_vertex( _t ) ); int i = start->index( _s ); int j = start->index( _t ); - CGAL_triangulation_precondition( f!=i && f!=j ); + CGAL_precondition( f!=i && f!=j ); if ( f == next_around_edge(i,j) ) pos = start; @@ -287,11 +287,11 @@ class Triangulation_ds_facet_circulator_3 Triangulation_ds_facet_circulator_3(const Edge & e, const Facet & start) : _s(e.first->vertex(e.second)), _t(e.first->vertex(e.third)) { - CGAL_triangulation_precondition( e.first != Cell_handle() && - e.second >= 0 && e.second < 4 && - e.third >= 0 && e.third < 4 && - start.first->has_vertex( _s ) && - start.first->has_vertex( _t ) ); + CGAL_precondition( e.first != Cell_handle() && + e.second >= 0 && e.second < 4 && + e.third >= 0 && e.third < 4 && + start.first->has_vertex( _s ) && + start.first->has_vertex( _t ) ); int i = start.first->index( _s ); int j = start.first->index( _t ); @@ -304,7 +304,7 @@ class Triangulation_ds_facet_circulator_3 Facet_circulator & operator++() { - CGAL_triangulation_precondition( pos != Cell_handle() ); + CGAL_precondition( pos != Cell_handle() ); //then dimension() cannot be < 3 pos = pos->neighbor( next_around_edge( pos->index(_s), pos->index(_t) ) ); @@ -320,7 +320,7 @@ class Triangulation_ds_facet_circulator_3 Facet_circulator & operator--() { - CGAL_triangulation_precondition( pos != Cell_handle() ); + CGAL_precondition( pos != Cell_handle() ); pos = pos->neighbor( next_around_edge( pos->index(_t), pos->index(_s) ) ); return *this; @@ -359,9 +359,9 @@ class Triangulation_ds_facet_circulator_3 return ! (*this == ccir); } - bool operator==(std::nullptr_t CGAL_triangulation_assertion_code(c)) const + bool operator==(std::nullptr_t CGAL_assertion_code(c)) const { - CGAL_triangulation_assertion(c == nullptr); + CGAL_assertion(c == nullptr); return pos == Cell_handle(); } @@ -410,7 +410,7 @@ class Triangulation_ds_face_circulator_3 Face_circulator & operator++() { - CGAL_triangulation_precondition( pos != Cell_handle() ); + CGAL_precondition( pos != Cell_handle() ); //then dimension() cannot be < 3 pos = pos->neighbor(ccw(pos->index(_s))); @@ -426,7 +426,7 @@ class Triangulation_ds_face_circulator_3 Face_circulator & operator--() { - CGAL_triangulation_precondition( pos != Cell_handle() ); + CGAL_precondition( pos != Cell_handle() ); pos = pos->neighbor(cw(pos->index(_s))); return *this; @@ -459,9 +459,9 @@ class Triangulation_ds_face_circulator_3 return ! (*this == ccir); } - bool operator==(std::nullptr_t CGAL_triangulation_assertion_code(c)) const + bool operator==(std::nullptr_t CGAL_assertion_code(c)) const { - CGAL_triangulation_assertion(c == nullptr); + CGAL_assertion(c == nullptr); return pos == Cell_handle(); } diff --git a/thirdparty/CGAL/include/CGAL/TDS_3/internal/Triangulation_ds_iterators_3.h b/thirdparty/CGAL/include/CGAL/TDS_3/internal/Triangulation_ds_iterators_3.h index 41b640b7..12d49818 100644 --- a/thirdparty/CGAL/include/CGAL/TDS_3/internal/Triangulation_ds_iterators_3.h +++ b/thirdparty/CGAL/include/CGAL/TDS_3/internal/Triangulation_ds_iterators_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_3/include/CGAL/TDS_3/internal/Triangulation_ds_iterators_3.h $ -// $Id: Triangulation_ds_iterators_3.h 524ce8f 2021-09-29T11:46:55+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_3/include/CGAL/TDS_3/internal/Triangulation_ds_iterators_3.h $ +// $Id: include/CGAL/TDS_3/internal/Triangulation_ds_iterators_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -17,7 +17,6 @@ #include -#include #include namespace CGAL { namespace internal { diff --git a/thirdparty/CGAL/include/CGAL/TDS_full_cell_default_storage_policy.h b/thirdparty/CGAL/include/CGAL/TDS_full_cell_default_storage_policy.h index 5ee435aa..d4872318 100644 --- a/thirdparty/CGAL/include/CGAL/TDS_full_cell_default_storage_policy.h +++ b/thirdparty/CGAL/include/CGAL/TDS_full_cell_default_storage_policy.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/TDS_full_cell_default_storage_policy.h $ -// $Id: TDS_full_cell_default_storage_policy.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/TDS_full_cell_default_storage_policy.h $ +// $Id: include/CGAL/TDS_full_cell_default_storage_policy.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus diff --git a/thirdparty/CGAL/include/CGAL/TDS_full_cell_mirror_storage_policy.h b/thirdparty/CGAL/include/CGAL/TDS_full_cell_mirror_storage_policy.h index 3aaf3384..9116418c 100644 --- a/thirdparty/CGAL/include/CGAL/TDS_full_cell_mirror_storage_policy.h +++ b/thirdparty/CGAL/include/CGAL/TDS_full_cell_mirror_storage_policy.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/TDS_full_cell_mirror_storage_policy.h $ -// $Id: TDS_full_cell_mirror_storage_policy.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/TDS_full_cell_mirror_storage_policy.h $ +// $Id: include/CGAL/TDS_full_cell_mirror_storage_policy.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus diff --git a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Remeshing_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Remeshing_cell_base_3.h index a7d0565c..39410121 100644 --- a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Remeshing_cell_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Remeshing_cell_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Remeshing_cell_base_3.h $ -// $Id: Remeshing_cell_base_3.h ab05dde 2020-06-12T08:08:56+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Remeshing_cell_base_3.h $ +// $Id: include/CGAL/Tetrahedral_remeshing/Remeshing_cell_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -15,26 +15,17 @@ #include -#include +#include -namespace CGAL -{ -namespace Tetrahedral_remeshing -{ -namespace internal -{ -struct Fake_MD_C -{ - typedef int Subdomain_index; - typedef int Surface_patch_index; - typedef int Index; -}; -} +#include + +namespace CGAL { +namespace Tetrahedral_remeshing { /*! \ingroup PkgTetrahedralRemeshingClasses -The class `Remeshing_cell_base_3` is a model of the concept `MeshCellBase_3`. +The class `Remeshing_cell_base_3` is a model of the concept `RemeshingCellBase_3`. It is designed to serve as cell base class for the 3D triangulation used in the tetrahedral remeshing process. @@ -42,24 +33,59 @@ used in the tetrahedral remeshing process. It has to be a model of the concept `RemeshingTriangulationTraits_3`. \tparam Cb is a cell base class from which `Remeshing_cell_base_3` derives. -It must be a model of the `TriangulationCellBase_3` concept. -It has the default value `Triangulation_cell_base_3`. +It must be a model of the `SimplicialMeshCellBase_3` concept. -\cgalModels `MeshCellBase_3` +\cgalModels{RemeshingCellBase_3} */ -#ifndef DOXYGEN_RUNNING -template > -using Remeshing_cell_base_3 - = CGAL::Mesh_cell_base_3; -#else template > -class Remeshing_cell_base_3; -#endif + typename Cb = CGAL::Compact_simplicial_mesh_cell_base_3< + int /*Subdomain_index*/, + int /*Surface_patch_index*/> > +class Remeshing_cell_base_3 + : public Cb +{ +public: + using FT = typename Gt::FT; + + using Vertex_handle = typename Cb::Vertex_handle; + using Cell_handle = typename Cb::Cell_handle; + + using Geom_traits = Gt; + +public: + template + struct Rebind_TDS + { + using Cb2 = typename Cb::template Rebind_TDS::Other; + using Other = Remeshing_cell_base_3; + }; + +public: + using Cb::Cb; // constructors + +public: + void set_sliver_value(const FT value) + { + sliver_cache_validity_ = true; + sliver_value_ = value; + } + + FT sliver_value() const + { + CGAL_assertion(is_cache_valid()); + return sliver_value_; + } + + bool is_cache_valid() const { return sliver_cache_validity_; } + void reset_cache_validity() const { sliver_cache_validity_ = false; } + +private: + FT sliver_value_ = 0.; + mutable bool sliver_cache_validity_ = false; +}; -}//end namespace Tetrahedral_remeshing -}//end namespace CGAL +} // namespace Tetrahedral_remeshing +} // namespace CGAL #endif //CGAL_TET_ADAPTIVE_REMESHING_CELL_BASE_3_H diff --git a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Remeshing_triangulation_3.h b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Remeshing_triangulation_3.h index 0dca9a52..154e65f4 100644 --- a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Remeshing_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Remeshing_triangulation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Remeshing_triangulation_3.h $ -// $Id: Remeshing_triangulation_3.h ab05dde 2020-06-12T08:08:56+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Remeshing_triangulation_3.h $ +// $Id: include/CGAL/Tetrahedral_remeshing/Remeshing_triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,12 +21,9 @@ #include #include -#include -#include #include -#include -#include +#include namespace CGAL { @@ -48,9 +45,9 @@ triangulation data structure. Possible values are `Sequential_tag` (the default), `Parallel_tag`, and `Parallel_if_available_tag`. -\tparam Vb is a model of `RemeshingVertexBase_3`. It has the default value ` Remeshing_vertex_base_3`. -\tparam Cb is a model of `RemeshingCellBase_3`. It has the default value ` Remeshing_cell_base_3`. +\tparam Vb must be a model of `RemeshingVertexBase_3`. +\tparam Cb must be model of `RemeshingCellBase_3`. */ template -#include +#include -namespace CGAL -{ -namespace Tetrahedral_remeshing -{ -namespace internal -{ - -struct Fake_MD_V -{ - typedef int Subdomain_index; - typedef int Surface_patch_index; - typedef int Index; -}; - -} // internal +namespace CGAL { +namespace Tetrahedral_remeshing { /*! \ingroup PkgTetrahedralRemeshingClasses -The class `Remeshing_vertex_base_3` is a model of the concept `MeshVertexBase_3`. +The class `Remeshing_vertex_base_3` is a model of the concept `RemeshingVertexBase_3`. It is designed to serve as vertex base class for the 3D triangulation used in the tetrahedral remeshing process. \tparam Gt is the geometric traits class. -It has to be a model of the concept `RemeshingTriangulationTraits_3`. +It must be a model of the concept `RemeshingTriangulationTraits_3`. \tparam Vb is a vertex base class from which `Remeshing_vertex_base_3` derives. -It must be a model of the `TriangulationVertexBase_3` concept. -It has the default value `Triangulation_vertex_base_3`. +It must be a model of the concept `SimplicialMeshVertexBase_3`. -\cgalModels `MeshVertexBase_3` +\cgalModels{RemeshingVertexBase_3,SimplicialMeshVertexBase_3} */ -#ifndef DOXYGEN_RUNNING -template > -using Remeshing_vertex_base_3 - = CGAL::Mesh_vertex_base_3; -#else -template > -class Remeshing_vertex_base_3; -#endif - -}//end namespace Tetrahedral_remeshing +template > +class Remeshing_vertex_base_3 + : public Vb +{ +public: + template + struct Rebind_TDS + { + using Vb2 = typename Vb::template Rebind_TDS::Other; + using Other = Remeshing_vertex_base_3; + }; + +public: + using Vb::Vb; // constructors +}; -}//end namespace CGAL +} // namespace Tetrahedral_remeshing +} // namespace CGAL #endif //CGAL_TET_ADAPTIVE_REMESHING_VERTEX_BASE_3_H diff --git a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Sizing_field.h b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Sizing_field.h index 3d530d2d..a37863af 100644 --- a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Sizing_field.h +++ b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Sizing_field.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Sizing_field.h $ -// $Id: Sizing_field.h ab05dde 2020-06-12T08:08:56+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Sizing_field.h $ +// $Id: include/CGAL/Tetrahedral_remeshing/Sizing_field.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Uniform_sizing_field.h b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Uniform_sizing_field.h index bdfc43f4..0eb2f34d 100644 --- a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Uniform_sizing_field.h +++ b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/Uniform_sizing_field.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Uniform_sizing_field.h $ -// $Id: Uniform_sizing_field.h ab05dde 2020-06-12T08:08:56+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Uniform_sizing_field.h $ +// $Id: include/CGAL/Tetrahedral_remeshing/Uniform_sizing_field.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/FMLS.h b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/FMLS.h index 9ad19090..9a37e8ce 100644 --- a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/FMLS.h +++ b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/FMLS.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/FMLS.h $ -// $Id: FMLS.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/FMLS.h $ +// $Id: include/CGAL/Tetrahedral_remeshing/internal/FMLS.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -228,8 +228,8 @@ class FMLS } // // Compute the MLS projection of the list of point stored in pv and store the resulting -// // positions and normal in qv. qv must be preallocated to stroe 6*pvSize float32. -// // The strid indicates the offsets in qv (the defautl value of 3 means that the qv +// // positions and normal in qv. qv must be preallocated to store 6*pvSize float32. +// // The strid indicates the offsets in qv (the default value of 3 means that the qv // // is compact: pv={x0,y0,z0,x1,y1,z1...}. If pv contains also normals for instance, // // the stride should be set to 6. // void fastProjectionCPU(const std::vector& pv, @@ -297,7 +297,7 @@ class FMLS // Accessors // -------------------------------------------------------------- - // Number of elements of the PN. One elemnt is a 6-float32 chunk. + // Number of elements of the PN. One element is a 6-float32 chunk. inline std::size_t getPNSize() const { return PNSize; } inline std::vector& getPN() { return PN; } inline const std::vector& getPN() const { return PN; } @@ -508,7 +508,7 @@ class FMLS // -------------------------------------------------------------- - // Memory Managment + // Memory Management // -------------------------------------------------------------- void freeCPUMemory() @@ -773,7 +773,7 @@ void createMLSSurfaces(Subdomain__FMLS& subdomain_FMLS, std::size_t nb_of_mls_to_create = 0; double average_point_spacing = 0; - //Cretaing the actual MLS surfaces + //Creating the actual MLS surfaces for (typename SurfaceIndexMap::iterator it = current_subdomain_FMLS_indices.begin(); it != current_subdomain_FMLS_indices.end(); ++it) { diff --git a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h index 5dcd7d09..aadff988 100644 --- a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h +++ b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h $ -// $Id: collapse_short_edges.h 4b87443 2022-12-05T12:20:06+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h $ +// $Id: include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -29,7 +28,7 @@ #include #include -#include +#include #include #include @@ -67,8 +66,8 @@ class CollapseTriangulation , v0_init(e.first->vertex(e.second)) , v1_init(e.first->vertex(e.third)) { - typedef std::array Facet; // 3 = id - typedef std::array Tet_with_ref; // first 4 = id, fifth = reference + typedef std::array Facet; + typedef std::array Tet; std::unordered_set vertices_to_insert; for (Cell_handle ch : cells_to_insert) @@ -96,23 +95,25 @@ class CollapseTriangulation } } - std::vector finite_cells; + std::vector finite_cells; + std::vector subdomains; for (Cell_handle ch : cells_to_insert) { - Tet_with_ref t = { { v2i.at(ch->vertex(0)), - v2i.at(ch->vertex(1)), - v2i.at(ch->vertex(2)), - v2i.at(ch->vertex(3)), - ch->subdomain_index() } }; - finite_cells.push_back(t); + finite_cells.push_back( { v2i.at(ch->vertex(0)), + v2i.at(ch->vertex(1)), + v2i.at(ch->vertex(2)), + v2i.at(ch->vertex(3)) } ); + subdomains.push_back(ch->subdomain_index()); } // finished std::vector new_vertices; std::map border_facets; - if (CGAL::build_triangulation(triangulation, - points, finite_cells, border_facets, - new_vertices, false/*verbose*/)) + if (CGAL::SMDS_3::build_triangulation_impl( + triangulation, points, finite_cells, subdomains, border_facets, + new_vertices, /*verbose*/ false, + /*replace_domain_0*/ false, + /*allow_non_manifold*/false)) { CGAL_assertion(triangulation.tds().is_valid()); CGAL_assertion(triangulation.infinite_vertex() == new_vertices[0]); @@ -451,7 +452,7 @@ bool is_valid_collapse(const typename C3t3::Edge& edge, if (!ch->has_vertex(v1)) { //check orientation - boost::array pts = { ch->vertex(0)->point(), + std::array pts = { ch->vertex(0)->point(), ch->vertex(1)->point(), ch->vertex(2)->point(), ch->vertex(3)->point()}; @@ -484,7 +485,7 @@ bool is_valid_collapse(const typename C3t3::Edge& edge, if (!ch->has_vertex(v0)) { //check orientation - boost::array pts = { ch->vertex(0)->point(), + std::array pts = { ch->vertex(0)->point(), ch->vertex(1)->point(), ch->vertex(2)->point(), ch->vertex(3)->point() }; diff --git a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/compute_c3t3_statistics.h b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/compute_c3t3_statistics.h index eee6bde1..89e3d9b3 100644 --- a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/compute_c3t3_statistics.h +++ b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/compute_c3t3_statistics.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/compute_c3t3_statistics.h $ -// $Id: compute_c3t3_statistics.h 4b87443 2022-12-05T12:20:06+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/compute_c3t3_statistics.h $ +// $Id: include/CGAL/Tetrahedral_remeshing/internal/compute_c3t3_statistics.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -39,7 +39,7 @@ void compute_statistics(const Triangulation& tr, typedef typename Tr::Cell_handle Cell_handle; typedef typename Tr::Vertex_handle Vertex_handle; typedef typename Gt::Point_3 Point; - typedef typename Tr::Finite_facets_iterator Finite_facets_iterator; + typedef typename Tr::Facet Facet; typedef typename Tr::Finite_cells_iterator Finite_cells_iterator; typedef typename Tr::Cell::Subdomain_index Subdomain_index; @@ -55,11 +55,10 @@ void compute_statistics(const Triangulation& tr, double max_dihedral_angle = 0.; double min_dihedral_angle = 180.; - for (Finite_facets_iterator fit = tr.finite_facets_begin(); - fit != tr.finite_facets_end(); ++fit) + for (Facet f : tr.finite_facets()) { - const Cell_handle cell = fit->first; - const int& index = fit->second; + const Cell_handle cell = f.first; + const int& index = f.second; if (!get(cell_selector, cell) || !get(cell_selector, cell->neighbor(index))) continue; diff --git a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h index f7146476..fc6d0bc1 100644 --- a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h +++ b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h $ -// $Id: flip_edges.h 4b87443 2022-12-05T12:20:06+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h $ +// $Id: include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include @@ -317,7 +317,7 @@ Sliver_removal_result flip_3_to_2(typename C3t3::Edge& edge, } ch->vertex(v)->set_cell(ch); - inc_cells[ch->vertex(v)] = boost::none; + inc_cells[ch->vertex(v)] = std::nullopt; ch->reset_cache_validity(); } } @@ -596,8 +596,8 @@ void find_best_flip_to_improve_dh(C3t3& c3t3, if(tr.is_infinite(vh)) continue; - boost::optional>& o_inc_vh = inc_cells[vh]; - if (o_inc_vh == boost::none) + std::optional>& o_inc_vh = inc_cells[vh]; + if (o_inc_vh == std::nullopt) { boost::container::small_vector inc_vec; tr.incident_cells(vh, std::back_inserter(inc_vec)); @@ -620,7 +620,7 @@ void find_best_flip_to_improve_dh(C3t3& c3t3, indices(facet_circulator->second, i)); if (curr_vertex != vh0 && curr_vertex != vh1) { - if (is_edge_uv(vh, curr_vertex, boost::get(o_inc_vh))) + if (is_edge_uv(vh, curr_vertex, o_inc_vh.value())) { is_edge = true; break; @@ -761,8 +761,8 @@ Sliver_removal_result flip_n_to_m(C3t3& c3t3, facet_circulator++; facet_circulator++; - boost::optional>& o_inc_vh = inc_cells[vh]; - if (o_inc_vh == boost::none) + std::optional>& o_inc_vh = inc_cells[vh]; + if (o_inc_vh == std::nullopt) { boost::container::small_vector inc_vec; tr.incident_cells(vh, std::back_inserter(inc_vec)); @@ -778,7 +778,7 @@ Sliver_removal_result flip_n_to_m(C3t3& c3t3, indices(facet_circulator->second, i)); if (curr_vertex != vh0 && curr_vertex != vh1) { - if (is_edge_uv(vh, curr_vertex, boost::get(o_inc_vh))) + if (is_edge_uv(vh, curr_vertex, o_inc_vh.value())) return NOT_FLIPPABLE; } } @@ -948,7 +948,7 @@ Sliver_removal_result flip_n_to_m(C3t3& c3t3, } ch->vertex(v)->set_cell(ch); - inc_cells[ch->vertex(v)] = boost::none; + inc_cells[ch->vertex(v)] = std::nullopt; ch->reset_cache_validity(); } } @@ -1186,14 +1186,14 @@ std::size_t flip_all_edges(const std::vector& edges, Tr& tr = c3t3.triangulation(); std::unordered_map > > inc_cells; + std::optional > > inc_cells; std::size_t count = 0; for (const VertexPair& vp : edges) { - boost::optional>& + std::optional>& o_inc_vh = inc_cells[vp.first]; - if (o_inc_vh == boost::none) + if (o_inc_vh == std::nullopt) { boost::container::small_vector inc_vec; tr.incident_cells(vp.first, std::back_inserter(inc_vec)); @@ -1202,7 +1202,7 @@ std::size_t flip_all_edges(const std::vector& edges, Cell_handle ch; int i0, i1; - if (is_edge_uv(vp.first, vp.second, boost::get(o_inc_vh), ch, i0, i1)) + if (is_edge_uv(vp.first, vp.second, o_inc_vh.value(), ch, i0, i1)) { Edge edge(ch, i0, i1); diff --git a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/peel_slivers.h b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/peel_slivers.h new file mode 100644 index 00000000..d26f6526 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/peel_slivers.h @@ -0,0 +1,117 @@ +// Copyright (c) 2020 GeometryFactory (France) and Telecom Paris (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/peel_slivers.h $ +// $Id: include/CGAL/Tetrahedral_remeshing/internal/peel_slivers.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Jane Tournois, Noura Faraj, Jean-Marc Thiery, Tamy Boubekeur + +#ifndef CGAL_INTERNAL_PEEL_SLIVERS_H +#define CGAL_INTERNAL_PEEL_SLIVERS_H + +#include + +#include + +namespace CGAL +{ +namespace Tetrahedral_remeshing +{ + +template +std::size_t peel_slivers(C3T3& c3t3, + const typename C3T3::Triangulation::Geom_traits::FT& sliver_angle, + const CellSelector& cell_selector) +{ + using FT = typename C3T3::Triangulation::Geom_traits::FT; + using Cell_handle = typename C3T3::Triangulation::Cell_handle; + using Surface_patch_index = typename C3T3::Surface_patch_index; + + auto& tr = c3t3.triangulation(); + + std::size_t nb_slivers_peel = 0; + std::vector > > peelable_cells; + +#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE + FT mindh = FT(180); +#endif + for (Cell_handle cit : c3t3.cells_in_complex()) + { + if(!get(cell_selector, cit)) + continue; + + std::array facets_on_surface; + + const FT dh = min_dihedral_angle(tr, cit); + if (dh < sliver_angle && is_peelable(c3t3, cit, facets_on_surface)) + peelable_cells.push_back(std::make_pair(cit, facets_on_surface)); + +#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE + mindh = (std::min)(dh, mindh); +#endif + } + +#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE + std::cout << "Min dihedral angle : " << mindh << std::endl; + std::cout << "Peelable cells : " << peelable_cells.size() << std::endl; +#endif + + for (auto c_i : peelable_cells) + { + Cell_handle c = c_i.first; + const std::array& f_on_surface = c_i.second; + + boost::optional patch; + for (int i = 0; i < 4; ++i) + { + if (f_on_surface[i]) + { + Surface_patch_index spi = c3t3.surface_patch_index(c, i); + if (patch != boost::none && patch != spi) + { + patch = boost::none; + break; + } + else + { + patch = spi; + } + } + } + if (patch == boost::none) + continue; + + for (int i = 0; i < 4; ++i) + { + if (f_on_surface[i]) + c3t3.remove_from_complex(c, i); + else + c3t3.add_to_complex(c, i, patch.get()); + } + + c3t3.remove_from_complex(c); + ++nb_slivers_peel; + } + +#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE + mindh = FT(180); + for (Cell_handle cit : c3t3.cells_in_complex()) + { + const FT dh = min_dihedral_angle(tr, cit); + mindh = (std::min)(dh, mindh); + } + std::cout << "Peeling done (removed " << nb_slivers_peel << " slivers, " + << "min dihedral angle = " << mindh << ")." << std::endl; +#endif + + return nb_slivers_peel; +} + +} // end namespace Tetrahedral_remeshing +} // end namespace CGAL + +#endif // CGAL_INTERNAL_PEEL_SLIVERS_H diff --git a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h index a1fa568e..68225dfa 100644 --- a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h +++ b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h $ -// $Id: smooth_vertices.h 4b87443 2022-12-05T12:20:06+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h $ +// $Id: include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,7 +21,7 @@ #include -#include +#include #include #include @@ -48,6 +48,7 @@ class Tetrahedral_remeshing_smoother typedef typename Tr::Geom_traits Gt; typedef typename Gt::Vector_3 Vector_3; typedef typename Gt::Point_3 Point_3; + typedef typename Gt::FT FT; private: typedef CGAL::Tetrahedral_remeshing::internal::FMLS FMLS; @@ -91,7 +92,7 @@ class Tetrahedral_remeshing_smoother } template - boost::optional + std::optional find_adjacent_facet_on_surface(const Facet& f, const Edge& edge, const C3t3& c3t3, @@ -211,7 +212,7 @@ class Tetrahedral_remeshing_smoother for (const std::array& ei : edges) { Edge edge(ch, ei[0], ei[1]); - if (boost::optional neighbor + if (std::optional neighbor = find_adjacent_facet_on_surface(f, edge, c3t3, cell_selector)) { const Facet neigh = *neighbor; //already a canonical_facet @@ -307,7 +308,7 @@ class Tetrahedral_remeshing_smoother #endif } - boost::optional project(const Surface_patch_index& si, + std::optional project(const Surface_patch_index& si, const Vector_3& gi) { CGAL_assertion(subdomain_FMLS_indices.find(si) != subdomain_FMLS_indices.end()); @@ -347,9 +348,9 @@ class Tetrahedral_remeshing_smoother const CellRange& inc_cells, const Tr& /* tr */, #ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE - double& total_move) + FT& total_move) #else - double&) + FT&) #endif { const typename Tr::Point backup = v->point(); //backup v's position @@ -396,15 +397,13 @@ class Tetrahedral_remeshing_smoother std::unordered_map >& vertices_surface_indices) { - for (typename C3t3::Facets_in_complex_iterator - fit = c3t3.facets_in_complex_begin(); - fit != c3t3.facets_in_complex_end(); ++fit) + for (Facet fit : c3t3.facets_in_complex()) { - const Surface_patch_index& surface_index = c3t3.surface_patch_index(*fit); + const Surface_patch_index& surface_index = c3t3.surface_patch_index(fit); for (int i = 0; i < 3; i++) { - const Vertex_handle vi = fit->first->vertex(indices(fit->second, i)); + const Vertex_handle vi = fit.first->vertex(indices(fit.second, i)); std::vector& v_surface_indices = vertices_surface_indices[vi]; if (std::find(v_surface_indices.begin(), v_surface_indices.end(), surface_index) == v_surface_indices.end()) @@ -431,10 +430,11 @@ class Tetrahedral_remeshing_smoother #ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE std::cout << "Smooth vertices..."; std::cout.flush(); -#endif + std::size_t nb_done_3d = 0; std::size_t nb_done_2d = 0; std::size_t nb_done_1d = 0; +#endif FT total_move = 0.; Tr& tr = c3t3.triangulation(); @@ -538,7 +538,7 @@ class Tetrahedral_remeshing_smoother = project_on_tangent_plane(smoothed_position, current_pos, vertices_normals[v][si]); //Check if the mls surface exists to avoid degenerated cases - if (boost::optional mls_projection = project(si, normal_projection)) { + if (std::optional mls_projection = project(si, normal_projection)) { final_position = final_position + *mls_projection; } else { @@ -557,8 +557,11 @@ class Tetrahedral_remeshing_smoother #endif // move vertex const typename Tr::Point new_pos(final_position.x(), final_position.y(), final_position.z()); - if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr, total_move)) + if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr, total_move)){ +#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE nb_done_1d++; +#endif + } } else if (neighbors[vid] > 0) { @@ -572,7 +575,7 @@ class Tetrahedral_remeshing_smoother { //Check if the mls surface exists to avoid degenerated cases - if (boost::optional mls_projection = project(si, current_pos)) { + if (std::optional mls_projection = project(si, current_pos)) { final_position = final_position + *mls_projection; } else { @@ -591,8 +594,11 @@ class Tetrahedral_remeshing_smoother #endif // move vertex const typename Tr::Point new_pos(final_position.x(), final_position.y(), final_position.z()); - if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr, total_move)) + if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr, total_move)){ +#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE nb_done_1d++; +#endif + } } } } @@ -655,7 +661,7 @@ class Tetrahedral_remeshing_smoother current_pos, vertices_normals[v][si]); - if (boost::optional mls_projection = project(si, normal_projection)) + if (std::optional mls_projection = project(si, normal_projection)) final_position = final_position + *mls_projection; else final_position = smoothed_position; @@ -664,8 +670,11 @@ class Tetrahedral_remeshing_smoother os_surf << "2 " << current_pos << " " << final_position << std::endl; #endif const typename Tr::Point new_pos(final_position.x(), final_position.y(), final_position.z()); - if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr, total_move)) + if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr, total_move)){ +#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE nb_done_2d++; +#endif + } } else if (neighbors[vid] > 0) { @@ -674,11 +683,14 @@ class Tetrahedral_remeshing_smoother const Vector_3 current_pos(CGAL::ORIGIN, point(v->point())); - if (boost::optional mls_projection = project(si, current_pos)) + if (std::optional mls_projection = project(si, current_pos)) { const typename Tr::Point new_pos(CGAL::ORIGIN + *mls_projection); - if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr, total_move)) + if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr, total_move)){ +#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE nb_done_2d++; +#endif + } #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG os_surf0 << "2 " << current_pos << " " << new_pos << std::endl; @@ -732,8 +744,11 @@ class Tetrahedral_remeshing_smoother #endif const Vector_3 p = smoothed_positions[vid] / static_cast(neighbors[vid]); typename Tr::Point new_pos(p.x(), p.y(), p.z()); - if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr, total_move)) + if(check_inversion_and_move(v, new_pos, inc_cells[vid], tr, total_move)){ +#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE nb_done_3d++; +#endif + } #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG os_vol << " " << point(v->point()) << std::endl; diff --git a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h index 62ebf10f..bced47e8 100644 --- a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h +++ b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h $ -// $Id: split_long_edges.h 4b87443 2022-12-05T12:20:06+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h $ +// $Id: include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -244,7 +244,6 @@ void split_long_edges(C3T3& c3t3, typedef typename C3T3::Triangulation T3; typedef typename T3::Cell_handle Cell_handle; typedef typename T3::Edge Edge; - typedef typename T3::Finite_edges_iterator Finite_edges_iterator; typedef typename T3::Vertex_handle Vertex_handle; typedef typename std::pair Edge_vv; @@ -265,10 +264,8 @@ void split_long_edges(C3T3& c3t3, //collect long edges T3& tr = c3t3.triangulation(); Boost_bimap long_edges; - for (Finite_edges_iterator eit = tr.finite_edges_begin(); - eit != tr.finite_edges_end(); ++eit) + for (Edge e : tr.finite_edges()) { - Edge e = *eit; if (!can_be_split(e, c3t3, protect_boundaries, cell_selector)) continue; diff --git a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h index ef47c645..0fcc68df 100644 --- a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h +++ b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h $ -// $Id: tetrahedral_adaptive_remeshing_impl.h 73063a6 2022-12-21T14:42:39+00:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h $ +// $Id: include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -26,11 +26,12 @@ #include #include #include +#include #include #include -#include +#include namespace CGAL { @@ -91,6 +92,7 @@ class Adaptive_remesher typedef typename C3t3::Cell_handle Cell_handle; typedef typename C3t3::Vertex_handle Vertex_handle; + typedef typename C3t3::Edge Edge; typedef typename C3t3::Subdomain_index Subdomain_index; typedef typename C3t3::Surface_patch_index Surface_patch_index; typedef typename C3t3::Curve_index Curve_index; @@ -261,8 +263,7 @@ class Adaptive_remesher FT sqmax = emax * emax; FT sqmin = emin * emin; - typedef typename Tr::Edge Edge; - for (Edge e : tr().finite_edges()) + for (const Edge& e : tr().finite_edges()) { // skip protected edges if (m_protect_boundaries) @@ -291,67 +292,8 @@ class Adaptive_remesher std::cout.flush(); #endif - std::size_t nb_slivers_peel = 0; - std::vector > > peelable_cells; -#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE - double mindh = 180.; -#endif - for (Cell_handle cit : tr().finite_cell_handles()) - { - std::array facets_on_surface; - if (m_c3t3.is_in_complex(cit)) - { - const double dh = min_dihedral_angle(tr(), cit); - if(dh < sliver_angle && is_peelable(m_c3t3, cit, facets_on_surface)) - peelable_cells.push_back(std::make_pair(cit, facets_on_surface)); - -#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE - mindh = (std::min)(dh, mindh); -#endif - } - } - -#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE - std::cout << "Min dihedral angle : " << mindh << std::endl; - std::cout << "Peelable cells : " << peelable_cells.size() << std::endl; -#endif - - for (auto c_i : peelable_cells) - { - Cell_handle c = c_i.first; - const std::array& f_on_surface = c_i.second; - - boost::optional patch; - for (int i = 0; i < 4; ++i) - { - if (f_on_surface[i]) - { - Surface_patch_index spi = m_c3t3.surface_patch_index(c, i); - if (patch != boost::none && patch != spi) - { - patch = boost::none; - break; - } - else - { - patch = spi; - } - } - } - if(patch == boost::none) - continue; - - for (int i = 0; i < 4; ++i) - { - if(f_on_surface[i]) - m_c3t3.remove_from_complex(c, i); - else - m_c3t3.add_to_complex(c, i, patch.get()); - } - - m_c3t3.remove_from_complex(c); - ++nb_slivers_peel; - } + const std::size_t nb_peeled + = CGAL::Tetrahedral_remeshing::peel_slivers(m_c3t3, sliver_angle, m_cell_selector); #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG CGAL_assertion(tr().tds().is_valid(true)); @@ -360,21 +302,8 @@ class Adaptive_remesher #ifdef CGAL_DUMP_REMESHING_STEPS CGAL::Tetrahedral_remeshing::debug::dump_c3t3(m_c3t3, "99-postprocess"); #endif -#ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE - mindh = 180.; - for (Cell_handle cit : tr().finite_cell_handles()) - { - if (m_c3t3.is_in_complex(cit)) - { - const double dh = min_dihedral_angle(tr(), cit); - mindh = (std::min)(dh, mindh); - } - } - std::cout << "Peeling done (removed " << nb_slivers_peel << " slivers, " - << "min dihedral angle = " << mindh << ")." << std::endl; -#endif - return nb_slivers_peel; + return nb_peeled; } void finalize() @@ -399,31 +328,38 @@ class Adaptive_remesher //update number_of_cells and number_of_facets in c3t3 m_c3t3.rescan_after_load_of_triangulation(); +#ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG + CGAL::Tetrahedral_remeshing::debug::dump_vertices_by_dimension( + m_c3t3.triangulation(), "00-c3t3_vertices_before_init_"); +#endif + + const Subdomain_index default_subdomain = default_subdomain_index(); + //tag cells for (Cell_handle cit : tr().finite_cell_handles()) { if (get(m_cell_selector, cit)) { const Subdomain_index index = cit->subdomain_index(); - if(!input_is_c3t3()) + if (m_c3t3.is_in_complex(cit)) m_c3t3.remove_from_complex(cit); - if(Subdomain_index() != index) - m_c3t3.add_to_complex(cit, index); + + const Subdomain_index new_index = (Subdomain_index() != index) + ? index + : default_subdomain; + m_c3t3.add_to_complex(cit, new_index); #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG ++nbc; #endif } - if (!input_is_c3t3()) - { - for (int i = 0; i < 4; ++i) - { - if (cit->vertex(i)->in_dimension() == -1) - cit->vertex(i)->set_dimension(3); - } - } + + for (Vertex_handle vi : CGAL::Tetrahedral_remeshing::vertices(cit, tr())) + set_dimension(vi, 3); + #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG - else if (input_is_c3t3() && m_c3t3.is_in_complex(cit)) + //else + if (input_is_c3t3() && m_c3t3.is_in_complex(cit)) ++nbc; #endif } @@ -442,16 +378,15 @@ class Adaptive_remesher { Surface_patch_index patch = f.first->surface_patch_index(f.second); if(patch == Surface_patch_index()) - set_surface_patch_index_to_default(s1, s2, patch); + make_surface_patch_index(s1, s2, patch); + + if(m_c3t3.is_in_complex(f)) + m_c3t3.remove_from_complex(f); m_c3t3.add_to_complex(f, patch); - const int i = f.second; - for (int j = 0; j < 3; ++j) - { - Vertex_handle vij = f.first->vertex(Tr::vertex_triple_index(i, j)); - if (vij->in_dimension() == -1 || vij->in_dimension() > 2) - vij->set_dimension(2); - } + for (Vertex_handle vij : CGAL::Tetrahedral_remeshing::vertices(f, tr())) + set_dimension(vij, 2); + #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG ++nbf; #endif @@ -462,32 +397,25 @@ class Adaptive_remesher #endif //tag edges - typedef typename Tr::Edge Edge; + const Curve_index default_curve_id = default_curve_index(); for (const Edge& e : tr().finite_edges()) { - if (m_c3t3.is_in_complex(e)) - { - CGAL_assertion(m_c3t3.in_dimension(e.first->vertex(e.second)) <= 1); - CGAL_assertion(m_c3t3.in_dimension(e.first->vertex(e.third)) <= 1); -#ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG - ++nbe; -#endif - continue; - } - if (get(ecmap, CGAL::Tetrahedral_remeshing::make_vertex_pair(e)) + || m_c3t3.is_in_complex(e) || nb_incident_subdomains(e, m_c3t3) > 2 || nb_incident_surface_patches(e, m_c3t3) > 1) { - m_c3t3.add_to_complex(e, 1); + const bool in_complex = m_c3t3.is_in_complex(e); + typename C3t3::Curve_index curve_id = in_complex + ? m_c3t3.curve_index(e) + : default_curve_id; - Vertex_handle v = e.first->vertex(e.second); - if (v->in_dimension() == -1 || v->in_dimension() > 1) - v->set_dimension(1); + if (in_complex) + m_c3t3.remove_from_complex(e); + m_c3t3.add_to_complex(e, curve_id); - v = e.first->vertex(e.third); - if (v->in_dimension() == -1 || v->in_dimension() > 1) - v->set_dimension(1); + for (Vertex_handle v : CGAL::Tetrahedral_remeshing::vertices(e, tr())) + set_dimension(v, 1); #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG ++nbe; @@ -505,12 +433,10 @@ class Adaptive_remesher if ( vit->in_dimension() == 0 || nb_incident_complex_edges(vit, m_c3t3) > 2) { - if(!m_c3t3.is_in_complex(vit)) + if (!m_c3t3.is_in_complex(vit)) m_c3t3.add_to_complex(vit, ++corner_id); - if (vit->in_dimension() == -1 || vit->in_dimension() > 0) - vit->set_dimension(0); - + set_dimension(vit, 0); vit->set_index(corner_id); #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG @@ -519,6 +445,7 @@ class Adaptive_remesher } } + // set all indices depending on underlying dimension for (Vertex_handle v : tr().finite_vertex_handles()) set_index(v, m_c3t3); @@ -530,12 +457,41 @@ class Adaptive_remesher std::cout << "\t vertices = " << nbv << std::endl; CGAL::Tetrahedral_remeshing::debug::dump_vertices_by_dimension( - m_c3t3.triangulation(), "c3t3_vertices_"); + m_c3t3.triangulation(), "0-c3t3_vertices_after_init_"); CGAL::Tetrahedral_remeshing::debug::check_surface_patch_indices(m_c3t3); + CGAL::Tetrahedral_remeshing::debug::count_far_points(m_c3t3); #endif } private: + bool dimension_is_modifiable(const Vertex_handle& v, const int new_dim) const + { + if (!input_is_c3t3()) + return true; + + const int vdim = v->in_dimension(); + // feature edges and tip/endpoints vertices are kept + switch (vdim) + { + case -1: return false;//far points are not modified + case 3 : return true; + case 2 : return true;//surface vertices may not be part of a triangulation surface + // in this case, we want to be able to set it + case 1 : return new_dim == 0; //features can be modified to corners + case 0 : return false;// corners remain corners + default: + return true; + } + CGAL_unreachable(); + return true; + } + + void set_dimension(Vertex_handle v, const int new_dim) + { + if (dimension_is_modifiable(v, new_dim)) + v->set_dimension(new_dim); + } + bool check_vertex_dimensions() { for (Vertex_handle vit : tr().finite_vertex_handles()) @@ -557,23 +513,55 @@ class Adaptive_remesher } template - void set_surface_patch_index_to_default(const Subdomain_index&, - const Subdomain_index&, - PatchIndex& patch) + void make_surface_patch_index(const Subdomain_index& s1, + const Subdomain_index& s2, + PatchIndex& patch) { - if(m_c3t3.number_of_facets() == 0) - patch = 1; - else - patch = m_c3t3.surface_patch_index(*m_c3t3.facets_in_complex_begin()); + patch = (s1 < s2) ? (s1 * 1000 + s2) : (s2 * 1000 + s1); } - void set_surface_patch_index_to_default(const Subdomain_index& s1, - const Subdomain_index& s2, - std::pair& patch) + void make_surface_patch_index(const Subdomain_index& s1, + const Subdomain_index& s2, + std::pair& patch) { patch = (s1 < s2) ? std::make_pair(s1, s2) : std::make_pair(s2, s1); } + Subdomain_index max_subdomain_index() const + { + Subdomain_index max_index + = (std::numeric_limits::min)(); + for (Cell_handle cit : tr().finite_cell_handles()) + { + const Subdomain_index cid = cit->subdomain_index(); + if (cid > max_index && cid != Subdomain_index()) + max_index = cid; + } + return max_index; + } + + Subdomain_index default_subdomain_index() const + { + return max_subdomain_index() + 1; + } + + Curve_index max_curve_index() const + { + Curve_index max_index = (std::numeric_limits::min)(); + for (const Edge& e : m_c3t3.edges_in_complex()) + { + const Curve_index cid = m_c3t3.curve_index(e); + if (cid > max_index) + max_index = cid; + } + return max_index + 1; + } + + Curve_index default_curve_index() const + { + return max_curve_index() + 1; + } + public: Tr& tr() { diff --git a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h index 779cb629..48e14f36 100644 --- a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h +++ b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h $ -// $Id: tetrahedral_remeshing_helpers.h 4b87443 2022-12-05T12:20:06+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h $ +// $Id: include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -74,8 +75,36 @@ inline int indices(const int& i, const int& j) CGAL_assertion(i < 4 && j < 3); if(i < 4 && j < 3) return indices_table[i][j]; - else - return -1; + CGAL_error_msg("Invalid indices provided"); + return 0; +} + +template +std::array +vertices(const typename Tr::Edge& e , const Tr&) +{ + return std::array{ + e.first->vertex(e.second), + e.first->vertex(e.third)}; +} +template +std::array +vertices(const typename Tr::Facet& f, const Tr&) +{ + return std::array{ + f.first->vertex(Tr::vertex_triple_index(f.second, 0)), + f.first->vertex(Tr::vertex_triple_index(f.second, 1)), + f.first->vertex(Tr::vertex_triple_index(f.second, 2))}; +} +template +std::array +vertices(const typename Tr::Cell_handle c, const Tr&) +{ + return std::array{ + c->vertex(0), + c->vertex(1), + c->vertex(2), + c->vertex(3)}; } template @@ -529,13 +558,17 @@ void set_index(typename C3t3::Vertex_handle v, const C3t3& c3t3) v->set_index(v->cell()->subdomain_index()); break; case 2: + CGAL_assertion(surface_patch_index(v, c3t3) + != typename C3t3::Surface_patch_index()); v->set_index(surface_patch_index(v, c3t3)); break; case 1: v->set_index(typename C3t3::Curve_index(1)); break; case 0: - v->set_index(boost::get(v->index())); + v->set_index(Mesh_3::internal::get_index(v->index())); + break; + case -1://far points from concurrent Mesh_3 break; default: CGAL_assertion(false); @@ -558,6 +591,27 @@ bool is_edge_in_complex(const typename C3t3::Vertex_handle& v0, return false; } +template +bool protecting_balls_intersect(const typename C3t3::Edge& e, + const C3t3& c3t3) +{ + const auto vv = c3t3.triangulation().vertices(e); + if( c3t3.in_dimension(vv[0]) > 1 + || c3t3.in_dimension(vv[1]) > 1) + return false; + + const auto& p0 = vv[0]->point(); + const auto& p1 = vv[1]->point(); + if(p0.weight() == 0 || p1.weight() == 0) + return false; + + const auto r0 = CGAL::approximate_sqrt(p0.weight()); + const auto r1 = CGAL::approximate_sqrt(p1.weight()); + const auto d = CGAL::approximate_sqrt(CGAL::squared_distance(p0, p1)); + + return d < r0 + r1; +} + template OutputIterator incident_subdomains(const typename C3t3::Vertex_handle v, const C3t3& c3t3, @@ -1237,6 +1291,18 @@ void check_surface_patch_indices(const C3t3& c3t3) } } +template +void count_far_points(const C3t3& c3t3) +{ + std::size_t count = 0; + for (auto v : c3t3.triangulation().finite_vertex_handles()) + { + if(c3t3.in_dimension(v) == -1) + ++count; + } + std::cout << "Nb far points : " << count << std::endl; +} + template bool are_cell_orientations_valid(const Tr& tr) { @@ -1313,7 +1379,7 @@ void dump_surface_off(const Tr& tr, const char* filename) } //write facets - std::size_t nbf_print = 0; + CGAL_assertion_code(std::size_t nbf_print = 0); for (Finite_facets_iterator fit = tr.finite_facets_begin(); fit != tr.finite_facets_end(); ++fit) { @@ -1324,7 +1390,7 @@ void dump_surface_off(const Tr& tr, const char* filename) ofs << "3 " << vertices.left.at(c->vertex((i + 1) % 4)) << " " << vertices.left.at(c->vertex((i + 2) % 4)) << " " << vertices.left.at(c->vertex((i + 3) % 4)) << std::endl; - ++nbf_print; + CGAL_assertion_code(++nbf_print); } } CGAL_assertion(nbf == nbf_print); @@ -1581,7 +1647,7 @@ void dump_facets_in_complex(const C3t3& c3t3, const char* filename) } //write facets - std::size_t nbf_print = 0; + CGAL_assertion_code(std::size_t nbf_print = 0); for (Facets_in_complex_iterator fit = c3t3.facets_in_complex_begin(); fit != c3t3.facets_in_complex_end(); ++fit) { @@ -1590,7 +1656,7 @@ void dump_facets_in_complex(const C3t3& c3t3, const char* filename) ofs << "3 " << vertices.left.at(c->vertex((i + 1) % 4)) << " " << vertices.left.at(c->vertex((i + 2) % 4)) << " " << vertices.left.at(c->vertex((i + 3) % 4)) << std::endl; - ++nbf_print; + CGAL_assertion_code(++nbf_print); } CGAL_assertion(nbf == nbf_print); @@ -1647,13 +1713,17 @@ void dump_vertices_by_dimension(const Tr& tr, const char* prefix) typedef typename Tr::Vertex_handle Vertex_handle; std::vector< std::vector > vertices_per_dimension(4); + std::size_t nb_far_points = 0; for (typename Tr::Finite_vertices_iterator vit = tr.finite_vertices_begin(); vit != tr.finite_vertices_end(); ++vit) { if (vit->in_dimension() == -1) + { + ++nb_far_points; continue;//far point + } CGAL_assertion(vit->in_dimension() >= 0 && vit->in_dimension() < 4); vertices_per_dimension[vit->in_dimension()].push_back(vit); @@ -1681,6 +1751,7 @@ void dump_vertices_by_dimension(const Tr& tr, const char* prefix) ofs.close(); } + std::cout << "Nb far points : " << nb_far_points << std::endl; } template diff --git a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/tetrahedral_remeshing_io.h b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/tetrahedral_remeshing_io.h index ce04d20f..b77555fd 100644 --- a/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/tetrahedral_remeshing_io.h +++ b/thirdparty/CGAL/include/CGAL/Tetrahedral_remeshing/tetrahedral_remeshing_io.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/tetrahedral_remeshing_io.h $ -// $Id: tetrahedral_remeshing_io.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/tetrahedral_remeshing_io.h $ +// $Id: include/CGAL/Tetrahedral_remeshing/tetrahedral_remeshing_io.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Tetrahedron_3.h b/thirdparty/CGAL/include/CGAL/Tetrahedron_3.h index a373f061..de56ec55 100644 --- a/thirdparty/CGAL/include/CGAL/Tetrahedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Tetrahedron_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Tetrahedron_3.h $ -// $Id: Tetrahedron_3.h 8fa0f55 2021-05-27T10:27:38+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Tetrahedron_3.h $ +// $Id: include/CGAL/Tetrahedron_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,11 +18,12 @@ #define CGAL_TETRAHEDRON_3_H #include -#include #include #include #include +#include + namespace CGAL { template @@ -32,7 +33,7 @@ class Tetrahedron_3 : public R_::Kernel_base::Tetrahedron_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Tetrahedron_3 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Three/Buffer_objects.h b/thirdparty/CGAL/include/CGAL/Three/Buffer_objects.h index 208ecf65..9a5fdc99 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Buffer_objects.h +++ b/thirdparty/CGAL/include/CGAL/Three/Buffer_objects.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Buffer_objects.h $ -// $Id: Buffer_objects.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Buffer_objects.h $ +// $Id: include/CGAL/Three/Buffer_objects.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno diff --git a/thirdparty/CGAL/include/CGAL/Three/Edge_container.h b/thirdparty/CGAL/include/CGAL/Three/Edge_container.h index a980775c..da836b2f 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Edge_container.h +++ b/thirdparty/CGAL/include/CGAL/Three/Edge_container.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Edge_container.h $ -// $Id: Edge_container.h f79ec02 2021-06-28T13:11:28+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Edge_container.h $ +// $Id: include/CGAL/Three/Edge_container.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno @@ -63,11 +63,11 @@ struct DEMO_FRAMEWORK_EXPORT Edge_container :public Primitive_container //! \brief initGL creates the `Vbo`s and `Vao`s of this `Edge_container`. //! \attention It must be called within a valid OpenGL context. The `draw()` function of an item is always a safe place to call this. //! - //! \todo Is it a good idea to call InitGL of each item in the scene so the developper doesn't have to worry about this in each draw() of each item ? - //!`. + //! \todo Is it a good idea to call InitGL of each item in the scene so the developer doesn't have to worry about this in each draw() of each item ? + //! //! \param viewer the active `Viewer_interface`. //! - void initGL(Viewer_interface *viewer) Q_DECL_OVERRIDE; + void initGL(Viewer_interface *viewer) override; //! //! \brief draw is the function that actually renders the data. @@ -75,9 +75,9 @@ struct DEMO_FRAMEWORK_EXPORT Edge_container :public Primitive_container //! \param is_color_uniform must be `false` if `VBOs`[`Colors`] is not empty, `true` otherwise. //! void draw(CGAL::Three::Viewer_interface* viewer, - bool is_color_uniform) Q_DECL_OVERRIDE; + bool is_color_uniform) override; - void initializeBuffers(Viewer_interface *viewer) Q_DECL_OVERRIDE; + void initializeBuffers(Viewer_interface *viewer) override; /// \name Getters and Setters for the shaders parameters. /// diff --git a/thirdparty/CGAL/include/CGAL/Three/Point_container.h b/thirdparty/CGAL/include/CGAL/Three/Point_container.h index 18c19218..30d6b3d6 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Point_container.h +++ b/thirdparty/CGAL/include/CGAL/Three/Point_container.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Point_container.h $ -// $Id: Point_container.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Point_container.h $ +// $Id: include/CGAL/Three/Point_container.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno @@ -55,15 +55,17 @@ struct DEMO_FRAMEWORK_EXPORT Point_container :public Primitive_container //! Point_container(int program, bool indexed); + ~Point_container(); + //! //! \brief initGL creates the `Vbo`s and `Vao`s of this `Point_container`. //! \attention It must be called within a valid OpenGL context. The `draw()` function of an item is always a safe place to call this. //! - //! \todo Is it a good idea to call InitGL of each item in the scene so the developper doesn't have to worry about this in each draw() of each item ? - //!`. + //! \todo Is it a good idea to call InitGL of each item in the scene so the developer doesn't have to worry about this in each draw() of each item ? + //! //! \param viewer the active `Viewer_interface`. //! - void initGL(Viewer_interface *viewer) Q_DECL_OVERRIDE; + void initGL(Viewer_interface *viewer) override; //! //! \brief draw is the function that actually renders the data. @@ -71,7 +73,7 @@ struct DEMO_FRAMEWORK_EXPORT Point_container :public Primitive_container //! \param is_color_uniform must be `false` if `VBOs`[`Colors`] is not empty, `true` otherwise. //! void draw(CGAL::Three::Viewer_interface* viewer, - bool is_color_uniform) Q_DECL_OVERRIDE; + bool is_color_uniform) override; /// \name Getters and Setters for the shaders parameters. /// diff --git a/thirdparty/CGAL/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h b/thirdparty/CGAL/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h index 660b34dd..c84fdf8d 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h +++ b/thirdparty/CGAL/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h $ -// $Id: Polyhedron_demo_io_plugin_interface.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h $ +// $Id: include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -55,21 +55,21 @@ class Polyhedron_demo_io_plugin_interface virtual QString loadNameFilters() const {return nameFilters();} //! Specifies if the io_plugin is able to load an item or not. - //! This must be overriden. + //! This must be overridden. virtual bool canLoad(QFileInfo fileinfo) const = 0; //! Loads one or more item(s) from a file. `ok` is `true` if the loading //! was successful, `false` otherwise. //! New items will be added to the scene if `add_to_scene` is `true`. //! You don't want that when you reload an item, for example, //! as it will be added at some other point of the process. - //! This must be overriden. + //! This must be overridden. virtual QList load(QFileInfo fileinfo, bool& ok, bool add_to_scene=true) = 0; //!Specifies if the io_plugin can save the item or not. - //!This must be overriden. + //!This must be overridden. virtual bool canSave(const Scene_item*) = 0; //!Saves one or more items in the file corresponding to the path //!contained in fileinfo. Returns false if error. - //! This must be overriden. + //! This must be overridden. //! @attention When a file is successfully saved, it must be removed from the //! list. virtual bool save(QFileInfo fileinfo,QList& ) = 0; diff --git a/thirdparty/CGAL/include/CGAL/Three/Polyhedron_demo_plugin_helper.h b/thirdparty/CGAL/include/CGAL/Three/Polyhedron_demo_plugin_helper.h index fc16c53a..cbea34fe 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Polyhedron_demo_plugin_helper.h +++ b/thirdparty/CGAL/include/CGAL/Three/Polyhedron_demo_plugin_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Polyhedron_demo_plugin_helper.h $ -// $Id: Polyhedron_demo_plugin_helper.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Polyhedron_demo_plugin_helper.h $ +// $Id: include/CGAL/Three/Polyhedron_demo_plugin_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Three/Polyhedron_demo_plugin_interface.h b/thirdparty/CGAL/include/CGAL/Three/Polyhedron_demo_plugin_interface.h index 90eeda4f..43beda63 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Polyhedron_demo_plugin_interface.h +++ b/thirdparty/CGAL/include/CGAL/Three/Polyhedron_demo_plugin_interface.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Polyhedron_demo_plugin_interface.h $ -// $Id: Polyhedron_demo_plugin_interface.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Polyhedron_demo_plugin_interface.h $ +// $Id: include/CGAL/Three/Polyhedron_demo_plugin_interface.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -41,7 +41,7 @@ class Polyhedron_demo_plugin_interface //! \brief indicates if an action is usable or not. //! This function usually tests the type of the selected item to determine if `action` can be applied to it, - //! but not necessarly. + //! but not necessarily. //! @returns \c true if `action` can be called in the current state, \c false //! otherwise virtual bool applicable(QAction* action) const = 0; diff --git a/thirdparty/CGAL/include/CGAL/Three/Primitive_container.h b/thirdparty/CGAL/include/CGAL/Three/Primitive_container.h index f9a0fcae..b64f3a0b 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Primitive_container.h +++ b/thirdparty/CGAL/include/CGAL/Three/Primitive_container.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Primitive_container.h $ -// $Id: Primitive_container.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Primitive_container.h $ +// $Id: include/CGAL/Three/Primitive_container.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno @@ -19,6 +19,8 @@ #include #include +#include // for std::unique_ptr + using namespace CGAL::Three; #ifdef demo_framework_EXPORTS @@ -248,7 +250,7 @@ class DEMO_FRAMEWORK_EXPORT Primitive_container //! private: friend struct D; - mutable D* d; + std::unique_ptr d; }; //end of class Triangle_container } diff --git a/thirdparty/CGAL/include/CGAL/Three/Scene_draw_interface.h b/thirdparty/CGAL/include/CGAL/Three/Scene_draw_interface.h index c6c8e9fd..ffef6136 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Scene_draw_interface.h +++ b/thirdparty/CGAL/include/CGAL/Three/Scene_draw_interface.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Scene_draw_interface.h $ -// $Id: Scene_draw_interface.h 1f45360 2021-01-26T09:05:24+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Scene_draw_interface.h $ +// $Id: include/CGAL/Three/Scene_draw_interface.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Three/Scene_group_item.h b/thirdparty/CGAL/include/CGAL/Three/Scene_group_item.h index d18e6650..b5d61ecc 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Scene_group_item.h +++ b/thirdparty/CGAL/include/CGAL/Three/Scene_group_item.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Scene_group_item.h $ -// $Id: Scene_group_item.h f513a79 2021-04-21T15:48:36+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Scene_group_item.h $ +// $Id: include/CGAL/Three/Scene_group_item.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -41,9 +41,9 @@ public : Scene_group_item(QString name = QString("New group")); ~Scene_group_item() { delete children;} //!Returns false to avoid disturbing the BBox of the scene. - bool isFinite() const Q_DECL_OVERRIDE; + bool isFinite() const override; //!Returns true to avoid disturbing the BBox of the scene. - bool isEmpty() const Q_DECL_OVERRIDE; + bool isEmpty() const override; /*! * \brief locks a child * @@ -92,15 +92,15 @@ public : //! @see isExpanded(). void setExpanded(bool); //!Returns an empty Bbox to avoid disturbing the Bbox of the scene. - Bbox bbox() const Q_DECL_OVERRIDE; + Bbox bbox() const override; //!Not supported. - Scene_item* clone() const Q_DECL_OVERRIDE {return nullptr;} + Scene_item* clone() const override {return nullptr;} //! Indicates if the rendering mode is supported. //! \returns true for all rendering modes that are shared by //! all of the children. - bool supportsRenderingMode(RenderingMode m) const Q_DECL_OVERRIDE; + bool supportsRenderingMode(RenderingMode m) const override; //!\returns a string containing the number of children. - QString toolTip() const Q_DECL_OVERRIDE; + QString toolTip() const override; /// Draw functions /// Scene_group_item's children are not drawn by the scene, they are drawn by the group. @@ -111,21 +111,21 @@ public : //! and `Scene_item::drawPoints` for each child if its current //! rendering mode is adequat. //! @see #RenderingMode - virtual void draw(CGAL::Three::Viewer_interface*) const Q_DECL_OVERRIDE; + virtual void draw(CGAL::Three::Viewer_interface*) const override; //!\brief draws all the children //! //! Calls `Scene_item::drawEdges()`, then calls `Scene_item::draw()` //! and `Scene_item::drawPoints` for each child if its current //! rendering mode is adequat. //! @see #RenderingMode - virtual void drawEdges(CGAL::Three::Viewer_interface*) const Q_DECL_OVERRIDE; + virtual void drawEdges(CGAL::Three::Viewer_interface*) const override; //!\brief draws all the children //! //! Calls `Scene_item::drawPoints()`, then calls `Scene_item::draw()` //! and `Scene_item::drawEdges()` for each child if its current //! rendering mode is adequat. //! @see #RenderingMode - virtual void drawPoints(CGAL::Three::Viewer_interface*) const Q_DECL_OVERRIDE; + virtual void drawPoints(CGAL::Three::Viewer_interface*) const override; //! //! \brief deals with the rendering, selecting and picking of //! the group's children. @@ -152,11 +152,11 @@ public : Scene_item* getChild(Scene_interface::Item_id id) { return scene->item(id);} Scene_item* getChild(Scene_interface::Item_id id) const{ return scene->item(id);} //!Sets all the children to the specified color. - void setColor(QColor c) Q_DECL_OVERRIDE; + void setColor(QColor c) override; //!Sets all the children in the specified rendering mode. - void setRenderingMode(RenderingMode m) Q_DECL_OVERRIDE; + void setRenderingMode(RenderingMode m) override; //!Sets all the children to the specified visibility. - void setVisible(bool b) Q_DECL_OVERRIDE; + void setVisible(bool b) override; //!Sets all the children in points mode. void setPointsMode() { setRenderingMode(Points); @@ -190,7 +190,7 @@ public : setRenderingMode(PointsPlusNormals); } //!Sets the alpha value for the froup and all its children. - virtual void setAlpha(int) Q_DECL_OVERRIDE; + virtual void setAlpha(int) override; //! \brief returns a list of all the direct children. //! @@ -203,7 +203,7 @@ public : //! //! When a `Scene_group_item` is added to the selection of the scene, //! this function defines which of its children will be added too. - //! Typically overriden to allow applying an operation from the + //! Typically overridden to allow applying an operation from the //! Operation menu only to the parent item and not to its children. virtual QList getChildrenForSelection() const {return *children;} //!Removes a Scene_item from the list of children. @@ -227,7 +227,7 @@ public : //!Moves a child down in the list. void moveDown(int); - void compute_bbox() const Q_DECL_OVERRIDE{}; + void compute_bbox() const override{}; public Q_SLOTS: //!\brief redraws children. //! diff --git a/thirdparty/CGAL/include/CGAL/Three/Scene_interface.h b/thirdparty/CGAL/include/CGAL/Three/Scene_interface.h index a097670f..c597143a 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Scene_interface.h +++ b/thirdparty/CGAL/include/CGAL/Three/Scene_interface.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Scene_interface.h $ -// $Id: Scene_interface.h 7bfa33f 2021-06-04T14:01:47+02:00 albert-github +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Scene_interface.h $ +// $Id: include/CGAL/Three/Scene_interface.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -58,7 +58,6 @@ namespace Three{ * */ class Scene_interface { public: - //!A bounding box is a box with each face corresponding to an extremum of its contents. typedef CGAL::Bbox_3 Bbox; @@ -94,7 +93,7 @@ class Scene_interface { */ virtual int erase(QList) = 0; - /*! Creates a copy of the item whith the id `id`. + /*! Creates a copy of the item with the id `id`. * @returns the index of the new item (-1 on error). */ virtual Item_id duplicate(Item_id id) = 0; @@ -116,10 +115,10 @@ class Scene_interface { //!The id of the currently selected item. //!@returns the list of currently selected items indices. virtual QList selectionIndices() const = 0; - //!Item_A is designated with the column A/B in the Geometric Objetcts widget. + //!Item_A is designated with the column A/B in the Geometric Objects widget. //!@returns the index of the Item_A virtual Item_id selectionAindex() const = 0; - //!Item_B is designated with the column A/B in the Geometric Objetcts widget. + //!Item_B is designated with the column A/B in the Geometric Objects widget. //!@returns the index of the Item_B virtual Item_id selectionBindex() const = 0; @@ -146,7 +145,7 @@ class Scene_interface { //! \brief ignore data updating. //! //! This will ignore all the individual calls to `itemChanged()` until - //! `setUpdatesEnabled()` is called whith `b` being `true`. + //! `setUpdatesEnabled()` is called with `b` being `true`. //! virtual void setUpdatesEnabled(bool b) =0; //! diff --git a/thirdparty/CGAL/include/CGAL/Three/Scene_item.h b/thirdparty/CGAL/include/CGAL/Three/Scene_item.h index 822de0d9..e9c24ff9 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Scene_item.h +++ b/thirdparty/CGAL/include/CGAL/Three/Scene_item.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Scene_item.h $ -// $Id: Scene_item.h 1a9a578 2021-06-18T10:54:35+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Scene_item.h $ +// $Id: include/CGAL/Three/Scene_item.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -81,7 +81,7 @@ class SCENE_ITEM_EXPORT Scene_item : public QObject{ PROGRAM_OLD_FLAT, /** Used to render flat shading without pre computing normals without geometry shader*/ PROGRAM_SOLID_WIREFRAME, //! Used to render edges with width superior to 1. PROGRAM_NO_INTERPOLATION, //! Used to render faces without interpolating their color. - PROGRAM_HEAT_INTENSITY, //! Used to render special item in Display_property_plugin + PROGRAM_HEAT_INTENSITY, //! Used to render special item in Heat_method_plugin NB_OF_PROGRAMS //! Holds the number of different programs in this enum. }; typedef CGAL::Bbox_3 Bbox; @@ -187,11 +187,11 @@ class SCENE_ITEM_EXPORT Scene_item : public QObject{ //! If the diagonal's length has never been computed, computes it and //! saves the result for further calls. //! @returns the item's bounding box's diagonal length. - virtual double diagonalBbox() const { - if(!is_diag_bbox_computed) - compute_diag_bbox(); - is_diag_bbox_computed = true; - return _diag_bbox; + virtual double bboxDiagonal() const { + if(!is_bbox_diag_computed) + compute_diag_bbox(); + is_bbox_diag_computed = true; + return _diag_bbox; } // Function about manipulation @@ -301,13 +301,13 @@ class SCENE_ITEM_EXPORT Scene_item : public QObject{ //! //! \brief newViewer adds Vaos for `viewer`. //! - //! Must be overriden; + //! Must be overridden; //! virtual void newViewer(CGAL::Three::Viewer_interface* viewer) = 0; //! - //! \brief removeViewer removes the Vaos fo `viewer`. + //! \brief removeViewer removes the Vaos of `viewer`. //! - //! Must be overriden; + //! Must be overridden; //! virtual void removeViewer(CGAL::Three::Viewer_interface* viewer) = 0; @@ -375,16 +375,16 @@ public Q_SLOTS: //!Emits an aboutToBeDestroyed() signal. //!Override this function to delete what needs to be deleted on destruction. - //!This might be needed as items are not always deleted right away by Qt and this behaviour may cause a simily + //!This might be needed as items are not always deleted right away by Qt and this behaviour may cause simply a //!memory leak, for example when multiple items are created at the same time. virtual void itemAboutToBeDestroyed(Scene_item*); //!Returns the alpha value for the item. //! Must be called within a valid openGl context. virtual float alpha() const; - //! Sets the value of the aplha Slider for this item. + //! Sets the value of the alpha Slider for this item. //! - //! Must be overriden; + //! Must be overridden; //! \param alpha must be between 0 and 255 virtual void setAlpha(int alpha); //!Selects a point through raycasting. @@ -413,7 +413,7 @@ public Q_SLOTS: mutable Bbox _bbox; mutable double _diag_bbox; mutable bool is_bbox_computed; - mutable bool is_diag_bbox_computed; + mutable bool is_bbox_diag_computed; virtual void compute_bbox()const{} virtual void compute_diag_bbox()const; // The four basic properties diff --git a/thirdparty/CGAL/include/CGAL/Three/Scene_item_config.h b/thirdparty/CGAL/include/CGAL/Three/Scene_item_config.h index 4ef632b3..812032e4 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Scene_item_config.h +++ b/thirdparty/CGAL/include/CGAL/Three/Scene_item_config.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Scene_item_config.h $ -// $Id: Scene_item_config.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Scene_item_config.h $ +// $Id: include/CGAL/Three/Scene_item_config.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Three/Scene_item_rendering_helper.h b/thirdparty/CGAL/include/CGAL/Three/Scene_item_rendering_helper.h index a4f6aa42..745fcee8 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Scene_item_rendering_helper.h +++ b/thirdparty/CGAL/include/CGAL/Three/Scene_item_rendering_helper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Scene_item_rendering_helper.h $ -// $Id: Scene_item_rendering_helper.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Scene_item_rendering_helper.h $ +// $Id: include/CGAL/Three/Scene_item_rendering_helper.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno @@ -41,7 +41,7 @@ struct Point_container; //! be rendered. //! class DEMO_FRAMEWORK_EXPORT Scene_item_rendering_helper - :public Scene_item + : public Scene_item { Q_OBJECT public: @@ -51,7 +51,7 @@ class DEMO_FRAMEWORK_EXPORT Scene_item_rendering_helper //! //! \brief The `Gl_data_name` enum is used as a flag to specify what should be //! re-computed during `computeElements()`. The flag corresponding to this enum is - //! `Gl_data_names`, and multiple flags can be combined whith the operator `|`. + //! `Gl_data_names`, and multiple flags can be combined with the operator `|`. //! For instance, you can use `GEOMETRY|COLORS` as a single value. //! @todo Review Laurent Rineau We need to find a better name. 1. Do not refer to OpenGL. 2. Why "name"? //! @@ -69,7 +69,7 @@ class DEMO_FRAMEWORK_EXPORT Scene_item_rendering_helper #endif Q_DECLARE_FLAGS(Gl_data_names, Gl_data_name) - QMenu* contextMenu() Q_DECL_OVERRIDE; + QMenu* contextMenu() override; /*! * \brief processData calls `computeElements()` @@ -86,13 +86,13 @@ class DEMO_FRAMEWORK_EXPORT Scene_item_rendering_helper //! It must be between 0 and 255. //! \param alpha the integer value for the alpha channel. //! - void setAlpha(int alpha) Q_DECL_OVERRIDE; + void setAlpha(int alpha) override; //! \brief The item's bounding box. //! //! If the Bbox has never been computed, computes it and //! saves the result for further calls. //! @returns the item's bounding box. - Scene_item::Bbox bbox()const Q_DECL_OVERRIDE; + Scene_item::Bbox bbox()const override; //! //! \brief getTriangleContainer returns the `id`th `Triangle_container`. //! @@ -100,11 +100,11 @@ class DEMO_FRAMEWORK_EXPORT Scene_item_rendering_helper //! //! \brief getEdgeContainer returns the `id`th `Edge_container`. //! - CGAL::Three::Edge_container* getEdgeContainer(std::size_t id)const; + CGAL::Three::Edge_container* getEdgeContainer(std::size_t id) const; //! //! \brief getPointContainer returns the `id`th `Point_container`. //! - CGAL::Three::Point_container* getPointContainer(std::size_t id)const; + CGAL::Three::Point_container* getPointContainer(std::size_t id) const; //! //! \brief setTriangleContainer sets the `id`th `Triangle_container` to `tc`. @@ -134,7 +134,7 @@ class DEMO_FRAMEWORK_EXPORT Scene_item_rendering_helper //! decreasingly. //! void setPointContainer(std::size_t id, - Point_container* tc); + Point_container* tc); //! //! \brief setBuffersFilled specifies if the data should be re-computed. @@ -149,13 +149,13 @@ class DEMO_FRAMEWORK_EXPORT Scene_item_rendering_helper //! \brief getBuffersFilled returns `false` if the item rendering data needs to be re-computed., //! `true` otherwise. //! \see `setBuffersFilled()` - bool getBuffersFilled()const; + bool getBuffersFilled() const; //! //! \brief getBuffersInit returns true if the `Vao`s of `viewer` are ready //! for rendering. //! - bool getBuffersInit(Viewer_interface *viewer)const; + bool getBuffersInit(Viewer_interface *viewer) const; //! //! \brief setBuffersInit specifies if the `Vbo`s need to be initialized. @@ -174,15 +174,15 @@ class DEMO_FRAMEWORK_EXPORT Scene_item_rendering_helper //! saves the result for further calls. //! @returns the item's bounding box's diagonal length. //! @todo must replace the one from Scene_item eventually - virtual double diagonalBbox() const Q_DECL_OVERRIDE; + virtual double bboxDiagonal() const override; //! //! \brief newViewer adds Vaos for `viewer`. //! \param viewer the new viewer. //! - void newViewer(Viewer_interface *viewer) Q_DECL_OVERRIDE; + void newViewer(Viewer_interface *viewer) override; //! \brief removeViewer removes the Vaos for `viewer`. //! \param viewer the viewer to be removed. - void removeViewer(Viewer_interface *viewer) Q_DECL_OVERRIDE; + void removeViewer(Viewer_interface *viewer) override; protected: @@ -190,29 +190,30 @@ class DEMO_FRAMEWORK_EXPORT Scene_item_rendering_helper QSlider* alphaSlider(); //!Returns`true` if `initGL()` was called for `viewer`. - bool isInit(CGAL::Three::Viewer_interface* viewer)const; + bool isInit(CGAL::Three::Viewer_interface* viewer) const; //!Returns the float alpha value of an item. //! This value is between 0.0f and 1.0f. - float alpha() const Q_DECL_OVERRIDE; + float alpha() const override; /*! Fills the `Vbo`s with data. */ - virtual void initializeBuffers(Viewer_interface*)const{} + virtual void initializeBuffers(Viewer_interface*) const {} //!Creates the VAOs and VBOs for viewer. virtual void initGL(CGAL::Three::Viewer_interface* viewer) const; //! //! Computes the items Bbox and stores the result. Must be overridden. //!@todo must replace the one from Scene_item eventually. - virtual void compute_bbox() const Q_DECL_OVERRIDE = 0; + virtual void compute_bbox() const override = 0; //! //! \brief setBbox allows to set the Bbox in compute_bbox(); //! \param b //! - void setBbox(Bbox b)const ; + void setBbox(Bbox b) const; + + virtual void computeElements() const {} - virtual void computeElements()const{} protected: friend struct PRIV; mutable PRIV* priv; diff --git a/thirdparty/CGAL/include/CGAL/Three/Scene_item_with_properties.h b/thirdparty/CGAL/include/CGAL/Three/Scene_item_with_properties.h index 712560db..f20e8710 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Scene_item_with_properties.h +++ b/thirdparty/CGAL/include/CGAL/Three/Scene_item_with_properties.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Scene_item_with_properties.h $ -// $Id: Scene_item_with_properties.h 8f34457 2021-04-13T15:12:51+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Scene_item_with_properties.h $ +// $Id: include/CGAL/Three/Scene_item_with_properties.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime GIMENO @@ -13,7 +13,7 @@ #define SCENE_ITEM_WITH_PROPERTIES_H #include - +#include #ifdef demo_framework_EXPORTS # define DEMO_FRAMEWORK_EXPORT Q_DECL_EXPORT #else @@ -26,11 +26,11 @@ namespace Three { class Scene_item; //! Base class to allow an item to copy properties from another. -//! Properties reprensent the current state of an item : its color, +//! Properties represent the current state of an item : its color, //! the position of its manipulated frame, ... class DEMO_FRAMEWORK_EXPORT Scene_item_with_properties { public: - virtual ~Scene_item_with_properties(){} + virtual ~Scene_item_with_properties(); //!\brief Copies properties from another Scene_item. //! //! Override this function to specify what must be copied. diff --git a/thirdparty/CGAL/include/CGAL/Three/Scene_print_item_interface.h b/thirdparty/CGAL/include/CGAL/Three/Scene_print_item_interface.h index f56eaa99..21083758 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Scene_print_item_interface.h +++ b/thirdparty/CGAL/include/CGAL/Three/Scene_print_item_interface.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Scene_print_item_interface.h $ -// $Id: Scene_print_item_interface.h 3b70343 2020-11-16T16:19:43+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Scene_print_item_interface.h $ +// $Id: include/CGAL/Three/Scene_print_item_interface.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime GIMENO diff --git a/thirdparty/CGAL/include/CGAL/Three/Scene_transparent_interface.h b/thirdparty/CGAL/include/CGAL/Three/Scene_transparent_interface.h index 55621769..8e1bd7b4 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Scene_transparent_interface.h +++ b/thirdparty/CGAL/include/CGAL/Three/Scene_transparent_interface.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Scene_transparent_interface.h $ -// $Id: Scene_transparent_interface.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Scene_transparent_interface.h $ +// $Id: include/CGAL/Three/Scene_transparent_interface.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime GIMENO diff --git a/thirdparty/CGAL/include/CGAL/Three/Scene_zoomable_item_interface.h b/thirdparty/CGAL/include/CGAL/Three/Scene_zoomable_item_interface.h index 364f1e0f..f872cf0b 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Scene_zoomable_item_interface.h +++ b/thirdparty/CGAL/include/CGAL/Three/Scene_zoomable_item_interface.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Scene_zoomable_item_interface.h $ -// $Id: Scene_zoomable_item_interface.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Scene_zoomable_item_interface.h $ +// $Id: include/CGAL/Three/Scene_zoomable_item_interface.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime GIMENO diff --git a/thirdparty/CGAL/include/CGAL/Three/TextRenderer.h b/thirdparty/CGAL/include/CGAL/Three/TextRenderer.h index 7ee7c08b..68a52d1b 100644 --- a/thirdparty/CGAL/include/CGAL/Three/TextRenderer.h +++ b/thirdparty/CGAL/include/CGAL/Three/TextRenderer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/TextRenderer.h $ -// $Id: TextRenderer.h 3b70343 2020-11-16T16:19:43+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/TextRenderer.h $ +// $Id: include/CGAL/Three/TextRenderer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -38,7 +38,7 @@ public : */ TextItem() {} /*! - * \brief The construtor for the TextItem + * \brief The constructor for the TextItem * \param p_x, p_y, p_z the coordinates of the TextItem. * \param p_text the text to render. * \param p_3D @@ -183,7 +183,7 @@ class VIEWER_EXPORT TextRenderer : public QObject{ QList textItems; //!\brief List of `TextItem`s //! - //! Usually fed by the viewer, it holds the text informations from the + //! Usually fed by the viewer, it holds the text information from the //! viewer that are displayed directly on the screen, like the fps, //! the distances, etc. QList local_textItems; diff --git a/thirdparty/CGAL/include/CGAL/Three/Three.h b/thirdparty/CGAL/include/CGAL/Three/Three.h index e023b432..3456d87e 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Three.h +++ b/thirdparty/CGAL/include/CGAL/Three/Three.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Three.h $ -// $Id: Three.h 720b2dd 2021-08-30T12:47:10+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Three.h $ +// $Id: include/CGAL/Three/Three.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Three/Triangle_container.h b/thirdparty/CGAL/include/CGAL/Three/Triangle_container.h index 632421f4..69888271 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Triangle_container.h +++ b/thirdparty/CGAL/include/CGAL/Three/Triangle_container.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Triangle_container.h $ -// $Id: Triangle_container.h f79ec02 2021-06-28T13:11:28+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Triangle_container.h $ +// $Id: include/CGAL/Three/Triangle_container.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno @@ -68,7 +68,7 @@ struct DEMO_FRAMEWORK_EXPORT Triangle_container :public Primitive_container //! //! \param viewer the active `Viewer_interface`. //! - void initGL(CGAL::Three::Viewer_interface* viewer) Q_DECL_OVERRIDE; + void initGL(CGAL::Three::Viewer_interface* viewer) override; //! //! \brief draw is the function that actually renders the data. @@ -76,9 +76,9 @@ struct DEMO_FRAMEWORK_EXPORT Triangle_container :public Primitive_container //! \param is_color_uniform must be `false` if the color buffers are not empty, `true` otherwise. //! void draw(CGAL::Three::Viewer_interface* viewer, - bool is_color_uniform) Q_DECL_OVERRIDE; + bool is_color_uniform) override; - void initializeBuffers(Viewer_interface *viewer) Q_DECL_OVERRIDE; + void initializeBuffers(Viewer_interface *viewer) override; /// \name Getters and Setters for the shaders parameters. /// /// Each of those depends of the `OpenGL_program_IDs` this container is using. diff --git a/thirdparty/CGAL/include/CGAL/Three/Viewer_config.h b/thirdparty/CGAL/include/CGAL/Three/Viewer_config.h index a52a08f5..1b22517d 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Viewer_config.h +++ b/thirdparty/CGAL/include/CGAL/Three/Viewer_config.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Viewer_config.h $ -// $Id: Viewer_config.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Viewer_config.h $ +// $Id: include/CGAL/Three/Viewer_config.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Three/Viewer_interface.h b/thirdparty/CGAL/include/CGAL/Three/Viewer_interface.h index 0a37f630..fa00154f 100644 --- a/thirdparty/CGAL/include/CGAL/Three/Viewer_interface.h +++ b/thirdparty/CGAL/include/CGAL/Three/Viewer_interface.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/Viewer_interface.h $ -// $Id: Viewer_interface.h 8f1c510 2021-08-10T15:21:33+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/Viewer_interface.h $ +// $Id: include/CGAL/Three/Viewer_interface.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -70,7 +70,7 @@ class VIEWER_EXPORT Viewer_interface : public CGAL::QGLViewer{ PROGRAM_OLD_FLAT, /** Used to render flat shading without pre computing normals without geometry shader*/ PROGRAM_SOLID_WIREFRAME, //! Used to render edges with width superior to 1. PROGRAM_NO_INTERPOLATION, //! Used to render faces without interpolating their color. - PROGRAM_HEAT_INTENSITY, //! Used to render special item in Display_property_plugin + PROGRAM_HEAT_INTENSITY, //! Used to render special item in Heat_method_plugin PROGRAM_TETRA_FILTERING, //! Used in Scene_tetrahedra_item with Tetrahedra_filtering_plugin NB_OF_PROGRAMS //! Holds the number of different programs in this enum. }; @@ -239,7 +239,7 @@ public Q_SLOTS: //! If b is true, faces will be ligted from both internal and external side. //! If b is false, only the side that is exposed to the light source will be lighted. virtual void setTwoSides(bool b) = 0; - //! If b is true, then a special color mask is applied to points and meshes to differenciate + //! If b is true, then a special color mask is applied to points and meshes to differentiate //! front-faced and back-faced elements. virtual void setBackFrontShading(bool b) =0; //! \brief sets the fast drawing mode @@ -266,7 +266,7 @@ public Q_SLOTS: virtual void SetOrthoProjection( bool b) =0; public: - //! Gives acces to recent openGL(4.3) features, allowing use of things like + //! Gives access to recent openGL(4.3) features, allowing use of things like //! Geometry Shaders or Depth Textures. //! @returns a pointer to an initialized QOpenGLFunctions_4_3_Core if `isOpenGL_4_3()` is `true` //! @returns nullptr if `isOpenGL_4_3()` is `false` diff --git a/thirdparty/CGAL/include/CGAL/Three/exceptions.h b/thirdparty/CGAL/include/CGAL/Three/exceptions.h index c5039ec1..e8df7bbf 100644 --- a/thirdparty/CGAL/include/CGAL/Three/exceptions.h +++ b/thirdparty/CGAL/include/CGAL/Three/exceptions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Three/include/CGAL/Three/exceptions.h $ -// $Id: exceptions.h 2478b85 2021-11-04T09:14:02+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Three/include/CGAL/Three/exceptions.h $ +// $Id: include/CGAL/Three/exceptions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,10 +19,7 @@ #include #include #include -#include -#include -#include -#include +#include #include namespace CGAL{ @@ -44,7 +41,7 @@ class Script_exception : public std::runtime_error { template struct Optional_or_bool { - typedef boost::optional type; + typedef std::optional type; template static type invoke(Callable f) { return type(f()); } @@ -58,8 +55,6 @@ struct Optional_or_bool { static type invoke(Callable f) { f(); return true; } }; -enum Context { CURRENT_CONTEXT, PARENT_CONTEXT }; - /// This function template wraps a `Callable` that can be called without /// any argument (such as a lambda expression without arguments), and in /// case the function call is in a Qt Script context, wraps the call in a @@ -69,39 +64,34 @@ enum Context { CURRENT_CONTEXT, PARENT_CONTEXT }; template typename Optional_or_bool::type>::type wrap_a_call_to_cpp(Callable f, - QScriptable* qs = 0, + QObject* object = 0, const char* file = 0, - int line = -1, - Context c = CURRENT_CONTEXT) { - typedef typename cpp11::result_of::type Callable_RT; + int line = -1) { + typedef decltype(f()) Callable_RT; typedef Optional_or_bool O_r_b; - typedef typename O_r_b::type Return_type; - + QJSEngine* script_engine = qjsEngine(object); const bool no_try_catch = qApp->property("no-try-catch").toBool(); - if(no_try_catch || qs == 0 || !qs->context()) return O_r_b::invoke(f); + if(no_try_catch || script_engine == 0) return O_r_b::invoke(f); else try { return O_r_b::invoke(f); } catch(const std::exception& e) { const Script_exception* se = dynamic_cast(&e); - QScriptContext* context = qs->context(); - QStringList qt_bt = context->backtrace(); - if(se) qt_bt = se->backtrace(); - std::cerr << "Backtrace:\n"; - Q_FOREACH(QString s, qt_bt) - { - std::cerr << " " << qPrintable(s) << std::endl; + QStringList qt_bt; + if(se) { + qt_bt = se->backtrace(); + if(qt_bt.size() != 0) std::cerr << "Backtrace:\n"; } - context = context->parentContext(); - if(c == PARENT_CONTEXT) { - std::cerr << "> parent"; - context = context->parentContext(); - } else { - std::cerr << "> current"; + QJSValue js_bt = script_engine->newArray(qt_bt.size()); + if(qt_bt.size() != 0) { + quint32 i = 0; + for(auto s: qt_bt) + { + std::cerr << " " << qPrintable(s) << std::endl; + js_bt.setProperty(i++, s); + } } - std::cerr << " context: " - << qPrintable(context->toString()) << std::endl; QString error; if(se) { error = se->what(); @@ -110,18 +100,12 @@ wrap_a_call_to_cpp(Callable f, QString context; if(file != 0) context += QObject::tr(" at file %1").arg(file); if(line != -1) context += QString(":%1").arg(line); - if(!context.isNull()) { - error += context; - qt_bt.push_front(QObject::tr("") + context); - } error += QString(": %1").arg(e.what()); } - QScriptValue v = context->throwError(error); - v.setProperty("backtrace", - qScriptValueFromSequence(context->engine(), qt_bt)); - std::cerr << "result after throwError: " - << qPrintable(v.toString()) << std::endl; - return Return_type(); + QJSValue error_value = script_engine->newErrorObject(QJSValue::GenericError, error); + error_value.setProperty("backtrace", js_bt); + script_engine->throwError(error_value); + return {}; } } diff --git a/thirdparty/CGAL/include/CGAL/Threetuple.h b/thirdparty/CGAL/include/CGAL/Threetuple.h index 66e7c0f9..fced47ab 100644 --- a/thirdparty/CGAL/include/CGAL/Threetuple.h +++ b/thirdparty/CGAL/include/CGAL/Threetuple.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Threetuple.h $ -// $Id: Threetuple.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Threetuple.h $ +// $Id: include/CGAL/Threetuple.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Time_stamper.h b/thirdparty/CGAL/include/CGAL/Time_stamper.h index 94cd9d69..b9abe3ee 100644 --- a/thirdparty/CGAL/include/CGAL/Time_stamper.h +++ b/thirdparty/CGAL/include/CGAL/Time_stamper.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Time_stamper.h $ -// $Id: Time_stamper.h e9b7595 2021-05-04T11:45:57+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Time_stamper.h $ +// $Id: include/CGAL/Time_stamper.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jane Tournois @@ -13,6 +13,7 @@ #define CGAL_TIME_STAMPER_H #include +#include namespace CGAL { @@ -66,6 +67,11 @@ struct Time_stamper return pt->time_stamp(); } + static auto display_id(const T* pt) + { + return std::string("#") + std::to_string(pt->time_stamp()); + } + static std::size_t hash_value(const T* p) { if(nullptr == p) return std::size_t(-1); @@ -101,6 +107,11 @@ struct No_time_stamp return 0; } + static auto display_id(const T* pt) + { + return static_cast(pt); + } + static std::size_t hash_value(const T* p) { constexpr std::size_t shift = internal::rounded_down_log2(sizeof(T)); diff --git a/thirdparty/CGAL/include/CGAL/Timer.h b/thirdparty/CGAL/include/CGAL/Timer.h index aa133750..8b1c7cf6 100644 --- a/thirdparty/CGAL/include/CGAL/Timer.h +++ b/thirdparty/CGAL/include/CGAL/Timer.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Profiling_tools/include/CGAL/Timer.h $ -// $Id: Timer.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Profiling_tools/include/CGAL/Timer.h $ +// $Id: include/CGAL/Timer.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -66,7 +66,7 @@ class CGAL_EXPORT Timer { double time() const; int intervals() const { return interv; } double precision() const; - // Returns timer precison. Computes it dynamically at first call. + // Returns timer precision. Computes it dynamically at first call. // Returns -1.0 if timer system call fails, which, for a proper coded // test towards precision leads to an immediate stop of an otherwise // infinite loop (fixed tolerance * total time >= precision). diff --git a/thirdparty/CGAL/include/CGAL/Timer_impl.h b/thirdparty/CGAL/include/CGAL/Timer_impl.h index 01db01c0..e3c9dd2b 100644 --- a/thirdparty/CGAL/include/CGAL/Timer_impl.h +++ b/thirdparty/CGAL/include/CGAL/Timer_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Profiling_tools/include/CGAL/Timer_impl.h $ -// $Id: Timer_impl.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Profiling_tools/include/CGAL/Timer_impl.h $ +// $Id: include/CGAL/Timer_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Transform_iterator.h b/thirdparty/CGAL/include/CGAL/Transform_iterator.h index 72a0e9d3..5a2d5e89 100644 --- a/thirdparty/CGAL/include/CGAL/Transform_iterator.h +++ b/thirdparty/CGAL/include/CGAL/Transform_iterator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Matrix_search/include/CGAL/Transform_iterator.h $ -// $Id: Transform_iterator.h 4b472db 2021-02-03T10:57:36+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Matrix_search/include/CGAL/Transform_iterator.h $ +// $Id: include/CGAL/Transform_iterator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/thirdparty/CGAL/include/CGAL/Tree_base.h b/thirdparty/CGAL/include/CGAL/Tree_base.h index 81f66906..2e89a876 100644 --- a/thirdparty/CGAL/include/CGAL/Tree_base.h +++ b/thirdparty/CGAL/include/CGAL/Tree_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/SearchStructures/include/CGAL/Tree_base.h $ -// $Id: Tree_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SearchStructures/include/CGAL/Tree_base.h $ +// $Id: include/CGAL/Tree_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,7 +22,6 @@ #include #include #include -#include #ifndef CGAL_TREE_BASE_nullptr #define CGAL_TREE_BASE_nullptr 0 @@ -132,7 +131,7 @@ class Tree_base // ------------------------------------------------------------------- // Tree Anchor: this class is used as a recursion anchor. // The derived tree classes can be nested. Use this class as the -// most inner class. This class is doing nothin exept stopping the recursion +// most inner class. This class is doing nothing except stopping the recursion template class Tree_anchor: public Tree_base< C_Data, C_Window> diff --git a/thirdparty/CGAL/include/CGAL/Tree_traits.h b/thirdparty/CGAL/include/CGAL/Tree_traits.h index 7597a629..f96e35f1 100644 --- a/thirdparty/CGAL/include/CGAL/Tree_traits.h +++ b/thirdparty/CGAL/include/CGAL/Tree_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/SearchStructures/include/CGAL/Tree_traits.h $ -// $Id: Tree_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SearchStructures/include/CGAL/Tree_traits.h $ +// $Id: include/CGAL/Tree_traits.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Triangle_2.h b/thirdparty/CGAL/include/CGAL/Triangle_2.h index 7e229a98..bb4a7147 100644 --- a/thirdparty/CGAL/include/CGAL/Triangle_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangle_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Triangle_2.h $ -// $Id: Triangle_2.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Triangle_2.h $ +// $Id: include/CGAL/Triangle_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,12 +18,13 @@ #define CGAL_TRIANGLE_2_H #include -#include #include #include #include #include +#include + namespace CGAL { template @@ -34,7 +35,7 @@ class Triangle_2 : public R_::Kernel_base::Triangle_2 typedef typename R_::Kernel_base::Triangle_2 RTriangle_2; typedef Triangle_2 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Triangle_3.h b/thirdparty/CGAL/include/CGAL/Triangle_3.h index 133a5a3f..4a54ec78 100644 --- a/thirdparty/CGAL/include/CGAL/Triangle_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangle_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Triangle_3.h $ -// $Id: Triangle_3.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Triangle_3.h $ +// $Id: include/CGAL/Triangle_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,11 +18,12 @@ #define CGAL_TRIANGLE_3_H #include -#include #include #include #include +#include + namespace CGAL { template @@ -35,7 +36,7 @@ class Triangle_3 : public R_::Kernel_base::Triangle_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Triangle_3 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: @@ -105,7 +106,7 @@ class Triangle_3 : public R_::Kernel_base::Triangle_3 return R().construct_bbox_3_object()(*this); } - FT squared_area() const // TODO : use Qrt + decltype(auto) squared_area() const { return R().compute_squared_area_3_object()(*this); } diff --git a/thirdparty/CGAL/include/CGAL/Triangle_accessor_3.h b/thirdparty/CGAL/include/CGAL/Triangle_accessor_3.h index c1c7aeda..61d7d1c5 100644 --- a/thirdparty/CGAL/include/CGAL/Triangle_accessor_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangle_accessor_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/Triangle_accessor_3.h $ -// $Id: Triangle_accessor_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/Triangle_accessor_3.h $ +// $Id: include/CGAL/Triangle_accessor_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,6 @@ #include - #include #include #include @@ -33,7 +32,6 @@ class Triangle_accessor_3 { typedef typename Polyhedron::Error_bad_match Error_bad_match; }; - template < class K,class Items, template < class T, class I, class A> class T_HDS, @@ -41,9 +39,12 @@ template < class K,class Items, class Triangle_accessor_3, K > { typedef Polyhedron_3 Polyhedron; + public: typedef typename K::Triangle_3 Triangle_3; + typedef typename Polyhedron::Facet_const_iterator Triangle_iterator; + typedef typename Polyhedron::Facet_const_handle Triangle_handle; Triangle_accessor_3() { } @@ -68,8 +69,7 @@ class Triangle_accessor_3, K > } }; - - template +template class Triangle_accessor_3 >, K > { typedef Graph_with_descriptor_with_graph > Polyhedron; @@ -108,8 +108,6 @@ class Triangle_accessor_3 >, K } }; - } // end namespace CGAL - #endif // POLYHEDRON_TRIANGLE_ACCESSOR_H diff --git a/thirdparty/CGAL/include/CGAL/Triangular_expansion_visibility_2.h b/thirdparty/CGAL/include/CGAL/Triangular_expansion_visibility_2.h index 0f6bdb21..beb50b02 100644 --- a/thirdparty/CGAL/include/CGAL/Triangular_expansion_visibility_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangular_expansion_visibility_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Visibility_2/include/CGAL/Triangular_expansion_visibility_2.h $ -// $Id: Triangular_expansion_visibility_2.h 1faa0e2 2021-04-28T10:55:26+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Visibility_2/include/CGAL/Triangular_expansion_visibility_2.h $ +// $Id: include/CGAL/Triangular_expansion_visibility_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -481,7 +481,7 @@ class Triangular_expansion_visibility_2 { //std::cout << vh->point() <<" -3- "<< nvh->point() <point(),nvh->point())); } - // but we may also contiue looking along the vertex + // but we may also continue looking along the vertex if(!p_cdt->is_constrained(re)) { collect_needle(q,nvh,nfh,rindex); } @@ -564,7 +564,7 @@ class Triangular_expansion_visibility_2 { //std::cout<< "h1 done"<< std::endl; return oit; }else{ - // spliting at new vertex + // splitting at new vertex //std::cout<< "h2"<< std::endl; *oit++ = expand_edge(q,nvh->point(),right,nfh,rindex,oit); //std::cout<< "h2 done"<< std::endl; @@ -581,7 +581,7 @@ class Triangular_expansion_visibility_2 { //std::cout << "rvh->point() "<< rvh->point() << std::endl<< std::endl; - // determin whether new vertex needs to be reported + // determine whether new vertex needs to be reported if(ro != CGAL::CLOCKWISE && lo != CGAL::COUNTERCLOCKWISE){ *oit++ = nvh->point(); } @@ -601,7 +601,7 @@ class Triangular_expansion_visibility_2 { if(lo == CGAL::CLOCKWISE){ if(p_cdt->is_constrained(le)){ // the edge is constrained - // report interesection with right boarder if exists + // report intersection with right boarder if exists if(ro == CGAL::CLOCKWISE){ *oit++ = ray_seg_intersection(q,right,nvh->point(),lvh->point()); } @@ -620,7 +620,7 @@ class Triangular_expansion_visibility_2 { //std::cout<< "h3 done"<< std::endl; return oit; }else{ - // spliting at new vertex + // splitting at new vertex //std::cout<< "h4"<< std::endl; oit = expand_edge(q,left,nvh->point(),nfh,lindex,oit); //std::cout<< "h4 done"<< std::endl; diff --git a/thirdparty/CGAL/include/CGAL/Triangular_field_2.h b/thirdparty/CGAL/include/CGAL/Triangular_field_2.h index b75d1416..85e07cd7 100644 --- a/thirdparty/CGAL/include/CGAL/Triangular_field_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangular_field_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Stream_lines_2/include/CGAL/Triangular_field_2.h $ -// $Id: Triangular_field_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Stream_lines_2/include/CGAL/Triangular_field_2.h $ +// $Id: include/CGAL/Triangular_field_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Triangulated_mixed_complex_observer_3.h b/thirdparty/CGAL/include/CGAL/Triangulated_mixed_complex_observer_3.h index 98df1b9f..490fecd8 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulated_mixed_complex_observer_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulated_mixed_complex_observer_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/Triangulated_mixed_complex_observer_3.h $ -// $Id: Triangulated_mixed_complex_observer_3.h 1faa0e2 2021-04-28T10:55:26+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/Triangulated_mixed_complex_observer_3.h $ +// $Id: include/CGAL/Triangulated_mixed_complex_observer_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Triangulation.h b/thirdparty/CGAL/include/CGAL/Triangulation.h index b1489e10..61a42429 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/Triangulation.h $ -// $Id: Triangulation.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/Triangulation.h $ +// $Id: include/CGAL/Triangulation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus @@ -88,12 +88,12 @@ class Triangulation // Wrapper struct Coaffine_orientation_d { - boost::optional* fop; + std::optional* fop; Construct_flat_orientation_d cfo; In_flat_orientation_d ifo; Coaffine_orientation_d( - boost::optional& x, + std::optional& x, Construct_flat_orientation_d const&y, In_flat_orientation_d const&z) : fop(&x), cfo(y), ifo(z) {} @@ -102,9 +102,9 @@ class Triangulation CGAL::Orientation operator()(Iter a, Iter b) const { if (*fop) - return ifo(fop->get(),a,b); + return ifo(fop->value(),a,b); *fop = cfo(a,b); - CGAL_assertion(ifo(fop->get(),a,b) == CGAL::POSITIVE); + CGAL_assertion(ifo(fop->value(),a,b) == CGAL::POSITIVE); return CGAL::POSITIVE; } }; @@ -117,7 +117,7 @@ class Triangulation flat_orientation_ = *preset_flat_orientation_.second; } else - flat_orientation_ = boost::none; + flat_orientation_ = std::nullopt; } typedef typename TriangulationTraits::Orientation_d @@ -188,7 +188,7 @@ class Triangulation Triangulation_ds tds_; const Geom_traits kernel_; Vertex_handle infinity_; - mutable boost::optional flat_orientation_; + mutable std::optional flat_orientation_; // The user can specify a Flat_orientation_d object to be used for // orienting simplices of a specific dimension // (= preset_flat_orientation_.first) diff --git a/thirdparty/CGAL/include/CGAL/Triangulation/internal/Combination_enumerator.h b/thirdparty/CGAL/include/CGAL/Triangulation/internal/Combination_enumerator.h index a6d0c6bb..27e26aeb 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation/internal/Combination_enumerator.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation/internal/Combination_enumerator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/Triangulation/internal/Combination_enumerator.h $ -// $Id: Combination_enumerator.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/Triangulation/internal/Combination_enumerator.h $ +// $Id: include/CGAL/Triangulation/internal/Combination_enumerator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus diff --git a/thirdparty/CGAL/include/CGAL/Triangulation/internal/Dummy_TDS.h b/thirdparty/CGAL/include/CGAL/Triangulation/internal/Dummy_TDS.h index 4ebfd19b..333e31a4 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation/internal/Dummy_TDS.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation/internal/Dummy_TDS.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/Triangulation/internal/Dummy_TDS.h $ -// $Id: Dummy_TDS.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/Triangulation/internal/Dummy_TDS.h $ +// $Id: include/CGAL/Triangulation/internal/Dummy_TDS.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus diff --git a/thirdparty/CGAL/include/CGAL/Triangulation/internal/Static_or_dynamic_array.h b/thirdparty/CGAL/include/CGAL/Triangulation/internal/Static_or_dynamic_array.h index 18af11e3..08db7f3c 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation/internal/Static_or_dynamic_array.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation/internal/Static_or_dynamic_array.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/Triangulation/internal/Static_or_dynamic_array.h $ -// $Id: Static_or_dynamic_array.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/Triangulation/internal/Static_or_dynamic_array.h $ +// $Id: include/CGAL/Triangulation/internal/Static_or_dynamic_array.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus diff --git a/thirdparty/CGAL/include/CGAL/Triangulation/internal/Triangulation_ds_iterators.h b/thirdparty/CGAL/include/CGAL/Triangulation/internal/Triangulation_ds_iterators.h index f48d3662..4581184b 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation/internal/Triangulation_ds_iterators.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation/internal/Triangulation_ds_iterators.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/Triangulation/internal/Triangulation_ds_iterators.h $ -// $Id: Triangulation_ds_iterators.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/Triangulation/internal/Triangulation_ds_iterators.h $ +// $Id: include/CGAL/Triangulation/internal/Triangulation_ds_iterators.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus (Well... `copy, paste and hack' of Monique Teillaud's work) diff --git a/thirdparty/CGAL/include/CGAL/Triangulation/internal/utilities.h b/thirdparty/CGAL/include/CGAL/Triangulation/internal/utilities.h index 2a63f3b3..43365a03 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation/internal/utilities.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation/internal/utilities.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/Triangulation/internal/utilities.h $ -// $Id: utilities.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/Triangulation/internal/utilities.h $ +// $Id: include/CGAL/Triangulation/internal/utilities.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_2.h index 039c3438..e226c30f 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_2.h $ -// $Id: Triangulation_2.h 5945e48 2021-09-17T08:14:06+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_2.h $ +// $Id: include/CGAL/Triangulation_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers, Mariette Yvinec @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include @@ -254,7 +254,7 @@ class Triangulation_2 insert(first,last); } - //Assignement + //Assignment Triangulation_2 &operator=(const Triangulation_2 &tr); Triangulation_2 &operator=(Triangulation_2 &&) = default; @@ -631,12 +631,12 @@ class Triangulation_2 #ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< - typename std::iterator_traits::value_type, - Point - > - >::type* = nullptr) + std::enable_if_t< + std::is_convertible< + typename std::iterator_traits::value_type, + Point + >::value + >* = nullptr) #else template < class InputIterator > std::ptrdiff_t @@ -696,11 +696,11 @@ std::ptrdiff_t insert(InputIterator first, InputIterator last, std::ptrdiff_t insert(InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< + std::enable_if_t< + std::is_convertible< typename std::iterator_traits::value_type, std::pair::type> - > >::type* = NULL) + >::value >* = NULL) { return insert_with_info< std::pair::type> >(first,last); } @@ -709,12 +709,10 @@ std::ptrdiff_t insert(InputIterator first, InputIterator last, std::ptrdiff_t insert(boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, - typename boost::enable_if< - boost::mpl::and_< - boost::is_convertible< typename std::iterator_traits::value_type, Point >, - boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - > - >::type* = NULL) + std::enable_if_t< + std::is_convertible_v< typename std::iterator_traits::value_type, Point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > + >* = NULL) { return insert_with_info< boost::tuple::type> >(first,last); } @@ -737,7 +735,7 @@ bool well_oriented(Vertex_handle v) const } bool from_convex_hull(Vertex_handle v) { - CGAL_triangulation_precondition(!is_infinite(v)); + CGAL_precondition(!is_infinite(v)); Vertex_circulator vc = incident_vertices(v), done(vc); do { if(is_infinite(vc)) return true; } while(++vc != done); return false; @@ -787,7 +785,7 @@ Triangulation_2(const Triangulation_2 &tr) _infinite_vertex = _tds.copy_tds(tr._tds, tr.infinite_vertex()); } -//Assignement +//Assignment template Triangulation_2 & Triangulation_2:: @@ -864,7 +862,7 @@ typename Triangulation_2::Vertex_handle Triangulation_2:: finite_vertex() const { - CGAL_triangulation_precondition (number_of_vertices() >= 1); + CGAL_precondition (number_of_vertices() >= 1); return (finite_vertices_begin()); } @@ -895,50 +893,78 @@ is_valid(bool verbose, int level) const if (dimension() <= 0 || (dimension()==1 && number_of_vertices() == 2 ) ) return result; - if (dimension() == 1) { + if (dimension() == 1) + { Finite_vertices_iterator it1 = finite_vertices_begin(), it2(it1), it3(it1); ++it2; ++it3; ++it3; while( it3 != finite_vertices_end()) { - Orientation s = orientation(it1->point(), - it2->point(), - it3->point()); - result = result && s == COLLINEAR ; - CGAL_triangulation_assertion(result); + Orientation s = orientation(point(it1), point(it2), point(it3)); + result = result && (s == COLLINEAR) ; + if(verbose && (s != COLLINEAR)) + { + std::cerr << "Error: " << point(it1) << " " + << point(it2) << " and " + << point(it3) << " are not collinear" << std::endl; + } + + CGAL_assertion(result); ++it1 ; ++it2; ++it3; } } - else { //dimension() == 2 - for(Finite_faces_iterator it=finite_faces_begin(); - it!=finite_faces_end(); it++) { - CGAL_triangulation_assertion( ! is_infinite(it)); - Orientation s = orientation(it->vertex(0)->point(), - it->vertex(1)->point(), - it->vertex(2)->point()); - CGAL_triangulation_assertion( s == LEFT_TURN ); + else //dimension() == 2 + { + for(Finite_faces_iterator it=finite_faces_begin(); it!=finite_faces_end(); it++) + { + CGAL_assertion( ! is_infinite(it)); + Orientation s = orientation(point(it, 0), point(it, 1), point(it, 2)); result = result && ( s == LEFT_TURN ); + + if(verbose && (s != LEFT_TURN)) + { + std::cerr << "Error: " << point(it, 0) << " " + << point(it, 1) << " and " + << point(it, 2) << " form a badly oriented face" << std::endl; + } + + CGAL_assertion(result); } Vertex_circulator start = incident_vertices(infinite_vertex()); Vertex_circulator pc(start); Vertex_circulator qc(start); ++qc; Vertex_circulator rc(start); ++rc; ++rc; - do { - Orientation s = orientation(pc->point(), - qc->point(), - rc->point()); - CGAL_triangulation_assertion( s != LEFT_TURN ); + do + { + Orientation s = orientation(point(pc), point(qc), point(rc)); + CGAL_assertion( s != LEFT_TURN ); result = result && ( s != LEFT_TURN ); + + if(verbose && (s == LEFT_TURN)) + { + std::cerr << "Error: " << point(pc) << " " + << point(qc) << " and " + << point(rc) << " form a badly oriented infinite face" << std::endl; + } + ++pc ; ++qc ; ++rc; } while(pc != start); // check number of faces. This cannot be done by the Tds // which does not know the number of components nor the genus - result = result && (number_of_faces() == 2*(number_of_vertices()+1) - - 4 - - degree(infinite_vertex())); - CGAL_triangulation_assertion( result); + const bool genus_check = number_of_faces() == 2*(number_of_vertices()+1) - 4 - degree(infinite_vertex()); + result = result && genus_check; + if(verbose && !genus_check) + { + std::cerr << "Error: Genus check fail " << number_of_faces() + << " vs " << 2*(number_of_vertices()+1) - 4 - degree(infinite_vertex()) + << " (nv = " << number_of_vertices() + << " nf = " << number_of_faces() + << " and degree(infinite_vertex()) = " << degree(infinite_vertex()) << std::endl; + } + + CGAL_assertion( result); } return result; } @@ -1080,9 +1106,9 @@ const typename Triangulation_2::Point& Triangulation_2:: point(Face_handle f, int i) const { - CGAL_triangulation_precondition( dimension() >= 0 ); - CGAL_triangulation_precondition( i >= 0 && i <= dimension() ); - CGAL_triangulation_precondition( ! is_infinite(f->vertex(i)) ); + CGAL_precondition( dimension() >= 0 ); + CGAL_precondition( i >= 0 && i <= dimension() ); + CGAL_precondition( ! is_infinite(f->vertex(i)) ); return f->vertex(i)->point(); } @@ -1091,8 +1117,8 @@ const typename Triangulation_2::Point& Triangulation_2:: point(Vertex_handle v) const { - CGAL_triangulation_precondition( dimension() >= 0 ); - CGAL_triangulation_precondition( ! is_infinite(v) ); + CGAL_precondition( dimension() >= 0 ); + CGAL_precondition( ! is_infinite(v) ); return v->point(); } @@ -1101,7 +1127,7 @@ typename Triangulation_2::Segment Triangulation_2:: segment(Face_handle f, int i) const { - CGAL_triangulation_precondition( ! is_infinite(f,i)); + CGAL_precondition( ! is_infinite(f,i)); typename Gt::Construct_segment_2 construct_segment = geom_traits().construct_segment_2_object(); return construct_segment(construct_point(f->vertex(ccw(i))->point()), @@ -1113,7 +1139,7 @@ typename Triangulation_2::Segment Triangulation_2:: segment(const Edge& e) const { - CGAL_triangulation_precondition(! is_infinite(e)); + CGAL_precondition(! is_infinite(e)); typename Gt::Construct_segment_2 construct_segment = geom_traits().construct_segment_2_object(); return construct_segment(construct_point(e.first->vertex(ccw(e.second))->point()), @@ -1149,7 +1175,7 @@ typename Triangulation_2::Triangle Triangulation_2:: triangle(Face_handle f) const { - CGAL_triangulation_precondition( ! is_infinite(f) ); + CGAL_precondition( ! is_infinite(f) ); typename Gt::Construct_triangle_2 construct_triangle = geom_traits().construct_triangle_2_object(); return construct_triangle(construct_point(f->vertex(0)->point()), @@ -1162,13 +1188,13 @@ void Triangulation_2:: flip(Face_handle f, int i) { - CGAL_triangulation_precondition ( f != Face_handle() ); - CGAL_triangulation_precondition (i == 0 || i == 1 || i == 2); - CGAL_triangulation_precondition( dimension()==2); + CGAL_precondition ( f != Face_handle() ); + CGAL_precondition (i == 0 || i == 1 || i == 2); + CGAL_precondition( dimension()==2); - CGAL_triangulation_precondition( !is_infinite(f) && + CGAL_precondition( !is_infinite(f) && !is_infinite(f->neighbor(i)) ); - CGAL_triangulation_precondition( + CGAL_precondition( orientation(f->vertex(i)->point(), f->vertex(cw(i))->point(), mirror_vertex(f,i)->point()) == RIGHT_TURN && @@ -1184,7 +1210,7 @@ typename Triangulation_2::Vertex_handle Triangulation_2:: insert_first(const Point& p) { - CGAL_triangulation_precondition(number_of_vertices() == 0); + CGAL_precondition(number_of_vertices() == 0); Vertex_handle v = _tds.insert_second(); v->set_point(p); return v; @@ -1195,7 +1221,7 @@ typename Triangulation_2::Vertex_handle Triangulation_2:: insert_second(const Point& p) { - CGAL_triangulation_precondition(number_of_vertices() == 1); + CGAL_precondition(number_of_vertices() == 1); Vertex_handle v = _tds.insert_dim_up(infinite_vertex(), true); v->set_point(p); return v; @@ -1206,7 +1232,7 @@ typename Triangulation_2::Vertex_handle Triangulation_2:: insert_in_edge(const Point& p, Face_handle f,int i) { - CGAL_triangulation_exactness_precondition( + CGAL_exactness_precondition( orientation(f->vertex(cw(i))->point(), p, f->vertex(ccw(i))->point()) == COLLINEAR && collinear_between(f->vertex(cw(i))->point(), p, @@ -1221,7 +1247,7 @@ typename Triangulation_2::Vertex_handle Triangulation_2:: insert_in_face(const Point& p, Face_handle f) { - CGAL_triangulation_precondition(oriented_side(f,p) == ON_POSITIVE_SIDE); + CGAL_precondition(oriented_side(f,p) == ON_POSITIVE_SIDE); Vertex_handle v= _tds.insert_in_face(f); v->set_point(p); return v; @@ -1232,7 +1258,7 @@ typename Triangulation_2::Vertex_handle Triangulation_2:: insert_outside_convex_hull(const Point& p, Face_handle f) { - CGAL_triangulation_precondition(is_infinite(f) && dimension() >= 1); + CGAL_precondition(is_infinite(f) && dimension() >= 1); Vertex_handle v; if (dimension() == 1) v=insert_outside_convex_hull_1(p, f); @@ -1248,8 +1274,8 @@ typename Triangulation_2::Vertex_handle Triangulation_2:: insert_outside_convex_hull_1(const Point& p, Face_handle f) { - CGAL_triangulation_precondition( is_infinite(f) && dimension()==1); - CGAL_triangulation_precondition( + CGAL_precondition( is_infinite(f) && dimension()==1); + CGAL_precondition( orientation(mirror_vertex(f, f->index(infinite_vertex()))->point(), f->vertex(1- f->index(infinite_vertex()))->point(), p) == COLLINEAR && @@ -1266,11 +1292,11 @@ typename Triangulation_2::Vertex_handle Triangulation_2:: insert_outside_convex_hull_2(const Point& p, Face_handle f) { - CGAL_triangulation_precondition(is_infinite(f)); + CGAL_precondition(is_infinite(f)); int li = f->index(infinite_vertex()); - CGAL_triangulation_precondition( + CGAL_precondition( orientation(p, f->vertex(ccw(li))->point(), f->vertex(cw(li))->point()) == LEFT_TURN); @@ -1331,14 +1357,14 @@ typename Triangulation_2::Vertex_handle Triangulation_2:: insert_outside_affine_hull(const Point& p) { - CGAL_triangulation_precondition(dimension() < 2); + CGAL_precondition(dimension() < 2); bool conform = false; if (dimension() == 1) { Face_handle f = (*finite_edges_begin()).first; Orientation orient = orientation( f->vertex(0)->point(), f->vertex(1)->point(), p); - CGAL_triangulation_precondition(orient != COLLINEAR); + CGAL_precondition(orient != COLLINEAR); conform = ( orient == COUNTERCLOCKWISE); } Vertex_handle v = _tds.insert_dim_up( infinite_vertex(), conform); @@ -1384,7 +1410,7 @@ insert(const Point& p, Locate_type lt, Face_handle loc, int li) case VERTEX: return loc->vertex(li); } - CGAL_triangulation_assertion(false); // locate step failed + CGAL_assertion(false); // locate step failed return Vertex_handle(); } @@ -1431,8 +1457,8 @@ void Triangulation_2:: remove(Vertex_handle v) { - CGAL_triangulation_precondition( v != Vertex_handle()); - CGAL_triangulation_precondition( !is_infinite(v)); + CGAL_precondition( v != Vertex_handle()); + CGAL_precondition( !is_infinite(v)); if (number_of_vertices() == 1) remove_first(v); @@ -1463,7 +1489,7 @@ test_dim_down(Vertex_handle v) const //it goes down to 1 iff // 1) any finite face is incident to v // 2) all vertices are collinear - CGAL_triangulation_precondition(dimension() == 2); + CGAL_precondition(dimension() == 2); bool dim1 = true; Finite_faces_iterator fit = finite_faces_begin(); while (dim1==true && fit != finite_faces_end()) { @@ -1564,8 +1590,8 @@ void Triangulation_2:: remove_and_give_new_faces(Vertex_handle v, OutputItFaces fit) { - CGAL_triangulation_precondition( v != Vertex_handle()); - CGAL_triangulation_precondition( !is_infinite(v)); + CGAL_precondition( v != Vertex_handle()); + CGAL_precondition( !is_infinite(v)); if(number_of_vertices() == 1) remove_first(v); else if(number_of_vertices() == 2) remove_second(v); @@ -1668,7 +1694,7 @@ Triangulation_2:: fill_hole(Vertex_handle v, std::list< Edge > & hole) { // uses the fact that the hole is starshaped - // with repect to v->point() + // with respect to v->point() typedef std::list Hole; Face_handle ff, fn; @@ -1775,7 +1801,7 @@ fill_hole(Vertex_handle v, std::list< Edge > & hole) // now hole has three edges typename Hole::iterator hit; hit = hole.begin(); -// // I don't know why the following yelds a segmentation fault +// // I don't know why the following yields a segmentation fault // create_face( (*hit).first, (*hit).second, // (* ++hit).first, (*hit).second, // (* ++hit).first, (*hit).second); @@ -1793,7 +1819,7 @@ Triangulation_2:: fill_hole(Vertex_handle v, std::list & hole, OutputItFaces fit) { // uses the fact that the hole is starshaped - // with repect to v->point() + // with respect to v->point() typedef std::list Hole; Face_handle ff, fn; @@ -1900,7 +1926,7 @@ fill_hole(Vertex_handle v, std::list & hole, OutputItFaces fit) // now hole has three edges typename Hole::iterator hit; hit = hole.begin(); -// // I don't know why the following yelds a segmentation fault +// // I don't know why the following yields a segmentation fault // create_face( (*hit).first, (*hit).second, // (* ++hit).first, (*hit).second, // (* ++hit).first, (*hit).second); @@ -2161,7 +2187,7 @@ typename Triangulation_2::Vertex_handle Triangulation_2:: move_if_no_collision(Vertex_handle v, const Point &p) { - CGAL_triangulation_precondition(!is_infinite(v)); + CGAL_precondition(!is_infinite(v)); if(v->point() == p) return v; const int dim = dimension(); @@ -2192,7 +2218,7 @@ move_if_no_collision(Vertex_handle v, const Point &p) Face_handle f = v->face(); int i = f->index(v); if (i==0) {f = f->neighbor(1);} - CGAL_triangulation_assertion(f->index(v) == 1); + CGAL_assertion(f->index(v) == 1); Face_handle g= f->neighbor(0); f->set_vertex(1, g->vertex(1)); f->set_neighbor(0,g->neighbor(0)); @@ -2202,7 +2228,7 @@ move_if_no_collision(Vertex_handle v, const Point &p) Face_handle f_ins = inserted->face(); i = f_ins->index(inserted); if (i==0) {f_ins = f_ins->neighbor(1);} - CGAL_triangulation_assertion(f_ins->index(inserted) == 1); + CGAL_assertion(f_ins->index(inserted) == 1); Face_handle g_ins = f_ins->neighbor(0); f_ins->set_vertex(1, v); g_ins->set_vertex(0, v); @@ -2264,7 +2290,7 @@ typename Triangulation_2::Vertex_handle Triangulation_2:: move(Vertex_handle v, const Point &p) { - CGAL_triangulation_precondition(!is_infinite(v)); + CGAL_precondition(!is_infinite(v)); if(v->point() == p) return v; Vertex_handle w = move_if_no_collision(v,p); if(w != v) { @@ -2282,7 +2308,7 @@ move_if_no_collision_and_give_new_faces(Vertex_handle v, const Point &p, OutputItFaces oif) { - CGAL_triangulation_precondition(!is_infinite(v)); + CGAL_precondition(!is_infinite(v)); if(v->point() == p) return v; const int dim = this->dimension(); @@ -2318,7 +2344,7 @@ move_if_no_collision_and_give_new_faces(Vertex_handle v, Face_handle f = v->face(); int i = f->index(v); if (i==0) {f = f->neighbor(1);} - CGAL_triangulation_assertion(f->index(v) == 1); + CGAL_assertion(f->index(v) == 1); Face_handle g= f->neighbor(0); f->set_vertex(1, g->vertex(1)); f->set_neighbor(0,g->neighbor(0)); @@ -2329,7 +2355,7 @@ move_if_no_collision_and_give_new_faces(Vertex_handle v, Face_handle f_ins = inserted->face(); i = f_ins->index(inserted); if (i==0) {f_ins = f_ins->neighbor(1);} - CGAL_triangulation_assertion(f_ins->index(inserted) == 1); + CGAL_assertion(f_ins->index(inserted) == 1); Face_handle g_ins = f_ins->neighbor(0); f_ins->set_vertex(1, v); g_ins->set_vertex(0, v); @@ -2551,7 +2577,7 @@ march_locate_1D(const Point& t, return (*eit).first; } } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return Face_handle(); } @@ -2563,7 +2589,7 @@ march_locate_2D_LFC(Face_handle start, Locate_type& lt, int& li) const { - // CGAL_triangulation_precondition( ! is_infinite(start) ); + // CGAL_precondition( ! is_infinite(start) ); const Point& p = start->vertex(0)->point(); const Point& q = start->vertex(1)->point(); const Point& r = start->vertex(2)->point(); @@ -2641,7 +2667,7 @@ march_locate_2D_LFC(Face_handle start, } } while (--fc != done); //should not arrive there; - CGAL_triangulation_assertion(fc != done); + CGAL_assertion(fc != done); } while(! lfc.locate(t, lt, li) ){ @@ -2685,7 +2711,7 @@ compare_walks(const Point& p, show_face(c2); std::cerr << std::endl; } - CGAL_triangulation_assertion(b); + CGAL_assertion(b); } @@ -2698,7 +2724,7 @@ march_locate_2D(Face_handle c, Locate_type& lt, int& li) const { - CGAL_triangulation_assertion(! is_infinite(c)); + CGAL_assertion(! is_infinite(c)); boost::rand48 rng; @@ -2874,7 +2900,7 @@ march_locate_2D(Face_handle c, Locate_type& lt, int& li) const { - CGAL_triangulation_assertion(! is_infinite(c)); + CGAL_assertion(! is_infinite(c)); boost::uniform_smallint<> three(0, 2); boost::variate_generator > die3(rng, three); @@ -2898,7 +2924,7 @@ march_locate_2D(Face_handle c, const Point & p0 = c->vertex( i )->point(); const Point & p1 = c->vertex( ccwi )->point(); Orientation o0, o1, o2; - CGAL_triangulation_assertion(orientation(p0,p1,c->vertex( cwi )->point())==POSITIVE); + CGAL_assertion(orientation(p0,p1,c->vertex( cwi )->point())==POSITIVE); if(c->neighbor(cwi) == prev){ o0 = POSITIVE; } else { @@ -3403,7 +3429,7 @@ typename Triangulation_2::Line_face_circulator Triangulation_2:: line_walk(const Point& p, const Point& q, Face_handle f) const { - CGAL_triangulation_precondition( (dimension() == 2) && ! xy_equal(p,q)); + CGAL_precondition( (dimension() == 2) && ! xy_equal(p,q)); Line_face_circulator lfc = (f == Face_handle()) ? Line_face_circulator(p, q, this) : Line_face_circulator(p, q, f, this); @@ -3442,7 +3468,7 @@ bounded_side(const Point &p0, const Point &p1, const Point &p2, const Point &p) const { // return position of point p with respect to triangle p0p1p2 - CGAL_triangulation_precondition( orientation(p0, p1, p2) != COLLINEAR); + CGAL_precondition( orientation(p0, p1, p2) != COLLINEAR); Orientation o1 = orientation(p0, p1, p), o2 = orientation(p1, p2, p), o3 = orientation(p2, p0, p); @@ -3474,7 +3500,7 @@ Oriented_side Triangulation_2:: oriented_side(Face_handle f, const Point &p) const { - CGAL_triangulation_precondition ( dimension()==2); + CGAL_precondition ( dimension()==2); return oriented_side(f->vertex(0)->point(), f->vertex(1)->point(), f->vertex(2)->point(), @@ -3487,7 +3513,7 @@ Triangulation_2:: side_of_oriented_circle(const Point &p0, const Point &p1, const Point &p2, const Point &p, bool perturb) const { - //CGAL_triangulation_precondition( orientation(p0, p1, p2) == POSITIVE ); + //CGAL_precondition( orientation(p0, p1, p2) == POSITIVE ); // no reason for such precondition and it invalidates fast removal in Delaunay typename Gt::Side_of_oriented_circle_2 pred = geom_traits().side_of_oriented_circle_2_object(); @@ -3518,7 +3544,7 @@ side_of_oriented_circle(const Point &p0, const Point &p1, const Point &p2, if (points[i] == &p0 && (o = orientation(p,p1,p2)) != COLLINEAR ) return Oriented_side(o); } - // CGAL_triangulation_assertion(false); + // CGAL_assertion(false); //no reason for such precondition and it invalidates fast removal in Delaunay return ON_NEGATIVE_SIDE; } @@ -3638,7 +3664,7 @@ typename Triangulation_2::Point_2 Triangulation_2:: circumcenter(Face_handle f) const { - CGAL_triangulation_precondition (dimension()==2); + CGAL_precondition (dimension()==2); return circumcenter((f->vertex(0))->point(), (f->vertex(1))->point(), (f->vertex(2))->point()); @@ -3785,10 +3811,223 @@ std::istream& operator>>(std::istream& is, Triangulation_2 &tr) { tr.file_input(is); - CGAL_triangulation_assertion(tr.is_valid()); + CGAL_assertion(tr.is_valid()); return is; } +namespace internal { + +// Internal function used by operator==. +template < class GT, class TDS1, class TDS2, typename FMAP, typename VMAP > +bool +test_next(const Triangulation_2& t1, + const Triangulation_2& t2, + typename Triangulation_2::Face_handle f1, + typename Triangulation_2::Face_handle f2, + FMAP& Fmap, + VMAP& Vmap) +{ + // This function tests and registers the 3 neighbors of f1/f2, + // and recursively calls itself over them. + // We don't use the call stack as it may overflow + // Returns false if an inequality has been found. + + // Precondition: f1, f2 have been registered as well as their 3 vertices. + CGAL_precondition(t1.dimension() >= 2); + CGAL_precondition(Fmap[f1] == f2); + CGAL_precondition(Vmap.find(f1->vertex(0)) != Vmap.end()); + CGAL_precondition(Vmap.find(f1->vertex(1)) != Vmap.end()); + CGAL_precondition(t1.dimension() == 1 || Vmap.find(f1->vertex(2)) != Vmap.end()); + + typedef Triangulation_2 Tr1; + typedef Triangulation_2 Tr2; + typedef typename Tr1::Vertex_handle Vertex_handle1; + typedef typename Tr1::Face_handle Face_handle1; + typedef typename Tr2::Vertex_handle Vertex_handle2; + typedef typename Tr2::Face_handle Face_handle2; + + typedef typename VMAP::const_iterator Vit; + typedef typename FMAP::const_iterator Fit; + + typedef typename Tr1::Geom_traits::Construct_point_2 Construct_point_2; + typedef typename Tr1::Geom_traits::Compare_xy_2 Compare_xy_2; + + Compare_xy_2 cmp1 = t1.geom_traits().compare_xy_2_object(); + Construct_point_2 cp = t1.geom_traits().construct_point_2_object(); + + std::vector > face_stack; + face_stack.emplace_back(f1, f2); + + while(! face_stack.empty()) + { + Face_handle1 f1 = face_stack.back().first; + Face_handle2 f2 = face_stack.back().second; + face_stack.pop_back(); + + for(int i=0; i <= t1.dimension(); ++i) + { + Face_handle1 n1 = f1->neighbor(i); + Fit fit = Fmap.find(n1); + Vertex_handle1 v1 = f1->vertex(i); + Vertex_handle2 v2 = Vmap[v1]; + Face_handle2 n2 = f2->neighbor(f2->index(v2)); + if(fit != Fmap.end()) + { + // n1 was already registered. + if(fit->second != n2) + return false; + + continue; + } + + // n1 has not yet been registered. + // We check that the new vertices match geometrically. + // And we register them. + Vertex_handle1 vn1 = n1->vertex(n1->index(f1)); + Vertex_handle2 vn2 = n2->vertex(n2->index(f2)); + Vit vit = Vmap.find(vn1); + if(vit != Vmap.end()) + { + // vn1 already registered + if(vit->second != vn2) + return false; + } + else + { + if(t2.is_infinite(vn2)) + return false; // vn1 can't be infinite, + + // since it would have been registered. + if(cmp1(cp(vn1->point()), cp(vn2->point())) != 0) + return false; + + // We register vn1/vn2. + Vmap.emplace(vn1, vn2); + } + + // We register n1/n2. + Fmap.emplace(n1, n2); + face_stack.emplace_back(n1, n2); + } + } + + return true; +} + +} // namespace internal + +template < class GT, class TDS1, class TDS2 > +bool +operator==(const Triangulation_2& t1, + const Triangulation_2& t2) +{ + typedef typename Triangulation_2::Vertex_handle Vertex_handle1; + typedef typename Triangulation_2::Face_handle Face_handle1; + typedef typename Triangulation_2::Vertex_handle Vertex_handle2; + typedef typename Triangulation_2::Face_handle Face_handle2; + + typedef typename Triangulation_2::Point Point; + + typedef typename Triangulation_2::Geom_traits::Equal_2 Equal_2; + typedef typename Triangulation_2::Geom_traits::Compare_xy_2 Compare_xy_2; + typedef typename Triangulation_2::Geom_traits::Construct_point_2 Construct_point_2; + + Equal_2 equal = t1.geom_traits().equal_2_object(); + Compare_xy_2 cmp1 = t1.geom_traits().compare_xy_2_object(); + Compare_xy_2 cmp2 = t2.geom_traits().compare_xy_2_object(); + Construct_point_2 cp = t1.geom_traits().construct_point_2_object(); + + // Some quick checks. + if(t1.dimension() != t2.dimension() || + t1.number_of_vertices() != t2.number_of_vertices() || + t1.number_of_faces() != t2.number_of_faces()) + return false; + + int dim = t1.dimension(); + // Special case for dimension < 1. + // The triangulation is uniquely defined in these cases. + if(dim == -1) + return true; + + // Special case for dimensions 0 and 1. + if(dim < 2) + { + // It's enough to test that the points are the same, + // since the triangulation is uniquely defined in this case. + std::vector V1 (t1.points_begin(), t1.points_end()); + std::vector V2 (t2.points_begin(), t2.points_end()); + + std::sort(V1.begin(), V1.end(), + [&cmp1, &cp](const Point& p1, const Point& p2){ return cmp1(cp(p1), cp(p2))==SMALLER; }); + + std::sort(V2.begin(), V2.end(), + [&cmp2, &cp](const Point& p1, const Point& p2){ return cmp2(cp(p1), cp(p2))==SMALLER; }); + + return V1 == V2; + } + + // We will store the mapping between the 2 triangulations vertices and faces in 2 maps. + std::unordered_map Vmap; + std::unordered_map Fmap; + + // Handle the infinite vertex. + Vertex_handle1 v1 = t1.infinite_vertex(); + Vertex_handle2 iv2 = t2.infinite_vertex(); + Vmap.emplace(v1, iv2); + + // We pick one infinite face of t1, and try to match it against the infinite faces of t2. + Face_handle1 f = v1->face(); + Vertex_handle1 v2 = f->vertex((f->index(v1)+1)%(dim+1)); + Vertex_handle1 v3 = f->vertex((f->index(v1)+2)%(dim+1)); + const Point& p2 = v2->point(); + const Point& p3 = v3->point(); + + std::vector ifs; + auto fc = t2.incident_faces(iv2), done(fc); + do { + ifs.push_back(fc); + } while(++fc != done); + + for(typename std::vector::const_iterator fit = ifs.begin(); + fit != ifs.end(); ++fit) + { + int inf = (*fit)->index(iv2); + + if(equal(cp(p2), cp((*fit)->vertex((inf+1)%(dim+1))->point()))) + Vmap.emplace(v2, (*fit)->vertex((inf+1)%(dim+1))); + else if(dim == 2 && equal(cp(p2), cp((*fit)->vertex((inf+2)%(dim+1))->point()))) + Vmap.emplace(v2, (*fit)->vertex((inf+2)%(dim+1))); + else + continue; // None matched v2. + + if(equal(cp(p3), cp((*fit)->vertex((inf+1)%(dim+1))->point()))) + Vmap.emplace(v3, (*fit)->vertex((inf+1)%(dim+1))); + else if(dim == 2 && equal(cp(p3), cp((*fit)->vertex((inf+2)%(dim+1))->point()))) + Vmap.emplace(v3, (*fit)->vertex((inf+2)%(dim+1))); + else + continue; // None matched v3. + + // Found it ! + Fmap.emplace(f, *fit); + break; + } + + if(Fmap.size() == 0) + return false; + + // We now have one face, we need to propagate recursively. + return internal::test_next(t1, t2, Fmap.begin()->first, Fmap.begin()->second, Fmap, Vmap); +} + +template < class GT, class Tds1, class Tds2 > +inline +bool +operator!=(const Triangulation_2& t1, + const Triangulation_2& t2) +{ + return ! (t1 == t2); +} + } //namespace CGAL #include diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_2/insert_constraints.h b/thirdparty/CGAL/include/CGAL/Triangulation_2/insert_constraints.h index 328fadbc..42502e8e 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_2/insert_constraints.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_2/insert_constraints.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_2/insert_constraints.h $ -// $Id: insert_constraints.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_2/insert_constraints.h $ +// $Id: include/CGAL/Triangulation_2/insert_constraints.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -34,7 +34,7 @@ namespace CGAL { IndicesIterator indices_beyond ) { if(indices_first == indices_beyond){ - return 0; + return t.insert(points.begin(), points.end()); } typedef typename T::Vertex_handle Vertex_handle; typedef typename T::Face_handle Face_handle; diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/CTP2_subconstraint_graph.h b/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/CTP2_subconstraint_graph.h index ac44c438..a7d2b028 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/CTP2_subconstraint_graph.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/CTP2_subconstraint_graph.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_2/internal/CTP2_subconstraint_graph.h $ -// $Id: CTP2_subconstraint_graph.h f841429 2020-03-26T19:27:08+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_2/internal/CTP2_subconstraint_graph.h $ +// $Id: include/CGAL/Triangulation_2/internal/CTP2_subconstraint_graph.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h index d0a06a77..26f104ae 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h $ -// $Id: Constraint_hierarchy_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h $ +// $Id: include/CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ #include #include #include -#include +#include namespace CGAL { @@ -208,7 +208,7 @@ template void Constraint_hierarchy_2:: copy(const Constraint_hierarchy_2& ch1, std::map& vmap) - // copy with a tranfer vertex map + // copy with a transfer vertex map { clear(); // copy c_to_sc_map @@ -345,7 +345,7 @@ Constraint_hierarchy_2:: context(T va, T vb) { H_context_iterator hcit, past; - if(!get_contexts(va,vb, hcit ,past)) CGAL_triangulation_assertion(false); + if(!get_contexts(va,vb, hcit ,past)) CGAL_assertion(false); return *hcit; } @@ -355,7 +355,7 @@ Constraint_hierarchy_2:: number_of_enclosing_constraints(T va, T vb) { H_context_list* hcl = get_contexts(va, vb); - CGAL_triangulation_assertion(hcl != nullptr); + CGAL_assertion(hcl != nullptr); return hcl->size(); } @@ -365,7 +365,7 @@ Constraint_hierarchy_2:: contexts_begin(T va, T vb) { H_context_iterator first, last; - if( !get_contexts(va,vb,first,last)) CGAL_triangulation_assertion(false); + if( !get_contexts(va,vb,first,last)) CGAL_assertion(false); return first; } @@ -375,7 +375,7 @@ Constraint_hierarchy_2:: contexts_end(T va, T vb) { H_context_iterator first, last; - if( !get_contexts(va,vb,first,last)) CGAL_triangulation_assertion(false); + if( !get_contexts(va,vb,first,last)) CGAL_assertion(false); return last; } @@ -385,7 +385,7 @@ Constraint_hierarchy_2:: vertices_in_constraint_begin(T va, T vb) { H_c_iterator cit = c_to_sc_map.find(make_edge(va,vb)); - CGAL_triangulation_assertion( cit != c_to_sc_map.end()); + CGAL_assertion( cit != c_to_sc_map.end()); return cit->second->begin(); } @@ -395,7 +395,7 @@ Constraint_hierarchy_2:: vertices_in_constraint_end(T va, T vb) { H_c_iterator cit = c_to_sc_map.find(make_edge(va,vb)); - CGAL_triangulation_assertion( cit != c_to_sc_map.end()); + CGAL_assertion( cit != c_to_sc_map.end()); return cit->second->end(); } @@ -444,7 +444,7 @@ Constraint_hierarchy_2:: remove_constraint(T va, T vb){ H_edge he = make_edge(va, vb); typename H_c_to_sc_map::iterator c_to_sc_it = c_to_sc_map.find(he); - CGAL_triangulation_assertion(c_to_sc_it != c_to_sc_map.end()); + CGAL_assertion(c_to_sc_it != c_to_sc_map.end()); H_vertex_list *hvl = c_to_sc_it->second; @@ -454,10 +454,10 @@ remove_constraint(T va, T vb){ ++it){ typename H_sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ)); - CGAL_triangulation_assertion(scit != sc_to_c_map.end()); + CGAL_assertion(scit != sc_to_c_map.end()); H_context_list* hcl = scit->second; - // and remove the contraint from the context list of the subcontraint + // and remove the constraint from the context list of the subconstraints for(H_context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) { if(ctit->enclosing == hvl){ hcl->erase(ctit); @@ -534,7 +534,7 @@ next_along_sc(T va, T vb, T& w) const // find the next vertex after vb along any enclosing constrained // return false if there is no .... H_context_iterator ctxtit, past; - if(!get_contexts(va, vb, ctxtit, past)) CGAL_triangulation_assertion(false); + if(!get_contexts(va, vb, ctxtit, past)) CGAL_assertion(false); H_vertex_it pos; for( ; ctxtit != past; ctxtit++){ @@ -564,9 +564,9 @@ remove_Steiner(T v, T va, T vb) CGAL_precondition(!is_constrained_vertex(v)); H_context_list* hcl1 = get_contexts(va, v); - CGAL_triangulation_assertion(hcl1 != nullptr); + CGAL_assertion(hcl1 != nullptr); H_context_list* hcl2 = get_contexts(v, vb); - CGAL_triangulation_assertion(hcl2 != nullptr); + CGAL_assertion(hcl2 != nullptr); H_vertex_it pos; for(H_context_iterator ctit=hcl1->begin(); ctit != hcl1->end(); ctit++){ @@ -600,7 +600,7 @@ void Constraint_hierarchy_2:: add_Steiner(T va, T vb, T vc){ H_context_list* hcl = get_contexts(va, vb); - CGAL_triangulation_assertion(hcl != nullptr); + CGAL_assertion(hcl != nullptr); H_context_list* hcl2 = new H_context_list; @@ -701,7 +701,7 @@ Constraint_hierarchy_2:: oriented_end(T va, T vb, T& vc) const { H_context_iterator ctxt, past; - if(!get_contexts(va,vb, ctxt, past) ) CGAL_triangulation_assertion(false); + if(!get_contexts(va,vb, ctxt, past) ) CGAL_assertion(false); if(*(ctxt->pos) == va) vc = ctxt->enclosing->back(); else diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/In_domain.h b/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/In_domain.h new file mode 100644 index 00000000..647a307f --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/In_domain.h @@ -0,0 +1,84 @@ +// Copyright(c) 2022 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_2/internal/In_domain.h $ +// $Id: include/CGAL/Triangulation_2/internal/In_domain.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Andreas Fabri + +#ifndef CGAL_TRIANGULATION_2_IN_DOMAIN_H +#define CGAL_TRIANGULATION_2_IN_DOMAIN_H + +#include + +#include +#include + +namespace CGAL { + +namespace internal { + +template +class Has_member_is_in_domain +{ +private: + template + class check {}; + + template + static char f(check*); + template + static char f(check*); + + template + static int f(...); +public: + static const bool value = (sizeof(f(nullptr)) == sizeof(char)); +}; + +template +inline +std::enable_if_t::value, bool> +get_in_domain_impl(FH fh) +{ + return fh->is_in_domain(); +} + +template +inline +std::enable_if_t::value, bool> +get_in_domain_impl(FH ) +{ + return false; +} + + + +template +struct In_domain { + + typedef typename CDT::Face Face; + typedef typename CDT::Face_handle key_type; + typedef bool value_type; + typedef bool reference; + typedef boost::read_write_property_map_tag category; + + friend bool get(In_domain, const key_type& k) + { + return get_in_domain_impl(k); + } + + friend void put(In_domain, const key_type& k, const value_type& v) + { + k->set_in_domain(v); + } +}; + +} // namespace internal + +} // namespace CGAL + +#endif // CGAL_TRIANGULATION_2_IN_DOMAIN_H diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h index 25de08d5..fd6afdd0 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h $ -// $Id: Polyline_constraint_hierarchy_2.h bdec436 2021-06-25T10:05:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h $ +// $Id: include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,10 +22,12 @@ #include #include #include -#include +#include #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS +# include # include +# include #endif namespace CGAL { @@ -66,7 +68,7 @@ class Polyline_constraint_hierarchy_2 : public boost::iterator_adaptor< Point_it , typename Vertex_list::all_iterator - , const Point + , const Point& > { public: @@ -83,7 +85,7 @@ class Polyline_constraint_hierarchy_2 Vertex_it , typename Vertex_list::skip_iterator , Vertex_handle - , boost::use_default + , std::bidirectional_iterator_tag , Vertex_handle> { public: @@ -332,7 +334,7 @@ copy(const Polyline_constraint_hierarchy_2& ch1, std::mapskip_begin(), end = hvl1->skip_end(); - for( ; vit != end; ++vit) hvl2->push_back(Node(vmap[*vit])); + for( ; vit != end; ++vit) hvl2->push_back(Node(vmap[*vit], vit.input())); constraint_set.insert(hvl2); } // copy sc_to_c_map @@ -423,7 +425,7 @@ enclosing_constraint(T vaa, T vbb, T& va, T& vb) const va = *pos; pos = hcit->pos; ++pos; - CGAL_triangulation_assertion(vbb == *pos); + CGAL_assertion(vbb == *pos); while(!pos.input()){ ++pos; } @@ -451,7 +453,7 @@ Polyline_constraint_hierarchy_2:: context(T va, T vb) { Context_iterator hcit, past; - if(!get_contexts(va,vb, hcit ,past)) CGAL_triangulation_assertion(false); + if(!get_contexts(va,vb, hcit ,past)) CGAL_assertion(false); return *hcit; } @@ -461,8 +463,8 @@ Polyline_constraint_hierarchy_2:: number_of_enclosing_constraints(T va, T vb) const { Context_list* hcl = nullptr; - CGAL_triangulation_assertion_code( bool found = ) get_contexts(va,vb,hcl); - CGAL_triangulation_assertion(found); + CGAL_assertion_code( bool found = ) get_contexts(va,vb,hcl); + CGAL_assertion(found); return hcl->size(); } @@ -472,7 +474,7 @@ Polyline_constraint_hierarchy_2:: contexts_begin(T va, T vb) const { Context_iterator first, last; - if( !get_contexts(va,vb,first,last)) CGAL_triangulation_assertion(false); + if( !get_contexts(va,vb,first,last)) CGAL_assertion(false); return first; } @@ -482,7 +484,7 @@ Polyline_constraint_hierarchy_2:: contexts_end(T va, T vb) const { Context_iterator first, last; - if( !get_contexts(va,vb,first,last)) CGAL_triangulation_assertion(false); + if( !get_contexts(va,vb,first,last)) CGAL_assertion(false); return last; } @@ -495,7 +497,7 @@ swap(Constraint_id first, Constraint_id second){ ++succ != end; ++it){ typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ)); - CGAL_triangulation_assertion(scit != sc_to_c_map.end()); + CGAL_assertion(scit != sc_to_c_map.end()); Context_list* hcl = scit->second; // and replace the context of the constraint @@ -511,7 +513,7 @@ swap(Constraint_id first, Constraint_id second){ ++succ != end; ++it){ typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ)); - CGAL_triangulation_assertion(scit != sc_to_c_map.end()); + CGAL_assertion(scit != sc_to_c_map.end()); Context_list* hcl = scit->second; // and replace the context of the constraint @@ -527,7 +529,7 @@ swap(Constraint_id first, Constraint_id second){ ++succ != end; ++it){ typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ)); - CGAL_triangulation_assertion(scit != sc_to_c_map.end()); + CGAL_assertion(scit != sc_to_c_map.end()); Context_list* hcl = scit->second; // and replace the context of the constraint @@ -553,7 +555,7 @@ remove_constraint(Constraint_id cid){ ++succ != end; ++it){ typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ)); - CGAL_triangulation_assertion(scit != sc_to_c_map.end()); + CGAL_assertion(scit != sc_to_c_map.end()); Context_list* hcl = scit->second; // and remove the context of the constraint @@ -610,7 +612,7 @@ void Polyline_constraint_hierarchy_2::simplify(Vertex_it uc, // Remove the list item which points to v Vertex_list* vertex_list = it->id().vl_ptr(); Vertex_it vc_in_context = it->current(); - vc_in_context = boost::next(vc_in_context); + vc_in_context = std::next(vc_in_context); vertex_list->skip(vc_in_context.base()); ++it; } @@ -623,7 +625,7 @@ void Polyline_constraint_hierarchy_2::simplify(Vertex_it uc, // Remove the list item which points to v Vertex_list* vertex_list = it->id().vl_ptr(); Vertex_it vc_in_context = it->current(); - vc_in_context = boost::next(vc_in_context); + vc_in_context = std::next(vc_in_context); vertex_list->skip(vc_in_context.base()); ++it; } @@ -680,7 +682,7 @@ Polyline_constraint_hierarchy_2::concatenate(Constraint_id firs ++succ != end; ++it){ typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ)); - CGAL_triangulation_assertion(scit != sc_to_c_map.end()); + CGAL_assertion(scit != sc_to_c_map.end()); Context_list* hcl = scit->second; // and replace the context of the constraint @@ -705,7 +707,7 @@ Polyline_constraint_hierarchy_2::concatenate(Constraint_id firs ++succ != end; ++it){ typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ)); - CGAL_triangulation_assertion(scit != sc_to_c_map.end()); + CGAL_assertion(scit != sc_to_c_map.end()); Context_list* hcl = scit->second; // and update pos in the context of the constraint @@ -733,7 +735,7 @@ Polyline_constraint_hierarchy_2::concatenate2(Constraint_id fir ++succ != end; ++it){ typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ)); - CGAL_triangulation_assertion(scit != sc_to_c_map.end()); + CGAL_assertion(scit != sc_to_c_map.end()); Context_list* hcl = scit->second; // and replace the context of the constraint @@ -757,7 +759,7 @@ Polyline_constraint_hierarchy_2::concatenate2(Constraint_id fir ++succ != end; ++it){ typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ)); - CGAL_triangulation_assertion(scit != sc_to_c_map.end()); + CGAL_assertion(scit != sc_to_c_map.end()); Context_list* hcl = scit->second; // and update pos in the context of the constraint @@ -798,7 +800,7 @@ Polyline_constraint_hierarchy_2::split(Constraint_id first, Ver ++succ != end; ++it){ typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ)); - CGAL_triangulation_assertion(scit != sc_to_c_map.end()); + CGAL_assertion(scit != sc_to_c_map.end()); Context_list* hcl = scit->second; // and replace the context of the constraint @@ -832,7 +834,7 @@ Polyline_constraint_hierarchy_2::split2(Constraint_id first, Ve ++succ != end; ++it){ typename Sc_to_c_map::iterator scit = sc_to_c_map.find(make_edge(*it,*succ)); - CGAL_triangulation_assertion(scit != sc_to_c_map.end()); + CGAL_assertion(scit != sc_to_c_map.end()); Context_list* hcl = scit->second; // and replace the context of the constraint @@ -860,12 +862,10 @@ insert_constraint(T va, T vb){ Context_list* fathers; #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + using CGAL::IO::oformat; std::cerr << CGAL::internal::cdt_2_indent_level - << "C_hierachy.insert_constraint( #" - << va->time_stamp() - << ", #" - << vb->time_stamp() - << ")\n"; + << "C_hierachy.insert_constraint( " + << IO::oformat(va) << ", " << IO::oformat(vb) << ")\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he); if(scit == sc_to_c_map.end()){ @@ -897,12 +897,10 @@ insert_constraint_old_API(T va, T vb){ Context_list* fathers; #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + using CGAL::IO::oformat; std::cerr << CGAL::internal::cdt_2_indent_level - << "C_hierachy.insert_constraint_old_API( #" - << va->time_stamp() - << ", #" - << vb->time_stamp() - << ")\n"; + << "C_hierachy.insert_constraint_old_API( " + << IO::oformat(va) << ", " << IO::oformat(vb) << ")\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he); if(scit == sc_to_c_map.end()){ @@ -932,12 +930,10 @@ append_constraint(Constraint_id cid, T va, T vb){ Context_list* fathers; #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + using CGAL::IO::oformat; std::cerr << CGAL::internal::cdt_2_indent_level - << "C_hierachy.append_constraint( ..., #" - << va->time_stamp() - << ", #" - << vb->time_stamp() - << ")\n"; + << "C_hierachy.append_constraint( ..., " + << IO::oformat(va) << ", " << IO::oformat(vb) << ")\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he); if(scit == sc_to_c_map.end()){ @@ -985,7 +981,7 @@ next_along_sc(T va, T vb, T& w) const // find the next vertex after vb along any enclosing constrained // return false if there is no .... Context_iterator ctxtit, past; - if(!get_contexts(va, vb, ctxtit, past)) CGAL_triangulation_assertion(false); + if(!get_contexts(va, vb, ctxtit, past)) CGAL_assertion(false); Vertex_it pos; for( ; ctxtit != past; ctxtit++){ @@ -1016,8 +1012,8 @@ remove_Steiner(T v, T va, T vb) Context_list* hcl1; Context_list* hcl2; - if(!get_contexts(va,v,hcl1)) CGAL_triangulation_assertion(false); - if(!get_contexts(v,vb,hcl2)) CGAL_triangulation_assertion(false); + if(!get_contexts(va,v,hcl1)) CGAL_assertion(false); + if(!get_contexts(v,vb,hcl2)) CGAL_assertion(false); Vertex_it pos; for(Context_iterator ctit=hcl1->begin(); ctit != hcl1->end(); ctit++){ @@ -1051,14 +1047,11 @@ void Polyline_constraint_hierarchy_2:: add_Steiner(T va, T vb, T vc){ #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + using CGAL::IO::oformat; std::cerr << CGAL::internal::cdt_2_indent_level - << "C_hierachy.add_Steinter( #" - << va->time_stamp() - << ", #" - << vb->time_stamp() - << ", #" - << vc->time_stamp() - << ")\n"; + << "C_hierachy.add_Steinter( " + << IO::oformat(va) << ", " << IO::oformat(vb) << ", " << IO::oformat(vc) + << ")\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS Context_list* hcl=nullptr; if(!get_contexts(va,vb,hcl)) { @@ -1169,7 +1162,7 @@ Polyline_constraint_hierarchy_2:: oriented_end(T va, T vb, T& vc) const { Context_iterator ctxt, past; - if(!get_contexts(va,vb, ctxt, past) ) CGAL_triangulation_assertion(false); + if(!get_contexts(va,vb, ctxt, past) ) CGAL_assertion(false); if(*(ctxt->pos) == va) vc = ctxt->enclosing->back(); else diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/Triangulation_line_face_circulator_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/Triangulation_line_face_circulator_2.h index 5efdc766..39e5fa37 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/Triangulation_line_face_circulator_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_2/internal/Triangulation_line_face_circulator_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_2/internal/Triangulation_line_face_circulator_2.h $ -// $Id: Triangulation_line_face_circulator_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_2/internal/Triangulation_line_face_circulator_2.h $ +// $Id: include/CGAL/Triangulation_2/internal/Triangulation_line_face_circulator_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,7 @@ #include #include -#include +#include namespace CGAL { @@ -92,7 +92,7 @@ class Triangulation_line_face_circulator_2 bool operator==(const Face_handle& fh) const { return fh == pos; } bool operator!=(const Face_handle& fh) const { return fh != pos; } - bool operator==(std::nullptr_t CGAL_triangulation_assertion_code(n)) const; + bool operator==(std::nullptr_t CGAL_assertion_code(n)) const; bool operator!=(std::nullptr_t n) const; bool is_empty() const; bool collinear_outside() const; @@ -139,7 +139,7 @@ Triangulation_line_face_circulator_2(const Face_handle& face, : pos(face), _tr(t), s(state), i(index), p(pp), q(qq) { - CGAL_triangulation_precondition(! t->xy_equal(p, q)); + CGAL_precondition(! t->xy_equal(p, q)); } @@ -153,7 +153,7 @@ Triangulation_line_face_circulator_2(Vertex_handle v, // dir // or null iterator { - CGAL_triangulation_precondition((!_tr->is_infinite(v)) && + CGAL_precondition((!_tr->is_infinite(v)) && (_tr->dimension() == 2) && (! _tr->xy_equal(v->point(),dir))); p=v->point(); @@ -188,7 +188,7 @@ Triangulation_line_face_circulator_2(Vertex_handle v, // reset vt and conclude. vt is still finite and [pqt] still LEFT_TURN ic = fc->index(v); vt= fc->vertex(cw(ic)); - CGAL_triangulation_assertion (_tr->orientation(p,q, vt->point())== + CGAL_assertion (_tr->orientation(p,q, vt->point())== LEFT_TURN ); if (_tr->is_infinite(vr)) { --fc; @@ -318,7 +318,7 @@ Triangulation_line_face_circulator_2(const Point& pp, // incident to p // if ff is infinite, the walk begin at the first finite face traversed { - CGAL_triangulation_precondition(_tr->is_infinite(ff) || + CGAL_precondition(_tr->is_infinite(ff) || _tr->oriented_side(ff,p) != ON_NEGATIVE_SIDE); int j; if(_tr->is_infinite(pos)){ @@ -416,7 +416,7 @@ void Triangulation_line_face_circulator_2:: increment() { - CGAL_triangulation_precondition(pos != Face_handle()); + CGAL_precondition(pos != Face_handle()); if(s == vertex_vertex || s == edge_vertex) { Orientation o; do{ @@ -469,7 +469,7 @@ void Triangulation_line_face_circulator_2:: decrement() { - CGAL_triangulation_precondition(pos != Face_handle()); + CGAL_precondition(pos != Face_handle()); if(s == vertex_vertex || s == vertex_edge) { if(s == vertex_vertex){ i = cw(i); @@ -538,7 +538,7 @@ locate(const Point& t, Locate_type <, int &li) case vertex_vertex: { if(_tr->is_infinite(pos->vertex(i))){ - CGAL_triangulation_assertion( + CGAL_assertion( _tr->orientation( pos->vertex(cw(i))->point(), pos->vertex(ccw(i))->point(), t) != LEFT_TURN); @@ -589,7 +589,7 @@ Triangulation_line_face_circulator_2& Triangulation_line_face_circulator_2:: operator++() { - CGAL_triangulation_precondition( pos != Face_handle()) ; + CGAL_precondition( pos != Face_handle()) ; increment(); return *this; } @@ -600,7 +600,7 @@ Triangulation_line_face_circulator_2& Triangulation_line_face_circulator_2:: operator--() { - CGAL_triangulation_precondition(pos != Face_handle()) ; + CGAL_precondition(pos != Face_handle()) ; decrement(); return *this; } @@ -632,7 +632,7 @@ inline bool Triangulation_line_face_circulator_2:: operator==(const Line_face_circulator& lfc) const { - CGAL_triangulation_precondition( pos != Face_handle() && + CGAL_precondition( pos != Face_handle() && lfc.pos != Face_handle()); return ( _tr == lfc._tr && ( _tr==nullptr || (pos == lfc.pos && s== lfc.s && p==lfc.p && q==lfc.q) ) ); @@ -657,9 +657,9 @@ is_empty() const template < class Triangulation > inline bool Triangulation_line_face_circulator_2:: -operator==(std::nullptr_t CGAL_triangulation_assertion_code(n)) const +operator==(std::nullptr_t CGAL_assertion_code(n)) const { - CGAL_triangulation_assertion( n == nullptr); + CGAL_assertion( n == nullptr); return pos == Face_handle(); } @@ -668,7 +668,7 @@ inline bool Triangulation_line_face_circulator_2:: operator!=(std::nullptr_t n) const { - CGAL_triangulation_assertion( n == nullptr); + CGAL_assertion( n == nullptr); return !(*this == n); } diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_2_projection_traits_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_2_projection_traits_3.h index 7a97af93..97cbeba0 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_2_projection_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_2_projection_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_2_projection_traits_3.h $ -// $Id: Triangulation_2_projection_traits_3.h dacbd18 2021-08-30T12:35:34+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_2_projection_traits_3.h $ +// $Id: include/CGAL/Triangulation_2_projection_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_2_to_lcc.h b/thirdparty/CGAL/include/CGAL/Triangulation_2_to_lcc.h index 2bb11fc2..831a47e0 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_2_to_lcc.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_2_to_lcc.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_2_to_lcc.h $ -// $Id: Triangulation_2_to_lcc.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_2_to_lcc.h $ +// $Id: include/CGAL/Triangulation_2_to_lcc.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand // @@ -13,6 +13,9 @@ #ifndef CGAL_TRIANGULATION_2_TO_LCC_H #define CGAL_TRIANGULATION_2_TO_LCC_H +#include + + #include #include @@ -26,29 +29,29 @@ namespace CGAL { * @return A dart incident to the infinite vertex. */ template < class LCC, class Triangulation > - typename LCC::Dart_handle import_from_triangulation_2 + typename LCC::Dart_descriptor import_from_triangulation_2 (LCC& alcc, const Triangulation &atr, std::map* aface_to_dart=nullptr) + typename LCC::Dart_descriptor >* aface_to_dart=nullptr) { - CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==2 ); + static_assert( LCC::dimension>=2 && LCC::ambient_dimension==2 ); // Case of empty triangulations. - if (atr.number_of_vertices()==0) return LCC::null_handle; + if (atr.number_of_vertices()==0) return LCC::null_descriptor; // Check the dimension. - if (atr.dimension()!=2) return LCC::null_handle; + if (atr.dimension()!=2) return LCC::null_descriptor; CGAL_assertion(atr.is_valid()); typedef typename Triangulation::Vertex_handle TVertex_handle; typedef typename Triangulation::All_vertices_iterator TVertex_iterator; typedef typename Triangulation::All_faces_iterator TFace_iterator; typedef typename std::map - < TFace_iterator, typename LCC::Dart_handle >::iterator itmap_tcell; + < TFace_iterator, typename LCC::Dart_descriptor >::iterator itmap_tcell; // Create vertices in the map and associate in a map // TVertex_handle and vertices in the map. - std::map< TVertex_handle, typename LCC::Vertex_attribute_handle > TV; + std::map< TVertex_handle, typename LCC::Vertex_attribute_descriptor > TV; for (TVertex_iterator itv = atr.all_vertices_begin(); itv != atr.all_vertices_end(); ++itv) { @@ -59,14 +62,14 @@ namespace CGAL { // and triangles. TFace_iterator it; - std::map TC; - std::map* + std::map TC; + std::map* mytc = (aface_to_dart==nullptr?&TC:aface_to_dart); itmap_tcell maptcell_it; - typename LCC::Dart_handle res=LCC::null_handle, dart=LCC::null_handle; - typename LCC::Dart_handle cur=LCC::null_handle, neighbor=LCC::null_handle; + typename LCC::Dart_descriptor res=LCC::null_descriptor, dart=LCC::null_descriptor; + typename LCC::Dart_descriptor cur=LCC::null_descriptor, neighbor=LCC::null_descriptor; for (it = atr.all_faces_begin(); it != atr.all_faces_end(); ++it) { @@ -80,7 +83,7 @@ namespace CGAL { TV[it->vertex(1)], TV[it->vertex(2)]); - if ( dart==LCC::null_handle ) + if ( dart==LCC::null_descriptor ) { if ( it->vertex(0) == atr.infinite_vertex() ) dart = res; @@ -117,7 +120,7 @@ namespace CGAL { } } - CGAL_assertion(dart!=LCC::null_handle); + CGAL_assertion(dart!=LCC::null_descriptor); return dart; } diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_2_traits_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_2_traits_3.h index 2a2f35e6..bb388ebc 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_2_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_2_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_2_traits_3.h $ -// $Id: Triangulation_2_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_2_traits_3.h $ +// $Id: include/CGAL/Triangulation_2_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,7 +22,7 @@ #include #include -#include +#include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_3.h index 88d65dfc..fef90e57 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Triangulation_3.h $ -// $Id: Triangulation_3.h c2fa2cb 2022-06-15T10:18:57+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Triangulation_3.h $ +// $Id: include/CGAL/Triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -24,16 +24,8 @@ # include #endif -#include -#include -#include -#include -#include -#include -#include - #include -#include +#include #include #include @@ -56,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -77,6 +68,15 @@ # include #endif +#include +#include +#include +#include +#include +#include +#include +#include + #define CGAL_TRIANGULATION_3_USE_THE_4_POINTS_CONSTRUCTOR namespace CGAL { @@ -660,8 +660,8 @@ class Triangulation_3 // --------------- s ---------------- t -------------- // BEFORE SOURCE MIDDLE TARGET AFTER - CGAL_triangulation_precondition(!equal(s, t)); - CGAL_triangulation_precondition(collinear(s, p, t)); + CGAL_precondition(!equal(s, t)); + CGAL_precondition(collinear(s, p, t)); Comparison_result ps = compare_xyz(p, s); if(ps == EQUAL) @@ -736,7 +736,7 @@ class Triangulation_3 : Base(tr.get_lock_data_structure()), _gt(tr._gt) { infinite = _tds.copy_tds(tr._tds, tr.infinite); - CGAL_triangulation_expensive_postcondition(*this == tr); + CGAL_expensive_postcondition(*this == tr); } Triangulation_3(Triangulation_3&& tr) = default; @@ -758,7 +758,7 @@ class Triangulation_3 const GT& gt = GT(), Lock_data_structure *lock_ds = nullptr) : Base(lock_ds), _gt(gt) { - CGAL_triangulation_precondition(orientation(p0, p1, p3, p4) == POSITIVE); + CGAL_precondition(orientation(p0, p1, p3, p4) == POSITIVE); init_tds(p0, p1, p3, p4); } @@ -807,15 +807,15 @@ class Triangulation_3 Cell_handle infinite_cell() const { - CGAL_triangulation_assertion(infinite_vertex()->cell()->has_vertex(infinite_vertex())); + CGAL_assertion(infinite_vertex()->cell()->has_vertex(infinite_vertex())); return infinite_vertex()->cell(); } // GEOMETRIC ACCESS FUNCTIONS Tetrahedron tetrahedron(const Cell_handle c) const { - CGAL_triangulation_precondition(dimension() == 3); - CGAL_triangulation_precondition(! is_infinite(c)); + CGAL_precondition(dimension() == 3); + CGAL_precondition(! is_infinite(c)); return construct_tetrahedron(c->vertex(0)->point(), c->vertex(1)->point(), c->vertex(2)->point(), @@ -848,31 +848,31 @@ class Triangulation_3 void set_point(Cell_handle c, int i, const Point& p) { - CGAL_triangulation_precondition(dimension() >= 0); - CGAL_triangulation_precondition(i >= 0 && i <= dimension()); - CGAL_triangulation_precondition(! is_infinite(c->vertex(i))); + CGAL_precondition(dimension() >= 0); + CGAL_precondition(i >= 0 && i <= dimension()); + CGAL_precondition(! is_infinite(c->vertex(i))); c->vertex(i)->point() = p; } const Point& point(Cell_handle c, int i) const { - CGAL_triangulation_precondition(dimension() >= 0); - CGAL_triangulation_precondition(i >= 0 && i <= dimension()); - CGAL_triangulation_precondition(! is_infinite(c->vertex(i))); + CGAL_precondition(dimension() >= 0); + CGAL_precondition(i >= 0 && i <= dimension()); + CGAL_precondition(! is_infinite(c->vertex(i))); return c->vertex(i)->point(); } void set_point(Vertex_handle v, const Point& p) { - CGAL_triangulation_precondition(dimension() >= 0); - CGAL_triangulation_precondition(! is_infinite(v)); + CGAL_precondition(dimension() >= 0); + CGAL_precondition(! is_infinite(v)); v->point() = p; } const Point& point(Vertex_handle v) const { - CGAL_triangulation_precondition(number_of_vertices() > 0); - CGAL_triangulation_precondition(! is_infinite(v)); + CGAL_precondition(number_of_vertices() > 0); + CGAL_precondition(! is_infinite(v)); return v->point(); } @@ -880,7 +880,7 @@ class Triangulation_3 bool is_infinite(const Vertex_handle v) const { return v == infinite_vertex(); } bool is_infinite(const Cell_handle c) const { - CGAL_triangulation_precondition(dimension() == 3); + CGAL_precondition(dimension() == 3); return c->has_vertex(infinite_vertex()); } @@ -1060,7 +1060,7 @@ class Triangulation_3 const Facet& f, Locate_type& lt, int& li, int& lj) const { - CGAL_triangulation_precondition(f.second == 3); + CGAL_precondition(f.second == 3); return side_of_facet(p, f.first, lt, li, lj); } Bounded_side side_of_segment(const Point& p, @@ -1073,8 +1073,8 @@ class Triangulation_3 const Edge& e, Locate_type& lt, int& li) const { - CGAL_triangulation_precondition(e.second == 0); - CGAL_triangulation_precondition(e.third == 1); + CGAL_precondition(e.second == 0); + CGAL_precondition(e.third == 1); return side_of_edge(p, e.first, lt, li); } @@ -1145,12 +1145,12 @@ class Triangulation_3 #ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< + std::enable_if_t< + std::is_convertible< typename std::iterator_traits::value_type, Point - > - >::type* = nullptr) + >::value + >* = nullptr) #else template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last) @@ -1208,12 +1208,12 @@ class Triangulation_3 public: template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< + std::enable_if_t< + std::is_convertible< typename std::iterator_traits::value_type, std::pair::type> - > >::type* =NULL) + >::value >* =NULL) { return insert_with_info< std::pair::type> >(first,last); } @@ -1222,12 +1222,10 @@ class Triangulation_3 std::ptrdiff_t insert(boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, - typename boost::enable_if< - boost::mpl::and_< - boost::is_convertible< typename std::iterator_traits::value_type, Point >, - boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - > - >::type* =NULL) + std::enable_if_t< + std::is_convertible_v< typename std::iterator_traits::value_type, Point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > + >* =NULL) { return insert_with_info< boost::tuple::type> >(first,last); @@ -1329,7 +1327,7 @@ class Triangulation_3 const Facet *this_facet_must_be_in_the_cz = nullptr, bool *the_facet_is_in_its_cz = nullptr) const { - CGAL_triangulation_precondition(dimension()>=2); + CGAL_precondition(dimension()>=2); if(the_facet_is_in_its_cz) *the_facet_is_in_its_cz = false; @@ -1344,7 +1342,7 @@ class Triangulation_3 } } - CGAL_triangulation_precondition(tester(d)); + CGAL_precondition(tester(d)); // To store the boundary cells, in case we need to rollback typedef boost::container::small_vector SV; @@ -1443,9 +1441,9 @@ class Triangulation_3 template < class Conflict_test > Vertex_handle insert_conflict(Cell_handle c, const Conflict_test& tester) { - CGAL_triangulation_precondition(dimension() >= 2); - CGAL_triangulation_precondition(c != Cell_handle()); - CGAL_triangulation_precondition(tester(c)); + CGAL_precondition(dimension() >= 2); + CGAL_precondition(c != Cell_handle()); + CGAL_precondition(tester(c)); std::vector cells; cells.reserve(32); @@ -1471,7 +1469,7 @@ class Triangulation_3 } private: - // Here are the conflit tester function objects passed to + // Here are the conflict tester function objects passed to // insert_conflict_[23]() by insert_outside_convex_hull(). class Conflict_tester_outside_convex_hull_3 { @@ -1569,7 +1567,7 @@ class Triangulation_3 // at this time, it should be implemented here. void flip_2D(Cell_handle f, int i) { - CGAL_triangulation_precondition(dimension()==2); + CGAL_precondition(dimension()==2); Cell_handle n = f->neighbor(i); int ni = this->_tds.mirror_index(f,i); // ni = n->index(f); @@ -1651,16 +1649,16 @@ class Triangulation_3 tds().delete_vertex(inserted); } -private: +protected: typedef Facet Edge_2D; - typedef Triple Vertex_triple; + typedef std::array Vertex_triple; typedef typename Base::template Vertex_triple_Facet_map_generator< Vertex_triple, Facet>::type Vertex_triple_Facet_map; typedef typename Base::template Vertex_handle_unique_hash_map_generator< Vertex_handle>::type Vertex_handle_unique_hash_map; - Vertex_triple make_vertex_triple(const Facet& f) const; - void make_canonical_oriented_triple(Vertex_triple& t) const; + static Vertex_triple make_vertex_triple(const Facet& f); + static void make_canonical_oriented_triple(Vertex_triple& t); template < class VertexRemover > VertexRemover& make_hole_2D(Vertex_handle v, std::list& hole, @@ -1673,13 +1671,32 @@ class Triangulation_3 template < class VertexRemover > void fill_hole_2D(std::list& hole, VertexRemover& remover); - void make_hole_3D(Vertex_handle v, - Vertex_triple_Facet_map& outer_map, - std::vector& hole); - // When the incident cells are already known - void make_hole_3D(Vertex_handle v, - const std::vector& incident_cells, - Vertex_triple_Facet_map& outer_map); + Vertex_triple_Facet_map + create_hole_outer_map(Vertex_handle v, + const std::vector& hole); + + template < class Triangulation > + static Vertex_triple_Facet_map + create_triangulation_inner_map(const Triangulation& t, + const Vertex_handle_unique_hash_map& vmap, + bool inf); + + template + OutputItCells copy_triangulation_into_hole(const Vertex_handle_unique_hash_map& vmap, + Vertex_triple_Facet_map&& outer_map, + const Vertex_triple_Facet_map& inner_map, + OutputItCells fit); + + struct Fill_auxiliary_return_type { + Vertex_handle_unique_hash_map vmap; + bool vertex_is_incident_to_infinity = false; + }; + + template < class Triangulation > + Fill_auxiliary_return_type + fill_auxiliary_triangulation_with_vertices_around_v(Triangulation& t, + Vertex_handle v, + std::vector& adj_vertices) const; template < class VertexRemover > VertexRemover& remove_dim_down(Vertex_handle v, VertexRemover& remover); @@ -1737,7 +1754,7 @@ class Triangulation_3 { // tests whether removing the cluster of vertices // marked as "to remove", decreases the dimension of the triangulation - CGAL_triangulation_precondition(dimension() == 3); + CGAL_precondition(dimension() == 3); int k=0; Vertex_handle v[4]; for(Finite_vertices_iterator fit = finite_vertices_begin(); @@ -1762,7 +1779,7 @@ class Triangulation_3 std::map& vstates); void _make_big_hole_3D(Vertex_handle v, - std::map& outer_map, + Vertex_triple_Facet_map& outer_map, std::vector& hole, std::vector& vertices, std::map& vstates); @@ -1900,6 +1917,29 @@ class Triangulation_3 return Points(points_begin(),points_end()); } + /// Vertex ranges defining a simplex + static std::array vertices(const Edge& e) + { + return std::array{ + e.first->vertex(e.second), + e.first->vertex(e.third)}; + } + static std::array vertices(const Facet& f) + { + return std::array{ + f.first->vertex(vertex_triple_index(f.second, 0)), + f.first->vertex(vertex_triple_index(f.second, 1)), + f.first->vertex(vertex_triple_index(f.second, 2))}; + } + static std::array vertices(const Cell_handle c) + { + return std::array{ + c->vertex(0), + c->vertex(1), + c->vertex(2), + c->vertex(3)}; + } + // cells around an edge Cell_circulator incident_cells(const Edge& e) const { @@ -2348,7 +2388,7 @@ class Triangulation_3 convert_cell(c, *C[j]); } - CGAL_triangulation_assertion( is_valid(false) ); + CGAL_assertion( is_valid(false) ); return is; } }; @@ -2413,7 +2453,7 @@ std::istream& operator>> (std::istream& is, Triangulation_3& tr) if(!(is >> *(C[j]))) return is; - CGAL_triangulation_assertion(tr.is_valid(false)); + CGAL_assertion(tr.is_valid(false)); return is; } @@ -2460,8 +2500,8 @@ std::ostream& operator<< (std::ostream& os, const Triangulation_3& for(Vertex_iterator it = tr.vertices_begin(), end = tr.vertices_end(); it != end; ++it) TV[i++] = it; - CGAL_triangulation_assertion(i == n+1); - CGAL_triangulation_assertion(tr.is_infinite(TV[0])); + CGAL_assertion(i == n+1); + CGAL_assertion(tr.is_infinite(TV[0])); Unique_hash_map V; V[tr.infinite_vertex()] = 0; @@ -2578,10 +2618,10 @@ typename Triangulation_3::Triangle Triangulation_3:: triangle(const Cell_handle c, int i) const { - CGAL_triangulation_precondition(dimension() == 2 || dimension() == 3); - CGAL_triangulation_precondition((dimension() == 2 && i == 3) || - (dimension() == 3 && i >= 0 && i <= 3)); - CGAL_triangulation_precondition(! is_infinite(Facet(c, i))); + CGAL_precondition(dimension() == 2 || dimension() == 3); + CGAL_precondition((dimension() == 2 && i == 3) || + (dimension() == 3 && i >= 0 && i <= 3)); + CGAL_precondition(! is_infinite(Facet(c, i))); if((i&1)==0) return construct_triangle(c->vertex((i+2)&3)->point(), c->vertex((i+1)&3)->point(), @@ -2597,11 +2637,11 @@ typename Triangulation_3::Segment Triangulation_3:: segment(const Cell_handle c, int i, int j) const { - CGAL_triangulation_precondition(i != j); - CGAL_triangulation_precondition(dimension() >= 1 && dimension() <= 3); - CGAL_triangulation_precondition(i >= 0 && i <= dimension() && - j >= 0 && j <= dimension()); - CGAL_triangulation_precondition(! is_infinite(Edge(c, i, j))); + CGAL_precondition(i != j); + CGAL_precondition(dimension() >= 1 && dimension() <= 3); + CGAL_precondition(i >= 0 && i <= dimension() && + j >= 0 && j <= dimension()); + CGAL_precondition(! is_infinite(Edge(c, i, j))); return construct_segment(c->vertex(i)->point(), c->vertex(j)->point()); } @@ -2611,9 +2651,9 @@ bool Triangulation_3:: is_infinite(const Cell_handle c, int i) const { - CGAL_triangulation_precondition(dimension() == 2 || dimension() == 3); - CGAL_triangulation_precondition((dimension() == 2 && i == 3) || - (dimension() == 3 && i >= 0 && i <= 3)); + CGAL_precondition(dimension() == 2 || dimension() == 3); + CGAL_precondition((dimension() == 2 && i == 3) || + (dimension() == 3 && i >= 0 && i <= 3)); return is_infinite(c->vertex(i<=0 ? 1 : 0)) || is_infinite(c->vertex(i<=1 ? 2 : 1)) || is_infinite(c->vertex(i<=2 ? 3 : 2)); @@ -2625,9 +2665,9 @@ bool Triangulation_3:: is_infinite(const Cell_handle c, int i, int j) const { - CGAL_triangulation_precondition(i != j); - CGAL_triangulation_precondition(dimension() >= 1 && dimension() <= 3); - CGAL_triangulation_precondition(i >= 0 && i <= dimension() && + CGAL_precondition(i != j); + CGAL_precondition(dimension() >= 1 && dimension() <= 3); + CGAL_precondition(i >= 0 && i <= dimension() && j >= 0 && j <= dimension()); return is_infinite(c->vertex(i)) || is_infinite(c->vertex(j)); } @@ -2790,7 +2830,7 @@ exact_locate(const Point& p, Locate_type& lt, int& li, int& lj, // from the rest of the triangulation // lt = OUTSIDE_AFFINE_HULL if p is not coplanar with the triangulation - CGAL_triangulation_expensive_assertion(start == Cell_handle() || tds().is_simplex(start)); + CGAL_expensive_assertion(start == Cell_handle() || tds().is_simplex(start)); if(could_lock_zone) *could_lock_zone = true; @@ -2812,8 +2852,8 @@ exact_locate(const Point& p, Locate_type& lt, int& li, int& lj, { case 3: { - CGAL_triangulation_precondition(start != Cell_handle()); - CGAL_triangulation_precondition(! start->has_vertex(infinite)); + CGAL_precondition(start != Cell_handle()); + CGAL_precondition(! start->has_vertex(infinite)); // We implement the remembering visibility/stochastic walk. @@ -2931,9 +2971,9 @@ exact_locate(const Point& p, Locate_type& lt, int& li, int& lj, (o[1] != COPLANAR) ? 1 : 2; lj = (o[li+1] != COPLANAR) ? li+1 : (o[li+2] != COPLANAR) ? li+2 : li+3; - CGAL_triangulation_assertion(collinear(p, - c->vertex(li)->point(), - c->vertex(lj)->point())); + CGAL_assertion(collinear(p, + c->vertex(li)->point(), + c->vertex(lj)->point())); break; } case 3: @@ -2950,8 +2990,8 @@ exact_locate(const Point& p, Locate_type& lt, int& li, int& lj, case 2: { - CGAL_triangulation_precondition(start != Cell_handle()); - CGAL_triangulation_precondition(! start->has_vertex(infinite)); + CGAL_precondition(start != Cell_handle()); + CGAL_precondition(! start->has_vertex(infinite)); Cell_handle c = start; boost::uniform_smallint<> three(0, 2); @@ -2990,7 +3030,7 @@ exact_locate(const Point& p, Locate_type& lt, int& li, int& lj, const Point& p1 = c->vertex(ccw(i))->point(); const Point& p2 = c->vertex(cw(i))->point(); Orientation o[3]; - CGAL_triangulation_assertion(coplanar_orientation(p0,p1,p2) == POSITIVE); + CGAL_assertion(coplanar_orientation(p0,p1,p2) == POSITIVE); o[0] = coplanar_orientation(p0,p1,p); if(o[0] == NEGATIVE) { @@ -3047,8 +3087,8 @@ exact_locate(const Point& p, Locate_type& lt, int& li, int& lj, } case 1: { - CGAL_triangulation_precondition(start != Cell_handle()); - CGAL_triangulation_precondition(! start->has_vertex(infinite)); + CGAL_precondition(start != Cell_handle()); + CGAL_precondition(! start->has_vertex(infinite)); Cell_handle c = start; //first tests whether p is collinear with the current triangulation @@ -3114,7 +3154,7 @@ exact_locate(const Point& p, Locate_type& lt, int& li, int& lj, } default: { - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return Cell_handle(); } } @@ -3128,8 +3168,8 @@ Triangulation_3:: inexact_locate(const Point& t, Cell_handle start, int n_of_turns, bool *could_lock_zone) const { - CGAL_triangulation_expensive_assertion(start == Cell_handle() || - tds().is_simplex(start)); + CGAL_expensive_assertion(start == Cell_handle() || + tds().is_simplex(start)); if(could_lock_zone) *could_lock_zone = true; @@ -3155,8 +3195,8 @@ inexact_locate(const Point& t, Cell_handle start, int n_of_turns, if(start->has_vertex(infinite, ind_inf)) start = start->neighbor(ind_inf); - CGAL_triangulation_precondition(start != Cell_handle()); - CGAL_triangulation_precondition(! start->has_vertex(infinite)); + CGAL_precondition(start != Cell_handle()); + CGAL_precondition(! start->has_vertex(infinite)); // We implement the remembering visibility walk. // In this phase, no need to be stochastic @@ -3242,7 +3282,7 @@ side_of_tetrahedron(const Point& p, // - ON_BOUNDARY if p lies on one of the facets // - ON_UNBOUNDED_SIDE if p lies strictly outside the tetrahedron - CGAL_triangulation_precondition(orientation(p0,p1,p2,p3) == POSITIVE); + CGAL_precondition(orientation(p0,p1,p2,p3) == POSITIVE); Orientation o0,o1,o2,o3; if(((o0 = orientation(p,p1,p2,p3)) == NEGATIVE) || @@ -3306,7 +3346,7 @@ side_of_tetrahedron(const Point& p, default: { // impossible : cannot be on 4 facets for a real tetrahedron - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return ON_BOUNDARY; } } @@ -3330,7 +3370,7 @@ side_of_cell(const Point& p, // two cases) // lt only has meaning when ON_BOUNDED_SIDE or ON_BOUNDARY - CGAL_triangulation_precondition(dimension() == 3); + CGAL_precondition(dimension() == 3); if(! is_infinite(c)) { return side_of_tetrahedron(p, @@ -3401,14 +3441,14 @@ side_of_cell(const Point& p, } default: { - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return ON_BOUNDARY; } } // switch side } // case ZERO default: { - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return ON_BOUNDARY; } } // switch o @@ -3432,10 +3472,10 @@ side_of_triangle(const Point& p, // - ON_BOUNDARY if p lies on one of the edges // - ON_UNBOUNDED_SIDE if p lies strictly outside the triangle - CGAL_triangulation_precondition(coplanar(p,p0,p1,p2)); + CGAL_precondition(coplanar(p,p0,p1,p2)); Orientation o012 = coplanar_orientation(p0,p1,p2); - CGAL_triangulation_precondition(o012 != COLLINEAR); + CGAL_precondition(o012 != COLLINEAR); Orientation o0; // edge p0 p1 Orientation o1; // edge p1 p2 @@ -3485,7 +3525,7 @@ side_of_triangle(const Point& p, default: { // cannot happen - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return ON_BOUNDARY; } } @@ -3512,15 +3552,15 @@ side_of_facet(const Point& p, // When they mean anything, li and lj refer to indices in the cell c // giving the facet (c,i). - CGAL_triangulation_precondition(dimension() == 2); + CGAL_precondition(dimension() == 2); if(! is_infinite(c,3)) { // The following precondition is useless because it is written // in side_of_facet - // CGAL_triangulation_precondition(coplanar (p, - // c->vertex(0)->point, - // c->vertex(1)->point, - // c->vertex(2)->point)); + // CGAL_precondition(coplanar (p, + // c->vertex(0)->point, + // c->vertex(1)->point, + // c->vertex(2)->point)); int i_t, j_t; Bounded_side side = side_of_triangle(p, c->vertex(0)->point(), @@ -3544,7 +3584,7 @@ side_of_facet(const Point& p, int inf = c->index(infinite); // The following precondition is useless because it is written // in side_of_facet - // CGAL_triangulation_precondition(coplanar (p, + // CGAL_precondition(coplanar (p, // c->neighbor(inf)->vertex(0)->point(), // c->neighbor(inf)->vertex(1)->point(), // c->neighbor(inf)->vertex(2)->point())); @@ -3553,8 +3593,8 @@ side_of_facet(const Point& p, Vertex_handle v1 = c->vertex(i1), v2 = c->vertex(i2); - CGAL_triangulation_assertion(coplanar_orientation(v1->point(), v2->point(), - mirror_vertex(c, inf)->point()) == POSITIVE); + CGAL_assertion(coplanar_orientation(v1->point(), v2->point(), + mirror_vertex(c, inf)->point()) == POSITIVE); switch(coplanar_orientation(v1->point(), v2->point(), p)) { @@ -3603,8 +3643,8 @@ side_of_segment(const Point& p, // - ON_BOUNDARY if p equals p0 or p1 // - ON_UNBOUNDED_SIDE if p lies strictly outside the edge - CGAL_triangulation_precondition(! equal(p0, p1)); - CGAL_triangulation_precondition(collinear(p, p0, p1)); + CGAL_precondition(! equal(p0, p1)); + CGAL_precondition(collinear(p, p0, p1)); switch(collinear_position(p0, p, p1)) { @@ -3643,7 +3683,7 @@ side_of_edge(const Point& p, // lt only has meaning when ON_BOUNDED_SIDE and ON_BOUNDARY // li refer to indices in the cell c - CGAL_triangulation_precondition(dimension() == 1); + CGAL_precondition(dimension() == 1); if(! is_infinite(c,0,1)) return side_of_segment(p, c->vertex(0)->point(), c->vertex(1)->point(), lt, li); @@ -3669,8 +3709,8 @@ bool Triangulation_3:: flip(Cell_handle c, int i) { - CGAL_triangulation_precondition((dimension() == 3) && (0<=i) && (i<4) && - (number_of_vertices() >= 5)); + CGAL_precondition((dimension() == 3) && (0<=i) && (i<4) && + (number_of_vertices() >= 5)); Cell_handle n = c->neighbor(i); int in = n->index(c); @@ -3727,41 +3767,41 @@ void Triangulation_3:: flip_flippable(Cell_handle c, int i) { - CGAL_triangulation_precondition((dimension() == 3) && (0<=i) && (i<4) && - (number_of_vertices() >= 5)); - CGAL_triangulation_precondition_code(Cell_handle n = c->neighbor(i);); - CGAL_triangulation_precondition_code(int in = n->index(c);); - CGAL_triangulation_precondition((! is_infinite(c)) &&(! is_infinite(n))); + CGAL_precondition((dimension() == 3) && (0<=i) && (i<4) && + (number_of_vertices() >= 5)); + CGAL_precondition_code(Cell_handle n = c->neighbor(i);); + CGAL_precondition_code(int in = n->index(c);); + CGAL_precondition((! is_infinite(c)) &&(! is_infinite(n))); if(i%2 == 1) { - CGAL_triangulation_precondition(orientation(c->vertex((i+1)&3)->point(), - c->vertex((i+2)&3)->point(), - n->vertex(in)->point(), - c->vertex(i)->point()) == POSITIVE); - CGAL_triangulation_precondition(orientation(c->vertex((i+2)&3)->point(), - c->vertex((i+3)&3)->point(), - n->vertex(in)->point(), - c->vertex(i)->point()) == POSITIVE); - CGAL_triangulation_precondition(orientation(c->vertex((i+3)&3)->point(), - c->vertex((i+1)&3)->point(), - n->vertex(in)->point(), - c->vertex(i)->point()) == POSITIVE); + CGAL_precondition(orientation(c->vertex((i+1)&3)->point(), + c->vertex((i+2)&3)->point(), + n->vertex(in)->point(), + c->vertex(i)->point()) == POSITIVE); + CGAL_precondition(orientation(c->vertex((i+2)&3)->point(), + c->vertex((i+3)&3)->point(), + n->vertex(in)->point(), + c->vertex(i)->point()) == POSITIVE); + CGAL_precondition(orientation(c->vertex((i+3)&3)->point(), + c->vertex((i+1)&3)->point(), + n->vertex(in)->point(), + c->vertex(i)->point()) == POSITIVE); } else { - CGAL_triangulation_precondition(orientation(c->vertex((i+2)&3)->point(), - c->vertex((i+1)&3)->point(), - n->vertex(in)->point(), - c->vertex(i)->point()) == POSITIVE); - CGAL_triangulation_precondition(orientation(c->vertex((i+3)&3)->point(), - c->vertex((i+2)&3)->point(), - n->vertex(in)->point(), - c->vertex(i)->point()) == POSITIVE); - CGAL_triangulation_precondition(orientation(c->vertex((i+1)&3)->point(), - c->vertex((i+3)&3)->point(), - n->vertex(in)->point(), - c->vertex(i)->point()) == POSITIVE); + CGAL_precondition(orientation(c->vertex((i+2)&3)->point(), + c->vertex((i+1)&3)->point(), + n->vertex(in)->point(), + c->vertex(i)->point()) == POSITIVE); + CGAL_precondition(orientation(c->vertex((i+3)&3)->point(), + c->vertex((i+2)&3)->point(), + n->vertex(in)->point(), + c->vertex(i)->point()) == POSITIVE); + CGAL_precondition(orientation(c->vertex((i+1)&3)->point(), + c->vertex((i+3)&3)->point(), + n->vertex(in)->point(), + c->vertex(i)->point()) == POSITIVE); } _tds.flip_flippable(c, i); @@ -3774,10 +3814,10 @@ flip(Cell_handle c, int i, int j) { // Flips the edge (i,j) of cell c - CGAL_triangulation_precondition((dimension() == 3) && - (0<=i) && (i<4) && (0<=j) && - (j<4) &&(i != j) && - (number_of_vertices() >= 5)); + CGAL_precondition((dimension() == 3) && + (0<=i) && (i<4) && (0<=j) && + (j<4) &&(i != j) && + (number_of_vertices() >= 5)); // Checks that degree 3 and not on the convex hull int degree = 0; @@ -3825,32 +3865,32 @@ flip_flippable(Cell_handle c, int i, int j) #if !defined CGAL_TRIANGULATION_NO_PRECONDITIONS && \ !defined CGAL_NO_PRECONDITIONS && !defined NDEBUG - CGAL_triangulation_precondition((dimension() == 3) && - (0<=i) && (i<4) && (0<=j) && (j<4) && - (i != j) && (number_of_vertices() >= 5)); + CGAL_precondition((dimension() == 3) && + (0<=i) && (i<4) && (0<=j) && (j<4) && + (i != j) && (number_of_vertices() >= 5)); int degree = 0; Cell_circulator ccir = incident_cells(c,i,j); Cell_circulator cdone = ccir; do { - CGAL_triangulation_precondition(! is_infinite(ccir)); + CGAL_precondition(! is_infinite(ccir)); ++degree; ++ccir; } while(ccir != cdone); - CGAL_triangulation_precondition(degree == 3); + CGAL_precondition(degree == 3); Cell_handle n = c->neighbor(next_around_edge(i, j)); int in = n->index(c->vertex(i)); int jn = n->index(c->vertex(j)); - CGAL_triangulation_precondition(orientation(c->vertex(next_around_edge(i,j))->point(), - c->vertex(next_around_edge(j,i))->point(), - n->vertex(next_around_edge(jn,in))->point(), - c->vertex(j)->point()) == POSITIVE); - CGAL_triangulation_precondition(orientation(c->vertex(i)->point(), - c->vertex(next_around_edge(j,i))->point(), - n->vertex(next_around_edge(jn,in))->point(), - c->vertex(next_around_edge(i,j))->point()) == POSITIVE); + CGAL_precondition(orientation(c->vertex(next_around_edge(i,j))->point(), + c->vertex(next_around_edge(j,i))->point(), + n->vertex(next_around_edge(jn,in))->point(), + c->vertex(j)->point()) == POSITIVE); + CGAL_precondition(orientation(c->vertex(i)->point(), + c->vertex(next_around_edge(j,i))->point(), + n->vertex(next_around_edge(jn,in))->point(), + c->vertex(next_around_edge(i,j))->point()) == POSITIVE); #endif _tds.flip_flippable(c, i, j); @@ -3862,7 +3902,7 @@ Triangulation_3:: insert(const Point& p, Cell_handle start) { Locate_type lt; - int li, lj; + int li = -1, lj = -1; Cell_handle c = locate(p, lt, li, lj, start); return insert(p, lt, c, li, lj); } @@ -4088,17 +4128,17 @@ typename Triangulation_3::Vertex_handle Triangulation_3:: insert_in_cell(const Point& p, Cell_handle c) { - CGAL_triangulation_precondition(dimension() == 3); - CGAL_triangulation_precondition_code( + CGAL_precondition(dimension() == 3); + CGAL_precondition_code( Locate_type lt; int i; int j; ); - CGAL_triangulation_precondition(side_of_tetrahedron(p, - c->vertex(0)->point(), - c->vertex(1)->point(), - c->vertex(2)->point(), - c->vertex(3)->point(), - lt,i,j) == ON_BOUNDED_SIDE); + CGAL_precondition(side_of_tetrahedron(p, + c->vertex(0)->point(), + c->vertex(1)->point(), + c->vertex(2)->point(), + c->vertex(3)->point(), + lt,i,j) == ON_BOUNDED_SIDE); Vertex_handle v = _tds.insert_in_cell(c); v->set_point(p); @@ -4111,21 +4151,21 @@ typename Triangulation_3::Vertex_handle Triangulation_3:: insert_in_facet(const Point& p, Cell_handle c, int i) { - CGAL_triangulation_precondition(dimension() == 2 || dimension() == 3); - CGAL_triangulation_precondition((dimension() == 2 && i == 3) || - (dimension() == 3 && i >= 0 && i <= 3)); - CGAL_triangulation_exactness_precondition_code( + CGAL_precondition(dimension() == 2 || dimension() == 3); + CGAL_precondition((dimension() == 2 && i == 3) || + (dimension() == 3 && i >= 0 && i <= 3)); + CGAL_exactness_precondition_code( Locate_type lt; int li; int lj; ); - CGAL_triangulation_exactness_precondition(coplanar(p, c->vertex((i+1)&3)->point(), - c->vertex((i+2)&3)->point(), - c->vertex((i+3)&3)->point()) && - side_of_triangle(p, - c->vertex((i+1)&3)->point(), - c->vertex((i+2)&3)->point(), - c->vertex((i+3)&3)->point(), - lt, li, lj) == ON_BOUNDED_SIDE); + CGAL_exactness_precondition(coplanar(p, c->vertex((i+1)&3)->point(), + c->vertex((i+2)&3)->point(), + c->vertex((i+3)&3)->point()) && + side_of_triangle(p, + c->vertex((i+1)&3)->point(), + c->vertex((i+2)&3)->point(), + c->vertex((i+3)&3)->point(), + lt, li, lj) == ON_BOUNDED_SIDE); Vertex_handle v = _tds.insert_in_facet(c, i); v->set_point(p); @@ -4137,11 +4177,11 @@ typename Triangulation_3::Vertex_handle Triangulation_3:: insert_in_edge(const Point& p, Cell_handle c, int i, int j) { - CGAL_triangulation_precondition(i != j); - CGAL_triangulation_precondition(dimension() >= 1 && dimension() <= 3); - CGAL_triangulation_precondition(i >= 0 && i <= dimension() && - j >= 0 && j <= dimension()); - CGAL_triangulation_exactness_precondition_code( + CGAL_precondition(i != j); + CGAL_precondition(dimension() >= 1 && dimension() <= 3); + CGAL_precondition(i >= 0 && i <= dimension() && + j >= 0 && j <= dimension()); + CGAL_exactness_precondition_code( Locate_type lt; int li; ); @@ -4151,19 +4191,19 @@ insert_in_edge(const Point& p, Cell_handle c, int i, int j) case 3: case 2: { - CGAL_triangulation_precondition(! is_infinite(c, i, j)); - CGAL_triangulation_exactness_precondition(collinear(c->vertex(i)->point(), - p, - c->vertex(j)->point()) - && side_of_segment(p, - c->vertex(i)->point(), - c->vertex(j)->point(), - lt, li) == ON_BOUNDED_SIDE); + CGAL_precondition(! is_infinite(c, i, j)); + CGAL_exactness_precondition(collinear(c->vertex(i)->point(), + p, + c->vertex(j)->point()) + && side_of_segment(p, + c->vertex(i)->point(), + c->vertex(j)->point(), + lt, li) == ON_BOUNDED_SIDE); break; } case 1: { - CGAL_triangulation_exactness_precondition(side_of_edge(p, c, lt, li) == ON_BOUNDED_SIDE); + CGAL_exactness_precondition(side_of_edge(p, c, lt, li) == ON_BOUNDED_SIDE); break; } } @@ -4182,8 +4222,8 @@ insert_outside_convex_hull(const Point& p, Cell_handle c) // p is strictly outside the convex hull // dimension 0 not allowed, use outside-affine-hull - CGAL_triangulation_precondition(dimension() > 0); - CGAL_triangulation_precondition(c->has_vertex(infinite)); + CGAL_precondition(dimension() > 0); + CGAL_precondition(c->has_vertex(infinite)); // the precondition that p is in c is tested in each of the // insertion methods called from this method @@ -4218,7 +4258,7 @@ typename Triangulation_3::Vertex_handle Triangulation_3:: insert_outside_affine_hull(const Point& p) { - CGAL_triangulation_precondition(dimension() < 3); + CGAL_precondition(dimension() < 3); bool reorient; switch(dimension()) { @@ -4228,7 +4268,7 @@ insert_outside_affine_hull(const Point& p) Cell_handle n = c->neighbor(c->index(infinite_vertex())); Orientation o = coplanar_orientation(n->vertex(0)->point(), n->vertex(1)->point(), p); - CGAL_triangulation_precondition(o != COLLINEAR); + CGAL_precondition(o != COLLINEAR); reorient = o == NEGATIVE; break; } @@ -4239,7 +4279,7 @@ insert_outside_affine_hull(const Point& p) Orientation o = orientation(n->vertex(0)->point(), n->vertex(1)->point(), n->vertex(2)->point(), p); - CGAL_triangulation_precondition(o != COPLANAR); + CGAL_precondition(o != COPLANAR); reorient = o == NEGATIVE; break; } @@ -4359,28 +4399,23 @@ Triangulation_3::insert_and_give_new_cells(const Point& p, template < class Gt, class Tds, class Lds > typename Triangulation_3::Vertex_triple Triangulation_3:: -make_vertex_triple(const Facet& f) const +make_vertex_triple(const Facet& f) { - Cell_handle ch = f.first; - int i = f.second; - - return Vertex_triple(ch->vertex(vertex_triple_index(i,0)), - ch->vertex(vertex_triple_index(i,1)), - ch->vertex(vertex_triple_index(i,2))); + return vertices(f); } template < class Gt, class Tds, class Lds > void Triangulation_3:: -make_canonical_oriented_triple(Vertex_triple& t) const +make_canonical_oriented_triple(Vertex_triple& t) { - int i = (t.first < t.second) ? 0 : 1; + int i = (t[0] < t[1]) ? 0 : 1; if(i==0) { - i = (t.first < t.third) ? 0 : 2; + i = (t[0] < t[2]) ? 0 : 2; } else { - i = (t.second < t.third) ? 1 : 2; + i = (t[1] < t[2]) ? 1 : 2; } Vertex_handle tmp; @@ -4388,16 +4423,16 @@ make_canonical_oriented_triple(Vertex_triple& t) const { case 0: return; case 1: - tmp = t.first; - t.first = t.second; - t.second = t.third; - t.third = tmp; + tmp = t[0]; + t[0] = t[1]; + t[1] = t[2]; + t[2] = tmp; return; default: - tmp = t.first; - t.first = t.third; - t.third = t.second; - t.second = tmp; + tmp = t[0]; + t[0] = t[2]; + t[2] = t[1]; + t[1] = tmp; } } @@ -4410,8 +4445,8 @@ test_dim_down(Vertex_handle v) const // Returns true iff v is incident to all finite cells/facets // and all the other vertices are coplanar/collinear in dim3/2. - CGAL_triangulation_precondition(dimension() >= 0); - CGAL_triangulation_precondition(! is_infinite(v)); + CGAL_precondition(dimension() >= 0); + CGAL_precondition(! is_infinite(v)); if(dimension() == 3) { @@ -4474,8 +4509,8 @@ test_dim_down_using_incident_cells_3(Vertex_handle v, std::vector& adj_vertices, bool *could_lock_zone) const { - CGAL_triangulation_precondition(dimension() == 3); - CGAL_triangulation_precondition(! is_infinite(v)); + CGAL_precondition(dimension() == 3); + CGAL_precondition(! is_infinite(v)); // Collect all vertices on the boundary // and all incident cells @@ -4906,19 +4941,16 @@ fill_hole_2D(std::list& first_hole, VertexRemover& remover, OutputItCel } } +// When the incident cells are already known template < class Gt, class Tds, class Lds > -void +typename Triangulation_3::Vertex_triple_Facet_map Triangulation_3:: -make_hole_3D(Vertex_handle v, - Vertex_triple_Facet_map& outer_map, - std::vector& hole) +create_hole_outer_map(Vertex_handle v, const std::vector& incident_cells) { - CGAL_triangulation_expensive_precondition(! test_dim_down(v)); - - incident_cells(v, std::back_inserter(hole)); + CGAL_expensive_precondition(! test_dim_down(v)); - for(typename std::vector::iterator cit = hole.begin(), - end = hole.end(); + Vertex_triple_Facet_map outer_map; + for(auto cit = incident_cells.begin(), end = incident_cells.end(); cit != end; ++cit) { int indv = (*cit)->index(v); @@ -4933,240 +4965,144 @@ make_hole_3D(Vertex_handle v, (*cit)->vertex(i)->set_cell(opp_cit); } } + return outer_map; } -// When the incident cells are already known template < class Gt, class Tds, class Lds > -void +template < class Triangulation > +typename Triangulation_3::Vertex_triple_Facet_map Triangulation_3:: -make_hole_3D(Vertex_handle v, - const std::vector& incident_cells, - Vertex_triple_Facet_map& outer_map) -{ - CGAL_triangulation_expensive_precondition(! test_dim_down(v)); +create_triangulation_inner_map(const Triangulation& t, + const Vertex_handle_unique_hash_map& vmap, + bool all_cells) { + Vertex_triple_Facet_map inner_map; - for(typename std::vector::const_iterator cit = incident_cells.begin(), - end = incident_cells.end(); cit != end; ++cit) + if(all_cells) { - int indv = (*cit)->index(v); - Cell_handle opp_cit = (*cit)->neighbor(indv); - Facet f(opp_cit, opp_cit->index(*cit)); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - outer_map[vt] = f; - for(int i=0; i<4; i++) + for(All_cells_iterator it = t.all_cells_begin(), + end = t.all_cells_end(); it != end; ++it) { - if(i != indv) - (*cit)->vertex(i)->set_cell(opp_cit); + for(unsigned int index=0; index < 4; index++) + { + Facet f = std::pair(it,index); + Vertex_triple vt_aux = make_vertex_triple(f); + Vertex_triple vt{vmap[vt_aux[0]], vmap[vt_aux[2]], vmap[vt_aux[1]]}; + make_canonical_oriented_triple(vt); + inner_map[vt] = f; + } } - } -} - -template < class Gt, class Tds, class Lds > -template < class VertexRemover > -VertexRemover& -Triangulation_3:: -remove_dim_down(Vertex_handle v, VertexRemover& remover) -{ - CGAL_triangulation_precondition (dimension() >= 0); - - // Collect all the hidden points. - for(All_cells_iterator ci = tds().raw_cells_begin(), - end = tds().raw_cells_end(); ci != end; ++ci) - remover.add_hidden_points(ci); - - tds().remove_decrease_dimension(v, infinite_vertex()); - - // Now try to see if we need to re-orient. - if(dimension() == 2) + } else { - Facet f = *finite_facets_begin(); - if(coplanar_orientation(f.first->vertex(0)->point(), - f.first->vertex(1)->point(), - f.first->vertex(2)->point()) == NEGATIVE) + for(Finite_cells_iterator it = t.finite_cells_begin(), + end = t.finite_cells_end(); it != end; ++it) { - tds().reorient(); + for(unsigned int index=0; index < 4; index++) + { + Facet f = std::pair(it,index); + Vertex_triple vt_aux = make_vertex_triple(f); + Vertex_triple vt{vmap[vt_aux[0]], vmap[vt_aux[2]], vmap[vt_aux[1]]}; + make_canonical_oriented_triple(vt); + inner_map[vt] = f; + } } } - - return remover; -} - -template < class Gt, class Tds, class Lds > -template < class VertexRemover > -VertexRemover& -Triangulation_3:: -remove_1D(Vertex_handle v, VertexRemover& remover) -{ - CGAL_triangulation_precondition (dimension() == 1); - - Cell_handle c1 = v->cell(); - Cell_handle c2 = c1->neighbor(c1->index(v) == 0 ? 1 : 0); - remover.add_hidden_points(c1); - remover.add_hidden_points(c2); - - tds().remove_from_maximal_dimension_simplex (v); - - return remover; -} - -template < class Gt, class Tds, class Lds > -template < class VertexRemover > -VertexRemover& -Triangulation_3:: -remove_2D(Vertex_handle v, VertexRemover& remover) -{ - CGAL_triangulation_precondition(dimension() == 2); - std::list hole; - make_hole_2D(v, hole, remover); - fill_hole_2D(hole, remover); - tds().delete_vertex(v); - return remover; + return inner_map; } template < class Gt, class Tds, class Lds > -template < class VertexRemover > -VertexRemover& +template < class Triangulation > +typename Triangulation_3::Fill_auxiliary_return_type Triangulation_3:: -remove_3D(Vertex_handle v, VertexRemover& remover) +fill_auxiliary_triangulation_with_vertices_around_v(Triangulation& t, + Vertex_handle v, + std::vector& adj_vertices) const { - std::vector hole; - hole.reserve(64); - - // Construct the set of vertex triples on the boundary - // with the facet just behind - Vertex_triple_Facet_map outer_map; - Vertex_triple_Facet_map inner_map; - - make_hole_3D(v, outer_map, hole); - CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); - - // Output the hidden points. - for(typename std::vector::iterator hi = hole.begin(), - hend = hole.end(); - hi != hend; ++hi) - { - remover.add_hidden_points(*hi); - } - - bool inf = false; - - // collect all vertices on the boundary - std::vector vertices; - vertices.reserve(64); - adjacent_vertices(v, std::back_inserter(vertices)); - - // create a Delaunay triangulation of the points on the boundary - // and make a map from the vertices in remover.tmp towards the vertices - // in *this - + Fill_auxiliary_return_type result; + Vertex_handle_unique_hash_map& vmap = result.vmap; unsigned int i = 0; - Vertex_handle_unique_hash_map vmap; Cell_handle ch = Cell_handle(); #ifdef CGAL_TRIANGULATION_3_USE_THE_4_POINTS_CONSTRUCTOR - size_t num_vertices = vertices.size(); + size_t num_vertices = adj_vertices.size(); if(num_vertices >= 5) { for(int j = 0 ; j < 4 ; ++j) { - if(is_infinite(vertices[j])) + if(is_infinite(adj_vertices[j])) { - std::swap(vertices[j], vertices[4]); + std::swap(adj_vertices[j], adj_vertices[4]); break; } } - Orientation o = orientation(vertices[0]->point(), - vertices[1]->point(), - vertices[2]->point(), - vertices[3]->point()); + Orientation o = orientation(adj_vertices[0]->point(), + adj_vertices[1]->point(), + adj_vertices[2]->point(), + adj_vertices[3]->point()); if(o == NEGATIVE) - std::swap(vertices[0], vertices[1]); + std::swap(adj_vertices[0], adj_vertices[1]); if(o != ZERO) { Vertex_handle vh1, vh2, vh3, vh4; - remover.tmp.init_tds(vertices[0]->point(), vertices[1]->point(), - vertices[2]->point(), vertices[3]->point(), + t.init_tds(adj_vertices[0]->point(), adj_vertices[1]->point(), + adj_vertices[2]->point(), adj_vertices[3]->point(), vh1, vh2, vh3, vh4); + ch = vh1->cell(); - vmap[vh1] = vertices[0]; - vmap[vh2] = vertices[1]; - vmap[vh3] = vertices[2]; - vmap[vh4] = vertices[3]; + vmap[vh1] = adj_vertices[0]; + vmap[vh2] = adj_vertices[1]; + vmap[vh3] = adj_vertices[2]; + vmap[vh4] = adj_vertices[3]; i = 4; } } #endif - for(; i < vertices.size(); i++) + for(; i < adj_vertices.size(); i++) { - if(! is_infinite(vertices[i])) + if(! is_infinite(adj_vertices[i])) { - Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch); + Vertex_handle vh = t.insert(adj_vertices[i]->point(), ch); ch = vh->cell(); - vmap[vh] = vertices[i]; + vmap[vh] = adj_vertices[i]; } else { - inf = true; + result.vertex_is_incident_to_infinity = true; } } - if(remover.tmp.dimension() == 2) + if(t.dimension() == 2) { - Vertex_handle fake_inf = remover.tmp.insert(v->point()); + Vertex_handle fake_inf = t.insert(v->point()); vmap[fake_inf] = infinite_vertex(); } else { - vmap[remover.tmp.infinite_vertex()] = infinite_vertex(); + vmap[t.infinite_vertex()] = infinite_vertex(); } - CGAL_triangulation_assertion(remover.tmp.dimension() == 3); + CGAL_assertion(t.dimension() == 3); - // Construct the set of vertex triples of remover.tmp - // We reorient the vertex triple so that it matches those from outer_map - // Also note that we use the vertices of *this, not of remover.tmp + return result; +} - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - // Grow inside the hole, by extending the surface +template < class Gt, class Tds, class Lds > +template < class OutputItCells > +OutputItCells +Triangulation_3:: +copy_triangulation_into_hole(const Vertex_handle_unique_hash_map& vmap, + Vertex_triple_Facet_map&& outer_map, + const Vertex_triple_Facet_map& inner_map, + OutputItCells fit) +{ while(! outer_map.empty()) { typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - while(is_infinite(oit->first.first) || - is_infinite(oit->first.second) || - is_infinite(oit->first.third)) + while(is_infinite(oit->first[0]) || + is_infinite(oit->first[1]) || + is_infinite(oit->first[2])) { ++oit; // Otherwise the lookup in the inner_map fails @@ -5178,35 +5114,39 @@ remove_3D(Vertex_handle v, VertexRemover& remover) Cell_handle o_ch = o_vt_f_pair.second.first; unsigned int o_i = o_vt_f_pair.second.second; - typename Vertex_triple_Facet_map::iterator iit = inner_map.find(o_vt_f_pair.first); - CGAL_triangulation_assertion(iit != inner_map.end()); + auto iit = inner_map.find(o_vt_f_pair.first); + CGAL_assertion(iit != inner_map.end()); typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; Cell_handle i_ch = i_vt_f_pair.second.first; unsigned int i_i = i_vt_f_pair.second.second; // Create a new cell and glue it to the outer surface Cell_handle new_ch = tds().create_cell(); + *fit++ = new_ch; new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); o_ch->set_neighbor(o_i,new_ch); new_ch->set_neighbor(i_i, o_ch); + for(int j=0; j<4; j++) + new_ch->vertex(j)->set_cell(new_ch); + // For the other faces check, if they can also be glued - for(i = 0; i < 4; i++) + for(unsigned int index = 0; index < 4; index++) { - if(i != i_i) + if(index != i_i) { - Facet f = std::pair(new_ch,i); + Facet f = std::pair(new_ch, index); Vertex_triple vt = make_vertex_triple(f); make_canonical_oriented_triple(vt); - std::swap(vt.second,vt.third); + std::swap(vt[1], vt[2]); typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); if(oit2 == outer_map.end()) { - std::swap(vt.second,vt.third); - outer_map[vt]= f; + std::swap(vt[1], vt[2]); + outer_map[vt] = f; } else { @@ -5214,213 +5154,127 @@ remove_3D(Vertex_handle v, VertexRemover& remover) typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; Cell_handle o_ch2 = o_vt_f_pair2.second.first; int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2,new_ch); - new_ch->set_neighbor(i, o_ch2); + o_ch2->set_neighbor(o_i2, new_ch); + new_ch->set_neighbor(index, o_ch2); outer_map.erase(oit2); } } } } - tds().delete_vertex(v); - tds().delete_cells(hole.begin(), hole.end()); - - return remover; + return fit; } + template < class Gt, class Tds, class Lds > template < class VertexRemover > VertexRemover& Triangulation_3:: -remove_3D(Vertex_handle v, VertexRemover& remover, - const std::vector& inc_cells, - std::vector& adj_vertices) +remove_dim_down(Vertex_handle v, VertexRemover& remover) { - // Construct the set of vertex triples on the boundary with the facet just behind - Vertex_triple_Facet_map outer_map; - Vertex_triple_Facet_map inner_map; + CGAL_precondition (dimension() >= 0); - make_hole_3D(v, inc_cells, outer_map); + // Collect all the hidden points. + for(All_cells_iterator ci = tds().raw_cells_begin(), + end = tds().raw_cells_end(); ci != end; ++ci) + remover.add_hidden_points(ci); - CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); + tds().remove_decrease_dimension(v, infinite_vertex()); - // Output the hidden points. - for(typename std::vector::const_iterator hi = inc_cells.begin(), - hend = inc_cells.end(); - hi != hend; ++hi) + // Now try to see if we need to re-orient. + if(dimension() == 2) { - remover.add_hidden_points(*hi); + Facet f = *finite_facets_begin(); + if(coplanar_orientation(f.first->vertex(0)->point(), + f.first->vertex(1)->point(), + f.first->vertex(2)->point()) == NEGATIVE) + { + tds().reorient(); + } } - bool inf = false; + return remover; +} - // Create a Delaunay triangulation of the points on the boundary - // and make a map from the vertices in remover.tmp towards the vertices - // in *this - unsigned int i = 0; - Vertex_handle_unique_hash_map vmap; - Cell_handle ch = Cell_handle(); -#ifdef CGAL_TRIANGULATION_3_USE_THE_4_POINTS_CONSTRUCTOR - size_t num_vertices = adj_vertices.size(); - if(num_vertices >= 5) - { - for(int j = 0 ; j < 4 ; ++j) - { - if(is_infinite(adj_vertices[j])) - { - std::swap(adj_vertices[j], adj_vertices[4]); - break; - } - } +template < class Gt, class Tds, class Lds > +template < class VertexRemover > +VertexRemover& +Triangulation_3:: +remove_1D(Vertex_handle v, VertexRemover& remover) +{ + CGAL_precondition (dimension() == 1); - Orientation o = orientation(adj_vertices[0]->point(), - adj_vertices[1]->point(), - adj_vertices[2]->point(), - adj_vertices[3]->point()); + Cell_handle c1 = v->cell(); + Cell_handle c2 = c1->neighbor(c1->index(v) == 0 ? 1 : 0); + remover.add_hidden_points(c1); + remover.add_hidden_points(c2); - if(o == NEGATIVE) - std::swap(adj_vertices[0], adj_vertices[1]); + tds().remove_from_maximal_dimension_simplex (v); - if(o != ZERO) - { - Vertex_handle vh1, vh2, vh3, vh4; - remover.tmp.init_tds(adj_vertices[0]->point(), adj_vertices[1]->point(), - adj_vertices[2]->point(), adj_vertices[3]->point(), - vh1, vh2, vh3, vh4); + return remover; +} - ch = vh1->cell(); - vmap[vh1] = adj_vertices[0]; - vmap[vh2] = adj_vertices[1]; - vmap[vh3] = adj_vertices[2]; - vmap[vh4] = adj_vertices[3]; - i = 4; - } - } -#endif +template < class Gt, class Tds, class Lds > +template < class VertexRemover > +VertexRemover& +Triangulation_3:: +remove_2D(Vertex_handle v, VertexRemover& remover) +{ + CGAL_precondition(dimension() == 2); + std::list hole; + make_hole_2D(v, hole, remover); + fill_hole_2D(hole, remover); + tds().delete_vertex(v); + return remover; +} - for(; i < adj_vertices.size(); i++) - { - if(! is_infinite(adj_vertices[i])) - { - Vertex_handle vh = remover.tmp.insert(adj_vertices[i]->point(), ch); - ch = vh->cell(); - vmap[vh] = adj_vertices[i]; - } - else - { - inf = true; - } - } +template < class Gt, class Tds, class Lds > +template < class VertexRemover > +VertexRemover& +Triangulation_3:: +remove_3D(Vertex_handle v, VertexRemover& remover) +{ + return remove_3D(v, remover, Emptyset_iterator()); +} - if(remover.tmp.dimension()==2) - { - Vertex_handle fake_inf = remover.tmp.insert(v->point()); - vmap[fake_inf] = infinite_vertex(); - } - else +template < class Gt, class Tds, class Lds > +template < class VertexRemover > +VertexRemover& +Triangulation_3:: +remove_3D(Vertex_handle v, VertexRemover& remover, + const std::vector& inc_cells, + std::vector& adj_vertices) +{ + const auto& hole = inc_cells; + + // Construct the set of vertex triples on the boundary + // with the facet just behind + Vertex_triple_Facet_map outer_map = create_hole_outer_map(v, hole); + + CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); + + // Output the hidden points. + for(auto ch: hole) { - vmap[remover.tmp.infinite_vertex()] = infinite_vertex(); + remover.add_hidden_points(ch); } - CGAL_triangulation_assertion(remover.tmp.dimension() == 3); + // Create a Delaunay triangulation of the points on the boundary + // and make a map from the vertices in remover.tmp towards the vertices + // in *this + const auto ret = fill_auxiliary_triangulation_with_vertices_around_v(remover.tmp, v, adj_vertices); + const auto& vmap = ret.vmap; + const bool inf = ret.vertex_is_incident_to_infinity; // Construct the set of vertex triples of remover.tmp // We reorient the vertex triple so that it matches those from outer_map // Also note that we use the vertices of *this, not of remover.tmp - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } + const Vertex_triple_Facet_map inner_map = create_triangulation_inner_map(remover.tmp, vmap, inf); // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - while(is_infinite(oit->first.first) || - is_infinite(oit->first.second) || - is_infinite(oit->first.third)) - { - ++oit; - // otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } + copy_triangulation_into_hole(vmap, std::move(outer_map), inner_map, Emptyset_iterator{}); - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = - inner_map.find(o_vt_f_pair.first); - CGAL_triangulation_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - // for the other faces check, if they can also be glued - for(i = 0; i < 4; i++) - { - if(i != i_i) - { - Facet f = std::pair(new_ch,i); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - std::swap(vt.second,vt.third); - - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second,vt.third); - outer_map[vt]= f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2,new_ch); - new_ch->set_neighbor(i, o_ch2); - outer_map.erase(oit2); - } - } - } - } tds().delete_vertex(v); - tds().delete_cells(inc_cells.begin(), inc_cells.end()); + tds().delete_cells(hole.begin(), hole.end()); return remover; } @@ -5431,9 +5285,9 @@ void Triangulation_3:: remove(Vertex_handle v, VertexRemover& remover) { - CGAL_triangulation_precondition(v != Vertex_handle()); - CGAL_triangulation_precondition(!is_infinite(v)); - CGAL_triangulation_expensive_precondition(tds().is_vertex(v)); + CGAL_precondition(v != Vertex_handle()); + CGAL_precondition(!is_infinite(v)); + CGAL_expensive_precondition(tds().is_vertex(v)); if(test_dim_down (v)) { @@ -5450,7 +5304,7 @@ remove(Vertex_handle v, VertexRemover& remover) case 3: remove_3D (v, remover); break; default: - CGAL_triangulation_assertion (false); + CGAL_assertion (false); } } } @@ -5464,10 +5318,10 @@ remove(Vertex_handle v, VertexRemover& remover, bool *could_lock_zone) // N.B.: dimension doesn't need to be atomic since the parallel removal // will never decrease the dimension (the last few removes are done // sequentially) - CGAL_triangulation_precondition(v != Vertex_handle()); - CGAL_triangulation_precondition(!is_infinite(v)); - CGAL_triangulation_precondition(dimension() == 3); - CGAL_triangulation_expensive_precondition(tds().is_vertex(v)); + CGAL_precondition(v != Vertex_handle()); + CGAL_precondition(!is_infinite(v)); + CGAL_precondition(dimension() == 3); + CGAL_expensive_precondition(tds().is_vertex(v)); #ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING static Profile_branch_counter_3 bcounter( @@ -5551,7 +5405,7 @@ VertexRemover& Triangulation_3:: remove_2D(Vertex_handle v, VertexRemover& remover, OutputItCells fit) { - CGAL_triangulation_precondition(dimension() == 2); + CGAL_precondition(dimension() == 2); std::list hole; make_hole_2D(v, hole, remover); fill_hole_2D(hole, remover, fit); @@ -5565,164 +5419,44 @@ VertexRemover& Triangulation_3:: remove_3D(Vertex_handle v, VertexRemover& remover, OutputItCells fit) { - CGAL_triangulation_precondition(dimension() == 3); + CGAL_precondition(dimension() == 3); + + // Collect all vertices on the boundary of the hole + std::vector adj_vertices; + adj_vertices.reserve(64); + adjacent_vertices(v, std::back_inserter(adj_vertices)); std::vector hole; hole.reserve(64); + incident_cells(v, std::back_inserter(hole)); // Construct the set of vertex triples on the boundary // with the facet just behind - Vertex_triple_Facet_map outer_map; - Vertex_triple_Facet_map inner_map; - - make_hole_3D(v, outer_map, hole); + Vertex_triple_Facet_map outer_map = create_hole_outer_map(v, hole); CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); // Output the hidden points. - for(typename std::vector::iterator hi = hole.begin(), - hend = hole.end(); - hi != hend; ++hi) + for(auto ch: hole) { - remover.add_hidden_points(*hi); + remover.add_hidden_points(ch); } - bool inf = false; - unsigned int i; - - // collect all vertices on the boundary - std::vector vertices; - vertices.reserve(64); - adjacent_vertices(v, std::back_inserter(vertices)); - - // create a Delaunay triangulation of the points on the boundary + // Create a Delaunay triangulation of the points on the boundary // and make a map from the vertices in remover.tmp towards the vertices // in *this - Vertex_handle_unique_hash_map vmap; - Cell_handle ch = Cell_handle(); - for(i=0; ipoint(), ch); - ch = vh->cell(); - vmap[vh] = vertices[i]; - } - else - { - inf = true; - } - } - - if(remover.tmp.dimension()==2) - { - Vertex_handle fake_inf = remover.tmp.insert(v->point()); - vmap[fake_inf] = infinite_vertex(); - } - else - { - vmap[remover.tmp.infinite_vertex()] = infinite_vertex(); - } - - CGAL_triangulation_assertion(remover.tmp.dimension() == 3); + const auto ret = fill_auxiliary_triangulation_with_vertices_around_v(remover.tmp, v, adj_vertices); + const auto& vmap = ret.vmap; + const bool inf = ret.vertex_is_incident_to_infinity; // Construct the set of vertex triples of remover.tmp // We reorient the vertex triple so that it matches those from outer_map // Also note that we use the vertices of *this, not of remover.tmp - - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt] = f; - } - } - } else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt] = f; - } - } - } + const Vertex_triple_Facet_map inner_map = create_triangulation_inner_map(remover.tmp, vmap, inf); // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - while(is_infinite(oit->first.first) || - is_infinite(oit->first.second) || - is_infinite(oit->first.third)) - { - ++oit; - // otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } + copy_triangulation_into_hole(vmap, std::move(outer_map), inner_map, fit); - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = - inner_map.find(o_vt_f_pair.first); - CGAL_triangulation_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - *fit++ = new_ch; - - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - // for the other faces check, if they can also be glued - for(i = 0; i < 4; i++) - { - if(i != i_i) - { - Facet f = std::pair(new_ch,i); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - std::swap(vt.second, vt.third); - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second, vt.third); - outer_map[vt]= f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2, new_ch); - new_ch->set_neighbor(i, o_ch2); - outer_map.erase(oit2); - } - } - } - } tds().delete_vertex(v); tds().delete_cells(hole.begin(), hole.end()); @@ -5737,9 +5471,9 @@ Triangulation_3:: remove_and_give_new_cells(Vertex_handle v, VertexRemover& remover, OutputItCells fit) { - CGAL_triangulation_precondition(v != Vertex_handle()); - CGAL_triangulation_precondition(!is_infinite(v)); - CGAL_triangulation_expensive_precondition(tds().is_vertex(v)); + CGAL_precondition(v != Vertex_handle()); + CGAL_precondition(!is_infinite(v)); + CGAL_expensive_precondition(tds().is_vertex(v)); if(test_dim_down (v)) { @@ -5756,7 +5490,7 @@ remove_and_give_new_cells(Vertex_handle v, VertexRemover& remover, case 3: remove_3D (v, remover, fit); break; default: - CGAL_triangulation_assertion (false); + CGAL_assertion (false); } } } @@ -5772,7 +5506,7 @@ move_if_no_collision(Vertex_handle v, const Point& p, VertexRemover& remover, VertexInserter& inserter) { CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); - CGAL_triangulation_precondition(!is_infinite(v)); + CGAL_precondition(!is_infinite(v)); if(v->point() == p) return v; const int dim = dimension(); @@ -5829,7 +5563,7 @@ move_if_no_collision(Vertex_handle v, const Point& p, if(i == 0) f = f->neighbor(1); - CGAL_triangulation_assertion(f->index(v) == 1); + CGAL_assertion(f->index(v) == 1); Cell_handle g= f->neighbor(0); f->set_vertex(1, g->vertex(1)); f->set_neighbor(0,g->neighbor(0)); @@ -5841,7 +5575,7 @@ move_if_no_collision(Vertex_handle v, const Point& p, if(i == 0) f_ins = f_ins->neighbor(1); - CGAL_triangulation_assertion(f_ins->index(inserted) == 1); + CGAL_assertion(f_ins->index(inserted) == 1); Cell_handle g_ins = f_ins->neighbor(0); f_ins->set_vertex(1, v); g_ins->set_vertex(0, v); @@ -5958,166 +5692,45 @@ move_if_no_collision(Vertex_handle v, const Point& p, std::vector hole; hole.reserve(64); + incident_cells(v, std::back_inserter(hole)); // Construct the set of vertex triples on the boundary // with the facet just behind - Vertex_triple_Facet_map outer_map; - Vertex_triple_Facet_map inner_map; - - make_hole_3D(v, outer_map, hole); + Vertex_triple_Facet_map outer_map = create_hole_outer_map(v, hole); CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); // Output the hidden points. - for(typename std::vector::iterator hi = hole.begin(), - hend = hole.end(); hi != hend; ++hi) + for(auto ch: hole) { - remover.add_hidden_points(*hi); + remover.add_hidden_points(ch); } - bool inf = false; - unsigned int i; - // collect all vertices on the boundary - std::vector vertices; - vertices.reserve(64); - adjacent_vertices(v, std::back_inserter(vertices)); + std::vector adj_vertices; + adj_vertices.reserve(64); + adjacent_vertices(v, std::back_inserter(adj_vertices)); // create a Delaunay triangulation of the points on the boundary // and make a map from the vertices in remover.tmp towards the vertices // in *this - Vertex_handle_unique_hash_map vmap; - Cell_handle ch = Cell_handle(); - for(i=0; i < vertices.size(); i++) - { - if(! is_infinite(vertices[i])) - { - Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch); - ch = vh->cell(); - vmap[vh] = vertices[i]; - } - else - { - inf = true; - } - } - - if(remover.tmp.dimension() == 2) - { - Vertex_handle fake_inf = remover.tmp.insert(v->point()); - vmap[fake_inf] = infinite_vertex(); - } - else - { - vmap[remover.tmp.infinite_vertex()] = infinite_vertex(); - } - - CGAL_triangulation_assertion(remover.tmp.dimension() == 3); + const auto ret = fill_auxiliary_triangulation_with_vertices_around_v(remover.tmp, v, adj_vertices); + const auto& vmap = ret.vmap; + const bool inf = ret.vertex_is_incident_to_infinity; // Construct the set of vertex triples of remover.tmp // We reorient the vertex triple so that it matches those from outer_map // Also note that we use the vertices of *this, not of remover.tmp - - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } + const Vertex_triple_Facet_map inner_map = create_triangulation_inner_map(remover.tmp, vmap, inf); // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - while(is_infinite(oit->first.first) || - is_infinite(oit->first.second) || - is_infinite(oit->first.third)) - { - ++oit; - // otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } - - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = - inner_map.find(o_vt_f_pair.first); - CGAL_triangulation_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - // for the other faces check, if they can also be glued - for(i = 0; i < 4; i++) - { - if(i != i_i) - { - Facet f = std::pair(new_ch,i); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - std::swap(vt.second,vt.third); - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second,vt.third); - outer_map[vt]= f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2,new_ch); - new_ch->set_neighbor(i, o_ch2); - outer_map.erase(oit2); - } - } - } - } + copy_triangulation_into_hole(vmap, std::move(outer_map), inner_map, Emptyset_iterator{}); // fixing pointer std::vector cells_pt; cells_pt.reserve(64); incident_cells(inserted, std::back_inserter(cells_pt)); - std::size_t size = cells_pt.size(); - for(std::size_t i=0; iset_vertex(c->index(inserted), v); @@ -6138,7 +5751,7 @@ move(Vertex_handle v, const Point& p, VertexRemover& remover, VertexInserter& inserter) { CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); - CGAL_triangulation_precondition(!is_infinite(v)); + CGAL_precondition(!is_infinite(v)); if(v->point() == p) return v; @@ -6164,7 +5777,7 @@ move_if_no_collision_and_give_new_cells(Vertex_handle v, const Point& p, OutputItCells fit) { CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); - CGAL_triangulation_precondition(!is_infinite(v)); + CGAL_precondition(!is_infinite(v)); if(v->point() == p) return v; @@ -6233,7 +5846,7 @@ move_if_no_collision_and_give_new_cells(Vertex_handle v, const Point& p, if(i==0) f = f->neighbor(1); - CGAL_triangulation_assertion(f->index(v) == 1); + CGAL_assertion(f->index(v) == 1); Cell_handle g = f->neighbor(0); f->set_vertex(1, g->vertex(1)); f->set_neighbor(0,g->neighbor(0)); @@ -6246,7 +5859,7 @@ move_if_no_collision_and_give_new_cells(Vertex_handle v, const Point& p, if(i==0) f_ins = f_ins->neighbor(1); - CGAL_triangulation_assertion(f_ins->index(inserted) == 1); + CGAL_assertion(f_ins->index(inserted) == 1); Cell_handle g_ins = f_ins->neighbor(0); f_ins->set_vertex(1, v); g_ins->set_vertex(0, v); @@ -6397,180 +6010,57 @@ move_if_no_collision_and_give_new_cells(Vertex_handle v, const Point& p, std::vector cells_tmp; cells_tmp.reserve(64); incident_cells(inserted, std::back_inserter(cells_tmp)); - int size = cells_tmp.size(); - for(int i=0; i hole; hole.reserve(64); + incident_cells(v, std::back_inserter(hole)); - // Construct the set of vertex triples on the boundary - // with the facet just behind - Vertex_triple_Facet_map outer_map; - Vertex_triple_Facet_map inner_map; - - make_hole_3D(v, outer_map, hole); - - for(typename std::vector::const_iterator ib = hole.begin(), - iend = hole.end(); - ib != iend; ib++) + for(auto ch : hole) { - cells_set.erase(*ib); + cells_set.erase(ch); } + // Construct the set of vertex triples on the boundary + // with the facet just behind + Vertex_triple_Facet_map outer_map = create_hole_outer_map(v, hole); + CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); // Output the hidden points. - for(typename std::vector::iterator hi = hole.begin(), - hend = hole.end(); - hi != hend; ++hi) + for(auto ch: hole) { - remover.add_hidden_points(*hi); + remover.add_hidden_points(ch); } - bool inf = false; - unsigned int i; - // Collect all vertices on the boundary - std::vector vertices; - vertices.reserve(64); - adjacent_vertices(v, std::back_inserter(vertices)); + std::vector adj_vertices; + adj_vertices.reserve(64); + adjacent_vertices(v, std::back_inserter(adj_vertices)); // Create a Delaunay triangulation of the points on the boundary // and make a map from the vertices in remover.tmp towards the vertices // in *this - Vertex_handle_unique_hash_map vmap; - Cell_handle ch = Cell_handle(); - for(i=0; i < vertices.size(); i++) - { - if(! is_infinite(vertices[i])) - { - Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch); - ch = vh->cell(); - vmap[vh] = vertices[i]; - }else { - inf = true; - } - } - - if(remover.tmp.dimension()==2) - { - Vertex_handle fake_inf = remover.tmp.insert(v->point()); - vmap[fake_inf] = infinite_vertex(); - } - else - { - vmap[remover.tmp.infinite_vertex()] = infinite_vertex(); - } - - CGAL_triangulation_assertion(remover.tmp.dimension() == 3); + const auto ret = fill_auxiliary_triangulation_with_vertices_around_v(remover.tmp, v, adj_vertices); + const auto& vmap = ret.vmap; + const bool inf = ret.vertex_is_incident_to_infinity; // Construct the set of vertex triples of remover.tmp // We reorient the vertex triple so that it matches those from outer_map // Also note that we use the vertices of *this, not of remover.tmp - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } + const Vertex_triple_Facet_map inner_map = create_triangulation_inner_map(remover.tmp, vmap, inf); // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - while(is_infinite(oit->first.first) || - is_infinite(oit->first.second) || - is_infinite(oit->first.third)) - { - ++oit; - // otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } - - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = - inner_map.find(o_vt_f_pair.first); - CGAL_triangulation_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - *fit++ = new_ch; - - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - // for the other faces check, if they can also be glued - for(i = 0; i < 4; i++) - { - if(i != i_i) - { - Facet f = std::pair(new_ch, i); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - std::swap(vt.second,vt.third); - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second,vt.third); - outer_map[vt] = f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2,new_ch); - new_ch->set_neighbor(i, o_ch2); - outer_map.erase(oit2); - } - } - } - } + copy_triangulation_into_hole(vmap, std::move(outer_map), inner_map, fit); // fixing pointer std::vector cells_pt; cells_pt.reserve(64); incident_cells(inserted, std::back_inserter(cells_pt)); - size = cells_pt.size(); - for(int i=0; iset_vertex(c->index(inserted), v); @@ -6594,7 +6084,7 @@ template < class Gt, class Tds, class Lds > void Triangulation_3:: _make_big_hole_3D(Vertex_handle v, - std::map& outer_map, + Vertex_triple_Facet_map& outer_map, std::vector& hole, std::vector& vertices, std::map& vstates) @@ -6707,13 +6197,12 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem vstates[v] = PROCESSED; // here, we make the hole for the cluster with v inside - typedef std::map Vertex_triple_Facet_map; std::vector hole; - std::vector vertices; + std::vector adj_vertices; hole.reserve(64); - vertices.reserve(32); + adj_vertices.reserve(32); Vertex_triple_Facet_map outer_map; - _make_big_hole_3D(v, outer_map, hole, vertices, vstates); + _make_big_hole_3D(v, outer_map, hole, adj_vertices, vstates); // the connectivity is totally lost, we need to rebuild if(!outer_map.size()) @@ -6723,7 +6212,7 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem return false; } - std::size_t vsi = vertices.size(); + std::size_t vsi = adj_vertices.size(); bool inf = false; std::size_t i; @@ -6737,7 +6226,7 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem std::map mp_vps; for(i=0; iis_infinite(vv)) { vps.push_back(vv->point()); @@ -6770,7 +6259,7 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem vmap[vh] = vv; } - if(remover.tmp.dimension()==2) + if(remover.tmp.dimension() == 2) { Vertex_handle fake_inf = remover.tmp.insert(v->point()); vmap[fake_inf] = this->infinite_vertex(); @@ -6784,11 +6273,11 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem { for(i=0; i < vsi; i++) { - if(!this->is_infinite(vertices[i])) + if(!this->is_infinite(adj_vertices[i])) { - Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch); + Vertex_handle vh = remover.tmp.insert(adj_vertices[i]->point(), ch); ch = vh->cell(); - vmap[vh] = vertices[i]; + vmap[vh] = adj_vertices[i]; } else { @@ -6796,7 +6285,7 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem } } - if(remover.tmp.dimension()==2) + if(remover.tmp.dimension() == 2) { Vertex_handle fake_inf = remover.tmp.insert(v->point()); vmap[fake_inf] = this->infinite_vertex(); @@ -6807,105 +6296,10 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem } } - Vertex_triple_Facet_map inner_map; - - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(unsigned int index=0; index < 4; index++) - { - Facet f = std::pair(it,index); - Vertex_triple vt_aux = this->make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - this->make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(unsigned int index=0; index < 4; index++) - { - Facet f = std::pair(it,index); - Vertex_triple vt_aux = this->make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - this->make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } + const Vertex_triple_Facet_map inner_map = create_triangulation_inner_map(remover.tmp, vmap, inf); // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - - while(this->is_infinite(oit->first.first) || - this->is_infinite(oit->first.second) || - this->is_infinite(oit->first.third)) - { - ++oit; - // otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } - - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = - inner_map.find(o_vt_f_pair.first); - CGAL_triangulation_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - for(int j=0; j<4; j++) - new_ch->vertex(j)->set_cell(new_ch); - - // for the other faces check, if they can also be glued - for(unsigned int index = 0; index < 4; index++) - { - if(index != i_i) - { - Facet f = std::pair(new_ch,index); - Vertex_triple vt = this->make_vertex_triple(f); - this->make_canonical_oriented_triple(vt); - std::swap(vt.second,vt.third); - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second,vt.third); - outer_map[vt]= f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2,new_ch); - new_ch->set_neighbor(index, o_ch2); - outer_map.erase(oit2); - } - } - } - - } + copy_triangulation_into_hole(vmap, std::move(outer_map), inner_map, Emptyset_iterator{}); this->tds().delete_cells(hole.begin(), hole.end()); remover.tmp.clear(); @@ -6949,8 +6343,8 @@ typename Triangulation_3::size_type Triangulation_3:: remove(InputIterator first, InputIterator beyond, VertexRemover& remover) { - CGAL_triangulation_precondition(!does_repeat_in_range(first, beyond)); - CGAL_triangulation_precondition(!infinite_vertex_in_range(first, beyond)); + CGAL_precondition(!does_repeat_in_range(first, beyond)); + CGAL_precondition(!infinite_vertex_in_range(first, beyond)); size_type n = number_of_vertices(); InputIterator init = first, init2 = first; @@ -6988,7 +6382,7 @@ is_valid(bool verbose, int level) const if(verbose) std::cerr << "invalid data structure" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -6997,7 +6391,7 @@ is_valid(bool verbose, int level) const if(verbose) std::cerr << "no infinite vertex" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -7047,7 +6441,7 @@ is_valid(Cell_handle c, bool verbose, int level) const std::cerr << std::endl; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -7083,7 +6477,7 @@ is_valid_finite(Cell_handle c, bool verbose, int) const << c->vertex(2)->point() << ", " << c->vertex(3)->point() << std::endl; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } break; @@ -7101,7 +6495,7 @@ is_valid_finite(Cell_handle c, bool verbose, int) const << c->vertex(1)->point() << ", " << c->vertex(2)->point() << std::endl; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } break; @@ -7123,7 +6517,7 @@ is_valid_finite(Cell_handle c, bool verbose, int) const << c->neighbor(0)->vertex(1-c->neighbor(0)->index(c))->point() << ", " << v->point() << std::endl; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } @@ -7140,7 +6534,7 @@ is_valid_finite(Cell_handle c, bool verbose, int) const << c->neighbor(1)->vertex(1-c->neighbor(1)->index(c))->point() << ", " << v->point() << std::endl; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } @@ -7154,16 +6548,14 @@ is_valid_finite(Cell_handle c, bool verbose, int) const namespace internal { // Internal function used by operator==. -template < class GT, class Tds1, class Tds2, class Lds > +template < class GT, class Tds1, class Tds2, class Lds, typename CMAP, typename VMAP > bool test_next(const Triangulation_3& t1, const Triangulation_3& t2, typename Triangulation_3::Cell_handle c1, typename Triangulation_3::Cell_handle c2, - std::map::Cell_handle, - typename Triangulation_3::Cell_handle>& Cmap, - std::map::Vertex_handle, - typename Triangulation_3::Vertex_handle>& Vmap) + CMAP& Cmap, + VMAP& Vmap) { // This function tests and registers the 4 neighbors of c1/c2, // and recursively calls itself over them. @@ -7171,12 +6563,12 @@ test_next(const Triangulation_3& t1, // Returns false if an inequality has been found. // Precondition: c1, c2 have been registered as well as their 4 vertices. - CGAL_triangulation_precondition(t1.dimension() >= 2); - CGAL_triangulation_precondition(Cmap[c1] == c2); - CGAL_triangulation_precondition(Vmap.find(c1->vertex(0)) != Vmap.end()); - CGAL_triangulation_precondition(Vmap.find(c1->vertex(1)) != Vmap.end()); - CGAL_triangulation_precondition(Vmap.find(c1->vertex(2)) != Vmap.end()); - CGAL_triangulation_precondition(t1.dimension() == 2 || + CGAL_precondition(t1.dimension() >= 2); + CGAL_precondition(Cmap[c1] == c2); + CGAL_precondition(Vmap.find(c1->vertex(0)) != Vmap.end()); + CGAL_precondition(Vmap.find(c1->vertex(1)) != Vmap.end()); + CGAL_precondition(Vmap.find(c1->vertex(2)) != Vmap.end()); + CGAL_precondition(t1.dimension() == 2 || Vmap.find(c1->vertex(3)) != Vmap.end()); typedef Triangulation_3 Tr1; @@ -7186,8 +6578,8 @@ test_next(const Triangulation_3& t1, typedef typename Tr2::Vertex_handle Vertex_handle2; typedef typename Tr2::Cell_handle Cell_handle2; - typedef typename std::map::const_iterator Vit; - typedef typename std::map::const_iterator Cit; + typedef typename std::unordered_map::const_iterator Vit; + typedef typename std::unordered_map::const_iterator Cit; typedef typename Tr1::Geom_traits::Construct_point_3 Construct_point_3; typedef typename Tr1::Geom_traits::Compare_xyz_3 Compare_xyz_3; @@ -7196,7 +6588,7 @@ test_next(const Triangulation_3& t1, Construct_point_3 cp = t1.geom_traits().construct_point_3_object(); std::vector > cell_stack; - cell_stack.push_back(std::make_pair(c1, c2)); + cell_stack.emplace_back(c1, c2); while(! cell_stack.empty()) { @@ -7242,12 +6634,12 @@ test_next(const Triangulation_3& t1, return false; // We register vn1/vn2. - Vmap.insert(std::make_pair(vn1, vn2)); + Vmap.emplace(vn1, vn2); } // We register n1/n2. - Cmap.insert(std::make_pair(n1, n2)); - cell_stack.push_back(std::make_pair(n1, n2)); + Cmap.emplace(n1, n2); + cell_stack.emplace_back(n1, n2); } } @@ -7286,11 +6678,11 @@ operator==(const Triangulation_3& t1, int dim = t1.dimension(); // Special case for dimension < 1. // The triangulation is uniquely defined in these cases. - if(dim < 1) + if(dim == - 1) return true; - // Special case for dimension == 1. - if(dim == 1) + // Special case for dimensions 0 and 1. + if(dim < 2) { // It's enough to test that the points are the same, // since the triangulation is uniquely defined in this case. @@ -7308,13 +6700,13 @@ operator==(const Triangulation_3& t1, // We will store the mapping between the 2 triangulations vertices and // cells in 2 maps. - std::map Vmap; - std::map Cmap; + std::unordered_map Vmap; + std::unordered_map Cmap; // Handle the infinite vertex. Vertex_handle1 v1 = t1.infinite_vertex(); Vertex_handle2 iv2 = t2.infinite_vertex(); - Vmap.insert(std::make_pair(v1, iv2)); + Vmap.emplace(v1, iv2); // We pick one infinite cell of t1, and try to match it against the // infinite cells of t2. @@ -7364,7 +6756,7 @@ operator==(const Triangulation_3& t1, } // Found it ! - Cmap.insert(std::make_pair(c, *cit)); + Cmap.emplace(c, *cit); break; } diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_3/internal/Delaunay_triangulation_hierarchy_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_3/internal/Delaunay_triangulation_hierarchy_3.h index 1c6039aa..71aa6c5a 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_3/internal/Delaunay_triangulation_hierarchy_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_3/internal/Delaunay_triangulation_hierarchy_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Triangulation_3/internal/Delaunay_triangulation_hierarchy_3.h $ -// $Id: Delaunay_triangulation_hierarchy_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Triangulation_3/internal/Delaunay_triangulation_hierarchy_3.h $ +// $Id: include/CGAL/Triangulation_3/internal/Delaunay_triangulation_hierarchy_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_3/internal/Triangulation_segment_traverser_3_impl.h b/thirdparty/CGAL/include/CGAL/Triangulation_3/internal/Triangulation_segment_traverser_3_impl.h index 84d00efc..eb8c2db3 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_3/internal/Triangulation_segment_traverser_3_impl.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_3/internal/Triangulation_segment_traverser_3_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Triangulation_3/internal/Triangulation_segment_traverser_3_impl.h $ -// $Id: Triangulation_segment_traverser_3_impl.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Triangulation_3/internal/Triangulation_segment_traverser_3_impl.h $ +// $Id: include/CGAL/Triangulation_3/internal/Triangulation_segment_traverser_3_impl.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): Thijs van Lankveld, Jane Tournois @@ -14,16 +14,18 @@ #include +#include + namespace CGAL { template < class Tr, class Inc > Triangulation_segment_cell_iterator_3:: Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, Vertex_handle t ) : _tr(tr) { - CGAL_triangulation_precondition( !_tr->is_infinite(s) ); - CGAL_triangulation_precondition( !_tr->is_infinite(t) ); - CGAL_triangulation_precondition( s->point() != t->point() ); - CGAL_triangulation_precondition( _tr->dimension() >= 2 ); + CGAL_precondition( !_tr->is_infinite(s) ); + CGAL_precondition( !_tr->is_infinite(t) ); + CGAL_precondition( s->point() != t->point() ); + CGAL_precondition( _tr->dimension() >= 2 ); _source = s->point(); _target = t->point(); @@ -36,7 +38,7 @@ Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, Vertex_han if( c->has_vertex( _tr->infinite_vertex(), inf ) ) c = c->neighbor(inf); - _cur = Simplex( c, Tr::VERTEX, c->index(s), -1 ); + _cur = Simplex{ c, Tr::VERTEX, c->index(s), -1 }; jump_to_intersecting_cell(); } @@ -45,10 +47,10 @@ template < class Tr, class Inc > Triangulation_segment_cell_iterator_3:: Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, const Point& t ) : _tr(tr) { - CGAL_triangulation_precondition( !_tr->is_infinite(s) ); - CGAL_triangulation_precondition( s->point() != t ); - CGAL_triangulation_precondition( _tr->dimension() >= 2 ); - CGAL_triangulation_precondition( _tr->dimension() == 3 || + CGAL_precondition( !_tr->is_infinite(s) ); + CGAL_precondition( s->point() != t ); + CGAL_precondition( _tr->dimension() >= 2 ); + CGAL_precondition( _tr->dimension() == 3 || orientation( *_tr->finite_facets_begin(), t ) == COPLANAR ); _source = s->point(); @@ -62,7 +64,7 @@ Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, const Poin if( c->has_vertex( _tr->infinite_vertex(), inf ) ) c = c->neighbor(inf); - _cur = Simplex( c, Tr::VERTEX, c->index(s), -1 ); + _cur = Simplex{ c, Tr::VERTEX, c->index(s), -1 }; jump_to_intersecting_cell(); } @@ -71,10 +73,10 @@ template < class Tr, class Inc > Triangulation_segment_cell_iterator_3:: Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, Vertex_handle t, Cell_handle hint ) : _tr(tr) { - CGAL_triangulation_precondition( !_tr->is_infinite(t) ); - CGAL_triangulation_precondition( s != t->point() ); - CGAL_triangulation_precondition( _tr->dimension() >= 2 ); - CGAL_triangulation_precondition( _tr->dimension() == 3 || + CGAL_precondition( !_tr->is_infinite(t) ); + CGAL_precondition( s != t->point() ); + CGAL_precondition( _tr->dimension() >= 2 ); + CGAL_precondition( _tr->dimension() == 3 || orientation( *_tr->finite_facets_begin(), s ) == COPLANAR ); _source = s; @@ -84,7 +86,7 @@ Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, Vertex_hand cell() = _tr->locate( s, lt(), li(), lj(), hint ); - CGAL_triangulation_postcondition( cell() != Cell_handle() ); + CGAL_postcondition( cell() != Cell_handle() ); jump_to_intersecting_cell(); } @@ -93,9 +95,9 @@ template < class Tr, class Inc > Triangulation_segment_cell_iterator_3:: Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, const Point& t, Cell_handle hint ) : _tr(tr) { - CGAL_triangulation_precondition( s != t ); - CGAL_triangulation_precondition( _tr->dimension() >= 2 ); - CGAL_triangulation_precondition( _tr->dimension() == 3 || + CGAL_precondition( s != t ); + CGAL_precondition( _tr->dimension() >= 2 ); + CGAL_precondition( _tr->dimension() == 3 || coplanar( *_tr->finite_facets_begin(), _target ) ); _source = s; @@ -105,7 +107,7 @@ Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, const Point cell() = _tr->locate( s, lt(), li(), lj(), hint ); - CGAL_triangulation_postcondition( cell() != Cell_handle() ); + CGAL_postcondition( cell() != Cell_handle() ); jump_to_intersecting_cell(); } @@ -124,14 +126,14 @@ template < class Tr, class Inc > Triangulation_segment_cell_iterator_3 Triangulation_segment_cell_iterator_3::end() const { SCI sci(_tr); - std::get<0>(sci._cur) = Cell_handle(); + sci._cur.cell = Cell_handle(); return sci; } template < class Tr, class Inc > inline Triangulation_segment_cell_iterator_3& Triangulation_segment_cell_iterator_3::operator++() { - CGAL_triangulation_precondition( cell() != Cell_handle() ); + CGAL_precondition( cell() != Cell_handle() ); increment(); return *this; } @@ -169,8 +171,8 @@ operator!=( const SCI& sci ) const { template < class Tr, class Inc > inline bool Triangulation_segment_cell_iterator_3:: -operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const { - CGAL_triangulation_assertion( n == NULL ); +operator==( Nullptr_t CGAL_assertion_code(n) ) const { + CGAL_assertion( n == NULL ); return cell() == Cell_handle(); } @@ -233,14 +235,15 @@ jump_to_intersecting_cell() template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next() { - CGAL_triangulation_precondition( has_next() ); + CGAL_precondition( has_next() ); // Check if the target is in the current cell. int ti; if( cell()->has_vertex( _t_vertex, ti ) ) { // The target is inside the cell. - _prev = Simplex( cell(), Tr::VERTEX, ti, -1 ); + _prev = Simplex{ cell(), Tr::VERTEX, ti, -1 }; cell() = Cell_handle(); + lt() = Locate_type::VERTEX; return; } @@ -302,24 +305,24 @@ bool Triangulation_segment_cell_iterator_3:: have_same_entry(const Simplex& s1, const Simplex& s2) const { //type - if (std::get<1>(s1) != std::get<1>(s2)) + if (s1.lt != s2.lt) return false; - switch (std::get<1>(s1)) + switch (s1.lt) { case Locate_type::VERTEX: - return std::get<0>(s1)->vertex(std::get<2>(s1)) == std::get<0>(s2)->vertex(std::get<2>(s2)); + return s1.cell->vertex(s1.li) == s2.cell->vertex(s2.li); case Locate_type::EDGE: { - Vertex_handle v1a = std::get<0>(s1)->vertex(std::get<2>(s1)); - Vertex_handle v1b = std::get<0>(s1)->vertex(std::get<3>(s1)); - Vertex_handle v2a = std::get<0>(s2)->vertex(std::get<2>(s2)); - Vertex_handle v2b = std::get<0>(s2)->vertex(std::get<3>(s2)); + Vertex_handle v1a = s1.cell->vertex(s1.li); + Vertex_handle v1b = s1.cell->vertex(s1.lj); + Vertex_handle v2a = s2.cell->vertex(s2.li); + Vertex_handle v2b = s2.cell->vertex(s2.lj); return (v1a == v2a && v1b == v2b) || (v1a == v2b && v1b == v2a); } case Locate_type::FACET: - return triangulation()->are_equal(Facet(std::get<0>(s1), std::get<2>(s1)), - Facet(std::get<0>(s2), std::get<2>(s2))); + return triangulation()->are_equal(Facet(s1.cell, s1.li), + Facet(s2.cell, s2.li)); default: CGAL_assertion(false); }; @@ -332,318 +335,314 @@ std::pair::Simplex, Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& prev, const Simplex& cur) const { - std::array vert - = {&(std::get<0>(cur)->vertex(0)->point()), - &(std::get<0>(cur)->vertex(1)->point()), - &(std::get<0>(cur)->vertex(2)->point()), - &(std::get<0>(cur)->vertex(3)->point()) }; - - int inside=0,outside=0,regular_case=0,degenerate=0; - Cell_handle nnext; - - if (std::get<1>(cur) == Tr::FACET) { - regular_case = 1; - int i = std::get<2>(cur); - int j0 = Tr::vertex_triple_index(i, 0); - int j1 = Tr::vertex_triple_index(i, 1); - int j2 = Tr::vertex_triple_index(i, 2); - Orientation o0 = _tr->orientation(_source, *vert[i], *vert[j0], _target); - if (o0 == POSITIVE) { - Orientation o1 = _tr->orientation(_source, *vert[i], *vert[j1], _target); - if (o1 != POSITIVE) { - if (_tr->orientation(*vert[i], *vert[j0], *vert[j1], _target) == POSITIVE) { - nnext = std::get<0>(cur)->neighbor(j2); - outside = j2; - if (o1 == ZERO) degenerate = 1; //EDGE i j1 - } - else - inside = 1; + const auto cur_cell = cur.cell; + std::array vert = {&(cur_cell->vertex(0)->point()), &(cur_cell->vertex(1)->point()), + &(cur_cell->vertex(2)->point()), &(cur_cell->vertex(3)->point())}; + + CGAL_assertion_code(int inside = 0;) + CGAL_assertion_code(int outside = 0;) + int regular_case = 0, degenerate = 0; + + if(cur.lt == Tr::FACET && prev.cell != Cell_handle()) { + // [source, target] entered the cell `cur` via a facet. + // Note that, if prev.cell == Cell_handle(), that means `source` is *on* + // the facet, and the block of this `if` cannot be applied. + Simplex prev_after_walk; + Simplex cur_after_walk; + + auto case_target_is_inside_cur_cell = [&](int case_nb) { + CGAL_USE(case_nb); + CGAL_assertion_code(inside = case_nb;) + prev_after_walk = {cur_cell, Tr::CELL, -1, -1}; + cur_after_walk = {{}, Tr::CELL, -1, -1}; + }; + auto case_segment_exits_cur_cell_by = [&](int facet_nb, Cell_handle nnext = {}) { + if(nnext == Cell_handle{}) { + nnext = cur_cell->neighbor(facet_nb); + } + CGAL_assertion_code(outside = facet_nb;) + prev_after_walk = {cur_cell, Tr::FACET, facet_nb, -1}; + cur_after_walk = {nnext, Tr::FACET, nnext->index(cur_cell), -1}; + }; + regular_case = 1; + const int i = cur.li; + const int j0 = Tr::vertex_triple_index(i, 0); + const int j1 = Tr::vertex_triple_index(i, 1); + const int j2 = Tr::vertex_triple_index(i, 2); + Orientation o0 = _tr->orientation(_source, *vert[i], *vert[j0], _target); + if(o0 == POSITIVE) { // o0 > 0 + Orientation o1 = _tr->orientation(_source, *vert[i], *vert[j1], _target); + if(o1 != POSITIVE) { // o1 <= 0 + Orientation oi01 = _tr->orientation(*vert[i], *vert[j0], *vert[j1], _target); + if(oi01 == POSITIVE) { + case_segment_exits_cur_cell_by(j2); + if(o1 == ZERO) + degenerate = 1; // EDGE i j1 + } else { // o0 > 0, o1 <= 0, oi01 <= 0 + case_target_is_inside_cur_cell(1); + if(oi01 == ZERO) { // on FACET j2 (i, j0, j1) + degenerate = 1; + } // end oi01 == ZERO } - else { - if (_tr->orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { - nnext = std::get<0>(cur)->neighbor(j0); - outside = j0; - } - else - inside = 2; + } // end o1 <= 0 + else + { // o1 > 0 + Orientation oi12 = _tr->orientation(*vert[i], *vert[j1], *vert[j2], _target); + if(oi12 == POSITIVE) { + case_segment_exits_cur_cell_by(j0); + } else { // o0 > 0, o1 > 0, oi12 <= 0 + case_target_is_inside_cur_cell(2); + if(oi12 == ZERO) { // on FACET j0 (i, j1, j2) + degenerate = 1; + } // end oi12 == ZERO } } - else if (o0 == ZERO) { - Orientation o1 = _tr->orientation(_source, *vert[i], *vert[j1], _target); - if (o1 == NEGATIVE) { - if (_tr->orientation(*vert[i], *vert[j0], *vert[j1], _target) == POSITIVE) { - nnext = std::get<0>(cur)->neighbor(j2); //EDGE i j0 - degenerate = 2; - outside = 44; - } - else - inside = 3; - } - else if (o1 == ZERO) { - if (_tr->orientation(*vert[i], *vert[j0], *vert[j2], _target) == POSITIVE) - inside = 55; - else - { - nnext = std::get<0>(cur)->neighbor(j2); //VERTEX i - degenerate = 3; - outside = 5; + } // end o0 > 0 + else if(o0 == ZERO) + { + // target is on plane (source, vert[i], vert[j0]) + Orientation o1 = _tr->orientation(_source, *vert[i], *vert[j1], _target); + if(o1 == NEGATIVE) { + Orientation oi12 = _tr->orientation(*vert[i], *vert[j0], *vert[j1], _target); + if(oi12 == POSITIVE) { + degenerate = 2; + case_segment_exits_cur_cell_by(44, cur_cell->neighbor(j2)); // EDGE i j0 + } else { + case_target_is_inside_cur_cell(3); + if(oi12 == ZERO) { // target is *on* EDGE i j0 + degenerate = 1; } } + } else if(o1 == ZERO) { + // o0 == o1 == 0 -> target is on line source-vert[i] + if(_tr->orientation(*vert[i], *vert[j0], *vert[j2], _target) == POSITIVE) + case_target_is_inside_cur_cell(55); else { - if (_tr->orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { - nnext = std::get<0>(cur)->neighbor(j0); - outside = j0; - } - else - inside = 4; + degenerate = 3; + case_segment_exits_cur_cell_by(5, cur_cell->neighbor(j2)); // VERTEX i + } + } else { // o0 == 0, o1 > 0 + Orientation oi12 = _tr->orientation(*vert[i], *vert[j1], *vert[j2], _target); + if(oi12 == POSITIVE) { + case_segment_exits_cur_cell_by(j0); + } else { + case_target_is_inside_cur_cell(4); + if(oi12 == ZERO) { // on FACET j0 (i, j1, j2) + degenerate = 1; + } // end oi12 == ZERO } } - else { - Orientation o2 = _tr->orientation(_source, *vert[i], *vert[j2], _target); - if (o2 != NEGATIVE) { - if (_tr->orientation(*vert[i], *vert[j2], *vert[j0], _target) == POSITIVE) { - nnext = std::get<0>(cur)->neighbor(j1); - outside = j1; - if (o2 == ZERO) degenerate = 4; // EDGE i j2 + } // end o0 == 0 + else + { // o0 < 0 + Orientation o2 = _tr->orientation(_source, *vert[i], *vert[j2], _target); + if(o2 != NEGATIVE) { + // o2 >= 0 + Orientation oi20 = _tr->orientation(*vert[i], *vert[j2], *vert[j0], _target); + if(oi20 == POSITIVE) { + case_segment_exits_cur_cell_by(j1); + if(o2 == ZERO) + degenerate = 4; // EDGE i j2 + } else { + case_target_is_inside_cur_cell(5); + if(oi20 == ZERO) { // on FACET j1 (i, j2, j0) + degenerate = 1; } - else - inside = 5; } - else { - if (_tr->orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { - nnext = std::get<0>(cur)->neighbor(j0); - outside = j0; + } else { + Orientation oi12 = _tr->orientation(*vert[i], *vert[j1], *vert[j2], _target); + if(oi12 == POSITIVE) { + case_segment_exits_cur_cell_by(j0); + } else { + case_target_is_inside_cur_cell(6); + if(oi12 == ZERO) { // on FACET j0 (i, j1, j2) + degenerate = 1; } - else - inside = 6; } } - - if ((!degenerate) && (!inside)) - { - Simplex prev_after_walk(std::get<0>(cur), Tr::FACET, outside, -1); - Simplex cur_after_walk( nnext, Tr::FACET, nnext->index(std::get<0>(cur)), -1); - return std::make_pair(prev_after_walk, cur_after_walk); - } - - if ((!degenerate) && inside) - { - Simplex prev_after_walk(std::get<0>(cur), Tr::CELL, -1, -1); - Simplex cur_after_walk(Cell_handle(), Tr::OUTSIDE_AFFINE_HULL, -1, -1); - return std::make_pair(prev_after_walk, cur_after_walk); - } } + if(!degenerate) { + return {prev_after_walk, cur_after_walk}; + } + } - // We check in which direction the target lies - // by comparing its position relative to the planes through the - // source and the edges of the cell. - Orientation o[6]; - Orientation op[4]; - int pos = 0; - // We keep track of which orientations are calculated. - bool calc[6] = { false, false, false, false, false, false }; - - if( std::get<1>(cur) == Tr::VERTEX ) { - // The three planes through the vertex are set to coplanar. - for( int j = 0; j < 4; ++j ) { - if( std::get<2>(cur) != j ) { - int ij = edgeIndex( std::get<2>(cur), j ); - o[ij] = COPLANAR; - calc[ij] = true; - } + // We check in which direction the target lies + // by comparing its position relative to the planes through the + // source and the edges of the cell. + std::array o; + std::array op; + int pos = 0; + // We keep track of which orientations are calculated. + bool calc[6] = {false, false, false, false, false, false}; + + if(cur.lt == Tr::VERTEX) { + // The three planes through the vertex are set to coplanar. + for(int j = 0; j < 4; ++j) { + if(cur.li != j) { + int ij = edgeIndex(cur.li, j); + o[ij] = COPLANAR; + calc[ij] = true; } } - else if( std::get<1>(cur) == Tr::EDGE ) { - // The plane through the edge is set to coplanar. - int ij = edgeIndex( std::get<2>(cur), std::get<3>(cur) ); - o[ij] = COPLANAR; - calc[ij] = true; - } + } else if(cur.lt == Tr::EDGE) { + // The plane through the edge is set to coplanar. + int ij = edgeIndex(cur.li, cur.lj); + o[ij] = COPLANAR; + calc[ij] = true; + } - // For the remembering stochastic walk, we start trying with a random facet. - int li = 0; - CGAL_triangulation_assertion_code( bool incell = true; ) - for( int k = 0; k < 4; ++k, ++li ) - { - // Skip the previous cell. - Cell_handle next = std::get<0>(cur)->neighbor(li); - if( next == std::get<0>(prev) ) - { - op[li] = POSITIVE; - pos += li; - continue; - } - const Point* backup = vert[li]; - vert[li] = &_target; - - // Check if the target is on the opposite side of the supporting plane. - op[li] = _tr->orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); - if( op[li] == POSITIVE ) - pos += li; - if( op[li] != NEGATIVE ) { - vert[li] = backup; - continue; - } - CGAL_triangulation_assertion_code( incell = false; ) - - // Check if the target is inside the 3-wedge with - // the source as apex and the facet as an intersection. - int lj = 0; - int Or = 0; - for( int l = 0; l < 4; ++l, ++lj ) { - if( li == lj ) - continue; - - // We check the orientation of the target compared to the plane - // Through the source and the edge opposite of ij. - int oij = 5 - edgeIndex( li, lj ); - if( !calc[oij] ) { - const Point* backup2 = vert[lj]; - vert[lj] = &_source; - o[oij] = _tr->orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); - vert[lj] = backup2; - calc[oij] = true; - } + // For the remembering stochastic walk, we start trying with a random facet. + CGAL_assertion_code(bool incell = true;) - if( o[oij] == POSITIVE ) { - // The target is not inside the pyramid. - // Invert the planes. - // This can be safely done because either - // they were not calculated yet, - // or they will no longer be used. - for( int j = 0; j < 4; ++j ) { - if( li == j ) continue; - int oij = 5 - edgeIndex( li, j ); - o[oij] = -o[oij]; - } - Or = 0; - break; - } - else - Or -= o[oij]; - } - - if( Or == 0 ) { - // Either the target is not inside the pyramid, - // or the pyramid is degenerate. - vert[li] = backup; + for(int li = 0; li < 4; ++li) + { + // Skip the previous cell. + Cell_handle next = cur_cell->neighbor(li); + if(next == prev.cell) { + op[li] = POSITIVE; + pos += li; + continue; + } + const Point* const backup_vert_li = std::exchange(vert[li], &_target); + + // Check if the target is on the opposite side of the supporting plane. + op[li] = _tr->orientation(*vert[0], *vert[1], *vert[2], *vert[3]); + if(op[li] == POSITIVE) + pos += li; + if(op[li] != NEGATIVE) { + vert[li] = backup_vert_li; + continue; + } + CGAL_assertion_code(incell = false;) + + // Check if the target is inside the 3-wedge with + // the source as apex and the facet as an intersection. + int Or = 0; + for(int lj = 0; lj < 4; ++lj) { + if(li == lj) + continue; + // We check the orientation of the target compared to the plane + // Through the source and the edge opposite of ij. + const int oij = 5 - edgeIndex(li, lj); + if(!calc[oij]) { + const Point* const backup_vert_lj = std::exchange(vert[lj], &_source); + o[oij] = _tr->orientation(*vert[0], *vert[1], *vert[2], *vert[3]); + vert[lj] = backup_vert_lj; + calc[oij] = true; + } + if(o[oij] == POSITIVE) { + // The target is not inside the pyramid. + // Invert the planes. + for(int j = 0; j < 4; ++j) { + if(li == j) continue; + int oij = 5 - edgeIndex(li, j); + if(calc[oij]) + o[oij] = -o[oij]; } + Or = 0; + break; + } else + Or -= o[oij]; + } - // The target is inside the pyramid. - - Simplex prev_after_walk; - Simplex cur_after_walk; - - std::get<0>(prev_after_walk) = std::get<0>(cur); - std::get<0>(cur_after_walk) = next; - switch( Or ) { - case 3: - std::get<1>(prev_after_walk) = Tr::FACET; - std::get<2>(prev_after_walk) = li; - std::get<1>(cur_after_walk) = Tr::FACET; - std::get<2>(cur_after_walk) = std::get<0>(cur_after_walk)->index(std::get<0>(prev_after_walk)); - - if(regular_case) - { - CGAL_triangulation_assertion( std::get<0>(cur_after_walk)==nnext ); - CGAL_triangulation_assertion( li==outside ); - CGAL_triangulation_assertion( ! inside ); - } - return std::make_pair(prev_after_walk, cur_after_walk); + if(Or == 0) { + // Either the target is not inside the pyramid, + // or the pyramid is degenerate. + vert[li] = backup_vert_li; + continue; + } - case 2: - if(regular_case) - CGAL_triangulation_assertion(degenerate ); - - std::get<1>(prev_after_walk) = Tr::EDGE; - std::get<1>(cur_after_walk) = Tr::EDGE; - for( int j = 0; j < 4; ++j ) { - if( li != j && o[ 5 - edgeIndex(li, j) ] == COPLANAR) { - Edge opp = opposite_edge( std::get<0>(prev), li, j ); - std::get<2>(prev_after_walk) = opp.second; - std::get<3>(prev_after_walk) = opp.third; - std::get<2>(cur_after_walk) - = std::get<0>(cur_after_walk)->index( - std::get<0>(prev_after_walk)->vertex( std::get<2>(prev_after_walk) ) ); - std::get<3>(cur_after_walk) - = std::get<0>(cur_after_walk)->index( - std::get<0>(prev_after_walk)->vertex( std::get<3>(prev_after_walk) ) ); - - return std::make_pair(prev_after_walk, cur_after_walk); - } - } - CGAL_triangulation_assertion( false ); - return std::make_pair(prev, cur); - case 1: - if(regular_case) - CGAL_triangulation_assertion(degenerate ); - - std::get<1>(prev_after_walk) = Tr::VERTEX; - std::get<1>(cur_after_walk) = Tr::VERTEX; - for( int j = 0; j < 4; ++j ) { - if( li != j && o[ 5 - edgeIndex(li, j) ] == NEGATIVE ) { - std::get<2>(prev_after_walk) = j; - std::get<2>(cur_after_walk) - = std::get<0>(cur_after_walk)->index( - std::get<0>(prev_after_walk)->vertex(j) ); - - return std::make_pair(prev_after_walk, cur_after_walk); - } - } - CGAL_triangulation_assertion( false ); - return std::make_pair(prev, cur); - default: - CGAL_triangulation_assertion( false ); - return std::make_pair(prev, cur); + // The target is inside the pyramid. + switch(Or) { + case 3: { + if(regular_case) { + CGAL_assertion(li == outside); + CGAL_assertion(!inside); + } + return {{cur_cell, Tr::FACET, li}, {next, Tr::FACET, next->index(cur_cell)}}; + } + case 2: { + if(regular_case) + CGAL_assertion(degenerate); + for(int j = 0; j < 4; ++j) { + if(li != j && o[5 - edgeIndex(li, j)] == COPLANAR) { + Edge opp = opposite_edge(prev.cell, li, j); + return { + {cur_cell, Tr::EDGE, opp.second, opp.third}, + {next, Tr::EDGE, next->index(cur_cell->vertex(opp.second)), next->index(cur_cell->vertex(opp.third))}}; } + } + CGAL_unreachable(); + return std::make_pair(prev, cur); } - - // The target lies inside this cell. - Simplex prev_after_walk; - CGAL_triangulation_assertion( incell ); - switch( op[0] + op[1] + op[2] + op[3] ) { - case 4: - CGAL_triangulation_assertion( pos == 6 ); - prev_after_walk = Simplex( std::get<0>(cur), Tr::CELL, -1, -1 ); - CGAL_triangulation_assertion( (! regular_case) || inside ); - break; - - case 3: - prev_after_walk = Simplex( std::get<0>(cur), Tr::FACET, 6-pos, -1 ); - break; - case 2: - if( pos < 3 ) - prev_after_walk = Simplex( std::get<0>(cur), Tr::EDGE, 0, pos+1 ); - else if( pos < 5 ) - prev_after_walk = Simplex( std::get<0>(cur), Tr::EDGE, 1, pos-1 ); - else - prev_after_walk = Simplex( std::get<0>(cur), Tr::EDGE, 2, 3 ); - break; case 1: - prev_after_walk = Simplex( std::get<0>(cur), Tr::VERTEX, pos, -1 ); - break; + if(regular_case) + CGAL_assertion(degenerate); + for(int j = 0; j < 4; ++j) { + if(li != j && o[5 - edgeIndex(li, j)] == NEGATIVE) { + return {{cur_cell, Tr::VERTEX, j}, {next, Tr::VERTEX, next->index(cur_cell->vertex(j))}}; + } + } + CGAL_unreachable(); + return std::make_pair(prev, cur); default: - prev_after_walk = Simplex( std::get<0>(cur), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); - CGAL_triangulation_assertion( false ); + CGAL_unreachable(); + return std::make_pair(prev, cur); } + CGAL_unreachable(); + } - Simplex cur_after_walk(Cell_handle(), Tr::OUTSIDE_AFFINE_HULL, -1, -1); - return std::make_pair(prev_after_walk, cur_after_walk); + // The target lies inside this cell. + CGAL_assertion( incell ); + return { + [&]() -> Simplex { + switch( op[0] + op[1] + op[2] + op[3] ) { + case 4: + CGAL_assertion( pos == 6 ); + CGAL_assertion( (! regular_case) || inside ); + return { cur_cell, Tr::CELL }; + break; + case 3: + return { cur_cell, Tr::FACET, 6 - pos }; + break; + case 2: + if( pos < 3 ) // first is 0 + return { cur_cell, Tr::EDGE, 0, pos }; + else if( pos < 5 ) { // could be (0, pos), or (1, pos-1) + if(op[0] == POSITIVE) + return { cur_cell, Tr::EDGE, 0, pos }; + else + return { cur_cell, Tr::EDGE, 1, pos-1 }; + } + else + return { cur_cell, Tr::EDGE, 2, 3 }; + break; + case 1: + return { cur_cell, Tr::VERTEX, pos }; + break; + default: + CGAL_unreachable(); + } + }(), + { Cell_handle() } + }; } template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next_3_inf( int inf ) { - CGAL_triangulation_precondition( _tr->is_infinite( cell()->vertex(inf) ) ); + CGAL_precondition( _tr->is_infinite( cell()->vertex(inf) ) ); // If this cell was reached by traversal from a finite one, it must be the final cell. Cell_handle fin = cell()->neighbor(inf); if( fin == prev_cell() ) { _prev = _cur; + prev_lt() = Tr::CELL; cell() = Cell_handle(); + lt() = Tr::CELL; return; } @@ -658,13 +657,13 @@ walk_to_next_3_inf( int inf ) if( _tr->orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ) { // The target lies in an infinite cell. // Note that we do not traverse to other infinite cells. - _prev = Simplex( cell(), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); + _prev = Simplex{ cell(), Tr::OUTSIDE_CONVEX_HULL, -1, -1 }; cell() = Cell_handle(); return; } vert[inf] = &(_source); - CGAL_triangulation_assertion( _tr->orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ); + CGAL_assertion( _tr->orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ); int li = 0; // Check if the line enters an adjacent infinite cell. @@ -683,20 +682,20 @@ walk_to_next_3_inf( int inf ) continue; } - Point* backup = vert[li]; + Point* backup_vert_li = vert[li]; vert[li] = &(_target); o[li] = _tr->orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); if( o[li] != NEGATIVE ) { - vert[li] = backup; + vert[li] = backup_vert_li; continue; } // The target lies behind the plane through the source and two finite vertices. // Traverse to the incident infinite cell. - CGAL_triangulation_assertion( _tr->is_infinite( next ) ); - _prev = Simplex( cell(), Tr::FACET, li, -1 ); - _cur = Simplex( next, Tr::FACET, next->index( prev_cell() ), -1 ); + CGAL_assertion( _tr->is_infinite( next ) ); + _prev = Simplex{ cell(), Tr::FACET, li, -1 }; + _cur = Simplex{ next, Tr::FACET, next->index(prev_cell()), -1 }; return; } @@ -725,7 +724,7 @@ walk_to_next_3_inf( int inf ) return; } } - CGAL_triangulation_assertion( false ); + CGAL_unreachable(); return; case 1: prev_lt() = Tr::VERTEX; @@ -737,10 +736,10 @@ walk_to_next_3_inf( int inf ) return; } } - CGAL_triangulation_assertion( false ); + CGAL_unreachable(); return; default: - CGAL_triangulation_assertion( false ); + CGAL_unreachable(); return; } } @@ -802,7 +801,7 @@ walk_to_next_2() return; default: // The current vertex is the target. - CGAL_triangulation_assertion(false); + CGAL_unreachable(); return; } } @@ -810,27 +809,26 @@ walk_to_next_2() // The target lies in this cell. switch( ocw+occw+op ) { case 3: - _prev = Simplex( cell(), Tr::FACET, 3, -1 ); - break; + _prev = Simplex{ cell(), Tr::FACET, 3, -1 }; + break; case 2: if( ocw == 0 ) - _prev = Simplex( cell(), Tr::EDGE, _tr->ccw(li()), -1 ); + _prev = Simplex{ cell(), Tr::EDGE, _tr->ccw(li()), -1 }; else if( occw == 0 ) - _prev = Simplex( cell(), Tr::EDGE, _tr->cw(li()), -1 ); + _prev = Simplex{ cell(), Tr::EDGE, _tr->cw(li()), -1 }; else - _prev = Simplex( cell(), Tr::EDGE, li(), -1 ); + _prev = Simplex{ cell(), Tr::EDGE, li(), -1 }; break; case 1: if( ocw == 1 ) - _prev = Simplex( cell(), Tr::VERTEX, _tr->ccw(li()), -1 ); + _prev = Simplex{ cell(), Tr::VERTEX, _tr->ccw(li()), -1 }; else if( occw == 1 ) - _prev = Simplex( cell(), Tr::VERTEX, _tr->cw(li()), -1 ); + _prev = Simplex{ cell(), Tr::VERTEX, _tr->cw(li()), -1 }; else - _prev = Simplex( cell(), Tr::VERTEX, li(), -1 ); + _prev = Simplex{ cell(), Tr::VERTEX, li(), -1 }; break; case 0: - CGAL_triangulation_assertion(false); - _prev = Simplex( cell(), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); + CGAL_unreachable(); break; } cell() = Cell_handle(); @@ -927,19 +925,19 @@ walk_to_next_2() // The target lies in this cell. if( op == POSITIVE ) - _prev = Simplex( cell(), Tr::FACET, 3, -1 ); + _prev = Simplex{ cell(), Tr::FACET, 3, -1 }; else { - CGAL_triangulation_assertion( op == ZERO ); + CGAL_assertion( op == ZERO ); switch( o ) { case POSITIVE: - _prev = Simplex( cell(), Tr::EDGE, li(), lk ); - break; + _prev = Simplex{ cell(), Tr::EDGE, li(), lk }; + break; case NEGATIVE: - _prev = Simplex( cell(), Tr::EDGE, lj(), lk ); - break; + _prev = Simplex{ cell(), Tr::EDGE, lj(), lk }; + break; case ZERO: - _prev = Simplex( cell(), Tr::VERTEX, lk, -1 ); - break; + _prev = Simplex{ cell(), Tr::VERTEX, lk, -1 }; + break; } } cell() = Cell_handle(); @@ -969,7 +967,7 @@ walk_to_next_2() if( o[_tr->ccw(li)] == NEGATIVE ) continue; else if( op == COLLINEAR && o[_tr->ccw(li)] == COLLINEAR ) { - _prev = Simplex( cell(), Tr::VERTEX, _tr->ccw(li), -1 ); + _prev = Simplex{ cell(), Tr::VERTEX, _tr->ccw(li), -1 }; cell() = Cell_handle(); return; } @@ -981,7 +979,7 @@ walk_to_next_2() if( o[_tr->cw(li)] == POSITIVE ) continue; else if( op == COLLINEAR && o[_tr->cw(li)] == COLLINEAR ) { - _prev = Simplex( cell(), Tr::VERTEX, _tr->cw(li), -1 ); + _prev = Simplex{ cell(), Tr::VERTEX, _tr->cw(li), -1 }; cell() = Cell_handle(); return; } @@ -1006,18 +1004,18 @@ walk_to_next_2() this->li() = cell()->index( prev_cell()->vertex( prev_li() ) ); return; default: - CGAL_triangulation_assertion( false ); + CGAL_unreachable(); return; } } // The target lies in this cell. - _prev = Simplex( cell(), Tr::FACET, 3, -1 ); + _prev = Simplex{ cell(), Tr::FACET, 3, -1 }; cell() = Cell_handle(); return; } default: - CGAL_triangulation_assertion( false ); + CGAL_unreachable(); } } @@ -1025,8 +1023,8 @@ template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next_2_inf( int inf ) { - CGAL_triangulation_precondition( _tr->is_infinite( cell()->vertex(3) ) ); - CGAL_triangulation_precondition( _tr->is_infinite( cell()->vertex(inf) ) ); + CGAL_precondition( _tr->is_infinite( cell()->vertex(3) ) ); + CGAL_precondition( _tr->is_infinite( cell()->vertex(inf) ) ); // If this cell was reached by traversal from a finite one, it must be the final cell. Cell_handle fin = cell()->neighbor(inf); @@ -1046,8 +1044,8 @@ walk_to_next_2_inf( int inf ) _target ); if( occw == NEGATIVE ) { Cell_handle tmp = cell()->neighbor(_tr->cw(inf)); - _prev = Simplex( cell(), Tr::EDGE, _tr->ccw(inf), inf ); - _cur = Simplex( tmp, Tr::EDGE, tmp->index( prev_cell()->vertex( prev_li() ) ), tmp->index( prev_cell()->vertex( prev_lj() ) ) ); + _prev = Simplex{ cell(), Tr::EDGE, _tr->ccw(inf), inf }; + _cur = Simplex{ tmp, Tr::EDGE, tmp->index(prev_cell()->vertex(prev_li())), tmp->index(prev_cell()->vertex(prev_lj())) }; return; } Orientation ocw = coplanar_orientation( _source, @@ -1056,8 +1054,8 @@ walk_to_next_2_inf( int inf ) _target ); if( ocw == NEGATIVE ) { Cell_handle tmp = cell()->neighbor(_tr->ccw(inf)); - _prev = Simplex( cell(), Tr::EDGE, _tr->cw(inf), inf ); - _cur = Simplex( tmp, Tr::EDGE, tmp->index( prev_cell()->vertex( prev_li() ) ), tmp->index( prev_cell()->vertex( prev_lj() ) ) ); + _prev = Simplex{ cell(), Tr::EDGE, _tr->cw(inf), inf }; + _cur = Simplex{ tmp, Tr::EDGE, tmp->index(prev_cell()->vertex(prev_li())), tmp->index(prev_cell()->vertex(prev_lj())) }; return; } Orientation op = coplanar_orientation( @@ -1067,37 +1065,37 @@ walk_to_next_2_inf( int inf ) switch( op ) { case NEGATIVE: if( occw == COLLINEAR ) { - _prev = Simplex( cell(), Tr::VERTEX, _tr->ccw(inf), -1 ); - _cur = Simplex( fin, Tr::VERTEX, fin->index( prev_cell()->vertex( prev_li() ) ), -1 ); - return; + _prev = Simplex{ cell(), Tr::VERTEX, _tr->ccw(inf), -1 }; + _cur = Simplex{ fin, Tr::VERTEX, fin->index(prev_cell()->vertex(prev_li())), -1 }; + return; } if( ocw == COLLINEAR ) { - _prev = Simplex( cell(), Tr::VERTEX, _tr->cw(inf), -1 ); - _cur = Simplex( fin, Tr::VERTEX, fin->index( prev_cell()->vertex( prev_li() ) ), -1 ); - return; + _prev = Simplex{ cell(), Tr::VERTEX, _tr->cw(inf), -1 }; + _cur = Simplex{ fin, Tr::VERTEX, fin->index(prev_cell()->vertex(prev_li())), -1 }; + return; } - _prev = Simplex( cell(), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); - _cur = Simplex( fin, Tr::EDGE, fin->index( prev_cell()->vertex( prev_li() ) ), fin->index( prev_cell()->vertex( prev_lj() ) ) ); + _prev = Simplex{ cell(), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) }; + _cur = Simplex{ fin, Tr::EDGE, fin->index(prev_cell()->vertex(prev_li())), fin->index(prev_cell()->vertex(prev_lj())) }; return; case COLLINEAR: if( occw == COLLINEAR ) { - _prev = Simplex( cell(), Tr::VERTEX, _tr->ccw(inf), -1 ); - cell() = Cell_handle(); - return; + _prev = Simplex{ cell(), Tr::VERTEX, _tr->ccw(inf), -1 }; + cell() = Cell_handle(); + return; } if( ocw == COLLINEAR ) { - _prev = Simplex( cell(), Tr::VERTEX, _tr->cw(inf), -1 ); - cell() = Cell_handle(); - return; + _prev = Simplex{ cell(), Tr::VERTEX, _tr->cw(inf), -1 }; + cell() = Cell_handle(); + return; } - _prev = Simplex( cell(), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); + _prev = Simplex{ cell(), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) }; cell() = Cell_handle(); return; case POSITIVE: // The tarstd::std::get lies in this infinite cell. - _prev = Simplex( cell(), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); - cell() = Cell_handle(); - return; + _prev = Simplex{ cell(), Tr::OUTSIDE_CONVEX_HULL, -1, -1 }; + cell() = Cell_handle(); + return; } } @@ -1126,9 +1124,9 @@ typename Triangulation_segment_cell_iterator_3::Edge Triangulation_segment_cell_iterator_3::opposite_edge( Cell_handle c, int li, int lj) const { - CGAL_triangulation_precondition(li >= 0 && li < 4); - CGAL_triangulation_precondition(lj >= 0 && lj < 4); - CGAL_triangulation_precondition(li != lj); + CGAL_precondition(li >= 0 && li < 4); + CGAL_precondition(lj >= 0 && lj < 4); + CGAL_precondition(li != lj); switch (6 - li - lj) { // i + j + missing indices = 6. case 1: return Edge(c, 0, 1); @@ -1138,7 +1136,7 @@ Triangulation_segment_cell_iterator_3::opposite_edge( case 5: return Edge(c, 2, 3); } - CGAL_triangulation_assertion(false); + CGAL_unreachable(); return Edge(); } diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_3_to_lcc.h b/thirdparty/CGAL/include/CGAL/Triangulation_3_to_lcc.h index d2688a73..ecd7232a 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_3_to_lcc.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_3_to_lcc.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Triangulation_3_to_lcc.h $ -// $Id: Triangulation_3_to_lcc.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Triangulation_3_to_lcc.h $ +// $Id: include/CGAL/Triangulation_3_to_lcc.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand // @@ -13,6 +13,9 @@ #ifndef CGAL_TRIANGULATION_3_TO_LCC_H #define CGAL_TRIANGULATION_3_TO_LCC_H +#include + + #include #include #include @@ -44,29 +47,29 @@ namespace CGAL { * @return A dart incident to the infinite vertex. */ template < class LCC, class Triangulation > - typename LCC::Dart_handle import_from_triangulation_3 + typename LCC::Dart_descriptor import_from_triangulation_3 (LCC& alcc, const Triangulation &atr, std::map* avol_to_dart=nullptr) + typename LCC::Dart_descriptor >* avol_to_dart=nullptr) { - CGAL_static_assertion( LCC::dimension>=3 && LCC::ambient_dimension==3 ); + static_assert( LCC::dimension>=3 && LCC::ambient_dimension==3 ); // Case of empty triangulations. - if (atr.number_of_vertices() == 0) return LCC::null_handle; + if (atr.number_of_vertices() == 0) return LCC::null_descriptor; // Check the dimension. - if (atr.dimension() != 3) return LCC::null_handle; + if (atr.dimension() != 3) return LCC::null_descriptor; CGAL_assertion(atr.is_valid()); typedef typename Triangulation::Vertex_handle TVertex_handle; typedef typename Triangulation::Vertex_iterator TVertex_iterator; typedef typename Triangulation::Cell_iterator TCell_iterator; typedef typename std::map - < TCell_iterator, typename LCC::Dart_handle >::iterator itmap_tcell; + < TCell_iterator, typename LCC::Dart_descriptor >::iterator itmap_tcell; // Create vertices in the map and associate in a map // TVertex_handle and vertices in the map. - std::map< TVertex_handle, typename LCC::Vertex_attribute_handle > TV; + std::map< TVertex_handle, typename LCC::Vertex_attribute_descriptor > TV; for (TVertex_iterator itv = atr.vertices_begin(); itv != atr.vertices_end(); ++itv) { @@ -77,14 +80,14 @@ namespace CGAL { // and tetrahedron. TCell_iterator it; - std::map TC; - std::map* + std::map TC; + std::map* mytc = (avol_to_dart==nullptr?&TC:avol_to_dart); itmap_tcell maptcell_it; - typename LCC::Dart_handle res=LCC::null_handle, dart=LCC::null_handle; - typename LCC::Dart_handle cur=LCC::null_handle, neighbor=LCC::null_handle; + typename LCC::Dart_descriptor res=LCC::null_descriptor, dart=LCC::null_descriptor; + typename LCC::Dart_descriptor cur=LCC::null_descriptor, neighbor=LCC::null_descriptor; for (it = atr.cells_begin(); it != atr.cells_end(); ++it) { @@ -99,7 +102,7 @@ namespace CGAL { TV[it->vertex(2)], TV[it->vertex(3)]); - if ( dart==LCC::null_handle ) + if ( dart==LCC::null_descriptor ) { if ( it->vertex(0) == atr.infinite_vertex() ) dart = res; @@ -142,7 +145,7 @@ namespace CGAL { (*mytc)[it] = res; } } - CGAL_assertion(dart!=LCC::null_handle); + CGAL_assertion(dart!=LCC::null_descriptor); return dart; } diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_cell_base_3.h index 48431212..c50380fe 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_cell_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_cell_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Triangulation_cell_base_3.h $ -// $Id: Triangulation_cell_base_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Triangulation_cell_base_3.h $ +// $Id: include/CGAL/Triangulation_cell_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -19,7 +19,6 @@ #include -#include #include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_cell_base_with_info_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_cell_base_with_info_3.h index 335a3415..21a1ea83 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_cell_base_with_info_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_cell_base_with_info_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Triangulation_cell_base_with_info_3.h $ -// $Id: Triangulation_cell_base_with_info_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Triangulation_cell_base_with_info_3.h $ +// $Id: include/CGAL/Triangulation_cell_base_with_info_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_conformer_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_conformer_2.h index 68e692f0..6ea931c1 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_conformer_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_conformer_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/Triangulation_conformer_2.h $ -// $Id: Triangulation_conformer_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/Triangulation_conformer_2.h $ +// $Id: include/CGAL/Triangulation_conformer_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -38,13 +38,13 @@ class Triangulation_conformer_2 /** \name INITIALIZED */ enum Initialization { - NONE, /**< \c this is not initialized. */ - CLUSTERS, /**< \c this clusters are initialized. */ - DELAUNAY, /**< \c this has been \e Delaunay-initialized. */ - GABRIEL /**< \c this has been \e Gabriel-initialized. */ + NONE, /**< `this` is not initialized. */ + CLUSTERS, /**< `this` clusters are initialized. */ + DELAUNAY, /**< `this` has been \e Delaunay-initialized. */ + GABRIEL /**< `this` has been \e Gabriel-initialized. */ }; -// --- PROTECTED DATAS --- +// --- PROTECTED DATA --- Initialization initialized; Tr& tr; Null_mesher_level null_level; diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_data_structure.h b/thirdparty/CGAL/include/CGAL/Triangulation_data_structure.h index 7ea0173c..8b7a6f02 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_data_structure.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_data_structure.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/Triangulation_data_structure.h $ -// $Id: Triangulation_data_structure.h 29d543c 2022-10-04T09:16:32+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/Triangulation_data_structure.h $ +// $Id: include/CGAL/Triangulation_data_structure.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_data_structure_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_data_structure_2.h index 50fc62b9..a97a56df 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_data_structure_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_data_structure_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_2/include/CGAL/Triangulation_data_structure_2.h $ -// $Id: Triangulation_data_structure_2.h cc54df3 2022-04-26T08:15:51+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_2/include/CGAL/Triangulation_data_structure_2.h $ +// $Id: include/CGAL/Triangulation_data_structure_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include @@ -240,8 +240,8 @@ class Triangulation_data_structure_2 Vertex_handle mirror_vertex(Face_handle f, int i) const { - CGAL_triangulation_precondition ( f->neighbor(i) != Face_handle() - && f->dimension() >= 1); + CGAL_precondition ( f->neighbor(i) != Face_handle() + && f->dimension() >= 1); return f->neighbor(i)->vertex(mirror_index(f,i)); } @@ -249,8 +249,8 @@ class Triangulation_data_structure_2 mirror_index(Face_handle f, int i) const { // return the index of opposite vertex in neighbor(i); - CGAL_triangulation_precondition (f->neighbor(i) != Face_handle() && - f->dimension() >= 1); + CGAL_precondition (f->neighbor(i) != Face_handle() && + f->dimension() >= 1); if (f->dimension() == 1) { CGAL_assertion(i<=1); const int j = f->neighbor(i)->index(f->vertex((i==0) ? 1 : 0)); @@ -263,8 +263,8 @@ class Triangulation_data_structure_2 Edge mirror_edge(const Edge e) const { - CGAL_triangulation_precondition(e.first->neighbor(e.second) != Face_handle() - && e.first->dimension() >= 1); + CGAL_precondition(e.first->neighbor(e.second) != Face_handle() + && e.first->dimension() >= 1); return Edge(e.first->neighbor(e.second), mirror_index(e.first, e.second)); } @@ -461,7 +461,7 @@ class Triangulation_data_structure_2 void insert_in_hole(Vertex_handle v, FaceIt face_begin, FaceIt face_end) { - CGAL_triangulation_precondition(dimension() == 2); + CGAL_precondition(dimension() == 2); std::vector new_faces; std::vector bdry_edges; @@ -604,7 +604,7 @@ class Triangulation_data_structure_2 // the triangulation is assumed to have dim=2 // hole is supposed to be ccw oriented { - CGAL_triangulation_precondition(dimension() == 2); + CGAL_precondition(dimension() == 2); EdgeIt eit = edge_begin; FaceIt fit = face_begin; @@ -742,7 +742,7 @@ void Triangulation_data_structure_2:: swap(Tds &tds) { - CGAL_triangulation_expensive_precondition(tds.is_valid() && is_valid()); + CGAL_expensive_precondition(tds.is_valid() && is_valid()); std::swap(_dimension, tds._dimension); faces().swap(tds.faces()); vertices().swap(tds.vertices()); @@ -895,7 +895,7 @@ void Triangulation_data_structure_2:: flip(Face_handle f, int i) { - CGAL_triangulation_precondition( dimension()==2); + CGAL_precondition( dimension()==2); Face_handle n = f->neighbor(i); int ni = mirror_index(f,i); //ni = n->index(f); @@ -930,8 +930,8 @@ typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: insert_first( ) { - CGAL_triangulation_precondition( number_of_vertices() == 0 && - dimension()==-2 ); + CGAL_precondition( number_of_vertices() == 0 && + dimension()==-2 ); return insert_dim_up(); } @@ -940,8 +940,8 @@ typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: insert_second() { - CGAL_triangulation_precondition( number_of_vertices() == 1 && - dimension()==-1 ); + CGAL_precondition( number_of_vertices() == 1 && + dimension()==-1 ); return insert_dim_up(); } @@ -953,7 +953,7 @@ Triangulation_data_structure_2:: insert_in_face(Face_handle f) // New vertex will replace f->vertex(0) in face f { - CGAL_triangulation_precondition( f != Face_handle() && dimension()== 2); + CGAL_precondition( f != Face_handle() && dimension()== 2); Vertex_handle v = create_vertex(); Vertex_handle v0 = f->vertex(0); @@ -992,11 +992,11 @@ Triangulation_data_structure_2:: insert_in_edge(Face_handle f, int i) //insert in the edge opposite to vertex i of face f { - CGAL_triangulation_precondition(f != Face_handle() && dimension() >= 1); - if (dimension() == 1) {CGAL_triangulation_precondition(i == 2);} - if (dimension() == 2) {CGAL_triangulation_precondition(i == 0 || - i == 1 || - i == 2);} + CGAL_precondition(f != Face_handle() && dimension() >= 1); + if (dimension() == 1) {CGAL_precondition(i == 2);} + if (dimension() == 2) {CGAL_precondition(i == 0 || + i == 1 || + i == 2);} Vertex_handle v; if (dimension() == 1) { v = create_vertex(); @@ -1084,7 +1084,7 @@ insert_dim_up(Vertex_handle w, bool orient) } } - // couldn't unify the code for reorientation mater + // couldn't unify the code for reorientation matter lfit = faces_list.begin() ; if (dim == 1){ if (orient) { @@ -1118,7 +1118,7 @@ insert_dim_up(Vertex_handle w, bool orient) } break; default: - CGAL_triangulation_assertion(false); + CGAL_assertion(false); break; } return v; } @@ -1130,11 +1130,11 @@ Triangulation_data_structure_2:: remove_degree_3(Vertex_handle v, Face_handle f) // remove a vertex of degree 3 { - CGAL_triangulation_precondition(v != Vertex_handle()); - CGAL_triangulation_precondition(degree(v) == 3); + CGAL_precondition(v != Vertex_handle()); + CGAL_precondition(degree(v) == 3); if (f == Face_handle()) {f= v->face();} - else { CGAL_triangulation_assertion( f->has_vertex(v));} + else { CGAL_assertion( f->has_vertex(v));} int i = f->index(v); Face_handle left = f->neighbor(cw(i)); @@ -1144,7 +1144,7 @@ remove_degree_3(Vertex_handle v, Face_handle f) Face_handle ll, rr; Vertex_handle q = left->vertex(li); - CGAL_triangulation_assertion( left->vertex(li) == right->vertex(ri)); + CGAL_assertion( left->vertex(li) == right->vertex(ri)); ll = left->neighbor(cw(li)); if(ll != Face_handle()) { @@ -1177,11 +1177,11 @@ void Triangulation_data_structure_2:: dim_down(Face_handle f, int i) { - CGAL_triangulation_expensive_precondition( is_valid() ); - CGAL_triangulation_precondition( dimension() == 2 ); - CGAL_triangulation_precondition( number_of_vertices() > 3 ); - CGAL_triangulation_precondition( degree( f->vertex(i) ) == - number_of_vertices()-1 ); + CGAL_expensive_precondition( is_valid() ); + CGAL_precondition( dimension() == 2 ); + CGAL_precondition( number_of_vertices() > 3 ); + CGAL_precondition( degree( f->vertex(i) ) == + number_of_vertices()-1 ); Vertex_handle v = f->vertex(i); std::list to_delete; @@ -1236,7 +1236,7 @@ remove_dim_down(Vertex_handle v) break; case 1: case 2: -// CGAL_triangulation_precondition ( +// CGAL_precondition ( // (dimension() == 1 && number_of_vertices() == 3) || // (dimension() == 2 && number_of_vertices() > 3) ); // the faces incident to v are down graded one dimension @@ -1282,12 +1282,12 @@ void Triangulation_data_structure_2:: remove_1D(Vertex_handle v) { - CGAL_triangulation_precondition( dimension() == 1 && - number_of_vertices() > 3); + CGAL_precondition( dimension() == 1 && + number_of_vertices() > 3); Face_handle f = v->face(); int i = f->index(v); if (i==0) {f = f->neighbor(1);} - CGAL_triangulation_assertion( f->index(v) == 1); + CGAL_assertion( f->index(v) == 1); Face_handle g= f->neighbor(0); f->set_vertex(1, g->vertex(1)); set_adjacency(f, 0, g->neighbor(0), 1); @@ -1304,8 +1304,8 @@ inline void Triangulation_data_structure_2:: remove_second(Vertex_handle v) { - CGAL_triangulation_precondition(number_of_vertices()== 2 && - dimension() == 0); + CGAL_precondition(number_of_vertices()== 2 && + dimension() == 0); remove_dim_down(v); return; } @@ -1316,8 +1316,8 @@ inline void Triangulation_data_structure_2:: remove_first(Vertex_handle v) { - CGAL_triangulation_precondition(number_of_vertices()== 1 && - dimension() == -1); + CGAL_precondition(number_of_vertices()== 1 && + dimension() == -1); remove_dim_down(v); return; } @@ -1353,7 +1353,7 @@ make_hole(Vertex_handle v, List_edges& hole) // delete the faces incident to v and v // and return the dscription of the hole in hole { - CGAL_triangulation_precondition(dimension() == 2); + CGAL_precondition(dimension() == 2); std::list to_delete; Face_handle f, fn; @@ -1506,9 +1506,9 @@ inline void Triangulation_data_structure_2:: set_adjacency(Face_handle f0, int i0, Face_handle f1, int i1) const { - CGAL_triangulation_assertion(i0 >= 0 && i0 <= dimension()); - CGAL_triangulation_assertion(i1 >= 0 && i1 <= dimension()); - CGAL_triangulation_assertion(f0 != f1); + CGAL_assertion(i0 >= 0 && i0 <= dimension()); + CGAL_assertion(i1 >= 0 && i1 <= dimension()); + CGAL_assertion(f0 != f1); f0->set_neighbor(i0,f1); f1->set_neighbor(i1,f0); } @@ -1518,10 +1518,10 @@ inline void Triangulation_data_structure_2:: delete_face(Face_handle f) { - CGAL_triangulation_expensive_precondition( dimension() != 2 || is_face(f)); - CGAL_triangulation_expensive_precondition( dimension() != 1 || is_edge(f,2)); - CGAL_triangulation_expensive_precondition( dimension() != 0 || - is_vertex(f->vertex(0)) ); + CGAL_expensive_precondition( dimension() != 2 || is_face(f)); + CGAL_expensive_precondition( dimension() != 1 || is_edge(f,2)); + CGAL_expensive_precondition( dimension() != 0 || + is_vertex(f->vertex(0)) ); faces().erase(f); } @@ -1530,7 +1530,7 @@ inline void Triangulation_data_structure_2:: delete_vertex(Vertex_handle v) { - CGAL_triangulation_expensive_precondition( is_vertex(v) ); + CGAL_expensive_precondition( is_vertex(v) ); vertices().erase(v); } @@ -1542,7 +1542,7 @@ Triangulation_data_structure_2:: split_vertex(Vertex_handle v, Face_handle f1, Face_handle g1) { /* - // The following method preforms a split operation of the vertex v + // The following method performs a split operation of the vertex v // using the faces f1 and g1. The split operation is shown // below. // The names of the variables in the method correspond to the @@ -1586,11 +1586,11 @@ split_vertex(Vertex_handle v, Face_handle f1, Face_handle g1) // */ - CGAL_triangulation_expensive_precondition( is_valid() ); + CGAL_expensive_precondition( is_valid() ); - CGAL_triangulation_precondition( dimension() == 2 ); - CGAL_triangulation_precondition( f1 != Face_handle() && f1->has_vertex(v) ); - CGAL_triangulation_precondition( g1 != Face_handle() && g1->has_vertex(v) ); + CGAL_precondition( dimension() == 2 ); + CGAL_precondition( f1 != Face_handle() && f1->has_vertex(v) ); + CGAL_precondition( g1 != Face_handle() && g1->has_vertex(v) ); // 1. first we read some information that we will need int i1 = f1->index(v); @@ -1657,7 +1657,7 @@ split_vertex(Vertex_handle v, Face_handle f1, Face_handle g1) g1->set_neighbor( cw(j1), g ); g2->set_neighbor( ccw(j2), g ); - CGAL_triangulation_expensive_postcondition( is_valid() ); + CGAL_expensive_postcondition( is_valid() ); // 6. return the new stuff return Fourtuple(v1, v2, f, g); @@ -1668,9 +1668,9 @@ typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: join_vertices(Face_handle f, int i, Vertex_handle v) { - CGAL_triangulation_expensive_precondition( is_valid() ); - CGAL_triangulation_precondition( f != Face_handle() ); - CGAL_triangulation_precondition( i >= 0 && i <= 2 ); + CGAL_expensive_precondition( is_valid() ); + CGAL_precondition( f != Face_handle() ); + CGAL_precondition( i >= 0 && i <= 2 ); // this methods does the "join"-operation and preserves // the vertex v among the two vertices that define the edge (f, i) @@ -1678,7 +1678,7 @@ join_vertices(Face_handle f, int i, Vertex_handle v) Vertex_handle v1 = f->vertex( ccw(i) ); Vertex_handle v2 = f->vertex( cw(i) ); - CGAL_triangulation_precondition( v == v1 || v == v2 ); + CGAL_precondition( v == v1 || v == v2 ); if ( v == v2 ) { return join_vertices(f->neighbor(i), mirror_index(f,i), v); @@ -1686,7 +1686,7 @@ join_vertices(Face_handle f, int i, Vertex_handle v) size_type deg2 = degree(v2); - CGAL_triangulation_precondition( deg2 >= 3 ); + CGAL_precondition( deg2 >= 3 ); if ( deg2 == 3 ) { remove_degree_3(v2, f->neighbor(ccw(i))); @@ -1694,7 +1694,7 @@ join_vertices(Face_handle f, int i, Vertex_handle v) } /* - // The following drawing corrsponds to the variables + // The following drawing corresponds to the variables // used in this part... // The vertex v1 is returned... // @@ -1762,7 +1762,7 @@ join_vertices(Face_handle f, int i, Vertex_handle v) ++fc; } while ( fc != fc_start ); - CGAL_triangulation_assertion( + CGAL_assertion( static_cast(star_faces_of_v2.size()) == deg2 ); // from this point and on we modify the values @@ -1775,7 +1775,7 @@ join_vertices(Face_handle f, int i, Vertex_handle v) // contain v1 for (unsigned int k = 0; k < star_faces_of_v2.size(); k++) { int id = star_indices_of_v2[k]; - CGAL_triangulation_assertion( star_faces_of_v2[k]->vertex(id) == v2 ); + CGAL_assertion( star_faces_of_v2[k]->vertex(id) == v2 ); star_faces_of_v2[k]->set_vertex( id, v1 ); } @@ -1788,10 +1788,10 @@ join_vertices(Face_handle f, int i, Vertex_handle v) if ( v1->face() == f || v1->face() == g ) v1->set_face(tl); -#if ! defined(CGAL_TRIANGULATION_NO_ASSERTIONS) && ! defined(CGAL_NO_ASSERTIONS) +#if ! defined(CGAL_NO_ASSERTIONS) for (Face_iterator fit = faces_begin(); fit != faces_end(); ++fit) { int id; - CGAL_triangulation_assertion( !fit->has_vertex(v2, id) ); + CGAL_assertion( !fit->has_vertex(v2, id) ); } #endif @@ -1804,7 +1804,7 @@ join_vertices(Face_handle f, int i, Vertex_handle v) delete_vertex(v2); - CGAL_triangulation_expensive_postcondition( is_valid() ); + CGAL_expensive_postcondition( is_valid() ); return v1; } @@ -1912,7 +1912,7 @@ is_valid(bool verbose, int level) const bool result = (dimension()>= -1); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); //count and test the validity of the faces (for positive dimensions) Face_iterator ib = face_iterator_base_begin(); @@ -1922,25 +1922,25 @@ is_valid(bool verbose, int level) const count_stored_faces += 1; if (dimension()>= 0) { result = result && ib->is_valid(verbose,level); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); } } result = result && (count_stored_faces == number_of_full_dim_faces()); - CGAL_triangulation_assertion( + CGAL_assertion( count_stored_faces == number_of_full_dim_faces()); // vertex count size_type vertex_count = 0; for(Vertex_iterator vit = vertices_begin(); vit != vertices_end(); ++vit) { - CGAL_triangulation_assertion( vit->face() != Face_handle()); + CGAL_assertion( vit->face() != Face_handle()); result = result && vit->is_valid(verbose,level); - CGAL_triangulation_assertion( result ); + CGAL_assertion( result ); ++vertex_count; } result = result && (number_of_vertices() == vertex_count); - CGAL_triangulation_assertion( number_of_vertices() == vertex_count ); + CGAL_assertion( number_of_vertices() == vertex_count ); //edge count size_type edge_count = 0; @@ -1958,26 +1958,26 @@ is_valid(bool verbose, int level) const case -1: result = result && vertex_count == 1 && face_count == 0 && edge_count == 0; - CGAL_triangulation_assertion(result); + CGAL_assertion(result); break; case 0: result = result && vertex_count == 2 && face_count == 0 && edge_count == 0; - CGAL_triangulation_assertion(result); + CGAL_assertion(result); break; case 1: result = result && edge_count == vertex_count; - CGAL_triangulation_assertion(result); + CGAL_assertion(result); result = result && face_count == 0; - CGAL_triangulation_assertion(result); + CGAL_assertion(result); break; case 2: result = result && edge_count == 3*face_count/2 ; - CGAL_triangulation_assertion(edge_count == 3*face_count/2); + CGAL_assertion(edge_count == 3*face_count/2); break; default: result = false; - CGAL_triangulation_assertion(result); + CGAL_assertion(result); } return result; } @@ -1992,7 +1992,7 @@ copy_tds(const TDS_src& tds_src, const ConvertFace& convert_face) { if (vert != typename TDS_src::Vertex_handle()) - CGAL_triangulation_precondition( tds_src.is_vertex(vert)); + CGAL_precondition( tds_src.is_vertex(vert)); clear(); set_dimension(tds_src.dimension()); @@ -2043,7 +2043,7 @@ copy_tds(const TDS_src& tds_src, // remove the post condition because it is false when copying the // TDS of a regular triangulation because of hidden vertices - // CGAL_triangulation_postcondition( is_valid() ); + // CGAL_postcondition( is_valid() ); return (vert == typename TDS_src::Vertex_handle()) ? Vertex_handle() : vmap[vert]; } @@ -2107,7 +2107,7 @@ void Triangulation_data_structure_2:: file_output( std::ostream& os, Vertex_handle v, bool skip_first) const { - // ouput to a file + // output to a file // if non nullptr, v is the vertex to be output first // if skip_first is true, the point in the first vertex is not output // (it may be for instance the infinite vertex of the triangulation) @@ -2243,7 +2243,7 @@ void Triangulation_data_structure_2:: vrml_output( std::ostream& os, Vertex_handle v, bool skip_infinite) const { - // ouput to a vrml file style + // output to a vrml file style // Point are assumed to be 3d points with a stream oprator << // if non nullptr, v is the vertex to be output first // if skip_inf is true, the point in the first vertex is not output diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_data_structure_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_data_structure_3.h index 7a23608e..db3a1780 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_data_structure_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_data_structure_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_3/include/CGAL/Triangulation_data_structure_3.h $ -// $Id: Triangulation_data_structure_3.h cdbf0d7 2022-03-09T11:34:12+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_3/include/CGAL/Triangulation_data_structure_3.h $ +// $Id: include/CGAL/Triangulation_data_structure_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include @@ -130,7 +130,7 @@ class Triangulation_data_structure_3 >::type Cell_range; # else - CGAL_static_assertion_msg + static_assert (!(std::is_convertible::value), "In CGAL triangulations, `Parallel_tag` can only be used with the Intel TBB library. " "Make TBB available in the build system and then define the macro `CGAL_LINKED_WITH_TBB`."); @@ -338,14 +338,14 @@ class Triangulation_data_structure_3 Cell_handle create_face() { - CGAL_triangulation_precondition(dimension()<3); + CGAL_precondition(dimension()<3); return create_cell(); } Cell_handle create_face(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2) { - CGAL_triangulation_precondition(dimension()<3); + CGAL_precondition(dimension()<3); return cells().emplace(v0, v1, v2, Vertex_handle()); } @@ -354,7 +354,7 @@ class Triangulation_data_structure_3 Cell_handle f1, int i1, Cell_handle f2, int i2) { - CGAL_triangulation_precondition(dimension() <= 2); + CGAL_precondition(dimension() <= 2); Cell_handle newf = create_face(f0->vertex(cw(i0)), f1->vertex(cw(i1)), f2->vertex(cw(i2))); @@ -367,7 +367,7 @@ class Triangulation_data_structure_3 Cell_handle create_face(Cell_handle f0, int i0, Cell_handle f1, int i1) { - CGAL_triangulation_precondition(dimension() <= 2); + CGAL_precondition(dimension() <= 2); Cell_handle newf = create_face(f0->vertex(cw(i0)), f1->vertex(cw(i1)), f1->vertex(ccw(i1))); @@ -378,7 +378,7 @@ class Triangulation_data_structure_3 Cell_handle create_face(Cell_handle f, int i, Vertex_handle v) { - CGAL_triangulation_precondition(dimension() <= 2); + CGAL_precondition(dimension() <= 2); Cell_handle newf = create_face(f->vertex(cw(i)), f->vertex(ccw(i)), v); @@ -397,13 +397,13 @@ class Triangulation_data_structure_3 void delete_vertex( Vertex_handle v ) { - CGAL_triangulation_expensive_precondition( is_vertex(v) ); + CGAL_expensive_precondition( is_vertex(v) ); vertices().erase(v); } void delete_cell( Cell_handle c ) { - CGAL_triangulation_expensive_precondition( is_simplex(c) ); + CGAL_expensive_precondition( is_simplex(c) ); cells().erase(c); } @@ -504,7 +504,7 @@ class Triangulation_data_structure_3 Cell_handle begin, int i, Vertex_handle newv) { - CGAL_triangulation_precondition(begin != Cell_handle()); + CGAL_precondition(begin != Cell_handle()); // if begin == nullptr (default arg), we could compute one by walking in // CellIt. At the moment, the functionality is not available, you have // to specify a starting facet. @@ -639,7 +639,7 @@ class Triangulation_data_structure_3 // Change orientation of the whole TDS. void reorient() { - CGAL_triangulation_precondition(dimension() >= 1); + CGAL_precondition(dimension() >= 1); for (Cell_iterator i = cells().begin(); i != cells().end(); ++i) change_orientation(i); @@ -728,66 +728,66 @@ class Triangulation_data_structure_3 // cells around an edge Cell_circulator incident_cells(const Edge & e) const { - CGAL_triangulation_precondition( dimension() == 3 ); + CGAL_precondition( dimension() == 3 ); return Cell_circulator(e); } Cell_circulator incident_cells(Cell_handle ce, int i, int j) const { - CGAL_triangulation_precondition( dimension() == 3 ); + CGAL_precondition( dimension() == 3 ); return Cell_circulator(ce, i, j); } Cell_circulator incident_cells(const Edge &e, Cell_handle start) const { - CGAL_triangulation_precondition( dimension() == 3 ); + CGAL_precondition( dimension() == 3 ); return Cell_circulator(e, start); } Cell_circulator incident_cells(Cell_handle ce, int i, int j, Cell_handle start) const { - CGAL_triangulation_precondition( dimension() == 3 ); + CGAL_precondition( dimension() == 3 ); return Cell_circulator(ce, i, j, start); } //facets around an edge Facet_circulator incident_facets(const Edge & e) const { - CGAL_triangulation_precondition( dimension() == 3 ); + CGAL_precondition( dimension() == 3 ); return Facet_circulator(e); } Facet_circulator incident_facets(Cell_handle ce, int i, int j) const { - CGAL_triangulation_precondition( dimension() == 3 ); + CGAL_precondition( dimension() == 3 ); return Facet_circulator(ce, i, j); } Facet_circulator incident_facets(const Edge & e, const Facet & start) const { - CGAL_triangulation_precondition( dimension() == 3 ); + CGAL_precondition( dimension() == 3 ); return Facet_circulator(e, start); } Facet_circulator incident_facets(Cell_handle ce, int i, int j, const Facet & start) const { - CGAL_triangulation_precondition( dimension() == 3 ); + CGAL_precondition( dimension() == 3 ); return Facet_circulator(ce, i, j, start); } Facet_circulator incident_facets(const Edge & e, Cell_handle start, int f) const { - CGAL_triangulation_precondition( dimension() == 3 ); + CGAL_precondition( dimension() == 3 ); return Facet_circulator(e, start, f); } Facet_circulator incident_facets(Cell_handle ce, int i, int j, Cell_handle start, int f) const { - CGAL_triangulation_precondition( dimension() == 3 ); + CGAL_precondition( dimension() == 3 ); return Facet_circulator(ce, i, j, start, f); } // 2D : circulates on the faces adjacent to a vertex. Face_circulator incident_faces(Vertex_handle v) const { - CGAL_triangulation_precondition( dimension() == 2 ); + CGAL_precondition( dimension() == 2 ); return Face_circulator(v, v->cell()); } @@ -800,7 +800,7 @@ class Triangulation_data_structure_3 std::pair it) const { - CGAL_triangulation_precondition(dimension() == 3); + CGAL_precondition(dimension() == 3); std::stack cell_stack; cell_stack.push(d); @@ -861,7 +861,7 @@ class Triangulation_data_structure_3 void just_incident_cells_3(Vertex_handle v, std::vector& cells) const { - CGAL_triangulation_precondition(dimension() == 3); + CGAL_precondition(dimension() == 3); Cell_handle d = v->cell(); cells.push_back(d); @@ -890,7 +890,7 @@ class Triangulation_data_structure_3 incident_cells_2(Vertex_handle v, Cell_handle, OutputIterator cells) const { - CGAL_triangulation_precondition(dimension() == 2); + CGAL_precondition(dimension() == 2); Face_circulator fc = incident_faces(v); Face_circulator done(fc); @@ -1166,7 +1166,7 @@ class Triangulation_data_structure_3 OutputIterator incident_facets(Vertex_handle v, OutputIterator facets, Filter f = Filter()) const { - CGAL_triangulation_precondition( dimension() > 1 ); + CGAL_precondition( dimension() > 1 ); if(dimension() == 3) return visit_incident_cells, OutputIterator>(v, facets, f); else @@ -1184,7 +1184,7 @@ class Triangulation_data_structure_3 OutputIterator incident_facets_threadsafe(Vertex_handle v, OutputIterator facets, Filter f = Filter()) const { - CGAL_triangulation_precondition( dimension() > 1 ); + CGAL_precondition( dimension() > 1 ); if(dimension() == 3) return visit_incident_cells_threadsafe, OutputIterator>(v, facets, f); else @@ -1203,7 +1203,7 @@ class Triangulation_data_structure_3 incident_edges_1d(Vertex_handle v, OutputIterator edges, Filter f = Filter()) const { CGAL_assertion (dimension() == 1); - CGAL_triangulation_assertion( number_of_vertices() >= 3); + CGAL_assertion( number_of_vertices() >= 3); Cell_handle n0 = v->cell(); const int index_v_in_n0 = n0->index(v); CGAL_assume(index_v_in_n0 <= 1); @@ -1221,10 +1221,10 @@ class Triangulation_data_structure_3 OutputIterator incident_edges(Vertex_handle v, OutputIterator edges, Filter f = Filter()) const { - CGAL_triangulation_precondition( v != Vertex_handle() ); - CGAL_triangulation_precondition( dimension() >= 1 ); - CGAL_triangulation_expensive_precondition( is_vertex(v) ); - CGAL_triangulation_expensive_precondition( is_valid() ); + CGAL_precondition( v != Vertex_handle() ); + CGAL_precondition( dimension() >= 1 ); + CGAL_expensive_precondition( is_vertex(v) ); + CGAL_expensive_precondition( is_valid() ); if (dimension() == 1) { return incident_edges_1d(v, edges, f); @@ -1240,10 +1240,10 @@ class Triangulation_data_structure_3 incident_edges_threadsafe(Vertex_handle v, OutputIterator edges, Filter f = Filter()) const { - CGAL_triangulation_precondition( v != Vertex_handle() ); - CGAL_triangulation_precondition( dimension() >= 1 ); - CGAL_triangulation_expensive_precondition( is_vertex(v) ); - CGAL_triangulation_expensive_precondition( is_valid() ); + CGAL_precondition( v != Vertex_handle() ); + CGAL_precondition( dimension() >= 1 ); + CGAL_expensive_precondition( is_vertex(v) ); + CGAL_expensive_precondition( is_valid() ); if (dimension() == 1) { return incident_edges_1d(v, edges, f); @@ -1273,10 +1273,10 @@ class Triangulation_data_structure_3 OutputIterator adjacent_vertices(Vertex_handle v, OutputIterator vertices, Filter f = Filter()) const { - CGAL_triangulation_precondition( v != Vertex_handle() ); - CGAL_triangulation_precondition( dimension() >= -1 ); - CGAL_triangulation_expensive_precondition( is_vertex(v) ); - CGAL_triangulation_expensive_precondition( is_valid() ); + CGAL_precondition( v != Vertex_handle() ); + CGAL_precondition( dimension() >= -1 ); + CGAL_expensive_precondition( is_vertex(v) ); + CGAL_expensive_precondition( is_valid() ); if (dimension() == -1) return vertices; @@ -1288,7 +1288,7 @@ class Triangulation_data_structure_3 } if (dimension() == 1) { - CGAL_triangulation_assertion( number_of_vertices() >= 3); + CGAL_assertion( number_of_vertices() >= 3); Cell_handle n0 = v->cell(); const int index_v_in_n0 = n0->index(v); CGAL_assume(index_v_in_n0 <= 1); @@ -1335,10 +1335,10 @@ class Triangulation_data_structure_3 adjacent_vertices_threadsafe(Vertex_handle v, OutputIterator vertices, Filter f = Filter()) const { - CGAL_triangulation_precondition(v != Vertex_handle()); - CGAL_triangulation_precondition(dimension() >= -1); - CGAL_triangulation_expensive_precondition(is_vertex(v)); - CGAL_triangulation_expensive_precondition(is_valid()); + CGAL_precondition(v != Vertex_handle()); + CGAL_precondition(dimension() >= -1); + CGAL_expensive_precondition(is_vertex(v)); + CGAL_expensive_precondition(is_valid()); if (dimension() == -1) return vertices; @@ -1350,7 +1350,7 @@ class Triangulation_data_structure_3 } if (dimension() == 1) { - CGAL_triangulation_assertion(number_of_vertices() >= 3); + CGAL_assertion(number_of_vertices() >= 3); Cell_handle n0 = v->cell(); const int index_v_in_n0 = n0->index(v); CGAL_assume(index_v_in_n0 <= 1); @@ -1373,8 +1373,8 @@ class Triangulation_data_structure_3 OutputIterator visit_incident_cells(Vertex_handle v, OutputIterator output, Filter f) const { - CGAL_triangulation_precondition( v != Vertex_handle() ); - CGAL_triangulation_expensive_precondition( is_vertex(v) ); + CGAL_precondition( v != Vertex_handle() ); + CGAL_expensive_precondition( is_vertex(v) ); if ( dimension() < 2 ) return output; @@ -1405,8 +1405,8 @@ class Triangulation_data_structure_3 visit_incident_cells_threadsafe( Vertex_handle v, OutputIterator output, Filter f) const { - CGAL_triangulation_precondition( v != Vertex_handle() ); - CGAL_triangulation_expensive_precondition( is_vertex(v) ); + CGAL_precondition( v != Vertex_handle() ); + CGAL_expensive_precondition( is_vertex(v) ); if ( dimension() < 2 ) return output; @@ -1437,8 +1437,8 @@ class Triangulation_data_structure_3 visit_incident_cells(Vertex_handle v, OutputIterator output, std::vector &cells, Filter f) const { - CGAL_triangulation_precondition( v != Vertex_handle() ); - CGAL_triangulation_expensive_precondition( is_vertex(v) ); + CGAL_precondition( v != Vertex_handle() ); + CGAL_expensive_precondition( is_vertex(v) ); if ( dimension() < 2 ) return output; @@ -1465,8 +1465,8 @@ class Triangulation_data_structure_3 OutputIterator visit_just_incident_cells(Vertex_handle v, OutputIterator output, Filter f) const { - CGAL_triangulation_precondition( v != Vertex_handle() ); - CGAL_triangulation_expensive_precondition( is_vertex(v) ); + CGAL_precondition( v != Vertex_handle() ); + CGAL_expensive_precondition( is_vertex(v) ); if ( dimension() < 2 ) return output; @@ -1499,10 +1499,10 @@ class Triangulation_data_structure_3 std::vector &cells, VertexFilter f = VertexFilter()) const { - CGAL_triangulation_precondition( v != Vertex_handle() ); - CGAL_triangulation_precondition( dimension() == 3 ); - CGAL_triangulation_expensive_precondition( is_vertex(v) ); - CGAL_triangulation_expensive_precondition( is_valid() ); + CGAL_precondition( v != Vertex_handle() ); + CGAL_precondition( dimension() == 3 ); + CGAL_expensive_precondition( is_vertex(v) ); + CGAL_expensive_precondition( is_valid() ); return visit_incident_cells @@ -1554,16 +1554,16 @@ class Triangulation_data_structure_3 void set_adjacency(Cell_handle c0, int i0, Cell_handle c1, int i1) const { - CGAL_triangulation_assertion(i0 >= 0 && i0 <= dimension()); - CGAL_triangulation_assertion(i1 >= 0 && i1 <= dimension()); - CGAL_triangulation_assertion(c0 != c1); + CGAL_assertion(i0 >= 0 && i0 <= dimension()); + CGAL_assertion(i1 >= 0 && i1 <= dimension()); + CGAL_assertion(c0 != c1); c0->set_neighbor(i0,c1); c1->set_neighbor(i1,c0); } int mirror_index(Cell_handle c, int i) const { - CGAL_triangulation_precondition ( i>=0 && i<4 ); + CGAL_precondition ( i>=0 && i<4 ); return c->neighbor(i)->index(c); } @@ -1656,7 +1656,7 @@ class Triangulation_data_structure_3 convert_cell(c, *C[j]); } - CGAL_triangulation_assertion(is_valid(false)); + CGAL_assertion(is_valid(false)); return is; } @@ -1698,9 +1698,9 @@ typename Triangulation_data_structure_3::Cell_handle Triangulation_data_structure_3:: create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind2) { - CGAL_triangulation_precondition( dimension() == 3); - CGAL_triangulation_precondition( c->tds_data().is_in_conflict() ); - CGAL_triangulation_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() ); + CGAL_precondition( dimension() == 3); + CGAL_precondition( c->tds_data().is_in_conflict() ); + CGAL_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() ); Cell_handle cnew = create_cell(c->vertex(0), c->vertex(1), @@ -1724,7 +1724,7 @@ create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind2) Cell_handle n = cur->neighbor(zz); // turn around the oriented edge vj1 vj2 while ( n->tds_data().is_in_conflict() ) { - CGAL_triangulation_assertion( n != c ); + CGAL_assertion( n != c ); cur = n; zz = next_around_edge(n->index(vj1), n->index(vj2)); n = cur->neighbor(zz); @@ -1756,9 +1756,9 @@ recursive_create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind2, int depth) { if ( depth == 100 ) return non_recursive_create_star_3(v,c,li,prev_ind2); - CGAL_triangulation_precondition( dimension() == 3); - CGAL_triangulation_precondition( c->tds_data().is_in_conflict() ); - CGAL_triangulation_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() ); + CGAL_precondition( dimension() == 3); + CGAL_precondition( c->tds_data().is_in_conflict() ); + CGAL_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() ); Cell_handle cnew = create_cell(c->vertex(0), c->vertex(1), @@ -1782,7 +1782,7 @@ recursive_create_star_3(Vertex_handle v, Cell_handle c, int li, Cell_handle n = cur->neighbor(zz); // turn around the oriented edge vj1 vj2 while ( n->tds_data().is_in_conflict() ) { - CGAL_triangulation_assertion( n != c ); + CGAL_assertion( n != c ); cur = n; zz = next_around_edge(n->index(vj1), n->index(vj2)); n = cur->neighbor(zz); @@ -1814,9 +1814,9 @@ typename Triangulation_data_structure_3::Cell_handle Triangulation_data_structure_3:: non_recursive_create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind2) { - CGAL_triangulation_precondition( dimension() == 3); - CGAL_triangulation_precondition( c->tds_data().is_in_conflict() ); - CGAL_triangulation_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() ); + CGAL_precondition( dimension() == 3); + CGAL_precondition( c->tds_data().is_in_conflict() ); + CGAL_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() ); Cell_handle cnew = create_cell(c->vertex(0), c->vertex(1), @@ -1843,7 +1843,7 @@ non_recursive_create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind Cell_handle n = cur->neighbor(zz); // turn around the oriented edge vj1 vj2 while ( n->tds_data().is_in_conflict() ) { - CGAL_triangulation_assertion( n != c ); + CGAL_assertion( n != c ); cur = n; zz = next_around_edge(n->index(vj1), n->index(vj2)); n = cur->neighbor(zz); @@ -1863,8 +1863,8 @@ non_recursive_create_star_3(Vertex_handle v, Cell_handle c, int li, int prev_ind adjacency_info_stack.push( iAdjacency_info(zzz,cnew,ii,c,li,prev_ind2) ); c=nnn; li=zz; prev_ind2=zzz; ii=0; //copy-pasted from beginning to avoid if ii==0 - CGAL_triangulation_precondition( c->tds_data().is_in_conflict() ); - CGAL_triangulation_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() ); + CGAL_precondition( c->tds_data().is_in_conflict() ); + CGAL_precondition( ! c->neighbor(li)->tds_data().is_in_conflict() ); cnew = create_cell(c->vertex(0),c->vertex(1),c->vertex(2),c->vertex(3)); cnew->set_vertex(li, v); c_li = c->neighbor(li); @@ -1891,7 +1891,7 @@ typename Triangulation_data_structure_3::Cell_handle Triangulation_data_structure_3:: create_star_2(Vertex_handle v, Cell_handle c, int li ) { - CGAL_triangulation_assertion( dimension() == 2 ); + CGAL_assertion( dimension() == 2 ); Cell_handle cnew; // i1 i2 such that v,i1,i2 positive @@ -1980,7 +1980,7 @@ operator>>(std::istream& is, Triangulation_data_structure_3& tds) std::size_t m; tds.read_cells(is, V, m, C); - CGAL_triangulation_assertion( tds.is_valid() ); + CGAL_assertion( tds.is_valid() ); return is; } @@ -2022,7 +2022,7 @@ operator<<(std::ostream& os, const Triangulation_data_structure_3 &tds for (Vertex_iterator it=tds.vertices_begin(); it != tds.vertices_end(); ++it) V[it] = i++; - CGAL_triangulation_assertion( i == n ); + CGAL_assertion( i == n ); tds.print_cells(os, V); @@ -2049,7 +2049,7 @@ bool Triangulation_data_structure_3:: is_vertex(Vertex_handle v) const { - return vertices().owns_dereferencable(v); + return vertices().owns_dereferenceable(v); } template @@ -2059,7 +2059,7 @@ is_edge(Vertex_handle u, Vertex_handle v, Cell_handle &c, int &i, int &j) const // returns false when dimension <1 or when indices wrong { - CGAL_triangulation_expensive_precondition( is_vertex(u) && is_vertex(v) ); + CGAL_expensive_precondition( is_vertex(u) && is_vertex(v) ); if (u==v) return false; @@ -2102,7 +2102,7 @@ is_edge(Cell_handle c, int i, int j) const if ( (dimension() == 2) && ((i>2) || (j>2)) ) return false; if ((i>3) || (j>3)) return false; - return cells().owns_dereferencable(c); + return cells().owns_dereferenceable(c); } template @@ -2113,7 +2113,7 @@ is_facet(Vertex_handle u, Vertex_handle v, Cell_handle & c, int & i, int & j, int & k) const // returns false when dimension <2 or when indices wrong { - CGAL_triangulation_expensive_precondition( is_vertex(u) && + CGAL_expensive_precondition( is_vertex(u) && is_vertex(v) && is_vertex(w) ); @@ -2141,7 +2141,7 @@ bool Triangulation_data_structure_3:: is_facet(Cell_handle c, int i) const { - CGAL_triangulation_precondition(i>=0 && i<4); + CGAL_precondition(i>=0 && i<4); if ( dimension() < 2 ) return false; @@ -2149,7 +2149,7 @@ is_facet(Cell_handle c, int i) const if ( (dimension() == 2) && (i!=3) ) return false; - return cells().owns_dereferencable(c); + return cells().owns_dereferenceable(c); } template @@ -2161,7 +2161,7 @@ is_cell( Cell_handle c ) const if (dimension() < 3) return false; - return cells().owns_dereferencable(c); + return cells().owns_dereferenceable(c); } template @@ -2172,7 +2172,7 @@ is_cell(Vertex_handle u, Vertex_handle v, Cell_handle & c, int & i, int & j, int & k, int & l) const // returns false when dimension <3 { - CGAL_triangulation_expensive_precondition( is_vertex(u) && + CGAL_expensive_precondition( is_vertex(u) && is_vertex(v) && is_vertex(w) && is_vertex(t) ); @@ -2217,7 +2217,7 @@ has_vertex(Cell_handle c, int i, Vertex_handle v, int & j) const // facet (c,i) // j has no meaning if false is returned { - CGAL_triangulation_precondition( dimension() == 3 ); + CGAL_precondition( dimension() == 3 ); return ( c->has_vertex(v,j) && (j != i) ); } @@ -2228,7 +2228,7 @@ Triangulation_data_structure_3:: has_vertex(Cell_handle c, int i, Vertex_handle v) const // checks whether the query facet (c,i) has vertex v { - CGAL_triangulation_precondition( dimension() == 3 ); + CGAL_precondition( dimension() == 3 ); int j; return ( c->has_vertex(v,j) && (j != i) ); } @@ -2264,7 +2264,7 @@ are_equal(Cell_handle c, int i, Cell_handle n, int j) const // if ( c->neighbor(i) != n ) return false; // if ( n->neighbor(j) != c ) return false; { - CGAL_triangulation_precondition( dimension() == 3 ); + CGAL_precondition( dimension() == 3 ); if ( (c==n) && (i==j) ) return true; @@ -2300,9 +2300,9 @@ flip( Cell_handle c, int i ) // flips facet i of cell c // c will be replaced by one of the new cells { - CGAL_triangulation_precondition( (dimension() == 3) && (0<=i) && (i<4) + CGAL_precondition( (dimension() == 3) && (0<=i) && (i<4) && (number_of_vertices() >= 6) ); - CGAL_triangulation_expensive_precondition( is_cell(c) ); + CGAL_expensive_precondition( is_cell(c) ); Cell_handle n = c->neighbor(i); int in = n->index(c); @@ -2323,16 +2323,16 @@ flip_flippable(Cell_handle c, int i ) // flips facet i of cell c // c will be replaced by one of the new cells { - CGAL_triangulation_precondition( (dimension() == 3) && (0<=i) && (i<4) + CGAL_precondition( (dimension() == 3) && (0<=i) && (i<4) && (number_of_vertices() >= 6) ); - CGAL_triangulation_expensive_precondition( is_cell(c) ); + CGAL_expensive_precondition( is_cell(c) ); Cell_handle n = c->neighbor(i); int in = n->index(c); // checks that the facet is flippable, // ie the future edge does not already exist - CGAL_triangulation_expensive_precondition( !is_edge(c->vertex(i), + CGAL_expensive_precondition( !is_edge(c->vertex(i), n->vertex(in))); flip_really(c,i,n,in); } @@ -2374,7 +2374,7 @@ flip_really( Cell_handle c, int i, Cell_handle n, int in ) c->vertex(i2)->set_cell(c); n->vertex(in3)->set_cell(n); // to be implemented : 2d case - // CGAL_triangulation_precondition( (0<=i) && (i<3) ); + // CGAL_precondition( (0<=i) && (i<3) ); } template @@ -2386,12 +2386,12 @@ flip( Cell_handle c, int i, int j ) // flips edge i,j of cell c // c will be deleted { - CGAL_triangulation_precondition( (dimension() == 3) + CGAL_precondition( (dimension() == 3) && (0<=i) && (i<4) && (0<=j) && (j<4) && ( i != j ) && (number_of_vertices() >= 6) ); - CGAL_triangulation_expensive_precondition( is_cell(c) ); + CGAL_expensive_precondition( is_cell(c) ); // checks that the edge is flippable ie degree 3 int degree = 0; @@ -2436,24 +2436,24 @@ flip_flippable( Cell_handle c, int i, int j ) // flips edge i,j of cell c // c will be deleted { - CGAL_triangulation_precondition( (dimension() == 3) + CGAL_precondition( (dimension() == 3) && (0<=i) && (i<4) && (0<=j) && (j<4) && ( i != j ) && (number_of_vertices() >= 6) ); - CGAL_triangulation_expensive_precondition( is_cell(c) ); + CGAL_expensive_precondition( is_cell(c) ); // checks that the edge is flippable ie degree 3 - CGAL_triangulation_precondition_code( int degree = 0; ); - CGAL_triangulation_precondition_code + CGAL_precondition_code( int degree = 0; ); + CGAL_precondition_code ( Cell_circulator ccir = incident_cells(c,i,j); ); - CGAL_triangulation_precondition_code( Cell_circulator cdone = ccir; ); - CGAL_triangulation_precondition_code( do { + CGAL_precondition_code( Cell_circulator cdone = ccir; ); + CGAL_precondition_code( do { ++degree; ++ccir; } while ( ccir != cdone ); ); - CGAL_triangulation_precondition( degree == 3 ); + CGAL_precondition( degree == 3 ); int next = next_around_edge(i,j); Cell_handle c1 = c->neighbor( next ); @@ -2472,8 +2472,8 @@ flip_flippable( Cell_handle c, int i, int j ) // checks that the edge is flippable, // is the future cells do not already exist - CGAL_triangulation_expensive_precondition( !is_cell(v1,v2,v3,c->vertex(i)) ); - CGAL_triangulation_expensive_precondition( !is_cell(v1,v2,v3,c->vertex(j)) ); + CGAL_expensive_precondition( !is_cell(v1,v2,v3,c->vertex(i)) ); + CGAL_expensive_precondition( !is_cell(v1,v2,v3,c->vertex(j)) ); flip_really(c,i,j,c1,v1,i1,j1,next1,c2,v2,i2,j2,next2,v3); } @@ -2559,7 +2559,7 @@ read_cells(std::istream& is, const std::vector< Vertex_handle > &V, { m = 2; C.resize(m); - // CGAL_triangulation_assertion( n == 2 ); + // CGAL_assertion( n == 2 ); for (int i=0; i < 2; i++) { Cell_handle c = create_face(V[i], Vertex_handle(), Vertex_handle()); C[i] = c; @@ -2575,7 +2575,7 @@ read_cells(std::istream& is, const std::vector< Vertex_handle > &V, { m = 1; C.resize(m); - // CGAL_triangulation_assertion( n == 1 ); + // CGAL_assertion( n == 1 ); Cell_handle c = create_face(V[0], Vertex_handle(), Vertex_handle()); C[0] = c; V[0]->set_cell(c); @@ -2617,7 +2617,7 @@ print_cells(std::ostream& os, const Unique_hash_map write(os, V[it->vertex(j)]); } } - CGAL_triangulation_assertion( i == m ); + CGAL_assertion( i == m ); // write the neighbors for(it = cells_begin(); it != cells_end(); ++it) { @@ -2660,7 +2660,7 @@ print_cells(std::ostream& os, const Unique_hash_map } } } - CGAL_triangulation_assertion( i == m ); + CGAL_assertion( i == m ); // write the neighbors for(it = facets_begin(); it != facets_end(); ++it) { @@ -2703,7 +2703,7 @@ print_cells(std::ostream& os, const Unique_hash_map } } } - CGAL_triangulation_assertion( i == m ); + CGAL_assertion( i == m ); // write the neighbors for(it = edges_begin(); it != edges_end(); ++it) { @@ -2732,7 +2732,7 @@ Triangulation_data_structure_3::insert_first_finite_cell( Vertex_handle &v0, Vertex_handle &v1, Vertex_handle &v2, Vertex_handle &v3, Vertex_handle v_infinite) { - CGAL_triangulation_precondition( + CGAL_precondition( (v_infinite == Vertex_handle() && dimension() == -2) || (v_infinite != Vertex_handle() && dimension() == -1)); @@ -2778,9 +2778,9 @@ typename Triangulation_data_structure_3::Vertex_handle Triangulation_data_structure_3:: insert_in_cell(Cell_handle c) { - CGAL_triangulation_precondition( dimension() == 3 ); - CGAL_triangulation_precondition( c != Cell_handle() ); - CGAL_triangulation_expensive_precondition( is_cell(c) ); + CGAL_precondition( dimension() == 3 ); + CGAL_precondition( c != Cell_handle() ); + CGAL_expensive_precondition( is_cell(c) ); Vertex_handle v = create_vertex(); @@ -2824,8 +2824,8 @@ Triangulation_data_structure_3:: insert_in_facet(Cell_handle c, int i) { // inserts v in the facet opposite to vertex i of cell c - CGAL_triangulation_precondition( c != Cell_handle() ); - CGAL_triangulation_precondition( dimension() >= 2 ); + CGAL_precondition( c != Cell_handle() ); + CGAL_precondition( dimension() >= 2 ); Vertex_handle v = create_vertex(); @@ -2833,8 +2833,8 @@ insert_in_facet(Cell_handle c, int i) case 3: { - CGAL_triangulation_expensive_precondition( is_cell(c) ); - CGAL_triangulation_precondition( i == 0 || i == 1 || + CGAL_expensive_precondition( is_cell(c) ); + CGAL_precondition( i == 0 || i == 1 || i == 2 || i == 3 ); // c will be modified to have v replacing vertex(i+3) int i1,i2,i3; @@ -2905,7 +2905,7 @@ insert_in_facet(Cell_handle c, int i) } case 2: { - CGAL_triangulation_expensive_precondition( is_facet(c,i) ); + CGAL_expensive_precondition( is_facet(c,i) ); Cell_handle n = c->neighbor(2); Cell_handle cnew = create_face(c->vertex(0),c->vertex(1),v); set_adjacency(cnew, 2, n, n->index(c)); @@ -2933,15 +2933,15 @@ Triangulation_data_structure_3:: insert_in_edge(Cell_handle c, int i, int j) // inserts a vertex in the edge of cell c with vertices i and j { - CGAL_triangulation_precondition( c != Cell_handle() ); - CGAL_triangulation_precondition( i != j ); - CGAL_triangulation_precondition( dimension() >= 1 ); + CGAL_precondition( c != Cell_handle() ); + CGAL_precondition( i != j ); + CGAL_precondition( dimension() >= 1 ); switch ( dimension() ) { case 3: { - CGAL_triangulation_expensive_precondition( is_cell(c) ); - CGAL_triangulation_precondition( i>=0 && i<=3 && j>=0 && j<=3 ); + CGAL_expensive_precondition( is_cell(c) ); + CGAL_precondition( i>=0 && i<=3 && j>=0 && j<=3 ); std::vector cells; cells.reserve(32); @@ -2957,7 +2957,7 @@ insert_in_edge(Cell_handle c, int i, int j) } case 2: { - CGAL_triangulation_expensive_precondition( is_edge(c,i,j) ); + CGAL_expensive_precondition( is_edge(c,i,j) ); Vertex_handle v = create_vertex(); int k=3-i-j; // index of the third vertex of the facet @@ -2996,7 +2996,7 @@ insert_in_edge(Cell_handle c, int i, int j) default: // case 1: { Vertex_handle v = create_vertex(); - CGAL_triangulation_expensive_precondition( is_edge(c,i,j) ); + CGAL_expensive_precondition( is_edge(c,i,j) ); Cell_handle cnew = create_face(v, c->vertex(1), Vertex_handle()); c->vertex(1)->set_cell(cnew); c->set_vertex(1,v); @@ -3019,15 +3019,15 @@ insert_increase_dimension(Vertex_handle star) // = nullptr only used to insert the 1st vertex (dimension -2 to dimension -1) // changes the dimension { - CGAL_triangulation_precondition( dimension() < 3); + CGAL_precondition( dimension() < 3); Vertex_handle v = create_vertex(); int dim = dimension(); if (dim != -2) { - CGAL_triangulation_precondition( star != Vertex_handle() ); + CGAL_precondition( star != Vertex_handle() ); // In this case, this precondition is not relatively expensive. - CGAL_triangulation_precondition( is_vertex(star) ); + CGAL_precondition( is_vertex(star) ); } // this is set now, so that it becomes allowed to reorient @@ -3188,13 +3188,13 @@ void Triangulation_data_structure_3:: remove_decrease_dimension(Vertex_handle v, Vertex_handle w) { - CGAL_triangulation_expensive_precondition( is_valid() ); - CGAL_triangulation_precondition( dimension() >= -1 ); - CGAL_triangulation_precondition( dimension() != 1 || + CGAL_expensive_precondition( is_valid() ); + CGAL_precondition( dimension() >= -1 ); + CGAL_precondition( dimension() != 1 || number_of_vertices() == 3); - CGAL_triangulation_precondition( number_of_vertices() > + CGAL_precondition( number_of_vertices() > (size_type) dimension() + 1 ); - CGAL_triangulation_precondition( degree(v) == number_of_vertices()-1 ); + CGAL_precondition( degree(v) == number_of_vertices()-1 ); if (dimension() <= 0) { delete_cell(v->cell()); @@ -3235,7 +3235,7 @@ remove_decrease_dimension(Vertex_handle v, Vertex_handle w) } delete_vertex(v); set_dimension(dimension()-1); - CGAL_triangulation_postcondition(is_valid()); + CGAL_postcondition(is_valid()); } template @@ -3243,9 +3243,9 @@ typename Triangulation_data_structure_3::Cell_handle Triangulation_data_structure_3:: remove_from_maximal_dimension_simplex(Vertex_handle v) { - CGAL_triangulation_precondition(dimension() >= 1); - CGAL_triangulation_precondition(degree(v) == (size_type) dimension() + 1); - CGAL_triangulation_precondition(number_of_vertices() > + CGAL_precondition(dimension() >= 1); + CGAL_precondition(degree(v) == (size_type) dimension() + 1); + CGAL_precondition(number_of_vertices() > (size_type) dimension() + 1); if (number_of_vertices() == (size_type) dimension() + 2) { @@ -3267,9 +3267,9 @@ typename Triangulation_data_structure_3::Cell_handle Triangulation_data_structure_3:: remove_degree_2(Vertex_handle v) { - CGAL_triangulation_precondition(dimension() == 1); - CGAL_triangulation_precondition(degree(v) == 2); - CGAL_triangulation_precondition(number_of_vertices() >= 4); + CGAL_precondition(dimension() == 1); + CGAL_precondition(degree(v) == 2); + CGAL_precondition(number_of_vertices() >= 4); // Cells to be killed. Cell_handle c0, c1; @@ -3306,9 +3306,9 @@ typename Triangulation_data_structure_3::Cell_handle Triangulation_data_structure_3:: remove_degree_3(Vertex_handle v) { - CGAL_triangulation_precondition(dimension() == 2); - CGAL_triangulation_precondition(degree(v) == 3); - CGAL_triangulation_precondition(number_of_vertices() >= 5); + CGAL_precondition(dimension() == 2); + CGAL_precondition(degree(v) == 3); + CGAL_precondition(number_of_vertices() >= 5); // Cells to be killed. Cell_handle c0, c1, c2; @@ -3350,9 +3350,9 @@ typename Triangulation_data_structure_3::Cell_handle Triangulation_data_structure_3:: remove_degree_4(Vertex_handle v) { - CGAL_triangulation_precondition(dimension() == 3); - CGAL_triangulation_precondition(degree(v) == 4); - CGAL_triangulation_precondition(number_of_vertices() >= 6); + CGAL_precondition(dimension() == 3); + CGAL_precondition(degree(v) == 4); + CGAL_precondition(number_of_vertices() >= 6); // Cells to be killed. Cell_handle c0, c1, c2, c3; @@ -3400,11 +3400,11 @@ void Triangulation_data_structure_3:: decrease_dimension(Cell_handle c, int i) { - CGAL_triangulation_expensive_precondition( is_valid() );; - CGAL_triangulation_precondition( dimension() >= 2); - CGAL_triangulation_precondition( number_of_vertices() > + CGAL_expensive_precondition( is_valid() );; + CGAL_precondition( dimension() >= 2); + CGAL_precondition( number_of_vertices() > (size_type) dimension() + 1 ); - CGAL_triangulation_precondition( degree(c->vertex(i)) == number_of_vertices()-1 ); + CGAL_precondition( degree(c->vertex(i)) == number_of_vertices()-1 ); Vertex_handle v = c->vertex(i); Vertex_handle w = c->vertex(i); @@ -3530,7 +3530,7 @@ decrease_dimension(Cell_handle c, int i) v1->set_cell(c2); } - CGAL_triangulation_postcondition(is_valid()); + CGAL_postcondition(is_valid()); } @@ -3556,7 +3556,7 @@ is_valid(bool verbose, int level ) const if(number_of_vertices() <= 4) { if (verbose) std::cerr << "wrong number of vertices" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -3566,7 +3566,7 @@ is_valid(bool verbose, int level ) const if ( number_of_vertices() != vertex_count ) { if (verbose) std::cerr << "wrong number of vertices" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -3584,7 +3584,7 @@ is_valid(bool verbose, int level ) const if ( cell_count - facet_count + edge_count - vertex_count != 0 ) { if (verbose) std::cerr << "Euler relation unsatisfied" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -3596,7 +3596,7 @@ is_valid(bool verbose, int level ) const if(number_of_vertices() <= 3) { if (verbose) std::cerr << "wrong number of vertices" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -3607,7 +3607,7 @@ is_valid(bool verbose, int level ) const if ( number_of_vertices() != vertex_count ) { if (verbose) std::cerr << "false number of vertices" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -3619,7 +3619,7 @@ is_valid(bool verbose, int level ) const if (verbose) std::cerr << "Euler relation unsatisfied - edges/vertices" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -3631,7 +3631,7 @@ is_valid(bool verbose, int level ) const if (verbose) std::cerr << "Euler relation unsatisfied - facets/vertices" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } break; @@ -3642,7 +3642,7 @@ is_valid(bool verbose, int level ) const if(number_of_vertices() <= 1) { if (verbose) std::cerr << "wrong number of vertices" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -3652,7 +3652,7 @@ is_valid(bool verbose, int level ) const if ( number_of_vertices() != vertex_count ) { if (verbose) std::cerr << "false number of vertices" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } size_type edge_count; @@ -3662,7 +3662,7 @@ is_valid(bool verbose, int level ) const if ( edge_count != vertex_count ) { if (verbose) std::cerr << "false number of edges" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } break; @@ -3672,7 +3672,7 @@ is_valid(bool verbose, int level ) const if ( number_of_vertices() < 2 ) { if (verbose) std::cerr << "fewer than 2 vertices but dimension 0" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } CGAL_FALLTHROUGH; @@ -3682,7 +3682,7 @@ is_valid(bool verbose, int level ) const if ( number_of_vertices() < 1 ) { if (verbose) std::cerr << "no vertex but dimension -1" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } // vertex count @@ -3692,7 +3692,7 @@ is_valid(bool verbose, int level ) const if ( number_of_vertices() != vertex_count ) { if (verbose) std::cerr << "false number of vertices" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } @@ -3712,7 +3712,7 @@ is_valid(Vertex_handle v, bool verbose, int level) const if ( ! result ) { if ( verbose ) std::cerr << "invalid vertex" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); } return result; } @@ -3732,14 +3732,14 @@ is_valid(Cell_handle c, bool verbose, int level) const if ( c->vertex(0) == Vertex_handle() ) { if (verbose) std::cerr << "vertex 0 nullptr" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } is_valid(c->vertex(0),verbose,level); if ( c->vertex(1) != Vertex_handle() || c->vertex(2) != Vertex_handle()) { if (verbose) std::cerr << "vertex 1 or 2 != nullptr" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } if ( c->neighbor(0) != Cell_handle() || @@ -3747,7 +3747,7 @@ is_valid(Cell_handle c, bool verbose, int level) const c->neighbor(2) != Cell_handle()) { if (verbose) std::cerr << "one neighbor != nullptr" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } break; @@ -3758,35 +3758,35 @@ is_valid(Cell_handle c, bool verbose, int level) const if ( c->vertex(0) == Vertex_handle() ) { if (verbose) std::cerr << "vertex 0 nullptr" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } is_valid(c->vertex(0),verbose,level); if ( c->neighbor (0) == Cell_handle() ) { if (verbose) std::cerr << "neighbor 0 nullptr" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } if ( c->vertex(1) != Vertex_handle() || c->vertex(2) != Vertex_handle() ) { if (verbose) std::cerr << "vertex 1 or 2 != nullptr" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } if ( c->neighbor(1) != Cell_handle() || c->neighbor(2) != Cell_handle() ) { if (verbose) std::cerr << "neighbor 1 or 2 != nullptr" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } if ( ! c->neighbor(0)->has_vertex(c->vertex(0)) ) { if (verbose) std::cerr << "neighbor 0 does not have vertex 0" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } break; @@ -3802,7 +3802,7 @@ is_valid(Cell_handle c, bool verbose, int level) const if ( v0 == Vertex_handle() || v1 == Vertex_handle() ) { if (verbose) std::cerr << "vertex 0 or 1 nullptr" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } is_valid(c->vertex(0),verbose,level); @@ -3810,7 +3810,7 @@ is_valid(Cell_handle c, bool verbose, int level) const if ( n0 == Cell_handle() || n1 == Cell_handle() ) { if (verbose) std::cerr << "neighbor 0 or 1 nullptr" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -3818,14 +3818,14 @@ is_valid(Cell_handle c, bool verbose, int level) const if (verbose) std::cerr << "neighbor 1 does not have vertex 0 as vertex 1" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } if ( v1 != n0->vertex(0) ) { if (verbose) std::cerr << "neighbor 0 does not have vertex 1 as vertex 0" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -3833,14 +3833,14 @@ is_valid(Cell_handle c, bool verbose, int level) const if (verbose) std::cerr << "neighbor 0 does not have this as neighbor 1" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } if ( n1->neighbor(0) != c ) { if (verbose) std::cerr << "neighbor 1 does not have this as neighbor 0" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -3854,7 +3854,7 @@ is_valid(Cell_handle c, bool verbose, int level) const c->vertex(2) == Vertex_handle() ) { if (verbose) std::cerr << "vertex 0, 1, or 2 nullptr" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } is_valid(c->vertex(0),verbose,level); @@ -3867,14 +3867,14 @@ is_valid(Cell_handle c, bool verbose, int level) const if ( n == Cell_handle() ) { if (verbose) std::cerr << "neighbor " << i << " nullptr" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } if ( ! n->has_vertex(c->vertex(cw(i)),in ) ) { if (verbose) std::cerr << "vertex " << cw(i) << " not vertex of neighbor " << i << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } in = cw(in); @@ -3883,7 +3883,7 @@ is_valid(Cell_handle c, bool verbose, int level) const std::cerr << "neighbor " << i << " does not have this as neighbor " << in << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } if ( c->vertex(ccw(i)) != n->vertex(cw(in)) ) { @@ -3891,7 +3891,7 @@ is_valid(Cell_handle c, bool verbose, int level) const std::cerr << "vertex " << ccw(i) << " is not vertex " << cw(in) << " of neighbor " << i << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } @@ -3905,7 +3905,7 @@ is_valid(Cell_handle c, bool verbose, int level) const if ( c->vertex(i) == Vertex_handle() ) { if (verbose) std::cerr << "vertex " << i << " nullptr" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } is_valid(c->vertex(i),verbose,level); @@ -3916,7 +3916,7 @@ is_valid(Cell_handle c, bool verbose, int level) const if ( n == Cell_handle() ) { if (verbose) std::cerr << "neighbor " << i << " nullptr" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -3929,37 +3929,37 @@ is_valid(Cell_handle c, bool verbose, int level) const if (in == 5) { if (verbose) std::cerr << "neighbor of c has not c as neighbor" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } int j1n=4,j2n=4,j3n=4; if ( ! n->has_vertex(c->vertex((i+1)&3),j1n) ) { - if (verbose) { std::cerr << "vertex " << ((i+1)&3) + if (verbose) { std::cerr << "vertex (+1) " << ((i+1)&3) << " not vertex of neighbor " << i << std::endl; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } if ( ! n->has_vertex(c->vertex((i+2)&3),j2n) ) { - if (verbose) { std::cerr << "vertex " << ((i+2)&3) + if (verbose) { std::cerr << "vertex (+2) " << ((i+2)&3) << " not vertex of neighbor " << i << std::endl; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } if ( ! n->has_vertex(c->vertex((i+3)&3),j3n) ) { - if (verbose) { std::cerr << "vertex " << ((i+3)&3) + if (verbose) { std::cerr << "vertex (+3) " << ((i+3)&3) << " not vertex of neighbor " << i << std::endl; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } if ( in+j1n+j2n+j3n != 6) { if (verbose) { std::cerr << "sum of the indices != 6 " << std::endl; } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -3970,7 +3970,7 @@ is_valid(Cell_handle c, bool verbose, int level) const if (verbose) std::cerr << " pb orientation with neighbor " << i << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } @@ -3979,7 +3979,7 @@ is_valid(Cell_handle c, bool verbose, int level) const if (verbose) std::cerr << " pb orientation with neighbor " << i << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } @@ -3988,7 +3988,7 @@ is_valid(Cell_handle c, bool verbose, int level) const if (verbose) std::cerr << " pb orientation with neighbor " << i << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } @@ -3999,7 +3999,7 @@ is_valid(Cell_handle c, bool verbose, int level) const if (verbose) std::cerr << " pb orientation with neighbor " << i << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } @@ -4008,7 +4008,7 @@ is_valid(Cell_handle c, bool verbose, int level) const if (verbose) std::cerr << " pb orientation with neighbor " << i << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } @@ -4017,7 +4017,7 @@ is_valid(Cell_handle c, bool verbose, int level) const if (verbose) std::cerr << " pb orientation with neighbor " << i << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } } @@ -4037,7 +4037,7 @@ copy_tds(const TDS_src& tds, const ConvertVertex& convert_vertex, const ConvertCell& convert_cell) { - CGAL_triangulation_expensive_precondition( vert == Vertex_handle() + CGAL_expensive_precondition( vert == Vertex_handle() || tds.is_vertex(vert) ); clear(); @@ -4086,7 +4086,7 @@ copy_tds(const TDS_src& tds, F[cit2]->set_neighbor(j, F[cit2->neighbor(j)] ); } - CGAL_triangulation_postcondition( is_valid() ); + CGAL_postcondition( is_valid() ); return (vert != typename TDS_src::Vertex_handle()) ? V[vert] : Vertex_handle(); } @@ -4149,7 +4149,7 @@ void Triangulation_data_structure_3:: swap(Tds & tds) { - CGAL_triangulation_expensive_precondition(tds.is_valid() && is_valid()); + CGAL_expensive_precondition(tds.is_valid() && is_valid()); std::swap(_dimension, tds._dimension); cells().swap(tds.cells()); @@ -4178,7 +4178,7 @@ count_vertices(size_type & i, bool verbose, int level) const if ( ! is_valid(it,verbose,level) ) { if (verbose) std::cerr << "invalid vertex" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } ++i; @@ -4198,7 +4198,7 @@ count_facets(size_type & i, bool verbose, int level) const if ( ! is_valid((*it).first,verbose, level) ) { if (verbose) std::cerr << "invalid facet" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } ++i; @@ -4218,7 +4218,7 @@ count_edges(size_type & i, bool verbose, int level) const if ( ! is_valid((*it).first,verbose, level) ) { if (verbose) std::cerr << "invalid edge" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } ++i; @@ -4238,7 +4238,7 @@ count_cells(size_type & i, bool verbose, int level) const if ( ! is_valid(it,verbose, level) ) { if (verbose) std::cerr << "invalid cell" << std::endl; - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } ++i; diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_data_structure_using_list_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_data_structure_using_list_2.h index 6635992f..4f96b547 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_data_structure_using_list_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_data_structure_using_list_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_data_structure_using_list_2.h $ -// $Id: Triangulation_data_structure_using_list_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_data_structure_using_list_2.h $ +// $Id: include/CGAL/Triangulation_data_structure_using_list_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_default_data_structure_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_default_data_structure_2.h index 68439007..0c9c2e72 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_default_data_structure_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_default_data_structure_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_default_data_structure_2.h $ -// $Id: Triangulation_default_data_structure_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_default_data_structure_2.h $ +// $Id: include/CGAL/Triangulation_default_data_structure_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_ds_cell_base_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_ds_cell_base_3.h index b62b6724..ea0682f8 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_ds_cell_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_ds_cell_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_3/include/CGAL/Triangulation_ds_cell_base_3.h $ -// $Id: Triangulation_ds_cell_base_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_3/include/CGAL/Triangulation_ds_cell_base_3.h $ +// $Id: include/CGAL/Triangulation_ds_cell_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -19,7 +19,7 @@ #include -#include +#include #include namespace CGAL { @@ -66,7 +66,7 @@ class Triangulation_ds_cell_base_3 Vertex_handle vertex(int i) const { - CGAL_triangulation_precondition( i >= 0 && i <= 3 ); + CGAL_precondition( i >= 0 && i <= 3 ); CGAL_assume( i >= 0 && i <= 3 ); return V[i]; } @@ -90,13 +90,13 @@ class Triangulation_ds_cell_base_3 if (v == V[0]) { return 0; } if (v == V[1]) { return 1; } if (v == V[2]) { return 2; } - CGAL_triangulation_assertion( v == V[3] ); + CGAL_assertion( v == V[3] ); return 3; } Cell_handle neighbor(int i) const { - CGAL_triangulation_precondition( i >= 0 && i <= 3); + CGAL_precondition( i >= 0 && i <= 3); return N[i]; } @@ -119,7 +119,7 @@ class Triangulation_ds_cell_base_3 if (n == N[0]) return 0; if (n == N[1]) return 1; if (n == N[2]) return 2; - CGAL_triangulation_assertion( n == N[3] ); + CGAL_assertion( n == N[3] ); return 3; } @@ -127,14 +127,14 @@ class Triangulation_ds_cell_base_3 void set_vertex(int i, Vertex_handle v) { - CGAL_triangulation_precondition( i >= 0 && i <= 3); + CGAL_precondition( i >= 0 && i <= 3); V[i] = v; } void set_neighbor(int i, Cell_handle n) { - CGAL_triangulation_precondition( i >= 0 && i <= 3); - CGAL_triangulation_precondition( this != n.operator->() ); + CGAL_precondition( i >= 0 && i <= 3); + CGAL_precondition( this != n.operator->() ); N[i] = n; } @@ -160,10 +160,10 @@ class Triangulation_ds_cell_base_3 void set_neighbors(Cell_handle n0, Cell_handle n1, Cell_handle n2, Cell_handle n3) { - CGAL_triangulation_precondition( this != n0.operator->() ); - CGAL_triangulation_precondition( this != n1.operator->() ); - CGAL_triangulation_precondition( this != n2.operator->() ); - CGAL_triangulation_precondition( this != n3.operator->() ); + CGAL_precondition( this != n0.operator->() ); + CGAL_precondition( this != n1.operator->() ); + CGAL_precondition( this != n2.operator->() ); + CGAL_precondition( this != n3.operator->() ); N[0] = n0; N[1] = n1; N[2] = n2; diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_ds_circulators_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_ds_circulators_2.h index 18aa72c4..b512f44a 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_ds_circulators_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_ds_circulators_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_2/include/CGAL/Triangulation_ds_circulators_2.h $ -// $Id: Triangulation_ds_circulators_2.h 74d8922 2020-04-20T15:25:40+02:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_2/include/CGAL/Triangulation_ds_circulators_2.h $ +// $Id: include/CGAL/Triangulation_ds_circulators_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include namespace CGAL { @@ -71,22 +71,22 @@ class Triangulation_ds_face_circulator_2 bool operator!=(const Face_handle &fh) const { return pos != fh; } bool is_empty() const; - bool operator==(std::nullptr_t /*CGAL_triangulation_assertion_code(n)*/) const; - bool operator!=(std::nullptr_t /*CGAL_triangulation_assertion_code(n)*/) const; + bool operator==(std::nullptr_t /*CGAL_assertion_code(n)*/) const; + bool operator!=(std::nullptr_t /*CGAL_assertion_code(n)*/) const; Face& operator*() const { - CGAL_triangulation_precondition(pos != Face_handle() && - _v != Vertex_handle()); + CGAL_precondition(pos != Face_handle() && + _v != Vertex_handle()); return *pos; } Face* operator->() const { - CGAL_triangulation_precondition(pos != Face_handle() && - _v != Vertex_handle()); + CGAL_precondition(pos != Face_handle() && + _v != Vertex_handle()); return &*pos; } @@ -152,22 +152,22 @@ class Triangulation_ds_vertex_circulator_2 : { return pos->vertex(_ri) != vh; } bool is_empty() const; - bool operator==(std::nullptr_t /*CGAL_triangulation_assertion_code(n)*/) const; - bool operator!=(std::nullptr_t /*CGAL_triangulation_assertion_code(n)*/) const; + bool operator==(std::nullptr_t /*CGAL_assertion_code(n)*/) const; + bool operator!=(std::nullptr_t /*CGAL_assertion_code(n)*/) const; Vertex& operator*() const { - CGAL_triangulation_precondition(pos != Face_handle() && - _v != Vertex_handle()); + CGAL_precondition(pos != Face_handle() && + _v != Vertex_handle()); return *(pos->vertex(_ri)); } Vertex* operator->() const { - CGAL_triangulation_precondition(pos != Face_handle() && - _v != Vertex_handle()); + CGAL_precondition(pos != Face_handle() && + _v != Vertex_handle()); return &*(pos->vertex(_ri)); } @@ -231,8 +231,8 @@ class Triangulation_ds_edge_circulator_2 : bool operator==(const Edge_circulator &vc) const; bool operator!=(const Edge_circulator &vc) const; bool is_empty() const; - bool operator==(std::nullptr_t /*CGAL_triangulation_assertion_code(n)*/) const; - bool operator!=(std::nullptr_t /*CGAL_triangulation_assertion_code(n)*/) const; + bool operator==(std::nullptr_t /*CGAL_assertion_code(n)*/) const; + bool operator!=(std::nullptr_t /*CGAL_assertion_code(n)*/) const; Edge* operator->() const { edge.first=pos; @@ -259,7 +259,7 @@ Triangulation_ds_face_circulator_2(Vertex_handle v, Face_handle f) if (pos == Face_handle()|| pos->dimension() < 2) { _v = Vertex_handle() ; pos = Face_handle(); return;} - else CGAL_triangulation_precondition( pos->has_vertex(v)); + else CGAL_precondition( pos->has_vertex(v)); } @@ -268,8 +268,8 @@ Triangulation_ds_face_circulator_2& Triangulation_ds_face_circulator_2 :: operator++() { - CGAL_triangulation_precondition( pos != Face_handle() && - _v != Vertex_handle()); + CGAL_precondition( pos != Face_handle() && + _v != Vertex_handle()); int i = pos->index(_v); pos = pos->neighbor(ccw(i)); return *this; @@ -280,8 +280,8 @@ Triangulation_ds_face_circulator_2 Triangulation_ds_face_circulator_2 :: operator++(int) { - CGAL_triangulation_precondition(pos != Face_handle() && - _v != Vertex_handle()); + CGAL_precondition(pos != Face_handle() && + _v != Vertex_handle()); Face_circulator tmp(*this); ++(*this); return tmp; @@ -292,8 +292,8 @@ Triangulation_ds_face_circulator_2& Triangulation_ds_face_circulator_2 :: operator--() { - CGAL_triangulation_precondition(pos != Face_handle() && - _v != Vertex_handle()); + CGAL_precondition(pos != Face_handle() && + _v != Vertex_handle()); int i = pos->index(_v); pos = pos->neighbor(cw(i)); return *this; @@ -304,8 +304,8 @@ Triangulation_ds_face_circulator_2 Triangulation_ds_face_circulator_2 :: operator--(int) { - CGAL_triangulation_precondition(pos != Face_handle() && - _v != Vertex_handle()); + CGAL_precondition(pos != Face_handle() && + _v != Vertex_handle()); Face_circulator tmp(*this); --(*this); return tmp; @@ -338,18 +338,18 @@ return (_v == Vertex_handle() || pos == Face_handle() ); template < class Tds > inline bool Triangulation_ds_face_circulator_2 :: -operator==(std::nullptr_t /*CGAL_triangulation_assertion_code(n)*/) const +operator==(std::nullptr_t /*CGAL_assertion_code(n)*/) const { - //CGAL_triangulation_assertion( n == nullptr); + //CGAL_assertion( n == nullptr); return (_v == Vertex_handle() || pos == Face_handle() ); } template < class Tds > inline bool Triangulation_ds_face_circulator_2 :: -operator!=(std::nullptr_t /*CGAL_triangulation_assertion_code(n)*/) const +operator!=(std::nullptr_t /*CGAL_assertion_code(n)*/) const { - //CGAL_triangulation_assertion( n == nullptr); + //CGAL_assertion( n == nullptr); return ! (*this == nullptr); } @@ -376,8 +376,8 @@ Triangulation_ds_vertex_circulator_2& Triangulation_ds_vertex_circulator_2 :: operator++() { - CGAL_triangulation_precondition(pos != Face_handle() && - _v != Vertex_handle()); + CGAL_precondition(pos != Face_handle() && + _v != Vertex_handle()); int i = pos->index(_v); if (pos->dimension() == 1) { @@ -408,7 +408,7 @@ Triangulation_ds_vertex_circulator_2& Triangulation_ds_vertex_circulator_2 :: operator--() { - CGAL_triangulation_precondition(pos != Face_handle() && + CGAL_precondition(pos != Face_handle() && _v != Vertex_handle()); int i = pos->index(_v); @@ -462,18 +462,18 @@ is_empty() const template < class Tds > inline bool Triangulation_ds_vertex_circulator_2 :: -operator==(std::nullptr_t /*CGAL_triangulation_assertion_code(n)*/) const +operator==(std::nullptr_t /*CGAL_assertion_code(n)*/) const { - //CGAL_triangulation_assertion( n == nullptr); + //CGAL_assertion( n == nullptr); return (_v == Vertex_handle() || pos == Face_handle()); } template < class Tds > inline bool Triangulation_ds_vertex_circulator_2 :: -operator!=(std::nullptr_t /*CGAL_triangulation_assertion_code(n)*/) const +operator!=(std::nullptr_t /*CGAL_assertion_code(n)*/) const { - //CGAL_triangulation_assertion( n == nullptr); + //CGAL_assertion( n == nullptr); return !(*this == nullptr); } @@ -499,7 +499,7 @@ Triangulation_ds_edge_circulator_2& Triangulation_ds_edge_circulator_2 :: operator++() { - CGAL_triangulation_precondition(pos != Face_handle() && + CGAL_precondition(pos != Face_handle() && _v != Vertex_handle()); int i = pos->index(_v); if (pos->dimension() == 1) { @@ -530,8 +530,8 @@ Triangulation_ds_edge_circulator_2& Triangulation_ds_edge_circulator_2 :: operator--() { - CGAL_triangulation_precondition(pos != Face_handle() && - _v != Vertex_handle()); + CGAL_precondition(pos != Face_handle() && + _v != Vertex_handle()); int i = pos->index(_v); if (pos->dimension() == 1) { @@ -584,18 +584,18 @@ is_empty() const template < class Tds > inline bool Triangulation_ds_edge_circulator_2 :: -operator==(std::nullptr_t /*CGAL_triangulation_assertion_code(n)*/) const +operator==(std::nullptr_t /*CGAL_assertion_code(n)*/) const { - //CGAL_triangulation_assertion( n == nullptr); + //CGAL_assertion( n == nullptr); return (_v == Vertex_handle() || pos == Face_handle()); } template < class Tds > inline bool Triangulation_ds_edge_circulator_2 :: -operator!=(std::nullptr_t /*CGAL_triangulation_assertion_code(n)*/) const +operator!=(std::nullptr_t /*CGAL_assertion_code(n)*/) const { - //CGAL_triangulation_assertion( n == nullptr); + //CGAL_assertion( n == nullptr); return !(*this == nullptr); } diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_ds_face_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_ds_face_2.h index 08e48d0a..330b8729 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_ds_face_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_ds_face_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_2/include/CGAL/Triangulation_ds_face_2.h $ -// $Id: Triangulation_ds_face_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_2/include/CGAL/Triangulation_ds_face_2.h $ +// $Id: include/CGAL/Triangulation_ds_face_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -67,8 +67,8 @@ typename Triangulation_ds_face_2::Vertex_handle Triangulation_ds_face_2:: mirror_vertex(int i) const { - CGAL_triangulation_precondition ( this->neighbor(i) != Face_handle() - && this->dimension() >= 1); + CGAL_precondition ( this->neighbor(i) != Face_handle() + && this->dimension() >= 1); //return neighbor(i)->vertex(neighbor(i)->index(this->handle())); return this->neighbor(i)->vertex(mirror_index(i)); } @@ -79,8 +79,8 @@ Triangulation_ds_face_2:: mirror_index(int i) const { // return the index of opposite vertex in neighbor(i); - CGAL_triangulation_precondition (this->neighbor(i) != Face_handle() && - this->dimension() >= 1); + CGAL_precondition (this->neighbor(i) != Face_handle() && + this->dimension() >= 1); if (this->dimension() == 1) { return 1 - (this->neighbor(i)->index(this->vertex(1-i))); } diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_ds_face_base_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_ds_face_base_2.h index 4cb1dbb1..b0bf87e2 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_ds_face_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_ds_face_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_2/include/CGAL/Triangulation_ds_face_base_2.h $ -// $Id: Triangulation_ds_face_base_2.h cff3cdb 2021-08-12T10:23:57+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_2/include/CGAL/Triangulation_ds_face_base_2.h $ +// $Id: include/CGAL/Triangulation_ds_face_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #include -#include +#include #include #include @@ -129,7 +129,7 @@ typename Triangulation_ds_face_base_2::Vertex_handle Triangulation_ds_face_base_2:: vertex(int i) const { - CGAL_triangulation_precondition( i == 0 || i == 1 || i == 2); + CGAL_precondition( i == 0 || i == 1 || i == 2); return V[i]; } @@ -169,7 +169,7 @@ index(Vertex_handle v) const { if (v == V[0]) return 0; if (v == V[1]) return 1; - CGAL_triangulation_assertion( v == V[2] ); + CGAL_assertion( v == V[2] ); return 2; } @@ -179,7 +179,7 @@ typename Triangulation_ds_face_base_2::Face_handle Triangulation_ds_face_base_2:: neighbor(int i) const { - CGAL_triangulation_precondition( i == 0 || i == 1 || i == 2); + CGAL_precondition( i == 0 || i == 1 || i == 2); return N[i]; } @@ -221,7 +221,7 @@ index(Face_handle n) const { if (n == N[0]) return 0; if (n == N[1]) return 1; - CGAL_triangulation_assertion( n == N[2] ); + CGAL_assertion( n == N[2] ); return 2; } @@ -230,7 +230,7 @@ inline void Triangulation_ds_face_base_2 :: set_vertex(int i, Vertex_handle v) { - CGAL_triangulation_precondition( i == 0 || i == 1 || i == 2); + CGAL_precondition( i == 0 || i == 1 || i == 2); V[i] = v; } @@ -239,8 +239,8 @@ inline void Triangulation_ds_face_base_2 :: set_neighbor(int i, Face_handle n) { - CGAL_triangulation_precondition( i == 0 || i == 1 || i == 2); - CGAL_triangulation_precondition( this != n.operator->() ); + CGAL_precondition( i == 0 || i == 1 || i == 2); + CGAL_precondition( this != n.operator->() ); N[i] = n; } @@ -275,9 +275,9 @@ inline void Triangulation_ds_face_base_2 :: set_neighbors(Face_handle n0,Face_handle n1, Face_handle n2) { - CGAL_triangulation_precondition( this != n0.operator->() ); - CGAL_triangulation_precondition( this != n1.operator->() ); - CGAL_triangulation_precondition( this != n2.operator->() ); + CGAL_precondition( this != n0.operator->() ); + CGAL_precondition( this != n1.operator->() ); + CGAL_precondition( this != n2.operator->() ); N[0] = n0; N[1] = n1; N[2] = n2; diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_ds_full_cell.h b/thirdparty/CGAL/include/CGAL/Triangulation_ds_full_cell.h index 2538c7bf..505c7bf5 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_ds_full_cell.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_ds_full_cell.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/Triangulation_ds_full_cell.h $ -// $Id: Triangulation_ds_full_cell.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/Triangulation_ds_full_cell.h $ +// $Id: include/CGAL/Triangulation_ds_full_cell.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_ds_iterators_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_ds_iterators_2.h index e8b8b2c9..6b702ab9 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_ds_iterators_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_ds_iterators_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_2/include/CGAL/Triangulation_ds_iterators_2.h $ -// $Id: Triangulation_ds_iterators_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_2/include/CGAL/Triangulation_ds_iterators_2.h $ +// $Id: include/CGAL/Triangulation_ds_iterators_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #include -#include +#include #include namespace CGAL { @@ -109,7 +109,7 @@ void Triangulation_ds_edge_iterator_2:: increment() { - CGAL_triangulation_precondition(_tds->dimension() >= 1); + CGAL_precondition(_tds->dimension() >= 1); if (_tds->dimension() == 1) ++pos; else if (edge.second == 2) {edge.second = 0; ++pos;} else edge.second += 1; @@ -122,7 +122,7 @@ void Triangulation_ds_edge_iterator_2:: decrement() { - CGAL_triangulation_precondition(_tds->dimension() >= 1); + CGAL_precondition(_tds->dimension() >= 1); if (_tds->dimension() == 1) --pos; else if (edge.second == 0) { edge.second = 2; --pos;} else edge.second -= 1; @@ -145,7 +145,7 @@ Triangulation_ds_edge_iterator_2& Triangulation_ds_edge_iterator_2:: operator++() { - //CGAL_triangulation_precondition(pos != Iterator_base() && + //CGAL_precondition(pos != Iterator_base() && // pos != _tds->faces().end()); do increment(); while( pos != _tds->faces().end() && !associated_edge()); @@ -159,7 +159,7 @@ Triangulation_ds_edge_iterator_2& Triangulation_ds_edge_iterator_2:: operator--() { - // CGAL_triangulation_precondition(pos != Iterator_base() + // CGAL_precondition(pos != Iterator_base() // && *this != Edge_iterator(_tds)); do decrement(); while ( !associated_edge() && *this != Edge_iterator(_tds) ); diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex.h b/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex.h index ef2d3d31..050b9f02 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/Triangulation_ds_vertex.h $ -// $Id: Triangulation_ds_vertex.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/Triangulation_ds_vertex.h $ +// $Id: include/CGAL/Triangulation_ds_vertex.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex_2.h index 7515affd..6d2df357 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_2/include/CGAL/Triangulation_ds_vertex_2.h $ -// $Id: Triangulation_ds_vertex_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_2/include/CGAL/Triangulation_ds_vertex_2.h $ +// $Id: include/CGAL/Triangulation_ds_vertex_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #include -#include +#include namespace CGAL { @@ -68,7 +68,7 @@ class Triangulation_ds_vertex_2 bool is_valid(bool verbose = false, int level = 0); private: - // used to implement deprected access to circulators + // used to implement deprecated access to circulators Vertex_handle handle(); }; @@ -105,13 +105,13 @@ Triangulation_ds_vertex_2 :: is_valid(bool verbose, int level) { bool result = Vb::is_valid(verbose, level); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); if (this->face() != Face_handle()) { // face==nullptr if dim <0 result = result && ( &*this->face()->vertex(0) == this || &*this->face()->vertex(1) == this || &*this->face()->vertex(2) == this ); } - CGAL_triangulation_assertion(result); + CGAL_assertion(result); return result; } diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex_base_2.h index 43bfe8ae..0e70f6b6 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_2/include/CGAL/Triangulation_ds_vertex_base_2.h $ -// $Id: Triangulation_ds_vertex_base_2.h d1a323c 2020-03-26T19:24:14+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_2/include/CGAL/Triangulation_ds_vertex_base_2.h $ +// $Id: include/CGAL/Triangulation_ds_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex_base_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex_base_3.h index 85a346d8..53b8ab53 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_ds_vertex_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_3/include/CGAL/Triangulation_ds_vertex_base_3.h $ -// $Id: Triangulation_ds_vertex_base_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_3/include/CGAL/Triangulation_ds_vertex_base_3.h $ +// $Id: include/CGAL/Triangulation_ds_vertex_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_face.h b/thirdparty/CGAL/include/CGAL/Triangulation_face.h index 16a65ec3..b4cb0fc9 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_face.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_face.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/Triangulation_face.h $ -// $Id: Triangulation_face.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/Triangulation_face.h $ +// $Id: include/CGAL/Triangulation_face.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_face_base_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_face_base_2.h index 4f4cc892..160e0517 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_face_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_face_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_face_base_2.h $ -// $Id: Triangulation_face_base_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_face_base_2.h $ +// $Id: include/CGAL/Triangulation_face_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #include -#include +#include #include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_face_base_with_id_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_face_base_with_id_2.h index 2089c394..9a601ba9 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_face_base_with_id_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_face_base_with_id_2.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_face_base_with_id_2.h $ -// $Id: Triangulation_face_base_with_id_2.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_face_base_with_id_2.h $ +// $Id: include/CGAL/Triangulation_face_base_with_id_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Mael Rouxel-Labbé @@ -12,6 +12,9 @@ #ifndef CGAL_TRIANGULATION_FACE_BASE_WITH_ID_2_H #define CGAL_TRIANGULATION_FACE_BASE_WITH_ID_2_H +#include + + #include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_face_base_with_info_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_face_base_with_info_2.h index 7a389ce6..72baf929 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_face_base_with_info_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_face_base_with_info_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_face_base_with_info_2.h $ -// $Id: Triangulation_face_base_with_info_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_face_base_with_info_2.h $ +// $Id: include/CGAL/Triangulation_face_base_with_info_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_full_cell.h b/thirdparty/CGAL/include/CGAL/Triangulation_full_cell.h index 3a527eb9..1094c68c 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_full_cell.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_full_cell.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/Triangulation_full_cell.h $ -// $Id: Triangulation_full_cell.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/Triangulation_full_cell.h $ +// $Id: include/CGAL/Triangulation_full_cell.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_geom_traits_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_geom_traits_3.h index d7aa3787..1f9e16ff 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_geom_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_geom_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Triangulation_geom_traits_3.h $ -// $Id: Triangulation_geom_traits_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Triangulation_geom_traits_3.h $ +// $Id: include/CGAL/Triangulation_geom_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -22,8 +22,6 @@ #include -#include - namespace CGAL { template < class Repres > diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_2.h index cf714bb4..1f3d1d07 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h $ -// $Id: Triangulation_hierarchy_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h $ +// $Id: include/CGAL/Triangulation_hierarchy_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,12 +21,11 @@ #include #include #include -#include +#include #include #include #include -#include #include #include #include @@ -252,7 +251,7 @@ class Triangulation_hierarchy_2 Vertex_handle nearest_vertex_dispatch(const Point&, Face_handle, Tag_true) const { - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return Vertex_handle(); } @@ -267,7 +266,7 @@ class Triangulation_hierarchy_2 // helping function to copy_triangulation // the version to be used with Tag_true is templated to avoid - // systematique instanciation + // systematic instantiation template void add_hidden_vertices_into_map(Tag, std::map& V) @@ -309,7 +308,7 @@ Triangulation_hierarchy_2(const Triangulation_hierarchy_2 &tr) } -//Assignement +//Assignment template Triangulation_hierarchy_2 & Triangulation_hierarchy_2:: @@ -582,7 +581,7 @@ template typename Triangulation_hierarchy_2::Vertex_handle Triangulation_hierarchy_2:: move(Vertex_handle v, const Point &p) { - CGAL_triangulation_precondition(!is_infinite(v)); + CGAL_precondition(!is_infinite(v)); Vertex_handle w = move_if_no_collision(v,p); if(w != v) { remove(v); diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_3.h index 8e94ba2a..d279c117 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h $ -// $Id: Triangulation_hierarchy_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h $ +// $Id: include/CGAL/Triangulation_hierarchy_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include @@ -48,7 +48,6 @@ #include #include #include -#include #include #include @@ -179,12 +178,12 @@ class Triangulation_hierarchy_3 template < class InputIterator > std::ptrdiff_t insert( InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< + std::enable_if_t< + std::is_convertible< typename std::iterator_traits::value_type, Point - > - >::type* = nullptr + >::value + >* = nullptr ) #else template < class InputIterator > @@ -316,11 +315,11 @@ class Triangulation_hierarchy_3 std::ptrdiff_t insert( InputIterator first, InputIterator last, - typename boost::enable_if< - boost::is_convertible< + std::enable_if_t< + std::is_convertible< typename std::iterator_traits::value_type, std::pair::type> - > >::type* =nullptr + >::value >* =nullptr ) { return insert_with_info< std::pair::type> >(first,last); @@ -330,12 +329,10 @@ class Triangulation_hierarchy_3 std::ptrdiff_t insert( boost::zip_iterator< boost::tuple > first, boost::zip_iterator< boost::tuple > last, - typename boost::enable_if< - boost::mpl::and_< - boost::is_convertible< typename std::iterator_traits::value_type, Point >, - boost::is_convertible< typename std::iterator_traits::value_type, typename internal::Info_check::type > - > - >::type* =nullptr + std::enable_if_t< + std::is_convertible_v< typename std::iterator_traits::value_type, Point > && + std::is_convertible_v< typename std::iterator_traits::value_type, typename internal::Info_check::type > + >* =nullptr ) { return insert_with_info< boost::tuple::type> >(first,last); @@ -358,8 +355,8 @@ class Triangulation_hierarchy_3 template < typename InputIterator > size_type remove_cluster(InputIterator first, InputIterator beyond) { - CGAL_triangulation_precondition(!this->does_repeat_in_range(first, beyond)); - CGAL_triangulation_precondition(!this->infinite_vertex_in_range(first, beyond)); + CGAL_precondition(!this->does_repeat_in_range(first, beyond)); + CGAL_precondition(!this->infinite_vertex_in_range(first, beyond)); size_type n = this->number_of_vertices(); std::vector vo(first, beyond), vc; int l=0; @@ -439,7 +436,7 @@ class Triangulation_hierarchy_3 struct locs { Cell_handle pos; - int li, lj; + int li = -1, lj = -1; Locate_type lt; }; @@ -538,7 +535,7 @@ insert(const Point &p, Cell_handle start) { int vertex_level = random_level(); Locate_type lt; - int i, j; + int i = -1, j = -1; // locate using hierarchy locs positions[maxlevel]; locate(p, lt, i, j, positions, start); @@ -686,7 +683,7 @@ void Triangulation_hierarchy_3:: remove(Vertex_handle v) { - CGAL_triangulation_precondition(v != Vertex_handle()); + CGAL_precondition(v != Vertex_handle()); for (int l = 0; l < maxlevel; ++l) { Vertex_handle u = v->up(); hierarchy[l]->remove(v); @@ -702,8 +699,8 @@ void Triangulation_hierarchy_3:: remove_and_give_new_cells(Vertex_handle v, OutputItCells fit) { - CGAL_triangulation_precondition(v != Vertex_handle()); - CGAL_triangulation_precondition(!is_infinite(v)); + CGAL_precondition(v != Vertex_handle()); + CGAL_precondition(!is_infinite(v)); for (int l = 0; l < maxlevel; ++l) { Vertex_handle u = v->up(); if(l) hierarchy[l]->remove(v); @@ -719,7 +716,7 @@ typename Triangulation_hierarchy_3::Vertex_handle Triangulation_hierarchy_3:: move_if_no_collision(Vertex_handle v, const Point & p) { - CGAL_triangulation_precondition(!this->is_infinite(v)); + CGAL_precondition(!this->is_infinite(v)); if(v->point() == p) return v; Vertex_handle ans; for (int l = 0; l < maxlevel; ++l) { @@ -739,7 +736,7 @@ typename Triangulation_hierarchy_3::Vertex_handle Triangulation_hierarchy_3:: move(Vertex_handle v, const Point & p) { - CGAL_triangulation_precondition(!this->is_infinite(v)); + CGAL_precondition(!this->is_infinite(v)); if(v->point() == p) return v; Vertex_handle w = move_if_no_collision(v,p); if(w != v) { @@ -756,7 +753,7 @@ Triangulation_hierarchy_3:: move_if_no_collision_and_give_new_cells( Vertex_handle v, const Point & p, OutputItCells fit) { - CGAL_triangulation_precondition(!is_infinite(v)); + CGAL_precondition(!is_infinite(v)); if(v->point() == p) return v; Vertex_handle ans; for (int l = 0; l < maxlevel; ++l) { diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_vertex_base_2.h index b65d32a8..d3927ad0 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_hierarchy_vertex_base_2.h $ -// $Id: Triangulation_hierarchy_vertex_base_2.h d1a323c 2020-03-26T19:24:14+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_hierarchy_vertex_base_2.h $ +// $Id: include/CGAL/Triangulation_hierarchy_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_vertex_base_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_vertex_base_3.h index e3d6b216..84811e6e 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_vertex_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_hierarchy_vertex_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Triangulation_hierarchy_vertex_base_3.h $ -// $Id: Triangulation_hierarchy_vertex_base_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Triangulation_hierarchy_vertex_base_3.h $ +// $Id: include/CGAL/Triangulation_hierarchy_vertex_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_incremental_builder_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_incremental_builder_3.h index e406433f..e0aff2c0 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_incremental_builder_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_incremental_builder_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/Triangulation_incremental_builder_3.h $ -// $Id: Triangulation_incremental_builder_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/Triangulation_incremental_builder_3.h $ +// $Id: include/CGAL/Triangulation_incremental_builder_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2.h index 0169c81b..1425e650 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2.h $ -// $Id: Triangulation_on_sphere_2.h d871728 2021-07-23T13:09:37+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2.h $ +// $Id: include/CGAL/Triangulation_on_sphere_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mariette Yvinec, @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -123,7 +123,7 @@ class Triangulation_on_sphere_2 _gt.set_radius(radius); } - // Assignement + // Assignment void swap(Triangulation_on_sphere_2& tr); Triangulation_on_sphere_2& operator=(Triangulation_on_sphere_2 tr); // intentional copy @@ -417,7 +417,7 @@ class Triangulation_on_sphere_2 Arc_on_sphere_2 segment_on_sphere(const Face_handle f, int i) const { - CGAL_triangulation_precondition(!is_ghost(f, i)); + CGAL_precondition(!is_ghost(f, i)); return geom_traits().construct_arc_on_sphere_2_object()(point(f, ccw(i)), point(f, cw(i))); } @@ -512,7 +512,7 @@ clear() _tds.clear(); } -// Assignement +// Assignment template void Triangulation_on_sphere_2:: @@ -695,7 +695,7 @@ typename Triangulation_on_sphere_2::Face_handle Triangulation_on_sphere_2:: march_locate_1D(const Point& p, Locate_type& lt, int& li) const { - CGAL_triangulation_assertion(dimension() == 1); + CGAL_assertion(dimension() == 1); // Check if p is coplanar with the existing points first three points of the triangulation Face_handle f = all_edges_begin()->first; @@ -743,8 +743,8 @@ march_locate_2D(Face_handle f, Locate_type& lt, int& li) const { - CGAL_triangulation_precondition(dimension() == 2); - CGAL_triangulation_precondition(!is_ghost(f)); + CGAL_precondition(dimension() == 2); + CGAL_precondition(!is_ghost(f)); boost::rand48 rng; boost::uniform_smallint<> two(0, 1); @@ -973,7 +973,7 @@ march_locate_2D(Face_handle f, default: { // impossible - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return f; } } @@ -1221,21 +1221,21 @@ check_neighboring_faces() const { for(All_faces_iterator eit=all_faces_begin(); eit!=all_faces_end(); ++eit) { - CGAL_triangulation_assertion_code(const Face_handle f1 = eit->neighbor(0);) - CGAL_triangulation_assertion_code(const Face_handle f2 = eit->neighbor(1);) - CGAL_triangulation_assertion(f1->has_neighbor(eit)); - CGAL_triangulation_assertion(f2->has_neighbor(eit)); + CGAL_assertion_code(const Face_handle f1 = eit->neighbor(0);) + CGAL_assertion_code(const Face_handle f2 = eit->neighbor(1);) + CGAL_assertion(f1->has_neighbor(eit)); + CGAL_assertion(f2->has_neighbor(eit)); } } for(All_faces_iterator eit=all_faces_begin(); eit!=all_faces_end(); ++eit) { - CGAL_triangulation_assertion_code(const Face_handle f1 = eit->neighbor(0);) - CGAL_triangulation_assertion_code(const Face_handle f2 = eit->neighbor(1);) - CGAL_triangulation_assertion_code(const Face_handle f3 = eit->neighbor(2);) - CGAL_triangulation_assertion(f1->has_neighbor(eit)); - CGAL_triangulation_assertion(f2->has_neighbor(eit)); - CGAL_triangulation_assertion(f3->has_neighbor(eit)); + CGAL_assertion_code(const Face_handle f1 = eit->neighbor(0);) + CGAL_assertion_code(const Face_handle f2 = eit->neighbor(1);) + CGAL_assertion_code(const Face_handle f3 = eit->neighbor(2);) + CGAL_assertion(f1->has_neighbor(eit)); + CGAL_assertion(f2->has_neighbor(eit)); + CGAL_assertion(f3->has_neighbor(eit)); } } @@ -1257,7 +1257,7 @@ is_valid_vertex(Vertex_handle vh, bool verbose, int /*level*/) const show_face(vh->face()); } - CGAL_triangulation_assertion(false); + CGAL_assertion(false); return false; } @@ -1283,7 +1283,7 @@ is_valid(bool verbose, { const Orientation s = orientation(point(it1), point(it2), point(it3)); result = result && (s == COLLINEAR); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); ++it1; ++it2; ++it3; } } @@ -1292,7 +1292,7 @@ is_valid(bool verbose, for(All_faces_iterator it=all_faces_begin(); it!=all_faces_end(); ++it) { const Orientation s = orientation_on_sphere(point(it, 0), point(it, 1), point(it, 2)); - CGAL_triangulation_assertion(s == LEFT_TURN || is_ghost(it)); + CGAL_assertion(s == LEFT_TURN || is_ghost(it)); result = result && (s == LEFT_TURN || is_ghost(it)); } @@ -1301,7 +1301,7 @@ is_valid(bool verbose, // which does not know the number of components nor the genus result = result && (number_of_faces() == (2 * number_of_vertices() - 4)); - CGAL_triangulation_assertion(result); + CGAL_assertion(result); } return result; @@ -1340,7 +1340,7 @@ std::istream& operator>>(std::istream& is, Triangulation_on_sphere_2& tr) { tr.file_input(is); - CGAL_triangulation_assertion(tr.is_valid()); + CGAL_assertion(tr.is_valid()); return is; } diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2/IO/OFF.h b/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2/IO/OFF.h index e2918d98..bf82d1f2 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2/IO/OFF.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2/IO/OFF.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/IO/OFF.h $ -// $Id: OFF.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/IO/OFF.h $ +// $Id: include/CGAL/Triangulation_on_sphere_2/IO/OFF.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -14,7 +14,7 @@ #include -#include +#include #include #include @@ -94,7 +94,7 @@ bool write_OFF(std::ostream& os, index_of_vertex[vh] = i; } - CGAL_triangulation_assertion(i == n); + CGAL_assertion(i == n); size_type number_of_triangles = 0; for(Face_iterator fit = dt.all_faces_begin() ; fit != dt.all_faces_end() ; ++fit) diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h b/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h index d66e028d..068799de 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h $ -// $Id: arc_on_sphere_2_subsampling.h 8de892f 2021-05-12T10:05:26+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h $ +// $Id: include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sébastien Loriot @@ -15,7 +15,7 @@ #include -#include +#include #include #ifdef CGAL_EIGEN3_ENABLED @@ -56,7 +56,7 @@ double get_theta(typename Kernel::Point_3& pt, #endif >::type Col; - CGAL_static_assertion_msg(!(std::is_same::value), + static_assert(!(std::is_same::value), "Eigen is required to perform arc subsampling!"); auto V1c = V1.cartesian_begin(), V2c = V2.cartesian_begin(), V3c = V3.cartesian_begin(); @@ -103,7 +103,7 @@ void subsample_arc_on_sphere_2(const typename Kernel::Circle_3& circle, if(source > target) target += 2*CGAL_PI; - CGAL_triangulation_assertion(target > source); + CGAL_assertion(target > source); const double radius = sqrt(circle.squared_radius()); const double edge_len = (target - source) * radius; @@ -115,7 +115,7 @@ void subsample_arc_on_sphere_2(const typename Kernel::Circle_3& circle, for(int i=0; i(circle.center(), radius, current_theta, b1, b2); } *out_pts++ = compute_point(circle.center(), radius, target, b1, b2); diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2/internal/get_precision_bounds.h b/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2/internal/get_precision_bounds.h index 84cec203..3ff7d703 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2/internal/get_precision_bounds.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_on_sphere_2/internal/get_precision_bounds.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/get_precision_bounds.h $ -// $Id: get_precision_bounds.h bd5a54e 2021-03-24T13:30:58+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/get_precision_bounds.h $ +// $Id: include/CGAL/Triangulation_on_sphere_2/internal/get_precision_bounds.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -25,7 +25,7 @@ namespace CGAL { namespace Triangulations_on_sphere_2 { namespace internal { -// @todo could do something more suble than requiring exact SQRT representation (Root_of_2 etc.) +// @todo could do something more subtle than requiring exact SQRT representation (Root_of_2 etc.) template #include -#include -#include +#include #include #include @@ -27,6 +26,7 @@ #include #include +#include // If defined, type casting is done statically, // reducing type-safety overhead. @@ -81,7 +81,7 @@ struct Incrementer { * * \tparam Tr_ is the triangulation type to traverse. * - * \cgalModels{ForwardIterator} + * \cgalModels{ForwardIterator} * * \sa `Triangulation_3` * \sa `Forward_circulator_base` @@ -113,7 +113,13 @@ class Triangulation_segment_cell_iterator_3 typedef typename Tr::Locate_type Locate_type; //< defines the simplex type returned from location. - typedef std::tuple Simplex; //< defines the simplex type. + struct Simplex //< defines the simplex type + { + Cell_handle cell = {}; + Locate_type lt = Locate_type::OUTSIDE_AFFINE_HULL; + int li = -1; + int lj = -1; + }; typedef Cell value_type; //< defines the value type the iterator refers to. typedef Cell& reference; //< defines the reference type of the iterator. @@ -127,6 +133,55 @@ class Triangulation_segment_cell_iterator_3 template < class Tr2, class Inc2 > struct Rebind { typedef Triangulation_segment_cell_iterator_3 Other; }; +#if CGAL_DEBUG_TRIANGULATION_SEGMENT_TRAVERSER_3 + static auto display_vert(Vertex_handle v) + { + std::stringstream os; + os.precision(17); + if(v->time_stamp() == 0) { + os << "inf"; + } else { + os << '#' << v->time_stamp() << "=(" << v->point() << ")"; + } + return os.str(); + }; + + static auto display_lt(Locate_type lt) { + std::stringstream os; + switch(lt) { + case Locate_type::VERTEX: os << " VERTEX"; break; + case Locate_type::EDGE: os << " EDGE"; break; + case Locate_type::FACET: os << " FACET"; break; + case Locate_type::CELL: os << " CELL"; break; + case Locate_type::OUTSIDE_CONVEX_HULL: os << " OUTSIDE_CONVEX_HULL"; break; + case Locate_type::OUTSIDE_AFFINE_HULL: os << " OUTSIDE_AFFINE_HULL"; break; + } + return os.str(); + } + + static auto debug_simplex(Simplex s) { + std::stringstream os; + os.precision(17); + const auto [c, lt, i, j] = s; + if(c == Cell_handle{}) { + os << "end()"; + } else { + os << display_vert(c->vertex(0)) << " - " << display_vert(c->vertex(1)) << " - " + << display_vert(c->vertex(2)) << " - " << display_vert(c->vertex(3)); + os << display_lt(lt) << " " << i << " " << j; + } + return os.str(); + } + + auto debug_iterator() const + { + std::stringstream os; + os.precision(17); + os << " prev: " << debug_simplex(_prev) << "\n cur: " << debug_simplex(_cur); + return os.str(); + } +#endif // CGAL_DEBUG_TRIANGULATION_SEGMENT_TRAVERSER_3 + private: typedef Segment_cell_iterator SCI; @@ -223,20 +278,22 @@ class Triangulation_segment_cell_iterator_3 */ const Point& source() const { return _source; } - // gives the target point of the segment follwoed. + // gives the target point of the segment followed. /* \return the target point. */ const Point& target() const { return _target; } + Vertex_handle target_vertex() const { return _t_vertex; } + // gives a handle to the current cell. /* By invariance, this cell is intersected by the segment * between `source()` and `target()`. * \return a handle to the current cell. * \sa `cell()`. */ - Cell_handle handle() + Cell_handle handle() const { - return std::get<0>(_cur); + return _cur.cell; } // gives the previous cell. @@ -257,7 +314,7 @@ class Triangulation_segment_cell_iterator_3 */ Cell* operator->() { - return &*std::get<0>(_cur); + return &*(_cur.cell); } // provides an indirection operator. @@ -265,7 +322,7 @@ class Triangulation_segment_cell_iterator_3 */ Cell& operator*() { - return *std::get<0>(_cur); + return *(_cur.cell); } // provides a conversion operator. @@ -273,11 +330,11 @@ class Triangulation_segment_cell_iterator_3 */ operator Cell_handle() const { - return std::get<0>(_cur); + return _cur.cell; } // provides a conversion operator. - /* \return the simplex through wich the current cell was entered. + /* \return the simplex through which the current cell was entered. */ operator Simplex() const { return _cur; } @@ -299,6 +356,10 @@ class Triangulation_segment_cell_iterator_3 { lt = this->lt(); li = this->li(); lj = this->lj(); } + std::tuple entry() const + { + return { lt(), li(), lj() }; + } // gives the simplex through which the previous cell was exited. /* \pre the current cell is not the initial cell. */ @@ -306,6 +367,10 @@ class Triangulation_segment_cell_iterator_3 { lt = prev_lt(); li = prev_li(); lj = prev_lj(); } + std::tuple exit() const + { + return { prev_lt(), prev_li(), prev_lj() }; + } // gives the past-the-end iterator associated with this iterator. SCI end() const; @@ -364,7 +429,7 @@ class Triangulation_segment_cell_iterator_3 */ bool operator==( const Cell_handle& ch ) const { - return ch == std::get<0>(_cur); + return ch == _cur.cell; } // compares the current cell with `ch`. @@ -375,11 +440,11 @@ class Triangulation_segment_cell_iterator_3 */ bool operator!=( const Cell_handle& ch ) const { - return ch != std::get<0>(_cur); + return ch != _cur.cell; } // \} - bool operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const; + bool operator==( Nullptr_t CGAL_assertion_code(n) ) const; bool operator!=( Nullptr_t n ) const; protected: @@ -422,9 +487,9 @@ class Triangulation_segment_cell_iterator_3 private: inline int edgeIndex( int i, int j ) const { - CGAL_triangulation_precondition( i>=0 && i<=3 ); - CGAL_triangulation_precondition( j>=0 && j<=3 ); - CGAL_triangulation_precondition( i != j ); + CGAL_precondition( i>=0 && i<=3 ); + CGAL_precondition( j>=0 && j<=3 ); + CGAL_precondition( i != j ); return ( i==0 || j==0 ) ? i+j-1 : i+j; } @@ -439,32 +504,33 @@ class Triangulation_segment_cell_iterator_3 Edge opposite_edge(Cell_handle c, int li, int lj) const; Edge opposite_edge(const Edge& e) const; +protected: // ref-accessors to the simplex, for use in internal code // access _cur - Cell_handle& cell() { return std::get<0>(_cur); } - Cell_handle const& cell() const { return std::get<0>(_cur); } + Cell_handle& cell() { return _cur.cell; } + Cell_handle const& cell() const { return _cur.cell; } - Locate_type& lt() { return std::get<1>(_cur); } - Locate_type const& lt() const { return std::get<1>(_cur); } + Locate_type& lt() { return _cur.lt; } + Locate_type const& lt() const { return _cur.lt; } - int& li() { return std::get<2>(_cur); } - int const& li() const { return std::get<2>(_cur); } + int& li() { return _cur.li; } + int const& li() const { return _cur.li; } - int& lj() { return std::get<3>(_cur); } - int const& lj() const { return std::get<3>(_cur); } + int& lj() { return _cur.lj; } + int const& lj() const { return _cur.lj; } // access _prev - Cell_handle& prev_cell() { return std::get<0>(_prev); } - Cell_handle const& prev_cell() const { return std::get<0>(_prev); } + Cell_handle& prev_cell() { return _prev.cell; } + Cell_handle const& prev_cell() const { return _prev.cell; } - Locate_type& prev_lt() { return std::get<1>(_prev); } - Locate_type const& prev_lt() const { return std::get<1>(_prev); } + Locate_type& prev_lt() { return _prev.lt; } + Locate_type const& prev_lt() const { return _prev.lt; } - int& prev_li() { return std::get<2>(_prev); } - int const& prev_li() const { return std::get<2>(_prev); } + int& prev_li() { return _prev.li; } + int const& prev_li() const { return _prev.li; } - int& prev_lj() { return std::get<3>(_prev); } - int const& prev_lj() const { return std::get<3>(_prev); } + int& prev_lj() { return _prev.lj; } + int const& prev_lj() const { return _prev.lj; } }; // class Triangulation_segment_cell_iterator_3 @@ -572,7 +638,7 @@ class Triangulation_segment_simplex_iterator_3 const Point& source() const { return _cell_iterator.source(); } const Point& target() const { return _cell_iterator.target(); } - const Tr* triangulation() const { return _cell_iterator.triangulation(); } + const Tr& triangulation() const { return *_cell_iterator.triangulation(); } private: Triangulation_segment_simplex_iterator_3 @@ -584,20 +650,23 @@ class Triangulation_segment_simplex_iterator_3 private: void set_curr_simplex_to_entry() { +#if CGAL_DEBUG_TRIANGULATION_SEGMENT_TRAVERSER_3 + std::cerr << "cell iterator is:\n" << _cell_iterator.debug_iterator() << std::endl; +#endif // #if CGAL_DEBUG_TRIANGULATION_SEGMENT_TRAVERSER_3 + Locate_type lt; int li, lj; - Cell_handle cell; + Cell_handle cell = Cell_handle(_cell_iterator); //check what is the entry type of _cell_iterator - if (Cell_handle(_cell_iterator) == Cell_handle()) + if (cell == Cell_handle()) { - //where did the segment std::get out from previous cell + //where did the segment get out from previous cell cell = _cell_iterator.previous(); _cell_iterator.exit(lt, li, lj); } else { - cell = Cell_handle(_cell_iterator); _cell_iterator.entry(lt, li, lj); } @@ -623,7 +692,7 @@ class Triangulation_segment_simplex_iterator_3 _curr_simplex = cell; break; default: - CGAL_assertion(false); + CGAL_unreachable(); }; } @@ -637,282 +706,145 @@ class Triangulation_segment_simplex_iterator_3 // provides the increment postfix operator. Simplex_iterator& operator++() { + auto increment_cell_iterator = [&]() { + ++_cell_iterator; +#if CGAL_DEBUG_TRIANGULATION_SEGMENT_TRAVERSER_3 + std::cerr << "increment cell iterator to:\n" << _cell_iterator.debug_iterator() << '\n'; +#endif + }; CGAL_assertion(_curr_simplex.incident_cell() != Cell_handle()); - switch(_curr_simplex.dimension()) - { - case 3 :/*Cell_handle*/ - { - Cell_handle ch = Cell_handle(_cell_iterator); - if (ch == Cell_handle()) - { - if(!triangulation()->is_infinite(Cell_handle(_curr_simplex))) - set_curr_simplex_to_entry(); - else - _curr_simplex = Simplex_3(); - break; - } - else - { - if (!cell_iterator_is_ahead()) - ++_cell_iterator; - set_curr_simplex_to_entry(); - } - break; + if(!cell_iterator_is_ahead()) { + increment_cell_iterator(); // cell_iterator needs to be ahead } - case 2 :/*Facet*/ - { - Cell_handle ch = Cell_handle(_cell_iterator); - if (!cell_iterator_is_ahead()) - { - //cell_iterator is not ahead. get_facet() is part of cell_iterator - //we cannot be in any of the degenerate cases, only detected by - //taking cell_iterator one step forward - CGAL_assertion(cell_has_facet(Cell_handle(_cell_iterator), get_facet())); - ++_cell_iterator; - if (Cell_handle(_cell_iterator) == Cell_handle()) - { - _curr_simplex = _cell_iterator.previous(); - break; - } - } - else - ch = _cell_iterator.previous(); - - Cell_handle chnext = Cell_handle(_cell_iterator); - Locate_type ltnext; - int linext, ljnext; - _cell_iterator.entry(ltnext, linext, ljnext); - switch (ltnext)//entry simplex in next cell - { - case Locate_type::VERTEX: - { - if (_cell_iterator == _cell_iterator.end()) - { - _curr_simplex = Simplex_3(); - break; - } - //if the entry vertex is a vertex of current facet - int i; - if (triangulation()->has_vertex(get_facet(), chnext->vertex(linext), i)) - set_curr_simplex_to_entry(); - else - _curr_simplex = ch; - break; - } - - case Locate_type::EDGE: - if (facet_has_edge(get_facet(), Edge(chnext, linext, ljnext))) - set_curr_simplex_to_entry(); - else - _curr_simplex = ch; - break; - case Locate_type::FACET: - _curr_simplex = ch; - break; + Cell_handle ch_next = Cell_handle(_cell_iterator); + Cell_handle ch_prev = _cell_iterator.previous(); + Locate_type lt_prev; + int li_prev, lj_prev; + _cell_iterator.exit(lt_prev, li_prev, lj_prev); - case Locate_type::OUTSIDE_AFFINE_HULL: - _curr_simplex = Simplex_3(); - break; - - default: - CGAL_assertion(false); - }; - break; + if(_curr_simplex.dimension() == 3) { + set_curr_simplex_to_entry(); + return *this; } - case 1:/*Edge*/ + if(lt_prev == Locate_type::CELL || + lt_prev == Locate_type::OUTSIDE_CONVEX_HULL || + lt_prev == Locate_type::OUTSIDE_AFFINE_HULL) { - Cell_handle ch = Cell_handle(_cell_iterator); - if (ch == _cell_iterator.previous()) - { - _curr_simplex = Simplex_3(); - break; - } - Locate_type lt; - int li, lj; - _cell_iterator.entry(lt, li, lj); - - if (!cell_iterator_is_ahead()) - { - ++_cell_iterator;//cell_iterator needs to be ahead to detect degeneracies - if (Cell_handle(_cell_iterator) == Cell_handle()) - { - _curr_simplex = _cell_iterator.previous(); - break; - } - } + CGAL_assertion(ch_next == Cell_handle()); + _curr_simplex = ch_prev; + return *this; + } - Cell_handle chnext = Cell_handle(_cell_iterator); - Locate_type ltnext; - int linext, ljnext; - _cell_iterator.entry(ltnext, linext, ljnext); - switch (ltnext)//entry simplex in next cell - { - case Locate_type::VERTEX: - if (edge_has_vertex(get_edge(), chnext->vertex(linext))) - _curr_simplex = chnext->vertex(linext); - else - _curr_simplex = shared_facet(get_edge(), chnext->vertex(linext)); - break; + switch(_curr_simplex.dimension()) { + case 2: { /*Facet*/ + CGAL_assertion((ch_next == Cell_handle()) == (_cell_iterator == _cell_iterator.end())); - case Locate_type::EDGE: - { - CGAL_assertion(_cell_iterator == _cell_iterator.end() - || triangulation()->is_infinite(chnext) - || _curr_simplex != Simplex_3(Edge(chnext, linext, ljnext))); - - if (_cell_iterator == _cell_iterator.end()) - _curr_simplex = Simplex_3(); - else if (triangulation()->is_infinite(chnext) - && _curr_simplex == Simplex_3(Edge(chnext, linext, ljnext))) - _curr_simplex = chnext; + switch(lt_prev) { + case Locate_type::VERTEX: { // facet-cell?-vertex-outside + Vertex_handle v_prev{ch_prev->vertex(li_prev)}; + if(facet_has_vertex(get_facet(), v_prev)) + _curr_simplex = v_prev; else - _curr_simplex = shared_facet(get_edge(), Edge(chnext, linext, ljnext)); - break; - } - - case Locate_type::FACET: - _curr_simplex = Cell_handle(_cell_iterator);//query goes through the cell - break; - - case Locate_type::OUTSIDE_AFFINE_HULL: - { - Cell_handle chprev = _cell_iterator.previous(); - Locate_type ltprev; - int liprev, ljprev; - _cell_iterator.exit(ltprev, liprev, ljprev); - - if (ltprev == Locate_type::VERTEX) //edge-vertex-outside - _curr_simplex = chprev->vertex(liprev); + _curr_simplex = ch_prev; + } break; + case Locate_type::EDGE: { // facet-cell?-edge-outside + Edge edge_prev{ch_prev, li_prev, lj_prev}; + if(facet_has_edge(get_facet(), edge_prev)) + _curr_simplex = edge_prev; else - _curr_simplex = Simplex_3(); //edge-outside - break; - } + _curr_simplex = ch_prev; + } break; + case Locate_type::FACET: { // facet-cell-facet-outside + Facet f_prev{ch_prev, li_prev}; + if(is_same_facet(f_prev, get_facet())) { + if(ch_next == Cell_handle()) + _curr_simplex = Simplex_3(); + else + _curr_simplex = ch_next; + } else + _curr_simplex = ch_prev; + } break; default: - CGAL_assertion(false);//should not happen - }; - break; - } - case 0 :/*Vertex_handle*/ - { - Cell_handle ch = Cell_handle(_cell_iterator); - if (ch == _cell_iterator.previous()) - { - _curr_simplex = Simplex_3(); - break; - } - if (!cell_iterator_is_ahead()) //_curr_simplex does contain v - { - ++_cell_iterator;//cell_iterator needs to be ahead to detect degeneracies + CGAL_unreachable(); } - else - ch = _cell_iterator.previous(); - - Cell_handle chnext = Cell_handle(_cell_iterator); - //_cell_iterator is one step forward _curr_simplex - CGAL_assertion(ch != chnext); - - Locate_type ltnext; - int linext, ljnext; - _cell_iterator.entry(ltnext, linext, ljnext); - - Cell_handle prev; - Locate_type ltprev; - int liprev, ljprev; - prev = _cell_iterator.previous(); - _cell_iterator.exit(ltprev, liprev, ljprev); - - switch (ltnext) - { - case Locate_type::VERTEX: - { - CGAL_assertion(_cell_iterator == _cell_iterator.end() - || get_vertex() != chnext->vertex(linext) - || triangulation()->is_infinite(chnext)); - if (_cell_iterator == _cell_iterator.end()) - { - if (prev == ch && ltprev == Locate_type::VERTEX) - { - CGAL_assertion(prev->vertex(liprev) == get_vertex()); - _curr_simplex = ch; + } break; + case 1: {/*Edge*/ + switch(lt_prev) { + case Locate_type::VERTEX: { //edge-vertex-outside + Vertex_handle v_prev{ch_prev->vertex(li_prev)}; + if(edge_has_vertex(get_edge(), v_prev)) + _curr_simplex = v_prev; + else + _curr_simplex = shared_facet(get_edge(), v_prev); + } break; + case Locate_type::EDGE: { //edge-outside or edge-cell-edge-outside + const Edge e_prev(ch_prev, li_prev, lj_prev); + if(is_same_edge(get_edge(), e_prev)) { + if(ch_next == Cell_handle()) { + _curr_simplex = Simplex_3(); + } else { + _curr_simplex = ch_next; } - else - { - if(ltprev == Locate_type::FACET) - _curr_simplex = Facet(prev, liprev); - else if(ltprev == Locate_type::EDGE) - _curr_simplex = Edge(prev, liprev, ljprev); - else - CGAL_assertion(false); + } else { + auto facet_opt = shared_facet(get_edge(), e_prev); + if(static_cast(facet_opt)) { + _curr_simplex = *facet_opt; } - } - else - { - if (triangulation()->is_infinite(chnext) && get_vertex() == chnext->vertex(linext)) - _curr_simplex = chnext; - else - { - Cell_handle ec; - int ei = -1, ej = -1; - if (!triangulation()->is_edge(get_vertex(), chnext->vertex(linext), ec, ei, ej)) - CGAL_assertion(false); - _curr_simplex = Edge(ec, ei, ej); + else { + _curr_simplex = shared_cell(get_edge(), e_prev); } } - break; - } - - case Locate_type::EDGE: - { - //facet shared by get_vertex() and the edge - //none of ch and chnext is certainly shared by both endpoints - _curr_simplex = shared_facet(Edge(chnext, linext, ljnext), get_vertex()); - break; + } break; + case Locate_type::FACET: { + Facet f_prev{ch_prev, li_prev}; + if(facet_has_edge(f_prev, get_edge())) + _curr_simplex = f_prev; //edge-facet-outside + else + _curr_simplex = ch_prev; //query goes through the cell + } break; + default: + CGAL_unreachable(); } - - case Locate_type::OUTSIDE_AFFINE_HULL: - { - CGAL_assertion(_cell_iterator == _cell_iterator.end()); - if (ltprev == Locate_type::VERTEX) //vertex-edge-vertex-outside - { - if(prev->vertex(liprev) != get_vertex())//avoid infinite loop edge-vertex-same edge-... - _curr_simplex = Edge(prev, liprev, prev->index(get_vertex())); - else + } break; + case 0 :/*Vertex_handle*/ + { + switch(lt_prev) { + case Locate_type::VERTEX: { + if(ch_prev->vertex(li_prev) != get_vertex()) // avoid infinite loop edge-vertex-same edge-... + _curr_simplex = Edge(ch_prev, li_prev, ch_prev->index(get_vertex())); + else { + if(ch_next == Cell_handle()) { _curr_simplex = Simplex_3(); + } else { + _curr_simplex = ch_next; + } } - else if (ltprev == Locate_type::EDGE)//vertex-facet-edge-outside - _curr_simplex = Facet(prev, prev->index(get_vertex())); - else if (ltprev == Locate_type::FACET) //vertex-facet-outside - { - if(prev->vertex(liprev) != get_vertex()) //vertex-facet-outside - _curr_simplex = Facet(prev, liprev); - else //vertex-cell-facet-outside - _curr_simplex = prev; - } + } break; + case Locate_type::EDGE: { + const Edge e_prev(ch_prev, li_prev, lj_prev); + if(edge_has_vertex(e_prev, get_vertex())) + _curr_simplex = e_prev; else - { - CGAL_assertion(ltprev == Locate_type::CELL);//vertex-cell-outside - _curr_simplex = prev; - } - break; + _curr_simplex = shared_facet(Edge(ch_prev, li_prev, lj_prev), get_vertex()); + } break; + case Locate_type::FACET: { + if(ch_prev->vertex(li_prev) != get_vertex()) // vertex-facet-outside + _curr_simplex = Facet(ch_prev, li_prev); + else // vertex-cell-facet-outside + _curr_simplex = ch_prev; + } break; + default: + CGAL_unreachable(); } - - default://FACET - if (chnext == Cell_handle()) - _curr_simplex = Simplex_3(); - else - _curr_simplex = shared_cell(Facet(chnext, linext), get_vertex()); - break; - }; - } - break; - + } break; default: - CGAL_assertion(false); + CGAL_unreachable(); }; return *this; } + // provides the increment prefix operator. Simplex_iterator operator++(int) { @@ -1010,10 +942,10 @@ class Triangulation_segment_simplex_iterator_3 case 3 ://cell return ch != get_cell(); default: - CGAL_assertion(false); + CGAL_unreachable(); } //should not be reached - CGAL_assertion(false); + CGAL_unreachable(); return false; } @@ -1048,13 +980,29 @@ class Triangulation_segment_simplex_iterator_3 return false; } + bool facet_has_vertex(const Facet& f, const Vertex_handle v) const + { + return triangulation().tds().has_vertex(f, v); + } + bool edge_has_vertex(const Edge& e, const Vertex_handle v) const { return e.first->vertex(e.second) == v || e.first->vertex(e.third) == v; } - Vertex_handle shared_vertex(const Edge& e1, const Edge& e2) const + bool is_same_edge(const Edge& e1, const Edge& e2) const + { + return edge_has_vertex(e1, e2.first->vertex(e2.second)) + && edge_has_vertex(e1, e2.first->vertex(e2.third)); + } + + bool is_same_facet(const Facet& f1, const Facet& f2) const + { + return f1 == f2 || triangulation().mirror_facet(f1) == f2; + } + + boost::optional shared_vertex(const Edge& e1, const Edge& e2) const { Vertex_handle v1a = e1.first->vertex(e1.second); Vertex_handle v1b = e1.first->vertex(e1.third); @@ -1065,22 +1013,22 @@ class Triangulation_segment_simplex_iterator_3 return v1a; else if (v1b == v2a || v1b == v2b) return v1b; - - std::cerr << "There is no vertex shared by e1 and e2" << std::endl; - CGAL_assertion(false); - return Vertex_handle(); + else + return {}; } - Facet shared_facet(const Edge& e1, const Edge& e2) const + boost::optional shared_facet(const Edge& e1, const Edge& e2) const { Vertex_handle v2a = e2.first->vertex(e2.second); Vertex_handle v2b = e2.first->vertex(e2.third); - Vertex_handle sv = shared_vertex(e1, e2); + auto sv_opt = shared_vertex(e1, e2); + if(!sv_opt) return {}; + Vertex_handle sv = *sv_opt; Vertex_handle nsv2 = (sv == v2a) ? v2b : v2a; typename Tr::Facet_circulator circ - = triangulation()->incident_facets(e1); + = triangulation().incident_facets(e1); typename Tr::Facet_circulator end = circ; do { @@ -1092,33 +1040,30 @@ class Triangulation_segment_simplex_iterator_3 } } while (++circ != end); - std::cerr << "There is no facet shared by e1 and e2" << std::endl; - CGAL_assertion(false); - return Facet(Cell_handle(), 0); + return {}; } Facet shared_facet(const Edge& e, const Vertex_handle v) const { typename Tr::Facet_circulator circ - = triangulation()->incident_facets(e); + = triangulation().incident_facets(e); typename Tr::Facet_circulator end = circ; do { Facet f = *circ; - int i; - if (triangulation()->has_vertex(f, v, i)) + if (facet_has_vertex(f, v)) return f; } while (++circ != end); std::cerr << "There is no facet shared by e and v" << std::endl; - CGAL_assertion(false); + CGAL_unreachable(); return Facet(Cell_handle(), 0); } Cell_handle shared_cell(const Edge& e, const Vertex_handle v) const { typename Tr::Cell_circulator circ - = triangulation()->incident_cells(e); + = triangulation().incident_cells(e); typename Tr::Cell_circulator end = circ; do { @@ -1128,7 +1073,7 @@ class Triangulation_segment_simplex_iterator_3 } while (++circ != end); std::cerr << "There is no cell shared by e and v" << std::endl; - CGAL_assertion(false); + CGAL_unreachable(); return Cell_handle(); } @@ -1145,6 +1090,11 @@ class Triangulation_segment_simplex_iterator_3 } } + Cell_handle shared_cell(const Edge e1, const Edge e2) const { + auto facet = shared_facet(e1, e2.first->vertex(e2.second)); + return shared_cell(facet, e2.first->vertex(e2.third)); + } + };//class Triangulation_segment_simplex_iterator_3 } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_simplex_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_simplex_3.h index 8b742b48..b73b6f9b 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_simplex_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_simplex_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_3/include/CGAL/Triangulation_simplex_3.h $ -// $Id: Triangulation_simplex_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_3/include/CGAL/Triangulation_simplex_3.h $ +// $Id: include/CGAL/Triangulation_simplex_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -96,8 +96,10 @@ class Triangulation_simplex_3 { // returns the dimension of the simplex int dimension () const { - return (ref & 3); + if(ref == -1) return -1; + else return (ref & 3); } + // returns an incident cell: Cell_handle incident_cell() { return ch; @@ -161,6 +163,7 @@ operator==(Triangulation_simplex_3 s0, typename Sim::Cell_handle neighbor; switch (s0.dimension()) { + case -1: return s1.dimension() == -1; case (0): // Vertex return (s0.ch->vertex(s0.index(0)) == s1.ch->vertex(s1.index(0))); case (1): // Edge @@ -180,7 +183,7 @@ operator==(Triangulation_simplex_3 s0, } return false; case (3): - return (&(*s0.ch) == &(*s1.ch)); + return s0.ch.operator->() == s1.ch.operator->(); } CGAL_error(); return false; diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_sphere_line_face_circulator_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_sphere_line_face_circulator_2.h index 65b4d24a..796ff7c1 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_sphere_line_face_circulator_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_sphere_line_face_circulator_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_on_sphere_2/include/CGAL/Triangulation_sphere_line_face_circulator_2.h $ -// $Id: Triangulation_sphere_line_face_circulator_2.h 23658a0 2021-03-20T19:56:10+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_on_sphere_2/include/CGAL/Triangulation_sphere_line_face_circulator_2.h $ +// $Id: include/CGAL/Triangulation_sphere_line_face_circulator_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Claudia Werner, Mariette Yvinec @@ -14,7 +14,7 @@ #include -#include +#include namespace CGAL { @@ -347,7 +347,7 @@ inline bool Triangulation_sphere_line_face_circulator_2:: operator==(Nullptr_t CGAL_assertion_code(n)) const { - CGAL_triangulation_assertion(n == NULL); + CGAL_assertion(n == NULL); return pos == Face_handle(); } @@ -356,7 +356,7 @@ inline bool Triangulation_sphere_line_face_circulator_2:: operator!=(Nullptr_t n) const { - CGAL_triangulation_assertion(n == NULL); + CGAL_assertion(n == NULL); return !(*this == n); } diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_structural_filtering_traits.h b/thirdparty/CGAL/include/CGAL/Triangulation_structural_filtering_traits.h index 38d034d6..29574d8c 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_structural_filtering_traits.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_structural_filtering_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Triangulation_structural_filtering_traits.h $ -// $Id: Triangulation_structural_filtering_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Triangulation_structural_filtering_traits.h $ +// $Id: include/CGAL/Triangulation_structural_filtering_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_utils_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_utils_2.h index 93e9ee7c..cf136828 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_utils_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_utils_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_2/include/CGAL/Triangulation_utils_2.h $ -// $Id: Triangulation_utils_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_2/include/CGAL/Triangulation_utils_2.h $ +// $Id: include/CGAL/Triangulation_utils_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ #include -#include +#include namespace CGAL { template < class T = void > @@ -39,13 +39,13 @@ class Triangulation_cw_ccw_2 public: static int ccw(const int i) { - CGAL_triangulation_precondition( i >= 0 && i < 3); + CGAL_precondition( i >= 0 && i < 3); return ccw_map[i]; } static int cw(const int i) { - CGAL_triangulation_precondition( i >= 0 && i < 3); + CGAL_precondition( i >= 0 && i < 3); return cw_map[i]; } }; diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_utils_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_utils_3.h index 4a54e6ad..691a3938 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_utils_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_utils_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_3/include/CGAL/Triangulation_utils_3.h $ -// $Id: Triangulation_utils_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_3/include/CGAL/Triangulation_utils_3.h $ +// $Id: include/CGAL/Triangulation_utils_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -16,7 +16,7 @@ #include -#include +#include namespace CGAL { @@ -63,13 +63,13 @@ struct Triangulation_utils_3 { static int ccw(const int i) { - CGAL_triangulation_precondition( i >= 0 && i < 3); + CGAL_precondition( i >= 0 && i < 3); return ccw_map[i]; } static int cw(const int i) { - CGAL_triangulation_precondition( i >= 0 && i < 3); + CGAL_precondition( i >= 0 && i < 3); return cw_map[i]; } @@ -77,9 +77,10 @@ struct Triangulation_utils_3 { // index of the next cell when turning around the // oriented edge vertex(i) vertex(j) in 3d - CGAL_triangulation_precondition( ( i >= 0 && i < 4 ) && - ( j >= 0 && j < 4 ) && - ( i != j ) ); + CGAL_precondition( ( i >= 0 && i < 4 ) && + ( j >= 0 && j < 4 ) && + ( i != j ) ); + CGAL_assume(i!=j); return tab_next_around_edge[i][j]; } @@ -87,9 +88,9 @@ struct Triangulation_utils_3 static int vertex_triple_index(const int i, const int j) { // indexes of the jth vertex of the facet of a cell - // opposite to vertx i - CGAL_triangulation_precondition( ( i >= 0 && i < 4 ) && - ( j >= 0 && j < 3 ) ); + // opposite to vertex i + CGAL_precondition( ( i >= 0 && i < 4 ) && + ( j >= 0 && j < 3 ) ); return tab_vertex_triple_index[i][j]; } diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_vertex.h b/thirdparty/CGAL/include/CGAL/Triangulation_vertex.h index 11daec25..428f1f40 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_vertex.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_vertex.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation/include/CGAL/Triangulation_vertex.h $ -// $Id: Triangulation_vertex.h 2d18b6e 2020-08-26T11:30:59+02:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation/include/CGAL/Triangulation_vertex.h $ +// $Id: include/CGAL/Triangulation_vertex.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Samuel Hornus diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_2.h index 211531d9..87eabf23 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_vertex_base_2.h $ -// $Id: Triangulation_vertex_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_vertex_base_2.h $ +// $Id: include/CGAL/Triangulation_vertex_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,6 +18,7 @@ #include #include +#include namespace CGAL { @@ -109,7 +110,7 @@ std::ostream& operator<<(std::ostream &os, const Triangulation_vertex_base_2 &v) // non combinatorial information. Default = point { - return os << static_cast(v) << v.point(); + return os << static_cast(v) << IO::serialize(v.point()); } #ifndef CGAL_NO_DEPRECATED_CODE diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_3.h index 56d8966b..629092da 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Triangulation_vertex_base_3.h $ -// $Id: Triangulation_vertex_base_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Triangulation_vertex_base_3.h $ +// $Id: include/CGAL/Triangulation_vertex_base_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud @@ -17,6 +17,7 @@ #include #include +#include namespace CGAL { @@ -61,6 +62,7 @@ class Triangulation_vertex_base_3 Point _p; }; + template < class GT, class DSVb > std::istream& operator>>(std::istream &is, Triangulation_vertex_base_3 &v) @@ -74,7 +76,7 @@ std::ostream& operator<<(std::ostream &os, const Triangulation_vertex_base_3 &v) // non combinatorial information. Default = point { - return os << static_cast(v) << v.point(); + return os << static_cast(v) << IO::serialize(v.point()); } } //namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_with_id_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_with_id_2.h index 2fce13a3..495d00d9 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_with_id_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_with_id_2.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_vertex_base_with_id_2.h $ -// $Id: Triangulation_vertex_base_with_id_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_vertex_base_with_id_2.h $ +// $Id: include/CGAL/Triangulation_vertex_base_with_id_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -12,6 +12,9 @@ #ifndef CGAL_TRIANGULATION_VERTEX_BASE_WITH_ID_2_H #define CGAL_TRIANGULATION_VERTEX_BASE_WITH_ID_2_H +#include + + #include namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_with_info_2.h b/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_with_info_2.h index 3396606d..f365bd47 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_with_info_2.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_with_info_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/Triangulation_vertex_base_with_info_2.h $ -// $Id: Triangulation_vertex_base_with_info_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/Triangulation_vertex_base_with_info_2.h $ +// $Id: include/CGAL/Triangulation_vertex_base_with_info_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_with_info_3.h b/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_with_info_3.h index 9b9c2760..d8dd7dd3 100644 --- a/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_with_info_3.h +++ b/thirdparty/CGAL/include/CGAL/Triangulation_vertex_base_with_info_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/Triangulation_vertex_base_with_info_3.h $ -// $Id: Triangulation_vertex_base_with_info_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/Triangulation_vertex_base_with_info_3.h $ +// $Id: include/CGAL/Triangulation_vertex_base_with_info_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Trisegment_2.h b/thirdparty/CGAL/include/CGAL/Trisegment_2.h index 03bfade6..78582d2b 100644 --- a/thirdparty/CGAL/include/CGAL/Trisegment_2.h +++ b/thirdparty/CGAL/include/CGAL/Trisegment_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Trisegment_2.h $ -// $Id: Trisegment_2.h b1b7cac 2023-01-04T16:26:09+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Trisegment_2.h $ +// $Id: include/CGAL/Trisegment_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -16,11 +16,10 @@ #include #include +#include #include -#include - #include #include @@ -62,18 +61,24 @@ struct Minmax_traits< Trisegment_collinearity > } // namespace internal +template +using Trisegment_2_ptr = std::shared_ptr; + template class Trisegment_2 - : public Ref_counted_base { typedef Trisegment_2 Self; public: - typedef boost::intrusive_ptr Self_ptr ; + typedef Trisegment_2_ptr Self_ptr ; + typedef typename K::FT FT ; Trisegment_2 ( Segment const& aE0 + , FT const& aW0 , Segment const& aE1 + , FT const& aW1 , Segment const& aE2 + , FT const& aW2 , Trisegment_collinearity aCollinearity , std::size_t aID ) @@ -85,6 +90,10 @@ class Trisegment_2 mE[1] = aE1 ; mE[2] = aE2 ; + mW[0] = aW0 ; + mW[1] = aW1 ; + mW[2] = aW2 ; + switch ( mCollinearity ) { case TRISEGMENT_COLLINEARITY_01: @@ -117,6 +126,12 @@ class Trisegment_2 Segment const& e1() const { return e(1) ; } Segment const& e2() const { return e(2) ; } + FT const& w( unsigned idx ) const { CGAL_precondition(idx<3) ; return mW[idx] ; } + + FT const& w0() const { return w(0) ; } + FT const& w1() const { return w(1) ; } + FT const& w2() const { return w(2) ; } + // If 2 out of the 3 edges are collinear they can be reclassified as 1 collinear edge (any of the 2) and 1 non-collinear. // These methods returns the edges according to that classification. // PRECONDITION: Exactly 2 out of 3 edges are collinear @@ -132,12 +147,33 @@ class Trisegment_2 return e(2); case TRISEGMENT_COLLINEARITY_02: return e(2); + default: + CGAL_assertion(false); + return e(0); // arbitrary, meaningless value because a const& is expected } } - Self_ptr child_l() const { return mChildL ; } - Self_ptr child_r() const { return mChildR ; } - Self_ptr child_t() const { return mChildT ; } + FT const& collinear_edge_weight() const { return w(mCSIdx) ; } + FT const& non_collinear_edge_weight() const { return w(mNCSIdx) ; } + FT const& other_collinear_edge_weight() const + { + switch ( mCollinearity ) + { + case TRISEGMENT_COLLINEARITY_01: + return w(1); + case TRISEGMENT_COLLINEARITY_12: + return w(2); + case TRISEGMENT_COLLINEARITY_02: + return w(2); + default: + CGAL_assertion(false); + return w(0); // arbitrary, meaningless value because a const& is expected + } + } + + Self_ptr const& child_l() const { return mChildL ; } + Self_ptr const& child_r() const { return mChildR ; } + Self_ptr const& child_t() const { return mChildT ; } void set_child_l( Self_ptr const& aChild ) { mChildL = aChild ; } void set_child_r( Self_ptr const& aChild ) { mChildR = aChild ; } @@ -154,47 +190,44 @@ class Trisegment_2 return c == TRISEGMENT_COLLINEARITY_01 ? LEFT : c == TRISEGMENT_COLLINEARITY_12 ? RIGHT : THIRD ; } - friend std::ostream& operator << ( std::ostream& os, Self const& aTrisegment ) + static void print ( std::ostream& os, Self const& aTri, int aDepth ) { - return os << "[" << s2str(aTrisegment.e0()) - << " " << s2str(aTrisegment.e1()) - << " " << s2str(aTrisegment.e2()) - << " " << trisegment_collinearity_to_string(aTrisegment.collinearity()) - << "]"; - } - - friend std::ostream& operator << ( std::ostream& os, Self_ptr const& aPtr ) - { - recursive_print(os,aPtr,0); - return os ; + const std::string lPadding = std::string(2 * aDepth, ' '); + + os << lPadding << "[&: " << &aTri << " ID: " << aTri.id() << "\n" + << lPadding << "\tE" << aTri.e0().mID << " E" << aTri.e1().mID << " E" << aTri.e2().mID << "\n" + << lPadding << "\t" << s2str(aTri.e0()) << " w = " << n2str(aTri.w0()) << ";" << "\n" + << lPadding << "\t" << s2str(aTri.e1()) << " w = " << n2str(aTri.w1()) << ";" << "\n" + << lPadding << "\t" << s2str(aTri.e2()) << " w = " << n2str(aTri.w2()) << ";" << "\n" + << lPadding << "\tCollinearity: " << trisegment_collinearity_to_string(aTri.collinearity()) << "\n" + << lPadding << "]\n" << std::flush; } static void recursive_print ( std::ostream& os, Self_ptr const& aTriPtr, int aDepth ) { - os << "\n" ; + const std::string lPadding = std::string(2 * aDepth, ' '); - for ( int i = 0 ; i < aDepth ; ++ i ) - os << " " ; + os << "\n" ; if ( aTriPtr ) { - os << *aTriPtr ; + print(os, *aTriPtr, aDepth); if ( aTriPtr->child_l() ) { - os << " \nleft child:" ; + os << lPadding << "left child:" ; recursive_print(os,aTriPtr->child_l(),aDepth+1); } if ( aTriPtr->child_r() ) { - os << " \nright child:" ; + os << lPadding << "right child:" ; recursive_print(os,aTriPtr->child_r(),aDepth+1); } if ( aTriPtr->child_t() ) { - os << " \nthird child:" ; + os << lPadding << "third child:" ; recursive_print(os,aTriPtr->child_t(),aDepth+1); } } @@ -204,9 +237,25 @@ class Trisegment_2 } } + friend std::ostream& operator << ( std::ostream& os, Self const& aTrisegment ) + { + print(os, aTrisegment, 0); + return os ; + } + + friend std::ostream& operator << ( std::ostream& os, Self_ptr const& aTriPtr ) + { + if(aTriPtr) + print(os, *aTriPtr, 0); + else + os << "{null}" ; + return os ; + } + private : std::size_t mID; Segment mE[3]; + FT mW[3]; Trisegment_collinearity mCollinearity ; unsigned mCSIdx, mNCSIdx ; diff --git a/thirdparty/CGAL/include/CGAL/Twotuple.h b/thirdparty/CGAL/include/CGAL/Twotuple.h index 4a40f000..b56c55d9 100644 --- a/thirdparty/CGAL/include/CGAL/Twotuple.h +++ b/thirdparty/CGAL/include/CGAL/Twotuple.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Twotuple.h $ -// $Id: Twotuple.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Twotuple.h $ +// $Id: include/CGAL/Twotuple.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Umbilics.h b/thirdparty/CGAL/include/CGAL/Umbilics.h index e6c60a55..032837d2 100644 --- a/thirdparty/CGAL/include/CGAL/Umbilics.h +++ b/thirdparty/CGAL/include/CGAL/Umbilics.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Ridges_3/include/CGAL/Umbilics.h $ -// $Id: Umbilics.h 1faa0e2 2021-04-28T10:55:26+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Ridges_3/include/CGAL/Umbilics.h $ +// $Id: include/CGAL/Umbilics.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Pouget and Frédéric Cazals @@ -31,7 +31,7 @@ enum Umbilic_type { NON_GENERIC_UMBILIC = 0, ELLIPTIC_UMBILIC, HYPERBOLIC_UMBILI //------------------------------------------------------------------- //Umbilic : stores umbilic data, its location given by a vertex, its -//type and a circle of edges bording a disk containing the vertex +//type and a circle of edges bordering a disk containing the vertex //------------------------------------------------------------------ template < class TriangleMesh > class Umbilic @@ -110,10 +110,10 @@ class Umbilic_approximation typedef typename boost::graph_traits::vertex_iterator Vertex_const_iterator; //requirements for the templates TriangleMesh and VertexFTMap or VertexVectorMap - CGAL_static_assertion((boost::is_same::value)); - CGAL_static_assertion((boost::is_same::value)); - CGAL_static_assertion((boost::is_same::value)); - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); + static_assert(std::is_same::value); + static_assert(std::is_same::value); + static_assert(std::is_same::value); typedef CGAL::Umbilic Umbilic; @@ -192,7 +192,7 @@ compute(OutputIterator umbilics_it, FT size) vces.clear(); contour.clear(); is_umbilic = true; - //the size of neighbourhood is (size * OneRingSize) + //the size of neighborhood is (size * OneRingSize) poly_neighbors->compute_neighbors(vh, vces, contour, size); diff --git a/thirdparty/CGAL/include/CGAL/Uncertain.h b/thirdparty/CGAL/include/CGAL/Uncertain.h index 6253b248..74e9f1b3 100644 --- a/thirdparty/CGAL/include/CGAL/Uncertain.h +++ b/thirdparty/CGAL/include/CGAL/Uncertain.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/Uncertain.h $ -// $Id: Uncertain.h 6acb3a1 2022-07-11T10:35:09+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/Uncertain.h $ +// $Id: include/CGAL/Uncertain.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/Unfiltered_predicate_adaptor.h b/thirdparty/CGAL/include/CGAL/Unfiltered_predicate_adaptor.h index fe9b4e4f..6ff4da3c 100644 --- a/thirdparty/CGAL/include/CGAL/Unfiltered_predicate_adaptor.h +++ b/thirdparty/CGAL/include/CGAL/Unfiltered_predicate_adaptor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/Unfiltered_predicate_adaptor.h $ -// $Id: Unfiltered_predicate_adaptor.h 655d427 2020-09-11T15:00:12+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/Unfiltered_predicate_adaptor.h $ +// $Id: include/CGAL/Unfiltered_predicate_adaptor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion, Fernando Cacciola diff --git a/thirdparty/CGAL/include/CGAL/Union_find.h b/thirdparty/CGAL/include/CGAL/Union_find.h index 3b1110bf..992559d3 100644 --- a/thirdparty/CGAL/include/CGAL/Union_find.h +++ b/thirdparty/CGAL/include/CGAL/Union_find.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Union_find/include/CGAL/Union_find.h $ -// $Id: Union_find.h fcd4e57 2020-05-22T11:29:03+02:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Union_find/include/CGAL/Union_find.h $ +// $Id: include/CGAL/Union_find.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Union_of_balls_3.h b/thirdparty/CGAL/include/CGAL/Union_of_balls_3.h index a7ab3cca..4f4513fc 100644 --- a/thirdparty/CGAL/include/CGAL/Union_of_balls_3.h +++ b/thirdparty/CGAL/include/CGAL/Union_of_balls_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/Union_of_balls_3.h $ -// $Id: Union_of_balls_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/Union_of_balls_3.h $ +// $Id: include/CGAL/Union_of_balls_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Unique_hash_map.h b/thirdparty/CGAL/include/CGAL/Unique_hash_map.h index f5e48c37..b9598722 100644 --- a/thirdparty/CGAL/include/CGAL/Unique_hash_map.h +++ b/thirdparty/CGAL/include/CGAL/Unique_hash_map.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Hash_map/include/CGAL/Unique_hash_map.h $ -// $Id: Unique_hash_map.h 3207dfe 2022-04-06T16:05:54+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Hash_map/include/CGAL/Unique_hash_map.h $ +// $Id: include/CGAL/Unique_hash_map.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Variational_shape_approximation.h b/thirdparty/CGAL/include/CGAL/Variational_shape_approximation.h index 3bd35449..0a8faa3b 100644 --- a/thirdparty/CGAL/include/CGAL/Variational_shape_approximation.h +++ b/thirdparty/CGAL/include/CGAL/Variational_shape_approximation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h $ -// $Id: Variational_shape_approximation.h 389ef8e 2022-05-17T10:51:32+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h $ +// $Id: include/CGAL/Variational_shape_approximation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -31,9 +31,9 @@ #include #include -#include +#include #include -#include +#include #include #include @@ -123,6 +123,7 @@ class Variational_shape_approximation { typedef typename Geom_traits::FT FT; typedef typename Geom_traits::Point_3 Point_3; typedef typename Geom_traits::Vector_3 Vector_3; + typedef typename Geom_traits::Segment_3 Segment_3; typedef typename Geom_traits::Plane_3 Plane_3; typedef typename Geom_traits::Construct_vector_3 Construct_vector_3; typedef typename Geom_traits::Construct_point_3 Construct_point_3; @@ -581,9 +582,9 @@ class Variational_shape_approximation { return num_teleported; // find the best merge pair - boost::optional< std::pair > best_proxies = + std::optional< std::pair > best_proxies = find_best_merge(!no_threshold_test); - if (best_proxies==boost::none) + if (best_proxies==std::nullopt) return num_teleported; if (px_worst == best_proxies->first || px_worst == best_proxies->second) return num_teleported; @@ -662,7 +663,7 @@ class Variational_shape_approximation { * it is returned only if the error change after the merge is lower than the half of the maximum proxy error. * @return if the best merge pair is found the optional returned contains the proxy indices, and is empty otherwise. */ - boost::optional< std::pair > + std::optional< std::pair > find_best_merge(const bool use_threshold_test) { typedef std::pair Proxy_pair; typedef std::set Pair_set; @@ -705,7 +706,7 @@ class Variational_shape_approximation { } if (merged_set.empty()) - return boost::none; + return std::nullopt; // test if merge worth it if (use_threshold_test) { @@ -715,7 +716,7 @@ class Variational_shape_approximation { max_error = m_proxies[i].err; } if (min_error_change > max_error / FT(2.0)) - return boost::none; + return std::nullopt; } return std::make_pair(px0, px1); @@ -795,6 +796,12 @@ class Variational_shape_approximation { * \cgalParamDefault{`5.0`} * \cgalParamNEnd * + * \cgalParamNBegin{boundary_subdivision_ratio} + * \cgalParamDescription{the chord subdivision ratio threshold to the chord length or average edge length for boundary edges} + * \cgalParamType{`geom_traits::FT`} + * \cgalParamDefault{`subdivision_ratio`} + * \cgalParamNEnd + * * \cgalParamNBegin{relative_to_chord} * \cgalParamDescription{If `true`, the `subdivision_ratio` is the ratio of the furthest vertex distance * to the chord length, otherwise is the average edge length} @@ -814,6 +821,12 @@ class Variational_shape_approximation { * \cgalParamDefault{`true`} * \cgalParamNEnd * + * \cgalParamNBegin{optimize_boundary_anchor_location} + * \cgalParamDescription{If `true`, optimize the anchor locations of boundary vertices} + * \cgalParamType{`Boolean`} + * \cgalParamDefault{`optimize_anchor_location`} + * \cgalParamNEnd + * * \cgalParamNBegin{pca_plane} * \cgalParamDescription{If `true`, use PCA plane fitting, otherwise use the default area averaged plane parameters} * \cgalParamType{`Boolean`} @@ -827,9 +840,11 @@ class Variational_shape_approximation { using parameters::choose_parameter; const FT subdivision_ratio = choose_parameter(get_parameter(np, internal_np::subdivision_ratio), FT(5.0)); + const FT boundary_subdivision_ratio = choose_parameter(get_parameter(np, internal_np::boundary_subdivision_ratio), subdivision_ratio); const bool relative_to_chord = choose_parameter(get_parameter(np, internal_np::relative_to_chord), false); const bool with_dihedral_angle = choose_parameter(get_parameter(np, internal_np::with_dihedral_angle), false); const bool optimize_anchor_location = choose_parameter(get_parameter(np, internal_np::optimize_anchor_location), true); + const bool optimize_boundary_anchor_location = choose_parameter(get_parameter(np, internal_np::optimize_boundary_anchor_location), optimize_anchor_location); const bool pca_plane = choose_parameter(get_parameter(np, internal_np::pca_plane), false); // compute averaged edge length, used in chord subdivision @@ -848,14 +863,14 @@ class Variational_shape_approximation { // generate anchors find_anchors(); - find_edges(subdivision_ratio, relative_to_chord, with_dihedral_angle); + find_edges(subdivision_ratio, boundary_subdivision_ratio, relative_to_chord, with_dihedral_angle); add_anchors(); // discrete constrained Delaunay triangulation pseudo_cdt(); if (optimize_anchor_location) - this->optimize_anchor_location(); + this->optimize_anchor_location(optimize_boundary_anchor_location); // check manifold-oriented return Polygon_mesh_processing::is_polygon_soup_a_polygon_mesh(m_tris); @@ -1346,7 +1361,7 @@ class Variational_shape_approximation { const Proxy px = m_metric->fit_proxy(fvec, *m_ptm); const FT err = m_metric->compute_error(f, *m_ptm, px); - // original proxy map should always be falid + // original proxy map should always be valid const std::size_t prev_px_idx = get(m_fproxy_map, f); CGAL_assertion(prev_px_idx != CGAL_VSA_INVALID_TAG); // update the proxy error and proxy map @@ -1513,12 +1528,13 @@ class Variational_shape_approximation { /*! * @brief finds and approximates the chord connecting the anchors. - * @param subdivision_ratio boundary chord approximation recursive split creterion + * @param subdivision_ratio boundary chord approximation recursive split criterion * @param relative_to_chord set `true` if the subdivision_ratio is relative to the chord length (relative sense), * otherwise it's relative to the average edge length (absolute sense). * @param with_dihedral_angle if set to `true`, add dihedral angle weight to the distance. */ void find_edges(const FT subdivision_ratio, + const FT boundary_subdivision_ratio, const bool relative_to_chord, const bool with_dihedral_angle) { // collect candidate halfedges in a set @@ -1550,7 +1566,7 @@ class Variational_shape_approximation { Boundary_chord chord; walk_to_next_anchor(he_start, chord); m_bcycles.back().num_anchors += subdivide_chord(chord.begin(), chord.end(), - subdivision_ratio, relative_to_chord, with_dihedral_angle); + subdivision_ratio, boundary_subdivision_ratio, relative_to_chord, with_dihedral_angle); #ifdef CGAL_SURFACE_MESH_APPROXIMATION_DEBUG std::cerr << "#chord_anchor " << m_bcycles.back().num_anchors << std::endl; @@ -1837,8 +1853,8 @@ class Variational_shape_approximation { * @param chord_begin begin iterator of the chord * @param chord_end end iterator of the chord * @param subdivision_ratio the chord recursive split error threshold - * @param relative_to_chord set `true` if the subdivision_ratio is relative to the chord length (relative sense), - * otherwise it's relative to the average edge length (absolute sense). + * @param relative_to_chord set `true` if the `subdivision_ratio` is relative to the chord length (relative sense), + * otherwise it is relative to the average edge length (absolute sense). * @param with_dihedral_angle if set to `true` add dihedral angle weight to the distance. * @return the number of anchors of the chord apart from the first one */ @@ -1846,6 +1862,7 @@ class Variational_shape_approximation { const Boundary_chord_iterator &chord_begin, const Boundary_chord_iterator &chord_end, const FT subdivision_ratio, + const FT boundary_subdivision_ratio, const bool relative_to_chord, const bool with_dihedral_angle) { const std::size_t chord_size = std::distance(chord_begin, chord_end); @@ -1854,8 +1871,16 @@ class Variational_shape_approximation { const std::size_t anchor_first = get(m_vanchor_map, source(he_first, *m_ptm)); const std::size_t anchor_last = get(m_vanchor_map, target(he_last, *m_ptm)); + bool is_boundary = is_border_edge(he_first, *m_ptm); + + if(is_boundary && boundary_subdivision_ratio == 0){ + for (Boundary_chord_iterator citr = chord_begin; *citr != he_last; ++citr) { + attach_anchor(*citr); + } + } + // do not subdivide trivial non-circular chord - if ((anchor_first != anchor_last) && (chord_size < 4)) + if ((anchor_first != anchor_last) && (chord_size < 2)) return 1; bool if_subdivide = false; @@ -1884,11 +1909,9 @@ class Variational_shape_approximation { const FT chord_len = CGAL::approximate_sqrt(chord_vec.squared_length()); bool degenerate_chord = false; if (chord_len > FT(0.0)) { - chord_vec = scale_functor(chord_vec, FT(1.0) / chord_len); + Segment_3 seg(pt_begin, pt_end); for (Boundary_chord_iterator citr = chord_begin; citr != chord_end; ++citr) { - Vector_3 vec = vector_functor(pt_begin, m_vpoint_map[target(*citr, *m_ptm)]); - vec = cross_product_functor(chord_vec, vec); - const FT dist = CGAL::approximate_sqrt(vec.squared_length()); + const FT dist = CGAL::approximate_sqrt(CGAL::squared_distance(m_vpoint_map[target(*citr, *m_ptm)], seg)); if (dist > dist_max) { chord_max = citr; dist_max = dist; @@ -1927,19 +1950,23 @@ class Variational_shape_approximation { } criterion *= norm_sin; } - - if (criterion > subdivision_ratio) - if_subdivide = true; + if (is_boundary) { + if (criterion > boundary_subdivision_ratio) + if_subdivide = true; + } + else { + if (criterion > subdivision_ratio) + if_subdivide = true; + } } - if (if_subdivide) { // subdivide at the most remote vertex attach_anchor(*chord_max); const std::size_t num_left = subdivide_chord(chord_begin, chord_max + 1, - subdivision_ratio, relative_to_chord, with_dihedral_angle); + subdivision_ratio, boundary_subdivision_ratio, relative_to_chord, with_dihedral_angle); const std::size_t num_right = subdivide_chord(chord_max + 1, chord_end, - subdivision_ratio, relative_to_chord, with_dihedral_angle); + subdivision_ratio, boundary_subdivision_ratio, relative_to_chord, with_dihedral_angle); return num_left + num_right; } @@ -1959,7 +1986,7 @@ class Variational_shape_approximation { /*! * @brief checks if a vertex is attached with an anchor. * @tparam VertexAnchorIndexMap `ReadablePropertyMap` - * with `boost::graph_traights::vertex_descriptor` as key and `std::size_t` as value type + * with `boost::graph_traits::vertex_descriptor` as key and `std::size_t` as value type * @param vtx a vertex descriptor * @param vanchor_map vertex anchor index map */ @@ -1992,9 +2019,15 @@ class Variational_shape_approximation { * @brief optimizes the anchor location by averaging the projection points of * the anchor vertex to the incident proxy plane. */ - void optimize_anchor_location() { + void optimize_anchor_location(bool optimize_boundary_anchor_location) { for(Anchor& a : m_anchors) { const vertex_descriptor v = a.vtx; + + if(! optimize_boundary_anchor_location && is_border(v,*m_ptm)){ + a.pos = m_vpoint_map[v]; + continue; + } + // incident proxy set std::set px_set; for(halfedge_descriptor h : halfedges_around_target(v, *m_ptm)) { @@ -2003,6 +2036,7 @@ class Variational_shape_approximation { } // projection + // todo: replace averaging by qem/svd ? Mael? FT sum_area(0.0); Vector_3 vec = CGAL::NULL_VECTOR; const Point_3 vtx_pt = m_vpoint_map[v]; diff --git a/thirdparty/CGAL/include/CGAL/Vector_2.h b/thirdparty/CGAL/include/CGAL/Vector_2.h index 2b640e78..50ffc133 100644 --- a/thirdparty/CGAL/include/CGAL/Vector_2.h +++ b/thirdparty/CGAL/include/CGAL/Vector_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Vector_2.h $ -// $Id: Vector_2.h 2884569 2022-04-27T16:32:06+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Vector_2.h $ +// $Id: include/CGAL/Vector_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -43,7 +42,7 @@ class Vector_2 : public R_::Kernel_base::Vector_2 typedef typename R_::Kernel_base::Vector_2 RVector_2; typedef Vector_2 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Vector_3.h b/thirdparty/CGAL/include/CGAL/Vector_3.h index 0b138767..74d32cbe 100644 --- a/thirdparty/CGAL/include/CGAL/Vector_3.h +++ b/thirdparty/CGAL/include/CGAL/Vector_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Vector_3.h $ -// $Id: Vector_3.h 2884569 2022-04-27T16:32:06+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Vector_3.h $ +// $Id: include/CGAL/Vector_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -43,7 +42,7 @@ class Vector_3 : public R_::Kernel_base::Vector_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Vector_3 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Vertex2Data_Property_Map_with_std_map.h b/thirdparty/CGAL/include/CGAL/Vertex2Data_Property_Map_with_std_map.h index 23a60f63..258b3c12 100644 --- a/thirdparty/CGAL/include/CGAL/Vertex2Data_Property_Map_with_std_map.h +++ b/thirdparty/CGAL/include/CGAL/Vertex2Data_Property_Map_with_std_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Ridges_3/include/CGAL/Vertex2Data_Property_Map_with_std_map.h $ -// $Id: Vertex2Data_Property_Map_with_std_map.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Ridges_3/include/CGAL/Vertex2Data_Property_Map_with_std_map.h $ +// $Id: include/CGAL/Vertex2Data_Property_Map_with_std_map.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Pouget and Frédéric Cazals diff --git a/thirdparty/CGAL/include/CGAL/Visibility_2/visibility_utils.h b/thirdparty/CGAL/include/CGAL/Visibility_2/visibility_utils.h index aa717f27..7637cff2 100644 --- a/thirdparty/CGAL/include/CGAL/Visibility_2/visibility_utils.h +++ b/thirdparty/CGAL/include/CGAL/Visibility_2/visibility_utils.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Visibility_2/include/CGAL/Visibility_2/visibility_utils.h $ -// $Id: visibility_utils.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Visibility_2/include/CGAL/Visibility_2/visibility_utils.h $ +// $Id: include/CGAL/Visibility_2/visibility_utils.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2.h index 878b4fb6..b125c4c7 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2.h $ -// $Id: Voronoi_diagram_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2.h $ +// $Id: include/CGAL/Voronoi_diagram_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -41,7 +41,7 @@ #include -#include +#include #include namespace CGAL { @@ -268,7 +268,7 @@ class Voronoi_diagram_2 public: typedef typename Adaptation_traits::Point_2 Point_2; - typedef boost::variant + typedef std::variant Locate_result; private: @@ -634,15 +634,15 @@ class Voronoi_diagram_2 Query_result ns_qr = nearest_site(dual_, p); if ( const Delaunay_vertex_handle* dv = - boost::get(&ns_qr) ) { + std::get_if(&ns_qr) ) { return Face_handle( Face(this, *dv) ); } else if ( const Delaunay_face_handle *df = - boost::get(&ns_qr) ) { + std::get_if(&ns_qr) ) { Find_valid_vertex vertex_finder; Delaunay_face_handle dfvalid = vertex_finder(this, *df); return Vertex_handle( Vertex(this, dfvalid) ); } else if ( const Delaunay_edge* de = - boost::get(&ns_qr) ) { + std::get_if(&ns_qr) ) { CGAL_assertion( !edge_rejector()(dual_, *de) ); if ( dual_.dimension() == 1 ) { Delaunay_vertex_handle v1 = diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Accessor.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Accessor.h index 26186108..44c34ae1 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Accessor.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Accessor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Accessor.h $ -// $Id: Accessor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Accessor.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Accessor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Adaptation_traits_base_2.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Adaptation_traits_base_2.h index 099084c1..52837ab5 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Adaptation_traits_base_2.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Adaptation_traits_base_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Adaptation_traits_base_2.h $ -// $Id: Adaptation_traits_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Adaptation_traits_base_2.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Adaptation_traits_base_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Adaptation_traits_functors.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Adaptation_traits_functors.h index e2ce178b..55158f07 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Adaptation_traits_functors.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Adaptation_traits_functors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Adaptation_traits_functors.h $ -// $Id: Adaptation_traits_functors.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Adaptation_traits_functors.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Adaptation_traits_functors.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Apollonius_graph_degeneracy_testers.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Apollonius_graph_degeneracy_testers.h index ebebaf82..6e1637a9 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Apollonius_graph_degeneracy_testers.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Apollonius_graph_degeneracy_testers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Apollonius_graph_degeneracy_testers.h $ -// $Id: Apollonius_graph_degeneracy_testers.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Apollonius_graph_degeneracy_testers.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Apollonius_graph_degeneracy_testers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Apollonius_graph_nearest_site_2.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Apollonius_graph_nearest_site_2.h index a33facdc..cfa3a094 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Apollonius_graph_nearest_site_2.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Apollonius_graph_nearest_site_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Apollonius_graph_nearest_site_2.h $ -// $Id: Apollonius_graph_nearest_site_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Apollonius_graph_nearest_site_2.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Apollonius_graph_nearest_site_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ #include #include -#include +#include namespace CGAL { @@ -48,7 +48,7 @@ class Apollonius_graph_nearest_site_2 typedef typename Delaunay_graph::Edge_circulator Edge_circulator; public: - typedef boost::variant result_type; + typedef std::variant result_type; result_type operator()(const Delaunay_graph& dg, const Point_2& p) const { CGAL_precondition( dg.dimension() >= 0 ); diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Cached_degeneracy_testers.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Cached_degeneracy_testers.h index f8b12afa..1d989157 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Cached_degeneracy_testers.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Cached_degeneracy_testers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Cached_degeneracy_testers.h $ -// $Id: Cached_degeneracy_testers.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Cached_degeneracy_testers.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Cached_degeneracy_testers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Circulator_adaptors.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Circulator_adaptors.h index e2d116ab..e08ec111 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Circulator_adaptors.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Circulator_adaptors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Circulator_adaptors.h $ -// $Id: Circulator_adaptors.h 2e47630 2021-11-10T09:28:05+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Circulator_adaptors.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Circulator_adaptors.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Connected_components.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Connected_components.h index ba2319da..786e6622 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Connected_components.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Connected_components.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Connected_components.h $ -// $Id: Connected_components.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Connected_components.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Connected_components.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Construct_dual_points.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Construct_dual_points.h index 0de84203..c953f9f7 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Construct_dual_points.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Construct_dual_points.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Construct_dual_points.h $ -// $Id: Construct_dual_points.h 942d461 2021-05-05T16:59:22+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Construct_dual_points.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Construct_dual_points.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Default_site_inserters.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Default_site_inserters.h index ffaf89cb..d85bccd8 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Default_site_inserters.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Default_site_inserters.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Default_site_inserters.h $ -// $Id: Default_site_inserters.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Default_site_inserters.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Default_site_inserters.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Default_site_removers.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Default_site_removers.h index c3cf1ca3..f2245f7d 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Default_site_removers.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Default_site_removers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Default_site_removers.h $ -// $Id: Default_site_removers.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Default_site_removers.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Default_site_removers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Degeneracy_tester_binders.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Degeneracy_tester_binders.h index db317159..3ed39d41 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Degeneracy_tester_binders.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Degeneracy_tester_binders.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Degeneracy_tester_binders.h $ -// $Id: Degeneracy_tester_binders.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Degeneracy_tester_binders.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Degeneracy_tester_binders.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_degeneracy_testers.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_degeneracy_testers.h index dd597b33..2d4d4e60 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_degeneracy_testers.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_degeneracy_testers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_degeneracy_testers.h $ -// $Id: Delaunay_triangulation_degeneracy_testers.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_degeneracy_testers.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_degeneracy_testers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_nearest_site_2.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_nearest_site_2.h index b2f63b1a..b32ec86c 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_nearest_site_2.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_nearest_site_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_nearest_site_2.h $ -// $Id: Delaunay_triangulation_nearest_site_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_nearest_site_2.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_nearest_site_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,7 @@ #include #include -#include +#include namespace CGAL { @@ -48,7 +48,7 @@ class Delaunay_triangulation_nearest_site_2 typedef typename Delaunay_graph::Edge_circulator Edge_circulator; public: - typedef boost::variant result_type; + typedef std::variant result_type; result_type operator()(const Delaunay_graph& dg, const Point_2& p) const { CGAL_precondition( dg.dimension() >= 0 ); diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_on_sphere_degeneracy_testers.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_on_sphere_degeneracy_testers.h index 1b35cd11..bf985965 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_on_sphere_degeneracy_testers.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_on_sphere_degeneracy_testers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_on_sphere_degeneracy_testers.h $ -// $Id: Delaunay_triangulation_on_sphere_degeneracy_testers.h 326a055 2021-07-06T10:11:49+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_on_sphere_degeneracy_testers.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Delaunay_triangulation_on_sphere_degeneracy_testers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Dummy_iterator.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Dummy_iterator.h index 18f61ae1..37d9c60a 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Dummy_iterator.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Dummy_iterator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Dummy_iterator.h $ -// $Id: Dummy_iterator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Dummy_iterator.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Dummy_iterator.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Edge_less.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Edge_less.h index edd16580..400773a4 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Edge_less.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Edge_less.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Edge_less.h $ -// $Id: Edge_less.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Edge_less.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Edge_less.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Face.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Face.h index 7d7a46e3..934e4290 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Face.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Face.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Face.h $ -// $Id: Face.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Face.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Face.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Finder_classes.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Finder_classes.h index b64eb60a..e9b56232 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Finder_classes.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Finder_classes.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Finder_classes.h $ -// $Id: Finder_classes.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Finder_classes.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Finder_classes.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Halfedge.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Halfedge.h index 308f958f..22d691c5 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Halfedge.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Halfedge.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Halfedge.h $ -// $Id: Halfedge.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Halfedge.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Halfedge.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Handle_adaptor.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Handle_adaptor.h index 51db7b1e..95a0b3f3 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Handle_adaptor.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Handle_adaptor.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Handle_adaptor.h $ -// $Id: Handle_adaptor.h aea0bdd 2021-09-13T09:33:35+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Handle_adaptor.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Handle_adaptor.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Identity_rejectors.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Identity_rejectors.h index 0cce387d..df37cc4c 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Identity_rejectors.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Identity_rejectors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Identity_rejectors.h $ -// $Id: Identity_rejectors.h 3816336 2021-04-29T23:24:40+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Identity_rejectors.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Identity_rejectors.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Iterator_adaptors.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Iterator_adaptors.h index c9d40e55..d47695f8 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Iterator_adaptors.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Iterator_adaptors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Iterator_adaptors.h $ -// $Id: Iterator_adaptors.h 2e47630 2021-11-10T09:28:05+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Iterator_adaptors.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Iterator_adaptors.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Policy_base.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Policy_base.h index 26c224c9..15e6bc15 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Policy_base.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Policy_base.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Policy_base.h $ -// $Id: Policy_base.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Policy_base.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Policy_base.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Regular_triangulation_degeneracy_testers.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Regular_triangulation_degeneracy_testers.h index 92d24dae..9183040f 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Regular_triangulation_degeneracy_testers.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Regular_triangulation_degeneracy_testers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Regular_triangulation_degeneracy_testers.h $ -// $Id: Regular_triangulation_degeneracy_testers.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Regular_triangulation_degeneracy_testers.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Regular_triangulation_degeneracy_testers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Regular_triangulation_nearest_site_2.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Regular_triangulation_nearest_site_2.h index 198cbff9..92380189 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Regular_triangulation_nearest_site_2.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Regular_triangulation_nearest_site_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Regular_triangulation_nearest_site_2.h $ -// $Id: Regular_triangulation_nearest_site_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Regular_triangulation_nearest_site_2.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Regular_triangulation_nearest_site_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,7 @@ #include #include -#include +#include namespace CGAL { @@ -50,7 +50,7 @@ class Regular_triangulation_nearest_site_2 typedef typename Geom_traits::Weighted_point_2 Weighted_point_2; public: - typedef boost::variant result_type; + typedef std::variant result_type; result_type operator()(const Delaunay_graph& dg, const Point_2& p) const { CGAL_precondition( dg.dimension() >= 0 ); diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_degeneracy_testers.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_degeneracy_testers.h index 5b4616bd..7ebe06a5 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_degeneracy_testers.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_degeneracy_testers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_degeneracy_testers.h $ -// $Id: Segment_Delaunay_graph_degeneracy_testers.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_degeneracy_testers.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_degeneracy_testers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_nearest_site_2.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_nearest_site_2.h index ce1f8edf..a5215489 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_nearest_site_2.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_nearest_site_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_nearest_site_2.h $ -// $Id: Segment_Delaunay_graph_nearest_site_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_nearest_site_2.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Segment_Delaunay_graph_nearest_site_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,7 @@ #include #include -#include +#include namespace CGAL { @@ -95,7 +95,7 @@ class Segment_Delaunay_graph_nearest_site_2 } public: - typedef boost::variant result_type; + typedef std::variant result_type; result_type operator()(const Delaunay_graph& dg, const Point_2& p) const { CGAL_precondition( dg.dimension() >= 0 ); diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Site_accessors.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Site_accessors.h index f89b90e4..babfbc03 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Site_accessors.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Site_accessors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Site_accessors.h $ -// $Id: Site_accessors.h 942d461 2021-05-05T16:59:22+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Site_accessors.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Site_accessors.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Unbounded_edges.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Unbounded_edges.h index 97e7f203..ffc1ffa3 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Unbounded_edges.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Unbounded_edges.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Unbounded_edges.h $ -// $Id: Unbounded_edges.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Unbounded_edges.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Unbounded_edges.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Unbounded_faces.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Unbounded_faces.h index 24379620..ff971ff9 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Unbounded_faces.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Unbounded_faces.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Unbounded_faces.h $ -// $Id: Unbounded_faces.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Unbounded_faces.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Unbounded_faces.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Validity_testers.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Validity_testers.h index d1c81fd9..b6464438 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Validity_testers.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Validity_testers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Validity_testers.h $ -// $Id: Validity_testers.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Validity_testers.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Validity_testers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Vertex.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Vertex.h index 00c8c6e4..4c3e7f2c 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Vertex.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/Vertex.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Vertex.h $ -// $Id: Vertex.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Vertex.h $ +// $Id: include/CGAL/Voronoi_diagram_2/Vertex.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/basic.h b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/basic.h index cb01bc28..8482eb69 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/basic.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_diagram_2/basic.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/basic.h $ -// $Id: basic.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/basic.h $ +// $Id: include/CGAL/Voronoi_diagram_2/basic.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Voronoi_intersection_2_traits_3.h b/thirdparty/CGAL/include/CGAL/Voronoi_intersection_2_traits_3.h index 47e0542a..735b0030 100644 --- a/thirdparty/CGAL/include/CGAL/Voronoi_intersection_2_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Voronoi_intersection_2_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interpolation/include/CGAL/Voronoi_intersection_2_traits_3.h $ -// $Id: Voronoi_intersection_2_traits_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interpolation/include/CGAL/Voronoi_intersection_2_traits_3.h $ +// $Id: include/CGAL/Voronoi_intersection_2_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Julia Floetotto, Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/Weighted_Minkowski_distance.h b/thirdparty/CGAL/include/CGAL/Weighted_Minkowski_distance.h index e225f2ec..6039c41b 100644 --- a/thirdparty/CGAL/include/CGAL/Weighted_Minkowski_distance.h +++ b/thirdparty/CGAL/include/CGAL/Weighted_Minkowski_distance.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_searching/include/CGAL/Weighted_Minkowski_distance.h $ -// $Id: Weighted_Minkowski_distance.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_searching/include/CGAL/Weighted_Minkowski_distance.h $ +// $Id: include/CGAL/Weighted_Minkowski_distance.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,15 +18,16 @@ #include - -#include -#include - #include +#include #include +#include #include #include +#include +#include + namespace CGAL { namespace internal { template @@ -56,10 +57,22 @@ namespace CGAL { private: typedef typename SearchTraits::Cartesian_const_iterator_d Coord_iterator; - FT power; + double power; + Weight_vector the_weights; + + FT pow(FT ft) const + { + return FT(std::pow(to_double(ft), power)); + } + + FT pow(FT ft, FT p) const + { + return FT(std::pow(to_double(ft), to_double(p))); + } + public: @@ -82,9 +95,9 @@ namespace CGAL { InputIterator begin, InputIterator CGAL_assertion_code(end), const SearchTraits& traits_=SearchTraits()) - : traits(traits_),power(pow) + : traits(traits_),power(to_double(pow)) { - CGAL_assertion(power >= FT(0)); + CGAL_assertion(is_positive(power)); Weight_vector_traits::resize(the_weights, dim); for (int i = 0; i < dim; ++i){ the_weights[i] = *begin; @@ -110,7 +123,7 @@ namespace CGAL { Coord_iterator qit = construct_it(q), qe = construct_it(q,1), pit = construct_it(p); - if (power == FT(0)) { + if (is_zero(power)) { for (unsigned int i = 0; qit != qe; ++qit, ++i) if (the_weights[i] * CGAL::abs((*qit) - (*pit)) > distance) distance = the_weights[i] * CGAL::abs((*qit)-(*pit)); @@ -118,7 +131,7 @@ namespace CGAL { else for (unsigned int i = 0; qit != qe; ++qit, ++i) distance += - the_weights[i] * std::pow(CGAL::abs((*qit)-(*pit)),power); + the_weights[i] * pow(CGAL::abs((*qit)-(*pit))); return distance; } @@ -133,7 +146,7 @@ namespace CGAL { Coord_iterator qit = construct_it(q), qe = construct_it(q,1), pit = construct_it(p); - if (power == FT(0)) { + if (is_zero(power)) { for (unsigned int i = 0; qit != qe; ++qit, ++i) if (the_weights[i] * CGAL::abs((*qit) - (*pit)) > distance) distance = the_weights[i] * CGAL::abs((*qit)-(*pit)); @@ -141,7 +154,7 @@ namespace CGAL { else for (unsigned int i = 0; qit != qe; ++qit, ++i) distance += - the_weights[i] * std::pow(CGAL::abs((*qit)-(*pit)),power); + the_weights[i] * pow(CGAL::abs((*qit)-(*pit))); return distance; } @@ -154,7 +167,7 @@ namespace CGAL { traits.construct_cartesian_const_iterator_d_object(); Coord_iterator qit = construct_it(q), pit = construct_it(p); - if (power == FT(0)) { + if (is_zero(power)) { if (the_weights[0] * CGAL::abs((*qit) - (*pit)) > distance) distance = the_weights[0] * CGAL::abs((*qit)-(*pit)); qit++;pit++; @@ -163,10 +176,10 @@ namespace CGAL { } else{ distance += - the_weights[0] * std::pow(CGAL::abs((*qit)-(*pit)),power); + the_weights[0] * pow(CGAL::abs((*qit)-(*pit))); qit++;pit++; distance += - the_weights[1] * std::pow(CGAL::abs((*qit)-(*pit)),power); + the_weights[1] * pow(CGAL::abs((*qit)-(*pit))); } return distance; } @@ -180,7 +193,7 @@ namespace CGAL { traits.construct_cartesian_const_iterator_d_object(); Coord_iterator qit = construct_it(q), pit = construct_it(p); - if (power == FT(0)) { + if (is_zero(power)) { if (the_weights[0] * CGAL::abs((*qit) - (*pit)) > distance) distance = the_weights[0] * CGAL::abs((*qit)-(*pit)); qit++;pit++; @@ -192,13 +205,13 @@ namespace CGAL { } else{ distance += - the_weights[0] * std::pow(CGAL::abs((*qit)-(*pit)),power); + the_weights[0] * pow(CGAL::abs((*qit)-(*pit))); qit++;pit++; distance += - the_weights[1] * std::pow(CGAL::abs((*qit)-(*pit)),power); + the_weights[1] * pow(CGAL::abs((*qit)-(*pit))); qit++;pit++; distance += - the_weights[2] * std::pow(CGAL::abs((*qit)-(*pit)),power); + the_weights[2] * pow(CGAL::abs((*qit)-(*pit))); } return distance; } @@ -212,7 +225,7 @@ namespace CGAL { typename SearchTraits::Construct_cartesian_const_iterator_d construct_it= traits.construct_cartesian_const_iterator_d_object(); Coord_iterator qit = construct_it(q), qe = construct_it(q,1); - if (power == FT(0)) + if (is_zero(power)) { for (unsigned int i = 0; qit != qe; ++qit, ++i) { if (the_weights[i]*(r.min_coord(i) - @@ -230,10 +243,10 @@ namespace CGAL { for (unsigned int i = 0; qit != qe; ++qit, ++i) { if ((*qit) < r.min_coord(i)) distance += the_weights[i] * - std::pow(r.min_coord(i)-(*qit),power); + pow(r.min_coord(i)-(*qit)); if ((*qit) > r.max_coord(i)) distance += the_weights[i] * - std::pow((*qit)-r.max_coord(i),power); + pow((*qit)-r.max_coord(i)); } }; return distance; @@ -247,7 +260,7 @@ namespace CGAL { typename SearchTraits::Construct_cartesian_const_iterator_d construct_it= traits.construct_cartesian_const_iterator_d_object(); Coord_iterator qit = construct_it(q), qe = construct_it(q,1); - if (power == FT(0)) + if (is_zero(power)) { for (unsigned int i = 0; qit != qe; ++qit, ++i) { if (the_weights[i]*(r.min_coord(i) - @@ -270,12 +283,12 @@ namespace CGAL { if ((*qit) < r.min_coord(i)){ dists[i] = r.min_coord(i)-(*qit); distance += the_weights[i] * - std::pow(dists[i],power); + pow(dists[i]); } if ((*qit) > r.max_coord(i)){ dists[i] = (*qit)-r.max_coord(i); distance += the_weights[i] * - std::pow(dists[i],power); + pow(dists[i]); } } }; @@ -290,7 +303,7 @@ namespace CGAL { typename SearchTraits::Construct_cartesian_const_iterator_d construct_it= traits.construct_cartesian_const_iterator_d_object(); Coord_iterator qit = construct_it(q), qe = construct_it(q,1); - if (power == FT(0)) + if (is_zero(power)) { for (unsigned int i = 0; qit != qe; ++qit, ++i) { if ((*qit) >= (r.min_coord(i) + @@ -311,9 +324,9 @@ namespace CGAL { { for (unsigned int i = 0; qit != qe; ++qit, ++i) { if ((*qit) <= (r.min_coord(i)+r.max_coord(i))/FT(2.0)) - distance += the_weights[i] * std::pow(r.max_coord(i)-(*qit),power); + distance += the_weights[i] * pow(r.max_coord(i)-(*qit)); else - distance += the_weights[i] * std::pow((*qit)-r.min_coord(i),power); + distance += the_weights[i] * pow((*qit)-r.min_coord(i)); } }; return distance; @@ -327,7 +340,7 @@ namespace CGAL { typename SearchTraits::Construct_cartesian_const_iterator_d construct_it= traits.construct_cartesian_const_iterator_d_object(); Coord_iterator qit = construct_it(q), qe = construct_it(q,1); - if (power == FT(0)) + if (is_zero(power)) { for (unsigned int i = 0; qit != qe; ++qit, ++i) { if ((*qit) >= (r.min_coord(i) + @@ -353,11 +366,11 @@ namespace CGAL { for (unsigned int i = 0; qit != qe; ++qit, ++i) { if ((*qit) <= (r.min_coord(i)+r.max_coord(i))/FT(2.0)){ dists[i] = r.max_coord(i)-(*qit); - distance += the_weights[i] * std::pow(dists[i],power); + distance += the_weights[i] * pow(dists[i]); } else{ dists[i] = (*qit)-r.min_coord(i); - distance += the_weights[i] * std::pow(dists[i],power); + distance += the_weights[i] * pow(dists[i]); } } }; @@ -370,7 +383,7 @@ namespace CGAL { int cutting_dimension) const { FT new_dist; - if (power == FT(0)) + if (is_zero(power)) { if (the_weights[cutting_dimension]*CGAL::abs(new_off) > dist) @@ -381,7 +394,7 @@ namespace CGAL { else { new_dist = dist + the_weights[cutting_dimension] * - (std::pow(CGAL::abs(new_off),power)-std::pow(CGAL::abs(old_off),power)); + (pow(CGAL::abs(new_off))-pow(CGAL::abs(old_off))); } return new_dist; } @@ -390,8 +403,8 @@ namespace CGAL { FT transformed_distance(FT d) const { - if (power <= FT(0)) return d; - else return std::pow(d,power); + if (! is_positive(power)) return d; + else return pow(d); } @@ -399,8 +412,8 @@ namespace CGAL { FT inverse_of_transformed_distance(FT d) const { - if (power <= FT(0)) return d; - else return std::pow(d,1/power); + if (! is_positive(power)) return d; + else return pow(d,1/power); } diff --git a/thirdparty/CGAL/include/CGAL/Weighted_point_2.h b/thirdparty/CGAL/include/CGAL/Weighted_point_2.h index 121cdd8c..6524127c 100644 --- a/thirdparty/CGAL/include/CGAL/Weighted_point_2.h +++ b/thirdparty/CGAL/include/CGAL/Weighted_point_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Weighted_point_2.h $ -// $Id: Weighted_point_2.h e7357ac 2021-07-19T14:53:27+02:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Weighted_point_2.h $ +// $Id: include/CGAL/Weighted_point_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -35,7 +34,7 @@ class Weighted_point_2 : public R_::Kernel_base::Weighted_point_2 typedef typename R_::FT RT; typedef Weighted_point_2 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: typedef Dimension_tag<2> Ambient_dimension; diff --git a/thirdparty/CGAL/include/CGAL/Weighted_point_3.h b/thirdparty/CGAL/include/CGAL/Weighted_point_3.h index ee4e4b74..279ade25 100644 --- a/thirdparty/CGAL/include/CGAL/Weighted_point_3.h +++ b/thirdparty/CGAL/include/CGAL/Weighted_point_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/Weighted_point_3.h $ -// $Id: Weighted_point_3.h e7357ac 2021-07-19T14:53:27+02:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/Weighted_point_3.h $ +// $Id: include/CGAL/Weighted_point_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -35,7 +34,7 @@ class Weighted_point_3 : public R_::Kernel_base::Weighted_point_3 typedef typename R_::FT FT; typedef Weighted_point_3 Self; - CGAL_static_assertion((boost::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/thirdparty/CGAL/include/CGAL/Weights.h b/thirdparty/CGAL/include/CGAL/Weights.h index 183bb24e..e0ee329f 100644 --- a/thirdparty/CGAL/include/CGAL/Weights.h +++ b/thirdparty/CGAL/include/CGAL/Weights.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Weights/include/CGAL/Weights.h $ -// $Id: Weights.h 12bf0e9 2021-10-18T17:31:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Weights/include/CGAL/Weights.h $ +// $Id: include/CGAL/Weights.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Weights/authalic_weights.h b/thirdparty/CGAL/include/CGAL/Weights/authalic_weights.h index f519ce14..58d45466 100644 --- a/thirdparty/CGAL/include/CGAL/Weights/authalic_weights.h +++ b/thirdparty/CGAL/include/CGAL/Weights/authalic_weights.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Weights/include/CGAL/Weights/authalic_weights.h $ -// $Id: authalic_weights.h 5f89766 2022-10-20T17:17:06+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Weights/include/CGAL/Weights/authalic_weights.h $ +// $Id: include/CGAL/Weights/authalic_weights.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Weights/barycentric_region_weights.h b/thirdparty/CGAL/include/CGAL/Weights/barycentric_region_weights.h index 81d355a8..9fbcf0b5 100644 --- a/thirdparty/CGAL/include/CGAL/Weights/barycentric_region_weights.h +++ b/thirdparty/CGAL/include/CGAL/Weights/barycentric_region_weights.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Weights/include/CGAL/Weights/barycentric_region_weights.h $ -// $Id: barycentric_region_weights.h 5f89766 2022-10-20T17:17:06+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Weights/include/CGAL/Weights/barycentric_region_weights.h $ +// $Id: include/CGAL/Weights/barycentric_region_weights.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Weights/cotangent_weights.h b/thirdparty/CGAL/include/CGAL/Weights/cotangent_weights.h index 58aa35fb..988bc7cf 100644 --- a/thirdparty/CGAL/include/CGAL/Weights/cotangent_weights.h +++ b/thirdparty/CGAL/include/CGAL/Weights/cotangent_weights.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Weights/include/CGAL/Weights/cotangent_weights.h $ -// $Id: cotangent_weights.h 3abb736 2022-11-22T17:46:01+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Weights/include/CGAL/Weights/cotangent_weights.h $ +// $Id: include/CGAL/Weights/cotangent_weights.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Weights/discrete_harmonic_weights.h b/thirdparty/CGAL/include/CGAL/Weights/discrete_harmonic_weights.h index ba1c9a4c..97960c5e 100644 --- a/thirdparty/CGAL/include/CGAL/Weights/discrete_harmonic_weights.h +++ b/thirdparty/CGAL/include/CGAL/Weights/discrete_harmonic_weights.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Weights/include/CGAL/Weights/discrete_harmonic_weights.h $ -// $Id: discrete_harmonic_weights.h 5f89766 2022-10-20T17:17:06+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Weights/include/CGAL/Weights/discrete_harmonic_weights.h $ +// $Id: include/CGAL/Weights/discrete_harmonic_weights.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -142,7 +142,7 @@ typename Kernel::FT discrete_harmonic_weight(const CGAL::Point_3& p0, \tparam PointMap a model of `ReadablePropertyMap` whose key type is `VertexRange::value_type` and value type is `Point_2`. The default is `CGAL::Identity_property_map`. - \cgalModels `BarycentricWeights_2` + \cgalModels{BarycentricWeights_2} */ template& p0, \tparam PointMap a model of `ReadablePropertyMap` whose key type is `VertexRange::value_type` and value type is `Point_2`. The default is `CGAL::Identity_property_map`. - \cgalModels `BarycentricWeights_2` + \cgalModels{BarycentricWeights_2} */ template& p0, \tparam PointMap a model of `ReadablePropertyMap` whose key type is `VertexRange::value_type` and value type is `Point_2`. The default is `CGAL::Identity_property_map`. - \cgalModels `BarycentricWeights_2` + \cgalModels{BarycentricWeights_2} */ template void neighbors_of(const Halfedge_handle_& h, @@ -294,7 +294,7 @@ class Width_3 { } //During the algorithm we have to build union and minus set - //of two sets and check wheater two sets are cutting each othe ror not + //of two sets and check whether two sets are cutting each other or not // *** SETMINUS *** //------------------ diff --git a/thirdparty/CGAL/include/CGAL/Width_default_traits_3.h b/thirdparty/CGAL/include/CGAL/Width_default_traits_3.h index 9a9c7ccc..ae766eed 100644 --- a/thirdparty/CGAL/include/CGAL/Width_default_traits_3.h +++ b/thirdparty/CGAL/include/CGAL/Width_default_traits_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polytope_distance_d/include/CGAL/Width_default_traits_3.h $ -// $Id: Width_default_traits_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polytope_distance_d/include/CGAL/Width_default_traits_3.h $ +// $Id: include/CGAL/Width_default_traits_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/Width_polyhedron_3.h b/thirdparty/CGAL/include/CGAL/Width_polyhedron_3.h index 804393e7..6dd1d968 100644 --- a/thirdparty/CGAL/include/CGAL/Width_polyhedron_3.h +++ b/thirdparty/CGAL/include/CGAL/Width_polyhedron_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polytope_distance_d/include/CGAL/Width_polyhedron_3.h $ -// $Id: Width_polyhedron_3.h 5a36ff8 2020-12-04T08:02:26+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polytope_distance_d/include/CGAL/Width_polyhedron_3.h $ +// $Id: include/CGAL/Width_polyhedron_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/aff_transformation_tags.h b/thirdparty/CGAL/include/CGAL/aff_transformation_tags.h index a40250f0..9e6c2052 100644 --- a/thirdparty/CGAL/include/CGAL/aff_transformation_tags.h +++ b/thirdparty/CGAL/include/CGAL/aff_transformation_tags.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/aff_transformation_tags.h $ -// $Id: aff_transformation_tags.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/aff_transformation_tags.h $ +// $Id: include/CGAL/aff_transformation_tags.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/aff_transformation_tags_impl.h b/thirdparty/CGAL/include/CGAL/aff_transformation_tags_impl.h index 2da019a1..f872b71a 100644 --- a/thirdparty/CGAL/include/CGAL/aff_transformation_tags_impl.h +++ b/thirdparty/CGAL/include/CGAL/aff_transformation_tags_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/aff_transformation_tags_impl.h $ -// $Id: aff_transformation_tags_impl.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/aff_transformation_tags_impl.h $ +// $Id: include/CGAL/aff_transformation_tags_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/algorithm.h b/thirdparty/CGAL/include/CGAL/algorithm.h index a400c8f3..7ba24cf9 100644 --- a/thirdparty/CGAL/include/CGAL/algorithm.h +++ b/thirdparty/CGAL/include/CGAL/algorithm.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/algorithm.h $ -// $Id: algorithm.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/algorithm.h $ +// $Id: include/CGAL/algorithm.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/all_furthest_neighbors_2.h b/thirdparty/CGAL/include/CGAL/all_furthest_neighbors_2.h index 07cb36d4..b6e7e00a 100644 --- a/thirdparty/CGAL/include/CGAL/all_furthest_neighbors_2.h +++ b/thirdparty/CGAL/include/CGAL/all_furthest_neighbors_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polytope_distance_d/include/CGAL/all_furthest_neighbors_2.h $ -// $Id: all_furthest_neighbors_2.h 2b61a99 2021-01-05T18:38:16+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polytope_distance_d/include/CGAL/all_furthest_neighbors_2.h $ +// $Id: include/CGAL/all_furthest_neighbors_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -53,8 +53,8 @@ class All_furthest_neighbor_matrix Value operator()( int r, int c) const { - CGAL_optimisation_precondition(r >= 0 && r < number_of_rows()); - CGAL_optimisation_precondition(c >= 0 && c < number_of_columns()); + CGAL_precondition(r >= 0 && r < number_of_rows()); + CGAL_precondition(c >= 0 && c < number_of_columns()); if (c <= r) return Value(c - r); else if (c >= r + number_of_rows()) @@ -93,8 +93,8 @@ all_furthest_neighbors_2( RandomAccessIC points_begin, // check preconditions: int number_of_points( static_cast(iterator_distance( points_begin, points_end))); - CGAL_optimisation_precondition( number_of_points > 0); - CGAL_optimisation_expensive_precondition( + CGAL_precondition( number_of_points > 0); + CGAL_expensive_precondition( is_convex_2( points_begin, points_end, t)); // prepare random access container: @@ -125,7 +125,7 @@ all_furthest_neighbors_2( RandomAccessIC points_begin, RandomAccessIC points_end, OutputIterator o, const Traits& - CGAL_optimisation_expensive_precondition_code(t), + CGAL_expensive_precondition_code(t), std::random_access_iterator_tag) { typedef All_furthest_neighbor_matrix< @@ -135,8 +135,8 @@ all_furthest_neighbors_2( RandomAccessIC points_begin, // check preconditions: int number_of_points( static_cast(iterator_distance( points_begin, points_end))); - CGAL_optimisation_precondition( number_of_points > 0); - CGAL_optimisation_expensive_precondition( + CGAL_precondition( number_of_points > 0); + CGAL_expensive_precondition( is_convex_2( points_begin, points_end, t)); // compute maxima: diff --git a/thirdparty/CGAL/include/CGAL/alpha_wrap_3.h b/thirdparty/CGAL/include/CGAL/alpha_wrap_3.h index 7440afc2..a9bdfe41 100644 --- a/thirdparty/CGAL/include/CGAL/alpha_wrap_3.h +++ b/thirdparty/CGAL/include/CGAL/alpha_wrap_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Alpha_wrap_3/include/CGAL/alpha_wrap_3.h $ -// $Id: alpha_wrap_3.h 9fbfd9a 2022-05-24T10:08:56+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Alpha_wrap_3/include/CGAL/alpha_wrap_3.h $ +// $Id: include/CGAL/alpha_wrap_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez @@ -105,14 +105,14 @@ void alpha_wrap_3(const PointRange& points, using NP_helper = Point_set_processing_3_np_helper; using Geom_traits = typename NP_helper::Geom_traits; using Oracle = Alpha_wraps_3::internal::Triangle_soup_oracle; - using AW3 = Alpha_wraps_3::internal::Alpha_wrap_3; + using AW3 = Alpha_wraps_3::internal::Alpha_wrapper_3; Geom_traits gt = choose_parameter(get_parameter(in_np, internal_np::geom_traits)); Oracle oracle(alpha, gt); oracle.add_triangle_soup(points, faces, in_np); AW3 alpha_wrap_builder(oracle); - alpha_wrap_builder(alpha, offset, alpha_wrap, out_np); + alpha_wrap_builder(alpha, offset, alpha_wrap, in_np, out_np); } // Convenience overloads @@ -148,7 +148,7 @@ void alpha_wrap_3(const PointRange& points, OutputMesh& alpha_wrap, const CGAL::Named_function_parameters& in_np, const CGAL::Named_function_parameters& out_np, - typename std::enable_if::value>::type* = nullptr) + std::enable_if_t::value>* = nullptr) { return alpha_wrap_3(points, faces, alpha, alpha / 30., alpha_wrap, in_np, out_np); } @@ -160,7 +160,7 @@ void alpha_wrap_3(const PointRange& points, const double alpha, OutputMesh& alpha_wrap, const CGAL_NP_CLASS& in_np, - typename std::enable_if::value>::type* = nullptr) + std::enable_if_t::value>* = nullptr) { return alpha_wrap_3(points, faces, alpha, alpha / 30., alpha_wrap, in_np, CGAL::parameters::default_values()); @@ -171,7 +171,7 @@ void alpha_wrap_3(const PointRange& points, const FaceRange& faces, const double alpha, OutputMesh& alpha_wrap, - typename std::enable_if::value>::type* = nullptr) + std::enable_if_t::value>* = nullptr) { return alpha_wrap_3(points, faces, alpha, alpha / 30., alpha_wrap, CGAL::parameters::default_values(), CGAL::parameters::default_values()); @@ -245,7 +245,7 @@ void alpha_wrap_3(const TriangleMesh& tmesh, const InputNamedParameters& in_np, const OutputNamedParameters& out_np #ifndef DOXYGEN_RUNNING - , typename std::enable_if::value>::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -254,14 +254,14 @@ void alpha_wrap_3(const TriangleMesh& tmesh, using Geom_traits = typename GetGeomTraits::type; using Oracle = Alpha_wraps_3::internal::Triangle_mesh_oracle; - using AW3 = Alpha_wraps_3::internal::Alpha_wrap_3; + using AW3 = Alpha_wraps_3::internal::Alpha_wrapper_3; Geom_traits gt = choose_parameter(get_parameter(in_np, internal_np::geom_traits)); Oracle oracle(alpha, gt); oracle.add_triangle_mesh(tmesh, in_np); AW3 alpha_wrap_builder(oracle); - alpha_wrap_builder(alpha, offset, alpha_wrap, out_np); + alpha_wrap_builder(alpha, offset, alpha_wrap, in_np, out_np); } // The convenience overloads are the same for triangle mesh & point set @@ -338,7 +338,7 @@ void alpha_wrap_3(const PointRange& points, #else const CGAL::Named_function_parameters& in_np, const CGAL::Named_function_parameters& out_np, - typename std::enable_if::value>::type* = nullptr + std::enable_if_t::value>* = nullptr #endif ) { @@ -350,14 +350,14 @@ void alpha_wrap_3(const PointRange& points, using NP_helper = Point_set_processing_3_np_helper; using Geom_traits = typename NP_helper::Geom_traits; using Oracle = Alpha_wraps_3::internal::Point_set_oracle; - using AW3 = Alpha_wraps_3::internal::Alpha_wrap_3; + using AW3 = Alpha_wraps_3::internal::Alpha_wrapper_3; Geom_traits gt = choose_parameter(get_parameter(in_np, internal_np::geom_traits)); Oracle oracle(gt); oracle.add_point_set(points, in_np); AW3 alpha_wrap_builder(oracle); - alpha_wrap_builder(alpha, offset, alpha_wrap, out_np); + alpha_wrap_builder(alpha, offset, alpha_wrap, in_np, out_np); } // Convenience overloads, common to both mesh and point set diff --git a/thirdparty/CGAL/include/CGAL/apply_to_range.h b/thirdparty/CGAL/include/CGAL/apply_to_range.h index 7fc90c5d..2b703662 100644 --- a/thirdparty/CGAL/include/CGAL/apply_to_range.h +++ b/thirdparty/CGAL/include/CGAL/apply_to_range.h @@ -3,15 +3,18 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/apply_to_range.h $ -// $Id: apply_to_range.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/apply_to_range.h $ +// $Id: include/CGAL/apply_to_range.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Radu Ursu -#ifndef CGAL_apply_to_range_h -#define CGAL_apply_to_range_h +#ifndef CGAL_APPLY_TO_RANGE_H +#define CGAL_APPLY_TO_RANGE_H + +#include + #include #include @@ -151,4 +154,4 @@ void apply_to_range(const Tr &t, }//end namespace -#endif +#endif //CGAL_APPLY_TO_RANGE_H diff --git a/thirdparty/CGAL/include/CGAL/approximated_offset_2.h b/thirdparty/CGAL/include/CGAL/approximated_offset_2.h index 08eb34ed..fee0bc45 100644 --- a/thirdparty/CGAL/include/CGAL/approximated_offset_2.h +++ b/thirdparty/CGAL/include/CGAL/approximated_offset_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/approximated_offset_2.h $ -// $Id: approximated_offset_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/approximated_offset_2.h $ +// $Id: include/CGAL/approximated_offset_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/argument_swaps.h b/thirdparty/CGAL/include/CGAL/argument_swaps.h index 9268c512..1bd04389 100644 --- a/thirdparty/CGAL/include/CGAL/argument_swaps.h +++ b/thirdparty/CGAL/include/CGAL/argument_swaps.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/argument_swaps.h $ -// $Id: argument_swaps.h 822bc55 2020-03-27T08:28:48+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/argument_swaps.h $ +// $Id: include/CGAL/argument_swaps.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/arrange_offset_polygons_2.h b/thirdparty/CGAL/include/CGAL/arrange_offset_polygons_2.h index f26a8b1d..18a3ca4a 100644 --- a/thirdparty/CGAL/include/CGAL/arrange_offset_polygons_2.h +++ b/thirdparty/CGAL/include/CGAL/arrange_offset_polygons_2.h @@ -3,8 +3,8 @@ // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/arrange_offset_polygons_2.h $ -// $Id: arrange_offset_polygons_2.h 314db57 2020-11-06T12:03:15+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/arrange_offset_polygons_2.h $ +// $Id: include/CGAL/arrange_offset_polygons_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -46,13 +46,10 @@ bool arrange_offset_polygons_2 ( InputPolygonPtrIterator aBegin , const K& ) { - bool bk_poly_assert_mode = get_use_polygon_assertions(); - set_use_polygon_assertions(false); // disable assertions in Polygon_2 function as we may manipulate strictly simple polygons - typedef typename std::iterator_traits::difference_type difference_type ; typedef typename std::iterator_traits::value_type PolygonPtr ; - typedef boost::shared_ptr PolygonWithHolesPtr ; + typedef std::shared_ptr PolygonWithHolesPtr ; difference_type lSize = std::distance(aBegin,aEnd); @@ -64,7 +61,9 @@ bool arrange_offset_polygons_2 ( InputPolygonPtrIterator aBegin const PolygonPtr lPoly = *it ; - Orientation lOrient = lPoly->orientation(); + Orientation lOrient = CGAL::Polygon::internal::orientation_2_no_precondition(lPoly->vertices().begin(), + lPoly->vertices().end(), + lPoly->traits_member()); // It's an outer boundary if ( lOrient == COUNTERCLOCKWISE ) @@ -99,31 +98,28 @@ bool arrange_offset_polygons_2 ( InputPolygonPtrIterator aBegin } if (lParent == nullptr) - { - set_use_polygon_assertions(bk_poly_assert_mode); return false; - } lParent->add_hole(*lPoly); } } - set_use_polygon_assertions(bk_poly_assert_mode); + return true; } template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline -arrange_offset_polygons_2 ( std::vector > const& aPolygons, +arrange_offset_polygons_2 ( std::vector > const& aPolygons, bool& no_error) { - typedef std::vector< boost::shared_ptr > result_type ; + typedef std::vector< std::shared_ptr > result_type ; typedef std::back_insert_iterator Back_inserter; typedef typename PolygonWithHoles::General_polygon_2 Polygon_2 ; typedef typename Kernel_traits::type>::Kernel K ; - typedef typename std::vector >::const_iterator PolygonIterator ; + typedef typename std::vector >::const_iterator PolygonIterator ; result_type rResult ; no_error = arrange_offset_polygons_2( @@ -133,14 +129,14 @@ arrange_offset_polygons_2 ( std::vector > const& aPol } template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline -arrange_offset_polygons_2 ( std::vector > const& aPolygons) +arrange_offset_polygons_2 ( std::vector > const& aPolygons) { bool no_error; return arrange_offset_polygons_2(aPolygons, no_error); } -} // end namespace CGAL +} // namespace CGAL #endif // CGAL_ARRANGE_OFFSET_POLYGONS_2_H diff --git a/thirdparty/CGAL/include/CGAL/array.h b/thirdparty/CGAL/include/CGAL/array.h index ab6eb818..2f624cd8 100644 --- a/thirdparty/CGAL/include/CGAL/array.h +++ b/thirdparty/CGAL/include/CGAL/array.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/array.h $ -// $Id: array.h 160118e 2021-02-11T14:36:26+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/array.h $ +// $Id: include/CGAL/array.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion @@ -30,14 +30,14 @@ namespace CGAL { // https://lists.boost.org/Archives/boost/2006/08/109003.php // // C++0x has it under discussion here : -// http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#851 +// https://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#851 // Hopefully C++0x will fix this properly with initializer_lists. // So, it's temporary, therefore I do not document it and keep it internal. // NOTE : The above is actually untrue ! It is possible to do : // struct S2 { -// typedef boost::array Ar; +// typedef std::array Ar; // Ar m; // S2 (const M&a) : m ((Ar) { { a, a } }) {} // }; diff --git a/thirdparty/CGAL/include/CGAL/assertions.h b/thirdparty/CGAL/include/CGAL/assertions.h index 122a910c..f4bcd2c5 100644 --- a/thirdparty/CGAL/include/CGAL/assertions.h +++ b/thirdparty/CGAL/include/CGAL/assertions.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/assertions.h $ -// $Id: assertions.h 2d9280e 2021-10-27T16:09:32+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/assertions.h $ +// $Id: include/CGAL/assertions.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -44,6 +44,31 @@ # define CGAL_NO_WARNINGS #endif +#if defined(CGAL_ENABLE_DISABLE_ASSERTIONS_AT_RUNTIME) + +#include +namespace CGAL{ +inline bool& get_use_assertions() +{ + CGAL_STATIC_THREAD_LOCAL_VARIABLE(bool, b, true); + return b; +} +inline void set_use_assertions(bool b) +{ + get_use_assertions() = b; +} +} + +#elif !defined(CGAL_USER_DEFINED_USE_ASSERTIONS) + +namespace CGAL{ +inline void set_use_assertions(bool){} +inline constexpr bool get_use_assertions(){return true;} +} + +#endif + + namespace CGAL { // function declarations @@ -89,18 +114,18 @@ inline bool possibly(Uncertain c); #else // no CGAL_NO_ASSERTIONS # define CGAL_ASSERTIONS_ENABLED true # define CGAL_assertion(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__)) # if __cpp_lib_uncaught_exceptions || ( _MSVC_LANG >= 201703L ) // C++17 # define CGAL_destructor_assertion(EX) \ - (CGAL::possibly(EX)||(std::uncaught_exceptions() > 0)?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX)||(std::uncaught_exceptions() > 0))?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__)) # define CGAL_destructor_assertion_catch(CODE) try{ CODE } catch(...) { if(std::uncaught_exceptions() <= 0) throw; } # else // use C++03 `std::uncaught_exception()` # define CGAL_destructor_assertion(EX) \ - (CGAL::possibly(EX)||std::uncaught_exception()?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX)||std::uncaught_exception())?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__)) # define CGAL_destructor_assertion_catch(CODE) try{ CODE } catch(...) { if(!std::uncaught_exception()) throw; } # endif // use C++03 `std::uncaught_exception()` # define CGAL_assertion_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_assertion_code(CODE) CODE # define CGAL_assume(EX) CGAL_assertion(EX) # define CGAL_assume_code(CODE) CGAL_assertion_code(CODE) @@ -112,21 +137,15 @@ inline bool possibly(Uncertain c); # define CGAL_unreachable() CGAL_assertion(false) # endif // CGAL_UNREACHABLE -# define CGAL_static_assertion(EX) \ - static_assert(EX, #EX) - -# define CGAL_static_assertion_msg(EX,MSG) \ - static_assert(EX, MSG) - #if defined(CGAL_NO_ASSERTIONS) || !defined(CGAL_CHECK_EXACTNESS) # define CGAL_exactness_assertion(EX) (static_cast(0)) # define CGAL_exactness_assertion_msg(EX,MSG) (static_cast(0)) # define CGAL_exactness_assertion_code(CODE) #else # define CGAL_exactness_assertion(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__)) # define CGAL_exactness_assertion_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_exactness_assertion_code(CODE) CODE #endif // CGAL_NO_ASSERTIONS @@ -136,9 +155,9 @@ inline bool possibly(Uncertain c); # define CGAL_expensive_assertion_code(CODE) #else # define CGAL_expensive_assertion(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__)) # define CGAL_expensive_assertion_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_expensive_assertion_code(CODE) CODE #endif // CGAL_NO_ASSERTIONS @@ -148,9 +167,9 @@ inline bool possibly(Uncertain c); # define CGAL_expensive_exactness_assertion_code(CODE) #else # define CGAL_expensive_exactness_assertion(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__)) # define CGAL_expensive_exactness_assertion_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_expensive_exactness_assertion_code(CODE) CODE #endif // CGAL_NO_ASSERTIONS @@ -166,9 +185,9 @@ inline bool possibly(Uncertain c); #else # define CGAL_PRECONDITIONS_ENABLED true # define CGAL_precondition(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__)) # define CGAL_precondition_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_precondition_code(CODE) CODE #endif // CGAL_NO_PRECONDITIONS @@ -178,9 +197,9 @@ inline bool possibly(Uncertain c); # define CGAL_exactness_precondition_code(CODE) #else # define CGAL_exactness_precondition(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__)) # define CGAL_exactness_precondition_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_exactness_precondition_code(CODE) CODE #endif // CGAL_NO_PRECONDITIONS @@ -190,9 +209,9 @@ inline bool possibly(Uncertain c); # define CGAL_expensive_precondition_code(CODE) #else # define CGAL_expensive_precondition(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__)) # define CGAL_expensive_precondition_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_expensive_precondition_code(CODE) CODE #endif // CGAL_NO_PRECONDITIONS @@ -202,9 +221,9 @@ inline bool possibly(Uncertain c); # define CGAL_expensive_exactness_precondition_code(CODE) #else # define CGAL_expensive_exactness_precondition(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__)) # define CGAL_expensive_exactness_precondition_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_expensive_exactness_precondition_code(CODE) CODE #endif // CGAL_NO_PRECONDITIONS @@ -218,9 +237,9 @@ inline bool possibly(Uncertain c); # define CGAL_postcondition_code(CODE) #else # define CGAL_postcondition(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__)) # define CGAL_postcondition_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_postcondition_code(CODE) CODE #endif // CGAL_NO_POSTCONDITIONS @@ -230,9 +249,9 @@ inline bool possibly(Uncertain c); # define CGAL_exactness_postcondition_code(CODE) #else # define CGAL_exactness_postcondition(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__)) # define CGAL_exactness_postcondition_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_exactness_postcondition_code(CODE) CODE #endif // CGAL_NO_POSTCONDITIONS @@ -242,9 +261,9 @@ inline bool possibly(Uncertain c); # define CGAL_expensive_postcondition_code(CODE) #else # define CGAL_expensive_postcondition(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__)) # define CGAL_expensive_postcondition_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_expensive_postcondition_code(CODE) CODE #endif // CGAL_NO_POSTCONDITIONS @@ -254,9 +273,9 @@ inline bool possibly(Uncertain c); # define CGAL_expensive_exactness_postcondition_code(CODE) #else # define CGAL_expensive_exactness_postcondition(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__)) # define CGAL_expensive_exactness_postcondition_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_expensive_exactness_postcondition_code(CODE) CODE #endif // CGAL_NO_POSTCONDITIONS @@ -271,16 +290,16 @@ inline bool possibly(Uncertain c); # define CGAL_warning_code(CODE) #else # define CGAL_warning(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__)) # if __cpp_lib_uncaught_exceptions || ( _MSVC_LANG >= 201703L ) // C++17 # define CGAL_destructor_warning(EX) \ - (CGAL::possibly(EX)||(std::uncaught_exceptions() > 0)?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX)||(std::uncaught_exceptions() > 0))?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__)) # else // use C++03 `std::uncaught_exception()` # define CGAL_destructor_warning(EX) \ - (CGAL::possibly(EX)||std::uncaught_exception()?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX)||std::uncaught_exception())?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__)) # endif // use C++03 `std::uncaught_exception()` # define CGAL_warning_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_warning_code(CODE) CODE #endif // CGAL_NO_WARNINGS @@ -290,9 +309,9 @@ inline bool possibly(Uncertain c); # define CGAL_exactness_warning_code(CODE) #else # define CGAL_exactness_warning(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__)) # define CGAL_exactness_warning_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_exactness_warning_code(CODE) CODE #endif // CGAL_NO_WARNINGS @@ -302,9 +321,9 @@ inline bool possibly(Uncertain c); # define CGAL_expensive_warning_code(CODE) #else # define CGAL_expensive_warning(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__)) # define CGAL_expensive_warning_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_expensive_warning_code(CODE) CODE #endif // CGAL_NO_WARNINGS @@ -314,9 +333,9 @@ inline bool possibly(Uncertain c); # define CGAL_expensive_exactness_warning_code(CODE) #else # define CGAL_expensive_exactness_warning(EX) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__)) # define CGAL_expensive_exactness_warning_msg(EX,MSG) \ - (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG)) + ((!CGAL::get_use_assertions() || CGAL::possibly(EX))?(static_cast(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_expensive_exactness_warning_code(CODE) CODE #endif // CGAL_NO_WARNINGS @@ -326,7 +345,7 @@ inline bool possibly(Uncertain c); } //namespace CGAL -// This comes last as it is dependant on the macros to be defined. +// This comes last as it is dependent on the macros to be defined. // But the macros need CGAL::possibly(). #include diff --git a/thirdparty/CGAL/include/CGAL/assertions_behaviour.h b/thirdparty/CGAL/include/CGAL/assertions_behaviour.h index 74eb68f4..5684f307 100644 --- a/thirdparty/CGAL/include/CGAL/assertions_behaviour.h +++ b/thirdparty/CGAL/include/CGAL/assertions_behaviour.h @@ -7,18 +7,18 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/assertions_behaviour.h $ -// $Id: assertions_behaviour.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/assertions_behaviour.h $ +// $Id: include/CGAL/assertions_behaviour.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Geert-Jan Giezeman and Sven Schoenherr -#include - #ifndef CGAL_ASSERTIONS_BEHAVIOUR_H #define CGAL_ASSERTIONS_BEHAVIOUR_H +#include + // workaround against the definition of EXIT in #ifdef EXIT # undef EXIT diff --git a/thirdparty/CGAL/include/CGAL/assertions_impl.h b/thirdparty/CGAL/include/CGAL/assertions_impl.h index 769a0002..55dc7bc0 100644 --- a/thirdparty/CGAL/include/CGAL/assertions_impl.h +++ b/thirdparty/CGAL/include/CGAL/assertions_impl.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/assertions_impl.h $ -// $Id: assertions_impl.h bca05c8 2021-09-24T11:14:01+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/assertions_impl.h $ +// $Id: include/CGAL/assertions_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/atomic.h b/thirdparty/CGAL/include/CGAL/atomic.h index adcc4058..566c0d25 100644 --- a/thirdparty/CGAL/include/CGAL/atomic.h +++ b/thirdparty/CGAL/include/CGAL/atomic.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/atomic.h $ -// $Id: atomic.h 429c764 2022-06-20T09:37:10+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/atomic.h $ +// $Id: include/CGAL/atomic.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial #ifndef CGAL_ATOMIC_H diff --git a/thirdparty/CGAL/include/CGAL/auto_link/CGAL.h b/thirdparty/CGAL/include/CGAL/auto_link/CGAL.h index 50f5e01c..0734d8aa 100644 --- a/thirdparty/CGAL/include/CGAL/auto_link/CGAL.h +++ b/thirdparty/CGAL/include/CGAL/auto_link/CGAL.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/auto_link/CGAL.h $ -// $Id: CGAL.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/auto_link/CGAL.h $ +// $Id: include/CGAL/auto_link/CGAL.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/auto_link/CORE.h b/thirdparty/CGAL/include/CGAL/auto_link/CORE.h index b0c03ed3..d7b548bf 100644 --- a/thirdparty/CGAL/include/CGAL/auto_link/CORE.h +++ b/thirdparty/CGAL/include/CGAL/auto_link/CORE.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/auto_link/CORE.h $ -// $Id: CORE.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/auto_link/CORE.h $ +// $Id: include/CGAL/auto_link/CORE.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/auto_link/ImageIO.h b/thirdparty/CGAL/include/CGAL/auto_link/ImageIO.h index fcd6bdf2..effcccaf 100644 --- a/thirdparty/CGAL/include/CGAL/auto_link/ImageIO.h +++ b/thirdparty/CGAL/include/CGAL/auto_link/ImageIO.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/auto_link/ImageIO.h $ -// $Id: ImageIO.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/auto_link/ImageIO.h $ +// $Id: include/CGAL/auto_link/ImageIO.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/auto_link/Qt.h b/thirdparty/CGAL/include/CGAL/auto_link/Qt.h index f181bc9c..d972cfb7 100644 --- a/thirdparty/CGAL/include/CGAL/auto_link/Qt.h +++ b/thirdparty/CGAL/include/CGAL/auto_link/Qt.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/auto_link/Qt.h $ -// $Id: Qt.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/auto_link/Qt.h $ +// $Id: include/CGAL/auto_link/Qt.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Laurent Rineau @@ -12,17 +12,20 @@ #ifndef CGAL_AUTO_LINK_QT_H #define CGAL_AUTO_LINK_QT_H +#include + + #include #include #if (! defined (CGAL_NO_AUTOLINK_QT)) -#if ( ! defined( CGAL_EXPORTS ) && (! defined ( CGAL_Qt5_EXPORTS ))) +#if ( ! defined( CGAL_EXPORTS ) && (! defined ( CGAL_Qt6_EXPORTS ))) // If CGAL_EXPORTS is defined it means that we are building the CGAL // library as a DLL. The CGAL.dll does not really depend on CGAL_Qt, // whatever the header inclusion graph says. -#define CGAL_LIB_NAME CGAL_Qt5 +#define CGAL_LIB_NAME CGAL_Qt6 #include diff --git a/thirdparty/CGAL/include/CGAL/auto_link/auto_link.h b/thirdparty/CGAL/include/CGAL/auto_link/auto_link.h index e632b0fb..f50e7749 100644 --- a/thirdparty/CGAL/include/CGAL/auto_link/auto_link.h +++ b/thirdparty/CGAL/include/CGAL/auto_link/auto_link.h @@ -9,8 +9,8 @@ // (C) Copyright John Maddock 2003. // // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/auto_link/auto_link.h $ -// $Id: auto_link.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/auto_link/auto_link.h $ +// $Id: include/CGAL/auto_link/auto_link.h a484bfa $ // SPDX-License-Identifier: BSL-1.0 // /* @@ -93,7 +93,7 @@ CGAL_VERSION: Defined in # endif #elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__) // -// C language compatability (no, honestly) +// C language compatibility (no, honestly) // # define BOOST_MSVC _MSC_VER # define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) diff --git a/thirdparty/CGAL/include/CGAL/barycenter.h b/thirdparty/CGAL/include/CGAL/barycenter.h index 3e208d5f..f762b49e 100644 --- a/thirdparty/CGAL/include/CGAL/barycenter.h +++ b/thirdparty/CGAL/include/CGAL/barycenter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis_LGPL/include/CGAL/barycenter.h $ -// $Id: barycenter.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis_LGPL/include/CGAL/barycenter.h $ +// $Id: include/CGAL/barycenter.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/basic.h b/thirdparty/CGAL/include/CGAL/basic.h index d84f1602..67c92ef9 100644 --- a/thirdparty/CGAL/include/CGAL/basic.h +++ b/thirdparty/CGAL/include/CGAL/basic.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/basic.h $ -// $Id: basic.h da0635e 2020-07-20T17:03:28+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/basic.h $ +// $Id: include/CGAL/basic.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/basic_classes.h b/thirdparty/CGAL/include/CGAL/basic_classes.h index 81ddc746..5e1b06aa 100644 --- a/thirdparty/CGAL/include/CGAL/basic_classes.h +++ b/thirdparty/CGAL/include/CGAL/basic_classes.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/basic_classes.h $ -// $Id: basic_classes.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/basic_classes.h $ +// $Id: include/CGAL/basic_classes.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/basic_constructions_2.h b/thirdparty/CGAL/include/CGAL/basic_constructions_2.h index 78845db7..69b0eb40 100644 --- a/thirdparty/CGAL/include/CGAL/basic_constructions_2.h +++ b/thirdparty/CGAL/include/CGAL/basic_constructions_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/basic_constructions_2.h $ -// $Id: basic_constructions_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/basic_constructions_2.h $ +// $Id: include/CGAL/basic_constructions_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/basic_constructions_3.h b/thirdparty/CGAL/include/CGAL/basic_constructions_3.h index fa31e28e..313d65fd 100644 --- a/thirdparty/CGAL/include/CGAL/basic_constructions_3.h +++ b/thirdparty/CGAL/include/CGAL/basic_constructions_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/basic_constructions_3.h $ -// $Id: basic_constructions_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/basic_constructions_3.h $ +// $Id: include/CGAL/basic_constructions_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/bilateral_smooth_point_set.h b/thirdparty/CGAL/include/CGAL/bilateral_smooth_point_set.h index c7be41ad..54310fe7 100644 --- a/thirdparty/CGAL/include/CGAL/bilateral_smooth_point_set.h +++ b/thirdparty/CGAL/include/CGAL/bilateral_smooth_point_set.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h $ -// $Id: bilateral_smooth_point_set.h 38fd07d 2022-11-08T10:24:43+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h $ +// $Id: include/CGAL/bilateral_smooth_point_set.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Shihao Wu, Clement Jamin, Pierre Alliez @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include @@ -72,8 +72,8 @@ compute_denoise_projection( typename Kernel::FT sharpness_angle ///< control sharpness(0-90) ) { - CGAL_point_set_processing_precondition(radius > 0); - CGAL_point_set_processing_precondition(sharpness_angle > 0 + CGAL_precondition(radius > 0); + CGAL_precondition(sharpness_angle > 0 && sharpness_angle < 90); // basic geometric types @@ -89,8 +89,8 @@ compute_denoise_projection( FT project_weight_sum = FT(0.0); Vector normal_sum = CGAL::NULL_VECTOR; - FT cos_sigma = cos(sharpness_angle * CGAL_PI / 180.0); - FT sharpness_bandwidth = CGAL::square((CGAL::max)(1e-8, 1 - cos_sigma)); + FT cos_sigma = cos(FT(sharpness_angle * CGAL_PI / 180.0)); + FT sharpness_bandwidth = CGAL::square((CGAL::max)(FT(1e-8), FT(1.) - cos_sigma)); for (typename PointRange::iterator it : neighbor_pwns) { @@ -150,7 +150,7 @@ compute_max_spacing( boost::make_function_output_iterator ([&](const typename NeighborQuery::input_iterator& it) { - double dist2 = CGAL::squared_distance (get(point_map, vt), get(point_map, *it)); + FT dist2 = CGAL::squared_distance (get(point_map, vt), get(point_map, *it)); max_distance = (CGAL::max)(dist2, max_distance); })); @@ -286,8 +286,8 @@ bilateral_smooth_point_set( const std::function& callback = choose_parameter(get_parameter(np, internal_np::callback), std::function()); - CGAL_point_set_processing_precondition(points.begin() != points.end()); - CGAL_point_set_processing_precondition(k > 1); + CGAL_precondition(points.begin() != points.end()); + CGAL_precondition(k > 1); // types for K nearest neighbors search structure typedef Point_set_processing_3::internal::Neighbor_query Neighbor_query; diff --git a/thirdparty/CGAL/include/CGAL/boost/bimap.hpp b/thirdparty/CGAL/include/CGAL/boost/bimap.hpp index 7da70033..159c9f03 100644 --- a/thirdparty/CGAL/include/CGAL/boost/bimap.hpp +++ b/thirdparty/CGAL/include/CGAL/boost/bimap.hpp @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/boost/bimap.hpp $ -// $Id: bimap.hpp 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/boost/bimap.hpp $ +// $Id: include/CGAL/boost/bimap.hpp a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/bimap/multiset_of.hpp b/thirdparty/CGAL/include/CGAL/boost/bimap/multiset_of.hpp index 7c0de72c..eb293b24 100644 --- a/thirdparty/CGAL/include/CGAL/boost/bimap/multiset_of.hpp +++ b/thirdparty/CGAL/include/CGAL/boost/bimap/multiset_of.hpp @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/boost/bimap/multiset_of.hpp $ -// $Id: multiset_of.hpp 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/boost/bimap/multiset_of.hpp $ +// $Id: include/CGAL/boost/bimap/multiset_of.hpp a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/Alpha_expansion_MaxFlow_tag.h b/thirdparty/CGAL/include/CGAL/boost/graph/Alpha_expansion_MaxFlow_tag.h index 4b6a5b17..56773de0 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/Alpha_expansion_MaxFlow_tag.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/Alpha_expansion_MaxFlow_tag.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_segmentation/include/CGAL/boost/graph/Alpha_expansion_MaxFlow_tag.h $ -// $Id: Alpha_expansion_MaxFlow_tag.h b45e788 2022-06-23T16:25:21+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_segmentation/include/CGAL/boost/graph/Alpha_expansion_MaxFlow_tag.h $ +// $Id: include/CGAL/boost/graph/Alpha_expansion_MaxFlow_tag.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ilker O. Yaz, Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/Dual.h b/thirdparty/CGAL/include/CGAL/boost/graph/Dual.h index 653a6727..8661f110 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/Dual.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/Dual.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/Dual.h $ -// $Id: Dual.h 590ddf8 2021-10-08T15:38:47+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/Dual.h $ +// $Id: include/CGAL/boost/graph/Dual.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -44,7 +44,7 @@ error. \tparam Primal_ must be a model of `FaceGraph` -\cgalModels `FaceGraph` +\cgalModels{FaceGraph} */ template @@ -458,7 +458,7 @@ out_degree(typename boost::graph_traits >::vertex_descriptor v, const Dual

    & dual) { const typename Dual

    ::Primal& primal = dual.primal(); - return boost::distance(halfedges_around_face(halfedge(v,primal),primal)); + return halfedges_around_face(halfedge(v,primal),primal).size(); } template diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/Euler_operations.h b/thirdparty/CGAL/include/CGAL/boost/graph/Euler_operations.h index 878015ef..77011097 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/Euler_operations.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/Euler_operations.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/Euler_operations.h $ -// $Id: Euler_operations.h 29b3fb1 2022-06-20T18:03:15+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/Euler_operations.h $ +// $Id: include/CGAL/boost/graph/Euler_operations.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -38,11 +38,12 @@ typename boost::graph_traits::halfedge_descriptor join_face(typename boost::graph_traits::halfedge_descriptor h, Graph& g) { - typedef typename boost::graph_traits Traits; + typedef typename boost::graph_traits Traits; typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::face_descriptor face_descriptor; + CGAL_precondition(is_valid_halfedge_descriptor(h, g)); halfedge_descriptor hop = opposite(h,g); halfedge_descriptor hprev = prev(h, g), gprev = prev(hop, g); @@ -73,17 +74,17 @@ join_face(typename boost::graph_traits::halfedge_descriptor h, remove_edge(edge(h, g), g); return hprev; - } + } // namespace EulerImpl /// \endcond - namespace Euler { +namespace Euler { + /// \ingroup PkgBGLEulerOperations /// @{ - /** * joins the two vertices incident to `h`, (that is `source(h, g)` and * `target(h, g)`) and removes `source(h,g)`. Returns the predecessor @@ -117,6 +118,8 @@ join_vertex(typename boost::graph_traits::halfedge_descriptor h, typedef typename Traits::vertex_descriptor vertex_descriptor; typedef Halfedge_around_target_iterator halfedge_around_vertex_iterator; + CGAL_precondition(is_valid_halfedge_descriptor(h, g)); + halfedge_descriptor hop = opposite(h, g) , hprev = prev(hop, g) , gprev = prev(h, g) @@ -191,8 +194,9 @@ split_vertex(typename boost::graph_traits::halfedge_descriptor h1, typename boost::graph_traits::halfedge_descriptor h2, Graph& g) { - CGAL_assertion(h1 != h2); - CGAL_assertion(target(h1, g) == target(h2, g)); + CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g)); + CGAL_precondition(h1 != h2); + CGAL_precondition(target(h1, g) == target(h2, g)); typename boost::graph_traits::halfedge_descriptor hnew = halfedge(add_edge(g), g), @@ -226,8 +230,11 @@ split_vertex(typename boost::graph_traits::halfedge_descriptor h1, template typename boost::graph_traits::halfedge_descriptor split_edge(typename boost::graph_traits::halfedge_descriptor h, Graph& g) -{ return opposite(split_vertex(prev(h,g), opposite(h,g),g), g); } +{ + CGAL_precondition(is_valid_halfedge_descriptor(h, g)); + return opposite(split_vertex(prev(h,g), opposite(h,g),g), g); +} /** * joins the two faces incident to `h` and `opposite(h,g)`. @@ -260,8 +267,6 @@ join_face(typename boost::graph_traits::halfedge_descriptor h, return EulerImpl::join_face(h,g); } - - /** * splits the face incident to `h1` and `h2`. Creates the opposite * halfedges `h3` and `h4`, such that `next(h1,g) == h3` and `next(h2,g) == h4`. @@ -290,6 +295,12 @@ split_face(typename boost::graph_traits::halfedge_descriptor h1, typedef typename boost::graph_traits Traits; typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::face_descriptor face_descriptor; + + CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g)); + CGAL_precondition(h1 != h2); + CGAL_precondition(face(h1, g) == face(h2, g)); + CGAL_precondition(next(h1, g) != h2 && next(h2, g) != h1); + halfedge_descriptor hnew = halfedge(add_edge(g), g); face_descriptor fnew = add_face(g); internal::insert_tip( hnew, h2, g); @@ -298,6 +309,7 @@ split_face(typename boost::graph_traits::halfedge_descriptor h1, internal::set_face_in_face_loop(opposite(hnew,g), fnew, g); set_halfedge(face(hnew,g), hnew, g); set_halfedge(face(opposite(hnew,g),g), opposite(hnew,g), g); + return hnew; } @@ -327,7 +339,9 @@ join_loop(typename boost::graph_traits::halfedge_descriptor h1, typedef typename boost::graph_traits Traits; typedef typename Traits::halfedge_descriptor halfedge_descriptor; + CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g)); CGAL_precondition( is_border(h1,g) || face(h1, g) != face(h2, g)); + if (! is_border(h1,g)) remove_face(face(h1, g), g); if (! is_border(h2,g)) @@ -401,13 +415,18 @@ split_loop(typename boost::graph_traits::halfedge_descriptor h1, typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::face_descriptor face_descriptor; + CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && + is_valid_halfedge_descriptor(h2, g) && + is_valid_halfedge_descriptor(h3, g)); + halfedge_descriptor h = h1, i = h2, j = h3; - CGAL_precondition( h != i); - CGAL_precondition( h != j); - CGAL_precondition( i != j); - CGAL_precondition( target(h,g) == target(opposite(i,g),g)); - CGAL_precondition( target(i,g) == target(opposite(j,g),g)); - CGAL_precondition( target(j,g) == target(opposite(h,g),g)); + CGAL_precondition(h != i); + CGAL_precondition(h != j); + CGAL_precondition(i != j); + CGAL_precondition(target(h,g) == target(opposite(i,g),g)); + CGAL_precondition(target(i,g) == target(opposite(j,g),g)); + CGAL_precondition(target(j,g) == target(opposite(h,g),g)); + // Create a copy of the triangle. halfedge_descriptor hnew = internal::copy(h,g); halfedge_descriptor inew = internal::copy(i,g); @@ -418,7 +437,7 @@ split_loop(typename boost::graph_traits::halfedge_descriptor h1, internal::insert_tip( opposite(inew, g), hnew, g); internal::insert_tip( opposite(jnew, g), inew, g); internal::insert_tip( opposite(hnew, g), jnew, g); - // Make the new incidences with the old stucture. + // Make the new incidences with the old structure. CGAL_assertion_code( std::size_t termination_count = 0;) if ( next(h,g) != i) { halfedge_descriptor nh = next(h, g); @@ -505,7 +524,9 @@ void remove_face(typename boost::graph_traits::halfedge_descriptor h, typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::face_descriptor face_descriptor; + CGAL_precondition(is_valid_halfedge_descriptor(h, g)); CGAL_precondition(! is_border(h,g)); + face_descriptor f = face(h, g); halfedge_descriptor end = h; @@ -551,13 +572,15 @@ add_edge(typename boost::graph_traits::vertex_descriptor s, typename boost::graph_traits::vertex_descriptor t, Graph& g) { + CGAL_precondition(is_valid_vertex_descriptor(s, g) && is_valid_vertex_descriptor(t, g)); + typename boost::graph_traits::edge_descriptor e = add_edge(g); set_target(halfedge(e, g), t, g); set_target(opposite(halfedge(e, g), g), s, g); + return e; } - /** * checks whether a new face defined by a range of vertices (identified by their descriptors, * `boost::graph_traits::%vertex_descriptor`) can be added. @@ -568,6 +591,9 @@ bool can_add_face(const VertexRange& vrange, const PMesh& sm) typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + CGAL_precondition_code(for(vertex_descriptor v : vrange)) + CGAL_precondition(is_valid_vertex_descriptor(v, sm)); + std::vector::vertex_descriptor> face(vrange.begin(), vrange.end()); std::size_t N = face.size(); @@ -697,6 +723,9 @@ add_face(const VertexRange& vr, Graph& g) typedef typename boost::graph_traits::face_descriptor face_descriptor; typedef typename boost::graph_traits::edge_descriptor edge_descriptor; + CGAL_precondition_code(for(vertex_descriptor v : vr)) + CGAL_precondition(is_valid_vertex_descriptor(v, g)); + std::vector vertices(vr.begin(), vr.end()); // quick and dirty copy unsigned int n = (unsigned int)vertices.size(); //check that every vertex is unique @@ -954,7 +983,7 @@ void add_faces(const RangeofVertexRange& faces_to_add, PolygonMesh& pm) // disconnect hand-fans (umbrellas being not affected) at non-manifold vertices // in case the location on the boundary of the mesh where they are attached is closed. // Note that we link the boundary of the hand fans together, making them - // independant boundary cycles (even if the non-manifold vertex is not duplicated) + // independent boundary cycles (even if the non-manifold vertex is not duplicated) if ( !former_border_hedges.empty() ) { std::sort(former_border_hedges.begin(), former_border_hedges.end()); // TODO: is it better to use a dynamic pmap? @@ -1115,7 +1144,9 @@ void make_hole(typename boost::graph_traits::halfedge_descriptor h, typedef typename Traits::face_descriptor face_descriptor; typedef Halfedge_around_face_iterator halfedge_around_face_iterator; - CGAL_precondition(! is_border(h,g)); + CGAL_precondition(is_valid_halfedge_descriptor(h, g)); + CGAL_precondition(!is_border(h, g)); + face_descriptor fd = face(h, g); halfedge_around_face_iterator hafib, hafie; for(boost::tie(hafib, hafie) = halfedges_around_face(h, g); @@ -1139,6 +1170,9 @@ void fill_hole(typename boost::graph_traits::halfedge_descriptor h, typedef typename Traits::face_descriptor face_descriptor; typedef typename Traits::halfedge_descriptor halfedge_descriptor; + CGAL_precondition(is_valid_halfedge_descriptor(h, g)); + CGAL_precondition(is_border(h, g)); + face_descriptor f = add_face(g); for(halfedge_descriptor hd : halfedges_around_face(h,g)){ set_face(hd, f,g); @@ -1179,6 +1213,9 @@ add_center_vertex(typename boost::graph_traits::halfedge_descriptor h, typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::face_descriptor face_descriptor; + CGAL_precondition(is_valid_halfedge_descriptor(h, g)); + CGAL_precondition(!is_border(h, g)); + halfedge_descriptor hnew = halfedge(add_edge(g),g); vertex_descriptor vnew = add_vertex(g); internal::close_tip(hnew, vnew, g); @@ -1236,6 +1273,8 @@ remove_center_vertex(typename boost::graph_traits::halfedge_descriptor h, typedef typename boost::graph_traits Traits; typedef typename Traits::halfedge_descriptor halfedge_descriptor; + CGAL_precondition(is_valid_halfedge_descriptor(h, g)); + // h points to the vertex that gets removed halfedge_descriptor h2 = opposite(next(h, g), g); halfedge_descriptor hret = prev(h, g); @@ -1283,14 +1322,28 @@ add_vertex_and_face_to_border(typename boost::graph_traits::halfedge_desc typename boost::graph_traits::halfedge_descriptor h2, Graph& g) { - typename boost::graph_traits::vertex_descriptor v = add_vertex(g); - typename boost::graph_traits::face_descriptor f = add_face(g); - typename boost::graph_traits::edge_descriptor e1 = add_edge(g); - typename boost::graph_traits::edge_descriptor e2 = add_edge(g); - typename boost::graph_traits::halfedge_descriptor he1= halfedge(e1, g); - typename boost::graph_traits::halfedge_descriptor he2= halfedge(e2, g); - typename boost::graph_traits::halfedge_descriptor ohe1= opposite(he1, g); - typename boost::graph_traits::halfedge_descriptor ohe2= opposite(he2, g); + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::edge_descriptor edge_descriptor; + typedef typename boost::graph_traits::face_descriptor face_descriptor; + + CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g)); + CGAL_precondition(is_border(h1, g) && is_border(h2, g)); + CGAL_precondition(h1 != h2); + + CGAL_precondition_code(halfedge_descriptor h = h1;) + CGAL_precondition_code(const halfedge_descriptor done = h1;) + CGAL_precondition_code(do { if(h == h2) break; h = next(h, g); } while(h != done);) + CGAL_precondition(h != done); + + vertex_descriptor v = add_vertex(g); + face_descriptor f = add_face(g); + edge_descriptor e1 = add_edge(g); + edge_descriptor e2 = add_edge(g); + halfedge_descriptor he1 = halfedge(e1, g); + halfedge_descriptor he2 = halfedge(e2, g); + halfedge_descriptor ohe1= opposite(he1, g); + halfedge_descriptor ohe2= opposite(he2, g); set_next(ohe1, next(h1,g),g); set_next(h1,he1,g); @@ -1340,6 +1393,7 @@ add_face_to_border(typename boost::graph_traits::halfedge_descriptor h1, typename boost::graph_traits::halfedge_descriptor h2, Graph& g) { + CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g)); CGAL_precondition(is_border(h1,g) == true); CGAL_precondition(is_border(h2,g) == true); CGAL_precondition(h1 != h2); @@ -1378,6 +1432,106 @@ add_face_to_border(typename boost::graph_traits::halfedge_descriptor h1, return newh; } +/** + * \returns `true` if `e` satisfies the *link condition* \cgalCite{degn-tpec-98}, which guarantees that the surface is also 2-manifold after the edge collapse. + */ +template +bool +does_satisfy_link_condition(typename boost::graph_traits::edge_descriptor e, + const Graph& g) +{ + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef CGAL::Halfedge_around_source_iterator out_edge_iterator; + + halfedge_descriptor v0_v1 = halfedge(e,g); + halfedge_descriptor v1_v0 = opposite(v0_v1,g); + + vertex_descriptor v0 = target(v1_v0,g), v1 = target(v0_v1,g); + + vertex_descriptor vL = target(next(v0_v1,g),g); + vertex_descriptor vR = target(next(v1_v0,g),g); + + out_edge_iterator eb1, ee1 ; + out_edge_iterator eb2, ee2 ; + + // The following loop checks the link condition for v0_v1. + // Specifically, that for every vertex 'k' adjacent to both 'p and 'q', 'pkq' is a face of the mesh. + // + for ( boost::tie(eb1,ee1) = halfedges_around_source(v0,g) ; eb1 != ee1 ; ++ eb1 ) + { + halfedge_descriptor v0_k = *eb1; + + if ( v0_k != v0_v1 ) + { + vertex_descriptor k = target(v0_k,g); + + for ( boost::tie(eb2,ee2) = halfedges_around_source(k,g) ; eb2 != ee2 ; ++ eb2 ) + { + halfedge_descriptor k_v1 = *eb2; + + if ( target(k_v1,g) == v1 ) + { + // At this point we know p-q-k are connected and we need to determine if this triangle is a face of the mesh. + // + // Since the mesh is known to be triangular there are at most two faces sharing the edge p-q. + // + // If p->q is NOT a border edge, the top face is p->q->t where t is target(next(p->q)) + // If q->p is NOT a border edge, the bottom face is q->p->b where b is target(next(q->p)) + // + // If k is either t or b then p-q-k *might* be a face of the mesh. It won't be if k==t but p->q is border + // or k==b but q->b is a border (because in that case even though there exists triangles p->q->t (or q->p->b) + // they are holes, not faces) + // + + bool lIsFace = ( vL == k && (! is_border(v0_v1,g)) ) + || ( vR == k && (! is_border(v1_v0,g)) ) ; + + if ( !lIsFace ) + { + // CGAL_ECMS_TRACE(3," k=V" << get(Vertex_index_map,k) << " IS NOT in a face with p-q. NON-COLLAPSABLE edge." ) ; + return false ; + } + else + { + //CGAL_ECMS_TRACE(4," k=V" << get(Vertex_index_map,k) << " is in a face with p-q") ; + } + } + } + } + } + + // detect isolated triangle (or triangle attached to a mesh with non-manifold vertices) + if (!is_border(v0_v1,g) && is_border(opposite(next(v0_v1,g), g), g) + && is_border(opposite(prev(v0_v1,g), g), g) ) return false; + if (!is_border(v1_v0,g) && is_border(opposite(next(v1_v0,g), g), g) + && is_border(opposite(prev(v1_v0,g), g), g) ) return false; + + if ( !is_border(v0_v1,g) && !is_border(v1_v0,g) ) + { + if ( is_border(v0,g) && is_border(v1,g) ) + { + //CGAL_ECMS_TRACE(3," both p and q are boundary vertices but p-q is not. NON-COLLAPSABLE edge." ) ; + return false ; + } + else + { + if ( is_tetrahedron(v0_v1,g) ) + { + //CGAL_ECMS_TRACE(3," p-q belongs to a tetrahedron. NON-COLLAPSABLE edge." ) ; + return false ; + } + if ( next(v0_v1, g) == opposite(prev(v1_v0, g), g) && + prev(v0_v1, g) == opposite(next(v1_v0, g), g) ) + { + //CGAL_ECMS_TRACE(3," degenerate volume." ) ; + return false ; + } + } + } + + return true ; +} /** * collapses an edge in a graph. @@ -1409,6 +1563,9 @@ collapse_edge(typename boost::graph_traits::edge_descriptor e, typedef typename Traits::vertex_descriptor vertex_descriptor; typedef typename Traits::halfedge_descriptor halfedge_descriptor; + CGAL_precondition(is_valid_edge_descriptor(e, g)); + CGAL_precondition(does_satisfy_link_condition(e,g)); + halfedge_descriptor pq = halfedge(e,g); halfedge_descriptor qp = opposite(pq, g); halfedge_descriptor pt = opposite(prev(pq, g), g); @@ -1520,15 +1677,18 @@ collapse_edge(typename boost::graph_traits::edge_descriptor e, template typename boost::graph_traits::vertex_descriptor collapse_edge(typename boost::graph_traits::edge_descriptor v0v1, - Graph& g - , EdgeIsConstrainedMap Edge_is_constrained_map) + Graph& g, + EdgeIsConstrainedMap Edge_is_constrained_map) { typedef boost::graph_traits< Graph > Traits; typedef typename Traits::vertex_descriptor vertex_descriptor; typedef typename Traits::halfedge_descriptor halfedge_descriptor; + CGAL_precondition(is_valid_edge_descriptor(v0v1, g)); + CGAL_precondition(does_satisfy_link_condition(v0v1,g)); + CGAL_precondition(!get(Edge_is_constrained_map, v0v1)); + halfedge_descriptor pq = halfedge(v0v1,g); - CGAL_assertion( !get(Edge_is_constrained_map,v0v1) ); halfedge_descriptor qp = opposite(pq,g); halfedge_descriptor pt = opposite(prev(pq,g),g); @@ -1666,6 +1826,8 @@ flip_edge(typename boost::graph_traits::halfedge_descriptor h, typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::face_descriptor face_descriptor; + CGAL_precondition(is_valid_halfedge_descriptor(h, g)); + vertex_descriptor s = source(h,g); vertex_descriptor t = target(h,g); halfedge_descriptor nh = next(h,g), nnh = next(nh,g), oh = opposite(h,g), noh = next(oh,g), nnoh = next(noh,g); @@ -1694,113 +1856,11 @@ flip_edge(typename boost::graph_traits::halfedge_descriptor h, set_halfedge(foh,oh,g); } -/** - * \returns `true` if `e` satisfies the *link condition* \cgalCite{degn-tpec-98}, which guarantees that the surface is also 2-manifold after the edge collapse. - */ -template -bool -does_satisfy_link_condition(typename boost::graph_traits::edge_descriptor e, - const Graph& g) -{ - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef CGAL::Halfedge_around_source_iterator out_edge_iterator; - - halfedge_descriptor v0_v1 = halfedge(e,g); - halfedge_descriptor v1_v0 = opposite(v0_v1,g); - - vertex_descriptor v0 = target(v1_v0,g), v1 = target(v0_v1,g); - - vertex_descriptor vL = target(next(v0_v1,g),g); - vertex_descriptor vR = target(next(v1_v0,g),g); - - out_edge_iterator eb1, ee1 ; - out_edge_iterator eb2, ee2 ; - - // The following loop checks the link condition for v0_v1. - // Specifically, that for every vertex 'k' adjacent to both 'p and 'q', 'pkq' is a face of the mesh. - // - for ( boost::tie(eb1,ee1) = halfedges_around_source(v0,g) ; eb1 != ee1 ; ++ eb1 ) - { - halfedge_descriptor v0_k = *eb1; - - if ( v0_k != v0_v1 ) - { - vertex_descriptor k = target(v0_k,g); - - for ( boost::tie(eb2,ee2) = halfedges_around_source(k,g) ; eb2 != ee2 ; ++ eb2 ) - { - halfedge_descriptor k_v1 = *eb2; - - if ( target(k_v1,g) == v1 ) - { - // At this point we know p-q-k are connected and we need to determine if this triangle is a face of the mesh. - // - // Since the mesh is known to be triangular there are at most two faces sharing the edge p-q. - // - // If p->q is NOT a border edge, the top face is p->q->t where t is target(next(p->q)) - // If q->p is NOT a border edge, the bottom face is q->p->b where b is target(next(q->p)) - // - // If k is either t or b then p-q-k *might* be a face of the mesh. It won't be if k==t but p->q is border - // or k==b but q->b is a border (because in that case even though there exists triangles p->q->t (or q->p->b) - // they are holes, not faces) - // - - bool lIsFace = ( vL == k && (! is_border(v0_v1,g)) ) - || ( vR == k && (! is_border(v1_v0,g)) ) ; - - if ( !lIsFace ) - { - // CGAL_ECMS_TRACE(3," k=V" << get(Vertex_index_map,k) << " IS NOT in a face with p-q. NON-COLLAPSABLE edge." ) ; - return false ; - } - else - { - //CGAL_ECMS_TRACE(4," k=V" << get(Vertex_index_map,k) << " is in a face with p-q") ; - } - } - } - } - } - - // detect isolated triangle (or triangle attached to a mesh with non-manifold vertices) - if (!is_border(v0_v1,g) && is_border(opposite(next(v0_v1,g), g), g) - && is_border(opposite(prev(v0_v1,g), g), g) ) return false; - if (!is_border(v1_v0,g) && is_border(opposite(next(v1_v0,g), g), g) - && is_border(opposite(prev(v1_v0,g), g), g) ) return false; - - if ( !is_border(v0_v1,g) && !is_border(v1_v0,g) ) - { - if ( is_border(v0,g) && is_border(v1,g) ) - { - //CGAL_ECMS_TRACE(3," both p and q are boundary vertices but p-q is not. NON-COLLAPSABLE edge." ) ; - return false ; - } - else - { - if ( is_tetrahedron(v0_v1,g) ) - { - //CGAL_ECMS_TRACE(3," p-q belongs to a tetrahedron. NON-COLLAPSABLE edge." ) ; - return false ; - } - if ( next(v0_v1, g) == opposite(prev(v1_v0, g), g) && - prev(v0_v1, g) == opposite(next(v1_v0, g), g) ) - { - //CGAL_ECMS_TRACE(3," degenerate volume." ) ; - return false ; - } - } - } - - return true ; -} - #ifndef CGAL_NO_DEPRECATED_CODE /// \cond SKIP_IN_MANUAL template -bool - satisfies_link_condition(typename boost::graph_traits::edge_descriptor e, - const Graph& g) +bool satisfies_link_condition(typename boost::graph_traits::edge_descriptor e, + const Graph& g) { return does_satisfy_link_condition(e, g); } @@ -1808,9 +1868,8 @@ bool #endif /// @} -} // CGAL - -} // CGAL +} // namespace Euler +} // namespace CGAL #endif /* CGAL_EULER_OPERATIONS_H */ diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/Face_filtered_graph.h b/thirdparty/CGAL/include/CGAL/boost/graph/Face_filtered_graph.h index 07e9ccf5..7111431d 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/Face_filtered_graph.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/Face_filtered_graph.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/Face_filtered_graph.h $ -// $Id: Face_filtered_graph.h c1c7f4a 2022-02-24T19:57:20+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/Face_filtered_graph.h $ +// $Id: include/CGAL/boost/graph/Face_filtered_graph.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -42,16 +42,18 @@ namespace CGAL { * boost::filtered_graph, * this class only requires a way to access the selected faces and will automatically select the * edges/halfedges and vertices present in the adapted graph. A vertex is selected if it is incident to at least one - * selected face. A edge is selected if it is incident to at least a selected face. A halfedge is selected if its edge + * selected face. An edge is selected if it is incident to at least a selected face. A halfedge is selected if its edge * is selected. * * Since this class is a model of the `FaceGraph` concept, there is a restriction on the set of selected faces: * the adapted graph must define a manifold mesh. In order to check that this condition is verified, you can * use the function `is_selection_valid()`. * - * There are two different ways to initialize this class. You can directly provide the set of faces selected, or - * if you have a face patch map, select the patches of faces. The latter option is convenient if you want to access - * some connected components of a graph after having called `CGAL::Polygon_mesh_processing::connected_components()`. + * There are two different ways to initialize this class: you can directly provide a set of selected faces, + * or provide a set of patch identifiers as well as a map between faces and patch identifiers. + * The latter option is convenient if you want to access some connected components of a graph + * after having called `CGAL::Polygon_mesh_processing::connected_components()`, or if you want + * to select only faces of a given color, for example. * * The documented interface of this class is limited on purpose and free functions of the concept * this class is a model of must be used to manipulate it. @@ -66,9 +68,7 @@ namespace CGAL { * \tparam VIMap a model of `ReadablePropertyMap` with `graph_traits::%vertex_descriptor` as key and `graph_traits::%vertices_size_type` as value * \tparam HIMap a model of `ReadablePropertyMap` with `graph_traits::%halfedge_descriptor` as key and `graph_traits::%halfedges_size_type` as value * - * \cgalModels `FaceListGraph` - * \cgalModels `HalfedgeListGraph` - * \cgalModels \bgllink{VertexListGraph} + * \cgalModels{FaceListGraph,HalfedgeListGraph,\bgllink{VertexListGraph}} */ template::%faces_size_type` as value type. - * \tparam FacePatchIndexRange a model of `ConstRange` with `boost::property_traits::%value_type` as value type. + * \tparam FacePatchIDMap a model of `ReadablePropertyMap` with `face_descriptor` as key type + * and whose value type is a model of `Hashable`. + * \tparam FacePatchIDRange a model of `ConstRange` with `boost::property_traits::%value_type` as value type. * \tparam NamedParameters a sequence of named parameters * * \param graph the underlying graph - * \param face_patch_index_map the property map that assigns a patch index to each face - * \param selected_face_patch_indices a range of the face patch indices to select + * \param face_patch_id_map the property map that assigns a patch ID to each face + * \param selected_face_patch_ids a range of the face patch identifiers to select * \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below * * \cgalNamedParamsBegin @@ -208,15 +207,15 @@ struct Face_filtered_graph * \cgalParamNEnd * \cgalNamedParamsEnd */ - template + template Face_filtered_graph(const Graph& graph, - const FacePatchIndexRange& selected_face_patch_indices, - FacePatchIndexMap face_patch_index_map, + const FacePatchIDRange& selected_face_patch_ids, + FacePatchIDMap face_patch_id_map, const CGAL_NP_CLASS& np #ifndef DOXYGEN_RUNNING - , typename boost::enable_if< - typename boost::has_range_const_iterator::type - >::type* = 0 + , std::enable_if_t< + boost::has_range_const_iterator::value + >* = 0 #endif ) : _graph(const_cast(graph)), @@ -224,35 +223,34 @@ struct Face_filtered_graph vimap(CGAL::get_initialized_vertex_index_map(graph, np)), himap(CGAL::get_initialized_halfedge_index_map(graph, np)) { - set_selected_faces(selected_face_patch_indices, face_patch_index_map); + set_selected_faces(selected_face_patch_ids, face_patch_id_map); } - template + template Face_filtered_graph(const Graph& graph, - const FacePatchIndexRange& selected_face_patch_indices, - FacePatchIndexMap face_patch_index_map - , typename boost::enable_if< - typename boost::has_range_const_iterator::type - >::type* = 0 + const FacePatchIDRange& selected_face_patch_ids, + FacePatchIDMap face_patch_id_map + , std::enable_if_t< + boost::has_range_const_iterator::value + >* = 0 ) : _graph(const_cast(graph)), fimap(CGAL::get_initialized_face_index_map(graph)), vimap(CGAL::get_initialized_vertex_index_map(graph)), himap(CGAL::get_initialized_halfedge_index_map(graph)) { - set_selected_faces(selected_face_patch_indices, face_patch_index_map); + set_selected_faces(selected_face_patch_ids, face_patch_id_map); } /*! * \brief Constructor where the set of selected faces is specified as a patch id. * - * \tparam FacePatchIndexMap a model of `ReadablePropertyMap` with - `face_descriptor` as key type and - `graph_traits::%faces_size_type` as value type. + * \tparam FacePatchIDMap a model of `ReadablePropertyMap` with `face_descriptor` as key type + * and whose value type is a model of `Hashable`. * \tparam NamedParameters a sequence of named parameters * * \param graph the underlying graph. - * \param face_patch_index_map the property map that assigns a patch index to each face - * \param selected_face_patch_index the index of the face patch selected + * \param face_patch_id_map the property map that assigns a patch ID to each face + * \param selected_face_patch_id the identifier of the face patch selected * \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below * * \cgalNamedParamsBegin @@ -290,29 +288,29 @@ struct Face_filtered_graph * \cgalParamNEnd * \cgalNamedParamsEnd */ - template + template Face_filtered_graph(const Graph& graph, - typename boost::property_traits::value_type selected_face_patch_index, - FacePatchIndexMap face_patch_index_map, + typename boost::property_traits::value_type selected_face_patch_id, + FacePatchIDMap face_patch_id_map, const CGAL_NP_CLASS& np) : _graph(const_cast(graph)), fimap(CGAL::get_initialized_face_index_map(graph, np)), vimap(CGAL::get_initialized_vertex_index_map(graph, np)), himap(CGAL::get_initialized_halfedge_index_map(graph, np)) { - set_selected_faces(selected_face_patch_index, face_patch_index_map); + set_selected_faces(selected_face_patch_id, face_patch_id_map); } - template + template Face_filtered_graph(const Graph& graph, - typename boost::property_traits::value_type pid, - FacePatchIndexMap face_patch_index_map) + typename boost::property_traits::value_type pid, + FacePatchIDMap face_patch_id_map) : _graph(const_cast(graph)), fimap(CGAL::get_initialized_face_index_map(graph)), vimap(CGAL::get_initialized_vertex_index_map(graph)), himap(CGAL::get_initialized_halfedge_index_map(graph)) { - set_selected_faces(pid, face_patch_index_map); + set_selected_faces(pid, face_patch_id_map); } /*! @@ -438,9 +436,9 @@ struct Face_filtered_graph } /// changes the set of selected faces using a patch id. - template - void set_selected_faces(typename boost::property_traits::value_type face_patch_id, - FacePatchIndexMap face_patch_index_map) + template + void set_selected_faces(typename boost::property_traits::value_type face_patch_id, + FacePatchIDMap face_patch_id_map) { selected_faces.resize(num_faces(_graph)); selected_vertices.resize(num_vertices(_graph)); @@ -452,7 +450,7 @@ struct Face_filtered_graph for(face_descriptor fd : faces(_graph) ) { - if(get(face_patch_index_map, fd) == face_patch_id) + if(get(face_patch_id_map, fd) == face_patch_id) { selected_faces.set(get(fimap, fd)); for(halfedge_descriptor hd : halfedges_around_face(halfedge(fd, _graph), _graph)) @@ -467,13 +465,13 @@ struct Face_filtered_graph reset_indices(); } /// changes the set of selected faces using a range of patch ids - template - void set_selected_faces(const FacePatchIndexRange& selected_face_patch_indices, - FacePatchIndexMap face_patch_index_map + template + void set_selected_faces(const FacePatchIDRange& selected_face_patch_ids, + FacePatchIDMap face_patch_id_map #ifndef DOXYGEN_RUNNING - , typename boost::enable_if< - typename boost::has_range_const_iterator::type - >::type* = 0 + , std::enable_if_t< + boost::has_range_const_iterator::value + >* = 0 #endif ) { @@ -485,13 +483,13 @@ struct Face_filtered_graph selected_vertices.reset(); selected_halfedges.reset(); - typedef typename boost::property_traits::value_type Patch_index; - std::unordered_set pids(boost::begin(selected_face_patch_indices), - boost::end(selected_face_patch_indices)); + typedef typename boost::property_traits::value_type Patch_ID; + std::unordered_set pids(std::begin(selected_face_patch_ids), + std::end(selected_face_patch_ids)); - for(face_descriptor fd : faces(_graph) ) + for(face_descriptor fd : faces(_graph)) { - if(pids.count(get(face_patch_index_map, fd)) != 0) + if(pids.count(get(face_patch_id_map, fd)) != 0) { selected_faces.set(get(fimap, fd)); for(halfedge_descriptor hd : halfedges_around_face(halfedge(fd, _graph), _graph)) @@ -588,31 +586,31 @@ struct Face_filtered_graph return selected_halfedges.count(); } - Property_map_binder::value_type>::type> + Compose_property_map::value_type>::type> get_face_index_map() const { is_imap_in_use.set(0); initialize_face_indices(); - return bind_property_maps(fimap, make_property_map(face_indices)); + return make_compose_property_map(fimap, make_property_map(face_indices)); } - Property_map_binder::value_type>::type> + Compose_property_map::value_type>::type> get_vertex_index_map() const { is_imap_in_use.set(1); initialize_vertex_indices(); - return bind_property_maps(vimap, make_property_map(vertex_indices) ); + return make_compose_property_map(vimap, make_property_map(vertex_indices) ); } - Property_map_binder::value_type >::type> + Compose_property_map::value_type >::type> get_halfedge_index_map() const { is_imap_in_use.set(2); initialize_halfedge_indices(); - return bind_property_maps(himap, make_property_map(halfedge_indices) ); + return make_compose_property_map(himap, make_property_map(halfedge_indices) ); } /// returns `true` if around any vertex of a selected face there is at most a single umbrella @@ -1322,7 +1320,7 @@ struct property_map, boost typedef CGAL::Face_filtered_graph FFG; typedef typename FFG::FIM FIM; - typedef typename CGAL::Property_map_binder::value_type>::type> type; typedef type const_type; @@ -1334,7 +1332,7 @@ struct property_map, boost typedef CGAL::Face_filtered_graph FFG; typedef typename FFG::VIM VIM; - typedef typename CGAL::Property_map_binder::value_type>::type> type; typedef type const_type; @@ -1346,7 +1344,7 @@ struct property_map, boost typedef CGAL::Face_filtered_graph FFG; typedef typename FFG::HIM HIM; - typedef typename CGAL::Property_map_binder::value_type>::type> type; typedef type const_type; diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h b/thirdparty/CGAL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h index 49bd5246..1dc236e5 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h $ -// $Id: Graph_with_descriptor_with_graph.h 590ddf8 2021-10-08T15:38:47+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h $ +// $Id: include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -115,9 +115,7 @@ All internal properties of the underlying graph are forwarded. Property maps can be wrapped with `Graph_with_descriptor_with_graph_property_map`. \tparam Graph must be a model of a `FaceListGraph` and `HalfedgeListGraph`. -\cgalModels `FaceListGraph` -\cgalModels `HalfedgeListGraph` -\cgalModels `MutableFaceGraph` if `Graph` is a model of `MutableFaceGraph` +\cgalModels{FaceListGraph,HalfedgeListGraph,MutableFaceGraph if `Graph` is a model of `MutableFaceGraph`} */ template @@ -689,7 +687,7 @@ is_valid(const Graph_with_descriptor_with_graph & w, bool verbose = false \ingroup PkgBGLAdaptors `Graph_with_descriptor_with_graph_property_map` enables to forward properties from a `Graph` to a `Graph_with_descriptor_with_graph`. - \cgalModels `Graph_with_descriptor_with_graph_property_map` the same property map concept as `PM` + \cgalModels{Graph_with_descriptor_with_graph_property_map the same property map concept as `PM`} @tparam Graph a model of the `FaceListGraph` and `HalfedgeListGraph` concepts. @tparam PM a property_map of a `Graph`. diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph_fwd.h b/thirdparty/CGAL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph_fwd.h index b010df6f..2afc943c 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph_fwd.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph_fwd.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph_fwd.h $ -// $Id: Graph_with_descriptor_with_graph_fwd.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph_fwd.h $ +// $Id: include/CGAL/boost/graph/Graph_with_descriptor_with_graph_fwd.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/IO/3MF.h b/thirdparty/CGAL/include/CGAL/boost/graph/IO/3MF.h index 08bc0630..c4292821 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/IO/3MF.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/IO/3MF.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/IO/3MF.h $ -// $Id: 3MF.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/IO/3MF.h $ +// $Id: include/CGAL/boost/graph/IO/3MF.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -18,11 +18,11 @@ #include #include -#include #include #include #include +#include #if defined(CGAL_LINKED_WITH_3MF) || defined(DOXYGEN_RUNNING) @@ -59,9 +59,9 @@ bool write_3MF(const std::string& filename, const GraphRange& gs, const std::vector& names #ifndef DOXYGEN_RUNNING - , typename boost::disable_if< + , std::enable_if_t::type> >::type* = nullptr + typename boost::range_value::type>::value>* = nullptr #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/IO/GOCAD.h b/thirdparty/CGAL/include/CGAL/boost/graph/IO/GOCAD.h index 6886fa56..bf6721fd 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/IO/GOCAD.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/IO/GOCAD.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/IO/GOCAD.h $ -// $Id: GOCAD.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/IO/GOCAD.h $ +// $Id: include/CGAL/boost/graph/IO/GOCAD.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -114,7 +114,7 @@ bool read_GOCAD(std::istream& is, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -135,7 +135,7 @@ bool read_GOCAD(std::istream& is, template bool read_GOCAD(std::istream& is, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values(), - typename boost::disable_if >::type* = nullptr) + std::enable_if_t::value>* = nullptr) { std::pair dummy; return read_GOCAD(is, dummy, g, np); @@ -188,7 +188,7 @@ bool read_GOCAD(const std::string& fname, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -201,7 +201,7 @@ bool read_GOCAD(const std::string& fname, template bool read_GOCAD(const std::string& fname, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values(), - typename boost::disable_if >::type* = nullptr) + std::enable_if_t::value>* = nullptr) { std::pair dummy; return read_GOCAD(fname, dummy, g, np); @@ -251,7 +251,7 @@ bool write_GOCAD(std::ostream& os, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -347,7 +347,7 @@ bool write_GOCAD(std::ostream& os, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -392,7 +392,7 @@ bool write_GOCAD(const std::string& fname, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h b/thirdparty/CGAL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h index 4391db8f..9fc8512e 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h $ -// $Id: Generic_facegraph_builder.h 477353d 2022-04-20T15:55:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h $ +// $Id: include/CGAL/boost/graph/IO/Generic_facegraph_builder.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno @@ -49,10 +49,10 @@ class Generic_facegraph_builder typedef typename CGAL::GetVertexPointMap::type VPM; // usually will be true, but might not be the case if using custom type points -// CGAL_static_assertion((std::is_same::value_type>::value)); -// CGAL_static_assertion((std::is_same::type>::value)); +// static_assert(std::is_same::value_type>::value); +// static_assert(std::is_same::type>::value); typedef typename internal_np::Lookup_named_param_def< internal_np::vertex_normal_map_t, NamedParameters, diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h b/thirdparty/CGAL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h index fb2565ec..879e70d9 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org); // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h $ -// $Id: Generic_facegraph_printer.h 477353d 2022-04-20T15:55:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h $ +// $Id: include/CGAL/boost/graph/IO/Generic_facegraph_printer.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/IO/INP.h b/thirdparty/CGAL/include/CGAL/boost/graph/IO/INP.h index 11757d75..862da17f 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/IO/INP.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/IO/INP.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/IO/INP.h $ -// $Id: INP.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/IO/INP.h $ +// $Id: include/CGAL/boost/graph/IO/INP.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/IO/OBJ.h b/thirdparty/CGAL/include/CGAL/boost/graph/IO/OBJ.h index bd6fc5bf..02d83544 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/IO/OBJ.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/IO/OBJ.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/IO/OBJ.h $ -// $Id: OBJ.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/IO/OBJ.h $ +// $Id: include/CGAL/boost/graph/IO/OBJ.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -109,7 +109,7 @@ bool read_OBJ(std::istream& is, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -165,7 +165,7 @@ bool read_OBJ(const std::string& fname, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -217,7 +217,7 @@ bool write_OBJ(std::ostream& os, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -263,7 +263,7 @@ bool write_OBJ(const std::string& fname, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/IO/OFF.h b/thirdparty/CGAL/include/CGAL/boost/graph/IO/OFF.h index 87f323d8..aefda000 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/IO/OFF.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/IO/OFF.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/IO/OFF.h $ -// $Id: OFF.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/IO/OFF.h $ +// $Id: include/CGAL/boost/graph/IO/OFF.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -22,8 +22,6 @@ #include #include -#include - #include #include #include @@ -155,7 +153,7 @@ bool read_OFF(std::istream& is, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -239,7 +237,7 @@ bool read_OFF(const std::string& fname, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -365,7 +363,7 @@ bool write_OFF(std::ostream& os, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -439,7 +437,7 @@ bool write_OFF(const std::string& fname, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/IO/PLY.h b/thirdparty/CGAL/include/CGAL/boost/graph/IO/PLY.h index ea0fd597..05f09b8c 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/IO/PLY.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/IO/PLY.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/IO/PLY.h $ -// $Id: PLY.h 477353d 2022-04-20T15:55:50+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/IO/PLY.h $ +// $Id: include/CGAL/boost/graph/IO/PLY.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -19,8 +19,6 @@ #include #include -#include - #include #include @@ -136,7 +134,7 @@ bool read_PLY(std::istream& is, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -211,7 +209,7 @@ bool read_PLY(const std::string& fname, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -298,7 +296,7 @@ bool write_PLY(std::ostream& os, const std::string& comments, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -421,7 +419,7 @@ bool write_PLY(std::ostream& os, template bool write_PLY(std::ostream& os, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values(), - typename boost::disable_if >::type* = nullptr) + std::enable_if_t::value>* = nullptr) { return write_PLY(os, g, std::string(), np); } @@ -494,7 +492,7 @@ bool write_PLY(const std::string& fname, const std::string& comments, const CGAL_NP_CLASS& np = parameters::default_values() #ifndef DOXYGEN_RUNNING - , typename boost::disable_if >::type* = nullptr + , std::enable_if_t::value>* = nullptr #endif ) { @@ -518,7 +516,7 @@ bool write_PLY(const std::string& fname, template bool write_PLY(const std::string& fname, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values(), - typename boost::disable_if >::type* = nullptr) + std::enable_if_t::value>* = nullptr) { return write_PLY(fname, g, std::string(), np); } diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/IO/STL.h b/thirdparty/CGAL/include/CGAL/boost/graph/IO/STL.h index 63cb0677..23128969 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/IO/STL.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/IO/STL.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/IO/STL.h $ -// $Id: STL.h 1d4a0b9 2022-03-25T08:29:36+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/IO/STL.h $ +// $Id: include/CGAL/boost/graph/IO/STL.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -264,7 +264,7 @@ bool write_STL(std::ostream& os, if(get_mode(os) == BINARY) { os << "FileType: Binary "; - const boost::uint32_t N32 = static_cast(faces(g).size()); + const std::uint32_t N32 = static_cast(faces(g).size()); os.write(reinterpret_cast(&N32), sizeof(N32)); for(const face_descriptor f : faces(g)) diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/IO/Tds_2_off.h b/thirdparty/CGAL/include/CGAL/boost/graph/IO/Tds_2_off.h index e7bd8014..32e1a996 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/IO/Tds_2_off.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/IO/Tds_2_off.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/IO/Tds_2_off.h $ -// $Id: Tds_2_off.h 5948bc8 2021-01-11T13:12:18+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/IO/Tds_2_off.h $ +// $Id: include/CGAL/boost/graph/IO/Tds_2_off.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno @@ -109,7 +109,7 @@ off_file_input( std::istream& is, Triangulation_data_structure_2& tds, bo tds.set_adjacency(fn, 2, inf_edge_map); edge_map.erase(edge_map.begin()); } - CGAL_triangulation_assertion(inf_edge_map.empty()); + CGAL_assertion(inf_edge_map.empty()); } diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/IO/VTK.h b/thirdparty/CGAL/include/CGAL/boost/graph/IO/VTK.h index 93bf21f4..2d3b18da 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/IO/VTK.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/IO/VTK.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/IO/VTK.h $ -// $Id: VTK.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/IO/VTK.h $ +// $Id: include/CGAL/boost/graph/IO/VTK.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/IO/WRL.h b/thirdparty/CGAL/include/CGAL/boost/graph/IO/WRL.h index 0642978c..851fccb2 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/IO/WRL.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/IO/WRL.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/IO/WRL.h $ -// $Id: WRL.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/IO/WRL.h $ +// $Id: include/CGAL/boost/graph/IO/WRL.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/IO/polygon_mesh_io.h b/thirdparty/CGAL/include/CGAL/boost/graph/IO/polygon_mesh_io.h index 64bee871..42b785e2 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/IO/polygon_mesh_io.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/IO/polygon_mesh_io.h @@ -1,256 +1,16 @@ -// Copyright (c) 2020 GeometryFactory (France). All rights reserved. +// Copyright (c) 2023 GeometryFactory (France). All rights reserved. // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/IO/polygon_mesh_io.h $ -// $Id: polygon_mesh_io.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/IO/polygon_mesh_io.h $ +// $Id: include/CGAL/boost/graph/IO/polygon_mesh_io.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // -// Author(s) : Maxime Gimeno -// Mael Rouxel-Labbé +// Author(s) : Mael Rouxel-Labbé #ifndef CGAL_BOOST_GRAPH_POLYGON_MESH_IO_H #define CGAL_BOOST_GRAPH_POLYGON_MESH_IO_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -namespace CGAL { - -namespace IO { - -//////////////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////// -// Read - -//not for now : some readers will return "ok" despite not managing to read anything -/* -template -bool read_polygon_mesh(std::istream& is, - Graph& g, - const NamedParameters& np = parameters::default_values()) -{ - bool ok = false; - ok = read_OFF(is, g, np, false); - if(ok) - return true; - g.clear(); - is.clear();//reset the error state - is.seekg (0, is.beg); - ok = read_OBJ(is, g, np, false); - if(ok) - return true; - g.clear(); - is.clear(); - is.seekg (0, is.beg); - ok = read_PLY(is, g, np, false); - if(ok) - return true; - g.clear(); - is.clear(); - is.seekg (0, is.beg); - ok = read_STL(is, g, np, false); - if(ok) - return true; - g.clear(); - is.clear(); - is.seekg (0, is.beg); - ok = read_GOCAD(is, g, np, false); - return ok; -} - -*/ - -/*! - * \ingroup PkgBGLIOFct - * - * \brief reads a polygon mesh from a file. - * - * Supported file formats are the following: - * - \ref IOStreamOFF (`.off`) - * - \ref IOStreamOBJ (`.obj`) - * - \ref IOStreamSTL (`.stl`) - * - \ref IOStreamPLY (`.ply`) - * - \ref IOStreamGocad (`.ts`) - * - \ref IOStreamVTK (`.vtp`) - * - * The format is detected from the filename extension (letter case is not important). - * - * The data is expected to represent a 2-manifold (possibly with borders). - * - * \tparam Graph a model of `MutableFaceGraph` - * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" - * - * \param fname the name of the file - * \param g the mesh - * \param np optional \ref bgl_namedparameters "Named Parameters" described below - * - * \cgalNamedParamsBegin - * \cgalParamNBegin{vertex_point_map} - * \cgalParamDescription{a property map associating points to the vertices of `g`} - * \cgalParamType{a class model of `WritablePropertyMap` with `boost::graph_traits::%vertex_descriptor` - * as key type and `%Point_3` as value type} - * \cgalParamDefault{`boost::get(CGAL::vertex_point, g)`} - * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` - * must be available in `Graph`.} - * \cgalParamNEnd - * - * \cgalParamNBegin{verbose} - * \cgalParamDescription{whether extra information is printed when an incident occurs during reading} - * \cgalParamType{Boolean} - * \cgalParamDefault{`false`} - * \cgalParamNEnd - * \cgalNamedParamsEnd - * - * Other named parameters may be used according to the file extension, see \ref PkgBGLIOFct for an exhaustive list. - * - * \return `true` if reading was successful, `false` otherwise. - * - * \sa \link PMP_IO_grp `CGAL::Polygon_mesh_processing::IO::read_polygon_mesh()`\endlink if the data is not 2-manifold -*/ -template -bool read_polygon_mesh(const std::string& fname, - Graph& g, - const NamedParameters& np = parameters::default_values()) -{ - const bool verbose = parameters::choose_parameter(parameters::get_parameter(np, internal_np::verbose), false); - - const std::string ext = internal::get_file_extension(fname); - if(ext == std::string()) - { - if(verbose) - std::cerr << "Error: cannot read from file without extension" << std::endl; - return false; - } - - if(ext == "obj") - return read_OBJ(fname, g, np); - else if(ext == "off") - return read_OFF(fname, g, np); - else if(ext == "ply") - return read_PLY(fname, g, np); - else if(ext == "stl") - return read_STL(fname, g, np); - else if(ext == "ts") - return read_GOCAD(fname, g, np); -#ifdef CGAL_USE_VTK - else if(ext == "vtp") - return read_VTP(fname, g, np); -#endif - - if(verbose) - { - std::cerr << "Error: unknown input file extension: " << ext << "\n" - << "Please refer to the documentation for the list of supported file formats" << std::endl; - } - - return false; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////// -// Write - -/*! - * \ingroup PkgBGLIOFct - * - * \brief writes a polygon mesh in a file. - * - * Supported file formats are the following: - * - \ref IOStreamOFF (`.off`) - * - \ref IOStreamOBJ (`.obj`) - * - \ref IOStreamSTL (`.stl`) - * - \ref IOStreamPLY (`.ply`) - * - \ref IOStreamGocad (`.ts`) - * - \ref IOStreamVTK (`.vtp`) - * - * The format is detected from the filename extension (letter case is not important). - * - * \tparam Graph a model of `FaceListGraph` and `HalfedgeListGraph` - * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" - * - * \param fname the name of the file - * \param g the mesh to be output - * \param np optional \ref bgl_namedparameters "Named Parameters" described below - * - * \cgalNamedParamsBegin - * \cgalParamNBegin{vertex_point_map} - * \cgalParamDescription{a property map associating points to the vertices of `g`} - * \cgalParamType{a class model of `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` - * as key type and `%Point_3` as value type} - * \cgalParamDefault{`boost::get(CGAL::vertex_point, g)`} - * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` - * must be available in `Graph`.} - * \cgalParamNEnd - * - * \cgalParamNBegin{stream_precision} - * \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream} - * \cgalParamType{int} - * \cgalParamDefault{`6`} - * \cgalParamExtra{This parameter is only meaningful while using \ascii encoding.} - * \cgalParamNEnd - * - * \cgalParamNBegin{verbose} - * \cgalParamDescription{whether extra information is printed when an incident occurs during reading} - * \cgalParamType{Boolean} - * \cgalParamDefault{`false`} - * \cgalParamNEnd - * \cgalNamedParamsEnd - * - * Other named parameters may be used according to the file extension, see \ref PkgBGLIOFct for an exhaustive list. - * - * \return `true` if writing was successful, `false` otherwise. - */ -template -bool write_polygon_mesh(const std::string& fname, - Graph& g, - const NamedParameters& np = parameters::default_values()) -{ - const bool verbose = parameters::choose_parameter(parameters::get_parameter(np, internal_np::verbose), false); - - const std::string ext = internal::get_file_extension(fname); - if(ext == std::string()) - { - if(verbose) - std::cerr << "Error: trying to output to file without extension" << std::endl; - return false; - } - - if(ext == "obj") - return write_OBJ(fname, g, np); - else if(ext == "off") - return write_OFF(fname, g, np); - else if(ext == "ply") - return write_PLY(fname, g, np); - else if(ext == "stl") - return write_STL(fname, g, np); - else if(ext == "ts") - return write_GOCAD(fname, g, np); -#ifdef CGAL_USE_VTK - else if(ext == "vtp") - return write_VTP(fname, g, np); -#endif - - if(verbose) - { - std::cerr << "Error: unknown output file extension: " << ext << "\n" - << "Please refer to the documentation for the list of supported file formats" << std::endl; - } - - return false; -} - -}} // namespace CGAL::IO +#include #endif // CGAL_BOOST_GRAPH_POLYGON_MESH_IO_H diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/METIS/partition_dual_graph.h b/thirdparty/CGAL/include/CGAL/boost/graph/METIS/partition_dual_graph.h index 55bcda52..8550ca9b 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/METIS/partition_dual_graph.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/METIS/partition_dual_graph.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h $ -// $Id: partition_dual_graph.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h $ +// $Id: include/CGAL/boost/graph/METIS/partition_dual_graph.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/METIS/partition_graph.h b/thirdparty/CGAL/include/CGAL/boost/graph/METIS/partition_graph.h index 313143d2..21b47d0b 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/METIS/partition_graph.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/METIS/partition_graph.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/METIS/partition_graph.h $ -// $Id: partition_graph.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/METIS/partition_graph.h $ +// $Id: include/CGAL/boost/graph/METIS/partition_graph.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/Seam_mesh.h b/thirdparty/CGAL/include/CGAL/boost/graph/Seam_mesh.h index 863df17d..32709150 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/Seam_mesh.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/Seam_mesh.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/Seam_mesh.h $ -// $Id: Seam_mesh.h 258d704 2022-02-24T19:57:17+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/Seam_mesh.h $ +// $Id: include/CGAL/boost/graph/Seam_mesh.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -177,7 +177,7 @@ class Seam_mesh_edge_descriptor /// \ingroup PkgBGLAdaptors /// -/// This class is a data structure that takes a triangle mesh, further refered +/// This class is a data structure that takes a triangle mesh, further referred /// to as `underlying mesh` and turns some marked edges of that mesh into /// virtual boundary edges. /// @@ -185,7 +185,7 @@ class Seam_mesh_edge_descriptor /// a border edge (that is, such that either halfedge or the edge have null_face() /// as incident face). Marking a border edge as seam will not do anything. /// -/// \cgalModels `FaceGraph` or `FaceListGraph`, depending on the underlying mesh `TM`. +/// \cgalModels{FaceGraph or `FaceListGraph` depending on the underlying mesh `TM`.} /// /// \tparam TM a model of `FaceGraph` or `FaceListGraph` /// \tparam SEM a model of `ReadablePropertyMap` with `boost::graph_traits::%edge_descriptor` as key type and `bool` as value type. @@ -271,9 +271,7 @@ class Seam_mesh /// Implementation note: a halfedge of the seam mesh is represented as a halfedge /// of the mesh and a boolean to indicate whether the halfedge is on a seam or not. /// - /// \cgalModels `Descriptor` - /// \cgalModels `LessThanComparable` - /// \cgalModels `Hashable` + /// \cgalModels{Descriptor,LessThanComparable,Hashable} /// class halfedge_descriptor { @@ -356,9 +354,7 @@ class Seam_mesh /// Implementation note: to properly duplicate vertices that are on seams, /// a vertex_descriptor is in fact represented as a halfedge of the seam mesh. /// - /// \cgalModels `Descriptor` - /// \cgalModels `LessThanComparable` - /// \cgalModels `Hashable` + /// \cgalModels{Descriptor,LessThanComparable,Hashable} /// class vertex_descriptor { @@ -461,8 +457,7 @@ class Seam_mesh #ifdef DOXYGEN_RUNNING /// This class represents an edge of the seam mesh. /// - /// \cgalModels `Descriptor` - /// \cgalModels `Hashable` + /// \cgalModels{Descriptor,Hashable} /// class edge_descriptor { @@ -562,7 +557,7 @@ class Seam_mesh /// This class represents a face of the seam mesh. /// - /// \cgalModels `Descriptor` + /// \cgalModels{Descriptor} /// typedef typename boost::graph_traits::face_descriptor face_descriptor; diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/alpha_expansion_graphcut.h b/thirdparty/CGAL/include/CGAL/boost/graph/alpha_expansion_graphcut.h index f31d6802..d8ae0a46 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/alpha_expansion_graphcut.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/alpha_expansion_graphcut.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/alpha_expansion_graphcut.h $ -// $Id: alpha_expansion_graphcut.h e713291 2022-05-04T16:35:21+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/alpha_expansion_graphcut.h $ +// $Id: include/CGAL/boost/graph/alpha_expansion_graphcut.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/backward_compatibility_functions.h b/thirdparty/CGAL/include/CGAL/boost/graph/backward_compatibility_functions.h index 86d0dc11..3c557db5 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/backward_compatibility_functions.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/backward_compatibility_functions.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/backward_compatibility_functions.h $ -// $Id: backward_compatibility_functions.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/backward_compatibility_functions.h $ +// $Id: include/CGAL/boost/graph/backward_compatibility_functions.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/breadth_first_search.h b/thirdparty/CGAL/include/CGAL/boost/graph/breadth_first_search.h index e82b5466..80bcb59b 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/breadth_first_search.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/breadth_first_search.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/breadth_first_search.h $ -// $Id: breadth_first_search.h 5f3e3b2 2022-05-05T08:46:11+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/breadth_first_search.h $ +// $Id: include/CGAL/boost/graph/breadth_first_search.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h b/thirdparty/CGAL/include/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h index 3c6ee734..a0bf4b3f 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h $ -// $Id: convert_nef_polyhedron_to_polygon_mesh.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h $ +// $Id: include/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/copy_face_graph.h b/thirdparty/CGAL/include/CGAL/boost/graph/copy_face_graph.h index af30bd0b..1baef590 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/copy_face_graph.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/copy_face_graph.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/copy_face_graph.h $ -// $Id: copy_face_graph.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/copy_face_graph.h $ +// $Id: include/CGAL/boost/graph/copy_face_graph.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include @@ -213,36 +211,6 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm, } } // end of namespace internal -namespace impl -{ -template -struct Output_iterator_functor -{ - typedef typename boost::property_traits::key_type input_t; - typedef typename boost::property_traits::value_type output_t; - PMAP map; - Output_iterator_functor(PMAP map) - :map(map) - { - } - void operator()(const typename std::pair& pair) - { - put(map, pair.first, pair.second); - } - -}; - -template -boost::function_output_iterator > make_functor(PMAP map) -{ - return boost::make_function_output_iterator(Output_iterator_functor(map)); -} - -inline Emptyset_iterator make_functor(const internal_np::Param_not_found&) -{ - return Emptyset_iterator(); -} -}//end of impl /*! \ingroup PkgBGLHelperFct diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/generators.h b/thirdparty/CGAL/include/CGAL/boost/graph/generators.h index 2558c458..a9f82f3b 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/generators.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/generators.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/generators.h $ -// $Id: generators.h 0994eed 2022-03-02T11:23:49+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/generators.h $ +// $Id: include/CGAL/boost/graph/generators.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Maxime Gimeno, @@ -195,6 +195,11 @@ make_quad(typename boost::graph_traits::vertex_descriptor v0, typename boost::graph_traits::vertex_descriptor v3, Graph& g) { + CGAL_precondition(is_valid_vertex_descriptor(v0, g) && + is_valid_vertex_descriptor(v1, g) && + is_valid_vertex_descriptor(v2, g) && + is_valid_vertex_descriptor(v3, g)); + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::face_descriptor face_descriptor; halfedge_descriptor h0 = halfedge(add_edge(g), g); diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_concepts.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_concepts.h index b6f70ec4..a140c25d 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_concepts.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_concepts.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/graph_concepts.h $ -// $Id: graph_concepts.h c9af7a1 2020-10-14T10:59:46+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/graph_concepts.h $ +// $Id: include/CGAL/boost/graph/graph_concepts.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Arrangement_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Arrangement_2.h index 43d493b6..9fb32dce 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Arrangement_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Arrangement_2.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/boost/graph/graph_traits_Arrangement_2.h $ -// $Id: graph_traits_Arrangement_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/boost/graph/graph_traits_Arrangement_2.h $ +// $Id: include/CGAL/boost/graph/graph_traits_Arrangement_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Ron Wein @@ -14,6 +14,9 @@ #ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H #define CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H +#include + + #include #endif //CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Constrained_Delaunay_triangulation_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Constrained_Delaunay_triangulation_2.h index 1b7b4a52..ae3b0999 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Constrained_Delaunay_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Constrained_Delaunay_triangulation_2.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/graph_traits_Constrained_Delaunay_triangulation_2.h $ -// $Id: graph_traits_Constrained_Delaunay_triangulation_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/graph_traits_Constrained_Delaunay_triangulation_2.h $ +// $Id: include/CGAL/boost/graph/graph_traits_Constrained_Delaunay_triangulation_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -12,6 +12,9 @@ #ifndef CGAL_GRAPH_TRAITS_CONSTRAINED_DELAUNAY_TRIANGULATION_2_H #define CGAL_GRAPH_TRAITS_CONSTRAINED_DELAUNAY_TRIANGULATION_2_H +#include + + #include #include diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Constrained_triangulation_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Constrained_triangulation_2.h index b67902ec..8dce03fc 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Constrained_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Constrained_triangulation_2.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/graph_traits_Constrained_triangulation_2.h $ -// $Id: graph_traits_Constrained_triangulation_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/graph_traits_Constrained_triangulation_2.h $ +// $Id: include/CGAL/boost/graph/graph_traits_Constrained_triangulation_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -12,6 +12,9 @@ #ifndef CGAL_GRAPH_TRAITS_CONSTRAINED_TRIANGULATION_2_H #define CGAL_GRAPH_TRAITS_CONSTRAINED_TRIANGULATION_2_H +#include + + #include #include diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Constrained_triangulation_plus_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Constrained_triangulation_plus_2.h index 91c36040..de7a351a 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Constrained_triangulation_plus_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Constrained_triangulation_plus_2.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/graph_traits_Constrained_triangulation_plus_2.h $ -// $Id: graph_traits_Constrained_triangulation_plus_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/graph_traits_Constrained_triangulation_plus_2.h $ +// $Id: include/CGAL/boost/graph/graph_traits_Constrained_triangulation_plus_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -12,6 +12,9 @@ #ifndef CGAL_GRAPH_TRAITS_CONSTRAINED_TRIANGULATION_PLUS_2_H #define CGAL_GRAPH_TRAITS_CONSTRAINED_TRIANGULATION_PLUS_2_H +#include + + #include #include diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h index 82d41618..9fd0e39b 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h $ -// $Id: graph_traits_Delaunay_triangulation_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h $ +// $Id: include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -12,6 +12,9 @@ #ifndef CGAL_GRAPH_TRAITS_DELAUNAY_TRIANGULATION_2_H #define CGAL_GRAPH_TRAITS_DELAUNAY_TRIANGULATION_2_H +#include + + #include #include diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Dual_Arrangement_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Dual_Arrangement_2.h index 139a36b8..e94f07ab 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Dual_Arrangement_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Dual_Arrangement_2.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/boost/graph/graph_traits_Dual_Arrangement_2.h $ -// $Id: graph_traits_Dual_Arrangement_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/boost/graph/graph_traits_Dual_Arrangement_2.h $ +// $Id: include/CGAL/boost/graph/graph_traits_Dual_Arrangement_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Ron Wein @@ -14,6 +14,9 @@ #ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_DUAL_ARRANGEMENT_2_H #define CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H +#include + + #include #endif //CGAL_BOOST_GRAPH_GRAPH_TRAITS_DUAL_ARRANGEMENT_2_H diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h index 042fa335..957577ef 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h $ -// $Id: graph_traits_HalfedgeDS.h fd20bee 2022-05-03T15:09:05+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h $ +// $Id: include/CGAL/boost/graph/graph_traits_HalfedgeDS.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h index 1682ad12..8d7ecb26 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h $ -// $Id: graph_traits_HalfedgeDS_default.h fd20bee 2022-05-03T15:09:05+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h $ +// $Id: include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -63,25 +63,28 @@ num_edges(const HalfedgeDS_default& p) template typename boost::graph_traits< HalfedgeDS_default const>::degree_size_type degree(typename boost::graph_traits< HalfedgeDS_default const>::vertex_descriptor v - , const HalfedgeDS_default&) + , const HalfedgeDS_default& hds) { - return v->vertex_degree(); + if(halfedge(v,hds) == boost::graph_traits const>::null_halfedge()){ + return 0; + } + return halfedges_around_target(v,hds).size(); } template typename boost::graph_traits< HalfedgeDS_default const>::degree_size_type out_degree(typename boost::graph_traits< HalfedgeDS_default const>::vertex_descriptor v - , const HalfedgeDS_default&) + , const HalfedgeDS_default& hds) { - return v->vertex_degree(); + return degree(v, hds); } template typename boost::graph_traits< HalfedgeDS_default const>::degree_size_type in_degree(typename boost::graph_traits< HalfedgeDS_default const>::vertex_descriptor v - , const HalfedgeDS_default&) + , const HalfedgeDS_default& hds) { - return v->vertex_degree(); + return degree(v,hds); } template @@ -448,29 +451,6 @@ num_faces(const HalfedgeDS_default& p) return p.size_of_faces(); } -template -struct HDS_property_map; - -template <> -struct HDS_property_map -{ - template - struct bind_ - { - typedef internal::Point_accessor< - typename boost::graph_traits< - HalfedgeDS_default - >::vertex_descriptor, - typename T::Point_3, typename T::Point_3&> type; - - typedef internal::Point_accessor< - typename boost::graph_traits< - HalfedgeDS_default - >::vertex_descriptor, - typename T::Point_3, const typename T::Point_3&> const_type; - }; -}; - template void reserve(HalfedgeDS_default& p, typename boost::graph_traits< HalfedgeDS_default const>::vertices_size_type nv, @@ -481,37 +461,7 @@ void reserve(HalfedgeDS_default& p, } }// namespace CGAL -namespace boost { - -#define CGAL_PM_SPECIALIZATION(TAG) \ -template \ -struct property_map, TAG> \ -{\ - typedef typename CGAL::HDS_property_map:: \ - template bind_ map_gen; \ - typedef typename map_gen::type type; \ - typedef typename map_gen::const_type const_type; \ -}; -CGAL_PM_SPECIALIZATION(vertex_point_t) +#include -#undef CGAL_PM_SPECIALIZATION - -} // namespace boost - -namespace CGAL { - -// generalized 2-ary get functions -template -typename boost::property_map< CGAL::HalfedgeDS_default, PropertyTag >::const_type -get(PropertyTag, CGAL::HalfedgeDS_default const&) -{ return typename boost::property_map< CGAL::HalfedgeDS_default, PropertyTag >::const_type(); } - -template -typename boost::property_map< CGAL::HalfedgeDS_default, PropertyTag >::type -get(PropertyTag, CGAL::HalfedgeDS_default&) -{ return typename boost::property_map< CGAL::HalfedgeDS_default, PropertyTag >::type(); } - - -} // namespace CGAL #endif diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h index 7f6f8e70..38ed3ad7 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h $ -// $Id: graph_traits_Linear_cell_complex_for_combinatorial_map.h 238a2e1 2022-05-03T17:01:00+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h $ +// $Id: include/CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -55,17 +55,17 @@ namespace internal { /// A struct to define edge based on halfedge. -template -struct EdgeHandle : Dart_handle +template +struct EdgeHandle : Dart_descriptor { - EdgeHandle() : Dart_handle(nullptr){} - explicit EdgeHandle(Dart_handle h): Dart_handle(h) + EdgeHandle() : Dart_descriptor(nullptr){} + explicit EdgeHandle(Dart_descriptor h): Dart_descriptor(h) {} - Dart_handle first_halfedge() const + Dart_descriptor first_halfedge() const { return *this; } - Dart_handle second_halfedge() const + Dart_descriptor second_halfedge() const { CGAL_assertion(*this!=nullptr); return (*this)->get_f(2); @@ -106,30 +106,30 @@ struct EdgeHandle : Dart_handle // make edge_descriptor hashable by default in Unique_hash_map namespace handle{ - template - struct Hash_functor< EdgeHandle > + template + struct Hash_functor< EdgeHandle > { std::size_t - operator()(const EdgeHandle& edge) + operator()(const EdgeHandle& edge) { return hash_value(edge); } }; } //end of namespace handle template -class CMap_dart_handle_edge_iterator +class CMap_dart_descriptor_edge_iterator { public: - CMap_dart_handle_edge_iterator(){} + CMap_dart_descriptor_edge_iterator(){} typedef Dart_Iterator Iterator; - typedef typename CMap::Dart_handle Dart_handle; + typedef typename CMap::Dart_descriptor Dart_descriptor; - typedef CMap_dart_handle_edge_iterator Self; + typedef CMap_dart_descriptor_edge_iterator Self; typedef typename std::iterator_traits::iterator_category iterator_category; typedef typename std::iterator_traits::difference_type difference_type; - typedef EdgeHandle value_type; + typedef EdgeHandle value_type; typedef value_type reference; typedef value_type pointer; @@ -145,7 +145,7 @@ class CMap_dart_handle_edge_iterator Self& operator++() { - typedef typename Dart_handle::CC CC; + typedef typename Dart_descriptor::CC CC; ++nt; // We need to test if we are at the end of the compact container. // (case where we were previously on the last element) @@ -161,7 +161,7 @@ class CMap_dart_handle_edge_iterator return tmp; } - CMap_dart_handle_edge_iterator(const Iterator& iter) : + CMap_dart_descriptor_edge_iterator(const Iterator& iter) : nt(iter) {} @@ -183,10 +183,10 @@ public : {}; // Expose types required by the boost::Graph concept. - typedef typename CMap::template Attribute_handle<0>::type vertex_descriptor; - typedef internal::EdgeHandle edge_descriptor; - typedef typename CMap::template Attribute_handle<2>::type face_descriptor; - typedef typename CMap::Dart_handle halfedge_descriptor; + typedef typename CMap::template Attribute_descriptor<0>::type vertex_descriptor; + typedef internal::EdgeHandle edge_descriptor; + typedef typename CMap::template Attribute_descriptor<2>::type face_descriptor; + typedef typename CMap::Dart_descriptor halfedge_descriptor; typedef boost::directed_tag directed_category; typedef boost::allow_parallel_edge_tag edge_parallel_category; @@ -196,7 +196,7 @@ public : typedef Prevent_deref::type::iterator> face_iterator; typedef Prevent_deref halfedge_iterator; - typedef internal::CMap_dart_handle_edge_iterator edge_iterator; + typedef internal::CMap_dart_descriptor_edge_iterator edge_iterator; typedef typename CMap::size_type degree_size_type; typedef typename CMap::size_type halfedges_size_type; @@ -341,7 +341,7 @@ halfedge(typename boost::graph_traits::vertex_descriptor u, { return std::make_pair(it, true); } } - return std::make_pair(lcc.null_handle, false); + return std::make_pair(lcc.null_descriptor, false); } CGAL_LCC_TEMPLATE_ARGS @@ -352,7 +352,7 @@ edge(typename boost::graph_traits::vertex_descriptor u, { std::pair::halfedge_descriptor, bool> res=halfedge(u,v,lcc); - return std::make_pair(internal::EdgeHandle(res.first), + return std::make_pair(internal::EdgeHandle(res.first), res.second); } @@ -501,7 +501,7 @@ CGAL_LCC_TEMPLATE_ARGS typename boost::graph_traits::edge_descriptor add_edge(CGAL_LCC_TYPE& lcc) { - typename CGAL_LCC_TYPE::Dart_handle actu = lcc.create_dart(); + typename CGAL_LCC_TYPE::Dart_descriptor actu = lcc.create_dart(); lcc.template link_beta<2>(actu, lcc.create_dart()); return typename boost::graph_traits::edge_descriptor(actu); } @@ -626,10 +626,10 @@ namespace std { #ifndef CGAL_CFG_NO_STD_HASH -template -struct hash> +template +struct hash> { - std::size_t operator()(const CGAL::internal::EdgeHandle& edge) const + std::size_t operator()(const CGAL::internal::EdgeHandle& edge) const { return hash_value(edge); } diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_OpenMesh.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_OpenMesh.h index 44c02925..b48cbc3d 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_OpenMesh.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_OpenMesh.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/graph_traits_OpenMesh.h $ -// $Id: graph_traits_OpenMesh.h 7360250 2022-05-10T11:00:47+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/graph_traits_OpenMesh.h $ +// $Id: include/CGAL/boost/graph/graph_traits_OpenMesh.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h index eb3a8689..83f4cead 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h $ -// $Id: graph_traits_PolyMesh_ArrayKernelT.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h $ +// $Id: include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri, Philipp Moeller @@ -11,7 +11,7 @@ #ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H #define CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H -// http://openmesh.org/Documentation/OpenMesh-Doc-Latest/classOpenMesh_1_1Concepts_1_1KernelT.html +// https://www.graphics.rwth-aachen.de/media/openmesh_static/Documentations/OpenMesh-Doc-Latest/a02182.html #include #include #include diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h index 59d19048..4766b599 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h $ -// $Id: graph_traits_Polyhedron_3.h 10834e4 2020-06-30T16:37:59+02:00 Laurent Rineau -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h $ +// $Id: include/CGAL/boost/graph/graph_traits_Polyhedron_3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -12,6 +12,9 @@ #ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYHEDRON_3_H #define CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYHEDRON_3_H +#include + + #include #include @@ -491,8 +494,9 @@ namespace boost { #endif //CGAL_NO_DEPRECATED_CODE -#undef CGAL_HDS_PARAM_ - #include +#include +#include +#undef CGAL_HDS_PARAM_ #endif // CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYHEDRON_3_H diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Regular_triangulation_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Regular_triangulation_2.h index f032713c..2422e732 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Regular_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Regular_triangulation_2.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/graph_traits_Regular_triangulation_2.h $ -// $Id: graph_traits_Regular_triangulation_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/graph_traits_Regular_triangulation_2.h $ +// $Id: include/CGAL/boost/graph/graph_traits_Regular_triangulation_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -12,6 +12,9 @@ #ifndef CGAL_GRAPH_TRAITS_REGULAR_TRIANGULATION_2_H #define CGAL_GRAPH_TRAITS_REGULAR_TRIANGULATION_2_H +#include + + #include #include diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Seam_mesh.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Seam_mesh.h index eea48cd2..c253070a 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Seam_mesh.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Seam_mesh.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/graph_traits_Seam_mesh.h $ -// $Id: graph_traits_Seam_mesh.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/graph_traits_Seam_mesh.h $ +// $Id: include/CGAL/boost/graph/graph_traits_Seam_mesh.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Surface_mesh.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Surface_mesh.h index fe77f157..b9d07774 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Surface_mesh.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Surface_mesh.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh/include/CGAL/boost/graph/graph_traits_Surface_mesh.h $ -// $Id: graph_traits_Surface_mesh.h fd20bee 2022-05-03T15:09:05+01:00 Andreas Fabri -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh/include/CGAL/boost/graph/graph_traits_Surface_mesh.h $ +// $Id: include/CGAL/boost/graph/graph_traits_Surface_mesh.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri, Philipp Moeller @@ -528,6 +528,51 @@ template void normalize_border(const CGAL::Surface_mesh

    &) {} + +template +bool is_valid_vertex_descriptor(typename boost::graph_traits >::vertex_descriptor v, + const CGAL::Surface_mesh

    & g, + const bool verbose = false) +{ + if(!g.is_valid(v, verbose)) + return false; + + return BGL::is_valid_vertex_descriptor(v, g, verbose); +} + +template +bool is_valid_halfedge_descriptor(typename boost::graph_traits >::halfedge_descriptor h, + const CGAL::Surface_mesh

    & g, + const bool verbose = false) +{ + if(!g.is_valid(h, verbose)) + return false; + + return BGL::is_valid_halfedge_descriptor(h, g, verbose); +} + +template +bool is_valid_edge_descriptor(typename boost::graph_traits >::edge_descriptor e, + const CGAL::Surface_mesh

    & g, + const bool verbose = false) +{ + if(!g.is_valid(e, verbose)) + return false; + + return BGL::is_valid_edge_descriptor(e, g, verbose); +} + +template +bool is_valid_face_descriptor(typename boost::graph_traits >::face_descriptor f, + const CGAL::Surface_mesh

    & g, + const bool verbose = false) +{ + if(!g.is_valid(f, verbose)) + return false; + + return BGL::is_valid_face_descriptor(f, g, verbose); +} + } // namespace CGAL #endif // DOXYGEN_RUNNING diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h index a0311725..73ccb6ad 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h $ -// $Id: graph_traits_TriMesh_ArrayKernelT.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h $ +// $Id: include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri, Philipp Moeller @@ -11,7 +11,7 @@ #ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_TRIMESH_ARRAYKERNELT_H #define CGAL_BOOST_GRAPH_GRAPH_TRAITS_TRIMESH_ARRAYKERNELT_H -// http://openmesh.org/Documentation/OpenMesh-Doc-Latest/classOpenMesh_1_1Concepts_1_1KernelT.html +// https://www.graphics.rwth-aachen.de/media/openmesh_static/Documentations/OpenMesh-Doc-Latest/a02182.html #include #include #include diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h index 81764823..8214082a 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/graph_traits_Triangulation_2.h $ -// $Id: graph_traits_Triangulation_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/graph_traits_Triangulation_2.h $ +// $Id: include/CGAL/boost/graph/graph_traits_Triangulation_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -12,6 +12,9 @@ #ifndef CGAL_GRAPH_TRAITS_TRIANGULATION_2_H #define CGAL_GRAPH_TRAITS_TRIANGULATION_2_H +#include + + #include #include diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Triangulation_data_structure_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Triangulation_data_structure_2.h index a5bda761..6e0a6512 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Triangulation_data_structure_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Triangulation_data_structure_2.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_2/include/CGAL/boost/graph/graph_traits_Triangulation_data_structure_2.h $ -// $Id: graph_traits_Triangulation_data_structure_2.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_2/include/CGAL/boost/graph/graph_traits_Triangulation_data_structure_2.h $ +// $Id: include/CGAL/boost/graph/graph_traits_Triangulation_data_structure_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -12,6 +12,9 @@ #ifndef CGAL_GRAPH_TRAITS_TRIANGULATION_DATA_STRUCTURE_2_H #define CGAL_GRAPH_TRAITS_TRIANGULATION_DATA_STRUCTURE_2_H +#include + + // include this to avoid a VC15 warning #include #include diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Triangulation_hierarchy_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Triangulation_hierarchy_2.h index d8f09cdc..10b25b7c 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Triangulation_hierarchy_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_Triangulation_hierarchy_2.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/graph_traits_Triangulation_hierarchy_2.h $ -// $Id: graph_traits_Triangulation_hierarchy_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/graph_traits_Triangulation_hierarchy_2.h $ +// $Id: include/CGAL/boost/graph/graph_traits_Triangulation_hierarchy_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -12,6 +12,9 @@ #ifndef CGAL_GRAPH_TRAITS_TRIANGULATION_HIERARCHY_2_H #define CGAL_GRAPH_TRAITS_TRIANGULATION_HIERARCHY_2_H +#include + + #include #include diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h index 904174fa..dcc2b91b 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h $ -// $Id: graph_traits_inheritance_macros.h e2733dd 2020-08-28T08:10:04+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h $ +// $Id: include/CGAL/boost/graph/graph_traits_inheritance_macros.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/halfedge_graph_traits.h b/thirdparty/CGAL/include/CGAL/boost/graph/halfedge_graph_traits.h index 6b1008a5..1659323d 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/halfedge_graph_traits.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/halfedge_graph_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/halfedge_graph_traits.h $ -// $Id: halfedge_graph_traits.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/halfedge_graph_traits.h $ +// $Id: include/CGAL/boost/graph/halfedge_graph_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h b/thirdparty/CGAL/include/CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h index b04b5dc8..02c94ae2 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h $ -// $Id: halfedge_graph_traits_HalfedgeDS.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h $ +// $Id: include/CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h b/thirdparty/CGAL/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h index 326eb588..0ea8d2a7 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h $ -// $Id: halfedge_graph_traits_Polyhedron_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h $ +// $Id: include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -13,6 +13,9 @@ #ifndef CGAL_BOOST_GRAPH_HALFEDGE_GRAPH_TRAITS_POLYHEDRON_3_H #define CGAL_BOOST_GRAPH_HALFEDGE_GRAPH_TRAITS_POLYHEDRON_3_H +#include + + #define CGAL_DEPRECATED_HEADER "" #define CGAL_REPLACEMENT_HEADER "" #include diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/helpers.h b/thirdparty/CGAL/include/CGAL/boost/graph/helpers.h index 1c459d78..174ba5e1 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/helpers.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/helpers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/helpers.h $ -// $Id: helpers.h 5bd28b4 2020-07-29T10:24:02+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/helpers.h $ +// $Id: include/CGAL/boost/graph/helpers.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri @@ -15,11 +15,14 @@ #include #include #include +#include #include #include #include +#include + namespace CGAL { /*! @@ -57,7 +60,7 @@ bool is_border(typename boost::graph_traits::edge_descriptor ed, cons returns a halfedge which is on a border and whose target vertex is `vd`, if such a halfedge exists. */ template -boost::optional::halfedge_descriptor> +std::optional::halfedge_descriptor> is_border(typename boost::graph_traits::vertex_descriptor vd, const FaceGraph& g) { @@ -69,280 +72,247 @@ is_border(typename boost::graph_traits::vertex_descriptor vd, } } // empty - return boost::optional::halfedge_descriptor>(); + return std::optional::halfedge_descriptor>(); } +namespace BGL { - /*! - \ingroup PkgBGLHelperFct - returns `true` if there are no border edges. - */ -template -bool is_closed(const FaceGraph& g) +template +bool is_valid_vertex_descriptor(typename boost::graph_traits::vertex_descriptor v, + const Graph& g, + const bool verb = false) { - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - for(halfedge_descriptor hd : halfedges(g)){ - if(is_border(hd,g)){ - return false; - } - } - return true; -} + Verbose_ostream verr(verb); + bool valid = true; - /*! - \ingroup PkgBGLHelperFct - returns `true` if the target of `hd` has exactly two incident edges. - */ -template -bool is_bivalent(typename boost::graph_traits::halfedge_descriptor hd, const FaceGraph& g) -{ - return hd == opposite(next(opposite(next(hd,g),g),g),g); -} + // null vertex + valid = (v != boost::graph_traits::null_vertex()); + if(!valid) + { + verr << "vertex is null." << std::endl; + return false; + } - /*! - \ingroup PkgBGLHelperFct - returns `true` if all vertices have exactly two incident edges. - */ -template - bool is_bivalent_mesh(const FaceGraph& g) -{ - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - for(vertex_descriptor vd : vertices(g)){ - halfedge_descriptor hd = halfedge(vd,g); - if((hd == boost::graph_traits::null_halfedge()) || - (! is_bivalent(hd,g))){ + if(!CGAL::internal::is_isolated(v, g)) + { + // Incident halfedge integrity + valid = (target(halfedge(v, g), g) == v); + if(!valid) + { + verr << "vertex has invalid halfedge()." << std::endl; return false; } } + return true; } - /*! - \ingroup PkgBGLHelperFct - returns `true` if the target of `hd` has exactly three incident edges. - */ -template -bool is_trivalent(typename boost::graph_traits::halfedge_descriptor hd, const FaceGraph& g) +template +bool is_valid_halfedge_descriptor(typename boost::graph_traits::halfedge_descriptor h, + const Graph& g, + const bool verb = false) { - return hd == opposite(next(opposite(next(opposite(next(hd,g),g),g),g),g),g); -} + Verbose_ostream verr(verb); + bool valid = true; - /*! - \ingroup PkgBGLHelperFct - returns `true` if all - vertices have exactly three incident edges. - */ -template - bool is_trivalent_mesh(const FaceGraph& g) -{ - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - for(vertex_descriptor vd : vertices(g)){ - halfedge_descriptor hd = halfedge(vd,g); - if((hd == boost::graph_traits::null_halfedge()) || - (! is_trivalent(halfedge(hd,g),g))){ - return false; - } + // null halfedge + valid = (h != boost::graph_traits::null_halfedge()); + if(!valid) + { + verr << "halfedge is null." << std::endl; + return false; } - return true; -} - /*! - \ingroup PkgBGLHelperFct - returns `true` iff the connected component denoted by `hd` is a triangle. - \pre `g` must be valid. - */ -template - bool is_isolated_triangle(typename boost::graph_traits::halfedge_descriptor hd, const FaceGraph& g) -{ - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - halfedge_descriptor beg = hd; - if(is_border(hd,g)) return false; - for(int i=0; i<3;i++){ - if(! is_border(opposite(hd,g),g)) return false; - hd = next(hd,g); + // Pointer integrity. + valid = (prev(h, g) != boost::graph_traits::null_halfedge()); + valid = valid && (next(h, g) != boost::graph_traits::null_halfedge()); + valid = valid && (opposite(h, g) != boost::graph_traits::null_halfedge()); + if(!valid) + { + verr << "halfedge's prev / next / opposite halfedges are null." << std::endl; + return false; } - return hd == beg; -} - /*! - \ingroup PkgBGLHelperFct - returns `true` iff the face denoted by `hd` is a triangle, that is it has three incident halfedges. - */ -template -bool is_triangle(typename boost::graph_traits::halfedge_descriptor hd, const FaceGraph& g) -{ - return hd == next(next(next(hd,g),g),g); -} + // degeneracies + valid = (next(h, g) != h); + valid = valid && (prev(h, g) != h); + valid = valid && (opposite(h, g) != h); + valid = valid && (target(h, g) != target(opposite(h, g), g)); + if(!valid) + { + verr << "combinatorial degeneracies." << std::endl; + return false; + } - /*! - \ingroup PkgBGLHelperFct - returns `true` if all faces are triangles. - */ -template - bool is_triangle_mesh(const FaceGraph& g) -{ - typedef typename boost::graph_traits::face_descriptor face_descriptor; - for(face_descriptor fd : faces(g)){ - if(! is_triangle(halfedge(fd,g),g)){ - return false; - } + // edge integrity + valid = (halfedge(edge(h, g), g) == h); + if(!valid) + { + verr << "halfedge has an invalid edge." << std::endl; + return false; } - return true; -} -/*! - \ingroup PkgBGLHelperFct - returns `true` iff the connected component denoted by `hd` is a quadrilateral. - */ -template -bool is_isolated_quad(typename boost::graph_traits::halfedge_descriptor hd, const FaceGraph& g) -{ - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - halfedge_descriptor beg = hd; - if(is_border(hd,g)) return false; - for(int i=0; i<4;i++){ - if(! is_border(opposite(hd,g),g)) return false; - hd = next(hd,g); + // opposite integrity. + valid = (opposite(h, g) != h); + valid = valid && (opposite(opposite(h, g), g) == h); + if(!valid) + { + verr << "halfedge has invalid opposite()." << std::endl; + return false; } - return hd == beg; -} + // previous integrity. + valid = (prev(next(h, g), g) == h); + valid = valid && (next(prev(h, g), g) == h); + if(!valid) + { + verr << "prev(next(hd)) != hd OR next(prev(hd)) != hd" << std::endl; + return false; + } - /*! - \ingroup PkgBGLHelperFct - returns `true` iff the face denoted by `hd` is a quad, that is it has four incident halfedges. - */ -template -bool is_quad(typename boost::graph_traits::halfedge_descriptor hd, const FaceGraph& g) -{ - return hd == next(next(next(next(hd,g),g),g),g); -} + // vertex integrity. + valid = (target(h, g) != boost::graph_traits::null_vertex()); + if(!valid) + { + verr << "target of halfedge is the null vertex." << std::endl; + return false; + } - /*! - \ingroup PkgBGLHelperFct - returns `true` if all faces are quadrilaterals. - */ -template - bool is_quad_mesh(const FaceGraph& g) -{ - typedef typename boost::graph_traits::face_descriptor face_descriptor; - for(face_descriptor fd : faces(g)){ - if(! is_quad(halfedge(fd,g),g)){ - return false; - } + valid = (target(h, g) == target(opposite(next(h, g), g), g)); + valid = valid && (target(opposite(h, g), g) == target(prev(h, g), g)); + if(!valid) + { + verr << "vertex inconsistencies with prev/next." << std::endl; + return false; } + return true; } - /*! - \ingroup PkgBGLHelperFct - returns `true` iff the connected component denoted by `hd` is a tetrahedron. - */ template -bool is_tetrahedron( typename boost::graph_traits::halfedge_descriptor hd, const FaceGraph& g) +bool is_valid_edge_descriptor(typename boost::graph_traits::edge_descriptor e, + const FaceGraph& g, + const bool verb = false) { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - halfedge_descriptor h1 = hd; - if(is_border(h1,g)) return false; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - halfedge_descriptor h2 = next(h1,g); - halfedge_descriptor h3 = next(h2,g); - halfedge_descriptor h4 = next(opposite(h1,g),g ); - halfedge_descriptor h5 = next(opposite(h2,g),g ); - halfedge_descriptor h6 = next(opposite(h3,g),g ); - // check halfedge combinatorics. - // at least three edges at vertices 1, 2, 3. - if ( h4 == opposite(h3,g) ) return false; - if ( h5 == opposite(h1,g) ) return false; - if ( h6 == opposite(h2,g) ) return false; - // exact three edges at vertices 1, 2, 3. - if ( next(opposite(h4,g),g) != opposite(h3,g) ) return false; - if ( next(opposite(h5,g),g) != opposite(h1,g) ) return false; - if ( next(opposite(h6,g),g) != opposite(h2,g) ) return false; - // three edges at v4. - if ( opposite(next(h4,g),g) != h5 ) return false; - if ( opposite(next(h5,g),g) != h6 ) return false; - if ( opposite(next(h6,g),g) != h4 ) return false; - // All facets are triangles. - if ( next(next(next(h1,g),g),g) != h1 ) return false; - if ( next(next(next(h4,g),g),g) != h4 ) return false; - if ( next(next(next(h5,g),g),g) != h5 ) return false; - if ( next(next(next(h6,g),g),g) != h6 ) return false; - // all edges are non-border edges. - if ( is_border(h1,g) ) return false; // implies h2 and h3 - if ( is_border(h4,g) ) return false; - if ( is_border(h5,g) ) return false; - if ( is_border(h6,g) ) return false; - return true; + Verbose_ostream verr(verb); + bool valid = true; + + // there is no null_edge() in the Graph concepts + + // Pointer integrity. + const halfedge_descriptor h = halfedge(e, g); + valid = (h != boost::graph_traits::null_halfedge()); + if(!valid) + { + verr << "halfedge incident to edge is the null halfedge." << std::endl; + return false; + } + + // halfedge integrity + valid = (edge(h, g) == e); + if(!valid) + { + verr << "edge has an invalid halfedge()." << std::endl; + return false; } -template -bool is_valid_halfedge_descriptor( typename boost::graph_traits::halfedge_descriptor h, const FaceGraph& g) -{ - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::face_descriptor face_descriptor; - face_descriptor f = face(h,g); - halfedge_descriptor done(h); - do{ - if(face(h,g) != f){ - std::cerr << "halfedge " << h << " is invalid\n"; - return false; - } - halfedge_descriptor hn = h; - hn = next(h,g); - if(prev(hn,g) != h){ - std::cerr << "halfedge " << h << " is invalid\n"; - return false; - } - h = hn; - } while(h != done); return true; } template -bool is_valid_vertex_descriptor( typename boost::graph_traits::vertex_descriptor v, const FaceGraph& g) +bool is_valid_face_descriptor(typename boost::graph_traits::face_descriptor f, + const FaceGraph& g, + const bool verb = false) { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - halfedge_descriptor h = halfedge(v,g), done(h); - if(h == boost::graph_traits::null_halfedge()){ - return true; + + Verbose_ostream verr(verb); + bool valid = true; + + // null face + valid = (f != boost::graph_traits::null_face()); + if(!valid) + { + verr << "face is null." << std::endl; + return false; } - do{ - if(target(h,g) != v){ - std::cerr << "vertex " << v << " is invalid\n"; - return false; - } - h = opposite(next(h,g),g); - }while(h != done); - return true; -} -template -bool is_valid_face_descriptor( typename boost::graph_traits::face_descriptor f, const FaceGraph& g) -{ - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + // Pointer integrity. + const halfedge_descriptor h = halfedge(f, g); + valid = (h != boost::graph_traits::null_halfedge()); + if(!valid) + { + verr << "halfedge incident to face is the null halfedge." << std::endl; + return false; + } - halfedge_descriptor h = halfedge(f,g); - if(face(h,g) != f){ - std::cerr << "face " << f << " is invalid\n"; + valid = (face(h, g) == f); + if(!valid) + { + verr << "face has an invalid halfedge()." << std::endl; return false; } + + // face integrity. + valid = (face(h, g) == face(next(h, g), g)); + valid = valid && (face(h, g) == face(prev(h, g), g)); + if(!valid) + { + verr << "different face incident to face halfedges." << std::endl; + return false; + } + return true; } +} // namespace BGL + +// These empty functions simply calling the BGL versions (just above) are done such that +// a specific graph type (e.g. Surface_mesh) can overload those and still call the BGL versions +// without duplicating code +template +bool is_valid_vertex_descriptor(typename boost::graph_traits::vertex_descriptor v, + const Graph& g, + const bool verb = false) +{ + return BGL::is_valid_vertex_descriptor(v, g, verb); +} + +template +bool is_valid_halfedge_descriptor(typename boost::graph_traits::halfedge_descriptor h, + const Graph& g, + const bool verb = false) +{ + return BGL::is_valid_halfedge_descriptor(h, g, verb); +} + +template +bool is_valid_edge_descriptor(typename boost::graph_traits::edge_descriptor e, + const Graph& g, + const bool verb = false) +{ + return BGL::is_valid_edge_descriptor(e, g, verb); +} + +template +bool is_valid_face_descriptor(typename boost::graph_traits::face_descriptor f, + const Graph& g, + const bool verb = false) +{ + return BGL::is_valid_face_descriptor(f, g, verb); +} + /*! \ingroup PkgBGLHelperFct - * \brief checks the integrity of `g`. + * \brief checks the integrity of the graph `g`. * - * `g` is valid if it follows the rules of the `HalfedgeListGraph` concept, - * and all of its associations are reciprocal. - * For example, `prev(next(h, g), g)` must be `h`, - * and `next(prev(h, g), g)` must be `h`. + * The graph `g` is valid if it follows the rules of the `HalfedgeListGraph` concept + * and all of its associations are reciprocal (for example, `prev(next(h, g), g)` must be `h`, + * and `next(prev(h, g), g)` must be `h`). * - * \param g the `Graph` to test. + * \param g the graph to test * \param verb if `true`, the details of the check will be written in the standard output. * * \tparam Graph a model of `HalfedgeListGraph` @@ -354,306 +324,202 @@ template bool is_valid_halfedge_graph(const Graph& g, bool verb = false) { typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef typename boost::graph_traits::vertices_size_type vertex_size_type; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::halfedges_size_type halfedges_size_type; Verbose_ostream verr(verb); - std::size_t num_v(std::distance(boost::begin(vertices(g)), boost::end(vertices(g)))), - num_e(std::distance(boost::begin(edges(g)), boost::end(edges(g)))), - num_h(std::distance(boost::begin(halfedges(g)), boost::end(halfedges(g)))); + + std::size_t num_v = CGAL::internal::exact_num_vertices(g), + num_e = CGAL::internal::exact_num_edges(g), + num_h = CGAL::internal::exact_num_halfedges(g); bool valid = (1 != (num_h&1) && (2*num_e == num_h)); if(!valid) { verr << "number of halfedges is odd." << std::endl; verr << "Halfedge Graph Structure is NOT VALID." << std::endl; - return false; - } - - // All halfedges. - halfedges_size_type n = 0; - for(halfedge_descriptor begin : halfedges(g)) - { - // Pointer integrity. - valid = (next(begin, g) != boost::graph_traits::null_halfedge()); - valid = valid && (opposite(begin, g) != boost::graph_traits::null_halfedge()); - if(!valid) - { - verr << "halfedge " << n << " next / opposite halfedges are null." << std::endl; - verr << "Halfedge Graph Structure is NOT VALID." << std::endl; - return false; - } - - // edge integrity - valid = (halfedge(edge(begin, g), g) == begin); - - // opposite integrity. - valid = valid && (opposite(begin, g) != begin); - valid = valid && (opposite(opposite(begin, g), g) == begin); - if(!valid) - { - verr << "halfedge " << n << " invalid halfedge opposite()." << std::endl; - verr << "Halfedge Graph Structure is NOT VALID." << std::endl; - return false; - } - - // previous integrity. - valid = (prev(next(begin, g), g) == begin); - valid = valid && (next(prev(begin, g), g) == begin); - if(!valid) - { - verr << "halfedge " << n << " prev(next(hd)) != hd OR next(prev(hd)) != hd" << std::endl; - verr << "Halfedge Graph Structure is NOT VALID." << std::endl; - return false; - } - - // vertex integrity. - valid = (target(begin, g) != boost::graph_traits::null_vertex()); - if(!valid) - { - verr << "halfedge " << n << " target of halfedge is the null vertex." << std::endl; - verr << "Halfedge Graph Structure is NOT VALID." << std::endl; - return false; - } + return false; + } - valid = (target(begin, g) == target(opposite(next(begin, g), g), g)); - if(!valid) + // All halfedges. + std::size_t hc = 0; + for(halfedge_descriptor h : halfedges(g)) + { + if(!is_valid_halfedge_descriptor(h, g, verb)) { - verr << "halfedge " << n << " target(hd) != source(next(hd))." << std::endl; + verr << "halfedge " << hc << " is invalid." << std::endl; verr << "Halfedge Graph Structure is NOT VALID." << std::endl; return false; } - ++n; + ++hc; } - valid = (n == num_h); + valid = (hc == num_h); if(!valid) { - verr << "counting halfedges failed." << std::endl; + verr << "counting halfedges failed: " << hc << " vs " << num_h << std::endl; verr << "Halfedge Graph Structure is NOT VALID." << std::endl; return false; } // All vertices. - vertex_size_type v = 0; - n = 0; - for(vertex_descriptor vbegin : vertices(g)) + std::size_t vc = 0; + hc = 0; + for(vertex_descriptor v : vertices(g)) { - // Pointer integrity. - if(halfedge(vbegin, g) != boost::graph_traits::null_halfedge()) - valid = (target(halfedge(vbegin, g), g) == vbegin); - else - valid = false; - - if(!valid) + if(!is_valid_vertex_descriptor(v, g, verb)) { - verr << "vertex " << v << " halfedge incident to vertex is the null halfedge." << std::endl; + verr << "vertex " << vc << " is invalid." << std::endl; verr << "Halfedge Graph Structure is NOT VALID." << std::endl; return false; } // cycle-around-vertex test. - halfedge_descriptor h = halfedge(vbegin, g); - if(h != boost::graph_traits::null_halfedge()) + if(!CGAL::internal::is_isolated(v, g)) { - halfedge_descriptor ge = h; + halfedge_descriptor h = halfedge(v, g), done = h; do { - ++n; + ++hc; h = opposite(next(h, g), g); - valid = (n <= num_h && n != 0); + valid = (hc <= num_h); if(!valid) { - verr << "vertex " << v << " too many halfedges around vertex." << std::endl; + verr << "vertex " << vc << " too many halfedges around vertex." << std::endl; verr << "Halfedge Graph Structure is NOT VALID." << std::endl; return false; } } - while(h != ge); + while(h != done); } - ++v; + ++vc; } - valid = (v == num_v); + valid = (vc == num_v); if(!valid) { - verr << "counting vertices failed." << std::endl; + verr << "counting vertices failed: " << vc << " vs " << num_v << std::endl; verr << "Halfedge Graph Structure is NOT VALID." << std::endl; return false; } - valid = (n == num_h); + valid = (hc == num_h); if(!valid) { - verr << "counting halfedges via vertices failed." << std::endl; + verr << "counting halfedges via vertices failed: " << hc << " vs " << num_h << std::endl; verr << "Halfedge Graph Structure is NOT VALID." << std::endl; return false; } - // All halfedges. - n = 0; - for(halfedge_descriptor i : halfedges(g)) - { - // At least triangular facets and distinct geometry. - valid = (next(i, g) != i) && (target(i, g) != target(opposite(i, g), g)); - if(!valid) - { - verr << "halfedge " << n << " pointer validity corrupted." << std::endl; - verr << "Halfedge Graph Structure is NOT VALID." << std::endl; - return false; - } - - ++n; - } - - valid = (n == num_h); - if(!valid) - verr << "counting halfedges failed." << std::endl; - - verr << "Halfedge Graph Structure is " << (valid ? "valid." : "NOT VALID.") << std::endl; + verr << "Halfedge Graph Structure is valid" << std::endl; return valid; } /*! \ingroup PkgBGLHelperFct - * \brief checks the integrity of `g`. + * \brief checks the integrity of the graph `g`. * - * `g` is valid if it is a valid `HalfedgeListGraph`, if it follows the rules - * of the `FaceListGraph` concept, and all of its associations are reciprocal. - * For example, `face(halfedge(f,g),g)` must be `f`. - * calls `is_valid_halfedge_graph()` + * The graph `g` is a valid face graph if it is a valid halfedge graph, and if it follows the rules + * of the `FaceListGraph` concept and all of its associations are reciprocal (for example, + * `face(halfedge(f,g),g)` must be `f`). * - * \param g the `Graph` to test. - * \param verb if `true`, the details of the check will be written in the standard output. + * \param g the graph to test + * \param verb if `true`, the details of the check will be written in the standard output * - * \tparam Graph a model of `FaceListGraph` + * \tparam FaceGraph a model of `FaceListGraph` and `HalfedgeListGraph` * * \return `true` if `g` is valid, `false` otherwise. * * \see `is_valid_halfedge_graph()` */ -template -bool is_valid_face_graph(const Graph& g, bool verb = false) +template +bool is_valid_face_graph(const FaceGraph& g, bool verb = false) { - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::halfedges_size_type halfedges_size_type; - typedef typename boost::graph_traits::face_descriptor face_descriptor; - typedef typename boost::graph_traits::faces_size_type faces_size_type; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::face_descriptor face_descriptor; Verbose_ostream verr(verb); - std::size_t num_f(std::distance(boost::begin(faces(g)), boost::end(faces(g)))), - num_h(std::distance(boost::begin(halfedges(g)), boost::end(halfedges(g)))); + std::size_t num_f = CGAL::internal::exact_num_faces(g), + num_h = CGAL::internal::exact_num_halfedges(g); - faces_size_type f = 0; - std::size_t n = 0; - std::size_t hn = 0; - halfedges_size_type nb = 0; + std::size_t fc = 0, hc = 0, nb = 0; - //is valid halfedge_graph ? bool valid = is_valid_halfedge_graph(g, verb); if(!valid) return false; // All faces. - for(face_descriptor fbegin : faces(g)) + for(face_descriptor f : faces(g)) { - // Pointer integrity. - if(halfedge(fbegin, g) != boost::graph_traits::null_halfedge()) - valid = (face(halfedge(fbegin, g), g) == fbegin); - else - valid = false; - - if(!valid) + if(!is_valid_face_descriptor(f, g, verb)) { - verr << "face " << f << " halfedge incident to face is the null halfedge." << std::endl; + verr << "face " << fc << " is invalid." << std::endl; verr << "Face Graph Structure is NOT VALID." << std::endl; return false; } // cycle-around-face test. - halfedge_descriptor h = halfedge( fbegin, g); - if(h != boost::graph_traits::null_halfedge()) + halfedge_descriptor h = halfedge(f, g), done(h); + do { - halfedge_descriptor ge = h; - do + ++hc; + valid = (hc <= num_h); + if(!valid) { - ++n; - h = next(h, g); - valid = (n <= num_h && n != 0); - if(!valid) - { - verr << "face " << f << " too many halfedges around face." << std::endl; - verr << "Face Graph Structure is NOT VALID." << std::endl; - return false; - } + verr << "face " << fc << " too many halfedges around face." << std::endl; + verr << "Face Graph Structure is NOT VALID." << std::endl; + return false; } - while(h != ge); + h = next(h, g); } + while(h != done); - ++f; + ++fc; } - valid = (f == num_f); + valid = (fc == num_f); if(!valid) { - verr << "counting faces failed." << std::endl; + verr << "counting faces failed: " << fc << " vs " << num_f << std::endl; verr << "Face Graph Structure is NOT VALID." << std::endl; return false; } - for(halfedge_descriptor i : halfedges(g)) + for(halfedge_descriptor h : halfedges(g)) { - ++hn; - //counting borders - if(is_border(i, g)) + if(is_border(h, g)) ++nb; - - // face integrity. - valid = (face(i, g) == face(next(i, g), g)); - if(!valid) - { - verr << "halfedge " << hn << " face(hd) != face(next(hd))." << std::endl; - verr << "Face Graph Structure is NOT VALID." << std::endl; - return false; - } } - valid = (n + nb == num_h); + valid = (hc + nb == num_h); if(!valid) { - verr << "sum border halfedges (2*nb) = " << 2 * nb << std::endl; verr << "counting halfedges via faces failed." << std::endl; + verr << "sum border halfedges (2*nb) = " << 2 * nb << " vs " << num_h << std::endl; verr << "Face Graph Structure is NOT VALID." << std::endl; return false; } - valid = (f == num_f); - if(!valid) - verr << "counting faces failed." << std::endl; - - verr << "Face Graph Structure is " << (valid ? "valid." : "NOT VALID.") << std::endl; + verr << "Face Graph Structure is valid" << std::endl; return valid; } /*! \ingroup PkgBGLHelperFct - * \brief checks the integrity of `g`. + * \brief checks the integrity of the mesh `g`. * - * `g` is valid if it is a valid `FaceListGraph` and it has distinct faces on each side of an edge. - * calls `is_valid_face_graph()`. + * The mesh `g` is a valid polygon mesh if it is a valid face graph and if it follows the rules + * defined in \ref PMPDef "PolygonMesh". * - * \param g the `Mesh` to test. - * \param verb : if `true`, the details of the check will be written in the standard output. + * \param g the `Mesh` to test + * \param verb if `true`, the details of the check will be written in the standard output * - * \tparam Mesh a model of `FaceListGraph` and `HalfedgeListGraph`, and follows - * the definition of a \ref PMPDef "PolygonMesh" + * \tparam Mesh a model of `FaceListGraph` and `HalfedgeListGraph` * \return `true` if `g` is valid, `false` otherwise. * * \see `is_valid_face_graph()` @@ -697,15 +563,246 @@ bool is_valid_polygon_mesh(const Mesh& g, bool verb = false) return true; } + /*! + \ingroup PkgBGLHelperFct + returns `true` if there are no border edges. + */ +template +bool is_closed(const FaceGraph& g) +{ + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + for(halfedge_descriptor hd : halfedges(g)){ + if(is_border(hd,g)){ + return false; + } + } + return true; +} + + /*! + \ingroup PkgBGLHelperFct + returns `true` if the target of `hd` has exactly two incident edges. + */ +template +bool is_bivalent(typename boost::graph_traits::halfedge_descriptor hd, const FaceGraph& g) +{ + CGAL_precondition(is_valid_halfedge_descriptor(hd, g)); + + return hd == opposite(next(opposite(next(hd,g),g),g),g); +} + + /*! + \ingroup PkgBGLHelperFct + returns `true` if all vertices have exactly two incident edges. + */ +template +bool is_bivalent_mesh(const FaceGraph& g) +{ + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + for(vertex_descriptor vd : vertices(g)){ + halfedge_descriptor hd = halfedge(vd,g); + if((hd == boost::graph_traits::null_halfedge()) || + (! is_bivalent(hd,g))){ + return false; + } + } + return true; +} + + /*! + \ingroup PkgBGLHelperFct + returns `true` if the target of `hd` has exactly three incident edges. + */ +template +bool is_trivalent(typename boost::graph_traits::halfedge_descriptor hd, const FaceGraph& g) +{ + CGAL_precondition(is_valid_halfedge_descriptor(hd, g)); + + return hd == opposite(next(opposite(next(opposite(next(hd,g),g),g),g),g),g); +} + + /*! + \ingroup PkgBGLHelperFct + returns `true` if all + vertices have exactly three incident edges. + */ +template +bool is_trivalent_mesh(const FaceGraph& g) +{ + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + for(vertex_descriptor vd : vertices(g)){ + halfedge_descriptor hd = halfedge(vd,g); + if((hd == boost::graph_traits::null_halfedge()) || + (! is_trivalent(halfedge(hd,g),g))){ + return false; + } + } + return true; +} + + /*! + \ingroup PkgBGLHelperFct + returns `true` iff the connected component denoted by `hd` is a triangle. + \pre `g` must be valid. + */ +template +bool is_isolated_triangle(typename boost::graph_traits::halfedge_descriptor hd, + const FaceGraph& g) +{ + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + + CGAL_precondition(is_valid_halfedge_descriptor(hd, g)); + + halfedge_descriptor beg = hd; + if(is_border(hd,g)) return false; + for(int i=0; i<3;i++){ + if(! is_border(opposite(hd,g),g)) return false; + hd = next(hd,g); + } + return hd == beg; +} + + /*! + \ingroup PkgBGLHelperFct + returns `true` iff the face denoted by `hd` is a triangle, that is it has three incident halfedges. + */ +template +bool is_triangle(typename boost::graph_traits::halfedge_descriptor hd, + const FaceGraph& g) +{ + CGAL_precondition(is_valid_halfedge_descriptor(hd, g)); + + return hd == next(next(next(hd,g),g),g); +} + + /*! + \ingroup PkgBGLHelperFct + returns `true` if all faces are triangles. + */ +template +bool is_triangle_mesh(const FaceGraph& g) +{ + typedef typename boost::graph_traits::face_descriptor face_descriptor; + for(face_descriptor fd : faces(g)){ + if(! is_triangle(halfedge(fd,g),g)){ + return false; + } + } + return true; +} + +/*! + \ingroup PkgBGLHelperFct + returns `true` iff the connected component denoted by `hd` is a quadrilateral. + */ +template +bool is_isolated_quad(typename boost::graph_traits::halfedge_descriptor hd, + const FaceGraph& g) +{ + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + + CGAL_precondition(is_valid_halfedge_descriptor(hd, g)); + + halfedge_descriptor beg = hd; + if(is_border(hd,g)) return false; + for(int i=0; i<4;i++){ + if(! is_border(opposite(hd,g),g)) return false; + hd = next(hd,g); + } + return hd == beg; +} + + + /*! + \ingroup PkgBGLHelperFct + returns `true` iff the face denoted by `hd` is a quad, that is it has four incident halfedges. + */ +template +bool is_quad(typename boost::graph_traits::halfedge_descriptor hd, + const FaceGraph& g) +{ + CGAL_precondition(is_valid_halfedge_descriptor(hd, g)); + + return hd == next(next(next(next(hd,g),g),g),g); +} + + /*! + \ingroup PkgBGLHelperFct + returns `true` if all faces are quadrilaterals. + */ +template +bool is_quad_mesh(const FaceGraph& g) +{ + typedef typename boost::graph_traits::face_descriptor face_descriptor; + + for(face_descriptor fd : faces(g)){ + if(! is_quad(halfedge(fd,g),g)){ + return false; + } + } + return true; +} + + /*! + \ingroup PkgBGLHelperFct + returns `true` iff the connected component denoted by `hd` is a tetrahedron. + */ +template +bool is_tetrahedron(typename boost::graph_traits::halfedge_descriptor hd, + const FaceGraph& g) +{ + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + + CGAL_precondition(is_valid_halfedge_descriptor(hd, g)); + + halfedge_descriptor h1 = hd; + if(is_border(h1,g)) return false; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + halfedge_descriptor h2 = next(h1,g); + halfedge_descriptor h3 = next(h2,g); + halfedge_descriptor h4 = next(opposite(h1,g),g ); + halfedge_descriptor h5 = next(opposite(h2,g),g ); + halfedge_descriptor h6 = next(opposite(h3,g),g ); + // check halfedge combinatorics. + // at least three edges at vertices 1, 2, 3. + if ( h4 == opposite(h3,g) ) return false; + if ( h5 == opposite(h1,g) ) return false; + if ( h6 == opposite(h2,g) ) return false; + // exact three edges at vertices 1, 2, 3. + if ( next(opposite(h4,g),g) != opposite(h3,g) ) return false; + if ( next(opposite(h5,g),g) != opposite(h1,g) ) return false; + if ( next(opposite(h6,g),g) != opposite(h2,g) ) return false; + // three edges at v4. + if ( opposite(next(h4,g),g) != h5 ) return false; + if ( opposite(next(h5,g),g) != h6 ) return false; + if ( opposite(next(h6,g),g) != h4 ) return false; + // All facets are triangles. + if ( next(next(next(h1,g),g),g) != h1 ) return false; + if ( next(next(next(h4,g),g),g) != h4 ) return false; + if ( next(next(next(h5,g),g),g) != h5 ) return false; + if ( next(next(next(h6,g),g),g) != h6 ) return false; + // all edges are non-border edges. + if ( is_border(h1,g) ) return false; // implies h2 and h3 + if ( is_border(h4,g) ) return false; + if ( is_border(h5,g) ) return false; + if ( is_border(h6,g) ) return false; + return true; +} + /*! \ingroup PkgBGLHelperFct returns `true` iff the connected component denoted by `hd` is a hexahedron. */ template -bool is_hexahedron( typename boost::graph_traits::halfedge_descriptor hd, const FaceGraph& g) +bool is_hexahedron(typename boost::graph_traits::halfedge_descriptor hd, + const FaceGraph& g) { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + CGAL_precondition(is_valid_halfedge_descriptor(hd, g)); + halfedge_descriptor h1 = hd; if(is_border(h1,g)) return false; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -742,31 +839,32 @@ namespace internal { template inline -typename boost::enable_if, void>::type +std::enable_if_t::value, void> clear_impl(FaceGraph& g) { g.clear(); } template inline -typename boost::disable_if, void>::type +std::enable_if_t::value, void> clear_impl(FaceGraph& g) { - while(boost::begin(edges(g))!=boost::end(edges(g))) - remove_edge(*boost::begin(edges(g)), g); - while(boost::begin(faces(g))!=boost::end(faces(g))) - remove_face(*boost::begin(faces(g)), g); - while(boost::begin(vertices(g))!=boost::end(vertices(g))) - remove_vertex(*boost::begin(vertices(g)), g); + while(std::begin(edges(g))!=std::end(edges(g))) + remove_edge(*std::begin(edges(g)), g); + while(std::begin(faces(g))!=std::end(faces(g))) + remove_face(*std::begin(faces(g)), g); + while(std::begin(vertices(g))!=std::end(vertices(g))) + remove_vertex(*std::begin(vertices(g)), g); } template -void swap_vertices( - typename boost::graph_traits::vertex_descriptor& p, - typename boost::graph_traits::vertex_descriptor& q, - FaceGraph& g) +void swap_vertices(typename boost::graph_traits::vertex_descriptor& p, + typename boost::graph_traits::vertex_descriptor& q, + FaceGraph& g) { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + CGAL_precondition(is_valid_vertex_descriptor(p, g) && is_valid_vertex_descriptor(q, g)); + halfedge_descriptor hq=halfedge(q, g); halfedge_descriptor hp=halfedge(p, g); for(halfedge_descriptor h : halfedges_around_target(hq, g)) @@ -778,14 +876,16 @@ void swap_vertices( } template -void swap_edges( - const typename boost::graph_traits::halfedge_descriptor& h1, - const typename boost::graph_traits::halfedge_descriptor& h2, - FaceGraph& g) +void swap_edges(const typename boost::graph_traits::halfedge_descriptor& h1, + const typename boost::graph_traits::halfedge_descriptor& h2, + FaceGraph& g) { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::face_descriptor face_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + + CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g)); + const halfedge_descriptor oh1 = opposite(h1, g), oh2 = opposite(h2, g); // backup vertex pointers @@ -853,6 +953,11 @@ void swap_edges( if (fo2 != nf && halfedge(fo2, g)==oh2) set_halfedge(fo2, oh1, g); } +template +void collect_garbage(Graph&) +{ + // nothing by default +} } //end of internal namespace @@ -875,9 +980,9 @@ template void clear(FaceGraph& g) { internal::clear_impl(g); - CGAL_postcondition(std::distance(boost::begin(edges(g)),boost::end(edges(g))) == 0); - CGAL_postcondition(std::distance(boost::begin(vertices(g)),boost::end(vertices(g))) == 0); - CGAL_postcondition(std::distance(boost::begin(faces(g)),boost::end(faces(g))) == 0); + CGAL_postcondition(std::distance(std::begin(edges(g)),std::end(edges(g))) == 0); + CGAL_postcondition(std::distance(std::begin(vertices(g)),std::end(vertices(g))) == 0); + CGAL_postcondition(std::distance(std::begin(faces(g)),std::end(faces(g))) == 0); } /** @@ -915,6 +1020,8 @@ int vertex_index_in_face(const typename boost::graph_traits::vertex_descr { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + CGAL_precondition(is_valid_vertex_descriptor(vd, g) && is_valid_face_descriptor(fd, g)); + halfedge_descriptor start = halfedge(fd, g); halfedge_descriptor current = start; int counter = 0; @@ -955,7 +1062,7 @@ int halfedge_index_in_face(typename boost::graph_traits::halfedge_descrip typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::face_descriptor face_descriptor; - CGAL_precondition(he != boost::graph_traits::null_halfedge()); + CGAL_precondition(is_valid_halfedge_descriptor(he, g)); CGAL_precondition(!is_border(he, g)); face_descriptor f = face(he, g); diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/internal/Has_member_clear.h b/thirdparty/CGAL/include/CGAL/boost/graph/internal/Has_member_clear.h index bd3f9256..fed2d8a2 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/internal/Has_member_clear.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/internal/Has_member_clear.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/internal/Has_member_clear.h $ -// $Id: Has_member_clear.h e5862bd 2022-04-21T13:59:43+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/internal/Has_member_clear.h $ +// $Id: include/CGAL/boost/graph/internal/Has_member_clear.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Philipp Moeller @@ -28,6 +28,9 @@ class Has_member_clear static const bool value = (sizeof(f(0)) == sizeof(char)); }; +template +inline constexpr bool Has_member_clear_v = Has_member_clear::value; + } // internal } // cgal diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/internal/Has_member_id.h b/thirdparty/CGAL/include/CGAL/boost/graph/internal/Has_member_id.h index b8a24271..801e55ed 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/internal/Has_member_id.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/internal/Has_member_id.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/internal/Has_member_id.h $ -// $Id: Has_member_id.h e5862bd 2022-04-21T13:59:43+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/internal/Has_member_id.h $ +// $Id: include/CGAL/boost/graph/internal/Has_member_id.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jane Tournois diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h b/thirdparty/CGAL/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h index fd76718e..6a9b0f40 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h $ -// $Id: OM_iterator_from_circulator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h $ +// $Id: include/CGAL/boost/graph/internal/OM_iterator_from_circulator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,9 +20,6 @@ #include #include -#include -#include - namespace CGAL { // adapted from circulator.h, does not support @@ -46,23 +43,20 @@ class OM_iterator_from_circulator { typedef typename I__traits::iterator_category iterator_category; - typedef typename - boost::mpl::if_c< Prevent_deref - , C - , typename C::value_type - >::type value_type; + typedef std::conditional_t< Prevent_deref + , C + , typename C::value_type> + value_type; typedef typename C::difference_type difference_type; - typedef typename - boost::mpl::if_c< Prevent_deref - , C& - , typename C::reference - >::type reference; - typedef typename - boost::mpl::if_c< Prevent_deref - , C* - , typename C::reference - >::type pointer; + typedef std::conditional_t< Prevent_deref + , C& + , typename C::reference + > reference; + typedef std::conditional_t< Prevent_deref + , C* + , typename C::reference + > pointer; OM_iterator_from_circulator(){} @@ -92,12 +86,12 @@ class OM_iterator_from_circulator { // templates as a work-around. private: template - typename boost::enable_if_c::type + std::enable_if_t indirection() const { return const_cast(this)->current; } template - typename boost::disable_if_c::type + std::enable_if_t indirection() const { return *current; } @@ -108,12 +102,12 @@ class OM_iterator_from_circulator { private: template - typename boost::disable_if_c::type + std::enable_if_t structure_dereference() { return &(*current); } template - typename boost::enable_if_c::type + std::enable_if_t structure_dereference() { return ¤t; } diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/internal/graph_traits_2D_TDS_helper.h b/thirdparty/CGAL/include/CGAL/boost/graph/internal/graph_traits_2D_TDS_helper.h index 52110cf2..30210173 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/internal/graph_traits_2D_TDS_helper.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/internal/graph_traits_2D_TDS_helper.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_2/include/CGAL/boost/graph/internal/graph_traits_2D_TDS_helper.h $ -// $Id: graph_traits_2D_TDS_helper.h 129f427 2021-12-16T13:48:01+01:00 Mael Rouxel-Labbé -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_2/include/CGAL/boost/graph/internal/graph_traits_2D_TDS_helper.h $ +// $Id: include/CGAL/boost/graph/internal/graph_traits_2D_TDS_helper.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -19,8 +19,11 @@ #include #include -#ifndef CGAL_GRAPH_TRAITS_2D_TDS_HELPERS -#define CGAL_GRAPH_TRAITS_2D_TDS_HELPERS +#ifndef CGAL_GRAPH_TRAITS_2D_TDS_HELPERS_H +#define CGAL_GRAPH_TRAITS_2D_TDS_HELPERS_H + +#include + namespace CGAL { namespace internal { @@ -285,7 +288,7 @@ class TDS2_In_edge_circulator namespace std { -// workaround a bug detected on at least g++ 4.4 where boost::next(Iterator) +// workaround a bug detected on at least g++ 4.4 where std::next(Iterator) // is picked as a candidate for next(h,g) template struct iterator_traits< CGAL::internal::TDS2_halfedge_descriptor > @@ -319,4 +322,4 @@ struct hash > } // namespace std -#endif // CGAL_GRAPH_TRAITS_2D_TDS_HELPERS +#endif // CGAL_GRAPH_TRAITS_2D_TDS_HELPERS_H diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation.h b/thirdparty/CGAL/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation.h index 6a139816..b544b4f2 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation.h @@ -2,14 +2,16 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation.h $ -// $Id: graph_traits_2D_triangulation.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation.h $ +// $Id: include/CGAL/boost/graph/internal/graph_traits_2D_triangulation.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé, // Andreas Fabri, // Fernando Cacciola +#include + #ifndef CGAL_2D_TRIANGULATION_TEMPLATE_PARAMETERS #error CGAL_2D_TRIANGULATION_TEMPLATE_PARAMETERS is not defined #endif diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation_helper.h b/thirdparty/CGAL/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation_helper.h index 3c6afe41..fe91f145 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation_helper.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation_helper.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation_helper.h $ -// $Id: graph_traits_2D_triangulation_helper.h 129f427 2021-12-16T13:48:01+01:00 Mael Rouxel-Labbé -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/internal/graph_traits_2D_triangulation_helper.h $ +// $Id: include/CGAL/boost/graph/internal/graph_traits_2D_triangulation_helper.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -17,8 +17,11 @@ #include -#ifndef CGAL_GRAPH_TRAITS_2D_TRIANGULATION_HELPERS -#define CGAL_GRAPH_TRAITS_2D_TRIANGULATION_HELPERS +#ifndef CGAL_GRAPH_TRAITS_2D_TRIANGULATION_HELPERS_H +#define CGAL_GRAPH_TRAITS_2D_TRIANGULATION_HELPERS_H + +#include + namespace CGAL { namespace internal { @@ -156,7 +159,7 @@ struct Dereference_to_handle_enforcer Dereference_to_handle_enforcer, Iterator /*base*/, Handle /*value*/, - boost::use_default, + typename std::iterator_traits::iterator_category, Handle /*reference*/ > { @@ -166,7 +169,8 @@ struct Dereference_to_handle_enforcer private: typedef Dereference_to_handle_enforcer Self; typedef Iterator I; - typedef boost::iterator_adaptor Base; + typedef typename std::iterator_traits::iterator_category Category; + typedef boost::iterator_adaptor Base; public: Dereference_to_handle_enforcer() { } @@ -180,4 +184,4 @@ struct Dereference_to_handle_enforcer } // namespace internal } // namespace CGAL -#endif // CGAL_GRAPH_TRAITS_2D_TRIANGULATION_HELPERS +#endif // CGAL_GRAPH_TRAITS_2D_TRIANGULATION_HELPERS_H diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/internal/helpers.h b/thirdparty/CGAL/include/CGAL/boost/graph/internal/helpers.h index 13cf8ea6..c21ecaa1 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/internal/helpers.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/internal/helpers.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/internal/helpers.h $ -// $Id: helpers.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/internal/helpers.h $ +// $Id: include/CGAL/boost/graph/internal/helpers.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andread Fabri @@ -11,9 +11,15 @@ #ifndef CGAL_BOOST_GRAPH_INTERNAL_HELPERS_H #define CGAL_BOOST_GRAPH_INTERNAL_HELPERS_H -#include -#include +#include +#include #include +#include +#include + +#include + +#include namespace CGAL { @@ -129,7 +135,7 @@ std::size_t exact_num_vertices(const Graph& g) { typename boost::graph_traits::vertex_iterator beg, end; - boost::tie(beg,end) = vertices(g); + std::tie(beg,end) = vertices(g); return std::distance(beg,end); } @@ -138,7 +144,7 @@ std::size_t exact_num_halfedges(const Graph& g) { typename boost::graph_traits::halfedge_iterator beg, end; - boost::tie(beg,end) = halfedges(g); + std::tie(beg,end) = halfedges(g); return std::distance(beg,end); } @@ -147,7 +153,7 @@ std::size_t exact_num_edges(const Graph& g) { typename boost::graph_traits::edge_iterator beg, end; - boost::tie(beg,end) = edges(g); + std::tie(beg,end) = edges(g); return std::distance(beg,end); } @@ -156,14 +162,14 @@ std::size_t exact_num_faces(const Graph& g) { typename boost::graph_traits::face_iterator beg, end; - boost::tie(beg,end) = faces(g); + std::tie(beg,end) = faces(g); return std::distance(beg,end); } template bool is_isolated(typename boost::graph_traits::vertex_descriptor v, - Graph& g) + const Graph& g) { return halfedge(v, g) == boost::graph_traits::null_halfedge(); } @@ -200,6 +206,44 @@ adjust_incoming_halfedge(typename boost::graph_traits::vertex_descriptor } // internal + +namespace impl +{ + template + struct Output_iterator_functor + { + typedef typename boost::property_traits::key_type input_t; + typedef typename boost::property_traits::value_type output_t; + PMAP map; + Output_iterator_functor(PMAP map) + :map(map) + { + } + void operator()(const typename std::pair& pair) + { + put(map, pair.first, pair.second); + } + }; + + template + boost::function_output_iterator > make_functor(PMAP map) + { + return boost::make_function_output_iterator(Output_iterator_functor(map)); + } + + inline Emptyset_iterator make_functor(const internal_np::Param_not_found&) + { + return Emptyset_iterator(); + } +}//end of impl + +template +struct value_type_traits>> +{ + typedef std::pair::input_t, + typename impl::Output_iterator_functor::output_t> type; +}; + } // CGAL diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/internal/initialized_index_maps_helpers.h b/thirdparty/CGAL/include/CGAL/boost/graph/internal/initialized_index_maps_helpers.h index 7f330d07..c9e5f293 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/internal/initialized_index_maps_helpers.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/internal/initialized_index_maps_helpers.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/internal/initialized_index_maps_helpers.h $ -// $Id: initialized_index_maps_helpers.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/internal/initialized_index_maps_helpers.h $ +// $Id: include/CGAL/boost/graph/internal/initialized_index_maps_helpers.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -276,8 +276,8 @@ class GetInitializedIndexMap { public: // Check if there is an internal property map; if not, we must a dynamic property map - typedef typename boost::mpl::if_c< - CGAL::graph_has_property::value, Tag, DynamicTag>::type Final_tag; + typedef std::conditional_t< + CGAL::graph_has_property::value, Tag, DynamicTag> Final_tag; typedef typename internal_np::Lookup_named_param_def< PropertyTag, diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/internal/properties_2D_triangulation.h b/thirdparty/CGAL/include/CGAL/boost/graph/internal/properties_2D_triangulation.h index 3e6a2a7c..1c05b300 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/internal/properties_2D_triangulation.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/internal/properties_2D_triangulation.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/internal/properties_2D_triangulation.h $ -// $Id: properties_2D_triangulation.h 129f427 2021-12-16T13:48:01+01:00 Mael Rouxel-Labbé -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/internal/properties_2D_triangulation.h $ +// $Id: include/CGAL/boost/graph/internal/properties_2D_triangulation.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé @@ -26,6 +26,9 @@ #ifndef CGAL_BOOST_GRAPH_PROPERTIES_2D_TRIANGULATION_H #define CGAL_BOOST_GRAPH_PROPERTIES_2D_TRIANGULATION_H +#include + + namespace CGAL { namespace internal { diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/io.h b/thirdparty/CGAL/include/CGAL/boost/graph/io.h index 11d2dc6a..97b961dc 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/io.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/io.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/io.h $ -// $Id: io.h f55ef7d 2020-10-09T18:36:17+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/io.h $ +// $Id: include/CGAL/boost/graph/io.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/iterator.h b/thirdparty/CGAL/include/CGAL/boost/graph/iterator.h index bb8109ca..1cd7ee79 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/iterator.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/iterator.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/iterator.h $ -// $Id: iterator.h 320da5e 2020-11-18T07:43:12+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/iterator.h $ +// $Id: include/CGAL/boost/graph/iterator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -182,7 +182,7 @@ struct Opposite_face { * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_source_iterator` `havi` with `h = *havi;` * the following holds: Either `++havi` is the past the end iterator, or `next(opposite(h,g),g) == *++havi`. * \tparam Graph must be a model of the concept `HalfedgeGraph` - * \cgalModels `BidirectionalIterator` + * \cgalModels{BidirectionalIterator} */ template class Halfedge_around_source_iterator { @@ -213,16 +213,10 @@ class Halfedge_around_source_iterator { {} #ifndef DOXYGEN_RUNNING - // design patter: "safe bool" - // will be replaced by explicit operator bool with C++11 - typedef void (Halfedge_around_source_iterator::*bool_type)() const; - void this_type_does_not_support_comparisons() const {} - - operator bool_type() const + explicit operator bool() const { - return (! (this->base() == nullptr)) ? - &Halfedge_around_source_iterator::this_type_does_not_support_comparisons : 0; + return (! (this->base() == nullptr)); } bool operator==( const Self& i) const { @@ -280,7 +274,7 @@ class Halfedge_around_source_iterator { * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_target_iterator` `havi` with `h = *havi;` * the following holds: Either `++havi` is the past the end iterator, or `opposite(next(h,g),g) == *++havi`. * \tparam Graph must be a model of the concept `HalfedgeGraph` - * \cgalModels `BidirectionalIterator` + * \cgalModels{BidirectionalIterator} */ template @@ -313,16 +307,10 @@ class Halfedge_around_target_iterator { {} #ifndef DOXYGEN_RUNNING - // design patter: "safe bool" - // will be replaced by explicit operator bool with C++11 - typedef void (Halfedge_around_target_iterator::*bool_type)() const; - - void this_type_does_not_support_comparisons() const {} - operator bool_type() const + explicit operator bool() const { - return (! (this->base() == nullptr)) ? - &Halfedge_around_target_iterator::this_type_does_not_support_comparisons : 0; + return (! (this->base() == nullptr)); } bool operator==( const Self& i) const { @@ -381,7 +369,7 @@ class Halfedge_around_target_iterator { * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_face_iterator` `hafi` with `h = *hafi` * the following holds: Either `++hafi` is the past the end iterator, or `next(h,g) == *++hafi`. * \tparam Graph must be a model of the concept `HalfedgeGraph` - * \cgalModels `BidirectionalIterator` + * \cgalModels{BidirectionalIterator} */ template @@ -412,16 +400,9 @@ class Halfedge_around_face_iterator { pointer operator -> ( ) { return &pos; } const value_type* operator -> ( ) const { return &pos; } - // design patter: "safe bool" - // will be replaced by explicit operator bool with C++11 - typedef void (Halfedge_around_face_iterator::*bool_type)() const; - - void this_type_does_not_support_comparisons() const {} - - operator bool_type() const + explicit operator bool() const { - return (! (this->base() == nullptr)) ? - &Halfedge_around_face_iterator::this_type_does_not_support_comparisons : 0; + return (! (this->base() == nullptr)); } bool operator==( const Self& i) const { @@ -484,7 +465,7 @@ class Halfedge_around_target_circulator; * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_source_circulator` `havc` with `h = *havc;` * the following holds: `next(opposite(h,g),g) == *++havc`. * \tparam Graph must be a model of the concept `HalfedgeGraph` - * \cgalModels `BidirectionalCirculator` + * \cgalModels{BidirectionalCirculator} */ template class Halfedge_around_source_circulator @@ -522,16 +503,10 @@ class Halfedge_around_source_circulator Halfedge_around_source_circulator(vertex_descriptor vd, const Graph& g) : Halfedge_around_source_circulator::iterator_adaptor_(Halfedge_around_target_circulator(halfedge(vd,g),g)), opp(g) {} - // design patter: "safe bool" - // will be replaced by explicit operator bool with C++11 - typedef void (Halfedge_around_source_circulator::*bool_type)() const; - - void this_type_does_not_support_comparisons() const {} - operator bool_type() const + explicit operator bool() const { - return (! (this->base_reference() == nullptr)) ? - &Halfedge_around_source_circulator::this_type_does_not_support_comparisons : 0; + return (! (this->base_reference() == nullptr)); } bool operator== (void*) const @@ -539,6 +514,11 @@ class Halfedge_around_source_circulator return this->base_reference() == nullptr; } + bool operator!= (void*) const + { + return this->base_reference() != nullptr; + } + private: friend class boost::iterator_core_access; typename boost::graph_traits::halfedge_descriptor dereference() const { return opp(*this->base_reference()); } @@ -551,7 +531,7 @@ class Halfedge_around_source_circulator * It circulates over the same halfedges as the `Halfedge_around_target_circulator`. * * \tparam Graph must be a model of the concept `HalfedgeGraph` - * \cgalModels `BidirectionalCirculator` + * \cgalModels{BidirectionalCirculator} */ template @@ -580,16 +560,9 @@ class Face_around_target_circulator #ifndef DOXYGEN_RUNNING typedef std::size_t size_type; - // design patter: "safe bool" - // will be replaced by explicit operator bool with C++11 - typedef void (Face_around_target_circulator::*bool_type)() const; - - void this_type_does_not_support_comparisons() const {} - - operator bool_type() const + explicit operator bool() const { - return (! (this->base_reference() == nullptr)) ? - &Face_around_target_circulator::this_type_does_not_support_comparisons : 0; + return (! (this->base_reference() == nullptr)); } bool operator== (void*) const @@ -597,6 +570,11 @@ class Face_around_target_circulator return this->base_reference() == nullptr; } + bool operator!= (void*) const + { + return this->base_reference() != nullptr; + } + private: friend class boost::iterator_core_access; @@ -612,7 +590,7 @@ class Face_around_target_circulator * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_target_circulator` `havc` with `h = *havc;` * the following holds: `opposite(next(h,g),g) == *++havc`. * \tparam Graph must be a model of the concept `HalfedgeGraph` - * \cgalModels `BidirectionalCirculator` + * \cgalModels{BidirectionalCirculator} */ @@ -654,17 +632,9 @@ class Halfedge_around_target_circulator { bool operator == ( const Self& other) const { return g == other.g && pos == other.pos; } bool operator != ( const Self& other) const { return g != other.g || pos != other.pos; } - - // design patter: "safe bool" - // will be replaced by explicit operator bool with C++11 - typedef void (Halfedge_around_target_circulator::*bool_type)() const; - - void this_type_does_not_support_comparisons() const {} - - operator bool_type() const + explicit operator bool() const { - return (! (g == nullptr)) ? - &Halfedge_around_target_circulator::this_type_does_not_support_comparisons : 0; + return (! (g == nullptr)); } @@ -673,6 +643,11 @@ class Halfedge_around_target_circulator { return g == nullptr; } + bool operator!= (void* ) const + { + return g != nullptr; + } + Self& operator++() { @@ -717,7 +692,7 @@ class Halfedge_around_target_circulator { * Let `h` be a halfedge of graph `g`. For a `Halfedge_around_face_circulator` `hafc` with `h = *hafc` * the following holds: `next(h,g) == *++hafc`. * \tparam Graph must be a model of the concept `HalfedgeGraph` - * \cgalModels `BidirectionalCirculator` + * \cgalModels{BidirectionalCirculator} */ template @@ -751,17 +726,9 @@ class Halfedge_around_face_circulator { bool operator == ( const Self& other) const { return g == other.g && pos == other.pos; } bool operator != ( const Self& other) const { return g != other.g || pos != other.pos; } - - // design patter: "safe bool" - // will be replaced by explicit operator bool with C++11 - typedef void (Halfedge_around_face_circulator::*bool_type)() const; - - void this_type_does_not_support_comparisons() const {} - - operator bool_type() const + explicit operator bool() const { - return (! (g == nullptr)) ? - &Halfedge_around_face_circulator::this_type_does_not_support_comparisons : 0; + return (! (g == nullptr)); } bool operator== (void* ) const @@ -769,6 +736,11 @@ class Halfedge_around_face_circulator { return g == nullptr; } + bool operator!= (void* ) const + { + return g != nullptr; + } + Self& operator++() { CGAL_assertion(g != nullptr); @@ -872,7 +844,7 @@ halfedges_around_face(typename boost::graph_traits::halfedge_descriptor h * may be the null face, and it may be several times the same face descriptor. * * \tparam Graph must be a model of the concept `HalfedgeGraph` - * \cgalModels `BidirectionalCirculator` + * \cgalModels{BidirectionalCirculator} */ template class Face_around_face_iterator @@ -910,7 +882,7 @@ class Face_around_face_iterator * may be the null face, and it may be several times the same face descriptor. * * \tparam Graph must be a model of the concept `HalfedgeGraph` - * \cgalModels `BidirectionalCirculator` + * \cgalModels{BidirectionalCirculator} */ template class Face_around_face_circulator @@ -924,7 +896,7 @@ class Face_around_face_circulator * may be the null face, and it may be several times the same face descriptor. * * \tparam Graph must be a model of the concept `HalfedgeGraph` - * \cgalModels `BidirectionalIterator` + * \cgalModels{BidirectionalIterator} */ template class Face_around_target_iterator @@ -980,6 +952,12 @@ faces_around_face(typename boost::graph_traits::halfedge_descriptor h, co return make_range(I(h,g), I(h,g,1)); } +/** + * \ingroup PkgBGLIterators + * A bidirectional circulator with value type `boost::graph_traits::%vertex_descriptor` over all vertices incident to the same face or border. + * \tparam Graph must be a model of the concept `HalfedgeGraph` + * \cgalModels{BidirectionalIterator} + */ template class Vertex_around_face_circulator #ifndef DOXYGEN_RUNNING @@ -1008,22 +986,22 @@ class Vertex_around_face_circulator {} #ifndef DOXYGEN_RUNNING - // design patter: "safe bool" - // will be replaced by explicit operator bool with C++11 - typedef void (Vertex_around_face_circulator::*bool_type)() const; - - void this_type_does_not_support_comparisons() const {} - operator bool_type() const + explicit operator bool() const { - return (! (this->base_reference() == nullptr)) ? - &Vertex_around_face_circulator::this_type_does_not_support_comparisons : 0; + return (! (this->base_reference() == nullptr)); } bool operator== (void*) const { return this->base_reference()== nullptr; } + + bool operator!= (void*) const + { + return this->base_reference()!= nullptr; + } + private: friend class boost::iterator_core_access; typename boost::graph_traits::vertex_descriptor dereference() const { return fct(*this->base_reference()); } @@ -1035,7 +1013,7 @@ class Vertex_around_face_circulator * A bidirectional iterator with value type `boost::graph_traits::%vertex_descriptor` * over all vertices incident to the same face or border. * \tparam Graph must be a model of the concept `HalfedgeGraph` - * \cgalModels `BidirectionalIterator` + * \cgalModels{BidirectionalIterator} */ template class Vertex_around_face_iterator @@ -1062,16 +1040,10 @@ class Vertex_around_face_iterator {} #ifndef DOXYGEN_RUNNING - // design patter: "safe bool" - // will be replaced by explicit operator bool with C++11 - typedef void (Vertex_around_face_iterator::*bool_type)() const; - - void this_type_does_not_support_comparisons() const {} - operator bool_type() const + explicit operator bool() const { - return (! (this->base_reference() == nullptr)) ? - &Vertex_around_face_iterator::this_type_does_not_support_comparisons : 0; + return (! (this->base_reference() == nullptr)); } bool operator== (void*) const @@ -1163,7 +1135,7 @@ edges_around_face(typename boost::graph_traits::halfedge_descriptor h, co * It circulates over the same halfedges as the `Halfedge_around_target_circulator`. * * \tparam Graph must be a model of the concept `HalfedgeGraph` - * \cgalModels `BidirectionalCirculator` + * \cgalModels{BidirectionalCirculator} */ template class Vertex_around_target_circulator @@ -1192,16 +1164,10 @@ class Vertex_around_target_circulator {} #ifndef DOXYGEN_RUNNING - // design patter: "safe bool" - // will be replaced by explicit operator bool with C++11 - typedef void (Vertex_around_target_circulator::*bool_type)() const; - - void this_type_does_not_support_comparisons() const {} - operator bool_type() const + explicit operator bool() const { - return (! (this->base_reference() == nullptr)) ? - &Vertex_around_target_circulator::this_type_does_not_support_comparisons : 0; + return (! (this->base_reference() == nullptr)); } bool operator== (void*) const @@ -1209,6 +1175,11 @@ class Vertex_around_target_circulator return this->base_reference()== nullptr; } + bool operator!= (void*) const + { + return this->base_reference()!= nullptr; + } + private: friend class boost::iterator_core_access; typename boost::graph_traits::vertex_descriptor dereference() const { return fct(*this->base_reference()); } @@ -1223,7 +1194,7 @@ class Vertex_around_target_circulator * It iterates over the same halfedges as the `Halfedge_around_target_iterator`. * * \tparam Graph must be a model of the concept `HalfedgeGraph` - * \cgalModels `BidirectionalIterator` + * \cgalModels{BidirectionalIterator} */ template class Vertex_around_target_iterator @@ -1250,16 +1221,10 @@ class Vertex_around_target_iterator {} #ifndef DOXYGEN_RUNNING - // design patter: "safe bool" - // will be replaced by explicit operator bool with C++11 - typedef void (Vertex_around_target_iterator::*bool_type)() const; - void this_type_does_not_support_comparisons() const {} - - operator bool_type() const + explicit operator bool() const { - return (! (this->base_reference() == nullptr)) ? - &Vertex_around_target_iterator::this_type_does_not_support_comparisons : 0; + return (! (this->base_reference() == nullptr)); } private: friend class boost::iterator_core_access; @@ -1337,16 +1302,9 @@ class Out_edge_iterator Out_edge_iterator(halfedge_descriptor h, const Graph& g, int n = 0) : Out_edge_iterator::iterator_adaptor_(Halfedge_around_target_iterator(h,g,(h==halfedge_descriptor())?1:n)), opp(g) {} - // design patter: "safe bool" - // will be replaced by explicit operator bool with C++11 - typedef void (Out_edge_iterator::*bool_type)() const; - - void this_type_does_not_support_comparisons() const {} - - operator bool_type() const + explicit operator bool() const { - return (! (this->base_reference() == nullptr)) ? - &Out_edge_iterator::this_type_does_not_support_comparisons : 0; + return (! (this->base_reference() == nullptr)); } @@ -1379,16 +1337,9 @@ class In_edge_iterator : In_edge_iterator::iterator_adaptor_(Halfedge_around_target_iterator(h,g,(h==halfedge_descriptor())?1:n)), fct(g) {} - // design patter: "safe bool" - // will be replaced by explicit operator bool with C++11 - typedef void (In_edge_iterator::*bool_type)() const; - - void this_type_does_not_support_comparisons() const {} - - operator bool_type() const + explicit operator bool() const { - return (! (this->base_reference() == nullptr)) ? - &In_edge_iterator::this_type_does_not_support_comparisons : 0; + return (! (this->base_reference() == nullptr)); } private: diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/kruskal_min_spanning_tree.h b/thirdparty/CGAL/include/CGAL/boost/graph/kruskal_min_spanning_tree.h index 4f3b8567..99327056 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/kruskal_min_spanning_tree.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/kruskal_min_spanning_tree.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/kruskal_min_spanning_tree.h $ -// $Id: kruskal_min_spanning_tree.h 5f3e3b2 2022-05-05T08:46:11+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/kruskal_min_spanning_tree.h $ +// $Id: include/CGAL/boost/graph/kruskal_min_spanning_tree.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/named_params_helper.h b/thirdparty/CGAL/include/CGAL/boost/graph/named_params_helper.h index 910edd65..ce9ecbad 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/named_params_helper.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/named_params_helper.h @@ -1,7 +1,7 @@ // Copyright (c) 2007-2015 GeometryFactory (France). All rights reserved. // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/named_params_helper.h $ -// $Id: named_params_helper.h 38fd07d 2022-11-08T10:24:43+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/named_params_helper.h $ +// $Id: include/CGAL/boost/graph/named_params_helper.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri, Fernando Cacciola, Jane Tournois @@ -15,12 +15,12 @@ #include #include #include +#include +#include #include #include -#include #include -#include #include #include @@ -42,14 +42,13 @@ class property_map_selector { public: typedef typename graph_has_property::type Has_internal_pmap; - typedef typename boost::mpl::if_c::type, - typename boost::cgal_no_property::type - >::type type; - typedef typename boost::mpl::if_c::const_type, - typename boost::cgal_no_property::const_type - >::type const_type; + typedef std::conditional_t::type, + typename boost::cgal_no_property::type> type; + typedef std::conditional_t::const_type, + typename boost::cgal_no_property::const_type + > const_type; type get_pmap(const PropertyTag& p, PolygonMesh& pmesh) { @@ -109,22 +108,75 @@ class property_map_value typedef typename boost::property_traits::value_type type; }; + +template +struct GetVertexPointMap_impl +{ + typedef VPM_from_NP type; + typedef VPM_from_NP const_type; + + template + static const_type + get_const_map(const NamedParameters& np, const PolygonMesh&) + { + return parameters::get_parameter(np, internal_np::vertex_point); + } + + template + static type + get_map(const NamedParameters& np, PolygonMesh&) + { + return parameters::get_parameter(np, internal_np::vertex_point); + } +}; + +template +struct GetVertexPointMap_impl +{ + typedef typename property_map_selector::const_type const_type; + typedef typename property_map_selector::type type; + + template + static const_type + get_const_map(const NamedParameters& /* np */, const PolygonMesh& pm) + { + return get_const_property_map(boost::vertex_point, pm); + } + + template + static type + get_map(const NamedParameters& /* np */, PolygonMesh& pm) + { + return get_property_map(boost::vertex_point, pm); + } +}; + template class GetVertexPointMap { - typedef typename property_map_selector::const_type - DefaultVPMap_const; - typedef typename property_map_selector::type - DefaultVPMap; - -public: - typedef typename internal_np::Lookup_named_param_def::type type; typedef typename internal_np::Lookup_named_param_def::type const_type; + internal_np::Param_not_found>::type VPM_from_NP; + + typedef GetVertexPointMap_impl Impl; + +public: + typedef typename Impl::type type; + typedef typename Impl::const_type const_type; + + static const_type + get_const_map(const NamedParameters& np, const PolygonMesh& pm) + { + return Impl::get_const_map(np, pm); + } + + static type + get_map(const NamedParameters& np, PolygonMesh& pm) + { + return Impl::get_map(np, pm); + } }; template @@ -137,10 +189,15 @@ class GetK typedef typename CGAL::Kernel_traits::Kernel Kernel; }; -template -class GetGeomTraits + +template +struct GetGeomTraits_impl +{ + typedef GT type; +}; + +template +struct GetGeomTraits_impl { typedef typename CGAL::graph_has_property::type Has_internal_pmap; @@ -150,15 +207,23 @@ class GetGeomTraits struct Fake_GT {}; // to be used if there is no internal vertex_point_map in PolygonMesh - typedef typename boost::mpl::if_c::value, - typename GetK::Kernel, - Fake_GT>::type DefaultKernel; + typedef std::conditional_t::value, + typename GetK::Kernel, + Fake_GT> type; +}; -public: +template +struct GetGeomTraits +{ typedef typename internal_np::Lookup_named_param_def::type type; + internal_np::Param_not_found>::type GT_from_NP; + typedef typename GetGeomTraits_impl::type type; }; // Define the following structs: @@ -277,34 +342,52 @@ class GetPointMap typedef typename CGAL::Identity_property_map const_type; }; -template +template +struct GetPolygonSoupGeomTraits +{ + typedef typename internal_np::Lookup_named_param_def < + internal_np::geom_traits_t, + NamedParameters, + typename CGAL::Kernel_traits< + typename boost::property_traits< + typename GetPointMap::type + >::value_type + >::type + > ::type type; +}; + + +template struct Point_set_processing_3_np_helper { typedef typename std::iterator_traits::value_type Value_type; - typedef CGAL::Identity_property_map DefaultPMap; - typedef CGAL::Identity_property_map DefaultConstPMap; + typedef typename Default::Get>::type DefaultPMap; + typedef typename Default::Get>::type DefaultConstPMap; - typedef typename internal_np::Lookup_named_param_def::type Point_map; - typedef typename internal_np::Lookup_named_param_def::type Const_point_map; + typedef typename internal_np::Lookup_named_param_def ::type Point_map; // public + typedef typename internal_np::Lookup_named_param_def ::type Const_point_map; // public typedef typename boost::property_traits::value_type Point; typedef typename Kernel_traits::Kernel Default_geom_traits; - typedef typename internal_np::Lookup_named_param_def::type Geom_traits; + typedef typename internal_np::Lookup_named_param_def < + internal_np::geom_traits_t, + NamedParameters, + Default_geom_traits + > ::type Geom_traits; // public - typedef typename Geom_traits::FT FT; + typedef typename Geom_traits::FT FT; // public typedef Constant_property_map DummyNormalMap; + typedef typename Default::Get::type DefaultNMap; - typedef typename internal_np::Lookup_named_param_def::type Normal_map; + typedef typename internal_np::Lookup_named_param_def< + internal_np::normal_t, + NamedParameters, + DefaultNMap + > ::type Normal_map; // public static Point_map get_point_map(PointRange&, const NamedParameters& np) { diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/partition.h b/thirdparty/CGAL/include/CGAL/boost/graph/partition.h index 185b1de7..3d3977b2 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/partition.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/partition.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/partition.h $ -// $Id: partition.h 48c997a 2020-07-17T17:00:18+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/partition.h $ +// $Id: include/CGAL/boost/graph/partition.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/prim_minimum_spanning_tree.h b/thirdparty/CGAL/include/CGAL/boost/graph/prim_minimum_spanning_tree.h index 710b58a7..325a3aa1 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/prim_minimum_spanning_tree.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/prim_minimum_spanning_tree.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/prim_minimum_spanning_tree.h $ -// $Id: prim_minimum_spanning_tree.h 5f3e3b2 2022-05-05T08:46:11+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/prim_minimum_spanning_tree.h $ +// $Id: include/CGAL/boost/graph/prim_minimum_spanning_tree.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties.h index fa330ded..f6a84aaf 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/properties.h $ -// $Id: properties.h 8166579 2021-10-11T19:58:07+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/properties.h $ +// $Id: include/CGAL/boost/graph/properties.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -140,9 +140,9 @@ struct Point_accessor typedef ValueType value_type; typedef Handle key_type; - typedef typename boost::mpl::if_< boost::is_reference, - ValueType&, - ValueType >::type Reference; + typedef std::conditional_t< std::is_reference_v, + ValueType&, + ValueType > Reference; Point_accessor() {} Point_accessor(Point_accessor) {} @@ -172,9 +172,9 @@ struct Is_writable_property_map // property map must define. template struct Is_writable_property_map - : boost::mpl::if_c::reference>::type>::value, - CGAL::Tag_false, CGAL::Tag_true>::type + CGAL::Tag_false, CGAL::Tag_true> { }; } // namespace internal diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Constrained_Delaunay_triangulation_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Constrained_Delaunay_triangulation_2.h index 102cde85..f8d3b110 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Constrained_Delaunay_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Constrained_Delaunay_triangulation_2.h @@ -2,15 +2,18 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/properties_Constrained_Delaunay_triangulation_2.h $ -// $Id: properties_Constrained_Delaunay_triangulation_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/properties_Constrained_Delaunay_triangulation_2.h $ +// $Id: include/CGAL/boost/graph/properties_Constrained_Delaunay_triangulation_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé #ifndef CGAL_PROPERTIES_CONSTRAINED_DELAUNAY_TRIANGULATION_2_H #define CGAL_PROPERTIES_CONSTRAINED_DELAUNAY_TRIANGULATION_2_H +#include + + #include #define CGAL_2D_TRIANGULATION_TEMPLATE_PARAMETERS typename GT, typename TDS, typename Itag diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Constrained_triangulation_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Constrained_triangulation_2.h index 2079f1a5..e5cea107 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Constrained_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Constrained_triangulation_2.h @@ -2,15 +2,18 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/properties_Constrained_triangulation_2.h $ -// $Id: properties_Constrained_triangulation_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/properties_Constrained_triangulation_2.h $ +// $Id: include/CGAL/boost/graph/properties_Constrained_triangulation_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé #ifndef CGAL_PROPERTIES_CONSTRAINED_TRIANGULATION_2_H #define CGAL_PROPERTIES_CONSTRAINED_TRIANGULATION_2_H +#include + + #include #define CGAL_2D_TRIANGULATION_TEMPLATE_PARAMETERS typename GT, typename TDS, typename Itag diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Constrained_triangulation_plus_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Constrained_triangulation_plus_2.h index 27c1be90..aa107384 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Constrained_triangulation_plus_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Constrained_triangulation_plus_2.h @@ -2,15 +2,18 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/properties_Constrained_triangulation_plus_2.h $ -// $Id: properties_Constrained_triangulation_plus_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/properties_Constrained_triangulation_plus_2.h $ +// $Id: include/CGAL/boost/graph/properties_Constrained_triangulation_plus_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé #ifndef CGAL_PROPERTIES_CONSTRAINED_TRIANGULATION_PLUS_2_H #define CGAL_PROPERTIES_CONSTRAINED_TRIANGULATION_PLUS_2_H +#include + + #include #define CGAL_2D_TRIANGULATION_TEMPLATE_PARAMETERS typename Tr diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Delaunay_triangulation_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Delaunay_triangulation_2.h index 542e7000..6f424de5 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Delaunay_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Delaunay_triangulation_2.h @@ -2,15 +2,18 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/properties_Delaunay_triangulation_2.h $ -// $Id: properties_Delaunay_triangulation_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/properties_Delaunay_triangulation_2.h $ +// $Id: include/CGAL/boost/graph/properties_Delaunay_triangulation_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé #ifndef CGAL_PROPERTIES_DELAUNAY_TRIANGULATION_2_H #define CGAL_PROPERTIES_DELAUNAY_TRIANGULATION_2_H +#include + + #include #define CGAL_2D_TRIANGULATION_TEMPLATE_PARAMETERS typename GT, typename TDS diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_HalfedgeDS_base.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_HalfedgeDS_base.h new file mode 100644 index 00000000..e4cd2ab8 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_HalfedgeDS_base.h @@ -0,0 +1,494 @@ +// Copyright (c) 2007 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/boost/graph/properties_HalfedgeDS_base.h $ +// $Id: include/CGAL/boost/graph/properties_HalfedgeDS_base.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Andreas Fabri, Fernando Cacciola + +// note only the properties below are protected by the macro, +// the rest of the file is the shared implementation of properties for +// Polyhedron and HalfedgeDS_default +#ifndef CGAL_BOOST_GRAPH_PROPERTIES_HALFEDGEDS_BASE_H +#define CGAL_BOOST_GRAPH_PROPERTIES_HALFEDGEDS_BASE_H + +#include +#include +#include +#include +#include +#include + +namespace CGAL { + +namespace internal { + +template +class HDS_index_map_external + : public boost::put_get_helper > +{ +public: + typedef boost::lvalue_property_map_tag category; + typedef std::size_t value_type; + typedef std::size_t& reference; + typedef Handle key_type; + +private: + typedef CGAL::Unique_hash_map Map; + +public: + template + HDS_index_map_external(InputIterator begin, InputIterator end, std::size_t max) + : map_(new Map(begin, end, 0, std::size_t(-1), max)) {} + + reference operator[](const key_type& k) const { return (*map_)[k]; } +private: + std::shared_ptr map_; +}; + +// Special case for edges. +template +class HDS_edge_index_map_external + : public boost::put_get_helper > +{ +public: + typedef boost::lvalue_property_map_tag category; + typedef std::size_t value_type; + typedef std::size_t& reference; + typedef typename boost::graph_traits::edge_descriptor key_type; + +private: + typedef CGAL::Unique_hash_map Map; + +public: + HDS_edge_index_map_external(Polyhedron& p) + : map_(new Map(std::size_t(-1), num_halfedges(p))) + { + unsigned int data = 0; + typename boost::graph_traits::edge_iterator it, end; + for(boost::tie(it, end) = edges(p); it != end; ++it, ++data) + (*map_)[*it] = data; + } + + reference operator[](const key_type& k) const { return (*map_)[k]; } +private: + std::shared_ptr map_; +}; + +template +struct HDS_wrap_squared +{ + typedef FT value_type; + typedef FT reference; + typedef Handle key_type; + typedef boost::readable_property_map_tag category; + + template + FT operator[](const E& e) const { + return approximate_sqrt(CGAL::squared_distance(e.halfedge()->vertex()->point(), + e.halfedge()->opposite()->vertex()->point())); + } + + friend inline + value_type get(const HDS_wrap_squared& m, const key_type k) + { + return m[k]; + } +}; + +} + +// the tag we dispatch on from property_map +template +struct HDS_property_map {}; + +} // end of CGAL::internal namespace + +#endif // CGAL_BOOST_GRAPH_PROPERTIES_HALFEDGEDS_BASE_H + +#if !defined(CGAL_HDS_TMPLT) || ! defined(CGAL_HDS_CLASS) +#error CGAL_HDS_TMPLT or CGAL_HDS_CLASS is not defined +#endif + +namespace CGAL { + +// generalized 2-ary get functions +template +typename boost::property_map::const_type +get(PropertyTag,CGAL_HDS_CLASS const&) +{ return typename boost::property_map::const_type(); } + +template +typename boost::property_map::type +get(PropertyTag,CGAL_HDS_CLASS&) +{ return typename boost::property_map::type(); } + +// generalized 3-ary get functions +template +typename boost::property_traits< typename boost::property_map::type >::reference +get(PropertyTag p,CGAL_HDS_CLASS& g, const Key& key) +{ return get(get(p, g), key); } + +template +typename boost::property_traits< typename boost::property_map::const_type >::reference +get(PropertyTag p,CGAL_HDS_CLASS const& g, const Key& key) +{ return get(get(p, g), key); } + + + +#define DECLARE_HDS_DYNAMIC_PM(TAG, DESCRIPTOR) \ +template \ +typename boost::property_map::const_type \ +get(const TAG&, const CGAL_HDS_CLASS&) \ +{ \ + typedef typename boost::graph_traits< CGAL_HDS_CLASS >::DESCRIPTOR descriptor; \ + return internal::Dynamic_property_map(); \ +} + +DECLARE_HDS_DYNAMIC_PM(dynamic_vertex_property_t, vertex_descriptor) +DECLARE_HDS_DYNAMIC_PM(dynamic_halfedge_property_t, halfedge_descriptor) +DECLARE_HDS_DYNAMIC_PM(dynamic_edge_property_t, edge_descriptor) +DECLARE_HDS_DYNAMIC_PM(dynamic_face_property_t, face_descriptor) + +#undef DECLARE_HDS_DYNAMIC_PM + +// generalized put +template +void put(PropertyTag p,CGAL_HDS_CLASS& g, const Key& key, const Value& value) +{ + typedef typename boost::property_map::type Map; + Map pmap = get(p, g); + put(pmap, key, value); +} + +// specialization needs to be repeated for halfedge, vertex, face +#define DECLARE_HDS_INDEX_PM(ENTITY, TAG, ACCESSOR) \ + template \ + struct HDS_property_map { \ + struct bind_ { \ + typedef internal::ACCESSOR##_accessor< \ + CGAL_HDS_CLASS, \ + typename boost::graph_traits< CGAL_HDS_CLASS \ + >::ENTITY##_descriptor > type;\ + typedef type const_type; \ + }; \ + }; + +DECLARE_HDS_INDEX_PM(halfedge, _index_t, Index) +DECLARE_HDS_INDEX_PM(vertex, _index_t, Index) +DECLARE_HDS_INDEX_PM(face, _index_t, Index) + +} // end of CGAL namespace + +#undef DECLARE_HDS_INDEX_PM + +namespace CGAL { +// not done with macros, because HDS_edge::id does not return a +// reference +template +struct HDS_property_map +{ + struct bind_ + { + typedef internal::Edge_index_accessor< + typename boost::graph_traits< + CGAL_HDS_CLASS + >::edge_descriptor > type; + typedef type const_type; + }; +}; + +template +struct HDS_property_map +{ + struct bind_ + { + typedef typename CGAL_HDS_CLASS::Traits::FT FT; + typedef typename boost::graph_traits::edge_descriptor edge_descriptor; + typedef internal::HDS_wrap_squared type; + typedef type const_type; + }; +}; + +template +struct HDS_property_map +{ + struct bind_ + { + typedef internal::Point_accessor< + typename boost::graph_traits< + CGAL_HDS_CLASS + >::vertex_descriptor, + typename Gt::Point_3, typename Gt::Point_3&> type; + + typedef internal::Point_accessor< + typename boost::graph_traits< + CGAL_HDS_CLASS + >::vertex_descriptor, + typename Gt::Point_3, const typename Gt::Point_3&> const_type; + }; +}; + +// +// external indices +// + +template +struct HDS_property_map +{ + struct bind_ + { + typedef internal::HDS_edge_index_map_external< + CGAL_HDS_CLASS + > type; + typedef type const_type; + }; +}; + +template +struct HDS_property_map +{ + struct bind_ + { + typedef internal::HDS_index_map_external< + typename boost::graph_traits< + CGAL_HDS_CLASS + >::halfedge_descriptor > type; + typedef type const_type; + }; +}; + + +template +struct HDS_property_map +{ + struct bind_ + { + typedef internal::HDS_index_map_external< + typename boost::graph_traits< + CGAL_HDS_CLASS + >::vertex_descriptor > type; + typedef type const_type; + }; +}; + +template +struct HDS_property_map +{ + struct bind_ + { + typedef internal::HDS_index_map_external< + typename boost::graph_traits< + CGAL_HDS_CLASS + >::face_descriptor > type; + typedef type const_type; + }; +}; + +template +typename boost::property_map::const_type +get(boost::edge_external_index_t,CGAL_HDS_CLASS const& p) +{ + return typename boost::property_map::const_type( + const_cast(p)); +} + +template +typename boost::property_map::const_type +get(boost::halfedge_external_index_t,CGAL_HDS_CLASS const& p) +{ + CGAL_HDS_CLASS& ncp = const_cast(p); + + return typename boost::property_map::const_type( + ncp.halfedges_begin(), ncp.halfedges_end(), ncp.size_of_halfedges()); +} + +template +typename boost::property_map::const_type +get(boost::vertex_external_index_t,CGAL_HDS_CLASS const& p) +{ + CGAL_HDS_CLASS& ncp = const_cast(p); + + return typename boost::property_map::const_type( + ncp.vertices_begin(), ncp.vertices_end(), ncp.size_of_vertices()); +} + +template +typename boost::property_map::const_type +get(boost::face_external_index_t,CGAL_HDS_CLASS const& p) +{ + CGAL_HDS_CLASS& ncp = const_cast(p); + + return typename boost::property_map::const_type( + ncp.facets_begin(), ncp.facets_end(), ncp.size_of_facets()); +} + +// the same blurb for non-const + +template +typename boost::property_map::type +get(boost::edge_external_index_t,CGAL_HDS_CLASS& p) +{ + return typename boost::property_map::type( + p); +} + +template +typename boost::property_map::type +get(boost::halfedge_external_index_t,CGAL_HDS_CLASS & ncp) +{ + return typename boost::property_map::type( + ncp.halfedges_begin(), ncp.halfedges_end(), ncp.size_of_halfedges()); +} + +template +typename boost::property_map::type +get(boost::vertex_external_index_t,CGAL_HDS_CLASS & ncp) +{ + return typename boost::property_map::type( + ncp.vertices_begin(), ncp.vertices_end(), ncp.size_of_vertices()); +} + + +template +typename boost::property_map::type +get(boost::face_external_index_t,CGAL_HDS_CLASS & ncp) +{ + return typename boost::property_map::type( + ncp.facets_begin(), ncp.facets_end(), ncp.size_of_facets()); +} + +} // end of CGAL namespace + + +namespace boost { + +// property_map dispatcher into Polyhedron +template +struct property_map +{ + typedef typename CGAL::HDS_property_map:: + bind_ map_gen; + typedef typename map_gen::type type; + typedef typename map_gen::const_type const_type; +}; + +// property_map dispatcher into const Polyhedron +template +struct property_map +{ + typedef typename CGAL::HDS_property_map:: + bind_ map_gen; + typedef typename map_gen::type type; + typedef typename map_gen::const_type const_type; +}; + +template +struct property_map > +{ + typedef CGAL_HDS_CLASS G; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef CGAL::internal::Dynamic_property_map type; + typedef type const_type; +}; + +template +struct property_map > +{ + typedef CGAL_HDS_CLASS G; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef CGAL::internal::Dynamic_property_map type; + typedef type const_type; +}; + +template +struct property_map > +{ + typedef CGAL_HDS_CLASS G; + typedef typename boost::graph_traits::edge_descriptor edge_descriptor; + typedef CGAL::internal::Dynamic_property_map type; + typedef type const_type; +}; + +template +struct property_map > +{ + typedef CGAL_HDS_CLASS G; + typedef typename boost::graph_traits::face_descriptor face_descriptor; + typedef CGAL::internal::Dynamic_property_map type; + typedef type const_type; +}; + +// What are those needed for ??? +template +struct edge_property_type +{ + typedef edge_weight_t type; +}; + +template +struct vertex_property_type +{ + typedef CGAL::vertex_point_t type; +}; + +template +struct vertex_property_type +{ + typedef CGAL::vertex_point_t type; +}; + +} // end of boost namespace + +namespace CGAL{ +template +struct graph_has_property + : CGAL::Tag_true {}; + +template +struct graph_has_property + : CGAL::Tag_true {}; + +template +struct graph_has_property + : CGAL::Boolean_tag< + CGAL::internal::Has_member_id< + typename boost::graph_traits::edge_descriptor + >::value + > +{}; + +template +struct graph_has_property + : CGAL::Boolean_tag< + CGAL::internal::Has_member_id< + typename CGAL_HDS_CLASS::Facet + >::value + > +{}; + +template +struct graph_has_property + : CGAL::Boolean_tag< + CGAL::internal::Has_member_id< + typename CGAL_HDS_CLASS::Halfedge + >::value + > +{}; + +template +struct graph_has_property + : CGAL::Boolean_tag< + CGAL::internal::Has_member_id< + typename CGAL_HDS_CLASS::Vertex + >::value + > +{}; +}// end of CGAL namespace + +#undef CGAL_HDS_TMPLT +#undef CGAL_HDS_CLASS diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_HalfedgeDS_default.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_HalfedgeDS_default.h new file mode 100644 index 00000000..fc5f473f --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_HalfedgeDS_default.h @@ -0,0 +1,20 @@ +// Copyright (c) 2007 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/boost/graph/properties_HalfedgeDS_default.h $ +// $Id: include/CGAL/boost/graph/properties_HalfedgeDS_default.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Andreas Fabri, Fernando Cacciola + +#ifndef CGAL_BOOST_GRAPH_PROPERTIES_HALFEDGEDS_DEFAULT_H +#define CGAL_BOOST_GRAPH_PROPERTIES_HALFEDGEDS_DEFAULT_H + +#define CGAL_HDS_TMPLT Gt, class I, class A +#define CGAL_HDS_CLASS CGAL::HalfedgeDS_default + +#include + +#endif // CGAL_BOOST_GRAPH_PROPERTIES_HALFEDGEDS_DEFAULT_H diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h index 6ea2bde2..30a60fb5 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h $ -// $Id: properties_Linear_cell_complex_for_combinatorial_map.h f3db661 2022-03-09T14:13:31+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h $ +// $Id: include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_OpenMesh.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_OpenMesh.h index 82fbb289..c2aebe2e 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_OpenMesh.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_OpenMesh.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/properties_OpenMesh.h $ -// $Id: properties_OpenMesh.h 841373d 2022-11-24T11:58:53+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/properties_OpenMesh.h $ +// $Id: include/CGAL/boost/graph/properties_OpenMesh.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -13,7 +13,6 @@ #include #include #include -#include #ifndef OPEN_MESH_CLASS #error OPEN_MESH_CLASS is not defined @@ -29,13 +28,13 @@ namespace CGAL { template class OM_pmap { public: - typedef typename boost::mpl::if_::vertex_descriptor>, - OpenMesh::VPropHandleT, - typename boost::mpl::if_::face_descriptor>, - OpenMesh::FPropHandleT, - typename boost::mpl::if_::halfedge_descriptor>, - OpenMesh::HPropHandleT, - OpenMesh::EPropHandleT >::type>::type>::type H; + typedef std::conditional_t::vertex_descriptor>, + OpenMesh::VPropHandleT, + std::conditional_t::face_descriptor>, + OpenMesh::FPropHandleT, + std::conditional_t::halfedge_descriptor>, + OpenMesh::HPropHandleT, + OpenMesh::EPropHandleT >>> H; typedef boost::lvalue_property_map_tag category; diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h index c8643bb5..09813032 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h $ -// $Id: properties_PolyMesh_ArrayKernelT.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h $ +// $Id: include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Philipp Möller diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Polyhedron_3.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Polyhedron_3.h index 838bfbb4..fdea5e58 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Polyhedron_3.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Polyhedron_3.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3.h $ -// $Id: properties_Polyhedron_3.h 8166579 2021-10-11T19:58:07+02:00 Mael Rouxel-Labbé -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3.h $ +// $Id: include/CGAL/boost/graph/properties_Polyhedron_3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri, Fernando Cacciola @@ -12,499 +12,12 @@ #ifndef CGAL_BOOST_GRAPH_PROPERTIES_POLYHEDRON_3_H #define CGAL_BOOST_GRAPH_PROPERTIES_POLYHEDRON_3_H -#include -#include -#include -#include -#include -#include -#include +#include -#define CGAL_HDS_PARAM_ template < class Traits, class Items, class Alloc> class HDS -namespace CGAL { +#define CGAL_HDS_TMPLT Gt, class I, CGAL_HDS_PARAM_, class A +#define CGAL_HDS_CLASS CGAL::Polyhedron_3 -namespace internal { - -template -class Polyhedron_index_map_external - : public boost::put_get_helper > -{ -public: - typedef boost::lvalue_property_map_tag category; - typedef std::size_t value_type; - typedef std::size_t& reference; - typedef Handle key_type; - -private: - typedef CGAL::Unique_hash_map Map; - -public: - template - Polyhedron_index_map_external(InputIterator begin, InputIterator end, std::size_t max) - : map_(new Map(begin, end, 0, std::size_t(-1), max)) {} - - reference operator[](const key_type& k) const { return (*map_)[k]; } -private: - std::shared_ptr map_; -}; - -// Special case for edges. -template -class Polyhedron_edge_index_map_external - : public boost::put_get_helper > -{ -public: - typedef boost::lvalue_property_map_tag category; - typedef std::size_t value_type; - typedef std::size_t& reference; - typedef typename boost::graph_traits::edge_descriptor key_type; - -private: - typedef CGAL::Unique_hash_map Map; - -public: - Polyhedron_edge_index_map_external(Polyhedron& p) - : map_(new Map(std::size_t(-1), num_halfedges(p))) - { - unsigned int data = 0; - typename boost::graph_traits::edge_iterator it, end; - for(boost::tie(it, end) = edges(p); it != end; ++it, ++data) - (*map_)[*it] = data; - } - - reference operator[](const key_type& k) const { return (*map_)[k]; } -private: - std::shared_ptr map_; -}; - - template -struct Wrap_squared -{ - typedef FT value_type; - typedef FT reference; - typedef Handle key_type; - typedef boost::readable_property_map_tag category; - - template - FT operator[](const E& e) const { - return approximate_sqrt(CGAL::squared_distance(e.halfedge()->vertex()->point(), - e.halfedge()->opposite()->vertex()->point())); - } - - friend inline - value_type get(const Wrap_squared& m, const key_type k) - { - return m[k]; - } -}; - -} // internal - -// the tag we dispatch on from property_map -template -struct Polyhedron_property_map {}; - -} // namespace CGAL - -namespace CGAL { - -// generalized 2-ary get functions -template -typename boost::property_map< CGAL::Polyhedron_3, PropertyTag >::const_type -get(PropertyTag, CGAL::Polyhedron_3 const&) -{ return typename boost::property_map< CGAL::Polyhedron_3, PropertyTag >::const_type(); } - -template -typename boost::property_map< CGAL::Polyhedron_3, PropertyTag >::type -get(PropertyTag, CGAL::Polyhedron_3&) -{ return typename boost::property_map< CGAL::Polyhedron_3, PropertyTag >::type(); } - -// generalized 3-ary get functions -template -typename boost::property_traits< typename boost::property_map< CGAL::Polyhedron_3, PropertyTag >::type >::reference -get(PropertyTag p, CGAL::Polyhedron_3& g, const Key& key) -{ return get(get(p, g), key); } - -template -typename boost::property_traits< typename boost::property_map, PropertyTag >::const_type >::reference -get(PropertyTag p, CGAL::Polyhedron_3 const& g, const Key& key) -{ return get(get(p, g), key); } - - - -#define CGAL_POLYHEDRON_DYNAMIC_PM(TAG, DESCRIPTOR) \ -template \ -typename boost::property_map, TAG >::const_type \ -get(const TAG&, const Polyhedron_3&) \ -{ \ - typedef typename boost::graph_traits< Polyhedron_3 >::DESCRIPTOR descriptor; \ - return internal::Dynamic_property_map(); \ -} - -CGAL_POLYHEDRON_DYNAMIC_PM(dynamic_vertex_property_t, vertex_descriptor) -CGAL_POLYHEDRON_DYNAMIC_PM(dynamic_halfedge_property_t, halfedge_descriptor) -CGAL_POLYHEDRON_DYNAMIC_PM(dynamic_edge_property_t, edge_descriptor) -CGAL_POLYHEDRON_DYNAMIC_PM(dynamic_face_property_t, face_descriptor) - - -#undef CGAL_POLYHEDRON_DYNAMIC_PM - - -// generalized put -template -void put(PropertyTag p, CGAL::Polyhedron_3& g, const Key& key, const Value& value) -{ - typedef typename boost::property_map, PropertyTag>::type Map; - Map pmap = get(p, g); - put(pmap, key, value); -} - -} // CGAL - -// specialization needs to be repeated for halfedge, vertex, face -#define CGAL_POLYHEDRON_INDEX_PM(ENTITY, TAG, ACCESSOR) \ - namespace CGAL { \ - template<> struct Polyhedron_property_map { \ - template \ - struct bind_ { \ - typedef internal::ACCESSOR##_accessor< \ - CGAL::Polyhedron_3, \ - typename boost::graph_traits< CGAL::Polyhedron_3 \ - >::ENTITY##_descriptor > type; \ - typedef type const_type; \ - }; \ - }; \ - } //CGAL - -CGAL_POLYHEDRON_INDEX_PM(halfedge, _index_t, Index) -CGAL_POLYHEDRON_INDEX_PM(vertex, _index_t, Index) -CGAL_POLYHEDRON_INDEX_PM(face, _index_t, Index) - -#undef CGAL_POLYHEDRON_INDEX_PM - -namespace CGAL { -// not done with macros, because HDS_edge::id does not return a -// reference -template <> -struct Polyhedron_property_map -{ - template - struct bind_ - { - typedef internal::Edge_index_accessor< - typename boost::graph_traits< - CGAL::Polyhedron_3 - >::edge_descriptor > type; - typedef type const_type; - }; -}; - -template <> -struct Polyhedron_property_map -{ - template - struct bind_ - { - typedef typename CGAL::Polyhedron_3::Traits::FT FT; - typedef typename boost::graph_traits >::edge_descriptor edge_descriptor; - typedef internal::Wrap_squared type; - typedef type const_type; - }; -}; - -template <> -struct Polyhedron_property_map -{ - template - struct bind_ - { - typedef internal::Point_accessor< - typename boost::graph_traits< - CGAL::Polyhedron_3 - >::vertex_descriptor, - typename Gt::Point_3, typename Gt::Point_3&> type; - - typedef internal::Point_accessor< - typename boost::graph_traits< - CGAL::Polyhedron_3 - >::vertex_descriptor, - typename Gt::Point_3, const typename Gt::Point_3&> const_type; - }; -}; - -// -// external indices -// - -template <> -struct Polyhedron_property_map -{ - template - struct bind_ - { - typedef internal::Polyhedron_edge_index_map_external< - CGAL::Polyhedron_3 - > type; - typedef type const_type; - }; -}; - -template <> -struct Polyhedron_property_map -{ - template - struct bind_ - { - typedef internal::Polyhedron_index_map_external< - typename boost::graph_traits< - CGAL::Polyhedron_3 - >::halfedge_descriptor > type; - typedef type const_type; - }; -}; - - -template <> -struct Polyhedron_property_map -{ - template - struct bind_ - { - typedef internal::Polyhedron_index_map_external< - typename boost::graph_traits< - CGAL::Polyhedron_3 - >::vertex_descriptor > type; - typedef type const_type; - }; -}; - -template <> -struct Polyhedron_property_map -{ - template - struct bind_ - { - typedef internal::Polyhedron_index_map_external< - typename boost::graph_traits< - CGAL::Polyhedron_3 - >::face_descriptor > type; - typedef type const_type; - }; -}; - -} // CGAL - -namespace CGAL { - -template -typename boost::property_map< CGAL::Polyhedron_3, boost::edge_external_index_t >::const_type -get(boost::edge_external_index_t, CGAL::Polyhedron_3 const& p) -{ - return typename boost::property_map< CGAL::Polyhedron_3, boost::edge_external_index_t >::const_type( - const_cast& >(p)); -} - -template -typename boost::property_map< CGAL::Polyhedron_3, boost::halfedge_external_index_t >::const_type -get(boost::halfedge_external_index_t, CGAL::Polyhedron_3 const& p) -{ - CGAL::Polyhedron_3& ncp = const_cast&>(p); - - return typename boost::property_map< CGAL::Polyhedron_3, boost::halfedge_external_index_t >::const_type( - ncp.halfedges_begin(), ncp.halfedges_end(), ncp.size_of_halfedges()); -} - -template -typename boost::property_map< CGAL::Polyhedron_3, boost::vertex_external_index_t >::const_type -get(boost::vertex_external_index_t, CGAL::Polyhedron_3 const& p) -{ - CGAL::Polyhedron_3& ncp = const_cast&>(p); - - return typename boost::property_map< CGAL::Polyhedron_3, boost::vertex_external_index_t >::const_type( - ncp.vertices_begin(), ncp.vertices_end(), ncp.size_of_vertices()); -} - -template -typename boost::property_map< CGAL::Polyhedron_3, boost::face_external_index_t >::const_type -get(boost::face_external_index_t, CGAL::Polyhedron_3 const& p) -{ - CGAL::Polyhedron_3& ncp = const_cast&>(p); - - return typename boost::property_map< CGAL::Polyhedron_3, boost::face_external_index_t >::const_type( - ncp.facets_begin(), ncp.facets_end(), ncp.size_of_facets()); -} - -// the same blurb for non-const - -template -typename boost::property_map< CGAL::Polyhedron_3, boost::edge_external_index_t >::type -get(boost::edge_external_index_t, CGAL::Polyhedron_3& p) -{ - return typename boost::property_map< CGAL::Polyhedron_3, boost::edge_external_index_t >::type( - p); -} - -template -typename boost::property_map< CGAL::Polyhedron_3, boost::halfedge_external_index_t >::type -get(boost::halfedge_external_index_t, CGAL::Polyhedron_3 & ncp) -{ - return typename boost::property_map< CGAL::Polyhedron_3, boost::halfedge_external_index_t >::type( - ncp.halfedges_begin(), ncp.halfedges_end(), ncp.size_of_halfedges()); -} - -template -typename boost::property_map< CGAL::Polyhedron_3, boost::vertex_external_index_t >::type -get(boost::vertex_external_index_t, CGAL::Polyhedron_3 & ncp) -{ - return typename boost::property_map< CGAL::Polyhedron_3, boost::vertex_external_index_t >::type( - ncp.vertices_begin(), ncp.vertices_end(), ncp.size_of_vertices()); -} - - -template -typename boost::property_map< CGAL::Polyhedron_3, boost::face_external_index_t >::type -get(boost::face_external_index_t, CGAL::Polyhedron_3 & ncp) -{ - return typename boost::property_map< CGAL::Polyhedron_3, boost::face_external_index_t >::type( - ncp.facets_begin(), ncp.facets_end(), ncp.size_of_facets()); -} - - - -} // namespace CGAL - - -namespace boost { - -// property_map dispatcher into Polyhedron -template -struct property_map, Tag> -{ - typedef typename CGAL::Polyhedron_property_map:: - template bind_ map_gen; - typedef typename map_gen::type type; - typedef typename map_gen::const_type const_type; -}; - -// property_map dispatcher into const Polyhedron -template -struct property_map, Tag> -{ - typedef typename CGAL::Polyhedron_property_map:: - template bind_ map_gen; - typedef typename map_gen::type type; - typedef typename map_gen::const_type const_type; -}; - -template -struct property_map, CGAL::dynamic_vertex_property_t > -{ - typedef CGAL::Polyhedron_3 G; - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef CGAL::internal::Dynamic_property_map type; - typedef type const_type; -}; - -template -struct property_map, CGAL::dynamic_halfedge_property_t > -{ - typedef CGAL::Polyhedron_3 G; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef CGAL::internal::Dynamic_property_map type; - typedef type const_type; -}; - -template -struct property_map, CGAL::dynamic_edge_property_t > -{ - typedef CGAL::Polyhedron_3 G; - typedef typename boost::graph_traits::edge_descriptor edge_descriptor; - typedef CGAL::internal::Dynamic_property_map type; - typedef type const_type; -}; - -template -struct property_map, CGAL::dynamic_face_property_t > -{ - typedef CGAL::Polyhedron_3 G; - typedef typename boost::graph_traits::face_descriptor face_descriptor; - typedef CGAL::internal::Dynamic_property_map type; - typedef type const_type; -}; - -// What are those needed for ??? -template -struct edge_property_type > -{ - typedef edge_weight_t type; -}; - -template -struct vertex_property_type > -{ - typedef CGAL::vertex_point_t type; -}; - -template -struct vertex_property_type > -{ - typedef CGAL::vertex_point_t type; -}; - - -} // namespace boost - -namespace CGAL{ -template -struct graph_has_property, boost::vertex_point_t> - : CGAL::Tag_true {}; - -template -struct graph_has_property, boost::edge_weight_t> - : CGAL::Tag_true {}; - -template -struct graph_has_property, boost::edge_index_t> - : CGAL::Boolean_tag< - CGAL::internal::Has_member_id< - typename boost::graph_traits >::edge_descriptor - >::value - > -{}; - -template -struct graph_has_property, boost::face_index_t> - : CGAL::Boolean_tag< - CGAL::internal::Has_member_id< - typename CGAL::Polyhedron_3::Facet - >::value - > -{}; - -template -struct graph_has_property, boost::halfedge_index_t> - : CGAL::Boolean_tag< - CGAL::internal::Has_member_id< - typename CGAL::Polyhedron_3::Halfedge - >::value - > -{}; - -template -struct graph_has_property, boost::vertex_index_t> - : CGAL::Boolean_tag< - CGAL::internal::Has_member_id< - typename CGAL::Polyhedron_3::Vertex - >::value - > -{}; -}// end CGAL -#undef CGAL_HDS_PARAM_ - - - -#include -#include +#include #endif // CGAL_BOOST_GRAPH_PROPERTIES_POLYHEDRON_3_H diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Polyhedron_3_features.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Polyhedron_3_features.h index 4fba80e2..7afa91da 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Polyhedron_3_features.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Polyhedron_3_features.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3_features.h $ -// $Id: properties_Polyhedron_3_features.h 590ddf8 2021-10-08T15:38:47+02:00 Mael Rouxel-Labbé -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3_features.h $ +// $Id: include/CGAL/boost/graph/properties_Polyhedron_3_features.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri @@ -12,6 +12,9 @@ #ifndef CGAL_PROPERTIES_POLYHEDRON_3_FEATURES_H #define CGAL_PROPERTIES_POLYHEDRON_3_FEATURES_H +#include + + #include #include @@ -55,10 +58,9 @@ void put(Polyhedron_face_patch_id_pmap, Handle_type h, Patch_id pid) h->set_patch_id(pid); } -template -struct Polyhedron_property_map > +template +struct HDS_property_map, CGAL::face_patch_id_t > { - template struct bind_ { typedef Polyhedron_face_patch_id_pmap type; @@ -79,10 +81,9 @@ get(CGAL::face_patch_id_t, const Polyhedron_3&) return Pmap( std::pair(0,1) ); } -template <> -struct Polyhedron_property_map > +template +struct HDS_property_map, CGAL::face_patch_id_t > { - template struct bind_ { typedef typename internal::Get_static_property_map::type type; @@ -93,10 +94,9 @@ struct Polyhedron_property_map > // Compatibility: when the `Patch_id` template argument of // `Polyhedron_mesh_domain` is `Tag_true` (because that argument was named // `UsePatchId` in previous versions of CGAL. -template <> -struct Polyhedron_property_map > +template +struct HDS_property_map, CGAL::face_patch_id_t > { - template struct bind_ { typedef Polyhedron_3 Polyhedron; @@ -108,9 +108,9 @@ struct Polyhedron_property_map > // Compatibility: when the `Patch_id` template argument of // `Polyhedron_mesh_domain` is `Tag_false` (because that argument was named // `UsePatchId` in previous versions of CGAL. -template <> -struct Polyhedron_property_map > - : public Polyhedron_property_map > +template +struct HDS_property_map, CGAL::face_patch_id_t > + : public HDS_property_map, CGAL::face_patch_id_t > { }; @@ -144,10 +144,9 @@ void put(Polyhedron_num_feature_edges_pmap, Handle_type h, int n) } -template <> -struct Polyhedron_property_map +template +struct HDS_property_map, CGAL::vertex_feature_degree_t> { - template struct bind_ { typedef Polyhedron_num_feature_edges_pmap type; @@ -177,10 +176,9 @@ void put(Polyhedron_is_feature_edge_pmap, Handle_type e, bool b) e.halfedge()->opposite()->set_feature_edge(b); } -template <> -struct Polyhedron_property_map +template +struct HDS_property_map, CGAL::edge_is_feature_t> { - template struct bind_ { typedef Polyhedron_is_feature_edge_pmap type; @@ -220,10 +218,9 @@ void put(Polyhedron_incident_patches_pmap, h->add_incident_patch(n); } -template -struct Polyhedron_property_map > +template +struct HDS_property_map, CGAL::vertex_incident_patches_t > { - template struct bind_ { typedef Polyhedron_incident_patches_pmap type; diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Polyhedron_3_time_stamp.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Polyhedron_3_time_stamp.h index 5b0ab4fa..928f3d57 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Polyhedron_3_time_stamp.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Polyhedron_3_time_stamp.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3_time_stamp.h $ -// $Id: properties_Polyhedron_3_time_stamp.h df56098 2021-10-08T12:13:43+02:00 Mael Rouxel-Labbé -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3_time_stamp.h $ +// $Id: include/CGAL/boost/graph/properties_Polyhedron_3_time_stamp.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri @@ -12,6 +12,9 @@ #ifndef CGAL_PROPERTIES_POLYHEDRON_3_TIME_STAMP_H #define CGAL_PROPERTIES_POLYHEDRON_3_TIME_STAMP_H +#include + + #include #define CGAL_HDS_PARAM_ template < class Traits, class Items, class Alloc> class HDS @@ -38,10 +41,9 @@ void put(Polyhedron_face_time_stamp_pmap, Handle_type h, std::size_t ts) h->set_time_stamp(ts); } -template <> -struct Polyhedron_property_map +template +struct HDS_property_map, CGAL::vertex_time_stamp_t> { - template struct bind_ { typedef Polyhedron_face_time_stamp_pmap type; @@ -49,14 +51,14 @@ struct Polyhedron_property_map }; }; -template <> -struct Polyhedron_property_map - : public Polyhedron_property_map +template +struct HDS_property_map, CGAL::halfedge_time_stamp_t> + : public HDS_property_map, CGAL::vertex_time_stamp_t> {}; -template <> -struct Polyhedron_property_map - : public Polyhedron_property_map +template +struct HDS_property_map, CGAL::face_time_stamp_t> + : public HDS_property_map, CGAL::vertex_time_stamp_t> {}; diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Regular_triangulation_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Regular_triangulation_2.h index 3f3e9224..5e64bcc0 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Regular_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Regular_triangulation_2.h @@ -2,15 +2,18 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/properties_Regular_triangulation_2.h $ -// $Id: properties_Regular_triangulation_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/properties_Regular_triangulation_2.h $ +// $Id: include/CGAL/boost/graph/properties_Regular_triangulation_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé #ifndef CGAL_PROPERTIES_REGULAR_TRIANGULATION_2_H #define CGAL_PROPERTIES_REGULAR_TRIANGULATION_2_H +#include + + #include #define CGAL_2D_TRIANGULATION_TEMPLATE_PARAMETERS typename GT, typename TDS diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Seam_mesh.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Seam_mesh.h index 9bf8443b..7f55358a 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Seam_mesh.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Seam_mesh.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/properties_Seam_mesh.h $ -// $Id: properties_Seam_mesh.h c999ce1 2020-02-19T10:07:53+01:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/properties_Seam_mesh.h $ +// $Id: include/CGAL/boost/graph/properties_Seam_mesh.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Surface_mesh.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Surface_mesh.h index 348fab07..1b680545 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Surface_mesh.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Surface_mesh.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h $ -// $Id: properties_Surface_mesh.h 590ddf8 2021-10-08T15:38:47+02:00 Mael Rouxel-Labbé -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h $ +// $Id: include/CGAL/boost/graph/properties_Surface_mesh.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Philipp Möller @@ -71,8 +71,8 @@ class SM_index_pmap { public: typedef boost::readable_property_map_tag category; - typedef boost::uint32_t value_type; - typedef boost::uint32_t reference; + typedef std::uint32_t value_type; + typedef std::uint32_t reference; typedef VEF key_type; value_type operator[](const key_type& vd) const @@ -238,7 +238,7 @@ template typename boost::lazy_disable_if < - boost::is_const, + std::is_const, internal::Get_vertex_point_map_for_Surface_mesh_return_type >::type get(CGAL::vertex_point_t, const CGAL::Surface_mesh& g) { @@ -260,13 +260,13 @@ namespace internal { const TYPE& x) \ { return get(get(p, sm), x); } \ -CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::vertex_index_t, +CGAL_SM_INTRINSIC_PROPERTY(std::uint32_t, boost::vertex_index_t, SM_Vertex_index) -CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::edge_index_t, +CGAL_SM_INTRINSIC_PROPERTY(std::uint32_t, boost::edge_index_t, SM_Edge_index) -CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::halfedge_index_t, +CGAL_SM_INTRINSIC_PROPERTY(std::uint32_t, boost::halfedge_index_t, SM_Halfedge_index) -CGAL_SM_INTRINSIC_PROPERTY(boost::uint32_t, boost::face_index_t, +CGAL_SM_INTRINSIC_PROPERTY(std::uint32_t, boost::face_index_t, SM_Face_index) CGAL_SM_INTRINSIC_PROPERTY(Point&, CGAL::vertex_point_t, SM_Vertex_index) diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Surface_mesh_features.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Surface_mesh_features.h index 32bfbc04..22e0755c 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Surface_mesh_features.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Surface_mesh_features.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_features.h $ -// $Id: properties_Surface_mesh_features.h fbd9628 2020-05-15T18:27:33+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_features.h $ +// $Id: include/CGAL/boost/graph/properties_Surface_mesh_features.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri @@ -12,6 +12,9 @@ #ifndef CGAL_PROPERTIES_SURFACE_MESH_FEATURES_H #define CGAL_PROPERTIES_SURFACE_MESH_FEATURES_H +#include + + #ifndef DOXYGEN_RUNNING #include @@ -79,7 +82,7 @@ namespace CGAL { template typename boost::lazy_disable_if< - boost::is_const

    , + std::is_const

    , Get_pmap_of_surface_mesh > >::type inline get(CGAL::face_patch_id_t, Surface_mesh

    & smesh) @@ -91,7 +94,7 @@ inline get(CGAL::face_patch_id_t, Surface_mesh

    & smesh) template typename boost::lazy_disable_if< - boost::is_const

    , + std::is_const

    , Get_pmap_of_surface_mesh > >::type inline get(CGAL::face_patch_id_t, const Surface_mesh

    & smesh) @@ -103,7 +106,7 @@ inline get(CGAL::face_patch_id_t, const Surface_mesh

    & smesh) #define CGAL_PROPERTY_SURFACE_MESH_RETURN_TYPE(Tag) \ typename boost::lazy_disable_if< \ - boost::is_const

    , \ + std::is_const

    , \ Get_pmap_of_surface_mesh \ >::type @@ -153,7 +156,7 @@ inline get(CGAL::vertex_feature_degree_t, const Surface_mesh

    & smesh) template typename boost::lazy_disable_if< - boost::is_const

    , + std::is_const

    , Get_pmap_of_surface_mesh > >::type inline get(CGAL::vertex_incident_patches_t, Surface_mesh

    & smesh) @@ -164,7 +167,7 @@ typename boost::lazy_disable_if< template typename boost::lazy_disable_if< - boost::is_const

    , + std::is_const

    , Get_pmap_of_surface_mesh > >::type inline get(CGAL::vertex_incident_patches_t, const Surface_mesh

    & smesh) diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Surface_mesh_time_stamp.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Surface_mesh_time_stamp.h index 645cf97f..5aa9df13 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Surface_mesh_time_stamp.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Surface_mesh_time_stamp.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_time_stamp.h $ -// $Id: properties_Surface_mesh_time_stamp.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh_time_stamp.h $ +// $Id: include/CGAL/boost/graph/properties_Surface_mesh_time_stamp.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri @@ -12,6 +12,9 @@ #ifndef CGAL_PROPERTIES_SURFACE_MESH_TIME_STAMP_H #define CGAL_PROPERTIES_SURFACE_MESH_TIME_STAMP_H +#include + + #ifndef DOXYGEN_RUNNING #include @@ -59,7 +62,7 @@ namespace CGAL { #define CGAL_PROPERTY_SURFACE_MESH_RETURN_TYPE(Tag) \ typename boost::lazy_disable_if< \ - boost::is_const

    , \ + std::is_const

    , \ Get_pmap_of_surface_mesh \ >::type diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h index 9f398c5b..c0fbb7f5 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h $ -// $Id: properties_TriMesh_ArrayKernelT.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h $ +// $Id: include/CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Philipp Möller diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Triangulation_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Triangulation_2.h index 92c6e4d3..9e689b61 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Triangulation_2.h @@ -2,15 +2,18 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/properties_Triangulation_2.h $ -// $Id: properties_Triangulation_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/properties_Triangulation_2.h $ +// $Id: include/CGAL/boost/graph/properties_Triangulation_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé #ifndef CGAL_PROPERTIES_TRIANGULATION_2_H #define CGAL_PROPERTIES_TRIANGULATION_2_H +#include + + #include #define CGAL_2D_TRIANGULATION_TEMPLATE_PARAMETERS typename GT, typename TDS diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Triangulation_data_structure_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Triangulation_data_structure_2.h index 3a8c97b1..dc8633fe 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Triangulation_data_structure_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Triangulation_data_structure_2.h @@ -2,15 +2,18 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/TDS_2/include/CGAL/boost/graph/properties_Triangulation_data_structure_2.h $ -// $Id: properties_Triangulation_data_structure_2.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/TDS_2/include/CGAL/boost/graph/properties_Triangulation_data_structure_2.h $ +// $Id: include/CGAL/boost/graph/properties_Triangulation_data_structure_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé #ifndef CGAL_PROPERTIES_TRIANGULATION_DATA_STRUCTURE_2_H #define CGAL_PROPERTIES_TRIANGULATION_DATA_STRUCTURE_2_H +#include + + #include #include #include diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Triangulation_hierarchy_2.h b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Triangulation_hierarchy_2.h index d9450b9a..e3bd892d 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/properties_Triangulation_hierarchy_2.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/properties_Triangulation_hierarchy_2.h @@ -2,15 +2,18 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/boost/graph/properties_Triangulation_hierarchy_2.h $ -// $Id: properties_Triangulation_hierarchy_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/boost/graph/properties_Triangulation_hierarchy_2.h $ +// $Id: include/CGAL/boost/graph/properties_Triangulation_hierarchy_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Mael Rouxel-Labbé #ifndef CGAL_PROPERTIES_TRIANGULATION_HIERARCHY_2_H #define CGAL_PROPERTIES_TRIANGULATION_HIERARCHY_2_H +#include + + #include #define CGAL_2D_TRIANGULATION_TEMPLATE_PARAMETERS typename Tr diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/property_maps.h b/thirdparty/CGAL/include/CGAL/boost/graph/property_maps.h index 3120eab6..9db2c043 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/property_maps.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/property_maps.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/property_maps.h $ -// $Id: property_maps.h 590ddf8 2021-10-08T15:38:47+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/property_maps.h $ +// $Id: include/CGAL/boost/graph/property_maps.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot @@ -15,9 +15,6 @@ #include #include -#include -#include -#include namespace CGAL{ @@ -25,7 +22,7 @@ namespace CGAL{ template < class TriangleMesh, class VertexPointMap = typename boost::property_map::type > struct Triangle_from_face_descriptor_map{ - typename boost::remove_const::type* m_tm; + typename std::remove_const_t* m_tm; VertexPointMap m_vpm; Triangle_from_face_descriptor_map() @@ -33,13 +30,13 @@ struct Triangle_from_face_descriptor_map{ {} Triangle_from_face_descriptor_map(TriangleMesh const* tm) - : m_tm( const_cast::type*>(tm) ) + : m_tm( const_cast*>(tm) ) , m_vpm( get(vertex_point, *m_tm) ) {} Triangle_from_face_descriptor_map(TriangleMesh const* tm, VertexPointMap vpm ) - : m_tm(const_cast::type*>(tm)) + : m_tm(const_cast*>(tm)) , m_vpm(vpm) {} @@ -57,7 +54,7 @@ struct Triangle_from_face_descriptor_map{ get(const Triangle_from_face_descriptor_map& pmap, key_type f) { - typename boost::remove_const::type & tm = *(pmap.m_tm); + std::remove_const_t& tm = *(pmap.m_tm); CGAL_precondition(halfedge(f,tm) == next(next(next(halfedge(f,tm),tm),tm),tm)); return value_type( get(pmap.m_vpm, target(halfedge(f,tm),tm)), @@ -70,7 +67,7 @@ struct Triangle_from_face_descriptor_map{ get(const Triangle_from_face_descriptor_map& pmap, const std::pair& f) { - typename boost::remove_const::type & tm = *(pmap.m_tm); + std::remove_const_t & tm = *(pmap.m_tm); CGAL_precondition(halfedge(f.first,tm) == next(next(next(halfedge(f.first,tm),tm),tm),tm)); return value_type( get(pmap.m_vpm, target(halfedge(f.first,tm),tm)), @@ -88,13 +85,13 @@ struct Segment_from_edge_descriptor_map{ {} Segment_from_edge_descriptor_map(PolygonMesh const * pm) - : m_pm( const_cast::type*>(pm) ) + : m_pm( const_cast*>(pm) ) , m_vpm( get(vertex_point, *m_pm) ) {} Segment_from_edge_descriptor_map(PolygonMesh const * pm, VertexPointMap vpm ) - : m_pm( const_cast::type*>(pm) ) + : m_pm( const_cast*>(pm) ) , m_vpm(vpm) {} @@ -106,7 +103,7 @@ struct Segment_from_edge_descriptor_map{ typedef value_type reference; typedef boost::readable_property_map_tag category; //data - typename boost::remove_const::type* m_pm; + std::remove_const_t* m_pm; VertexPointMap m_vpm; //get function for property map @@ -138,16 +135,16 @@ struct One_point_from_face_descriptor_map{ {} One_point_from_face_descriptor_map(PolygonMesh const * g) - : m_pm( const_cast::type*>(g) ) + : m_pm( const_cast*>(g) ) , m_vpm( get(vertex_point, *m_pm) ) {} One_point_from_face_descriptor_map(PolygonMesh const * g, VertexPointMap vpm ) - : m_pm( const_cast::type*>(g) ) + : m_pm( const_cast*>(g) ) , m_vpm(vpm) {} - typename boost::remove_const::type* m_pm; + std::remove_const_t* m_pm; VertexPointMap m_vpm; //classical typedefs @@ -182,12 +179,12 @@ struct Source_point_from_edge_descriptor_map{ {} Source_point_from_edge_descriptor_map(PolygonMesh const * g) - : m_pm( const_cast::type*>(g) ) + : m_pm( const_cast*>(g) ) , m_vpm( get(vertex_point, *m_pm) ) {} Source_point_from_edge_descriptor_map(PolygonMesh const * g, VertexPointMap vpm ) - : m_pm( const_cast::type*>(g) ) + : m_pm( const_cast*>(g) ) , m_vpm(vpm) {} @@ -198,7 +195,7 @@ struct Source_point_from_edge_descriptor_map{ typedef boost::readable_property_map_tag category; //data - typename boost::remove_const::type* m_pm; + std::remove_const_t* m_pm; VertexPointMap m_vpm; //get function for property map diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/selection.h b/thirdparty/CGAL/include/CGAL/boost/graph/selection.h index 9d818c74..341a6e85 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/selection.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/selection.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/selection.h $ -// $Id: selection.h 4ef4f03 2022-11-25T10:14:16+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/selection.h $ +// $Id: include/CGAL/boost/graph/selection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot @@ -207,13 +207,11 @@ struct Regularization_graph prevent_unselection (prevent_unselection) { labels.reserve(num_faces(fg)); - std::size_t nb_selected = 0; for (fg_face_descriptor fd : faces(fg)) { if (get(is_selected_map,fd)) { labels.push_back(1); - ++ nb_selected; } else labels.push_back(0); @@ -486,7 +484,7 @@ reduce_face_selection( \cgalParamNEnd \cgalParamNBegin{prevent_unselection} - \cgalParamDescription{Boolean used to indicate if selection can be only expanded or if it can also be shrinked.} + \cgalParamDescription{Boolean used to indicate if selection can be only expanded or if it can also be shrunk.} \cgalParamType{`bool`} \cgalParamDefault{`false`} \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/split_graph_into_polylines.h b/thirdparty/CGAL/include/CGAL/boost/graph/split_graph_into_polylines.h index e83815c3..45e196ed 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/split_graph_into_polylines.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/split_graph_into_polylines.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/split_graph_into_polylines.h $ -// $Id: split_graph_into_polylines.h 4138477 2021-09-30T16:49:40+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/split_graph_into_polylines.h $ +// $Id: include/CGAL/boost/graph/split_graph_into_polylines.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau, Xiang Gao diff --git a/thirdparty/CGAL/include/CGAL/boost/graph/visitor.h b/thirdparty/CGAL/include/CGAL/boost/graph/visitor.h index 7fb1d98c..36efc4cb 100644 --- a/thirdparty/CGAL/include/CGAL/boost/graph/visitor.h +++ b/thirdparty/CGAL/include/CGAL/boost/graph/visitor.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/boost/graph/visitor.h $ -// $Id: visitor.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/boost/graph/visitor.h $ +// $Id: include/CGAL/boost/graph/visitor.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,13 +14,13 @@ #include #include -#include +#include namespace boost { template struct graph_traits< - boost::tuple, boost::reference_wrapper > > + boost::tuple, std::reference_wrapper > > : boost::graph_traits< Graph > { typedef boost::graph_traits Base; @@ -29,20 +29,20 @@ namespace boost template struct graph_traits< - boost::tuple, boost::reference_wrapper > const > + boost::tuple, std::reference_wrapper > const > : boost::graph_traits< Graph > {}; template struct property_map< - boost::tuple, boost::reference_wrapper >, + boost::tuple, std::reference_wrapper >, PropertyTag> : public property_map {}; template struct property_map< - const boost::tuple, boost::reference_wrapper >, + const boost::tuple, std::reference_wrapper >, PropertyTag> : public property_map {}; @@ -52,11 +52,11 @@ namespace boost namespace CGAL { template -boost::tuple, - boost::reference_wrapper > +boost::tuple, + std::reference_wrapper > make_graph_with_visitor(V& v, Graph& g) { - return boost::make_tuple(boost::ref(v), boost::ref(g)); + return boost::make_tuple(std::ref(v), std::ref(g)); } template @@ -67,11 +67,8 @@ class Visitor_base typedef typename gt::halfedge_descriptor halfedge_descriptor; typedef typename gt::edge_descriptor edge_descriptor; typedef typename gt::vertex_descriptor vertex_descriptor; - - }; - //// OVERLOADS FOR Visitor template @@ -260,119 +257,119 @@ void get(PropertyTag ptag, const Visitor_base& w) template typename boost::graph_traits::vertices_size_type -num_vertices(const boost::tuple, - boost::reference_wrapper >& w) +num_vertices(const boost::tuple, + std::reference_wrapper >& w) { - num_vertices(boost::unwrap_ref(w.get<0>())); - return num_vertices(boost::unwrap_ref(w.get<1>())); + num_vertices(get<0>(w).get()); + return num_vertices(get<1>(w).get()); } template typename boost::graph_traits::edges_size_type -num_edges(const boost::tuple, - boost::reference_wrapper >& w) +num_edges(const boost::tuple, + std::reference_wrapper >& w) { - num_edges(boost::unwrap_ref(w.get<0>())); - return num_edges(boost::unwrap_ref(w.get<1>())); + num_edges(get<0>(w).get()); + return num_edges(get<1>(w).get()); } template typename boost::graph_traits::degree_size_type degree(typename boost::graph_traits::vertex_descriptor v - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - degree(v, boost::unwrap_ref(w.get<0>())); - return degree(v, boost::unwrap_ref(w.get<1>())); + degree(v, get<0>(w).get()); + return degree(v, get<1>(w).get()); } template typename boost::graph_traits::degree_size_type out_degree(typename boost::graph_traits::vertex_descriptor v - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - out_degree(v, boost::unwrap_ref(w.get<0>())); - return out_degree(v, boost::unwrap_ref(w.get<1>())); + out_degree(v, get<0>(w).get()); + return out_degree(v, get<1>(w).get()); } template typename boost::graph_traits::degree_size_type in_degree(typename boost::graph_traits::vertex_descriptor v - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - in_degree(v, boost::unwrap_ref(w.get<0>())); - return in_degree(v, boost::unwrap_ref(w.get<1>())); + in_degree(v, get<0>(w).get()); + return in_degree(v, get<1>(w).get()); } template typename boost::graph_traits::vertex_descriptor source(typename boost::graph_traits::edge_descriptor e - , const boost::tuple, - boost::reference_wrapper > & w) + , const boost::tuple, + std::reference_wrapper > & w) { - source(e, boost::unwrap_ref(w.get<0>())); - return source(e, boost::unwrap_ref(w.get<1>())); + source(e, get<0>(w).get()); + return source(e, get<1>(w).get); } template typename boost::graph_traits::vertex_descriptor target(typename boost::graph_traits::edge_descriptor e - , const boost::tuple, - boost::reference_wrapper > & w) + , const boost::tuple, + std::reference_wrapper > & w) { - target(e, boost::unwrap_ref(w.get<0>())); - return target(e, boost::unwrap_ref(w.get<1>())); + target(e, get<0>(w).get()); + return target(e, get<1>(w).get()); } template std::pair::edge_descriptor, bool> edge(typename boost::graph_traits::vertex_descriptor u , typename boost::graph_traits::vertex_descriptor v - , const boost::tuple, - boost::reference_wrapper > & w) + , const boost::tuple, + std::reference_wrapper > & w) { - edge(u, v, boost::unwrap_ref(w.get<0>())); - return edge(u, v, boost::unwrap_ref(w.get<1>())); + edge(u, v, get<0>(w).get()); + return edge(u, v, get<1>(w).get); } template inline CGAL::Iterator_range::vertex_iterator> -vertices(const boost::tuple, - boost::reference_wrapper >& w) +vertices(const boost::tuple, + std::reference_wrapper >& w) { - vertices(boost::unwrap_ref(w.get<0>())); - return vertices(boost::unwrap_ref(w.get<1>())); + vertices(get<0>(w).get()); + return vertices(get<1>(w).get()); } template inline CGAL::Iterator_range::edge_iterator> -edges(const boost::tuple, - boost::reference_wrapper >& w) +edges(const boost::tuple, + std::reference_wrapper >& w) { - edges(boost::unwrap_ref(w.get<0>())); - return edges(boost::unwrap_ref(w.get<1>())); + edges(get<0>(w).get()); + return edges(get<1>(w).get()); } template inline CGAL::Iterator_range::in_edge_iterator> in_edges(typename boost::graph_traits::vertex_descriptor u - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - in_edges(u, boost::unwrap_ref(w.get<0>())); - return in_edges(u, boost::unwrap_ref(w.get<1>())); + in_edges(u, get<0>(w).get()); + return in_edges(u, get<1>(w).get()); } template inline CGAL::Iterator_range::out_edge_iterator> out_edges(typename boost::graph_traits::vertex_descriptor u - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - out_edges(u, boost::unwrap_ref(w.get<0>())); - return out_edges(u, boost::unwrap_ref(w.get<1>())); + out_edges(u, get<0>(w).get()); + return out_edges(u, get<1>(w).get()); } // @@ -381,72 +378,72 @@ out_edges(typename boost::graph_traits::vertex_descriptor u template typename boost::graph_traits< Graph >::vertex_descriptor -add_vertex(boost::tuple, - boost::reference_wrapper >& w) +add_vertex(boost::tuple, + std::reference_wrapper >& w) { - add_vertex(boost::unwrap_ref(w.get<0>())); - return add_vertex(boost::unwrap_ref(w.get<1>())); + add_vertex(get<0>(w).get()); + return add_vertex(get<1>(w).get()); } template typename boost::graph_traits< Graph >::vertex_descriptor add_vertex(const typename boost::graph_traits::vertex_property_type& p - , boost::tuple, - boost::reference_wrapper >& w) + , boost::tuple, + std::reference_wrapper >& w) { - add_vertex(p, boost::unwrap_ref(w.get<0>())); - return add_vertex(p, boost::unwrap_ref(w.get<1>())); + add_vertex(p, get<0>(w).get()); + return add_vertex(p, get<1>(w).get()); } template void remove_vertex(typename boost::graph_traits< Graph >::vertex_descriptor v - , boost::tuple, - boost::reference_wrapper >& w) + , boost::tuple, + std::reference_wrapper >& w) { - remove_vertex(v, boost::unwrap_ref(w.get<0>())); - remove_vertex(v, boost::unwrap_ref(w.get<1>())); + remove_vertex(v, get<0>(w).get()); + remove_vertex(v, get<1>(w).get()); } template typename boost::graph_traits< Graph >::edge_descriptor -add_edge(boost::tuple, - boost::reference_wrapper >& w) +add_edge(boost::tuple, + std::reference_wrapper >& w) { - add_edge(boost::unwrap_ref(w.get<0>())); - return add_edge(boost::unwrap_ref(w.get<1>())); + add_edge(get<0>(w).get()); + return add_edge(get<1>(w).get()); } template void remove_edge(typename boost::graph_traits< Graph >::edge_descriptor e -, boost::tuple, - boost::reference_wrapper >& w) +, boost::tuple, + std::reference_wrapper >& w) { - remove_edge(e, boost::unwrap_ref(w.get<0>())); - remove_edge(e, boost::unwrap_ref(w.get<1>())); + remove_edge(e, get<0>(w).get()); + remove_edge(e, get<1>(w).get()); } template void set_target(typename boost::graph_traits< Graph >::halfedge_descriptor h1 , typename boost::graph_traits< Graph >::vertex_descriptor v -, boost::tuple, - boost::reference_wrapper >& w) +, boost::tuple, + std::reference_wrapper >& w) { - set_target(h1, v, boost::unwrap_ref(w.get<0>())); - set_target(h1, v, boost::unwrap_ref(w.get<1>())); + set_target(h1, v, get<0>(w).get()); + set_target(h1, v, get<1>(w).get()); } template void set_next(typename boost::graph_traits< Graph >::halfedge_descriptor h1 , typename boost::graph_traits< Graph >::halfedge_descriptor h2 - , boost::tuple, - boost::reference_wrapper >& w) + , boost::tuple, + std::reference_wrapper >& w) { - set_next(h1, h2, boost::unwrap_ref(w.get<0>())); - set_next(h1, h2, boost::unwrap_ref(w.get<1>())); + set_next(h1, h2, get<0>(w).get()); + set_next(h1, h2, get<1>(w).get()); } // @@ -454,65 +451,65 @@ set_next(typename boost::graph_traits< Graph >::halfedge_descriptor h1 // template typename boost::graph_traits< Graph >::face_descriptor -add_face(boost::tuple, - boost::reference_wrapper >& w) +add_face(boost::tuple, + std::reference_wrapper >& w) { - add_face(boost::unwrap_ref(w.get<0>())); - return add_face(boost::unwrap_ref(w.get<1>())); + add_face(get<0>(w).get()); + return add_face(get<1>(w).get()); } template typename boost::graph_traits< Graph >::face_descriptor add_face(InputIterator begin, InputIterator end, - boost::tuple, - boost::reference_wrapper >& w) + boost::tuple, + std::reference_wrapper >& w) { - add_face(begin, end, boost::unwrap_ref(w.get<0>())); - return add_face(begin, end, boost::unwrap_ref(w.get<1>())); + add_face(begin, end, get<0>(w).get()); + return add_face(begin, end, get<1>(w).get()); } template void remove_face(typename boost::graph_traits< Graph >::face_descriptor f -, boost::tuple, -boost::reference_wrapper >& w) +, boost::tuple, +std::reference_wrapper >& w) { - remove_face(f, boost::unwrap_ref(w.get<0>())); - return remove_face(f, boost::unwrap_ref(w.get<1>())); + remove_face(f, get<0>(w).get()); + return remove_face(f, get<1>(w).get()); } template void set_face(typename boost::graph_traits< Graph >::halfedge_descriptor h , typename boost::graph_traits< Graph >::face_descriptor f -, const boost::tuple, -boost::reference_wrapper >& w) +, const boost::tuple, +std::reference_wrapper >& w) { - set_face(h, f, boost::unwrap_ref(w.get<0>())); - set_face(h, f, boost::unwrap_ref(w.get<1>())); + set_face(h, f, get<0>(w).get()); + set_face(h, f, get<1>(w).get()); } template void set_halfedge(typename boost::graph_traits< Graph >::face_descriptor f , typename boost::graph_traits< Graph >::halfedge_descriptor h -, boost::tuple, -boost::reference_wrapper >& w) +, boost::tuple, +std::reference_wrapper >& w) { - set_halfedge(f, h, boost::unwrap_ref(w.get<0>())); - set_halfedge(f, h, boost::unwrap_ref(w.get<1>())); + set_halfedge(f, h, get<0>(w).get()); + set_halfedge(f, h, get<1>(w).get()); } template void set_halfedge(typename boost::graph_traits< Graph >::vertex_descriptor v , typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, -boost::reference_wrapper >& w) +, const boost::tuple, +std::reference_wrapper >& w) { - set_halfedge(v, h, boost::unwrap_ref(w.get<0>())); - set_halfedge(v, h, boost::unwrap_ref(w.get<1>())); + set_halfedge(v, h, get<0>(w).get()); + set_halfedge(v, h, get<1>(w).get()); } // @@ -521,31 +518,31 @@ boost::reference_wrapper >& w) template typename boost::graph_traits< Graph >::edge_descriptor edge(typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, - boost::reference_wrapper >& w) +, const boost::tuple, + std::reference_wrapper >& w) { - edge(h, boost::unwrap_ref(w.get<0>())); - return edge(h, boost::unwrap_ref(w.get<1>())); + edge(h, get<0>(w).get()); + return edge(h, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor halfedge(typename boost::graph_traits< Graph >::edge_descriptor e -, const boost::tuple, - boost::reference_wrapper >& w) +, const boost::tuple, + std::reference_wrapper >& w) { - halfedge(e, boost::unwrap_ref(w.get<0>())); - return halfedge(e, boost::unwrap_ref(w.get<1>())); + halfedge(e, get<0>(w).get()); + return halfedge(e, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor halfedge(typename boost::graph_traits< Graph >::vertex_descriptor v -, const boost::tuple, - boost::reference_wrapper >& w) +, const boost::tuple, + std::reference_wrapper >& w) { - halfedge(v, boost::unwrap_ref(w.get<0>())); - return halfedge(v, boost::unwrap_ref(w.get<1>())); + halfedge(v, get<0>(w).get()); + return halfedge(v, get<1>(w).get()); } template @@ -553,58 +550,58 @@ std::pair< typename boost::graph_traits< Graph >::halfedge_descriptor , bool> halfedge(typename boost::graph_traits< Graph >::vertex_descriptor u , typename boost::graph_traits< Graph >::vertex_descriptor v - , const boost::tuple, - boost::reference_wrapper >& w) + , const boost::tuple, + std::reference_wrapper >& w) { - halfedge(u, v, boost::unwrap_ref(w.get<0>())); - return halfedge(u, v, boost::unwrap_ref(w.get<1>())); + halfedge(u, v, get<0>(w).get()); + return halfedge(u, v, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor opposite(typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, - boost::reference_wrapper >& w) +, const boost::tuple, + std::reference_wrapper >& w) { - opposite(h, boost::unwrap_ref(w.get<0>())); - return opposite(h, boost::unwrap_ref(w.get<1>())); + opposite(h, get<0>(w).get()); + return opposite(h, get<1>(w).get()); } template typename boost::graph_traits< Graph >::vertex_descriptor source(typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, - boost::reference_wrapper >& w) +, const boost::tuple, + std::reference_wrapper >& w) { - source(h, boost::unwrap_ref(w.get<0>())); - return source(h, boost::unwrap_ref(w.get<1>())); + source(h, get<0>(w).get()); + return source(h, get<1>(w).get()); } template typename boost::graph_traits< Graph >::vertex_descriptor target(typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, boost::reference_wrapper >& w) +, const boost::tuple, std::reference_wrapper >& w) { - target(h, boost::unwrap_ref(w.get<0>())); - return target(h, boost::unwrap_ref(w.get<1>())); + target(h, get<0>(w).get()); + return target(h, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor next(typename boost::graph_traits< Graph >::halfedge_descriptor outedge -, const boost::tuple, boost::reference_wrapper >& w) +, const boost::tuple, std::reference_wrapper >& w) { - next(outedge, boost::unwrap_ref(w.get<0>())); - return next(outedge, boost::unwrap_ref(w.get<1>())); + next(outedge, get<0>(w).get()); + return next(outedge, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor prev(typename boost::graph_traits< Graph >::halfedge_descriptor outedge -, const boost::tuple, boost::reference_wrapper >& w) +, const boost::tuple, std::reference_wrapper >& w) { - prev(outedge, boost::unwrap_ref(w.get<0>())); - return prev(outedge, boost::unwrap_ref(w.get<1>())); + prev(outedge, get<0>(w).get()); + return prev(outedge, get<1>(w).get()); } // @@ -612,73 +609,73 @@ prev(typename boost::graph_traits< Graph >::halfedge_descriptor outedge // template CGAL::Iterator_range::halfedge_iterator> -halfedges(const boost::tuple, boost::reference_wrapper >& w) +halfedges(const boost::tuple, std::reference_wrapper >& w) { - halfedges(boost::unwrap_ref(w.get<0>())); - return halfedges(boost::unwrap_ref(w.get<1>())); + halfedges(get<0>(w).get()); + return halfedges(get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedges_size_type -num_halfedges(const boost::tuple, boost::reference_wrapper >& w) +num_halfedges(const boost::tuple, std::reference_wrapper >& w) { - num_halfedges(boost::unwrap_ref(w.get<0>())); - return num_halfedges(boost::unwrap_ref(w.get<1>())); + num_halfedges(get<0>(w).get()); + return num_halfedges(get<1>(w).get()); } // Graph template typename boost::graph_traits< Graph >::face_descriptor face(typename boost::graph_traits< Graph >::halfedge_descriptor h -, const boost::tuple, boost::reference_wrapper >& w) +, const boost::tuple, std::reference_wrapper >& w) { - face(h, boost::unwrap_ref(w.get<0>())); - return face(h, boost::unwrap_ref(w.get<1>())); + face(h, get<0>(w).get()); + return face(h, get<1>(w).get()); } template typename boost::graph_traits< Graph >::halfedge_descriptor halfedge(typename boost::graph_traits< Graph >::face_descriptor f -, const boost::tuple, boost::reference_wrapper >& w) +, const boost::tuple, std::reference_wrapper >& w) { - halfedge(f, boost::unwrap_ref(w.get<0>())); - return halfedge(f, boost::unwrap_ref(w.get<1>())); + halfedge(f, get<0>(w).get()); + return halfedge(f, get<1>(w).get()); } template inline CGAL::Iterator_range::face_iterator > -faces(const boost::tuple, boost::reference_wrapper >& w) +faces(const boost::tuple, std::reference_wrapper >& w) { - faces(boost::unwrap_ref(w.get<0>())); - return faces(boost::unwrap_ref(w.get<1>())); + faces(get<0>(w).get()); + return faces(get<1>(w).get()); } template typename boost::graph_traits::faces_size_type -num_faces(const boost::tuple, - boost::reference_wrapper >& w) +num_faces(const boost::tuple, + std::reference_wrapper >& w) { - num_faces(boost::unwrap_ref(w.get<0>())); - return num_faces(boost::unwrap_ref(w.get<1>())); + num_faces(get<0>(w).get()); + return num_faces(get<1>(w).get()); } template -bool is_valid(const boost::tuple, - boost::reference_wrapper >& w +bool is_valid(const boost::tuple, + std::reference_wrapper >& w , bool verbose = false) { - is_valid(boost::unwrap_ref(w.get<0>()), verbose); - return is_valid(boost::unwrap_ref(w.get<1>()), verbose); + is_valid(get<0>(w).get(), verbose); + return is_valid(get<1>(w).get(), verbose); } template typename boost::property_map< Graph, PropertyTag >::type get(PropertyTag ptag, - const boost::tuple, - boost::reference_wrapper >& w) + const boost::tuple, + std::reference_wrapper >& w) { - get(ptag, boost::unwrap_ref(w.get<0>())); - return get(ptag, boost::unwrap_ref(w.get<1>())); + get(ptag, get<0>(w).get()); + return get(ptag, get<1>(w).get()); } }//end namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/boost/iterator/counting_iterator.hpp b/thirdparty/CGAL/include/CGAL/boost/iterator/counting_iterator.hpp index 091dc8af..3b4e8e85 100644 --- a/thirdparty/CGAL/include/CGAL/boost/iterator/counting_iterator.hpp +++ b/thirdparty/CGAL/include/CGAL/boost/iterator/counting_iterator.hpp @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/boost/iterator/counting_iterator.hpp $ -// $Id: counting_iterator.hpp 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/boost/iterator/counting_iterator.hpp $ +// $Id: include/CGAL/boost/iterator/counting_iterator.hpp a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost/iterator/transform_iterator.hpp b/thirdparty/CGAL/include/CGAL/boost/iterator/transform_iterator.hpp index 1636362f..136439ad 100644 --- a/thirdparty/CGAL/include/CGAL/boost/iterator/transform_iterator.hpp +++ b/thirdparty/CGAL/include/CGAL/boost/iterator/transform_iterator.hpp @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/boost/iterator/transform_iterator.hpp $ -// $Id: transform_iterator.hpp 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/boost/iterator/transform_iterator.hpp $ +// $Id: include/CGAL/boost/iterator/transform_iterator.hpp a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/boost_mp.h b/thirdparty/CGAL/include/CGAL/boost_mp.h index 03318cde..c87c830b 100644 --- a/thirdparty/CGAL/include/CGAL/boost_mp.h +++ b/thirdparty/CGAL/include/CGAL/boost_mp.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/boost_mp.h $ -// $Id: boost_mp.h 6486844 2022-05-10T11:30:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/boost_mp.h $ +// $Id: include/CGAL/boost_mp.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -20,8 +20,18 @@ // easy solution. // MSVC had trouble with versions <= 1.69: // https://github.com/boostorg/multiprecision/issues/98 +// +// Disable also on Windows 32 bits +// because CGAL/cpp_float.h assumes _BitScanForward64 is available +// See https://learn.microsoft.com/en-us/cpp/intrinsics/bitscanforward-bitscanforward64 +// +// Disable also with PowerPC processors, with Boost<1.80 because of that bug: +// https://github.com/boostorg/multiprecision/pull/421 +// #if !defined CGAL_DO_NOT_USE_BOOST_MP && \ - (!defined _MSC_VER || BOOST_VERSION >= 107000) + (!defined _MSC_VER || BOOST_VERSION >= 107000) && \ + (!defined _WIN32 || defined _WIN64) && \ + (BOOST_VERSION >= 108000 || (!defined _ARCH_PPC && !defined _ARCH_PPC64)) #define CGAL_USE_BOOST_MP 1 #include @@ -897,6 +907,7 @@ template< > class Real_embeddable_traits< Quotient +#include #endif // BOOST_VERSION #endif diff --git a/thirdparty/CGAL/include/CGAL/bounding_box.h b/thirdparty/CGAL/include/CGAL/bounding_box.h index 75227479..091523b4 100644 --- a/thirdparty/CGAL/include/CGAL/bounding_box.h +++ b/thirdparty/CGAL/include/CGAL/bounding_box.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis_LGPL/include/CGAL/bounding_box.h $ -// $Id: bounding_box.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis_LGPL/include/CGAL/bounding_box.h $ +// $Id: include/CGAL/bounding_box.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/box_intersection_d.h b/thirdparty/CGAL/include/CGAL/box_intersection_d.h index 0e213b61..b9281f26 100644 --- a/thirdparty/CGAL/include/CGAL/box_intersection_d.h +++ b/thirdparty/CGAL/include/CGAL/box_intersection_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Box_intersection_d/include/CGAL/box_intersection_d.h $ -// $Id: box_intersection_d.h 8773cee 2020-02-05T10:54:11+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Box_intersection_d/include/CGAL/box_intersection_d.h $ +// $Id: include/CGAL/box_intersection_d.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -63,10 +63,10 @@ void box_intersection_segment_tree_d( const NT sup = Box_intersection_d::box_limits::sup(); #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #else // CGAL_LINKED_WITH_TBB - if(boost::is_convertible::value) + if(std::is_convertible::value) { // Here is an illustration for n=2. // diff --git a/thirdparty/CGAL/include/CGAL/cartesian_homogeneous_conversion.h b/thirdparty/CGAL/include/CGAL/cartesian_homogeneous_conversion.h index 952510d3..5ab676be 100644 --- a/thirdparty/CGAL/include/CGAL/cartesian_homogeneous_conversion.h +++ b/thirdparty/CGAL/include/CGAL/cartesian_homogeneous_conversion.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/cartesian_homogeneous_conversion.h $ -// $Id: cartesian_homogeneous_conversion.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/cartesian_homogeneous_conversion.h $ +// $Id: include/CGAL/cartesian_homogeneous_conversion.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/centroid.h b/thirdparty/CGAL/include/CGAL/centroid.h index 9901473e..1de3dcb4 100644 --- a/thirdparty/CGAL/include/CGAL/centroid.h +++ b/thirdparty/CGAL/include/CGAL/centroid.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis_LGPL/include/CGAL/centroid.h $ -// $Id: centroid.h 5e72746 2020-10-29T14:15:38+01:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis_LGPL/include/CGAL/centroid.h $ +// $Id: include/CGAL/centroid.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,11 +20,12 @@ #include #include -#include +#include #include #include #include +#include // Functions to compute the centroid of N points. // Works in 2D and 3D. @@ -822,7 +823,7 @@ struct Dispatch_centroid_3 template < typename InputIterator, typename K> typename internal::Dispatch_centroid_3< - typename boost::enable_if,InputIterator>::type, + std::enable_if_t::value,InputIterator>, K,Dynamic_dimension_tag>::result_type centroid(InputIterator begin, InputIterator end, const K& k, Dynamic_dimension_tag tag) { @@ -831,7 +832,7 @@ centroid(InputIterator begin, InputIterator end, const K& k, Dynamic_dimension_t template < typename InputIterator, typename K, int d > typename internal::Dispatch_centroid_3< - typename boost::enable_if,InputIterator>::type, + std::enable_if_t::value,InputIterator>, K,Dimension_tag >::result_type centroid(InputIterator begin, InputIterator end, const K& k, Dimension_tag tag) { @@ -896,7 +897,7 @@ struct Dispatch_centroid template < typename InputIterator, typename Kernel_or_dim > inline typename internal::Dispatch_centroid< - typename boost::enable_if,InputIterator>::type, + std::enable_if_t::value,InputIterator>, Kernel_or_dim>::result_type centroid(InputIterator begin, InputIterator end, const Kernel_or_dim& k_or_d) { @@ -905,7 +906,7 @@ centroid(InputIterator begin, InputIterator end, const Kernel_or_dim& k_or_d) } namespace internal { -template::value> + template::value> class Centroid_2args_return_type_helper{}; template diff --git a/thirdparty/CGAL/include/CGAL/certified_numeric_predicates.h b/thirdparty/CGAL/include/CGAL/certified_numeric_predicates.h index e47e1826..05f65974 100644 --- a/thirdparty/CGAL/include/CGAL/certified_numeric_predicates.h +++ b/thirdparty/CGAL/include/CGAL/certified_numeric_predicates.h @@ -2,15 +2,18 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/certified_numeric_predicates.h $ -// $Id: certified_numeric_predicates.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/certified_numeric_predicates.h $ +// $Id: include/CGAL/certified_numeric_predicates.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola // #ifndef CGAL_CERTIFIED_NUMERIC_PREDICATES_H #define CGAL_CERTIFIED_NUMERIC_PREDICATES_H +#include + + #include #include #include diff --git a/thirdparty/CGAL/include/CGAL/certified_quotient_predicates.h b/thirdparty/CGAL/include/CGAL/certified_quotient_predicates.h index 34e010b1..5554619e 100644 --- a/thirdparty/CGAL/include/CGAL/certified_quotient_predicates.h +++ b/thirdparty/CGAL/include/CGAL/certified_quotient_predicates.h @@ -2,15 +2,18 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/certified_quotient_predicates.h $ -// $Id: certified_quotient_predicates.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/certified_quotient_predicates.h $ +// $Id: include/CGAL/certified_quotient_predicates.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola // #ifndef CGAL_CERTIFIED_QUOTIENT_PREDICATES_H #define CGAL_CERTIFIED_QUOTIENT_PREDICATES_H +#include + + #include #include diff --git a/thirdparty/CGAL/include/CGAL/ch_akl_toussaint.h b/thirdparty/CGAL/include/CGAL/ch_akl_toussaint.h index 57f8a28d..fb554550 100644 --- a/thirdparty/CGAL/include/CGAL/ch_akl_toussaint.h +++ b/thirdparty/CGAL/include/CGAL/ch_akl_toussaint.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/ch_akl_toussaint.h $ -// $Id: ch_akl_toussaint.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/ch_akl_toussaint.h $ +// $Id: include/CGAL/ch_akl_toussaint.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/ch_bykat.h b/thirdparty/CGAL/include/CGAL/ch_bykat.h index c0b01609..4e6cb8f9 100644 --- a/thirdparty/CGAL/include/CGAL/ch_bykat.h +++ b/thirdparty/CGAL/include/CGAL/ch_bykat.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/ch_bykat.h $ -// $Id: ch_bykat.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/ch_bykat.h $ +// $Id: include/CGAL/ch_bykat.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,7 @@ namespace CGAL { // same as |convex_hull_2(first,last,result)|. {\sc traits}: -// uses |Traits::Point_2|, |Traits::Less_signed_distance_to_line_2|, +// uses |Traits::Point_2|, |Traits::Compare_signed_distance_to_line_2|, // |Traits::Left_turn_2|,, |Traits::Equal_2| and |Traits::Less_xy_2|. template OutputIterator diff --git a/thirdparty/CGAL/include/CGAL/ch_eddy.h b/thirdparty/CGAL/include/CGAL/ch_eddy.h index 3128a6ed..1e8f2f44 100644 --- a/thirdparty/CGAL/include/CGAL/ch_eddy.h +++ b/thirdparty/CGAL/include/CGAL/ch_eddy.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/ch_eddy.h $ -// $Id: ch_eddy.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/ch_eddy.h $ +// $Id: include/CGAL/ch_eddy.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,7 +23,7 @@ namespace CGAL { // same as |convex_hull_2(first,last,result)|. {\sc traits}: uses -// |Traits::Point_2|, |Traits::Less_signed_distance_to_line_2|, +// |Traits::Point_2|, |Traits::Compare_signed_distance_to_line_2|, // |Traits::Left_turn_2|, |Traits::Equal_2| and |Traits::Less_xy_2|. template OutputIterator diff --git a/thirdparty/CGAL/include/CGAL/ch_graham_andrew.h b/thirdparty/CGAL/include/CGAL/ch_graham_andrew.h index 95ee9b7e..19aac5c9 100644 --- a/thirdparty/CGAL/include/CGAL/ch_graham_andrew.h +++ b/thirdparty/CGAL/include/CGAL/ch_graham_andrew.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/ch_graham_andrew.h $ -// $Id: ch_graham_andrew.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/ch_graham_andrew.h $ +// $Id: include/CGAL/ch_graham_andrew.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/ch_jarvis.h b/thirdparty/CGAL/include/CGAL/ch_jarvis.h index 68b8623d..d917c5b2 100644 --- a/thirdparty/CGAL/include/CGAL/ch_jarvis.h +++ b/thirdparty/CGAL/include/CGAL/ch_jarvis.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/ch_jarvis.h $ -// $Id: ch_jarvis.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/ch_jarvis.h $ +// $Id: include/CGAL/ch_jarvis.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/ch_melkman.h b/thirdparty/CGAL/include/CGAL/ch_melkman.h index 2480e052..02a6aa7f 100644 --- a/thirdparty/CGAL/include/CGAL/ch_melkman.h +++ b/thirdparty/CGAL/include/CGAL/ch_melkman.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/ch_melkman.h $ -// $Id: ch_melkman.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/ch_melkman.h $ +// $Id: include/CGAL/ch_melkman.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/ch_selected_extreme_points_2.h b/thirdparty/CGAL/include/CGAL/ch_selected_extreme_points_2.h index 8662ccb8..d764a9bb 100644 --- a/thirdparty/CGAL/include/CGAL/ch_selected_extreme_points_2.h +++ b/thirdparty/CGAL/include/CGAL/ch_selected_extreme_points_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/ch_selected_extreme_points_2.h $ -// $Id: ch_selected_extreme_points_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/ch_selected_extreme_points_2.h $ +// $Id: include/CGAL/ch_selected_extreme_points_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/circulator.h b/thirdparty/CGAL/include/CGAL/circulator.h index 03822c4d..3fc3694e 100644 --- a/thirdparty/CGAL/include/CGAL/circulator.h +++ b/thirdparty/CGAL/include/CGAL/circulator.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circulator/include/CGAL/circulator.h $ -// $Id: circulator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circulator/include/CGAL/circulator.h $ +// $Id: include/CGAL/circulator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,8 +27,6 @@ #include #include -#include - // These are name redefinitions for backwards compatibility // with the pre iterator-traits style adaptors. @@ -193,45 +191,45 @@ template inline void Assert_circulator( const C &) { typedef typename Circulator_traits::category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert(std::is_convertible::value); } template inline void Assert_iterator( const I &) { typedef typename Circulator_traits::category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert(std::is_convertible::value); } template inline void Assert_input_category( const I &/*i*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert(std::is_convertible::value); } template inline void Assert_output_category( const I &/*i*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert(std::is_convertible::value); } template inline void Assert_forward_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert(std::is_convertible::value); } template inline void Assert_bidirectional_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert(std::is_convertible::value); } template inline void Assert_random_access_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert(std::is_convertible::value); } // The assert at-least-category functions use the following // functions to resolve properly. Note the proper order of the @@ -701,7 +699,13 @@ typedef Iterator_from_circulator< C, const_reference, const_pointer> template class Circulator_from_container { typedef Circulator_from_container Self; - typedef typename Container::iterator iterator; + typedef typename Container::iterator container_iterator; + typedef typename Container::const_iterator container_const_iterator; + typedef std::conditional_t< + std::is_const::value, + container_const_iterator, + container_iterator + > iterator; typedef std::iterator_traits iterator_traits; public: typedef typename iterator_traits::value_type value_type; diff --git a/thirdparty/CGAL/include/CGAL/circulator_bases.h b/thirdparty/CGAL/include/CGAL/circulator_bases.h index 41f24354..91231742 100644 --- a/thirdparty/CGAL/include/CGAL/circulator_bases.h +++ b/thirdparty/CGAL/include/CGAL/circulator_bases.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circulator/include/CGAL/circulator_bases.h $ -// $Id: circulator_bases.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circulator/include/CGAL/circulator_bases.h $ +// $Id: include/CGAL/circulator_bases.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -47,7 +47,7 @@ struct Random_access_circulator_tag }; template diff --git a/thirdparty/CGAL/include/CGAL/cluster_point_set.h b/thirdparty/CGAL/include/CGAL/cluster_point_set.h index ccf4eed3..bacf434a 100644 --- a/thirdparty/CGAL/include/CGAL/cluster_point_set.h +++ b/thirdparty/CGAL/include/CGAL/cluster_point_set.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/cluster_point_set.h $ -// $Id: cluster_point_set.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/cluster_point_set.h $ +// $Id: include/CGAL/cluster_point_set.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -145,8 +145,8 @@ std::size_t cluster_point_set (PointRange& points, typedef typename NP_helper::Geom_traits Kernel; typedef typename Point_set_processing_3::GetAdjacencies::type Adjacencies; - CGAL_static_assertion_msg(!(boost::is_same::type, - typename GetSvdTraits::NoTraits>::value), + static_assert(!(std::is_same::type, + typename GetSvdTraits::NoTraits>::value), "Error: no SVD traits"); PointMap point_map = NP_helper::get_point_map(points, np); @@ -169,7 +169,7 @@ std::size_t cluster_point_set (PointRange& points, // precondition: at least one element in the container. // to fix: should have at least three distinct points // but this is costly to check - CGAL_point_set_processing_precondition(points.begin() != points.end()); + CGAL_precondition(points.begin() != points.end()); // If no radius is given, init with 1% of bbox diagonal if (neighbor_radius < 0) diff --git a/thirdparty/CGAL/include/CGAL/compare_vertices.h b/thirdparty/CGAL/include/CGAL/compare_vertices.h index 9f4af557..a1f30aad 100644 --- a/thirdparty/CGAL/include/CGAL/compare_vertices.h +++ b/thirdparty/CGAL/include/CGAL/compare_vertices.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_2/include/CGAL/compare_vertices.h $ -// $Id: compare_vertices.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_2/include/CGAL/compare_vertices.h $ +// $Id: include/CGAL/compare_vertices.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/compute_average_spacing.h b/thirdparty/CGAL/include/CGAL/compute_average_spacing.h index 47ea3147..e951dd6c 100644 --- a/thirdparty/CGAL/include/CGAL/compute_average_spacing.h +++ b/thirdparty/CGAL/include/CGAL/compute_average_spacing.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/compute_average_spacing.h $ -// $Id: compute_average_spacing.h 10b0af3 2022-01-13T14:43:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/compute_average_spacing.h $ +// $Id: include/CGAL/compute_average_spacing.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Laurent Saboret @@ -22,7 +22,6 @@ #include #include #include -#include #include #include @@ -177,12 +176,12 @@ compute_average_spacing( // precondition: at least one element in the container. // to fix: should have at least three distinct points // but this is costly to check - CGAL_point_set_processing_precondition(points.begin() != points.end()); + CGAL_precondition(points.begin() != points.end()); // precondition: at least 2 nearest neighbors - CGAL_point_set_processing_precondition(k >= 2); + CGAL_precondition(k >= 2); - // Instanciate a KD-tree search. + // Instantiate a KD-tree search. Neighbor_query neighbor_query (points, point_map); // iterate over input points, compute and output normal diff --git a/thirdparty/CGAL/include/CGAL/compute_outer_frame_margin.h b/thirdparty/CGAL/include/CGAL/compute_outer_frame_margin.h index 8124fcea..6e093234 100644 --- a/thirdparty/CGAL/include/CGAL/compute_outer_frame_margin.h +++ b/thirdparty/CGAL/include/CGAL/compute_outer_frame_margin.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/compute_outer_frame_margin.h $ -// $Id: compute_outer_frame_margin.h 9051fc1 2020-10-08T22:54:11+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/compute_outer_frame_margin.h $ +// $Id: include/CGAL/compute_outer_frame_margin.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -17,16 +17,18 @@ #include #include -#include +#include #include #include namespace CGAL { -template -boost::optional< typename Traits::FT > compute_outer_frame_margin ( ForwardPointIterator aBegin +template +std::optional< typename Traits::FT > compute_outer_frame_margin ( ForwardPointIterator aBegin , ForwardPointIterator aEnd + , WeightIterator aWBegin + , WeightIterator CGAL_assertion_code(aWEnd) , typename Traits::FT aOffset , Traits const& aTraits ) @@ -44,16 +46,21 @@ boost::optional< typename Traits::FT > compute_outer_frame_margin ( ForwardPoint typename Kernel::Compute_squared_distance_2 squared_distance = kernel.compute_squared_distance_2_object(); typename Kernel::Construct_segment_2 construct_segment = kernel.construct_segment_2_object(); - typedef boost::optional OptionalPoint_2 ; + typedef std::optional OptionalPoint_2 ; + + CGAL_STSKEL_BUILDER_TRACE(2, "Computing outer frame margin..." ); FT lMaxSDist(0) ; + WeightIterator lWIt = aWBegin ; ForwardPointIterator lLast = std::prev(aEnd) ; bool lOverflow = false ; - for ( ForwardPointIterator lCurr = aBegin ; lCurr != aEnd ; ++ lCurr ) + for ( ForwardPointIterator lCurr = aBegin ; lCurr != aEnd ; ++ lCurr, ++ lWIt ) { + CGAL_assertion(lWIt != aWEnd); + ForwardPointIterator lPrev = ( lCurr == aBegin ? lLast : std::prev (lCurr) ) ; ForwardPointIterator lNext = ( lCurr == lLast ? aBegin : std::next (lCurr) ) ; @@ -62,7 +69,9 @@ boost::optional< typename Traits::FT > compute_outer_frame_margin ( ForwardPoint Segment_2 lLEdge = construct_segment(*lPrev,*lCurr); Segment_2 lREdge = construct_segment(*lCurr,*lNext); - OptionalPoint_2 lP = Construct_offset_point_2(aTraits)(aOffset,lLEdge,lREdge, Trisegment_2_ptr() ); + WeightIterator lNextWeight = ( lCurr == lLast ? aWBegin : std::next(lWIt) ) ; + + OptionalPoint_2 lP = aTraits.construct_offset_point_2_object()(aOffset,lLEdge,*lWIt,lREdge,*lNextWeight, Trisegment_2_ptr() ); if ( !lP ) { @@ -88,17 +97,36 @@ boost::optional< typename Traits::FT > compute_outer_frame_margin ( ForwardPoint if ( ! lOverflow ) { FT lDist = CGAL_SS_i::inexact_sqrt(lMaxSDist) ; + double approx = ceil( to_interval(lDist + ( aOffset * FT(1.05) ) ).second ); - return boost::optional( lDist + ( aOffset * FT(1.05) ) ) ; // Add a %5 gap + // Add a %5 gap, and ceil to get simpler values + CGAL_STSKEL_BUILDER_TRACE(4, "outer frame margin: " << approx ); + return std::optional ( approx ) ; } - else - return boost::optional(); + return std::nullopt; } -template -boost::optional compute_outer_frame_margin ( ForwardPointIterator aBegin, ForwardPointIterator aEnd, - FT aOffset ) + +// `Traits` first is to help overload resolution in the 3-argument version (see below) +template +std::optional< typename Traits::FT > compute_outer_frame_margin ( ForwardPointIterator aBegin + , ForwardPointIterator aEnd + , typename Traits::FT aOffset + , Traits const& aTraits + ) +{ + typedef typename Traits::FT FT ; + std::vector aUWeights(std::distance(aBegin,aEnd), FT(1)) ; + return compute_outer_frame_margin(aBegin,aEnd,aUWeights.begin(),aUWeights.end(),aOffset,aTraits) ; +} + +template +std::optional compute_outer_frame_margin(ForwardPointIterator aBegin, + ForwardPointIterator aEnd, + WeightIterator aWBegin, + WeightIterator aWEnd, + const FT aOffset) { typedef typename std::iterator_traits::value_type Point_2 ; @@ -106,12 +134,23 @@ boost::optional compute_outer_frame_margin ( ForwardPointIterator aBegin, Fo Polygon_offset_builder_traits_2 traits ; - return compute_outer_frame_margin(aBegin,aEnd,aOffset,traits); + return compute_outer_frame_margin(aBegin,aEnd,aWBegin,aWEnd,aOffset,traits); } -} // end namespace CGAL +template +std::optional compute_outer_frame_margin(ForwardPointIterator aBegin, + ForwardPointIterator aEnd, + const FT aOffset) +{ + typedef typename std::iterator_traits::value_type Point_2 ; + + typedef typename Kernel_traits::Kernel K; + typedef Polygon_offset_builder_traits_2 Builder_traits; + Builder_traits traits ; -#endif // CGAL_COMPUTE_OUTER_FRAME_MARGIN_H // -// EOF // + return compute_outer_frame_margin(aBegin,aEnd,aOffset,traits); +} +} // namespace CGAL +#endif // CGAL_COMPUTE_OUTER_FRAME_MARGIN_H diff --git a/thirdparty/CGAL/include/CGAL/config.h b/thirdparty/CGAL/include/CGAL/config.h index 4eebe166..5c259dd8 100644 --- a/thirdparty/CGAL/include/CGAL/config.h +++ b/thirdparty/CGAL/include/CGAL/config.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/config.h $ -// $Id: config.h 709f123 2022-05-13T17:22:43+02:00 Sebastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/config.h $ +// $Id: include/CGAL/config.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -36,11 +36,6 @@ # define WIN64 #endif -#ifdef _MSC_VER -#define _SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING 1 -#define _SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING 1 -#endif - #ifdef CGAL_INCLUDE_WINDOWS_DOT_H // Mimic users including this file which defines min max macros // and other names leading to name clashes @@ -52,7 +47,7 @@ #endif // CGAL_TEST_SUITE and NDEBUG // See [[Small features/Visual_Leak_Detector]] in CGAL developers wiki -// See also: http://vld.codeplex.com/ +// See also: https://kinddragon.github.io/vld/ #if defined(CGAL_ENABLE_VLD) # include #endif // CGAL_ENABLE_VLD @@ -112,22 +107,12 @@ #endif #endif -// Macro used by Boost Parameter. Mesh_3 needs at least 12, before the -// Boost Parameter headers are included: -// defines the value to 8, if it is not yet defined. -// The CGAL BGL properties mechanism includes -// , that includes -// , and maybe other Boost libraries may use -// Boost Parameter as well. -// That is why that is important to define that macro as early as possible, -// in -#define BOOST_PARAMETER_MAX_ARITY 12 - // The following header file defines among other things BOOST_PREVENT_MACRO_SUBSTITUTION #include #include #include +#include //----------------------------------------------------------------------// // platform specific workaround flags (CGAL_CFG_...) @@ -158,8 +143,8 @@ #endif // Same for C++17 -#if __cplusplus >= 201703L || _MSVC_LANG >= 201703L -# define CGAL_CXX17 1 +#if !(__cplusplus >= 201703L || _MSVC_LANG >= 201703L) +#error "CGAL requires C++ 17" #endif // Same for C++20 #if __cplusplus >= 202002L || _MSVC_LANG >= 202002L @@ -307,7 +292,7 @@ using std::max; // Macros to detect features of clang. We define them for the other // compilers. -// See http://clang.llvm.org/docs/LanguageExtensions.html +// See https://clang.llvm.org/docs/LanguageExtensions.html // See also https://en.cppreference.com/w/cpp/experimental/feature_test #ifndef __has_feature #define __has_feature(x) 0 // Compatibility with non-clang compilers. @@ -357,7 +342,10 @@ using std::max; #define CGAL_NORETURN [[noreturn]] // Macro to specify [[no_unique_address]] if supported -#if __has_cpp_attribute(no_unique_address) +#if _MSC_VER >= 1929 && _MSVC_LANG >= 202002L +// see https://devblogs.microsoft.com/cppblog/msvc-cpp20-and-the-std-cpp20-switch/#c20-no_unique_address +# define CGAL_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]] +#elif __has_cpp_attribute(no_unique_address) # define CGAL_NO_UNIQUE_ADDRESS [[no_unique_address]] #else # define CGAL_NO_UNIQUE_ADDRESS @@ -484,7 +472,7 @@ namespace cpp11{ // The fallthrough attribute // See for clang: -// http://clang.llvm.org/docs/AttributeReference.html#statement-attributes +// https://clang.llvm.org/docs/AttributeReference.html#statement-attributes // See for gcc: // https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html #if __cplusplus > 201402L && __has_cpp_attribute(fallthrough) @@ -499,12 +487,6 @@ namespace cpp11{ # define CGAL_FALLTHROUGH while(false){} #endif -#if CGAL_CXX17 -# define CGAL_CPP17_INLINE inline -#else -# define CGAL_CPP17_INLINE -#endif - #ifndef CGAL_NO_ASSERTIONS # define CGAL_NO_ASSERTIONS_BOOL false #else @@ -560,7 +542,7 @@ namespace cpp11{ namespace CGAL { // Returns filename prefixed by the directory of CGAL containing data. -// This directory is either defined in the environement variable CGAL_DATA_DIR, +// This directory is either defined in the environment variable CGAL_DATA_DIR, // otherwise it is taken from the constant CGAL_DATA_DIR (defined in CMake), // otherwise it is empty (and thus returns filename unmodified). inline std::string data_file_path(const std::string& filename) @@ -608,4 +590,61 @@ inline std::string data_file_path(const std::string& filename) } // end namespace CGAL + +#if BOOST_VERSION < 107900 + +// Workaround for an accidental enable if of Eigen::Matrix in the +// boost::multiprecision::cpp_int constructor for some versions of +// boost + +namespace Eigen{ + template + class Matrix; + template + class Ref; + + template + class Product; + + template class CwiseBinaryOp; + +} + +namespace boost { + namespace multiprecision { + namespace detail { + template + struct is_byte_container; + + + template + struct is_byte_container< Eigen::Matrix> + { + static const bool value = false; + }; + + template + struct is_byte_container< Eigen::Ref> + { + static const bool value = false; + }; + + template + struct is_byte_container< Eigen::Product> + { + static const bool value = false; + }; + + template + struct is_byte_container< Eigen::CwiseBinaryOp> + { + static const bool value = false; + }; + + } + } +} + +#endif // BOOST_VERSION < 107900 + #endif // CGAL_CONFIG_H diff --git a/thirdparty/CGAL/include/CGAL/connect_holes.h b/thirdparty/CGAL/include/CGAL/connect_holes.h index 9b552d70..f1e3a3a3 100644 --- a/thirdparty/CGAL/include/CGAL/connect_holes.h +++ b/thirdparty/CGAL/include/CGAL/connect_holes.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/connect_holes.h $ -// $Id: connect_holes.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/connect_holes.h $ +// $Id: include/CGAL/connect_holes.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein @@ -114,7 +114,7 @@ OutputIterator connect_holes(const Polygon_with_holes_2second.second)) { // v_top lies below the interior of the hafledge he_above: - // Find the intersection of this halfegde with a vertical ray + // Find the intersection of this halfedge with a vertical ray // emanating from v_top. he_above = arr.non_const_handle (he); @@ -329,7 +329,7 @@ OutputIterator connect_holes(const Polygon_with_holes_2target() to keep looking for a hole that hasn't been traversed. we do not insert the target to the output set to avoid duplication with cases 2 and 3*/ diff --git a/thirdparty/CGAL/include/CGAL/constant.h b/thirdparty/CGAL/include/CGAL/constant.h index 5e767ee6..e568082e 100644 --- a/thirdparty/CGAL/include/CGAL/constant.h +++ b/thirdparty/CGAL/include/CGAL/constant.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/constant.h $ -// $Id: constant.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/constant.h $ +// $Id: include/CGAL/constant.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/constructions/Polygon_offset_cons_ftC2.h b/thirdparty/CGAL/include/CGAL/constructions/Polygon_offset_cons_ftC2.h index 695bbbc0..39a3988f 100644 --- a/thirdparty/CGAL/include/CGAL/constructions/Polygon_offset_cons_ftC2.h +++ b/thirdparty/CGAL/include/CGAL/constructions/Polygon_offset_cons_ftC2.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/constructions/Polygon_offset_cons_ftC2.h $ -// $Id: Polygon_offset_cons_ftC2.h 13f19c4 2020-10-07T19:28:54+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/constructions/Polygon_offset_cons_ftC2.h $ +// $Id: include/CGAL/constructions/Polygon_offset_cons_ftC2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -15,8 +15,7 @@ #include -#include -#include +#include namespace CGAL { @@ -31,27 +30,33 @@ namespace CGAL_SS_i { // // POSTCONDITION: In case of overflow an empty optional is returned. // -template -boost::optional< Point_2 > construct_offset_pointC2 ( typename K::FT const& t, - Segment_2_with_ID const& e0, - Segment_2_with_ID const& e1, - boost::intrusive_ptr< Trisegment_2 > > const& tri, - CoeffCache& aCoeff_cache) +template +std::optional< typename K::Point_2 > +construct_offset_pointC2 ( typename K::FT const& t, + Segment_2_with_ID const& e0, + typename K::FT const& w0, + Segment_2_with_ID const& e1, + typename K::FT const& w1, + Trisegment_2_ptr< Trisegment_2 > > const& tri, + Caches& aCaches) { typedef typename K::FT FT ; - typedef Point_2 Point_2 ; - typedef Line_2 Line_2 ; + typedef typename K::Point_2 Point_2 ; + typedef typename K::Line_2 Line_2 ; - typedef boost::optional Optional_point_2 ; - typedef boost::optional Optional_line_2 ; + typedef std::optional Optional_point_2 ; + typedef std::optional Optional_line_2 ; FT x(0.0),y(0.0) ; - CGAL_STSKEL_TRAITS_TRACE("Constructing offset point for t=" << t << " e0=" << s2str(e0) << " e1=" << s2str(e1) << " tri=" << tri ) ; + CGAL_STSKEL_TRAITS_TRACE("Constructing offset point for t=" << t ) ; + CGAL_STSKEL_TRAITS_TRACE("Edges e0=" << s2str(e0) << "w = " << w0 ) ; + CGAL_STSKEL_TRAITS_TRACE(" e1=" << s2str(e1) << "w = " << w1 ) ; + CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri); - Optional_line_2 l0 = compute_normalized_line_ceoffC2(e0, aCoeff_cache) ; - Optional_line_2 l1 = compute_normalized_line_ceoffC2(e1, aCoeff_cache) ; + Optional_line_2 l0 = compute_normalized_line_coeffC2(e0, aCaches) ; + Optional_line_2 l1 = compute_normalized_line_coeffC2(e1, aCaches) ; bool ok = false ; @@ -63,8 +68,8 @@ boost::optional< Point_2 > construct_offset_pointC2 ( typename K::FT const& t { if ( ! CGAL_NTS is_zero(den) ) { - FT numX = t * l1->b() - t * l0->b() + l0->b() * l1->c() - l1->b() * l0->c() ; - FT numY = t * l1->a() - t * l0->a() + l0->a() * l1->c() - l1->a() * l0->c() ; + FT numX = t * l1->b() / w0 - t * l0->b() / w1 + l0->b() * l1->c() - l1->b() * l0->c() ; + FT numY = t * l1->a() / w0 - t * l0->a() / w1 + l0->a() * l1->c() - l1->a() * l0->c() ; x = -numX / den ; y = numY / den ; @@ -75,7 +80,7 @@ boost::optional< Point_2 > construct_offset_pointC2 ( typename K::FT const& t { CGAL_STSKEL_TRAITS_TRACE(" DEGENERATE case: Collinear segments involved. Seed event " << ( !tri ? " ABSENT" : " exists." ) ) ; - Optional_point_2 q = tri ? construct_offset_lines_isecC2(tri, aCoeff_cache) + Optional_point_2 q = tri ? construct_offset_lines_isecC2(tri, aCaches) : compute_oriented_midpoint(e0,e1) ; if ( q ) @@ -87,8 +92,11 @@ boost::optional< Point_2 > construct_offset_pointC2 ( typename K::FT const& t CGAL_STSKEL_TRAITS_TRACE(" Projected seed point: (" << px << "," << py << ")" ) ; - x = px + l0->a() * t ; - y = py + l0->b() * t ; + // When reformulating the progression of the front using the line orthogonal + // to the input segment, the speed (weight) becomes inverted: a large weight + // in the coefficients of the line means the front moves slower + x = px + t * l0->a() / w0 ; + y = py + t * l0->b() / w0 ; ok = CGAL_NTS is_finite(x) && CGAL_NTS is_finite(y) ; } diff --git a/thirdparty/CGAL/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h b/thirdparty/CGAL/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h index d94696ce..24ad8592 100644 --- a/thirdparty/CGAL/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h +++ b/thirdparty/CGAL/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h $ -// $Id: Straight_skeleton_cons_ftC2.h e2f1940 2023-01-04T16:17:15+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h $ +// $Id: include/CGAL/constructions/Straight_skeleton_cons_ftC2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -18,8 +18,9 @@ #include #include #include +#include -#include +#include #include @@ -27,36 +28,47 @@ namespace CGAL { namespace CGAL_SS_i { -template -bool are_edges_collinear( Segment_2_with_ID const& e0, Segment_2_with_ID const& e1 ) +template +bool are_edges_collinear( S const& e0, S const& e1 ) { return ((e1.source() == e0.source()) || (e1.source() == e0.target()) || collinear(e0.source(),e0.target(),e1.source())) && ( (e1.target() == e0.source()) || (e1.target() == e0.target()) || (collinear(e0.source(),e0.target(),e1.target()))) ; } -template +template inline -bool are_parallel_edges_equally_oriented( Segment_2_with_ID const& e0, Segment_2_with_ID const& e1 ) +bool are_parallel_edges_equally_oriented( S const& e0, S const& e1 ) { return angle(e0.source(), e0.target(), e1.source(), e1.target()) == ACUTE; } -template -bool are_edges_orderly_collinear( Segment_2_with_ID const& e0, Segment_2_with_ID const& e1 ) +template +bool are_edges_orderly_collinear( S const& e0, S const& e1 ) { return are_edges_collinear(e0,e1) && are_parallel_edges_equally_oriented(e0,e1); } -template -Trisegment_collinearity trisegment_collinearity_no_exact_constructions ( Segment_2_with_ID const& e0 - , Segment_2_with_ID const& e1 - , Segment_2_with_ID const& e2) +template +Trisegment_collinearity trisegment_collinearity_no_exact_constructions(const Segment_2_with_ID& e0, + const Segment_2_with_ID& e1, + const Segment_2_with_ID& e2, + Caches& caches ) { - bool is_01 = are_edges_orderly_collinear(e0,e1); - bool is_02 = are_edges_orderly_collinear(e0,e2); - bool is_12 = are_edges_orderly_collinear(e1,e2); + // 'are_edges_orderly_collinear()' is used to harmonize coefficients, but if the kernel is inexact + // we could also have that are_edges_orderly_collinear() returns false, but the computed coefficients + // are identical. In that case, we want to return that there is a collinearity, otherwise the internal + // computations (even the exact ones) will fail. + std::optional l0 = compute_normalized_line_coeffC2(e0, caches); + std::optional l1 = compute_normalized_line_coeffC2(e1, caches); + std::optional l2 = compute_normalized_line_coeffC2(e2, caches); + + bool is_01 = (l0->a() == l1->a()) && (l0->b() == l1->b()) && (l0->c() == l1->c()); + bool is_02 = (l0->a() == l2->a()) && (l0->b() == l2->b()) && (l0->c() == l2->c()); + bool is_12 = (l1->a() == l2->a()) && (l1->b() == l2->b()) && (l1->c() == l2->c()); + + CGAL_STSKEL_TRAITS_TRACE("coeff equalities: " << is_01 << " " << is_02 << " " << is_12) if ( is_01 & !is_02 & !is_12 ) return TRISEGMENT_COLLINEARITY_01; @@ -70,54 +82,70 @@ Trisegment_collinearity trisegment_collinearity_no_exact_constructions ( Segment return TRISEGMENT_COLLINEARITY_ALL; } -template -inline NT inexact_sqrt_implementation( NT const& n, CGAL::Null_functor /*no_sqrt*/ ) +/// + +// Attempted to use std::hypot (https://github.com/CGAL/cgal/commit/a1845691d5d8055978662cd95059c6d3f94c17a2) +// but did not notice any gain, and even observed some regressions in the tests. + +template +typename Coercion_traits::Type +inexact_sqrt_implementation(const NT& n, CGAL::Null_functor) { typedef CGAL::Interval_nt IFT; typename IFT::Protector protector; CGAL::NT_converter to_ift; - return NT( to_double(sqrt(to_ift(n))) ); + IFT sqrt_ift = sqrt(to_ift(n)); + CGAL_STSKEL_TRAITS_TRACE("sqrt's interval " << sqrt_ift.inf() << " " << sqrt_ift.sup() ) ; + CGAL_STSKEL_TRAITS_TRACE("interval delta " << sqrt_ift.sup() - sqrt_ift.inf() ) ; + + return NT(to_double(sqrt_ift)); } -template -inline NT inexact_sqrt_implementation( NT const& n, Sqrt sqrt_f ) +template +typename Sqrt::result_type +inexact_sqrt_implementation(const NT& nt, Sqrt sqrt) { - return sqrt_f(n); + CGAL_STSKEL_TRAITS_TRACE("sqrt(" << typeid(NT).name() << ")"); + return sqrt(nt); } -template -inline NT inexact_sqrt( NT const& n ) +template +decltype(auto) inexact_sqrt(const NT& nt) { + // the initial version of this function was using Algebraic_category + // for the dispatch but some ring type (like Gmpz) provides a Sqrt + // functor even if not being Field_with_sqrt. typedef CGAL::Algebraic_structure_traits AST; typedef typename AST::Sqrt Sqrt; - return inexact_sqrt_implementation(n,Sqrt()); + return inexact_sqrt_implementation(nt, Sqrt()); } -inline Quotient inexact_sqrt( Quotient const& q ) +template +Quotient +inexact_sqrt(const Quotient& q) { - CGAL_precondition(q > 0); - return Quotient(CGAL_SS_i::inexact_sqrt(q.numerator()*q.denominator()), q.denominator() ); + return { inexact_sqrt(q.numerator()*q.denominator()), abs(q.denominator()) }; } -template -inline Lazy_exact_nt inexact_sqrt( Lazy_exact_nt const& lz) +template +Lazy_exact_nt +inexact_sqrt(const Lazy_exact_nt& lz) { - return inexact_sqrt( exact(lz) ); + return inexact_sqrt(exact(lz)); } - -// Given an oriented 2D straight line segment 'e', computes the normalized coefficients (a,b,c) of the -// supporting line. -// POSTCONDITION: [a,b] is the leftward normal _unit_ (a²+b²=1) vector. +// Given an oriented 2D straight line segment 'e', computes the normalized coefficients (a,b,c) +// of the supporting line, and weights them with 'aWeight'. +// +// POSTCONDITION: [a,b] is the leftward normal vector. // POSTCONDITION: In case of overflow, an empty optional<> is returned. template -boost::optional< Line_2 > compute_normalized_line_ceoffC2( Segment_2 const& e ) +std::optional< typename K::Line_2> compute_normalized_line_coeffC2( Segment_2 const& e ) { - bool finite = true ; - typedef typename K::FT FT ; + bool finite = true ; FT a(0), b(0), c(0) ; if(e.source().y() == e.target().y()) @@ -139,10 +167,7 @@ boost::optional< Line_2 > compute_normalized_line_ceoffC2( Segment_2 const c = e.source().y(); } - CGAL_STSKEL_TRAITS_TRACE("Line coefficients for HORIZONTAL line:\n" - << s2str(e) - << "\na="<< n2str(a) << ", b=" << n2str(b) << ", c=" << n2str(c) - ) ; + CGAL_STSKEL_TRAITS_TRACE("HORIZONTAL line; a="<< n2str(a) << ", b=" << n2str(b) << ", c=" << n2str(c) ) ; } else if(e.target().x() == e.source().x()) { @@ -163,34 +188,30 @@ boost::optional< Line_2 > compute_normalized_line_ceoffC2( Segment_2 const c = -e.source().x(); } - CGAL_STSKEL_TRAITS_TRACE("Line coefficients for VERTICAL line:\n" - << s2str(e) - << "\na="<< n2str(a) << ", b=" << n2str(b) << ", c=" << n2str(c) - ) ; + CGAL_STSKEL_TRAITS_TRACE("VERTICAL line; a="<< n2str(a) << ", b=" << n2str(b) << ", c=" << n2str(c) ) ; } else { FT sa = e.source().y() - e.target().y(); FT sb = e.target().x() - e.source().x(); - FT l2 = (sa*sa) + (sb*sb) ; + FT l2 = square(sa) + square(sb) ; if ( CGAL_NTS is_finite(l2) ) { - FT l = CGAL_SS_i :: inexact_sqrt(l2); - + FT l = CGAL_SS_i::inexact_sqrt(l2); a = sa / l ; b = sb / l ; c = -e.source().x()*a - e.source().y()*b; - CGAL_STSKEL_TRAITS_TRACE("Line coefficients for line:\n" - << s2str(e) - << "\nsa="<< n2str(sa) << "\nsb=" << n2str(sb) << "\nl2=" << n2str(l2) << "\nl=" << n2str(l) - << "\na="<< n2str(a) << "\nb=" << n2str(b) << "\nc=" << n2str(c) - ) ; + CGAL_STSKEL_TRAITS_TRACE("GENERIC line;\nsa="<< n2str(sa) << "\nsb=" << n2str(sb) + << "\nnorm²=" << n2str(l2) << "\nnorm=" << n2str(l) + << "\na="<< n2str(a) << "\nb=" << n2str(b) << "\nc=" << n2str(c) ) ; + } + else + { + finite = false ; } - else finite = false ; - } if ( finite ) @@ -200,20 +221,64 @@ boost::optional< Line_2 > compute_normalized_line_ceoffC2( Segment_2 const return cgal_make_optional( finite, K().construct_line_2_object()(a,b,c) ) ; } -template -boost::optional< Line_2 > compute_normalized_line_ceoffC2( Segment_2_with_ID const& e, - CoeffCache& aCoeff_cache ) +template +std::optional< typename K::Line_2> compute_normalized_line_coeffC2(const Segment_2_with_ID& e) +{ + typedef typename K::Segment_2 Segment_2 ; + + CGAL_STSKEL_TRAITS_TRACE("\n~~ Unweighted line coefficients for E" << e.id() << " [" << typeid(typename K::FT).name() << "]" ); + + return compute_normalized_line_coeffC2(static_cast(e)); +} + +template +std::optional< typename K::Line_2 > +compute_normalized_line_coeffC2( Segment_2_with_ID const& e, + Caches& aCaches ) { - if ( aCoeff_cache.IsCached(e.mID) ) - return aCoeff_cache.Get(e.mID) ; + typedef typename K::Line_2 Line_2 ; - boost::optional< Line_2 > rRes = compute_normalized_line_ceoffC2 ( static_cast const&>(e) ) ; + if(aCaches.mCoeff_cache.IsCached(e.mID) ) + return aCaches.mCoeff_cache.Get(e.mID) ; - aCoeff_cache.Set(e.mID, rRes) ; + std::optional< Line_2 > rRes = compute_normalized_line_coeffC2 ( e ) ; + + aCaches.mCoeff_cache.Set(e.mID, rRes) ; return rRes ; } +// @todo weightless coefficients are stored because we use them sometimes weighted, and sometimes +// inversely weighted (filtering bound). Should we store them weighted also for speed reasons? +template +std::optional< typename K::Line_2 > compute_weighted_line_coeffC2( Segment_2_with_ID const& e, + typename K::FT const& aWeight, + Caches& aCaches ) +{ + typedef typename K::FT FT ; + typedef typename K::Line_2 Line_2 ; + + CGAL_precondition( CGAL_NTS is_finite(aWeight) && CGAL_NTS is_positive(aWeight) ) ; + + std::optional< Line_2 > l = compute_normalized_line_coeffC2(e, aCaches); + if( ! l ) + return std::nullopt ; + + FT a = l->a() * aWeight ; + FT b = l->b() * aWeight ; + FT c = l->c() * aWeight ; + + CGAL_STSKEL_TRAITS_TRACE("\n~~ Weighted line coefficients for E" << e.id() << " " << s2str(e) + << "\nweight=" << n2str(aWeight) + << "\na="<< n2str(a) << "\nb=" << n2str(b) << "\nc=" << n2str(c) + ) ; + + if ( !CGAL_NTS is_finite(a) || !CGAL_NTS is_finite(b) || !CGAL_NTS is_finite(c) ) + return std::nullopt; + + return cgal_make_optional( K().construct_line_2_object()(a,b,c) ) ; +} + template Rational squared_distance_from_point_to_lineC2( FT const& px, FT const& py, FT const& sx, FT const& sy, FT const& tx, FT const& ty ) { @@ -233,19 +298,26 @@ Rational squared_distance_from_point_to_lineC2( FT const& px, FT const& py, // // NOTE: If the collinearity cannot be determined reliably, a null trisegment is returned. // -template -boost::intrusive_ptr< Trisegment_2 > > +template +Trisegment_2_ptr< Trisegment_2 > > construct_trisegment ( Segment_2_with_ID const& e0, + typename K::FT const& w0, Segment_2_with_ID const& e1, + typename K::FT const& w1, Segment_2_with_ID const& e2, - std::size_t id ) + typename K::FT const& w2, + std::size_t id, + Caches& aCaches ) { typedef Trisegment_2 >Trisegment_2 ; typedef typename Trisegment_2::Self_ptr Trisegment_2_ptr ; - Trisegment_collinearity lCollinearity = trisegment_collinearity_no_exact_constructions(e0,e1,e2); + CGAL_STSKEL_TRAITS_TRACE("\n~~ Construct trisegment [" << typeid(typename K::FT).name() << "]"); + CGAL_STSKEL_TRAITS_TRACE("Segments E" << e0.id() << " E" << e1.id() << " E" << e2.id()); + + Trisegment_collinearity lCollinearity = trisegment_collinearity_no_exact_constructions(e0,e1,e2,aCaches); - return Trisegment_2_ptr( new Trisegment_2(e0, e1, e2, lCollinearity, id) ) ; + return Trisegment_2_ptr( new Trisegment_2(e0, w0, e1, w1, e2, w2, lCollinearity, id) ) ; } // Given 3 oriented straight line segments: e0, e1, e2 @@ -254,9 +326,9 @@ construct_trisegment ( Segment_2_with_ID const& e0, // If the lines intersect to the left, the returned distance is positive. // If the lines intersect to the right, the returned distance is negative. // If the lines do not intersect, for example, for collinear edges, or parallel edges but with the same orientation, -// returns 0 (the actual distance is undefined in this case, but 0 is a usefull return) +// returns 0 (the actual distance is undefined in this case, but 0 is a useful return) // -// NOTE: The result is a explicit rational number returned as a tuple (num,den); the caller must check that den!=0 manually +// NOTE: The result is an explicit rational number returned as a tuple (num,den); the caller must check that den!=0 manually // (a predicate for instance should return indeterminate in this case) // // PRECONDITION: None of e0, e1 and e2 are collinear (but two of them can be parallel) @@ -265,20 +337,20 @@ construct_trisegment ( Segment_2_with_ID const& e0, // // NOTE: The segments (e0,e1,e2) are stored in the argument as the trisegment st.event() // -template -boost::optional< Rational< typename K::FT> > -compute_normal_offset_lines_isec_timeC2 ( boost::intrusive_ptr< Trisegment_2 > > const& tri, - CoeffCache& aCoeff_cache ) +template +std::optional< Rational< typename K::FT> > +compute_normal_offset_lines_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, + Caches& aCaches ) { typedef typename K::FT FT ; + typedef typename K::Line_2 Line_2 ; - typedef Line_2 Line_2 ; + typedef std::optional Optional_line_2 ; - typedef boost::optional Optional_line_2 ; + CGAL_STSKEL_TRAITS_TRACE("\n~~ Computing normal offset lines isec time [" << typeid(FT).name() << "]") ; + CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri); - CGAL_STSKEL_TRAITS_TRACE("Computing normal offset lines isec time for: " << tri ) ; - - FT num(0.0), den(0.0) ; + FT num(0), den(0) ; // DETAILS: // @@ -291,18 +363,30 @@ compute_normal_offset_lines_isec_timeC2 ( boost::intrusive_ptr< Trisegment_2e0(), aCoeff_cache) ; - Optional_line_2 l1 = compute_normalized_line_ceoffC2(tri->e1(), aCoeff_cache) ; - Optional_line_2 l2 = compute_normalized_line_ceoffC2(tri->e2(), aCoeff_cache) ; + Optional_line_2 l0 = compute_weighted_line_coeffC2(tri->e0(), tri->w0(), aCaches) ; + Optional_line_2 l1 = compute_weighted_line_coeffC2(tri->e1(), tri->w1(), aCaches) ; + Optional_line_2 l2 = compute_weighted_line_coeffC2(tri->e2(), tri->w2(), aCaches) ; if ( l0 && l1 && l2 ) { + CGAL_STSKEL_TRAITS_TRACE("coeffs E" << tri->e0().id() << " [" << n2str(l0->a()) << "; " << n2str(l0->b()) << "; " << n2str(l0->c()) << "]" + << "\ncoeffs E" << tri->e1().id() << " [" << n2str(l1->a()) << "; " << n2str(l1->b()) << "; " << n2str(l1->c()) << "]" + << "\ncoeffs E" << tri->e2().id() << " [" << n2str(l2->a()) << "; " << n2str(l2->b()) << "; " << n2str(l2->c()) << "]") ; + num = (l2->a()*l0->b()*l1->c()) -(l2->a()*l1->b()*l0->c()) -(l2->b()*l0->a()*l1->c()) @@ -332,29 +416,36 @@ compute_normal_offset_lines_isec_timeC2 ( boost::intrusive_ptr< Trisegment_2 -boost::optional< Point_2 > compute_oriented_midpoint ( Segment_2_with_ID const& e0, - Segment_2_with_ID const& e1 ) +std::optional< typename K::Point_2 > +compute_oriented_midpoint ( Segment_2_with_ID const& e0, + Segment_2_with_ID const& e1 ) { - bool ok = false ; - typedef typename K::FT FT ; + CGAL_STSKEL_TRAITS_TRACE("Computing oriented midpoint between:" + << "\ne0: " << s2str(e0) + << "\ne1: " << s2str(e1) + ); + FT delta01 = CGAL::squared_distance(e0.target(),e1.source()); + if( CGAL_NTS is_finite(delta01) && CGAL_NTS is_zero(delta01)) + return cgal_make_optional(e0.target()); + FT delta10 = CGAL::squared_distance(e1.target(),e0.source()); + if( CGAL_NTS is_finite(delta10) && CGAL_NTS is_zero(delta10)) + return cgal_make_optional(e1.target()); - Point_2 mp ; + bool ok = false ; + typename K::Point_2 mp ; if ( CGAL_NTS is_finite(delta01) && CGAL_NTS is_finite(delta10) ) { if ( delta01 <= delta10 ) - mp = CGAL::midpoint(e0.target(),e1.source()); - else mp = CGAL::midpoint(e1.target(),e0.source()); + mp = CGAL::midpoint(e0.target(),e1.source()); + else + mp = CGAL::midpoint(e1.target(),e0.source()); - CGAL_STSKEL_TRAITS_TRACE("Computing oriented midpoint between:" - << "\ne0: " << s2str(e0) - << "\ne1: " << s2str(e1) - << "\nmp=" << p2str(mp) - ); + CGAL_STSKEL_TRAITS_TRACE("\nmp=" << p2str(mp) ); ok = CGAL_NTS is_finite(mp.x()) && CGAL_NTS is_finite(mp.y()); } @@ -364,7 +455,7 @@ boost::optional< Point_2 > compute_oriented_midpoint ( Segment_2_with_ID c // -// Given 3 oriented straight line segments: e0, e1, e2 and the corresponding offseted segments: e0*, e1* and e2*, +// Given 3 oriented straight line segments: e0, e1, e2 and the corresponding offsetted segments: e0*, e1* and e2*, // returns the point of the left or right seed (offset vertex) (e0*,e1*) or (e1*,e2*) // // If the current event (defined by e0,e1,e2) is a propagated event, that is, it follows from a previous event, @@ -375,7 +466,7 @@ boost::optional< Point_2 > compute_oriented_midpoint ( Segment_2_with_ID c // That trisegment is exactly the trisegment tree that defined the previous event which produced the skeleton node // (so the trisegment tree is basically a lazy representation of the seed point). // -// If a seed is a contour vertex, its point is then simply the target endoint of e0 or e1 (for the left/right seed). +// If a seed is a contour vertex, its point is then simply the target endpoint of e0 or e1 (for the left/right seed). // // This method returns the specified seed point (left or right) // @@ -387,16 +478,16 @@ boost::optional< Point_2 > compute_oriented_midpoint ( Segment_2_with_ID c // // NOTE: There is an abnormal collinearity case which occurs when e0 and e2 are collinear. // In this case, these lines do not correspond to an offset vertex (because e0* and e2* are never consecutive before the event), -// so the degenerate seed is neither the left or the right seed. In this case, the SEED ID for the degenerate pseudo seed is UNKOWN. +// so the degenerate seed is neither the left or the right seed. In this case, the SEED ID for the degenerate pseudo seed is UNKNOWN. // If you request the point of such degenerate pseudo seed the oriented midpoint between e0 and e2 is returned. // -template -boost::optional< Point_2 > -compute_seed_pointC2 ( boost::intrusive_ptr< Trisegment_2 > > const& tri, +template +std::optional< typename K::Point_2 > +compute_seed_pointC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, typename Trisegment_2 >::SEED_ID sid, - CoeffCache& aCoeff_cache) + Caches& aCaches) { - boost::optional< Point_2 > p ; + std::optional< typename K::Point_2 > p ; typedef Trisegment_2 > Trisegment_2 ; @@ -404,19 +495,19 @@ compute_seed_pointC2 ( boost::intrusive_ptr< Trisegment_2child_l() ? construct_offset_lines_isecC2(tri->child_l(), aCoeff_cache) // this can recurse + p = tri->child_l() ? construct_offset_lines_isecC2(tri->child_l(), aCaches) // this can recurse : compute_oriented_midpoint(tri->e0(),tri->e1()) ; break ; case Trisegment_2::RIGHT : - p = tri->child_r() ? construct_offset_lines_isecC2(tri->child_r(), aCoeff_cache) // this can recurse + p = tri->child_r() ? construct_offset_lines_isecC2(tri->child_r(), aCaches) // this can recurse : compute_oriented_midpoint(tri->e1(),tri->e2()) ; break ; case Trisegment_2::THIRD : - p = tri->child_t() ? construct_offset_lines_isecC2(tri->child_t(), aCoeff_cache) // this can recurse + p = tri->child_t() ? construct_offset_lines_isecC2(tri->child_t(), aCaches) // this can recurse : compute_oriented_midpoint(tri->e0(),tri->e2()) ; break ; @@ -429,38 +520,105 @@ compute_seed_pointC2 ( boost::intrusive_ptr< Trisegment_2 -boost::optional< Point_2 > -compute_degenerate_seed_pointC2 ( boost::intrusive_ptr< Trisegment_2 > > const& tri, - CoeffCache& aCoeff_cache ) +template +std::optional< typename K::Point_2 > +construct_degenerate_seed_pointC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, + Caches& aCaches ) +{ + return compute_seed_pointC2( tri, tri->degenerate_seed_id(), aCaches ) ; +} + +template +std::optional< Rational< typename K::FT> > +compute_artifical_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, + Caches& aCaches ) { - return compute_seed_pointC2( tri, tri->degenerate_seed_id(), aCoeff_cache ) ; + typedef typename K::Boolean Boolean ; + typedef typename K::FT FT ; + typedef typename K::Point_2 Point_2 ; + typedef typename K::Segment_2 Segment_2 ; + typedef typename K::Line_2 Line_2 ; + typedef typename K::Direction_2 Direction_2 ; + typedef typename K::Ray_2 Ray_2 ; + + typedef std::optional Optional_line_2 ; + + CGAL_STSKEL_TRAITS_TRACE("\n~~ Computing artificial isec time [" << typeid(FT).name() << "]"); + CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri); + + CGAL_precondition(tri->e0() == tri->e1()); + CGAL_precondition(bool(tri->child_l())); + + Optional_line_2 l0 = compute_weighted_line_coeffC2(tri->e0(), tri->w0(), aCaches) ; + if( !l0 ) + return std::nullopt; + + const Segment_2& contour_seg = tri->e0(); + Direction_2 perp_dir ( contour_seg.source().y() - contour_seg.target().y() , + contour_seg.target().x() - contour_seg.source().x() ) ; + std::optional< typename K::Point_2 > seed = construct_offset_lines_isecC2(tri->child_l(), aCaches ) ; + + if(!seed) + return std::nullopt; + + const Ray_2 ray(*seed, perp_dir); + const Segment_2& opp_seg = tri->e2(); + Boolean inter_exist = K().do_intersect_2_object()(ray, opp_seg); + if (!inter_exist) // no intersection + return cgal_make_optional(Rational(FT(0),FT(0))) ; // does not exist + + // Compute the intersection point and evalute the time from the line equation of the contour edge + auto inter_res = K().intersect_2_object()(ray, opp_seg); + + FT t; + + if(const Segment_2* seg = std::get_if(&*inter_res)) + { + // get the segment extremity closest to the seed + Boolean res = (K().compare_distance_2_object()(*seed, seg->source(), seg->target()) == CGAL::SMALLER); + t = res ? l0->a() * seg->source().x() + l0->b() * seg->source().y() + l0->c() + : l0->a() * seg->target().x() + l0->b() * seg->target().y() + l0->c(); + } + else + { + const Point_2* inter_pt = std::get_if(&*inter_res); + if(!CGAL_NTS is_finite(inter_pt->x()) || !CGAL_NTS is_finite(inter_pt->y())) + return std::nullopt; + t = l0->a() * inter_pt->x() + l0->b() * inter_pt->y() + l0->c() ; + } + + bool ok = CGAL_NTS is_finite(t); + return cgal_make_optional(ok, Rational(t, FT(1))) ; } // Given 3 oriented straight line segments: e0, e1, e2 -// such that two and only two of these edges are collinear, not neccesarily consecutive but with the same orientaton; +// such that two and only two of these edges are collinear, not necessarily consecutive but with the same orientaton; // returns the OFFSET DISTANCE (n/d) at which a line perpendicular to the collinear edge passing through // the degenerate seed point intersects the offset line of the non collinear edge // -// NOTE: The result is a explicit rational number returned as a tuple (num,den); the caller must check that den!=0 manually +// NOTE: The result is an explicit rational number returned as a tuple (num,den); the caller must check that den!=0 manually // (a predicate for instance should return indeterminate in this case) // // POSTCONDITION: In case of overflow an empty optional is returned. // -template -boost::optional< Rational< typename K::FT> > -compute_degenerate_offset_lines_isec_timeC2 ( boost::intrusive_ptr< Trisegment_2 > > const& tri, - CoeffCache& aCoeff_cache ) +template +std::optional< Rational< typename K::FT> > +compute_degenerate_offset_lines_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, + Caches& aCaches ) { typedef typename K::FT FT ; - typedef Point_2 Point_2 ; - typedef Line_2 Line_2 ; + typedef typename K::Point_2 Point_2 ; + typedef typename K::Line_2 Line_2 ; - typedef boost::optional Optional_point_2 ; - typedef boost::optional Optional_line_2 ; + typedef std::optional Optional_point_2 ; + typedef std::optional Optional_line_2 ; - CGAL_STSKEL_TRAITS_TRACE("Computing degenerate offset lines isec time for: " << tri ) ; + if(tri->e0() == tri->e1()) // marker for artificial bisectors: they have the same face on both sides + return compute_artifical_isec_timeC2(tri, aCaches) ; + + CGAL_STSKEL_TRAITS_TRACE("\n~~ Computing degenerate offset lines isec time [" << typeid(FT).name() << "]"); + CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri); // DETAILS: // @@ -480,87 +638,154 @@ compute_degenerate_offset_lines_isec_timeC2 ( boost::intrusive_ptr< Trisegment_2 // (2) // The bisecting line of e0 and e2 is given by the following SEL // - // l0.a*x(t) + l0.b*y(t) + l0.c + t = 0 - // l2.a*x(t) + l2.b*y(t) + l2.c + t = 0 + // l0.a*x(t) + l0.b*y(t) + l0.c - t = 0 + // l2.a*x(t) + l2.b*y(t) + l2.c - t = 0 // // where (l0.a,l0.b,l0.c) and (l2.a,l2.b,l2.c) are the normalized line coefficientes of e0 and e2, resp. // // B1(t) = [x(t),y(t)] // // (3) - // These two bisecting lines B0(t) and B1(t) intersect (if they do) in a single point 'p' whose distance + // These two bisecting lines B0(t) and B1(t) intersect (if they do) in a single point 'r' whose distance // to the lines supporting the 3 edges is exactly 't' (since those expressions are precisely parametrized in a distance) // Solving the following vectorial equation: // - // [x(y),y(t)] = q + t*[l0.a,l0.b] + // [x(y),y(t)] = p + t*[l0.a,l0.b] // // for t gives the result we want. // // - bool ok = false ; + // (4) + // With weights, the above equations become: + // + // sage: eq0 = w0*a0*x + w0*b0*y + w0*c0 - t == 0 + // sage: eq2 = w2*a2*x + w2*b2*y + w2*c2 - t == 0 + // + // sage: solve([eq0,eq2], x,y) + // [[x == -(b2*t*w2 - (b2*c0*w2 - b0*c2*w2 + b0*t)*w0)/((a2*b0*w2 - a0*b2*w2)*w0), + // y == (a2*t*w2 - (a2*c0*w2 - a0*c2*w2 + a0*t)*w0)/((a2*b0*w2 - a0*b2*w2)*w0) ]] + // + // sage: x0 = -(b2*t*w2 - (b2*c0*w2 - b0*c2*w2 + b0*t)*w0)/((a2*b0*w2 - a0*b2*w2)*w0) + // sage: eqb0 = px + t * a0 / w0 - x0 == 0 + // sage: solve(eqb0, t) + // [t == -(b2*c0 - b0*c2 - (a2*b0 - a0*b2)*px)*w0*w2/(b0*w0 - (a0*a2*b0 - (a0^2 - 1)*b2)*w2) ] + // + // sage: y0 = (a2*t*w2 - (a2*c0*w2 - a0*c2*w2 + a0*t)*w0)/((a2*b0*w2 - a0*b2*w2)*w0) + // sage: eqb1 = py + t * b0 / w0 - y0 == 0 + // sage: solve(eqb1, t) + // [t == -(a2*c0 - a0*c2 + (a2*b0 - a0*b2)*py)*w0*w2/(a0*w0 + (a2*b0^2 - a0*b0*b2 - a2)*w2)] - const Segment_2_with_ID& ce = tri->collinear_edge(); - Optional_line_2 l0 = compute_normalized_line_ceoffC2(ce, aCoeff_cache) ; - Optional_line_2 l2 = compute_normalized_line_ceoffC2(tri->non_collinear_edge(), aCoeff_cache) ; + Optional_line_2 l0 = compute_weighted_line_coeffC2(tri->collinear_edge(), tri->collinear_edge_weight(), aCaches) ; + Optional_line_2 l1 = compute_weighted_line_coeffC2(tri->other_collinear_edge(), tri->other_collinear_edge_weight(), aCaches) ; + Optional_line_2 l2 = compute_weighted_line_coeffC2(tri->non_collinear_edge(), tri->non_collinear_edge_weight(), aCaches) ; - Optional_point_2 q = compute_degenerate_seed_pointC2(tri, aCoeff_cache); + Optional_point_2 q = construct_degenerate_seed_pointC2(tri, aCaches); - FT num(0), den(0) ; + bool ok = false ; - if ( l0 && l2 && q ) + if ( l0 && l1 && l2 && q ) { - FT px, py ; - line_project_pointC2(l0->a(),l0->b(),l0->c(),q->x(),q->y(),px,py); + CGAL_STSKEL_TRAITS_TRACE("\tCE ID: " << tri->collinear_edge().mID << " w: " << n2str(tri->collinear_edge_weight()) ) ; + CGAL_STSKEL_TRAITS_TRACE("\tOCE ID: " << tri->other_collinear_edge().mID << " w: " << n2str(tri->other_collinear_edge_weight()) ); + CGAL_STSKEL_TRAITS_TRACE("\tNCE ID: " << tri->non_collinear_edge().mID << " w: " << n2str(tri->non_collinear_edge_weight()) ) ; + CGAL_STSKEL_TRAITS_TRACE("\tLabc [" << n2str(l0->a()) << "; " << n2str(l0->b()) << "; " << n2str(l0->c()) << "]" + << "[" << n2str(l1->a()) << "; " << n2str(l1->b()) << "; " << n2str(l1->c()) << "]" + << "[" << n2str(l2->a()) << "; " << n2str(l2->b()) << "; " << n2str(l2->c()) << "]") ; + FT px, py ; + line_project_pointC2(l0->a(),l0->b(),l0->c(),q->x(),q->y(), px,py); CGAL_STSKEL_TRAITS_TRACE("Seed point: " << p2str(*q) << ".\nProjected seed point: (" << n2str(px) << "," << n2str(py) << ")" ) ; - if ( ! CGAL_NTS is_zero(l0->b()) ) // Non-vertical + if ( tri->collinear_edge_weight() == tri->other_collinear_edge_weight() ) { - num = (l2->a() * l0->b() - l0->a() * l2->b() ) * px + l0->b() * l2->c() - l2->b() * l0->c() ; - den = (l0->a() * l0->a() - 1) * l2->b() + ( 1 - l2->a() * l0->a() ) * l0->b() ; + const FT& l0a = l0->a() ; + const FT& l0b = l0->b() ; + const FT& l0c = l0->c() ; + const FT& l2a = l2->a() ; + const FT& l2b = l2->b() ; + const FT& l2c = l2->c() ; + + // Since l0 and l1 are parallel, we cannot solve the system using: + // l0a*x + l0b*y + l0c = 0 (1) + // l1a*x + l1b*y + l1c = 0 + // l2a*x + l2b*y + l2c = 0 + // Instead, we use the equation of the line orthogonal to l0 (and l1). + // However, rephrasing + // l0a*x + l0b*y + l0c = 0 + // to + // [x, y] = projected_seed + t * N + // requires the norm (l0a² + l0b²) to be exactly '1', which likely isn't the case + // if we are using inexact square roots. In that case, the norm behaves similarly + // to a weight (i.e. speed), and the speed is inverted in the alternate front formulation. + // Equation (1) rewritten with weights is: + // w*l0a*x + w*l0b*y + w*l0c = 0 + // with l0a² + l0b² ~= 1. Extracting the numerical error, we have: + // w'*l0a'*x + w'*l0b'*y + w'*l0c' = 0, + // with l0a'² + l0b'² = 1. + // The orthogonal displacement is rephrased to: + // [x, y] = projected_seed + t / w' * N, + // with w' = weight * (l0a² + l0b²). + const FT sq_w0 = square(l0a) + square(l0b); // l0a and l0b are already *weighted* coefficients + + FT num(0), den(0) ; + if ( ! CGAL_NTS is_zero(l0b) ) // Non-vertical + { + num = ((l2a*l0b - l0a*l2b) * px - l2b*l0c + l0b*l2c) * sq_w0 ; + den = l0a*l0a*l2b - l2b*sq_w0 + l0b*sq_w0 - l0a*l2a*l0b ; + + CGAL_STSKEL_TRAITS_TRACE("Event time (degenerate, non-vertical) n=" << n2str(num) << " d=" << n2str(den) << " n/d=" << Rational(num,den) ) + } + else + { + // l0b = 0, and all sq_w0 disappear + num = - l0a*l2b*py - l0a*l2c + l2a*l0c ; + den = l2a - l0a; + + CGAL_STSKEL_TRAITS_TRACE("Event time (degenerate, vertical) n=" << n2str(num) << " d=" << n2str(den) << " n/d=" << Rational(num,den) ) + } - CGAL_STSKEL_TRAITS_TRACE("Event time (degenerate, non-vertical) n=" << n2str(num) << " d=" << n2str(den) << " n/d=" << Rational(num,den) ) + ok = CGAL_NTS is_finite(num) && CGAL_NTS is_finite(den); + return cgal_make_optional(ok, Rational(num,den)) ; } else { - num = (l2->a() * l0->b() - l0->a() * l2->b() ) * py - l0->a() * l2->c() + l2->a() * l0->c() ; - den = l0->a() * l0->b() * l2->b() - l0->b() * l0->b() * l2->a() + l2->a() - l0->a() ; - - CGAL_STSKEL_TRAITS_TRACE("Event time (degenerate, vertical) n=" << n2str(num) << " d=" << n2str(den) << " n/d=" << Rational(num,den) ) + // l0 and l1 are collinear but with different speeds, so there cannot be an event. + CGAL_STSKEL_TRAITS_TRACE("Event times (degenerate, inequal norms)") + CGAL_STSKEL_TRAITS_TRACE("--> Returning 0/0 (no event)"); + return cgal_make_optional(Rational(FT(0),FT(0))) ; } - - ok = CGAL_NTS is_finite(num) && CGAL_NTS is_finite(den); } - - return cgal_make_optional(ok,Rational(num,den)) ; + return std::nullopt; } // -// Calls the appropiate function depending on the collinearity of the edges. +// Calls the appropriate function depending on the collinearity of the edges. // -template -boost::optional< Rational< typename K::FT > > -compute_offset_lines_isec_timeC2 ( boost::intrusive_ptr< Trisegment_2 > > const& tri, - TimeCache& aTime_cache, - CoeffCache& aCoeff_cache) +template +std::optional< Rational< typename K::FT > > +compute_offset_lines_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, + Caches& aCaches ) { - if ( aTime_cache.IsCached(tri->id()) ) - return aTime_cache.Get(tri->id()) ; + typedef typename K::FT FT ; + CGAL_STSKEL_TRAITS_TRACE("compute_offset_lines_isec_timeC2(" << tri->id() << ") [" << typeid(FT).name() << "]" ); + + if ( aCaches.mTime_cache.IsCached(tri->id()) ) + return aCaches.mTime_cache.Get(tri->id()) ; CGAL_precondition ( tri->collinearity() != TRISEGMENT_COLLINEARITY_ALL ) ; - boost::optional< Rational< typename K::FT > > rRes = - tri->collinearity() == TRISEGMENT_COLLINEARITY_NONE ? compute_normal_offset_lines_isec_timeC2 (tri, aCoeff_cache) - : compute_degenerate_offset_lines_isec_timeC2(tri, aCoeff_cache); + std::optional< Rational > rRes = + tri->collinearity() == TRISEGMENT_COLLINEARITY_NONE ? compute_normal_offset_lines_isec_timeC2 (tri, aCaches) + : compute_degenerate_offset_lines_isec_timeC2(tri, aCaches); - aTime_cache.Set(tri->id(), rRes) ; + aCaches.mTime_cache.Set(tri->id(), rRes) ; return rRes ; } // Given 3 oriented line segments e0, e1 and e2 -// such that their offsets at a certian distance intersect in a single point, +// such that their offsets at a certain distance intersect in a single point, // returns the coordinates (x,y) of such a point. // // PRECONDITIONS: @@ -570,24 +795,25 @@ compute_offset_lines_isec_timeC2 ( boost::intrusive_ptr< Trisegment_2 -boost::optional< Point_2 > -construct_normal_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2 > > const& tri, - CoeffCache& aCoeff_cache) +template +std::optional< typename K::Point_2 > +construct_normal_offset_lines_isecC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, + Caches& aCaches) { typedef typename K::FT FT ; - typedef Line_2 Line_2 ; + typedef typename K::Line_2 Line_2 ; - typedef boost::optional Optional_line_2 ; + typedef std::optional Optional_line_2 ; - CGAL_STSKEL_TRAITS_TRACE("Computing normal offset lines isec point for: " << tri ) ; + CGAL_STSKEL_TRAITS_TRACE("\n~~ Computing normal offset lines isec point [" << typeid(FT).name() << "]"); + CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri); FT x(0), y(0) ; - Optional_line_2 l0 = compute_normalized_line_ceoffC2(tri->e0(), aCoeff_cache) ; - Optional_line_2 l1 = compute_normalized_line_ceoffC2(tri->e1(), aCoeff_cache) ; - Optional_line_2 l2 = compute_normalized_line_ceoffC2(tri->e2(), aCoeff_cache) ; + Optional_line_2 l0 = compute_weighted_line_coeffC2(tri->e0(), tri->w0(), aCaches) ; + Optional_line_2 l1 = compute_weighted_line_coeffC2(tri->e1(), tri->w1(), aCaches) ; + Optional_line_2 l2 = compute_weighted_line_coeffC2(tri->e2(), tri->w2(), aCaches) ; bool ok = false ; @@ -595,13 +821,15 @@ construct_normal_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2a()*l2->b() - l0->a()*l1->b() - l1->a()*l2->b() + l2->a()*l1->b() + l0->b()*l1->a() - l0->b()*l2->a(); - CGAL_STSKEL_TRAITS_TRACE("den=" << n2str(den) ) + CGAL_STSKEL_TRAITS_TRACE("\tden=" << n2str(den) ) if ( ! CGAL_NTS certified_is_zero(den) ) { FT numX = l0->b()*l2->c() - l0->b()*l1->c() - l1->b()*l2->c() + l2->b()*l1->c() + l1->b()*l0->c() - l2->b()*l0->c(); FT numY = l0->a()*l2->c() - l0->a()*l1->c() - l1->a()*l2->c() + l2->a()*l1->c() + l1->a()*l0->c() - l2->a()*l0->c(); + CGAL_STSKEL_TRAITS_TRACE("\tnumX=" << n2str(numX) << "\n\tnumY=" << n2str(numY) ) ; + if ( CGAL_NTS is_finite(den) && CGAL_NTS is_finite(numX) && CGAL_NTS is_finite(numY) ) { ok = true ; @@ -609,21 +837,70 @@ construct_normal_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2e0() == tri->e1()); + CGAL_precondition(bool(tri->child_l())); + + const Segment_2& contour_seg = tri->e0(); + Direction_2 perp_dir ( contour_seg.source().y() - contour_seg.target().y() , + contour_seg.target().x() - contour_seg.source().x() ) ; + std::optional< typename K::Point_2 > seed = construct_offset_lines_isecC2(tri->child_l(), aCaches) ; + + if(!seed) + return std::nullopt; + + const Ray_2 ray(*seed, perp_dir); + const Segment_2& opp_seg = tri->e2(); + auto inter_res = K().intersect_2_object()(ray, opp_seg); + if (!inter_res) // shouldn't be here if there is no intersection + return std::nullopt; + + if(const Point_2* inter_pt = std::get_if(&*inter_res)) + { + bool ok = CGAL_NTS is_finite(inter_pt->x()) && CGAL_NTS is_finite(inter_pt->y()) ; + return cgal_make_optional(ok, *inter_pt) ; + } + else if(const Segment_2* seg = std::get_if(&*inter_res)) + { + // get the segment extremity closest to the seed + const Point_2& pt = (K().compare_distance_2_object()(*seed, + seg->source(), + seg->target()) == CGAL::SMALLER) ? seg->source() + : seg->target() ; + return cgal_make_optional(pt); + } + + return std::nullopt; +} + // Given 3 oriented line segments e0, e1 and e2 -// such that their offsets at a certian distance intersect in a single point, +// such that their offsets at a certain distance intersect in a single point, // returns the coordinates (x,y) of such a point. -// two and only two of the edges are collinear, not neccesarily consecutive but with the same orientaton +// two and only two of the edges are collinear, not necessarily consecutive but with the same orientaton // // PRECONDITIONS: // The line coefficients must be normalized: a²+b²==1 and (a,b) being the leftward normal vector @@ -631,82 +908,141 @@ construct_normal_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2 -boost::optional< Point_2 > -construct_degenerate_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2 > > const& tri, - CoeffCache& aCoeff_cache) +// See detailed computations in compute_degenerate_offset_lines_isec_timeC2() +template +std::optional< typename K::Point_2 > +construct_degenerate_offset_lines_isecC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, + Caches& aCaches) { typedef typename K::FT FT ; - typedef Point_2 Point_2 ; - typedef Line_2 Line_2 ; + typedef typename K::Point_2 Point_2 ; + typedef typename K::Line_2 Line_2 ; + + typedef std::optional Optional_point_2 ; + typedef std::optional Optional_line_2 ; - typedef boost::optional Optional_point_2 ; - typedef boost::optional Optional_line_2 ; + if(tri->e0() == tri->e1()) // marker for artificial bisectors: they have the same face on both sides + return construct_artifical_isecC2(tri, aCaches) ; - CGAL_STSKEL_TRAITS_TRACE("Computing degenerate offset lines isec point for: " << tri ) ; + CGAL_STSKEL_TRAITS_TRACE("\n~~ Computing degenerate offset lines isec point [" << typeid(FT).name() << "]"); + CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri); - FT x(0.0),y(0.0) ; + FT x(0),y(0) ; - Optional_line_2 l0 = compute_normalized_line_ceoffC2(tri->collinear_edge (), aCoeff_cache) ; - Optional_line_2 l2 = compute_normalized_line_ceoffC2(tri->non_collinear_edge(), aCoeff_cache) ; + Optional_line_2 l0 = compute_weighted_line_coeffC2(tri->collinear_edge(), tri->collinear_edge_weight(), aCaches) ; + Optional_line_2 l2 = compute_weighted_line_coeffC2(tri->non_collinear_edge(), tri->non_collinear_edge_weight(), aCaches) ; - Optional_point_2 q = compute_degenerate_seed_pointC2(tri, aCoeff_cache); + Optional_point_2 q = construct_degenerate_seed_pointC2(tri, aCaches); bool ok = false ; if ( l0 && l2 && q ) { - FT num, den ; - - FT px, py ; - line_project_pointC2(l0->a(),l0->b(),l0->c(),q->x(),q->y(),px,py); + const Comparison_result res = CGAL::compare(tri->collinear_edge_weight(), tri->other_collinear_edge_weight()); + if ( res == EQUAL ) + { + FT px, py ; + line_project_pointC2(l0->a(),l0->b(),l0->c(),q->x(),q->y(), px,py); + + CGAL_STSKEL_TRAITS_TRACE("Degenerate, equal weights " << tri->collinear_edge_weight() ) ; + CGAL_STSKEL_TRAITS_TRACE("Seed point: " << p2str(*q) << ". Projected seed point: (" << n2str(px) << "," << n2str(py) << ")" ) ; + const FT& l0a = l0->a() ; + const FT& l0b = l0->b() ; + const FT& l0c = l0->c() ; + const FT& l2a = l2->a() ; + const FT& l2b = l2->b() ; + const FT& l2c = l2->c() ; + + // See details in compute_degenerate_offset_lines_isec_timeC2() + const FT sq_w0 = square(l0a) + square(l0b); + + // Note that "* sq_w0" is removed from the numerator expression. + // + // This is because the speed is inverted while representing the front + // progression using the orthogonal normalized vector [l0a, l0b]: P = Q + t/w * V with V normalized. + // However, here l0a & l0b are not normalized but *weighted* coeff, so we need to divide by w0². + // Hence we can just avoid multiplying by w0² in the numerator in the first place. + FT num, den ; + if ( ! CGAL_NTS is_zero(l0->b()) ) // Non-vertical + { + num = ((l2a*l0b - l0a*l2b) * px - l2b*l0c + l0b*l2c) /* * sq_w0 */ ; + den = l0a*l0a*l2b - l2b*sq_w0 + l0b*sq_w0 - l0a*l2a*l0b ; + } + else + { + num = ((l2a*l0b - l0a*l2b) * py - l0a*l2c + l2a*l0c) /* * sq_w0 */ ; + den = l0a*l0b*l2b - l0b*l0b*l2a + l2a*sq_w0 - l0a*sq_w0; + } - CGAL_STSKEL_TRAITS_TRACE("Seed point: " << p2str(*q) << ". Projected seed point: (" << n2str(px) << "," << n2str(py) << ")" ) ; + if ( ! CGAL_NTS certified_is_zero(den) && CGAL_NTS is_finite(den) && CGAL_NTS is_finite(num) ) + { + x = px + l0a * num / den ; + y = py + l0b * num / den ; - if ( ! CGAL_NTS is_zero(l0->b()) ) // Non-vertical - { - num = (l2->a() * l0->b() - l0->a() * l2->b() ) * px + l0->b() * l2->c() - l2->b() * l0->c() ; - den = (l0->a() * l0->a() - 1) * l2->b() + ( 1 - l2->a() * l0->a() ) * l0->b() ; + ok = CGAL_NTS is_finite(x) && CGAL_NTS is_finite(y) ; + } } else { - num = (l2->a() * l0->b() - l0->a() * l2->b() ) * py - l0->a() * l2->c() + l2->a() * l0->c() ; - den = l0->a() * l0->b() * l2->b() - l0->b() * l0->b() * l2->a() + l2->a() - l0->a() ; - } + CGAL_STSKEL_TRAITS_TRACE("Degenerate, different weights " << n2str(tri->collinear_edge_weight()) + << " and " << n2str(tri->other_collinear_edge_weight())); - if ( ! CGAL_NTS certified_is_zero(den) && CGAL_NTS is_finite(den) && CGAL_NTS is_finite(num) ) - { - x = px + l0->a() * num / den ; - y = py + l0->b() * num / den ; + const FT& l0a = l0->a() ; const FT& l0b = l0->b() ; const FT& l0c = l0->c() ; + const FT& l2a = l2->a() ; const FT& l2b = l2->b() ; const FT& l2c = l2->c() ; + + // The line parallel to l0 (and l1) passing through q is: l0a*x + l0b*y + lambda = 0, with + const FT lambda = -l0a*q->x() - l0b*q->y(); + + // The bisector between l0 (l1) and l2 is: + // l0a*x + l0b*y + l0c - t = 0 + // l2a*x + l2b*y + l2c - t = 0 + + // The intersection point is thus: + // l0a*x + l0b*y + l0c - t = 0 + // l2a*x + l2b*y + l2c - t = 0 + // l0a*x + l0b*y + lambda = 0 - ok = CGAL_NTS is_finite(x) && CGAL_NTS is_finite(y) ; + // const FT t = l0c - lambda ; // (3) - (1) + const FT den = l2a*l0b - l0a*l2b; + + if ( ! CGAL_NTS certified_is_zero(den) && CGAL_NTS is_finite(den) ) + + x = (l0b*l0c - l0b*(l2c + lambda) + l2b*lambda) / den; + y = -(l0a*l0c - l0a*(l2c + lambda) + l2a*lambda) / den; } } - - CGAL_STSKEL_TRAITS_TRACE("\nDegenerate " << (CGAL_NTS is_zero(l0->b()) ? "(vertical)" : "") << " event point: x=" << n2str(x) << " y=" << n2str(y) ) + CGAL_STSKEL_TRAITS_TRACE("Degenerate" << (CGAL_NTS is_zero(l0->b()) ? " (vertical)" : "") << " event point: x=" << n2str(x) << " y=" << n2str(y) ) return cgal_make_optional(ok,K().construct_point_2_object()(x,y)) ; } -// -// Calls the appropiate function depending on the collinearity of the edges. -// -template -boost::optional< Point_2 > -construct_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2 > > const& tri, - CoeffCache& aCoeff_cache) +// Calls the appropriate function depending on the collinearity of the edges. +template +std::optional< typename K::Point_2 > +construct_offset_lines_isecC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, + Caches& aCaches ) { + typedef typename K::Point_2 Point_2 ; + + CGAL_STSKEL_TRAITS_TRACE("construct_offset_lines_isecC2(" << tri->id() << ") [" << typeid(typename K::FT).name() << "]" ); + + if(aCaches.mPoint_cache.IsCached(tri->id()) ) + return aCaches.mPoint_cache.Get(tri->id()) ; + CGAL_precondition ( tri->collinearity() != TRISEGMENT_COLLINEARITY_ALL ) ; - return tri->collinearity() == TRISEGMENT_COLLINEARITY_NONE ? construct_normal_offset_lines_isecC2 (tri, aCoeff_cache) - : construct_degenerate_offset_lines_isecC2(tri, aCoeff_cache) ; + std::optional< Point_2 > rRes = + tri->collinearity() == TRISEGMENT_COLLINEARITY_NONE ? construct_normal_offset_lines_isecC2 (tri, aCaches) + : construct_degenerate_offset_lines_isecC2(tri, aCaches); + + aCaches.mPoint_cache.Set(tri->id(), rRes) ; + + return rRes ; } } // namespace CGAL_SS_i +} // namespace CGAL -} // end namespace CGAL - -#endif // CGAL_STRAIGHT_SKELETON_CONS_FTC2_H // -// EOF // +#endif // CGAL_STRAIGHT_SKELETON_CONS_FTC2_H diff --git a/thirdparty/CGAL/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h b/thirdparty/CGAL/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h index 1af9a60c..a822a1b3 100644 --- a/thirdparty/CGAL/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h +++ b/thirdparty/CGAL/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interpolation/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h $ -// $Id: constructions_for_voronoi_intersection_cartesian_2_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interpolation/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h $ +// $Id: include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -73,7 +73,7 @@ plane_centered_circumcenterC3(const RT &ax, const RT &ay, const RT &az, // //precondition: p,q,r aren't collinear. //method: - // - tranlation of p to the origin. + // - translation of p to the origin. plane_centered_circumcenter_translateC3(ax-px, ay-py, az-pz, nx, ny, nz, qx-px, qy-py,qz-pz, diff --git a/thirdparty/CGAL/include/CGAL/constructions/kernel_ftC2.h b/thirdparty/CGAL/include/CGAL/constructions/kernel_ftC2.h index 2946b42a..d73baab3 100644 --- a/thirdparty/CGAL/include/CGAL/constructions/kernel_ftC2.h +++ b/thirdparty/CGAL/include/CGAL/constructions/kernel_ftC2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/constructions/kernel_ftC2.h $ -// $Id: kernel_ftC2.h 2165605 2021-02-18T15:26:51+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/constructions/kernel_ftC2.h $ +// $Id: include/CGAL/constructions/kernel_ftC2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/constructions/kernel_ftC3.h b/thirdparty/CGAL/include/CGAL/constructions/kernel_ftC3.h index e4c12698..5ed2ee02 100644 --- a/thirdparty/CGAL/include/CGAL/constructions/kernel_ftC3.h +++ b/thirdparty/CGAL/include/CGAL/constructions/kernel_ftC3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h $ -// $Id: kernel_ftC3.h 1916290 2022-03-21T18:04:03+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h $ +// $Id: include/CGAL/constructions/kernel_ftC3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -142,11 +142,12 @@ centroidC3( const FT &px, const FT &py, const FT &pz, template < class FT > CGAL_KERNEL_MEDIUM_INLINE -FT +void squared_radiusC3(const FT &px, const FT &py, const FT &pz, - const FT &qx, const FT &qy, const FT &qz, - const FT &rx, const FT &ry, const FT &rz, - const FT &sx, const FT &sy, const FT &sz) + const FT &qx, const FT &qy, const FT &qz, + const FT &rx, const FT &ry, const FT &rz, + const FT &sx, const FT &sy, const FT &sz, + FT &num, FT &den) { // Translate p to origin to simplify the expression. FT qpx = qx-px; @@ -163,29 +164,30 @@ squared_radiusC3(const FT &px, const FT &py, const FT &pz, FT sp2 = CGAL_NTS square(spx) + CGAL_NTS square(spy) + CGAL_NTS square(spz); FT num_x = determinant(qpy,qpz,qp2, - rpy,rpz,rp2, - spy,spz,sp2); + rpy,rpz,rp2, + spy,spz,sp2); FT num_y = determinant(qpx,qpz,qp2, - rpx,rpz,rp2, - spx,spz,sp2); + rpx,rpz,rp2, + spx,spz,sp2); FT num_z = determinant(qpx,qpy,qp2, - rpx,rpy,rp2, - spx,spy,sp2); - FT den = determinant(qpx,qpy,qpz, - rpx,rpy,rpz, - spx,spy,spz); - CGAL_kernel_assertion( ! CGAL_NTS is_zero(den) ); + rpx,rpy,rp2, + spx,spy,sp2); + FT dden = determinant(qpx,qpy,qpz, + rpx,rpy,rpz, + spx,spy,spz); + CGAL_kernel_assertion( ! CGAL_NTS is_zero(dden) ); - return (CGAL_NTS square(num_x) + CGAL_NTS square(num_y) - + CGAL_NTS square(num_z)) / CGAL_NTS square(2 * den); + num = CGAL_NTS square(num_x) + CGAL_NTS square(num_y) + CGAL_NTS square(num_z); + den = CGAL_NTS square(2 * dden); } template < class FT > CGAL_KERNEL_MEDIUM_INLINE -FT +void squared_radiusC3(const FT &px, const FT &py, const FT &pz, - const FT &qx, const FT &qy, const FT &qz, - const FT &sx, const FT &sy, const FT &sz) + const FT &qx, const FT &qy, const FT &qz, + const FT &sx, const FT &sy, const FT &sz, + FT &num, FT &den) { // Translate s to origin to simplify the expression. FT psx = px-sx; @@ -207,14 +209,14 @@ squared_radiusC3(const FT &px, const FT &py, const FT &pz, FT num_z = ps2 * determinant(qsx,qsy,rsx,rsy) - qs2 * determinant(psx,psy,rsx,rsy); - FT den = determinant(psx,psy,psz, - qsx,qsy,qsz, - rsx,rsy,rsz); + FT dden = determinant(psx,psy,psz, + qsx,qsy,qsz, + rsx,rsy,rsz); - CGAL_kernel_assertion( den != 0 ); + CGAL_kernel_assertion( dden != 0 ); - return (CGAL_NTS square(num_x) + CGAL_NTS square(num_y) - + CGAL_NTS square(num_z)) / CGAL_NTS square(2 * den); + num = CGAL_NTS square(num_x) + CGAL_NTS square(num_y) + CGAL_NTS square(num_z); + den = CGAL_NTS square(2 * dden); } template @@ -238,6 +240,22 @@ plane_from_pointsC3(const FT &px, const FT &py, const FT &pz, pd = - pa*rx - pb*ry - pc*rz; } + +template +CGAL_KERNEL_MEDIUM_INLINE +void +plane_from_pointsC3( /* origin */ + const FT &qx, const FT &qy, const FT &qz, + const FT &rx, const FT &ry, const FT &rz, + FT &pa, FT &pb, FT &pc /* , zero */ ) +{ + pa = qy*rz - ry*qz; + pb = qz*rx - rz*qx; + pc = qx*ry - rx*qy; +} + + + template CGAL_KERNEL_MEDIUM_INLINE void @@ -305,11 +323,13 @@ squared_distanceC3( const FT &px, const FT &py, const FT &pz, template < class FT > CGAL_KERNEL_INLINE -FT +void squared_radiusC3( const FT &px, const FT &py, const FT &pz, - const FT &qx, const FT &qy, const FT &qz) + const FT &qx, const FT &qy, const FT &qz, + FT &num, FT &den) { - return squared_distanceC3(px, py, pz, qx, qy, qz) / 4; + num = squared_distanceC3(px, py, pz, qx, qy, qz); + den = FT(4); } template < class FT > @@ -427,7 +447,7 @@ determinants_for_circumcenterC3(const FT &px, const FT &py, const FT &pz, FT rsy = psz*qsx - psx*qsz; FT rsz = psx*qsy - psy*qsx; - // The following determinants can be developped and simplified. + // The following determinants can be developed and simplified. // // FT num_x = determinant(psy,psz,ps2, // qsy,qsz,qs2, @@ -677,7 +697,7 @@ determinants_for_weighted_circumcenterC3( FT sy = qpz*rpx - qpx*rpz; FT sz = qpx*rpy - qpy*rpx; - // The following determinants can be developped and simplified. +// The following determinants can be developed and simplified. // // FT num_x = determinant(qpy,qpz,qp2, // rpy,rpz,rp2, diff --git a/thirdparty/CGAL/include/CGAL/constructions_d.h b/thirdparty/CGAL/include/CGAL/constructions_d.h index 238123bd..9ab4bd0e 100644 --- a/thirdparty/CGAL/include/CGAL/constructions_d.h +++ b/thirdparty/CGAL/include/CGAL/constructions_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/constructions_d.h $ -// $Id: constructions_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/constructions_d.h $ +// $Id: include/CGAL/constructions_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/convert_to_bfi.h b/thirdparty/CGAL/include/CGAL/convert_to_bfi.h index a8de43e7..7716bd38 100644 --- a/thirdparty/CGAL/include/CGAL/convert_to_bfi.h +++ b/thirdparty/CGAL/include/CGAL/convert_to_bfi.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interval_support/include/CGAL/convert_to_bfi.h $ -// $Id: convert_to_bfi.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interval_support/include/CGAL/convert_to_bfi.h $ +// $Id: include/CGAL/convert_to_bfi.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Hemmer diff --git a/thirdparty/CGAL/include/CGAL/convex_decomposition_3.h b/thirdparty/CGAL/include/CGAL/convex_decomposition_3.h index 05f2922e..3d3d9427 100644 --- a/thirdparty/CGAL/include/CGAL/convex_decomposition_3.h +++ b/thirdparty/CGAL/include/CGAL/convex_decomposition_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_decomposition_3/include/CGAL/convex_decomposition_3.h $ -// $Id: convex_decomposition_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_decomposition_3/include/CGAL/convex_decomposition_3.h $ +// $Id: include/CGAL/convex_decomposition_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -41,12 +41,12 @@ The function `convex_decomposition_3()` inserts additional facets into the given `Nef_polyhedron_3` `N`, such that each bounded marked volume (the outer volume is unbounded) is subdivided into convex pieces. The modified polyhedron represents a decomposition into -\f$ O(r^2)\f$ convex pieces, where \f$ r\f$ is the number of edges that have two +\cgalBigO{r^2} convex pieces, where \f$ r\f$ is the number of edges that have two adjacent facets that span an angle of more than 180 degrees with respect to the interior of the polyhedron. The worst-case running time of our implementation is -\f$ O(n^2r^4\sqrt[3]{nr^2}\log{(nr)})\f$, where \f$ n\f$ is the complexity of +\cgalBigO{n^2r^4\sqrt[3]{nr^2}\log{(nr)}}, where \f$ n\f$ is the complexity of the polyhedron (the complexity of a `Nef_polyhedron_3` is the sum of its `Vertices`, `Halfedges` and `SHalfedges`) and \f$ r\f$ is the number of reflex edges. diff --git a/thirdparty/CGAL/include/CGAL/convex_hull_2.h b/thirdparty/CGAL/include/CGAL/convex_hull_2.h index 4b5c6fc9..21d62ca7 100644 --- a/thirdparty/CGAL/include/CGAL/convex_hull_2.h +++ b/thirdparty/CGAL/include/CGAL/convex_hull_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/convex_hull_2.h $ -// $Id: convex_hull_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/convex_hull_2.h $ +// $Id: include/CGAL/convex_hull_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/convex_hull_3.h b/thirdparty/CGAL/include/CGAL/convex_hull_3.h index 48c8eaab..c6f63591 100644 --- a/thirdparty/CGAL/include/CGAL/convex_hull_3.h +++ b/thirdparty/CGAL/include/CGAL/convex_hull_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_3/include/CGAL/convex_hull_3.h $ -// $Id: convex_hull_3.h 9bb36b0 2022-02-01T08:58:25+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_3/include/CGAL/convex_hull_3.h $ +// $Id: include/CGAL/convex_hull_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -40,14 +40,13 @@ #include #include #include -#include +#include -#include -#include -#include #include #include +#include + #ifndef CGAL_CH_NO_POSTCONDITIONS #include #endif // CGAL_CH_NO_POSTCONDITIONS @@ -148,7 +147,7 @@ namespace internal { //struct to select the default traits class for computing convex hull template< class Point_3, class PolygonMesh = Default, - class Is_floating_point=typename boost::is_floating_point::Kernel::FT>::type, + class Is_floating_point=typename std::is_floating_point::Kernel::FT>::type, class Has_filtered_predicates_tag=typename Kernel_traits::Kernel::Has_filtered_predicates_tag > struct Default_traits_for_Chull_3{ typedef typename Kernel_traits::Kernel type; @@ -156,7 +155,7 @@ struct Default_traits_for_Chull_3{ //FT is a floating point type and Kernel is a filtered kernel template -struct Default_traits_for_Chull_3{ +struct Default_traits_for_Chull_3{ typedef Convex_hull_traits_3< typename Kernel_traits::Kernel, PolygonMesh, Tag_true > type; }; @@ -173,7 +172,7 @@ struct Default_polyhedron_for_Chull_3 >{ template struct Is_cartesian_kernel { - typedef boost::false_type type; + typedef std::false_type type; }; template @@ -181,7 +180,7 @@ struct Is_cartesian_kernel< Convex_hull_traits_3 { // Rational here is that Tag_true can only be passed by us since it is not documented // so we can assume that Kernel is a CGAL Kernel - typedef typename boost::is_same::type type; + typedef typename std::is_same::type type; }; // Predicate internally used as a wrapper around has_on_positive_side @@ -234,7 +233,7 @@ class Is_on_positive_side_of_plane_3< Extreme_points_traits_adapter_3 -class Is_on_positive_side_of_plane_3, boost::true_type >{ +class Is_on_positive_side_of_plane_3, std::true_type >{ typedef Simple_cartesian::Type> Exact_K; typedef Simple_cartesian Approx_K; typedef Convex_hull_traits_3 Traits; @@ -564,7 +563,7 @@ farthest_outside_point(Face_handle f, std::list& outside_set, { typedef typename std::list::iterator Outside_set_iterator; - CGAL_ch_assertion(!outside_set.empty()); + CGAL_assertion(!outside_set.empty()); typename Traits::Plane_3 plane = traits.construct_plane_3_object()(f->vertex(0)->point(), @@ -612,7 +611,7 @@ partition_outside_sets(const std::list& new_facets, } if(! point_list.empty()){ pending_facets.push_back(f); - f->it = boost::prior(pending_facets.end()); + f->it = std::prev(pending_facets.end()); } else { f->it = pending_facets.end(); } @@ -681,7 +680,7 @@ ch_quickhull_3_scan(TDS_2& tds, border.erase(it); while(! border.empty()){ it = border.find(e.first->vertex(TDS_2::ccw(e.second))); - CGAL_ch_assertion(it != border.end()); + CGAL_assertion(it != border.end()); e = it->second; e.first->info() = 0; edges.push_back(e); @@ -747,7 +746,7 @@ void non_coplanar_quickhull_3(std::list& points, for(Face_iterator fit = tds.faces_begin(); fit != tds.faces_end(); ++fit){ if (! fit->points.empty()){ pending_facets.push_back(fit); - fit->it = boost::prior(pending_facets.end()); + fit->it = std::prev(pending_facets.end()); } else { fit->it = pending_facets.end(); } @@ -757,9 +756,9 @@ void non_coplanar_quickhull_3(std::list& points, ch_quickhull_3_scan(tds, pending_facets, traits); //std::cout << "|V(tds)| = " << tds.number_of_vertices() << std::endl; -// CGAL_ch_expensive_postcondition(all_points_inside(points.begin(), +// CGAL_expensive_postcondition(all_points_inside(points.begin(), // points.end(),P,traits)); -// CGAL_ch_postcondition(is_strongly_convex_3(P, traits)); +// CGAL_postcondition(is_strongly_convex_3(P, traits)); } template @@ -1052,7 +1051,7 @@ template void convex_hull_3(InputIterator first, InputIterator beyond, PolygonMesh& polyhedron, // workaround to avoid ambiguity with next overload. - typename std::enable_if::value>::type* = 0) + std::enable_if_t::value>* = 0) { typedef typename std::iterator_traits::value_type Point_3; typedef typename Convex_hull_3::internal::Default_traits_for_Chull_3::type Traits; @@ -1083,9 +1082,9 @@ template void convex_hull_3(InputIterator first, InputIterator beyond, PointRange& vertices, TriangleRange& faces, - typename std::enable_if::value>::type* = 0, - typename std::enable_if::value>::type* = 0, - typename std::enable_if::value>::type* = 0) + std::enable_if_t::value>* = 0, + std::enable_if_t::value>* = 0, + std::enable_if_t::value>* = 0) { typedef typename std::iterator_traits::value_type Point_3; typedef typename Kernel_traits::type Traits; @@ -1100,9 +1099,9 @@ void convex_hull_3(InputIterator first, InputIterator beyond, PointRange& vertices, TriangleRange& faces, const Traits& traits, - typename std::enable_if::value>::type* = 0, - typename std::enable_if::value>::type* = 0, - typename std::enable_if::value>::type* = 0) + std::enable_if_t::value>* = 0, + std::enable_if_t::value>* = 0, + std::enable_if_t::value>* = 0) { Convex_hull_3::internal::Indexed_triangle_set its(vertices,faces); convex_hull_3(first, beyond, its, traits); diff --git a/thirdparty/CGAL/include/CGAL/convex_hull_3_to_face_graph.h b/thirdparty/CGAL/include/CGAL/convex_hull_3_to_face_graph.h index e0ae14e8..5f6e1cb2 100644 --- a/thirdparty/CGAL/include/CGAL/convex_hull_3_to_face_graph.h +++ b/thirdparty/CGAL/include/CGAL/convex_hull_3_to_face_graph.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_3/include/CGAL/convex_hull_3_to_face_graph.h $ -// $Id: convex_hull_3_to_face_graph.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_3/include/CGAL/convex_hull_3_to_face_graph.h $ +// $Id: include/CGAL/convex_hull_3_to_face_graph.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/convex_hull_constructive_traits_2.h b/thirdparty/CGAL/include/CGAL/convex_hull_constructive_traits_2.h index 84924285..e35d7a75 100644 --- a/thirdparty/CGAL/include/CGAL/convex_hull_constructive_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/convex_hull_constructive_traits_2.h @@ -3,15 +3,15 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/convex_hull_constructive_traits_2.h $ -// $Id: convex_hull_constructive_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/convex_hull_constructive_traits_2.h $ +// $Id: include/CGAL/convex_hull_constructive_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Stefan Schirra // This file's name must begin with a lower-case letter for backward -// compatability. Unfortunately, you can't have a file that differs only +// compatibility. Unfortunately, you can't have a file that differs only // in capitalization on the Windows platforms. #ifndef CGAL_CONVEX_HULL_CONSTRUCTIVE_TRAITS_2_H @@ -19,19 +19,62 @@ #include - -#include +#include namespace CGAL { +namespace Convex_hulls_2 { +namespace internal { + +template +class Compare_signed_distance_to_cached_line_2 + : public R::Compare_signed_distance_to_line_2 +{ + typedef typename R::Compare_signed_distance_to_line_2 Base; + +public: + typedef CGAL::Comparison_result result_type; + + typedef typename R::Point_2 Point; + typedef typename R::Line_2 Line; + + Compare_signed_distance_to_cached_line_2(const Base& base_f) + : Base(base_f), + line_constructed(false) + { } + + using Base::operator(); + + result_type operator()(const Point& a, const Point& b, + const Point& c, const Point& d) const + { + if(!line_constructed) + { + line_constructed = true; + l_ab = Line(a,b); + } + + return operator()(l_ab, c, d); + } + +private: + mutable bool line_constructed; + mutable Line l_ab; +}; + +} // namespace internal +} // namespace Convex_hulls_2 + template -class Convex_hull_constructive_traits_2 : public K_ +class Convex_hull_constructive_traits_2 + : public K_ { public: typedef K_ K; typedef typename K::Point_2 Point_2; typedef typename K::Less_xy_2 Less_xy_2; typedef typename K::Less_yx_2 Less_yx_2; - typedef internal::r_Less_dist_to_line Less_signed_distance_to_line_2; + typedef Convex_hulls_2::internal::Compare_signed_distance_to_cached_line_2 + Compare_signed_distance_to_line_2; typedef typename K::Less_rotate_ccw_2 Less_rotate_ccw_2; typedef typename K::Left_turn_2 Left_turn_2; typedef typename K::Equal_2 Equal_2; @@ -45,9 +88,12 @@ class Convex_hull_constructive_traits_2 : public K_ less_yx_2_object() const { return Less_yx_2(); } - Less_signed_distance_to_line_2 - less_signed_distance_to_line_2_object() const - { return Less_signed_distance_to_line_2(); } + Compare_signed_distance_to_line_2 + compare_signed_distance_to_line_2_object() const + { + return Compare_signed_distance_to_line_2( + this->K_::compare_signed_distance_to_line_2_object()); + } Less_rotate_ccw_2 less_rotate_ccw_2_object() const @@ -62,15 +108,12 @@ class Convex_hull_constructive_traits_2 : public K_ { return Equal_2(); } }; - -// for backward compatability - +// for backward compatibility template -class convex_hull_constructive_traits_2 : - public Convex_hull_constructive_traits_2 -{ -}; +class convex_hull_constructive_traits_2 + : public Convex_hull_constructive_traits_2 +{ }; -} //namespace CGAL +} // namespace CGAL #endif // CGAL_CONVEX_HULL_CONSTRUCTIVE_TRAITS_2_H diff --git a/thirdparty/CGAL/include/CGAL/convex_hull_traits_2.h b/thirdparty/CGAL/include/CGAL/convex_hull_traits_2.h index c2365ee7..738b932f 100644 --- a/thirdparty/CGAL/include/CGAL/convex_hull_traits_2.h +++ b/thirdparty/CGAL/include/CGAL/convex_hull_traits_2.h @@ -3,15 +3,15 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/convex_hull_traits_2.h $ -// $Id: convex_hull_traits_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/convex_hull_traits_2.h $ +// $Id: include/CGAL/convex_hull_traits_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Stefan Schirra // This file's name must begin with a lower-case letter for backward -// compatability. Unfortunately, you can't have a file that differs only +// compatibility. Unfortunately, you can't have a file that differs only // in capitalization on the Windows platforms. #ifndef CGAL_CONVEX_HULL_TRAITS_2_H diff --git a/thirdparty/CGAL/include/CGAL/convexity_check_2.h b/thirdparty/CGAL/include/CGAL/convexity_check_2.h index 0f850582..4442bbf4 100644 --- a/thirdparty/CGAL/include/CGAL/convexity_check_2.h +++ b/thirdparty/CGAL/include/CGAL/convexity_check_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/convexity_check_2.h $ -// $Id: convexity_check_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/convexity_check_2.h $ +// $Id: include/CGAL/convexity_check_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/convexity_check_3.h b/thirdparty/CGAL/include/CGAL/convexity_check_3.h index 6e1471e2..79288049 100644 --- a/thirdparty/CGAL/include/CGAL/convexity_check_3.h +++ b/thirdparty/CGAL/include/CGAL/convexity_check_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_3/include/CGAL/convexity_check_3.h $ -// $Id: convexity_check_3.h df61ad9 2020-11-12T10:56:40+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_3/include/CGAL/convexity_check_3.h $ +// $Id: include/CGAL/convexity_check_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/copy_n.h b/thirdparty/CGAL/include/CGAL/copy_n.h index dd7f1ce5..3609f47b 100644 --- a/thirdparty/CGAL/include/CGAL/copy_n.h +++ b/thirdparty/CGAL/include/CGAL/copy_n.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/copy_n.h $ -// $Id: copy_n.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/copy_n.h $ +// $Id: include/CGAL/copy_n.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/cpp_float.h b/thirdparty/CGAL/include/CGAL/cpp_float.h new file mode 100644 index 00000000..d992b3f9 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/cpp_float.h @@ -0,0 +1,581 @@ +// Copyright (c) 2023 GeometryFactory (France), INRIA Saclay - Ile de France (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/cpp_float.h $ +// $Id: include/CGAL/cpp_float.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Andreas Fabri, Marc Glisse + +#ifndef CGAL_CPP_FLOAT_H +#define CGAL_CPP_FLOAT_H + +//#define CGAL_DEBUG_CPPF + +#include +#include +#include +#include + +namespace CGAL { + + +namespace internal { + // Only used with an argument known not to be 0. + inline int low_bit (boost::uint64_t x) { +#if defined(_MSC_VER) + unsigned long ret; + _BitScanForward64(&ret, x); + return (int)ret; +#elif defined(__xlC__) + return __cnttz8 (x); +#else + // Assume long long is 64 bits + return __builtin_ctzll (x); +#endif + } + inline int high_bit (boost::uint64_t x) { +#if defined(_MSC_VER) + unsigned long ret; + _BitScanReverse64(&ret, x); + return (int)ret; +#elif defined(__xlC__) + // Macro supposedly not defined on z/OS. + return 63 - __cntlz8 (x); +#else + return 63 - __builtin_clzll (x); +#endif + } + +} // namespace internal + +#if 0 // needs C++20 + template + void fmt(const T& t) + { + std::cout << std::format("{:b}", t) << std::endl; + } +#endif + +// It would have made sense to make this +// boost::multiprecision::number, but we keep that +// for later when we contribute to boost::mp + +class cpp_float { +#ifdef CGAL_DEBUG_CPPF + boost::multiprecision::cpp_rational rat; +#endif + + typedef boost::multiprecision::number > Mantissa; + Mantissa man; + int exp; /* The number man (an integer) * 2 ^ exp */ + +public: + cpp_float() + : +#ifdef CGAL_DEBUG_CPPF + rat(), +#endif + man(), exp() + {} + + cpp_float(short i) + : +#ifdef CGAL_DEBUG_CPPF + rat(i), +#endif + man(i),exp(0) + {} + + cpp_float(int i) + : +#ifdef CGAL_DEBUG_CPPF + rat(i), +#endif + man(i),exp(0) + {} + + cpp_float(long i) + : +#ifdef CGAL_DEBUG_CPPF + rat(i), +#endif + man(i),exp(0) + {} +#ifdef CGAL_DEBUG_CPPF + cpp_float(const Mantissa& man, int exp, const boost::multiprecision::cpp_rational& rat) + : rat(rat), man(man),exp(exp) + {} +#else + + cpp_float(const Mantissa& man, int exp) + : man(man), exp(exp) + { + CGAL_HISTOGRAM_PROFILER("size (man/exp)", static_cast(man.backend().size())); + } + +#ifndef CGAL_DEBUG_CPPF + template + cpp_float(const Expression& man, int exp) + :man(man), exp(exp) + { + CGAL_HISTOGRAM_PROFILER("size (expression/exp)", static_cast(this->man.backend().size())); + } +#endif + +#endif + cpp_float(double d) + +#ifdef CGAL_DEBUG_CPPF + : rat(d) +#endif + { + // std::cout << "\ndouble = " << d << std::endl; + using boost::uint64_t; + union { +#ifdef CGAL_LITTLE_ENDIAN + struct { uint64_t man:52; uint64_t exp:11; uint64_t sig:1; } s; +#else /* CGAL_BIG_ENDIAN */ + //WARNING: untested! + struct { uint64_t sig:1; uint64_t exp:11; uint64_t man:52; } s; +#endif + double d; + } u; + u.d = d; + + uint64_t m; + uint64_t dexp = u.s.exp; + CGAL_assertion_msg(dexp != 2047, "Creating an cpp_float from infinity or NaN."); + if (dexp == 0) { + if (d == 0) { exp=0; return; } + else { // denormal number + m = u.s.man; + ++dexp; + } + } else { + m = (1LL << 52) | u.s.man; + } + + + int idexp = (int)dexp; + idexp -= 1023; + + // std::cout << "m = " << m << std::endl; + // std::cout << "idexp = " << idexp << std::endl; + + int shifted = internal::low_bit(m); + + m >>= shifted; + + int nbits = internal::high_bit(m); + // std::cout << "nbits = " << nbits << std::endl; + + exp = idexp - nbits; + man = m; + if(u.s.sig){ + man.backend().negate(); + } +#ifdef CGAL_DEBUG_CPPF + assert(rat.sign() == man.sign()); +#endif + // std::cout << "m = " << m << " * 2^" << exp << std::endl; + // fmt(m); + + CGAL_HISTOGRAM_PROFILER("size when constructed from double", static_cast(man.backend().size())); + } + + + friend std::ostream& operator<<(std::ostream& os, const cpp_float& m) + { + return os << m.to_double(); +#if 0 // dehug output + return os << m.man << " * 2 ^ " << m.exp << " ( " << m.to_double() << ") " +#ifdef CGAL_DEBUG_CPPF + << " " << m.rat +#endif + ; +#endif + } + + + friend std::istream& operator>>(std::istream& is, cpp_float& m) + { + double d; + is >> d; + m = cpp_float(d); + return is; + } + + + friend cpp_float operator-(cpp_float const&x) + { +#ifdef CGAL_DEBUG_CPPF + return cpp_float(-x.man,x.exp, -x.rat); +#else + return cpp_float(-x.man,x.exp); +#endif + } + + cpp_float& operator*=(const cpp_float& other) + { +#ifdef CGAL_DEBUG_CPPF + rat *= other.rat; +#endif + man *= other.man; + exp += other.exp; + return *this; + } + + friend + cpp_float operator*(const cpp_float& a, const cpp_float&b){ +#ifdef CGAL_DEBUG_CPPF + return cpp_float(a.man*b.man, a.exp+b.exp, a.rat * b.rat); +#else + return cpp_float(a.man*b.man, a.exp+b.exp); +#endif + } + + // Marc Glisse commented on github: + // We can sometimes end up with a mantissa that has quite a few zeros at the end, + // but the cases where the mantissa is too long by more than 1 limb should be negligible, + // and normalizing so the mantissa is always odd would have a cost. + cpp_float operator+=(const cpp_float& other) + { +#ifdef CGAL_DEBUG_CPPF + rat += other.rat; +#endif + int shift = exp - other.exp; + if(shift > 0){ + man = (man << shift) + other.man; + exp = other.exp; + }else if(shift < 0){ + man = man + (other.man << -shift); + }else{ + man += other.man; + } + return *this; + } + +#ifdef CGAL_DEBUG_CPPF + friend + cpp_float operator+(const cpp_float& a, const cpp_float&b){ + int shift = a.exp - b.exp; + if(shift > 0){ + return cpp_float((a.man << shift) + b.man, b.exp, a.rat+b.rat); + }else if(shift < 0){ + return cpp_float(a.man + (b.man << -shift), a.exp, a.rat+b.rat); + } + return cpp_float(a.man + b.man, a.exp, a.rat+b.rat); + } +#else + friend + cpp_float operator+(const cpp_float& a, const cpp_float&b){ + int shift = a.exp - b.exp; + CGAL_HISTOGRAM_PROFILER("shift+", CGAL::abs(shift)); + if(shift > 0){ + return cpp_float((a.man << shift) + b.man, b.exp); + }else if(shift < 0){ + return cpp_float(a.man + (b.man << -shift), a.exp); + } + return cpp_float(a.man + b.man, a.exp); + } +#endif + + cpp_float operator-=(const cpp_float& other) + { + +#ifdef CGAL_DEBUG_CPPF + rat -= other.rat; +#endif + int shift = exp - other.exp; + if(shift > 0){ + man <<= shift; + man -= other.man; + exp = other.exp; + }else if(shift < 0){ + man -= (other.man << -shift); + }else{ + man -= other.man; + } + return *this; + } + + #ifdef CGAL_DEBUG_CPPF + friend + cpp_float operator-(const cpp_float& a, const cpp_float&b){ + + int shift = a.exp - b.exp; + if(shift > 0){ + return cpp_float((a.man << shift) - b.man, b.exp, a.rat-b.rat); + }else if(shift < 0){ + return cpp_float(a.man - (b.man << -shift), a.exp, a.rat-b.rat); + } + return cpp_float(a.man - b.man, a.exp, a.rat-b.rat); + } +#else + friend + cpp_float operator-(const cpp_float& a, const cpp_float&b){ + + int shift = a.exp - b.exp; + CGAL_HISTOGRAM_PROFILER("shift-", CGAL::abs(shift)); + if(shift > 0){ + return cpp_float((a.man << shift) - b.man, b.exp); + }else if(shift < 0){ + return cpp_float(a.man - (b.man << -shift), a.exp); + } + return cpp_float(a.man - b.man, a.exp); + } +#endif + + bool is_positive() const + { + return CGAL::is_positive(man); + } + + bool is_negative() const + { + return CGAL::is_negative(man); + } + + // Would it make sense to compare the sign of the exponent? + // to distinguish the interval between ]-1,1[ from the rest. + friend bool operator<(const cpp_float& a, const cpp_float& b) + { + if(((! a.is_positive()) && b.is_positive()) + || (a.is_negative() && b.is_zero()))return true; + if(((! b.is_positive()) && a.is_positive()) + || (b.is_negative() && a.is_zero()))return false; + +#ifdef CGAL_DEBUG_CPPF + bool qres = a.rat < b.rat; +#endif + cpp_float d = b-a; +#ifdef CGAL_DEBUG_CPPF + assert(qres == d.is_positive()); +#endif + return d.is_positive(); + } + + friend bool operator>(cpp_float const&a, cpp_float const&b){ + return b=(cpp_float const&a, cpp_float const&b){ + return !(ab); + } + + + friend bool operator==(cpp_float const&a, cpp_float const&b){ + +#ifdef CGAL_DEBUG_CPPF + bool qres = a.rat == b.rat; +#endif + int shift = a.exp - b.exp; + CGAL_HISTOGRAM_PROFILER("shift==", CGAL::abs(shift)); + if(shift > 0){ + Mantissa ac = a.man << shift; +#ifdef CGAL_DEBUG_CPPF + assert( qres == (ac == b.man)); +#endif + return ac == b.man; + }else if(shift < 0){ + Mantissa bc = b.man << -shift; +#ifdef CGAL_DEBUG_CPPF + assert(qres == (a.man == bc)); +#endif + return a.man == bc; + } +#ifdef CGAL_DEBUG_CPPF + assert(qres == (a.man == b.man)); +#endif + return a.man==b.man; + } + + Comparison_result compare(const cpp_float& other) const + { + if(*this < other) return SMALLER; + if(*this > other) return LARGER; + return EQUAL; + } + + friend bool operator!=(cpp_float const&a, cpp_float const&b){ + return !(a==b); + } + + double to_double() const + { + if(exp == 0){ + return CGAL::to_double(man); + } + if(exp > 0){ + Mantissa as(man); + as <<= exp; + return CGAL::to_double(as); + } + Mantissa pow(1); + pow <<= -exp; + boost::multiprecision::cpp_rational r(man, pow); + return CGAL::to_double(r); + } + + std::pair to_interval() const + { + if(exp == 0){ + return CGAL::to_interval(man); + } + if(exp > 0){ + Mantissa as = man << exp; + return CGAL::to_interval(as); + } + Mantissa pow(1); + pow <<= -exp; + boost::multiprecision::cpp_rational r(man, pow); + return CGAL::to_interval(r); + } + + + bool is_zero () const { + return CGAL::is_zero(man); + } + + + bool is_one () const { + if(! is_positive()) return false; + + int msb = static_cast(boost::multiprecision::msb(man)); + if (msb != -exp) return false; + int lsb = static_cast(boost::multiprecision::lsb(man)); + return (msb == lsb); + } + + + CGAL::Sign sign () const + { + return CGAL::sign(man); + } + + std::size_t size() const + { + return man.backend().size(); + } +}; + + + template <> struct Algebraic_structure_traits< cpp_float > + : public Algebraic_structure_traits_base< cpp_float, Integral_domain_without_division_tag > { + typedef Tag_true Is_exact; + typedef Tag_false Is_numerical_sensitive; + + struct Is_zero + : public CGAL::cpp98::unary_function< Type, bool > { + bool operator()( const Type& x ) const { + return x.is_zero(); + } + }; + + struct Is_one + : public CGAL::cpp98::unary_function< Type, bool > { + bool operator()( const Type& x ) const { + return x.is_one(); + } + }; + + struct Gcd + : public CGAL::cpp98::binary_function< Type, Type, Type > { + Type operator()( + const Type& /* x */, + const Type& /* y */ ) const { + assert(false); + return Type(); // cpp_float_gcd(x, y); + } + }; + + struct Square + : public CGAL::cpp98::unary_function< Type, Type > { + Type operator()( const Type& x ) const { + return x*x ; // cpp_float_square(x); + } + }; + + struct Integral_division + : public CGAL::cpp98::binary_function< Type, Type, Type > { + Type operator()( + const Type& /* x */, + const Type& /* y */ ) const { + assert(false); + return Type(); // x / y; + } + }; + + struct Sqrt + : public CGAL::cpp98::unary_function< Type, Type > { + Type operator()( const Type& /* x */) const { + assert(false); + return Type(); // cpp_float_sqrt(x); + } + }; + + struct Is_square + : public CGAL::cpp98::binary_function< Type, Type&, bool > { + bool operator()( const Type& /* x */, Type& /* y */ ) const { + // TODO: avoid doing 2 calls. + assert(false); + return true; + } + bool operator()( const Type& /* x */) const { + assert(false); + return true; + } + }; + + }; + template <> struct Real_embeddable_traits< cpp_float > + : public INTERN_RET::Real_embeddable_traits_base< cpp_float , CGAL::Tag_true > { + struct Sgn + : public CGAL::cpp98::unary_function< Type, ::CGAL::Sign > { + ::CGAL::Sign operator()( const Type& x ) const { + return x.sign(); + } + }; + + struct To_double + : public CGAL::cpp98::unary_function< Type, double > { + double operator()( const Type& x ) const { + return x.to_double(); + } + }; + + struct Compare + : public CGAL::cpp98::binary_function< Type, Type, Comparison_result > { + Comparison_result operator()( + const Type& x, + const Type& y ) const { + return x.compare(y); + } + }; + + struct To_interval + : public CGAL::cpp98::unary_function< Type, std::pair< double, double > > { + std::pair operator()( const Type& x ) const { + return x.to_interval(); + } + }; + + }; + + +CGAL_DEFINE_COERCION_TRAITS_FOR_SELF(cpp_float) +CGAL_DEFINE_COERCION_TRAITS_FROM_TO(short ,cpp_float) +CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int ,cpp_float) +CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long ,cpp_float) +CGAL_DEFINE_COERCION_TRAITS_FROM_TO(float ,cpp_float) +CGAL_DEFINE_COERCION_TRAITS_FROM_TO(double ,cpp_float) + +} // namespace CGAL + + +#endif // CGAL_CPP_FLOAT_H diff --git a/thirdparty/CGAL/include/CGAL/create_offset_polygons_2.h b/thirdparty/CGAL/include/CGAL/create_offset_polygons_2.h index 03eb5d03..6985411f 100644 --- a/thirdparty/CGAL/include/CGAL/create_offset_polygons_2.h +++ b/thirdparty/CGAL/include/CGAL/create_offset_polygons_2.h @@ -3,8 +3,8 @@ // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h $ -// $Id: create_offset_polygons_2.h 6462cac 2022-06-23T16:29:11+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h $ +// $Id: include/CGAL/create_offset_polygons_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -14,6 +14,7 @@ #include +#include #include #include #include @@ -28,9 +29,9 @@ #include #include -#include +#include #include -#include +#include #include #include @@ -42,68 +43,8 @@ namespace CGAL { namespace CGAL_SS_i { -template -struct Is_same_type { typedef Tag_false type ; } ; - -template -struct Is_same_type { typedef Tag_true type ; } ; - -// The return type of create_interior/exterior_skeleton_and_offset_polygons_2: -// - if polygon input is a model of 'GeneralPolygonWithHoles_2', the return type -// should be the internal (hole-less) polygon type GeneralPolygonWithHoles_2::Polygon_2 -// - if polygon input is just a sequence container of points (e.g. Polygon_2), then the same type -// is expected in output -template ::value> -struct Default_return_polygon_type // Polygon type supports holes -{ - typedef typename std::conditional::type>::Kernel, - OfK>::value, - typename Polygon::Polygon_2, // correct kernel - CGAL::Polygon_2 /*incorrect kernel*/ >::type type; -}; - -template -struct Default_return_polygon_type // Polygon type does NOT support holes -{ - typedef typename std::conditional::type>::Kernel, - OfK>::value, - Polygon, // correct kernel - CGAL::Polygon_2 /*incorrect kernel*/ >::type type; -}; - -// The return type of create_interior/exterior_skeleton_and_offset_polygons_with_holes_2: -// - if polygon input is a model of 'GeneralPolygonWithHoles_2', the return type should be the same -// - if polygon input is just a sequence container of points (e.g. Polygon_2), then use -// General_polygon_with_holes_2 -template ::value> -struct Default_return_polygon_with_holes_type // Polygon type supports holes -{ - typedef typename std::conditional::type>::Kernel, - OfK>::value, - Polygon, // correct kernel - CGAL::Polygon_with_holes_2 /*incorrect kernel*/ >::type type; -}; - -template -struct Default_return_polygon_with_holes_type // Polygon type does NOT support holes -{ - // Maybe on paper the `conditional` should be `General_polygon_with_holes_2`... - typedef typename std::conditional::type>::Kernel, - OfK>::value, - CGAL::Polygon_with_holes_2, // correct kernel but no holes - CGAL::Polygon_with_holes_2 /*incorrect kernel*/ >::type type; -}; - template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_partial_interior_straight_skeleton_2 ( FT const& aMaxTime , PointIterator aOuterContour_VerticesBegin , PointIterator aOuterContour_VerticesEnd @@ -126,7 +67,7 @@ create_partial_interior_straight_skeleton_2 ( FT const& aMaxTime Cartesian_converter conv ; typename InputKernel::FT lMaxTime = aMaxTime; - boost::optional lOptMaxTime(conv(lMaxTime)) ; + std::optional lOptMaxTime(conv(lMaxTime)) ; SsBuilder ssb( lOptMaxTime ) ; @@ -139,7 +80,7 @@ create_partial_interior_straight_skeleton_2 ( FT const& aMaxTime } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_partial_exterior_straight_skeleton_2 ( FT const& aMaxOffset , PointIterator aVerticesBegin , PointIterator aVerticesEnd @@ -152,7 +93,7 @@ create_partial_exterior_straight_skeleton_2 ( FT const& aMaxOffset typedef typename Kernel_traits::Kernel IK; typedef typename IK::FT IFT; - boost::shared_ptr > rSkeleton; + std::shared_ptr > rSkeleton; // That's because we might not have FT == IK::FT (e.g. `double` and `Core`) // Note that we can also have IK != K (e.g. `Simple_cartesian` and `EPICK`) @@ -160,22 +101,21 @@ create_partial_exterior_straight_skeleton_2 ( FT const& aMaxOffset // @todo This likely should be done in the kernel K rather than the input kernel (i.e. the same // converter stuff that is done in `create_partial_exterior_straight_skeleton_2`?). - boost::optional margin = compute_outer_frame_margin(aVerticesBegin, + std::optional margin = compute_outer_frame_margin(aVerticesBegin, aVerticesEnd, lOffset); if ( margin ) { - double lm = CGAL::to_double(*margin); - Bbox_2 bbox = bbox_2(aVerticesBegin, aVerticesEnd); + const IFT lm = *margin; + const Bbox_2 bbox = bbox_2(aVerticesBegin, aVerticesEnd); - FT fxmin = bbox.xmin() - lm ; - FT fxmax = bbox.xmax() + lm ; - FT fymin = bbox.ymin() - lm ; - FT fymax = bbox.ymax() + lm ; + const IFT fxmin = IFT(bbox.xmin()) - lm ; + const IFT fxmax = IFT(bbox.xmax()) + lm ; + const IFT fymin = IFT(bbox.ymin()) - lm ; + const IFT fymax = IFT(bbox.ymax()) + lm ; Point_2 frame[4] ; - frame[0] = Point_2(fxmin,fymin) ; frame[1] = Point_2(fxmax,fymin) ; frame[2] = Point_2(fxmax,fymax) ; @@ -199,10 +139,10 @@ create_partial_exterior_straight_skeleton_2 ( FT const& aMaxOffset // Kernel != Skeleton::kernel. The skeleton is converted to Straight_skeleton_2 // template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& , Tag_false ) { - typedef boost::shared_ptr OutPolygonPtr ; + typedef std::shared_ptr OutPolygonPtr ; typedef std::vector OutPolygonPtrVector ; typedef Straight_skeleton_2 OfSkeleton ; @@ -212,7 +152,7 @@ create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& , Ta OutPolygonPtrVector rR ; - boost::shared_ptr lConvertedSs = convert_straight_skeleton_2(aSs); + std::shared_ptr lConvertedSs = convert_straight_skeleton_2(aSs); OffsetBuilder ob( *lConvertedSs ); ob.construct_offset_contours(aOffset, std::back_inserter(rR) ) ; @@ -223,10 +163,10 @@ create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& , Ta // Kernel == Skeleton::kernel, no conversion // template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& /*k*/, Tag_true ) { - typedef boost::shared_ptr OutPolygonPtr ; + typedef std::shared_ptr OutPolygonPtr ; typedef std::vector OutPolygonPtrVector ; typedef Polygon_offset_builder_traits_2 OffsetBuilderTraits; @@ -242,7 +182,7 @@ create_offset_polygons_2 ( FT const& aOffset, Skeleton const& aSs, K const& /*k* // Allow failure due to invalid straight skeletons to go through the users template -Skeleton const& dereference ( boost::shared_ptr const& ss ) +Skeleton const& dereference ( std::shared_ptr const& ss ) { CGAL_precondition(ss.get() != 0); return *ss; @@ -251,7 +191,7 @@ Skeleton const& dereference ( boost::shared_ptr const& ss ) } // namespace CGAL_SS_i template -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_offset_polygons_2(const FT& aOffset, const Skeleton& aSs, @@ -263,7 +203,7 @@ create_offset_polygons_2(const FT& aOffset, template, class FT, class Skeleton> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_offset_polygons_2(const FT& aOffset, const Skeleton& aSs) @@ -278,7 +218,7 @@ create_offset_polygons_2(const FT& aOffset, template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aOuterBoundary, @@ -302,7 +242,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aOuterBoundary, @@ -319,14 +259,14 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, // Overload where Polygon actually is a simple polygon (no holes) template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, const OfK& ofk, const SsK& ssk, - typename std::enable_if< - ! CGAL_SS_i::has_Hole_const_iterator::value>::type* = nullptr) + std::enable_if_t< + ! CGAL_SS_i::has_Hole_const_iterator::value>* = nullptr) { std::vector no_holes; return create_interior_skeleton_and_offset_polygons_2(aOffset, aPoly, @@ -337,7 +277,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, // Overloads common to both polygons with and without holes, a simple polygon is returned in any case template::type> -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, @@ -350,7 +290,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly) @@ -369,14 +309,14 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, // Overload where Polygon actually is a simple polygon (no holes) template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, const OfK& ofk, const SsK& ssk, - typename std::enable_if< - ! CGAL_SS_i::has_Hole_const_iterator::value>::type* = nullptr) + std::enable_if_t< + ! CGAL_SS_i::has_Hole_const_iterator::value>* = nullptr) { return create_offset_polygons_2( aOffset, @@ -389,10 +329,10 @@ create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, ofk); } -// Overloads common to both polygons with and without holes, a simple polygons are returned in any case +// Overloads common to both polygons with and without holes, a simple polygons is returned in any case template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly, @@ -405,7 +345,7 @@ create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector< boost::shared_ptr > +std::vector< std::shared_ptr > inline create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, const APolygon& aPoly) @@ -414,6 +354,6 @@ create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, Exact_predicates_inexact_constructions_kernel()); } -} // end namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_CREATE_OFFSET_POLYGONS_2_H diff --git a/thirdparty/CGAL/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h b/thirdparty/CGAL/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h index 332a3661..2da7b49a 100644 --- a/thirdparty/CGAL/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h +++ b/thirdparty/CGAL/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h @@ -3,8 +3,8 @@ // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h $ -// $Id: create_offset_polygons_from_polygon_with_holes_2.h 6462cac 2022-06-23T16:29:11+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h $ +// $Id: include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -21,7 +21,7 @@ #include -#include +#include #include #include @@ -38,14 +38,14 @@ namespace CGAL { // overload where PolygonWithHoles actually is a type of Polygon that supports holes template::type> // Hole-less polygon type -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, const PolygonWithHoles& aPoly, const OfK& ofk, const SsK& ssk, - typename std::enable_if< - CGAL_SS_i::has_Hole_const_iterator::value>::type* = nullptr) + std::enable_if_t< + CGAL_SS_i::has_Hole_const_iterator::value>* = nullptr) { return create_interior_skeleton_and_offset_polygons_2(aOffset, aPoly.outer_boundary(), aPoly.holes_begin(), aPoly.holes_end(), @@ -57,7 +57,7 @@ create_interior_skeleton_and_offset_polygons_2(const FT& aOffset, // Polygon might be a Polygon with holes or not, but it returns a Polygon with holes template::type> -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -70,7 +70,7 @@ create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -83,7 +83,7 @@ create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly) @@ -102,7 +102,7 @@ create_interior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, // Polygon might be a Polygon with holes or not, but it returns a Polygon with holes template::type> -std::vector > +std::vector > inline create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -110,26 +110,14 @@ create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const SsK& ssk) { typedef typename CGAL_SS_i::Default_return_polygon_type::type Polygon_; - std::vector > raw_output = + std::vector > raw_output = create_exterior_skeleton_and_offset_polygons_2(aOffset, aPoly, ofk, ssk); // filter offset of the outer frame - typename OfK::Point_2 xtrm_pt = *(raw_output[0]->begin()); - std::size_t outer_id=0; - for(std::size_t i=0; iorientation() == COUNTERCLOCKWISE) - { - for (const typename OfK::Point_2& p : raw_output[i]->container()) - if (p < xtrm_pt) - { - xtrm_pt=p; - outer_id=i; - } - } - if (outer_id != (raw_output.size()-1)) - std::swap(raw_output[outer_id], raw_output.back()); + std::swap(raw_output[0], raw_output.back()); raw_output.pop_back(); - for (boost::shared_ptr ptr : raw_output) + + for (std::shared_ptr ptr : raw_output) ptr->reverse_orientation(); return arrange_offset_polygons_2(raw_output); @@ -140,23 +128,23 @@ create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, // overload where PolygonWithHoles actually is a type of Polygon that supports holes template::type> -std::vector > +std::vector > inline create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, const PolygonWithHoles& aPoly, const OfK& ofk, const SsK& ssk, - typename std::enable_if< - CGAL_SS_i::has_Hole_const_iterator::value>::type* = nullptr) + std::enable_if_t< + CGAL_SS_i::has_Hole_const_iterator::value>* = nullptr) { - std::vector > polygons = + std::vector > polygons = create_exterior_skeleton_and_offset_polygons_2(aOffset, aPoly.outer_boundary(), ofk, ssk); for (typename PolygonWithHoles::Hole_const_iterator hit=aPoly.holes_begin(); hit!=aPoly.holes_end(); ++hit) { typename PolygonWithHoles::Polygon_2 hole = *hit; hole.reverse_orientation(); - std::vector > hole_polygons = + std::vector > hole_polygons = create_interior_skeleton_and_offset_polygons_2(aOffset, hole, ofk,ssk); @@ -168,7 +156,7 @@ create_exterior_skeleton_and_offset_polygons_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly, @@ -181,7 +169,7 @@ create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, template::type> -std::vector > +std::vector > inline create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, const Polygon& aPoly) @@ -190,6 +178,6 @@ create_exterior_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, Exact_predicates_inexact_constructions_kernel()); } -} // end namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_CREATE_OFFSET_POLYGONS_FROM_POLYGON_WITH_HOLES_2_H diff --git a/thirdparty/CGAL/include/CGAL/create_straight_skeleton_2.h b/thirdparty/CGAL/include/CGAL/create_straight_skeleton_2.h index 7f5f223d..85a2e552 100644 --- a/thirdparty/CGAL/include/CGAL/create_straight_skeleton_2.h +++ b/thirdparty/CGAL/include/CGAL/create_straight_skeleton_2.h @@ -3,8 +3,8 @@ // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/create_straight_skeleton_2.h $ -// $Id: create_straight_skeleton_2.h 05e4c44 2020-10-16T14:38:11+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/create_straight_skeleton_2.h $ +// $Id: include/CGAL/create_straight_skeleton_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -15,14 +15,16 @@ #include #include +#include #include -#include #include #include +#include +#include -#include -#include +#include +#include #include #include @@ -31,7 +33,7 @@ namespace CGAL { template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin , PointIterator aOuterContour_VerticesEnd , HoleIterator aHolesBegin @@ -61,7 +63,7 @@ create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin } template -boost::shared_ptr< Straight_skeleton_2< Exact_predicates_inexact_constructions_kernel > > +std::shared_ptr< Straight_skeleton_2< Exact_predicates_inexact_constructions_kernel > > inline create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin , PointIterator aOuterContour_VerticesEnd @@ -78,7 +80,7 @@ create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin , PointIterator aOuterContour_VerticesEnd @@ -98,7 +100,7 @@ create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin , PointIterator aOuterContour_VerticesEnd @@ -111,12 +113,12 @@ create_interior_straight_skeleton_2 ( PointIterator aOuterContour_VerticesBegin } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_interior_straight_skeleton_2 ( Polygon const& aOutContour, K const& k, - typename std::enable_if< - ! CGAL_SS_i::has_Hole_const_iterator::value>::type* = nullptr) + std::enable_if_t< + ! CGAL_SS_i::has_Hole_const_iterator::value>* = nullptr) { return create_interior_straight_skeleton_2(CGAL_SS_i::vertices_begin(aOutContour) ,CGAL_SS_i::vertices_end(aOutContour) @@ -125,7 +127,7 @@ create_interior_straight_skeleton_2 ( Polygon const& aOutContour, } template -boost::shared_ptr< Straight_skeleton_2< Exact_predicates_inexact_constructions_kernel > > +std::shared_ptr< Straight_skeleton_2< Exact_predicates_inexact_constructions_kernel > > inline create_interior_straight_skeleton_2 ( Polygon const& aOutContour ) { @@ -138,7 +140,7 @@ create_interior_straight_skeleton_2 ( Polygon const& aOutContour ) /// EXTERIOR template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > create_exterior_straight_skeleton_2 ( FT const& aMaxOffset , PointIterator aVerticesBegin , PointIterator aVerticesEnd @@ -151,7 +153,7 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset typedef typename Kernel_traits::Kernel IK; typedef typename IK::FT IFT; - boost::shared_ptr > rSkeleton; + std::shared_ptr > rSkeleton; // That's because we might not have FT == IK::FT (e.g. `double` and `Core`) // Note that we can also have IK != K (e.g. `Simple_cartesian` and `EPICK`) @@ -159,22 +161,21 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset // @todo This likely should be done in the kernel K rather than the input kernel (i.e. the same // converter stuff that is done in `create_partial_exterior_straight_skeleton_2`?). - boost::optional margin = compute_outer_frame_margin( aVerticesBegin, + std::optional margin = compute_outer_frame_margin( aVerticesBegin, aVerticesEnd, lOffset ); if ( margin ) { - const double lm = CGAL::to_double(*margin); - Bbox_2 bbox = bbox_2(aVerticesBegin, aVerticesEnd); + const IFT lm = *margin; + const Bbox_2 bbox = bbox_2(aVerticesBegin, aVerticesEnd); - FT fxmin = bbox.xmin() - lm ; - FT fxmax = bbox.xmax() + lm ; - FT fymin = bbox.ymin() - lm ; - FT fymax = bbox.ymax() + lm ; + const IFT fxmin = IFT(bbox.xmin()) - lm ; + const IFT fxmax = IFT(bbox.xmax()) + lm ; + const IFT fymin = IFT(bbox.ymin()) - lm ; + const IFT fymax = IFT(bbox.ymax()) + lm ; Point_2 frame[4] ; - frame[0] = Point_2(fxmin,fymin) ; frame[1] = Point_2(fxmax,fymin) ; frame[2] = Point_2(fxmax,fymax) ; @@ -195,7 +196,7 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_exterior_straight_skeleton_2 ( FT const& aMaxOffset , PointIterator aVerticesBegin @@ -210,7 +211,7 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_exterior_straight_skeleton_2 ( FT const& aMaxOffset, Polygon const& aPoly, K const& k ) { @@ -222,7 +223,7 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset, Polygon const& aPoly } template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_exterior_straight_skeleton_2 ( FT const& aMaxOffset, Polygon const& aPoly ) { @@ -232,6 +233,6 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset, Polygon const& aPoly ); } -} // end namespace CGAL +} // namespace CGAL -#endif // CGAL_STRAIGHT_SKELETON_BUILDER_2_H // +#endif // CGAL_CREATE_STRAIGHT_SKELETON_2_H diff --git a/thirdparty/CGAL/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h b/thirdparty/CGAL/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h index be86ebac..488269e3 100644 --- a/thirdparty/CGAL/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h +++ b/thirdparty/CGAL/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h @@ -3,8 +3,8 @@ // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h $ -// $Id: create_straight_skeleton_from_polygon_with_holes_2.h 9051fc1 2020-10-08T22:54:11+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h $ +// $Id: include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -20,19 +20,19 @@ #include -#include +#include #include namespace CGAL { template -boost::shared_ptr< Straight_skeleton_2 > +std::shared_ptr< Straight_skeleton_2 > inline create_interior_straight_skeleton_2 ( Polygon const& aPolyWithHoles, K const& k, - typename std::enable_if< - CGAL_SS_i::has_Hole_const_iterator::value>::type* = nullptr) + std::enable_if_t< + CGAL_SS_i::has_Hole_const_iterator::value>* = nullptr) { return create_interior_straight_skeleton_2(aPolyWithHoles.outer_boundary().vertices_begin() ,aPolyWithHoles.outer_boundary().vertices_end () @@ -45,6 +45,6 @@ create_interior_straight_skeleton_2 ( Polygon const& aPolyWithHoles, // create_exterior_straight_skeleton_2() for polygon with holes is simply in create_straight_skeleton_2.h // as the holes do not matter. -} // end namespace CGAL +} // namespace CGAL -#endif // CGAL_STRAIGHT_SKELETON_BUILDER_2_H // +#endif // CGAL_CREATE_STRAIGHT_SKELETON_FROM_POLYGON_WITH_HOLES_2_H diff --git a/thirdparty/CGAL/include/CGAL/create_weighted_offset_polygons_2.h b/thirdparty/CGAL/include/CGAL/create_weighted_offset_polygons_2.h new file mode 100644 index 00000000..aaf12c0e --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/create_weighted_offset_polygons_2.h @@ -0,0 +1,382 @@ +// Copyright (c) 2006-2008 Fernando Luis Cacciola Carballal. All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// + +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/create_weighted_offset_polygons_2.h $ +// $Id: include/CGAL/create_weighted_offset_polygons_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Fernando Cacciola +// +#ifndef CGAL_CREATE_WEIGHTED_OFFSET_POLYGONS_2_H +#define CGAL_CREATE_WEIGHTED_OFFSET_POLYGONS_2_H + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +namespace CGAL { + +namespace CGAL_SS_i { + +// ==== WARNING ==== +// There is currently no way to recover simply-connectedness (see EnforceSimpleConnectedness()) +// for faces that have fictitious vertices. Non-simply-connected faces can be created +// with skeletons of weighted polygons with holes. +// +// As such, you should either: +// - Use this function without holes (aHolesBegin == aHolesEnd) +// - Use this function with holes, but with weights set up such that there can be no non-simply connected +// skeleton faces with fictitious vertices. This is for example the case when calling exterior skeleton: +// the weights of the frame are set up to be very large and guarantee that no non-simply connected face +// can appear. +// +// see also tags @partial_wsls_pwh + +// If you are using this with some holes, you should know what you are doing +template +std::shared_ptr< Straight_skeleton_2 > +create_partial_interior_weighted_straight_skeleton_2 ( const FT& aMaxTime, + PointIterator aOuterContour_VerticesBegin, + PointIterator aOuterContour_VerticesEnd, + HoleIterator aHolesBegin, + HoleIterator aHolesEnd, + WeightIterator aOuterContour_WeightsBegin, + WeightIterator aOuterContour_WeightsEnd, + HoleWeightsIterator aHoles_WeightsBegin, + HoleWeightsIterator aHoles_WeightsEnd, + const K& // aka 'SK' + ) +{ + CGAL_precondition( aMaxTime > static_cast(0) ) ; + + typedef Straight_skeleton_2 Ss ; + typedef Straight_skeleton_builder_traits_2 SsBuilderTraits; + typedef Straight_skeleton_builder_2 SsBuilder; + + typedef typename K::FT KFT ; + + typedef typename std::iterator_traits::value_type InputPoint ; + typedef typename Kernel_traits::Kernel InputKernel ; + typedef typename InputKernel::FT InputFT ; + + CGAL_precondition(std::distance(aOuterContour_VerticesBegin, aOuterContour_VerticesEnd) == std::distance(aOuterContour_WeightsBegin, aOuterContour_WeightsEnd)); + CGAL_precondition(std::distance(aHolesBegin, aHolesEnd) == std::distance(aHoles_WeightsBegin, aHoles_WeightsEnd)); + + Cartesian_converter conv; + NT_converter wconv; + + InputFT lMaxTime = aMaxTime; + std::optional lOptMaxTime(conv(lMaxTime)) ; + + SsBuilder ssb( lOptMaxTime ) ; + + ssb.enter_contour ( aOuterContour_VerticesBegin, aOuterContour_VerticesEnd, conv ) ; + ssb.enter_contour_weights ( aOuterContour_WeightsBegin, aOuterContour_WeightsEnd, wconv ) ; + + for(HoleIterator hi = aHolesBegin; hi != aHolesEnd && aHoles_WeightsBegin != aHoles_WeightsEnd; ++ hi, ++aHoles_WeightsBegin) + { + CGAL_precondition(std::distance(CGAL_SS_i::vertices_begin(*hi), CGAL_SS_i::vertices_end(*hi)) == + std::distance(aHoles_WeightsBegin->begin(), aHoles_WeightsBegin->end())); + ssb.enter_contour(CGAL_SS_i::vertices_begin(*hi), CGAL_SS_i::vertices_end(*hi), conv); + ssb.enter_contour_weights(aHoles_WeightsBegin->begin(), aHoles_WeightsBegin->end(), wconv); + } + + return ssb.construct_skeleton(); +} + +template +std::shared_ptr< Straight_skeleton_2 > +create_partial_exterior_weighted_straight_skeleton_2(const FT& aMaxOffset, + PointIterator aVerticesBegin, + PointIterator aVerticesEnd, + WeightIterator aWeightsBegin, + WeightIterator aWeightsEnd, + const K& k // aka 'SK' + ) +{ + CGAL_precondition(aMaxOffset > 0); + CGAL_precondition(std::distance(aWeightsBegin, aWeightsEnd) == std::distance(aVerticesBegin, aVerticesEnd)); + + typedef typename std::iterator_traits::value_type Point_2; + typedef typename Kernel_traits::Kernel IK; + typedef typename IK::FT IFT; + + std::shared_ptr > rSkeleton; + + // That's because we might not have FT == IK::FT (e.g. `double` and `Core`) + // Note that we can also have IK != K (e.g. `Simple_cartesian` and `EPICK`) + IFT lOffset = aMaxOffset; + + // @todo This likely should be done in the kernel K rather than the input kernel (i.e. the same + // converter stuff that is done in `create_partial_exterior_straight_skeleton_2`?). + std::optional margin = compute_outer_frame_margin(aVerticesBegin, + aVerticesEnd, + aWeightsBegin, + aWeightsEnd, + lOffset); + + if ( margin ) + { + const IFT lm = *margin; + const Bbox_2 bbox = bbox_2(aVerticesBegin, aVerticesEnd); + + const IFT fxmin = IFT(bbox.xmin()) - lm ; + const IFT fxmax = IFT(bbox.xmax()) + lm ; + const IFT fymin = IFT(bbox.ymin()) - lm ; + const IFT fymax = IFT(bbox.ymax()) + lm ; + + Point_2 frame[4] ; + + frame[0] = Point_2(fxmin,fymin) ; + frame[1] = Point_2(fxmax,fymin) ; + frame[2] = Point_2(fxmax,fymax) ; + frame[3] = Point_2(fxmin,fymax) ; + + CGAL_STSKEL_BUILDER_TRACE(2, "Frame:\n" << frame[0] << "\n" << frame[1] << "\n" << frame[2] << "\n" << frame[3]); + + typedef std::vector Hole ; + + Hole lPoly(aVerticesBegin, aVerticesEnd); + std::reverse(lPoly.begin(), lPoly.end()); + + std::vector holes ; + holes.push_back(lPoly) ; + + // put a weight large enough such that frame edges are not relevant + const FT frame_weight = FT(10) * *(std::max_element(aWeightsBegin, aWeightsEnd)); + CGAL_STSKEL_BUILDER_TRACE(4, "Frame weight = " << frame_weight); + + std::vector lFrameWeights(4, frame_weight); + std::vector > lHoleWeights; + lHoleWeights.emplace_back(aWeightsBegin, aWeightsEnd); + + // If w[0] pointed to v_0, then when we reverse the polygon, the last polygon is pointing to v_{n-1} + // but it is the edge v_0 v_{n-1}, which has the weight w_0. + std::reverse(lHoleWeights[0].begin(), lHoleWeights[0].end()); + std::rotate(lHoleWeights[0].rbegin(), lHoleWeights[0].rbegin()+1, lHoleWeights[0].rend()); + + // weights ensure that we cannot create a non-simply connected face with a frame halfedge + rSkeleton = create_partial_interior_weighted_straight_skeleton_2(aMaxOffset, + frame, frame+4, + holes.begin(), holes.end(), + lFrameWeights.begin(), lFrameWeights.end(), + lHoleWeights.begin(), lHoleWeights.end(), + k ) ; + } + + return rSkeleton ; +} + +} // namespace CGAL_SS_i + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// INTERIOR + +template::type> +std::vector< std::shared_ptr > +inline +create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, + const APolygon& aOuterBoundary, + HoleIterator aHolesBegin, + HoleIterator aHolesEnd, + const Weights& aWeights, + HoleWeightsIterator aHoles_WeightsBegin, + HoleWeightsIterator aHoles_WeightsEnd, + const OfK& ofk, + const SsK& ssk) +{ + if(aHolesBegin == aHolesEnd) // see @partial_wsls_pwh + { + return create_offset_polygons_2( + aOffset, + CGAL_SS_i::dereference( + CGAL_SS_i::create_partial_interior_weighted_straight_skeleton_2( + aOffset, + CGAL_SS_i::vertices_begin(aOuterBoundary), + CGAL_SS_i::vertices_end (aOuterBoundary), + aHolesBegin, + aHolesEnd, + std::begin(aWeights), + std::end(aWeights), + aHoles_WeightsBegin, + aHoles_WeightsEnd, + ssk)), + ofk); + } + else + { + return create_offset_polygons_2( + aOffset, + CGAL_SS_i::dereference( + CGAL::create_interior_weighted_straight_skeleton_2( + CGAL_SS_i::vertices_begin(aOuterBoundary), + CGAL_SS_i::vertices_end (aOuterBoundary), + aHolesBegin, + aHolesEnd, + std::begin(aWeights), + std::end(aWeights), + aHoles_WeightsBegin, + aHoles_WeightsEnd, + ssk)), + ofk); + } +} + +template::type> +std::vector< std::shared_ptr > +inline +create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, + const APolygon& aOuterBoundary, + HoleIterator aHolesBegin, + HoleIterator aHolesEnd, + const Weights& aWeights, + const OfK& ofk) +{ + return create_interior_weighted_skeleton_and_offset_polygons_2(aOffset, aOuterBoundary, + aHolesBegin, aHolesEnd, + aWeights, + ofk, + Exact_predicates_inexact_constructions_kernel()); +} + +// Overload where Polygon actually is a simple polygon (no holes) +template::type> +std::vector< std::shared_ptr > +inline +create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, + const APolygon& aPoly, + const Weights& aWeights, + const OfK& ofk, + const SsK& ssk, + std::enable_if_t< + ! CGAL_SS_i::has_Hole_const_iterator::value>* = nullptr) +{ + std::vector no_holes; + return create_interior_weighted_skeleton_and_offset_polygons_2(aOffset, aPoly, + no_holes.begin(), no_holes.end(), + aWeights, + ofk, ssk); +} + +// Overloads common to both polygons with and without holes, a simple polygon is returned in any case +template::type> +std::vector > +inline +create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, + const APolygon& aPoly, + const Weights& aWeights, + const OfK& ofk) +{ + return create_interior_weighted_skeleton_and_offset_polygons_2(aOffset, aPoly, aWeights, ofk, + Exact_predicates_inexact_constructions_kernel()); +} + +template::type> +std::vector > +inline +create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, + const APolygon& aPoly, + const Weights& aWeights) +{ + return create_interior_weighted_skeleton_and_offset_polygons_2(aOffset, aPoly, aWeights, + Exact_predicates_inexact_constructions_kernel()); +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// EXTERIOR + +/*! create_exterior_skeleton_and_offset_polygons_2 (no sorting of the result) */ + +// Overload where Polygon actually is a simple polygon (no holes) +template::type> +std::vector< std::shared_ptr > +inline +create_exterior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, + const APolygon& aPoly, + const Weights& aWeights, + const OfK& ofk, + const SsK& ssk, + std::enable_if_t< + ! CGAL_SS_i::has_Hole_const_iterator::value>* = nullptr) +{ + return create_offset_polygons_2( + aOffset, + CGAL_SS_i::dereference( + CGAL_SS_i::create_partial_exterior_weighted_straight_skeleton_2( + aOffset, + CGAL_SS_i::vertices_begin(aPoly), + CGAL_SS_i::vertices_end (aPoly), + aWeights[0].begin(), + aWeights[0].end(), + ssk)), + ofk); +} + +// Overloads common to both polygons with and without holes, a simple polygons is returned in any case +template::type> +std::vector< std::shared_ptr > +inline +create_exterior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, + const APolygon& aPoly, + const Weights& aWeights, + const OfK& ofk) +{ + return create_exterior_weighted_skeleton_and_offset_polygons_2(aOffset, aPoly, aWeights, ofk, + Exact_predicates_inexact_constructions_kernel()); +} + +template::type> +std::vector< std::shared_ptr > +inline +create_exterior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, + const APolygon& aPoly, + const Weights& aWeights) +{ + return create_exterior_weighted_skeleton_and_offset_polygons_2(aOffset, aPoly, aWeights, + Exact_predicates_inexact_constructions_kernel()); +} + +} // namespace CGAL + +#endif // CGAL_CREATE_WEIGHTED_OFFSET_POLYGONS_2_H diff --git a/thirdparty/CGAL/include/CGAL/create_weighted_offset_polygons_from_polygon_with_holes_2.h b/thirdparty/CGAL/include/CGAL/create_weighted_offset_polygons_from_polygon_with_holes_2.h new file mode 100644 index 00000000..b3d0eae5 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/create_weighted_offset_polygons_from_polygon_with_holes_2.h @@ -0,0 +1,196 @@ +// Copyright (c) 2006-2008 Fernando Luis Cacciola Carballal. All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// + +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/create_weighted_offset_polygons_from_polygon_with_holes_2.h $ +// $Id: include/CGAL/create_weighted_offset_polygons_from_polygon_with_holes_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Fernando Cacciola +// +#ifndef CGAL_CREATE_WEIGHTED_OFFSET_POLYGONS_FROM_POLYGON_WITH_HOLES_2_H +#define CGAL_CREATE_WEIGHTED_OFFSET_POLYGONS_FROM_POLYGON_WITH_HOLES_2_H + +#include + +#include +#include +#include +#include + +#include + +#include +#include +#include + +namespace CGAL { + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// INTERIOR + +/*! create_interior_skeleton_and_offset_polygons_2 (no sorting of the result) */ + +// overload where PolygonWithHoles actually is a type of Polygon that supports holes +template::type> // Hole-less polygon type +std::vector > +inline +create_interior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, + const PolygonWithHoles& aPoly, + const Weights& aWeights, + const OfK& ofk, + const SsK& ssk, + std::enable_if_t< + CGAL_SS_i::has_Hole_const_iterator::value>* = nullptr) +{ + return create_interior_weighted_skeleton_and_offset_polygons_2(aOffset, aPoly.outer_boundary(), + aPoly.holes_begin(), aPoly.holes_end(), + aWeights[0], + std::next(std::begin(aWeights)), + std::end(aWeights), + ofk, ssk); +} + +/*! create_interior_weighted_skeleton_and_offset_polygons_with_holes_2 (orders the resulting polygons) */ + +// Polygon might be a Polygon with holes or not, but it returns a Polygon with holes +template::type> +std::vector > +inline +create_interior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, + const Polygon& aPoly, + const Weights& aWeights, + const OfK& ofk, + const SsK& ssk) +{ + return arrange_offset_polygons_2( + create_interior_weighted_skeleton_and_offset_polygons_2(aOffset, aPoly, aWeights, ofk, ssk)); +} + +template::type> +std::vector > +inline +create_interior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, + const Polygon& aPoly, + const Weights& aWeights, + const OfK& ofk) +{ + return create_interior_weighted_skeleton_and_offset_polygons_with_holes_2(aOffset, aPoly, aWeights, ofk, + Exact_predicates_inexact_constructions_kernel()); +} + +template::type> +std::vector > +inline +create_interior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, + const Polygon& aPoly, + const Weights& aWeights) +{ + return create_interior_weighted_skeleton_and_offset_polygons_with_holes_2(aOffset, aPoly, aWeights, + Exact_predicates_inexact_constructions_kernel()); +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// EXTERIOR + +/*! create_exterior_skeleton_and_offset_polygons_with_holes_2 (orders the resulting polygons) */ + +// Polygon might be a Polygon with holes or not, but it returns a Polygon with holes +template::type> +std::vector > +create_exterior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, + const Polygon& aPoly, + const Weights& aWeights, + const OfK& ofk, + const SsK& ssk) +{ + typedef typename CGAL_SS_i::Default_return_polygon_type::type Polygon_; + std::vector > raw_output = + create_exterior_weighted_skeleton_and_offset_polygons_2(aOffset, aPoly, aWeights, ofk, ssk); + + // filter offset of the outer frame + std::swap(raw_output[0], raw_output.back()); + raw_output.pop_back(); + + for(std::shared_ptr ptr : raw_output) + ptr->reverse_orientation(); + + return arrange_offset_polygons_2(raw_output); +} + +/*! create_interior_skeleton_and_offset_polygons_2 with a polygon with holes */ + +// overload where PolygonWithHoles actually is a type of Polygon that supports holes +template::type> +std::vector > +inline +create_exterior_weighted_skeleton_and_offset_polygons_2(const FT& aOffset, + const PolygonWithHoles& aPoly, + const Weights& aWeights, + const OfK& ofk, + const SsK& ssk, + std::enable_if_t< + CGAL_SS_i::has_Hole_const_iterator::value>* = nullptr) +{ + CGAL_precondition(aWeights.size() == aPoly.number_of_holes() + 1); + + std::vector > polygons = + create_exterior_weighted_skeleton_and_offset_polygons_2(aOffset, aPoly.outer_boundary(), {aWeights[0]}, ofk, ssk); + + std::size_t weight_pos = 1; + for(typename PolygonWithHoles::Hole_const_iterator hit=aPoly.holes_begin(); hit!=aPoly.holes_end(); ++hit, ++weight_pos) + { + typename PolygonWithHoles::Polygon_2 hole = *hit; + hole.reverse_orientation(); + std::vector > hole_polygons = + create_interior_skeleton_and_offset_polygons_2(aOffset, + hole, + {aWeights[weight_pos]}, + ofk, ssk); + polygons.insert(polygons.end(), hole_polygons.begin(), hole_polygons.end()); + } + + return polygons; +} + +template::type> +std::vector > +inline +create_exterior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, + const Polygon& aPoly, + const Weights& aWeights, + const OfK& ofk) +{ + return create_exterior_weighted_skeleton_and_offset_polygons_with_holes_2(aOffset, aPoly, aWeights, ofk, + Exact_predicates_inexact_constructions_kernel()); +} + +template::type> +std::vector > +inline +create_exterior_weighted_skeleton_and_offset_polygons_with_holes_2(const FT& aOffset, + const Polygon& aPoly, + const Weights& aWeights) +{ + return create_exterior_weighted_skeleton_and_offset_polygons_with_holes_2(aOffset, aPoly, aWeights, + Exact_predicates_inexact_constructions_kernel()); +} + +} // namespace CGAL + +#endif // CGAL_CREATE_WEIGHTED_OFFSET_POLYGONS_FROM_POLYGON_WITH_HOLES_2_H diff --git a/thirdparty/CGAL/include/CGAL/create_weighted_straight_skeleton_2.h b/thirdparty/CGAL/include/CGAL/create_weighted_straight_skeleton_2.h new file mode 100644 index 00000000..a08dacce --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/create_weighted_straight_skeleton_2.h @@ -0,0 +1,316 @@ +// Copyright(c) 2006 Fernando Luis Cacciola Carballal. All rights reserved. +// +// This file is part of CGAL(www.cgal.org). +// + +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/create_weighted_straight_skeleton_2.h $ +// $Id: include/CGAL/create_weighted_straight_skeleton_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Mael Rouxel-Labbé +// +#ifndef CGAL_CREATE_WEIGHTED_STRAIGHT_SKELETON_2_H +#define CGAL_CREATE_WEIGHTED_STRAIGHT_SKELETON_2_H + +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +namespace CGAL { + +template +std::shared_ptr > +create_interior_weighted_straight_skeleton_2(PointIterator outer_contour_vertices_begin, + PointIterator outer_contour_vertices_end, + HoleIterator holes_begin, + HoleIterator holes_end, + WeightIterator outer_contour_weights_begin, + WeightIterator outer_contour_weights_end, + HoleWeightsIterator holes_weights_begin, + HoleWeightsIterator holes_weights_end, + const K&) +{ + using Skeleton = Straight_skeleton_2; + + using Skeleton_build_traits = Straight_skeleton_builder_traits_2; + + using Skeleton_builder = Straight_skeleton_builder_2; + + using Input_point = typename std::iterator_traits::value_type; + using Input_kernel = typename Kernel_traits::Kernel; + + CGAL_precondition(std::distance(outer_contour_vertices_begin, outer_contour_vertices_end) == + std::distance(outer_contour_weights_begin, outer_contour_weights_end)); + CGAL_precondition(std::distance(holes_begin, holes_end) == + std::distance(holes_weights_begin, holes_weights_end)); + + Cartesian_converter point_converter; + NT_converter weight_converter; + + Skeleton_builder ssb; + ssb.enter_contour(outer_contour_vertices_begin, outer_contour_vertices_end, point_converter); + ssb.enter_contour_weights(outer_contour_weights_begin, outer_contour_weights_end, weight_converter); + + for(HoleIterator hi = holes_begin; hi != holes_end && holes_weights_begin != holes_weights_end; ++hi, ++holes_weights_begin) + { + CGAL_precondition(std::distance(CGAL_SS_i::vertices_begin(*hi), CGAL_SS_i::vertices_end(*hi)) == + std::distance(holes_weights_begin->begin(), holes_weights_begin->end())); + ssb.enter_contour(CGAL_SS_i::vertices_begin(*hi), CGAL_SS_i::vertices_end(*hi), point_converter); + ssb.enter_contour_weights(holes_weights_begin->begin(), holes_weights_begin->end(), weight_converter); + } + + return ssb.construct_skeleton(); +} + +template +std::shared_ptr > +inline +create_interior_weighted_straight_skeleton_2(PointIterator outer_contour_vertices_begin, + PointIterator outer_contour_vertices_end, + HoleIterator holes_begin, + HoleIterator holes_end, + WeightIterator outer_contour_weights_begin, + WeightIterator outer_contour_weights_end, + HoleWeightsIterator holes_weights_begin, + HoleWeightsIterator holes_weights_end) +{ + return create_interior_weighted_straight_skeleton_2(outer_contour_vertices_begin, outer_contour_vertices_end, + holes_begin, holes_end, + outer_contour_weights_begin, outer_contour_weights_end, + holes_weights_begin, holes_weights_end, + Exact_predicates_inexact_constructions_kernel()); +} + +template +std::shared_ptr > +inline +create_interior_weighted_straight_skeleton_2(PointIterator outer_contour_vertices_begin, + PointIterator outer_contour_vertices_end, + WeightIterator outer_contour_weights_begin, + WeightIterator outer_contour_weights_end, + const K& k) +{ + using InputPoint = typename std::iterator_traits::value_type; + using InputKernel = typename Kernel_traits::Kernel; + using InputFT = typename InputKernel::FT; + + std::vector > no_holes; + std::vector > no_hole_weights; + + return create_interior_weighted_straight_skeleton_2(outer_contour_vertices_begin, + outer_contour_vertices_end, + no_holes.begin(), + no_holes.end(), + outer_contour_weights_begin, + outer_contour_weights_end, + no_hole_weights.begin(), + no_hole_weights.end(), + k); +} + +template +std::shared_ptr > +inline +create_interior_weighted_straight_skeleton_2(PointIterator outer_contour_vertices_begin, + PointIterator outer_contour_vertices_end, + WeightIterator outer_contour_weights_begin, + WeightIterator outer_contour_weights_end) +{ + return create_interior_weighted_straight_skeleton_2(outer_contour_vertices_begin, + outer_contour_vertices_end, + outer_contour_weights_begin, + outer_contour_weights_end, + Exact_predicates_inexact_constructions_kernel()); +} + +template +std::shared_ptr > +inline +create_interior_weighted_straight_skeleton_2(const Polygon& out_contour, + const Weights& weights, + const K& k, + std::enable_if_t::value>* = nullptr) +{ + return create_interior_weighted_straight_skeleton_2(CGAL_SS_i::vertices_begin(out_contour), + CGAL_SS_i::vertices_end(out_contour), + weights.begin(), + weights.end(), + k); +} + +template +std::shared_ptr > +inline +create_interior_weighted_straight_skeleton_2(const Polygon& out_contour, + const Weights& weights) +{ + return create_interior_weighted_straight_skeleton_2(out_contour, + weights, + Exact_predicates_inexact_constructions_kernel()); +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +/// EXTERIOR + +template +std::shared_ptr > +create_exterior_weighted_straight_skeleton_2(const FT& max_offset, + PointIterator vertices_begin, + PointIterator vertices_end, + WeightIterator weights_begin, + WeightIterator weights_end, + const K& k) +{ + CGAL_precondition(max_offset > 0); + CGAL_precondition(std::distance(weights_begin, weights_end) == std::distance(vertices_begin, vertices_end)); + + using Point_2 = typename std::iterator_traits::value_type; + using IK = typename Kernel_traits::Kernel; + using IFT = typename IK::FT; + + std::shared_ptr > skeleton; + + // That's because we might not have FT == IK::FT (e.g. `double` and `Core`) + // Note that we can also have IK != K (e.g. `Simple_cartesian` and `EPICK`) + IFT offset = max_offset; + + // @todo This likely should be done in the kernel K rather than the input kernel(i.e. the same + // converter stuff that is done in `create_partial_exterior_straight_skeleton_2`?). + std::optional margin = compute_outer_frame_margin(vertices_begin, + vertices_end, + weights_begin, + weights_end, + offset); + + if(margin) + { + const IFT lm = *margin; + const Bbox_2 bbox = bbox_2(vertices_begin, vertices_end); + + const IFT fxmin = IFT(bbox.xmin()) - lm; + const IFT fxmax = IFT(bbox.xmax()) + lm; + const IFT fymin = IFT(bbox.ymin()) - lm; + const IFT fymax = IFT(bbox.ymax()) + lm; + + Point_2 frame[4]; + frame[0] = Point_2(fxmin,fymin); + frame[1] = Point_2(fxmax,fymin); + frame[2] = Point_2(fxmax,fymax); + frame[3] = Point_2(fxmin,fymax); + + CGAL_STSKEL_BUILDER_TRACE(2, "Frame:\n" << frame[0] << "\n" << frame[1] << "\n" << frame[2] << "\n" << frame[3]); + + typedef std::vector Hole; + + Hole poly(vertices_begin, vertices_end); + std::reverse(poly.begin(), poly.end()); + + std::vector holes; + holes.push_back(poly); + + // put a weight large enough such that frame edges are not relevant + const FT frame_weight = FT(10) * *(std::max_element(weights_begin, weights_end)); + CGAL_STSKEL_BUILDER_TRACE(4, "Frame weight = " << frame_weight); + + std::vector lFrameWeights(4, frame_weight); + std::vector > lHoleWeights; + lHoleWeights.emplace_back(weights_begin, weights_end); + + // If w[0] pointed to v_0, then when we reverse the polygon, the last polygon is pointing to v_{n-1} + // but it is the edge v_0 v_{n-1}, which has the weight w_0. + std::reverse(lHoleWeights[0].begin(), lHoleWeights[0].end()); + std::rotate(lHoleWeights[0].rbegin(), lHoleWeights[0].rbegin()+1, lHoleWeights[0].rend()); + + skeleton = create_interior_weighted_straight_skeleton_2(frame, frame+4, + holes.begin(), holes.end(), + lFrameWeights.begin(), lFrameWeights.end(), + lHoleWeights.begin(), lHoleWeights.end(), + k); + } + + return skeleton; +} + +template +std::shared_ptr > +inline +create_exterior_weighted_straight_skeleton_2(const FT& max_offset, + PointIterator vertices_begin, + PointIterator vertices_end, + WeightIterator weights_begin, + WeightIterator weights_end) +{ + return create_exterior_weighted_straight_skeleton_2(max_offset, + vertices_begin, + vertices_end, + weights_begin, + weights_end, + Exact_predicates_inexact_constructions_kernel()); +} + +template +std::shared_ptr > +inline +create_exterior_weighted_straight_skeleton_2(const FT& max_offset, + const Polygon& aPoly, + Weights& weights, + const K& k) +{ + return create_exterior_weighted_straight_skeleton_2(max_offset, + CGAL_SS_i::vertices_begin(aPoly), + CGAL_SS_i::vertices_end(aPoly), + weights.begin(), + weights.end(), + k); +} + +template +std::shared_ptr > +inline +create_exterior_weighted_straight_skeleton_2(const FT& max_offset, + Weights& weights, + const Polygon& aPoly) +{ + return create_exterior_weighted_straight_skeleton_2(max_offset, + aPoly, + weights, + Exact_predicates_inexact_constructions_kernel()); +} + +} // namespace CGAL + +#endif // CGAL_CREATE_WEIGHTED_STRAIGHT_SKELETON_2_H diff --git a/thirdparty/CGAL/include/CGAL/create_weighted_straight_skeleton_from_polygon_with_holes_2.h b/thirdparty/CGAL/include/CGAL/create_weighted_straight_skeleton_from_polygon_with_holes_2.h new file mode 100644 index 00000000..4f7c7ac9 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/create_weighted_straight_skeleton_from_polygon_with_holes_2.h @@ -0,0 +1,52 @@ +// Copyright (c) 2006-2008 Fernando Luis Cacciola Carballal. All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// + +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/create_weighted_straight_skeleton_from_polygon_with_holes_2.h $ +// $Id: include/CGAL/create_weighted_straight_skeleton_from_polygon_with_holes_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Mael Rouxel-Labbé +// +#ifndef CGAL_CREATE_WEIGHTED_STRAIGHT_SKELETON_FROM_POLYGON_WITH_HOLES_2_H +#define CGAL_CREATE_WEIGHTED_STRAIGHT_SKELETON_FROM_POLYGON_WITH_HOLES_2_H + +#include + +#include +#include +#include + +#include + +#include + +namespace CGAL { + +template +std::shared_ptr< Straight_skeleton_2 > +inline +create_interior_weighted_straight_skeleton_2(const Polygon& poly_with_holes, + const Weights& weights, + const K& k, + std::enable_if_t< + CGAL_SS_i::has_Hole_const_iterator::value>* = nullptr) +{ + return create_interior_weighted_straight_skeleton_2(poly_with_holes.outer_boundary().vertices_begin(), + poly_with_holes.outer_boundary().vertices_end(), + poly_with_holes.holes_begin(), + poly_with_holes.holes_end(), + std::begin(weights[0]), std::end(weights[0]), + std::next(std::begin(weights)), std::end(weights), + k); +} + +// create_exterior_weightd_straight_skeleton_2() for polygon with holes is simply in create_straight_skeleton_2.h +// as the holes do not matter: call create_exterior_straight_skeleton_2 for each boundary (outer & holes). + +} // namespace CGAL + +#endif // CGAL_CREATE_WEIGHTED_STRAIGHT_SKELETON_FROM_POLYGON_WITH_HOLES_2_H diff --git a/thirdparty/CGAL/include/CGAL/demangle.h b/thirdparty/CGAL/include/CGAL/demangle.h index 49710a21..525227b4 100644 --- a/thirdparty/CGAL/include/CGAL/demangle.h +++ b/thirdparty/CGAL/include/CGAL/demangle.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/demangle.h $ -// $Id: demangle.h 393ae7d 2021-05-12T15:03:53+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/demangle.h $ +// $Id: include/CGAL/demangle.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/determinant.h b/thirdparty/CGAL/include/CGAL/determinant.h index 86eebbc1..6eb395db 100644 --- a/thirdparty/CGAL/include/CGAL/determinant.h +++ b/thirdparty/CGAL/include/CGAL/determinant.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/determinant.h $ -// $Id: determinant.h cb08f67 2020-05-12T11:56:18+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/determinant.h $ +// $Id: include/CGAL/determinant.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/determinant_of_vectors.h b/thirdparty/CGAL/include/CGAL/determinant_of_vectors.h index 8e5779ca..35cb8e07 100644 --- a/thirdparty/CGAL/include/CGAL/determinant_of_vectors.h +++ b/thirdparty/CGAL/include/CGAL/determinant_of_vectors.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/determinant_of_vectors.h $ -// $Id: determinant_of_vectors.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/determinant_of_vectors.h $ +// $Id: include/CGAL/determinant_of_vectors.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/disable_warnings.h b/thirdparty/CGAL/include/CGAL/disable_warnings.h index e0d854ef..28c92d4a 100644 --- a/thirdparty/CGAL/include/CGAL/disable_warnings.h +++ b/thirdparty/CGAL/include/CGAL/disable_warnings.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/disable_warnings.h $ -// $Id: disable_warnings.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/disable_warnings.h $ +// $Id: include/CGAL/disable_warnings.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/distance_predicates_2.h b/thirdparty/CGAL/include/CGAL/distance_predicates_2.h index 3b4637ba..61a3bb72 100644 --- a/thirdparty/CGAL/include/CGAL/distance_predicates_2.h +++ b/thirdparty/CGAL/include/CGAL/distance_predicates_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/distance_predicates_2.h $ -// $Id: distance_predicates_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/distance_predicates_2.h $ +// $Id: include/CGAL/distance_predicates_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/distance_predicates_3.h b/thirdparty/CGAL/include/CGAL/distance_predicates_3.h index 06e22f9d..478a8a3e 100644 --- a/thirdparty/CGAL/include/CGAL/distance_predicates_3.h +++ b/thirdparty/CGAL/include/CGAL/distance_predicates_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/distance_predicates_3.h $ -// $Id: distance_predicates_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/distance_predicates_3.h $ +// $Id: include/CGAL/distance_predicates_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/double.h b/thirdparty/CGAL/include/CGAL/double.h index 65297e21..8c90c040 100644 --- a/thirdparty/CGAL/include/CGAL/double.h +++ b/thirdparty/CGAL/include/CGAL/double.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/double.h $ -// $Id: double.h 1d0565d 2022-04-20T09:17:02+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/double.h $ +// $Id: include/CGAL/double.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/draw_arrangement_2.h b/thirdparty/CGAL/include/CGAL/draw_arrangement_2.h new file mode 100644 index 00000000..0077ec10 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/draw_arrangement_2.h @@ -0,0 +1,758 @@ +// Copyright (c) 2012 +// 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) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/draw_arrangement_2.h $ +// $Id: include/CGAL/draw_arrangement_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s): Efi Fogel + +#ifndef CGAL_DRAW_ARRANGEMENT_2_H +#define CGAL_DRAW_ARRANGEMENT_2_H + +#include + + +#include + +#include +#include +#include + +#include + +#ifdef CGAL_USE_BASIC_VIEWER + +#include +#include +#include +#include +#include + +namespace CGAL { + +struct Default_color_generator { + /*! Obtain color + */ + template + CGAL::IO::Color operator()(HalfedgeHandle /* h */) { + static std::random_device rd; + static std::mt19937 rng(rd()); + static std::uniform_int_distribution uni(0, 255); + return CGAL::IO::Color(uni(rng), uni(rng), uni(rng)); + } +}; + +// Viewer class for`< Polygon_2 +template +class Aos_2_basic_viewer_qt : public Basic_viewer_qt { + using Aos = ArrangementOnSurface_2; + using Color_generator = ColorGenerator; + using Base = Basic_viewer_qt; + using Gt = typename Aos::Geometry_traits_2; + using Point = typename Aos::Point_2; + using X_monotone_curve = typename Aos::X_monotone_curve_2; + using Vertex_const_handle = typename Aos::Vertex_const_handle; + using Halfedge_const_handle = typename Aos::Halfedge_const_handle; + using Face_const_handle = typename Aos::Face_const_handle; + using Ccb_halfedge_const_circulator = + typename Aos::Ccb_halfedge_const_circulator; + +public: + /// Construct the viewer. + /// @param arr the arrangement to view + /// @param title the title of the window + Aos_2_basic_viewer_qt(QWidget* parent, const Aos& aos, + Color_generator color_generator, + const char* title = "2D Arrangement Basic Viewer", + bool draw_vertices = false) : + // First draw: vertices; edges, faces; multi-color; no inverse normal + Base(parent, title, draw_vertices, true, true, false, false), + m_aos(aos), + m_color_generator(color_generator) + { + // mimic the computation of Camera::pixelGLRatio() + auto bbox = bounding_box(); + CGAL::qglviewer::Vec minv(bbox.xmin(), bbox.ymin(), 0); + CGAL::qglviewer::Vec maxv(bbox.xmax(), bbox.ymax(), 0); + auto diameter = (maxv - minv).norm(); + m_pixel_ratio = diameter / m_height; + } + + /*! Intercept the resizing of the window. + */ + virtual void resizeGL(int width, int height) { + CGAL::QGLViewer::resizeGL(width, height); + m_width = width; + m_height = height; + CGAL::qglviewer::Vec p; + auto ratio = camera()->pixelGLRatio(p); + if (ratio != m_pixel_ratio) { + m_pixel_ratio = ratio; + add_elements(); + } + } + + /*! Compute an approximation of the bounding box of a point. + * \param[in] p the (exact) point. + * Call this member function only if the geometry traits is equipped with + * the coordinate-approximation functionality of a point coordinate. + * This function must be inlined (e.g., a template) to enable the + * compiled-time dispatching in the function `bounding_box()`. + */ + template + CGAL::Bbox_2 approximate_bbox(const Point& p, const Approximate& approx) { + auto x = approx(p, 0); + auto y = approx(p, 1); + return CGAL::Bbox_2(x, y, x, y); + } + + /*! Obtain the bounding box of a point. + * \param[in] p the point. + * We assume that if the coordinate-approximation functionality is not + * supported, the point supports the member function `bbox()`. + * This function must be inlined (e.g., a template) to enable the + * compiled-time dispatching in the function `bounding_box()`. + */ + template + CGAL::Bbox_2 exact_bbox(const Point& p) { return p.bbox(); } + + /*! Compile time dispatching + */ +#if 0 + template + void bounding_box_impl2(CGAL::Bbox_2& bbox, const Point& p, T const&, long) + { bbox += exact_bbox(p); } + + template + auto bounding_box_impl2(CGAL::Bbox_2& bbox, const Point& p, T const& approx, + int) -> decltype(approx.operator()(p), void()) + { bbox += approximate_bbox(p, approx); } + + template + void bounding_box_impl1(CGAL::Bbox_2& bbox, const Point& p, T const&, long) + { bbox += exact_bbox(p); } + + template + auto bounding_box_impl1(CGAL::Bbox_2& bbox, const Point& p, T const& traits, + int) -> + decltype(traits.approximate_2_object(), void()) { + using Approximate = typename Gt::Approximate_2; + bounding_box_impl2(bbox, p, traits.approximate_2_object(), 0); + } +#else + template + void bounding_box_impl1(CGAL::Bbox_2& bbox, const Point& p, T const& traits, + int) + { bbox += approximate_bbox(p, traits.approximate_2_object()); } +#endif + + /*! Compute the bounding box. + */ + CGAL::Bbox_2 bounding_box() { + CGAL::Bbox_2 bbox; + const auto* traits = this->m_aos.geometry_traits(); + // At this point we assume that the arrangement is not open, and thus the + // bounding box is defined by the vertices. + for (auto it = m_aos.vertices_begin(); it != m_aos.vertices_end(); ++it) + bounding_box_impl1(bbox, it->point(), *traits, 0); + return bbox; + } + + /*! Add all faces. + */ + template + void add_faces(const Traits&) { + for (auto it = m_aos.unbounded_faces_begin(); + it != m_aos.unbounded_faces_end(); ++it) + add_face(it); + } + + /*! Add all faces. + */ + template + void + add_faces(Arr_geodesic_arc_on_sphere_traits_2 const&) + { add_face(m_aos.faces_begin()); } + + /*! Add all elements to be drawn. + */ + void add_elements() { + // std::cout << "add_elements()\n"; + // std::cout << "ratio: " << this->pixel_ratio() << std::endl; + clear(); + m_visited.clear(); + + if (m_aos.is_empty()) return; + add_faces(*(this->m_aos.geometry_traits())); + + // Add edges that do not separate faces. + for (auto it = m_aos.edges_begin(); it != m_aos.edges_end(); ++it) + if (it->face() == it->twin()->face()) draw_curve(it->curve()); + + // Add all points + for (auto it = m_aos.vertices_begin(); it != m_aos.vertices_end(); ++it) + draw_point(it->point()); + + m_visited.clear(); + } + + /*/ Obtain the pixel ratio + */ + double pixel_ratio() const { return m_pixel_ratio; } + +protected: + template + Halfedge_const_handle + find_smallest(Ccb_halfedge_const_circulator circ, + Arr_geodesic_arc_on_sphere_traits_2 const&) + { return circ; } + + /*! Find the halfedge incident to the lexicographically smallest vertex + * along the CCB, such that there is no other halfedge underneath. + */ + template + Halfedge_const_handle find_smallest(Ccb_halfedge_const_circulator circ, + const Traits&) { + // std::cout << "find_smallest()\n"; + const auto* traits = this->m_aos.geometry_traits(); + auto cmp_xy = traits->compare_xy_2_object(); + auto cmp_y = traits->compare_y_at_x_right_2_object(); + + // Find the first halfedge directed from left to right + auto curr = circ; + do if (curr->direction() == CGAL::ARR_LEFT_TO_RIGHT) break; + while (++curr != circ); + Halfedge_const_handle ext = curr; + + // Find the halfedge incident to the lexicographically smallest vertex, + // such that there is no other halfedge underneath. + do { + // Discard edges not directed from left to right: + if (curr->direction() != CGAL::ARR_LEFT_TO_RIGHT) continue; + + + auto res = cmp_xy(curr->source()->point(), ext->source()->point()); + + // Discard the edges inciden to a point strictly larger than the point + // incident to the stored extreme halfedge: + if (res == LARGER) continue; + + // Store the edge inciden to a point strictly smaller: + if (res == SMALLER) { + ext = curr; + continue; + } + + // The incident points are equal; compare the halfedges themselves: + if (cmp_y(curr->curve(), ext->curve(), curr->source()->point()) == + SMALLER) + ext = curr; + } while (++curr != circ); + + return ext; + } + + /*! Draw a region using aproximate coordinates. + * Call this member function only if the geometry traits is equipped with + * the coordinate-approximation functionality of a curve. + * This function must be inlined (e.g., a template) to enable the + * compiled-time dispatching in the function `draw_region()`. + */ + template + void draw_approximate_region(Halfedge_const_handle curr, + const Approximate& approx) { + // std::cout << "draw_approximate_region()\n"; + std::vector polyline; + double error(this->pixel_ratio()); + bool l2r = curr->direction() == ARR_LEFT_TO_RIGHT; + approx(curr->curve(), error, std::back_inserter(polyline), l2r); + if (polyline.empty()) return; + auto it = polyline.begin(); + auto prev = it++; + for (; it != polyline.end(); prev = it++) { + this->add_segment(*prev, *it); + this->add_point_in_face(*prev); + } + } + + /*! Draw an exact curve. + */ + template + void draw_exact_curve(const XMonotoneCurve& curve) { + const auto* traits = this->m_aos.geometry_traits(); + auto ctr_min = traits->construct_min_vertex_2_object(); + auto ctr_max = traits->construct_max_vertex_2_object(); + this->add_segment(ctr_min(curve), ctr_max(curve)); + } + + /*! Draw an exact region. + */ + void draw_exact_region(Halfedge_const_handle curr) { + // this->add_point_in_face(curr->source()->point()); + draw_exact_curve(curr->curve()); + } + + /*! Compile time dispatching + */ +#if 0 + template + void draw_region_impl2(Halfedge_const_handle curr, T const&, long) + { draw_exact_region(curr); } + + template + auto draw_region_impl2(Halfedge_const_handle curr, T const& approx, int) -> + decltype(approx.template operator()(X_monotone_curve{}, double{}, I{}, + bool{}), void()) + { draw_approximate_region(curr, approx); } + + template + void draw_region_impl1(Halfedge_const_handle curr, T const&, long) + { draw_exact_region(curr); } + + template + auto draw_region_impl1(Halfedge_const_handle curr, T const& traits, int) -> + decltype(traits.approximate_2_object(), void()) { + using Approximate = typename Gt::Approximate_2; + draw_region_impl2(curr, traits.approximate_2_object(), 0); + } +#else + template + void draw_region_impl1(Halfedge_const_handle curr, T const& traits, int) + { draw_approximate_region(curr, traits.approximate_2_object()); } +#endif + + template + void draw_region_impl1 + (Halfedge_const_handle curr, + Arr_geodesic_arc_on_sphere_traits_2 const& traits, + int) { + // std::cout << "draw_region_impl1()\n"; + auto approx = traits.approximate_2_object(); + using Kernel = Kernel_; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; + using Ak = typename Traits::Approximate_kernel; + using Ap = typename Traits::Approximate_point_2; + using Approx_point_3 = typename Ak::Point_3; + + std::vector polyline; + double error(0.01); + bool l2r = curr->direction() == ARR_LEFT_TO_RIGHT; + approx(curr->curve(), error, std::back_inserter(polyline), l2r); + if (polyline.empty()) return; + auto it = polyline.begin(); + auto x = it->dx(); + auto y = it->dy(); + auto z = it->dz(); + auto l = std::sqrt(x*x + y*y + z*z); + Approx_point_3 prev(x/l, y/l, z/l); + for (++it; it != polyline.end(); ++it) { + auto x = it->dx(); + auto y = it->dy(); + auto z = it->dz(); + auto l = std::sqrt(x*x + y*y + z*z); + Approx_point_3 next(x/l, y/l, z/l); + this->add_segment(prev, next); + prev = next; + // this->add_point_in_face(*prev); + } + } + + /*! Draw a region. + */ + void draw_region(Ccb_halfedge_const_circulator circ) { + // std::cout << "draw_region()\n"; + /* Check whether the traits has a member function called + * approximate_2_object() and if so check whether the return type, namely + * `Approximate_2` has an appropriate operator. + * + * C++20 supports concepts and `requires` expression; see, e.g., + * https://en.cppreference.com/w/cpp/language/constraints; thus, the first + * condition above can be elegantly verified as follows: + * constexpr bool has_approximate_2_object = + * requires(const Gt& traits) { traits.approximate_2_object(); }; + * + * C++17 has experimental constructs called is_detected and + * is_detected_v that can be used to achieve the same goal. + * + * For now we use C++14 features. + */ + auto color = m_color_generator(circ->face()); + this->face_begin(color); + + const auto* traits = this->m_aos.geometry_traits(); + auto ext = find_smallest(circ, *traits); + auto curr = ext; + + do { + // Skip halfedges that are "antenas": + while (curr->face() == curr->twin()->face()) curr = curr->twin()->next(); + draw_region_impl1(curr, *traits, 0); + curr = curr->next(); + } while (curr != ext); + + this->face_end(); + } + + /*! Draw a curve using aproximate coordinates. + * Call this member function only of the geometry traits is equipped with + * the coordinate-aproximation functionality of a curve. + * This function must be inlined (e.g., a template) to enable the + * compiled-time dispatching in the function `draw_curve()`. + */ + template + void draw_approximate_curve(const XMonotoneCurve& curve, + const Approximate& approx) { + std::vector polyline; + double error(this->pixel_ratio()); + approx(curve, error, std::back_inserter(polyline)); + if (polyline.empty()) return; + auto it = polyline.begin(); + auto prev = it++; + for (; it != polyline.end(); prev = it++) this->add_segment(*prev, *it); + } + + /*! Compile time dispatching + */ +#if 0 + template + void draw_curve_impl2(const X_monotone_curve& xcv, T const&, long) + { draw_exact_curve(xcv); } + + template + auto draw_curve_impl2(const X_monotone_curve& xcv, T const& approx, int) -> + decltype(approx.template operator()(X_monotone_curve{}, double{}, I{}, + bool{}), void()) + { draw_approximate_curve(xcv, approx); } + + template + void draw_curve_impl1(const X_monotone_curve& xcv, T const&, long) + { draw_exact_curve(xcv); } + + template + auto draw_curve_impl1(const X_monotone_curve& xcv, T const& traits, int) -> + decltype(traits.approximate_2_object(), void()) { + using Approximate = typename Gt::Approximate_2; + draw_curve_impl2(xcv, traits.approximate_2_object(), 0); + } +#else + template + void draw_curve_impl1(const X_monotone_curve& xcv, T const& traits, int) + { draw_approximate_curve(xcv, traits.approximate_2_object()); } +#endif + + template + void draw_curve_impl1 + (const X_monotone_curve& xcv, + Arr_geodesic_arc_on_sphere_traits_2 const& traits, + int) { + auto approx = traits.approximate_2_object(); + using Kernel = Kernel_; + using Traits = Arr_geodesic_arc_on_sphere_traits_2; + using Ak = typename Traits::Approximate_kernel; + using Ap = typename Traits::Approximate_point_2; + using Approx_point_3 = typename Ak::Point_3; + std::vector apoints; + double error(0.01); + approx(xcv, error, std::back_inserter(apoints)); + auto it = apoints.begin(); + auto x = it->dx(); + auto y = it->dy(); + auto z = it->dz(); + auto l = std::sqrt(x*x + y*y + z*z); + Approx_point_3 prev(x/l, y/l, z/l); + for (++it; it != apoints.end(); ++it) { + auto x = it->dx(); + auto y = it->dy(); + auto z = it->dz(); + auto l = std::sqrt(x*x + y*y + z*z); + Approx_point_3 next(x/l, y/l, z/l); + this->add_segment(prev, next); + prev = next; + } + } + + /*! Draw a curve. + */ + template + void draw_curve(const XMonotoneCurve& curve) { + /* Check whether the traits has a member function called + * approximate_2_object() and if so check whether the return type, namely + * `Approximate_2` has an appropriate operator. + * + * C++20 supports concepts and `requires` expression; see, e.g., + * https://en.cppreference.com/w/cpp/language/constraints; thus, the first + * condition above can be elegantly verified as follows: + * constexpr bool has_approximate_2_object = + * requires(const Gt& traits) { traits.approximate_2_object(); }; + * + * C++17 has experimental constructs called is_detected and + * is_detected_v that can be used to achieve the same goal. + * + * For now we use C++14 features. + */ +#if 0 + if constexpr (std::experimental::is_detected_v) + { + const auto* traits = this->m_aos.geometry_traits(); + auto approx = traits->approximate_2_object(); + draw_approximate_curve(curve, approx); + return; + } + draw_exact_curve(curve); +#else + const auto* traits = this->m_aos.geometry_traits(); + draw_curve_impl1(curve, *traits, 0); +#endif + } + + /*! Compile time dispatching + */ +#if 0 + template + void draw_point_impl2(const Point& p, T const&, long) { add_point(p); } + + template + auto draw_point_impl2(const Point& p, T const& approx, int) -> + decltype(approx.operator()(p), void()) + { add_point(approx(p)); } + + template + void draw_point_impl1(const Point& p, T const&, long) { add_point(p); } + + template + auto draw_point_impl1(const Point& p, T const& traits, int) -> + decltype(traits.approximate_2_object(), void()) { + using Approximate = typename Gt::Approximate_2; + draw_point_impl2(p, traits.approximate_2_object(), true); + } +#else + template + void draw_point_impl1(const Point& p, T const& traits, int) + { add_point(traits.approximate_2_object()(p)); } +#endif + + template + void draw_point_impl1 + (const Point& p, + Arr_geodesic_arc_on_sphere_traits_2 const& traits, + int) { + auto approx = traits.approximate_2_object(); + using Traits = Arr_geodesic_arc_on_sphere_traits_2; + using Ak = typename Traits::Approximate_kernel; + using Approx_point_3 = typename Ak::Point_3; + auto ap = approx(p); + auto x = ap.dx(); + auto y = ap.dy(); + auto z = ap.dz(); + auto l = std::sqrt(x*x + y*y + z*z); + Approx_point_3 p3(x/l, y/l, z/l); + add_point(p3); + } + + /*! Draw a point. + */ + void draw_point(const Point& p) { + const auto* traits = m_aos.geometry_traits(); + draw_point_impl1(p, *traits, 0); + } + + /*! Add a Connected Component of the Boundary. + */ + void add_ccb(Ccb_halfedge_const_circulator circ) { + // std::cout << "add_ccb()\n"; + auto curr = circ; + do { + auto new_face = curr->twin()->face(); + if (m_visited.find(new_face) != m_visited.end()) continue; + m_visited[new_face] = true; + add_face(new_face); + } while (++curr != circ); + } + + /*! Add a face. + */ + void add_face(Face_const_handle face) { + // std::cout << "add_face()\n"; + using Inner_ccb_const_iterator = typename Aos::Inner_ccb_const_iterator; + using Outer_ccb_const_iterator = typename Aos::Outer_ccb_const_iterator; + + for (Inner_ccb_const_iterator it = face->inner_ccbs_begin(); + it != face->inner_ccbs_end(); ++it) + add_ccb(*it); + + for (Outer_ccb_const_iterator it = face->outer_ccbs_begin(); + it != face->outer_ccbs_end(); ++it) { + add_ccb(*it); + draw_region(*it); + } + } + + //! + virtual void keyPressEvent(QKeyEvent* e) { + // Test key pressed: + // const ::Qt::KeyboardModifiers modifiers = e->modifiers(); + // if ((e->key()==Qt::Key_PageUp) && (modifiers==Qt::NoButton)) { ... } + + // Call: * add_elements() if the model changed, followed by + // * redraw() if some viewing parameters changed that implies some + // modifications of the buffers + // (eg. type of normal, color/mono) + // * update() just to update the drawing + + // Call the base method to process others/classicals key + Base::keyPressEvent(e); + } + +protected: + //! The window width in pixels. + int m_width = CGAL_BASIC_VIEWER_INIT_SIZE_X; + + //! The window height in pixels. + int m_height = CGAL_BASIC_VIEWER_INIT_SIZE_Y; + + //! The ratio between pixel and opengl units (in world coordinate system). + double m_pixel_ratio = 1; + + //! The arrangement to draw. + const Aos& m_aos; + + //! The color generator. + Color_generator m_color_generator; + + std::unordered_map m_visited; +}; + +//! Basic viewer of a 2D arrangement. +template +class Aos_2_viewer_qt : public Aos_2_basic_viewer_qt { +public: + using Aos = ArrangementOnSurface_2; + using Color_generator = ColorGenerator; + using Base = Aos_2_basic_viewer_qt; + using Point = typename Aos::Point_2; + using X_monotone_curve = typename Aos::X_monotone_curve_2; + using Halfedge_const_handle = typename Aos::Halfedge_const_handle; + using Face_const_handle = typename Aos::Face_const_handle; + using Ccb_halfedge_const_circulator = + typename Aos::Ccb_halfedge_const_circulator; + + /// Construct the viewer. + /// @param arr the arrangement to view + /// @param title the title of the window + Aos_2_viewer_qt(QWidget* parent, const Aos& aos, + Color_generator color_generator, + const char* title = "2D Arrangement on Surface Basic Viewer", + bool draw_vertices = false) : + Base(parent, aos, color_generator, title, draw_vertices) + {} +}; + +/*! Draw an arrangement on surface. + */ +template +void draw(const Arrangement_on_surface_2& aos, + const char* title = "2D Arrangement on Surface Basic Viewer", + bool draw_vertices = false) { +#if defined(CGAL_TEST_SUITE) + bool cgal_test_suite=true; +#else + bool cgal_test_suite = qEnvironmentVariableIsSet("CGAL_TEST_SUITE"); +#endif + + if (cgal_test_suite) return; + using Gt = GeometryTraits_2; + using Tt = TopologyTraits; + using Aos = CGAL::Arrangement_on_surface_2; + using Viewer = Aos_2_viewer_qt; + + CGAL::Qt::init_ogl_context(4,3); + + int argc = 1; + const char* argv[2] = {"t2_viewer", nullptr}; + QApplication app(argc, const_cast(argv)); + Default_color_generator color_generator; + Viewer mainwindow(app.activeWindow(), aos, color_generator, title, + draw_vertices); + mainwindow.add_elements(); + mainwindow.show(); + app.exec(); +} + +/*! Draw an arrangement. + */ +template +void draw(const Arrangement_2& arr, + const char* title = "2D Arrangement Basic Viewer", + bool draw_vertices = false) { +#if defined(CGAL_TEST_SUITE) + bool cgal_test_suite=true; +#else + bool cgal_test_suite = qEnvironmentVariableIsSet("CGAL_TEST_SUITE"); +#endif + + if (cgal_test_suite) return; + using Gt = GeometryTraits_2; + using Arr = CGAL::Arrangement_2; + using Viewer = Aos_2_viewer_qt; + + CGAL::Qt::init_ogl_context(4,3); + + int argc = 1; + const char* argv[2] = {"t2_viewer", nullptr}; + QApplication app(argc, const_cast(argv)); + Default_color_generator color_generator; + Viewer mainwindow(app.activeWindow(), arr, color_generator, title, + draw_vertices); + mainwindow.add_elements(); + mainwindow.show(); + app.exec(); +} + +/*! Draw an arrangement using a given color generator. + */ +template +void draw(const Arrangement_2& arr, + ColorGenerator color_generator, + const char* title = "2D Arrangement Basic Viewer", + bool draw_vertices = false) { +#if defined(CGAL_TEST_SUITE) + bool cgal_test_suite=true; +#else + bool cgal_test_suite = qEnvironmentVariableIsSet("CGAL_TEST_SUITE"); +#endif + + if (cgal_test_suite) return; + + using Color_generator = ColorGenerator; + using Gt = GeometryTraits_2; + using Arr = CGAL::Arrangement_2; + using Viewer = Aos_2_viewer_qt; + + CGAL::Qt::init_ogl_context(4,3); + + int argc = 1; + const char* argv[2] = {"t2_viewer", nullptr}; + QApplication app(argc, const_cast(argv)); + Viewer mainwindow(app.activeWindow(), arr, color_generator, title, + draw_vertices); + mainwindow.add_elements(); + mainwindow.show(); + app.exec(); +} + +} + +#endif +#endif diff --git a/thirdparty/CGAL/include/CGAL/draw_constrained_triangulation_2.h b/thirdparty/CGAL/include/CGAL/draw_constrained_triangulation_2.h new file mode 100644 index 00000000..4105d60e --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/draw_constrained_triangulation_2.h @@ -0,0 +1,180 @@ +// Copyright(c) 2022 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/draw_constrained_triangulation_2.h $ +// $Id: include/CGAL/draw_constrained_triangulation_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Andreas Fabri + +#ifndef CGAL_DRAW_CT2_H +#define CGAL_DRAW_CT2_H + +#include +#include + +#include +#include + +#ifdef CGAL_USE_BASIC_VIEWER + +#include + +namespace CGAL +{ + +// Viewer class for T2 + template +class SimpleConstrainedTriangulation2ViewerQt : public Basic_viewer_qt +{ + typedef Basic_viewer_qt Base; + typedef typename T2::Vertex_handle Vertex_const_handle; + typedef typename T2::Finite_edges_iterator Edge_const_handle; + typedef typename T2::Finite_faces_iterator Facet_const_handle; + typedef typename T2::Point Point; + +public: + /// Construct the viewer. + /// @param at2 the t2 to view + /// @param title the title of the window + /// @param anofaces if true, do not draw faces (faces are not computed; this can be + /// useful for very big object where this time could be long) + SimpleConstrainedTriangulation2ViewerQt(QWidget* parent, const T2& at2, + InDomainPmap ipm, + const char* title="Basic CDT2 Viewer", + bool anofaces=false) : + // First draw: vertices; edges, faces; multi-color; no inverse normal + Base(parent, title, true, true, true, false, false), + t2(at2), + ipm(ipm), + m_nofaces(anofaces) + { + compute_elements(); + } + +protected: + void compute_face(Facet_const_handle fh) + { + CGAL::IO::Color c = get(ipm, fh)? CGAL::IO::yellow() : CGAL::IO::white(); + face_begin(c); + + add_point_in_face(fh->vertex(0)->point()); + add_point_in_face(fh->vertex(1)->point()); + add_point_in_face(fh->vertex(2)->point()); + + face_end(); + } + + void compute_edge(Edge_const_handle eh) + { + CGAL::IO::Color c = t2.is_constrained(*eh)? CGAL::IO::green() : CGAL::IO::black(); + add_segment(eh->first->vertex(eh->first->cw(eh->second))->point(), + eh->first->vertex(eh->first->ccw(eh->second))->point(), + c); + } + + void compute_vertex(Vertex_const_handle vh) + { add_point(vh->point()); } + + void compute_elements() + { + clear(); + + if (!m_nofaces) + { + for (typename T2::Finite_faces_iterator it=t2.finite_faces_begin(); + it!=t2.finite_faces_end(); ++it) + { compute_face(it); } + } + + for (typename T2::Finite_edges_iterator it=t2.finite_edges_begin(); + it!=t2.finite_edges_end(); ++it) + { compute_edge(it); } + + for (typename T2::Finite_vertices_iterator it=t2.finite_vertices_begin(); + it!=t2.finite_vertices_end(); ++it) + { compute_vertex(it); } + } + + virtual void keyPressEvent(QKeyEvent *e) + { + // Test key pressed: + // const ::Qt::KeyboardModifiers modifiers = e->modifiers(); + // if ((e->key()==Qt::Key_PageUp) && (modifiers==Qt::NoButton)) { ... } + + // Call: * compute_elements() if the model changed, followed by + // * redraw() if some viewing parameters changed that implies some + // modifications of the buffers + // (eg. type of normal, color/mono) + // * update() just to update the drawing + + // Call the base method to process others/classicals key + Base::keyPressEvent(e); + } + +protected: + const T2& t2; + InDomainPmap ipm; + bool m_nofaces; +}; + +// Specialization of draw function. +#define CGAL_T2_TYPE CGAL::Constrained_triangulation_2 + +template +void draw(const CGAL_T2_TYPE& at2, + InDomainPmap ipm) +{ + const char* title="Constrained_triangulation_2 Basic Viewer"; + bool nofill=false; + +#if defined(CGAL_TEST_SUITE) + bool cgal_test_suite=true; +#else + bool cgal_test_suite=qEnvironmentVariableIsSet("CGAL_TEST_SUITE"); +#endif + + if (!cgal_test_suite) + { + CGAL::Qt::init_ogl_context(4,3); + int argc=1; + const char* argv[2]={"t2_viewer", nullptr}; + QApplication app(argc,const_cast(argv)); + SimpleConstrainedTriangulation2ViewerQt + mainwindow(app.activeWindow(), at2, ipm, title, nofill); + mainwindow.show(); + app.exec(); + } +} + + +template +void draw(const CGAL_T2_TYPE& at2) +{ + internal::In_domain in_domain; + draw(at2, in_domain); +} + +#undef CGAL_T2_TYPE + +} // End namespace CGAL + +#else + +namespace CGAL { +// Specialization of draw function. +#define CGAL_T2_TYPE CGAL::Constrained_triangulation_2 + +template +void draw(const CGAL_T2_TYPE& , + InDomainPmap ) +{} +#undef CGAL_T2_TYPE + +} // End namespace CGAL + +#endif // CGAL_USE_BASIC_VIEWER + +#endif // CGAL_DRAW_CT2_H diff --git a/thirdparty/CGAL/include/CGAL/draw_face_graph.h b/thirdparty/CGAL/include/CGAL/draw_face_graph.h index 6f1bfd2c..700f7cf1 100644 --- a/thirdparty/CGAL/include/CGAL/draw_face_graph.h +++ b/thirdparty/CGAL/include/CGAL/draw_face_graph.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/BGL/include/CGAL/draw_face_graph.h $ -// $Id: draw_face_graph.h fb6f703 2021-05-04T14:07:49+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/BGL/include/CGAL/draw_face_graph.h $ +// $Id: include/CGAL/draw_face_graph.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -19,21 +19,32 @@ #include #include -namespace CGAL -{ +namespace CGAL { // Default color functor; user can change it to have its own face color struct DefaultColorFunctorFaceGraph { template - CGAL::IO::Color operator()(const Graph&, - typename boost::graph_traits::face_descriptor fh) const + CGAL::IO::Color operator()(const Graph& /*g*/, + typename boost::graph_traits::face_descriptor /*f*/) const { - if (fh==boost::graph_traits::null_face()) // use to get the mono color - return CGAL::IO::Color(100, 125, 200); // R G B between 0-255 - return get_random_color(CGAL::get_default_random()); } + + // edges and vertices are black by default + template + CGAL::IO::Color operator()(const Graph& /*g*/, + typename boost::graph_traits::edge_descriptor /*e*/) const + { + return IO::black(); + } + + template + CGAL::IO::Color operator()(const Graph& /*g*/, + typename boost::graph_traits::vertex_descriptor /*v*/) const + { + return IO::black(); + } }; class SimpleFaceGraphViewerQt : public Basic_viewer_qt @@ -48,28 +59,28 @@ class SimpleFaceGraphViewerQt : public Basic_viewer_qt } /// Construct the viewer. - /// @param amesh the surface mesh to view + /// @param g the face graph to view /// @param title the title of the window /// @param anofaces if true, do not draw faces (faces are not computed; this can be - /// usefull for very big object where this time could be long) - template + /// useful for very big objects where this time could be long) + template SimpleFaceGraphViewerQt(QWidget* parent, - const SM& amesh, - const char* title="Basic Surface_mesh Viewer", + const Graph& g, + const char* title="Basic Face Graph Viewer", bool anofaces=false) : - SimpleFaceGraphViewerQt(parent, amesh, title, anofaces, DefaultColorFunctorFaceGraph()) + SimpleFaceGraphViewerQt(parent, g, title, anofaces, DefaultColorFunctorFaceGraph()) { } - template + template SimpleFaceGraphViewerQt(QWidget* parent, - const SM& amesh, + const Graph& g, const char* title, bool anofaces, ColorFunctor fcolor) : // First draw: no vertex; edges, faces; mono-color; inverse normal Base(parent, title, false, true, true, true, false), - m_compute_elements_impl(compute_elements_functor(amesh, anofaces, fcolor)) + m_compute_elements_impl(compute_elements_functor(g, anofaces, fcolor)) { } @@ -82,43 +93,42 @@ class SimpleFaceGraphViewerQt : public Basic_viewer_qt m_compute_elements_impl(); } - template - void set_face_graph(const SM& amesh, + template + void set_face_graph(const Graph& g, bool anofaces, ColorFunctor fcolor) { - m_compute_elements_impl = compute_elements_functor(amesh, anofaces, fcolor); + m_compute_elements_impl = compute_elements_functor(g, anofaces, fcolor); } - template - void set_face_graph(const SM& amesh, + template + void set_face_graph(const Graph& g, bool anofaces=false) { - set_mesh(amesh, anofaces, DefaultColorFunctorFaceGraph()); + set_mesh(g, anofaces, DefaultColorFunctorFaceGraph()); } protected: - template + template std::function - compute_elements_functor(const SM& sm, + compute_elements_functor(const Graph& g, bool anofaces, ColorFunctor fcolor) { - using Point = - typename boost::property_map_value::type; + using Point = typename boost::property_map_value::type; using Kernel = typename CGAL::Kernel_traits::Kernel; using Vector = typename Kernel::Vector_3; - auto vnormals = get(CGAL::dynamic_vertex_property_t(), sm); - auto point_pmap = get(CGAL::vertex_point, sm); - for (auto v : vertices(sm)) + auto vnormals = get(CGAL::dynamic_vertex_property_t(), g); + auto point_pmap = get(CGAL::vertex_point, g); + for (auto v : vertices(g)) { Vector n(NULL_VECTOR); int i=0; - for (auto h : halfedges_around_target(halfedge(v, sm), sm)) + for (auto h : halfedges_around_target(halfedge(v, g), g)) { - if (!is_border(h, sm)) + if (!is_border(h, g)) { Vector ni = CGAL::cross_product( - Vector(get(point_pmap, source(h, sm)), get(point_pmap, target(h, sm))), - Vector(get(point_pmap, target(h, sm)), get(point_pmap, target(next(h, sm), sm)))); + Vector(get(point_pmap, source(h, g)), get(point_pmap, target(h, g))), + Vector(get(point_pmap, target(h, g)), get(point_pmap, target(next(h, g), g)))); if (ni != NULL_VECTOR) { n+=ni; @@ -131,41 +141,41 @@ class SimpleFaceGraphViewerQt : public Basic_viewer_qt // This function return a lambda expression, type-erased in a // `std::function` object. - return [this, &sm, vnormals, anofaces, fcolor, point_pmap]() + return [this, &g, vnormals, anofaces, fcolor, point_pmap]() { this->clear(); if (!anofaces) { - for (auto fh: faces(sm)) + for (auto fh: faces(g)) { - if (fh!=boost::graph_traits::null_face()) - { - CGAL::IO::Color c=fcolor(sm, fh); - face_begin(c); - auto hd=halfedge(fh, sm); - const auto first_hd = hd; - do - { - auto v = source(hd, sm); - add_point_in_face(get(point_pmap, v), get(vnormals, v)); - hd=next(hd, sm); - } - while(hd!=first_hd); - face_end(); - } + const CGAL::IO::Color& c = fcolor(g, fh); + face_begin(c); + auto hd=halfedge(fh, g); + const auto first_hd = hd; + do + { + auto v = source(hd, g); + add_point_in_face(get(point_pmap, v), get(vnormals, v)); + hd=next(hd, g); + } + while(hd!=first_hd); + face_end(); } } - for (auto e: edges(sm)) + for (auto e: edges(g)) { - add_segment(get(point_pmap, source(halfedge(e, sm), sm)), - get(point_pmap, target(halfedge(e, sm), sm))); + const CGAL::IO::Color& c = fcolor(g, e); + add_segment(get(point_pmap, source(halfedge(e, g), g)), + get(point_pmap, target(halfedge(e, g), g)), + c); } - for (auto v: vertices(sm)) + for (auto v: vertices(g)) { - this->add_point(get(point_pmap, v)); + const CGAL::IO::Color& c = fcolor(g, v); + this->add_point(get(point_pmap, v), c); } }; } diff --git a/thirdparty/CGAL/include/CGAL/draw_face_graph_with_paths.h b/thirdparty/CGAL/include/CGAL/draw_face_graph_with_paths.h index 51e06780..f9ef0b78 100644 --- a/thirdparty/CGAL/include/CGAL/draw_face_graph_with_paths.h +++ b/thirdparty/CGAL/include/CGAL/draw_face_graph_with_paths.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h $ -// $Id: draw_face_graph_with_paths.h 440a8df 2022-02-03T08:41:04+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h $ +// $Id: include/CGAL/draw_face_graph_with_paths.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -33,12 +33,12 @@ struct LCC_geom_utils, Local_kernel, 3> { static typename Get_traits::Vector get_face_normal(const CGAL::Face_graph_wrapper& mesh, - typename CGAL::Face_graph_wrapper::Dart_const_handle dh) + typename CGAL::Face_graph_wrapper::Dart_const_descriptor dh) { typename Get_traits::Vector normal(CGAL::NULL_VECTOR); const typename Get_traits::Point* curr=&Get_traits::get_point(mesh.get_fg(), dh); - typename CGAL::Face_graph_wrapper::Dart_const_handle adart=dh; + typename CGAL::Face_graph_wrapper::Dart_const_descriptor adart=dh; unsigned int nb=0; do @@ -59,7 +59,7 @@ struct LCC_geom_utils, Local_kernel, 3> } static typename Local_kernel::Vector_3 get_vertex_normal(const CGAL::Face_graph_wrapper& mesh, - typename CGAL::Face_graph_wrapper::Dart_const_handle dh) + typename CGAL::Face_graph_wrapper::Dart_const_descriptor dh) { typename Get_traits::Vector normal(CGAL::NULL_VECTOR); unsigned int nb = 0; @@ -90,7 +90,7 @@ class Face_graph_with_path_viewer : public Basic_viewer_qt { typedef Basic_viewer_qt Base; typedef typename Get_map::type LCC; - typedef typename LCC::Dart_const_handle Dart_const_handle; + typedef typename LCC::Dart_const_descriptor Dart_const_descriptor; typedef typename LCC::size_type size_type; typedef typename CGAL::Get_traits::Kernel Kernel; typedef typename CGAL::Get_traits::Point Point; @@ -101,7 +101,7 @@ class Face_graph_with_path_viewer : public Basic_viewer_qt /// @param alcc the lcc to view /// @param title the title of the window /// @param anofaces if true, do not draw faces (faces are not computed; - /// this can be usefull for very big object where this time could be long) + /// this can be useful for very big object where this time could be long) Face_graph_with_path_viewer(QWidget* parent, const Mesh& amesh, const std::vector @@ -135,7 +135,7 @@ class Face_graph_with_path_viewer : public Basic_viewer_qt protected: - const Point& get_point(Dart_const_handle dh) const + const Point& get_point(Dart_const_descriptor dh) const { return CGAL::Get_traits::get_point(mesh, dh); } void compute_elements() @@ -148,7 +148,7 @@ class Face_graph_with_path_viewer : public Basic_viewer_qt if (m_current_dart!=lcc.darts().end()) { // We want to draw only one dart - Dart_const_handle selected_dart=m_current_dart; //lcc.dart_handle(m_current_dart); + Dart_const_descriptor selected_dart=m_current_dart; //lcc.dart_descriptor(m_current_dart); compute_edge(selected_dart, CGAL::IO::Color(255,0,0)); lcc.template mark_cell<1>(selected_dart, markedges); compute_vertex(selected_dart); @@ -205,11 +205,11 @@ class Face_graph_with_path_viewer : public Basic_viewer_qt lcc.free_mark(markvertices); } - void compute_face(Dart_const_handle dh) + void compute_face(Dart_const_descriptor dh) { // We fill only closed faces. - Dart_const_handle cur=dh; - Dart_const_handle min=dh; + Dart_const_descriptor cur=dh; + Dart_const_descriptor min=dh; do { if (!lcc.is_next_exist(cur)) return; // open face=>not filled @@ -234,11 +234,11 @@ class Face_graph_with_path_viewer : public Basic_viewer_qt face_end(); } - void compute_edge(Dart_const_handle dh) + void compute_edge(Dart_const_descriptor dh) { Point p1 = get_point(dh); - Dart_const_handle d2 = lcc.other_extremity(dh); - if (d2!=LCC::null_handle) + Dart_const_descriptor d2 = lcc.other_extremity(dh); + if (d2!=LCC::null_descriptor) { if (m_draw_marked_darts && m_amark!=LCC::INVALID_MARK && (lcc.is_marked(dh, m_amark) || lcc.is_marked(lcc.opposite2(dh), m_amark))) @@ -248,15 +248,15 @@ class Face_graph_with_path_viewer : public Basic_viewer_qt } } - void compute_edge(Dart_const_handle dh, const CGAL::IO::Color& color) + void compute_edge(Dart_const_descriptor dh, const CGAL::IO::Color& color) { Point p1 = get_point(dh); - Dart_const_handle d2 = lcc.other_extremity(dh); - if (d2!=LCC::null_handle) + Dart_const_descriptor d2 = lcc.other_extremity(dh); + if (d2!=LCC::null_descriptor) { add_segment(p1, get_point(d2), color); } } - void compute_vertex(Dart_const_handle dh) + void compute_vertex(Dart_const_descriptor dh) { add_point(get_point(dh)); } virtual void init() diff --git a/thirdparty/CGAL/include/CGAL/draw_linear_cell_complex.h b/thirdparty/CGAL/include/CGAL/draw_linear_cell_complex.h index 91f6b1f3..b50132b9 100644 --- a/thirdparty/CGAL/include/CGAL/draw_linear_cell_complex.h +++ b/thirdparty/CGAL/include/CGAL/draw_linear_cell_complex.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h $ -// $Id: draw_linear_cell_complex.h 2bbcabe 2021-11-11T17:23:37+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h $ +// $Id: include/CGAL/draw_linear_cell_complex.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -29,63 +29,63 @@ struct DefaultDrawingFunctorLCC /// @return true iff the volume containing dh is drawn. template bool draw_volume(const LCC&, - typename LCC::Dart_const_handle) const + typename LCC::Dart_const_descriptor) const { return true; } /// @return true iff the face containing dh is drawn. template bool draw_face(const LCC&, - typename LCC::Dart_const_handle) const + typename LCC::Dart_const_descriptor) const { return true; } /// @return true iff the edge containing dh is drawn. template bool draw_edge(const LCC&, - typename LCC::Dart_const_handle) const + typename LCC::Dart_const_descriptor) const { return true; } /// @return true iff the vertex containing dh is drawn. template bool draw_vertex(const LCC&, - typename LCC::Dart_const_handle) const + typename LCC::Dart_const_descriptor) const { return true; } /// @return true iff the volume containing dh is drawn in wireframe. template bool volume_wireframe(const LCC&, - typename LCC::Dart_const_handle) const + typename LCC::Dart_const_descriptor) const { return false; } /// @return true iff the face containing dh is drawn in wireframe. template bool face_wireframe(const LCC&, - typename LCC::Dart_const_handle) const + typename LCC::Dart_const_descriptor) const { return false; } /// @return true iff the volume containing dh is colored. template bool colored_volume(const LCC&, - typename LCC::Dart_const_handle) const + typename LCC::Dart_const_descriptor) const { return true; } /// @return true iff the face containing dh is colored. /// if we have also colored_volume(alcc, dh), the volume color is /// ignored and only the face color is considered. template bool colored_face(const LCC&, - typename LCC::Dart_const_handle) const + typename LCC::Dart_const_descriptor) const { return false; } /// @return true iff the edge containing dh is colored. template bool colored_edge(const LCC&, - typename LCC::Dart_const_handle) const + typename LCC::Dart_const_descriptor) const { return false; } /// @return true iff the vertex containing dh is colored. template bool colored_vertex(const LCC&, - typename LCC::Dart_const_handle) const + typename LCC::Dart_const_descriptor) const { return false; } /// @return the color of the volume containing dh /// used only if colored_volume(alcc, dh) and !colored_face(alcc, dh) template CGAL::IO::Color volume_color(const LCC& alcc, - typename LCC::Dart_const_handle dh) const + typename LCC::Dart_const_descriptor dh) const { CGAL::Random random((unsigned int)(alcc.darts().index(dh))); return get_random_color(random); @@ -94,7 +94,7 @@ struct DefaultDrawingFunctorLCC /// used only if colored_face(alcc, dh) template CGAL::IO::Color face_color(const LCC& alcc, - typename LCC::Dart_const_handle dh) const + typename LCC::Dart_const_descriptor dh) const { CGAL::Random random((unsigned int)(alcc.darts().index(dh))); return get_random_color(random); @@ -103,7 +103,7 @@ struct DefaultDrawingFunctorLCC /// used only if colored_edge(alcc, dh) template CGAL::IO::Color edge_color(const LCC& alcc, - typename LCC::Dart_const_handle dh) const + typename LCC::Dart_const_descriptor dh) const { CGAL::Random random((unsigned int)(alcc.darts().index(dh))); return get_random_color(random); @@ -112,7 +112,7 @@ struct DefaultDrawingFunctorLCC /// used only if colored_vertex(alcc, dh) template CGAL::IO::Color vertex_color(const LCC& alcc, - typename LCC::Dart_const_handle dh) const + typename LCC::Dart_const_descriptor dh) const { CGAL::Random random((unsigned int)(alcc.darts().index(dh))); return get_random_color(random); @@ -126,7 +126,7 @@ template struct LCC_geom_utils { static typename Local_kernel::Vector_3 - get_vertex_normal(const LCC& lcc, typename LCC::Dart_const_handle dh) + get_vertex_normal(const LCC& lcc, typename LCC::Dart_const_descriptor dh) { typename Local_kernel::Vector_3 n = internal::Geom_utils :: @@ -140,7 +140,7 @@ template struct LCC_geom_utils { static typename Local_kernel::Vector_3 - get_vertex_normal(const LCC&, typename LCC::Dart_const_handle) + get_vertex_normal(const LCC&, typename LCC::Dart_const_descriptor) { typename Local_kernel::Vector_3 n=CGAL::NULL_VECTOR; return n; @@ -152,7 +152,7 @@ template class SimpleLCCViewerQt : public Basic_viewer_qt { typedef Basic_viewer_qt Base; - typedef typename LCC::Dart_const_handle Dart_const_handle; + typedef typename LCC::Dart_const_descriptor Dart_const_descriptor; typedef typename LCC::Traits Kernel; typedef typename Kernel::Point Point; typedef typename Kernel::Vector Vector; @@ -162,7 +162,7 @@ class SimpleLCCViewerQt : public Basic_viewer_qt /// @param alcc the lcc to view /// @param title the title of the window /// @param anofaces if true, do not draw faces (faces are not computed; this can be - /// usefull for very big object where this time could be long) + /// useful for very big object where this time could be long) SimpleLCCViewerQt(QWidget* parent, const LCC* alcc=nullptr, const char* title="Basic LCC Viewer", @@ -195,13 +195,13 @@ class SimpleLCCViewerQt : public Basic_viewer_qt if (doredraw) { redraw(); } } - void compute_face(Dart_const_handle dh, Dart_const_handle voldh) + void compute_face(Dart_const_descriptor dh, Dart_const_descriptor voldh) { if (m_nofaces || !m_drawing_functor.draw_face(*lcc, dh)) return; // We fill only closed faces. - Dart_const_handle cur=dh; - Dart_const_handle min=dh; + Dart_const_descriptor cur=dh; + Dart_const_descriptor min=dh; do { if (!lcc->is_next_exist(cur)) return; // open face=>not filled @@ -241,13 +241,13 @@ class SimpleLCCViewerQt : public Basic_viewer_qt face_end(); } - void compute_edge(Dart_const_handle dh) + void compute_edge(Dart_const_descriptor dh) { if (!m_drawing_functor.draw_edge(*lcc, dh)) return; Point p1 = lcc->point(dh); - Dart_const_handle d2 = lcc->other_extremity(dh); - if (d2!=nullptr) + Dart_const_descriptor d2 = lcc->other_extremity(dh); + if (d2!=lcc->null_descriptor) { if (m_drawing_functor.colored_edge(*lcc, dh)) { add_segment(p1, lcc->point(d2), m_drawing_functor.edge_color(*lcc, dh)); } @@ -256,7 +256,7 @@ class SimpleLCCViewerQt : public Basic_viewer_qt } } - void compute_vertex(Dart_const_handle dh) + void compute_vertex(Dart_const_descriptor dh) { if (!m_drawing_functor.draw_vertex(*lcc, dh)) return; diff --git a/thirdparty/CGAL/include/CGAL/draw_nef_3.h b/thirdparty/CGAL/include/CGAL/draw_nef_3.h index 9f36f2a5..084f3d88 100644 --- a/thirdparty/CGAL/include/CGAL/draw_nef_3.h +++ b/thirdparty/CGAL/include/CGAL/draw_nef_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/draw_nef_3.h $ -// $Id: draw_nef_3.h 2df2398 2022-03-07T17:37:54+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/draw_nef_3.h $ +// $Id: include/CGAL/draw_nef_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -131,21 +131,23 @@ class SimpleNefPolyhedronViewerQt : public Basic_viewer_qt ++fc; while(fc!=f->facet_cycles_end()) { - se = SHalfedge_const_handle(fc); - hc_start=se; - hc_end=hc_start; - CGAL_For_all(hc_start, hc_end) { - Vertex_const_handle vh=hc_start->source()->center_vertex(); - viewer.add_point_in_face(vh->point(), - viewer.get_vertex_normal(vh)); + if(fc.is_shalfedge()) + { + se = SHalfedge_const_handle(fc); + hc_start=se; + hc_end=hc_start; + CGAL_For_all(hc_start, hc_end) { + Vertex_const_handle vh=hc_start->source()->center_vertex(); + viewer.add_point_in_face(vh->point(), + viewer.get_vertex_normal(vh)); + } + viewer.add_point_in_face(hc_start->source()->center_vertex()->point(), + viewer.get_vertex_normal(hc_start->source()->center_vertex())); + viewer.add_point_in_face(lastvh->point(), + viewer.get_vertex_normal(lastvh)); } - viewer.add_point_in_face(hc_start->source()->center_vertex()->point(), - viewer.get_vertex_normal(hc_start->source()->center_vertex())); - viewer.add_point_in_face(lastvh->point(), - viewer.get_vertex_normal(lastvh)); ++fc; } - viewer.face_end(); facets_done[f]=true; n_faces++; diff --git a/thirdparty/CGAL/include/CGAL/draw_periodic_2_triangulation_2.h b/thirdparty/CGAL/include/CGAL/draw_periodic_2_triangulation_2.h index 14818787..347a2a0d 100644 --- a/thirdparty/CGAL/include/CGAL/draw_periodic_2_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/draw_periodic_2_triangulation_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h $ -// $Id: draw_periodic_2_triangulation_2.h 2bbcabe 2021-11-11T17:23:37+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h $ +// $Id: include/CGAL/draw_periodic_2_triangulation_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jasmeet Singh @@ -60,7 +60,7 @@ class SimplePeriodic2Triangulation2ViewerQt : public Basic_viewer_qt /// @param ap2t2 the p2t2 to view /// @param title the title of the window /// @param anofaces if true, do not draw faces (faces are not computed; this can be - /// usefull for very big object where this time could be long) + /// useful for very big object where this time could be long) SimplePeriodic2Triangulation2ViewerQt(QWidget* parent, const P2T2& ap2t2, const char* title="Basic P2T2 Viewer", bool anofaces=false, diff --git a/thirdparty/CGAL/include/CGAL/draw_point_set_3.h b/thirdparty/CGAL/include/CGAL/draw_point_set_3.h index 363f1e98..559e63d1 100644 --- a/thirdparty/CGAL/include/CGAL/draw_point_set_3.h +++ b/thirdparty/CGAL/include/CGAL/draw_point_set_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_3/include/CGAL/draw_point_set_3.h $ -// $Id: draw_point_set_3.h 2bbcabe 2021-11-11T17:23:37+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_3/include/CGAL/draw_point_set_3.h $ +// $Id: include/CGAL/draw_point_set_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,8 +22,8 @@ namespace CGAL { /*! \ingroup PkgDrawPointSet3D -opens a new window and draws `aps`, an instance of the `CGAL::Point_set_3` class. A call to this function is blocking, that is the program continues as soon as the user closes the window. This function requires `CGAL_Qt5`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. -Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt5` and add the definition `CGAL_USE_BASIC_VIEWER`. +opens a new window and draws `aps`, an instance of the `CGAL::Point_set_3` class. A call to this function is blocking, that is the program continues as soon as the user closes the window. This function requires `CGAL_Qt6`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. +Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt6` and add the definition `CGAL_USE_BASIC_VIEWER`. \tparam PS an instance of the `CGAL::Point_set_3` class. \param aps the point set to draw. diff --git a/thirdparty/CGAL/include/CGAL/draw_polygon_2.h b/thirdparty/CGAL/include/CGAL/draw_polygon_2.h index 7898abd4..608471ff 100644 --- a/thirdparty/CGAL/include/CGAL/draw_polygon_2.h +++ b/thirdparty/CGAL/include/CGAL/draw_polygon_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon/include/CGAL/draw_polygon_2.h $ -// $Id: draw_polygon_2.h 2bbcabe 2021-11-11T17:23:37+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon/include/CGAL/draw_polygon_2.h $ +// $Id: include/CGAL/draw_polygon_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -25,8 +25,8 @@ namespace CGAL { /*! \ingroup PkgDrawPolygon2 -opens a new window and draws `ap`, an instance of the `CGAL::Polygon_2` class. A call to this function is blocking, that is the program continues as soon as the user closes the window. This function requires `CGAL_Qt5`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. -Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt5` and add the definition `CGAL_USE_BASIC_VIEWER`. +opens a new window and draws `ap`, an instance of the `CGAL::Polygon_2` class. A call to this function is blocking, that is the program continues as soon as the user closes the window. This function requires `CGAL_Qt6`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. +Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt6` and add the definition `CGAL_USE_BASIC_VIEWER`. \tparam P an instance of the `CGAL::Polygon_2` class. \param ap the polygon to draw. diff --git a/thirdparty/CGAL/include/CGAL/draw_polygon_set_2.h b/thirdparty/CGAL/include/CGAL/draw_polygon_set_2.h index 5bd1f1d0..631f508a 100644 --- a/thirdparty/CGAL/include/CGAL/draw_polygon_set_2.h +++ b/thirdparty/CGAL/include/CGAL/draw_polygon_set_2.h @@ -7,9 +7,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Boolean_set_operations_2/include/CGAL/draw_polygon_set_2.h $ -// $Id: draw_polygon_set_2.h 2bbcabe 2021-11-11T17:23:37+01:00 Guillaume Damiand -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Boolean_set_operations_2/include/CGAL/draw_polygon_set_2.h $ +// $Id: include/CGAL/draw_polygon_set_2.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Guillaume Damiand @@ -17,20 +17,26 @@ #ifndef CGAL_DRAW_POLYGON_SET_2_H #define CGAL_DRAW_POLYGON_SET_2_H -#include +#include + + +#include #ifdef DOXYGEN_RUNNING namespace CGAL { /*! -\ingroup PkgDrawPolygonSet2 - -opens a new window and draws `aps`, an instance of the `CGAL::Polygon_set_2` class. A call to this function is blocking, that is the program continues as soon as the user closes the window. This function requires `CGAL_Qt5`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. -Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt5` and add the definition `CGAL_USE_BASIC_VIEWER`. -\tparam PS an instance of the `CGAL::Polygon_set_2` class. -\param aps the polygon set to draw. - -*/ + * \ingroup PkgDrawPolygonSet2 + * + * opens a new window and draws `aps`, an instance of the `CGAL::Polygon_set_2` + * class. A call to this function is blocking, that is the program continues as + * soon as the user closes the window. This function requires `CGAL_Qt6`, and is + * only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. Linking with + * the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt6` and add + * the definition `CGAL_USE_BASIC_VIEWER`. + * \tparam PS an instance of the `CGAL::Polygon_set_2` class. + * \param aps the polygon set to draw. + */ template void draw(const PS& aps); @@ -38,50 +44,174 @@ void draw(const PS& aps); #endif #ifdef CGAL_USE_BASIC_VIEWER + +#include #include -namespace CGAL -{ +namespace CGAL { -template -class SimplePolygonSet2ViewerQt : - public SimplePolygonWithHoles2ViewerQt -{ - typedef SimplePolygonWithHoles2ViewerQt Base; +template +class Polygon_set_2_basic_viewer_qt : public Basic_viewer_qt { + using Base = Basic_viewer_qt; + using Ps = PolygonSet_2; + using Pwh = typename Ps::Polygon_with_holes_2; + using Pgn = typename Ps::Polygon_2; + using Pnt = typename Pgn::Point_2; public: - SimplePolygonSet2ViewerQt(QWidget* parent, const PS2& aps2, - const char* title="Basic Polygon_set_2 Viewer") : - Base(parent, title) + Polygon_set_2_basic_viewer_qt(QWidget* parent, const Ps& ps, + const char* title = "Basic Polygon_set_2 Viewer", + bool draw_unbounded = false, + bool draw_vertices = false) : + Base(parent, title, draw_vertices), + m_ps(ps), + m_draw_unbounded(draw_unbounded) { - std::vector polygons; - aps2.polygons_with_holes(std::back_inserter(polygons)); + if (ps.is_empty()) return; + + // mimic the computation of Camera::pixelGLRatio() + auto bbox = bounding_box(); + CGAL::qglviewer::Vec minv(bbox.xmin(), bbox.ymin(), 0); + CGAL::qglviewer::Vec maxv(bbox.xmax(), bbox.ymax(), 0); + auto diameter = (maxv - minv).norm(); + m_pixel_ratio = diameter / m_height; + } + + /*! Intercept the resizing of the window. + */ + virtual void resizeGL(int width, int height) { + CGAL::QGLViewer::resizeGL(width, height); + m_width = width; + m_height = height; + CGAL::qglviewer::Vec p; + auto ratio = camera()->pixelGLRatio(p); + if (ratio != m_pixel_ratio) { + m_pixel_ratio = ratio; + add_elements(); + } + } + + /*! Compute the elements of a polygon set. + */ + virtual void add_elements() { + clear(); + + std::vector pwhs; + m_ps.polygons_with_holes(std::back_inserter(pwhs)); + for (const auto& pwh : pwhs) add_elements(pwh); + } + + /*! Obtain the pixel ratio. + */ + double pixel_ratio() const { return m_pixel_ratio; } + + /*! Compute the bounding box. + */ + CGAL::Bbox_2 bounding_box() { + Bbox_2 bbox; + std::vector pwhs; + m_ps.polygons_with_holes(std::back_inserter(pwhs)); + for (const auto& pwh : pwhs) { + if (! pwh.is_unbounded()) { + bbox += pwh.outer_boundary().bbox(); + continue; + } + for (auto it = pwh.holes_begin(); it != pwh.holes_end(); ++it) + bbox += it->bbox(); + } + return bbox; + } + +protected: + /*! Compute the elements of a polygon with holes. + */ + void add_elements(const Pwh& pwh) { + if (! m_draw_unbounded && pwh.outer_boundary().is_empty()) return; + + CGAL::IO::Color c(75,160,255); + face_begin(c); + + const Pnt* point_in_face; + if (pwh.outer_boundary().is_empty()) { + Pgn pgn; + pgn.push_back(Pnt(-m_width, -m_height)); + pgn.push_back(Pnt(m_width, -m_height)); + pgn.push_back(Pnt(m_width, m_height)); + pgn.push_back(Pnt(-m_width, m_height)); + compute_loop(pgn, false); + point_in_face = &(pgn.vertex(pgn.size()-1)); + } + else { + const auto& outer_boundary = pwh.outer_boundary(); + compute_loop(outer_boundary, false); + point_in_face = &(outer_boundary.vertex(outer_boundary.size()-1)); + } + + for (auto it = pwh.holes_begin(); it != pwh.holes_end(); ++it) { + compute_loop(*it, true); + add_point_in_face(*point_in_face); + } + + face_end(); + } - for (typename PS2::Polygon_with_holes_2& P: polygons) { - Base::compute_elements(P); + void compute_loop(const Pgn& p, bool hole) { + if (hole) add_point_in_face(p.vertex(p.size()-1)); + + auto prev = p.vertices_begin(); + auto it = prev; + add_point(*it); + add_point_in_face(*it); + for (++it; it != p.vertices_end(); ++it) { + add_point(*it); // add vertex + add_segment(*prev, *it); // add segment with previous point + add_point_in_face(*it); // add point in face + prev = it; } + + // Add the last segment between the last point and the first one + add_segment(*prev, *(p.vertices_begin())); } + +private: + //! The window width in pixels. + int m_width = CGAL_BASIC_VIEWER_INIT_SIZE_X; + + //! The window height in pixels. + int m_height = CGAL_BASIC_VIEWER_INIT_SIZE_Y; + + //! The ratio between pixel and opengl units (in world coordinate system). + double m_pixel_ratio = 1; + + //! The polygon set to draw. + const Ps& m_ps; + + //! Indicates whether to draw unbounded polygons with holes. + bool m_draw_unbounded = false; }; // Specialization of draw function. -template -void draw(const CGAL::Polygon_set_2& aps2, - const char* title="Polygon_set_2 Basic Viewer") +template +void draw(const CGAL::Polygon_set_2& ps, + const char* title = "Polygon_set_2 Basic Viewer", + bool draw_vertices = false, + bool draw_unbounded = false) { #if defined(CGAL_TEST_SUITE) - bool cgal_test_suite=true; + bool cgal_test_suite = true; #else - bool cgal_test_suite=qEnvironmentVariableIsSet("CGAL_TEST_SUITE"); + bool cgal_test_suite = qEnvironmentVariableIsSet("CGAL_TEST_SUITE"); #endif - if (!cgal_test_suite) - { + if (! cgal_test_suite) { + using Ps = CGAL::Polygon_set_2; + using Viewer = Polygon_set_2_basic_viewer_qt; CGAL::Qt::init_ogl_context(4,3); - int argc=1; - const char* argv[2]={"t2_viewer", nullptr}; - QApplication app(argc,const_cast(argv)); - SimplePolygonSet2ViewerQt > - mainwindow(app.activeWindow(), aps2, title); + int argc = 1; + const char* argv[2] = {"t2_viewer", nullptr}; + QApplication app(argc, const_cast(argv)); + Viewer mainwindow(app.activeWindow(), ps, title, draw_unbounded, draw_vertices); + mainwindow.add_elements(); mainwindow.show(); app.exec(); } diff --git a/thirdparty/CGAL/include/CGAL/draw_polygon_with_holes_2.h b/thirdparty/CGAL/include/CGAL/draw_polygon_with_holes_2.h index 435406dd..40d947a8 100644 --- a/thirdparty/CGAL/include/CGAL/draw_polygon_with_holes_2.h +++ b/thirdparty/CGAL/include/CGAL/draw_polygon_with_holes_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon/include/CGAL/draw_polygon_with_holes_2.h $ -// $Id: draw_polygon_with_holes_2.h 2bbcabe 2021-11-11T17:23:37+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon/include/CGAL/draw_polygon_with_holes_2.h $ +// $Id: include/CGAL/draw_polygon_with_holes_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,103 +23,149 @@ namespace CGAL { /*! -\ingroup PkgDrawPolygonWithHoles2 - -opens a new window and draws `aph`, an instance of the `CGAL::Polygon_with_holes_2` class. A call to this function is blocking, that is the program continues as soon as the user closes the window. This function requires `CGAL_Qt5`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. -Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt5` and add the definition `CGAL_USE_BASIC_VIEWER`. -\tparam PH an instance of the `CGAL::Polygon_with_holes_2` class. -\param aph the polygon with holes to draw. - -*/ -template + * \ingroup PkgDrawPolygonWithHoles2 + * + * opens a new window and draws `aph`, an instance of the + * `CGAL::Polygon_with_holes_2` class. A call to this function is blocking, that + * is the program continues as soon as the user closes the window. This function + * requires `CGAL_Qt6`, and is only available if the macro + * `CGAL_USE_BASIC_VIEWER` is defined. Linking with the cmake target + * `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt6` and add the definition + * `CGAL_USE_BASIC_VIEWER`. + * \tparam PH an instance of the `CGAL::Polygon_with_holes_2` class. + * \param aph the polygon with holes to draw. + */ + +template void draw(const PH& aph); } /* namespace CGAL */ + #endif #ifdef CGAL_USE_BASIC_VIEWER + #include #include -#include -namespace CGAL -{ +namespace CGAL { // Viewer class for Polygon_with_holes_2 -template -class SimplePolygonWithHoles2ViewerQt : public Basic_viewer_qt -{ - typedef Basic_viewer_qt Base; - typedef typename P2::General_polygon_2::Point_2 Point; +template +class Pwh_2_basic_viewer_qt : public Basic_viewer_qt { + using Base = Basic_viewer_qt; + using Pwh = PolygonWidthHoles_2; + using Pgn = typename Pwh::Polygon_2; + using Pnt = typename Pgn::Point_2; public: - /// Construct the viewer without drawing anything. + /// Construct the viewer. + /// @param parent the active window to draw + /// @param pwh the polygon to view /// @param title the title of the window - SimplePolygonWithHoles2ViewerQt(QWidget* parent, - const char* title="Basic Polygon_with_holes_2 Viewer") : - Base(parent, title, true, true, true, false, false) + Pwh_2_basic_viewer_qt(QWidget* parent, const Pwh& pwh, + const char* title = "Basic Polygon_with_holes_2 Viewer") : + Base(parent, title, true, true, true, false, false), + m_pwh(pwh) { - clear(); + if (pwh.is_unbounded() && (0 == pwh.number_of_holes())) return; + + // mimic the computation of Camera::pixelGLRatio() + auto bbox = bounding_box(); + CGAL::qglviewer::Vec minv(bbox.xmin(), bbox.ymin(), 0); + CGAL::qglviewer::Vec maxv(bbox.xmax(), bbox.ymax(), 0); + auto diameter = (maxv - minv).norm(); + m_pixel_ratio = diameter / m_height; } - /// Construct the viewer. - /// @param ap2 the polygon to view - /// @param title the title of the window - SimplePolygonWithHoles2ViewerQt(QWidget* parent, const P2& ap2, - const char* title="Basic Polygon_with_holes_2 Viewer") : - // First draw: vertices; edges, faces; multi-color; no inverse normal - Base(parent, title, true, true, true, false, false) - { - clear(); - compute_elements(ap2); + /*! Intercept the resizing of the window. + */ + virtual void resizeGL(int width, int height) { + CGAL::QGLViewer::resizeGL(width, height); + m_width = width; + m_height = height; + CGAL::qglviewer::Vec p; + auto ratio = camera()->pixelGLRatio(p); + m_pixel_ratio = ratio; + add_elements(); } -protected: - void compute_one_loop_elements(const typename P2::General_polygon_2& p, bool hole) - { - if (hole) - { add_point_in_face(p.vertex(p.size()-1)); } - - typename P2::General_polygon_2::Vertex_const_iterator prev; - for (typename P2::General_polygon_2::Vertex_const_iterator i=p.vertices_begin(); - i!=p.vertices_end(); ++i) - { - add_point(*i); // Add vertex - if (i!=p.vertices_begin()) - { add_segment(*prev, *i); } // Add segment with previous point - add_point_in_face(*i); // Add point in face - prev=i; - } + /*! Obtain the pixel ratio. + */ + double pixel_ratio() const { return m_pixel_ratio; } - // Add the last segment between the last point and the first one - add_segment(*prev, *(p.vertices_begin())); - } + /*! Compute the bounding box. + */ + CGAL::Bbox_2 bounding_box() { + if (! m_pwh.is_unbounded()) return m_pwh.outer_boundary().bbox(); - void compute_elements(const P2& p2) - { - if (p2.outer_boundary().is_empty()) return; + Bbox_2 bbox; + for (auto it = m_pwh.holes_begin(); it != m_pwh.holes_end(); ++it) + bbox += it->bbox(); + return bbox; + } + /*! Compute the elements of a polygon with holes. + */ + void add_elements() { + clear(); CGAL::IO::Color c(75,160,255); face_begin(c); - compute_one_loop_elements(p2.outer_boundary(), false); + const Pnt* point_in_face; + if (m_pwh.outer_boundary().is_empty()) { + Pgn pgn; + + double x = (double)m_width * 0.5 * m_pixel_ratio; + double y = (double)m_height * 0.5 * m_pixel_ratio; + pgn.push_back(Pnt(-x, -y)); + pgn.push_back(Pnt(x, -y)); + pgn.push_back(Pnt(x, y)); + pgn.push_back(Pnt(-x, y)); + compute_loop(pgn, false); + point_in_face = &(pgn.vertex(pgn.size()-1)); + } + else { + const auto& outer_boundary = m_pwh.outer_boundary(); + compute_loop(outer_boundary, false); + point_in_face = &(outer_boundary.vertex(outer_boundary.size()-1)); + } - for (typename P2::Hole_const_iterator it=p2.holes_begin(); it!=p2.holes_end(); ++it) - { - compute_one_loop_elements(*it, true); - add_point_in_face(p2.outer_boundary().vertex(p2.outer_boundary().size()-1)); + for (auto it = m_pwh.holes_begin(); it != m_pwh.holes_end(); ++it) { + compute_loop(*it, true); + add_point_in_face(*point_in_face); } face_end(); } - virtual void keyPressEvent(QKeyEvent *e) - { +protected: + /*! Compute the face + */ + void compute_loop(const Pgn& p, bool hole) { + if (hole) add_point_in_face(p.vertex(p.size()-1)); + + auto prev = p.vertices_begin(); + auto it = prev; + add_point(*it); + add_point_in_face(*it); + for (++it; it != p.vertices_end(); ++it) { + add_segment(*prev, *it); // add segment with previous point + add_point(*it); + add_point_in_face(*it); // add point in face + prev = it; + } + + // Add the last segment between the last point and the first one + add_segment(*prev, *(p.vertices_begin())); + } + + virtual void keyPressEvent(QKeyEvent* e) { // Test key pressed: // const ::Qt::KeyboardModifiers modifiers = e->modifiers(); // if ((e->key()==Qt::Key_PageUp) && (modifiers==Qt::NoButton)) { ... } - // Call: * compute_elements() if the model changed, followed by + // Call: * add_elements() if the model changed, followed by // * redraw() if some viewing parameters changed that implies some // modifications of the buffers // (eg. type of normal, color/mono) @@ -128,27 +174,41 @@ class SimplePolygonWithHoles2ViewerQt : public Basic_viewer_qt // Call the base method to process others/classicals key Base::keyPressEvent(e); } + +private: + //! The window width in pixels. + int m_width = CGAL_BASIC_VIEWER_INIT_SIZE_X; + + //! The window height in pixels. + int m_height = CGAL_BASIC_VIEWER_INIT_SIZE_Y; + + //! The ratio between pixel and opengl units (in world coordinate system). + double m_pixel_ratio = 1; + + //! The polygon with holes to draw. + const Pwh& m_pwh; }; // Specialization of draw function. template -void draw(const CGAL::Polygon_with_holes_2& ap2, - const char* title="Polygon_with_holes_2 Basic Viewer") +void draw(const CGAL::Polygon_with_holes_2& pwh, + const char* title = "Polygon_with_holes_2 Basic Viewer") { #if defined(CGAL_TEST_SUITE) - bool cgal_test_suite=true; + bool cgal_test_suite = true; #else - bool cgal_test_suite=qEnvironmentVariableIsSet("CGAL_TEST_SUITE"); + bool cgal_test_suite = qEnvironmentVariableIsSet("CGAL_TEST_SUITE"); #endif - if (!cgal_test_suite) - { + if (! cgal_test_suite) { + using Pwh = CGAL::Polygon_with_holes_2; + using Viewer = Pwh_2_basic_viewer_qt; CGAL::Qt::init_ogl_context(4,3); - int argc=1; - const char* argv[2]={"t2_viewer", nullptr}; - QApplication app(argc,const_cast(argv)); - SimplePolygonWithHoles2ViewerQt > - mainwindow(app.activeWindow(), ap2, title); + int argc = 1; + const char* argv[2] = {"t2_viewer", nullptr}; + QApplication app(argc, const_cast(argv)); + Viewer mainwindow(app.activeWindow(), pwh, title); + mainwindow.add_elements(); mainwindow.show(); app.exec(); } diff --git a/thirdparty/CGAL/include/CGAL/draw_polyhedron.h b/thirdparty/CGAL/include/CGAL/draw_polyhedron.h index b70b6f64..c4802004 100644 --- a/thirdparty/CGAL/include/CGAL/draw_polyhedron.h +++ b/thirdparty/CGAL/include/CGAL/draw_polyhedron.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/draw_polyhedron.h $ -// $Id: draw_polyhedron.h 2bbcabe 2021-11-11T17:23:37+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/draw_polyhedron.h $ +// $Id: include/CGAL/draw_polyhedron.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand diff --git a/thirdparty/CGAL/include/CGAL/draw_straight_skeleton_2.h b/thirdparty/CGAL/include/CGAL/draw_straight_skeleton_2.h index e73c20ea..b3b82632 100644 --- a/thirdparty/CGAL/include/CGAL/draw_straight_skeleton_2.h +++ b/thirdparty/CGAL/include/CGAL/draw_straight_skeleton_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/draw_straight_skeleton_2.h $ -// $Id: draw_straight_skeleton_2.h 2bbcabe 2021-11-11T17:23:37+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/draw_straight_skeleton_2.h $ +// $Id: include/CGAL/draw_straight_skeleton_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -96,6 +96,8 @@ class SimpleStraightSkeleton2ViewerQt : public Basic_viewer_qt add_point(vh->point(), CGAL::IO::Color(10,10,180)); // blue, but not flashy else if(vh->has_infinite_time()) add_point(vh->point(), CGAL::IO::orange()); + else if(vh->is_contour()) + add_point(vh->point(), CGAL::IO::black()); else add_point(vh->point(), CGAL::IO::Color(10,180,10)); // green, but not flashy } diff --git a/thirdparty/CGAL/include/CGAL/draw_surface_mesh.h b/thirdparty/CGAL/include/CGAL/draw_surface_mesh.h index fcb04f09..ef6d45a8 100644 --- a/thirdparty/CGAL/include/CGAL/draw_surface_mesh.h +++ b/thirdparty/CGAL/include/CGAL/draw_surface_mesh.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh/include/CGAL/draw_surface_mesh.h $ -// $Id: draw_surface_mesh.h 2bbcabe 2021-11-11T17:23:37+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh/include/CGAL/draw_surface_mesh.h $ +// $Id: include/CGAL/draw_surface_mesh.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -17,8 +17,8 @@ /*! \ingroup PkgDrawSurfaceMesh -Open a new window and draw `asm`, an instance of the `CGAL::Surface_mesh` class. The function is blocking, that is the program continues as soon as the user closes the window. This function requires `CGAL_Qt5`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. -Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt5` and add the definition `CGAL_USE_BASIC_VIEWER`. +Open a new window and draw `asm`, an instance of the `CGAL::Surface_mesh` class. The function is blocking, that is the program continues as soon as the user closes the window. This function requires `CGAL_Qt6`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. +Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt6` and add the definition `CGAL_USE_BASIC_VIEWER`. \tparam SM an instance of the `CGAL::Surface_mesh` class. \param asm the surface mesh to draw. @@ -36,8 +36,58 @@ void draw(const SM& asm); #include #include #include -namespace CGAL +#include + +namespace CGAL { + +// Check if there are any color maps that could be used, random otherwise +template +struct Surface_mesh_basic_viewer_color_map + : DefaultColorFunctorFaceGraph { + using Base = DefaultColorFunctorFaceGraph; + + using SM = ::CGAL::Surface_mesh; + using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; + using edge_descriptor = typename boost::graph_traits::edge_descriptor; + using face_descriptor = typename boost::graph_traits::face_descriptor; + + using vertex_colors = typename SM::template Property_map; + using edge_colors = typename SM::template Property_map; + using face_colors = typename SM::template Property_map; + + Surface_mesh_basic_viewer_color_map(const SM& amesh) + { + bool found = false; + std::tie(vcolors, found) = amesh.template property_map("v:color"); + std::tie(ecolors, found) = amesh.template property_map("e:color"); + std::tie(fcolors, found) = amesh.template property_map("f:color"); + CGAL_USE(found); + } + + CGAL::IO::Color operator()(const Surface_mesh& amesh, + const vertex_descriptor v) const + { + return vcolors ? get(vcolors, v) : Base::operator()(amesh, v); + } + + CGAL::IO::Color operator()(const Surface_mesh& amesh, + const edge_descriptor e) const + { + return ecolors ? get(ecolors, e) : Base::operator()(amesh, e); + } + + CGAL::IO::Color operator()(const Surface_mesh& amesh, + const face_descriptor f) const + { + return fcolors ? get(fcolors, f) : Base::operator()(amesh, f); + } + +private: + vertex_colors vcolors; + edge_colors ecolors; + face_colors fcolors; +}; // Specialization of draw function. template @@ -57,8 +107,8 @@ void draw(const Surface_mesh& amesh, int argc=1; const char* argv[2]={"surface_mesh_viewer", nullptr}; QApplication app(argc,const_cast(argv)); - SimpleFaceGraphViewerQt mainwindow(app.activeWindow(), amesh, title, - nofill); + SimpleFaceGraphViewerQt mainwindow(app.activeWindow(), amesh, title, nofill, + Surface_mesh_basic_viewer_color_map(amesh)); mainwindow.show(); app.exec(); } diff --git a/thirdparty/CGAL/include/CGAL/draw_triangulation_2.h b/thirdparty/CGAL/include/CGAL/draw_triangulation_2.h index fc347b5b..e5d3cee9 100644 --- a/thirdparty/CGAL/include/CGAL/draw_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/draw_triangulation_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_2/include/CGAL/draw_triangulation_2.h $ -// $Id: draw_triangulation_2.h 2bbcabe 2021-11-11T17:23:37+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/draw_triangulation_2.h $ +// $Id: include/CGAL/draw_triangulation_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -15,10 +15,13 @@ #include #include +#include + +#include + #ifdef CGAL_USE_BASIC_VIEWER #include -#include #include namespace CGAL @@ -51,7 +54,7 @@ class SimpleTriangulation2ViewerQt : public Basic_viewer_qt /// @param at2 the t2 to view /// @param title the title of the window /// @param anofaces if true, do not draw faces (faces are not computed; this can be - /// usefull for very big object where this time could be long) + /// useful for very big object where this time could be long) SimpleTriangulation2ViewerQt(QWidget* parent, const T2& at2, const char* title="Basic T2 Viewer", bool anofaces=false, @@ -133,10 +136,10 @@ class SimpleTriangulation2ViewerQt : public Basic_viewer_qt #define CGAL_T2_TYPE CGAL::Triangulation_2 template -void draw(const CGAL_T2_TYPE& at2, - const char* title="Triangulation_2 Basic Viewer", - bool nofill=false) +void draw(const CGAL_T2_TYPE& at2) { + const char* title="Triangulation_2 Basic Viewer"; + bool nofill=false; #if defined(CGAL_TEST_SUITE) bool cgal_test_suite=true; #else diff --git a/thirdparty/CGAL/include/CGAL/draw_triangulation_3.h b/thirdparty/CGAL/include/CGAL/draw_triangulation_3.h index 76157080..06360350 100644 --- a/thirdparty/CGAL/include/CGAL/draw_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/draw_triangulation_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/draw_triangulation_3.h $ -// $Id: draw_triangulation_3.h 2bbcabe 2021-11-11T17:23:37+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/draw_triangulation_3.h $ +// $Id: include/CGAL/draw_triangulation_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand @@ -56,7 +56,7 @@ class SimpleTriangulation3ViewerQt : public Basic_viewer_qt /// @param at3 the t3 to view /// @param title the title of the window /// @param anofaces if true, do not draw faces (faces are not computed; this can be - /// usefull for very big object where this time could be long) + /// useful for very big object where this time could be long) SimpleTriangulation3ViewerQt(QWidget* parent, const T3& at3, const char* title="Basic T3 Viewer", diff --git a/thirdparty/CGAL/include/CGAL/draw_voronoi_diagram_2.h b/thirdparty/CGAL/include/CGAL/draw_voronoi_diagram_2.h index 50463939..6b5dee20 100644 --- a/thirdparty/CGAL/include/CGAL/draw_voronoi_diagram_2.h +++ b/thirdparty/CGAL/include/CGAL/draw_voronoi_diagram_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h $ -// $Id: draw_voronoi_diagram_2.h 2bbcabe 2021-11-11T17:23:37+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h $ +// $Id: include/CGAL/draw_voronoi_diagram_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jasmeet Singh diff --git a/thirdparty/CGAL/include/CGAL/edge_aware_upsample_point_set.h b/thirdparty/CGAL/include/CGAL/edge_aware_upsample_point_set.h index a60fb56e..be6a3973 100644 --- a/thirdparty/CGAL/include/CGAL/edge_aware_upsample_point_set.h +++ b/thirdparty/CGAL/include/CGAL/edge_aware_upsample_point_set.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h $ -// $Id: edge_aware_upsample_point_set.h bccf399 2022-11-08T10:51:46+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h $ +// $Id: include/CGAL/edge_aware_upsample_point_set.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Shihao Wu, Clement Jamin, Pierre Alliez @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include @@ -147,8 +147,8 @@ update_new_point( typedef typename rich_grid_internal::Rich_point Rich_point; CGAL_assertion_code( unsigned int size = static_cast(rich_point_set.size()) ); - CGAL_point_set_processing_precondition(father_index < size); - CGAL_point_set_processing_precondition(mother_index < size); + CGAL_precondition(father_index < size); + CGAL_precondition(mother_index < size); // 1, get neighbor information from the two "parent points" Rich_point& new_v = rich_point_set[new_point_index]; @@ -386,16 +386,16 @@ edge_aware_upsample_point_set( typename PointRange::const_iterator end = points.end(); // preconditions - CGAL_point_set_processing_precondition(begin != end); - CGAL_point_set_processing_precondition(sharpness_angle >= 0 - &&sharpness_angle <= 90); - CGAL_point_set_processing_precondition(edge_sensitivity >= 0 - &&edge_sensitivity <= 1); + CGAL_precondition(begin != end); + CGAL_precondition(sharpness_angle >= 0 + &&sharpness_angle <= 90); + CGAL_precondition(edge_sensitivity >= 0 + &&edge_sensitivity <= 1); edge_sensitivity *= 10; // just project [0, 1] to [0, 10]. std::size_t number_of_input = std::distance(begin, end); - CGAL_point_set_processing_precondition(number_of_output_points > number_of_input); + CGAL_precondition(number_of_output_points > number_of_input); const unsigned int nb_neighbors = 6; // 1 ring @@ -424,7 +424,7 @@ edge_aware_upsample_point_set( rich_point_set[i].index = i; bbox += rich_point_set[i].pt.bbox(); - CGAL_point_set_processing_precondition(rich_point_set[i].normal.squared_length() > 1e-10); + CGAL_precondition(rich_point_set[i].normal.squared_length() > 1e-10); } // compute neighborhood diff --git a/thirdparty/CGAL/include/CGAL/enable_warnings.h b/thirdparty/CGAL/include/CGAL/enable_warnings.h index 9cb14062..5e19fb5f 100644 --- a/thirdparty/CGAL/include/CGAL/enable_warnings.h +++ b/thirdparty/CGAL/include/CGAL/enable_warnings.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/enable_warnings.h $ -// $Id: enable_warnings.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/enable_warnings.h $ +// $Id: include/CGAL/enable_warnings.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/enum.h b/thirdparty/CGAL/include/CGAL/enum.h index bc512ff9..36419cc5 100644 --- a/thirdparty/CGAL/include/CGAL/enum.h +++ b/thirdparty/CGAL/include/CGAL/enum.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/enum.h $ -// $Id: enum.h 5c8df66 2020-09-25T14:25:14+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/enum.h $ +// $Id: include/CGAL/enum.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/envelope_2.h b/thirdparty/CGAL/include/CGAL/envelope_2.h index 4d7e542b..5add8acd 100644 --- a/thirdparty/CGAL/include/CGAL/envelope_2.h +++ b/thirdparty/CGAL/include/CGAL/envelope_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_2/include/CGAL/envelope_2.h $ -// $Id: envelope_2.h a46398d 2020-08-25T13:43:49+02:00 Ahmed Essam +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_2/include/CGAL/envelope_2.h $ +// $Id: include/CGAL/envelope_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/envelope_3.h b/thirdparty/CGAL/include/CGAL/envelope_3.h index 0946cd85..4ea3fdc8 100644 --- a/thirdparty/CGAL/include/CGAL/envelope_3.h +++ b/thirdparty/CGAL/include/CGAL/envelope_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Envelope_3/include/CGAL/envelope_3.h $ -// $Id: envelope_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Envelope_3/include/CGAL/envelope_3.h $ +// $Id: include/CGAL/envelope_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/estimate_scale.h b/thirdparty/CGAL/include/CGAL/estimate_scale.h index 25ef9993..51f7eba9 100644 --- a/thirdparty/CGAL/include/CGAL/estimate_scale.h +++ b/thirdparty/CGAL/include/CGAL/estimate_scale.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/estimate_scale.h $ -// $Id: estimate_scale.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/estimate_scale.h $ +// $Id: include/CGAL/estimate_scale.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/thirdparty/CGAL/include/CGAL/exceptions.h b/thirdparty/CGAL/include/CGAL/exceptions.h index 9a9cf27a..e272303c 100644 --- a/thirdparty/CGAL/include/CGAL/exceptions.h +++ b/thirdparty/CGAL/include/CGAL/exceptions.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/exceptions.h $ -// $Id: exceptions.h 04305dc 2020-06-13T23:39:35+05:30 Abhay Raj Singh +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/exceptions.h $ +// $Id: include/CGAL/exceptions.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,26 +14,13 @@ #ifndef CGAL_EXCEPTIONS_H #define CGAL_EXCEPTIONS_H -#include #include #include -// Address the warning C4003: not enough actual parameters for macro 'BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY' -// lexical_cast.hpp includes files from boost/preprocessor -// This concerns boost 1_67_0 -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable: 4003) -#endif -#include -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif - namespace CGAL { -// [Sylvain] This was originaly written in the Exacus library. +// [Sylvain] This was originally written in the Exacus library. // I kept most doxygen comments. @@ -87,7 +74,7 @@ class Failure_exception : public std::logic_error { std::logic_error( lib + std::string( " ERROR: ") + kind + std::string( "!") + ((expr.empty()) ? (std::string("")) : (std::string("\nExpr: ")+expr)) + std::string( "\nFile: ") + file - + std::string( "\nLine: ") + boost::lexical_cast(line) + + std::string( "\nLine: ") + std::to_string(line) + ((msg.empty()) ? (std::string("")) : (std::string("\nExplanation: ") + msg))), m_lib( lib), diff --git a/thirdparty/CGAL/include/CGAL/export/CGAL.h b/thirdparty/CGAL/include/CGAL/export/CGAL.h index ed5327b6..aaa7571a 100644 --- a/thirdparty/CGAL/include/CGAL/export/CGAL.h +++ b/thirdparty/CGAL/include/CGAL/export/CGAL.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/export/CGAL.h $ -// $Id: CGAL.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/export/CGAL.h $ +// $Id: include/CGAL/export/CGAL.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/export/CORE.h b/thirdparty/CGAL/include/CGAL/export/CORE.h index 98e8cc1d..c5cf0345 100644 --- a/thirdparty/CGAL/include/CGAL/export/CORE.h +++ b/thirdparty/CGAL/include/CGAL/export/CORE.h @@ -18,11 +18,11 @@ * Sylvain Pion * Vikram Sharma * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * - * $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_Core/include/CGAL/export/CORE.h $ - * $Id: CORE.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot + * $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_Core/include/CGAL/export/CORE.h $ + * $Id: include/CGAL/export/CORE.h a484bfa $ * SPDX-License-Identifier: LGPL-3.0-or-later ***************************************************************************/ diff --git a/thirdparty/CGAL/include/CGAL/export/ImageIO.h b/thirdparty/CGAL/include/CGAL/export/ImageIO.h index af6c92f4..dca72a0b 100644 --- a/thirdparty/CGAL/include/CGAL/export/ImageIO.h +++ b/thirdparty/CGAL/include/CGAL/export/ImageIO.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/export/ImageIO.h $ -// $Id: ImageIO.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/export/ImageIO.h $ +// $Id: include/CGAL/export/ImageIO.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/export/Qt.h b/thirdparty/CGAL/include/CGAL/export/Qt.h index b6130561..d846bffd 100644 --- a/thirdparty/CGAL/include/CGAL/export/Qt.h +++ b/thirdparty/CGAL/include/CGAL/export/Qt.h @@ -2,9 +2,9 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/GraphicsView/include/CGAL/export/Qt.h $ -// $Id: Qt.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/GraphicsView/include/CGAL/export/Qt.h $ +// $Id: include/CGAL/export/Qt.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Andreas Fabri @@ -12,13 +12,16 @@ #ifndef CGAL_QT_EXPORT_H #define CGAL_QT_EXPORT_H +#include + + #include #include #if ( defined(CGAL_BUILD_SHARED_LIBS) && ( ! defined(CGAL_HEADER_ONLY) ) ) \ - || defined(CGAL_USE_Qt5_RESOURCES) + || defined(CGAL_USE_Qt6_RESOURCES) -# if defined(CGAL_Qt5_EXPORTS) || defined(CGAL_USE_Qt5_RESOURCES) +# if defined(CGAL_Qt6_EXPORTS) || defined(CGAL_USE_Qt6_RESOURCES) // defined by CMake or in cpp files of the dll # define CGAL_QT_EXPORT CGAL_DLL_EXPORT diff --git a/thirdparty/CGAL/include/CGAL/export/helpers.h b/thirdparty/CGAL/include/CGAL/export/helpers.h index 3523c987..082af7b3 100644 --- a/thirdparty/CGAL/include/CGAL/export/helpers.h +++ b/thirdparty/CGAL/include/CGAL/export/helpers.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/export/helpers.h $ -// $Id: helpers.h e6c767d 2021-05-12T15:45:07+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/export/helpers.h $ +// $Id: include/CGAL/export/helpers.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -12,7 +12,7 @@ #ifndef CGAL_EXPORT_HELPERS_H #define CGAL_EXPORT_HELPERS_H -#if defined(CGAL_HEADER_ONLY) && ! defined(CGAL_USE_Qt5_RESOURCES) +#if defined(CGAL_HEADER_ONLY) && ! defined(CGAL_USE_Qt6_RESOURCES) # define CGAL_DLL_IMPORT # define CGAL_DLL_EXPORT # define CGAL_DLL_LOCAL diff --git a/thirdparty/CGAL/include/CGAL/extended_euclidean_algorithm.h b/thirdparty/CGAL/include/CGAL/extended_euclidean_algorithm.h index 5e21761b..ac8db0d0 100644 --- a/thirdparty/CGAL/include/CGAL/extended_euclidean_algorithm.h +++ b/thirdparty/CGAL/include/CGAL/extended_euclidean_algorithm.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_foundations/include/CGAL/extended_euclidean_algorithm.h $ -// $Id: extended_euclidean_algorithm.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_foundations/include/CGAL/extended_euclidean_algorithm.h $ +// $Id: include/CGAL/extended_euclidean_algorithm.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Michael Hemmer, Dominik Huelse diff --git a/thirdparty/CGAL/include/CGAL/extract_mean_curvature_flow_skeleton.h b/thirdparty/CGAL/include/CGAL/extract_mean_curvature_flow_skeleton.h index c8265c26..d3c05e11 100644 --- a/thirdparty/CGAL/include/CGAL/extract_mean_curvature_flow_skeleton.h +++ b/thirdparty/CGAL/include/CGAL/extract_mean_curvature_flow_skeleton.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_skeletonization/include/CGAL/extract_mean_curvature_flow_skeleton.h $ -// $Id: extract_mean_curvature_flow_skeleton.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_skeletonization/include/CGAL/extract_mean_curvature_flow_skeleton.h $ +// $Id: include/CGAL/extract_mean_curvature_flow_skeleton.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot @@ -15,8 +15,6 @@ #include -#include -#include #ifdef CGAL_EIGEN3_ENABLED #include // for sparse linear system solver #endif diff --git a/thirdparty/CGAL/include/CGAL/extremal_polygon_2.h b/thirdparty/CGAL/include/CGAL/extremal_polygon_2.h index cce4c0f1..8b1fff4d 100644 --- a/thirdparty/CGAL/include/CGAL/extremal_polygon_2.h +++ b/thirdparty/CGAL/include/CGAL/extremal_polygon_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Inscribed_areas/include/CGAL/extremal_polygon_2.h $ -// $Id: extremal_polygon_2.h 3882d27 2021-01-06T10:55:53+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Inscribed_areas/include/CGAL/extremal_polygon_2.h $ +// $Id: include/CGAL/extremal_polygon_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -16,7 +16,7 @@ #include -#include +#include #include #include #include @@ -76,7 +76,7 @@ class Extremal_polygon_matrix { RandomAccessIC_object begin_col, RandomAccessIC_object end_col, RandomAccessIC_value begin_value, - RandomAccessIC_value CGAL_optimisation_precondition_code(end_value), + RandomAccessIC_value CGAL_precondition_code(end_value), const Operation& o) // initialization with two ranges [begin_row, end_row) and // [begin_col, end_col) of Objects, a range [begin_value, end_value) @@ -92,9 +92,9 @@ class Extremal_polygon_matrix { n_rows( static_cast(iterator_distance( begin_row, end_row))), n_cols( static_cast(iterator_distance( begin_col, end_col))) { - CGAL_optimisation_precondition( + CGAL_precondition( iterator_distance( begin_value, end_value) == n_cols); - CGAL_optimisation_assertion( n_rows > 0 && n_cols > 0); + CGAL_assertion( n_rows > 0 && n_cols > 0); } int @@ -108,8 +108,8 @@ class Extremal_polygon_matrix { Value operator()( int r, int c) const { - CGAL_optimisation_precondition( r >= 0 && r < n_rows); - CGAL_optimisation_precondition( c >= 0 && c < n_cols); + CGAL_precondition( r >= 0 && r < n_rows); + CGAL_precondition( c >= 0 && c < n_cols); return begin_value_[c] + op( begin_row_[r], begin_col_[c]); } @@ -181,11 +181,11 @@ CGAL_maximum_inscribed_rooted_k_gon_2( // returns the past-the-end iterator of that sequence. { // check preconditions: - CGAL_optimisation_precondition( k >= t.min_k()); + CGAL_precondition( k >= t.min_k()); int number_of_points( static_cast(iterator_distance( points_begin, points_end))); - CGAL_optimisation_precondition( number_of_points > k); + CGAL_precondition( number_of_points > k); typedef std::vector< int > Index_cont; @@ -203,7 +203,7 @@ CGAL_maximum_inscribed_rooted_k_gon_2( points_begin, points_end, max_area, gon.rbegin() + k + 1 - i); for (;;) { - CGAL_optimisation_assertion( gon[0] == 0); + CGAL_assertion( gon[0] == 0); gon[i] = number_of_points - 1; if ( ++i >= k) break; @@ -243,7 +243,7 @@ CGAL_maximum_inscribed_rooted_k_gon_2( RandomAccessIC_point points_end, int root, RandomAccessIC_int left_c_begin, - RandomAccessIC_int CGAL_optimisation_precondition_code(left_c_end), + RandomAccessIC_int CGAL_precondition_code(left_c_end), RandomAccessIC_int right_c_begin, RandomAccessIC_int right_c_end, typename Traits::FT& max_area, @@ -294,26 +294,26 @@ CGAL_maximum_inscribed_rooted_k_gon_2( right_c_end)); // check preconditions: - CGAL_optimisation_precondition( number_of_points > t.min_k()); - CGAL_optimisation_precondition( size_of_gon >= t.min_k() - 1); - CGAL_optimisation_precondition( + CGAL_precondition( number_of_points > t.min_k()); + CGAL_precondition( size_of_gon >= t.min_k() - 1); + CGAL_precondition( iterator_distance( left_c_begin, left_c_end) == iterator_distance( right_c_begin, right_c_end)); - CGAL_optimisation_precondition( left_c_begin[0] >= 0); - CGAL_optimisation_precondition( right_c_begin[0] >= 0); - CGAL_optimisation_precondition( + CGAL_precondition( left_c_begin[0] >= 0); + CGAL_precondition( right_c_begin[0] >= 0); + CGAL_precondition( left_c_begin[size_of_gon-1] < number_of_points); - CGAL_optimisation_precondition( + CGAL_precondition( right_c_begin[size_of_gon-1] < number_of_points); - CGAL_optimisation_expensive_precondition_code( + CGAL_expensive_precondition_code( for ( i = 0; i < size_of_gon; ++i) { - CGAL_optimisation_expensive_precondition( left_c_begin[i] >= 0); - CGAL_optimisation_expensive_precondition( right_c_begin[i] >= 0); - CGAL_optimisation_expensive_precondition( + CGAL_expensive_precondition( left_c_begin[i] >= 0); + CGAL_expensive_precondition( right_c_begin[i] >= 0); + CGAL_expensive_precondition( left_c_begin[i] < number_of_points); - CGAL_optimisation_expensive_precondition( + CGAL_expensive_precondition( right_c_begin[i] < number_of_points); - CGAL_optimisation_expensive_precondition( + CGAL_expensive_precondition( left_c_begin[i] <= right_c_begin[i]); }) @@ -426,12 +426,12 @@ extremal_polygon_2( // returns the past-the-end iterator of that sequence. { // check preconditions: - CGAL_optimisation_precondition_code( + CGAL_precondition_code( int number_of_points( static_cast(iterator_distance( points_begin, points_end)));) - CGAL_optimisation_precondition( number_of_points >= t.min_k()); - CGAL_optimisation_expensive_precondition( + CGAL_precondition( number_of_points >= t.min_k()); + CGAL_expensive_precondition( is_convex_2( points_begin, points_end, t)); typedef typename Traits::Point_2 Point_2; @@ -491,11 +491,11 @@ CGAL_maximum_inscribed_k_gon_2( // returns the past-the-end iterator of that sequence. { // check preconditions: - CGAL_optimisation_precondition( k >= t.min_k()); + CGAL_precondition( k >= t.min_k()); int number_of_points( static_cast(iterator_distance( points_begin, points_end))); - CGAL_optimisation_precondition( number_of_points > 0); + CGAL_precondition( number_of_points > 0); using std::copy; @@ -518,7 +518,7 @@ CGAL_maximum_inscribed_k_gon_2( P_0.rbegin() + 1, t); P_0[k] = number_of_points - 1; - CGAL_optimisation_assertion( P_0[0] == 0); + CGAL_assertion( P_0[0] == 0); // compute k-gon rooted at points_begin[P_0[1]] Index_cont P_1( k); FT area_1; @@ -535,7 +535,7 @@ CGAL_maximum_inscribed_k_gon_2( P_1.rbegin(), t); - CGAL_optimisation_assertion( P_1[0] == P_0[1]); + CGAL_assertion( P_1[0] == P_0[1]); // start recursive computation: @@ -630,29 +630,29 @@ CGAL_maximum_inscribed_k_gon_2( using std::copy; // check preconditions: - CGAL_optimisation_precondition( k >= t.min_k()); - CGAL_optimisation_precondition( left_index <= right_index); - CGAL_optimisation_precondition( left_index >= 0); - CGAL_optimisation_precondition( right_index >= 0); - CGAL_optimisation_precondition_code( + CGAL_precondition( k >= t.min_k()); + CGAL_precondition( left_index <= right_index); + CGAL_precondition( left_index >= 0); + CGAL_precondition( right_index >= 0); + CGAL_precondition_code( int number_of_points( static_cast(iterator_distance( points_begin, points_end)));) - CGAL_optimisation_precondition( left_index < number_of_points); - CGAL_optimisation_precondition( right_index < number_of_points); - CGAL_optimisation_precondition( + CGAL_precondition( left_index < number_of_points); + CGAL_precondition( right_index < number_of_points); + CGAL_precondition( iterator_distance( left_c_begin, left_c_end) == k - 1); - CGAL_optimisation_precondition( + CGAL_precondition( iterator_distance( right_c_begin, right_c_end) == k - 1); - CGAL_optimisation_expensive_precondition_code( + CGAL_expensive_precondition_code( for ( int i( 0); i < k - 1; ++i) { - CGAL_optimisation_expensive_precondition( left_c_begin[i] >= 0); - CGAL_optimisation_expensive_precondition( right_c_begin[i] >= 0); - CGAL_optimisation_expensive_precondition( + CGAL_expensive_precondition( left_c_begin[i] >= 0); + CGAL_expensive_precondition( right_c_begin[i] >= 0); + CGAL_expensive_precondition( left_c_begin[i] < number_of_points); - CGAL_optimisation_expensive_precondition( + CGAL_expensive_precondition( right_c_begin[i] < number_of_points); - CGAL_optimisation_expensive_precondition( + CGAL_expensive_precondition( left_c_begin[i] <= right_c_begin[i]); }) @@ -671,7 +671,7 @@ CGAL_maximum_inscribed_k_gon_2( area_middle, P_m.rbegin(), t); - CGAL_optimisation_assertion( P_m[0] == middle_index); + CGAL_assertion( P_m[0] == middle_index); // left recursive branch: FT area_left( 0); Index_cont P_l( k); diff --git a/thirdparty/CGAL/include/CGAL/extrude_skeleton.h b/thirdparty/CGAL/include/CGAL/extrude_skeleton.h new file mode 100644 index 00000000..53c54896 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/extrude_skeleton.h @@ -0,0 +1,1142 @@ +// Copyright (c) 2023 GeometryFactory +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_extrusion_2/include/CGAL/extrude_skeleton.h $ +// $Id: include/CGAL/extrude_skeleton.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Mael Rouxel-Labbé +// + +#ifndef CGAL_SLS_EXTRUSION_EXTRUDE_SKELETON_H +#define CGAL_SLS_EXTRUSION_EXTRUDE_SKELETON_H + +#include + +#ifdef CGAL_SLS_DEBUG_DRAW + #include + #include + #include + #include +#endif + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#ifdef CGAL_SLS_OUTPUT_FILES +#include +#endif + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CGAL { +namespace Straight_skeleton_extrusion { +namespace internal { + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Below is to handle vertical slabs. + +enum class Slope +{ + UNKNOWN = 0, + INWARD, + OUTWARD, + VERTICAL +}; + +template +inline constexpr FT default_extrusion_height() +{ + return (std::numeric_limits::max)(); +} + +// @todo Maybe this postprocessing is not really necessary? Do users really care if the point +// is not perfectly above the input contour edge (it generally cannot be anyway if the kernel is not exact except for some +// specific cases)? +#define CGAL_SLS_SNAP_TO_VERTICAL_SLABS +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + +// The purpose of this visitor is to snap back almost-vertical (see preprocessing_weights()) edges +// to actual vertical slabs. +template +typename GeomTraits::Point_2 +snap_point_to_contour_halfedge_plane(const typename GeomTraits::Point_2& op, + typename HDS::Halfedge_const_handle ch) +{ + using FT = typename GeomTraits::FT; + using Segment_2 = typename GeomTraits::Segment_2; + using Line_2 = typename GeomTraits::Line_2; + + using Vertex_const_handle = typename HDS::Vertex_const_handle; + + const Vertex_const_handle sv = ch->opposite()->vertex(); + const Vertex_const_handle tv = ch->vertex(); + + if(sv->point().x() == tv->point().x()) + { + // vertical edge + // std::cout << "vertical edge, snapping " << op << " to " << sv->point().x() << " " << op.y() << std::endl; + return { sv->point().x(), op.y() }; + } + else if(sv->point().y() == tv->point().y()) + { + // horizontal edge + // std::cout << "horizontal edge, snapping " << op << " to " << op.x() << " " << sv->point().y() << std::endl; + return { op.x(), sv->point().y() }; + } + else + { + // Project orthogonally onto the halfedge + // @todo should the projection be along the direction of the other offset edge sharing this point? + Segment_2 s { sv->point(), tv->point() }; + std::optional line = CGAL_SS_i::compute_normalized_line_coeffC2(s); + CGAL_assertion(bool(line)); // otherwise the skeleton would have failed already + + FT px, py; + CGAL::line_project_pointC2(line->a(),line->b(),line->c(), op.x(),op.y(), px,py); + // std::cout << "snapping " << op << " to " << px << " " << py << std::endl; + return { px, py }; + } +} + +template +void snap_skeleton_vertex(typename HDS::Halfedge_const_handle hds_h, + typename HDS::Halfedge_const_handle contour_h, + std::map& snapped_positions) +{ + typename HDS::Vertex_const_handle hds_tv = hds_h->vertex(); + + // this re-applies snapping towards contour_h even if the point was already snapped towards another contour + auto insert_result = snapped_positions.emplace(hds_tv->point(), hds_tv->point()); + insert_result.first->second = snap_point_to_contour_halfedge_plane(insert_result.first->second, contour_h); + + // std::cout << "snap_skeleton_vertex(V" << hds_tv->id() << " pt: " << hds_h->vertex()->point() << ")" + // << " to " << insert_result.first->second << std::endl; +} + +template +void apply_snapping(PointRange& points, + const std::map& snapped_positions) +{ + using Point_3 = typename GeomTraits::Point_3; + + for(Point_3& p3 : points) + { + auto it = snapped_positions.find({ p3.x(), p3.y() }); + if(it != snapped_positions.end()) + p3 = Point_3{it->second.x(), it->second.y(), p3.z()}; + } +} +#endif // CGAL_SLS_SNAP_TO_VERTICAL_SLABS + +template +class Skeleton_offset_correspondence_builder_visitor + : public CGAL::Default_polygon_offset_builder_2_visitor +{ + using Base = CGAL::Default_polygon_offset_builder_2_visitor; + + using FT = typename GeomTraits::FT; + using Point_2 = typename GeomTraits::Point_2; + + using SS_Halfedge_const_handle = typename StraightSkeleton_2::Halfedge_const_handle; + + using HDS = typename StraightSkeleton_2::Base; + using HDS_Halfedge_const_handle = typename HDS::Halfedge_const_handle; + +public: + Skeleton_offset_correspondence_builder_visitor(const StraightSkeleton_2& ss, + std::unordered_map& offset_points +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + , const FT vertical_weight + , std::map& snapped_positions +#endif + ) + : m_ss(ss) + , m_offset_points(offset_points) +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + , m_vertical_weight(vertical_weight) + , m_snapped_positions(snapped_positions) +#endif + { } + +public: + void on_offset_contour_started() const + { + // std::cout << "~~ new contour ~~" << std::endl; + } + + // can't modify the position yet because we need arrange_polygons() to still work properly + void on_offset_point(const Point_2& op, + SS_Halfedge_const_handle hook) const + { + CGAL_assertion(hook->is_bisector()); + +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + // @fixme on paper one could create a polygon thin-enough w.r.t. the max weight value such that + // there is a skeleton vertex that wants to be snapped to two different sides... + CGAL_assertion(m_snapped_positions.count(op) == 0); + + HDS_Halfedge_const_handle canonical_hook = (hook < hook->opposite()) ? hook : hook->opposite(); + + SS_Halfedge_const_handle contour_h1 = hook->defining_contour_edge(); + CGAL_assertion(contour_h1->opposite()->is_border()); + SS_Halfedge_const_handle contour_h2 = hook->opposite()->defining_contour_edge(); + CGAL_assertion(contour_h2->opposite()->is_border()); + + const bool is_h1_vertical = (contour_h1->weight() == m_vertical_weight); + const bool is_h2_vertical = (contour_h2->weight() == m_vertical_weight); + + // this can happen when the offset is passing through vertices + m_offset_points[canonical_hook] = op; + + // if both are vertical, it's the common vertex (which has to exist) + if(is_h1_vertical && is_h2_vertical) + { + CGAL_assertion(contour_h1->vertex() == contour_h2->opposite()->vertex() || + contour_h2->vertex() == contour_h1->opposite()->vertex()); + if(contour_h1->vertex() == contour_h2->opposite()->vertex()) + m_snapped_positions[op] = contour_h1->vertex()->point(); + else + m_snapped_positions[op] = contour_h2->vertex()->point(); + } + else if(is_h1_vertical) + { + m_snapped_positions[op] = snap_point_to_contour_halfedge_plane(op, contour_h1); + } + else if(is_h2_vertical) + { + m_snapped_positions[op] = snap_point_to_contour_halfedge_plane(op, contour_h2); + } +#endif + } + +private: + const StraightSkeleton_2& m_ss; + std::unordered_map& m_offset_points; + +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + const FT m_vertical_weight; + std::map& m_snapped_positions; +#endif +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +template +class Extrusion_builder +{ + using Geom_traits = GeomTraits; + + using FT = typename Geom_traits::FT; + using Point_2 = typename Geom_traits::Point_2; + using Segment_2 = typename Geom_traits::Segment_2; + using Line_2 = typename Geom_traits::Line_2; + using Point_3 = typename Geom_traits::Point_3; + using Vector_3 = typename Geom_traits::Vector_3; + + using Polygon_2 = CGAL::Polygon_2; + using Polygon_with_holes_2 = CGAL::Polygon_with_holes_2; + + using Offset_polygons = std::vector >; + using Offset_polygons_with_holes = std::vector >; + + using Straight_skeleton_2 = CGAL::Straight_skeleton_2; + using Straight_skeleton_2_ptr = std::shared_ptr; + + using SS_Vertex_const_handle = typename Straight_skeleton_2::Vertex_const_handle; + using SS_Halfedge_const_handle = typename Straight_skeleton_2::Halfedge_const_handle; + + using HDS = typename Straight_skeleton_2::Base; + using HDS_Vertex_const_handle = typename HDS::Vertex_const_handle; + using HDS_Halfedge_const_handle = typename HDS::Halfedge_const_handle; + using HDS_Face_handle = typename HDS::Face_handle; + + // Standard CDT2 for the horizontal (z constant) faces + using Vb = CGAL::Triangulation_vertex_base_with_info_2; + using Vbb = CGAL::Triangulation_vertex_base_2; + using Fb = CGAL::Constrained_triangulation_face_base_2; + using TDS = CGAL::Triangulation_data_structure_2; + using Itag = CGAL::No_constraint_intersection_requiring_constructions_tag; + using CDT = CGAL::Constrained_Delaunay_triangulation_2; + using CDT_Vertex_handle = typename CDT::Vertex_handle; + using CDT_Face_handle = typename CDT::Face_handle; + + // Projection CDT2 for the lateral faces + using PK = CGAL::Projection_traits_3; + using PVbb = CGAL::Triangulation_vertex_base_with_info_2; + using PVb = CGAL::Triangulation_vertex_base_2; + using PFb = CGAL::Constrained_triangulation_face_base_2; + using PTDS = CGAL::Triangulation_data_structure_2; + using PCDT = CGAL::Constrained_Delaunay_triangulation_2; + using PCDT_Vertex_handle = typename PCDT::Vertex_handle; + using PCDT_Face_handle = typename PCDT::Face_handle; + + using Offset_builder_traits = CGAL::Polygon_offset_builder_traits_2; + using Visitor = Skeleton_offset_correspondence_builder_visitor; + using Offset_builder = CGAL::Polygon_offset_builder_2; + +private: + Geom_traits m_gt; + +public: + Extrusion_builder(const Geom_traits& gt) : m_gt(gt) { } + + //////////////////////////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////////////////////////// + + template + void construct_horizontal_faces(const PolygonWithHoles& p, + const FT altitude, + PointRange& points, + FaceRange& faces, + const bool invert_faces = false) + { +#ifdef CGAL_SLS_DEBUG_DRAW + CGAL::draw(p); +#endif + + CDT cdt; + + try + { + cdt.insert_constraint(p.outer_boundary().begin(), p.outer_boundary().end(), true /*close*/); + for(auto h_it=p.holes_begin(); h_it!=p.holes_end(); ++h_it) + cdt.insert_constraint(h_it->begin(), h_it->end(), true /*close*/); + } + catch(const typename CDT::Intersection_of_constraints_exception&) + { + std::cerr << "Warning: Failed to triangulate horizontal face" << std::endl; + return; + } + + std::size_t id = points.size(); // point ID offset (previous faces inserted their points) + for(CDT_Vertex_handle vh : cdt.finite_vertex_handles()) + { + points.emplace_back(cdt.point(vh).x(), cdt.point(vh).y(), altitude); + vh->info() = id++; + } + +#ifdef CGAL_SLS_DEBUG_DRAW + // CGAL::draw(cdt); +#endif + + std::unordered_map in_domain_map; + boost::associative_property_map< std::unordered_map > in_domain(in_domain_map); + + CGAL::mark_domain_in_triangulation(cdt, in_domain); + + for(CDT_Face_handle f : cdt.finite_face_handles()) + { + if(!get(in_domain, f)) + continue; + + // invert faces for the z=0 plane (bottom face) + if(invert_faces) + faces.push_back({f->vertex(0)->info(), f->vertex(2)->info(), f->vertex(1)->info()}); + else + faces.push_back({f->vertex(0)->info(), f->vertex(1)->info(), f->vertex(2)->info()}); + } + } + + template + void construct_horizontal_faces(const Offset_polygons_with_holes& p_ptrs, + const FT altitude, + PointRange& points, + FaceRange& faces) + { + for(const auto& p_ptr : p_ptrs) + construct_horizontal_faces(*p_ptr, altitude, points, faces); + } + + template + void triangulate_skeleton_face(SLSFacePoints& face_points, + const bool invert_faces, + PointRange& points, + FaceRange& faces) + { + CGAL_precondition(face_points.size() >= 3); + + // shift once to ensure that face_points[0] and face_points[1] are at z=0 and thus the normal is correct + std::rotate(face_points.rbegin(), face_points.rbegin() + 1, face_points.rend()); + CGAL_assertion(face_points[0][2] == 0 && face_points[1][2] == 0); + + const Vector_3 n = CGAL::cross_product(face_points[1] - face_points[0], face_points[2] - face_points[0]); + PK traits(n); + PCDT pcdt(traits); + + try + { + pcdt.insert_constraint(face_points.begin(), face_points.end(), true /*close*/); + } + catch(const typename PCDT::Intersection_of_constraints_exception&) + { + std::cerr << "Warning: Failed to triangulate skeleton face" << std::endl; + return; + } + + std::size_t id = points.size(); // point ID offset (previous faces inserted their points); + for(PCDT_Vertex_handle vh : pcdt.finite_vertex_handles()) + { + points.push_back(pcdt.point(vh)); + vh->info() = id++; + } + +#ifdef CGAL_SLS_DEBUG_DRAW + // CGAL::draw(pcdt); +#endif + + std::unordered_map in_domain_map; + boost::associative_property_map< std::unordered_map > in_domain(in_domain_map); + + CGAL::mark_domain_in_triangulation(pcdt, in_domain); + + for(PCDT_Face_handle f : pcdt.finite_face_handles()) + { + if(!get(in_domain, f)) + continue; + + // invert faces for exterior skeletons + if(invert_faces) + faces.push_back({f->vertex(0)->info(), f->vertex(2)->info(), f->vertex(1)->info()}); + else + faces.push_back({f->vertex(0)->info(), f->vertex(1)->info(), f->vertex(2)->info()}); + } + } + + // This version is for default height, so just gather all the full faces + void construct_lateral_faces(const Straight_skeleton_2& ss, + std::vector& points, + std::vector >& faces, +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + const FT& vertical_weight, + std::map& snapped_positions, +#endif + const bool ignore_frame_faces = false, + const bool invert_faces = false) + { + const HDS& hds = static_cast(ss); + + std::size_t fc = 0; + + for(const HDS_Face_handle hds_f : CGAL::faces(hds)) + { + std::vector face_points; + + // If they exist (exterior skeleton), the first four faces of the SLS correspond + // to the outer frame, and should be ignored. + if(ignore_frame_faces && fc++ < 4) + continue; + + HDS_Halfedge_const_handle hds_h = hds_f->halfedge(), done = hds_h; +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + HDS_Halfedge_const_handle contour_h = hds_h->defining_contour_edge(); + CGAL_assertion(hds_h == contour_h); + const bool is_vertical = (contour_h->weight() == vertical_weight); +#endif + + do + { + HDS_Vertex_const_handle hds_tv = hds_h->vertex(); + +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + // this computes the snapped position but does not change the geometry of the skeleton + if(is_vertical && !hds_tv->is_contour()) + snap_skeleton_vertex(hds_h, contour_h, snapped_positions); +#endif + + face_points.emplace_back(hds_tv->point().x(), hds_tv->point().y(), hds_tv->time()); + + hds_h = hds_h->next(); + } + while(hds_h != done); + + if(face_points.size() < 3) + { + std::cerr << "Warning: sm_vs has size 1 or 2: offset crossing face at a single point?" << std::endl; + continue; + } + + triangulate_skeleton_face(face_points, invert_faces, points, faces); + } + } + + void construct_lateral_faces(const Straight_skeleton_2& ss, + const Offset_builder& offset_builder, + const FT height, + std::vector& points, + std::vector >& faces, + const std::unordered_map& offset_points, +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + const FT& vertical_weight, + std::map& snapped_positions, +#endif + const bool ignore_frame_faces = false, + const bool invert_faces = false) + { + CGAL_precondition(height != default_extrusion_height()); + + const bool extrude_upwards = is_positive(height); + const FT abs_height = CGAL::abs(height); + + const HDS& hds = static_cast(ss); + + std::size_t fc = 0; + for(const HDS_Face_handle hds_f : CGAL::faces(hds)) + { + // If they exist (exterior skeleton), the first four faces of the SLS correspond + // to the outer frame, and should be ignored. + if(ignore_frame_faces && fc++ < 4) + continue; + + std::vector face_points; + + HDS_Halfedge_const_handle hds_h = hds_f->halfedge(), done = hds_h; + +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + HDS_Halfedge_const_handle contour_h = hds_h->defining_contour_edge(); + CGAL_assertion(hds_h == contour_h); + const bool is_vertical = (contour_h->weight() == vertical_weight); +#endif + + do + { + HDS_Vertex_const_handle hds_sv = hds_h->opposite()->vertex(); + HDS_Vertex_const_handle hds_tv = hds_h->vertex(); + + // Compare_offset_against_event_time compares offset to node->time(), + // so when the offset is greater or equal than the node->time(), the node is the face + auto compare_time_to_offset = [&](HDS_Vertex_const_handle node) -> CGAL::Comparison_result + { + if(node->is_contour()) + return CGAL::LARGER; // offset > 0 and contour nodes' time is 0 + else + return offset_builder.Compare_offset_against_event_time(abs_height, node); + }; + + const CGAL::Comparison_result sc = compare_time_to_offset(hds_sv); + const CGAL::Comparison_result tc = compare_time_to_offset(hds_tv); + + // if the offset is crossing at the source, it will be added when seen as a target + // from the previous halfedge + + if(sc != tc && sc != CGAL::EQUAL && tc != CGAL::EQUAL) + { + // std::cout << "sc != tc" << std::endl; + CGAL_assertion(sc != CGAL::EQUAL && tc != CGAL::EQUAL); + + HDS_Halfedge_const_handle hds_off_h = hds_h; + if(hds_h->slope() == CGAL::NEGATIVE) // ensure same geometric point on both sides + hds_off_h = hds_off_h->opposite(); + + // The offset point must already been computed in the offset builder visitor + auto off_p = offset_points.find(hds_off_h); + CGAL_assertion(off_p != offset_points.end()); + + face_points.emplace_back(off_p->second.x(), off_p->second.y(), height); + } + + if(tc != CGAL::SMALLER) + { +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + if(is_vertical && !hds_tv->is_contour()) + snap_skeleton_vertex(hds_h, contour_h, snapped_positions); +#endif + + const Point_2& off_p = hds_tv->point(); + // ->time() could be an approximation of the true time. If we are here, the target's time + // is smaller than the height, but we still sanitize it in case of numerical errors in ->time(). + const FT time = boost::algorithm::clamp(hds_tv->time(), FT(0), abs_height); + face_points.emplace_back(off_p.x(), off_p.y(), extrude_upwards ? time : - time); + } + + hds_h = hds_h->next(); + } + while(hds_h != done); + + if(face_points.size() < 3) + { + std::cerr << "Warning: sm_vs has size 1 or 2: offset crossing face at a single point?" << std::endl; + continue; + } + + triangulate_skeleton_face(face_points, invert_faces, points, faces); + } + } + +public: + // this is roughly "CGAL::create_interior_weighted_skeleton_and_offset_polygons_with_holes_2()", + // but we want to know the intermediate straight skeleton to build the lateral faces of the 3D mesh + template + bool inward_construction(const PolygonWithHoles& pwh, + const std::vector >& speeds, + const FT vertical_weight, + const FT height, + PointRange& points, + FaceRange& faces) + { + CGAL_precondition(!is_zero(height)); + + const FT abs_height = abs(height); + + // bottom face (z=0) + construct_horizontal_faces(pwh, 0 /*height*/, points, faces, true /*invert faces*/); + + // Avoid recomputing offset points multiple times + std::unordered_map offset_points; + +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + // This is to deal with vertical slabs: we temporarily give a non-vertical slope to be able + // to construct the SLS, and we then snap back the position to the vertical planes. + // Note that points in non-vertical faces are also changed a bit + std::map snapped_positions; +#endif + + Straight_skeleton_2_ptr ss_ptr; + + bool is_default_extrusion_height = (height == default_extrusion_height()); + + // @partial_wsls_pwh interior SLS of weighted polygons with holes can have skeleton faces with holes + // The current postprocessing is in the function EnforceSimpleConnectedness, but it has not yet + // been made compatible with partial skeletons. + if(is_default_extrusion_height || pwh.number_of_holes() != 0) + { + ss_ptr = CGAL::create_interior_weighted_straight_skeleton_2( + CGAL_SS_i::vertices_begin(pwh.outer_boundary()), + CGAL_SS_i::vertices_end(pwh.outer_boundary()), + pwh.holes_begin(), pwh.holes_end(), + std::begin(speeds[0]), std::end(speeds[0]), + std::next(std::begin(speeds)), std::end(speeds), + m_gt); + } + else + { + ss_ptr = CGAL_SS_i::create_partial_interior_weighted_straight_skeleton_2( + abs_height, + CGAL_SS_i::vertices_begin(pwh.outer_boundary()), + CGAL_SS_i::vertices_end(pwh.outer_boundary()), + pwh.holes_begin(), pwh.holes_end(), + std::begin(speeds[0]), std::end(speeds[0]), + std::next(std::begin(speeds)), std::end(speeds), + m_gt); + } + + if(!ss_ptr) + { + std::cerr << "Error: encountered an error during skeleton construction" << std::endl; + return false; + } + +#ifdef CGAL_SLS_DEBUG_DRAW + // print_straight_skeleton(*ss_ptr); + CGAL::draw(*ss_ptr); +#endif + + if(is_default_extrusion_height) + { +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + construct_lateral_faces(*ss_ptr, points, faces, vertical_weight, snapped_positions); +#else + construct_lateral_faces(*ss_ptr, points, faces); +#endif + } + else // height != default_extrusion_height() + { +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + Visitor visitor(*ss_ptr, offset_points, vertical_weight, snapped_positions); +#else + Visitor visitor(*ss_ptr, vertical_weight, offset_points); +#endif + Offset_builder ob(*ss_ptr, Offset_builder_traits(), visitor); + Offset_polygons raw_output; + ob.construct_offset_contours(abs_height, std::back_inserter(raw_output)); + + Offset_polygons_with_holes output = CGAL::arrange_offset_polygons_2(raw_output); + construct_horizontal_faces(output, height, points, faces); + +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + construct_lateral_faces(*ss_ptr, ob, height, points, faces, offset_points, vertical_weight, snapped_positions); +#else + construct_lateral_faces(*ss_ptr, ob, height, points, faces, offset_points); +#endif + } + + // if the height is negative (extruding downwards), we need to invert all the faces + if(is_negative(height)) + { + for(auto& f : faces) + std::swap(f[0], f[1]); + } + +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + apply_snapping(points, snapped_positions); +#endif + + return true; + } + + template + bool outward_construction(const PolygonWithHoles& pwh, + const std::vector >& speeds, + const FT vertical_weight, + const FT height, + PointRange& points, + FaceRange& faces) + { + CGAL_precondition(!is_zero(height)); + CGAL_precondition(height != default_extrusion_height()); // was checked before, this is just a reminder + + const FT abs_height = abs(height); + + // bottom face (z=0) + construct_horizontal_faces(pwh, 0 /*height*/, points, faces, true /*invert faces*/); + + // Avoid recomputing offset points multiple times + std::unordered_map offset_points; + +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + // This is to deal with vertical slabs: we temporarily give a non-vertical slope to be able + // to construct the SLS, and we then snap back the position to the vertical planes. + // Note that points in non-vertical faces are also changed a bit + std::map snapped_positions; +#endif + + Offset_polygons raw_output; // accumulates for both the outer boundary and the holes + + // the exterior of a polygon with holes is the exterior of its outer boundary, + // and the interior of its inverted holes + // + // Start with the outer boundary + { + Straight_skeleton_2_ptr ss_ptr = CGAL_SS_i::create_partial_exterior_weighted_straight_skeleton_2( + abs_height, + CGAL_SS_i::vertices_begin(pwh.outer_boundary()), + CGAL_SS_i::vertices_end(pwh.outer_boundary()), + std::begin(speeds[0]), std::end(speeds[0]), + m_gt); + + if(!ss_ptr) + { + std::cerr << "Error: encountered an error during outer skeleton construction" << std::endl; + return false; + } + +#ifdef CGAL_SLS_DEBUG_DRAW + // print_straight_skeleton(*ss_ptr); + CGAL::draw(*ss_ptr); +#endif + +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + Visitor visitor(*ss_ptr, offset_points, vertical_weight, snapped_positions); +#else + Visitor visitor(*ss_ptr, offset_points); +#endif + Offset_builder ob(*ss_ptr, Offset_builder_traits(), visitor); + ob.construct_offset_contours(abs_height, std::back_inserter(raw_output)); + + // Manually filter the offset of the outer frame + std::swap(raw_output[0], raw_output.back()); + raw_output.pop_back(); + +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + construct_lateral_faces(*ss_ptr, ob, height, points, faces, offset_points, + vertical_weight, snapped_positions, + true /*ignore frame faces*/, true /*invert faces*/); +#else + construct_lateral_faces(*ss_ptr, ob, height, points, faces, offset_points, + true /*ignore frame faces*/, true /*invert faces*/); +#endif + } + + // now, deal with the holes + + std::size_t hole_id = 0; + for(auto hit=pwh.holes_begin(); hit!=pwh.holes_end(); ++hit, ++hole_id) + { + Polygon_2 hole = *hit; // intentional copy + hole.reverse_orientation(); + + // this is roughly "CGAL::create_exterior_weighted_skeleton_and_offset_polygons_with_holes_2()", + // but we want to know the intermediate straight skeleton to build the lateral faces of the 3D mesh + + std::vector no_holes; + std::vector > no_speeds; + Straight_skeleton_2_ptr ss_ptr = CGAL_SS_i::create_partial_interior_weighted_straight_skeleton_2( + abs_height, + CGAL_SS_i::vertices_begin(hole), + CGAL_SS_i::vertices_end(hole), + std::begin(no_holes), std::end(no_holes), + std::begin(speeds[hole_id]), std::end(speeds[hole_id]), + std::begin(no_speeds), std::end(no_speeds), + m_gt); + + if(!ss_ptr) + { + std::cerr << "Error: encountered an error during skeleton construction" << std::endl; + return EXIT_FAILURE; + } + +#ifdef CGAL_SLS_DEBUG_DRAW + // print_straight_skeleton(*ss_ptr); + CGAL::draw(*ss_ptr); +#endif + +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + Visitor visitor(*ss_ptr, offset_points, vertical_weight, snapped_positions); +#else + Visitor visitor(*ss_ptr, offset_points); +#endif + Offset_builder ob(*ss_ptr, Offset_builder_traits(), visitor); + ob.construct_offset_contours(abs_height, std::back_inserter(raw_output)); + +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + construct_lateral_faces(*ss_ptr, ob, height, points, faces, offset_points, + vertical_weight, snapped_positions, + false /*no outer frame*/, true /*invert faces*/); +#else + construct_lateral_faces(*ss_ptr, ob, height, points, faces, offset_points, + false /*no outer frame*/, true /*invert faces*/); +#endif + } + + // - the exterior offset of the outer boundary is built by creating an extra frame and turning + // the outer boundary into a hole. Hence, it needs to be reversed back to proper orientation + // - the exterior offset of the holes is built by reversing the holes and computing an internal + // skeleton. Hence, the result also needs to be reversed. + for(std::shared_ptr ptr : raw_output) + ptr->reverse_orientation(); + + Offset_polygons_with_holes output = CGAL::arrange_offset_polygons_2(raw_output); + construct_horizontal_faces(output, height, points, faces); + + // if the height is negative (extruding downwards), we need to invert all the faces + if(is_negative(height)) + { + for(auto& f : faces) + std::swap(f[0], f[1]); + } + +#ifdef CGAL_SLS_SNAP_TO_VERTICAL_SLABS + apply_snapping(points, snapped_positions); +#endif + + return true; + } +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// convert angles (in degrees) to weights, and handle vertical angles +template +void convert_angles(AngleRange& angles) +{ + CGAL_precondition(!angles.empty()); + + auto angle_to_weight = [](const FT& angle) -> FT + { + CGAL_precondition(0 < angle && angle < 180); + + // @todo should this be an epsilon around 90°? As theta goes to 90°, tan(theta) goes to infinity + // and thus we could get numerical issues (overlfows) if the kernel is not exact + if(angle == 90) + return 0; + else + return std::tan(CGAL::to_double(angle * CGAL_PI / 180)); + }; + + for(auto& contour_angles : angles) + for(FT& angle : contour_angles) + angle = angle_to_weight(angle); +} + +// handle vertical angles (inf speed) +// returns +// - whether the weights are positive or negative (inward / outward) +// - whether the input weights are valid +// - the weight of vertical slabs +template +std::tuple +preprocess_weights(WeightRange& weights) +{ + CGAL_precondition(!weights.empty()); + + Slope slope = Slope::UNKNOWN; + + FT max_value = 0; // non-inf, maximum absolute value + for(auto& contour_weights : weights) + { + for(FT& w : contour_weights) + { + // '0' means a vertical slab, aka 90° angle (see preprocess_angles()) + if(w == 0) + continue; + + // determine whether weights indicate all inward or all outward + if(slope == Slope::UNKNOWN) + { + // w is neither 0 nor inf here + slope = (w > 0) ? Slope::INWARD : Slope::OUTWARD; + } + else if(slope == Slope::INWARD && w < 0) + { + std::cerr << "Error: mixing positive and negative weights is not yet supported" << std::endl; + return {Slope::UNKNOWN, false, FT(-1)}; + } + else if(slope == Slope::OUTWARD && w > 0) + { + std::cerr << "Error: mixing positive and negative weights is not yet supported" << std::endl; + return {Slope::UNKNOWN, false, FT(-1)}; + } + + // if we are going outwards, it is just an interior skeleton with opposite weights + w = CGAL::abs(w); + if(w > max_value) + max_value = w; + } + } + + if(slope == Slope::UNKNOWN) + { + std::cerr << "Warning: all edges vertical?" << std::endl; + slope = Slope::VERTICAL; + } + + // Take a weight which is a large % of the max value to ensure there's no ambiguity + // + // Since the max value might not be very close to 90°, take the max between of the large-% weight + // and the weight corresponding to an angle of 89.9999999° + const FT weight_of_89d9999999 = 572957787.3425436; // tan(89.9999999°) + const FT scaled_max = (std::max)(weight_of_89d9999999, FT(1e3) * max_value); + + for(auto& contour_weights : weights) + { + for(FT& w : contour_weights) + { + if(w == FT(0)) + w = scaled_max; + } + } + + return {slope, true, scaled_max}; +} + +template +bool extrude_skeleton(const PolygonWithHoles& pwh, + WeightRange& weights, + PolygonMesh& out, + const NamedParameters& np) +{ + namespace PMP = ::CGAL::Polygon_mesh_processing; + + using Polygon_2 = typename PolygonWithHoles::Polygon_2; + using Point = typename boost::range_value::type; + + using Default_kernel = typename Kernel_traits::type; + using Geom_traits = typename internal_np::Lookup_named_param_def::type; + using FT = typename Geom_traits::FT; + + using Point_3 = typename Geom_traits::Point_3; + + using parameters::choose_parameter; + using parameters::get_parameter; + + const bool verbose = choose_parameter(get_parameter(np, internal_np::verbose), false); + Geom_traits gt = choose_parameter(get_parameter(np, CGAL::internal_np::geom_traits)); + + const FT height = choose_parameter(get_parameter(np, internal_np::maximum_height), default_extrusion_height()); + + Slope slope; + bool valid_input; + FT vertical_weight; + std::tie(slope, valid_input, vertical_weight) = preprocess_weights(weights); + + if(!valid_input) + { + if(verbose) + std::cerr << "Error: invalid input weights" << std::endl; + return false; + } + + if(verbose) + { + switch(slope) + { + case Slope::UNKNOWN: std::cout << "Slope is UNKNOWN??" << std::endl; break; + case Slope::INWARD: std::cout << "Slope is INWARD" << std::endl; break; + case Slope::OUTWARD: std::cout << "Slope is OUTWARD" << std::endl; break; + case Slope::VERTICAL: std::cout << "Slope is VERTICAL" << std::endl; break; + } + } + + // End of preprocessing, start the actual skeleton computation + + if(slope != Slope::INWARD && height == default_extrusion_height()) + { + if(verbose) + std::cerr << "Error: height must be specified when using an outward (or vertical) slope" << std::endl; + return false; + } + + // build a soup, to be converted to a mesh afterwards + std::vector points; + std::vector > faces; + points.reserve(2 * pwh.outer_boundary().size()); // just a reasonnable guess + faces.reserve(2 * pwh.outer_boundary().size() + 2*pwh.number_of_holes()); + + Extrusion_builder builder(gt); + bool res; + if(slope != Slope::OUTWARD) // INWARD or VERTICAL + res = builder.inward_construction(pwh, weights, vertical_weight, height, points, faces); + else + res = builder.outward_construction(pwh, weights, vertical_weight, height, points, faces); + + if(!res) + return false; + +#ifdef CGAL_SLS_OUTPUT_FILES + // This soup provides one connected component per edge of the input polygon + CGAL::IO::write_polygon_soup("extruded_skeleton_soup.off", points, faces, CGAL::parameters::stream_precision(17)); +#endif + + // Convert the triangle soup to a triangle mesh + + PMP::merge_duplicate_points_in_polygon_soup(points, faces); + if(!PMP::is_polygon_soup_a_polygon_mesh(faces)) + PMP::orient_polygon_soup(points, faces); + CGAL_assertion(PMP::is_polygon_soup_a_polygon_mesh(faces)); + + PMP::polygon_soup_to_polygon_mesh(points, faces, out); + + CGAL_warning(is_valid_polygon_mesh(out) && is_closed(out)); + + return true; +} + +} // namespace internal +} // namespace Straight_skeleton_extrusion + +// Documented in the Straight_skeleton_2 package +template +bool extrude_skeleton(const PolygonWithHoles& pwh, + PolygonMesh& out, + const NamedParameters& np = parameters::default_values(), + std::enable_if_t::value>* = nullptr) +{ + namespace SSEI = Straight_skeleton_extrusion::internal; + + using Polygon_2 = typename PolygonWithHoles::General_polygon_2; + using K = typename Kernel_traits::type>::type; + using FT = typename K::FT; + using Default_speed_type = std::vector >; + + using parameters::choose_parameter; + using parameters::is_default_parameter; + using parameters::get_parameter_reference; + + const bool has_weights = !(is_default_parameter::value); + const bool has_angles = !(is_default_parameter::value); + + Default_speed_type def_speeds; // never used, but needed for compilation + + if(has_weights) + { + // not using "Angles" here is on purpose, I want to copy the range but the NP is ref only + auto weights = choose_parameter(get_parameter_reference(np, internal_np::weights_param), def_speeds); + return SSEI::extrude_skeleton(pwh, weights, out, np); + } + else if(has_angles) + { + // not using "Weights" here is on purpose, I want to copy the range but the NP is ref only + auto angles = choose_parameter(get_parameter_reference(np, internal_np::angles_param), def_speeds); + SSEI::convert_angles(angles); + return SSEI::extrude_skeleton(pwh, angles, out, np); + } + else // neither angles nor weights were provided + { + std::vector > uniform_weights; + uniform_weights.reserve(pwh.number_of_holes() + 1); + + uniform_weights.push_back(std::vector(pwh.outer_boundary().size(), FT(1))); + for(const auto& hole : pwh.holes()) + uniform_weights.push_back(std::vector(hole.size(), FT(1))); + + return SSEI::extrude_skeleton(pwh, uniform_weights, out, np); + } +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +template +bool extrude_skeleton(const Polygon& p, + PolygonMesh& out, + const NamedParameters& np = parameters::default_values(), + std::enable_if_t::value>* = nullptr) +{ + using Polygon_with_holes = CGAL::General_polygon_with_holes_2; + + return extrude_skeleton(Polygon_with_holes(p), out, np); +} + +} // namespace CGAL + +#endif // CGAL_SLS_EXTRUSION_EXTRUDE_SKELETON_H diff --git a/thirdparty/CGAL/include/CGAL/exude_mesh_3.h b/thirdparty/CGAL/include/CGAL/exude_mesh_3.h index d3c22123..f7310525 100644 --- a/thirdparty/CGAL/include/CGAL/exude_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/exude_mesh_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/exude_mesh_3.h $ -// $Id: exude_mesh_3.h 1c3e09f 2022-01-10T15:32:38+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/exude_mesh_3.h $ +// $Id: include/CGAL/exude_mesh_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,48 +19,109 @@ #include -#include - #include #include #include #include -#include - -#include +#include namespace CGAL { - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4003) // not enough actual parameters for macro -#endif - -// see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS - -BOOST_PARAMETER_FUNCTION( - (Mesh_optimization_return_code), - exude_mesh_3, - parameters::tag, - (required (in_out(c3t3),*) ) - (optional - (time_limit_, *, 0 ) - (sliver_bound_, *, parameters::default_values_for_mesh_3::exude_sliver_bound ) - ) -) +/*! + * @ingroup PkgMesh3Functions + * + * The function `exude_mesh_3()` performs a sliver exudation process on a Delaunay mesh. + * + * The sliver exudation process consists in optimizing the weights of vertices + * of the weighted Delaunay triangulation in such a way that slivers disappear and + * the quality of the mesh improves. + * + * @warning This optimizer modifies the weight of vertices of the triangulation and, + * if called, must be the last optimizer to be called. If the mesh is refined after + * this optimization has been performed, all improvements will be lost. + * + * @tparam C3T3 a model of the concept `MeshComplex_3InTriangulation_3`. + * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * @param c3t3 the initial mesh that will be modified by the algorithm to represent the final optimized mesh. + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{time_limit} + * \cgalParamDescription{is used to set up, in seconds, a CPU time limit after which the optimization process + * is stopped. This time is measured using the `Real_timer` class. The default value is + * 0 and means that there is no time limit.} + * \cgalParamType{`double`} + * \cgalParamPrecondition{`time_limit >= 0`} + * \cgalParamDefault{0} + * \cgalParamNEnd + * \cgalParamNBegin{sliver_bound} + * \cgalParamDescription{is designed to give, in degrees, a targeted lower bound on dihedral angles of mesh cells. + * The exudation process considers in turn all the mesh cells that have a smallest dihedral + * angle less than `sliver_bound` and tries to make them disappear by weighting their vertices. + * The optimization process stops when every cell in the mesh achieves this quality. The + * default value is 0 and means that there is no targeted bound: the exuder then runs as long + * as it can improve the smallest dihedral angles of the set of cells incident to some vertices.} + * \cgalParamType{`double`} + * \cgalParamPrecondition{`0<= sliver_bound <= 180`} + * \cgalParamDefault{0} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + * \return a value of type `CGAL::Mesh_optimization_return_code` which is: + *

      + *
    • `CGAL::BOUND_REACHED` when the targeted bound for the smallest dihedral angle in the mesh is reached. + *
    • `CGAL::TIME_LIMIT_REACHED` when the time limit is reached. + *
    • `CGAL::CANT_IMPROVE_ANYMORE` when exudation process stops because it can no longer improve + * the smallest dihedral angle of the set of cells incident to some vertex in the mesh. + *
    + * + * \cgalHeading{Example} + * + * \code{.cpp} + * // Exude without sliver_bound, using at most 10s CPU time + * exude_mesh_3(c3t3, + * parameters::time_limit(10)); + * \endcode + * + * \sa `CGAL::Mesh_optimization_return_code` + * \sa `CGAL::make_mesh_3()` + * \sa `CGAL::refine_mesh_3()` + * \sa `CGAL::perturb_mesh_3()` + * \sa `CGAL::lloyd_optimize_mesh_3()` + * \sa `CGAL::odt_optimize_mesh_3()` + * + */ +template +Mesh_optimization_return_code exude_mesh_3(C3T3& c3t3,const CGAL_NP_CLASS& np = parameters::default_values()) { - return exude_mesh_3_impl(c3t3, time_limit_, sliver_bound_); + using parameters::choose_parameter; + using parameters::get_parameter; + double time_limit=choose_parameter(get_parameter(np,internal_np::maximum_running_time),parameters::default_values_for_mesh_3::time_limit); + double sliver_bound= choose_parameter(get_parameter(np,internal_np::lower_sliver_bound),parameters::default_values_for_mesh_3::exude_sliver_bound); + return exude_mesh_3_impl(c3t3,time_limit,sliver_bound); } -CGAL_PRAGMA_DIAG_POP -#if defined(BOOST_MSVC) -# pragma warning(pop) +#ifndef CGAL_NO_DEPRECATED_CODE +template +CGAL_DEPRECATED +Mesh_optimization_return_code exude_mesh_3(C3T3& c3t3, double time_limit, double sliver_bound = 0) +{ + return exude_mesh_3(c3t3, CGAL::parameters::time_limit(time_limit).sliver_bound(sliver_bound)); +} #endif - - +#ifndef DOXYGEN_RUNNING +// Overload handling parameters passed with operator= +template +Mesh_optimization_return_code exude_mesh_3(C3T3& c3t3, + const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) +{ + return exude_mesh_3(c3t3,internal_np::combine_named_parameters(np1, np2, nps...)); +} template Mesh_optimization_return_code @@ -83,10 +144,8 @@ exude_mesh_3_impl(C3T3& c3t3, // Launch exudation return exuder(); } - +#endif //DOXYGEN_RUNNING } //namespace CGAL -#include - #endif // CGAL_EXUDE_MESH_3_H diff --git a/thirdparty/CGAL/include/CGAL/facets_in_complex_3_to_triangle_mesh.h b/thirdparty/CGAL/include/CGAL/facets_in_complex_3_to_triangle_mesh.h index 39365958..50bbacec 100644 --- a/thirdparty/CGAL/include/CGAL/facets_in_complex_3_to_triangle_mesh.h +++ b/thirdparty/CGAL/include/CGAL/facets_in_complex_3_to_triangle_mesh.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/facets_in_complex_3_to_triangle_mesh.h $ -// $Id: facets_in_complex_3_to_triangle_mesh.h ab03816 2022-04-20T10:26:26+02:00 Mael +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/facets_in_complex_3_to_triangle_mesh.h $ +// $Id: include/CGAL/facets_in_complex_3_to_triangle_mesh.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -14,7 +14,7 @@ #ifndef CGAL_FACETS_IN_COMPLEX_3_TO_TRIANGLE_MESH_H #define CGAL_FACETS_IN_COMPLEX_3_TO_TRIANGLE_MESH_H -#include +#include #include #include @@ -34,7 +34,7 @@ namespace CGAL { -namespace Mesh_3 { +namespace SMDS_3 { namespace internal { @@ -50,11 +50,12 @@ void resize(std::array&, std::size_t CGAL_assertion_code(size)) CGAL_assertion(size == N); } -template +template void facets_in_complex_3_to_triangle_soup(const C3T3& c3t3, const typename C3T3::Subdomain_index sd_index, PointContainer& points, FaceContainer& faces, + PatchIndexContainer& patches, const bool normals_point_outside_of_the_subdomain = true, const bool export_all_facets = false) { @@ -62,11 +63,11 @@ void facets_in_complex_3_to_triangle_soup(const C3T3& c3t3, typedef typename FaceContainer::value_type Face; typedef typename C3T3::Triangulation Tr; + typedef typename C3T3::Surface_patch_index Surface_patch_index; typedef typename Tr::Cell_handle Cell_handle; typedef typename Tr::Weighted_point Weighted_point; - - typedef typename C3T3::Facets_in_complex_iterator Ficit; + typedef typename Tr::Facet Facet; typedef std::unordered_map PIM; @@ -78,16 +79,17 @@ void facets_in_complex_3_to_triangle_soup(const C3T3& c3t3, size_type nf = c3t3.number_of_facets_in_complex(); faces.reserve(faces.size() + nf); + patches.reserve(faces.size() + nf); points.reserve(points.size() + nf/2); // approximating Euler PIM p_to_ids; std::size_t inum = 0; - for(Ficit fit = c3t3.facets_in_complex_begin(), - end = c3t3.facets_in_complex_end(); fit != end; ++fit) + for(Facet fit : c3t3.facets_in_complex()) { - Cell_handle c = fit->first; - int s = fit->second; + Cell_handle c = fit.first; + int s = fit.second; + const Surface_patch_index spi = c->surface_patch_index(s); Face f; resize(f, 3); @@ -128,59 +130,109 @@ void facets_in_complex_3_to_triangle_soup(const C3T3& c3t3, } faces.push_back(f); + patches.push_back(spi); } } -template +template void facets_in_complex_3_to_triangle_soup(const C3T3& c3t3, PointContainer& points, - FaceContainer& faces) + FaceContainer& faces, + SurfacePatchContainer& patches) { typedef typename C3T3::Subdomain_index Subdomain_index; Subdomain_index useless = Subdomain_index(); - facets_in_complex_3_to_triangle_soup(c3t3, useless, points, faces, + facets_in_complex_3_to_triangle_soup(c3t3, useless, points, faces, patches, true/*point outward*/, true /*extract all facets*/); } -} // end namespace internal +template +void set_face_patches(const Index2FaceMap&, + const SurfacePatchRange&, + const internal_np::Param_not_found&) +{ + return; +} -} // end namespace Mesh_3 - -//! \ingroup PkgMesh3Functions -//! -//! \brief builds a `TriangleMesh` from the surface facets, with a consistent orientation -//! at the interface of two subdomains. -//! -//! This function exports the surface as a `TriangleMesh` and appends it to `graph`, using -//! `orient_polygon_soup()`. -//! -//! @tparam C3T3 a model of `MeshComplexWithFeatures_3InTriangulation_3`. -//! @tparam TriangleMesh a model of `MutableFaceGraph` with an internal point property map. -//! The point type should be compatible with the one used in `C3T3`. -//! -//! @param c3t3 an instance of `C3T3`. -//! @param graph an instance of `TriangleMesh`. -template -void facets_in_complex_3_to_triangle_mesh(const C3T3& c3t3, TriangleMesh& graph) +template +void set_face_patches(const Index2FaceMap& i2f, + const SurfacePatchRange& patches, + const FacePatchMap& fpmap) { - namespace PMP = CGAL::Polygon_mesh_processing; + for (auto index_and_face : i2f) + { + put(fpmap, index_and_face.second, patches[index_and_face.first]); + } +} - typedef typename boost::property_map::type VertexPointMap; - typedef typename boost::property_traits::value_type Point_3; +} // end namespace internal + +} // end namespace SMDS_3 + + /** + * @ingroup PkgSMDS3Functions + * + * @brief builds a `TriangleMesh` from the surface facets, with a consistent orientation + * at the interface of two subdomains. + * + * This function exports the surface as a `TriangleMesh` and appends it to `tmesh`, using + * `orient_polygon_soup()`. + * + * @tparam C3T3 a model of `MeshComplexWithFeatures_3InTriangulation_3`. + * @tparam TriangleMesh a model of `MutableFaceGraph` with an internal point property map. + * The point type must be compatible with the one used in `C3T3`. + * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * @param c3t3 an instance of `C3T3` + * @param tmesh an instance of `TriangleMesh` + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{face_patch_map} + * \cgalParamDescription{a property map with the patch id's associated to the faces of `faces(tmesh)`} + * \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%face_descriptor` + * as key type and the desired property, model of `CopyConstructible` + * and `LessThanComparable`, + * and compatible with the `Surface_patch_index` type of `C3T3` as value type.} + * \cgalParamDefault{If not provided, faces patch ids are ignored.} + * \cgalParamNEnd + * \cgalNamedParamsEnd + */ + template + void facets_in_complex_3_to_triangle_mesh(const C3T3& c3t3, + TriangleMesh& tmesh, + const NamedParameters& np = parameters::default_values()) + { + namespace PMP = CGAL::Polygon_mesh_processing; - typedef std::array Face; + typedef typename boost::property_map::type VertexPointMap; + typedef typename boost::property_traits::value_type Point_3; + typedef typename boost::graph_traits::face_descriptor face_descriptor; + typedef typename C3T3::Surface_patch_index Surface_patch_index; - std::vector faces; - std::vector points; + typedef std::array Face; - Mesh_3::internal::facets_in_complex_3_to_triangle_soup(c3t3, points, faces); + std::vector faces; + std::vector patches; + std::vector points; - if(!PMP::is_polygon_soup_a_polygon_mesh(faces)) - PMP::orient_polygon_soup(points, faces); - CGAL_postcondition(PMP::is_polygon_soup_a_polygon_mesh(faces)); + SMDS_3::internal::facets_in_complex_3_to_triangle_soup(c3t3, points, faces, patches); - PMP::polygon_soup_to_polygon_mesh(points, faces, graph); -} + if (!PMP::is_polygon_soup_a_polygon_mesh(faces)) + PMP::orient_polygon_soup(points, faces); + CGAL_postcondition(PMP::is_polygon_soup_a_polygon_mesh(faces)); + + std::unordered_map i2f; + PMP::polygon_soup_to_polygon_mesh(points, faces, tmesh, + CGAL::parameters::polygon_to_face_output_iterator(std::inserter(i2f, i2f.end()))); + + using parameters::get_parameter; + SMDS_3::internal::set_face_patches(i2f, + patches, + get_parameter(np, internal_np::face_patch)); + } } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/float.h b/thirdparty/CGAL/include/CGAL/float.h index 0954f8da..59d4b819 100644 --- a/thirdparty/CGAL/include/CGAL/float.h +++ b/thirdparty/CGAL/include/CGAL/float.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/float.h $ -// $Id: float.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/float.h $ +// $Id: include/CGAL/float.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/for_each.h b/thirdparty/CGAL/include/CGAL/for_each.h index 6de27c5f..72161bed 100644 --- a/thirdparty/CGAL/include/CGAL/for_each.h +++ b/thirdparty/CGAL/include/CGAL/for_each.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/for_each.h $ -// $Id: for_each.h 6ae64e7 2020-03-27T16:41:53+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/for_each.h $ +// $Id: include/CGAL/for_each.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -102,8 +102,8 @@ void for_each (const Range& range, ::reference)>& functor) { #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #endif internal::for_each @@ -118,8 +118,8 @@ void for_each (Range& range, ::reference)>& functor) { #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(boost::is_convertible::value), - "Parallel_tag is enabled but TBB is unavailable."); + static_assert (!std::is_convertible::value, + "Parallel_tag is enabled but TBB is unavailable."); #endif internal::for_each diff --git a/thirdparty/CGAL/include/CGAL/function_objects.h b/thirdparty/CGAL/include/CGAL/function_objects.h index 2d970ad6..4a4c63b1 100644 --- a/thirdparty/CGAL/include/CGAL/function_objects.h +++ b/thirdparty/CGAL/include/CGAL/function_objects.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/function_objects.h $ -// $Id: function_objects.h 5da7e84 2021-02-02T10:58:31+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/function_objects.h $ +// $Id: include/CGAL/function_objects.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/functional.h b/thirdparty/CGAL/include/CGAL/functional.h index 1784bd1b..357431b8 100644 --- a/thirdparty/CGAL/include/CGAL/functional.h +++ b/thirdparty/CGAL/include/CGAL/functional.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/functional.h $ -// $Id: functional.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/functional.h $ +// $Id: include/CGAL/functional.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/functions_on_enums.h b/thirdparty/CGAL/include/CGAL/functions_on_enums.h index cb478bbb..de4ebaa3 100644 --- a/thirdparty/CGAL/include/CGAL/functions_on_enums.h +++ b/thirdparty/CGAL/include/CGAL/functions_on_enums.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/functions_on_enums.h $ -// $Id: functions_on_enums.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/functions_on_enums.h $ +// $Id: include/CGAL/functions_on_enums.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/functions_on_signs.h b/thirdparty/CGAL/include/CGAL/functions_on_signs.h index 06500fed..06ff1d99 100644 --- a/thirdparty/CGAL/include/CGAL/functions_on_signs.h +++ b/thirdparty/CGAL/include/CGAL/functions_on_signs.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/functions_on_signs.h $ -// $Id: functions_on_signs.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/functions_on_signs.h $ +// $Id: include/CGAL/functions_on_signs.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/generators.h b/thirdparty/CGAL/include/CGAL/generators.h index 49073ca2..59527df2 100644 --- a/thirdparty/CGAL/include/CGAL/generators.h +++ b/thirdparty/CGAL/include/CGAL/generators.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generator/include/CGAL/generators.h $ -// $Id: generators.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generator/include/CGAL/generators.h $ +// $Id: include/CGAL/generators.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/generic_sweep.h b/thirdparty/CGAL/include/CGAL/generic_sweep.h index 5a934ad1..8b59c4f7 100644 --- a/thirdparty/CGAL/include/CGAL/generic_sweep.h +++ b/thirdparty/CGAL/include/CGAL/generic_sweep.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/generic_sweep.h $ -// $Id: generic_sweep.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/generic_sweep.h $ +// $Id: include/CGAL/generic_sweep.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/gl.h b/thirdparty/CGAL/include/CGAL/gl.h index 2ed46dfc..7242562c 100644 --- a/thirdparty/CGAL/include/CGAL/gl.h +++ b/thirdparty/CGAL/include/CGAL/gl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/gl.h $ -// $Id: gl.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/gl.h $ +// $Id: include/CGAL/gl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial #ifndef CGAL_GL_H diff --git a/thirdparty/CGAL/include/CGAL/global_functions_circular_kernel_2.h b/thirdparty/CGAL/include/CGAL/global_functions_circular_kernel_2.h index 280380b4..e91261bd 100644 --- a/thirdparty/CGAL/include/CGAL/global_functions_circular_kernel_2.h +++ b/thirdparty/CGAL/include/CGAL/global_functions_circular_kernel_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_2/include/CGAL/global_functions_circular_kernel_2.h $ -// $Id: global_functions_circular_kernel_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_2/include/CGAL/global_functions_circular_kernel_2.h $ +// $Id: include/CGAL/global_functions_circular_kernel_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Julien Hazebrouck, Pedro Machado diff --git a/thirdparty/CGAL/include/CGAL/global_functions_on_root_for_sphere_2_3.h b/thirdparty/CGAL/include/CGAL/global_functions_on_root_for_sphere_2_3.h index 56349bca..5c5f15a0 100644 --- a/thirdparty/CGAL/include/CGAL/global_functions_on_root_for_sphere_2_3.h +++ b/thirdparty/CGAL/include/CGAL/global_functions_on_root_for_sphere_2_3.h @@ -9,8 +9,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_spheres/include/CGAL/global_functions_on_root_for_sphere_2_3.h $ -// $Id: global_functions_on_root_for_sphere_2_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_spheres/include/CGAL/global_functions_on_root_for_sphere_2_3.h $ +// $Id: include/CGAL/global_functions_on_root_for_sphere_2_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/global_functions_on_roots_and_polynomials_1_3.h b/thirdparty/CGAL/include/CGAL/global_functions_on_roots_and_polynomials_1_3.h index 588e9b31..55174c43 100644 --- a/thirdparty/CGAL/include/CGAL/global_functions_on_roots_and_polynomials_1_3.h +++ b/thirdparty/CGAL/include/CGAL/global_functions_on_roots_and_polynomials_1_3.h @@ -9,8 +9,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_spheres/include/CGAL/global_functions_on_roots_and_polynomials_1_3.h $ -// $Id: global_functions_on_roots_and_polynomials_1_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_spheres/include/CGAL/global_functions_on_roots_and_polynomials_1_3.h $ +// $Id: include/CGAL/global_functions_on_roots_and_polynomials_1_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/global_functions_on_roots_and_polynomials_2_3.h b/thirdparty/CGAL/include/CGAL/global_functions_on_roots_and_polynomials_2_3.h index b99d5b9b..87ff7530 100644 --- a/thirdparty/CGAL/include/CGAL/global_functions_on_roots_and_polynomials_2_3.h +++ b/thirdparty/CGAL/include/CGAL/global_functions_on_roots_and_polynomials_2_3.h @@ -9,8 +9,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_kernel_for_spheres/include/CGAL/global_functions_on_roots_and_polynomials_2_3.h $ -// $Id: global_functions_on_roots_and_polynomials_2_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_kernel_for_spheres/include/CGAL/global_functions_on_roots_and_polynomials_2_3.h $ +// $Id: include/CGAL/global_functions_on_roots_and_polynomials_2_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud diff --git a/thirdparty/CGAL/include/CGAL/global_functions_spherical_kernel_3.h b/thirdparty/CGAL/include/CGAL/global_functions_spherical_kernel_3.h index 7c72296c..0c9dfd8a 100644 --- a/thirdparty/CGAL/include/CGAL/global_functions_spherical_kernel_3.h +++ b/thirdparty/CGAL/include/CGAL/global_functions_spherical_kernel_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Circular_kernel_3/include/CGAL/global_functions_spherical_kernel_3.h $ -// $Id: global_functions_spherical_kernel_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Circular_kernel_3/include/CGAL/global_functions_spherical_kernel_3.h $ +// $Id: include/CGAL/global_functions_spherical_kernel_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, diff --git a/thirdparty/CGAL/include/CGAL/glu.h b/thirdparty/CGAL/include/CGAL/glu.h index bc1318f2..623096b5 100644 --- a/thirdparty/CGAL/include/CGAL/glu.h +++ b/thirdparty/CGAL/include/CGAL/glu.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/glu.h $ -// $Id: glu.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/glu.h $ +// $Id: include/CGAL/glu.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial #ifndef CGAL_GLU_H diff --git a/thirdparty/CGAL/include/CGAL/gmp.h b/thirdparty/CGAL/include/CGAL/gmp.h index 35293d8f..51a45e1b 100644 --- a/thirdparty/CGAL/include/CGAL/gmp.h +++ b/thirdparty/CGAL/include/CGAL/gmp.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/gmp.h $ -// $Id: gmp.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/gmp.h $ +// $Id: include/CGAL/gmp.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/gmpxx.h b/thirdparty/CGAL/include/CGAL/gmpxx.h index debf3efb..e0507dc8 100644 --- a/thirdparty/CGAL/include/CGAL/gmpxx.h +++ b/thirdparty/CGAL/include/CGAL/gmpxx.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/gmpxx.h $ -// $Id: gmpxx.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/gmpxx.h $ +// $Id: include/CGAL/gmpxx.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/gmpxx_coercion_traits.h b/thirdparty/CGAL/include/CGAL/gmpxx_coercion_traits.h index 64361c99..166de36b 100644 --- a/thirdparty/CGAL/include/CGAL/gmpxx_coercion_traits.h +++ b/thirdparty/CGAL/include/CGAL/gmpxx_coercion_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/gmpxx_coercion_traits.h $ -// $Id: gmpxx_coercion_traits.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/gmpxx_coercion_traits.h $ +// $Id: include/CGAL/gmpxx_coercion_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/gnuplot_output_2.h b/thirdparty/CGAL/include/CGAL/gnuplot_output_2.h index 7803fb42..3a979e7e 100644 --- a/thirdparty/CGAL/include/CGAL/gnuplot_output_2.h +++ b/thirdparty/CGAL/include/CGAL/gnuplot_output_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cone_spanners_2/include/CGAL/gnuplot_output_2.h $ -// $Id: gnuplot_output_2.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cone_spanners_2/include/CGAL/gnuplot_output_2.h $ +// $Id: include/CGAL/gnuplot_output_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/grabbers.h b/thirdparty/CGAL/include/CGAL/grabbers.h index 00c70a36..029652e6 100644 --- a/thirdparty/CGAL/include/CGAL/grabbers.h +++ b/thirdparty/CGAL/include/CGAL/grabbers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ipelets/include/CGAL/grabbers.h $ -// $Id: grabbers.h efc0c52 2021-01-15T10:02:00+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ipelets/include/CGAL/grabbers.h $ +// $Id: include/CGAL/grabbers.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/graph_traits_Arrangement_2.h b/thirdparty/CGAL/include/CGAL/graph_traits_Arrangement_2.h index bb1e00de..9db36c39 100644 --- a/thirdparty/CGAL/include/CGAL/graph_traits_Arrangement_2.h +++ b/thirdparty/CGAL/include/CGAL/graph_traits_Arrangement_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h $ -// $Id: graph_traits_Arrangement_2.h 380704b 2022-05-03T15:31:09+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h $ +// $Id: include/CGAL/graph_traits_Arrangement_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -37,7 +37,7 @@ namespace boost { /*! \class * Specialization of the BGL graph-traits template, which serves as a (primal) - * adapter for Arrangment_on_surface_2, where the valid arrangement vertices + * adapter for Arrangement_on_surface_2, where the valid arrangement vertices * correspond to graph verices and arrangement halfedges correspond to * arrangement edges. * Note that non-fictitious vertices at infinity are also considered as graph @@ -83,7 +83,7 @@ class graph_traits > /*! \class * Iteratator over all outgoing halfedges around a given vertex., skipping * fictitious halfedges. - * This is by adapting the Halfegde_around_vertex_circulator type to an + * This is by adapting the Halfedge_around_vertex_circulator type to an * iterator. Moreover, as the circulator goes over all ingoing halfedges * of the vertex, the iterator adapter may return their twin halfedges, if * we need the outgoing halfedges. @@ -119,7 +119,7 @@ class graph_traits > /*! * Constructor. - * \param circ A ciruclator for the halfedges around a vertex. + * \param circ A circulator for the halfedges around a vertex. * \param out_edges Do we need the outgoing or the ingoing halfedges. * \param counter A counter associated with the iterator. * \param cend The past-the-end counter value. @@ -333,7 +333,7 @@ class graph_traits > /*! \class * Specialization of the BGL graph-traits template, which serves as a (primal) - * adapter for Arrangment_2, where the arrangement vertices correspond to graph + * adapter for Arrangement_2, where the arrangement vertices correspond to graph * verices and arrangement halfedges correspond to arrangement edges. */ template diff --git a/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_2.h b/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_2.h index 33993418..ee3f671e 100644 --- a/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_2.h +++ b/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/graph_traits_dual_arrangement_2.h $ -// $Id: graph_traits_dual_arrangement_2.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/graph_traits_dual_arrangement_2.h $ +// $Id: include/CGAL/graph_traits_dual_arrangement_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_on_surface_2.h b/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_on_surface_2.h index 618b6e02..aab1ff83 100644 --- a/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_on_surface_2.h +++ b/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_on_surface_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/graph_traits_dual_arrangement_on_surface_2.h $ -// $Id: graph_traits_dual_arrangement_on_surface_2.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/graph_traits_dual_arrangement_on_surface_2.h $ +// $Id: include/CGAL/graph_traits_dual_arrangement_on_surface_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_on_surface_with_history_2.h b/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_on_surface_with_history_2.h index 0540e114..d6b215b1 100644 --- a/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_on_surface_with_history_2.h +++ b/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_on_surface_with_history_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/graph_traits_dual_arrangement_on_surface_with_history_2.h $ -// $Id: graph_traits_dual_arrangement_on_surface_with_history_2.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/graph_traits_dual_arrangement_on_surface_with_history_2.h $ +// $Id: include/CGAL/graph_traits_dual_arrangement_on_surface_with_history_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_with_history_2.h b/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_with_history_2.h index c76c9359..08e27761 100644 --- a/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_with_history_2.h +++ b/thirdparty/CGAL/include/CGAL/graph_traits_dual_arrangement_with_history_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Arrangement_on_surface_2/include/CGAL/graph_traits_dual_arrangement_with_history_2.h $ -// $Id: graph_traits_dual_arrangement_with_history_2.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Arrangement_on_surface_2/include/CGAL/graph_traits_dual_arrangement_with_history_2.h $ +// $Id: include/CGAL/graph_traits_dual_arrangement_with_history_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/grid_simplify_point_set.h b/thirdparty/CGAL/include/CGAL/grid_simplify_point_set.h index 4c695702..052d257a 100644 --- a/thirdparty/CGAL/include/CGAL/grid_simplify_point_set.h +++ b/thirdparty/CGAL/include/CGAL/grid_simplify_point_set.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/grid_simplify_point_set.h $ -// $Id: grid_simplify_point_set.h 11c7c56 2022-01-18T09:11:52+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/grid_simplify_point_set.h $ +// $Id: include/CGAL/grid_simplify_point_set.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Nader Salman and Laurent Saboret @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include @@ -66,7 +66,7 @@ struct Hash_epsilon_points_3 Hash_epsilon_points_3 (double epsilon, PointMap p_map) : m_epsilon (epsilon), point_map(p_map) { - CGAL_point_set_processing_precondition(epsilon > 0); + CGAL_precondition(epsilon > 0); } std::size_t operator() (const Point_3& a) const @@ -96,7 +96,7 @@ struct Equal_epsilon_points_3 Equal_epsilon_points_3 (const double& epsilon, PointMap p_map) : m_epsilon (epsilon), point_map(p_map) { - CGAL_point_set_processing_precondition(epsilon > 0); + CGAL_precondition(epsilon > 0); } bool operator() (const Point_3& a, const Point_3& b) const @@ -155,7 +155,7 @@ class Epsilon_point_set_3 : public internal::Epsilon_point_set_3_base(epsilon, point_map)) , min_points_per_cell (min_points_per_cell) { - CGAL_point_set_processing_precondition(epsilon > 0); + CGAL_precondition(epsilon > 0); } bool insert (const Point_3& p) @@ -249,7 +249,7 @@ grid_simplify_point_set( // actual type of input points typedef typename std::iterator_traits::value_type Enriched_point; - CGAL_point_set_processing_precondition(epsilon > 0); + CGAL_precondition(epsilon > 0); if (min_points_per_cell == 1) { diff --git a/thirdparty/CGAL/include/CGAL/halfedgeDS_cut_component.h b/thirdparty/CGAL/include/CGAL/halfedgeDS_cut_component.h index 25fe53e8..dc107cad 100644 --- a/thirdparty/CGAL/include/CGAL/halfedgeDS_cut_component.h +++ b/thirdparty/CGAL/include/CGAL/halfedgeDS_cut_component.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/halfedgeDS_cut_component.h $ -// $Id: halfedgeDS_cut_component.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/halfedgeDS_cut_component.h $ +// $Id: include/CGAL/halfedgeDS_cut_component.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/halfedgeds_connected_components.h b/thirdparty/CGAL/include/CGAL/halfedgeds_connected_components.h index 2223cdb3..f4b374b7 100644 --- a/thirdparty/CGAL/include/CGAL/halfedgeds_connected_components.h +++ b/thirdparty/CGAL/include/CGAL/halfedgeds_connected_components.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/HalfedgeDS/include/CGAL/halfedgeds_connected_components.h $ -// $Id: halfedgeds_connected_components.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/HalfedgeDS/include/CGAL/halfedgeds_connected_components.h $ +// $Id: include/CGAL/halfedgeds_connected_components.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/hash_openmesh.h b/thirdparty/CGAL/include/CGAL/hash_openmesh.h index 6922c91a..adf903b9 100644 --- a/thirdparty/CGAL/include/CGAL/hash_openmesh.h +++ b/thirdparty/CGAL/include/CGAL/hash_openmesh.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/hash_openmesh.h $ -// $Id: hash_openmesh.h b2ed4e5 2021-03-10T11:33:30+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/hash_openmesh.h $ +// $Id: include/CGAL/hash_openmesh.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/hierarchy_simplify_point_set.h b/thirdparty/CGAL/include/CGAL/hierarchy_simplify_point_set.h index 173d0b69..6ec686f7 100644 --- a/thirdparty/CGAL/include/CGAL/hierarchy_simplify_point_set.h +++ b/thirdparty/CGAL/include/CGAL/hierarchy_simplify_point_set.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/hierarchy_simplify_point_set.h $ -// $Id: hierarchy_simplify_point_set.h 11c7c56 2022-01-18T09:11:52+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/hierarchy_simplify_point_set.h $ +// $Id: include/CGAL/hierarchy_simplify_point_set.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot, Pierre Alliez @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -210,8 +210,8 @@ namespace CGAL { typedef typename std::list::iterator cluster_iterator; CGAL_precondition (points.begin() != points.end()); - CGAL_point_set_processing_precondition (size > 0); - CGAL_point_set_processing_precondition (var_max > 0.0); + CGAL_precondition (size > 0); + CGAL_precondition (var_max > 0.0); // The first cluster is the whole input point set clusters_stack.push_front (cluster (std::list(), Point (0., 0., 0.))); @@ -242,7 +242,7 @@ namespace CGAL { } // Compute the covariance matrix of the set - std::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; + std::array covariance = {{ 0., 0., 0., 0., 0., 0. }}; for (typename std::list::iterator it = current_cluster->first.begin (); it != current_cluster->first.end (); ++ it) @@ -257,8 +257,8 @@ namespace CGAL { covariance[5] += d.z () * d.z (); } - std::array eigenvalues = {{ 0., 0., 0. }}; - std::array eigenvectors = {{ 0., 0., 0., + std::array eigenvalues = {{ 0., 0., 0. }}; + std::array eigenvectors = {{ 0., 0., 0., 0., 0., 0., 0., 0., 0. }}; // Linear algebra = get eigenvalues and eigenvectors for @@ -279,7 +279,7 @@ namespace CGAL { // The plane which splits the point set into 2 point sets: // * Normal to the eigenvector with highest eigenvalue // * Passes through the centroid of the set - Vector v (eigenvectors[6], eigenvectors[7], eigenvectors[8]); + Vector v (FT(eigenvectors.at(6)), FT(eigenvectors.at(7)), FT(eigenvectors.at(8))); std::size_t current_cluster_size = 0; typename std::list::iterator it = current_cluster->first.begin (); diff --git a/thirdparty/CGAL/include/CGAL/hilbert_sort.h b/thirdparty/CGAL/include/CGAL/hilbert_sort.h index 1cca3c33..90818455 100644 --- a/thirdparty/CGAL/include/CGAL/hilbert_sort.h +++ b/thirdparty/CGAL/include/CGAL/hilbert_sort.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/hilbert_sort.h $ -// $Id: hilbert_sort.h f5d2fb2 2021-09-01T16:41:36+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/hilbert_sort.h $ +// $Id: include/CGAL/hilbert_sort.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Christophe Delage diff --git a/thirdparty/CGAL/include/CGAL/hilbert_sort_on_sphere.h b/thirdparty/CGAL/include/CGAL/hilbert_sort_on_sphere.h index ea451ffe..4c54d211 100644 --- a/thirdparty/CGAL/include/CGAL/hilbert_sort_on_sphere.h +++ b/thirdparty/CGAL/include/CGAL/hilbert_sort_on_sphere.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/hilbert_sort_on_sphere.h $ -// $Id: hilbert_sort_on_sphere.h 5c41b10 2020-01-02T10:26:44+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/hilbert_sort_on_sphere.h $ +// $Id: include/CGAL/hilbert_sort_on_sphere.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/in_place_edge_list.h b/thirdparty/CGAL/include/CGAL/in_place_edge_list.h index 2b8f2349..1c295f07 100644 --- a/thirdparty/CGAL/include/CGAL/in_place_edge_list.h +++ b/thirdparty/CGAL/include/CGAL/in_place_edge_list.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/in_place_edge_list.h $ -// $Id: in_place_edge_list.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/in_place_edge_list.h $ +// $Id: include/CGAL/in_place_edge_list.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/int.h b/thirdparty/CGAL/include/CGAL/int.h index 0ec7d8dc..2393b296 100644 --- a/thirdparty/CGAL/include/CGAL/int.h +++ b/thirdparty/CGAL/include/CGAL/int.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/int.h $ -// $Id: int.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/int.h $ +// $Id: include/CGAL/int.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -157,7 +157,7 @@ template<> class Algebraic_structure_traits< short int > typedef Tag_true Is_numerical_sensitive; // Explicitly defined functors which have no support for implicit - // interoperability. This is nescessary because of the implicit conversion + // interoperability. This is necessary because of the implicit conversion // to int for binary operations between short ints. class Integral_division : public CGAL::cpp98::binary_function< Type, Type, diff --git a/thirdparty/CGAL/include/CGAL/interpolation_functions.h b/thirdparty/CGAL/include/CGAL/interpolation_functions.h index 2b24c5fd..3844b447 100644 --- a/thirdparty/CGAL/include/CGAL/interpolation_functions.h +++ b/thirdparty/CGAL/include/CGAL/interpolation_functions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interpolation/include/CGAL/interpolation_functions.h $ -// $Id: interpolation_functions.h d7224e5 2020-05-24T11:08:44+02:00 Marc Glisse +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interpolation/include/CGAL/interpolation_functions.h $ +// $Id: include/CGAL/interpolation_functions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Julia Floetotto diff --git a/thirdparty/CGAL/include/CGAL/intersection_2.h b/thirdparty/CGAL/include/CGAL/intersection_2.h index 4004bb1d..fcac41d6 100644 --- a/thirdparty/CGAL/include/CGAL/intersection_2.h +++ b/thirdparty/CGAL/include/CGAL/intersection_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_2/include/CGAL/intersection_2.h $ -// $Id: intersection_2.h 8b41189 2020-03-26T18:58:21+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_2/include/CGAL/intersection_2.h $ +// $Id: include/CGAL/intersection_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/intersection_3.h b/thirdparty/CGAL/include/CGAL/intersection_3.h index f0822b3a..75e8589d 100644 --- a/thirdparty/CGAL/include/CGAL/intersection_3.h +++ b/thirdparty/CGAL/include/CGAL/intersection_3.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/intersection_3.h $ -// $Id: intersection_3.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/intersection_3.h $ +// $Id: include/CGAL/intersection_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Geert-Jan Giezeman diff --git a/thirdparty/CGAL/include/CGAL/intersections.h b/thirdparty/CGAL/include/CGAL/intersections.h index 6124084c..36994942 100644 --- a/thirdparty/CGAL/include/CGAL/intersections.h +++ b/thirdparty/CGAL/include/CGAL/intersections.h @@ -9,8 +9,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Intersections_3/include/CGAL/intersections.h $ -// $Id: intersections.h c2d1adf 2021-06-23T17:34:48+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Intersections_3/include/CGAL/intersections.h $ +// $Id: include/CGAL/intersections.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/intersections_d.h b/thirdparty/CGAL/include/CGAL/intersections_d.h index f991ba90..64441feb 100644 --- a/thirdparty/CGAL/include/CGAL/intersections_d.h +++ b/thirdparty/CGAL/include/CGAL/intersections_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/intersections_d.h $ -// $Id: intersections_d.h e4f5d0b 2020-07-22T16:28:40+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/intersections_d.h $ +// $Id: include/CGAL/intersections_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/ipower.h b/thirdparty/CGAL/include/CGAL/ipower.h index cf65bb8a..1aa8418e 100644 --- a/thirdparty/CGAL/include/CGAL/ipower.h +++ b/thirdparty/CGAL/include/CGAL/ipower.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_foundations/include/CGAL/ipower.h $ -// $Id: ipower.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_foundations/include/CGAL/ipower.h $ +// $Id: include/CGAL/ipower.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -13,7 +13,7 @@ // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_foundations/include/CGAL/ipower.h $ +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_foundations/include/CGAL/ipower.h $ #ifndef CGAL_IPOWER_H #define CGAL_IPOWER_H diff --git a/thirdparty/CGAL/include/CGAL/is_convertible.h b/thirdparty/CGAL/include/CGAL/is_convertible.h index 80f10ada..6c098cfb 100644 --- a/thirdparty/CGAL/include/CGAL/is_convertible.h +++ b/thirdparty/CGAL/include/CGAL/is_convertible.h @@ -6,8 +6,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/is_convertible.h $ -// $Id: is_convertible.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/is_convertible.h $ +// $Id: include/CGAL/is_convertible.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,8 +17,7 @@ #ifndef CGAL_IS_CONVERTIBLE_H #define CGAL_IS_CONVERTIBLE_H -#include -#include +#include #ifdef CGAL_USE_GMPXX #include #endif @@ -26,12 +25,12 @@ namespace CGAL { templatestruct is_implicit_convertible - : boost::is_convertible {}; + : std::is_convertible {}; #ifdef CGAL_USE_GMPXX // Work around a gmpxx misfeature templatestruct is_implicit_convertible<__gmp_expr,mpz_class> - : boost::false_type {}; + : std::false_type {}; #endif // TODO: add is_explicit_convertible (using boost::is_constructible?) diff --git a/thirdparty/CGAL/include/CGAL/is_streamable.h b/thirdparty/CGAL/include/CGAL/is_streamable.h index c0d76f8a..2f46e286 100644 --- a/thirdparty/CGAL/include/CGAL/is_streamable.h +++ b/thirdparty/CGAL/include/CGAL/is_streamable.h @@ -1,8 +1,8 @@ // Copyright (c) 2012 GeometryFactory Sarl (France) // All rights reserved. // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/is_streamable.h $ -// $Id: is_streamable.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/is_streamable.h $ +// $Id: include/CGAL/is_streamable.h a484bfa $ // SPDX-License-Identifier: BSL-1.0 // // Author(s) : Laurent Rineau, Philipp Moeller @@ -10,9 +10,6 @@ #ifndef CGAL_IS_STREAMABLE_H #define CGAL_IS_STREAMABLE_H -#include -#include -#include #include namespace CGAL { @@ -51,8 +48,8 @@ namespace is_streamable template struct is_streamable_impl { - static typename boost::remove_cv::type>::type const & x; - static typename boost::remove_cv::type>::type & y; + static std::remove_cv_t> const & x; + static std::remove_cv_t> & y; static const bool value = sizeof(is_streamable::check(std::cout << x)) == sizeof(is_streamable::yes) && diff --git a/thirdparty/CGAL/include/CGAL/is_y_monotone_2.h b/thirdparty/CGAL/include/CGAL/is_y_monotone_2.h index 688797af..83b373d2 100644 --- a/thirdparty/CGAL/include/CGAL/is_y_monotone_2.h +++ b/thirdparty/CGAL/include/CGAL/is_y_monotone_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/is_y_monotone_2.h $ -// $Id: is_y_monotone_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/is_y_monotone_2.h $ +// $Id: include/CGAL/is_y_monotone_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/iterator.h b/thirdparty/CGAL/include/CGAL/iterator.h index c4589791..e1ad096e 100644 --- a/thirdparty/CGAL/include/CGAL/iterator.h +++ b/thirdparty/CGAL/include/CGAL/iterator.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/iterator.h $ -// $Id: iterator.h 7322c79 2022-11-21T14:09:08+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/iterator.h $ +// $Id: include/CGAL/iterator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -27,8 +27,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -58,7 +58,7 @@ class Prevent_deref Prevent_deref(const I& i) : Base(i) {} private: friend class boost::iterator_core_access; - reference dereference() const { return const_cast::type&>(this->base_reference()); } + reference dereference() const { return const_cast&>(this->base_reference()); } }; template @@ -1262,7 +1262,7 @@ filter_output_iterator(I e, const P& p) namespace internal { template -struct Output_visitor : boost::static_visitor { +struct Output_visitor { Output_visitor(OutputIterator* it) : out(it) {} OutputIterator* out; @@ -1340,7 +1340,7 @@ class Dispatch_output_iterator < std::tuple, std::tuple > : private internal::Derivator, std::tuple >, std::tuple, std::tuple > , public std::tuple { - CGAL_static_assertion_msg(sizeof...(V) == sizeof...(O), + static_assert(sizeof...(V) == sizeof...(O), "The number of explicit template parameters has to match the number of arguments"); static const int size = sizeof...(V); @@ -1380,17 +1380,17 @@ class Dispatch_output_iterator < std::tuple, std::tuple > return *this; } - template - Self& operator=(const boost::variant& t) { + template + Self& operator=(const std::variant< T ... >& t) { internal::Output_visitor visitor(this); - t.apply_visitor(visitor); + std::visit(visitor, t); return *this; } - template - Self& operator=(const boost::optional< boost::variant >& t) { + template + Self& operator=(const std::optional< std::variant< T ... > >& t) { internal::Output_visitor visitor(this); - if(t) boost::apply_visitor(visitor, *t); + if(t) std::visit(visitor, *t); return *this; } @@ -1457,6 +1457,19 @@ class Dispatch_or_drop_output_iterator < std::tuple, std::tuple > template Self& operator=(const T&) { return *this; } + template + Self& operator=(const std::variant< T ... >& t) { + internal::Output_visitor visitor(this); + std::visit(visitor, t); + return *this; + } + + template + Self& operator=(const std::optional< std::variant< T ... > >& t) { + internal::Output_visitor visitor(this); + if(t) std::visit(visitor, *t); + return *this; + } }; diff --git a/thirdparty/CGAL/include/CGAL/iterator_from_indices.h b/thirdparty/CGAL/include/CGAL/iterator_from_indices.h index f44fbdfb..45877b9d 100644 --- a/thirdparty/CGAL/include/CGAL/iterator_from_indices.h +++ b/thirdparty/CGAL/include/CGAL/iterator_from_indices.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/iterator_from_indices.h $ -// $Id: iterator_from_indices.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/iterator_from_indices.h $ +// $Id: include/CGAL/iterator_from_indices.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/jet_estimate_normals.h b/thirdparty/CGAL/include/CGAL/jet_estimate_normals.h index 2e086926..116252b0 100644 --- a/thirdparty/CGAL/include/CGAL/jet_estimate_normals.h +++ b/thirdparty/CGAL/include/CGAL/jet_estimate_normals.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/jet_estimate_normals.h $ -// $Id: jet_estimate_normals.h bccf399 2022-11-08T10:51:46+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/jet_estimate_normals.h $ +// $Id: include/CGAL/jet_estimate_normals.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Laurent Saboret and Marc Pouget and Frederic Cazals @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -197,7 +197,7 @@ jet_estimate_normals( typedef typename GetSvdTraits::type SvdTraits; CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); - CGAL_static_assertion_msg(!(boost::is_same::NoTraits>::value), "Error: no SVD traits"); @@ -215,10 +215,10 @@ jet_estimate_normals( // precondition: at least one element in the container. // to fix: should have at least three distinct points // but this is costly to check - CGAL_point_set_processing_precondition(points.begin() != points.end()); + CGAL_precondition(points.begin() != points.end()); // precondition: at least 2 nearest neighbors - CGAL_point_set_processing_precondition(k >= 2 || neighbor_radius > FT(0)); + CGAL_precondition(k >= 2 || neighbor_radius > FT(0)); std::size_t memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE_STREAM << (memory >> 20) << " Mb allocated\n"; diff --git a/thirdparty/CGAL/include/CGAL/jet_smooth_point_set.h b/thirdparty/CGAL/include/CGAL/jet_smooth_point_set.h index 8a4b17f1..659e68be 100644 --- a/thirdparty/CGAL/include/CGAL/jet_smooth_point_set.h +++ b/thirdparty/CGAL/include/CGAL/jet_smooth_point_set.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h $ -// $Id: jet_smooth_point_set.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h $ +// $Id: include/CGAL/jet_smooth_point_set.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez, Marc Pouget and Laurent Saboret @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -200,7 +200,7 @@ jet_smooth_point_set( typedef typename NP_helper::Geom_traits Kernel; typedef typename GetSvdTraits::type SvdTraits; - CGAL_static_assertion_msg(!(boost::is_same::NoTraits>::value), "Error: no SVD traits"); @@ -218,12 +218,12 @@ jet_smooth_point_set( // precondition: at least one element in the container. // to fix: should have at least three distinct points // but this is costly to check - CGAL_point_set_processing_precondition(points.begin() != points.end()); + CGAL_precondition(points.begin() != points.end()); // precondition: at least 2 nearest neighbors - CGAL_point_set_processing_precondition(k >= 2); + CGAL_precondition(k >= 2); - // Instanciate a KD-tree search. + // Instantiate a KD-tree search. Neighbor_query neighbor_query (points, point_map); // Iterates over input points and mutates them. diff --git a/thirdparty/CGAL/include/CGAL/kernel_assertions.h b/thirdparty/CGAL/include/CGAL/kernel_assertions.h index bda8a2ae..3f98fcdf 100644 --- a/thirdparty/CGAL/include/CGAL/kernel_assertions.h +++ b/thirdparty/CGAL/include/CGAL/kernel_assertions.h @@ -7,19 +7,16 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/kernel_assertions.h $ -// $Id: kernel_assertions.h 5a36ff8 2020-12-04T08:02:26+00:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/kernel_assertions.h $ +// $Id: include/CGAL/kernel_assertions.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Geert-Jan Giezeman, Sven Schoenherr // -// Generated from script create_assertions.sh - -// Note that this header file is intentionnaly not protected with a -// macro (as ). Calling it a second time with another value -// for CGAL_NO_ASSERTIONS for example must make a difference. +#ifndef CGAL_KERNEL_ASSERTIONS_H +#define CGAL_KERNEL_ASSERTIONS_H #include @@ -28,9 +25,6 @@ // assertions // ---------- -#undef CGAL_kernel_assertion -#undef CGAL_kernel_assertion_msg -#undef CGAL_kernel_assertion_code #if defined(CGAL_KERNEL_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) # define CGAL_kernel_assertion(EX) (static_cast(0)) @@ -46,9 +40,6 @@ #endif // CGAL_KERNEL_NO_ASSERTIONS -#undef CGAL_kernel_exactness_assertion -#undef CGAL_kernel_exactness_assertion_msg -#undef CGAL_kernel_exactness_assertion_code #if defined(CGAL_KERNEL_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \ || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS)) @@ -65,9 +56,6 @@ #endif // CGAL_KERNEL_NO_ASSERTIONS -#undef CGAL_kernel_expensive_assertion -#undef CGAL_kernel_expensive_assertion_msg -#undef CGAL_kernel_expensive_assertion_code #if defined(CGAL_KERNEL_NO_ASSERTIONS) \ || defined(CGAL_NO_ASSERTIONS) \ @@ -85,9 +73,6 @@ #endif // CGAL_KERNEL_NO_ASSERTIONS -#undef CGAL_kernel_expensive_exactness_assertion -#undef CGAL_kernel_expensive_exactness_assertion_msg -#undef CGAL_kernel_expensive_exactness_assertion_code #if defined(CGAL_KERNEL_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \ || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\ @@ -108,9 +93,6 @@ // preconditions // ------------- -#undef CGAL_kernel_precondition -#undef CGAL_kernel_precondition_msg -#undef CGAL_kernel_precondition_code #if defined(CGAL_KERNEL_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) # define CGAL_kernel_precondition(EX) (static_cast(0)) @@ -126,9 +108,6 @@ #endif // CGAL_KERNEL_NO_PRECONDITIONS -#undef CGAL_kernel_exactness_precondition -#undef CGAL_kernel_exactness_precondition_msg -#undef CGAL_kernel_exactness_precondition_code #if defined(CGAL_KERNEL_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \ || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS)) @@ -145,9 +124,6 @@ #endif // CGAL_KERNEL_NO_PRECONDITIONS -#undef CGAL_kernel_expensive_precondition -#undef CGAL_kernel_expensive_precondition_msg -#undef CGAL_kernel_expensive_precondition_code #if defined(CGAL_KERNEL_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \ || (!defined(CGAL_KERNEL_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) @@ -164,9 +140,6 @@ #endif // CGAL_KERNEL_NO_PRECONDITIONS -#undef CGAL_kernel_expensive_exactness_precondition -#undef CGAL_kernel_expensive_exactness_precondition_msg -#undef CGAL_kernel_expensive_exactness_precondition_code #if defined(CGAL_KERNEL_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \ || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\ @@ -187,9 +160,6 @@ // postconditions // -------------- -#undef CGAL_kernel_postcondition -#undef CGAL_kernel_postcondition_msg -#undef CGAL_kernel_postcondition_code #if defined(CGAL_KERNEL_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) # define CGAL_kernel_postcondition(EX) (static_cast(0)) @@ -205,9 +175,6 @@ #endif // CGAL_KERNEL_NO_POSTCONDITIONS -#undef CGAL_kernel_exactness_postcondition -#undef CGAL_kernel_exactness_postcondition_msg -#undef CGAL_kernel_exactness_postcondition_code #if defined(CGAL_KERNEL_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \ || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS)) @@ -224,9 +191,6 @@ #endif // CGAL_KERNEL_NO_POSTCONDITIONS -#undef CGAL_kernel_expensive_postcondition -#undef CGAL_kernel_expensive_postcondition_msg -#undef CGAL_kernel_expensive_postcondition_code #if defined(CGAL_KERNEL_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \ || (!defined(CGAL_KERNEL_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) @@ -243,9 +207,6 @@ #endif // CGAL_KERNEL_NO_POSTCONDITIONS -#undef CGAL_kernel_expensive_exactness_postcondition -#undef CGAL_kernel_expensive_exactness_postcondition_msg -#undef CGAL_kernel_expensive_exactness_postcondition_code #if defined(CGAL_KERNEL_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \ || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\ @@ -266,9 +227,6 @@ // warnings // -------- -#undef CGAL_kernel_warning -#undef CGAL_kernel_warning_msg -#undef CGAL_kernel_warning_code #if defined(CGAL_KERNEL_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) # define CGAL_kernel_warning(EX) (static_cast(0)) @@ -284,9 +242,6 @@ #endif // CGAL_KERNEL_NO_WARNINGS -#undef CGAL_kernel_exactness_warning -#undef CGAL_kernel_exactness_warning_msg -#undef CGAL_kernel_exactness_warning_code #if defined(CGAL_KERNEL_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \ || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS)) @@ -303,9 +258,6 @@ #endif // CGAL_KERNEL_NO_WARNINGS -#undef CGAL_kernel_expensive_warning -#undef CGAL_kernel_expensive_warning_msg -#undef CGAL_kernel_expensive_warning_code #if defined(CGAL_KERNEL_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \ || (!defined(CGAL_KERNEL_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) @@ -322,9 +274,6 @@ #endif // CGAL_KERNEL_NO_WARNINGS -#undef CGAL_kernel_expensive_exactness_warning -#undef CGAL_kernel_expensive_exactness_warning_msg -#undef CGAL_kernel_expensive_exactness_warning_code #if defined(CGAL_KERNEL_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \ || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\ @@ -340,3 +289,5 @@ # define CGAL_kernel_expensive_exactness_warning_code(CODE) CODE # define CGAL_kernel_expensive_exactness_warnings 1 #endif // CGAL_KERNEL_NO_WARNINGS + +#endif // CGAL_KERNEL_ASSERTIONS_H diff --git a/thirdparty/CGAL/include/CGAL/kernel_basic.h b/thirdparty/CGAL/include/CGAL/kernel_basic.h index 442c8f3f..7be8402a 100644 --- a/thirdparty/CGAL/include/CGAL/kernel_basic.h +++ b/thirdparty/CGAL/include/CGAL/kernel_basic.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/kernel_basic.h $ -// $Id: kernel_basic.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/kernel_basic.h $ +// $Id: include/CGAL/kernel_basic.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/kernel_config.h b/thirdparty/CGAL/include/CGAL/kernel_config.h index 542d303c..6eb109e8 100644 --- a/thirdparty/CGAL/include/CGAL/kernel_config.h +++ b/thirdparty/CGAL/include/CGAL/kernel_config.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/kernel_config.h $ -// $Id: kernel_config.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/kernel_config.h $ +// $Id: include/CGAL/kernel_config.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/kernel_to_kernel.h b/thirdparty/CGAL/include/CGAL/kernel_to_kernel.h index 54ec3e11..661dada9 100644 --- a/thirdparty/CGAL/include/CGAL/kernel_to_kernel.h +++ b/thirdparty/CGAL/include/CGAL/kernel_to_kernel.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/kernel_to_kernel.h $ -// $Id: kernel_to_kernel.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/kernel_to_kernel.h $ +// $Id: include/CGAL/kernel_to_kernel.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/known_bit_size_integers.h b/thirdparty/CGAL/include/CGAL/known_bit_size_integers.h index 8cfce818..8f005c46 100644 --- a/thirdparty/CGAL/include/CGAL/known_bit_size_integers.h +++ b/thirdparty/CGAL/include/CGAL/known_bit_size_integers.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/known_bit_size_integers.h $ -// $Id: known_bit_size_integers.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/known_bit_size_integers.h $ +// $Id: include/CGAL/known_bit_size_integers.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -34,19 +34,19 @@ namespace CGAL { - typedef boost::int8_t Integer8; - typedef boost::int16_t Integer16; - typedef boost::int32_t Integer32; + typedef std::int8_t Integer8; + typedef std::int16_t Integer16; + typedef std::int32_t Integer32; - typedef boost::uint8_t UInteger8; - typedef boost::uint16_t UInteger16; - typedef boost::uint32_t UInteger32; + typedef std::uint8_t UInteger8; + typedef std::uint16_t UInteger16; + typedef std::uint32_t UInteger32; #ifndef BOOST_NO_INT64_T // this macro is still provided but its use is discouraged # define CGAL_HAS_INTEGER64 - typedef boost::int64_t Integer64; - typedef boost::uint64_t UInteger64; + typedef std::int64_t Integer64; + typedef std::uint64_t UInteger64; #endif } //namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/leda_bigfloat.h b/thirdparty/CGAL/include/CGAL/leda_bigfloat.h index 4f487768..50139a95 100644 --- a/thirdparty/CGAL/include/CGAL/leda_bigfloat.h +++ b/thirdparty/CGAL/include/CGAL/leda_bigfloat.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/leda_bigfloat.h $ -// $Id: leda_bigfloat.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/leda_bigfloat.h $ +// $Id: include/CGAL/leda_bigfloat.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/leda_bigfloat_interval.h b/thirdparty/CGAL/include/CGAL/leda_bigfloat_interval.h index c465edd3..8c4a6815 100644 --- a/thirdparty/CGAL/include/CGAL/leda_bigfloat_interval.h +++ b/thirdparty/CGAL/include/CGAL/leda_bigfloat_interval.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/leda_bigfloat_interval.h $ -// $Id: leda_bigfloat_interval.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/leda_bigfloat_interval.h $ +// $Id: include/CGAL/leda_bigfloat_interval.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/leda_coercion_traits.h b/thirdparty/CGAL/include/CGAL/leda_coercion_traits.h index 0bddd621..afe99419 100644 --- a/thirdparty/CGAL/include/CGAL/leda_coercion_traits.h +++ b/thirdparty/CGAL/include/CGAL/leda_coercion_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/leda_coercion_traits.h $ -// $Id: leda_coercion_traits.h 26355e2 2020-06-25T12:31:21+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/leda_coercion_traits.h $ +// $Id: include/CGAL/leda_coercion_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/leda_integer.h b/thirdparty/CGAL/include/CGAL/leda_integer.h index dbc1434a..e1152ba9 100644 --- a/thirdparty/CGAL/include/CGAL/leda_integer.h +++ b/thirdparty/CGAL/include/CGAL/leda_integer.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/leda_integer.h $ -// $Id: leda_integer.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/leda_integer.h $ +// $Id: include/CGAL/leda_integer.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -93,7 +93,7 @@ template <> class Algebraic_structure_traits< leda_integer > // Div defined via base using Div_mod // Mod defined via base using Div_mod - // This code results in an inconsisten div/mod for some leda versions + // This code results in an inconsistent div/mod for some leda versions // TODO: reactivate this code // typedef INTERN_AST::Div_per_operator< Type > Div; diff --git a/thirdparty/CGAL/include/CGAL/leda_rational.h b/thirdparty/CGAL/include/CGAL/leda_rational.h index 8ebb1c21..6686f438 100644 --- a/thirdparty/CGAL/include/CGAL/leda_rational.h +++ b/thirdparty/CGAL/include/CGAL/leda_rational.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/leda_rational.h $ -// $Id: leda_rational.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/leda_rational.h $ +// $Id: include/CGAL/leda_rational.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/leda_real.h b/thirdparty/CGAL/include/CGAL/leda_real.h index e868edcf..047b9c99 100644 --- a/thirdparty/CGAL/include/CGAL/leda_real.h +++ b/thirdparty/CGAL/include/CGAL/leda_real.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/leda_real.h $ -// $Id: leda_real.h 4e519a3 2021-05-05T13:15:37+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/leda_real.h $ +// $Id: include/CGAL/leda_real.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -204,6 +204,10 @@ class Output_rep< ::leda::real, CGAL::Parens_as_product_tag > }; +inline const leda_real& approx(const leda_real& d) { return d; } +inline const leda_real& exact(const leda_real& d) { return d; } +inline int depth(const leda_real&){ return -1; } + } //namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/license.h b/thirdparty/CGAL/include/CGAL/license.h index dd7d62b1..d6ab1323 100644 --- a/thirdparty/CGAL/include/CGAL/license.h +++ b/thirdparty/CGAL/include/CGAL/license.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license.h $ -// $Id: license.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license.h $ +// $Id: include/CGAL/license.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/license/AABB_tree.h b/thirdparty/CGAL/include/CGAL/license/AABB_tree.h index dbc75e00..60c0e989 100644 --- a/thirdparty/CGAL/include/CGAL/license/AABB_tree.h +++ b/thirdparty/CGAL/include/CGAL/license/AABB_tree.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/AABB_tree.h $ -// $Id: AABB_tree.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/AABB_tree.h $ +// $Id: include/CGAL/license/AABB_tree.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_AABB_TREE_H #define CGAL_LICENSE_AABB_TREE_H diff --git a/thirdparty/CGAL/include/CGAL/license/Advancing_front_surface_reconstruction.h b/thirdparty/CGAL/include/CGAL/license/Advancing_front_surface_reconstruction.h index 9033eb7e..d0b0ae77 100644 --- a/thirdparty/CGAL/include/CGAL/license/Advancing_front_surface_reconstruction.h +++ b/thirdparty/CGAL/include/CGAL/license/Advancing_front_surface_reconstruction.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Advancing_front_surface_reconstruction.h $ -// $Id: Advancing_front_surface_reconstruction.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Advancing_front_surface_reconstruction.h $ +// $Id: include/CGAL/license/Advancing_front_surface_reconstruction.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_ADVANCING_FRONT_SURFACE_RECONSTRUCTION_H #define CGAL_LICENSE_ADVANCING_FRONT_SURFACE_RECONSTRUCTION_H diff --git a/thirdparty/CGAL/include/CGAL/license/Alpha_shapes_2.h b/thirdparty/CGAL/include/CGAL/license/Alpha_shapes_2.h index 4b9b9170..fe8b3842 100644 --- a/thirdparty/CGAL/include/CGAL/license/Alpha_shapes_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Alpha_shapes_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Alpha_shapes_2.h $ -// $Id: Alpha_shapes_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Alpha_shapes_2.h $ +// $Id: include/CGAL/license/Alpha_shapes_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_ALPHA_SHAPES_2_H #define CGAL_LICENSE_ALPHA_SHAPES_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Alpha_shapes_3.h b/thirdparty/CGAL/include/CGAL/license/Alpha_shapes_3.h index b28efdec..a125fdc3 100644 --- a/thirdparty/CGAL/include/CGAL/license/Alpha_shapes_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Alpha_shapes_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Alpha_shapes_3.h $ -// $Id: Alpha_shapes_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Alpha_shapes_3.h $ +// $Id: include/CGAL/license/Alpha_shapes_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_ALPHA_SHAPES_3_H #define CGAL_LICENSE_ALPHA_SHAPES_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Alpha_wrap_3.h b/thirdparty/CGAL/include/CGAL/license/Alpha_wrap_3.h index 861dc777..444fa9f7 100644 --- a/thirdparty/CGAL/include/CGAL/license/Alpha_wrap_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Alpha_wrap_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Alpha_wrap_3.h $ -// $Id: Alpha_wrap_3.h c8ad168 2022-03-18T21:31:41+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Alpha_wrap_3.h $ +// $Id: include/CGAL/license/Alpha_wrap_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_ALPHA_WRAP_3_H #define CGAL_LICENSE_ALPHA_WRAP_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Apollonius_graph_2.h b/thirdparty/CGAL/include/CGAL/license/Apollonius_graph_2.h index 634a967a..137ae217 100644 --- a/thirdparty/CGAL/include/CGAL/license/Apollonius_graph_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Apollonius_graph_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Apollonius_graph_2.h $ -// $Id: Apollonius_graph_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Apollonius_graph_2.h $ +// $Id: include/CGAL/license/Apollonius_graph_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_APOLLONIUS_GRAPH_2_H #define CGAL_LICENSE_APOLLONIUS_GRAPH_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Arrangement_on_surface_2.h b/thirdparty/CGAL/include/CGAL/license/Arrangement_on_surface_2.h index 2e8cc1b0..8c33b05b 100644 --- a/thirdparty/CGAL/include/CGAL/license/Arrangement_on_surface_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Arrangement_on_surface_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Arrangement_on_surface_2.h $ -// $Id: Arrangement_on_surface_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Arrangement_on_surface_2.h $ +// $Id: include/CGAL/license/Arrangement_on_surface_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_ARRANGEMENT_ON_SURFACE_2_H #define CGAL_LICENSE_ARRANGEMENT_ON_SURFACE_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Barycentric_coordinates_2.h b/thirdparty/CGAL/include/CGAL/license/Barycentric_coordinates_2.h index 7d9429cd..aa885422 100644 --- a/thirdparty/CGAL/include/CGAL/license/Barycentric_coordinates_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Barycentric_coordinates_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Barycentric_coordinates_2.h $ -// $Id: Barycentric_coordinates_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Barycentric_coordinates_2.h $ +// $Id: include/CGAL/license/Barycentric_coordinates_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_BARYCENTRIC_COORDINATES_2_H #define CGAL_LICENSE_BARYCENTRIC_COORDINATES_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Boolean_set_operations_2.h b/thirdparty/CGAL/include/CGAL/license/Boolean_set_operations_2.h index d61c88b1..21ee281d 100644 --- a/thirdparty/CGAL/include/CGAL/license/Boolean_set_operations_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Boolean_set_operations_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Boolean_set_operations_2.h $ -// $Id: Boolean_set_operations_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Boolean_set_operations_2.h $ +// $Id: include/CGAL/license/Boolean_set_operations_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_BOOLEAN_SET_OPERATIONS_2_H #define CGAL_LICENSE_BOOLEAN_SET_OPERATIONS_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Bounding_volumes.h b/thirdparty/CGAL/include/CGAL/license/Bounding_volumes.h index f0f95c90..9c7b03e3 100644 --- a/thirdparty/CGAL/include/CGAL/license/Bounding_volumes.h +++ b/thirdparty/CGAL/include/CGAL/license/Bounding_volumes.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Bounding_volumes.h $ -// $Id: Bounding_volumes.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Bounding_volumes.h $ +// $Id: include/CGAL/license/Bounding_volumes.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_BOUNDING_VOLUMES_H #define CGAL_LICENSE_BOUNDING_VOLUMES_H diff --git a/thirdparty/CGAL/include/CGAL/license/Box_intersection_d.h b/thirdparty/CGAL/include/CGAL/license/Box_intersection_d.h index bd056173..f1b80f2f 100644 --- a/thirdparty/CGAL/include/CGAL/license/Box_intersection_d.h +++ b/thirdparty/CGAL/include/CGAL/license/Box_intersection_d.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Box_intersection_d.h $ -// $Id: Box_intersection_d.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Box_intersection_d.h $ +// $Id: include/CGAL/license/Box_intersection_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_BOX_INTERSECTION_D_H #define CGAL_LICENSE_BOX_INTERSECTION_D_H diff --git a/thirdparty/CGAL/include/CGAL/license/Circular_kernel_2.h b/thirdparty/CGAL/include/CGAL/license/Circular_kernel_2.h index 8e0a9964..21e7a299 100644 --- a/thirdparty/CGAL/include/CGAL/license/Circular_kernel_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Circular_kernel_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Circular_kernel_2.h $ -// $Id: Circular_kernel_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Circular_kernel_2.h $ +// $Id: include/CGAL/license/Circular_kernel_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_CIRCULAR_KERNEL_2_H #define CGAL_LICENSE_CIRCULAR_KERNEL_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Circular_kernel_3.h b/thirdparty/CGAL/include/CGAL/license/Circular_kernel_3.h index 8e6345bd..5b920499 100644 --- a/thirdparty/CGAL/include/CGAL/license/Circular_kernel_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Circular_kernel_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Circular_kernel_3.h $ -// $Id: Circular_kernel_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Circular_kernel_3.h $ +// $Id: include/CGAL/license/Circular_kernel_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_CIRCULAR_KERNEL_3_H #define CGAL_LICENSE_CIRCULAR_KERNEL_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Classification.h b/thirdparty/CGAL/include/CGAL/license/Classification.h index 1dd5e828..a3afeebd 100644 --- a/thirdparty/CGAL/include/CGAL/license/Classification.h +++ b/thirdparty/CGAL/include/CGAL/license/Classification.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Classification.h $ -// $Id: Classification.h 3edff7b 2021-06-17T10:49:45+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Classification.h $ +// $Id: include/CGAL/license/Classification.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_CLASSIFICATION_H #define CGAL_LICENSE_CLASSIFICATION_H diff --git a/thirdparty/CGAL/include/CGAL/license/Cone_spanners_2.h b/thirdparty/CGAL/include/CGAL/license/Cone_spanners_2.h index a511d78f..2a01330a 100644 --- a/thirdparty/CGAL/include/CGAL/license/Cone_spanners_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Cone_spanners_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Cone_spanners_2.h $ -// $Id: Cone_spanners_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Cone_spanners_2.h $ +// $Id: include/CGAL/license/Cone_spanners_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_CONE_SPANNERS_2_H #define CGAL_LICENSE_CONE_SPANNERS_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Convex_decomposition_3.h b/thirdparty/CGAL/include/CGAL/license/Convex_decomposition_3.h index 5c74792e..1163ea13 100644 --- a/thirdparty/CGAL/include/CGAL/license/Convex_decomposition_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Convex_decomposition_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Convex_decomposition_3.h $ -// $Id: Convex_decomposition_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Convex_decomposition_3.h $ +// $Id: include/CGAL/license/Convex_decomposition_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_CONVEX_DECOMPOSITION_3_H #define CGAL_LICENSE_CONVEX_DECOMPOSITION_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Convex_hull_2.h b/thirdparty/CGAL/include/CGAL/license/Convex_hull_2.h index 0f82fe55..4d56fbcf 100644 --- a/thirdparty/CGAL/include/CGAL/license/Convex_hull_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Convex_hull_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Convex_hull_2.h $ -// $Id: Convex_hull_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Convex_hull_2.h $ +// $Id: include/CGAL/license/Convex_hull_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_CONVEX_HULL_2_H #define CGAL_LICENSE_CONVEX_HULL_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Convex_hull_3.h b/thirdparty/CGAL/include/CGAL/license/Convex_hull_3.h index 5f920533..6d3a5919 100644 --- a/thirdparty/CGAL/include/CGAL/license/Convex_hull_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Convex_hull_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Convex_hull_3.h $ -// $Id: Convex_hull_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Convex_hull_3.h $ +// $Id: include/CGAL/license/Convex_hull_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_CONVEX_HULL_3_H #define CGAL_LICENSE_CONVEX_HULL_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Convex_hull_d.h b/thirdparty/CGAL/include/CGAL/license/Convex_hull_d.h index 84c2718c..386f8bd2 100644 --- a/thirdparty/CGAL/include/CGAL/license/Convex_hull_d.h +++ b/thirdparty/CGAL/include/CGAL/license/Convex_hull_d.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Convex_hull_d.h $ -// $Id: Convex_hull_d.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Convex_hull_d.h $ +// $Id: include/CGAL/license/Convex_hull_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_CONVEX_HULL_D_H #define CGAL_LICENSE_CONVEX_HULL_D_H diff --git a/thirdparty/CGAL/include/CGAL/license/Envelope_2.h b/thirdparty/CGAL/include/CGAL/license/Envelope_2.h index 244415cf..91e6afe5 100644 --- a/thirdparty/CGAL/include/CGAL/license/Envelope_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Envelope_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Envelope_2.h $ -// $Id: Envelope_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Envelope_2.h $ +// $Id: include/CGAL/license/Envelope_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_ENVELOPE_2_H #define CGAL_LICENSE_ENVELOPE_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Envelope_3.h b/thirdparty/CGAL/include/CGAL/license/Envelope_3.h index 1aaa0965..94db250d 100644 --- a/thirdparty/CGAL/include/CGAL/license/Envelope_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Envelope_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Envelope_3.h $ -// $Id: Envelope_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Envelope_3.h $ +// $Id: include/CGAL/license/Envelope_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_ENVELOPE_3_H #define CGAL_LICENSE_ENVELOPE_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/GraphicsView.h b/thirdparty/CGAL/include/CGAL/license/GraphicsView.h index 903068c1..2edddc62 100644 --- a/thirdparty/CGAL/include/CGAL/license/GraphicsView.h +++ b/thirdparty/CGAL/include/CGAL/license/GraphicsView.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/GraphicsView.h $ -// $Id: GraphicsView.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/GraphicsView.h $ +// $Id: include/CGAL/license/GraphicsView.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_GRAPHICSVIEW_H #define CGAL_LICENSE_GRAPHICSVIEW_H diff --git a/thirdparty/CGAL/include/CGAL/license/Heat_method_3.h b/thirdparty/CGAL/include/CGAL/license/Heat_method_3.h index fd7a1e89..0fb0cb96 100644 --- a/thirdparty/CGAL/include/CGAL/license/Heat_method_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Heat_method_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Heat_method_3.h $ -// $Id: Heat_method_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Heat_method_3.h $ +// $Id: include/CGAL/license/Heat_method_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_HEAT_METHOD_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Hyperbolic_triangulation_2.h b/thirdparty/CGAL/include/CGAL/license/Hyperbolic_triangulation_2.h index e1358573..c65b3dac 100644 --- a/thirdparty/CGAL/include/CGAL/license/Hyperbolic_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Hyperbolic_triangulation_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Hyperbolic_triangulation_2.h $ -// $Id: Hyperbolic_triangulation_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Hyperbolic_triangulation_2.h $ +// $Id: include/CGAL/license/Hyperbolic_triangulation_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_HYPERBOLIC_TRIANGULATION_2_H #define CGAL_LICENSE_HYPERBOLIC_TRIANGULATION_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Inscribed_areas.h b/thirdparty/CGAL/include/CGAL/license/Inscribed_areas.h index 2d20de53..334f3b99 100644 --- a/thirdparty/CGAL/include/CGAL/license/Inscribed_areas.h +++ b/thirdparty/CGAL/include/CGAL/license/Inscribed_areas.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Inscribed_areas.h $ -// $Id: Inscribed_areas.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Inscribed_areas.h $ +// $Id: include/CGAL/license/Inscribed_areas.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_INSCRIBED_AREAS_H #define CGAL_LICENSE_INSCRIBED_AREAS_H diff --git a/thirdparty/CGAL/include/CGAL/license/Interpolation.h b/thirdparty/CGAL/include/CGAL/license/Interpolation.h index 0f1c79c7..3cf45094 100644 --- a/thirdparty/CGAL/include/CGAL/license/Interpolation.h +++ b/thirdparty/CGAL/include/CGAL/license/Interpolation.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Interpolation.h $ -// $Id: Interpolation.h 8bc8f70 2021-06-17T11:44:41+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Interpolation.h $ +// $Id: include/CGAL/license/Interpolation.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_INTERPOLATION_H #define CGAL_LICENSE_INTERPOLATION_H diff --git a/thirdparty/CGAL/include/CGAL/license/Interval_skip_list.h b/thirdparty/CGAL/include/CGAL/license/Interval_skip_list.h index 754fd215..7664db75 100644 --- a/thirdparty/CGAL/include/CGAL/license/Interval_skip_list.h +++ b/thirdparty/CGAL/include/CGAL/license/Interval_skip_list.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Interval_skip_list.h $ -// $Id: Interval_skip_list.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Interval_skip_list.h $ +// $Id: include/CGAL/license/Interval_skip_list.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_INTERVAL_SKIP_LIST_H #define CGAL_LICENSE_INTERVAL_SKIP_LIST_H diff --git a/thirdparty/CGAL/include/CGAL/license/Jet_fitting_3.h b/thirdparty/CGAL/include/CGAL/license/Jet_fitting_3.h index 63704e99..6a1c1c40 100644 --- a/thirdparty/CGAL/include/CGAL/license/Jet_fitting_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Jet_fitting_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Jet_fitting_3.h $ -// $Id: Jet_fitting_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Jet_fitting_3.h $ +// $Id: include/CGAL/license/Jet_fitting_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_JET_FITTING_3_H #define CGAL_LICENSE_JET_FITTING_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Matrix_search.h b/thirdparty/CGAL/include/CGAL/license/Matrix_search.h index 9a2bc400..29b03b7d 100644 --- a/thirdparty/CGAL/include/CGAL/license/Matrix_search.h +++ b/thirdparty/CGAL/include/CGAL/license/Matrix_search.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Matrix_search.h $ -// $Id: Matrix_search.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Matrix_search.h $ +// $Id: include/CGAL/license/Matrix_search.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_MATRIX_SEARCH_H #define CGAL_LICENSE_MATRIX_SEARCH_H diff --git a/thirdparty/CGAL/include/CGAL/license/Mesh_2.h b/thirdparty/CGAL/include/CGAL/license/Mesh_2.h index bc23265f..fdadd9a2 100644 --- a/thirdparty/CGAL/include/CGAL/license/Mesh_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Mesh_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Mesh_2.h $ -// $Id: Mesh_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Mesh_2.h $ +// $Id: include/CGAL/license/Mesh_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_MESH_2_H #define CGAL_LICENSE_MESH_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Mesh_3.h b/thirdparty/CGAL/include/CGAL/license/Mesh_3.h index 807d4258..f4a67359 100644 --- a/thirdparty/CGAL/include/CGAL/license/Mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Mesh_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Mesh_3.h $ -// $Id: Mesh_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Mesh_3.h $ +// $Id: include/CGAL/license/Mesh_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_MESH_3_H #define CGAL_LICENSE_MESH_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Minkowski_sum_2.h b/thirdparty/CGAL/include/CGAL/license/Minkowski_sum_2.h index e335f541..99e3cd20 100644 --- a/thirdparty/CGAL/include/CGAL/license/Minkowski_sum_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Minkowski_sum_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Minkowski_sum_2.h $ -// $Id: Minkowski_sum_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Minkowski_sum_2.h $ +// $Id: include/CGAL/license/Minkowski_sum_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_MINKOWSKI_SUM_2_H #define CGAL_LICENSE_MINKOWSKI_SUM_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Minkowski_sum_3.h b/thirdparty/CGAL/include/CGAL/license/Minkowski_sum_3.h index a714fc09..a255290b 100644 --- a/thirdparty/CGAL/include/CGAL/license/Minkowski_sum_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Minkowski_sum_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Minkowski_sum_3.h $ -// $Id: Minkowski_sum_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Minkowski_sum_3.h $ +// $Id: include/CGAL/license/Minkowski_sum_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_MINKOWSKI_SUM_3_H #define CGAL_LICENSE_MINKOWSKI_SUM_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Nef_2.h b/thirdparty/CGAL/include/CGAL/license/Nef_2.h index 98f8f207..4032eefb 100644 --- a/thirdparty/CGAL/include/CGAL/license/Nef_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Nef_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Nef_2.h $ -// $Id: Nef_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Nef_2.h $ +// $Id: include/CGAL/license/Nef_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_NEF_2_H #define CGAL_LICENSE_NEF_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Nef_3.h b/thirdparty/CGAL/include/CGAL/license/Nef_3.h index 08f84fb0..d507fc31 100644 --- a/thirdparty/CGAL/include/CGAL/license/Nef_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Nef_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Nef_3.h $ -// $Id: Nef_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Nef_3.h $ +// $Id: include/CGAL/license/Nef_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_NEF_3_H #define CGAL_LICENSE_NEF_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Nef_S2.h b/thirdparty/CGAL/include/CGAL/license/Nef_S2.h index af967602..162b4d9e 100644 --- a/thirdparty/CGAL/include/CGAL/license/Nef_S2.h +++ b/thirdparty/CGAL/include/CGAL/license/Nef_S2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Nef_S2.h $ -// $Id: Nef_S2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Nef_S2.h $ +// $Id: include/CGAL/license/Nef_S2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_NEF_S2_H #define CGAL_LICENSE_NEF_S2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Optimal_bounding_box.h b/thirdparty/CGAL/include/CGAL/license/Optimal_bounding_box.h index 8b7e81bd..a7c032e2 100644 --- a/thirdparty/CGAL/include/CGAL/license/Optimal_bounding_box.h +++ b/thirdparty/CGAL/include/CGAL/license/Optimal_bounding_box.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Optimal_bounding_box.h $ -// $Id: Optimal_bounding_box.h 844cd55 2019-12-09T15:43:30+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Optimal_bounding_box.h $ +// $Id: include/CGAL/license/Optimal_bounding_box.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_OPTIMAL_BOUNDING_BOX_H #define CGAL_LICENSE_OPTIMAL_BOUNDING_BOX_H diff --git a/thirdparty/CGAL/include/CGAL/license/Optimal_transportation_reconstruction_2.h b/thirdparty/CGAL/include/CGAL/license/Optimal_transportation_reconstruction_2.h index e60bd720..b7172b33 100644 --- a/thirdparty/CGAL/include/CGAL/license/Optimal_transportation_reconstruction_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Optimal_transportation_reconstruction_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Optimal_transportation_reconstruction_2.h $ -// $Id: Optimal_transportation_reconstruction_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Optimal_transportation_reconstruction_2.h $ +// $Id: include/CGAL/license/Optimal_transportation_reconstruction_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_OPTIMAL_TRANSPORTATION_RECONSTRUCTION_2_H #define CGAL_LICENSE_OPTIMAL_TRANSPORTATION_RECONSTRUCTION_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Orthtree.h b/thirdparty/CGAL/include/CGAL/license/Orthtree.h index 70b5edda..063ad6a5 100644 --- a/thirdparty/CGAL/include/CGAL/license/Orthtree.h +++ b/thirdparty/CGAL/include/CGAL/license/Orthtree.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Orthtree.h $ -// $Id: Orthtree.h 8bc8f70 2021-06-17T11:44:41+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Orthtree.h $ +// $Id: include/CGAL/license/Orthtree.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_ORTHTREE_H #define CGAL_LICENSE_ORTHTREE_H diff --git a/thirdparty/CGAL/include/CGAL/license/Partition_2.h b/thirdparty/CGAL/include/CGAL/license/Partition_2.h index 4e6f825a..f22da9e8 100644 --- a/thirdparty/CGAL/include/CGAL/license/Partition_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Partition_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Partition_2.h $ -// $Id: Partition_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Partition_2.h $ +// $Id: include/CGAL/license/Partition_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_PARTITION_2_H #define CGAL_LICENSE_PARTITION_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Periodic_2_triangulation_2.h b/thirdparty/CGAL/include/CGAL/license/Periodic_2_triangulation_2.h index c01e9a08..7577d242 100644 --- a/thirdparty/CGAL/include/CGAL/license/Periodic_2_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Periodic_2_triangulation_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Periodic_2_triangulation_2.h $ -// $Id: Periodic_2_triangulation_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Periodic_2_triangulation_2.h $ +// $Id: include/CGAL/license/Periodic_2_triangulation_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_PERIODIC_2_TRIANGULATION_2_H #define CGAL_LICENSE_PERIODIC_2_TRIANGULATION_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Periodic_3_mesh_3.h b/thirdparty/CGAL/include/CGAL/license/Periodic_3_mesh_3.h index f425e916..16c0d52d 100644 --- a/thirdparty/CGAL/include/CGAL/license/Periodic_3_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Periodic_3_mesh_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Periodic_3_mesh_3.h $ -// $Id: Periodic_3_mesh_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Periodic_3_mesh_3.h $ +// $Id: include/CGAL/license/Periodic_3_mesh_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_PERIODIC_3_MESH_3_H #define CGAL_LICENSE_PERIODIC_3_MESH_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Periodic_3_triangulation_3.h b/thirdparty/CGAL/include/CGAL/license/Periodic_3_triangulation_3.h index d6b016e4..6b1f6ce0 100644 --- a/thirdparty/CGAL/include/CGAL/license/Periodic_3_triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Periodic_3_triangulation_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Periodic_3_triangulation_3.h $ -// $Id: Periodic_3_triangulation_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Periodic_3_triangulation_3.h $ +// $Id: include/CGAL/license/Periodic_3_triangulation_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_PERIODIC_3_TRIANGULATION_3_H #define CGAL_LICENSE_PERIODIC_3_TRIANGULATION_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Periodic_4_hyperbolic_triangulation_2.h b/thirdparty/CGAL/include/CGAL/license/Periodic_4_hyperbolic_triangulation_2.h index b2a38796..9b54e08f 100644 --- a/thirdparty/CGAL/include/CGAL/license/Periodic_4_hyperbolic_triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Periodic_4_hyperbolic_triangulation_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Periodic_4_hyperbolic_triangulation_2.h $ -// $Id: Periodic_4_hyperbolic_triangulation_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Periodic_4_hyperbolic_triangulation_2.h $ +// $Id: include/CGAL/license/Periodic_4_hyperbolic_triangulation_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_PERIODIC_4_HYPERBOLIC_TRIANGULATION_2_H #define CGAL_LICENSE_PERIODIC_4_HYPERBOLIC_TRIANGULATION_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Point_set_2.h b/thirdparty/CGAL/include/CGAL/license/Point_set_2.h index d780f814..6212abeb 100644 --- a/thirdparty/CGAL/include/CGAL/license/Point_set_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Point_set_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Point_set_2.h $ -// $Id: Point_set_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Point_set_2.h $ +// $Id: include/CGAL/license/Point_set_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POINT_SET_2_H #define CGAL_LICENSE_POINT_SET_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Point_set_3.h b/thirdparty/CGAL/include/CGAL/license/Point_set_3.h index 997b52e0..ea640daa 100644 --- a/thirdparty/CGAL/include/CGAL/license/Point_set_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Point_set_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Point_set_3.h $ -// $Id: Point_set_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Point_set_3.h $ +// $Id: include/CGAL/license/Point_set_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POINT_SET_3_H #define CGAL_LICENSE_POINT_SET_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Point_set_processing_3.h b/thirdparty/CGAL/include/CGAL/license/Point_set_processing_3.h index ff4df9b0..0d1c1c3a 100644 --- a/thirdparty/CGAL/include/CGAL/license/Point_set_processing_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Point_set_processing_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Point_set_processing_3.h $ -// $Id: Point_set_processing_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Point_set_processing_3.h $ +// $Id: include/CGAL/license/Point_set_processing_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POINT_SET_PROCESSING_3_H #define CGAL_LICENSE_POINT_SET_PROCESSING_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Poisson_surface_reconstruction_3.h b/thirdparty/CGAL/include/CGAL/license/Poisson_surface_reconstruction_3.h index 7d400ccf..6c63c521 100644 --- a/thirdparty/CGAL/include/CGAL/license/Poisson_surface_reconstruction_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Poisson_surface_reconstruction_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Poisson_surface_reconstruction_3.h $ -// $Id: Poisson_surface_reconstruction_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Poisson_surface_reconstruction_3.h $ +// $Id: include/CGAL/license/Poisson_surface_reconstruction_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POISSON_SURFACE_RECONSTRUCTION_3_H #define CGAL_LICENSE_POISSON_SURFACE_RECONSTRUCTION_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing.h index fa4133cc..557a3d99 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing.h $ -// $Id: Polygon_mesh_processing.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/Compute_normal.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/Compute_normal.h index c1b25794..ffd672aa 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/Compute_normal.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/Compute_normal.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/Compute_normal.h $ -// $Id: Compute_normal.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/Compute_normal.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/Compute_normal.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_COMPUTE_NORMAL_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_COMPUTE_NORMAL_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/Polyhedral_envelope.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/Polyhedral_envelope.h index 9025797a..ef8c699d 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/Polyhedral_envelope.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/Polyhedral_envelope.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/Polyhedral_envelope.h $ -// $Id: Polyhedral_envelope.h 6b9bd51 2020-11-12T14:45:14+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/Polyhedral_envelope.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/Polyhedral_envelope.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_POLYHEDRAL_ENVELOPE_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_POLYHEDRAL_ENVELOPE_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/autorefinement.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/autorefinement.h new file mode 100644 index 00000000..9fc64423 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/autorefinement.h @@ -0,0 +1,54 @@ +// Copyright (c) 2016 GeometryFactory SARL (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/autorefinement.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/autorefinement.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Andreas Fabri +// +// Warning: this file is generated, see include/CGAL/license/README.md + +#ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_H +#define CGAL_LICENSE_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_H + +#include +#include + +#ifdef CGAL_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_COMMERCIAL_LICENSE + +# if CGAL_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE + +# if defined(CGAL_LICENSE_WARNING) + + CGAL_pragma_warning("Your commercial license for CGAL does not cover " + "this release of the Polygon Mesh Processing - Autorefinement package.") +# endif + +# ifdef CGAL_LICENSE_ERROR +# error "Your commercial license for CGAL does not cover this release \ + of the Polygon Mesh Processing - Autorefinement package. \ + You get this error, as you defined CGAL_LICENSE_ERROR." +# endif // CGAL_LICENSE_ERROR + +# endif // CGAL_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE + +#else // no CGAL_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_COMMERCIAL_LICENSE + +# if defined(CGAL_LICENSE_WARNING) + CGAL_pragma_warning("\nThe macro CGAL_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_COMMERCIAL_LICENSE is not defined." + "\nYou use the CGAL Polygon Mesh Processing - Autorefinement package under " + "the terms of the GPLv3+.") +# endif // CGAL_LICENSE_WARNING + +# ifdef CGAL_LICENSE_ERROR +# error "The macro CGAL_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_COMMERCIAL_LICENSE is not defined.\ + You use the CGAL Polygon Mesh Processing - Autorefinement package under the terms of \ + the GPLv3+. You get this error, as you defined CGAL_LICENSE_ERROR." +# endif // CGAL_LICENSE_ERROR + +#endif // no CGAL_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_COMMERCIAL_LICENSE + +#endif // CGAL_LICENSE_POLYGON_MESH_PROCESSING_AUTOREFINEMENT_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/collision_detection.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/collision_detection.h index faedf1d8..f402460b 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/collision_detection.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/collision_detection.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/collision_detection.h $ -// $Id: collision_detection.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/collision_detection.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/collision_detection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_COLLISION_DETECTION_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_COLLISION_DETECTION_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/combinatorial_repair.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/combinatorial_repair.h index cb6ac78d..58ead318 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/combinatorial_repair.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/combinatorial_repair.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/combinatorial_repair.h $ -// $Id: combinatorial_repair.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/combinatorial_repair.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/combinatorial_repair.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/connected_components.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/connected_components.h index c26552ea..475e270c 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/connected_components.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/connected_components.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/connected_components.h $ -// $Id: connected_components.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/connected_components.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/connected_components.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_CONNECTED_COMPONENTS_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_CONNECTED_COMPONENTS_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/core.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/core.h index fba8323b..d6f78a07 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/core.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/core.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/core.h $ -// $Id: core.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/core.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/core.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_CORE_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_CORE_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/corefinement.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/corefinement.h index d492cee7..1a673de9 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/corefinement.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/corefinement.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/corefinement.h $ -// $Id: corefinement.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/corefinement.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/corefinement.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_COREFINEMENT_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_COREFINEMENT_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/detect_features.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/detect_features.h index 8027d6c9..c1f2fbcc 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/detect_features.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/detect_features.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/detect_features.h $ -// $Id: detect_features.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/detect_features.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/detect_features.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_DETECT_FEATURES_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_DETECT_FEATURES_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/distance.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/distance.h index d80ad820..461caf11 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/distance.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/distance.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/distance.h $ -// $Id: distance.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/distance.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/distance.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_DISTANCE_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_DISTANCE_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/geometric_repair.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/geometric_repair.h index bb131b00..b2b4a6d5 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/geometric_repair.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/geometric_repair.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/geometric_repair.h $ -// $Id: geometric_repair.h 5a992f6 2022-11-22T10:31:34+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/geometric_repair.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/geometric_repair.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_GEOMETRIC_REPAIR_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_GEOMETRIC_REPAIR_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/interpolated_corrected_curvatures.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/interpolated_corrected_curvatures.h new file mode 100644 index 00000000..518ea448 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/interpolated_corrected_curvatures.h @@ -0,0 +1,54 @@ +// Copyright (c) 2016 GeometryFactory SARL (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/interpolated_corrected_curvatures.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/interpolated_corrected_curvatures.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Andreas Fabri +// +// Warning: this file is generated, see include/CGAL/license/README.md + +#ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_INTERPOLATED_CORRECTED_CURVATURES_H +#define CGAL_LICENSE_POLYGON_MESH_PROCESSING_INTERPOLATED_CORRECTED_CURVATURES_H + +#include +#include + +#ifdef CGAL_POLYGON_MESH_PROCESSING_INTERPOLATED_CORRECTED_CURVATURES_COMMERCIAL_LICENSE + +# if CGAL_POLYGON_MESH_PROCESSING_INTERPOLATED_CORRECTED_CURVATURES_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE + +# if defined(CGAL_LICENSE_WARNING) + + CGAL_pragma_warning("Your commercial license for CGAL does not cover " + "this release of the Polygon Mesh Processing - Interpolated Corrected Curvatures package.") +# endif + +# ifdef CGAL_LICENSE_ERROR +# error "Your commercial license for CGAL does not cover this release \ + of the Polygon Mesh Processing - Interpolated Corrected Curvatures package. \ + You get this error, as you defined CGAL_LICENSE_ERROR." +# endif // CGAL_LICENSE_ERROR + +# endif // CGAL_POLYGON_MESH_PROCESSING_INTERPOLATED_CORRECTED_CURVATURES_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE + +#else // no CGAL_POLYGON_MESH_PROCESSING_INTERPOLATED_CORRECTED_CURVATURES_COMMERCIAL_LICENSE + +# if defined(CGAL_LICENSE_WARNING) + CGAL_pragma_warning("\nThe macro CGAL_POLYGON_MESH_PROCESSING_INTERPOLATED_CORRECTED_CURVATURES_COMMERCIAL_LICENSE is not defined." + "\nYou use the CGAL Polygon Mesh Processing - Interpolated Corrected Curvatures package under " + "the terms of the GPLv3+.") +# endif // CGAL_LICENSE_WARNING + +# ifdef CGAL_LICENSE_ERROR +# error "The macro CGAL_POLYGON_MESH_PROCESSING_INTERPOLATED_CORRECTED_CURVATURES_COMMERCIAL_LICENSE is not defined.\ + You use the CGAL Polygon Mesh Processing - Interpolated Corrected Curvatures package under the terms of \ + the GPLv3+. You get this error, as you defined CGAL_LICENSE_ERROR." +# endif // CGAL_LICENSE_ERROR + +#endif // no CGAL_POLYGON_MESH_PROCESSING_INTERPOLATED_CORRECTED_CURVATURES_COMMERCIAL_LICENSE + +#endif // CGAL_LICENSE_POLYGON_MESH_PROCESSING_INTERPOLATED_CORRECTED_CURVATURES_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/locate.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/locate.h index 91711190..3721cff2 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/locate.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/locate.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/locate.h $ -// $Id: locate.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/locate.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/locate.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_LOCATE_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_LOCATE_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/measure.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/measure.h index d31756ed..df5cde7d 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/measure.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/measure.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/measure.h $ -// $Id: measure.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/measure.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/measure.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_MEASURE_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_MEASURE_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/meshing_hole_filling.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/meshing_hole_filling.h index 18c74842..a6d65dbc 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/meshing_hole_filling.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/meshing_hole_filling.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/meshing_hole_filling.h $ -// $Id: meshing_hole_filling.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/meshing_hole_filling.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/meshing_hole_filling.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_MESHING_HOLE_FILLING_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_MESHING_HOLE_FILLING_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/miscellaneous.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/miscellaneous.h index f54506bd..9932b027 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/miscellaneous.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/miscellaneous.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/miscellaneous.h $ -// $Id: miscellaneous.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/miscellaneous.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/miscellaneous.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_MISCELLANEOUS_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_MISCELLANEOUS_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/orientation.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/orientation.h index 40b437a7..615eea80 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/orientation.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/orientation.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/orientation.h $ -// $Id: orientation.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/orientation.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/orientation.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_ORIENTATION_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_ORIENTATION_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/predicate.h b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/predicate.h index d8797122..e6499ceb 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/predicate.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygon_mesh_processing/predicate.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygon_mesh_processing/predicate.h $ -// $Id: predicate.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygon_mesh_processing/predicate.h $ +// $Id: include/CGAL/license/Polygon_mesh_processing/predicate.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_PREDICATE_H #define CGAL_LICENSE_POLYGON_MESH_PROCESSING_PREDICATE_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polygonal_surface_reconstruction.h b/thirdparty/CGAL/include/CGAL/license/Polygonal_surface_reconstruction.h index c2c54e86..e71e5a8b 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polygonal_surface_reconstruction.h +++ b/thirdparty/CGAL/include/CGAL/license/Polygonal_surface_reconstruction.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polygonal_surface_reconstruction.h $ -// $Id: Polygonal_surface_reconstruction.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polygonal_surface_reconstruction.h $ +// $Id: include/CGAL/license/Polygonal_surface_reconstruction.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYGONAL_SURFACE_RECONSTRUCTION_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polyhedron.h b/thirdparty/CGAL/include/CGAL/license/Polyhedron.h index d6143492..92915804 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polyhedron.h +++ b/thirdparty/CGAL/include/CGAL/license/Polyhedron.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polyhedron.h $ -// $Id: Polyhedron.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polyhedron.h $ +// $Id: include/CGAL/license/Polyhedron.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYHEDRON_H #define CGAL_LICENSE_POLYHEDRON_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polyline_simplification_2.h b/thirdparty/CGAL/include/CGAL/license/Polyline_simplification_2.h index 08e6bafb..dee14041 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polyline_simplification_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Polyline_simplification_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polyline_simplification_2.h $ -// $Id: Polyline_simplification_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polyline_simplification_2.h $ +// $Id: include/CGAL/license/Polyline_simplification_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYLINE_SIMPLIFICATION_2_H #define CGAL_LICENSE_POLYLINE_SIMPLIFICATION_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Polytope_distance_d.h b/thirdparty/CGAL/include/CGAL/license/Polytope_distance_d.h index 036b37be..85c5ba7f 100644 --- a/thirdparty/CGAL/include/CGAL/license/Polytope_distance_d.h +++ b/thirdparty/CGAL/include/CGAL/license/Polytope_distance_d.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Polytope_distance_d.h $ -// $Id: Polytope_distance_d.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Polytope_distance_d.h $ +// $Id: include/CGAL/license/Polytope_distance_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_POLYTOPE_DISTANCE_D_H #define CGAL_LICENSE_POLYTOPE_DISTANCE_D_H diff --git a/thirdparty/CGAL/include/CGAL/license/Principal_component_analysis.h b/thirdparty/CGAL/include/CGAL/license/Principal_component_analysis.h index 640b4b70..131c5424 100644 --- a/thirdparty/CGAL/include/CGAL/license/Principal_component_analysis.h +++ b/thirdparty/CGAL/include/CGAL/license/Principal_component_analysis.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Principal_component_analysis.h $ -// $Id: Principal_component_analysis.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Principal_component_analysis.h $ +// $Id: include/CGAL/license/Principal_component_analysis.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_PRINCIPAL_COMPONENT_ANALYSIS_H #define CGAL_LICENSE_PRINCIPAL_COMPONENT_ANALYSIS_H diff --git a/thirdparty/CGAL/include/CGAL/license/QP_solver.h b/thirdparty/CGAL/include/CGAL/license/QP_solver.h index c50bac9c..5f45ba26 100644 --- a/thirdparty/CGAL/include/CGAL/license/QP_solver.h +++ b/thirdparty/CGAL/include/CGAL/license/QP_solver.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/QP_solver.h $ -// $Id: QP_solver.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/QP_solver.h $ +// $Id: include/CGAL/license/QP_solver.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_QP_SOLVER_H #define CGAL_LICENSE_QP_SOLVER_H diff --git a/thirdparty/CGAL/include/CGAL/license/Ridges_3.h b/thirdparty/CGAL/include/CGAL/license/Ridges_3.h index ff1d2434..6180e1ca 100644 --- a/thirdparty/CGAL/include/CGAL/license/Ridges_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Ridges_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Ridges_3.h $ -// $Id: Ridges_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Ridges_3.h $ +// $Id: include/CGAL/license/Ridges_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_RIDGES_3_H #define CGAL_LICENSE_RIDGES_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/SMDS_3.h b/thirdparty/CGAL/include/CGAL/license/SMDS_3.h new file mode 100644 index 00000000..dfd74a63 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/license/SMDS_3.h @@ -0,0 +1,54 @@ +// Copyright (c) 2016 GeometryFactory SARL (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/SMDS_3.h $ +// $Id: include/CGAL/license/SMDS_3.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Andreas Fabri +// +// Warning: this file is generated, see include/CGAL/license/README.md + +#ifndef CGAL_LICENSE_SMDS_3_H +#define CGAL_LICENSE_SMDS_3_H + +#include +#include + +#ifdef CGAL_SMDS_3_COMMERCIAL_LICENSE + +# if CGAL_SMDS_3_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE + +# if defined(CGAL_LICENSE_WARNING) + + CGAL_pragma_warning("Your commercial license for CGAL does not cover " + "this release of the 3D Simplicial Mesh Data Structure package.") +# endif + +# ifdef CGAL_LICENSE_ERROR +# error "Your commercial license for CGAL does not cover this release \ + of the 3D Simplicial Mesh Data Structure package. \ + You get this error, as you defined CGAL_LICENSE_ERROR." +# endif // CGAL_LICENSE_ERROR + +# endif // CGAL_SMDS_3_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE + +#else // no CGAL_SMDS_3_COMMERCIAL_LICENSE + +# if defined(CGAL_LICENSE_WARNING) + CGAL_pragma_warning("\nThe macro CGAL_SMDS_3_COMMERCIAL_LICENSE is not defined." + "\nYou use the CGAL 3D Simplicial Mesh Data Structure package under " + "the terms of the GPLv3+.") +# endif // CGAL_LICENSE_WARNING + +# ifdef CGAL_LICENSE_ERROR +# error "The macro CGAL_SMDS_3_COMMERCIAL_LICENSE is not defined.\ + You use the CGAL 3D Simplicial Mesh Data Structure package under the terms of \ + the GPLv3+. You get this error, as you defined CGAL_LICENSE_ERROR." +# endif // CGAL_LICENSE_ERROR + +#endif // no CGAL_SMDS_3_COMMERCIAL_LICENSE + +#endif // CGAL_LICENSE_SMDS_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Scale_space_reconstruction_3.h b/thirdparty/CGAL/include/CGAL/license/Scale_space_reconstruction_3.h index 906d47ab..68e0b712 100644 --- a/thirdparty/CGAL/include/CGAL/license/Scale_space_reconstruction_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Scale_space_reconstruction_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Scale_space_reconstruction_3.h $ -// $Id: Scale_space_reconstruction_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Scale_space_reconstruction_3.h $ +// $Id: include/CGAL/license/Scale_space_reconstruction_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SCALE_SPACE_RECONSTRUCTION_3_H #define CGAL_LICENSE_SCALE_SPACE_RECONSTRUCTION_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/SearchStructures.h b/thirdparty/CGAL/include/CGAL/license/SearchStructures.h index 45ffa701..a9981b17 100644 --- a/thirdparty/CGAL/include/CGAL/license/SearchStructures.h +++ b/thirdparty/CGAL/include/CGAL/license/SearchStructures.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/SearchStructures.h $ -// $Id: SearchStructures.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/SearchStructures.h $ +// $Id: include/CGAL/license/SearchStructures.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SEARCHSTRUCTURES_H #define CGAL_LICENSE_SEARCHSTRUCTURES_H diff --git a/thirdparty/CGAL/include/CGAL/license/Segment_Delaunay_graph_2.h b/thirdparty/CGAL/include/CGAL/license/Segment_Delaunay_graph_2.h index c1aa61f8..ad7a499a 100644 --- a/thirdparty/CGAL/include/CGAL/license/Segment_Delaunay_graph_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Segment_Delaunay_graph_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Segment_Delaunay_graph_2.h $ -// $Id: Segment_Delaunay_graph_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Segment_Delaunay_graph_2.h $ +// $Id: include/CGAL/license/Segment_Delaunay_graph_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SEGMENT_DELAUNAY_GRAPH_2_H #define CGAL_LICENSE_SEGMENT_DELAUNAY_GRAPH_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Segment_Delaunay_graph_Linf_2.h b/thirdparty/CGAL/include/CGAL/license/Segment_Delaunay_graph_Linf_2.h index cfb3320d..bac94d4f 100644 --- a/thirdparty/CGAL/include/CGAL/license/Segment_Delaunay_graph_Linf_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Segment_Delaunay_graph_Linf_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Segment_Delaunay_graph_Linf_2.h $ -// $Id: Segment_Delaunay_graph_Linf_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Segment_Delaunay_graph_Linf_2.h $ +// $Id: include/CGAL/license/Segment_Delaunay_graph_Linf_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SEGMENT_DELAUNAY_GRAPH_LINF_2_H #define CGAL_LICENSE_SEGMENT_DELAUNAY_GRAPH_LINF_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Set_movable_separability_2.h b/thirdparty/CGAL/include/CGAL/license/Set_movable_separability_2.h index b69c9fed..0ed077a7 100644 --- a/thirdparty/CGAL/include/CGAL/license/Set_movable_separability_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Set_movable_separability_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Set_movable_separability_2.h $ -// $Id: Set_movable_separability_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Set_movable_separability_2.h $ +// $Id: include/CGAL/license/Set_movable_separability_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SET_MOVABLE_SEPARABILITY_2_H #define CGAL_LICENSE_SET_MOVABLE_SEPARABILITY_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Shape_detection.h b/thirdparty/CGAL/include/CGAL/license/Shape_detection.h index 80664791..9d24dbbb 100644 --- a/thirdparty/CGAL/include/CGAL/license/Shape_detection.h +++ b/thirdparty/CGAL/include/CGAL/license/Shape_detection.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Shape_detection.h $ -// $Id: Shape_detection.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Shape_detection.h $ +// $Id: include/CGAL/license/Shape_detection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SHAPE_DETECTION_H #define CGAL_LICENSE_SHAPE_DETECTION_H diff --git a/thirdparty/CGAL/include/CGAL/license/Shape_regularization.h b/thirdparty/CGAL/include/CGAL/license/Shape_regularization.h index e151e61b..cca1a84d 100644 --- a/thirdparty/CGAL/include/CGAL/license/Shape_regularization.h +++ b/thirdparty/CGAL/include/CGAL/license/Shape_regularization.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Shape_regularization.h $ -// $Id: Shape_regularization.h 542f67b 2021-06-11T12:59:00+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Shape_regularization.h $ +// $Id: include/CGAL/license/Shape_regularization.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SHAPE_REGULARIZATION_H #define CGAL_LICENSE_SHAPE_REGULARIZATION_H diff --git a/thirdparty/CGAL/include/CGAL/license/Skin_surface_3.h b/thirdparty/CGAL/include/CGAL/license/Skin_surface_3.h index 588e9dc4..c597b9cc 100644 --- a/thirdparty/CGAL/include/CGAL/license/Skin_surface_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Skin_surface_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Skin_surface_3.h $ -// $Id: Skin_surface_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Skin_surface_3.h $ +// $Id: include/CGAL/license/Skin_surface_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SKIN_SURFACE_3_H #define CGAL_LICENSE_SKIN_SURFACE_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Snap_rounding_2.h b/thirdparty/CGAL/include/CGAL/license/Snap_rounding_2.h index 7ebf26d8..77980244 100644 --- a/thirdparty/CGAL/include/CGAL/license/Snap_rounding_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Snap_rounding_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Snap_rounding_2.h $ -// $Id: Snap_rounding_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Snap_rounding_2.h $ +// $Id: include/CGAL/license/Snap_rounding_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SNAP_ROUNDING_2_H #define CGAL_LICENSE_SNAP_ROUNDING_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Spatial_searching.h b/thirdparty/CGAL/include/CGAL/license/Spatial_searching.h index 644ca927..b1565217 100644 --- a/thirdparty/CGAL/include/CGAL/license/Spatial_searching.h +++ b/thirdparty/CGAL/include/CGAL/license/Spatial_searching.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Spatial_searching.h $ -// $Id: Spatial_searching.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Spatial_searching.h $ +// $Id: include/CGAL/license/Spatial_searching.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SPATIAL_SEARCHING_H #define CGAL_LICENSE_SPATIAL_SEARCHING_H diff --git a/thirdparty/CGAL/include/CGAL/license/Straight_skeleton_2.h b/thirdparty/CGAL/include/CGAL/license/Straight_skeleton_2.h index 878fa5cb..1774d0ca 100644 --- a/thirdparty/CGAL/include/CGAL/license/Straight_skeleton_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Straight_skeleton_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Straight_skeleton_2.h $ -// $Id: Straight_skeleton_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Straight_skeleton_2.h $ +// $Id: include/CGAL/license/Straight_skeleton_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_STRAIGHT_SKELETON_2_H #define CGAL_LICENSE_STRAIGHT_SKELETON_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Straight_skeleton_extrusion_2.h b/thirdparty/CGAL/include/CGAL/license/Straight_skeleton_extrusion_2.h new file mode 100644 index 00000000..1f52f2b0 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/license/Straight_skeleton_extrusion_2.h @@ -0,0 +1,54 @@ +// Copyright (c) 2016 GeometryFactory SARL (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Straight_skeleton_extrusion_2.h $ +// $Id: include/CGAL/license/Straight_skeleton_extrusion_2.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Andreas Fabri +// +// Warning: this file is generated, see include/CGAL/license/README.md + +#ifndef CGAL_LICENSE_STRAIGHT_SKELETON_EXTRUSION_2_H +#define CGAL_LICENSE_STRAIGHT_SKELETON_EXTRUSION_2_H + +#include +#include + +#ifdef CGAL_STRAIGHT_SKELETON_EXTRUSION_2_COMMERCIAL_LICENSE + +# if CGAL_STRAIGHT_SKELETON_EXTRUSION_2_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE + +# if defined(CGAL_LICENSE_WARNING) + + CGAL_pragma_warning("Your commercial license for CGAL does not cover " + "this release of the 2D Straight Skeleton Extrusion package.") +# endif + +# ifdef CGAL_LICENSE_ERROR +# error "Your commercial license for CGAL does not cover this release \ + of the 2D Straight Skeleton Extrusion package. \ + You get this error, as you defined CGAL_LICENSE_ERROR." +# endif // CGAL_LICENSE_ERROR + +# endif // CGAL_STRAIGHT_SKELETON_EXTRUSION_2_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE + +#else // no CGAL_STRAIGHT_SKELETON_EXTRUSION_2_COMMERCIAL_LICENSE + +# if defined(CGAL_LICENSE_WARNING) + CGAL_pragma_warning("\nThe macro CGAL_STRAIGHT_SKELETON_EXTRUSION_2_COMMERCIAL_LICENSE is not defined." + "\nYou use the CGAL 2D Straight Skeleton Extrusion package under " + "the terms of the GPLv3+.") +# endif // CGAL_LICENSE_WARNING + +# ifdef CGAL_LICENSE_ERROR +# error "The macro CGAL_STRAIGHT_SKELETON_EXTRUSION_2_COMMERCIAL_LICENSE is not defined.\ + You use the CGAL 2D Straight Skeleton Extrusion package under the terms of \ + the GPLv3+. You get this error, as you defined CGAL_LICENSE_ERROR." +# endif // CGAL_LICENSE_ERROR + +#endif // no CGAL_STRAIGHT_SKELETON_EXTRUSION_2_COMMERCIAL_LICENSE + +#endif // CGAL_LICENSE_STRAIGHT_SKELETON_EXTRUSION_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Stream_lines_2.h b/thirdparty/CGAL/include/CGAL/license/Stream_lines_2.h index 919f5b1f..cfc96925 100644 --- a/thirdparty/CGAL/include/CGAL/license/Stream_lines_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Stream_lines_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Stream_lines_2.h $ -// $Id: Stream_lines_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Stream_lines_2.h $ +// $Id: include/CGAL/license/Stream_lines_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_STREAM_LINES_2_H #define CGAL_LICENSE_STREAM_LINES_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Surface_mesh.h b/thirdparty/CGAL/include/CGAL/license/Surface_mesh.h index f3053874..0bbdb2d1 100644 --- a/thirdparty/CGAL/include/CGAL/license/Surface_mesh.h +++ b/thirdparty/CGAL/include/CGAL/license/Surface_mesh.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Surface_mesh.h $ -// $Id: Surface_mesh.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Surface_mesh.h $ +// $Id: include/CGAL/license/Surface_mesh.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SURFACE_MESH_H #define CGAL_LICENSE_SURFACE_MESH_H diff --git a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_approximation.h b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_approximation.h index eb453193..96de8423 100644 --- a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_approximation.h +++ b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_approximation.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Surface_mesh_approximation.h $ -// $Id: Surface_mesh_approximation.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Surface_mesh_approximation.h $ +// $Id: include/CGAL/license/Surface_mesh_approximation.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SURFACE_MESH_APPROXIMATION_H #define CGAL_LICENSE_SURFACE_MESH_APPROXIMATION_H diff --git a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_deformation.h b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_deformation.h index 471caea7..9714d52c 100644 --- a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_deformation.h +++ b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_deformation.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Surface_mesh_deformation.h $ -// $Id: Surface_mesh_deformation.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Surface_mesh_deformation.h $ +// $Id: include/CGAL/license/Surface_mesh_deformation.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SURFACE_MESH_DEFORMATION_H #define CGAL_LICENSE_SURFACE_MESH_DEFORMATION_H diff --git a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_parameterization.h b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_parameterization.h index f93946a0..38f09c1a 100644 --- a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_parameterization.h +++ b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_parameterization.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Surface_mesh_parameterization.h $ -// $Id: Surface_mesh_parameterization.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Surface_mesh_parameterization.h $ +// $Id: include/CGAL/license/Surface_mesh_parameterization.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SURFACE_MESH_PARAMETERIZATION_H #define CGAL_LICENSE_SURFACE_MESH_PARAMETERIZATION_H diff --git a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_segmentation.h b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_segmentation.h index 5a0fb377..bf852f18 100644 --- a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_segmentation.h +++ b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_segmentation.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Surface_mesh_segmentation.h $ -// $Id: Surface_mesh_segmentation.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Surface_mesh_segmentation.h $ +// $Id: include/CGAL/license/Surface_mesh_segmentation.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SURFACE_MESH_SEGMENTATION_H #define CGAL_LICENSE_SURFACE_MESH_SEGMENTATION_H diff --git a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_shortest_path.h b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_shortest_path.h index 95fe0b41..dc4c40af 100644 --- a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_shortest_path.h +++ b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_shortest_path.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Surface_mesh_shortest_path.h $ -// $Id: Surface_mesh_shortest_path.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Surface_mesh_shortest_path.h $ +// $Id: include/CGAL/license/Surface_mesh_shortest_path.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SURFACE_MESH_SHORTEST_PATH_H #define CGAL_LICENSE_SURFACE_MESH_SHORTEST_PATH_H diff --git a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_simplification.h b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_simplification.h index e941572c..f8c6d346 100644 --- a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_simplification.h +++ b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_simplification.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Surface_mesh_simplification.h $ -// $Id: Surface_mesh_simplification.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Surface_mesh_simplification.h $ +// $Id: include/CGAL/license/Surface_mesh_simplification.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SURFACE_MESH_SIMPLIFICATION_H #define CGAL_LICENSE_SURFACE_MESH_SIMPLIFICATION_H diff --git a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_skeletonization.h b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_skeletonization.h index a8d5fd5d..5a90f92b 100644 --- a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_skeletonization.h +++ b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_skeletonization.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Surface_mesh_skeletonization.h $ -// $Id: Surface_mesh_skeletonization.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Surface_mesh_skeletonization.h $ +// $Id: include/CGAL/license/Surface_mesh_skeletonization.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SURFACE_MESH_SKELETONIZATION_H #define CGAL_LICENSE_SURFACE_MESH_SKELETONIZATION_H diff --git a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_topology.h b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_topology.h index c1701dcd..fca03a75 100644 --- a/thirdparty/CGAL/include/CGAL/license/Surface_mesh_topology.h +++ b/thirdparty/CGAL/include/CGAL/license/Surface_mesh_topology.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Surface_mesh_topology.h $ -// $Id: Surface_mesh_topology.h 90457b3 2019-11-26T14:21:39+01:00 Guillaume Damiand +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Surface_mesh_topology.h $ +// $Id: include/CGAL/license/Surface_mesh_topology.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SURFACE_MESH_TOPOLOGY_H #define CGAL_LICENSE_SURFACE_MESH_TOPOLOGY_H diff --git a/thirdparty/CGAL/include/CGAL/license/Surface_mesher.h b/thirdparty/CGAL/include/CGAL/license/Surface_mesher.h index 66582d56..47540f6c 100644 --- a/thirdparty/CGAL/include/CGAL/license/Surface_mesher.h +++ b/thirdparty/CGAL/include/CGAL/license/Surface_mesher.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Surface_mesher.h $ -// $Id: Surface_mesher.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Surface_mesher.h $ +// $Id: include/CGAL/license/Surface_mesher.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SURFACE_MESHER_H #define CGAL_LICENSE_SURFACE_MESHER_H diff --git a/thirdparty/CGAL/include/CGAL/license/Surface_sweep_2.h b/thirdparty/CGAL/include/CGAL/license/Surface_sweep_2.h index b487c73b..a103a87a 100644 --- a/thirdparty/CGAL/include/CGAL/license/Surface_sweep_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Surface_sweep_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Surface_sweep_2.h $ -// $Id: Surface_sweep_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Surface_sweep_2.h $ +// $Id: include/CGAL/license/Surface_sweep_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_SURFACE_SWEEP_2_H #define CGAL_LICENSE_SURFACE_SWEEP_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/TDS_2.h b/thirdparty/CGAL/include/CGAL/license/TDS_2.h index 4c7fa87c..25f6ed2a 100644 --- a/thirdparty/CGAL/include/CGAL/license/TDS_2.h +++ b/thirdparty/CGAL/include/CGAL/license/TDS_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/TDS_2.h $ -// $Id: TDS_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/TDS_2.h $ +// $Id: include/CGAL/license/TDS_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_TDS_2_H #define CGAL_LICENSE_TDS_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/TDS_3.h b/thirdparty/CGAL/include/CGAL/license/TDS_3.h index c85b860f..a9f6ea2c 100644 --- a/thirdparty/CGAL/include/CGAL/license/TDS_3.h +++ b/thirdparty/CGAL/include/CGAL/license/TDS_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/TDS_3.h $ -// $Id: TDS_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/TDS_3.h $ +// $Id: include/CGAL/license/TDS_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_TDS_3_H #define CGAL_LICENSE_TDS_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Tetrahedral_remeshing.h b/thirdparty/CGAL/include/CGAL/license/Tetrahedral_remeshing.h index a06ecb6e..abecb013 100644 --- a/thirdparty/CGAL/include/CGAL/license/Tetrahedral_remeshing.h +++ b/thirdparty/CGAL/include/CGAL/license/Tetrahedral_remeshing.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Tetrahedral_remeshing.h $ -// $Id: Tetrahedral_remeshing.h 825f77b 2020-04-10T14:14:30+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Tetrahedral_remeshing.h $ +// $Id: include/CGAL/license/Tetrahedral_remeshing.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_TETRAHEDRAL_REMESHING_H #define CGAL_LICENSE_TETRAHEDRAL_REMESHING_H diff --git a/thirdparty/CGAL/include/CGAL/license/Three.h b/thirdparty/CGAL/include/CGAL/license/Three.h index 1e579ac4..19321674 100644 --- a/thirdparty/CGAL/include/CGAL/license/Three.h +++ b/thirdparty/CGAL/include/CGAL/license/Three.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Three.h $ -// $Id: Three.h 3edff7b 2021-06-17T10:49:45+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Three.h $ +// $Id: include/CGAL/license/Three.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_THREE_H #define CGAL_LICENSE_THREE_H diff --git a/thirdparty/CGAL/include/CGAL/license/Triangulation.h b/thirdparty/CGAL/include/CGAL/license/Triangulation.h index 4b068e31..0cff30d5 100644 --- a/thirdparty/CGAL/include/CGAL/license/Triangulation.h +++ b/thirdparty/CGAL/include/CGAL/license/Triangulation.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Triangulation.h $ -// $Id: Triangulation.h 8bc8f70 2021-06-17T11:44:41+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Triangulation.h $ +// $Id: include/CGAL/license/Triangulation.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_TRIANGULATION_H #define CGAL_LICENSE_TRIANGULATION_H diff --git a/thirdparty/CGAL/include/CGAL/license/Triangulation_2.h b/thirdparty/CGAL/include/CGAL/license/Triangulation_2.h index c3af4322..29866dd1 100644 --- a/thirdparty/CGAL/include/CGAL/license/Triangulation_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Triangulation_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Triangulation_2.h $ -// $Id: Triangulation_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Triangulation_2.h $ +// $Id: include/CGAL/license/Triangulation_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_TRIANGULATION_2_H #define CGAL_LICENSE_TRIANGULATION_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Triangulation_3.h b/thirdparty/CGAL/include/CGAL/license/Triangulation_3.h index 4c28f808..fe1082f5 100644 --- a/thirdparty/CGAL/include/CGAL/license/Triangulation_3.h +++ b/thirdparty/CGAL/include/CGAL/license/Triangulation_3.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Triangulation_3.h $ -// $Id: Triangulation_3.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Triangulation_3.h $ +// $Id: include/CGAL/license/Triangulation_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_TRIANGULATION_3_H #define CGAL_LICENSE_TRIANGULATION_3_H diff --git a/thirdparty/CGAL/include/CGAL/license/Triangulation_on_sphere_2.h b/thirdparty/CGAL/include/CGAL/license/Triangulation_on_sphere_2.h index 72405563..07821e22 100644 --- a/thirdparty/CGAL/include/CGAL/license/Triangulation_on_sphere_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Triangulation_on_sphere_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Triangulation_on_sphere_2.h $ -// $Id: Triangulation_on_sphere_2.h 3edff7b 2021-06-17T10:49:45+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Triangulation_on_sphere_2.h $ +// $Id: include/CGAL/license/Triangulation_on_sphere_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_TRIANGULATION_ON_SPHERE_2_H #define CGAL_LICENSE_TRIANGULATION_ON_SPHERE_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Visibility_2.h b/thirdparty/CGAL/include/CGAL/license/Visibility_2.h index f0f7dd2f..a7bbe14e 100644 --- a/thirdparty/CGAL/include/CGAL/license/Visibility_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Visibility_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Visibility_2.h $ -// $Id: Visibility_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Visibility_2.h $ +// $Id: include/CGAL/license/Visibility_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_VISIBILITY_2_H #define CGAL_LICENSE_VISIBILITY_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/Voronoi_diagram_2.h b/thirdparty/CGAL/include/CGAL/license/Voronoi_diagram_2.h index 55f5b712..e6a2aaf4 100644 --- a/thirdparty/CGAL/include/CGAL/license/Voronoi_diagram_2.h +++ b/thirdparty/CGAL/include/CGAL/license/Voronoi_diagram_2.h @@ -3,13 +3,13 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/Voronoi_diagram_2.h $ -// $Id: Voronoi_diagram_2.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/Voronoi_diagram_2.h $ +// $Id: include/CGAL/license/Voronoi_diagram_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md #ifndef CGAL_LICENSE_VORONOI_DIAGRAM_2_H #define CGAL_LICENSE_VORONOI_DIAGRAM_2_H diff --git a/thirdparty/CGAL/include/CGAL/license/gpl_package_list.txt b/thirdparty/CGAL/include/CGAL/license/gpl_package_list.txt index 79dc8fd3..a66f7cdf 100644 --- a/thirdparty/CGAL/include/CGAL/license/gpl_package_list.txt +++ b/thirdparty/CGAL/include/CGAL/license/gpl_package_list.txt @@ -20,6 +20,7 @@ Convex_hull_d dD Convex Hulls and Delaunay Triangulations Envelope_2 2D Envelopes Envelope_3 3D Envelopes GraphicsView CGAL and the Qt Graphics View Framework +Heat_method_3 The Heat Method Hyperbolic_triangulation_2 2D Hyperbolic Delaunay Triangulations Inscribed_areas Inscribed Areas Interpolation 2D and Surface Function Interpolation @@ -33,9 +34,9 @@ Minkowski_sum_3 3D Minkowski Sum of Polyhedra Nef_2 2D Boolean Operations on Nef Polygons Nef_3 3D Boolean Operations on Nef Polyhedra Nef_S2 2D Boolean Operations on Nef Polygons Embedded on the Sphere -Orthtree Quadtrees, Octrees, and Orthtrees Optimal_bounding_box Optimal Bounding Box Optimal_transportation_reconstruction_2 Optimal Transportation Curve Reconstruction +Orthtree Quadtrees, Octrees, and Orthtrees Partition_2 2D Polygon Partitioning Periodic_2_triangulation_2 2D Periodic Triangulations Periodic_3_mesh_3 3D Periodic Mesh Generation @@ -45,21 +46,26 @@ Point_set_2 2D Range and Neighbor Search Point_set_3 3D Point Set Point_set_processing_3 Point Set Processing Poisson_surface_reconstruction_3 Poisson Surface Reconstruction +Polygonal_surface_reconstruction Polygonal Surface Reconstruction Polygon_mesh_processing Polygon Mesh Processing Polygon_mesh_processing/Compute_normal Polygon Mesh Processing - Normal Computation Polygon_mesh_processing/connected_components Polygon Mesh Processing - Connected Components Polygon_mesh_processing/corefinement Polygon Mesh Processing - Corefinement Polygon_mesh_processing/core Polygon Mesh Processing - Core Polygon_mesh_processing/distance Polygon Mesh Processing - Distance +Polygon_mesh_processing/interpolated_corrected_curvatures Polygon Mesh Processing - Interpolated Corrected Curvatures +Polygon_mesh_processing/locate Polygon Mesh Processing - Locate Polygon_mesh_processing/measure Polygon Mesh Processing - Geometric Measure Polygon_mesh_processing/meshing_hole_filling Polygon Mesh Processing - Meshing and Hole Filling Polygon_mesh_processing/orientation Polygon Mesh Processing - Orientation +Polygon_mesh_processing/Polyhedral_envelope Polygon Mesh Processing - Polyhedral Envelope Polygon_mesh_processing/predicate Polygon Mesh Processing - Predicate Polygon_mesh_processing/combinatorial_repair Polygon Mesh Processing - Combinatorial Repair Polygon_mesh_processing/geometric_repair Polygon Mesh Processing - Geometric Repair Polygon_mesh_processing/miscellaneous Polygon Mesh Processing - Miscellaneous Polygon_mesh_processing/detect_features Polygon Mesh Processing - Feature Detection Polygon_mesh_processing/collision_detection Polygon Mesh Processing - Collision Detection +Polygon_mesh_processing/autorefinement Polygon Mesh Processing - Autorefinement Polyhedron 3D Polyhedral Surface Polyline_simplification_2 2D Polyline Simplification Polytope_distance_d Optimal Distances @@ -74,14 +80,16 @@ Set_movable_separability_2 2D Movable Separability of Sets Shape_detection Shape Detection Shape_regularization Shape Regularization Skin_surface_3 3D Skin Surface Meshing +SMDS_3 3D Simplicial Mesh Data Structure Snap_rounding_2 2D Snap Rounding Spatial_searching dD Spatial Searching Straight_skeleton_2 2D Straight Skeleton and Polygon Offsetting +Straight_skeleton_extrusion_2 2D Straight Skeleton Extrusion Stream_lines_2 2D Placement of Streamlines +Surface_mesh_approximation Triangulated Surface Mesh Approximation Surface_mesh_deformation Triangulated Surface Mesh Deformation Surface_mesher 3D Surface Mesh Generation Surface_mesh Surface Mesh -Surface_mesh_approximation Triangulated Surface Mesh Approximation Surface_mesh_parameterization Triangulated Surface Mesh Parameterization Surface_mesh_segmentation Triangulated Surface Mesh Segmentation Surface_mesh_shortest_path Triangulated Surface Mesh Shortest Paths @@ -91,11 +99,11 @@ Surface_mesh_topology Surface Mesh Topology Surface_sweep_2 2D Intersection of Curves TDS_2 2D Triangulation Data Structure TDS_3 3D Triangulation Data Structure +Tetrahedral_remeshing Tetrahedral Remeshing Three Three Triangulation_2 2D Triangulation -Triangulation_on_sphere_2 2D Triangulation on Sphere Triangulation_3 3D Triangulations Triangulation dD Triangulations +Triangulation_on_sphere_2 2D Triangulation on Sphere Visibility_2 2D Visibility Computation Voronoi_diagram_2 2D Voronoi Diagram Adaptor -Tetrahedral_remeshing Tetrahedral Remeshing diff --git a/thirdparty/CGAL/include/CGAL/license/lgpl.h b/thirdparty/CGAL/include/CGAL/license/lgpl.h index d9d62c6f..88d4eaa5 100644 --- a/thirdparty/CGAL/include/CGAL/license/lgpl.h +++ b/thirdparty/CGAL/include/CGAL/license/lgpl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/license/lgpl.h $ -// $Id: lgpl.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/license/lgpl.h $ +// $Id: include/CGAL/license/lgpl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_2.h b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_2.h index d79c3bb7..94e0bb24 100644 --- a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_2.h +++ b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_2.h $ -// $Id: linear_least_squares_fitting_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_2.h $ +// $Id: include/CGAL/linear_least_squares_fitting_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta diff --git a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_3.h b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_3.h index e6d483b6..d4998a7d 100644 --- a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_3.h +++ b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_3.h $ -// $Id: linear_least_squares_fitting_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_3.h $ +// $Id: include/CGAL/linear_least_squares_fitting_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta diff --git a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_circles_2.h b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_circles_2.h index b0b31de9..c3667f27 100644 --- a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_circles_2.h +++ b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_circles_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_circles_2.h $ -// $Id: linear_least_squares_fitting_circles_2.h e07672a 2022-01-26T21:04:59+05:30 G Yuvan Shankar +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_circles_2.h $ +// $Id: include/CGAL/linear_least_squares_fitting_circles_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta diff --git a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_cuboids_3.h b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_cuboids_3.h index 526c5726..d30bc434 100644 --- a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_cuboids_3.h +++ b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_cuboids_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_cuboids_3.h $ -// $Id: linear_least_squares_fitting_cuboids_3.h 3efe2ec 2021-03-31T09:40:19+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_cuboids_3.h $ +// $Id: include/CGAL/linear_least_squares_fitting_cuboids_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta diff --git a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_points_2.h b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_points_2.h index e7d43131..721d8dad 100644 --- a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_points_2.h +++ b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_points_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_points_2.h $ -// $Id: linear_least_squares_fitting_points_2.h e07672a 2022-01-26T21:04:59+05:30 G Yuvan Shankar +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_points_2.h $ +// $Id: include/CGAL/linear_least_squares_fitting_points_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta diff --git a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_points_3.h b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_points_3.h index 02ac6374..7ba9ea72 100644 --- a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_points_3.h +++ b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_points_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_points_3.h $ -// $Id: linear_least_squares_fitting_points_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_points_3.h $ +// $Id: include/CGAL/linear_least_squares_fitting_points_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta diff --git a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_rectangles_2.h b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_rectangles_2.h index 30c6497a..856369d9 100644 --- a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_rectangles_2.h +++ b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_rectangles_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_rectangles_2.h $ -// $Id: linear_least_squares_fitting_rectangles_2.h e07672a 2022-01-26T21:04:59+05:30 G Yuvan Shankar +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_rectangles_2.h $ +// $Id: include/CGAL/linear_least_squares_fitting_rectangles_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta diff --git a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_segments_2.h b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_segments_2.h index 69041594..01a90815 100644 --- a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_segments_2.h +++ b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_segments_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_2.h $ -// $Id: linear_least_squares_fitting_segments_2.h 4e7edc7 2022-01-27T11:03:42+01:00 Sebastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_2.h $ +// $Id: include/CGAL/linear_least_squares_fitting_segments_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta diff --git a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_segments_3.h b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_segments_3.h index 807fd1cf..3c5524a9 100644 --- a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_segments_3.h +++ b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_segments_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_3.h $ -// $Id: linear_least_squares_fitting_segments_3.h 3efe2ec 2021-03-31T09:40:19+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_3.h $ +// $Id: include/CGAL/linear_least_squares_fitting_segments_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta diff --git a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_spheres_3.h b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_spheres_3.h index cb04b86d..0634b7e2 100644 --- a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_spheres_3.h +++ b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_spheres_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_spheres_3.h $ -// $Id: linear_least_squares_fitting_spheres_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_spheres_3.h $ +// $Id: include/CGAL/linear_least_squares_fitting_spheres_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta diff --git a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h index 8ff2a299..61915004 100644 --- a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h +++ b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h $ -// $Id: linear_least_squares_fitting_tetrahedra_3.h 3efe2ec 2021-03-31T09:40:19+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h $ +// $Id: include/CGAL/linear_least_squares_fitting_tetrahedra_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta diff --git a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_triangles_2.h b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_triangles_2.h index 5108f0a8..e957400b 100644 --- a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_triangles_2.h +++ b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_triangles_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_2.h $ -// $Id: linear_least_squares_fitting_triangles_2.h e07672a 2022-01-26T21:04:59+05:30 G Yuvan Shankar +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_2.h $ +// $Id: include/CGAL/linear_least_squares_fitting_triangles_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta diff --git a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_triangles_3.h b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_triangles_3.h index bedd37a6..bbd597cd 100644 --- a/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_triangles_3.h +++ b/thirdparty/CGAL/include/CGAL/linear_least_squares_fitting_triangles_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_3.h $ -// $Id: linear_least_squares_fitting_triangles_3.h 3efe2ec 2021-03-31T09:40:19+02:00 Simon Giraudot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_3.h $ +// $Id: include/CGAL/linear_least_squares_fitting_triangles_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta diff --git a/thirdparty/CGAL/include/CGAL/link_to_face_graph.h b/thirdparty/CGAL/include/CGAL/link_to_face_graph.h index 9e20d48b..f599d5bb 100644 --- a/thirdparty/CGAL/include/CGAL/link_to_face_graph.h +++ b/thirdparty/CGAL/include/CGAL/link_to_face_graph.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Triangulation_3/include/CGAL/link_to_face_graph.h $ -// $Id: link_to_face_graph.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_3/include/CGAL/link_to_face_graph.h $ +// $Id: include/CGAL/link_to_face_graph.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/lloyd_optimize_mesh_2.h b/thirdparty/CGAL/include/CGAL/lloyd_optimize_mesh_2.h index de1ca305..065139f4 100644 --- a/thirdparty/CGAL/include/CGAL/lloyd_optimize_mesh_2.h +++ b/thirdparty/CGAL/include/CGAL/lloyd_optimize_mesh_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h $ -// $Id: lloyd_optimize_mesh_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h $ +// $Id: include/CGAL/lloyd_optimize_mesh_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jane Tournois @@ -15,61 +15,168 @@ #include -#include - #include #include #include #include #include -#include -#include - -#include -// see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS +#include +#include namespace CGAL { -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4003) // not enough actual parameters for macro -#endif - - BOOST_PARAMETER_FUNCTION( - (Mesh_optimization_return_code), - lloyd_optimize_mesh_2, - parameters::tag, - (required (in_out(cdt),*)) - (optional - (max_iteration_number_, *, 0 ) - (convergence_, *, 0.001 ) - (time_limit_, *, 0. ) - (freeze_bound_, *, 0.001 ) - (seeds_begin_, *, CGAL::Emptyset_iterator())//see comments below - (seeds_end_, *, CGAL::Emptyset_iterator())//see comments below - (mark_, *, false) //if "false", seeds indicate "outside" regions - ) - ) +/*! + * @ingroup PkgMesh2Functions + * + * The function `lloyd_optimize_mesh_2()` is a mesh optimization process + * based on the minimization of a global energy function. + * + * In `lloyd_optimize_mesh_2()`, the minimized global energy may be interpreted + * as the \f$ L^1\f$-norm of the error achieved + * when the function \f$ x^2\f$ is interpolated on the mesh domain + * using a piecewise linear function which is linear + * in each cell of the Voronoi diagram of the mesh vertices. + * + * The optimizer `lloyd_optimize_mesh_2()` works in iterative steps. + * At each iteration, mesh vertices are moved into + * positions that bring to zero the energy gradient + * and the Delaunay triangulation is updated. + * Vertices on the mesh boundaries are not moved. + * + * @tparam CDT is required to be or derive from `CGAL::Constrained_Delaunay_triangulation_2`, + * with vertex base and face base of its underlying `TriangulationDataStructure_2` + * being models of `DelaunayMeshVertexBase_2` and `DelaunayMeshFaceBase_2`, respectively. + * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * @param cdt the initial mesh that will be modified by the algorithm to represent the final optimized mesh. + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{seeds} + * \cgalParamDescription{2D points used to define the domain to mesh. + * If `seeds_are_in_domain==true`, the mesh domain is the union of + * the bounded connected components including at least + * one seed. If `seeds_are_in_domain==false`, the domain is the + * union of the bounded components including no seed.} + * \cgalParamType{a class model of `ConstRange` whose iterator is a model of `InputIterator` with `CDT::Point_2` as value type.} + * \cgalParamDefault{No seed.} + * \cgalParamNEnd + * + * \cgalParamNBegin{seeds_are_in_domain} + * \cgalParamDescription{specified if seeds indicate bounded connected components inside or outside of the domain.} + * \cgalParamType{`bool`} + * \cgalParamDefault{false} + * \cgalParamNEnd + * + * \cgalParamNBegin{max_iteration_number} + * \cgalParamDescription{limit on the number of performed iterations. 0 means that there is + * no limit on the number of performed iterations.} + * \cgalParamPrecondition{`max_iteration_number >=0`} + * \cgalParamType{`int`} + * \cgalParamDefault{0} + * \cgalParamNEnd + * + * \cgalParamNBegin{time_limit} + * \cgalParamDescription{CPU time limit (in seconds) after which the optimization process is stopped. + * This time is measured using `CGAL::Real_timer`. 0 means that there is no time limit.} + * \cgalParamType{`double`} + * \cgalParamPrecondition{`time_limit` \f$ \geq\f$ 0} + * \cgalParamDefault{0} + * \cgalParamNEnd + * + * \cgalParamNBegin{freeze_bound} + * \cgalParamDescription{designed to reduce running time of each optimization iteration. + * Any vertex that has a displacement less than a given fraction of the length + * of its shortest incident edge, is frozen (i.e.\ is not relocated). + * The parameter `freeze_bound` gives the threshold ratio. + * If it is set to 0, freezing of vertices is disabled.} + * \cgalParamPrecondition{`0<= freeze_bound <=1`} + * \cgalParamType{`double`} + * \cgalParamDefault{0.001} + * \cgalParamNEnd + * + * \cgalParamNBegin{convergence} + * \cgalParamDescription{threshold ratio of stopping criterion based on convergence: the optimization process is stopped + * when at the last iteration the displacement of any vertex is less than + * a given fraction of the length of the shortest edge incident to that vertex.} + * \cgalParamPrecondition{`0 <=convergence <= 1`} + * \cgalParamType{`double`} + * \cgalParamDefault{0.001} + * \cgalParamNEnd + * + * \cgalNamedParamsEnd + * + * @returns an enum value providing some information about the outcome of the algorithm. + * + * \sa `CGAL::Mesh_optimization_return_code` + * \sa `CGAL::refine_Delaunay_mesh_2()` + */ +template +Mesh_optimization_return_code +lloyd_optimize_mesh_2(CDT& cdt, const CGAL_NP_CLASS& np = parameters::default_values()) +{ + using parameters::choose_parameter; + using parameters::get_parameter; + using parameters::get_parameter_reference; + using parameters::is_default_parameter; + + std::size_t max_iterations = choose_parameter(get_parameter(np, internal_np::number_of_iterations), 0); + const double convergence_ratio = choose_parameter(get_parameter(np, internal_np::convergence_ratio), 0.001); + const double freeze_bound = choose_parameter(get_parameter(np, internal_np::vertex_freeze_bound), 0.001); + const double time_limit = choose_parameter(get_parameter(np, internal_np::maximum_running_time), 0.); + // Seeds + // { + typedef std::vector Default_seeds; + typedef typename internal_np::Lookup_named_param_def::reference Seeds; + Default_seeds ds; + Seeds seeds = choose_parameter(get_parameter_reference(np, internal_np::seeds), ds); + // } + const bool mark = choose_parameter(get_parameter(np, internal_np::seeds_are_in_domain), false); + + if (is_default_parameter::value || + is_default_parameter::value) { return lloyd_optimize_mesh_2_impl(cdt, - max_iteration_number_, - convergence_, - freeze_bound_, - time_limit_, - seeds_begin_, - seeds_end_, - mark_); + max_iterations, + convergence_ratio, + freeze_bound, + time_limit, + seeds.begin(), + seeds.end(), + mark); + } + else + { + return lloyd_optimize_mesh_2_impl(cdt, + max_iterations, + convergence_ratio, + freeze_bound, + time_limit, + choose_parameter(get_parameter(np, internal_np::i_seed_begin_iterator), CGAL::Emptyset_iterator()), + choose_parameter(get_parameter(np, internal_np::i_seed_end_iterator), CGAL::Emptyset_iterator()), + mark); + } +} + +#ifndef DOXYGEN_RUNNING + // Overload handling parameters passed with operator= + template + Mesh_optimization_return_code + lloyd_optimize_mesh_2(CDT& cdt, + const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) + { + return lloyd_optimize_mesh_2(cdt, internal_np::combine_named_parameters(np1, np2, nps...)); } - -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif /** * this partial specialization is a workaround @@ -83,7 +190,7 @@ namespace CGAL template Mesh_optimization_return_code lloyd_optimize_mesh_2_impl(CDT& cdt, - const int max_iterations, + const std::size_t max_iterations, const double convergence_ratio, const double freeze_bound, const double time_limit, @@ -99,7 +206,7 @@ namespace CGAL template Mesh_optimization_return_code lloyd_optimize_mesh_2_impl(CDT& cdt, - const int max_iterations, + const std::size_t max_iterations, const double convergence_ratio, const double freeze_bound, const double time_limit, @@ -124,7 +231,7 @@ namespace CGAL #endif // 1000 iteration max to avoid infinite loop - int nb_iterations = (0 == max_iterations) + std::size_t nb_iterations = (0 == max_iterations) ? 1000 : max_iterations; @@ -139,11 +246,8 @@ namespace CGAL return rc; } +#endif // DOXYGEN_RUNNING } //end namespace CGAL -CGAL_PRAGMA_DIAG_POP - -#include - #endif diff --git a/thirdparty/CGAL/include/CGAL/lloyd_optimize_mesh_3.h b/thirdparty/CGAL/include/CGAL/lloyd_optimize_mesh_3.h index cdb88c95..63fdc273 100644 --- a/thirdparty/CGAL/include/CGAL/lloyd_optimize_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/lloyd_optimize_mesh_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/lloyd_optimize_mesh_3.h $ -// $Id: lloyd_optimize_mesh_3.h 1c3e09f 2022-01-10T15:32:38+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/lloyd_optimize_mesh_3.h $ +// $Id: include/CGAL/lloyd_optimize_mesh_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,9 +19,7 @@ #include -#include - -#include +#include #include #include #include @@ -29,44 +27,136 @@ #include #include -#include namespace CGAL { - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4003) // not enough actual parameters for macro -#endif - -// see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS - -BOOST_PARAMETER_FUNCTION( - (Mesh_optimization_return_code), - lloyd_optimize_mesh_3, - parameters::tag, - (required (in_out(c3t3),*) (domain,*) ) - (optional - (time_limit_, *, 0 ) - (max_iteration_number_, *, 0 ) - (convergence_, *, parameters::default_values_for_mesh_3::lloyd_convergence_ratio ) - (freeze_bound_, *, parameters::default_values_for_mesh_3::lloyd_freeze_ratio ) - (do_freeze_, *, parameters::default_values_for_mesh_3::do_freeze )) -) +/*! + * \ingroup PkgMesh3Functions + * + * The function `lloyd_optimize_mesh_3()` is a mesh optimization process + * based on the minimization of a global energy function. + * + * In `lloyd_optimize_mesh_3()`, the minimized global energy may be interpreted + * as the \f$ L^1\f$-norm of the error achieved + * when the function \f$ x^2\f$ is interpolated on the mesh domain + * using a piecewise linear function which is linear + * in each cell of the Voronoi diagram of the mesh vertices. + * + * The optimizer `lloyd_optimize_mesh_3()` works in iterative steps. + * At each iteration, mesh vertices are moved into + * positions that bring to zero the energy gradient + * and the Delaunay triangulation is updated. + * Vertices on the mesh boundaries are handled + * in a special way so as to preserve an accurate + * representation of the domain boundaries. + * + * \tparam C3T3 a model of the concept `MeshComplex_3InTriangulation_3`. + * \tparam MD a model of the concept `MeshDomain_3`. + * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * @param c3t3 the initial mesh that will be modified by the algorithm to represent the final optimized mesh. + * @param domain the domain used to create the `c3t3` parameter + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{time_limit} + * \cgalParamDescription{to set up, in seconds, a CPU time limit after which the optimization process is stopped. + * This time is measured using `CGAL::Real_timer`. 0 means that there is no time limit.} + * \cgalParamType{`double`} + * \cgalParamPrecondition{`time_limit >= 0`} + * \cgalParamDefault{0} + * \cgalParamNEnd + * \cgalParamNBegin{max_iteration_number} + * \cgalParamDescription{limit on the number of performed iterations. 0 means that there is + * no limit on the number of performed iterations.} + * \cgalParamPrecondition{`max_iteration_number >=0`} + * \cgalParamType{`int`} + * \cgalParamDefault{0} + * \cgalParamNEnd + * \cgalParamNBegin{freeze_bound} + * \cgalParamDescription{designed to reduce running time of each optimization iteration. + * Any vertex that has a displacement less than a given fraction of the length + * of its shortest incident edge, is frozen (i.e.\ is not relocated). + * The parameter `freeze_bound` gives the threshold ratio. + * If it is set to 0, freezing of vertices is disabled.} + * \cgalParamPrecondition{`0<= freeze_bound <=1`} + * \cgalParamType{`double`} + * \cgalParamDefault{0.01} + * \cgalParamNEnd + * \cgalParamNBegin{convergence} + * \cgalParamDescription{threshold ratio of stopping criterion based on convergence: the optimization process is stopped + * when at the last iteration the displacement of any vertex is less than + * a given fraction of the length of the shortest edge incident to that vertex.} + * \cgalParamPrecondition{`0 <=convergence <= 1`} + * \cgalParamType{`double`} + * \cgalParamDefault{0.02} + * \cgalParamNEnd + * \cgalParamNBegin{do_freeze} + * \cgalParamDescription{completes the `freeze_bound` parameter. If it is set to `true` (default value), + * frozen vertices will not move anymore in next iterations. Otherwise, at each iteration, any vertex that + * moves, unfreezes all its incident vertices.} + * \cgalParamType{`bool`} + * \cgalParamDefault{true} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + * \return a value of type `CGAL::Mesh_optimization_return_code` which is: + *
      + *
    • `CGAL::TIME_LIMIT_REACHED` when the time limit is reached. + *
    • `CGAL::MAX_ITERATION_NUMBER_REACHED` when `lloyd_optimize_mesh_3()` stops because it has performed `max_iteration_number` iterations. + *
    • `CGAL::CONVERGENCE_REACHED` when `lloyd_optimize_mesh_3()` stops because the convergence criterion + * is achieved. + *
    • `CGAL::ALL_VERTICES_FROZEN` when all vertices have been frozen, when the + * `do_freeze` parameter is set to true. + *
    • `CGAL::CANT_IMPROVE_ANYMORE` when `lloyd_optimize_mesh_3()` stops because + * most vertices have been frozen, and no better convergence can be reached. + *
    + * + * \cgalHeading{Example} + * + * + * \code{.cpp} + * // Lloyd-smoothing until convergence reaches 0.01, freezing vertices which + * // move less than 0.001*shortest_incident_edge_length + * lloyd_optimize_mesh_3(c3t3, + * domain, + * parameters::convergence(0.01). + * parameters::freeze_bound(0.001). + * parameters::do_freeze(true)); + * + * \endcode + * + * \sa `CGAL::Mesh_optimization_return_code` + * \sa `CGAL::make_mesh_3()` + * \sa `CGAL::refine_mesh_3()` + * \sa `CGAL::exude_mesh_3()` + * \sa `CGAL::perturb_mesh_3()` + * \sa `CGAL::odt_optimize_mesh_3()` + * + * \note This function requires the \ref thirdpartyEigen library. + */ +template +Mesh_optimization_return_code lloyd_optimize_mesh_3(C3T3& c3t3, const MeshDomain& domain,const CGAL_NP_CLASS& np = parameters::default_values()) { - return lloyd_optimize_mesh_3_impl(c3t3, domain, - time_limit_, max_iteration_number_, - convergence_, freeze_bound_ - , do_freeze_); + using parameters::choose_parameter; + using parameters::get_parameter; + std::size_t max_iterations = choose_parameter(get_parameter(np, internal_np::number_of_iterations), 0); + const double convergence_ratio = choose_parameter(get_parameter(np, internal_np::convergence_ratio), parameters::default_values_for_mesh_3::lloyd_convergence_ratio); + const double freeze_bound = choose_parameter(get_parameter(np, internal_np::vertex_freeze_bound), parameters::default_values_for_mesh_3::lloyd_freeze_ratio); + const double time_limit = choose_parameter(get_parameter(np, internal_np::maximum_running_time), parameters::default_values_for_mesh_3::time_limit); + bool do_freeze = choose_parameter(get_parameter(np,internal_np::freeze),true); + return lloyd_optimize_mesh_3_impl(c3t3, domain, time_limit, max_iterations, convergence_ratio, freeze_bound, do_freeze); } -CGAL_PRAGMA_DIAG_POP - -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif +#ifndef DOXYGEN_RUNNING +// Overload handling parameters passed with operator= +template +Mesh_optimization_return_code lloyd_optimize_mesh_3(C3T3& c3t3, const MeshDomain& domain, const CGAL_NP_CLASS_1& np1, const CGAL_NP_CLASS_2& np2, const NP& ... nps) +{ + return lloyd_optimize_mesh_3(c3t3,domain, internal_np::combine_named_parameters(np1, np2, nps...)); +} template Mesh_optimization_return_code @@ -106,10 +196,8 @@ lloyd_optimize_mesh_3_impl(C3T3& c3t3, // Launch optimization return opt(static_cast(max_iteration_number)); } - +#endif //DOXYGEN_RUNNING } // end namespace CGAL -#include - #endif // CGAL_LLOYD_OPTIMIZE_MESH_3_H diff --git a/thirdparty/CGAL/include/CGAL/long_double.h b/thirdparty/CGAL/include/CGAL/long_double.h index 94dbe6e0..18ef1554 100644 --- a/thirdparty/CGAL/include/CGAL/long_double.h +++ b/thirdparty/CGAL/include/CGAL/long_double.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/long_double.h $ -// $Id: long_double.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/long_double.h $ +// $Id: include/CGAL/long_double.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/long_long.h b/thirdparty/CGAL/include/CGAL/long_long.h index 0961a568..7a80d152 100644 --- a/thirdparty/CGAL/include/CGAL/long_long.h +++ b/thirdparty/CGAL/include/CGAL/long_long.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/long_long.h $ -// $Id: long_long.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/long_long.h $ +// $Id: include/CGAL/long_long.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/make_mesh_3.h b/thirdparty/CGAL/include/CGAL/make_mesh_3.h index 122ccf7c..68262224 100644 --- a/thirdparty/CGAL/include/CGAL/make_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/make_mesh_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/make_mesh_3.h $ -// $Id: make_mesh_3.h 3e03d50 2021-05-05T15:32:22+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/make_mesh_3.h $ +// $Id: include/CGAL/make_mesh_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,113 +19,19 @@ #include -#include - #include -#include #include #include #include -#include +#include #include #include -#include #include namespace CGAL { -namespace parameters { - namespace internal { - // Features - struct Features_options - { - Features_options(bool b) : b_(b) {} - bool features() const { return b_; } - private: - bool b_; - }; - - // ----------------------------------- - // Features generator - // ----------------------------------- - // struct Features_option_generator - template - struct Features_options_generator {}; - - template<> - struct Features_options_generator - { - Features_options operator()() { return Features_options(true); } - }; - - template<> - struct Features_options_generator - { - Features_options operator()() { return Features_options(false); } - }; - - // struct Domain_features_generator is designed to handle cases where - // MeshDomain::Has_features is not a valid type - template< typename MeshDomain, bool MeshDomainHasHasFeatures > - struct Domain_features_generator {}; - - template< typename MeshDomain > - struct Domain_features_generator< MeshDomain, false > - { - Features_options operator()() - { - return Features_options_generator()(); - } - }; - - template< typename MeshDomain > - struct Domain_features_generator< MeshDomain, true > - { - Features_options operator()() - { - return Features_options_generator()(); - } - }; - - } // end namespace internal - - // ----------------------------------- - // Features_options - // ----------------------------------- - inline internal::Features_options - features() { return internal::Features_options(true); } - - inline internal::Features_options - no_features() { return internal::Features_options(false); } - - template < typename MeshDomain > - inline internal::Features_options - features(const MeshDomain& /*domain*/) - { - typedef typename internal::Domain_features_generator< - MeshDomain, - CGAL::Mesh_3::internal::has_Has_features::value > Generator; - - return Generator()(); - } - - // ----------------------------------- - // Parameters - // ----------------------------------- - -// see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS - - BOOST_PARAMETER_NAME( features_param ) - -CGAL_PRAGMA_DIAG_POP - -} // end namespace parameters::internal - // ----------------------------------- // Initialize c3t3 stuff // ----------------------------------- @@ -205,7 +111,7 @@ void init_c3t3_with_features(C3T3& c3t3, protect_edges(c3t3, domain, Sizing_field(criteria.edge_criteria_object()), - typename Edge_criteria::FT(), + criteria.edge_criteria_object().min_length_bound(), maximal_number_of_vertices, pointer_to_error_code #ifndef CGAL_NO_ATOMIC @@ -326,6 +232,13 @@ struct C3t3_initializer < C3T3, MD, MC, true, CGAL::Tag_true > if (c3t3.number_of_facets() == 0) { need_more_init = true; } + else + { + helper.update_restricted_cells(); + if(c3t3.number_of_cells() == 0) { + need_more_init = true; + } + } } if(need_more_init) { init_c3t3(c3t3, domain, criteria, @@ -369,65 +282,189 @@ struct C3t3_initializer < C3T3, MD, MC, true, CGAL::Tag_false > // make_mesh_3 stuff // ----------------------------------- -// Manual redirections -// boost::parameter can't handle make_mesh_3 return_type alone... -template -C3T3 make_mesh_3(const MD& md, const MC& mc, const T& ...t) +/*! + * \ingroup PkgMesh3Functions + * + * The function `make_mesh_3()` is a 3D + * mesh generator. It produces simplicial meshes which discretize + * 3D domains. + * + * The mesh generation algorithm is a Delaunay refinement process + * followed by an optimization phase. + * The criteria driving the Delaunay refinement + * process may be tuned to achieve the user needs with respect to + * the size of mesh elements, the accuracy of boundaries approximation, + * etc. + * + * The optimization phase is a sequence of optimization processes, + * amongst the following available optimizers: an ODT-smoothing, + * a Lloyd-smoothing, a sliver perturber, and a sliver exuder. + * Each optimization process + * can be activated or not, + * according to the user requirements + * and available time. + * By default, only the perturber and the exuder are activated. + * Note that the benefits of the exuder will be lost if the mesh + * is further refined afterward, and that ODT-smoothing, Lloyd-smoothing, + * and sliver perturber should never be called after the sliver exuder. + * In the case of further refinement, only the sliver exuder can be used. + * + * The function outputs the mesh to an object which provides iterators to + * traverse the resulting mesh data structure or can be written to a file + * (see \ref Mesh_3_section_examples ). + * + * \tparam C3T3 either a model of the concept `MeshComplex_3InTriangulation_3` or + * of `MeshComplexWithFeatures_3InTriangulation_3` if `MD` + * is a model of `MeshDomainWithFeatures_3`. + * The type `C3T3` is in particular required to provide a nested type + * `C3T3::Triangulation` for the 3D triangulation + * embedding the mesh. The vertex and cell base classes of the + * triangulation `C3T3::Triangulation` are required to be models of the + * concepts `MeshVertexBase_3` and `MeshCellBase_3` respectively. + * + * \tparam MD either a model of the concept `MeshDomain_3` or of + * `MeshDomainWithFeatures_3` if 0 and 1-dimensional features + * of the input complex have to be accurately represented in the mesh. + * + * \tparam MC either a model of the concept `MeshCriteria_3` or a model + * of `MeshCriteriaWithFeatures_3` if the domain has exposed features. + * + * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * \param domain the domain used to create the `c3t3` parameter. It is the sole link through which the domain + * to be discretized is known by the mesh generation algorithm. + * \param criteria specifies the size and shape requirements for mesh tetrahedra + * and surface facets. These criteria form the rules which drive + * the refinement process. All mesh elements satisfy those criteria + * at the end of the refinement process. + * In addition, if the domain has features, the argument + * `criteria` provides a sizing field to guide the discretization + * of 1-dimensional exposed features. + * + * \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamSectionBegin{Feature preservation options} + * \cgalParamDescription{If the domain is a model of `MeshDomainWithFeatures_3`, 0 and 1-dimensional features can be + * taken into account while generating the mesh. The following two named parameters control + * this option: + *
      + *
    • \link parameters::features() `parameters::features(domain)` \endlink + *
    • `parameters::no_features()` + *
    } + * \cgalParamDefault{`parameters::features(domain)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{Topological options (manifoldness)} + * \cgalParamDescription{In order to drive the meshing algorithm and ensure that the output mesh follows a desired topological criterion, + * three named parameters control this option: + *
      + *
    • `parameters::manifold()` + *
    • `parameters::manifold_with_boundary()` + *
    • `parameters::non_manifold()` + *
    + * Note that the meshing algorithm cannot generate a manifold surface if the input surface is not manifold.} + * \cgalParamDefault{`parameters::non_manifold()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{Lloyd optimization} + * \cgalParamDescription{`lloyd_optimize_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::no_lloyd()` + *
    • `parameters::lloyd_optimize_mesh_3()` + *
    } + * \cgalParamDefault{`parameters::no_lloyd()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{ODT optimization} + * \cgalParamDescription{`odt_optimize_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::no_odt()` + *
    • `parameters::odt()` + *
    } + * \cgalParamDefault{`parameters::no_odt()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{Mesh perturbation} + * \cgalParamDescription{`perturb_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::no_perturb()` + *
    • `parameters::perturb()` + *
    } + * \cgalParamDefault{`parameters::perturb()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{Mesh exudation} + * \cgalParamDescription{`exude_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::no_exude()` + *
    • `parameters::exude()` + *
    } + * \cgalParamDefault{`parameters::exude()`} + * \cgalParamSectionEnd + * \cgalNamedParamsEnd + * + * Note that regardless of which optimization processes are activated, + * they are always launched in the order that is a suborder + * of the following (see user manual for further + * details): *ODT-smoother*, *Lloyd-smoother*, *perturber*, and *exuder*. + * + * Beware that optimization of the mesh is obtained + * by perturbing mesh vertices and modifying the mesh connectivity + * and that this has an impact + * on the strict compliance to the refinement criteria. + * Though a strict compliance to mesh criteria + * is guaranteed at the end of the Delaunay refinement, this may no longer be true after + * some optimization processes. Also beware that the default behavior does involve some + * optimization processes. + * + * \sa `refine_mesh_3()` + * \sa `exude_mesh_3()` + * \sa `perturb_mesh_3()` + * \sa `lloyd_optimize_mesh_3()` + * \sa `odt_optimize_mesh_3()` + */ +template +C3T3 make_mesh_3(const MeshDomain& domain, const MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values()) { - C3T3 c3t3; - make_mesh_3_bp(c3t3,md,mc,t...); - return c3t3; + using parameters::choose_parameter; + using parameters::get_parameter; + C3T3 c3t3; + parameters::internal::Exude_options exude_param = choose_parameter(get_parameter(np, internal_np::exude_options_param), parameters::exude().v); + parameters::internal::Perturb_options perturb_param = choose_parameter(get_parameter(np, internal_np::perturb_options_param), parameters::perturb().v); + parameters::internal::Odt_options odt_param = choose_parameter(get_parameter(np, internal_np::odt_options_param), parameters::no_odt().v); + parameters::internal::Lloyd_options lloyd_param = choose_parameter(get_parameter(np, internal_np::lloyd_options_param), parameters::no_lloyd().v); + parameters::internal::Features_options features_param = choose_parameter(get_parameter(np, internal_np::features_options_param), parameters::features(domain).v); + parameters::internal::Mesh_3_options mesh_options_param = choose_parameter(get_parameter(np, internal_np::mesh_param), parameters::internal::Mesh_3_options()); + parameters::internal::Manifold_options manifold_options_param = choose_parameter(get_parameter(np, internal_np::manifold_param), parameters::internal::Manifold_options()); + + make_mesh_3_impl(c3t3, domain, criteria, + exude_param, perturb_param, odt_param, lloyd_param, + features_param.features(), mesh_options_param, + manifold_options_param); + return c3t3; } -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4003) // not enough actual parameters for macro -#endif - -// see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS - -BOOST_PARAMETER_FUNCTION( - (void), - make_mesh_3_bp, - parameters::tag, - (required (in_out(c3t3),*) (domain,*) (criteria,*) ) // nondeduced - (deduced - (optional - (features_param, (parameters::internal::Features_options), parameters::features(domain)) - (exude_param, (parameters::internal::Exude_options), parameters::exude()) - (perturb_param, (parameters::internal::Perturb_options), parameters::perturb()) - (odt_param, (parameters::internal::Odt_options), parameters::no_odt()) - (lloyd_param, (parameters::internal::Lloyd_options), parameters::no_lloyd()) - (mesh_options_param, (parameters::internal::Mesh_3_options), - parameters::internal::Mesh_3_options()) - (manifold_options_param, (parameters::internal::Manifold_options), - parameters::internal::Manifold_options()) - ) - ) -) +#ifndef DOXYGEN_RUNNING +// Overload handling parameters passed with operator= +template +C3T3 make_mesh_3(const MeshDomain& domain, const MeshCriteria& criteria, + const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) { - make_mesh_3_impl(c3t3, domain, criteria, - exude_param, perturb_param, odt_param, lloyd_param, - features_param.features(), mesh_options_param, - manifold_options_param); + return make_mesh_3(domain, criteria, internal_np::combine_named_parameters(np1, np2, nps...)); } -CGAL_PRAGMA_DIAG_POP - -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif - /** * @brief This function meshes the domain defined by mesh_traits * (respecting criteria), and outputs the mesh to c3t3 * * @param domain the domain to be discretized * @param criteria the criteria - * @param exude if it is set to \c true, an exudation step will be done at + * @param exude if it is set to `true`, an exudation step will be done at * the end of the Delaunay refinement process * * @return The mesh as a C3T3 object @@ -455,7 +492,7 @@ void make_mesh_3_impl(C3T3& c3t3, C3T3, MeshDomain, MeshCriteria, - Mesh_3::internal::has_Has_features::value > () (c3t3, + ::CGAL::internal::has_Has_features::value > () (c3t3, domain, criteria, with_features, @@ -466,12 +503,12 @@ void make_mesh_3_impl(C3T3& c3t3, // Build mesher and launch refinement process // Don't reset c3t3 as we just created it refine_mesh_3(c3t3, domain, criteria, - exude, perturb, odt, lloyd, parameters::no_reset_c3t3(), mesh_options, - manifold_options); + parameters::exude_options=exude, parameters::perturb_options=perturb, parameters::odt_options=odt, parameters::lloyd_options= lloyd, + parameters::no_reset_c3t3(), parameters::mesh_options= mesh_options, + parameters::manifold_option= manifold_options); } +#endif //DOXYGEN_RUNNING } // end namespace CGAL -#include - #endif // CGAL_MAKE_MESH_3_H diff --git a/thirdparty/CGAL/include/CGAL/make_periodic_3_mesh_3.h b/thirdparty/CGAL/include/CGAL/make_periodic_3_mesh_3.h index a5034518..8f9b7fca 100644 --- a/thirdparty/CGAL/include/CGAL/make_periodic_3_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/make_periodic_3_mesh_3.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_mesh_3/include/CGAL/make_periodic_3_mesh_3.h $ -// $Id: make_periodic_3_mesh_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_mesh_3/include/CGAL/make_periodic_3_mesh_3.h $ +// $Id: include/CGAL/make_periodic_3_mesh_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Stéphane Tayeb, @@ -26,28 +26,65 @@ #include #include -#include #include #include +#include -#include +#include +#include namespace CGAL { namespace Periodic_3_mesh_3 { namespace internal { -template -void mark_dummy_points(C3T3& c3t3) +template +bool insert_dummy_points(C3T3& c3t3, + const MeshDomain& domain) { - CGAL_precondition(c3t3.triangulation().is_1_cover()); + typedef typename C3T3::Triangulation::Vertex_handle Vertex_handle; - typedef typename C3T3::Triangulation::Vertex_iterator Vertex_iterator; + typename C3T3::Triangulation::Geom_traits::Construct_point_3 cp = + c3t3.triangulation().geom_traits().construct_point_3_object(); - for(Vertex_iterator vit = c3t3.triangulation().vertices_begin(); - vit != c3t3.triangulation().vertices_end(); ++vit) + std::vector dummy_vertices = c3t3.triangulation().insert_generic_dummy_points(); + CGAL_postcondition(c3t3.triangulation().is_1_cover()); + + // Abuse the multi cover function to check if cells have a small-enough orthoradius + c3t3.triangulation().update_cover_data_after_converting_to_27_sheeted_covering(); + if(!c3t3.triangulation().can_be_converted_to_1_sheet()) + { + std::cerr << "Error: dummy points do not create a 1-cover" << std::endl; + CGAL_postcondition(false); + return false; + } + + for(Vertex_handle dvh : dummy_vertices) { - c3t3.set_index(vit, 0); + dvh->info().is_dummy_vertex = true; + + // @fixme + // The real in-dimension of a dummy vertex is impossible to evaluate: it can fall + // on a surface or even a curve, but there is no way to know this because the concept (and models) + // of MeshDomain_3 do not have a `Patch_index Do_intersect()(Point_3)`. + // + // It seems that setting the dimension wrongly, to a too-low dimension does not cause + // problems, whereas on the other way is problematic: if setting it to '3' but the dummy vertex + // is part of the restricted Delaunay, then the refinement will refine until the vertex + // is no longer part of the restricted Delaunay, creating ugly spots in the mesh... + c3t3.set_dimension(dvh, 0); + + // @fixme + // This should be setting patch indices if the dummy vertex is not in dim 3. + // Could maybe do it later, re-assigning indices of dummy vertices once the c3t3 + // has been scanned, but still before refinement starts. + auto opt_si = domain.is_in_domain_object()(cp(c3t3.triangulation().point(dvh))); + if(opt_si.has_value()) + c3t3.set_index(dvh, domain.index_from_subdomain_index(*opt_si)); + else + c3t3.set_index(dvh, 0); } + + return true; } template @@ -62,7 +99,6 @@ void init_c3t3_with_features(C3T3& c3t3, CGAL::Periodic_3_mesh_3::Protect_edges_sizing_field protect_edges(c3t3, domain, Sizing_field(criteria.edge_criteria_object())); protect_edges.set_nonlinear_growth_of_balls(nonlinear); - protect_edges(true); } @@ -87,8 +123,10 @@ struct C3t3_initializer_base const parameters::internal::Mesh_3_options& mesh_options) { c3t3.triangulation().set_domain(domain.bounding_box()); - c3t3.triangulation().insert_dummy_points(); - mark_dummy_points(c3t3); + + // Enforce 1-cover by adding dummy points + if(!insert_dummy_points(c3t3, domain)) + return; // Call the basic initialization from c3t3, which handles features and // adds a bunch of points on the surface @@ -168,56 +206,187 @@ struct C3t3_initializer // make_periodic_3_mesh_3 stuff // ----------------------------------- -// Manual redirections -// boost::parameter can't handle make_periodic_3_mesh_3 return_type alone... -template -C3T3 make_periodic_3_mesh_3(const MD& md, const MC& mc, const T& ...t) +/*! + * \ingroup PkgPeriodic3Mesh3Functions + * + * The function `make_periodic_3_mesh_3()` is a 3D periodic mesh generator. + * It produces simplicial meshes which discretize 3D periodic domains. + * The periodic mesh generation algorithm is a Delaunay refinement process + * followed by an optimization phase. The criteria driving the Delaunay refinement + * process may be tuned to achieve the user needs with respect to + * the size of mesh elements, the accuracy of boundaries approximation, + * etc. + * The optimization phase is a sequence of optimization processes, + * amongst the following available optimizers: an ODT-smoothing, + * a Lloyd smoothing, a sliver perturber, and a sliver exuder. + * Each optimization process can be activated or not, according to the user requirements + * and available time. + * By default, only the perturber and the exuder are activated. + * Note that the benefits of the exuder will be lost if the mesh + * is further refined afterward, and that ODT-smoothing, Lloyd-smoothing, + * and sliver perturber should never be called after the sliver exuder. + * In the case of further refinement, only the sliver exuder can be used. + * The function outputs the mesh to an object which provides iterators to + * traverse the resulting mesh data structure or can be written to a file + * (see \ref Periodic_3_mesh_3_section_examples ). + * + * + * \tparam C3T3 is required to be a model of + * the concept `MeshComplex_3InTriangulation_3`. This is the return type. + * The type `C3T3` is in particular required to provide a nested type + * `C3T3::Triangulation` for the 3D triangulation + * embedding the mesh. The vertex and cell base classes of the + * triangulation `C3T3::Triangulation` are required to be models of the + * concepts `MeshVertexBase_3` and `MeshCellBase_3` + * respectively. + * + * \tparam MD is required to be a model of + * the concept `MeshDomain_3`, or of the refined concept + * `MeshDomainWithFeatures_3` + * if the domain has corners and curves that need to be accurately represented in the mesh. + * The argument `domain` + * is the sole link through which the domain + * to be discretized is known by the mesh generation algorithm. + * + * \tparam MC has to be a model of the concept + * `MeshCriteria_3`, or a model of the refined concept `MeshCriteriaWithFeatures_3` if the domain has exposed features. + * The argument `criteria` of type `MC` specifies the + * size and shape requirements for mesh tetrahedra + * and surface facets. These criteria + * form the rules which drive the refinement process. All mesh elements + * satisfy those criteria at the end of the refinement process. + * In addition, if the domain has features, the argument + * `criteria` provides a sizing field to guide the discretization + * of 1-dimensional exposed features. + * + * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * + * \param domain the domain to be discretized + * \param criteria the criteria + * \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamSectionBegin{Feature preservation options} + * \cgalParamDescription{If the domain is a model of `MeshDomainWithFeatures_3`, 0 and 1-dimensional features can be + * taken into account while generating the mesh. The following two named parameters control + * this option: + *
      + *
    • \link parameters::features() `parameters::features(domain)` \endlink + *
    • `parameters::no_features()` + *
    } + * \cgalParamDefault{`parameters::features(domain)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{Topological options (manifoldness)} + * \cgalParamDescription{In order to drive the meshing algorithm and ensure that the output mesh follows a desired topological criterion, + * three named parameters control this option: + *
      + *
    • `parameters::manifold()` + *
    • `parameters::manifold_with_boundary()` + *
    • `parameters::non_manifold()` + *
    + * Note that the meshing algorithm cannot generate a manifold surface if the input surface is not manifold.} + * \cgalParamDefault{`parameters::non_manifold()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{Lloyd optimization} + * \cgalParamDescription{`lloyd_optimize_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::no_lloyd()` + *
    • `parameters::lloyd_optimize_mesh_3()` + *
    } + * \cgalParamDefault{`parameters::no_lloyd()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{ODT optimization} + * \cgalParamDescription{`odt_optimize_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::no_odt()` + *
    • `parameters::odt()` + *
    } + * \cgalParamDefault{`parameters::no_odt()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{Mesh perturbation} + * \cgalParamDescription{`perturb_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::no_perturb()` + *
    • `parameters::perturb()` + *
    } + * \cgalParamDefault{`parameters::perturb()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{Mesh exudation} + * \cgalParamDescription{`exude_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::exude()` + *
    • `parameters::no_exude()` + *
    } + * \cgalParamDefault{`parameters::exude()`} + * \cgalParamSectionEnd + * \cgalNamedParamsEnd + * + * The optimization parameters can be passed in an arbitrary order. If one parameter + * is not passed, its default value is used. The default values are + * `no_lloyd()`, `no_odt()`, `perturb()` and `exude()`. + * + * Note that regardless of which optimization processes are activated, + * they are always launched in the order that is a suborder + * of the following (see user manual for further + * details): *ODT-smoother*, *Lloyd-smoother*, *perturber*, and *exuder*. + * + * Beware that optimization of the mesh is obtained + * by perturbing mesh vertices and modifying the mesh connectivity + * and that this has an impact + * on the strict compliance to the refinement criteria. + * Though a strict compliance to mesh criteria + * is guaranteed at the end of the Delaunay refinement, this may no longer be true after + * some optimization processes. Also beware that the default behavior does involve some + * optimization processes. + * + * \sa `refine_periodic_3_mesh_3()` + * \sa `make_mesh_3()` + * \sa `exude_mesh_3()` + * \sa `perturb_mesh_3()` + * \sa `lloyd_optimize_mesh_3()` + * \sa `odt_optimize_mesh_3()` + */ +template +C3T3 make_periodic_3_mesh_3(const MeshDomain& domain, const MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values()) { + using parameters::choose_parameter; + using parameters::get_parameter; C3T3 c3t3; - make_periodic_3_mesh_3_bp(c3t3,md,mc,t...); + parameters::internal::Exude_options exude_param = choose_parameter(get_parameter(np, internal_np::exude_options_param), parameters::exude().v); + parameters::internal::Perturb_options perturb_param = choose_parameter(get_parameter(np, internal_np::perturb_options_param), parameters::perturb().v); + parameters::internal::Odt_options odt_param = choose_parameter(get_parameter(np, internal_np::odt_options_param), parameters::no_odt().v); + parameters::internal::Lloyd_options lloyd_param = choose_parameter(get_parameter(np, internal_np::lloyd_options_param), parameters::no_lloyd().v); + parameters::internal::Features_options features_param = choose_parameter(get_parameter(np, internal_np::features_options_param), parameters::features(domain).v); + parameters::internal::Mesh_3_options mesh_options_param = choose_parameter(get_parameter(np, internal_np::mesh_param), parameters::internal::Mesh_3_options()); + parameters::internal::Manifold_options manifold_options_param = choose_parameter(get_parameter(np, internal_np::manifold_param), parameters::internal::Manifold_options()); + + make_periodic_3_mesh_3_impl(c3t3, domain, criteria, + exude_param, perturb_param, odt_param, lloyd_param, + features_param.features(), mesh_options_param, + manifold_options_param); return c3t3; } -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4003) // not enough actual parameters for macro -#endif - -// see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS - -BOOST_PARAMETER_FUNCTION( - (void), - make_periodic_3_mesh_3_bp, - parameters::tag, - (required (in_out(c3t3),*) (domain,*) (criteria,*) ) // nondeduced - (deduced - (optional - (features_param, (parameters::internal::Features_options), parameters::features(domain)) - (exude_param, (parameters::internal::Exude_options), parameters::exude()) - (perturb_param, (parameters::internal::Perturb_options), parameters::perturb()) - (odt_param, (parameters::internal::Odt_options), parameters::no_odt()) - (lloyd_param, (parameters::internal::Lloyd_options), parameters::no_lloyd()) - (mesh_options_param, (parameters::internal::Mesh_3_options), - parameters::internal::Mesh_3_options()) - (manifold_options_param, (parameters::internal::Manifold_options), - parameters::internal::Manifold_options()) - ) - ) - ) + +#ifndef DOXYGEN_RUNNING +// Overload handling parameters passed with operator= +template +C3T3 make_periodic_3_mesh_3(const MeshDomain& domain, const MeshCriteria& criteria, + const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) { - make_periodic_3_mesh_3_impl(c3t3, domain, criteria, - exude_param, perturb_param, odt_param, lloyd_param, - features_param.features(), mesh_options_param, - manifold_options_param); + return make_periodic_3_mesh_3(domain, criteria, internal_np::combine_named_parameters(np1, np2, nps...)); } -CGAL_PRAGMA_DIAG_POP -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif /** * @brief This function meshes the domain defined by mesh_traits @@ -225,7 +394,7 @@ CGAL_PRAGMA_DIAG_POP * * @param domain the domain to be discretized * @param criteria the criteria - * @param exude if it is set to \c true, an exudation step will be done at + * @param exude if it is set to `true`, an exudation step will be done at * the end of the Delaunay refinement process * * @return The mesh as a C3T3 object @@ -247,19 +416,19 @@ void make_periodic_3_mesh_3_impl(C3T3& c3t3, // Initialize c3t3 Periodic_3_mesh_3::internal::C3t3_initializer< C3T3, MeshDomain, MeshCriteria, - Mesh_3::internal::has_Has_features::value>()(c3t3, - domain, - criteria, - with_features, - mesh_options); + internal::has_Has_features::value>()(c3t3, + domain, + criteria, + with_features, + mesh_options); // Build mesher and launch refinement process refine_periodic_3_mesh_3(c3t3, domain, criteria, - exude, perturb, odt, lloyd, - parameters::no_reset_c3t3(), // do not reset c3t3 as we just created it - mesh_options, manifold_options); + parameters::exude_options = exude, parameters::perturb_options = perturb, parameters::odt_options = odt, + parameters::lloyd_options = lloyd, parameters::no_reset_c3t3(), // do not reset c3t3 as we just created it + parameters::mesh_options = mesh_options, parameters::manifold_option = manifold_options); } - +#endif //DOXYGEN_RUNNING } // end namespace CGAL #endif // CGAL_PERIODIC_3_MESH_3_MAKE_PERIODIC_3_MESH_3_H diff --git a/thirdparty/CGAL/include/CGAL/make_piecewise_smooth_surface_mesh.h b/thirdparty/CGAL/include/CGAL/make_piecewise_smooth_surface_mesh.h index 1f7c4c4d..fa14dc84 100644 --- a/thirdparty/CGAL/include/CGAL/make_piecewise_smooth_surface_mesh.h +++ b/thirdparty/CGAL/include/CGAL/make_piecewise_smooth_surface_mesh.h @@ -3,10 +3,17 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/make_piecewise_smooth_surface_mesh.h $ -// $Id: make_piecewise_smooth_surface_mesh.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/make_piecewise_smooth_surface_mesh.h $ +// $Id: include/CGAL/make_piecewise_smooth_surface_mesh.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau +#ifndef CGAL_MAKE_PIECEWISE_SMOOTH_SURFACE_MESH_H +#define CGAL_MAKE_PIECEWISE_SMOOTH_SURFACE_MESH_H + +#include + #include + +#endif //CGAL_MAKE_PIECEWISE_SMOOTH_SURFACE_MESH_H diff --git a/thirdparty/CGAL/include/CGAL/make_skin_surface_mesh_3.h b/thirdparty/CGAL/include/CGAL/make_skin_surface_mesh_3.h index 6ecb1bbd..08455ee8 100644 --- a/thirdparty/CGAL/include/CGAL/make_skin_surface_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/make_skin_surface_mesh_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/make_skin_surface_mesh_3.h $ -// $Id: make_skin_surface_mesh_3.h 2d37774 2021-04-26T11:30:25+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/make_skin_surface_mesh_3.h $ +// $Id: include/CGAL/make_skin_surface_mesh_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/make_surface_mesh.h b/thirdparty/CGAL/include/CGAL/make_surface_mesh.h index e8689b0a..2a7ebaf1 100644 --- a/thirdparty/CGAL/include/CGAL/make_surface_mesh.h +++ b/thirdparty/CGAL/include/CGAL/make_surface_mesh.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/make_surface_mesh.h $ -// $Id: make_surface_mesh.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/make_surface_mesh.h $ +// $Id: include/CGAL/make_surface_mesh.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau diff --git a/thirdparty/CGAL/include/CGAL/make_union_of_balls_3.h b/thirdparty/CGAL/include/CGAL/make_union_of_balls_3.h index 6ffdd523..5437ce70 100644 --- a/thirdparty/CGAL/include/CGAL/make_union_of_balls_3.h +++ b/thirdparty/CGAL/include/CGAL/make_union_of_balls_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/make_union_of_balls_3.h $ -// $Id: make_union_of_balls_3.h 152a084 2021-09-21T13:34:58+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/make_union_of_balls_3.h $ +// $Id: include/CGAL/make_union_of_balls_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/marching_tetrahedra_3.h b/thirdparty/CGAL/include/CGAL/marching_tetrahedra_3.h index 3bf8d4d8..cd41aaf5 100644 --- a/thirdparty/CGAL/include/CGAL/marching_tetrahedra_3.h +++ b/thirdparty/CGAL/include/CGAL/marching_tetrahedra_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/marching_tetrahedra_3.h $ -// $Id: marching_tetrahedra_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/marching_tetrahedra_3.h $ +// $Id: include/CGAL/marching_tetrahedra_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/mark_domain_in_triangulation.h b/thirdparty/CGAL/include/CGAL/mark_domain_in_triangulation.h new file mode 100644 index 00000000..fa0eb2ae --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/mark_domain_in_triangulation.h @@ -0,0 +1,115 @@ +// Copyright(c) 2022 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Triangulation_2/include/CGAL/mark_domain_in_triangulation.h $ +// $Id: include/CGAL/mark_domain_in_triangulation.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Andreas Fabri + +#ifndef CGAL_MARK_DOMAIN_IN_TRIANGULATION_H +#define CGAL_MARK_DOMAIN_IN_TRIANGULATION_H + +#include + +#include +#include +#include + +#include + +#include +#include + +namespace CGAL { + +namespace internal { + +template +void +mark_domain_in_triangulation(CT& ct, + Unique_hash_map& nesting_level, + typename CT::Face_handle start, + int index, + std::list& border, + InDomainPmap ipm) +{ + typedef typename CT::Face_handle Face_handle; + typedef typename CT::Edge Edge; + + CGAL_precondition(ct.dimension() == 2); + + if(nesting_level[start] != -1){ + return; + } + std::list queue; + queue.push_back(start); + + while(! queue.empty()){ + Face_handle fh = queue.front(); + queue.pop_front(); + if(nesting_level[fh] == -1){ + nesting_level[fh] = index; + if(index %2 == 1){ + put(ipm, fh, true); + } + for(int i = 0; i < 3; i++){ + Edge e(fh,i); + Face_handle n = fh->neighbor(i); + if(nesting_level[n] == -1){ + if(ct.is_constrained(e)) border.push_back(e); + else queue.push_back(n); + } + } + } + } +} + +} // namespace internal + + +//explore set of facets connected with non constrained edges, +//and attribute to each such set a nesting level. +//We start from facets incident to the infinite vertex, with a nesting +//level of 0. Then we recursively consider the non-explored facets incident +//to constrained edges bounding the former set and increase the nesting level by 1. +//Facets in the domain are those with an odd nesting level. +template +void +mark_domain_in_triangulation(CT& cdt, InDomainPmap ipm) +{ + typedef typename CT::Face_handle Face_handle; + typedef typename CT::Edge Edge; + + Unique_hash_map nesting_level(-1, cdt.number_of_faces()); + + for(Face_handle f : cdt.all_face_handles()){ + put(ipm, f, false); + } + + std::list border; + internal::mark_domain_in_triangulation(cdt, nesting_level, cdt.infinite_face(), 0, border, ipm); + while(! border.empty()){ + Edge e = border.front(); + border.pop_front(); + Face_handle n = e.first->neighbor(e.second); + if(nesting_level[n] == -1){ + internal::mark_domain_in_triangulation(cdt, nesting_level, n, nesting_level[e.first]+1, border, ipm); + } + } +} + + +template +void +mark_domain_in_triangulation(CT& cdt) +{ + internal::In_domain in_domain; + mark_domain_in_triangulation(cdt, in_domain); +} + +} // namespace CGAL + +#endif // CGAL_MARK_DOMAIN_IN_TRIANGULATION_H diff --git a/thirdparty/CGAL/include/CGAL/memory.h b/thirdparty/CGAL/include/CGAL/memory.h index 2c92db58..84afc7f0 100644 --- a/thirdparty/CGAL/include/CGAL/memory.h +++ b/thirdparty/CGAL/include/CGAL/memory.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/memory.h $ -// $Id: memory.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/memory.h $ +// $Id: include/CGAL/memory.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/mesh_segmentation.h b/thirdparty/CGAL/include/CGAL/mesh_segmentation.h index 1ddf82f5..a749ba66 100644 --- a/thirdparty/CGAL/include/CGAL/mesh_segmentation.h +++ b/thirdparty/CGAL/include/CGAL/mesh_segmentation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_segmentation/include/CGAL/mesh_segmentation.h $ -// $Id: mesh_segmentation.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_segmentation/include/CGAL/mesh_segmentation.h $ +// $Id: include/CGAL/mesh_segmentation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ilker O. Yaz diff --git a/thirdparty/CGAL/include/CGAL/mesh_skin_surface_3.h b/thirdparty/CGAL/include/CGAL/mesh_skin_surface_3.h index 18565330..4d9ced45 100644 --- a/thirdparty/CGAL/include/CGAL/mesh_skin_surface_3.h +++ b/thirdparty/CGAL/include/CGAL/mesh_skin_surface_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/mesh_skin_surface_3.h $ -// $Id: mesh_skin_surface_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/mesh_skin_surface_3.h $ +// $Id: include/CGAL/mesh_skin_surface_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/mesh_union_of_balls_3.h b/thirdparty/CGAL/include/CGAL/mesh_union_of_balls_3.h index da506559..12daf583 100644 --- a/thirdparty/CGAL/include/CGAL/mesh_union_of_balls_3.h +++ b/thirdparty/CGAL/include/CGAL/mesh_union_of_balls_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/mesh_union_of_balls_3.h $ -// $Id: mesh_union_of_balls_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/mesh_union_of_balls_3.h $ +// $Id: include/CGAL/mesh_union_of_balls_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/min_max_n.h b/thirdparty/CGAL/include/CGAL/min_max_n.h index 62d2fe6c..9a1339f3 100644 --- a/thirdparty/CGAL/include/CGAL/min_max_n.h +++ b/thirdparty/CGAL/include/CGAL/min_max_n.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/min_max_n.h $ -// $Id: min_max_n.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/min_max_n.h $ +// $Id: include/CGAL/min_max_n.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/min_quadrilateral_2.h b/thirdparty/CGAL/include/CGAL/min_quadrilateral_2.h index 62a6f65e..70931563 100644 --- a/thirdparty/CGAL/include/CGAL/min_quadrilateral_2.h +++ b/thirdparty/CGAL/include/CGAL/min_quadrilateral_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/min_quadrilateral_2.h $ -// $Id: min_quadrilateral_2.h d678d0f 2021-02-02T11:12:16+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/min_quadrilateral_2.h $ +// $Id: include/CGAL/min_quadrilateral_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ #include -#include +#include #include #include @@ -346,8 +346,8 @@ min_rectangle_2( { typedef Optimisation::Min_quadrilateral_traits_wrapper Traits; Traits t(bt); - CGAL_optimisation_expensive_precondition(is_convex_2(f, l, t)); - CGAL_optimisation_expensive_precondition( + CGAL_expensive_precondition(is_convex_2(f, l, t)); + CGAL_expensive_precondition( orientation_2(f, l, t) == COUNTERCLOCKWISE); // check for trivial cases @@ -395,7 +395,7 @@ min_rectangle_2( int yet_to_finish = 0; for (int i1 = 0; i1 < 4; ++i1) { - CGAL_optimisation_assertion(limit[i1] != l); + CGAL_assertion(limit[i1] != l); if (curr[i1] != limit[i1]) ++yet_to_finish; } @@ -448,7 +448,7 @@ min_parallelogram_2(ForwardIterator f, { typedef Optimisation::Min_quadrilateral_traits_wrapper Traits; Traits t(bt); - CGAL_optimisation_expensive_precondition(is_convex_2(f, l, t)); + CGAL_expensive_precondition(is_convex_2(f, l, t)); // types from the traits class typedef typename Traits::Direction_2 Direction_2; @@ -630,7 +630,7 @@ min_strip_2(ForwardIterator f, { typedef Optimisation::Min_quadrilateral_traits_wrapper Traits; Traits t(bt); - CGAL_optimisation_expensive_precondition(is_convex_2(f, l, t)); + CGAL_expensive_precondition(is_convex_2(f, l, t)); // types from the traits class typedef typename Traits::Direction_2 Direction_2; diff --git a/thirdparty/CGAL/include/CGAL/minimum_enclosing_quadrilateral_2.h b/thirdparty/CGAL/include/CGAL/minimum_enclosing_quadrilateral_2.h index 78664ec4..3aa2062f 100644 --- a/thirdparty/CGAL/include/CGAL/minimum_enclosing_quadrilateral_2.h +++ b/thirdparty/CGAL/include/CGAL/minimum_enclosing_quadrilateral_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/minimum_enclosing_quadrilateral_2.h $ -// $Id: minimum_enclosing_quadrilateral_2.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/minimum_enclosing_quadrilateral_2.h $ +// $Id: include/CGAL/minimum_enclosing_quadrilateral_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/minkowski_sum_2.h b/thirdparty/CGAL/include/CGAL/minkowski_sum_2.h index 5cc7269e..5001fc9c 100644 --- a/thirdparty/CGAL/include/CGAL/minkowski_sum_2.h +++ b/thirdparty/CGAL/include/CGAL/minkowski_sum_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/minkowski_sum_2.h $ -// $Id: minkowski_sum_2.h 4e48b0b 2021-11-03T15:10:16+02:00 Efi Fogel +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/minkowski_sum_2.h $ +// $Id: include/CGAL/minkowski_sum_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/minkowski_sum_3.h b/thirdparty/CGAL/include/CGAL/minkowski_sum_3.h index 792fe51f..a3e931f9 100644 --- a/thirdparty/CGAL/include/CGAL/minkowski_sum_3.h +++ b/thirdparty/CGAL/include/CGAL/minkowski_sum_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_3/include/CGAL/minkowski_sum_3.h $ -// $Id: minkowski_sum_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_3/include/CGAL/minkowski_sum_3.h $ +// $Id: include/CGAL/minkowski_sum_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -28,7 +28,7 @@ namespace CGAL { The function `minkowski_sum_3()` computes the Minkowski sum of two given 3D Nef polyhedra \f$ N0\f$ and \f$ N1\f$. Note that the function runs in -\f$ O(n^3m^3)\f$ time in the worst case, where \f$ n\f$ and +\cgalBigO{n^3m^3} time in the worst case, where \f$ n\f$ and \f$ m\f$ are the complexities of the two input polyhedra (the complexity of a `Nef_polyhedron_3` is the sum of its `Vertices`, `Halfedges` and `SHalfedges`). diff --git a/thirdparty/CGAL/include/CGAL/monotone_matrix_search.h b/thirdparty/CGAL/include/CGAL/monotone_matrix_search.h index 0b74e9c5..588ffff1 100644 --- a/thirdparty/CGAL/include/CGAL/monotone_matrix_search.h +++ b/thirdparty/CGAL/include/CGAL/monotone_matrix_search.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Matrix_search/include/CGAL/monotone_matrix_search.h $ -// $Id: monotone_matrix_search.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Matrix_search/include/CGAL/monotone_matrix_search.h $ +// $Id: include/CGAL/monotone_matrix_search.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -16,7 +16,7 @@ #include -#include +#include #include #include @@ -57,9 +57,9 @@ monotone_matrix_search( // ------ // get even rows of M: Matrix* M_new = M.extract_all_even_rows(); - CGAL_optimisation_assertion( + CGAL_assertion( M_new->number_of_columns() == M.number_of_columns()); - CGAL_optimisation_assertion( + CGAL_assertion( M_new->number_of_rows() == 0 || M_new->number_of_rows() == ( M.number_of_rows() + 1) >> 1); @@ -75,7 +75,7 @@ monotone_matrix_search( reduction_table[M_new->number_of_rows()] = M.number_of_columns() - 1; _reduce_matrix( *M_new, reduction_table, compare_strictly); - CGAL_optimisation_assertion( + CGAL_assertion( M_new->number_of_columns() == M_new->number_of_rows()); } // if ( M_new->number_of_rows() < M_new->number_of_columns()) @@ -92,7 +92,7 @@ monotone_matrix_search( // recursion: - CGAL_optimisation_assertion( + CGAL_assertion( M_new->number_of_rows() >= M_new->number_of_columns()); // table to store the rmax values of M_new: @@ -160,7 +160,7 @@ _reduce_matrix( // and returns for each column of the resulting // matrix its column index in the original matrix { - CGAL_optimisation_precondition( + CGAL_precondition( M.number_of_columns() >= M.number_of_rows()); // active columns are 0, ..., j1, j2, ..., M.x_dim()-1 int j1( 0), j2( 1); @@ -191,7 +191,7 @@ _reduce_matrix( // have been deleted, now move columns // j2 .. M.number_of_columns()-1 to the first part while ( j1 < M.number_of_rows() - 1) { - CGAL_optimisation_assertion( j2 < M.number_of_columns()); + CGAL_assertion( j2 < M.number_of_columns()); M.replace_column( ++j1, j2); *(t+j1) = j2++; } diff --git a/thirdparty/CGAL/include/CGAL/more_functions_on_signs.h b/thirdparty/CGAL/include/CGAL/more_functions_on_signs.h index 8eb97081..e837ac76 100644 --- a/thirdparty/CGAL/include/CGAL/more_functions_on_signs.h +++ b/thirdparty/CGAL/include/CGAL/more_functions_on_signs.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Apollonius_graph_2/include/CGAL/more_functions_on_signs.h $ -// $Id: more_functions_on_signs.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Apollonius_graph_2/include/CGAL/more_functions_on_signs.h $ +// $Id: include/CGAL/more_functions_on_signs.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/mpfi_coercion_traits.h b/thirdparty/CGAL/include/CGAL/mpfi_coercion_traits.h index e65b19b5..14d07efe 100644 --- a/thirdparty/CGAL/include/CGAL/mpfi_coercion_traits.h +++ b/thirdparty/CGAL/include/CGAL/mpfi_coercion_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/mpfi_coercion_traits.h $ -// $Id: mpfi_coercion_traits.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/mpfi_coercion_traits.h $ +// $Id: include/CGAL/mpfi_coercion_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/mpfr_coercion_traits.h b/thirdparty/CGAL/include/CGAL/mpfr_coercion_traits.h index 66c353cc..4caa6f02 100644 --- a/thirdparty/CGAL/include/CGAL/mpfr_coercion_traits.h +++ b/thirdparty/CGAL/include/CGAL/mpfr_coercion_traits.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/mpfr_coercion_traits.h $ -// $Id: mpfr_coercion_traits.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/mpfr_coercion_traits.h $ +// $Id: include/CGAL/mpfr_coercion_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author: Luis Peñaranda diff --git a/thirdparty/CGAL/include/CGAL/mpq_class.h b/thirdparty/CGAL/include/CGAL/mpq_class.h index 7c700b4c..a8264df3 100644 --- a/thirdparty/CGAL/include/CGAL/mpq_class.h +++ b/thirdparty/CGAL/include/CGAL/mpq_class.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/mpq_class.h $ -// $Id: mpq_class.h fa6818b 2021-04-06T19:43:42+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/mpq_class.h $ +// $Id: include/CGAL/mpq_class.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -35,8 +35,8 @@ // while ::__gmp_expr is the others "expressions". #define CGAL_CHECK_GMP_EXPR_MPQ_CLASS \ - CGAL_static_assertion( \ - (::boost::is_same< ::__gmp_expr< T , T >,Type>::value )); + static_assert( \ + (::std::is_same< ::__gmp_expr< T , T >,Type>::value )); namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/mpz_class.h b/thirdparty/CGAL/include/CGAL/mpz_class.h index a65bf71a..89c09f6a 100644 --- a/thirdparty/CGAL/include/CGAL/mpz_class.h +++ b/thirdparty/CGAL/include/CGAL/mpz_class.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/mpz_class.h $ -// $Id: mpz_class.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/mpz_class.h $ +// $Id: include/CGAL/mpz_class.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -32,13 +32,14 @@ #include #include #include -#include #include #include +#include + #define CGAL_CHECK_GMP_EXPR \ - CGAL_static_assertion( \ - (::boost::is_same< ::__gmp_expr< T , T >,Type>::value )); + static_assert( \ + (::std::is_same< ::__gmp_expr< T , T >,Type>::value )); namespace CGAL { diff --git a/thirdparty/CGAL/include/CGAL/mst_orient_normals.h b/thirdparty/CGAL/include/CGAL/mst_orient_normals.h index 1be72671..8bcb55b5 100644 --- a/thirdparty/CGAL/include/CGAL/mst_orient_normals.h +++ b/thirdparty/CGAL/include/CGAL/mst_orient_normals.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/mst_orient_normals.h $ -// $Id: mst_orient_normals.h bccf399 2022-11-08T10:51:46+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/mst_orient_normals.h $ +// $Id: include/CGAL/mst_orient_normals.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret and Andreas Fabri @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include @@ -39,11 +39,7 @@ #include #include -#include // work around a - // bug in boost - // 1.54 - - +#include #include #if defined(BOOST_MSVC) @@ -156,7 +152,7 @@ class Default_constrained_map /// Helper class: Propagate_normal_orientation /// /// This class is used internally by mst_orient_normals() -/// to propage the normal orientation, starting from a source point +/// to propagate the normal orientation, starting from a source point /// and following the adjacency relations of vertices in a Minimum Spanning Tree. /// It does not orient normals that are already oriented. /// It does not propagate the orientation if the angle between 2 normals > angle_max. @@ -184,7 +180,7 @@ struct Propagate_normal_orientation : m_source(source), m_angle_max(angle_max) { // Precondition: 0 < angle_max <= PI/2 - CGAL_point_set_processing_precondition(0 < angle_max && angle_max <= CGAL_PI/2.); + CGAL_precondition(0 < angle_max && angle_max <= CGAL_PI/2.); } template @@ -265,7 +261,7 @@ mst_find_source( typedef typename boost::property_traits::reference Vector_ref; // Precondition: at least one element in the container - CGAL_point_set_processing_precondition(first != beyond); + CGAL_precondition(first != beyond); // Find top point ForwardIterator top_point = first; @@ -337,7 +333,7 @@ create_riemannian_graph( typedef typename boost::property_map::type Riemannian_graph_weight_map; // Precondition: at least 2 nearest neighbors - CGAL_point_set_processing_precondition(k >= 2); + CGAL_precondition(k >= 2); // Number of input points const std::size_t num_input_points = points.size(); @@ -363,7 +359,7 @@ create_riemannian_graph( for (ForwardIterator it = points.begin(); it != points.end(); it++) { typename Riemannian_graph::vertex_descriptor v = add_vertex(riemannian_graph); - CGAL_point_set_processing_assertion(v == get(index_map,it)); + CGAL_assertion(v == get(index_map,it)); riemannian_graph[v].input_point = it; } @@ -395,7 +391,7 @@ create_riemannian_graph( boost::tie(e, inserted) = add_edge(vertex(it_index, riemannian_graph), vertex(neighbor_index, riemannian_graph), riemannian_graph); - CGAL_point_set_processing_assertion(inserted); + CGAL_assertion(inserted); // -> -> // Computes edge weight = 1 - | normal1 * normal2 | @@ -417,7 +413,7 @@ create_riemannian_graph( boost::tie(e, inserted) = add_edge(vertex(it_index, riemannian_graph), vertex(source_point_index, riemannian_graph), riemannian_graph); - CGAL_point_set_processing_assertion(inserted); + CGAL_assertion(inserted); riemannian_graph_weight_map[e] = 0.; } @@ -475,7 +471,7 @@ create_mst_graph( typedef internal::MST_graph MST_graph; // Precondition: at least one element in the container. - CGAL_point_set_processing_precondition(first != beyond); + CGAL_precondition(first != beyond); // Number of input points const std::size_t num_input_points = num_vertices(riemannian_graph) - 1; @@ -511,13 +507,13 @@ create_mst_graph( // 1.56 and 1.57: // https://svn.boost.org/trac/boost/ticket/10382 typename MST_graph::vertex_descriptor v = add_vertex(mst_graph); - CGAL_point_set_processing_assertion(v == get(index_map,it)); + CGAL_assertion(v == get(index_map,it)); mst_graph[v].input_point = it; mst_graph[v].is_oriented = false; } typename MST_graph::vertex_descriptor v = add_vertex(mst_graph); - CGAL_point_set_processing_assertion(v == source_point_index); + CGAL_assertion(v == source_point_index); mst_graph[v].is_oriented = true; // add edges @@ -526,7 +522,7 @@ create_mst_graph( if (i != predecessor[i]) { // check that bi-directed graph is useless - CGAL_point_set_processing_assertion(predecessor[predecessor[i]] != i); + CGAL_assertion(predecessor[predecessor[i]] != i); add_edge(vertex(predecessor[i], mst_graph), vertex(i, mst_graph), @@ -548,14 +544,11 @@ create_mst_graph( \ingroup PkgPointSetProcessing3Algorithms Orients the normals of the range of `points` using the propagation of a seed orientation through a minimum spanning tree of the Riemannian graph. - This method modifies the order of input points so as to pack all sucessfully oriented points first, + This method modifies the order of input points so as to pack all successfully oriented points first, and returns an iterator over the first point with an unoriented normal (see erase-remove idiom). For this reason it should not be called on sorted containers. It is based on \cgalCite{cgal:hddms-srup-92}. - \warning This function may fail when Boost version 1.54 is used, - because of the following bug: https://svn.boost.org/trac/boost/ticket/9012 - \pre Normals must be unit vectors \pre `k >= 2` @@ -655,10 +648,10 @@ mst_orient_normals( typedef MST_graph MST_graph; // Precondition: at least one element in the container. - CGAL_point_set_processing_precondition(points.begin() != points.end()); + CGAL_precondition(points.begin() != points.end()); // Precondition: at least 2 nearest neighbors - CGAL_point_set_processing_precondition(k >= 2); + CGAL_precondition(k >= 2); std::size_t memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE_STREAM << (memory >> 20) << " Mb allocated\n"; diff --git a/thirdparty/CGAL/include/CGAL/mutex.h b/thirdparty/CGAL/include/CGAL/mutex.h index b872eba5..5b388bfa 100644 --- a/thirdparty/CGAL/include/CGAL/mutex.h +++ b/thirdparty/CGAL/include/CGAL/mutex.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/mutex.h $ -// $Id: mutex.h 6481cb2 2021-08-13T16:44:53+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/mutex.h $ +// $Id: include/CGAL/mutex.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial #ifndef CGAL_MUTEX_H diff --git a/thirdparty/CGAL/include/CGAL/natural_neighbor_coordinates_2.h b/thirdparty/CGAL/include/CGAL/natural_neighbor_coordinates_2.h index 10c51311..c2d2246f 100644 --- a/thirdparty/CGAL/include/CGAL/natural_neighbor_coordinates_2.h +++ b/thirdparty/CGAL/include/CGAL/natural_neighbor_coordinates_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interpolation/include/CGAL/natural_neighbor_coordinates_2.h $ -// $Id: natural_neighbor_coordinates_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interpolation/include/CGAL/natural_neighbor_coordinates_2.h $ +// $Id: include/CGAL/natural_neighbor_coordinates_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Frank Da, Julia Floetotto @@ -17,14 +17,12 @@ #include #include -#include +#include #include #include #include #include -#include - #include #include #include @@ -255,9 +253,9 @@ natural_neighbor_coordinates_2(const Dt& dt, OutputIterator out, OutputFunctor fct, typename Dt::Face_handle start = CGAL_TYPENAME_DEFAULT_ARG Dt::Face_handle(), - typename boost::disable_if_c< - is_iterator::value - >::type* = 0) + std::enable_if_t< + !is_iterator::value + >* = 0) { CGAL_precondition(dt.dimension() == 2); diff --git a/thirdparty/CGAL/include/CGAL/natural_neighbor_coordinates_3.h b/thirdparty/CGAL/include/CGAL/natural_neighbor_coordinates_3.h index 0cef94e8..017e4079 100644 --- a/thirdparty/CGAL/include/CGAL/natural_neighbor_coordinates_3.h +++ b/thirdparty/CGAL/include/CGAL/natural_neighbor_coordinates_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interpolation/include/CGAL/natural_neighbor_coordinates_3.h $ -// $Id: natural_neighbor_coordinates_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interpolation/include/CGAL/natural_neighbor_coordinates_3.h $ +// $Id: include/CGAL/natural_neighbor_coordinates_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include @@ -48,7 +48,7 @@ construct_circumcenter(const typename DT::Facet& f, const typename DT::Geom_traits::Point_3& Q, const typename DT::Geom_traits& gt = typename DT::Geom_traits()); -// ====================== Natural Neighbors Querries ========================== +// ====================== Natural Neighbors Queries ========================== // === Definitions // Given a 3D point Q and a 3D Delaunay triangulation dt, @@ -79,7 +79,7 @@ laplace_natural_neighbor_coordinates_3(const Dt& dt, typedef typename Dt::Locate_type Locate_type; typedef typename Gt::FT Coord_type; - CGAL_triangulation_precondition (dt.dimension() == 3); + CGAL_precondition (dt.dimension() == 3); Locate_type lt; int li, lj; @@ -119,9 +119,9 @@ laplace_natural_neighbor_coordinates_3(const Dt& dt, if (dt.is_infinite(cc1)) return make_triple(nn_out, norm_coeff=Coord_type(1), false);//point outside the convex-hull - CGAL_triangulation_assertion_code(Cell_handle cc2 = cc1->neighbor(f1.second);) - CGAL_triangulation_assertion(std::find(cells.begin(),cells.end(),cc1) != cells.end());//TODO : Delete - CGAL_triangulation_assertion(std::find(cells.begin(),cells.end(),cc2) == cells.end());//TODO : Delete + CGAL_assertion_code(Cell_handle cc2 = cc1->neighbor(f1.second);) + CGAL_assertion(std::find(cells.begin(),cells.end(),cc1) != cells.end());//TODO : Delete + CGAL_assertion(std::find(cells.begin(),cells.end(),cc2) == cells.end());//TODO : Delete Point C_1 = construct_circumcenter
    (f1, Q, dt.geom_traits()); for(int j=1; j<4; j++) @@ -137,7 +137,7 @@ laplace_natural_neighbor_coordinates_3(const Dt& dt, Cell_handle next = cc3->neighbor(num_next); while (std::find(cells.begin(),cells.end(),next) != cells.end()) { - CGAL_triangulation_assertion( next != cc1 ); + CGAL_assertion( next != cc1 ); cc3 = next; num_next = dt.next_around_edge(cc3->index(vR),cc3->index(vP)); next = cc3->neighbor(num_next); @@ -181,7 +181,7 @@ sibson_natural_neighbor_coordinates_3(const Dt& dt, typedef typename Dt::Locate_type Locate_type; typedef typename Gt::FT Coord_type; - CGAL_triangulation_precondition (dt.dimension()== 3); + CGAL_precondition (dt.dimension()== 3); Locate_type lt; int li, lj; @@ -215,7 +215,7 @@ sibson_natural_neighbor_coordinates_3(const Dt& dt, { // for each cell cc1 in conflict Cell_handle cc1 = *cit; - CGAL_triangulation_assertion(std::find(cells.begin(),cells.end(),cc1)!=cells.end());//TODO : Delete + CGAL_assertion(std::find(cells.begin(),cells.end(),cc1)!=cells.end());//TODO : Delete if (dt.is_infinite(cc1)) return make_triple(nn_out,norm_coeff=Coord_type(1), false);//point outside the convex-hull @@ -245,7 +245,7 @@ sibson_natural_neighbor_coordinates_3(const Dt& dt, while (std::find(cells.begin(),cells.end(),next) != cells.end()) { //next is in conflict - CGAL_triangulation_assertion( next != cc1 ); + CGAL_assertion( next != cc1 ); cc3 = next; num_next = dt.next_around_edge(cc3->index(vR),cc3->index(vP)); next = cc3->neighbor(num_next); @@ -269,7 +269,7 @@ sibson_natural_neighbor_coordinates_3(const Dt& dt, } else // cc2 in the conflict cavity { - CGAL_triangulation_assertion(std::find(cells.begin(),cells.end(),cc2)!=cells.end());//TODO : Delete + CGAL_assertion(std::find(cells.begin(),cells.end(),cc2)!=cells.end());//TODO : Delete if (dt.is_infinite(cc2)) { //point outside the convex-hull @@ -352,13 +352,13 @@ construct_circumcenter(const typename DT::Facet& f, const typename DT::Geom_traits::Point_3& Q, const typename DT::Geom_traits& gt /* = typename DT::Geom_traits() */ ) { - CGAL_triangulation_precondition(//&3 in place of %4 - !gt.coplanar_3_object()( - f.first->vertex((f.second+1)&3)->point(), - f.first->vertex((f.second+2)&3)->point(), - f.first->vertex((f.second+3)&3)->point(), - Q)); - // else the facet is not on the enveloppe of the conflict cavity associated to P + CGAL_precondition(//&3 in place of %4 + !gt.coplanar_3_object()( + f.first->vertex((f.second+1)&3)->point(), + f.first->vertex((f.second+2)&3)->point(), + f.first->vertex((f.second+3)&3)->point(), + Q)); + // else the facet is not on the envelope of the conflict cavity associated to P return gt.construct_circumcenter_3_object()( f.first->vertex((f.second+1)&3)->point(), f.first->vertex((f.second+2)&3)->point(), diff --git a/thirdparty/CGAL/include/CGAL/nearest_neighbor_delaunay_2.h b/thirdparty/CGAL/include/CGAL/nearest_neighbor_delaunay_2.h index 8e45d0ff..b4563750 100644 --- a/thirdparty/CGAL/include/CGAL/nearest_neighbor_delaunay_2.h +++ b/thirdparty/CGAL/include/CGAL/nearest_neighbor_delaunay_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_2/include/CGAL/nearest_neighbor_delaunay_2.h $ -// $Id: nearest_neighbor_delaunay_2.h 7e62c02 2021-04-12T14:02:37+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_2/include/CGAL/nearest_neighbor_delaunay_2.h $ +// $Id: include/CGAL/nearest_neighbor_delaunay_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/normal_vector_newell_3.h b/thirdparty/CGAL/include/CGAL/normal_vector_newell_3.h index 967be317..f355a2c4 100644 --- a/thirdparty/CGAL/include/CGAL/normal_vector_newell_3.h +++ b/thirdparty/CGAL/include/CGAL/normal_vector_newell_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_3/include/CGAL/normal_vector_newell_3.h $ -// $Id: normal_vector_newell_3.h 5345986 2021-02-10T11:13:14+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_3/include/CGAL/normal_vector_newell_3.h $ +// $Id: include/CGAL/normal_vector_newell_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/number_type_basic.h b/thirdparty/CGAL/include/CGAL/number_type_basic.h index ef39b1f8..a57330b1 100644 --- a/thirdparty/CGAL/include/CGAL/number_type_basic.h +++ b/thirdparty/CGAL/include/CGAL/number_type_basic.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/number_type_basic.h $ -// $Id: number_type_basic.h a88a84b 2021-08-13T15:46:50+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/number_type_basic.h $ +// $Id: include/CGAL/number_type_basic.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -23,8 +23,8 @@ #include // basic tools needed in several files -#include #include +#include #include diff --git a/thirdparty/CGAL/include/CGAL/number_type_config.h b/thirdparty/CGAL/include/CGAL/number_type_config.h index c90757a0..4c8e77c8 100644 --- a/thirdparty/CGAL/include/CGAL/number_type_config.h +++ b/thirdparty/CGAL/include/CGAL/number_type_config.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/number_type_config.h $ -// $Id: number_type_config.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/number_type_config.h $ +// $Id: include/CGAL/number_type_config.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,10 @@ #include -#define CGAL_PI 3.14159265358979323846 +#define CGAL_PI 3.141592653589793238462643383279502884 +#define CGAL_SQRT2 1.414213562373095048801688724209698078 +#define CGAL_SQRT3 1.732050807568877293527446341505872366 +#define CGAL_SQRT5 2.236067977499789696409173668731276235 #ifdef CGAL_USE_NTS_NAMESPACE diff --git a/thirdparty/CGAL/include/CGAL/number_utils.h b/thirdparty/CGAL/include/CGAL/number_utils.h index 44b51ecc..bc02bf6a 100644 --- a/thirdparty/CGAL/include/CGAL/number_utils.h +++ b/thirdparty/CGAL/include/CGAL/number_utils.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_foundations/include/CGAL/number_utils.h $ -// $Id: number_utils.h e222e77 2021-05-18T18:16:44+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_foundations/include/CGAL/number_utils.h $ +// $Id: include/CGAL/number_utils.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -194,21 +194,21 @@ root_of( int k, Input_iterator begin, Input_iterator end ) { template< class Number_type > inline // select a Is_zero functor -typename boost::mpl::if_c< - ::boost::is_same< typename Algebraic_structure_traits< Number_type >::Is_zero, - Null_functor >::value , +typename std::conditional_t< + std::is_same_v< typename Algebraic_structure_traits< Number_type >::Is_zero, + Null_functor >, typename Real_embeddable_traits< Number_type >::Is_zero, typename Algebraic_structure_traits< Number_type >::Is_zero ->::type::result_type +>::result_type is_zero( const Number_type& x ) { // We take the Algebraic_structure_traits<>::Is_zero functor by default. If it // is not available, we take the Real_embeddable_traits functor - typename ::boost::mpl::if_c< - ::boost::is_same< + std::conditional_t< + std::is_same_v< typename Algebraic_structure_traits< Number_type >::Is_zero, - Null_functor >::value , + Null_functor > , typename Real_embeddable_traits< Number_type >::Is_zero, - typename Algebraic_structure_traits< Number_type >::Is_zero >::type + typename Algebraic_structure_traits< Number_type >::Is_zero > is_zero; return is_zero( x ); } diff --git a/thirdparty/CGAL/include/CGAL/number_utils_classes.h b/thirdparty/CGAL/include/CGAL/number_utils_classes.h index d72f069a..84a0468d 100644 --- a/thirdparty/CGAL/include/CGAL/number_utils_classes.h +++ b/thirdparty/CGAL/include/CGAL/number_utils_classes.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Algebraic_foundations/include/CGAL/number_utils_classes.h $ -// $Id: number_utils_classes.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Algebraic_foundations/include/CGAL/number_utils_classes.h $ +// $Id: include/CGAL/number_utils_classes.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/odt_optimize_mesh_3.h b/thirdparty/CGAL/include/CGAL/odt_optimize_mesh_3.h index 2b3d47da..2499ba0e 100644 --- a/thirdparty/CGAL/include/CGAL/odt_optimize_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/odt_optimize_mesh_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/odt_optimize_mesh_3.h $ -// $Id: odt_optimize_mesh_3.h 1c3e09f 2022-01-10T15:32:38+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/odt_optimize_mesh_3.h $ +// $Id: include/CGAL/odt_optimize_mesh_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,9 +19,7 @@ #include -#include - -#include +#include #include #include #include @@ -29,43 +27,134 @@ #include #include -#include namespace CGAL { - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4003) // not enough actual parameters for macro -#endif - -// see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS - -BOOST_PARAMETER_FUNCTION( - (Mesh_optimization_return_code), - odt_optimize_mesh_3, - parameters::tag, - (required (in_out(c3t3),*) (domain,*) ) - (optional - (time_limit_, *, 0 ) - (max_iteration_number_, *, 0 ) - (convergence_, *, parameters::default_values_for_mesh_3::odt_convergence_ratio ) - (freeze_bound_, *, parameters::default_values_for_mesh_3::odt_freeze_ratio ) - (do_freeze_, *, parameters::default_values_for_mesh_3::do_freeze )) -) +/*! + * @ingroup PkgMesh3Functions + * + * The function `odt_optimize_mesh_3()` is a mesh optimization process + * based on the minimization of a global energy function. + * + * In `odt_optimize_mesh_3()`, the minimized global energy may be interpreted + * as the \f$ L^1\f$-norm of the error achieved + * when the function \f$ x^2\f$ is interpolated on the mesh domain + * using a piecewise linear function which is linear in each mesh cell. + * + * The optimizer `odt_optimize_mesh_3()` works in iterative steps. + * At each iteration, mesh vertices are moved into + * positions that bring to zero the energy gradient + * and the Delaunay triangulation is updated. + * Vertices on the mesh boundaries are handled + * in a special way so as to preserve an accurate + * representation of the domain boundaries. + * + * @tparam C3T3 a model of the concept `MeshComplex_3InTriangulation_3` + * @tparam MeshDomain a model of the concept `MeshDomain_3` + * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * @param c3t3 the initial mesh and is modified by the algorithm to represent the final optimized mesh. + * @param domain the domain used to create the `c3t3` parameter + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{time_limit} + * \cgalParamDescription{is used to set up, in seconds, + * a CPU time limit after which the optimization process is stopped. This time is + * measured using `Real_timer`. + * The default value is 0 and means that there is no time limit.} + * \cgalParamType{`double`} + * \cgalParamPrecondition{`time_limit >= 0`} + * \cgalParamDefault{0} + * \cgalParamNEnd + * \cgalParamNBegin{max_iteration_number} + * \cgalParamDescription{sets a limit on the number of performed iterations. + * The default value of 0 means that there is + * no limit on the number of performed iterations.} + * \cgalParamType{`std::size_t`} + * \cgalParamDefault{0} + * \cgalParamNEnd + * \cgalParamNBegin{convergence} + * \cgalParamDescription{is a stopping criterion based on convergence: + * the optimization process is stopped, when at the last iteration, + * the displacement of any vertex is less than a given percentage of the length + * the shortest edge incident to that vertex. + * The parameter `convergence` gives the threshold ratio.} + * \cgalParamType{`double`} + * \cgalParamPrecondition{`0 <= convergence <= 1`} + * \cgalParamDefault{0.02} + * \cgalParamNEnd + * \cgalParamNBegin{freeze_bound} + * \cgalParamDescription{is designed to reduce running time of each optimization iteration. Any vertex + * that has a displacement less than a given percentage of the length of its shortest incident edge, is frozen (i.e.\ is + * not relocated). The parameter `freeze_bound` gives the threshold ratio.} + * \cgalParamType{`double`} + * \cgalParamPrecondition{`0 <= freeze_bound <= 1`} + * \cgalParamDefault{0.01} + * \cgalParamNEnd + * \cgalParamNBegin{do_freeze} + * \cgalParamDescription{completes the `freeze_bound` parameter. If it is set to `true`, + * frozen vertices will not move anymore in next iterations. Otherwise, at each iteration, any vertex that + * moves, unfreezes all its incident vertices.} + * \cgalParamType{`bool`} + * \cgalParamDefault{true} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + * \return a value of type `CGAL::Mesh_optimization_return_code` which is: + *
      + *
    • `CGAL::TIME_LIMIT_REACHED` when the time limit is reached. + *
    • `CGAL::MAX_ITERATION_NUMBER_REACHED` when `odt_optimize_mesh_3()` stops because it has performed `max_iteration_number` iterations. + *
    • `CGAL::CONVERGENCE_REACHED` when `odt_optimize_mesh_3()` stops because the convergence criterion + * is achieved. + *
    • `CGAL::ALL_VERTICES_FROZEN` when all vertices have been frozen, when the + * `do_freeze` parameter is set to true. + *
    • `CGAL::CANT_IMPROVE_ANYMORE` when `odt_optimize_mesh_3()` stops because + * most vertices have been frozen, and no better convergence can be reached. + *
    + * + * \cgalHeading{Example} + * + * \code{.cpp} + * // 100 iterations of ODT-smoothing + * odt_optimize_mesh_3(c3t3, + * domain, + * parameters::max_iteration_number = 100, + * parameters::convergence = 0); + * \endcode + * + * \sa `CGAL::Mesh_optimization_return_code` + * \sa `CGAL::make_mesh_3()` + * \sa `CGAL::refine_mesh_3()` + * \sa `CGAL::exude_mesh_3()` + * \sa `CGAL::perturb_mesh_3()` + * \sa `CGAL::lloyd_optimize_mesh_3()` + */ +template +Mesh_optimization_return_code odt_optimize_mesh_3(C3T3& c3t3, const MeshDomain& domain, const CGAL_NP_CLASS& np = parameters::default_values()) { - return odt_optimize_mesh_3_impl(c3t3, domain, - time_limit_, max_iteration_number_, - convergence_, freeze_bound_ - , do_freeze_ ); + using parameters::choose_parameter; + using parameters::get_parameter; + double time_limit=choose_parameter(get_parameter(np,internal_np::maximum_running_time),parameters::default_values_for_mesh_3::time_limit); + std::size_t max_iteration_number=choose_parameter(get_parameter(np,internal_np::number_of_iterations),0); + double convergence=choose_parameter(get_parameter(np,internal_np::convergence_ratio),parameters::default_values_for_mesh_3::odt_convergence_ratio); + double freeze_bound=choose_parameter(get_parameter(np,internal_np::vertex_freeze_bound),parameters::default_values_for_mesh_3::odt_freeze_ratio); + bool do_freeze=choose_parameter(get_parameter(np,internal_np::freeze),true); + return odt_optimize_mesh_3_impl(c3t3, domain, time_limit, max_iteration_number, convergence, freeze_bound, do_freeze); } -CGAL_PRAGMA_DIAG_POP -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif +#ifndef DOXYGEN_RUNNING +// Overload handling parameters passed with operator= +template +Mesh_optimization_return_code odt_optimize_mesh_3(C3T3& c3t3, const MeshDomain& domain, + const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) +{ + return odt_optimize_mesh_3(c3t3, domain, internal_np::combine_named_parameters(np1, np2, nps...)); +} template Mesh_optimization_return_code @@ -106,8 +195,8 @@ odt_optimize_mesh_3_impl(C3T3& c3t3, return opt(static_cast(max_iteration_number)); } -} // end namespace CGAL +#endif //DOXYGEN_RUNNING -#include +} // end namespace CGAL #endif // CGAL_ODT_OPTIMIZE_MESH_3_H diff --git a/thirdparty/CGAL/include/CGAL/offset_polygon_2.h b/thirdparty/CGAL/include/CGAL/offset_polygon_2.h index 561ae711..aaf7e1ee 100644 --- a/thirdparty/CGAL/include/CGAL/offset_polygon_2.h +++ b/thirdparty/CGAL/include/CGAL/offset_polygon_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Minkowski_sum_2/include/CGAL/offset_polygon_2.h $ -// $Id: offset_polygon_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Minkowski_sum_2/include/CGAL/offset_polygon_2.h $ +// $Id: include/CGAL/offset_polygon_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Ron Wein diff --git a/thirdparty/CGAL/include/CGAL/optimal_bounding_box.h b/thirdparty/CGAL/include/CGAL/optimal_bounding_box.h index e2748982..01418411 100644 --- a/thirdparty/CGAL/include/CGAL/optimal_bounding_box.h +++ b/thirdparty/CGAL/include/CGAL/optimal_bounding_box.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Optimal_bounding_box/include/CGAL/optimal_bounding_box.h $ -// $Id: optimal_bounding_box.h ae19de5 2020-01-10T10:11:00+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Optimal_bounding_box/include/CGAL/optimal_bounding_box.h $ +// $Id: include/CGAL/optimal_bounding_box.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/optimize_mesh_3.h b/thirdparty/CGAL/include/CGAL/optimize_mesh_3.h index e3aab646..c156d14d 100644 --- a/thirdparty/CGAL/include/CGAL/optimize_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/optimize_mesh_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/optimize_mesh_3.h $ -// $Id: optimize_mesh_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/optimize_mesh_3.h $ +// $Id: include/CGAL/optimize_mesh_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/optimize_periodic_3_mesh_3.h b/thirdparty/CGAL/include/CGAL/optimize_periodic_3_mesh_3.h index 695e32d2..cbdaef90 100644 --- a/thirdparty/CGAL/include/CGAL/optimize_periodic_3_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/optimize_periodic_3_mesh_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_mesh_3/include/CGAL/optimize_periodic_3_mesh_3.h $ -// $Id: optimize_periodic_3_mesh_3.h 1c3e09f 2022-01-10T15:32:38+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_mesh_3/include/CGAL/optimize_periodic_3_mesh_3.h $ +// $Id: include/CGAL/optimize_periodic_3_mesh_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Stephane Tayeb, @@ -19,106 +19,191 @@ #define CGAL_OPTIMIZE_PERIODIC_3_MESH_3_H #include - +#include #include namespace CGAL { - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4003) // not enough actual parameters for macro -#endif - -// see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS - // ---------------------------------- pertuber --------------------------------- +/*! + * \ingroup PkgPeriodic3Mesh3Functions + * + * The function `perturb_periodic_3_mesh_3()` is a mesh optimizer that + * improves the quality of a Delaunay mesh by changing the positions of some vertices of the mesh. + * + * This function directly calls `perturb_mesh_3()`, but is provided for convenience. + * Further information can be found in the documentation of the function `perturb_mesh_3()`. + */ +template +Mesh_optimization_return_code perturb_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain, const CGAL_NP_CLASS& np = parameters::default_values()) +{ + using parameters::choose_parameter; + using parameters::get_parameter; + double time_limit = choose_parameter(get_parameter(np,internal_np::maximum_running_time),parameters::default_values_for_mesh_3::time_limit); + auto sliver_bound = choose_parameter(get_parameter(np,internal_np::lower_sliver_bound), parameters::default_values_for_mesh_3::perturb_sliver_bound); + auto sliver_criterion = choose_parameter(get_parameter(np, internal_np::sliver_criteria), parameters::default_values_for_mesh_3::default_sliver_criterion(c3t3,sliver_bound)); + auto perturbation_vector = choose_parameter(get_parameter(np,internal_np::perturb_vector), default_perturbation_vector(c3t3,domain,sliver_criterion)); + return perturb_mesh_3_impl(c3t3, domain, time_limit, sliver_criterion, perturbation_vector); +} -BOOST_PARAMETER_FUNCTION( - (Mesh_optimization_return_code), - perturb_periodic_3_mesh_3, - parameters::tag, - (required (in_out(c3t3),*) (domain,*)) - (optional - (time_limit_, *, 0) - (sliver_bound_, *, parameters::default_values_for_mesh_3::perturb_sliver_bound) - (sliver_criterion_, *, parameters::default_values_for_mesh_3::default_sliver_criterion(c3t3, sliver_bound_)) - (perturbation_vector_, *, default_perturbation_vector(c3t3,domain,sliver_criterion_)) - ) -) +// Overload handling parameters passed with operator= +template +Mesh_optimization_return_code perturb_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain, + const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) { - CGAL_USE(sliver_bound_); - return perturb_mesh_3_impl(c3t3, domain, time_limit_, sliver_criterion_, - perturbation_vector_); + return perturb_periodic_3_mesh_3(c3t3,domain, internal_np::combine_named_parameters(np1, np2, nps...)); +} +// Overload handling parameters passed with operator= +template +Mesh_optimization_return_code perturb_periodic_3_mesh_3(const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) +{ + return perturb_periodic_3_mesh_3(internal_np::combine_named_parameters(np1, np2, nps...)); } // ---------------------------------- exuder ----------------------------------- - -BOOST_PARAMETER_FUNCTION( - (Mesh_optimization_return_code), - exude_periodic_3_mesh_3, - parameters::tag, - (required (in_out(c3t3),*)) - (optional - (time_limit_, *, 0) - (sliver_bound_, *, parameters::default_values_for_mesh_3::exude_sliver_bound) - ) -) +/*! + * \ingroup PkgPeriodic3Mesh3Functions + * + * The function `exude_periodic_3_mesh_3()` performs a sliver exudation process + * on a periodic Delaunay mesh. + * + * The sliver exudation process consists in optimizing the weights of vertices + * of the periodic weighted Delaunay triangulation in such a way that slivers disappear + * and the quality of the mesh improves. + * + * \warning This optimizer modifies the weight of vertices of the periodic triangulation + * and, if called, must be the last optimizer to be called. If the mesh is refined after + * this optimization has been performed, all improvements will be lost. + * + * This function directly calls `exude_mesh_3()`, but is provided for convenience. + * Further information can be found in the documentation of the function `exude_mesh_3()`. + */ +template +Mesh_optimization_return_code exude_periodic_3_mesh_3(C3T3& c3t3,const CGAL_NP_CLASS& np = parameters::default_values()) +{ + using parameters::choose_parameter; + using parameters::get_parameter; + double time_limit=choose_parameter(get_parameter(np,internal_np::maximum_running_time),0); + double sliver_bound= choose_parameter(get_parameter(np,internal_np::lower_sliver_bound),parameters::default_values_for_mesh_3::exude_sliver_bound); + return exude_mesh_3_impl(c3t3,time_limit,sliver_bound); +} +// Overload handling parameters passed with operator= +template +Mesh_optimization_return_code exude_periodic_3_mesh_3(C3T3& c3t3, + const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) { - return exude_mesh_3_impl(c3t3, time_limit_, sliver_bound_); + return exude_periodic_3_mesh_3(c3t3,internal_np::combine_named_parameters(np1, np2, nps...)); } +// Overload handling parameters passed with operator= +template +Mesh_optimization_return_code exude_periodic_3_mesh_3(const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) +{ + return exude_periodic_3_mesh_3(internal_np::combine_named_parameters(np1, np2, nps...)); +} + // ------------------------------ odt optimizer -------------------------------- +/*! + * \ingroup PkgPeriodic3Mesh3Functions + * + * The function `odt_optimize_periodic_3_mesh_3()` is a periodic mesh optimization + * process based on the minimization of a global energy function. + * + * This function directly calls `odt_optimize_mesh_3()`, but is provided for convenience. + * Further information can be found in the documentation of the function `odt_optimize_mesh_3()`. + */ +template +Mesh_optimization_return_code odt_optimize_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain, const CGAL_NP_CLASS& np = parameters::default_values()) +{ + using parameters::choose_parameter; + using parameters::get_parameter; + double time_limit=choose_parameter(get_parameter(np,internal_np::maximum_running_time),0); + std::size_t max_iteration_number=choose_parameter(get_parameter(np,internal_np::number_of_iterations),0); + double convergence=choose_parameter(get_parameter(np,internal_np::convergence_ratio),0.02); + double freeze_bound=choose_parameter(get_parameter(np,internal_np::vertex_freeze_bound),0.01); + bool do_freeze=choose_parameter(get_parameter(np,internal_np::freeze),true); + return odt_optimize_mesh_3_impl(c3t3, domain, time_limit, max_iteration_number, convergence, freeze_bound, do_freeze); +} -BOOST_PARAMETER_FUNCTION( - (Mesh_optimization_return_code), - odt_optimize_periodic_3_mesh_3, - parameters::tag, - (required (in_out(c3t3),*) (domain,*)) - (optional - (time_limit_, *, 0) - (max_iteration_number_, *, 0) - (convergence_, *, parameters::default_values_for_mesh_3::odt_convergence_ratio) - (freeze_bound_, *, parameters::default_values_for_mesh_3::odt_freeze_ratio) - (do_freeze_, *, parameters::default_values_for_mesh_3::do_freeze) - ) -) +// Overload handling parameters passed with operator= +template +Mesh_optimization_return_code odt_optimize_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain, + const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) { - return odt_optimize_mesh_3_impl(c3t3, domain, - time_limit_, max_iteration_number_, - convergence_, freeze_bound_, do_freeze_); + return odt_optimize_periodic_3_mesh_3(c3t3, domain, internal_np::combine_named_parameters(np1, np2, nps...)); +} +// Overload handling parameters passed with operator= +template +Mesh_optimization_return_code odt_optimize_periodic_3_mesh_3(const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) +{ + return odt_optimize_periodic_3_mesh_3(internal_np::combine_named_parameters(np1, np2, nps...)); } // ------------------------------- lloyd optimizer ----------------------------- - -BOOST_PARAMETER_FUNCTION( - (Mesh_optimization_return_code), - lloyd_optimize_periodic_3_mesh_3, - parameters::tag, - (required (in_out(c3t3),*) (domain,*)) - (optional - (time_limit_, *, 0) - (max_iteration_number_, *, 0) - (convergence_, *, parameters::default_values_for_mesh_3::lloyd_convergence_ratio) - (freeze_bound_, *, parameters::default_values_for_mesh_3::lloyd_freeze_ratio) - (do_freeze_, *, parameters::default_values_for_mesh_3::do_freeze) - ) -) +/*! + * \ingroup PkgPeriodic3Mesh3Functions + * + * The function `lloyd_optimize_periodic_3_mesh_3()` is a periodic mesh optimization + * process based on the minimization of a global energy function. + * + * This function directly calls `lloyd_optimize_mesh_3()`, but is provided for convenience. + * Further information can be found in the documentation of the function `lloyd_optimize_mesh_3()`. + * + * \note This function requires the \ref thirdpartyEigen library. +*/ +template +Mesh_optimization_return_code lloyd_optimize_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain,const CGAL_NP_CLASS& np = parameters::default_values()) { - return lloyd_optimize_mesh_3_impl(c3t3, domain, - time_limit_, max_iteration_number_, - convergence_, freeze_bound_, do_freeze_); + using parameters::choose_parameter; + using parameters::get_parameter; + std::size_t max_iterations = choose_parameter(get_parameter(np, internal_np::number_of_iterations), 0); + const double convergence_ratio = choose_parameter(get_parameter(np, internal_np::convergence_ratio), 0.02); + const double freeze_bound = choose_parameter(get_parameter(np, internal_np::vertex_freeze_bound), 0.001); + const double time_limit = choose_parameter(get_parameter(np, internal_np::maximum_running_time), 0.); + bool do_freeze = choose_parameter(get_parameter(np,internal_np::freeze),true); + return lloyd_optimize_mesh_3_impl(c3t3, domain, time_limit, max_iterations, convergence_ratio, freeze_bound, do_freeze); } -CGAL_PRAGMA_DIAG_POP - -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif +// Overload handling parameters passed with operator= +template +Mesh_optimization_return_code lloyd_optimize_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain, + const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) +{ + return lloyd_optimize_periodic_3_mesh_3(c3t3,domain, internal_np::combine_named_parameters(np1, np2, nps...)); +} } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/partition_2.h b/thirdparty/CGAL/include/CGAL/partition_2.h index 86673d19..2c7e6d07 100644 --- a/thirdparty/CGAL/include/CGAL/partition_2.h +++ b/thirdparty/CGAL/include/CGAL/partition_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/partition_2.h $ -// $Id: partition_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/partition_2.h $ +// $Id: include/CGAL/partition_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/partition_is_valid_2.h b/thirdparty/CGAL/include/CGAL/partition_is_valid_2.h index 657caa29..29170777 100644 --- a/thirdparty/CGAL/include/CGAL/partition_is_valid_2.h +++ b/thirdparty/CGAL/include/CGAL/partition_is_valid_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/partition_is_valid_2.h $ -// $Id: partition_is_valid_2.h 521c72d 2021-10-04T13:22:00+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/partition_is_valid_2.h $ +// $Id: include/CGAL/partition_is_valid_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -147,8 +147,8 @@ partition_is_valid_2 (InputIterator point_first, InputIterator point_last, for (;point_first != point_last; point_first++) orig_poly.push_back(*point_first); - CGAL_partition_precondition(orientation_2(orig_poly.begin(),orig_poly.end(), - traits) == COUNTERCLOCKWISE); + CGAL_precondition(orientation_2(orig_poly.begin(),orig_poly.end(), + traits) == COUNTERCLOCKWISE); P_Vertex_map output_vertex_set(poly_first, poly_last, traits); @@ -163,7 +163,7 @@ partition_is_valid_2 (InputIterator point_first, InputIterator point_last, std::cout << "Polygon " << poly_num << " is " << std::endl; std::cout << *poly_first << std::endl; #endif - CGAL_partition_assertion ( + CGAL_assertion ( orientation_2(vtx_begin, vtx_end, traits) == COUNTERCLOCKWISE); if (!is_valid(vtx_begin, vtx_end)) { diff --git a/thirdparty/CGAL/include/CGAL/pca_estimate_normals.h b/thirdparty/CGAL/include/CGAL/pca_estimate_normals.h index 3c7ef791..01b159e8 100644 --- a/thirdparty/CGAL/include/CGAL/pca_estimate_normals.h +++ b/thirdparty/CGAL/include/CGAL/pca_estimate_normals.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/pca_estimate_normals.h $ -// $Id: pca_estimate_normals.h bccf399 2022-11-08T10:51:46+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/pca_estimate_normals.h $ +// $Id: include/CGAL/pca_estimate_normals.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Pierre Alliez and Laurent Saboret @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include @@ -186,10 +186,10 @@ pca_estimate_normals( // precondition: at least one element in the container. // to fix: should have at least three distinct points // but this is costly to check - CGAL_point_set_processing_precondition(points.begin() != points.end()); + CGAL_precondition(points.begin() != points.end()); // precondition: at least 2 nearest neighbors - CGAL_point_set_processing_precondition(k >= 2); + CGAL_precondition(k >= 2); std::size_t memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE_STREAM << (memory >> 20) << " Mb allocated\n"; diff --git a/thirdparty/CGAL/include/CGAL/periodic_3_triangulation_3_io.h b/thirdparty/CGAL/include/CGAL/periodic_3_triangulation_3_io.h index 4d8f5272..b07d8a57 100644 --- a/thirdparty/CGAL/include/CGAL/periodic_3_triangulation_3_io.h +++ b/thirdparty/CGAL/include/CGAL/periodic_3_triangulation_3_io.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_triangulation_3/include/CGAL/periodic_3_triangulation_3_io.h $ -// $Id: periodic_3_triangulation_3_io.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_triangulation_3/include/CGAL/periodic_3_triangulation_3_io.h $ +// $Id: include/CGAL/periodic_3_triangulation_3_io.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/perturb_mesh_3.h b/thirdparty/CGAL/include/CGAL/perturb_mesh_3.h index b82d6c75..12956238 100644 --- a/thirdparty/CGAL/include/CGAL/perturb_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/perturb_mesh_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/perturb_mesh_3.h $ -// $Id: perturb_mesh_3.h 1c3e09f 2022-01-10T15:32:38+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/perturb_mesh_3.h $ +// $Id: include/CGAL/perturb_mesh_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -21,54 +21,112 @@ #include -#include #include #include #include #include #include #include - -#include +#include #include namespace CGAL { - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4003) // not enough actual parameters for macro -#endif - -// see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS - -BOOST_PARAMETER_FUNCTION( - (Mesh_optimization_return_code), - perturb_mesh_3, - parameters::tag, - (required (in_out(c3t3),*) (domain,*) ) - (optional - (time_limit_, *, 0 ) - (sliver_bound_, *, parameters::default_values_for_mesh_3::perturb_sliver_bound ) - (sliver_criterion_, *, - parameters::default_values_for_mesh_3::default_sliver_criterion(c3t3,sliver_bound_)) - (perturbation_vector_, *, - default_perturbation_vector(c3t3,domain,sliver_criterion_)) - ) -) +/*! + * \ingroup PkgMesh3Functions + * + * The function `perturb_mesh_3()` is a mesh optimizer that + * improves the quality of a Delaunay mesh + * by changing the positions of some vertices of the mesh. + * + * The perturber tries to improve the dihedral angles of the worst cells in the mesh + * degree by degree: the + * step number `n` is considered as successful + * if after this step the worst tetrahedron of the mesh has a minimal dihedral + * angle larger than `n` degrees. + * The perturber exits if this is not the case. + * + * \tparam C3T3 a model of the concept `MeshComplex_3InTriangulation_3` + * \tparam MD a model of the concept `MeshDomain_3` + * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * @param c3t3 the initial mesh and is modified by the algorithm to represent the final optimized mesh + * @param domain the domain used to create the `c3t3` parameter + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{time_limit} + * \cgalParamDescription{is used to set up, in seconds, a CPU time limit after which the optimization process + * is stopped. This time is measured using the `Real_timer` class. The default value is + * 0 and means that there is no time limit.} + * \cgalParamType{`double`} + * \cgalParamPrecondition{`0 <= sliver_bound <= 180`} + * \cgalParamDefault{0} + * \cgalParamNEnd + * \cgalParamNBegin{sliver_bound} + * \cgalParamDescription{is designed to give, in degrees, a targeted lower bound on dihedral angles of mesh cells. + * The exudation process considers in turn all the mesh cells that have a smallest dihedral + * angle less than sliver_bound and tries to make them disappear by weighting their vertices. + * The optimization process stops when every cell in the mesh achieves this quality. The + * default value is 0 and means that there is no targeted bound: the exuder then runs as long + * as it can improve the smallest dihedral angles of the set of cells incident to some vertices.} + * \cgalParamType{`double`} + * \cgalParamPrecondition{`time_limit >= 0`} + * \cgalParamDefault{0} + * \cgalParamNEnd + * \cgalNamedParamsEnd + * + * \return a value of type `CGAL::Mesh_optimization_return_code` which is: + *
      + *
    • `CGAL::BOUND_REACHED` when the targeted bound for the smallest dihedral angle in the mesh is reached. + *
    • `CGAL::TIME_LIMIT_REACHED` when the time limit is reached. + *
    • `CGAL::CANT_IMPROVE_ANYMORE` when the perturbation process stops because the last step is unsuccessful. + *
    + * + * \cgalHeading{Example} + * + * \code{.cpp} + * // Perturb until every dihedral angle of the mesh is >= 10 degrees + * // No time bound is set + * perturb_mesh_3(c3t3, + * domain, + * parameters::sliver_bound = 10); + * \endcode + * + * \sa `CGAL::Mesh_optimization_return_code` + * \sa `CGAL::make_mesh_3()` + * \sa `CGAL::refine_mesh_3()` + * \sa `CGAL::exude_mesh_3()` + * \sa `CGAL::lloyd_optimize_mesh_3()` + * \sa `CGAL::odt_optimize_mesh_3()` + * + */ +template +Mesh_optimization_return_code perturb_mesh_3(C3T3& c3t3, const MeshDomain& domain, const CGAL_NP_CLASS& np = parameters::default_values()) { - CGAL_USE(sliver_bound_); - return perturb_mesh_3_impl(c3t3, domain, time_limit_, sliver_criterion_, - perturbation_vector_); + using parameters::choose_parameter; + using parameters::get_parameter; + double time_limit = choose_parameter(get_parameter(np,internal_np::maximum_running_time),parameters::default_values_for_mesh_3::time_limit); + auto sliver_bound = choose_parameter(get_parameter(np,internal_np::lower_sliver_bound), parameters::default_values_for_mesh_3::perturb_sliver_bound); + auto sliver_criterion = choose_parameter(get_parameter(np, internal_np::sliver_criteria), parameters::default_values_for_mesh_3::default_sliver_criterion(c3t3,sliver_bound)); + auto perturbation_vector = choose_parameter(get_parameter(np,internal_np::perturb_vector), default_perturbation_vector(c3t3,domain,sliver_criterion)); + return perturb_mesh_3_impl(c3t3, domain, time_limit, sliver_criterion, perturbation_vector); } -CGAL_PRAGMA_DIAG_POP -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif + +#ifndef DOXYGEN_RUNNING +// Overload handling parameters passed with operator= +template +Mesh_optimization_return_code perturb_mesh_3(C3T3& c3t3, const MeshDomain& domain, + const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) +{ + return perturb_mesh_3(c3t3,domain, internal_np::combine_named_parameters(np1, np2, nps...)); +} template -#include +#include #include #include #include @@ -75,7 +75,7 @@ struct Loc_domain { void update(int j, Citerator i) { - CGAL_optimisation_precondition(j >= 0 && j < 4); + CGAL_precondition(j >= 0 && j < 4); if (j < 2) if (j == 0) { if (traits.less_x_2_object()(*i, minx)) minx = *i; @@ -106,9 +106,9 @@ struct Loc_domain { maxy(pts.front()), traits(t) { - CGAL_optimisation_precondition(b != e); + CGAL_precondition(b != e); Iterator i = pts.begin(); - CGAL_optimisation_assertion(i != pts.end()); + CGAL_assertion(i != pts.end()); while (++i != pts.end()) { if (traits.less_x_2_object()(*i, minx)) minx = *i; if (traits.less_x_2_object()(maxx, *i)) maxx = *i; @@ -124,7 +124,7 @@ struct Loc_domain { operator[](int i) const // return corner points (0 <-> bottom-left, 1 <-> bottom-right) { - CGAL_optimisation_precondition(i >= 0 && i < 4); + CGAL_precondition(i >= 0 && i < 4); if (i == 0) return traits.construct_point_2_above_right_implicit_point_2_object()( minx, miny, r); @@ -142,7 +142,7 @@ struct Loc_domain { extreme(int i) const // return extreme points (0 <-> left, 1 <-> bottom) { - CGAL_optimisation_precondition(i >= 0 && i < 4); + CGAL_precondition(i >= 0 && i < 4); if (i > 1) return i == 2 ? maxx : maxy; return i == 0 ? minx : miny; } @@ -151,7 +151,7 @@ struct Loc_domain { extreme(int i) // return extreme points (0 <-> left, 1 <-> bottom) { - CGAL_optimisation_precondition(i >= 0 && i < 4); + CGAL_precondition(i >= 0 && i < 4); if (i > 1) return i == 2 ? maxx : maxy; return i == 0 ? minx : miny; } @@ -177,13 +177,13 @@ struct Loc_domain { void check() const { - CGAL_optimisation_expensive_assertion_code( + CGAL_expensive_assertion_code( Iterator i = pts.begin(); do { - CGAL_optimisation_assertion(!traits.less_x_2_object()(*i, minx)); - CGAL_optimisation_assertion(!traits.less_x_2_object()(maxx, *i)); - CGAL_optimisation_assertion(!traits.less_y_2_object()(*i, miny)); - CGAL_optimisation_assertion(!traits.less_y_2_object()(maxy, *i)); + CGAL_assertion(!traits.less_x_2_object()(*i, minx)); + CGAL_assertion(!traits.less_x_2_object()(maxx, *i)); + CGAL_assertion(!traits.less_y_2_object()(*i, miny)); + CGAL_assertion(!traits.less_y_2_object()(maxy, *i)); } while (++i != end); ) } @@ -463,7 +463,7 @@ inline OutputIterator two_cover_points( InputIC f, InputIC l, OutputIterator o, bool& ok, const Traits& t) { - CGAL_optimisation_precondition(f != l); + CGAL_precondition(f != l); // compute location domain: Loc_domain< Traits > d(f, l, t); @@ -475,7 +475,7 @@ inline OutputIterator three_cover_points( InputIC f, InputIC l, OutputIterator o, bool& ok, const Traits& t) { - CGAL_optimisation_precondition(f != l); + CGAL_precondition(f != l); // compute location domain: Loc_domain< Traits > d(f, l, t); @@ -487,7 +487,7 @@ inline OutputIterator four_cover_points( InputIC f, InputIC l, OutputIterator o, bool& ok, const Traits& t) { - CGAL_optimisation_precondition(f != l); + CGAL_precondition(f != l); // compute location domain: Loc_domain< Traits > d(f, l, t); @@ -562,7 +562,7 @@ three_cover_points( using std::less; using std::iter_swap; - CGAL_optimisation_precondition(!d.empty()); + CGAL_precondition(!d.empty()); // typedefs: typedef typename Traits::Point_2 Point_2; @@ -583,7 +583,7 @@ three_cover_points( // are all points already covered? if (i == d.end()) { - CGAL_optimisation_assertion(k == 0); + CGAL_assertion(k == 0); *o++ = d[0]; ok = true; return o; @@ -620,11 +620,11 @@ three_cover_points( // check disjoint for two-pierceability: - CGAL_optimisation_expensive_assertion( + CGAL_expensive_assertion( save_end == find_if(d.end(), save_end, [&d, &dist, &corner](const Point_2& p) { return d.r < dist(corner, p); })); - CGAL_optimisation_expensive_assertion( + CGAL_expensive_assertion( d.end() == find_if(d.begin(), d.end(), [&d,&dist, &corner](const Point_2& p) { return d.r >= dist(corner, p); })); @@ -721,7 +721,7 @@ four_cover_points(Staircases< Traits >& d, OutputIterator o, bool& ok) // are all points already covered? if (i == d.end()) { - CGAL_optimisation_assertion(k == 0); + CGAL_assertion(k == 0); *o++ = d[0]; ok = true; return o; @@ -758,11 +758,11 @@ four_cover_points(Staircases< Traits >& d, OutputIterator o, bool& ok) // check disjoint for two-pierceability: - CGAL_optimisation_expensive_assertion( + CGAL_expensive_assertion( save_end == find_if(d.end(), save_end, [&d,&dist,&corner](const Point_2& p) { return d.r < dist(corner, p); })); - CGAL_optimisation_expensive_assertion( + CGAL_expensive_assertion( d.end() == find_if(d.begin(), d.end(), [&d,&dist,&corner](const Point_2& p) { return d.r >= dist(corner, p); })); diff --git a/thirdparty/CGAL/include/CGAL/point_generators_2.h b/thirdparty/CGAL/include/CGAL/point_generators_2.h index 30da3893..1615c9ea 100644 --- a/thirdparty/CGAL/include/CGAL/point_generators_2.h +++ b/thirdparty/CGAL/include/CGAL/point_generators_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generator/include/CGAL/point_generators_2.h $ -// $Id: point_generators_2.h d370326 2021-10-27T14:45:10+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generator/include/CGAL/point_generators_2.h $ +// $Id: include/CGAL/point_generators_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -658,7 +658,7 @@ struct Address_of { } }; -}//namesapce internal +}//namespace internal template ::Kernel::Triangle_2, diff --git a/thirdparty/CGAL/include/CGAL/point_generators_3.h b/thirdparty/CGAL/include/CGAL/point_generators_3.h index 1e663226..3d28771a 100644 --- a/thirdparty/CGAL/include/CGAL/point_generators_3.h +++ b/thirdparty/CGAL/include/CGAL/point_generators_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generator/include/CGAL/point_generators_3.h $ -// $Id: point_generators_3.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generator/include/CGAL/point_generators_3.h $ +// $Id: include/CGAL/point_generators_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/point_generators_d.h b/thirdparty/CGAL/include/CGAL/point_generators_d.h index f9236664..ceb9003f 100644 --- a/thirdparty/CGAL/include/CGAL/point_generators_d.h +++ b/thirdparty/CGAL/include/CGAL/point_generators_d.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generator/include/CGAL/point_generators_d.h $ -// $Id: point_generators_d.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generator/include/CGAL/point_generators_d.h $ +// $Id: include/CGAL/point_generators_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/pointmatcher/compute_registration_transformation.h b/thirdparty/CGAL/include/CGAL/pointmatcher/compute_registration_transformation.h index a81fe2d8..96049f77 100644 --- a/thirdparty/CGAL/include/CGAL/pointmatcher/compute_registration_transformation.h +++ b/thirdparty/CGAL/include/CGAL/pointmatcher/compute_registration_transformation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h $ -// $Id: compute_registration_transformation.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h $ +// $Id: include/CGAL/pointmatcher/compute_registration_transformation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Necip Fazil Yildiran @@ -23,13 +23,12 @@ #include #include -#include - #include #include #include #include +#include namespace CGAL { @@ -608,14 +607,14 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point // property map types typedef typename NP_helper1::Const_point_map PointMap1; typedef typename NP_helper2::Const_point_map PointMap2; - CGAL_static_assertion_msg((boost::is_same< typename boost::property_traits::value_type, - typename boost::property_traits::value_type> ::value), + static_assert(std::is_same< typename boost::property_traits::value_type, + typename boost::property_traits::value_type> ::value, "The point type of input ranges must be the same"); typedef typename NP_helper1::Normal_map NormalMap1; typedef typename NP_helper2::Normal_map NormalMap2; - CGAL_static_assertion_msg((boost::is_same< typename boost::property_traits::value_type, - typename boost::property_traits::value_type> ::value), + static_assert(std::is_same< typename boost::property_traits::value_type, + typename boost::property_traits::value_type> ::value, "The vector type of input ranges must be the same"); typedef typename std::iterator_traits::value_type key_type1; @@ -631,8 +630,8 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point NormalMap2 normal_map2 = NP_helper2::get_normal_map(point_set_2, np2); auto weight_map2 = choose_parameter(get_parameter(np2, internal_np::scalar_map), DefaultWeightMap2(Scalar(1))); - CGAL_static_assertion_msg((boost::is_same< typename boost::property_traits::value_type, - typename boost::property_traits::value_type> ::value), + static_assert(std::is_same< typename boost::property_traits::value_type, + typename boost::property_traits::value_type> ::value, "The scalar type of input ranges must be the same"); // initial transformation diff --git a/thirdparty/CGAL/include/CGAL/pointmatcher/register_point_sets.h b/thirdparty/CGAL/include/CGAL/pointmatcher/register_point_sets.h index cb6580b1..c1d2a774 100644 --- a/thirdparty/CGAL/include/CGAL/pointmatcher/register_point_sets.h +++ b/thirdparty/CGAL/include/CGAL/pointmatcher/register_point_sets.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/pointmatcher/register_point_sets.h $ -// $Id: register_point_sets.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/pointmatcher/register_point_sets.h $ +// $Id: include/CGAL/pointmatcher/register_point_sets.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Necip Fazil Yildiran @@ -23,10 +23,10 @@ #include -#include - #include +#include + namespace CGAL { namespace pointmatcher { diff --git a/thirdparty/CGAL/include/CGAL/poisson_refine_triangulation.h b/thirdparty/CGAL/include/CGAL/poisson_refine_triangulation.h index 92078e3e..4c46db0c 100644 --- a/thirdparty/CGAL/include/CGAL/poisson_refine_triangulation.h +++ b/thirdparty/CGAL/include/CGAL/poisson_refine_triangulation.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Poisson_surface_reconstruction_3/include/CGAL/poisson_refine_triangulation.h $ -// $Id: poisson_refine_triangulation.h 3ad94a7 2022-05-17T12:04:52+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Poisson_surface_reconstruction_3/include/CGAL/poisson_refine_triangulation.h $ +// $Id: include/CGAL/poisson_refine_triangulation.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent RINEAU, Laurent Saboret @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include namespace CGAL { @@ -86,7 +86,7 @@ class Poisson_mesher_level_impl_base : } public: - /* Overriden functions of this level: */ + /* Overridden functions of this level: */ /* we override all methods that call test_if_cell_is_bad() */ void scan_triangulation_impl() @@ -130,7 +130,7 @@ class Poisson_mesher_level_impl_base : private: - /* --- private datas --- */ + /* --- private data --- */ unsigned int max_vertices; ///< number of vertices bound (ignored if zero) }; // end Poisson_mesher_level_impl_base @@ -212,7 +212,7 @@ unsigned int poisson_refine_triangulation( { // Convergence is guaranteed if radius_edge_ratio_bound >= 1.0 - CGAL_surface_reconstruction_points_precondition(radius_edge_ratio_bound >= 1.0); + CGAL_precondition(radius_edge_ratio_bound >= 1.0); // Mesher_level types typedef Poisson_mesh_cell_criteria_3< diff --git a/thirdparty/CGAL/include/CGAL/poisson_surface_reconstruction.h b/thirdparty/CGAL/include/CGAL/poisson_surface_reconstruction.h index 343cbff9..66517ba9 100644 --- a/thirdparty/CGAL/include/CGAL/poisson_surface_reconstruction.h +++ b/thirdparty/CGAL/include/CGAL/poisson_surface_reconstruction.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Poisson_surface_reconstruction_3/include/CGAL/poisson_surface_reconstruction.h $ -// $Id: poisson_surface_reconstruction.h f43c55f 2022-01-13T09:43:22+01:00 Stéphane Laurent +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Poisson_surface_reconstruction_3/include/CGAL/poisson_surface_reconstruction.h $ +// $Id: include/CGAL/poisson_surface_reconstruction.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/polygon_function_objects.h b/thirdparty/CGAL/include/CGAL/polygon_function_objects.h index 578298ce..2a8ea46e 100644 --- a/thirdparty/CGAL/include/CGAL/polygon_function_objects.h +++ b/thirdparty/CGAL/include/CGAL/polygon_function_objects.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Partition_2/include/CGAL/polygon_function_objects.h $ -// $Id: polygon_function_objects.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Partition_2/include/CGAL/polygon_function_objects.h $ +// $Id: include/CGAL/polygon_function_objects.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/polygon_mesh_processing.h b/thirdparty/CGAL/include/CGAL/polygon_mesh_processing.h index 8f7d7b9f..31c22ba9 100644 --- a/thirdparty/CGAL/include/CGAL/polygon_mesh_processing.h +++ b/thirdparty/CGAL/include/CGAL/polygon_mesh_processing.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polygon_mesh_processing/include/CGAL/polygon_mesh_processing.h $ -// $Id: polygon_mesh_processing.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polygon_mesh_processing/include/CGAL/polygon_mesh_processing.h $ +// $Id: include/CGAL/polygon_mesh_processing.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,6 +17,11 @@ * the free functions of this package. */ +#ifndef CGAL_POLYGON_MESH_PROCESSING_H +#define CGAL_POLYGON_MESH_PROCESSING_H + +#include + #include #include #include @@ -49,21 +54,6 @@ #include #include #include +#include -// the named parameter header being not documented the doc is put here for now -#ifdef DOXYGEN_RUNNING -namespace CGAL { -namespace Polygon_mesh_processing { -namespace parameters { - -/*! \ingroup namedparameters -\deprecated This function is deprecated and `default_values()` should be used instead. -This function can be used to indicate that all optional named parameters -to be used are the default ones. This is particularly useful when a function -requires more than one sequence of named parameters and default values is -fine only for some of them. -*/ -unspecified_type all_default(); - -} } } // end of namespace CGAL::Polygon_mesh_processing::parameters -#endif +#endif //CGAL_POLYGON_MESH_PROCESSING_H diff --git a/thirdparty/CGAL/include/CGAL/polyhedron_cut_plane_3.h b/thirdparty/CGAL/include/CGAL/polyhedron_cut_plane_3.h index 9cbfef0f..d5a08d53 100644 --- a/thirdparty/CGAL/include/CGAL/polyhedron_cut_plane_3.h +++ b/thirdparty/CGAL/include/CGAL/polyhedron_cut_plane_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polyhedron/include/CGAL/polyhedron_cut_plane_3.h $ -// $Id: polyhedron_cut_plane_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polyhedron/include/CGAL/polyhedron_cut_plane_3.h $ +// $Id: include/CGAL/polyhedron_cut_plane_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/polynomial_utils.h b/thirdparty/CGAL/include/CGAL/polynomial_utils.h index a9159660..a6de3d51 100644 --- a/thirdparty/CGAL/include/CGAL/polynomial_utils.h +++ b/thirdparty/CGAL/include/CGAL/polynomial_utils.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polynomial/include/CGAL/polynomial_utils.h $ -// $Id: polynomial_utils.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polynomial/include/CGAL/polynomial_utils.h $ +// $Id: include/CGAL/polynomial_utils.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/predicates/Polygon_offset_pred_ftC2.h b/thirdparty/CGAL/include/CGAL/predicates/Polygon_offset_pred_ftC2.h index e7927dab..0d4ae7a0 100644 --- a/thirdparty/CGAL/include/CGAL/predicates/Polygon_offset_pred_ftC2.h +++ b/thirdparty/CGAL/include/CGAL/predicates/Polygon_offset_pred_ftC2.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/predicates/Polygon_offset_pred_ftC2.h $ -// $Id: Polygon_offset_pred_ftC2.h 13f19c4 2020-10-07T19:28:54+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/predicates/Polygon_offset_pred_ftC2.h $ +// $Id: include/CGAL/predicates/Polygon_offset_pred_ftC2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -17,8 +17,7 @@ #include #include -#include -#include +#include namespace CGAL { @@ -26,26 +25,25 @@ namespace CGAL_SS_i { // Given a triple of oriented straight line segments: (e0,e1,e2) such that // there exists a distance 'et' for which the offsets lines at 'et' (e0',e1',e2') intersect in a single point; -// returns the relative order of 't' w.r.t 'et'. +// returns the relative order of 't' w.r.t. 'et'. // PRECONDITION: There exists a positive distance et for which the offset triple intersect at a single point. template Uncertain compare_offset_against_isec_timeC2 ( typename K::FT const& t, - boost::intrusive_ptr< Trisegment_2 > > const& tri ) + Trisegment_2_ptr< Trisegment_2 > > const& tri ) { typedef typename K::FT FT ; typedef Rational Rational ; typedef Quotient Quotient ; - typedef boost::optional Optional_rational ; + typedef std::optional Optional_rational ; Uncertain rResult = Uncertain::indeterminate(); - No_cache > > lTime_cache ; - No_cache > > lCoeff_cache ; + No_caches no_caches; - Optional_rational et_ = compute_offset_lines_isec_timeC2(tri, lTime_cache, lCoeff_cache); + Optional_rational et_ = compute_offset_lines_isec_timeC2(tri, no_caches); if ( et_ ) { Quotient et = et_->to_quotient(); diff --git a/thirdparty/CGAL/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h b/thirdparty/CGAL/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h index 8ef9e361..1b00667e 100644 --- a/thirdparty/CGAL/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h +++ b/thirdparty/CGAL/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h @@ -2,8 +2,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h $ -// $Id: Straight_skeleton_pred_ftC2.h e2f1940 2023-01-04T16:17:15+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h $ +// $Id: include/CGAL/predicates/Straight_skeleton_pred_ftC2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Fernando Cacciola @@ -23,8 +23,7 @@ #include #include -#include -#include +#include #include @@ -37,10 +36,9 @@ namespace CGAL_SS_i { // the three points are along the same line, in any order. template inline -Uncertain certified_collinearC2( Point_2 const& p - , Point_2 const& q - , Point_2 const& r - ) +Uncertain certified_collinearC2( typename K::Point_2 const& p, + typename K::Point_2 const& q, + typename K::Point_2 const& r ) { return CGAL_NTS certified_is_equal( ( q.x() - p.x() ) * ( r.y() - p.y() ) , ( r.x() - p.x() ) * ( q.y() - p.y() ) @@ -52,10 +50,9 @@ Uncertain certified_collinearC2( Point_2 const& p // q is in the closed segment [p,r]. template inline -Uncertain certified_collinear_are_ordered_along_lineC2( Point_2 const& p - , Point_2 const& q - , Point_2 const& r - ) +Uncertain certified_collinear_are_ordered_along_lineC2( typename K::Point_2 const& p, + typename K::Point_2 const& q, + typename K::Point_2 const& r ) { if ( CGAL_NTS certainly(p.x() < q.x()) ) return !(r.x() < q.x()); if ( CGAL_NTS certainly(q.x() < p.x()) ) return !(q.x() < r.x()); @@ -101,7 +98,7 @@ Uncertain are_parallel_edges_equally_orientedC2( Segment_2_with_ID cons } -// Returns true IFF segments e0,e1 share the same supporting line but do not overlap except at the vetices, and have the same orientation. +// Returns true IFF segments e0,e1 share the same supporting line but do not overlap except at the vertices, and have the same orientation. // NOTE: If e1 goes back over e0 (a degenerate antenna or alley) this returns false. template Uncertain are_edges_orderly_collinearC2( Segment_2_with_ID const& e0, Segment_2_with_ID const& e1 ) @@ -116,50 +113,6 @@ Uncertain certified_side_of_oriented_lineC2(const FT &a, const FT &b, cons return CGAL_NTS certified_sign(a*x+b*y+c); } - -// -// Constructs a Trisegment_2 which stores 3 edges (segments) such that -// if two of them are collinear, they are put first, as e0, e1. -// Stores also the number of collinear edges. which should be 0 or 2. -// -// If the collinearity test is indeterminate for any pair of edges the -// resulting sorted trisegment is itself indeterminate -// (encoded as a collinear count of -1) -// -template -Uncertain certified_trisegment_collinearity ( Segment_2_with_ID const& e0 - , Segment_2_with_ID const& e1 - , Segment_2_with_ID const& e2 - ) -{ - Uncertain is_01 = are_edges_orderly_collinearC2(e0,e1); - if ( is_certain(is_01) ) - { - Uncertain is_02 = are_edges_orderly_collinearC2(e0,e2); - if ( is_certain(is_02) ) - { - Uncertain is_12 = are_edges_orderly_collinearC2(e1,e2); - if ( is_certain(is_12) ) - { - if ( CGAL_NTS logical_and(is_01 , !is_02 , !is_12 ) ) - return TRISEGMENT_COLLINEARITY_01; - else if ( CGAL_NTS logical_and(is_02 , !is_01 , !is_12 ) ) - return TRISEGMENT_COLLINEARITY_02; - else if ( CGAL_NTS logical_and(is_12 , !is_01 , !is_02 ) ) - return TRISEGMENT_COLLINEARITY_12; - else if ( CGAL_NTS logical_and(!is_01 , !is_02, !is_12 ) ) - return TRISEGMENT_COLLINEARITY_NONE; - else - return TRISEGMENT_COLLINEARITY_ALL; - } - } - } - - return Uncertain::indeterminate(); -} - - - // Given 3 oriented straight line segments: e0, e1, e2 // returns true if there exists some positive offset distance 't' for which the // leftward-offsets of their supporting lines intersect at a single point. @@ -170,28 +123,30 @@ Uncertain certified_trisegment_collinearity ( Segment_2 // is well defined, In that case, the degenerate vertex can be even a contour vertex or a skeleton node. If it is a skeleton // node, it is properly defined by the trisegment tree that corresponds to the node. // A trisegment tree stores not only the "current event" trisegment but also the trisegments for the left/right seed vertices, -// recursivey in case the seed vertices are skeleton nodes as well. +// recursively in case the seed vertices are skeleton nodes as well. // Those seeds are used to determine the actual position of the degenerate vertex in case of collinear edges (since that point is // not given by the collinear edges alone) // -template -Uncertain exist_offset_lines_isec2 ( boost::intrusive_ptr< Trisegment_2 > > const& tri, - boost::optional const& aMaxTime, - TimeCache& aTime_cache, - CoeffCache& aCoeff_cache ) +template +Uncertain exist_offset_lines_isec2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, + std::optional const& aMaxTime, + Caches& aCaches ) { typedef Rational Rational ; - typedef boost::optional Optional_rational ; + typedef std::optional Optional_rational ; typedef Quotient Quotient ; Uncertain rResult = Uncertain::indeterminate(); + CGAL_STSKEL_TRAITS_TRACE( "\n~~ Checking existence of an event [" << typeid(FT).name() << "]"); + CGAL_STSKEL_TRAITS_TRACE("Event:\n" << tri); + if ( tri->collinearity() != TRISEGMENT_COLLINEARITY_ALL ) { CGAL_STSKEL_TRAITS_TRACE( ( tri->collinearity() == TRISEGMENT_COLLINEARITY_NONE ? " normal edges" : " collinear edges" ) ) ; - Optional_rational t = compute_offset_lines_isec_timeC2(tri, aTime_cache, aCoeff_cache) ; + Optional_rational t = compute_offset_lines_isec_timeC2(tri, aCaches) ; if ( t ) { Uncertain d_is_zero = CGAL_NTS certified_is_zero(t->d()) ; @@ -206,25 +161,27 @@ Uncertain exist_offset_lines_isec2 ( boost::intrusive_ptr< Trisegment_2 exist_offset_lines_isec2 ( boost::intrusive_ptr< Trisegment_2 +template Uncertain -compare_offset_lines_isec_timesC2 ( boost::intrusive_ptr< Trisegment_2 > > const& m, - boost::intrusive_ptr< Trisegment_2 > > const& n, - TimeCache& aTime_cache, - CoeffCache& aCoeff_cache ) +compare_offset_lines_isec_timesC2 ( Trisegment_2_ptr< Trisegment_2 > > const& m, + Trisegment_2_ptr< Trisegment_2 > > const& n, + Caches& aCaches ) { typedef typename K::FT FT ; typedef Rational Rational ; typedef Quotient Quotient ; - typedef boost::optional Optional_rational ; + typedef std::optional Optional_rational ; + + CGAL_STSKEL_TRAITS_TRACE("compare_offset_lines_isec_timesC2(\n" << m << "\n" << n << "\n) [" << typeid(FT).name() << "]" ); Uncertain rResult = Uncertain::indeterminate(); - Optional_rational mt_ = compute_offset_lines_isec_timeC2(m, aTime_cache, aCoeff_cache); - Optional_rational nt_ = compute_offset_lines_isec_timeC2(n, aTime_cache, aCoeff_cache); + Optional_rational mt_ = compute_offset_lines_isec_timeC2(m, aCaches); + Optional_rational nt_ = compute_offset_lines_isec_timeC2(n, aCaches); if ( mt_ && nt_ ) { Quotient mt = mt_->to_quotient(); Quotient nt = nt_->to_quotient(); + if ( CGAL_NTS certified_is_positive(mt) && CGAL_NTS certified_is_positive(nt) ) rResult = CGAL_NTS certified_compare(mt,nt); } @@ -297,11 +256,10 @@ Uncertain compare_isec_anglesC2 ( Vector_2 const& aBV1 return rResult; } - // Returns true if the point aP is on the positive side of the line supporting the edge // template -Uncertain is_edge_facing_pointC2 ( boost::optional< Point_2 > const& aP, +Uncertain is_edge_facing_pointC2 ( std::optional< typename K::Point_2 > const& aP, Segment_2_with_ID const& aEdge ) { typedef typename K::FT FT ; @@ -319,17 +277,17 @@ Uncertain is_edge_facing_pointC2 ( boost::optional< Point_2 > const& aP // Given a triple of oriented straight line segments: (e0,e1,e2) such that their offsets // at some distance intersects in a point (x,y), returns true if (x,y) is on the positive side of the line supporting aEdge // -template +template inline Uncertain -is_edge_facing_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2 > > const& tri, +is_edge_facing_offset_lines_isecC2 ( Trisegment_2_ptr< Trisegment_2 > > const& tri, Segment_2_with_ID const& aEdge, - CoeffCache& aCoeff_cache) + Caches& aCaches ) { - return is_edge_facing_pointC2(construct_offset_lines_isecC2(tri, aCoeff_cache), aEdge); + return is_edge_facing_pointC2(construct_offset_lines_isecC2(tri, aCaches), aEdge); } // Given an event trisegment and two oriented straight line segments e0 and e1, returns the oriented side of the event point -// w.r.t the (positive) bisector [e0,e1]. +// w.r.t. the (positive) bisector [e0,e1]. // // The (positive) bisector [e0,e1] is a ray starting at the vertex (e0,e1) (called "v01") // @@ -350,7 +308,7 @@ is_edge_facing_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2 +template Uncertain -oriented_side_of_event_point_wrt_bisectorC2 ( boost::intrusive_ptr< Trisegment_2 > > const& event, +oriented_side_of_event_point_wrt_bisectorC2 ( Trisegment_2_ptr< Trisegment_2 > > const& event, Segment_2_with_ID const& e0, + typename K::FT const& w0, Segment_2_with_ID const& e1, - boost::intrusive_ptr< Trisegment_2 > > const& v01_event, // can be null + typename K::FT const& w1, + Trisegment_2_ptr< Trisegment_2 > > const& v01_event, // can be null bool primary_is_0, - CoeffCache& aCoeff_cache ) + Caches& aCaches ) { typedef typename K::FT FT ; - typedef Point_2 Point_2 ; - typedef Line_2 Line_2 ; + typedef typename K::Point_2 Point_2 ; + typedef typename K::Line_2 Line_2 ; Uncertain rResult = Uncertain::indeterminate(); try { - Point_2 p = validate(construct_offset_lines_isecC2(event, aCoeff_cache)); + Point_2 p = validate(construct_offset_lines_isecC2(event, aCaches)); - Line_2 l0 = validate(compute_normalized_line_ceoffC2(e0, aCoeff_cache)) ; - Line_2 l1 = validate(compute_normalized_line_ceoffC2(e1, aCoeff_cache)) ; + Line_2 l0 = validate(compute_weighted_line_coeffC2(e0, w0, aCaches)); + Line_2 l1 = validate(compute_weighted_line_coeffC2(e1, w1, aCaches)); - CGAL_STSKEL_TRAITS_TRACE("Getting oriented side of point " << p2str(p) - << " w.r.t bisector [" + CGAL_STSKEL_TRAITS_TRACE("\n~~ Oriented side of point [" << typeid(FT).name() << "]" ); + CGAL_STSKEL_TRAITS_TRACE("p = " << p2str(p) + << " w.r.t. bisector of [E" << e0.id() << " " << s2str(e0) << ( primary_is_0 ? "*" : "" ) - << "," + << ", E" << e1.id() << " " << s2str(e1) << ( primary_is_0 ? "" : "*" ) << "]" ) ; @@ -429,15 +390,17 @@ oriented_side_of_event_point_wrt_bisectorC2 ( boost::intrusive_ptr< Trisegment_2 // We need to compute the actual bisector line. CGAL_assertion( v01_event || ( !v01_event && e0.target() == e1.source() ) ) ; - Point_2 v01 = v01_event ? validate( construct_offset_lines_isecC2(v01_event, aCoeff_cache) ) : e1.source() ; + Point_2 v01 = v01_event ? validate(construct_offset_lines_isecC2(v01_event, aCaches)) + : e1.source() ; - CGAL_STSKEL_TRAITS_TRACE("v01=" << p2str(v01) << ( v01_event ? " (from skelton node)" : "" ) ) ; + CGAL_STSKEL_TRAITS_TRACE("v01=" << p2str(v01) << ( v01_event ? " (from skeleton node)" : "" ) ) ; - // (a,b,c) is a line perpedincular to the primary edge through v01. + // (a,b,c) is a line perpendicular to the primary edge through v01. // If e0 and e1 are collinear this line is the actual perpendicular bisector. // - // If e0 and e1 are parallel but not collinear (then neccesarrily facing each other) this line - // is NOT the bisector, but the serves to determine the side of the point (projected along the primary ege) w.r.t vertex v01. + // If e0 and e1 are parallel but not collinear (then necessarily facing each other) this line + // is NOT the bisector, but it serves to determine the side of the point (projected along + // the primary edge) w.r.t. vertex v01. FT a, b, c ; perpendicular_through_pointC2( primary_is_0 ? l0.a() : l1.a() @@ -456,13 +419,14 @@ oriented_side_of_event_point_wrt_bisectorC2 ( boost::intrusive_ptr< Trisegment_2 FT sd_p_l0 = validate(l0.a() * p.x() + l0.b() * p.y() + l0.c()) ; FT sd_p_l1 = validate(l1.a() * p.x() + l1.b() * p.y() + l1.c()) ; - CGAL_STSKEL_TRAITS_TRACE("sd_p_l1=" << n2str(sd_p_l1) ) ; - CGAL_STSKEL_TRAITS_TRACE("sd_p_l0=" << n2str(sd_p_l0) ) ; + CGAL_STSKEL_TRAITS_TRACE("sd_p_l0 = " << n2str(sd_p_l0) ) ; + CGAL_STSKEL_TRAITS_TRACE("sd_p_l1 = " << n2str(sd_p_l1) ) ; - Uncertain equal = CGAL_NTS certified_is_equal(sd_p_l0,sd_p_l1) ; - if ( is_certain(equal) ) + Uncertain lCmpResult = CGAL_NTS certified_compare(sd_p_l0,sd_p_l1) ; + if ( is_certain(lCmpResult) ) { - if ( equal ) + CGAL_STSKEL_TRAITS_TRACE("compare(sd_p_l0, sd_p_l1) = " << lCmpResult ) ; + if ( lCmpResult == EQUAL ) { CGAL_STSKEL_TRAITS_TRACE("Point is exactly at bisector"); @@ -476,17 +440,13 @@ oriented_side_of_event_point_wrt_bisectorC2 ( boost::intrusive_ptr< Trisegment_2 // Reflex bisector? if ( smaller ) { - rResult = CGAL_NTS certified_is_smaller(sd_p_l0,sd_p_l1) ? ON_NEGATIVE_SIDE - : ON_POSITIVE_SIDE ; - - CGAL_STSKEL_TRAITS_TRACE("\nEvent point is at " << rResult << " side of reflex bisector" ) ; + rResult = (lCmpResult == SMALLER) ? ON_NEGATIVE_SIDE : ON_POSITIVE_SIDE ; + CGAL_STSKEL_TRAITS_TRACE("Event point is on " << ((rResult > 0) ? "POSITIVE" : "NEGATIVE") << " side of reflex bisector" ) ; } else { - rResult = CGAL_NTS certified_is_larger (sd_p_l0,sd_p_l1) ? ON_NEGATIVE_SIDE - : ON_POSITIVE_SIDE ; - - CGAL_STSKEL_TRAITS_TRACE("\nEvent point is at " << rResult << " side of convex bisector" ) ; + rResult = (lCmpResult == LARGER) ? ON_NEGATIVE_SIDE : ON_POSITIVE_SIDE ; + CGAL_STSKEL_TRAITS_TRACE("Event point is on " << ((rResult > 0) ? "POSITIVE" : "NEGATIVE") << " side of convex bisector" ) ; } } } @@ -514,26 +474,25 @@ oriented_side_of_event_point_wrt_bisectorC2 ( boost::intrusive_ptr< Trisegment_2 // PRECONDITIONS: // There exists single points at which the offset lines for 'l' and 'r' at 'tl', 'tr' intersect. // -template -Uncertain are_events_simultaneousC2 ( boost::intrusive_ptr< Trisegment_2 > > const& l, - boost::intrusive_ptr< Trisegment_2 > > const& r, - TimeCache& aTime_cache, - CoeffCache& aCoeff_cache ) +template +Uncertain are_events_simultaneousC2 ( Trisegment_2_ptr< Trisegment_2 > > const& l, + Trisegment_2_ptr< Trisegment_2 > > const& r, + Caches& aCaches ) { typedef typename K::FT FT ; - typedef Point_2 Point_2 ; + typedef typename K::Point_2 Point_2 ; typedef Rational Rational ; typedef Quotient Quotient ; - typedef boost::optional Optional_rational ; - typedef boost::optional Optional_point_2 ; + typedef std::optional Optional_rational ; + typedef std::optional Optional_point_2 ; Uncertain rResult = Uncertain::indeterminate(); - Optional_rational lt_ = compute_offset_lines_isec_timeC2(l, aTime_cache, aCoeff_cache); - Optional_rational rt_ = compute_offset_lines_isec_timeC2(r, aTime_cache, aCoeff_cache); + Optional_rational lt_ = compute_offset_lines_isec_timeC2(l, aCaches); + Optional_rational rt_ = compute_offset_lines_isec_timeC2(r, aCaches); if ( lt_ && rt_ ) { @@ -548,8 +507,8 @@ Uncertain are_events_simultaneousC2 ( boost::intrusive_ptr< Trisegment_2x(),ri->x()) diff --git a/thirdparty/CGAL/include/CGAL/predicates/kernel_ftC2.h b/thirdparty/CGAL/include/CGAL/predicates/kernel_ftC2.h index 39190f5b..84ebeeae 100644 --- a/thirdparty/CGAL/include/CGAL/predicates/kernel_ftC2.h +++ b/thirdparty/CGAL/include/CGAL/predicates/kernel_ftC2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/predicates/kernel_ftC2.h $ -// $Id: kernel_ftC2.h 65ea1e3 2021-09-29T16:55:36+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/predicates/kernel_ftC2.h $ +// $Id: include/CGAL/predicates/kernel_ftC2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/predicates/kernel_ftC3.h b/thirdparty/CGAL/include/CGAL/predicates/kernel_ftC3.h index 7d0ed1af..3d2e5b6e 100644 --- a/thirdparty/CGAL/include/CGAL/predicates/kernel_ftC3.h +++ b/thirdparty/CGAL/include/CGAL/predicates/kernel_ftC3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h $ -// $Id: kernel_ftC3.h 68dc09b 2021-04-10T07:10:29+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h $ +// $Id: include/CGAL/predicates/kernel_ftC3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -102,12 +102,14 @@ collinearC3(const FT &px, const FT &py, const FT &pz, FT dqx = qx-rx; FT dpy = py-ry; FT dqy = qy-ry; - if (sign_of_determinant(dpx, dqx, dpy, dqy) != ZERO) + + auto is_zero = sign_of_determinant(dpx, dqx, dpy, dqy) == ZERO; + if (certainly_not(is_zero)) return false; FT dpz = pz-rz; FT dqz = qz-rz; - return CGAL_AND( sign_of_determinant(dpx, dqx, dpz, dqz) == ZERO , - sign_of_determinant(dpy, dqy, dpz, dqz) == ZERO ); + return is_zero & CGAL_AND( sign_of_determinant(dpx, dqx, dpz, dqz) == ZERO , + sign_of_determinant(dpy, dqy, dpz, dqz) == ZERO ); } template < class FT > @@ -407,7 +409,7 @@ cmp_dist_to_pointC3(const FT &px, const FT &py, const FT &pz, } // Because of the way the filtered predicates generator script works, -// cmp_dist_to_pointC3() must be defined _before_ ths following one. +// cmp_dist_to_pointC3() must be defined _before_ the following one. template CGAL_KERNEL_MEDIUM_INLINE typename Same_uncertainty_nt::type @@ -754,7 +756,7 @@ power_side_of_bounded_power_sphereC3( } // return the sign of the power test of weighted point (rx,ry,rz,rw) - // with respect to the smallest sphere orthogoanal to + // with respect to the smallest sphere orthogonal to // p,q template< class FT > typename Same_uncertainty_nt::type @@ -764,20 +766,19 @@ power_side_of_bounded_power_sphereC3( const FT &rx, const FT &ry, const FT &rz, const FT &rw) { FT FT2(2); - FT FT4(4); FT dpx = px - qx; FT dpy = py - qy; FT dpz = pz - qz; FT dpw = pw - qw; FT dp2 = CGAL_NTS square(dpx) + CGAL_NTS square(dpy) + CGAL_NTS square(dpz); - FT drx = rx - (px + qx)/FT2; - FT dry = ry - (py + qy)/FT2; - FT drz = rz - (pz + qz)/FT2; - FT drw = rw - (pw + qw)/FT2; + FT drx = FT2 * rx - (px + qx); + FT dry = FT2 * ry - (py + qy); + FT drz = FT2 * rz - (pz + qz); + FT drw = FT2 * rw - (pw + qw); FT dr2 = CGAL_NTS square(drx) + CGAL_NTS square(dry) + CGAL_NTS square(drz); FT dpr = dpx*drx + dpy*dry +dpz*drz; return enum_cast( - - CGAL_NTS sign (dr2 - dp2/FT4 + dpr*dpw/dp2 - drw )); + - CGAL_NTS sign (dr2*dp2 - dp2*dp2 + FT2*dpr*dpw - FT2*drw*dp2 )); } } // namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/predicates/predicates_for_mixed_complex_3.h b/thirdparty/CGAL/include/CGAL/predicates/predicates_for_mixed_complex_3.h index c6aeefa0..7ddfe900 100644 --- a/thirdparty/CGAL/include/CGAL/predicates/predicates_for_mixed_complex_3.h +++ b/thirdparty/CGAL/include/CGAL/predicates/predicates_for_mixed_complex_3.h @@ -3,9 +3,9 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/predicates/predicates_for_mixed_complex_3.h $ +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/predicates/predicates_for_mixed_complex_3.h $ -// $Id: predicates_for_mixed_complex_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $Id: include/CGAL/predicates/predicates_for_mixed_complex_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h b/thirdparty/CGAL/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h index b48c4bd6..3d430382 100644 --- a/thirdparty/CGAL/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h +++ b/thirdparty/CGAL/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interpolation/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h $ -// $Id: predicates_for_voronoi_intersection_cartesian_2_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interpolation/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h $ +// $Id: include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -67,7 +67,7 @@ side_of_plane_centered_sphereC3(const RT &ax, const RT &ay, const RT &az, // return: sign( (c-p)(c-p) - (c-t)(c-t)) // //method: - // - tranlation of p to the origin. + // - translation of p to the origin. // - separate computation of det and norm of the expression return side_of_plane_centered_sphere_translateC3(ax-px, ay-py, az-pz, @@ -136,7 +136,7 @@ side_of_plane_centered_sphereC3(const RT &ax, const RT &ay, const RT &az, // return: sign( (c-p)(c-p) - (c-r)(c-r)) // //method: - // - tranlation of p to the origin. + // - translation of p to the origin. // - separate computation of det and nom of the expression return side_of_plane_centered_sphere_translateC3(ax-px, ay-py, az-pz, diff --git a/thirdparty/CGAL/include/CGAL/predicates/sign_of_determinant.h b/thirdparty/CGAL/include/CGAL/predicates/sign_of_determinant.h index 2dc84586..ec82bac1 100644 --- a/thirdparty/CGAL/include/CGAL/predicates/sign_of_determinant.h +++ b/thirdparty/CGAL/include/CGAL/predicates/sign_of_determinant.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/predicates/sign_of_determinant.h $ -// $Id: sign_of_determinant.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/predicates/sign_of_determinant.h $ +// $Id: include/CGAL/predicates/sign_of_determinant.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/predicates_d.h b/thirdparty/CGAL/include/CGAL/predicates_d.h index eb7cbb56..c4ce9731 100644 --- a/thirdparty/CGAL/include/CGAL/predicates_d.h +++ b/thirdparty/CGAL/include/CGAL/predicates_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/predicates_d.h $ -// $Id: predicates_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/predicates_d.h $ +// $Id: include/CGAL/predicates_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -177,7 +177,7 @@ affinely independent. template Comparison_result compare_lexicographically( const Point_d& p1, const Point_d& p2) -/*{\Mfunc compares the Cartesian coordiantes of points |p1| and |p2| +/*{\Mfunc compares the Cartesian coordinates of points |p1| and |p2| lexicographically.}*/ { typename R::Compare_lexicographically_d cmp; return cmp(p1,p2); } diff --git a/thirdparty/CGAL/include/CGAL/predicates_on_lines_2.h b/thirdparty/CGAL/include/CGAL/predicates_on_lines_2.h index cb7b8753..8ffe4946 100644 --- a/thirdparty/CGAL/include/CGAL/predicates_on_lines_2.h +++ b/thirdparty/CGAL/include/CGAL/predicates_on_lines_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/predicates_on_lines_2.h $ -// $Id: predicates_on_lines_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/predicates_on_lines_2.h $ +// $Id: include/CGAL/predicates_on_lines_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/predicates_on_points_2.h b/thirdparty/CGAL/include/CGAL/predicates_on_points_2.h index db3a8d3f..379b8965 100644 --- a/thirdparty/CGAL/include/CGAL/predicates_on_points_2.h +++ b/thirdparty/CGAL/include/CGAL/predicates_on_points_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/predicates_on_points_2.h $ -// $Id: predicates_on_points_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/predicates_on_points_2.h $ +// $Id: include/CGAL/predicates_on_points_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/predicates_on_points_3.h b/thirdparty/CGAL/include/CGAL/predicates_on_points_3.h index 3fa8c20b..ac742eaf 100644 --- a/thirdparty/CGAL/include/CGAL/predicates_on_points_3.h +++ b/thirdparty/CGAL/include/CGAL/predicates_on_points_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/predicates_on_points_3.h $ -// $Id: predicates_on_points_3.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/predicates_on_points_3.h $ +// $Id: include/CGAL/predicates_on_points_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/primes.h b/thirdparty/CGAL/include/CGAL/primes.h index 10e68cef..3868b460 100644 --- a/thirdparty/CGAL/include/CGAL/primes.h +++ b/thirdparty/CGAL/include/CGAL/primes.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Modular_arithmetic/include/CGAL/primes.h $ -// $Id: primes.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Modular_arithmetic/include/CGAL/primes.h $ +// $Id: include/CGAL/primes.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/property_map.h b/thirdparty/CGAL/include/CGAL/property_map.h index 1e93da00..7d104e03 100644 --- a/thirdparty/CGAL/include/CGAL/property_map.h +++ b/thirdparty/CGAL/include/CGAL/property_map.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Property_map/include/CGAL/property_map.h $ -// $Id: property_map.h 62936f8 2022-06-13T17:01:35+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Property_map/include/CGAL/property_map.h $ +// $Id: include/CGAL/property_map.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Fabri and Laurent Saboret @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -72,9 +73,7 @@ class OR_property_map { typedef typename PM1::reference reference; typedef boost::read_write_property_map_tag category; - OR_property_map() {} // required by boost::connected_components - - OR_property_map(PM1 pm1, PM2 pm2) + OR_property_map(PM1 pm1 = PM1(), PM2 pm2 = PM2()) : pm1(pm1),pm2(pm2) {} @@ -101,87 +100,208 @@ make_OR_property_map(const PM1& pm1, const PM2& pm2) return OR_property_map(pm1, pm2); } -// A property map that uses the result of a property map as key. +/// Property map that accesses a value from an iterator +/// +/// \cgalModels{ReadablePropertyMap} +/// +/// \tparam InputIterator an input iterator +/// \endcond +template +struct Input_iterator_property_map{ + typedef InputIterator key_type; + typedef typename std::iterator_traits::value_type value_type; + typedef typename std::iterator_traits::reference reference; + typedef boost::readable_property_map_tag category; + + /// Free function to use a get the value from an iterator using Input_iterator_property_map. + inline friend + reference + get(Input_iterator_property_map, const InputIterator& it){ return *it; } +}; + +#ifdef DOXYGEN_RUNNING +/// \ingroup PkgPropertyMapRef +/// Property map that composes two property maps, +/// that is a call on an instance `Compose_property_map compose_property_map(key_map, value_map)` of `get(compose_property_map, k)` returns `get(value_map, get(key_map, k))`. template -struct Property_map_binder +struct Compose_property_map { + ///< Use the key type of `KeyMap` as keytype typedef typename boost::property_traits::key_type key_type; + ///< Use the value type of `ValueMap` as value type typedef typename boost::property_traits::value_type value_type; + ///< Use the reference type of `ValueMap` as reference typedef typename boost::property_traits::reference reference; - typedef boost::read_write_property_map_tag category; + ///< Use the category of the `ValueMap` + typedef typename boost::property_traits::category category; + + /// Constructor + Compose_property_map(KeyMap key_map = KeyMap(), + ValueMap value_map = ValueMap()); +}; +#else +template ::category> +struct Compose_property_map; + +template +struct Compose_property_map +{ + typedef typename boost::property_traits::key_type key_type; + typedef typename boost::property_traits::value_type value_type; + typedef typename boost::property_traits::reference reference; + typedef typename boost::property_traits::category category; KeyMap key_map; ValueMap value_map; - Property_map_binder(const KeyMap& key_map = KeyMap(), - const ValueMap& value_map = ValueMap()) + Compose_property_map(KeyMap key_map = KeyMap(), + ValueMap value_map = ValueMap()) : key_map(key_map), value_map(value_map) - { } + {} - template - Property_map_binder(const VM& value_map, - typename std::enable_if::value>::type* = nullptr) + Compose_property_map(Default, + ValueMap value_map = ValueMap()) : value_map(value_map) - { } + {} friend - reference get(const Property_map_binder& map, key_type k) + reference get(Compose_property_map map, const key_type& k) { return get(map.value_map, get(map.key_map,k)); } +}; + +template +struct Compose_property_map +{ + typedef typename boost::property_traits::key_type key_type; + typedef typename boost::property_traits::value_type value_type; + typedef typename boost::property_traits::reference reference; + typedef typename boost::property_traits::category category; + + KeyMap key_map; + ValueMap value_map; + + Compose_property_map(KeyMap key_map = KeyMap(), + ValueMap value_map = ValueMap()) + : key_map(key_map), value_map(value_map) + {} + + Compose_property_map(Default, + ValueMap value_map = ValueMap()) + : value_map(value_map) + {} + friend - void put(const Property_map_binder& map, key_type k, const value_type& v) + void put(Compose_property_map map, const key_type& k, const value_type& v) { put(map.value_map, get(map.key_map,k), v); } }; template -Property_map_binder -bind_property_maps(const KeyMap& src, const ValueMap& tgt) +struct Compose_property_map { - return Property_map_binder(src, tgt); -} + typedef typename boost::property_traits::key_type key_type; + typedef typename boost::property_traits::value_type value_type; + typedef typename boost::property_traits::reference reference; + typedef typename boost::property_traits::category category; + KeyMap key_map; + ValueMap value_map; -/// Property map that accesses a value from an iterator -/// -/// \cgalModels `ReadablePropertyMap` -/// -/// \tparam InputIterator an input iterator -/// \endcond -template -struct Input_iterator_property_map{ - typedef InputIterator key_type; - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::reference reference; - typedef boost::readable_property_map_tag category; + Compose_property_map(KeyMap key_map = KeyMap(), + ValueMap value_map = ValueMap()) + : key_map(key_map), value_map(value_map) + {} - /// Free function to use a get the value from an iterator using Input_iterator_property_map. - inline friend - reference - get(Input_iterator_property_map,InputIterator it){ return *it; } + Compose_property_map(Default, + ValueMap value_map = ValueMap()) + : value_map(value_map) + {} + + friend + reference get(Compose_property_map map, const key_type& k) + { + return get(map.value_map, get(map.key_map,k)); + } + + friend + void put(const Compose_property_map& map, const key_type& k, const value_type& v) + { + put(map.value_map, get(map.key_map,k), v); + } }; +template +struct Compose_property_map +{ + typedef typename boost::property_traits::key_type key_type; + typedef typename boost::property_traits::value_type value_type; + typedef typename boost::property_traits::reference reference; + typedef typename boost::property_traits::category category; + + KeyMap key_map; + ValueMap value_map; + + Compose_property_map(KeyMap key_map = KeyMap(), + ValueMap value_map = ValueMap()) + : key_map(key_map), value_map(value_map) + {} + + Compose_property_map(Default, + ValueMap value_map = ValueMap()) + : value_map(value_map) + {} + + friend + reference get(Compose_property_map map, const key_type& k) + { + return get(map.value_map, get(map.key_map,k)); + } + + friend + void put(Compose_property_map map, key_type k, const value_type& v) + { + put(map.value_map, get(map.key_map,k), v); + } + + decltype(auto) + operator[](const key_type& k) const + { + return value_map[get(key_map, k)]; + } +}; +#endif +/// \ingroup PkgPropertyMapRef +/// \relates Compose_property_map +/// returns `Compose_property_maps(km,vm)` +template +Compose_property_map +make_compose_property_map(const KeyMap& km, const ValueMap& vm) +{ + return Compose_property_map(km, vm); +} + /// \ingroup PkgPropertyMapRef /// Property map that converts a `T*` pointer (or in general an iterator /// over `T` elements) to the `T` object. /// -/// \cgalModels `LvaluePropertyMap` -template +/// \cgalModels{LvaluePropertyMap} +template struct Dereference_property_map - : public boost::put_get_helper > + : public boost::put_get_helper::reference, Dereference_property_map > { - typedef T* key_type; ///< typedef to 'T*' - typedef T value_type; ///< typedef to 'T' - typedef T& reference; ///< typedef to 'T&' + typedef Iter key_type; ///< typedef to 'T*' + typedef std::remove_const_t value_type; ///< typedef to 'T' + typedef typename std::iterator_traits::reference reference; ///< typedef to 'T&' typedef boost::lvalue_property_map_tag category; ///< `boost::lvalue_property_map_tag` /// Access a property map element. /// /// @tparam Iter Type convertible to `key_type`. - template - value_type& operator[](Iter it) const { return *it; } + template // template kept for backward compatibility + reference operator[](const Iter_& it) const { return *it; } }; /// Free function to create a `Dereference_property_map` property map. @@ -199,7 +319,7 @@ make_dereference_property_map(Iter) /// A `LvaluePropertyMap` property map mapping a key to itself (by reference). /// It is mutable if `T` is not `const` and non-mutable otherwise. /// -/// \cgalModels `LvaluePropertyMap` +/// \cgalModels{LvaluePropertyMap} template struct Identity_property_map { @@ -211,11 +331,14 @@ struct Identity_property_map typedef T& reference; typedef boost::lvalue_property_map_tag category; - value_type& operator[](key_type& k) const { return k; } + T& operator[](T& k) const { return k; } + const T& operator[](const T& k) const { return k; } + T operator[](T&& k) const { return std::forward(k); } - friend value_type& get(const Self&, key_type& k) { return k; } - friend const value_type& get(const Self&, const key_type& k) { return k; } - friend void put(const Self&, key_type& k, const value_type& v) { k = v; } + friend T& get(const Self&, T& k) { return k; } + friend const T& get(const Self&, const T& k) { return k; } + friend T get(const Self&, T&& k) { return std::forward(k); } + friend void put(const Self&, T& k, const T& v) { k = v; } /// \endcond }; @@ -262,7 +385,7 @@ Identity_property_map /// \ingroup PkgPropertyMapRef /// Property map that accesses the first item of a `std::pair`. /// \tparam Pair Instance of `std::pair`. -/// \cgalModels `LvaluePropertyMap` +/// \cgalModels{LvaluePropertyMap} /// /// \sa `CGAL::Second_of_pair_property_map` template @@ -302,7 +425,7 @@ First_of_pair_property_map /// /// \tparam Pair Instance of `std::pair`. /// -/// \cgalModels `LvaluePropertyMap` +/// \cgalModels{LvaluePropertyMap} /// /// \sa `CGAL::First_of_pair_property_map` template @@ -343,7 +466,7 @@ Second_of_pair_property_map /// \tparam N %Index of the item to access. /// \tparam Tuple Instance of `boost::tuple` or `std::tuple`. /// -/// \cgalModels `LvaluePropertyMap` +/// \cgalModels{LvaluePropertyMap} template struct Nth_of_tuple_property_map { @@ -437,7 +560,7 @@ struct Pointer_property_map{ /// \ingroup PkgPropertyMapRef /// Starting from boost 1.55, the use of raw pointers as property maps has been deprecated. -/// This function is a shortcut to the recommanded replacement: +/// This function is a shortcut to the recommended replacement: /// `boost::make_iterator_property_map(, boost::typed_identity_property_map())` /// Note that the property map is a mutable `LvaluePropertyMap` with `std::size_t` as key. template @@ -488,7 +611,7 @@ make_property_map(const std::vector& v) /// Note that this value is chosen when the map is constructed and cannot /// be changed afterwards. Specifically, the free function `put()` does nothing. /// -/// \cgalModels `ReadWritePropertyMap` +/// \cgalModels{ReadWritePropertyMap} template struct Constant_property_map { @@ -517,7 +640,7 @@ struct Constant_property_map /// return `true` if the key is inside the set and `false` otherwise. The `put` /// function will insert an element in the set if `true` is passed and erase it /// otherwise. -/// \cgalModels `ReadWritePropertyMap` +/// \cgalModels{ReadWritePropertyMap} template struct Boolean_property_map { @@ -538,7 +661,7 @@ struct Boolean_property_map return pm.set_ptr->count(k) != 0; } - friend void put(Boolean_property_map& pm, const key_type& k, bool v) + friend void put(Boolean_property_map pm, const key_type& k, bool v) { CGAL_assertion(pm.set_ptr!=nullptr); if (v) @@ -565,7 +688,7 @@ make_boolean_property_map(Set& set_) /// a geometric object of the same type as `GeomObject` but possibly from /// another kernel. /// Conversions between the two geometric objects are done using `Cartesian_converter`. -/// \cgalModels `ReadWritePropertyMap` +/// \cgalModels{ReadWritePropertyMap} template struct Cartesian_converter_property_map { @@ -600,6 +723,57 @@ make_cartesian_converter_property_map(Vpm vpm) return Cartesian_converter_property_map(vpm); } +/// \ingroup PkgPropertyMapRef +/// A property map with `std::size_t` as key-type that can be used +/// to access the i'th element in a container with random access. +/// \cgalModels{LvaluePropertyMap constness being than of `Container`.} +template +class Random_access_property_map +{ + Container& m_container; + +public: + using Iterator = std::conditional_t::value, + typename Container::const_iterator, + typename Container::iterator>; + typedef std::size_t key_type; + typedef typename std::iterator_traits::value_type value_type; + typedef typename std::iterator_traits::reference reference; + typedef boost::lvalue_property_map_tag category; + + + Random_access_property_map(Container& container) + : m_container(container){} + + friend reference get (Random_access_property_map map, key_type index) + { + return map.m_container[index]; + } + + template + friend void put (Random_access_property_map map, Key index, const value_type& value, + std::enable_if_t::value>* = 0) + { + map.m_container[index]=value; + } + + decltype(auto) + operator[](key_type index) const + { + return m_container[index]; + } +}; + +/// \ingroup PkgPropertyMapRef +/// \relates Random_access_property_map +/// returns `Random_access_property_map(container)` +template +Random_access_property_map +make_random_access_property_map(Container& container) +{ + return Random_access_property_map(container); +} + /// \cond SKIP_IN_MANUAL // Syntaxic sugar for transform_iterator+pmap_to_unary_function template @@ -666,13 +840,13 @@ struct Random_index_access_property_map : m_begin(begin), m_map(map) {} friend reference get (const Random_index_access_property_map& map, const key_type& index, - typename std::enable_if::value>::type* = 0) + std::enable_if_t::value>* = 0) { return get(map.m_map, *std::next(map.m_begin, index)); } friend void put (Random_index_access_property_map& map, const key_type& index, const value_type& value, - typename std::enable_if::value>::type* = 0) + std::enable_if_t::value>* = 0) { put (map.m_map, *std::next(map.m_begin, index), value); } diff --git a/thirdparty/CGAL/include/CGAL/radial_orient_normals.h b/thirdparty/CGAL/include/CGAL/radial_orient_normals.h index 5afe5a10..311509d1 100644 --- a/thirdparty/CGAL/include/CGAL/radial_orient_normals.h +++ b/thirdparty/CGAL/include/CGAL/radial_orient_normals.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/radial_orient_normals.h $ -// $Id: radial_orient_normals.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/radial_orient_normals.h $ +// $Id: include/CGAL/radial_orient_normals.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include @@ -72,7 +72,7 @@ radial_orient_normals( typedef typename Kernel::FT FT; // Precondition: at least one element in the container. - CGAL_point_set_processing_precondition(first != beyond); + CGAL_precondition(first != beyond); // Find points barycenter. // Note: We should use CGAL::centroid() from PCA component. diff --git a/thirdparty/CGAL/include/CGAL/random_convex_hull_in_disc_2.h b/thirdparty/CGAL/include/CGAL/random_convex_hull_in_disc_2.h index cc5fd2a8..25f33f9a 100644 --- a/thirdparty/CGAL/include/CGAL/random_convex_hull_in_disc_2.h +++ b/thirdparty/CGAL/include/CGAL/random_convex_hull_in_disc_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generator/include/CGAL/random_convex_hull_in_disc_2.h $ -// $Id: random_convex_hull_in_disc_2.h bb82c70 2022-03-16T08:31:30+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generator/include/CGAL/random_convex_hull_in_disc_2.h $ +// $Id: include/CGAL/random_convex_hull_in_disc_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -221,7 +221,7 @@ void random_convex_hull_in_disc_2(std::size_t n, double radius, std::list > bin(gen, dbin); - // How many points are falling in the small disc and wont be generated: + // How many points are falling in the small disc and won't be generated: long k_disc = bin(); simulated_points += k_disc; diff --git a/thirdparty/CGAL/include/CGAL/random_convex_set_2.h b/thirdparty/CGAL/include/CGAL/random_convex_set_2.h index 8a5d163c..44178e57 100644 --- a/thirdparty/CGAL/include/CGAL/random_convex_set_2.h +++ b/thirdparty/CGAL/include/CGAL/random_convex_set_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generator/include/CGAL/random_convex_set_2.h $ -// $Id: random_convex_set_2.h b796e6d 2021-01-08T14:52:28+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generator/include/CGAL/random_convex_set_2.h $ +// $Id: include/CGAL/random_convex_set_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/random_polygon_2.h b/thirdparty/CGAL/include/CGAL/random_polygon_2.h index 36d41ea1..04b85b3b 100644 --- a/thirdparty/CGAL/include/CGAL/random_polygon_2.h +++ b/thirdparty/CGAL/include/CGAL/random_polygon_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generator/include/CGAL/random_polygon_2.h $ -// $Id: random_polygon_2.h f243467 2021-03-29T15:24:10+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generator/include/CGAL/random_polygon_2.h $ +// $Id: include/CGAL/random_polygon_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Susan Hert diff --git a/thirdparty/CGAL/include/CGAL/random_selection.h b/thirdparty/CGAL/include/CGAL/random_selection.h index 38ebccc5..da52088e 100644 --- a/thirdparty/CGAL/include/CGAL/random_selection.h +++ b/thirdparty/CGAL/include/CGAL/random_selection.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Generator/include/CGAL/random_selection.h $ -// $Id: random_selection.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Generator/include/CGAL/random_selection.h $ +// $Id: include/CGAL/random_selection.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/random_simplify_point_set.h b/thirdparty/CGAL/include/CGAL/random_simplify_point_set.h index 0325bb20..2079ced8 100644 --- a/thirdparty/CGAL/include/CGAL/random_simplify_point_set.h +++ b/thirdparty/CGAL/include/CGAL/random_simplify_point_set.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/random_simplify_point_set.h $ -// $Id: random_simplify_point_set.h 6d3176e 2022-01-07T14:42:25+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/random_simplify_point_set.h $ +// $Id: include/CGAL/random_simplify_point_set.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include @@ -53,7 +53,7 @@ random_simplify_point_set( PointRange& points, double removed_percentage) { - CGAL_point_set_processing_precondition(removed_percentage >= 0 && removed_percentage <= 100); + CGAL_precondition(removed_percentage >= 0 && removed_percentage <= 100); // Random shuffle CGAL::cpp98::random_shuffle (points.begin(), points.end()); diff --git a/thirdparty/CGAL/include/CGAL/range_search_delaunay_2.h b/thirdparty/CGAL/include/CGAL/range_search_delaunay_2.h index 75044f2a..1be0e144 100644 --- a/thirdparty/CGAL/include/CGAL/range_search_delaunay_2.h +++ b/thirdparty/CGAL/include/CGAL/range_search_delaunay_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_2/include/CGAL/range_search_delaunay_2.h $ -// $Id: range_search_delaunay_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_2/include/CGAL/range_search_delaunay_2.h $ +// $Id: include/CGAL/range_search_delaunay_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -204,7 +204,7 @@ OutputIterator range_search(Dt& delau, // and then performs a range query with this circle. // When vertices of the trinagulation are on the circle the outcome // is not deterministic. -// A solution would be to not constuct a circle, but to use the +// A solution would be to not construct a circle, but to use the // function CGAL::side_of_bounded_circle template diff --git a/thirdparty/CGAL/include/CGAL/rank.h b/thirdparty/CGAL/include/CGAL/rank.h index d17233f9..10d163f8 100644 --- a/thirdparty/CGAL/include/CGAL/rank.h +++ b/thirdparty/CGAL/include/CGAL/rank.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/rank.h $ -// $Id: rank.h 7ebdd07 2021-03-30T14:28:55+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/rank.h $ +// $Id: include/CGAL/rank.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/rational_rotation.h b/thirdparty/CGAL/include/CGAL/rational_rotation.h index 3f9eb312..dc5983c7 100644 --- a/thirdparty/CGAL/include/CGAL/rational_rotation.h +++ b/thirdparty/CGAL/include/CGAL/rational_rotation.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/rational_rotation.h $ -// $Id: rational_rotation.h e661aca 2021-04-07T12:21:02+01:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/rational_rotation.h $ +// $Id: include/CGAL/rational_rotation.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/read_vtk_image_data.h b/thirdparty/CGAL/include/CGAL/read_vtk_image_data.h index 883149ef..7baac6c4 100644 --- a/thirdparty/CGAL/include/CGAL/read_vtk_image_data.h +++ b/thirdparty/CGAL/include/CGAL/read_vtk_image_data.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/CGAL_ImageIO/include/CGAL/read_vtk_image_data.h $ -// $Id: read_vtk_image_data.h 98e4718 2021-08-26T11:33:39+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/CGAL_ImageIO/include/CGAL/read_vtk_image_data.h $ +// $Id: include/CGAL/read_vtk_image_data.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/rectangular_3_center_2.h b/thirdparty/CGAL/include/CGAL/rectangular_3_center_2.h index c418cbad..3d34d609 100644 --- a/thirdparty/CGAL/include/CGAL/rectangular_3_center_2.h +++ b/thirdparty/CGAL/include/CGAL/rectangular_3_center_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/rectangular_3_center_2.h $ -// $Id: rectangular_3_center_2.h 27360a0 2021-02-02T13:36:45+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/rectangular_3_center_2.h $ +// $Id: include/CGAL/rectangular_3_center_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #include -#include +#include #include #include #include @@ -965,7 +965,7 @@ rectangular_3_center_2_type2( (Q_r_empty || op.compute_y_distance(q_r, Q_r) <= op.delta()(*m))) { boost::function1 greater_delta_m = boost::bind(less< FT >(), op.delta()(*m)); - CGAL_optimisation_assertion_code(RandomAccessIterator iii =) + CGAL_assertion_code(RandomAccessIterator iii =) find_if(e, l, boost::bind(logical_and< bool >(), @@ -973,7 +973,7 @@ rectangular_3_center_2_type2( boost::bind(op.distance(), q_t, _1)), boost::bind(greater_delta_m, boost::bind(op.distance(), q_r, _1)))); - CGAL_optimisation_assertion(iii == l); + CGAL_assertion(iii == l); } // check whether the points in [f,s) are covered { @@ -985,7 +985,7 @@ rectangular_3_center_2_type2( boost::bind(le_delta_m, boost::bind(op.distance(), q_t, _1))); iii = partition(iii, s, boost::bind(le_delta_m, boost::bind(op.distance(), q_r, _1))); - CGAL_optimisation_assertion(iii == s); + CGAL_assertion(iii == s); } #endif // CGAL_3COVER_CHECK @@ -1052,7 +1052,7 @@ rectangular_3_center_2_type2( } // step (e) [not enough points in G] - CGAL_optimisation_assertion(b1 - (m + 1) >= 5 * cutoff); + CGAL_assertion(b1 - (m + 1) >= 5 * cutoff); // compute the four cutting lines for R std::nth_element(m + 1, m + 1 + cutoff, b1, less_x_2); @@ -1113,7 +1113,7 @@ rectangular_3_center_2_type2( // now s_b corresponds to the first moment in [s, m+1) // where q_t and q_r cover B - CGAL_optimisation_assertion_code(bool loopcheck = false;) + CGAL_assertion_code(bool loopcheck = false;) CGAL_3CENTER_REPEAT_CHECK: // place q_t and q_r q_t = op.place_x_square(q_t_afap, r, op.delta()(*s_b)); @@ -1142,9 +1142,9 @@ rectangular_3_center_2_type2( // in degenerate situations it can happen that the number of // points in R is too small => decrease radius and check again --s_b; - CGAL_optimisation_assertion(!loopcheck); - CGAL_optimisation_assertion(s != s_b); - CGAL_optimisation_assertion_code(loopcheck = true;) + CGAL_assertion(!loopcheck); + CGAL_assertion(s != s_b); + CGAL_assertion_code(loopcheck = true;) goto CGAL_3CENTER_REPEAT_CHECK; } s = b1; @@ -1166,7 +1166,7 @@ rectangular_3_center_2_type2( // we still have a covering if (s_b == s) { - CGAL_optimisation_expensive_assertion_code( + CGAL_expensive_assertion_code( std::vector< Point > tmppts(f, l); RandomAccessIterator ii = partition(tmppts.begin(), tmppts.end(), @@ -1174,9 +1174,9 @@ rectangular_3_center_2_type2( IP tmppos = min_max_element(ii, tmppts.end(), op.compare_x(), op.compare_y()); ) - CGAL_optimisation_expensive_assertion( + CGAL_expensive_assertion( !op.compare_x()(*tmppos.first, q_t)); - CGAL_optimisation_expensive_assertion( + CGAL_expensive_assertion( !op.compare_y()(q_r, *tmppos.second)); // we are done @@ -1219,7 +1219,7 @@ rectangular_3_center_2_type2( [&op, s_b](const Point& p){ return op.delta()(*s_b) != op.delta()(p); }); rho_max = op.delta()(*s_b); q_t_at_rho_max = q_t, q_r_at_rho_max = q_r; - CGAL_optimisation_assertion(op.delta()(*next) < op.delta()(*s_b)); + CGAL_assertion(op.delta()(*next) < op.delta()(*s_b)); q_t_afap = op.update_x_square(q_t_afap, *s_b); q_r_afap = op.update_y_square(q_r_afap, *s_b); q_t = op.place_x_square(q_t_afap, r, op.delta()(*next)); @@ -1255,7 +1255,7 @@ rectangular_3_center_2_type2( } - CGAL_optimisation_assertion(b3 - b1 >= cutoff); + CGAL_assertion(b3 - b1 >= cutoff); e = b1; // adjust Q_t if (b1 != b2) { @@ -1299,7 +1299,7 @@ rectangular_3_center_2_type2( rho_max = max BOOST_PREVENT_MACRO_SUBSTITUTION (op.compute_x_distance(q_t, Q_t), op.compute_y_distance(q_r, Q_r)); #ifndef CGAL_3COVER_NO_CHECK_OPTIMUM_FIRST - CGAL_optimisation_assertion(rho_max <= rad); + CGAL_assertion(rho_max <= rad); #endif // ! CGAL_3COVER_NO_CHECK_OPTIMUM_FIRST rad = rho_max; *o++ = op.construct_corner_square(r, rad / FT(2)); @@ -1307,7 +1307,7 @@ rectangular_3_center_2_type2( *o++ = op.construct_y_square(q_r, rad / FT(2)); return o; } - CGAL_optimisation_assertion(s != e); + CGAL_assertion(s != e); // find the first diameter where covering is possible for (;;) { @@ -1324,7 +1324,7 @@ rectangular_3_center_2_type2( // try the next possible diameter value FT try_rho = op.delta()(*t); - CGAL_optimisation_assertion(t == s || try_rho < rho_max); + CGAL_assertion(t == s || try_rho < rho_max); q_t = op.place_x_square(q_t_afap, r, try_rho); q_r = op.place_y_square(q_r_afap, r, try_rho); @@ -1370,10 +1370,9 @@ rectangular_3_center_2_type2( // - q_r_at_rho_max is the corr. position of q_r. // try rho_min - CGAL_optimisation_assertion(rho_min <= rho_max); - CGAL_optimisation_assertion(rho_min >= 0); + CGAL_assertion(rho_min <= rho_max); FT rad_2 = q_t_q_r_cover_at_rho_min; - if (s_at_rho_min != e_at_rho_min) { + if (rho_min >= 0 && s_at_rho_min != e_at_rho_min) { auto mydist = [&q_t_at_rho_min, &q_r_at_rho_min, &op](const Point& p) { return Min()( op.distance()(q_t_at_rho_min, p), op.distance()(q_r_at_rho_min, p)); }; @@ -1384,10 +1383,10 @@ rectangular_3_center_2_type2( [&mydist](const Point& p1, const Point& p2) { return mydist(p1) < mydist(p2); }))); } - CGAL_optimisation_assertion(rad_2 == 0 || rad_2 > rho_min); + CGAL_assertion(rad_2 == 0 || rad_2 > rho_min); // if a covering with rho == 0 is possible, - // it will be catched in the type1 functions + // it will be caught in the type1 functions Point q_t, q_r; if (rad_2 > rho_max || rho_min == -1) { // it is rho_max ... @@ -1397,7 +1396,7 @@ rectangular_3_center_2_type2( q_t = q_t_at_rho_min, q_r = q_r_at_rho_min; #ifndef CGAL_3COVER_NO_CHECK_OPTIMUM_FIRST - CGAL_optimisation_assertion(rad_2 <= rad); + CGAL_assertion(rad_2 <= rad); #endif // ! CGAL_3COVER_NO_CHECK_OPTIMUM_FIRST rad = rad_2; *o++ = op.construct_corner_square(r, rad / FT(2)); @@ -1414,7 +1413,7 @@ rectangular_3_center_2( typename Traits::FT& r, Traits& t) { - CGAL_optimisation_precondition(f != l); + CGAL_precondition(f != l); typedef typename Traits::FT FT; typedef typename Traits::Point_2 Point; typedef typename Traits::Iso_rectangle_2 Rectangle; diff --git a/thirdparty/CGAL/include/CGAL/rectangular_p_center_2.h b/thirdparty/CGAL/include/CGAL/rectangular_p_center_2.h index 9c818b21..6c03886d 100644 --- a/thirdparty/CGAL/include/CGAL/rectangular_p_center_2.h +++ b/thirdparty/CGAL/include/CGAL/rectangular_p_center_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Bounding_volumes/include/CGAL/rectangular_p_center_2.h $ -// $Id: rectangular_p_center_2.h c9a5cf70 2021-01-05T18:52:29+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Bounding_volumes/include/CGAL/rectangular_p_center_2.h $ +// $Id: include/CGAL/rectangular_p_center_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -72,8 +72,8 @@ class Cartesian_matrix_horizontally_flipped Value operator()( int r, int c) const { - CGAL_optimisation_precondition( r >= 0 && r < number_of_rows()); - CGAL_optimisation_precondition( c >= 0 && c < number_of_columns()); + CGAL_precondition( r >= 0 && r < number_of_rows()); + CGAL_precondition( c >= 0 && c < number_of_columns()); return Base::operator()( r, number_of_columns() - 1 - c); } }; @@ -145,7 +145,7 @@ rectangular_p_center_2_binary_search( // -------------- // { - CGAL_optimisation_precondition( f != l); + CGAL_precondition( f != l); // typedefs: typedef typename Traits::FT FT; @@ -171,7 +171,7 @@ rectangular_p_center_2_binary_search( c_diffs.push_back( CGAL_NTS abs( i->x() - j->x())); c_diffs.push_back( CGAL_NTS abs( i->y() - j->y())); } - CGAL_optimisation_assertion( + CGAL_assertion( c_diffs.size() == pierce_it.number_of_points() * (pierce_it.number_of_points() - 1)); @@ -195,12 +195,12 @@ rectangular_p_center_2_binary_search( b = c + 1; } } // while ( e > b) - CGAL_optimisation_assertion( e == b); + CGAL_assertion( e == b); // return the result: r = c_diffs[e]; OutputIterator o_return( pierce_it( r, o, ok)); - CGAL_optimisation_assertion( ok); + CGAL_assertion( ok); return o_return; } // rectangular_p_center_2_binary_search( ... ) @@ -221,7 +221,7 @@ rectangular_p_center_2_matrix_search( const MatrixOperator& mop) { std::size_t number_of_points( iterator_distance( f, l)); - CGAL_optimisation_precondition( number_of_points > 0); + CGAL_precondition( number_of_points > 0); using std::minus; using std::sort; @@ -296,7 +296,7 @@ rectangular_p_center_2_matrix_search( // return result: OutputIterator o_return(pierce_it(r, o, ok)); - CGAL_optimisation_assertion(ok); + CGAL_assertion(ok); return o_return; } // P_center_matrix_search @@ -341,7 +341,7 @@ rectangular_p_center_matrix_search_2( FT& r, int p) { - CGAL_optimisation_precondition(p >= 2 && p < 5); + CGAL_precondition(p >= 2 && p < 5); typename std::iterator_traits::value_type::R t; if (p == 2) return rectangular_p_center_2_matrix_search( @@ -401,7 +401,7 @@ rectangular_p_center_2(ForwardIterator f, int p, Traits& t) { - CGAL_optimisation_precondition(p >= 2 && p < 5); + CGAL_precondition(p >= 2 && p < 5); r=0; if ( !internal::is_distance_greater_than_p(f,l,p) ) return std::copy(f,l,o); @@ -422,7 +422,7 @@ rectangular_p_center_2(ForwardIterator f, FT& r, int p) { - CGAL_optimisation_precondition(p >= 2 && p < 5); + CGAL_precondition(p >= 2 && p < 5); typedef typename std::iterator_traits< ForwardIterator >::value_type::R R; Rectangular_p_center_default_traits_2< R > t; diff --git a/thirdparty/CGAL/include/CGAL/refine_mesh_3.h b/thirdparty/CGAL/include/CGAL/refine_mesh_3.h index f9f818a9..349cbb75 100644 --- a/thirdparty/CGAL/include/CGAL/refine_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/refine_mesh_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/refine_mesh_3.h $ -// $Id: refine_mesh_3.h 1c3e09f 2022-01-10T15:32:38+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/refine_mesh_3.h $ +// $Id: include/CGAL/refine_mesh_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,17 +19,14 @@ #include -#include - #include -#include #include -#include #include #include #include - -#include +#include +#include +#include #include @@ -37,7 +34,7 @@ namespace CGAL { namespace details { -/** +/* * @class Insert_vertex_in_c3t3 * * A functor designed to insert unweighted points into the triangulation @@ -80,14 +77,14 @@ class Insert_vertex_in_c3t3 #if defined(CGAL_LINKED_WITH_TBB)\ && !defined(CGAL_PARALLEL_MESH_3_DO_NOT_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE) - if (boost::is_convertible::value) + if (std::is_convertible::value) { if (dimension == -1) r_c3t3_.add_far_point(new_vertex); } #endif #ifdef CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE - if (boost::is_convertible::value) + if (std::is_convertible::value) { if (dimension == -1) r_c3t3_.add_far_point(new_vertex); @@ -101,418 +98,219 @@ class Insert_vertex_in_c3t3 } // namespace details -namespace parameters { - -namespace internal { - -const int undef_parameter = -1; - -// Helpers -struct Optimization_options_base -{ - Optimization_options_base(bool b) - : b_(b), time_limit_(undef_parameter), bound_(undef_parameter) {} - - operator bool() const { return b_; } - - bool is_time_limit_set() const { return time_limit_ != undef_parameter; } - void set_time_limit(double d) { time_limit_ = d; } - double time_limit() const { return time_limit_; } - - bool is_bound_set() const { return bound_ != undef_parameter; } - void set_bound(double d) { bound_ = d; } - double bound() const { return bound_; } - -private: - bool b_; - double time_limit_; - double bound_; -}; - -struct Global_optimization_options_base -{ - Global_optimization_options_base() - : convergence_(undef_parameter), max_it_nb_(undef_parameter) {} - - bool is_convergence_set() const { return convergence_ != undef_parameter; } - void set_convergence(double d) { convergence_ = d; } - double convergence() const { return convergence_; } - - bool is_max_iteration_number_set() const { return max_it_nb_ != undef_parameter; } - void set_max_iteration_number(int i) { max_it_nb_ = i; } - int max_iteration_number() const { return max_it_nb_; } - -private: - double convergence_; - int max_it_nb_; -}; - -// Perturb -struct Perturb_options : public Optimization_options_base -{ - Perturb_options(bool b) : Optimization_options_base(b) {} -}; - -// Exude -struct Exude_options : public Optimization_options_base -{ - Exude_options(bool b) : Optimization_options_base(b) {} -}; - -// Odt -struct Odt_options : public Optimization_options_base -, public Global_optimization_options_base -{ - Odt_options(bool b) : Optimization_options_base(b) - , Global_optimization_options_base() {} -}; - -// Lloyd -struct Lloyd_options : public Optimization_options_base -, public Global_optimization_options_base -{ - Lloyd_options(bool b) : Optimization_options_base(b) - , Global_optimization_options_base() {} -}; - -// Manifold -struct Manifold_options { - enum { - NON_MANIFOLD = 0, - MANIFOLD_WITH_BOUNDARY = 8, - NO_BOUNDARY = 16, - MANIFOLD = 24 - }; - - Manifold_options(const int topology) - : mesh_topology(topology) - {} - Manifold_options() - : mesh_topology(NON_MANIFOLD) - {} - - int mesh_topology; -}; - -// Various Mesh_3 option -struct Mesh_3_options { -#ifndef CGAL_NO_ATOMIC - typedef std::atomic* Pointer_to_stop_atomic_boolean_t; -#else - typedef bool* Pointer_to_stop_atomic_boolean_t; -#endif - Mesh_3_options(bool nonlinear = false) - // This parameter `nonlinear` adds a compatibility with previous - // API of the constructor of `C3t3_initializer`. - // -- Laurent Rineau, 2019/05/03 - : dump_after_init_prefix() - , dump_after_refine_surface_prefix() - , dump_after_refine_prefix() - , dump_after_glob_opt_prefix() - , dump_after_perturb_prefix() - , dump_after_exude_prefix() - , number_of_initial_points(-1) - , nonlinear_growth_of_balls(nonlinear) - , maximal_number_of_vertices(0) - , pointer_to_error_code(0) -#ifndef CGAL_NO_ATOMIC - , pointer_to_stop_atomic_boolean(0) -#endif - {} - - std::string dump_after_init_prefix; - std::string dump_after_refine_surface_prefix; - std::string dump_after_refine_prefix; - std::string dump_after_glob_opt_prefix; - std::string dump_after_perturb_prefix; - std::string dump_after_exude_prefix; - int number_of_initial_points; - bool nonlinear_growth_of_balls; - std::size_t maximal_number_of_vertices; - Mesh_error_code* pointer_to_error_code; -#ifndef CGAL_NO_ATOMIC - Pointer_to_stop_atomic_boolean_t pointer_to_stop_atomic_boolean; -#endif - -}; // end struct Mesh_3_options - -} // end namespace internal - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4003) // not enough actual parameters for macro -#endif - -// see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS - - -// ----------------------------------- -// Perturb -// ----------------------------------- -BOOST_PARAMETER_FUNCTION((internal::Perturb_options), perturb, tag, - (optional (time_limit_, *, internal::undef_parameter ) - (sliver_bound_, *, default_values_for_mesh_3::perturb_sliver_bound ))) -{ - internal::Perturb_options options(true); - - if ( internal::undef_parameter != time_limit_ ) - options.set_time_limit(time_limit_); - - options.set_bound(sliver_bound_); - - return options; -} - -inline internal::Perturb_options no_perturb() { return internal::Perturb_options(false); } - -// ----------------------------------- -// Exude -// ----------------------------------- -BOOST_PARAMETER_FUNCTION((internal::Exude_options), exude, tag, - (optional (time_limit_, *, internal::undef_parameter ) - (sliver_bound_, *, default_values_for_mesh_3::exude_sliver_bound ))) -{ - internal::Exude_options options(true); - - if ( internal::undef_parameter != time_limit_ ) - options.set_time_limit(time_limit_); - - options.set_bound(sliver_bound_); - - return options; -} - -inline internal::Exude_options no_exude() { return internal::Exude_options(false); } - -// ----------------------------------- -// Odt -// ----------------------------------- -BOOST_PARAMETER_FUNCTION((internal::Odt_options), odt, tag, - (optional (time_limit_, *, 0 ) - (max_iteration_number_, *, 0 ) - (convergence_, *, default_values_for_mesh_3::odt_convergence_ratio ) - (freeze_bound_, *, default_values_for_mesh_3::odt_freeze_ratio ))) -{ - internal::Odt_options options(true); - - options.set_time_limit(time_limit_); - options.set_bound(freeze_bound_); - options.set_convergence(convergence_); - options.set_max_iteration_number(max_iteration_number_); - - return options; -} - -inline internal::Odt_options no_odt() { return internal::Odt_options(false); } - -// ----------------------------------- -// Lloyd -// ----------------------------------- -BOOST_PARAMETER_FUNCTION((internal::Lloyd_options), lloyd, tag, - (optional (time_limit_, *, 0 ) - (max_iteration_number_, *, 0 ) - (convergence_, *, default_values_for_mesh_3::lloyd_convergence_ratio ) - (freeze_bound_, *, default_values_for_mesh_3::lloyd_freeze_ratio ))) -{ - internal::Lloyd_options options(true); - - options.set_time_limit(time_limit_); - options.set_bound(freeze_bound_); - options.set_convergence(convergence_); - options.set_max_iteration_number(max_iteration_number_); - - return options; -} - -inline internal::Lloyd_options no_lloyd() { return internal::Lloyd_options(false); } - -// ----------------------------------- -// Manifold options ------------------ -// ----------------------------------- -BOOST_PARAMETER_FUNCTION((internal::Manifold_options), manifold_options, tag, - (optional - (mesh_topology_, (int), -1) - ) - ) -{ - internal::Manifold_options options; - options.mesh_topology = mesh_topology_; - return options; -} - -inline internal::Manifold_options manifold() -{ - return internal::Manifold_options( - internal::Manifold_options::MANIFOLD); -} -inline internal::Manifold_options manifold_with_boundary() -{ - return internal::Manifold_options( - internal::Manifold_options::MANIFOLD_WITH_BOUNDARY); -} -inline internal::Manifold_options non_manifold() -{ - return internal::Manifold_options( - internal::Manifold_options::NON_MANIFOLD); -} - -// ----------------------------------- -// Mesh options -// ----------------------------------- - -// Undocumented Boost parameter for refine_mesh_3 and make_mesh_3. -// Allows to dump the mesh at given stage of the mesh generation -// algorithm. -BOOST_PARAMETER_FUNCTION((internal::Mesh_3_options), mesh_3_options, tag, - (optional - (dump_after_init_prefix_, (std::string), "" ) - (dump_after_refine_surface_prefix_, (std::string), "" ) - (dump_after_refine_prefix_, (std::string), "" ) - (dump_after_glob_opt_prefix_, (std::string), "" ) - (dump_after_perturb_prefix_, (std::string), "" ) - (dump_after_exude_prefix_, (std::string), "" ) - (number_of_initial_points_, (int), -1) - (maximal_number_of_vertices_, (std::size_t), 0) - (nonlinear_growth_of_balls_, (bool), false) - (pointer_to_error_code_, (Mesh_error_code*), ((Mesh_error_code*)0)) - (pointer_to_stop_atomic_boolean_, (internal::Mesh_3_options::Pointer_to_stop_atomic_boolean_t), ((internal::Mesh_3_options::Pointer_to_stop_atomic_boolean_t)0)) - ) - ) -{ - internal::Mesh_3_options options; - - options.dump_after_init_prefix=dump_after_init_prefix_; - options.dump_after_refine_surface_prefix=dump_after_refine_surface_prefix_; - options.dump_after_refine_prefix=dump_after_refine_prefix_; - options.dump_after_glob_opt_prefix=dump_after_glob_opt_prefix_; - options.dump_after_perturb_prefix=dump_after_perturb_prefix_; - options.dump_after_exude_prefix=dump_after_exude_prefix_; - options.number_of_initial_points=number_of_initial_points_; - options.nonlinear_growth_of_balls = nonlinear_growth_of_balls_; - options.maximal_number_of_vertices=maximal_number_of_vertices_; - options.pointer_to_error_code=pointer_to_error_code_; -#ifndef CGAL_NO_ATOMIC - options.pointer_to_stop_atomic_boolean=pointer_to_stop_atomic_boolean_; -#endif - - return options; -} - -// Undocumented Boost parameter for refine_mesh_3 and make_mesh_3. -// Default Mesh_3_options: dump at every stage of the mesh generation. -inline internal::Mesh_3_options mesh_3_dump() +/*! + * \ingroup PkgMesh3Functions + * + * The function `refine_mesh_3()` is a 3D + * mesh generator. It produces simplicial meshes which discretize + * 3D domains. + * + * The mesh generation algorithm is a Delaunay refinement process + * followed by an optimization phase. + * The criteria driving the Delaunay refinement + * process may be tuned to achieve the user needs with respect to + * the size of mesh elements, the accuracy of boundaries approximation, + * etc. + * + * The optimization phase is a sequence of optimization processes, + * amongst the following available optimizers: an ODT smoothing, + * a Lloyd smoothing, a sliver perturber, and a sliver exuder. + * Each optimization process + * can be activated or not, + * according to the user requirements + * and available time. + * By default, only the perturber and the exuder are activated. + * Note that the benefits of the exuder will be lost if the mesh + * is further refined afterward. + * + * \attention The function template `refine_mesh_3()` may be used to refine a previously + * computed mesh, e.g.: + * \code{.cpp} + * C3T3 c3t3 = CGAL::make_mesh_3(domain,criteria); + * + * CGAL::refine_mesh_3(c3t3, domain, new_criteria); + * \endcode + * + * Please note that we guarantee the result if and only if the domain does + * not change from one refinement to the next one. + * + * + * \tparam C3T3 either a model of the concept `MeshComplex_3InTriangulation_3` or + * of `MeshComplexWithFeatures_3InTriangulation_3` if `MD` + * is a model of `MeshDomainWithFeatures_3`. + * The type `C3T3` is in particular required to provide a nested type + * `C3T3::Triangulation` for the 3D triangulation + * embedding the mesh. The vertex and cell base classes of the + * triangulation `C3T3::Triangulation` are required to be models of the + * concepts `MeshVertexBase_3` and `MeshCellBase_3` respectively. + * + * \tparam MD either a model of the concept `MeshDomain_3` or of + * `MeshDomainWithFeatures_3` if 0 and 1-dimensional features + * of the input complex have to be accurately represented in the mesh. + * + * \tparam MC either a model of the concept `MeshCriteria_3` or a model + * of `MeshCriteriaWithFeatures_3` if the domain has exposed features. + * + * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters + * + * \param c3t3 the mesh to be refined that is modified by the refinement process. + * As the refinement process only adds points to the triangulation, all + * vertices of the triangulation of `c3t3` remain in the + * mesh during the refinement process. `c3t3` can be used to insert + * specific points in the domain to ensure that they will be contained in the + * final triangulation. + * \param domain the domain used to create the `c3t3` parameter. It is the sole link through which the domain + * to be discretized is known by the mesh generation algorithm. + * \param criteria specifies the size and shape requirements for mesh tetrahedra + * and surface facets. These criteria form the rules which drive + * the refinement process. All mesh elements satisfy those criteria + * at the end of the refinement process. + * In addition, if the domain has features, the argument + * `criteria` provides a sizing field to guide the discretization + * of 1-dimensional exposed features. + * \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below. + * They control which optimization processes are performed + * and enable the user to tune the parameters of the optimization processes. + * Individual optimization parameters are not described here as they are + * internal types (see instead the documentation page of each optimizer). + * For each optimization algorithm, there exist two global functions + * that enable/disable the optimizer. + * + * \cgalNamedParamsBegin + * \cgalParamSectionBegin{Topological options (manifoldness)} + * \cgalParamDescription{In order to drive the meshing algorithm and ensure that the output mesh follows a desired topological criterion, + * three named parameters control this option: + *
      + *
    • `parameters::manifold()` + *
    • `parameters::manifold_with_boundary()` + *
    • `parameters::non_manifold()` + *
    + * Note that the meshing algorithm cannot generate a manifold surface if the input surface is not manifold.} + * \cgalParamDefault{`parameters::non_manifold()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{Lloyd optimization} + * \cgalParamDescription{`lloyd_optimize_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::no_lloyd()` + *
    • `parameters::lloyd_optimize_mesh_3()` + *
    } + * \cgalParamDefault{`parameters::no_lloyd()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{ODT optimization} + * \cgalParamDescription{`odt_optimize_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::no_odt()` + *
    • `parameters::odt()` + *
    } + * \cgalParamDefault{`parameters::no_odt()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{Mesh perturbation} + * \cgalParamDescription{`perturb_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::no_perturb()` + *
    • `parameters::perturb()` + *
    } + * \cgalParamDefault{`parameters::perturb()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{Mesh exudation} + * \cgalParamDescription{`exude_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::exude()` + *
    • `parameters::no_exude()` + *
    } + * \cgalParamDefault{`parameters::exude()`} + * \cgalParamSectionEnd + * \cgalNamedParamsEnd + * + * The optimization parameters can be passed in arbitrary order. If one parameter + * is not passed, its default value is used. The default values are + * `no_lloyd()`, `no_odt()`, `perturb()` and `exude()`. + * Note that regardless of which optimization processes are activated, + * they are always launched in the order that is a suborder + * of the following (see user manual for further + * details): *ODT-smoother*, *Lloyd-smoother*, *perturber*, and *exuder*. + * + * Beware that optimization of the mesh is obtained + * by perturbing mesh vertices and modifying the mesh connectivity + * and that this has an impact + * on the strict compliance to the refinement criteria. + * Though a strict compliance to mesh criteria + * is guaranteed at the end of the Delaunay refinement, this may no longer be true after + * some optimization processes. Also beware that the default behavior does involve some + * optimization processes. + * + * \sa `CGAL::make_mesh_3()` + * \sa `CGAL::parameters::manifold()` + * \sa `CGAL::parameters::manifold_with_boundary()` + * \sa `CGAL::parameters::non_manifold()` + * \sa `CGAL::exude_mesh_3()` + * \sa `CGAL::perturb_mesh_3()` + * \sa `CGAL::lloyd_optimize_mesh_3()` + * \sa `CGAL::odt_optimize_mesh_3()` + * \sa `CGAL::parameters::exude()` + * \sa `CGAL::parameters::no_exude()` + * \sa `CGAL::parameters::perturb()` + * \sa `CGAL::parameters::no_perturb()` + * \sa `CGAL::parameters::lloyd()` + * \sa `CGAL::parameters::no_lloyd()` + * \sa `CGAL::parameters::odt()` + * \sa `CGAL::parameters::no_odt()` + */ +template +void refine_mesh_3(C3T3& c3t3, const MeshDomain& domain, const MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values()) { - internal::Mesh_3_options options; - - options.dump_after_init_prefix = "mesh_dump_after_init"; - options.dump_after_refine_surface_prefix = "mesh_dump_after_refine_surface"; - options.dump_after_refine_prefix = "mesh_dump_after_refine"; - options.dump_after_glob_opt_prefix = "mesh_dump_after_glob_opt"; - options.dump_after_perturb_prefix = "mesh_dump_after_perturb"; - options.dump_after_exude_prefix = "mesh_dump_after_exude"; - - return options; + using parameters::choose_parameter; + using parameters::get_parameter; + parameters::internal::Exude_options exude_param = choose_parameter(get_parameter(np, internal_np::exude_options_param), parameters::exude().v); + parameters::internal::Perturb_options perturb_param = choose_parameter(get_parameter(np, internal_np::perturb_options_param), parameters::perturb().v); + parameters::internal::Odt_options odt_param = choose_parameter(get_parameter(np, internal_np::odt_options_param), parameters::no_odt().v); + parameters::internal::Lloyd_options lloyd_param = choose_parameter(get_parameter(np, internal_np::lloyd_options_param), parameters::no_lloyd().v); + bool reset = choose_parameter(get_parameter(np, internal_np::do_reset_c3t3), false); + parameters::internal::Mesh_3_options mesh_options_param = choose_parameter(get_parameter(np, internal_np::mesh_param), parameters::internal::Mesh_3_options()); + parameters::internal::Manifold_options manifold_options_param = choose_parameter(get_parameter(np, internal_np::manifold_param), parameters::internal::Manifold_options()); + + return refine_mesh_3_impl(c3t3, + domain, + criteria, + exude_param, + perturb_param, + odt_param, + lloyd_param, + reset, + mesh_options_param, + manifold_options_param); } -CGAL_PRAGMA_DIAG_POP - -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif - -// ----------------------------------- -// Reset_c3t3 (undocumented) -// ----------------------------------- - CGAL_BOOLEAN_PARAMETER(Reset,reset_c3t3,no_reset_c3t3) - // CGAL_BOOLEAN_PARAMETER defined in - - -// see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS - -// ----------------------------------- -// Parameters -// ----------------------------------- -BOOST_PARAMETER_NAME( exude_param ) -BOOST_PARAMETER_NAME( perturb_param ) -BOOST_PARAMETER_NAME( odt_param ) -BOOST_PARAMETER_NAME( lloyd_param ) -BOOST_PARAMETER_NAME( reset_param ) -BOOST_PARAMETER_NAME( mesh_options_param ) -BOOST_PARAMETER_NAME( manifold_options_param ) - -CGAL_PRAGMA_DIAG_POP - -} // end namespace parameters - - - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4003) // not enough actual parameters for macro -#endif - -// see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS - -BOOST_PARAMETER_FUNCTION( - (void), - refine_mesh_3, - parameters::tag, - (required (in_out(c3t3),*) (domain,*) (criteria,*) ) // nondeduced - (deduced - (optional - (exude_param, (parameters::internal::Exude_options), parameters::exude()) - (perturb_param, (parameters::internal::Perturb_options), parameters::perturb()) - (odt_param, (parameters::internal::Odt_options), parameters::no_odt()) - (lloyd_param, (parameters::internal::Lloyd_options), parameters::no_lloyd()) - (reset_param, (parameters::Reset), parameters::reset_c3t3()) - (mesh_options_param, (parameters::internal::Mesh_3_options), - parameters::internal::Mesh_3_options()) - (manifold_options_param, (parameters::internal::Manifold_options), - parameters::internal::Manifold_options()) - ) - ) -) +#ifndef DOXYGEN_RUNNING +// Overload handling parameters passed with operator= +template +void refine_mesh_3(C3T3& c3t3, const MeshDomain& domain, const MeshCriteria& criteria, + const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) { - return refine_mesh_3_impl(c3t3, - domain, - criteria, - exude_param, - perturb_param, - odt_param, - lloyd_param, - reset_param(), - mesh_options_param, - manifold_options_param); + return refine_mesh_3(c3t3, domain, criteria, internal_np::combine_named_parameters(np1, np2, nps...)); } - -CGAL_PRAGMA_DIAG_POP - -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif - /** * @brief This function refines the mesh c3t3 wrt domain & criteria * * @param c3t3 the mesh to be refined. - * @param domain the domain to be discretized + * @param domain the domain used to be discretized * @param criteria the criteria - * @param exude if \c true, an exudation step will be done at + * @param exude if `true`, an exudation step will be done at * the end of the Delaunay refinement process - * @param perturb if \c true, an explicit vertex perturbation step will be + * @param perturb if `true`, an explicit vertex perturbation step will be * done at the end of refinement process - * @param reset_c3t3 if \c true, a new C3T3 will be construct from param c3t3. + * @param reset_c3t3 if `true`, a new C3T3 will be construct from param c3t3. * The new c3t3 keeps only the vertices (as NON-weighted points with their - * dimension and Index) of the triangulation. That allows to refine a mesh + * dimension and Index) of the triangulation. That enables to refine a mesh * which has been exuded. * @param mesh_3_options is a struct object used to pass non-documented options, * for debugging purpose. @@ -619,9 +417,7 @@ void refine_mesh_3_impl(C3T3& c3t3, dump_c3t3(c3t3, mesh_options.dump_after_exude_prefix); } } - +#endif // DOXYGEN_RUNNING } // end namespace CGAL -#include - #endif // CGAL_REFINE_MESH_3_H diff --git a/thirdparty/CGAL/include/CGAL/refine_periodic_3_mesh_3.h b/thirdparty/CGAL/include/CGAL/refine_periodic_3_mesh_3.h index 21a58d64..5066090c 100644 --- a/thirdparty/CGAL/include/CGAL/refine_periodic_3_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/refine_periodic_3_mesh_3.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Periodic_3_mesh_3/include/CGAL/refine_periodic_3_mesh_3.h $ -// $Id: refine_periodic_3_mesh_3.h 53d4c9b 2019-10-28T11:29:08+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Periodic_3_mesh_3/include/CGAL/refine_periodic_3_mesh_3.h $ +// $Id: include/CGAL/refine_periodic_3_mesh_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Stephane Tayeb, @@ -17,16 +17,16 @@ #include -#include #include +#include #include -#include #include #include +#include #include -#include +#include #include #include @@ -34,22 +34,8 @@ #include namespace CGAL { - namespace internal { -template -void project_dummy_points_of_surface(C3T3& c3t3, const MeshDomain& domain) -{ - typedef typename C3T3::Vertex_handle Vertex_handle; - typedef CGAL::Hash_handles_with_or_without_timestamps Hash_fct; - typedef boost::unordered_set Vertex_container; - - Vertex_container vertex_container; - find_points_to_project(c3t3, std::insert_iterator(vertex_container, vertex_container.begin())); - - project_points(c3t3, domain, vertex_container.begin(), vertex_container.end()); -} - template void find_points_to_project(C3T3& c3t3, OutputIterator vertices) { @@ -65,21 +51,22 @@ void find_points_to_project(C3T3& c3t3, OutputIterator vertices) int ind = face_it->second; Cell_handle c = face_it->first; - for(int i = 1; i < 4; i++) { + for(int i = 1; i < 4; i++) + { Vertex_handle v = c->vertex((ind+i)&3); - - typename C3T3::Index index = c3t3.index(v); - if(const int* i = boost::get(&index)) + if(v->info().is_dummy_vertex) { - if(*i == 0) // '0' is the index of dummies - *vertices++ = v; +#ifdef CGAL_PERIODIC_3_MESH_3_DEBUG_DUMMY_PROJECTION + std::cout << c3t3.triangulation().point(v) << " must be projected" << std::endl; +#endif + *vertices++ = v; } } } } template -void project_points(C3T3& c3t3, +bool project_points(C3T3& c3t3, const MeshDomain& domain, InputIterator vertex_begin, InputIterator vertex_end) @@ -95,89 +82,321 @@ void project_points(C3T3& c3t3, typename C3T3::Triangulation::Geom_traits::Construct_point_3 cp = c3t3.triangulation().geom_traits().construct_point_3_object(); + typename C3T3::Triangulation::Geom_traits::Compute_squared_distance_3 csd = + c3t3.triangulation().geom_traits().compute_squared_distance_3_object(); CGAL::Mesh_3::C3T3_helpers helper(c3t3, domain); CGAL::Mesh_3::Triangulation_helpers tr_helpers; + bool did_something = false; + for(InputIterator it = vertex_begin; it != vertex_end; ++it) { - Vertex_handle vh = *it; + Vertex_handle old_vertex = *it; - const Weighted_point& vh_wp = c3t3.triangulation().point(vh); - const Bare_point& vh_p = cp(vh_wp); - const Bare_point new_point = helper.project_on_surface(vh, vh_p); + const Weighted_point& weighted_old_position = c3t3.triangulation().point(old_vertex); + CGAL_assertion(weighted_old_position.weight() == FT(0)); // point projection happens before optimizers - const FT sq_d = CGAL::squared_distance(new_point, vh_p); + const Bare_point& old_position = cp(weighted_old_position); + const Bare_point new_position = helper.project_on_surface(old_vertex, old_position); + const FT sq_d = csd(new_position, old_position); #ifdef CGAL_PERIODIC_3_MESH_3_DEBUG_DUMMY_PROJECTION - std::cerr << "vh: " << &*vh << std::endl; - std::cerr << "vhp: " << vh_p << std::endl; - std::cerr << "projected: " << new_point << std::endl; + std::cerr << "\n\nMove dummy vertex" << std::endl; + std::cerr << "old_vertex: " << &*old_vertex << std::endl; + std::cerr << "old_position: " << old_position << std::endl; + std::cerr << "new_position: " << new_position << std::endl; std::cerr << "squared distance from dummy to surface: " << sq_d << std::endl; #endif // Skip tiny moves for efficiency - if(sq_d < 1e-10) // arbitrary value, maybe compare it to the surface distance criterium ? + auto min_v_and_sqd = c3t3.triangulation().nearest_power_vertex_with_sq_distance(old_vertex); + CGAL_postcondition(min_v_and_sqd.first != Vertex_handle() && min_v_and_sqd.second != FT(-1)); + + if(sq_d < 0.01 * min_v_and_sqd.second) + { +#ifdef CGAL_PERIODIC_3_MESH_3_DEBUG_DUMMY_PROJECTION + std::cout << "REJECTED because dummy point is close enough to the surface" << std::endl; +#endif continue; + } // Do not project if the projected point is in a protection ball - if(tr_helpers.inside_protecting_balls(c3t3.triangulation(), vh, new_point)) + if(tr_helpers.inside_protecting_balls(c3t3.triangulation(), old_vertex, new_position)) + { +#ifdef CGAL_PERIODIC_3_MESH_3_DEBUG_DUMMY_PROJECTION + std::cout << "REJECTED because new pos is within protection ball" << std::endl; +#endif continue; + } + + // For periodic triangulations, the move is always performed using insert+remove, + // so new_vertex cannot be old_vertex if the move has succeeded + const Vector_3 move(old_position, new_position); + Vertex_handle new_vertex = helper.update_mesh(old_vertex, move); + + // if the move has successfully been performed + if(new_vertex != old_vertex && new_vertex != Vertex_handle()) + { + new_vertex->info().is_dummy_vertex = false; + c3t3.set_dimension(new_vertex, 2); // on the surface + + // @fixme + // This actually should be the index from the surface patch index... + // It can be obtained either by modifying project_on_surface to return the surface_patch index + auto opt_si = domain.is_in_domain_object()(cp(c3t3.triangulation().point(new_vertex))); + if(opt_si.has_value()) + c3t3.set_index(new_vertex, domain.index_from_subdomain_index(*opt_si)); + else + c3t3.set_index(new_vertex, 0); + } + else + { +#ifdef CGAL_PERIODIC_3_MESH_3_DEBUG_DUMMY_PROJECTION + std::cerr << "Warning: failed to create projection" << std::endl; +#endif + } + + // The vertex `old_vertex` can still exist in the P3RT3: + // - if the target already existed + // - if its removal would have compromised the 1-cover property of the periodic triangulation + // It's (almost) pointless to try and move it again, so fix it + if(c3t3.triangulation().tds().is_vertex(old_vertex)) + { +#ifdef CGAL_PERIODIC_3_MESH_3_DEBUG_DUMMY_PROJECTION + std::cerr << "Warning: failed to remove pre-projection: " << c3t3.triangulation().point(old_vertex) << std::endl; +#endif + old_vertex->info().is_dummy_vertex = false; + } - const Vector_3 move(vh_p, new_point); - Vertex_handle new_vertex = helper.update_mesh(vh, move); - if(new_vertex != vh) // if the move has successfully been performed - c3t3.set_dimension(new_vertex, 2); + did_something = true; } + + return did_something; } -} // namespace internal +template +void project_dummy_points_of_surface(C3T3& c3t3, + const MeshDomain& domain) +{ + typedef typename C3T3::Vertex_handle Vertex_handle; + typedef CGAL::Hash_handles_with_or_without_timestamps Hash_fct; + typedef boost::unordered_set Vertex_container; -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4003) // not enough actual parameters for macro -#endif + bool did_something = false; + do + { + Vertex_container vertex_container; + find_points_to_project(c3t3, std::insert_iterator(vertex_container, vertex_container.begin())); + did_something = project_points(c3t3, domain, vertex_container.begin(), vertex_container.end()); + } + while(did_something); +} -// see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS - -BOOST_PARAMETER_FUNCTION( - (void), - refine_periodic_3_mesh_3, - parameters::tag, - (required (in_out(c3t3),*) (domain,*) (criteria,*) ) // nondeduced - (deduced - (optional - (exude_param, (parameters::internal::Exude_options), parameters::no_exude()) // another default parameter distinct from Mesh_3 - (perturb_param, (parameters::internal::Perturb_options), parameters::no_perturb()) // another default parameter distinct from Mesh_3 - (odt_param, (parameters::internal::Odt_options), parameters::no_odt()) - (lloyd_param, (parameters::internal::Lloyd_options), parameters::no_lloyd()) - (reset_param, (parameters::Reset), parameters::reset_c3t3()) - (mesh_options_param, (parameters::internal::Mesh_3_options), - parameters::internal::Mesh_3_options()) - (manifold_options_param, (parameters::internal::Manifold_options), - parameters::internal::Manifold_options()) - ) - ) -) +} // namespace internal + +/*! + * \ingroup PkgPeriodic3Mesh3Functions + * + * The function `refine_periodic_3_mesh_3()` is a 3D periodic + * mesh generator. It produces periodic simplicial meshes which discretize + * 3D periodic domains. + * + * The periodic mesh generation algorithm is a Delaunay refinement process + * followed by an optimization phase. + * The criteria driving the Delaunay refinement + * process may be tuned to achieve the user needs with respect to + * the size of mesh elements, the accuracy of boundaries approximation, etc. + * + * The optimization phase is a sequence of optimization processes, + * amongst the following available optimizers: an ODT-smoothing, + * a Lloyd smoothing, a sliver perturber, and a sliver exuder. + * Each optimization process can be activated or not, according to the user requirements + * and available time. + * By default, only the perturber and the exuder are activated. + * Note that the benefits of the exuder will be lost if the mesh + * is further refined afterward. + * + * \attention The function template `refine_periodic_3_mesh_3()` may be used + * to refine a previously computed mesh, e.g.: + * \code{.cpp} + * C3T3 c3t3 = CGAL::make_periodic_3_mesh_3(domain,criteria); + * + * CGAL::refine_periodic_3_mesh_3(c3t3, domain, new_criteria); + * \endcode + * + * \attention Note that the triangulation must form at all times a simplicial complex within + * a single copy of the domain (see Sections \ref P3Triangulation3secspace and \ref P3Triangulation3secintro + * of the manual of 3D periodic triangulations). It is the responsibility of the user to provide + * a triangulation that satisfies this condition when calling the refinement + * function `refine_periodic_3_mesh_3`. The underlying triangulation of a mesh + * complex obtained through `make_periodic_3_mesh_3()` or `refine_periodic_3_mesh_3()` + * will always satisfy this condition. + * + * + * \tparam C3T3 is required to be a model of + * the concept + * `MeshComplex_3InTriangulation_3`. + * The argument `c3t3` is passed by + * reference as this object is modified by the refinement process. As the + * refinement process only adds points to the triangulation, all + * vertices of the triangulation of `c3t3` remain in the + * mesh during the refinement process. Object `c3t3` can be used to insert + * specific points in the domain to ensure that they will be contained in the + * final triangulation. + * The type `C3T3` is in particular required to provide a nested type + * `C3T3::Triangulation` for the 3D triangulation + * embedding the mesh. The vertex and cell base classes of the + * triangulation `C3T3::Triangulation` are required to be models of the + * concepts `MeshVertexBase_3` and `MeshCellBase_3` + * respectively. + * + * \tparam MD is required to be a model of + * the concept `Periodic_3MeshDomain_3` or of the refined concept + * `Periodic_3MeshDomainWithFeatures_3` if 0 and 1-dimensional features + * of the input complex have to be accurately represented in the mesh. + * The argument `domain` is the sole link through which the domain + * to be discretized is known by the mesh generation algorithm. + * + * \tparam MC is required to be a model of the concept + * `MeshCriteria_3`, or a model of the refined concept `MeshCriteriaWithFeatures_3` + * if the domain has exposed features. The argument `criteria` of + * type `MC` specifies the + * size and shape requirements for mesh tetrahedra + * and surface facets. These criteria + * form the rules which drive the refinement process. All mesh elements + * satisfy those criteria at the end of the refinement process. + * In addition, if the domain has features, the argument + * `criteria` provides a sizing field to guide the discretization + * of 1-dimensional exposed features. + * + * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters + * + * \param c3t3 the mesh to be refined. + * \param domain the domain to be discretized + * \param criteria the criteria + * \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * + * The following four parameters are optional optimization parameters. + * They control which optimization processes are performed + * and allow the user to tune the parameters of the optimization processes. + * Individual optimization parameters are not described here as they are + * internal types (see instead the documentation page of each optimizer). + * For each optimization algorithm, there exist two global functions + * that allow to enable or disable the optimizer: + * + * \cgalNamedParamsBegin + * \cgalParamSectionBegin{Topological options (manifoldness)} + * \cgalParamDescription{In order to drive the meshing algorithm and ensure that the output mesh follows a desired topological criterion, + * three named parameters control this option: + *
      + *
    • `parameters::manifold()` + *
    • `parameters::manifold_with_boundary()` + *
    • `parameters::non_manifold()` + *
    + * Note that the meshing algorithm cannot generate a manifold surface if the input surface is not manifold.} + * \cgalParamDefault{`parameters::non_manifold()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{Lloyd optimization} + * \cgalParamDescription{`lloyd_optimize_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::no_lloyd()` + *
    • `parameters::lloyd_optimize_mesh_3()` + *
    } + * \cgalParamDefault{`parameters::no_lloyd()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{ODT optimization} + * \cgalParamDescription{`odt_optimize_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::no_odt()` + *
    • `parameters::odt()` + *
    } + * \cgalParamDefault{`parameters::no_odt()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{Mesh perturbation} + * \cgalParamDescription{`perturb_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::no_perturb()` + *
    • `parameters::perturb()` + *
    } + * \cgalParamDefault{`parameters::perturb()`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{Mesh exudation} + * \cgalParamDescription{`exude_mesh_3()` can optionally be called after the meshing process. + * Two named parameters control this behavior: + *
      + *
    • `parameters::exude()` + *
    • `parameters::no_exude()` + *
    } + * \cgalParamDefault{`parameters::exude()`} + * \cgalParamSectionEnd + * \cgalNamedParamsEnd + * + * The optimization parameters can be passed in arbitrary order. If one parameter + * is not passed, its default value is used. The default values are + * `no_lloyd()`, `no_odt()`, `perturb()` and `exude()`. + * Note that whatever may be the optimization processes activated, + * they are always launched in the order that is a suborder + * of the following (see user manual for further + * details): *ODT-smoother*, *Lloyd-smoother*, *perturber*, and *exuder*. + * + * Beware that optimization of the mesh is obtained + * by perturbing mesh vertices and modifying the mesh connectivity + * and that this has an impact + * on the strict compliance to the refinement criteria. + * Though a strict compliance to mesh criteria + * is guaranteed at the end of the Delaunay refinement, this may no longer be true after + * some optimization processes. Also beware that the default behavior does involve some + * optimization processes. + * + * \sa `make_periodic_3_mesh_3()` + * \sa `refine_mesh_3()` + * \sa `exude_periodic_3_mesh_3()` + * \sa `perturb_periodic_3_mesh_3()` + * \sa `lloyd_optimize_periodic_3_mesh_3()` + * \sa `odt_optimize_periodic_3_mesh_3()` + */ +template +void refine_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain, const MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values()) { - return refine_periodic_3_mesh_3_impl(c3t3, domain, criteria, + using parameters::choose_parameter; + using parameters::get_parameter; + parameters::internal::Exude_options exude_param = choose_parameter(get_parameter(np, internal_np::exude_options_param), parameters::exude().v); + parameters::internal::Perturb_options perturb_param = choose_parameter(get_parameter(np, internal_np::perturb_options_param), parameters::perturb().v); + parameters::internal::Odt_options odt_param = choose_parameter(get_parameter(np, internal_np::odt_options_param), parameters::no_odt().v); + parameters::internal::Lloyd_options lloyd_param = choose_parameter(get_parameter(np, internal_np::lloyd_options_param), parameters::no_lloyd().v); + bool reset = choose_parameter(get_parameter(np, internal_np::do_reset_c3t3), false); + parameters::internal::Mesh_3_options mesh_options_param = choose_parameter(get_parameter(np, internal_np::mesh_param), parameters::internal::Mesh_3_options()); + parameters::internal::Manifold_options manifold_options_param = choose_parameter(get_parameter(np, internal_np::manifold_param), parameters::internal::Manifold_options()); + + return refine_periodic_3_mesh_3_impl(c3t3, + domain, + criteria, exude_param, perturb_param, odt_param, lloyd_param, - reset_param(), + reset, mesh_options_param, manifold_options_param); } -CGAL_PRAGMA_DIAG_POP - -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif +#ifndef DOXYGEN_RUNNING +// Overload handling parameters passed with operator= +template +void refine_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain, const MeshCriteria& criteria, + const CGAL_NP_CLASS_1& np1, + const CGAL_NP_CLASS_2& np2, + const NP& ... nps) +{ + return refine_periodic_3_mesh_3(c3t3, domain, criteria, internal_np::combine_named_parameters(np1, np2, nps...)); +} /** * @brief This function refines the mesh c3t3 wrt domain & criteria @@ -185,11 +404,11 @@ CGAL_PRAGMA_DIAG_POP * @param c3t3 the mesh to be refined. * @param domain the domain to be discretized * @param criteria the criteria - * @param exude if \c true, an exudation step will be done at + * @param exude if `true`, an exudation step will be done at * the end of the Delaunay refinement process - * @param perturb if \c true, an explicit vertex perturbation step will be + * @param perturb if `true`, an explicit vertex perturbation step will be * done at the end of refinement process - * @param reset_c3t3 if \c true, a new C3T3 will be construct from param c3t3. + * @param reset_c3t3 if `true`, a new C3T3 will be construct from param c3t3. * The new c3t3 keeps only the vertices (as NON-weighted points with their * dimension and Index) of the triangulation. That allows to refine a mesh * which has been exuded. @@ -253,21 +472,21 @@ void refine_periodic_3_mesh_3_impl(C3T3& c3t3, // Odt if(odt) { - odt_optimize_mesh_3(c3t3, domain, - parameters::time_limit = odt.time_limit(), - parameters::max_iteration_number = odt.max_iteration_number(), - parameters::convergence = odt.convergence(), - parameters::freeze_bound = odt.bound()); + odt_optimize_periodic_3_mesh_3(c3t3, domain, + parameters::time_limit = odt.time_limit(), + parameters::max_iteration_number = odt.max_iteration_number(), + parameters::convergence = odt.convergence(), + parameters::freeze_bound = odt.bound()); } // Lloyd if(lloyd) { - lloyd_optimize_mesh_3(c3t3, domain, - parameters::time_limit = lloyd.time_limit(), - parameters::max_iteration_number = lloyd.max_iteration_number(), - parameters::convergence = lloyd.convergence(), - parameters::freeze_bound = lloyd.bound()); + lloyd_optimize_periodic_3_mesh_3(c3t3, domain, + parameters::time_limit = lloyd.time_limit(), + parameters::max_iteration_number = lloyd.max_iteration_number(), + parameters::convergence = lloyd.convergence(), + parameters::freeze_bound = lloyd.bound()); } if(odt || lloyd) @@ -283,9 +502,9 @@ void refine_periodic_3_mesh_3_impl(C3T3& c3t3, if(perturb.is_time_limit_set()) perturb_time_limit = perturb.time_limit(); - perturb_mesh_3(c3t3, domain, - parameters::time_limit = perturb_time_limit, - parameters::sliver_bound = perturb.bound()); + perturb_periodic_3_mesh_3(c3t3, domain, + parameters::time_limit = perturb_time_limit, + parameters::sliver_bound = perturb.bound()); dump_c3t3(c3t3, mesh_options.dump_after_perturb_prefix); } @@ -298,9 +517,9 @@ void refine_periodic_3_mesh_3_impl(C3T3& c3t3, if(exude.is_time_limit_set()) exude_time_limit = exude.time_limit(); - exude_mesh_3(c3t3, - parameters::time_limit = exude_time_limit, - parameters::sliver_bound = exude.bound()); + exude_periodic_3_mesh_3(c3t3, + parameters::time_limit = exude_time_limit, + parameters::sliver_bound = exude.bound()); dump_c3t3(c3t3, mesh_options.dump_after_perturb_prefix); } @@ -309,6 +528,7 @@ void refine_periodic_3_mesh_3_impl(C3T3& c3t3, CGAL_expensive_postcondition(c3t3.triangulation().is_valid()); CGAL_expensive_postcondition(c3t3.is_valid()); } +#endif //DOXYGEN_RUNNING } // end namespace CGAL diff --git a/thirdparty/CGAL/include/CGAL/regular_neighbor_coordinates_2.h b/thirdparty/CGAL/include/CGAL/regular_neighbor_coordinates_2.h index 6e3edcb8..ca0e6832 100644 --- a/thirdparty/CGAL/include/CGAL/regular_neighbor_coordinates_2.h +++ b/thirdparty/CGAL/include/CGAL/regular_neighbor_coordinates_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interpolation/include/CGAL/regular_neighbor_coordinates_2.h $ -// $Id: regular_neighbor_coordinates_2.h ce98cd4 2021-09-03T09:15:26+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interpolation/include/CGAL/regular_neighbor_coordinates_2.h $ +// $Id: include/CGAL/regular_neighbor_coordinates_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Julia Floetotto @@ -16,20 +16,18 @@ #include -#include +#include #include #include #include #include -#include -#include - #include #include #include #include #include +#include namespace CGAL { @@ -307,9 +305,9 @@ regular_neighbor_coordinates_2(const Rt& rt, OutputIterator out, OutputIteratorVorVertices vor_vertices, typename Rt::Face_handle start, - typename boost::enable_if_c< - is_iterator::value - >::type* = 0) + std::enable_if_t< + is_iterator::value + >* = 0) { // Same as above but without OutputFunctor. Default to extracting the point, for backward compatibility. typedef typename Rt::Geom_traits::FT FT; @@ -327,9 +325,9 @@ regular_neighbor_coordinates_2(const Rt& rt, OutputIterator out, OutputFunctor fct, typename Rt::Face_handle start, - typename boost::disable_if_c< - is_iterator::value - >::type* = 0) + std::enable_if_t< + !is_iterator::value + >* = 0) { return regular_neighbor_coordinates_2(rt, p, out, fct, Emptyset_iterator(), start); } @@ -342,10 +340,10 @@ regular_neighbor_coordinates_2(const Rt& rt, const typename Rt::Weighted_point& p, OutputIterator out, OutputFunctor fct, - typename boost::disable_if_c< - boost::is_convertible::value - >::type* = 0) + >* = 0) { return regular_neighbor_coordinates_2(rt, p, out, fct, typename Rt::Face_handle()); } @@ -424,9 +422,9 @@ regular_neighbor_coordinates_2(const Rt& rt, EdgeIterator hole_end, VertexIterator hidden_vertices_begin, VertexIterator hidden_vertices_end, - typename boost::disable_if_c< - is_iterator::value - >::type* = 0) + std::enable_if_t< + !is_iterator::value + >* = 0) { return regular_neighbor_coordinates_2(rt, p, out, fct, Emptyset_iterator(), hole_begin, hole_end, @@ -447,9 +445,9 @@ regular_neighbor_coordinates_2(const Rt& rt, EdgeIterator hole_end, VertexIterator hidden_vertices_begin, VertexIterator hidden_vertices_end, - typename boost::enable_if_c< - is_iterator::value - >::type* = 0) + std::enable_if_t< + is_iterator::value + >* = 0) { typedef typename Rt::Geom_traits::FT FT; typedef Interpolation::internal::Extract_point_in_pair OutputFunctor; diff --git a/thirdparty/CGAL/include/CGAL/remove_far_points_in_mesh_3.h b/thirdparty/CGAL/include/CGAL/remove_far_points_in_mesh_3.h index 85c2522f..e9fde50d 100644 --- a/thirdparty/CGAL/include/CGAL/remove_far_points_in_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/remove_far_points_in_mesh_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Mesh_3/include/CGAL/remove_far_points_in_mesh_3.h $ -// $Id: remove_far_points_in_mesh_3.h bad72db 2021-09-17T16:03:06+02:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Mesh_3/include/CGAL/remove_far_points_in_mesh_3.h $ +// $Id: include/CGAL/remove_far_points_in_mesh_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/remove_outliers.h b/thirdparty/CGAL/include/CGAL/remove_outliers.h index dc018d72..5fd85cc9 100644 --- a/thirdparty/CGAL/include/CGAL/remove_outliers.h +++ b/thirdparty/CGAL/include/CGAL/remove_outliers.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/remove_outliers.h $ -// $Id: remove_outliers.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/remove_outliers.h $ +// $Id: include/CGAL/remove_outliers.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Saboret and Nader Salman and Pierre Alliez @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include @@ -206,12 +206,12 @@ remove_outliers( // precondition: at least one element in the container. // to fix: should have at least three distinct points // but this is costly to check - CGAL_point_set_processing_precondition(points.begin() != points.end()); + CGAL_precondition(points.begin() != points.end()); // precondition: at least 2 nearest neighbors - CGAL_point_set_processing_precondition(k >= 2); + CGAL_precondition(k >= 2); - CGAL_point_set_processing_precondition(threshold_percent >= 0 && threshold_percent <= 100); + CGAL_precondition(threshold_percent >= 0 && threshold_percent <= 100); Neighbor_query neighbor_query (points, point_map); diff --git a/thirdparty/CGAL/include/CGAL/representation_tags.h b/thirdparty/CGAL/include/CGAL/representation_tags.h index 391c41ab..993f6472 100644 --- a/thirdparty/CGAL/include/CGAL/representation_tags.h +++ b/thirdparty/CGAL/include/CGAL/representation_tags.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/representation_tags.h $ -// $Id: representation_tags.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/representation_tags.h $ +// $Id: include/CGAL/representation_tags.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/result_of.h b/thirdparty/CGAL/include/CGAL/result_of.h index 611e3aba..f46e9cc4 100644 --- a/thirdparty/CGAL/include/CGAL/result_of.h +++ b/thirdparty/CGAL/include/CGAL/result_of.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/result_of.h $ -// $Id: result_of.h 747add5 2021-05-25T13:47:18+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/result_of.h $ +// $Id: include/CGAL/result_of.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/scanline_orient_normals.h b/thirdparty/CGAL/include/CGAL/scanline_orient_normals.h index 7873dba4..fc6c8ac6 100644 --- a/thirdparty/CGAL/include/CGAL/scanline_orient_normals.h +++ b/thirdparty/CGAL/include/CGAL/scanline_orient_normals.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/scanline_orient_normals.h $ -// $Id: scanline_orient_normals.h bccf399 2022-11-08T10:51:46+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/scanline_orient_normals.h $ +// $Id: include/CGAL/scanline_orient_normals.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot @@ -20,6 +20,7 @@ #include #include +#include #include @@ -327,7 +328,7 @@ void orient_scanline (Iterator begin, Iterator end, const Point_3& p = get (point_map, *it); mean_x += p.x(); mean_y += p.y(); - max_z = (std::max)(max_z, p.z()); + max_z = (std::max)(max_z, CGAL::to_double(p.z())); ++ nb; } @@ -372,7 +373,7 @@ void orient_scanline (Iterator begin, Iterator end, iterating on `points`: - if the named parameter `scanline_id_map` is provided, the range - is cutted everytime the id changes. + is cut everytime the id changes. - if no scanline ID map is provided, a fallback method simply cuts the range everytime 3 consecutive points form an acute angle on @@ -545,6 +546,8 @@ void scanline_orient_normals (PointRange& points, const NamedParameters& np = pa std::cerr << nb_scanlines << " scanline(s) identified (mean length = " << std::size_t(points.size() / double(nb_scanlines)) << " point(s))" << std::endl; +#else + CGAL_USE(nb_scanlines); #endif } diff --git a/thirdparty/CGAL/include/CGAL/segment_intersection_points_2.h b/thirdparty/CGAL/include/CGAL/segment_intersection_points_2.h index b6428a03..4c8df8c9 100644 --- a/thirdparty/CGAL/include/CGAL/segment_intersection_points_2.h +++ b/thirdparty/CGAL/include/CGAL/segment_intersection_points_2.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Convex_hull_2/include/CGAL/segment_intersection_points_2.h $ -// $Id: segment_intersection_points_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Convex_hull_2/include/CGAL/segment_intersection_points_2.h $ +// $Id: include/CGAL/segment_intersection_points_2.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/sibson_gradient_fitting.h b/thirdparty/CGAL/include/CGAL/sibson_gradient_fitting.h index a81e9a12..a2d9b3ca 100644 --- a/thirdparty/CGAL/include/CGAL/sibson_gradient_fitting.h +++ b/thirdparty/CGAL/include/CGAL/sibson_gradient_fitting.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interpolation/include/CGAL/sibson_gradient_fitting.h $ -// $Id: sibson_gradient_fitting.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interpolation/include/CGAL/sibson_gradient_fitting.h $ +// $Id: include/CGAL/sibson_gradient_fitting.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -22,15 +22,12 @@ #include #include -#include -#include -#include +#include #include #include #include #include - #include #include @@ -229,11 +226,11 @@ sibson_gradient_fitting_nn_2(const Dt& dt, const Traits& traits, // Some SFINAE to distinguish whether the argument type // of the value functor is 'DT::Point' or 'DT::Vertex_handle' - typename boost::enable_if_c< + std::enable_if_t< std::is_constructible< - std::function, + std::function, ValueFunctor - >::value>::type* = nullptr) + >::value>* = nullptr) { typedef typename Traits::FT FT; typedef typename Dt::Point VF_arg_type; @@ -255,11 +252,11 @@ sibson_gradient_fitting_nn_2(const Dt& dt, OutputFunctor fct, ValueFunctor value_function, const Traits& traits, - typename boost::enable_if_c< + std::enable_if_t< std::is_constructible< - std::function, + std::function, ValueFunctor - >::value>::type* = nullptr) + >::value>* = nullptr) { typedef typename Traits::FT FT; typedef typename Dt::Vertex_handle VF_arg_type; @@ -299,11 +296,11 @@ sibson_gradient_fitting_rn_2(const Rt& rt, const Traits& traits, // Some SFINAE to distinguish whether the argument type // of the value functor is 'Rt::Point' (weighted point) or 'Rt::Vertex_handle' - typename boost::enable_if_c< + std::enable_if_t< std::is_constructible< - std::function, + std::function, ValueFunctor - >::value>::type* = nullptr) + >::value>* = nullptr) { typedef typename Traits::FT FT; typedef typename Rt::Point VF_arg_type; @@ -325,11 +322,11 @@ sibson_gradient_fitting_rn_2(const Rt& rt, OutputFunctor fct, ValueFunctor value_function, const Traits& traits, - typename boost::enable_if_c< + std::enable_if_t< std::is_constructible< - std::function, + std::function, ValueFunctor - >::value>::type* = nullptr) + >::value>* = nullptr) { typedef typename Traits::FT FT; typedef typename Rt::Vertex_handle VF_arg_type; diff --git a/thirdparty/CGAL/include/CGAL/simple_transformations_d.h b/thirdparty/CGAL/include/CGAL/simple_transformations_d.h index f0ab70db..4d00c0ac 100644 --- a/thirdparty/CGAL/include/CGAL/simple_transformations_d.h +++ b/thirdparty/CGAL/include/CGAL/simple_transformations_d.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_d/include/CGAL/simple_transformations_d.h $ -// $Id: simple_transformations_d.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_d/include/CGAL/simple_transformations_d.h $ +// $Id: include/CGAL/simple_transformations_d.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/simplest_rational_in_interval.h b/thirdparty/CGAL/include/CGAL/simplest_rational_in_interval.h index 99987785..c3494826 100644 --- a/thirdparty/CGAL/include/CGAL/simplest_rational_in_interval.h +++ b/thirdparty/CGAL/include/CGAL/simplest_rational_in_interval.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/simplest_rational_in_interval.h $ -// $Id: simplest_rational_in_interval.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/simplest_rational_in_interval.h $ +// $Id: include/CGAL/simplest_rational_in_interval.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -43,10 +43,10 @@ simplest_rational_in_interval(double x, double y) { // Must be a fraction CGAL_USE_TYPE(Is_fraction); - CGAL_static_assertion((::boost::is_same::value)); + static_assert(::std::is_same::value); // Numerator_type,Denominator_type must be the same CGAL_USE_TYPE(Denominator_type); - CGAL_static_assertion((::boost::is_same::value)); + static_assert(::std::is_same::value); if(x == y){ diff --git a/thirdparty/CGAL/include/CGAL/sorted_matrix_search.h b/thirdparty/CGAL/include/CGAL/sorted_matrix_search.h index 831306db..3803d0ae 100644 --- a/thirdparty/CGAL/include/CGAL/sorted_matrix_search.h +++ b/thirdparty/CGAL/include/CGAL/sorted_matrix_search.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Matrix_search/include/CGAL/sorted_matrix_search.h $ -// $Id: sorted_matrix_search.h 1e249af 2020-11-10T19:21:21+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Matrix_search/include/CGAL/sorted_matrix_search.h $ +// $Id: include/CGAL/sorted_matrix_search.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -17,7 +17,7 @@ #include -#include +#include #include #include #include @@ -159,13 +159,13 @@ sorted_matrix_search(InputIterator f, InputIterator l, Traits t) Cell_container active_cells; // set of input matrices must not be empty: - CGAL_optimisation_precondition( f != l); + CGAL_precondition( f != l); // for each input matrix insert a cell into active_cells: InputIterator i( f); int maxdim( -1); while ( i != l) { - CGAL_optimisation_expensive_precondition( + CGAL_expensive_precondition( PaddedMatrix( *i).is_sorted()); active_cells.push_back( Cell( PaddedMatrix( *i))); maxdim = max BOOST_PREVENT_MACRO_SUBSTITUTION ( max BOOST_PREVENT_MACRO_SUBSTITUTION ( (*i).number_of_columns(), @@ -173,7 +173,7 @@ sorted_matrix_search(InputIterator f, InputIterator l, Traits t) maxdim); ++i; } - CGAL_optimisation_precondition( maxdim > 0); + CGAL_precondition( maxdim > 0); // current cell dimension: @@ -239,7 +239,7 @@ sorted_matrix_search(InputIterator f, InputIterator l, Traits t) break; // there has to be at least one cell left: - CGAL_optimisation_assertion( active_cells.size() > 0); + CGAL_assertion( active_cells.size() > 0); // ------------------------------------------------------ // compute medians of smallest and largest elements: @@ -285,7 +285,7 @@ sorted_matrix_search(InputIterator f, InputIterator l, Traits t) { return equal_to< Value >()(lower_median, Cell_min< Cell >()(c)); }); - CGAL_optimisation_assertion(lower_median_cell != active_cells.end()); + CGAL_assertion(lower_median_cell != active_cells.end()); // ------------------------------------------------------ // test feasibility of medians and remove cells accordingly: Cell_iterator new_end; @@ -385,8 +385,8 @@ sorted_matrix_search(InputIterator f, InputIterator l, Traits t) } // for (;;) // there must be only one cell left: - CGAL_optimisation_assertion( active_cells.size() == 1); - CGAL_optimisation_assertion( ccd == 1); + CGAL_assertion( active_cells.size() == 1); + CGAL_assertion( ccd == 1); return ((*active_cells.begin()).min)(); } diff --git a/thirdparty/CGAL/include/CGAL/spatial_sort.h b/thirdparty/CGAL/include/CGAL/spatial_sort.h index a3197094..387decb9 100644 --- a/thirdparty/CGAL/include/CGAL/spatial_sort.h +++ b/thirdparty/CGAL/include/CGAL/spatial_sort.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/spatial_sort.h $ -// $Id: spatial_sort.h 7508a6f 2020-02-12T17:05:49+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/spatial_sort.h $ +// $Id: include/CGAL/spatial_sort.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Christophe Delage diff --git a/thirdparty/CGAL/include/CGAL/spatial_sort_on_sphere.h b/thirdparty/CGAL/include/CGAL/spatial_sort_on_sphere.h index 262d9703..95986b1d 100644 --- a/thirdparty/CGAL/include/CGAL/spatial_sort_on_sphere.h +++ b/thirdparty/CGAL/include/CGAL/spatial_sort_on_sphere.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Spatial_sorting/include/CGAL/spatial_sort_on_sphere.h $ -// $Id: spatial_sort_on_sphere.h 20c4f3a 2021-03-19T17:28:55+01:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Spatial_sorting/include/CGAL/spatial_sort_on_sphere.h $ +// $Id: include/CGAL/spatial_sort_on_sphere.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Olivier Devillers diff --git a/thirdparty/CGAL/include/CGAL/squared_distance_2.h b/thirdparty/CGAL/include/CGAL/squared_distance_2.h index d8cd9ebd..4f996d89 100644 --- a/thirdparty/CGAL/include/CGAL/squared_distance_2.h +++ b/thirdparty/CGAL/include/CGAL/squared_distance_2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/squared_distance_2.h $ -// $Id: squared_distance_2.h 7e62c02 2021-04-12T14:02:37+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/squared_distance_2.h $ +// $Id: include/CGAL/squared_distance_2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/squared_distance_3.h b/thirdparty/CGAL/include/CGAL/squared_distance_3.h index 4ccb2aab..fcf50d21 100644 --- a/thirdparty/CGAL/include/CGAL/squared_distance_3.h +++ b/thirdparty/CGAL/include/CGAL/squared_distance_3.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_3/include/CGAL/squared_distance_3.h $ -// $Id: squared_distance_3.h 5deb509 2021-04-12T14:42:44+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_3/include/CGAL/squared_distance_3.h $ +// $Id: include/CGAL/squared_distance_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/sse2.h b/thirdparty/CGAL/include/CGAL/sse2.h index 8e6bcdc7..eff2392e 100644 --- a/thirdparty/CGAL/include/CGAL/sse2.h +++ b/thirdparty/CGAL/include/CGAL/sse2.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/sse2.h $ -// $Id: sse2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/sse2.h $ +// $Id: include/CGAL/sse2.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/stddef.h b/thirdparty/CGAL/include/CGAL/stddef.h index ced25182..fc226cfe 100644 --- a/thirdparty/CGAL/include/CGAL/stddef.h +++ b/thirdparty/CGAL/include/CGAL/stddef.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/stddef.h $ -// $Id: stddef.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/stddef.h $ +// $Id: include/CGAL/stddef.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial #error You have added .../path/to/CGAL-x.y/include/CGAL to the INCLUDE path. You should use .../path/to/CGAL-x.y/include instead. diff --git a/thirdparty/CGAL/include/CGAL/structure_point_set.h b/thirdparty/CGAL/include/CGAL/structure_point_set.h index 3488fb7c..13741849 100644 --- a/thirdparty/CGAL/include/CGAL/structure_point_set.h +++ b/thirdparty/CGAL/include/CGAL/structure_point_set.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/structure_point_set.h $ -// $Id: structure_point_set.h bccf399 2022-11-08T10:51:46+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/structure_point_set.h $ +// $Id: include/CGAL/structure_point_set.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -59,8 +58,8 @@ is a vertex). The implementation follow \cgalCite{cgal:la-srpss-13}. \tparam Kernel a model of `EfficientRANSACTraits` that must provide in addition a function `Intersect_3 intersection_3_object() const` and a functor `Intersect_3` with: -- `boost::optional< boost::variant< Traits::Plane_3, Traits::Line_3 > > operator()(typename Traits::Plane_3, typename Traits::Plane_3)` -- `boost::optional< boost::variant< Traits::Line_3, Traits::Point_3 > > operator()(typename Traits::Line_3, typename Traits::Plane_3)` +- `std::optional< std::variant< Traits::Plane_3, Traits::Line_3 > > operator()(typename Traits::Plane_3, typename Traits::Plane_3)` +- `std::optional< std::variant< Traits::Line_3, Traits::Point_3 > > operator()(typename Traits::Line_3, typename Traits::Plane_3)` */ template @@ -235,7 +234,7 @@ class Point_set_with_structure typedef typename Point_set_processing_3::GetPlaneIndexMap::type PlaneIndexMap; CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); - CGAL_static_assertion_msg((!is_default_parameter::value), + static_assert(!is_default_parameter::value, "Error: no plane index map"); PointMap point_map = NP_helper::get_const_point_map(points, np); @@ -257,7 +256,7 @@ class Point_set_with_structure { m_points.push_back (get(point_map, *it)); m_normals.push_back (get(normal_map, *it)); - int plane_index = get (index_map, idx); + int plane_index = static_cast(get (index_map, idx)); if (plane_index != -1) { m_indices_of_assigned_points[std::size_t(plane_index)].push_back(idx); @@ -679,7 +678,7 @@ class Point_set_with_structure for (std::size_t i = 0; i < Nx; ++ i) if( point_map[i][j].size()>0) { - //inside: recenter (cell center) the first point of the cell and desactivate the others points + //inside: recenter (cell center) the first point of the cell and deactivate the others points if (!Mask_border[i][j] && Mask[i][j]) { double x2pt = (i+0.5) * grid_length + box_2d.xmin(); @@ -704,7 +703,7 @@ class Point_set_with_structure m_status[point_map[i][j][np]] = SKIPPED; } - //border: recenter (barycenter) the first point of the cell and desactivate the others points + //border: recenter (barycenter) the first point of the cell and deactivate the others points else if (Mask_border[i][j] && Mask[i][j]) { std::vector pts; @@ -809,7 +808,7 @@ class Point_set_with_structure continue; } - if (const Line* l = boost::get(&*result)) + if (const Line* l = std::get_if(&*result)) m_edges[i].support = *l; else { @@ -983,7 +982,7 @@ class Point_set_with_structure std::size_t inde = division_tab[j][k]; if (CGAL::squared_distance (line, m_points[inde]) < d_DeltaEdge * d_DeltaEdge) - m_status[inde] = SKIPPED; // Deactive points too close (except best, see below) + m_status[inde] = SKIPPED; // Deactivate points too close (except best, see below) double distance = CGAL::squared_distance (perfect, m_points[inde]); if (distance < dist_min) @@ -1030,7 +1029,7 @@ class Point_set_with_structure auto result = CGAL::intersection (plane1, ortho); if (result) { - if (const Line* l = boost::get(&*result)) + if (const Line* l = std::get_if(&*result)) { if (!(pts1.empty())) { @@ -1067,7 +1066,7 @@ class Point_set_with_structure result = CGAL::intersection (plane2,ortho); if (result) { - if (const Line* l = boost::get(&*result)) + if (const Line* l = std::get_if(&*result)) { if (!(pts2.empty())) { @@ -1194,12 +1193,12 @@ class Point_set_with_structure const auto result = CGAL::intersection(plane1, plane2); if (result) { - if (const Line* l = boost::get(&*result)) + if (const Line* l = std::get_if(&*result)) { const auto result2 = CGAL::intersection(*l, plane3); if (result2) { - if (const Point* p = boost::get(&*result2)) + if (const Point* p = std::get_if(&*result2)) m_corners[i].support = *p; else { diff --git a/thirdparty/CGAL/include/CGAL/subdivide_skin_surface_mesh_3.h b/thirdparty/CGAL/include/CGAL/subdivide_skin_surface_mesh_3.h index f3a8c2c8..23693b92 100644 --- a/thirdparty/CGAL/include/CGAL/subdivide_skin_surface_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/subdivide_skin_surface_mesh_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/subdivide_skin_surface_mesh_3.h $ -// $Id: subdivide_skin_surface_mesh_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/subdivide_skin_surface_mesh_3.h $ +// $Id: include/CGAL/subdivide_skin_surface_mesh_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/subdivide_union_of_balls_mesh_3.h b/thirdparty/CGAL/include/CGAL/subdivide_union_of_balls_mesh_3.h index d1dce741..48ba069e 100644 --- a/thirdparty/CGAL/include/CGAL/subdivide_union_of_balls_mesh_3.h +++ b/thirdparty/CGAL/include/CGAL/subdivide_union_of_balls_mesh_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/subdivide_union_of_balls_mesh_3.h $ -// $Id: subdivide_union_of_balls_mesh_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/subdivide_union_of_balls_mesh_3.h $ +// $Id: include/CGAL/subdivide_union_of_balls_mesh_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/subdivision_method_3.h b/thirdparty/CGAL/include/CGAL/subdivision_method_3.h index af825f04..a7638006 100644 --- a/thirdparty/CGAL/include/CGAL/subdivision_method_3.h +++ b/thirdparty/CGAL/include/CGAL/subdivision_method_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Subdivision_method_3/include/CGAL/subdivision_method_3.h $ -// $Id: subdivision_method_3.h e893ac1 2020-08-18T10:06:51+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Subdivision_method_3/include/CGAL/subdivision_method_3.h $ +// $Id: include/CGAL/subdivision_method_3.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/surface_mesh_parameterization.h b/thirdparty/CGAL/include/CGAL/surface_mesh_parameterization.h index 85ff9d62..9825148f 100644 --- a/thirdparty/CGAL/include/CGAL/surface_mesh_parameterization.h +++ b/thirdparty/CGAL/include/CGAL/surface_mesh_parameterization.h @@ -3,21 +3,25 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesh_parameterization/include/CGAL/surface_mesh_parameterization.h $ -// $Id: surface_mesh_parameterization.h d2cd147 2020-07-10T10:54:07+02:00 Mael Rouxel-Labbé +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesh_parameterization/include/CGAL/surface_mesh_parameterization.h $ +// $Id: include/CGAL/surface_mesh_parameterization.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Mael Rouxel-Labbé +#ifndef CGAL_SURFACE_MESH_PARAMETERIZATION_H +#define CGAL_SURFACE_MESH_PARAMETERIZATION_H + +#include + /** -* \ingroup PkgSurfaceMeshParameterization +* \ingroup PkgSurfaceMeshParameterizationRef * \file CGAL/surface_mesh_parameterization.h * Convenience header file including the headers for all * the free functions of this package. */ - #include #include #include @@ -35,3 +39,4 @@ #include #include +#endif // CGAL_SURFACE_MESH_PARAMETERIZATION_H diff --git a/thirdparty/CGAL/include/CGAL/surface_neighbor_coordinates_3.h b/thirdparty/CGAL/include/CGAL/surface_neighbor_coordinates_3.h index 59573376..26ad5aee 100644 --- a/thirdparty/CGAL/include/CGAL/surface_neighbor_coordinates_3.h +++ b/thirdparty/CGAL/include/CGAL/surface_neighbor_coordinates_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interpolation/include/CGAL/surface_neighbor_coordinates_3.h $ -// $Id: surface_neighbor_coordinates_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interpolation/include/CGAL/surface_neighbor_coordinates_3.h $ +// $Id: include/CGAL/surface_neighbor_coordinates_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Julia Floetotto diff --git a/thirdparty/CGAL/include/CGAL/surface_neighbors_3.h b/thirdparty/CGAL/include/CGAL/surface_neighbors_3.h index 35744706..249e0062 100644 --- a/thirdparty/CGAL/include/CGAL/surface_neighbors_3.h +++ b/thirdparty/CGAL/include/CGAL/surface_neighbors_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Interpolation/include/CGAL/surface_neighbors_3.h $ -// $Id: surface_neighbors_3.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Interpolation/include/CGAL/surface_neighbors_3.h $ +// $Id: include/CGAL/surface_neighbors_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Julia Floetotto diff --git a/thirdparty/CGAL/include/CGAL/sweep_observer.h b/thirdparty/CGAL/include/CGAL/sweep_observer.h index ab7f9e6a..0f0f1fa9 100644 --- a/thirdparty/CGAL/include/CGAL/sweep_observer.h +++ b/thirdparty/CGAL/include/CGAL/sweep_observer.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Nef_2/include/CGAL/sweep_observer.h $ -// $Id: sweep_observer.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Nef_2/include/CGAL/sweep_observer.h $ +// $Id: include/CGAL/sweep_observer.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/tags.h b/thirdparty/CGAL/include/CGAL/tags.h index e7148e19..776097bd 100644 --- a/thirdparty/CGAL/include/CGAL/tags.h +++ b/thirdparty/CGAL/include/CGAL/tags.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/tags.h $ -// $Id: tags.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/tags.h $ +// $Id: include/CGAL/tags.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -19,26 +19,13 @@ #define CGAL_TAGS_H #include -#include namespace CGAL { struct Void {}; -// Boolean_tag is a model of the Boost Integral Constant concept. -// https://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html template -struct Boolean_tag { - typedef boost::mpl::integral_c_tag tag; - typedef bool value_type; - static const bool value = b; - typedef Boolean_tag type; - operator bool() const { return this->value; } -}; -/* In C++11, try: -template -using Boolean_tag = std::integral_constant; -*/ +using Boolean_tag = std::bool_constant; typedef Boolean_tag Tag_true; typedef Boolean_tag Tag_false; @@ -81,6 +68,27 @@ Assert_compile_time_tag( const Tag&, const Derived& b) x.match_compile_time_tag(b); } -} //namespace CGAL +// To distinguish between kernel predicates for which a division-less FT is sufficient +template +struct Needs_FT +{ + T value; + Needs_FT(T v) : value(v) {} + operator T() const { return value; } +}; + +template +struct Remove_needs_FT +{ + using Type = T; +}; + +template +struct Remove_needs_FT > +{ + using Type = T; +}; + +} // namespace CGAL #endif // CGAL_TAGS_H diff --git a/thirdparty/CGAL/include/CGAL/test_FPU_rounding_mode_impl.h b/thirdparty/CGAL/include/CGAL/test_FPU_rounding_mode_impl.h index ae93d3bf..70dc7158 100644 --- a/thirdparty/CGAL/include/CGAL/test_FPU_rounding_mode_impl.h +++ b/thirdparty/CGAL/include/CGAL/test_FPU_rounding_mode_impl.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/test_FPU_rounding_mode_impl.h $ -// $Id: test_FPU_rounding_mode_impl.h a08470b 2020-11-03T10:14:42+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/test_FPU_rounding_mode_impl.h $ +// $Id: include/CGAL/test_FPU_rounding_mode_impl.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/tetrahedral_remeshing.h b/thirdparty/CGAL/include/CGAL/tetrahedral_remeshing.h index 5f0c8198..9b8b093b 100644 --- a/thirdparty/CGAL/include/CGAL/tetrahedral_remeshing.h +++ b/thirdparty/CGAL/include/CGAL/tetrahedral_remeshing.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h $ -// $Id: tetrahedral_remeshing.h 1b6d590 2022-12-14T10:18:16+01:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h $ +// $Id: include/CGAL/tetrahedral_remeshing.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -61,7 +61,7 @@ namespace CGAL * subdomains throughout the remeshing process. * * Subdomains are defined by indices that -* are stored in the cells of the input triangulation, following the `MeshCellBase_3` +* are stored in the cells of the input triangulation, following the `SimplicialMeshCellBase_3` * concept (refined by `RemeshingCellBase_3`). * The surfacic interfaces between subdomains are formed by facets whose two incident cells * have different subdomain indices. @@ -302,29 +302,72 @@ void tetrahedral_isotropic_remeshing( * @tparam Tr is the underlying triangulation for `Mesh_complex_3_in_triangulation_3`. * It can be instantiated with any 3D regular triangulation of CGAL provided * that its vertex and cell base classes are models of the concepts -* `MeshVertexBase_3` (refined by `RemeshingCellBase_3`) -* and `MeshCellBase_3` (refined by `RemeshingVertexBase_3`), respectively. +* `SimplicialMeshCellBase_3` (refined by `RemeshingCellBase_3`) +* and `SimplicialMeshVertexBase_3` (refined by `RemeshingVertexBase_3`), respectively. * @tparam CornerIndex is the type of the indices for feature corners. * If `c3t3` has been generated using `CGAL::make_mesh_3()`, it must match -* the `Corner_index` type of the model of the `MeshDomainWithFeatures_3` concept used for mesh generation. +* `MeshDomainWithFeatures_3::Corner_index`. * @tparam CurveIndex is the type of the indices for feature curves. * If `c3t3` has been generated using `CGAL::make_mesh_3()`, it must match -* the `Curve_index` type of the model of the `MeshDomainWithFeatures_3` concept used for mesh generation. +* `MeshDomainWithFeatures_3::Curve_index`. +* @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" * * @param c3t3 the complex containing the triangulation to be remeshed. +* @param np optional sequence of \ref bgl_namedparameters "Named Parameters" +* among the ones listed below +* +* \cgalNamedParamsBegin +* \cgalParamNBegin{edge_is_constrained_map} +* \cgalParamDescription{a property map containing the constrained-or-not status of each edge of +* `c3t3.triangulation()`. +* For each edge `e` for which `c3t3.is_in_complex(e)` returns `true`, +* the constrained status of `e` is set to `true`.} +* \cgalParamType{a class model of `ReadWritePropertyMap` +* with `std::pair` +* as key type and `bool` as value type. It must be default constructible.} +* \cgalParamDefault{a default property map where no edge is constrained} +* \cgalParamNEnd +* +* \cgalNamedParamsEnd */ template + typename CurveIndex, + typename NamedParameters = parameters::Default_named_parameters> CGAL::Triangulation_3 convert_to_triangulation_3( - CGAL::Mesh_complex_3_in_triangulation_3 c3t3) + CGAL::Mesh_complex_3_in_triangulation_3 c3t3, + const NamedParameters& np = parameters::default_values()) { + using parameters::get_parameter; + using parameters::choose_parameter; + using GT = typename Tr::Geom_traits; using TDS = typename Tr::Triangulation_data_structure; + using Vertex_handle = typename Tr::Vertex_handle; + using Edge_vv = std::pair; + using Default_pmap = Constant_property_map; + using ECMap = typename internal_np::Lookup_named_param_def < + internal_np::edge_is_constrained_t, + NamedParameters, + Default_pmap + >::type; + ECMap ecmap = choose_parameter(get_parameter(np, internal_np::edge_is_constrained), + Default_pmap(false)); + + if (!std::is_same_v) + { + for (auto e : c3t3.edges_in_complex()) + { + const Edge_vv evv + = CGAL::Tetrahedral_remeshing::make_vertex_pair(e);//ordered pair + put(ecmap, evv, true); + } + } + CGAL::Triangulation_3 tr; tr.swap(c3t3.triangulation()); return tr; @@ -392,15 +435,14 @@ void tetrahedral_isotropic_remeshing( = choose_parameter(get_parameter(np, internal_np::smooth_constrained_edges), false); - typedef typename Tr::Cell_handle Cell_handle; typedef typename internal_np::Lookup_named_param_def < - internal_np::cell_selector_t, + internal_np::cell_selector_t, NamedParameters, - Constant_property_map//default + Tetrahedral_remeshing::internal::All_cells_selected//default > ::type SelectionFunctor; SelectionFunctor cell_select = choose_parameter(get_parameter(np, internal_np::cell_selector), - Constant_property_map(true)); + Tetrahedral_remeshing::internal::All_cells_selected()); typedef std::pair Edge_vv; typedef typename internal_np::Lookup_named_param_def < diff --git a/thirdparty/CGAL/include/CGAL/tetrahedron_soup_to_triangulation_3.h b/thirdparty/CGAL/include/CGAL/tetrahedron_soup_to_triangulation_3.h new file mode 100644 index 00000000..afcdf78e --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/tetrahedron_soup_to_triangulation_3.h @@ -0,0 +1,221 @@ +// Copyright (c) 2009-2014 INRIA Sophia-Antipolis (France). +// Copyright (c) 2010-2013 GeometryFactory Sarl (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/SMDS_3/include/CGAL/tetrahedron_soup_to_triangulation_3.h $ +// $Id: include/CGAL/tetrahedron_soup_to_triangulation_3.h a484bfa $ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Mael Rouxel-Labbé, Maxime Gimeno, Jane Tournois +// +//****************************************************************************** +// File Description : +//****************************************************************************** + +#ifndef CGAL_SMDS_3_TETRAHEDRON_SOUP_TO_C3T3_H +#define CGAL_SMDS_3_TETRAHEDRON_SOUP_TO_C3T3_H + +#include + +#include +#include +#include +#include + +#include +#include +#include + +namespace CGAL { + + /** \ingroup PkgSMDS3Functions + * builds a 3D triangulation from a soup of tetrahedra. + * + * @tparam TetrahedronRange a model of `Range` whose value type is + * a `Tetrahedron_3`. The point type of the tetrahedra must be convertible + * to `Triangulation::Point` + * @tparam Triangulation a 3D triangulation class that has + * a vertex base model of `SimplicialMeshVertexBase_3` + * and a cell base model of `SimplicialMeshCellBase_3` + * + * @param tets the set of finite tetrahedra of a valid CGAL triangulation. + * Each element in the range is the geometric description of the + * corresponding cell in the triangulation. + * + * @returns the 3D triangulation built from \p tets + * + * @post the output triangulation must be a triangulation of the convex hull of `tets` + * + * @sa @ref SMDS_3/tetrahedron_soup_to_c3t3_example.cpp + * + */ + template + Triangulation tetrahedron_soup_to_triangulation_3(const TetrahedronRange& tets) + { + using Tr = Triangulation; + using Point = typename Tr::Point; + + Triangulation tr; + std::vector points; + std::vector > finite_cells; + boost::unordered_map, typename Tr::Cell::Surface_patch_index> border_facets; + boost::unordered_map p2i; + + CGAL_assertion_code( + typename Triangulation::Geom_traits::Orientation_3 orientation = + tr.geom_traits().orientation_3_object(); + ); + + for (typename TetrahedronRange::value_type tet : tets) + { + CGAL_assertion(tet.orientation() == CGAL::POSITIVE); + std::array cell; + + for (int i = 0; i < 4; ++i) + { + const Point& pi = tet[i]; + if (p2i.find(pi) == p2i.end()) + { + points.push_back(pi); + int index = static_cast(points.size() - 1); + p2i.insert(std::make_pair(pi, index)); + cell[i] = index; + } + else + cell[i] = p2i.at(pi); + } + + CGAL_assertion(orientation(points[cell[0]], + points[cell[1]], points[cell[2]], points[cell[3]]) == CGAL::POSITIVE); + + finite_cells.push_back(cell); + } + + typename Tr::Cell::Subdomain_index default_si(1); + CGAL::SMDS_3::build_triangulation_one_subdomain(tr, points, finite_cells, default_si, border_facets, + /*verbose = */false, /*replace_domain_0 = */false, /*allow_non_manifold =*/false); + + CGAL_assertion(CGAL::SMDS_3::internal::is_convex(tr)); + + return tr; + } + + /** \ingroup PkgSMDS3Functions + * builds a 3D triangulation from a soup of tetrahedra. + * + * @tparam PointRange a model of the concept `RandomAccessContainer` + * whose value type is the point type. + * The point type must be convertible to `Triangulation::Point`. + * @tparam TetrahedronRange a model of the concept `RandomAccessContainer` whose + * value type is a model of the concept `RandomAccessContainer` whose value type is `std::size_t` + * @tparam Triangulation a 3D triangulation class that has + * a vertex base model of `MeshVertexBase_3` + * and a cell base model of `MeshCellBase_3` + * @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * @param points points of the soup of tetrahedra + * @param tets the set of finite tetrahedra of a valid CGAL triangulation. + * Each element in the range describes a tetrahedron using the indices of the points + * in `points`. + * It must + * describe a non self-intersecting set of tetrahedra, that cover the convex hull of the + * corresponding point set. The tetrahedra must form a valid triangulation with each + * pair of neighboring cells sharing exactly one triangle. Combinatorial validity and + * validity of the geometric embedding are required. + * + * @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below + * + * \cgalNamedParamsBegin + * \cgalParamNBegin{surface_facets} + * \cgalParamDescription{each element in the range describes a surface facet using the indices of points + * in `points` (indices 0 to 2), and the associated `Surface_patch_index` (index 3)} + * \cgalParamType{a class model of `AssociativeContainer` + * whose key type is model of `RandomAccessContainer` containing `int` + * and mapped type is `Tr::Cell::Surface_patch_index`} + * \cgalParamDefault{an empty `boost::unordered_map, typename Tr::Cell::Surface_patch_index>`} + * \cgalParamExtra{to avoid copies of large data sets, this parameter can be passed using `std::cref`} + * \cgalParamNEnd + * \cgalParamNBegin{subdomain_indices} + * \cgalParamDescription{each element in the range gives the + * `Triangulation::Cell::Subdomain_index` corresponding to the tetrahedron (cell) + * of same index in `tets`} + * \cgalParamType{a class model of `RandomAccessContainer` whose value type + * is `Triangulation::Cell::Subdomain_index`} + * \cgalParamDefault{each finite cell of the output triangulation is + * set to have `1` as `Subdomain_index`} + * \cgalParamExtra{to avoid copies of large data sets, this parameter can be passed using `std::cref`} + * \cgalParamNEnd + *\cond SKIP_IN_MANUAL + * \cgalParamNBegin{allow_non_manifold} + * \cgalParamDescription{allows the construction of a triangulation with non-manifold edges + * and non manifold vertices. The triangulation is invalid if this situation is met, + * so it should be used only in advanced cases, and the triangulation will be hardly usable.} + * \cgalParamType{bool} + * \cgalParamDefault{false} + * \cgalParamNEnd + *\endcond + * \cgalNamedParamsEnd + * + * @returns the 3D triangulation built from parameters + * + * @pre `points` contains each point only once + * @post the output triangulation must be a triangulation of the convex hull of `points` + * @post `is_valid()` returns `true` for the returned triangulation + * + * @sa \link Polygon_mesh_processing::polygon_soup_to_polygon_mesh() `CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh()` \endlink + * @sa @ref SMDS_3/tetrahedron_soup_to_c3t3_example.cpp + * + */ + template + Triangulation tetrahedron_soup_to_triangulation_3(const PointRange& points, + const TetrahedronRange& tets, + const NamedParameters& np = parameters::default_values()) + { + using parameters::choose_parameter; + using parameters::get_parameter; + using parameters::get_parameter_reference; + + using Default_facet_map + = boost::unordered_map, + typename Triangulation::Cell::Surface_patch_index>; + using Facet_map_ref_type + = typename internal_np::Lookup_named_param_def< + internal_np::surface_facets_t, + NamedParameters, + Default_facet_map>::reference; + using Subdomains_ref_type + = typename internal_np::Lookup_named_param_def< + internal_np::subdomain_indices_t, + NamedParameters, + int>::reference; + + Triangulation tr; + Default_facet_map empty_map; + const Facet_map_ref_type& facets = choose_parameter( + get_parameter_reference(np, internal_np::surface_facets), + empty_map); + const Subdomains_ref_type& subdomains = choose_parameter( + get_parameter_reference(np, internal_np::subdomain_indices), + 1); + const bool non_manifold = choose_parameter( + get_parameter(np, internal_np::allow_non_manifold), + false); + + CGAL::SMDS_3::build_triangulation_with_subdomains_range(tr, points, tets, subdomains, facets, + /*verbose = */false, /*replace_domain_0 = */false, non_manifold); + + CGAL_assertion(CGAL::SMDS_3::internal::is_convex(tr)); + + return tr; + } + +} //namespace CGAL + + +#endif // CGAL_SMDS_3_TETRAHEDRON_SOUP_TO_C3T3_H diff --git a/thirdparty/CGAL/include/CGAL/thread.h b/thirdparty/CGAL/include/CGAL/thread.h index c76d5898..2de5ed0f 100644 --- a/thirdparty/CGAL/include/CGAL/thread.h +++ b/thirdparty/CGAL/include/CGAL/thread.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/thread.h $ -// $Id: thread.h 288c283 2021-08-30T19:24:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/thread.h $ +// $Id: include/CGAL/thread.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Simon Giraudot diff --git a/thirdparty/CGAL/include/CGAL/to_rational.h b/thirdparty/CGAL/include/CGAL/to_rational.h index a491fb86..b465dcb8 100644 --- a/thirdparty/CGAL/include/CGAL/to_rational.h +++ b/thirdparty/CGAL/include/CGAL/to_rational.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/to_rational.h $ -// $Id: to_rational.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/to_rational.h $ +// $Id: include/CGAL/to_rational.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -34,9 +34,9 @@ to_rational(double x) typedef typename FT::Denominator_type Denominator_type; typename FT::Compose compose; - CGAL_static_assertion((::boost::is_same::value)); + static_assert(::std::is_same::value); CGAL_USE_TYPE(Is_fraction); - CGAL_static_assertion((::boost::is_same::value)); + static_assert(::std::is_same::value); CGAL_USE_TYPE(Denominator_type); Numerator_type num(0),den(1); diff --git a/thirdparty/CGAL/include/CGAL/transforming_iterator.h b/thirdparty/CGAL/include/CGAL/transforming_iterator.h index 1ed9188c..7e63dc8a 100644 --- a/thirdparty/CGAL/include/CGAL/transforming_iterator.h +++ b/thirdparty/CGAL/include/CGAL/transforming_iterator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/transforming_iterator.h $ -// $Id: transforming_iterator.h 209513d 2020-07-31T15:58:38+02:00 Dmitry Anisimov +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/transforming_iterator.h $ +// $Id: include/CGAL/transforming_iterator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -12,10 +12,6 @@ #ifndef CGAL_TRANSFORMING_ITERATOR_H #define CGAL_TRANSFORMING_ITERATOR_H #include -#include -#include -#include -#include #include #include #include @@ -27,7 +23,7 @@ namespace CGAL { namespace internal { // non-empty case -template::value> struct Functor_as_base { +template::value> struct Functor_as_base { Functor_as_base(){} Functor_as_base(T const& t):f(t){} //template Functor_as_base(Functor_as_base const&g):f(g.functor()){} @@ -55,13 +51,11 @@ class transforming_iterator_helper decltype(std::declval()(std::declval())) >::type reference_; - typedef typename Default::Get::type>::type>::type value_type; + typedef typename Default::Get>>::type value_type; // Crappy heuristic. If we have *it that returns a Weighted_point and F that returns a reference to the Point contained in the Weighted_point it takes as argument, we do NOT want the transformed iterator to return a reference to the temporary *it. On the other hand, if *it returns an int n, and F returns a reference to array[n] it is not so good to lose the reference. This probably should be done elsewhere and should at least be made optional... - typedef typename boost::mpl::if_< - boost::mpl::or_, - boost::is_integral >, - reference_, value_type>::type reference; + typedef std::conditional_t || std::is_integral_v, + reference_, value_type> reference; public: typedef boost::iterator_adaptor< @@ -93,8 +87,8 @@ private internal::Functor_as_base template transforming_iterator( transforming_iterator const&i, - typename boost::enable_if_convertible::type* = 0, - typename boost::enable_if_convertible::type* = 0) + std::enable_if_t::value>* = 0, + std::enable_if_t::value>* = 0) : Base(i.base()),Functor_base(i.functor()) {} }; diff --git a/thirdparty/CGAL/include/CGAL/transforming_pair_iterator.h b/thirdparty/CGAL/include/CGAL/transforming_pair_iterator.h index 59869612..13fed0e0 100644 --- a/thirdparty/CGAL/include/CGAL/transforming_pair_iterator.h +++ b/thirdparty/CGAL/include/CGAL/transforming_pair_iterator.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/transforming_pair_iterator.h $ -// $Id: transforming_pair_iterator.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/transforming_pair_iterator.h $ +// $Id: include/CGAL/transforming_pair_iterator.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse @@ -16,16 +16,12 @@ #include #include -#include - - - namespace CGAL { namespace internal { -template ::value> +template ::value> struct Min_category { - CGAL_static_assertion((boost::is_convertible::value)); + static_assert(std::is_convertible::value); typedef Cat1 type; }; @@ -47,7 +43,7 @@ class transforming_pair_iterator_helper decltype(std::declval()(std::declval::reference>(),std::declval::reference>())) >::type reference; - typedef typename Default::Get::type>::type>::type value_type; + typedef typename Default::Get>>::type value_type; public: typedef boost::iterator_facade< @@ -97,9 +93,9 @@ private internal::Functor_as_base template transforming_pair_iterator( transforming_pair_iterator const&i, - typename boost::enable_if_convertible::type* = 0, - typename boost::enable_if_convertible::type* = 0, - typename boost::enable_if_convertible::type* = 0) + std::enable_if_t::value>* = 0, + std::enable_if_t::value>* = 0, + std::enable_if_t::value>* = 0) : Functor_base(i.functor()),iter1(i.iter1),iter2(i.iter2) {} }; diff --git a/thirdparty/CGAL/include/CGAL/triangulate_mixed_complex_3.h b/thirdparty/CGAL/include/CGAL/triangulate_mixed_complex_3.h index ce6f4f54..dcee8f77 100644 --- a/thirdparty/CGAL/include/CGAL/triangulate_mixed_complex_3.h +++ b/thirdparty/CGAL/include/CGAL/triangulate_mixed_complex_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/triangulate_mixed_complex_3.h $ -// $Id: triangulate_mixed_complex_3.h 7a1aaa4 2022-03-09T13:11:19+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/triangulate_mixed_complex_3.h $ +// $Id: include/CGAL/triangulate_mixed_complex_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/triangulate_power_diagram_3.h b/thirdparty/CGAL/include/CGAL/triangulate_power_diagram_3.h index 3acff935..c640cfa4 100644 --- a/thirdparty/CGAL/include/CGAL/triangulate_power_diagram_3.h +++ b/thirdparty/CGAL/include/CGAL/triangulate_power_diagram_3.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Skin_surface_3/include/CGAL/triangulate_power_diagram_3.h $ -// $Id: triangulate_power_diagram_3.h 7a1aaa4 2022-03-09T13:11:19+00:00 Andreas Fabri +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Skin_surface_3/include/CGAL/triangulate_power_diagram_3.h $ +// $Id: include/CGAL/triangulate_power_diagram_3.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/tss.h b/thirdparty/CGAL/include/CGAL/tss.h index 710c5c80..418bb117 100644 --- a/thirdparty/CGAL/include/CGAL/tss.h +++ b/thirdparty/CGAL/include/CGAL/tss.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/tss.h $ -// $Id: tss.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/tss.h $ +// $Id: include/CGAL/tss.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial #ifndef CGAL_TSS_H diff --git a/thirdparty/CGAL/include/CGAL/tuple.h b/thirdparty/CGAL/include/CGAL/tuple.h index 33512587..2c09b48a 100644 --- a/thirdparty/CGAL/include/CGAL/tuple.h +++ b/thirdparty/CGAL/include/CGAL/tuple.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/tuple.h $ -// $Id: tuple.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/tuple.h $ +// $Id: include/CGAL/tuple.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sebastien Loriot, Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/type_traits.h b/thirdparty/CGAL/include/CGAL/type_traits.h index d3ed7fa3..12161bae 100644 --- a/thirdparty/CGAL/include/CGAL/type_traits.h +++ b/thirdparty/CGAL/include/CGAL/type_traits.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/type_traits.h $ -// $Id: type_traits.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/type_traits.h $ +// $Id: include/CGAL/type_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Andreas Meyer @@ -12,20 +12,33 @@ #ifndef CGAL_TYPE_TRAITS_H #define CGAL_TYPE_TRAITS_H -#include #include #include +#include + namespace CGAL { template< class Base, class Derived > struct is_same_or_derived : - public ::boost::mpl::or_< - ::boost::is_same< Base, Derived >, - ::boost::is_base_and_derived< Base, Derived > - >::type + public std::bool_constant< + ::std::is_same_v< Base, Derived > || + ::boost::is_base_and_derived< Base, Derived >::value + > {}; -} +namespace cpp20 { + + template< class T > + struct remove_cvref { + typedef std::remove_cv_t> type; + }; + + template< class T > + using remove_cvref_t = typename remove_cvref::type; + +} // end namespace cpp20 + +} // end namespace CGAL #endif // CGAL_TYPE_TRAITS_H diff --git a/thirdparty/CGAL/include/CGAL/type_traits/is_iterator.h b/thirdparty/CGAL/include/CGAL/type_traits/is_iterator.h new file mode 100644 index 00000000..4dac3b4a --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/type_traits/is_iterator.h @@ -0,0 +1,94 @@ +// Copyright (c) 2011 INRIA Saclay Ile-de-France (France). +// All rights reserved. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/type_traits/is_iterator.h $ +// $Id: include/CGAL/type_traits/is_iterator.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Marc Glisse + + +#ifndef CGAL_TYPE_TRAITS_IS_ITERATOR_H +#define CGAL_TYPE_TRAITS_IS_ITERATOR_H + +#include +#include + +#include + +namespace CGAL { +namespace internal { + +BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator_category) +BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type) +BOOST_MPL_HAS_XXX_TRAIT_DEF(difference_type) +BOOST_MPL_HAS_XXX_TRAIT_DEF(pointer) +BOOST_MPL_HAS_XXX_TRAIT_DEF(reference) + +//We request the type to be either a pointer or to +//provide all 5 nested types provided by iterator_traits +template +struct is_iterator_ + : public std::bool_constant< + ( has_iterator_category::value && + has_value_type::value && + has_difference_type::value && + has_pointer::value && + has_reference::value) || + std::is_pointer_v > +{ }; + +template ::value> +struct is_iterator_type_ + : public boost::mpl::false_ +{ }; + +template +struct is_iterator_type_ + : public //std::is_base_of::iterator_category> + std::is_convertible::iterator_category, U> +{ }; + +} // namespace internal + +// NOTE: we don't want the real std::decay or functions are included +template +struct is_iterator + : public internal::is_iterator_>> +{ }; + +template +inline constexpr bool is_iterator_v = is_iterator::value; + +template +struct is_iterator_type + : public internal::is_iterator_type_>, Tag> +{ }; + +template +inline constexpr bool is_iterator_type_v = is_iterator_type::value; + + +template ::value> +struct is_iterator_to + : public boost::mpl::false_ +{ }; + +template +struct is_iterator_to + : public std::is_convertible::value_type, U> +{ }; + +template +inline constexpr bool is_iterator_to_v = is_iterator_to::value; + + +} // namespace CGAL + +#endif // CGAL_IS_ITERATOR_H diff --git a/thirdparty/CGAL/include/CGAL/typeset.h b/thirdparty/CGAL/include/CGAL/typeset.h index 52678997..10173525 100644 --- a/thirdparty/CGAL/include/CGAL/typeset.h +++ b/thirdparty/CGAL/include/CGAL/typeset.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/NewKernel_d/include/CGAL/typeset.h $ -// $Id: typeset.h 822bc55 2020-03-27T08:28:48+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/NewKernel_d/include/CGAL/typeset.h $ +// $Id: include/CGAL/typeset.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Marc Glisse diff --git a/thirdparty/CGAL/include/CGAL/use.h b/thirdparty/CGAL/include/CGAL/use.h index 0d899a98..f915376e 100644 --- a/thirdparty/CGAL/include/CGAL/use.h +++ b/thirdparty/CGAL/include/CGAL/use.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/use.h $ -// $Id: use.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/use.h $ +// $Id: include/CGAL/use.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Sylvain Pion diff --git a/thirdparty/CGAL/include/CGAL/user_classes.h b/thirdparty/CGAL/include/CGAL/user_classes.h index de499ef1..25de81a8 100644 --- a/thirdparty/CGAL/include/CGAL/user_classes.h +++ b/thirdparty/CGAL/include/CGAL/user_classes.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Kernel_23/include/CGAL/user_classes.h $ -// $Id: user_classes.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Kernel_23/include/CGAL/user_classes.h $ +// $Id: include/CGAL/user_classes.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/utility.h b/thirdparty/CGAL/include/CGAL/utility.h index 4273e167..41817ba3 100644 --- a/thirdparty/CGAL/include/CGAL/utility.h +++ b/thirdparty/CGAL/include/CGAL/utility.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/utility.h $ -// $Id: utility.h 4ffc949 2022-02-03T17:11:20+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/utility.h $ +// $Id: include/CGAL/utility.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/utils.h b/thirdparty/CGAL/include/CGAL/utils.h index d4183d07..9dcebbd3 100644 --- a/thirdparty/CGAL/include/CGAL/utils.h +++ b/thirdparty/CGAL/include/CGAL/utils.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/utils.h $ -// $Id: utils.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/utils.h $ +// $Id: include/CGAL/utils.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/utils_classes.h b/thirdparty/CGAL/include/CGAL/utils_classes.h index 0a8ecba5..7bec9e81 100644 --- a/thirdparty/CGAL/include/CGAL/utils_classes.h +++ b/thirdparty/CGAL/include/CGAL/utils_classes.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Number_types/include/CGAL/utils_classes.h $ -// $Id: utils_classes.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Number_types/include/CGAL/utils_classes.h $ +// $Id: include/CGAL/utils_classes.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/value_type_traits.h b/thirdparty/CGAL/include/CGAL/value_type_traits.h index 4ecb43c8..406d0c5a 100644 --- a/thirdparty/CGAL/include/CGAL/value_type_traits.h +++ b/thirdparty/CGAL/include/CGAL/value_type_traits.h @@ -4,8 +4,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/value_type_traits.h $ -// $Id: value_type_traits.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/value_type_traits.h $ +// $Id: include/CGAL/value_type_traits.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Alberto Ganesh Barbati and Laurent Saboret diff --git a/thirdparty/CGAL/include/CGAL/variant.h b/thirdparty/CGAL/include/CGAL/variant.h new file mode 100644 index 00000000..51bfbe03 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/variant.h @@ -0,0 +1,87 @@ +// Copyright (c) 2023 GeometryFactory Sarl (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/variant.h $ +// $Id: include/CGAL/variant.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Sébastien Loriot +// + +#ifndef CGAL_VARIANT_H +#define CGAL_VARIANT_H + +#include + +namespace CGAL +{ + +template +struct Is_in_variant; + +template +struct Is_in_variant> +{ + inline static constexpr bool value = + std::is_same_v || Is_in_variant>::value; +}; + +template +struct Is_in_variant> +{ + inline static constexpr bool value = std::is_same_v; +}; + +/// equals true iif `T` is a possible type in `Variant` with `Variant` being a `std::variant` +template +inline constexpr bool Is_in_variant_v = Is_in_variant::value; + +// -- +template +struct Add_to_variant; + +template +struct Add_to_variant> +{ + using type = std::variant; +}; + +/// a `std::variant` with `T` appended to the types of the `std::variant` `Variant` +template< class T, class Variant > +using Add_to_variant_t = typename Add_to_variant::type; + +namespace internal{ +template +struct Get_variant_impl +{ + using type = typename Get_variant_impl< + std::conditional_t, + Variant, + Add_to_variant_t>, + Tn...>::type; +}; + +template +struct Get_variant_impl +{ + using type = std::conditional_t, + Variant, + Add_to_variant_t>; +}; +} // end of internal namespace + +template +struct Variant_with_no_duplicate +{ + using type = typename internal::Get_variant_impl, Tn ...>::type; +}; + +/// a `std::variant` with types being all different +template< class ... Tn > +using Variant_with_no_duplicate_t = typename Variant_with_no_duplicate::type; + +} //end of CGAL namespace + +#endif diff --git a/thirdparty/CGAL/include/CGAL/vcm_estimate_edges.h b/thirdparty/CGAL/include/CGAL/vcm_estimate_edges.h index 7c591e92..c4703d92 100644 --- a/thirdparty/CGAL/include/CGAL/vcm_estimate_edges.h +++ b/thirdparty/CGAL/include/CGAL/vcm_estimate_edges.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/vcm_estimate_edges.h $ -// $Id: vcm_estimate_edges.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/vcm_estimate_edges.h $ +// $Id: include/CGAL/vcm_estimate_edges.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jocelyn Meyron and Quentin Mérigot @@ -40,7 +40,7 @@ namespace CGAL { /// `CGAL_EIGEN3_ENABLED` is defined then an overload using /// `Eigen_diagonalize_traits` is provided. Otherwise, the internal /// implementation `Diagonalize_traits` is used. -/// \sa CGAL::compute_vcm()` +/// \sa `CGAL::compute_vcm()` /// template bool diff --git a/thirdparty/CGAL/include/CGAL/vcm_estimate_normals.h b/thirdparty/CGAL/include/CGAL/vcm_estimate_normals.h index 316c7a29..62febd7d 100644 --- a/thirdparty/CGAL/include/CGAL/vcm_estimate_normals.h +++ b/thirdparty/CGAL/include/CGAL/vcm_estimate_normals.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h $ -// $Id: vcm_estimate_normals.h bccf399 2022-11-08T10:51:46+01:00 Jane Tournois +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h $ +// $Id: include/CGAL/vcm_estimate_normals.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Jocelyn Meyron and Quentin Mérigot @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include diff --git a/thirdparty/CGAL/include/CGAL/vector.h b/thirdparty/CGAL/include/CGAL/vector.h index 2ff96e4c..f800fdeb 100644 --- a/thirdparty/CGAL/include/CGAL/vector.h +++ b/thirdparty/CGAL/include/CGAL/vector.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/STL_Extension/include/CGAL/vector.h $ -// $Id: vector.h b42bbde 2021-05-05T06:46:57+01:00 Giles Bathgate +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/STL_Extension/include/CGAL/vector.h $ +// $Id: include/CGAL/vector.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // @@ -24,9 +24,7 @@ #include #include #include -#include -#include -#include +#include namespace CGAL { @@ -117,24 +115,31 @@ class vector_iterator { bool operator>=( const Self& i) const { return !(*this < i); } vector_iterator< T, - typename boost::remove_const< - typename boost::remove_reference::type - >::type&, - typename boost::remove_const< - typename boost::remove_pointer::type - >::type* > + std::remove_const_t< + std::remove_reference_t + >&, + std::remove_const_t< + std::remove_pointer_t + >* > remove_const() const { - typedef typename boost::remove_const< - typename boost::remove_pointer::type - >::type* Ptr_no_c; + typedef std::remove_const_t< + std::remove_pointer_t + >* Ptr_no_c; return vector_iterator< T, - typename boost::remove_const::type>::type&, + std::remove_const_t>&, Ptr_no_c> ( const_cast(ptr) ); } }; +template < class T, class Ref, class Ptr> +std::size_t hash_value(const vector_iterator& i) +{ + Ptr ptr = i.operator->(); + return reinterpret_cast(ptr)/ sizeof(T); +} + template < class T, class Ref, class Ptr> inline vector_iterator operator+( std::ptrdiff_t n, vector_iterator i) { @@ -609,4 +614,31 @@ void vector::insert( iterator position, size_type n, const T& x) { } //namespace CGAL +namespace std { + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4099) // For VC10 it is class hash +#endif + +#ifndef CGAL_CFG_NO_STD_HASH + + template < class T, class Ref, class Ptr> + struct hash > + : public CGAL::cpp98::unary_function, std::size_t> { + + std::size_t operator()(const CGAL::internal::vector_iterator& i) const + { + return CGAL::internal::hash_value(i); + } + }; + +#endif // CGAL_CFG_NO_STD_HASH + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +} // namespace std + #endif // CGAL_VECTOR_H // diff --git a/thirdparty/CGAL/include/CGAL/version.h b/thirdparty/CGAL/include/CGAL/version.h index 16b64bce..8cde50dc 100644 --- a/thirdparty/CGAL/include/CGAL/version.h +++ b/thirdparty/CGAL/include/CGAL/version.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/version.h $ -// $Id: version.h 755bfe4 2022-10-12T15:30:32+02:00 Laurent Rineau +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/version.h $ +// $Id: include/CGAL/version.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : - @@ -17,12 +17,12 @@ #define CGAL_VERSION_H #ifndef SWIG -#define CGAL_VERSION 5.5.2 -#define CGAL_GIT_HASH 8a3184a1a82c3e7d737656bfa4950471c369a4b9 +#define CGAL_VERSION 6.0-dev +#define CGAL_GIT_HASH a484bfa35a3c5f9b82a0de8a852a66acaa32ec72 #endif -#define CGAL_VERSION_NR 1050521000 +#define CGAL_VERSION_NR 1060001000 #define CGAL_SVN_REVISION 99999 -#define CGAL_RELEASE_DATE 20230224 +#define CGAL_RELEASE_DATE 20240114 #include diff --git a/thirdparty/CGAL/include/CGAL/version_checker.h b/thirdparty/CGAL/include/CGAL/version_checker.h new file mode 100644 index 00000000..c58cd1e9 --- /dev/null +++ b/thirdparty/CGAL/include/CGAL/version_checker.h @@ -0,0 +1,53 @@ +// Copyright (c) 2023 GeometryFactory. +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/version_checker.h $ +// $Id: include/CGAL/version_checker.h a484bfa $ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : - + +#ifndef CGAL_VERSION_CHECKER_H +#define CGAL_VERSION_CHECKER_H + +#include + +// All files including this header are meant to work with a given version of CGAL +// When using forked headers, set the following macro to the version of CGAL +// you want to use. + +//// Set the 3 following macros to the version of CGAL you want to use +//#define CGAL_COMPATIBLE_VERSION_MAJOR 6 +//#define CGAL_COMPATIBLE_VERSION_MINOR 0 +//#define CGAL_COMPATIBLE_VERSION_PATCH 0 + +// Set the following macros to 1 to get a warning/an error +// when using a possibly incompatible version of CGAL +#define CGAL_VERSION_CHECKER_ERROR 0 +#define CGAL_VERSION_CHECKER_WARNING 0 + +#define CGAL_COMPATIBLE_VERSION_STR CGAL_STR(CGAL_COMPATIBLE_VERSION_MAJOR) "." \ + CGAL_STR(CGAL_COMPATIBLE_VERSION_MINOR) "." \ + CGAL_STR(CGAL_COMPATIBLE_VERSION_PATCH) + + +// Check that the version of CGAL used is the one expected +#if CGAL_COMPATIBLE_VERSION_MAJOR != CGAL_VERSION_MAJOR \ + || CGAL_COMPATIBLE_VERSION_MINOR != CGAL_VERSION_MINOR \ + || CGAL_COMPATIBLE_VERSION_PATCH != CGAL_VERSION_PATCH + + #if CGAL_VERSION_CHECKER_WARNING || CGAL_VERSION_CHECKER_ERROR + #pragma message("These headers are meant to be used with CGAL " CGAL_COMPATIBLE_VERSION_STR " only."\ + " You are using CGAL version: " CGAL_STR(CGAL_VERSION) ".") + + #ifdef CGAL_VERSION_CHECKER_ERROR + #error "Incompatible version of CGAL" + #endif + + #endif + +#endif + +#endif // CGAL_VERSION_CHECKER_H diff --git a/thirdparty/CGAL/include/CGAL/version_macros.h b/thirdparty/CGAL/include/CGAL/version_macros.h index ae747734..c0276684 100644 --- a/thirdparty/CGAL/include/CGAL/version_macros.h +++ b/thirdparty/CGAL/include/CGAL/version_macros.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Installation/include/CGAL/version_macros.h $ -// $Id: version_macros.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Installation/include/CGAL/version_macros.h $ +// $Id: include/CGAL/version_macros.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/vtkSurfaceMesherContourFilter.h b/thirdparty/CGAL/include/CGAL/vtkSurfaceMesherContourFilter.h index 36dd54d0..4144787d 100644 --- a/thirdparty/CGAL/include/CGAL/vtkSurfaceMesherContourFilter.h +++ b/thirdparty/CGAL/include/CGAL/vtkSurfaceMesherContourFilter.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Surface_mesher/include/CGAL/vtkSurfaceMesherContourFilter.h $ -// $Id: vtkSurfaceMesherContourFilter.h e9d41d7 2020-04-21T10:03:00+02:00 Maxime Gimeno +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Surface_mesher/include/CGAL/vtkSurfaceMesherContourFilter.h $ +// $Id: include/CGAL/vtkSurfaceMesherContourFilter.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // @@ -107,7 +107,7 @@ int vtkCGALSurfaceMesherContourFilter::RequestData( vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); vtkInformation *outInfo = outputVector->GetInformationObject(0); - // get the input and ouptut + // get the input and output vtkImageData *inData = vtkImageData::SafeDownCast( inInfo->Get(vtkDataObject::DATA_OBJECT())); vtkPolyData *output = vtkPolyData::SafeDownCast( diff --git a/thirdparty/CGAL/include/CGAL/width_assertions.h b/thirdparty/CGAL/include/CGAL/width_assertions.h index 46b8f8ee..b861a5c3 100644 --- a/thirdparty/CGAL/include/CGAL/width_assertions.h +++ b/thirdparty/CGAL/include/CGAL/width_assertions.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Polytope_distance_d/include/CGAL/width_assertions.h $ -// $Id: width_assertions.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Polytope_distance_d/include/CGAL/width_assertions.h $ +// $Id: include/CGAL/width_assertions.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // diff --git a/thirdparty/CGAL/include/CGAL/wlop_simplify_and_regularize_point_set.h b/thirdparty/CGAL/include/CGAL/wlop_simplify_and_regularize_point_set.h index 1f1f23c8..dea421cc 100644 --- a/thirdparty/CGAL/include/CGAL/wlop_simplify_and_regularize_point_set.h +++ b/thirdparty/CGAL/include/CGAL/wlop_simplify_and_regularize_point_set.h @@ -3,8 +3,8 @@ // // This file is part of CGAL (www.cgal.org). // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h $ -// $Id: wlop_simplify_and_regularize_point_set.h 75b03e6 2022-01-10T15:33:04+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h $ +// $Id: include/CGAL/wlop_simplify_and_regularize_point_set.h a484bfa $ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Shihao Wu, Clement Jamin, Pierre Alliez @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include @@ -105,7 +105,7 @@ compute_update_sample_point( const std::vector& sample_densities ///< ) { - CGAL_point_set_processing_precondition(radius > 0); + CGAL_precondition(radius > 0); bool is_original_densities_empty = original_densities.empty(); bool is_sample_densities_empty = sample_densities.empty(); @@ -231,7 +231,7 @@ compute_density_weight_for_original_point( const typename Kernel::FT radius ///< neighbor radius square ) { - CGAL_point_set_processing_precondition(radius > 0); + CGAL_precondition(radius > 0); // basic geometric types typedef typename Kernel::Point_3 Point; @@ -465,9 +465,9 @@ wlop_simplify_and_regularize_point_set( // precondition: at least one element in the container. // to fix: should have at least three distinct points // but this is costly to check - CGAL_point_set_processing_precondition(points.begin() != points.end()); - CGAL_point_set_processing_precondition(select_percentage >= 0 - && select_percentage <= 100); + CGAL_precondition(points.begin() != points.end()); + CGAL_precondition(select_percentage >= 0 + && select_percentage <= 100); // Random shuffle CGAL::cpp98::random_shuffle (points.begin(), points.end()); @@ -507,7 +507,7 @@ wlop_simplify_and_regularize_point_set( #endif } - CGAL_point_set_processing_precondition(radius > 0); + CGAL_precondition(radius > 0); // Initiate a KD-tree search for original points std::vector original_treeElements; @@ -525,6 +525,7 @@ wlop_simplify_and_regularize_point_set( if (require_uniform_sampling)//default value is false { + original_density_weights.reserve(number_of_original); //todo: this part could also be parallelized if needed for (it = first_original_iter, i = 0; it != points.end() ; ++it, ++i) { @@ -552,6 +553,7 @@ wlop_simplify_and_regularize_point_set( // Compute sample density weight for sample points std::vector sample_density_weights; + sample_density_weights.reserve(number_of_sample); for (sample_iter = sample_points.begin(); sample_iter != sample_points.end(); ++sample_iter) @@ -602,9 +604,7 @@ wlop_simplify_and_regularize_point_set( if (interrupted) return output; - sample_iter = sample_points.begin(); - for (std::size_t i = 0; i < sample_points.size(); ++ i) - sample_points[i] = update_sample_points[i]; + sample_points.swap(update_sample_points); } // final output diff --git a/thirdparty/CGAL/include/CGAL/wmult.h b/thirdparty/CGAL/include/CGAL/wmult.h index d9fa1eb4..617e7c32 100644 --- a/thirdparty/CGAL/include/CGAL/wmult.h +++ b/thirdparty/CGAL/include/CGAL/wmult.h @@ -7,8 +7,8 @@ // // This file is part of CGAL (www.cgal.org) // -// $URL: https://github.com/CGAL/cgal/blob/v5.5.2/Distance_2/include/CGAL/wmult.h $ -// $Id: wmult.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot +// $URL: https://github.com/CGAL/cgal/blob/v6.0-dev/Distance_2/include/CGAL/wmult.h $ +// $Id: include/CGAL/wmult.h a484bfa $ // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // From c1624896cbd77a63831d3e443ba5bb18ee1e3d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Pa=C4=91en?= <49401914+ipadjen@users.noreply.github.com> Date: Mon, 15 Jan 2024 21:36:09 +0100 Subject: [PATCH 2/4] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf266f0e..3bb3a9c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [0.2.0] - +### Changed +- Updated CGAL's improvements to Alpha Wrapping + ## [0.1.1] - 2023-07-10 ### Added - Queue counter From 8d8b62d1822f363992ede08a97a80e51793a05b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Pa=C4=91en?= <49401914+ipadjen@users.noreply.github.com> Date: Mon, 15 Jan 2024 21:38:41 +0100 Subject: [PATCH 3/4] Update deprecated triangulate_hole() --- wrapwrap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrapwrap.cpp b/wrapwrap.cpp index 61d354a4..62fe9ae3 100644 --- a/wrapwrap.cpp +++ b/wrapwrap.cpp @@ -89,7 +89,7 @@ void fillHoles(Mesh& mesh) { // fill using boundary halfedges for(halfedge_descriptor h : border_cycles) - PMP::triangulate_hole(mesh, h, CGAL::Emptyset_iterator()); + PMP::triangulate_hole(mesh, h); std::cout << " done" << std::endl; } From 0d9af6a2143a1bd652148cafce2d85ddb43e9958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Pa=C4=91en?= <49401914+ipadjen@users.noreply.github.com> Date: Tue, 16 Jan 2024 20:00:58 +0100 Subject: [PATCH 4/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bb3a9c2..314306c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [0.2.0] - +## [0.2.0] - 2024-01-16 ### Changed - Updated CGAL's improvements to Alpha Wrapping